From 8d5359002df2a96509efdc32b49409c6fb329c0b Mon Sep 17 00:00:00 2001 From: cloud-java-bot <122572305+cloud-java-bot@users.noreply.github.com> Date: Wed, 22 May 2024 22:11:46 -0400 Subject: [PATCH] feat: [visionai] new module for visionai (#10875) * feat: [visionai] new module for visionai * chore: generate libraries at Wed May 22 19:25:53 UTC 2024 --- gapic-libraries-bom/pom.xml | 7 + generation_config.yaml | 21 +- java-visionai/.OwlBot-hermetic.yaml | 35 + java-visionai/.repo-metadata.json | 17 + java-visionai/README.md | 225 + .../google-cloud-visionai-bom/pom.xml | 43 + java-visionai/google-cloud-visionai/pom.xml | 113 + .../cloud/visionai/v1/AppPlatformClient.java | 4910 +++++ .../visionai/v1/AppPlatformSettings.java | 728 + .../visionai/v1/HealthCheckServiceClient.java | 268 + .../v1/HealthCheckServiceSettings.java | 204 + .../visionai/v1/LiveVideoAnalyticsClient.java | 3504 +++ .../v1/LiveVideoAnalyticsSettings.java | 520 + .../visionai/v1/StreamingServiceClient.java | 539 + .../visionai/v1/StreamingServiceSettings.java | 259 + .../visionai/v1/StreamsServiceClient.java | 4180 ++++ .../visionai/v1/StreamsServiceSettings.java | 615 + .../cloud/visionai/v1/WarehouseClient.java | 10074 +++++++++ .../cloud/visionai/v1/WarehouseSettings.java | 1152 + .../cloud/visionai/v1/gapic_metadata.json | 474 + .../cloud/visionai/v1/package-info.java | 151 + .../visionai/v1/stub/AppPlatformStub.java | 336 + .../v1/stub/AppPlatformStubSettings.java | 2043 ++ .../stub/GrpcAppPlatformCallableFactory.java | 113 + .../visionai/v1/stub/GrpcAppPlatformStub.java | 1282 ++ ...GrpcHealthCheckServiceCallableFactory.java | 113 + .../v1/stub/GrpcHealthCheckServiceStub.java | 162 + ...GrpcLiveVideoAnalyticsCallableFactory.java | 113 + .../v1/stub/GrpcLiveVideoAnalyticsStub.java | 883 + .../GrpcStreamingServiceCallableFactory.java | 113 + .../v1/stub/GrpcStreamingServiceStub.java | 302 + .../GrpcStreamsServiceCallableFactory.java | 113 + .../v1/stub/GrpcStreamsServiceStub.java | 1067 + .../v1/stub/GrpcWarehouseCallableFactory.java | 113 + .../visionai/v1/stub/GrpcWarehouseStub.java | 2555 +++ .../v1/stub/HealthCheckServiceStub.java | 40 + .../stub/HealthCheckServiceStubSettings.java | 319 + .../HttpJsonAppPlatformCallableFactory.java | 101 + .../v1/stub/HttpJsonAppPlatformStub.java | 2197 ++ ...JsonHealthCheckServiceCallableFactory.java | 101 + .../stub/HttpJsonHealthCheckServiceStub.java | 199 + ...JsonLiveVideoAnalyticsCallableFactory.java | 101 + .../stub/HttpJsonLiveVideoAnalyticsStub.java | 1532 ++ ...tpJsonStreamingServiceCallableFactory.java | 101 + .../v1/stub/HttpJsonStreamingServiceStub.java | 345 + ...HttpJsonStreamsServiceCallableFactory.java | 101 + .../v1/stub/HttpJsonStreamsServiceStub.java | 1887 ++ .../HttpJsonWarehouseCallableFactory.java | 101 + .../v1/stub/HttpJsonWarehouseStub.java | 4520 ++++ .../v1/stub/LiveVideoAnalyticsStub.java | 222 + .../stub/LiveVideoAnalyticsStubSettings.java | 1477 ++ .../v1/stub/StreamingServiceStub.java | 72 + .../v1/stub/StreamingServiceStubSettings.java | 424 + .../visionai/v1/stub/StreamsServiceStub.java | 267 + .../v1/stub/StreamsServiceStubSettings.java | 1706 ++ .../cloud/visionai/v1/stub/WarehouseStub.java | 594 + .../v1/stub/WarehouseStubSettings.java | 3584 +++ .../reflect-config.json | 9506 ++++++++ .../v1/AppPlatformClientHttpJsonTest.java | 2671 +++ .../visionai/v1/AppPlatformClientTest.java | 2433 +++ .../HealthCheckServiceClientHttpJsonTest.java | 125 + .../v1/HealthCheckServiceClientTest.java | 128 + .../LiveVideoAnalyticsClientHttpJsonTest.java | 1873 ++ .../v1/LiveVideoAnalyticsClientTest.java | 1681 ++ .../cloud/visionai/v1/MockAppPlatform.java | 59 + .../visionai/v1/MockAppPlatformImpl.java | 603 + .../visionai/v1/MockHealthCheckService.java | 59 + .../v1/MockHealthCheckServiceImpl.java | 81 + .../cloud/visionai/v1/MockIAMPolicy.java | 59 + .../cloud/visionai/v1/MockIAMPolicyImpl.java | 59 + .../visionai/v1/MockLiveVideoAnalytics.java | 59 + .../v1/MockLiveVideoAnalyticsImpl.java | 438 + .../cloud/visionai/v1/MockLocations.java | 59 + .../cloud/visionai/v1/MockLocationsImpl.java | 59 + .../visionai/v1/MockStreamingService.java | 59 + .../visionai/v1/MockStreamingServiceImpl.java | 232 + .../cloud/visionai/v1/MockStreamsService.java | 59 + .../visionai/v1/MockStreamsServiceImpl.java | 538 + .../cloud/visionai/v1/MockWarehouse.java | 59 + .../cloud/visionai/v1/MockWarehouseImpl.java | 1396 ++ .../StreamingServiceClientHttpJsonTest.java | 270 + .../v1/StreamingServiceClientTest.java | 388 + .../v1/StreamsServiceClientHttpJsonTest.java | 2249 ++ .../visionai/v1/StreamsServiceClientTest.java | 2024 ++ .../v1/WarehouseClientHttpJsonTest.java | 5221 +++++ .../visionai/v1/WarehouseClientTest.java | 4639 ++++ .../grpc-google-cloud-visionai-v1/pom.xml | 45 + .../cloud/visionai/v1/AppPlatformGrpc.java | 3327 +++ .../visionai/v1/HealthCheckServiceGrpc.java | 385 + .../visionai/v1/LiveVideoAnalyticsGrpc.java | 2334 ++ .../visionai/v1/StreamingServiceGrpc.java | 869 + .../cloud/visionai/v1/StreamsServiceGrpc.java | 2868 +++ .../cloud/visionai/v1/WarehouseGrpc.java | 7692 +++++++ java-visionai/owlbot.py | 36 + java-visionai/pom.xml | 55 + .../clirr-ignored-differences.xml | 19 + .../proto-google-cloud-visionai-v1/pom.xml | 37 + .../v1/AIEnabledDevicesInputConfig.java | 433 + .../AIEnabledDevicesInputConfigOrBuilder.java | 25 + .../cloud/visionai/v1/AcceleratorType.java | 309 + .../visionai/v1/AcquireLeaseRequest.java | 1226 ++ .../v1/AcquireLeaseRequestOrBuilder.java | 136 + .../v1/AddApplicationStreamInputRequest.java | 1506 ++ ...pplicationStreamInputRequestOrBuilder.java | 172 + .../v1/AddApplicationStreamInputResponse.java | 439 + ...plicationStreamInputResponseOrBuilder.java | 25 + .../visionai/v1/AddCollectionItemRequest.java | 742 + .../v1/AddCollectionItemRequestOrBuilder.java | 67 + .../v1/AddCollectionItemResponse.java | 718 + .../AddCollectionItemResponseOrBuilder.java | 61 + .../google/cloud/visionai/v1/Analysis.java | 2630 +++ .../cloud/visionai/v1/AnalysisDefinition.java | 954 + .../v1/AnalysisDefinitionOrBuilder.java | 78 + .../cloud/visionai/v1/AnalysisName.java | 257 + .../cloud/visionai/v1/AnalysisOrBuilder.java | 382 + .../visionai/v1/AnalyzeAssetMetadata.java | 2780 +++ .../v1/AnalyzeAssetMetadataOrBuilder.java | 161 + .../visionai/v1/AnalyzeAssetRequest.java | 653 + .../v1/AnalyzeAssetRequestOrBuilder.java | 59 + .../visionai/v1/AnalyzeAssetResponse.java | 432 + .../v1/AnalyzeAssetResponseOrBuilder.java | 25 + .../visionai/v1/AnalyzeCorpusMetadata.java | 722 + .../v1/AnalyzeCorpusMetadataOrBuilder.java | 61 + .../visionai/v1/AnalyzeCorpusRequest.java | 653 + .../v1/AnalyzeCorpusRequestOrBuilder.java | 59 + .../visionai/v1/AnalyzeCorpusResponse.java | 432 + .../v1/AnalyzeCorpusResponseOrBuilder.java | 25 + .../cloud/visionai/v1/AnalyzerDefinition.java | 4775 ++++ .../v1/AnalyzerDefinitionOrBuilder.java | 286 + .../google/cloud/visionai/v1/Annotation.java | 930 + .../v1/AnnotationCustomizedStruct.java | 863 + .../AnnotationCustomizedStructOrBuilder.java | 84 + .../cloud/visionai/v1/AnnotationList.java | 934 + .../visionai/v1/AnnotationListOrBuilder.java | 78 + .../visionai/v1/AnnotationMatchingResult.java | 1516 ++ .../v1/AnnotationMatchingResultOrBuilder.java | 157 + .../cloud/visionai/v1/AnnotationName.java | 298 + .../visionai/v1/AnnotationOrBuilder.java | 91 + .../cloud/visionai/v1/AnnotationValue.java | 2888 +++ .../visionai/v1/AnnotationValueOrBuilder.java | 356 + .../cloud/visionai/v1/AnnotationsProto.java | 844 + .../v1/AppPlatformCloudFunctionRequest.java | 2265 ++ ...PlatformCloudFunctionRequestOrBuilder.java | 133 + .../v1/AppPlatformCloudFunctionResponse.java | 2539 +++ ...latformCloudFunctionResponseOrBuilder.java | 181 + .../visionai/v1/AppPlatformEventBody.java | 1118 + .../v1/AppPlatformEventBodyOrBuilder.java | 122 + .../visionai/v1/AppPlatformMetadata.java | 1182 + .../v1/AppPlatformMetadataOrBuilder.java | 128 + .../google/cloud/visionai/v1/Application.java | 6846 ++++++ .../cloud/visionai/v1/ApplicationConfigs.java | 2301 ++ .../v1/ApplicationConfigsOrBuilder.java | 119 + .../visionai/v1/ApplicationInstance.java | 928 + .../v1/ApplicationInstanceOrBuilder.java | 92 + .../cloud/visionai/v1/ApplicationName.java | 227 + .../v1/ApplicationNodeAnnotation.java | 1124 + .../ApplicationNodeAnnotationOrBuilder.java | 103 + .../visionai/v1/ApplicationOrBuilder.java | 369 + .../visionai/v1/ApplicationStreamInput.java | 645 + .../v1/ApplicationStreamInputOrBuilder.java | 41 + .../com/google/cloud/visionai/v1/Asset.java | 1247 ++ .../google/cloud/visionai/v1/AssetName.java | 257 + .../cloud/visionai/v1/AssetOrBuilder.java | 140 + .../google/cloud/visionai/v1/AssetSource.java | 2283 ++ .../visionai/v1/AssetSourceOrBuilder.java | 98 + .../cloud/visionai/v1/AttributeValue.java | 1060 + .../visionai/v1/AttributeValueOrBuilder.java | 128 + .../visionai/v1/AutoscalingMetricSpec.java | 769 + .../v1/AutoscalingMetricSpecOrBuilder.java | 77 + .../visionai/v1/BatchRunProcessRequest.java | 2353 ++ .../v1/BatchRunProcessRequestOrBuilder.java | 184 + .../visionai/v1/BatchRunProcessResponse.java | 1117 + .../v1/BatchRunProcessResponseOrBuilder.java | 103 + .../cloud/visionai/v1/BigQueryConfig.java | 1461 ++ .../visionai/v1/BigQueryConfigOrBuilder.java | 296 + .../google/cloud/visionai/v1/BoolValue.java | 493 + .../cloud/visionai/v1/BoolValueOrBuilder.java | 33 + .../com/google/cloud/visionai/v1/Channel.java | 2240 ++ .../cloud/visionai/v1/ChannelOrBuilder.java | 301 + .../google/cloud/visionai/v1/CircleArea.java | 731 + .../visionai/v1/CircleAreaOrBuilder.java | 65 + .../v1/ClassificationPredictionResult.java | 1232 ++ ...assificationPredictionResultOrBuilder.java | 160 + .../cloud/visionai/v1/ClipAssetRequest.java | 966 + .../v1/ClipAssetRequestOrBuilder.java | 100 + .../cloud/visionai/v1/ClipAssetResponse.java | 2007 ++ .../v1/ClipAssetResponseOrBuilder.java | 95 + .../com/google/cloud/visionai/v1/Cluster.java | 2587 +++ .../google/cloud/visionai/v1/ClusterInfo.java | 610 + .../visionai/v1/ClusterInfoOrBuilder.java | 52 + .../google/cloud/visionai/v1/ClusterName.java | 223 + .../cloud/visionai/v1/ClusterOrBuilder.java | 324 + .../google/cloud/visionai/v1/Collection.java | 1010 + .../cloud/visionai/v1/CollectionItem.java | 1142 + .../visionai/v1/CollectionItemOrBuilder.java | 115 + .../cloud/visionai/v1/CollectionName.java | 269 + .../visionai/v1/CollectionOrBuilder.java | 107 + .../cloud/visionai/v1/CommitRequest.java | 540 + .../visionai/v1/CommitRequestOrBuilder.java | 39 + .../google/cloud/visionai/v1/CommonProto.java | 168 + .../cloud/visionai/v1/ControlledMode.java | 1077 + .../visionai/v1/ControlledModeOrBuilder.java | 134 + .../com/google/cloud/visionai/v1/Corpus.java | 1954 ++ .../google/cloud/visionai/v1/CorpusName.java | 227 + .../cloud/visionai/v1/CorpusOrBuilder.java | 217 + .../visionai/v1/CreateAnalysisRequest.java | 1390 ++ .../v1/CreateAnalysisRequestOrBuilder.java | 170 + .../visionai/v1/CreateAnnotationRequest.java | 1227 ++ .../v1/CreateAnnotationRequestOrBuilder.java | 155 + .../v1/CreateApplicationInstancesRequest.java | 1483 ++ ...eApplicationInstancesRequestOrBuilder.java | 171 + .../CreateApplicationInstancesResponse.java | 440 + ...ApplicationInstancesResponseOrBuilder.java | 25 + .../visionai/v1/CreateApplicationRequest.java | 1393 ++ .../v1/CreateApplicationRequestOrBuilder.java | 170 + .../cloud/visionai/v1/CreateAssetRequest.java | 1207 + .../v1/CreateAssetRequestOrBuilder.java | 152 + .../visionai/v1/CreateClusterRequest.java | 1383 ++ .../v1/CreateClusterRequestOrBuilder.java | 167 + .../visionai/v1/CreateCollectionMetadata.java | 728 + .../v1/CreateCollectionMetadataOrBuilder.java | 61 + .../visionai/v1/CreateCollectionRequest.java | 1220 ++ .../v1/CreateCollectionRequestOrBuilder.java | 153 + .../visionai/v1/CreateCorpusMetadata.java | 981 + .../v1/CreateCorpusMetadataOrBuilder.java | 96 + .../visionai/v1/CreateCorpusRequest.java | 908 + .../v1/CreateCorpusRequestOrBuilder.java | 89 + .../visionai/v1/CreateDataSchemaRequest.java | 956 + .../v1/CreateDataSchemaRequestOrBuilder.java | 100 + .../cloud/visionai/v1/CreateDraftRequest.java | 1370 ++ .../v1/CreateDraftRequestOrBuilder.java | 167 + .../cloud/visionai/v1/CreateEventRequest.java | 1370 ++ .../v1/CreateEventRequestOrBuilder.java | 167 + .../v1/CreateIndexEndpointMetadata.java | 728 + .../CreateIndexEndpointMetadataOrBuilder.java | 61 + .../v1/CreateIndexEndpointRequest.java | 1169 + .../CreateIndexEndpointRequestOrBuilder.java | 133 + .../visionai/v1/CreateIndexMetadata.java | 727 + .../v1/CreateIndexMetadataOrBuilder.java | 61 + .../cloud/visionai/v1/CreateIndexRequest.java | 1160 + .../v1/CreateIndexRequestOrBuilder.java | 134 + .../visionai/v1/CreateOperatorRequest.java | 1390 ++ .../v1/CreateOperatorRequestOrBuilder.java | 170 + .../visionai/v1/CreateProcessRequest.java | 1383 ++ .../v1/CreateProcessRequestOrBuilder.java | 167 + .../visionai/v1/CreateProcessorRequest.java | 1390 ++ .../v1/CreateProcessorRequestOrBuilder.java | 170 + .../v1/CreateSearchConfigRequest.java | 1162 + .../CreateSearchConfigRequestOrBuilder.java | 131 + .../v1/CreateSearchHypernymRequest.java | 1185 + .../CreateSearchHypernymRequestOrBuilder.java | 138 + .../visionai/v1/CreateSeriesRequest.java | 1370 ++ .../v1/CreateSeriesRequestOrBuilder.java | 167 + .../visionai/v1/CreateStreamRequest.java | 1370 ++ .../v1/CreateStreamRequestOrBuilder.java | 167 + .../google/cloud/visionai/v1/Criteria.java | 2592 +++ .../cloud/visionai/v1/CriteriaOrBuilder.java | 283 + .../v1/CustomProcessorSourceInfo.java | 4528 ++++ .../CustomProcessorSourceInfoOrBuilder.java | 254 + .../google/cloud/visionai/v1/DataSchema.java | 1124 + .../cloud/visionai/v1/DataSchemaDetails.java | 7432 +++++++ .../v1/DataSchemaDetailsOrBuilder.java | 249 + .../cloud/visionai/v1/DataSchemaName.java | 269 + .../visionai/v1/DataSchemaOrBuilder.java | 121 + .../google/cloud/visionai/v1/DataType.java | 225 + .../cloud/visionai/v1/DateTimeRange.java | 970 + .../cloud/visionai/v1/DateTimeRangeArray.java | 942 + .../v1/DateTimeRangeArrayOrBuilder.java | 78 + .../visionai/v1/DateTimeRangeOrBuilder.java | 96 + .../cloud/visionai/v1/DedicatedResources.java | 2100 ++ .../v1/DedicatedResourcesOrBuilder.java | 291 + .../visionai/v1/DeleteAnalysisRequest.java | 905 + .../v1/DeleteAnalysisRequestOrBuilder.java | 104 + .../visionai/v1/DeleteAnnotationRequest.java | 653 + .../v1/DeleteAnnotationRequestOrBuilder.java | 59 + .../v1/DeleteApplicationInstancesRequest.java | 1230 ++ ...eApplicationInstancesRequestOrBuilder.java | 167 + .../DeleteApplicationInstancesResponse.java | 440 + ...ApplicationInstancesResponseOrBuilder.java | 25 + .../visionai/v1/DeleteApplicationRequest.java | 1007 + .../v1/DeleteApplicationRequestOrBuilder.java | 119 + .../visionai/v1/DeleteAssetMetadata.java | 434 + .../v1/DeleteAssetMetadataOrBuilder.java | 25 + .../cloud/visionai/v1/DeleteAssetRequest.java | 653 + .../v1/DeleteAssetRequestOrBuilder.java | 59 + .../visionai/v1/DeleteClusterRequest.java | 905 + .../v1/DeleteClusterRequestOrBuilder.java | 104 + .../visionai/v1/DeleteCollectionMetadata.java | 728 + .../v1/DeleteCollectionMetadataOrBuilder.java | 61 + .../visionai/v1/DeleteCollectionRequest.java | 646 + .../v1/DeleteCollectionRequestOrBuilder.java | 57 + .../visionai/v1/DeleteCorpusRequest.java | 639 + .../v1/DeleteCorpusRequestOrBuilder.java | 55 + .../visionai/v1/DeleteDataSchemaRequest.java | 653 + .../v1/DeleteDataSchemaRequestOrBuilder.java | 59 + .../cloud/visionai/v1/DeleteDraftRequest.java | 905 + .../v1/DeleteDraftRequestOrBuilder.java | 104 + .../cloud/visionai/v1/DeleteEventRequest.java | 905 + .../v1/DeleteEventRequestOrBuilder.java | 104 + .../v1/DeleteIndexEndpointMetadata.java | 728 + .../DeleteIndexEndpointMetadataOrBuilder.java | 61 + .../v1/DeleteIndexEndpointRequest.java | 640 + .../DeleteIndexEndpointRequestOrBuilder.java | 55 + .../visionai/v1/DeleteIndexMetadata.java | 432 + .../v1/DeleteIndexMetadataOrBuilder.java | 25 + .../cloud/visionai/v1/DeleteIndexRequest.java | 653 + .../v1/DeleteIndexRequestOrBuilder.java | 59 + .../visionai/v1/DeleteOperatorRequest.java | 905 + .../v1/DeleteOperatorRequestOrBuilder.java | 104 + .../visionai/v1/DeleteProcessRequest.java | 905 + .../v1/DeleteProcessRequestOrBuilder.java | 104 + .../visionai/v1/DeleteProcessorRequest.java | 905 + .../v1/DeleteProcessorRequestOrBuilder.java | 104 + .../v1/DeleteSearchConfigRequest.java | 654 + .../DeleteSearchConfigRequestOrBuilder.java | 59 + .../v1/DeleteSearchHypernymRequest.java | 654 + .../DeleteSearchHypernymRequestOrBuilder.java | 59 + .../visionai/v1/DeleteSeriesRequest.java | 905 + .../v1/DeleteSeriesRequestOrBuilder.java | 104 + .../visionai/v1/DeleteStreamRequest.java | 905 + .../v1/DeleteStreamRequestOrBuilder.java | 104 + .../visionai/v1/DeployApplicationRequest.java | 1114 + .../v1/DeployApplicationRequestOrBuilder.java | 136 + .../v1/DeployApplicationResponse.java | 435 + .../DeployApplicationResponseOrBuilder.java | 25 + .../visionai/v1/DeployIndexMetadata.java | 924 + .../v1/DeployIndexMetadataOrBuilder.java | 90 + .../cloud/visionai/v1/DeployIndexRequest.java | 958 + .../v1/DeployIndexRequestOrBuilder.java | 100 + .../visionai/v1/DeployIndexResponse.java | 432 + .../v1/DeployIndexResponseOrBuilder.java | 25 + .../cloud/visionai/v1/DeployedIndex.java | 652 + .../visionai/v1/DeployedIndexOrBuilder.java | 59 + .../visionai/v1/DeployedIndexReference.java | 639 + .../v1/DeployedIndexReferenceOrBuilder.java | 55 + .../com/google/cloud/visionai/v1/Draft.java | 2181 ++ .../google/cloud/visionai/v1/DraftName.java | 259 + .../cloud/visionai/v1/DraftOrBuilder.java | 270 + .../google/cloud/visionai/v1/EagerMode.java | 430 + .../cloud/visionai/v1/EagerModeOrBuilder.java | 25 + .../com/google/cloud/visionai/v1/Event.java | 2456 +++ .../google/cloud/visionai/v1/EventName.java | 257 + .../cloud/visionai/v1/EventOrBuilder.java | 312 + .../google/cloud/visionai/v1/EventUpdate.java | 1359 ++ .../visionai/v1/EventUpdateOrBuilder.java | 150 + .../google/cloud/visionai/v1/FacetBucket.java | 2245 ++ .../visionai/v1/FacetBucketOrBuilder.java | 112 + .../cloud/visionai/v1/FacetBucketType.java | 221 + .../google/cloud/visionai/v1/FacetGroup.java | 1581 ++ .../visionai/v1/FacetGroupOrBuilder.java | 175 + .../cloud/visionai/v1/FacetProperty.java | 5426 +++++ .../visionai/v1/FacetPropertyOrBuilder.java | 313 + .../google/cloud/visionai/v1/FacetValue.java | 1178 + .../visionai/v1/FacetValueOrBuilder.java | 125 + .../google/cloud/visionai/v1/FloatRange.java | 703 + .../cloud/visionai/v1/FloatRangeArray.java | 935 + .../visionai/v1/FloatRangeArrayOrBuilder.java | 78 + .../visionai/v1/FloatRangeOrBuilder.java | 76 + .../cloud/visionai/v1/GcsOutputConfig.java | 624 + .../visionai/v1/GcsOutputConfigOrBuilder.java | 51 + .../google/cloud/visionai/v1/GcsSource.java | 718 + .../cloud/visionai/v1/GcsSourceOrBuilder.java | 77 + .../v1/GeneralObjectDetectionConfig.java | 433 + ...GeneralObjectDetectionConfigOrBuilder.java | 25 + .../visionai/v1/GenerateHlsUriRequest.java | 1315 ++ .../v1/GenerateHlsUriRequestOrBuilder.java | 137 + .../visionai/v1/GenerateHlsUriResponse.java | 1197 + .../v1/GenerateHlsUriResponseOrBuilder.java | 117 + .../v1/GenerateRetrievalUrlRequest.java | 654 + .../GenerateRetrievalUrlRequestOrBuilder.java | 59 + .../v1/GenerateRetrievalUrlResponse.java | 626 + ...GenerateRetrievalUrlResponseOrBuilder.java | 51 + .../v1/GenerateStreamHlsTokenRequest.java | 626 + ...enerateStreamHlsTokenRequestOrBuilder.java | 51 + .../v1/GenerateStreamHlsTokenResponse.java | 942 + ...nerateStreamHlsTokenResponseOrBuilder.java | 96 + .../cloud/visionai/v1/GeoCoordinate.java | 635 + .../visionai/v1/GeoCoordinateOrBuilder.java | 52 + .../cloud/visionai/v1/GeoLocationArray.java | 935 + .../v1/GeoLocationArrayOrBuilder.java | 78 + .../cloud/visionai/v1/GetAnalysisRequest.java | 639 + .../v1/GetAnalysisRequestOrBuilder.java | 55 + .../visionai/v1/GetAnnotationRequest.java | 653 + .../v1/GetAnnotationRequestOrBuilder.java | 59 + .../visionai/v1/GetApplicationRequest.java | 639 + .../v1/GetApplicationRequestOrBuilder.java | 55 + .../cloud/visionai/v1/GetAssetRequest.java | 652 + .../visionai/v1/GetAssetRequestOrBuilder.java | 59 + .../cloud/visionai/v1/GetClusterRequest.java | 638 + .../v1/GetClusterRequestOrBuilder.java | 55 + .../visionai/v1/GetCollectionRequest.java | 646 + .../v1/GetCollectionRequestOrBuilder.java | 57 + .../cloud/visionai/v1/GetCorpusRequest.java | 638 + .../v1/GetCorpusRequestOrBuilder.java | 55 + .../visionai/v1/GetDataSchemaRequest.java | 653 + .../v1/GetDataSchemaRequestOrBuilder.java | 59 + .../cloud/visionai/v1/GetDraftRequest.java | 638 + .../visionai/v1/GetDraftRequestOrBuilder.java | 55 + .../cloud/visionai/v1/GetEventRequest.java | 638 + .../visionai/v1/GetEventRequestOrBuilder.java | 55 + .../visionai/v1/GetIndexEndpointRequest.java | 639 + .../v1/GetIndexEndpointRequestOrBuilder.java | 55 + .../cloud/visionai/v1/GetIndexRequest.java | 652 + .../visionai/v1/GetIndexRequestOrBuilder.java | 59 + .../cloud/visionai/v1/GetInstanceRequest.java | 639 + .../v1/GetInstanceRequestOrBuilder.java | 55 + .../cloud/visionai/v1/GetOperatorRequest.java | 639 + .../v1/GetOperatorRequestOrBuilder.java | 55 + .../cloud/visionai/v1/GetProcessRequest.java | 638 + .../v1/GetProcessRequestOrBuilder.java | 55 + .../visionai/v1/GetProcessorRequest.java | 639 + .../v1/GetProcessorRequestOrBuilder.java | 55 + .../visionai/v1/GetSearchConfigRequest.java | 653 + .../v1/GetSearchConfigRequestOrBuilder.java | 59 + .../visionai/v1/GetSearchHypernymRequest.java | 654 + .../v1/GetSearchHypernymRequestOrBuilder.java | 59 + .../cloud/visionai/v1/GetSeriesRequest.java | 638 + .../v1/GetSeriesRequestOrBuilder.java | 55 + .../cloud/visionai/v1/GetStreamRequest.java | 638 + .../v1/GetStreamRequestOrBuilder.java | 55 + .../v1/GetStreamThumbnailRequest.java | 1263 ++ .../GetStreamThumbnailRequestOrBuilder.java | 152 + .../v1/GetStreamThumbnailResponse.java | 435 + .../GetStreamThumbnailResponseOrBuilder.java | 25 + .../v1/GstreamerBufferDescriptor.java | 1510 ++ .../GstreamerBufferDescriptorOrBuilder.java | 169 + .../cloud/visionai/v1/HealthCheckRequest.java | 625 + .../v1/HealthCheckRequestOrBuilder.java | 51 + .../visionai/v1/HealthCheckResponse.java | 999 + .../v1/HealthCheckResponseOrBuilder.java | 99 + .../visionai/v1/HealthCheckServiceProto.java | 122 + .../ImageObjectDetectionPredictionResult.java | 1864 ++ ...ectDetectionPredictionResultOrBuilder.java | 242 + .../google/cloud/visionai/v1/ImageQuery.java | 908 + .../visionai/v1/ImageQueryOrBuilder.java | 96 + .../v1/ImageSegmentationPredictionResult.java | 878 + ...SegmentationPredictionResultOrBuilder.java | 94 + .../visionai/v1/ImportAssetsMetadata.java | 722 + .../v1/ImportAssetsMetadataOrBuilder.java | 61 + .../visionai/v1/ImportAssetsRequest.java | 994 + .../v1/ImportAssetsRequestOrBuilder.java | 107 + .../visionai/v1/ImportAssetsResponse.java | 432 + .../v1/ImportAssetsResponseOrBuilder.java | 25 + .../com/google/cloud/visionai/v1/Index.java | 2741 +++ .../cloud/visionai/v1/IndexAssetMetadata.java | 1245 ++ .../v1/IndexAssetMetadataOrBuilder.java | 131 + .../cloud/visionai/v1/IndexAssetRequest.java | 862 + .../v1/IndexAssetRequestOrBuilder.java | 92 + .../cloud/visionai/v1/IndexAssetResponse.java | 432 + .../v1/IndexAssetResponseOrBuilder.java | 25 + .../cloud/visionai/v1/IndexEndpoint.java | 2778 +++ .../cloud/visionai/v1/IndexEndpointName.java | 227 + .../visionai/v1/IndexEndpointOrBuilder.java | 398 + .../google/cloud/visionai/v1/IndexName.java | 259 + .../cloud/visionai/v1/IndexOrBuilder.java | 310 + .../cloud/visionai/v1/IndexedAsset.java | 1443 ++ .../visionai/v1/IndexedAssetOrBuilder.java | 168 + .../cloud/visionai/v1/IndexingStatus.java | 967 + .../visionai/v1/IndexingStatusOrBuilder.java | 80 + .../cloud/visionai/v1/IngestAssetRequest.java | 3941 ++++ .../v1/IngestAssetRequestOrBuilder.java | 108 + .../visionai/v1/IngestAssetResponse.java | 762 + .../v1/IngestAssetResponseOrBuilder.java | 68 + .../google/cloud/visionai/v1/Instance.java | 7367 +++++++ .../cloud/visionai/v1/InstanceName.java | 262 + .../cloud/visionai/v1/InstanceOrBuilder.java | 406 + .../google/cloud/visionai/v1/IntRange.java | 700 + .../cloud/visionai/v1/IntRangeArray.java | 933 + .../visionai/v1/IntRangeArrayOrBuilder.java | 78 + .../cloud/visionai/v1/IntRangeOrBuilder.java | 76 + .../com/google/cloud/visionai/v1/Lease.java | 1408 ++ .../cloud/visionai/v1/LeaseOrBuilder.java | 161 + .../google/cloud/visionai/v1/LeaseType.java | 177 + .../visionai/v1/ListAnalysesRequest.java | 1282 ++ .../v1/ListAnalysesRequestOrBuilder.java | 144 + .../visionai/v1/ListAnalysesResponse.java | 1394 ++ .../v1/ListAnalysesResponseOrBuilder.java | 154 + .../visionai/v1/ListAnnotationsRequest.java | 1230 ++ .../v1/ListAnnotationsRequestOrBuilder.java | 156 + .../visionai/v1/ListAnnotationsResponse.java | 1126 + .../v1/ListAnnotationsResponseOrBuilder.java | 105 + .../visionai/v1/ListApplicationsRequest.java | 1282 ++ .../v1/ListApplicationsRequestOrBuilder.java | 144 + .../visionai/v1/ListApplicationsResponse.java | 1398 ++ .../v1/ListApplicationsResponseOrBuilder.java | 154 + .../cloud/visionai/v1/ListAssetsRequest.java | 1170 + .../v1/ListAssetsRequestOrBuilder.java | 139 + .../cloud/visionai/v1/ListAssetsResponse.java | 1124 + .../v1/ListAssetsResponseOrBuilder.java | 104 + .../visionai/v1/ListClustersRequest.java | 1282 ++ .../v1/ListClustersRequestOrBuilder.java | 144 + .../visionai/v1/ListClustersResponse.java | 1394 ++ .../v1/ListClustersResponseOrBuilder.java | 154 + .../visionai/v1/ListCollectionsRequest.java | 957 + .../v1/ListCollectionsRequestOrBuilder.java | 105 + .../visionai/v1/ListCollectionsResponse.java | 1126 + .../v1/ListCollectionsResponseOrBuilder.java | 105 + .../cloud/visionai/v1/ListCorporaRequest.java | 1154 + .../v1/ListCorporaRequestOrBuilder.java | 134 + .../visionai/v1/ListCorporaResponse.java | 1138 + .../v1/ListCorporaResponseOrBuilder.java | 108 + .../visionai/v1/ListDataSchemasRequest.java | 964 + .../v1/ListDataSchemasRequestOrBuilder.java | 107 + .../visionai/v1/ListDataSchemasResponse.java | 1126 + .../v1/ListDataSchemasResponseOrBuilder.java | 105 + .../cloud/visionai/v1/ListDraftsRequest.java | 1281 ++ .../v1/ListDraftsRequestOrBuilder.java | 144 + .../cloud/visionai/v1/ListDraftsResponse.java | 1394 ++ .../v1/ListDraftsResponseOrBuilder.java | 153 + .../cloud/visionai/v1/ListEventsRequest.java | 1281 ++ .../v1/ListEventsRequestOrBuilder.java | 144 + .../cloud/visionai/v1/ListEventsResponse.java | 1394 ++ .../v1/ListEventsResponseOrBuilder.java | 153 + .../v1/ListIndexEndpointsRequest.java | 1179 + .../ListIndexEndpointsRequestOrBuilder.java | 141 + .../v1/ListIndexEndpointsResponse.java | 1125 + .../ListIndexEndpointsResponseOrBuilder.java | 103 + .../cloud/visionai/v1/ListIndexesRequest.java | 968 + .../v1/ListIndexesRequestOrBuilder.java | 108 + .../visionai/v1/ListIndexesResponse.java | 1124 + .../v1/ListIndexesResponseOrBuilder.java | 104 + .../visionai/v1/ListInstancesRequest.java | 1282 ++ .../v1/ListInstancesRequestOrBuilder.java | 144 + .../visionai/v1/ListInstancesResponse.java | 1394 ++ .../v1/ListInstancesResponseOrBuilder.java | 154 + .../visionai/v1/ListOperatorsRequest.java | 1282 ++ .../v1/ListOperatorsRequestOrBuilder.java | 144 + .../visionai/v1/ListOperatorsResponse.java | 1394 ++ .../v1/ListOperatorsResponseOrBuilder.java | 154 + .../v1/ListPrebuiltProcessorsRequest.java | 640 + ...istPrebuiltProcessorsRequestOrBuilder.java | 55 + .../v1/ListPrebuiltProcessorsResponse.java | 938 + ...stPrebuiltProcessorsResponseOrBuilder.java | 78 + .../visionai/v1/ListProcessesRequest.java | 1282 ++ .../v1/ListProcessesRequestOrBuilder.java | 144 + .../visionai/v1/ListProcessesResponse.java | 1394 ++ .../v1/ListProcessesResponseOrBuilder.java | 154 + .../visionai/v1/ListProcessorsRequest.java | 1282 ++ .../v1/ListProcessorsRequestOrBuilder.java | 144 + .../visionai/v1/ListProcessorsResponse.java | 1395 ++ .../v1/ListProcessorsResponseOrBuilder.java | 154 + .../v1/ListPublicOperatorsRequest.java | 1283 ++ .../ListPublicOperatorsRequestOrBuilder.java | 144 + .../v1/ListPublicOperatorsResponse.java | 1118 + .../ListPublicOperatorsResponseOrBuilder.java | 103 + .../visionai/v1/ListSearchConfigsRequest.java | 972 + .../v1/ListSearchConfigsRequestOrBuilder.java | 109 + .../v1/ListSearchConfigsResponse.java | 1131 + .../ListSearchConfigsResponseOrBuilder.java | 105 + .../v1/ListSearchHypernymsRequest.java | 972 + .../ListSearchHypernymsRequestOrBuilder.java | 109 + .../v1/ListSearchHypernymsResponse.java | 1137 + .../ListSearchHypernymsResponseOrBuilder.java | 105 + .../cloud/visionai/v1/ListSeriesRequest.java | 1281 ++ .../v1/ListSeriesRequestOrBuilder.java | 144 + .../cloud/visionai/v1/ListSeriesResponse.java | 1394 ++ .../v1/ListSeriesResponseOrBuilder.java | 153 + .../cloud/visionai/v1/ListStreamsRequest.java | 1282 ++ .../v1/ListStreamsRequestOrBuilder.java | 144 + .../visionai/v1/ListStreamsResponse.java | 1394 ++ .../v1/ListStreamsResponseOrBuilder.java | 153 + .../cloud/visionai/v1/LocationName.java | 192 + .../google/cloud/visionai/v1/LvaProto.java | 277 + .../cloud/visionai/v1/LvaResourcesProto.java | 219 + .../cloud/visionai/v1/LvaServiceProto.java | 593 + .../google/cloud/visionai/v1/MachineSpec.java | 964 + .../visionai/v1/MachineSpecOrBuilder.java | 117 + .../v1/MaterializeChannelRequest.java | 1384 ++ .../MaterializeChannelRequestOrBuilder.java | 167 + .../visionai/v1/MediaWarehouseConfig.java | 1124 + .../v1/MediaWarehouseConfigOrBuilder.java | 124 + .../google/cloud/visionai/v1/ModelType.java | 375 + .../com/google/cloud/visionai/v1/Node.java | 3189 +++ .../cloud/visionai/v1/NodeOrBuilder.java | 257 + .../cloud/visionai/v1/NormalizedPolygon.java | 971 + .../v1/NormalizedPolygonOrBuilder.java | 83 + .../cloud/visionai/v1/NormalizedPolyline.java | 952 + .../v1/NormalizedPolylineOrBuilder.java | 78 + .../cloud/visionai/v1/NormalizedVertex.java | 633 + .../v1/NormalizedVertexOrBuilder.java | 52 + .../v1/ObjectDetectionPredictionResult.java | 4376 ++++ ...ectDetectionPredictionResultOrBuilder.java | 128 + .../visionai/v1/OccupancyCountConfig.java | 733 + .../v1/OccupancyCountConfigOrBuilder.java | 68 + .../v1/OccupancyCountingPredictionResult.java | 18191 ++++++++++++++++ ...ancyCountingPredictionResultOrBuilder.java | 331 + .../cloud/visionai/v1/OperationMetadata.java | 1847 ++ .../v1/OperationMetadataOrBuilder.java | 219 + .../google/cloud/visionai/v1/Operator.java | 1995 ++ .../cloud/visionai/v1/OperatorDefinition.java | 5120 +++++ .../v1/OperatorDefinitionOrBuilder.java | 322 + .../cloud/visionai/v1/OperatorName.java | 223 + .../cloud/visionai/v1/OperatorOrBuilder.java | 245 + .../cloud/visionai/v1/OperatorQuery.java | 968 + .../visionai/v1/OperatorQueryOrBuilder.java | 105 + .../com/google/cloud/visionai/v1/Packet.java | 814 + .../cloud/visionai/v1/PacketHeader.java | 2263 ++ .../visionai/v1/PacketHeaderOrBuilder.java | 289 + .../cloud/visionai/v1/PacketOrBuilder.java | 74 + .../google/cloud/visionai/v1/PacketType.java | 2414 ++ .../visionai/v1/PacketTypeOrBuilder.java | 88 + .../google/cloud/visionai/v1/Partition.java | 4475 ++++ .../cloud/visionai/v1/PartitionOrBuilder.java | 138 + .../cloud/visionai/v1/PersonBlurConfig.java | 849 + .../v1/PersonBlurConfigOrBuilder.java | 64 + .../v1/PersonVehicleDetectionConfig.java | 645 + ...PersonVehicleDetectionConfigOrBuilder.java | 56 + ...nalProtectiveEquipmentDetectionConfig.java | 745 + ...tiveEquipmentDetectionConfigOrBuilder.java | 65 + ...nalProtectiveEquipmentDetectionOutput.java | 9528 ++++++++ ...tiveEquipmentDetectionOutputOrBuilder.java | 130 + .../cloud/visionai/v1/PlatformProto.java | 1932 ++ .../com/google/cloud/visionai/v1/Process.java | 2641 +++ .../google/cloud/visionai/v1/ProcessName.java | 257 + .../cloud/visionai/v1/ProcessOrBuilder.java | 352 + .../google/cloud/visionai/v1/Processor.java | 4436 ++++ .../cloud/visionai/v1/ProcessorConfig.java | 5802 +++++ .../visionai/v1/ProcessorConfigOrBuilder.java | 661 + .../cloud/visionai/v1/ProcessorIOSpec.java | 7597 +++++++ .../visionai/v1/ProcessorIOSpecOrBuilder.java | 314 + .../cloud/visionai/v1/ProcessorName.java | 223 + .../cloud/visionai/v1/ProcessorOrBuilder.java | 562 + .../visionai/v1/ProductRecognizerConfig.java | 725 + .../v1/ProductRecognizerConfigOrBuilder.java | 65 + .../cloud/visionai/v1/RawImageDescriptor.java | 811 + .../v1/RawImageDescriptorOrBuilder.java | 77 + .../v1/ReceiveEventsControlResponse.java | 840 + ...ReceiveEventsControlResponseOrBuilder.java | 94 + .../visionai/v1/ReceiveEventsRequest.java | 3288 +++ .../v1/ReceiveEventsRequestOrBuilder.java | 99 + .../visionai/v1/ReceiveEventsResponse.java | 1115 + .../v1/ReceiveEventsResponseOrBuilder.java | 98 + .../v1/ReceivePacketsControlResponse.java | 840 + ...eceivePacketsControlResponseOrBuilder.java | 94 + .../visionai/v1/ReceivePacketsRequest.java | 3644 ++++ .../v1/ReceivePacketsRequestOrBuilder.java | 105 + .../visionai/v1/ReceivePacketsResponse.java | 1114 + .../v1/ReceivePacketsResponseOrBuilder.java | 98 + .../google/cloud/visionai/v1/Registry.java | 177 + .../visionai/v1/ReleaseLeaseRequest.java | 989 + .../v1/ReleaseLeaseRequestOrBuilder.java | 101 + .../visionai/v1/ReleaseLeaseResponse.java | 432 + .../v1/ReleaseLeaseResponseOrBuilder.java | 25 + .../RemoveApplicationStreamInputRequest.java | 2155 ++ ...pplicationStreamInputRequestOrBuilder.java | 176 + .../RemoveApplicationStreamInputResponse.java | 443 + ...plicationStreamInputResponseOrBuilder.java | 25 + .../v1/RemoveCollectionItemRequest.java | 742 + .../RemoveCollectionItemRequestOrBuilder.java | 67 + .../v1/RemoveCollectionItemResponse.java | 718 + ...RemoveCollectionItemResponseOrBuilder.java | 61 + .../visionai/v1/RemoveIndexAssetMetadata.java | 1249 ++ .../v1/RemoveIndexAssetMetadataOrBuilder.java | 131 + .../visionai/v1/RemoveIndexAssetRequest.java | 863 + .../v1/RemoveIndexAssetRequestOrBuilder.java | 92 + .../visionai/v1/RemoveIndexAssetResponse.java | 433 + .../v1/RemoveIndexAssetResponseOrBuilder.java | 25 + .../cloud/visionai/v1/RenewLeaseRequest.java | 1259 ++ .../v1/RenewLeaseRequestOrBuilder.java | 136 + .../cloud/visionai/v1/RequestMetadata.java | 1659 ++ .../visionai/v1/RequestMetadataOrBuilder.java | 195 + .../v1/ResolveOperatorInfoRequest.java | 1179 + .../ResolveOperatorInfoRequestOrBuilder.java | 117 + .../v1/ResolveOperatorInfoResponse.java | 936 + .../ResolveOperatorInfoResponseOrBuilder.java | 78 + .../visionai/v1/ResourceAnnotations.java | 1640 ++ .../v1/ResourceAnnotationsOrBuilder.java | 167 + .../visionai/v1/ResourceSpecification.java | 1587 ++ .../v1/ResourceSpecificationOrBuilder.java | 214 + .../com/google/cloud/visionai/v1/RunMode.java | 181 + .../google/cloud/visionai/v1/RunStatus.java | 998 + .../cloud/visionai/v1/RunStatusOrBuilder.java | 76 + .../visionai/v1/SchemaKeySortingStrategy.java | 2146 ++ .../v1/SchemaKeySortingStrategyOrBuilder.java | 79 + .../visionai/v1/SearchAssetsRequest.java | 3200 +++ .../v1/SearchAssetsRequestOrBuilder.java | 390 + .../visionai/v1/SearchAssetsResponse.java | 1645 ++ .../v1/SearchAssetsResponseOrBuilder.java | 160 + .../cloud/visionai/v1/SearchCapability.java | 729 + .../v1/SearchCapabilityOrBuilder.java | 51 + .../visionai/v1/SearchCapabilitySetting.java | 950 + .../v1/SearchCapabilitySettingOrBuilder.java | 78 + .../cloud/visionai/v1/SearchConfig.java | 1222 ++ .../cloud/visionai/v1/SearchConfigName.java | 269 + .../visionai/v1/SearchConfigOrBuilder.java | 131 + .../visionai/v1/SearchCriteriaProperty.java | 993 + .../v1/SearchCriteriaPropertyOrBuilder.java | 161 + .../cloud/visionai/v1/SearchHypernym.java | 1107 + .../cloud/visionai/v1/SearchHypernymName.java | 269 + .../visionai/v1/SearchHypernymOrBuilder.java | 131 + .../v1/SearchIndexEndpointRequest.java | 2570 +++ .../SearchIndexEndpointRequestOrBuilder.java | 286 + .../v1/SearchIndexEndpointResponse.java | 1140 + .../SearchIndexEndpointResponseOrBuilder.java | 105 + .../cloud/visionai/v1/SearchResultItem.java | 2762 +++ .../v1/SearchResultItemOrBuilder.java | 309 + .../cloud/visionai/v1/SendPacketsRequest.java | 1109 + .../v1/SendPacketsRequestOrBuilder.java | 98 + .../visionai/v1/SendPacketsResponse.java | 432 + .../v1/SendPacketsResponseOrBuilder.java | 25 + .../com/google/cloud/visionai/v1/Series.java | 2240 ++ .../cloud/visionai/v1/SeriesMetadata.java | 631 + .../visionai/v1/SeriesMetadataOrBuilder.java | 53 + .../google/cloud/visionai/v1/SeriesName.java | 257 + .../cloud/visionai/v1/SeriesOrBuilder.java | 301 + .../cloud/visionai/v1/ServerMetadata.java | 869 + .../visionai/v1/ServerMetadataOrBuilder.java | 89 + .../com/google/cloud/visionai/v1/Stream.java | 2323 ++ .../cloud/visionai/v1/StreamAnnotation.java | 1828 ++ .../v1/StreamAnnotationOrBuilder.java | 202 + .../visionai/v1/StreamAnnotationType.java | 190 + .../cloud/visionai/v1/StreamAnnotations.java | 948 + .../v1/StreamAnnotationsOrBuilder.java | 78 + .../google/cloud/visionai/v1/StreamName.java | 257 + .../cloud/visionai/v1/StreamOrBuilder.java | 310 + .../visionai/v1/StreamWithAnnotation.java | 3074 +++ .../v1/StreamWithAnnotationOrBuilder.java | 204 + .../visionai/v1/StreamingResourcesProto.java | 209 + .../visionai/v1/StreamingServiceProto.java | 420 + .../visionai/v1/StreamsResourcesProto.java | 291 + .../visionai/v1/StreamsServiceProto.java | 654 + .../google/cloud/visionai/v1/StringArray.java | 718 + .../visionai/v1/StringArrayOrBuilder.java | 77 + .../cloud/visionai/v1/TagParsingConfig.java | 2283 ++ .../v1/TagParsingConfigOrBuilder.java | 97 + .../visionai/v1/TagRecognizerConfig.java | 826 + .../v1/TagRecognizerConfigOrBuilder.java | 75 + .../v1/UndeployApplicationRequest.java | 920 + .../UndeployApplicationRequestOrBuilder.java | 108 + .../v1/UndeployApplicationResponse.java | 433 + .../UndeployApplicationResponseOrBuilder.java | 25 + .../visionai/v1/UndeployIndexMetadata.java | 924 + .../v1/UndeployIndexMetadataOrBuilder.java | 90 + .../visionai/v1/UndeployIndexRequest.java | 653 + .../v1/UndeployIndexRequestOrBuilder.java | 59 + .../visionai/v1/UndeployIndexResponse.java | 432 + .../v1/UndeployIndexResponseOrBuilder.java | 25 + .../visionai/v1/UniversalInputConfig.java | 432 + .../v1/UniversalInputConfigOrBuilder.java | 25 + .../visionai/v1/UpdateAnalysisRequest.java | 1336 ++ .../v1/UpdateAnalysisRequestOrBuilder.java | 166 + .../visionai/v1/UpdateAnnotationRequest.java | 1045 + .../v1/UpdateAnnotationRequestOrBuilder.java | 111 + .../v1/UpdateApplicationInstancesRequest.java | 2910 +++ ...eApplicationInstancesRequestOrBuilder.java | 161 + .../UpdateApplicationInstancesResponse.java | 440 + ...ApplicationInstancesResponseOrBuilder.java | 25 + .../visionai/v1/UpdateApplicationRequest.java | 1339 ++ .../v1/UpdateApplicationRequestOrBuilder.java | 166 + .../UpdateApplicationStreamInputRequest.java | 1607 ++ ...pplicationStreamInputRequestOrBuilder.java | 186 + .../UpdateApplicationStreamInputResponse.java | 443 + ...plicationStreamInputResponseOrBuilder.java | 25 + .../cloud/visionai/v1/UpdateAssetRequest.java | 1037 + .../v1/UpdateAssetRequestOrBuilder.java | 111 + .../visionai/v1/UpdateClusterRequest.java | 1329 ++ .../v1/UpdateClusterRequestOrBuilder.java | 163 + .../visionai/v1/UpdateCollectionRequest.java | 1129 + .../v1/UpdateCollectionRequestOrBuilder.java | 132 + .../visionai/v1/UpdateCorpusRequest.java | 989 + .../v1/UpdateCorpusRequestOrBuilder.java | 99 + .../visionai/v1/UpdateDataSchemaRequest.java | 1033 + .../v1/UpdateDataSchemaRequestOrBuilder.java | 108 + .../cloud/visionai/v1/UpdateDraftRequest.java | 1413 ++ .../v1/UpdateDraftRequestOrBuilder.java | 177 + .../cloud/visionai/v1/UpdateEventRequest.java | 1316 ++ .../v1/UpdateEventRequestOrBuilder.java | 163 + .../v1/UpdateIndexEndpointMetadata.java | 728 + .../UpdateIndexEndpointMetadataOrBuilder.java | 61 + .../v1/UpdateIndexEndpointRequest.java | 1096 + .../UpdateIndexEndpointRequestOrBuilder.java | 123 + .../visionai/v1/UpdateIndexMetadata.java | 727 + .../v1/UpdateIndexMetadataOrBuilder.java | 61 + .../cloud/visionai/v1/UpdateIndexRequest.java | 1061 + .../v1/UpdateIndexRequestOrBuilder.java | 117 + .../visionai/v1/UpdateOperatorRequest.java | 1336 ++ .../v1/UpdateOperatorRequestOrBuilder.java | 166 + .../visionai/v1/UpdateProcessRequest.java | 1329 ++ .../v1/UpdateProcessRequestOrBuilder.java | 163 + .../visionai/v1/UpdateProcessorRequest.java | 1336 ++ .../v1/UpdateProcessorRequestOrBuilder.java | 166 + .../v1/UpdateSearchConfigRequest.java | 1072 + .../UpdateSearchConfigRequestOrBuilder.java | 117 + .../v1/UpdateSearchHypernymRequest.java | 1061 + .../UpdateSearchHypernymRequestOrBuilder.java | 114 + .../visionai/v1/UpdateSeriesRequest.java | 1316 ++ .../v1/UpdateSeriesRequestOrBuilder.java | 163 + .../visionai/v1/UpdateStreamRequest.java | 1316 ++ .../v1/UpdateStreamRequestOrBuilder.java | 163 + .../visionai/v1/UploadAssetMetadata.java | 977 + .../v1/UploadAssetMetadataOrBuilder.java | 96 + .../cloud/visionai/v1/UploadAssetRequest.java | 934 + .../v1/UploadAssetRequestOrBuilder.java | 94 + .../visionai/v1/UploadAssetResponse.java | 432 + .../v1/UploadAssetResponseOrBuilder.java | 25 + .../visionai/v1/UserSpecifiedAnnotation.java | 1191 + .../v1/UserSpecifiedAnnotationOrBuilder.java | 126 + .../visionai/v1/VertexAutoMLVideoConfig.java | 1017 + .../v1/VertexAutoMLVideoConfigOrBuilder.java | 120 + .../visionai/v1/VertexAutoMLVisionConfig.java | 638 + .../v1/VertexAutoMLVisionConfigOrBuilder.java | 54 + .../cloud/visionai/v1/VertexCustomConfig.java | 1553 ++ .../v1/VertexCustomConfigOrBuilder.java | 219 + ...ideoActionRecognitionPredictionResult.java | 2664 +++ ...nRecognitionPredictionResultOrBuilder.java | 174 + .../VideoClassificationPredictionResult.java | 2691 +++ ...assificationPredictionResultOrBuilder.java | 177 + .../VideoObjectTrackingPredictionResult.java | 4003 ++++ ...jectTrackingPredictionResultOrBuilder.java | 173 + .../visionai/v1/VideoStreamInputConfig.java | 1131 + .../v1/VideoStreamInputConfigOrBuilder.java | 103 + .../v1/ViewCollectionItemsRequest.java | 965 + .../ViewCollectionItemsRequestOrBuilder.java | 107 + .../v1/ViewCollectionItemsResponse.java | 1126 + .../ViewCollectionItemsResponseOrBuilder.java | 105 + .../visionai/v1/ViewIndexedAssetsRequest.java | 1172 + .../v1/ViewIndexedAssetsRequestOrBuilder.java | 139 + .../v1/ViewIndexedAssetsResponse.java | 1131 + .../ViewIndexedAssetsResponseOrBuilder.java | 105 + .../cloud/visionai/v1/WarehouseProto.java | 3239 +++ .../cloud/visionai/v1/annotations.proto | 662 + .../google/cloud/visionai/v1/common.proto | 120 + .../cloud/visionai/v1/health_service.proto | 72 + .../proto/google/cloud/visionai/v1/lva.proto | 296 + .../cloud/visionai/v1/lva_resources.proto | 153 + .../cloud/visionai/v1/lva_service.proto | 766 + .../google/cloud/visionai/v1/platform.proto | 2429 +++ .../visionai/v1/streaming_resources.proto | 176 + .../cloud/visionai/v1/streaming_service.proto | 406 + .../cloud/visionai/v1/streams_resources.proto | 189 + .../cloud/visionai/v1/streams_service.proto | 911 + .../google/cloud/visionai/v1/warehouse.proto | 3488 +++ .../AsyncAddApplicationStreamInput.java | 54 + .../AsyncAddApplicationStreamInputLRO.java | 55 + .../SyncAddApplicationStreamInput.java | 51 + ...ApplicationStreamInputApplicationname.java | 43 + .../SyncAddApplicationStreamInputString.java | 43 + .../SyncCreateSetCredentialsProvider.java | 44 + .../SyncCreateSetCredentialsProvider1.java | 39 + .../create/SyncCreateSetEndpoint.java | 41 + .../AsyncCreateApplication.java | 54 + .../AsyncCreateApplicationLRO.java | 54 + .../SyncCreateApplication.java | 49 + ...ateApplicationLocationnameApplication.java | 43 + ...yncCreateApplicationStringApplication.java | 43 + .../AsyncCreateApplicationInstances.java | 54 + .../AsyncCreateApplicationInstancesLRO.java | 55 + .../SyncCreateApplicationInstances.java | 51 + ...teApplicationInstancesApplicationname.java | 43 + .../SyncCreateApplicationInstancesString.java | 43 + .../createdraft/AsyncCreateDraft.java | 53 + .../createdraft/AsyncCreateDraftLRO.java | 54 + .../createdraft/SyncCreateDraft.java | 49 + ...CreateDraftApplicationnameDraftString.java | 44 + .../SyncCreateDraftStringDraftString.java | 44 + .../createprocessor/AsyncCreateProcessor.java | 53 + .../AsyncCreateProcessorLRO.java | 54 + .../createprocessor/SyncCreateProcessor.java | 49 + ...eProcessorLocationnameProcessorString.java | 45 + ...cCreateProcessorStringProcessorString.java | 45 + .../AsyncDeleteApplication.java | 52 + .../AsyncDeleteApplicationLRO.java | 53 + .../SyncDeleteApplication.java | 48 + .../SyncDeleteApplicationApplicationname.java | 42 + .../SyncDeleteApplicationString.java | 42 + .../AsyncDeleteApplicationInstances.java | 53 + .../AsyncDeleteApplicationInstancesLRO.java | 54 + .../SyncDeleteApplicationInstances.java | 49 + ...teApplicationInstancesApplicationname.java | 42 + .../SyncDeleteApplicationInstancesString.java | 42 + .../deletedraft/AsyncDeleteDraft.java | 51 + .../deletedraft/AsyncDeleteDraftLRO.java | 53 + .../deletedraft/SyncDeleteDraft.java | 48 + .../deletedraft/SyncDeleteDraftDraftname.java | 42 + .../deletedraft/SyncDeleteDraftString.java | 42 + .../deleteprocessor/AsyncDeleteProcessor.java | 50 + .../AsyncDeleteProcessorLRO.java | 52 + .../deleteprocessor/SyncDeleteProcessor.java | 47 + .../SyncDeleteProcessorProcessorname.java | 42 + .../SyncDeleteProcessorString.java | 42 + .../AsyncDeployApplication.java | 53 + .../AsyncDeployApplicationLRO.java | 54 + .../SyncDeployApplication.java | 49 + .../SyncDeployApplicationApplicationname.java | 42 + .../SyncDeployApplicationString.java | 42 + .../getapplication/AsyncGetApplication.java | 50 + .../getapplication/SyncGetApplication.java | 46 + .../SyncGetApplicationApplicationname.java | 42 + .../SyncGetApplicationString.java | 42 + .../appplatform/getdraft/AsyncGetDraft.java | 50 + .../v1/appplatform/getdraft/SyncGetDraft.java | 47 + .../getdraft/SyncGetDraftDraftname.java | 42 + .../getdraft/SyncGetDraftString.java | 42 + .../getinstance/AsyncGetInstance.java | 51 + .../getinstance/SyncGetInstance.java | 48 + .../SyncGetInstanceInstancename.java | 42 + .../getinstance/SyncGetInstanceString.java | 43 + .../getprocessor/AsyncGetProcessor.java | 49 + .../getprocessor/SyncGetProcessor.java | 46 + .../SyncGetProcessorProcessorname.java | 42 + .../getprocessor/SyncGetProcessorString.java | 42 + .../AsyncListApplications.java | 56 + .../AsyncListApplicationsPaged.java | 64 + .../SyncListApplications.java | 52 + .../SyncListApplicationsLocationname.java | 44 + .../SyncListApplicationsString.java | 44 + .../listdrafts/AsyncListDrafts.java | 55 + .../listdrafts/AsyncListDraftsPaged.java | 63 + .../listdrafts/SyncListDrafts.java | 52 + .../SyncListDraftsApplicationname.java | 44 + .../listdrafts/SyncListDraftsString.java | 44 + .../listinstances/AsyncListInstances.java | 56 + .../AsyncListInstancesPaged.java | 63 + .../listinstances/SyncListInstances.java | 52 + .../SyncListInstancesApplicationname.java | 44 + .../SyncListInstancesString.java | 44 + .../AsyncListPrebuiltProcessors.java | 50 + .../SyncListPrebuiltProcessors.java | 46 + ...yncListPrebuiltProcessorsLocationname.java | 42 + .../SyncListPrebuiltProcessorsString.java | 42 + .../listprocessors/AsyncListProcessors.java | 56 + .../AsyncListProcessorsPaged.java | 63 + .../listprocessors/SyncListProcessors.java | 52 + .../SyncListProcessorsLocationname.java | 44 + .../SyncListProcessorsString.java | 44 + .../AsyncRemoveApplicationStreamInput.java | 54 + .../AsyncRemoveApplicationStreamInputLRO.java | 55 + .../SyncRemoveApplicationStreamInput.java | 51 + ...ApplicationStreamInputApplicationname.java | 43 + ...yncRemoveApplicationStreamInputString.java | 43 + .../AsyncUndeployApplication.java | 51 + .../AsyncUndeployApplicationLRO.java | 52 + .../SyncUndeployApplication.java | 48 + ...yncUndeployApplicationApplicationname.java | 42 + .../SyncUndeployApplicationString.java | 42 + .../AsyncUpdateApplication.java | 53 + .../AsyncUpdateApplicationLRO.java | 53 + .../SyncUpdateApplication.java | 48 + ...UpdateApplicationApplicationFieldmask.java | 44 + .../AsyncUpdateApplicationInstances.java | 55 + .../AsyncUpdateApplicationInstancesLRO.java | 56 + .../SyncUpdateApplicationInstances.java | 52 + ...ancesrequestupdateapplicationinstance.java | 51 + ...ancesrequestupdateapplicationinstance.java | 51 + .../AsyncUpdateApplicationStreamInput.java | 55 + .../AsyncUpdateApplicationStreamInputLRO.java | 56 + .../SyncUpdateApplicationStreamInput.java | 52 + ...ApplicationStreamInputApplicationname.java | 43 + ...yncUpdateApplicationStreamInputString.java | 43 + .../updatedraft/AsyncUpdateDraft.java | 53 + .../updatedraft/AsyncUpdateDraftLRO.java | 54 + .../updatedraft/SyncUpdateDraft.java | 49 + .../SyncUpdateDraftDraftFieldmask.java | 43 + .../updateprocessor/AsyncUpdateProcessor.java | 52 + .../AsyncUpdateProcessorLRO.java | 53 + .../updateprocessor/SyncUpdateProcessor.java | 48 + ...SyncUpdateProcessorProcessorFieldmask.java | 43 + .../getapplication/SyncGetApplication.java | 48 + .../SyncCreateSetCredentialsProvider.java | 45 + .../SyncCreateSetCredentialsProvider1.java | 41 + .../create/SyncCreateSetEndpoint.java | 42 + .../healthcheck/AsyncHealthCheck.java | 50 + .../healthcheck/SyncHealthCheck.java | 46 + .../healthcheck/SyncHealthCheck.java | 50 + .../batchrunprocess/AsyncBatchRunProcess.java | 55 + .../AsyncBatchRunProcessLRO.java | 56 + .../batchrunprocess/SyncBatchRunProcess.java | 52 + ...ssClusternameListcreateprocessrequest.java | 47 + ...ProcessStringListcreateprocessrequest.java | 47 + .../SyncCreateSetCredentialsProvider.java | 45 + .../SyncCreateSetCredentialsProvider1.java | 41 + .../create/SyncCreateSetEndpoint.java | 42 + .../createanalysis/AsyncCreateAnalysis.java | 54 + .../AsyncCreateAnalysisLRO.java | 54 + .../createanalysis/SyncCreateAnalysis.java | 49 + ...eateAnalysisClusternameAnalysisString.java | 45 + ...yncCreateAnalysisStringAnalysisString.java | 45 + .../createoperator/AsyncCreateOperator.java | 54 + .../AsyncCreateOperatorLRO.java | 54 + .../createoperator/SyncCreateOperator.java | 49 + ...ateOperatorLocationnameOperatorString.java | 45 + ...yncCreateOperatorStringOperatorString.java | 45 + .../createprocess/AsyncCreateProcess.java | 54 + .../createprocess/AsyncCreateProcessLRO.java | 54 + .../createprocess/SyncCreateProcess.java | 49 + ...CreateProcessClusternameProcessString.java | 45 + .../SyncCreateProcessStringProcessString.java | 45 + .../deleteanalysis/AsyncDeleteAnalysis.java | 52 + .../AsyncDeleteAnalysisLRO.java | 53 + .../deleteanalysis/SyncDeleteAnalysis.java | 48 + .../SyncDeleteAnalysisAnalysisname.java | 42 + .../SyncDeleteAnalysisString.java | 43 + .../deleteoperator/AsyncDeleteOperator.java | 51 + .../AsyncDeleteOperatorLRO.java | 52 + .../deleteoperator/SyncDeleteOperator.java | 47 + .../SyncDeleteOperatorOperatorname.java | 42 + .../SyncDeleteOperatorString.java | 42 + .../deleteprocess/AsyncDeleteProcess.java | 52 + .../deleteprocess/AsyncDeleteProcessLRO.java | 53 + .../deleteprocess/SyncDeleteProcess.java | 48 + .../SyncDeleteProcessProcessname.java | 42 + .../SyncDeleteProcessString.java | 42 + .../getanalysis/AsyncGetAnalysis.java | 51 + .../getanalysis/SyncGetAnalysis.java | 47 + .../SyncGetAnalysisAnalysisname.java | 42 + .../getanalysis/SyncGetAnalysisString.java | 43 + .../getoperator/AsyncGetOperator.java | 50 + .../getoperator/SyncGetOperator.java | 46 + .../SyncGetOperatorOperatorname.java | 42 + .../getoperator/SyncGetOperatorString.java | 42 + .../getprocess/AsyncGetProcess.java | 50 + .../getprocess/SyncGetProcess.java | 47 + .../getprocess/SyncGetProcessProcessname.java | 42 + .../getprocess/SyncGetProcessString.java | 42 + .../listanalyses/AsyncListAnalyses.java | 56 + .../listanalyses/AsyncListAnalysesPaged.java | 64 + .../listanalyses/SyncListAnalyses.java | 52 + .../SyncListAnalysesClustername.java | 44 + .../listanalyses/SyncListAnalysesString.java | 44 + .../listoperators/AsyncListOperators.java | 56 + .../AsyncListOperatorsPaged.java | 64 + .../listoperators/SyncListOperators.java | 52 + .../SyncListOperatorsLocationname.java | 44 + .../SyncListOperatorsString.java | 44 + .../listprocesses/AsyncListProcesses.java | 56 + .../AsyncListProcessesPaged.java | 64 + .../listprocesses/SyncListProcesses.java | 52 + .../SyncListProcessesClustername.java | 44 + .../SyncListProcessesString.java | 44 + .../AsyncListPublicOperators.java | 56 + .../AsyncListPublicOperatorsPaged.java | 64 + .../SyncListPublicOperators.java | 52 + .../SyncListPublicOperatorsLocationname.java | 44 + .../SyncListPublicOperatorsString.java | 44 + .../AsyncResolveOperatorInfo.java | 53 + .../SyncResolveOperatorInfo.java | 49 + ...atorInfoLocationnameListoperatorquery.java | 47 + ...veOperatorInfoStringListoperatorquery.java | 47 + .../updateanalysis/AsyncUpdateAnalysis.java | 53 + .../AsyncUpdateAnalysisLRO.java | 53 + .../updateanalysis/SyncUpdateAnalysis.java | 48 + .../SyncUpdateAnalysisAnalysisFieldmask.java | 43 + .../updateoperator/AsyncUpdateOperator.java | 53 + .../AsyncUpdateOperatorLRO.java | 53 + .../updateoperator/SyncUpdateOperator.java | 48 + .../SyncUpdateOperatorOperatorFieldmask.java | 43 + .../updateprocess/AsyncUpdateProcess.java | 53 + .../updateprocess/AsyncUpdateProcessLRO.java | 53 + .../updateprocess/SyncUpdateProcess.java | 48 + .../SyncUpdateProcessProcessFieldmask.java | 43 + .../SyncResolveOperatorInfo.java | 50 + .../acquirelease/AsyncAcquireLease.java | 53 + .../acquirelease/SyncAcquireLease.java | 50 + .../SyncCreateSetCredentialsProvider.java | 45 + .../SyncCreateSetCredentialsProvider1.java | 41 + .../create/SyncCreateSetEndpoint.java | 42 + .../receiveevents/AsyncReceiveEvents.java | 48 + .../receivepackets/AsyncReceivePackets.java | 48 + .../releaselease/AsyncReleaseLease.java | 51 + .../releaselease/SyncReleaseLease.java | 47 + .../renewlease/AsyncRenewLease.java | 52 + .../renewlease/SyncRenewLease.java | 49 + .../sendpackets/AsyncSendPackets.java | 48 + .../acquirelease/SyncAcquireLease.java | 49 + .../SyncCreateSetCredentialsProvider.java | 44 + .../SyncCreateSetCredentialsProvider1.java | 40 + .../create/SyncCreateSetEndpoint.java | 41 + .../createcluster/AsyncCreateCluster.java | 54 + .../createcluster/AsyncCreateClusterLRO.java | 54 + .../createcluster/SyncCreateCluster.java | 49 + ...reateClusterLocationnameClusterString.java | 44 + .../SyncCreateClusterStringClusterString.java | 44 + .../createevent/AsyncCreateEvent.java | 53 + .../createevent/AsyncCreateEventLRO.java | 54 + .../createevent/SyncCreateEvent.java | 49 + ...SyncCreateEventClusternameEventString.java | 44 + .../SyncCreateEventStringEventString.java | 44 + .../createseries/AsyncCreateSeries.java | 53 + .../createseries/AsyncCreateSeriesLRO.java | 54 + .../createseries/SyncCreateSeries.java | 49 + ...ncCreateSeriesClusternameSeriesString.java | 44 + .../SyncCreateSeriesStringSeriesString.java | 44 + .../createstream/AsyncCreateStream.java | 53 + .../createstream/AsyncCreateStreamLRO.java | 54 + .../createstream/SyncCreateStream.java | 49 + ...ncCreateStreamClusternameStreamString.java | 44 + .../SyncCreateStreamStringStreamString.java | 44 + .../deletecluster/AsyncDeleteCluster.java | 51 + .../deletecluster/AsyncDeleteClusterLRO.java | 52 + .../deletecluster/SyncDeleteCluster.java | 47 + .../SyncDeleteClusterClustername.java | 42 + .../SyncDeleteClusterString.java | 42 + .../deleteevent/AsyncDeleteEvent.java | 50 + .../deleteevent/AsyncDeleteEventLRO.java | 52 + .../deleteevent/SyncDeleteEvent.java | 47 + .../deleteevent/SyncDeleteEventEventname.java | 42 + .../deleteevent/SyncDeleteEventString.java | 42 + .../deleteseries/AsyncDeleteSeries.java | 50 + .../deleteseries/AsyncDeleteSeriesLRO.java | 52 + .../deleteseries/SyncDeleteSeries.java | 47 + .../SyncDeleteSeriesSeriesname.java | 42 + .../deleteseries/SyncDeleteSeriesString.java | 42 + .../deletestream/AsyncDeleteStream.java | 50 + .../deletestream/AsyncDeleteStreamLRO.java | 52 + .../deletestream/SyncDeleteStream.java | 47 + .../SyncDeleteStreamStreamname.java | 42 + .../deletestream/SyncDeleteStreamString.java | 42 + .../AsyncGenerateStreamHlsToken.java | 47 + .../SyncGenerateStreamHlsToken.java | 44 + .../SyncGenerateStreamHlsTokenString.java | 41 + .../getcluster/AsyncGetCluster.java | 49 + .../getcluster/SyncGetCluster.java | 46 + .../getcluster/SyncGetClusterClustername.java | 42 + .../getcluster/SyncGetClusterString.java | 42 + .../getevent/AsyncGetEvent.java | 49 + .../streamsservice/getevent/SyncGetEvent.java | 46 + .../getevent/SyncGetEventEventname.java | 42 + .../getevent/SyncGetEventString.java | 42 + .../getseries/AsyncGetSeries.java | 49 + .../getseries/SyncGetSeries.java | 46 + .../getseries/SyncGetSeriesSeriesname.java | 42 + .../getseries/SyncGetSeriesString.java | 42 + .../getstream/AsyncGetStream.java | 49 + .../getstream/SyncGetStream.java | 46 + .../getstream/SyncGetStreamStreamname.java | 42 + .../getstream/SyncGetStreamString.java | 42 + .../AsyncGetStreamThumbnail.java | 52 + .../AsyncGetStreamThumbnailLRO.java | 53 + .../SyncGetStreamThumbnail.java | 49 + .../SyncGetStreamThumbnailStringString.java | 43 + .../listclusters/AsyncListClusters.java | 56 + .../listclusters/AsyncListClustersPaged.java | 63 + .../listclusters/SyncListClusters.java | 52 + .../SyncListClustersLocationname.java | 44 + .../listclusters/SyncListClustersString.java | 44 + .../listevents/AsyncListEvents.java | 55 + .../listevents/AsyncListEventsPaged.java | 63 + .../listevents/SyncListEvents.java | 52 + .../listevents/SyncListEventsClustername.java | 44 + .../listevents/SyncListEventsString.java | 44 + .../listseries/AsyncListSeries.java | 55 + .../listseries/AsyncListSeriesPaged.java | 63 + .../listseries/SyncListSeries.java | 52 + .../listseries/SyncListSeriesClustername.java | 44 + .../listseries/SyncListSeriesString.java | 44 + .../liststreams/AsyncListStreams.java | 56 + .../liststreams/AsyncListStreamsPaged.java | 63 + .../liststreams/SyncListStreams.java | 52 + .../SyncListStreamsClustername.java | 44 + .../liststreams/SyncListStreamsString.java | 44 + .../AsyncMaterializeChannel.java | 54 + .../AsyncMaterializeChannelLRO.java | 54 + .../SyncMaterializeChannel.java | 49 + ...ializeChannelClusternameChannelString.java | 45 + ...MaterializeChannelStringChannelString.java | 45 + .../updatecluster/AsyncUpdateCluster.java | 53 + .../updatecluster/AsyncUpdateClusterLRO.java | 53 + .../updatecluster/SyncUpdateCluster.java | 48 + .../SyncUpdateClusterClusterFieldmask.java | 43 + .../updateevent/AsyncUpdateEvent.java | 52 + .../updateevent/AsyncUpdateEventLRO.java | 53 + .../updateevent/SyncUpdateEvent.java | 48 + .../SyncUpdateEventEventFieldmask.java | 43 + .../updateseries/AsyncUpdateSeries.java | 52 + .../updateseries/AsyncUpdateSeriesLRO.java | 53 + .../updateseries/SyncUpdateSeries.java | 48 + .../SyncUpdateSeriesSeriesFieldmask.java | 43 + .../updatestream/AsyncUpdateStream.java | 52 + .../updatestream/AsyncUpdateStreamLRO.java | 53 + .../updatestream/SyncUpdateStream.java | 48 + .../SyncUpdateStreamStreamFieldmask.java | 43 + .../getcluster/SyncGetCluster.java | 49 + .../getapplication/SyncGetApplication.java | 49 + .../healthcheck/SyncHealthCheck.java | 50 + .../SyncResolveOperatorInfo.java | 50 + .../acquirelease/SyncAcquireLease.java | 49 + .../getcluster/SyncGetCluster.java | 49 + .../createasset/SyncCreateAsset.java | 48 + .../AsyncAddCollectionItem.java | 50 + .../SyncAddCollectionItem.java | 46 + .../SyncAddCollectionItemCollectionitem.java | 42 + .../analyzeasset/AsyncAnalyzeAsset.java | 50 + .../analyzeasset/AsyncAnalyzeAssetLRO.java | 52 + .../analyzeasset/SyncAnalyzeAsset.java | 47 + .../analyzecorpus/AsyncAnalyzeCorpus.java | 49 + .../analyzecorpus/AsyncAnalyzeCorpusLRO.java | 51 + .../analyzecorpus/SyncAnalyzeCorpus.java | 46 + .../warehouse/clipasset/AsyncClipAsset.java | 52 + .../v1/warehouse/clipasset/SyncClipAsset.java | 49 + .../SyncCreateSetCredentialsProvider.java | 44 + .../SyncCreateSetCredentialsProvider1.java | 39 + .../create/SyncCreateSetEndpoint.java | 41 + .../AsyncCreateAnnotation.java | 52 + .../SyncCreateAnnotation.java | 49 + ...teAnnotationAssetnameAnnotationString.java | 44 + ...reateAnnotationStringAnnotationString.java | 45 + .../createasset/AsyncCreateAsset.java | 51 + .../createasset/SyncCreateAsset.java | 48 + .../SyncCreateAssetCorpusnameAssetString.java | 44 + .../SyncCreateAssetStringAssetString.java | 44 + .../AsyncCreateCollection.java | 52 + .../AsyncCreateCollectionLRO.java | 53 + .../SyncCreateCollection.java | 48 + ...eCollectionCorpusnameCollectionString.java | 45 + ...reateCollectionStringCollectionString.java | 45 + .../createcorpus/AsyncCreateCorpus.java | 50 + .../createcorpus/AsyncCreateCorpusLRO.java | 51 + .../createcorpus/SyncCreateCorpus.java | 46 + .../SyncCreateCorpusStringCorpus.java | 42 + .../AsyncCreateDataSchema.java | 50 + .../SyncCreateDataSchema.java | 47 + ...cCreateDataSchemaCorpusnameDataschema.java | 43 + .../SyncCreateDataSchemaStringDataschema.java | 43 + .../createindex/AsyncCreateIndex.java | 52 + .../createindex/AsyncCreateIndexLRO.java | 53 + .../createindex/SyncCreateIndex.java | 48 + .../SyncCreateIndexCorpusnameIndexString.java | 44 + .../SyncCreateIndexStringIndexString.java | 44 + .../AsyncCreateIndexEndpoint.java | 53 + .../AsyncCreateIndexEndpointLRO.java | 53 + .../SyncCreateIndexEndpoint.java | 48 + ...dpointLocationnameIndexendpointString.java | 45 + ...ndexEndpointStringIndexendpointString.java | 45 + .../AsyncCreateSearchConfig.java | 52 + .../SyncCreateSearchConfig.java | 48 + ...rchConfigCorpusnameSearchconfigString.java | 45 + ...eSearchConfigStringSearchconfigString.java | 45 + .../AsyncCreateSearchHypernym.java | 52 + .../SyncCreateSearchHypernym.java | 48 + ...ypernymCorpusnameSearchhypernymString.java | 45 + ...rchHypernymStringSearchhypernymString.java | 45 + .../AsyncDeleteAnnotation.java | 52 + .../SyncDeleteAnnotation.java | 49 + .../SyncDeleteAnnotationAnnotationname.java | 44 + .../SyncDeleteAnnotationString.java | 44 + .../deleteasset/AsyncDeleteAsset.java | 50 + .../deleteasset/AsyncDeleteAssetLRO.java | 52 + .../deleteasset/SyncDeleteAsset.java | 47 + .../deleteasset/SyncDeleteAssetAssetname.java | 42 + .../deleteasset/SyncDeleteAssetString.java | 43 + .../AsyncDeleteCollection.java | 51 + .../AsyncDeleteCollectionLRO.java | 53 + .../SyncDeleteCollection.java | 48 + .../SyncDeleteCollectionCollectionname.java | 43 + .../SyncDeleteCollectionString.java | 44 + .../deletecorpus/AsyncDeleteCorpus.java | 49 + .../deletecorpus/SyncDeleteCorpus.java | 46 + .../SyncDeleteCorpusCorpusname.java | 42 + .../deletecorpus/SyncDeleteCorpusString.java | 42 + .../AsyncDeleteDataSchema.java | 51 + .../SyncDeleteDataSchema.java | 48 + .../SyncDeleteDataSchemaDataschemaname.java | 43 + .../SyncDeleteDataSchemaString.java | 44 + .../deleteindex/AsyncDeleteIndex.java | 50 + .../deleteindex/AsyncDeleteIndexLRO.java | 52 + .../deleteindex/SyncDeleteIndex.java | 47 + .../deleteindex/SyncDeleteIndexIndexname.java | 42 + .../deleteindex/SyncDeleteIndexString.java | 43 + .../AsyncDeleteIndexEndpoint.java | 51 + .../AsyncDeleteIndexEndpointLRO.java | 52 + .../SyncDeleteIndexEndpoint.java | 47 + ...cDeleteIndexEndpointIndexendpointname.java | 42 + .../SyncDeleteIndexEndpointString.java | 42 + .../AsyncDeleteSearchConfig.java | 52 + .../SyncDeleteSearchConfig.java | 49 + ...yncDeleteSearchConfigSearchconfigname.java | 43 + .../SyncDeleteSearchConfigString.java | 44 + .../AsyncDeleteSearchHypernym.java | 52 + .../SyncDeleteSearchHypernym.java | 49 + ...eleteSearchHypernymSearchhypernymname.java | 43 + .../SyncDeleteSearchHypernymString.java | 44 + .../deployindex/AsyncDeployIndex.java | 52 + .../deployindex/AsyncDeployIndexLRO.java | 54 + .../deployindex/SyncDeployIndex.java | 49 + .../generatehlsuri/AsyncGenerateHlsUri.java | 55 + .../generatehlsuri/SyncGenerateHlsUri.java | 51 + .../AsyncGenerateRetrievalUrl.java | 51 + .../SyncGenerateRetrievalUrl.java | 47 + .../getannotation/AsyncGetAnnotation.java | 52 + .../getannotation/SyncGetAnnotation.java | 49 + .../SyncGetAnnotationAnnotationname.java | 44 + .../SyncGetAnnotationString.java | 44 + .../v1/warehouse/getasset/AsyncGetAsset.java | 50 + .../v1/warehouse/getasset/SyncGetAsset.java | 47 + .../getasset/SyncGetAssetAssetname.java | 42 + .../getasset/SyncGetAssetString.java | 43 + .../getcollection/AsyncGetCollection.java | 51 + .../getcollection/SyncGetCollection.java | 48 + .../SyncGetCollectionCollectionname.java | 43 + .../SyncGetCollectionString.java | 44 + .../warehouse/getcorpus/AsyncGetCorpus.java | 49 + .../v1/warehouse/getcorpus/SyncGetCorpus.java | 46 + .../getcorpus/SyncGetCorpusCorpusname.java | 42 + .../getcorpus/SyncGetCorpusString.java | 42 + .../getdataschema/AsyncGetDataSchema.java | 51 + .../getdataschema/SyncGetDataSchema.java | 48 + .../SyncGetDataSchemaDataschemaname.java | 43 + .../SyncGetDataSchemaString.java | 44 + .../v1/warehouse/getindex/AsyncGetIndex.java | 50 + .../v1/warehouse/getindex/SyncGetIndex.java | 47 + .../getindex/SyncGetIndexIndexname.java | 42 + .../getindex/SyncGetIndexString.java | 43 + .../AsyncGetIndexEndpoint.java | 51 + .../SyncGetIndexEndpoint.java | 47 + ...SyncGetIndexEndpointIndexendpointname.java | 42 + .../SyncGetIndexEndpointString.java | 42 + .../getsearchconfig/AsyncGetSearchConfig.java | 53 + .../getsearchconfig/SyncGetSearchConfig.java | 49 + .../SyncGetSearchConfigSearchconfigname.java | 43 + .../SyncGetSearchConfigString.java | 44 + .../AsyncGetSearchHypernym.java | 53 + .../SyncGetSearchHypernym.java | 49 + ...ncGetSearchHypernymSearchhypernymname.java | 43 + .../SyncGetSearchHypernymString.java | 44 + .../importassets/AsyncImportAssets.java | 49 + .../importassets/AsyncImportAssetsLRO.java | 51 + .../importassets/SyncImportAssets.java | 46 + .../warehouse/indexasset/AsyncIndexAsset.java | 53 + .../indexasset/AsyncIndexAssetLRO.java | 55 + .../warehouse/indexasset/SyncIndexAsset.java | 50 + .../ingestasset/AsyncIngestAsset.java | 48 + .../listannotations/AsyncListAnnotations.java | 56 + .../AsyncListAnnotationsPaged.java | 63 + .../listannotations/SyncListAnnotations.java | 52 + .../SyncListAnnotationsAssetname.java | 44 + .../SyncListAnnotationsString.java | 45 + .../warehouse/listassets/AsyncListAssets.java | 54 + .../listassets/AsyncListAssetsPaged.java | 62 + .../warehouse/listassets/SyncListAssets.java | 51 + .../listassets/SyncListAssetsCorpusname.java | 44 + .../listassets/SyncListAssetsString.java | 44 + .../listcollections/AsyncListCollections.java | 54 + .../AsyncListCollectionsPaged.java | 61 + .../listcollections/SyncListCollections.java | 50 + .../SyncListCollectionsCorpusname.java | 44 + .../SyncListCollectionsString.java | 44 + .../listcorpora/AsyncListCorpora.java | 53 + .../listcorpora/AsyncListCorporaPaged.java | 61 + .../listcorpora/SyncListCorpora.java | 50 + .../listcorpora/SyncListCorporaString.java | 43 + .../listdataschemas/AsyncListDataSchemas.java | 54 + .../AsyncListDataSchemasPaged.java | 61 + .../listdataschemas/SyncListDataSchemas.java | 50 + .../SyncListDataSchemasCorpusname.java | 44 + .../SyncListDataSchemasString.java | 44 + .../AsyncListIndexEndpoints.java | 55 + .../AsyncListIndexEndpointsPaged.java | 63 + .../SyncListIndexEndpoints.java | 51 + .../SyncListIndexEndpointsLocationname.java | 44 + .../SyncListIndexEndpointsString.java | 44 + .../listindexes/AsyncListIndexes.java | 53 + .../listindexes/AsyncListIndexesPaged.java | 61 + .../listindexes/SyncListIndexes.java | 50 + .../SyncListIndexesCorpusname.java | 44 + .../listindexes/SyncListIndexesString.java | 44 + .../AsyncListSearchConfigs.java | 54 + .../AsyncListSearchConfigsPaged.java | 62 + .../SyncListSearchConfigs.java | 50 + .../SyncListSearchConfigsCorpusname.java | 44 + .../SyncListSearchConfigsString.java | 44 + .../AsyncListSearchHypernyms.java | 54 + .../AsyncListSearchHypernymsPaged.java | 62 + .../SyncListSearchHypernyms.java | 50 + .../SyncListSearchHypernymsCorpusname.java | 44 + .../SyncListSearchHypernymsString.java | 44 + .../AsyncRemoveCollectionItem.java | 50 + .../SyncRemoveCollectionItem.java | 46 + ...yncRemoveCollectionItemCollectionitem.java | 42 + .../AsyncRemoveIndexAsset.java | 53 + .../AsyncRemoveIndexAssetLRO.java | 55 + .../SyncRemoveIndexAsset.java | 50 + .../searchassets/AsyncSearchAssets.java | 63 + .../searchassets/AsyncSearchAssetsPaged.java | 70 + .../searchassets/SyncSearchAssets.java | 59 + .../AsyncSearchIndexEndpoint.java | 59 + .../AsyncSearchIndexEndpointPaged.java | 67 + .../SyncSearchIndexEndpoint.java | 55 + .../undeployindex/AsyncUndeployIndex.java | 50 + .../undeployindex/AsyncUndeployIndexLRO.java | 52 + .../undeployindex/SyncUndeployIndex.java | 47 + .../AsyncUpdateAnnotation.java | 50 + .../SyncUpdateAnnotation.java | 47 + ...ncUpdateAnnotationAnnotationFieldmask.java | 43 + .../updateasset/AsyncUpdateAsset.java | 50 + .../updateasset/SyncUpdateAsset.java | 47 + .../SyncUpdateAssetAssetFieldmask.java | 43 + .../AsyncUpdateCollection.java | 50 + .../SyncUpdateCollection.java | 47 + ...ncUpdateCollectionCollectionFieldmask.java | 43 + .../updatecorpus/AsyncUpdateCorpus.java | 50 + .../updatecorpus/SyncUpdateCorpus.java | 47 + .../SyncUpdateCorpusCorpusFieldmask.java | 43 + .../AsyncUpdateDataSchema.java | 50 + .../SyncUpdateDataSchema.java | 47 + ...ncUpdateDataSchemaDataschemaFieldmask.java | 43 + .../updateindex/AsyncUpdateIndex.java | 51 + .../updateindex/AsyncUpdateIndexLRO.java | 52 + .../updateindex/SyncUpdateIndex.java | 47 + .../SyncUpdateIndexIndexFieldmask.java | 43 + .../AsyncUpdateIndexEndpoint.java | 52 + .../AsyncUpdateIndexEndpointLRO.java | 52 + .../SyncUpdateIndexEndpoint.java | 47 + ...teIndexEndpointIndexendpointFieldmask.java | 44 + .../AsyncUpdateSearchConfig.java | 51 + .../SyncUpdateSearchConfig.java | 47 + ...dateSearchConfigSearchconfigFieldmask.java | 43 + .../AsyncUpdateSearchHypernym.java | 51 + .../SyncUpdateSearchHypernym.java | 47 + ...SearchHypernymSearchhypernymFieldmask.java | 43 + .../uploadasset/AsyncUploadAsset.java | 52 + .../uploadasset/AsyncUploadAssetLRO.java | 54 + .../uploadasset/SyncUploadAsset.java | 49 + .../AsyncViewCollectionItems.java | 56 + .../AsyncViewCollectionItemsPaged.java | 64 + .../SyncViewCollectionItems.java | 52 + ...SyncViewCollectionItemsCollectionname.java | 45 + .../SyncViewCollectionItemsString.java | 46 + .../AsyncViewIndexedAssets.java | 56 + .../AsyncViewIndexedAssetsPaged.java | 64 + .../SyncViewIndexedAssets.java | 52 + .../SyncViewIndexedAssetsIndexname.java | 44 + .../SyncViewIndexedAssetsString.java | 45 + .../createasset/SyncCreateAsset.java | 48 + pom.xml | 1 + versions.txt | 3 + 1425 files changed, 688528 insertions(+), 2 deletions(-) create mode 100644 java-visionai/.OwlBot-hermetic.yaml create mode 100644 java-visionai/.repo-metadata.json create mode 100644 java-visionai/README.md create mode 100644 java-visionai/google-cloud-visionai-bom/pom.xml create mode 100644 java-visionai/google-cloud-visionai/pom.xml create mode 100644 java-visionai/google-cloud-visionai/src/main/java/com/google/cloud/visionai/v1/AppPlatformClient.java create mode 100644 java-visionai/google-cloud-visionai/src/main/java/com/google/cloud/visionai/v1/AppPlatformSettings.java create mode 100644 java-visionai/google-cloud-visionai/src/main/java/com/google/cloud/visionai/v1/HealthCheckServiceClient.java create mode 100644 java-visionai/google-cloud-visionai/src/main/java/com/google/cloud/visionai/v1/HealthCheckServiceSettings.java create mode 100644 java-visionai/google-cloud-visionai/src/main/java/com/google/cloud/visionai/v1/LiveVideoAnalyticsClient.java create mode 100644 java-visionai/google-cloud-visionai/src/main/java/com/google/cloud/visionai/v1/LiveVideoAnalyticsSettings.java create mode 100644 java-visionai/google-cloud-visionai/src/main/java/com/google/cloud/visionai/v1/StreamingServiceClient.java create mode 100644 java-visionai/google-cloud-visionai/src/main/java/com/google/cloud/visionai/v1/StreamingServiceSettings.java create mode 100644 java-visionai/google-cloud-visionai/src/main/java/com/google/cloud/visionai/v1/StreamsServiceClient.java create mode 100644 java-visionai/google-cloud-visionai/src/main/java/com/google/cloud/visionai/v1/StreamsServiceSettings.java create mode 100644 java-visionai/google-cloud-visionai/src/main/java/com/google/cloud/visionai/v1/WarehouseClient.java create mode 100644 java-visionai/google-cloud-visionai/src/main/java/com/google/cloud/visionai/v1/WarehouseSettings.java create mode 100644 java-visionai/google-cloud-visionai/src/main/java/com/google/cloud/visionai/v1/gapic_metadata.json create mode 100644 java-visionai/google-cloud-visionai/src/main/java/com/google/cloud/visionai/v1/package-info.java create mode 100644 java-visionai/google-cloud-visionai/src/main/java/com/google/cloud/visionai/v1/stub/AppPlatformStub.java create mode 100644 java-visionai/google-cloud-visionai/src/main/java/com/google/cloud/visionai/v1/stub/AppPlatformStubSettings.java create mode 100644 java-visionai/google-cloud-visionai/src/main/java/com/google/cloud/visionai/v1/stub/GrpcAppPlatformCallableFactory.java create mode 100644 java-visionai/google-cloud-visionai/src/main/java/com/google/cloud/visionai/v1/stub/GrpcAppPlatformStub.java create mode 100644 java-visionai/google-cloud-visionai/src/main/java/com/google/cloud/visionai/v1/stub/GrpcHealthCheckServiceCallableFactory.java create mode 100644 java-visionai/google-cloud-visionai/src/main/java/com/google/cloud/visionai/v1/stub/GrpcHealthCheckServiceStub.java create mode 100644 java-visionai/google-cloud-visionai/src/main/java/com/google/cloud/visionai/v1/stub/GrpcLiveVideoAnalyticsCallableFactory.java create mode 100644 java-visionai/google-cloud-visionai/src/main/java/com/google/cloud/visionai/v1/stub/GrpcLiveVideoAnalyticsStub.java create mode 100644 java-visionai/google-cloud-visionai/src/main/java/com/google/cloud/visionai/v1/stub/GrpcStreamingServiceCallableFactory.java create mode 100644 java-visionai/google-cloud-visionai/src/main/java/com/google/cloud/visionai/v1/stub/GrpcStreamingServiceStub.java create mode 100644 java-visionai/google-cloud-visionai/src/main/java/com/google/cloud/visionai/v1/stub/GrpcStreamsServiceCallableFactory.java create mode 100644 java-visionai/google-cloud-visionai/src/main/java/com/google/cloud/visionai/v1/stub/GrpcStreamsServiceStub.java create mode 100644 java-visionai/google-cloud-visionai/src/main/java/com/google/cloud/visionai/v1/stub/GrpcWarehouseCallableFactory.java create mode 100644 java-visionai/google-cloud-visionai/src/main/java/com/google/cloud/visionai/v1/stub/GrpcWarehouseStub.java create mode 100644 java-visionai/google-cloud-visionai/src/main/java/com/google/cloud/visionai/v1/stub/HealthCheckServiceStub.java create mode 100644 java-visionai/google-cloud-visionai/src/main/java/com/google/cloud/visionai/v1/stub/HealthCheckServiceStubSettings.java create mode 100644 java-visionai/google-cloud-visionai/src/main/java/com/google/cloud/visionai/v1/stub/HttpJsonAppPlatformCallableFactory.java create mode 100644 java-visionai/google-cloud-visionai/src/main/java/com/google/cloud/visionai/v1/stub/HttpJsonAppPlatformStub.java create mode 100644 java-visionai/google-cloud-visionai/src/main/java/com/google/cloud/visionai/v1/stub/HttpJsonHealthCheckServiceCallableFactory.java create mode 100644 java-visionai/google-cloud-visionai/src/main/java/com/google/cloud/visionai/v1/stub/HttpJsonHealthCheckServiceStub.java create mode 100644 java-visionai/google-cloud-visionai/src/main/java/com/google/cloud/visionai/v1/stub/HttpJsonLiveVideoAnalyticsCallableFactory.java create mode 100644 java-visionai/google-cloud-visionai/src/main/java/com/google/cloud/visionai/v1/stub/HttpJsonLiveVideoAnalyticsStub.java create mode 100644 java-visionai/google-cloud-visionai/src/main/java/com/google/cloud/visionai/v1/stub/HttpJsonStreamingServiceCallableFactory.java create mode 100644 java-visionai/google-cloud-visionai/src/main/java/com/google/cloud/visionai/v1/stub/HttpJsonStreamingServiceStub.java create mode 100644 java-visionai/google-cloud-visionai/src/main/java/com/google/cloud/visionai/v1/stub/HttpJsonStreamsServiceCallableFactory.java create mode 100644 java-visionai/google-cloud-visionai/src/main/java/com/google/cloud/visionai/v1/stub/HttpJsonStreamsServiceStub.java create mode 100644 java-visionai/google-cloud-visionai/src/main/java/com/google/cloud/visionai/v1/stub/HttpJsonWarehouseCallableFactory.java create mode 100644 java-visionai/google-cloud-visionai/src/main/java/com/google/cloud/visionai/v1/stub/HttpJsonWarehouseStub.java create mode 100644 java-visionai/google-cloud-visionai/src/main/java/com/google/cloud/visionai/v1/stub/LiveVideoAnalyticsStub.java create mode 100644 java-visionai/google-cloud-visionai/src/main/java/com/google/cloud/visionai/v1/stub/LiveVideoAnalyticsStubSettings.java create mode 100644 java-visionai/google-cloud-visionai/src/main/java/com/google/cloud/visionai/v1/stub/StreamingServiceStub.java create mode 100644 java-visionai/google-cloud-visionai/src/main/java/com/google/cloud/visionai/v1/stub/StreamingServiceStubSettings.java create mode 100644 java-visionai/google-cloud-visionai/src/main/java/com/google/cloud/visionai/v1/stub/StreamsServiceStub.java create mode 100644 java-visionai/google-cloud-visionai/src/main/java/com/google/cloud/visionai/v1/stub/StreamsServiceStubSettings.java create mode 100644 java-visionai/google-cloud-visionai/src/main/java/com/google/cloud/visionai/v1/stub/WarehouseStub.java create mode 100644 java-visionai/google-cloud-visionai/src/main/java/com/google/cloud/visionai/v1/stub/WarehouseStubSettings.java create mode 100644 java-visionai/google-cloud-visionai/src/main/resources/META-INF/native-image/com.google.cloud.visionai.v1/reflect-config.json create mode 100644 java-visionai/google-cloud-visionai/src/test/java/com/google/cloud/visionai/v1/AppPlatformClientHttpJsonTest.java create mode 100644 java-visionai/google-cloud-visionai/src/test/java/com/google/cloud/visionai/v1/AppPlatformClientTest.java create mode 100644 java-visionai/google-cloud-visionai/src/test/java/com/google/cloud/visionai/v1/HealthCheckServiceClientHttpJsonTest.java create mode 100644 java-visionai/google-cloud-visionai/src/test/java/com/google/cloud/visionai/v1/HealthCheckServiceClientTest.java create mode 100644 java-visionai/google-cloud-visionai/src/test/java/com/google/cloud/visionai/v1/LiveVideoAnalyticsClientHttpJsonTest.java create mode 100644 java-visionai/google-cloud-visionai/src/test/java/com/google/cloud/visionai/v1/LiveVideoAnalyticsClientTest.java create mode 100644 java-visionai/google-cloud-visionai/src/test/java/com/google/cloud/visionai/v1/MockAppPlatform.java create mode 100644 java-visionai/google-cloud-visionai/src/test/java/com/google/cloud/visionai/v1/MockAppPlatformImpl.java create mode 100644 java-visionai/google-cloud-visionai/src/test/java/com/google/cloud/visionai/v1/MockHealthCheckService.java create mode 100644 java-visionai/google-cloud-visionai/src/test/java/com/google/cloud/visionai/v1/MockHealthCheckServiceImpl.java create mode 100644 java-visionai/google-cloud-visionai/src/test/java/com/google/cloud/visionai/v1/MockIAMPolicy.java create mode 100644 java-visionai/google-cloud-visionai/src/test/java/com/google/cloud/visionai/v1/MockIAMPolicyImpl.java create mode 100644 java-visionai/google-cloud-visionai/src/test/java/com/google/cloud/visionai/v1/MockLiveVideoAnalytics.java create mode 100644 java-visionai/google-cloud-visionai/src/test/java/com/google/cloud/visionai/v1/MockLiveVideoAnalyticsImpl.java create mode 100644 java-visionai/google-cloud-visionai/src/test/java/com/google/cloud/visionai/v1/MockLocations.java create mode 100644 java-visionai/google-cloud-visionai/src/test/java/com/google/cloud/visionai/v1/MockLocationsImpl.java create mode 100644 java-visionai/google-cloud-visionai/src/test/java/com/google/cloud/visionai/v1/MockStreamingService.java create mode 100644 java-visionai/google-cloud-visionai/src/test/java/com/google/cloud/visionai/v1/MockStreamingServiceImpl.java create mode 100644 java-visionai/google-cloud-visionai/src/test/java/com/google/cloud/visionai/v1/MockStreamsService.java create mode 100644 java-visionai/google-cloud-visionai/src/test/java/com/google/cloud/visionai/v1/MockStreamsServiceImpl.java create mode 100644 java-visionai/google-cloud-visionai/src/test/java/com/google/cloud/visionai/v1/MockWarehouse.java create mode 100644 java-visionai/google-cloud-visionai/src/test/java/com/google/cloud/visionai/v1/MockWarehouseImpl.java create mode 100644 java-visionai/google-cloud-visionai/src/test/java/com/google/cloud/visionai/v1/StreamingServiceClientHttpJsonTest.java create mode 100644 java-visionai/google-cloud-visionai/src/test/java/com/google/cloud/visionai/v1/StreamingServiceClientTest.java create mode 100644 java-visionai/google-cloud-visionai/src/test/java/com/google/cloud/visionai/v1/StreamsServiceClientHttpJsonTest.java create mode 100644 java-visionai/google-cloud-visionai/src/test/java/com/google/cloud/visionai/v1/StreamsServiceClientTest.java create mode 100644 java-visionai/google-cloud-visionai/src/test/java/com/google/cloud/visionai/v1/WarehouseClientHttpJsonTest.java create mode 100644 java-visionai/google-cloud-visionai/src/test/java/com/google/cloud/visionai/v1/WarehouseClientTest.java create mode 100644 java-visionai/grpc-google-cloud-visionai-v1/pom.xml create mode 100644 java-visionai/grpc-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/AppPlatformGrpc.java create mode 100644 java-visionai/grpc-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/HealthCheckServiceGrpc.java create mode 100644 java-visionai/grpc-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/LiveVideoAnalyticsGrpc.java create mode 100644 java-visionai/grpc-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/StreamingServiceGrpc.java create mode 100644 java-visionai/grpc-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/StreamsServiceGrpc.java create mode 100644 java-visionai/grpc-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/WarehouseGrpc.java create mode 100644 java-visionai/owlbot.py create mode 100644 java-visionai/pom.xml create mode 100644 java-visionai/proto-google-cloud-visionai-v1/clirr-ignored-differences.xml create mode 100644 java-visionai/proto-google-cloud-visionai-v1/pom.xml create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/AIEnabledDevicesInputConfig.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/AIEnabledDevicesInputConfigOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/AcceleratorType.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/AcquireLeaseRequest.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/AcquireLeaseRequestOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/AddApplicationStreamInputRequest.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/AddApplicationStreamInputRequestOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/AddApplicationStreamInputResponse.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/AddApplicationStreamInputResponseOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/AddCollectionItemRequest.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/AddCollectionItemRequestOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/AddCollectionItemResponse.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/AddCollectionItemResponseOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/Analysis.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/AnalysisDefinition.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/AnalysisDefinitionOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/AnalysisName.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/AnalysisOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/AnalyzeAssetMetadata.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/AnalyzeAssetMetadataOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/AnalyzeAssetRequest.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/AnalyzeAssetRequestOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/AnalyzeAssetResponse.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/AnalyzeAssetResponseOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/AnalyzeCorpusMetadata.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/AnalyzeCorpusMetadataOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/AnalyzeCorpusRequest.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/AnalyzeCorpusRequestOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/AnalyzeCorpusResponse.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/AnalyzeCorpusResponseOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/AnalyzerDefinition.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/AnalyzerDefinitionOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/Annotation.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/AnnotationCustomizedStruct.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/AnnotationCustomizedStructOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/AnnotationList.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/AnnotationListOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/AnnotationMatchingResult.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/AnnotationMatchingResultOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/AnnotationName.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/AnnotationOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/AnnotationValue.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/AnnotationValueOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/AnnotationsProto.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/AppPlatformCloudFunctionRequest.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/AppPlatformCloudFunctionRequestOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/AppPlatformCloudFunctionResponse.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/AppPlatformCloudFunctionResponseOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/AppPlatformEventBody.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/AppPlatformEventBodyOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/AppPlatformMetadata.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/AppPlatformMetadataOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/Application.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ApplicationConfigs.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ApplicationConfigsOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ApplicationInstance.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ApplicationInstanceOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ApplicationName.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ApplicationNodeAnnotation.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ApplicationNodeAnnotationOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ApplicationOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ApplicationStreamInput.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ApplicationStreamInputOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/Asset.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/AssetName.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/AssetOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/AssetSource.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/AssetSourceOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/AttributeValue.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/AttributeValueOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/AutoscalingMetricSpec.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/AutoscalingMetricSpecOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/BatchRunProcessRequest.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/BatchRunProcessRequestOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/BatchRunProcessResponse.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/BatchRunProcessResponseOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/BigQueryConfig.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/BigQueryConfigOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/BoolValue.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/BoolValueOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/Channel.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ChannelOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/CircleArea.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/CircleAreaOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ClassificationPredictionResult.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ClassificationPredictionResultOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ClipAssetRequest.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ClipAssetRequestOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ClipAssetResponse.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ClipAssetResponseOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/Cluster.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ClusterInfo.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ClusterInfoOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ClusterName.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ClusterOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/Collection.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/CollectionItem.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/CollectionItemOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/CollectionName.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/CollectionOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/CommitRequest.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/CommitRequestOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/CommonProto.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ControlledMode.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ControlledModeOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/Corpus.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/CorpusName.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/CorpusOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/CreateAnalysisRequest.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/CreateAnalysisRequestOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/CreateAnnotationRequest.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/CreateAnnotationRequestOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/CreateApplicationInstancesRequest.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/CreateApplicationInstancesRequestOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/CreateApplicationInstancesResponse.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/CreateApplicationInstancesResponseOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/CreateApplicationRequest.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/CreateApplicationRequestOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/CreateAssetRequest.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/CreateAssetRequestOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/CreateClusterRequest.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/CreateClusterRequestOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/CreateCollectionMetadata.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/CreateCollectionMetadataOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/CreateCollectionRequest.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/CreateCollectionRequestOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/CreateCorpusMetadata.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/CreateCorpusMetadataOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/CreateCorpusRequest.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/CreateCorpusRequestOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/CreateDataSchemaRequest.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/CreateDataSchemaRequestOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/CreateDraftRequest.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/CreateDraftRequestOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/CreateEventRequest.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/CreateEventRequestOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/CreateIndexEndpointMetadata.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/CreateIndexEndpointMetadataOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/CreateIndexEndpointRequest.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/CreateIndexEndpointRequestOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/CreateIndexMetadata.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/CreateIndexMetadataOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/CreateIndexRequest.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/CreateIndexRequestOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/CreateOperatorRequest.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/CreateOperatorRequestOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/CreateProcessRequest.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/CreateProcessRequestOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/CreateProcessorRequest.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/CreateProcessorRequestOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/CreateSearchConfigRequest.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/CreateSearchConfigRequestOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/CreateSearchHypernymRequest.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/CreateSearchHypernymRequestOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/CreateSeriesRequest.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/CreateSeriesRequestOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/CreateStreamRequest.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/CreateStreamRequestOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/Criteria.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/CriteriaOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/CustomProcessorSourceInfo.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/CustomProcessorSourceInfoOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DataSchema.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DataSchemaDetails.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DataSchemaDetailsOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DataSchemaName.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DataSchemaOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DataType.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DateTimeRange.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DateTimeRangeArray.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DateTimeRangeArrayOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DateTimeRangeOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DedicatedResources.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DedicatedResourcesOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DeleteAnalysisRequest.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DeleteAnalysisRequestOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DeleteAnnotationRequest.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DeleteAnnotationRequestOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DeleteApplicationInstancesRequest.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DeleteApplicationInstancesRequestOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DeleteApplicationInstancesResponse.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DeleteApplicationInstancesResponseOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DeleteApplicationRequest.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DeleteApplicationRequestOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DeleteAssetMetadata.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DeleteAssetMetadataOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DeleteAssetRequest.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DeleteAssetRequestOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DeleteClusterRequest.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DeleteClusterRequestOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DeleteCollectionMetadata.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DeleteCollectionMetadataOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DeleteCollectionRequest.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DeleteCollectionRequestOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DeleteCorpusRequest.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DeleteCorpusRequestOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DeleteDataSchemaRequest.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DeleteDataSchemaRequestOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DeleteDraftRequest.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DeleteDraftRequestOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DeleteEventRequest.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DeleteEventRequestOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DeleteIndexEndpointMetadata.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DeleteIndexEndpointMetadataOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DeleteIndexEndpointRequest.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DeleteIndexEndpointRequestOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DeleteIndexMetadata.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DeleteIndexMetadataOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DeleteIndexRequest.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DeleteIndexRequestOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DeleteOperatorRequest.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DeleteOperatorRequestOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DeleteProcessRequest.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DeleteProcessRequestOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DeleteProcessorRequest.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DeleteProcessorRequestOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DeleteSearchConfigRequest.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DeleteSearchConfigRequestOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DeleteSearchHypernymRequest.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DeleteSearchHypernymRequestOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DeleteSeriesRequest.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DeleteSeriesRequestOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DeleteStreamRequest.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DeleteStreamRequestOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DeployApplicationRequest.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DeployApplicationRequestOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DeployApplicationResponse.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DeployApplicationResponseOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DeployIndexMetadata.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DeployIndexMetadataOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DeployIndexRequest.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DeployIndexRequestOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DeployIndexResponse.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DeployIndexResponseOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DeployedIndex.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DeployedIndexOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DeployedIndexReference.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DeployedIndexReferenceOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/Draft.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DraftName.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DraftOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/EagerMode.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/EagerModeOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/Event.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/EventName.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/EventOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/EventUpdate.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/EventUpdateOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/FacetBucket.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/FacetBucketOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/FacetBucketType.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/FacetGroup.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/FacetGroupOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/FacetProperty.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/FacetPropertyOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/FacetValue.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/FacetValueOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/FloatRange.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/FloatRangeArray.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/FloatRangeArrayOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/FloatRangeOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GcsOutputConfig.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GcsOutputConfigOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GcsSource.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GcsSourceOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GeneralObjectDetectionConfig.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GeneralObjectDetectionConfigOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GenerateHlsUriRequest.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GenerateHlsUriRequestOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GenerateHlsUriResponse.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GenerateHlsUriResponseOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GenerateRetrievalUrlRequest.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GenerateRetrievalUrlRequestOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GenerateRetrievalUrlResponse.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GenerateRetrievalUrlResponseOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GenerateStreamHlsTokenRequest.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GenerateStreamHlsTokenRequestOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GenerateStreamHlsTokenResponse.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GenerateStreamHlsTokenResponseOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GeoCoordinate.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GeoCoordinateOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GeoLocationArray.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GeoLocationArrayOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GetAnalysisRequest.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GetAnalysisRequestOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GetAnnotationRequest.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GetAnnotationRequestOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GetApplicationRequest.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GetApplicationRequestOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GetAssetRequest.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GetAssetRequestOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GetClusterRequest.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GetClusterRequestOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GetCollectionRequest.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GetCollectionRequestOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GetCorpusRequest.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GetCorpusRequestOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GetDataSchemaRequest.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GetDataSchemaRequestOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GetDraftRequest.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GetDraftRequestOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GetEventRequest.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GetEventRequestOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GetIndexEndpointRequest.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GetIndexEndpointRequestOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GetIndexRequest.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GetIndexRequestOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GetInstanceRequest.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GetInstanceRequestOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GetOperatorRequest.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GetOperatorRequestOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GetProcessRequest.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GetProcessRequestOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GetProcessorRequest.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GetProcessorRequestOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GetSearchConfigRequest.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GetSearchConfigRequestOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GetSearchHypernymRequest.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GetSearchHypernymRequestOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GetSeriesRequest.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GetSeriesRequestOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GetStreamRequest.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GetStreamRequestOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GetStreamThumbnailRequest.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GetStreamThumbnailRequestOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GetStreamThumbnailResponse.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GetStreamThumbnailResponseOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GstreamerBufferDescriptor.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GstreamerBufferDescriptorOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/HealthCheckRequest.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/HealthCheckRequestOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/HealthCheckResponse.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/HealthCheckResponseOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/HealthCheckServiceProto.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ImageObjectDetectionPredictionResult.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ImageObjectDetectionPredictionResultOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ImageQuery.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ImageQueryOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ImageSegmentationPredictionResult.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ImageSegmentationPredictionResultOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ImportAssetsMetadata.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ImportAssetsMetadataOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ImportAssetsRequest.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ImportAssetsRequestOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ImportAssetsResponse.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ImportAssetsResponseOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/Index.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/IndexAssetMetadata.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/IndexAssetMetadataOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/IndexAssetRequest.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/IndexAssetRequestOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/IndexAssetResponse.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/IndexAssetResponseOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/IndexEndpoint.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/IndexEndpointName.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/IndexEndpointOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/IndexName.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/IndexOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/IndexedAsset.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/IndexedAssetOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/IndexingStatus.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/IndexingStatusOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/IngestAssetRequest.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/IngestAssetRequestOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/IngestAssetResponse.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/IngestAssetResponseOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/Instance.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/InstanceName.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/InstanceOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/IntRange.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/IntRangeArray.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/IntRangeArrayOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/IntRangeOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/Lease.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/LeaseOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/LeaseType.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListAnalysesRequest.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListAnalysesRequestOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListAnalysesResponse.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListAnalysesResponseOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListAnnotationsRequest.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListAnnotationsRequestOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListAnnotationsResponse.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListAnnotationsResponseOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListApplicationsRequest.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListApplicationsRequestOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListApplicationsResponse.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListApplicationsResponseOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListAssetsRequest.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListAssetsRequestOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListAssetsResponse.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListAssetsResponseOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListClustersRequest.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListClustersRequestOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListClustersResponse.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListClustersResponseOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListCollectionsRequest.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListCollectionsRequestOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListCollectionsResponse.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListCollectionsResponseOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListCorporaRequest.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListCorporaRequestOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListCorporaResponse.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListCorporaResponseOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListDataSchemasRequest.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListDataSchemasRequestOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListDataSchemasResponse.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListDataSchemasResponseOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListDraftsRequest.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListDraftsRequestOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListDraftsResponse.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListDraftsResponseOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListEventsRequest.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListEventsRequestOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListEventsResponse.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListEventsResponseOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListIndexEndpointsRequest.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListIndexEndpointsRequestOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListIndexEndpointsResponse.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListIndexEndpointsResponseOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListIndexesRequest.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListIndexesRequestOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListIndexesResponse.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListIndexesResponseOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListInstancesRequest.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListInstancesRequestOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListInstancesResponse.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListInstancesResponseOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListOperatorsRequest.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListOperatorsRequestOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListOperatorsResponse.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListOperatorsResponseOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListPrebuiltProcessorsRequest.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListPrebuiltProcessorsRequestOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListPrebuiltProcessorsResponse.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListPrebuiltProcessorsResponseOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListProcessesRequest.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListProcessesRequestOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListProcessesResponse.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListProcessesResponseOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListProcessorsRequest.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListProcessorsRequestOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListProcessorsResponse.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListProcessorsResponseOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListPublicOperatorsRequest.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListPublicOperatorsRequestOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListPublicOperatorsResponse.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListPublicOperatorsResponseOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListSearchConfigsRequest.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListSearchConfigsRequestOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListSearchConfigsResponse.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListSearchConfigsResponseOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListSearchHypernymsRequest.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListSearchHypernymsRequestOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListSearchHypernymsResponse.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListSearchHypernymsResponseOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListSeriesRequest.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListSeriesRequestOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListSeriesResponse.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListSeriesResponseOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListStreamsRequest.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListStreamsRequestOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListStreamsResponse.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListStreamsResponseOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/LocationName.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/LvaProto.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/LvaResourcesProto.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/LvaServiceProto.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/MachineSpec.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/MachineSpecOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/MaterializeChannelRequest.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/MaterializeChannelRequestOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/MediaWarehouseConfig.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/MediaWarehouseConfigOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ModelType.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/Node.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/NodeOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/NormalizedPolygon.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/NormalizedPolygonOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/NormalizedPolyline.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/NormalizedPolylineOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/NormalizedVertex.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/NormalizedVertexOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ObjectDetectionPredictionResult.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ObjectDetectionPredictionResultOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/OccupancyCountConfig.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/OccupancyCountConfigOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/OccupancyCountingPredictionResult.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/OccupancyCountingPredictionResultOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/OperationMetadata.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/OperationMetadataOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/Operator.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/OperatorDefinition.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/OperatorDefinitionOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/OperatorName.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/OperatorOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/OperatorQuery.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/OperatorQueryOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/Packet.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/PacketHeader.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/PacketHeaderOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/PacketOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/PacketType.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/PacketTypeOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/Partition.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/PartitionOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/PersonBlurConfig.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/PersonBlurConfigOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/PersonVehicleDetectionConfig.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/PersonVehicleDetectionConfigOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/PersonalProtectiveEquipmentDetectionConfig.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/PersonalProtectiveEquipmentDetectionConfigOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/PersonalProtectiveEquipmentDetectionOutput.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/PersonalProtectiveEquipmentDetectionOutputOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/PlatformProto.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/Process.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ProcessName.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ProcessOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/Processor.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ProcessorConfig.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ProcessorConfigOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ProcessorIOSpec.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ProcessorIOSpecOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ProcessorName.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ProcessorOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ProductRecognizerConfig.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ProductRecognizerConfigOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/RawImageDescriptor.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/RawImageDescriptorOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ReceiveEventsControlResponse.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ReceiveEventsControlResponseOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ReceiveEventsRequest.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ReceiveEventsRequestOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ReceiveEventsResponse.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ReceiveEventsResponseOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ReceivePacketsControlResponse.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ReceivePacketsControlResponseOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ReceivePacketsRequest.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ReceivePacketsRequestOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ReceivePacketsResponse.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ReceivePacketsResponseOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/Registry.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ReleaseLeaseRequest.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ReleaseLeaseRequestOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ReleaseLeaseResponse.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ReleaseLeaseResponseOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/RemoveApplicationStreamInputRequest.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/RemoveApplicationStreamInputRequestOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/RemoveApplicationStreamInputResponse.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/RemoveApplicationStreamInputResponseOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/RemoveCollectionItemRequest.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/RemoveCollectionItemRequestOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/RemoveCollectionItemResponse.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/RemoveCollectionItemResponseOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/RemoveIndexAssetMetadata.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/RemoveIndexAssetMetadataOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/RemoveIndexAssetRequest.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/RemoveIndexAssetRequestOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/RemoveIndexAssetResponse.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/RemoveIndexAssetResponseOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/RenewLeaseRequest.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/RenewLeaseRequestOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/RequestMetadata.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/RequestMetadataOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ResolveOperatorInfoRequest.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ResolveOperatorInfoRequestOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ResolveOperatorInfoResponse.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ResolveOperatorInfoResponseOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ResourceAnnotations.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ResourceAnnotationsOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ResourceSpecification.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ResourceSpecificationOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/RunMode.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/RunStatus.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/RunStatusOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/SchemaKeySortingStrategy.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/SchemaKeySortingStrategyOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/SearchAssetsRequest.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/SearchAssetsRequestOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/SearchAssetsResponse.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/SearchAssetsResponseOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/SearchCapability.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/SearchCapabilityOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/SearchCapabilitySetting.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/SearchCapabilitySettingOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/SearchConfig.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/SearchConfigName.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/SearchConfigOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/SearchCriteriaProperty.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/SearchCriteriaPropertyOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/SearchHypernym.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/SearchHypernymName.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/SearchHypernymOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/SearchIndexEndpointRequest.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/SearchIndexEndpointRequestOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/SearchIndexEndpointResponse.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/SearchIndexEndpointResponseOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/SearchResultItem.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/SearchResultItemOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/SendPacketsRequest.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/SendPacketsRequestOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/SendPacketsResponse.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/SendPacketsResponseOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/Series.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/SeriesMetadata.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/SeriesMetadataOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/SeriesName.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/SeriesOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ServerMetadata.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ServerMetadataOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/Stream.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/StreamAnnotation.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/StreamAnnotationOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/StreamAnnotationType.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/StreamAnnotations.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/StreamAnnotationsOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/StreamName.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/StreamOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/StreamWithAnnotation.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/StreamWithAnnotationOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/StreamingResourcesProto.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/StreamingServiceProto.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/StreamsResourcesProto.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/StreamsServiceProto.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/StringArray.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/StringArrayOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/TagParsingConfig.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/TagParsingConfigOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/TagRecognizerConfig.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/TagRecognizerConfigOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/UndeployApplicationRequest.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/UndeployApplicationRequestOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/UndeployApplicationResponse.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/UndeployApplicationResponseOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/UndeployIndexMetadata.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/UndeployIndexMetadataOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/UndeployIndexRequest.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/UndeployIndexRequestOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/UndeployIndexResponse.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/UndeployIndexResponseOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/UniversalInputConfig.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/UniversalInputConfigOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/UpdateAnalysisRequest.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/UpdateAnalysisRequestOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/UpdateAnnotationRequest.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/UpdateAnnotationRequestOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/UpdateApplicationInstancesRequest.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/UpdateApplicationInstancesRequestOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/UpdateApplicationInstancesResponse.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/UpdateApplicationInstancesResponseOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/UpdateApplicationRequest.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/UpdateApplicationRequestOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/UpdateApplicationStreamInputRequest.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/UpdateApplicationStreamInputRequestOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/UpdateApplicationStreamInputResponse.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/UpdateApplicationStreamInputResponseOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/UpdateAssetRequest.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/UpdateAssetRequestOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/UpdateClusterRequest.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/UpdateClusterRequestOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/UpdateCollectionRequest.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/UpdateCollectionRequestOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/UpdateCorpusRequest.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/UpdateCorpusRequestOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/UpdateDataSchemaRequest.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/UpdateDataSchemaRequestOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/UpdateDraftRequest.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/UpdateDraftRequestOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/UpdateEventRequest.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/UpdateEventRequestOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/UpdateIndexEndpointMetadata.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/UpdateIndexEndpointMetadataOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/UpdateIndexEndpointRequest.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/UpdateIndexEndpointRequestOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/UpdateIndexMetadata.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/UpdateIndexMetadataOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/UpdateIndexRequest.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/UpdateIndexRequestOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/UpdateOperatorRequest.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/UpdateOperatorRequestOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/UpdateProcessRequest.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/UpdateProcessRequestOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/UpdateProcessorRequest.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/UpdateProcessorRequestOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/UpdateSearchConfigRequest.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/UpdateSearchConfigRequestOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/UpdateSearchHypernymRequest.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/UpdateSearchHypernymRequestOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/UpdateSeriesRequest.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/UpdateSeriesRequestOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/UpdateStreamRequest.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/UpdateStreamRequestOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/UploadAssetMetadata.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/UploadAssetMetadataOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/UploadAssetRequest.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/UploadAssetRequestOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/UploadAssetResponse.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/UploadAssetResponseOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/UserSpecifiedAnnotation.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/UserSpecifiedAnnotationOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/VertexAutoMLVideoConfig.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/VertexAutoMLVideoConfigOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/VertexAutoMLVisionConfig.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/VertexAutoMLVisionConfigOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/VertexCustomConfig.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/VertexCustomConfigOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/VideoActionRecognitionPredictionResult.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/VideoActionRecognitionPredictionResultOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/VideoClassificationPredictionResult.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/VideoClassificationPredictionResultOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/VideoObjectTrackingPredictionResult.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/VideoObjectTrackingPredictionResultOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/VideoStreamInputConfig.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/VideoStreamInputConfigOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ViewCollectionItemsRequest.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ViewCollectionItemsRequestOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ViewCollectionItemsResponse.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ViewCollectionItemsResponseOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ViewIndexedAssetsRequest.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ViewIndexedAssetsRequestOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ViewIndexedAssetsResponse.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ViewIndexedAssetsResponseOrBuilder.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/WarehouseProto.java create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/proto/google/cloud/visionai/v1/annotations.proto create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/proto/google/cloud/visionai/v1/common.proto create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/proto/google/cloud/visionai/v1/health_service.proto create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/proto/google/cloud/visionai/v1/lva.proto create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/proto/google/cloud/visionai/v1/lva_resources.proto create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/proto/google/cloud/visionai/v1/lva_service.proto create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/proto/google/cloud/visionai/v1/platform.proto create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/proto/google/cloud/visionai/v1/streaming_resources.proto create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/proto/google/cloud/visionai/v1/streaming_service.proto create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/proto/google/cloud/visionai/v1/streams_resources.proto create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/proto/google/cloud/visionai/v1/streams_service.proto create mode 100644 java-visionai/proto-google-cloud-visionai-v1/src/main/proto/google/cloud/visionai/v1/warehouse.proto create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/appplatform/addapplicationstreaminput/AsyncAddApplicationStreamInput.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/appplatform/addapplicationstreaminput/AsyncAddApplicationStreamInputLRO.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/appplatform/addapplicationstreaminput/SyncAddApplicationStreamInput.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/appplatform/addapplicationstreaminput/SyncAddApplicationStreamInputApplicationname.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/appplatform/addapplicationstreaminput/SyncAddApplicationStreamInputString.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/appplatform/create/SyncCreateSetCredentialsProvider.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/appplatform/create/SyncCreateSetCredentialsProvider1.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/appplatform/create/SyncCreateSetEndpoint.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/appplatform/createapplication/AsyncCreateApplication.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/appplatform/createapplication/AsyncCreateApplicationLRO.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/appplatform/createapplication/SyncCreateApplication.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/appplatform/createapplication/SyncCreateApplicationLocationnameApplication.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/appplatform/createapplication/SyncCreateApplicationStringApplication.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/appplatform/createapplicationinstances/AsyncCreateApplicationInstances.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/appplatform/createapplicationinstances/AsyncCreateApplicationInstancesLRO.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/appplatform/createapplicationinstances/SyncCreateApplicationInstances.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/appplatform/createapplicationinstances/SyncCreateApplicationInstancesApplicationname.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/appplatform/createapplicationinstances/SyncCreateApplicationInstancesString.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/appplatform/createdraft/AsyncCreateDraft.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/appplatform/createdraft/AsyncCreateDraftLRO.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/appplatform/createdraft/SyncCreateDraft.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/appplatform/createdraft/SyncCreateDraftApplicationnameDraftString.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/appplatform/createdraft/SyncCreateDraftStringDraftString.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/appplatform/createprocessor/AsyncCreateProcessor.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/appplatform/createprocessor/AsyncCreateProcessorLRO.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/appplatform/createprocessor/SyncCreateProcessor.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/appplatform/createprocessor/SyncCreateProcessorLocationnameProcessorString.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/appplatform/createprocessor/SyncCreateProcessorStringProcessorString.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/appplatform/deleteapplication/AsyncDeleteApplication.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/appplatform/deleteapplication/AsyncDeleteApplicationLRO.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/appplatform/deleteapplication/SyncDeleteApplication.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/appplatform/deleteapplication/SyncDeleteApplicationApplicationname.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/appplatform/deleteapplication/SyncDeleteApplicationString.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/appplatform/deleteapplicationinstances/AsyncDeleteApplicationInstances.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/appplatform/deleteapplicationinstances/AsyncDeleteApplicationInstancesLRO.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/appplatform/deleteapplicationinstances/SyncDeleteApplicationInstances.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/appplatform/deleteapplicationinstances/SyncDeleteApplicationInstancesApplicationname.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/appplatform/deleteapplicationinstances/SyncDeleteApplicationInstancesString.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/appplatform/deletedraft/AsyncDeleteDraft.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/appplatform/deletedraft/AsyncDeleteDraftLRO.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/appplatform/deletedraft/SyncDeleteDraft.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/appplatform/deletedraft/SyncDeleteDraftDraftname.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/appplatform/deletedraft/SyncDeleteDraftString.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/appplatform/deleteprocessor/AsyncDeleteProcessor.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/appplatform/deleteprocessor/AsyncDeleteProcessorLRO.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/appplatform/deleteprocessor/SyncDeleteProcessor.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/appplatform/deleteprocessor/SyncDeleteProcessorProcessorname.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/appplatform/deleteprocessor/SyncDeleteProcessorString.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/appplatform/deployapplication/AsyncDeployApplication.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/appplatform/deployapplication/AsyncDeployApplicationLRO.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/appplatform/deployapplication/SyncDeployApplication.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/appplatform/deployapplication/SyncDeployApplicationApplicationname.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/appplatform/deployapplication/SyncDeployApplicationString.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/appplatform/getapplication/AsyncGetApplication.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/appplatform/getapplication/SyncGetApplication.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/appplatform/getapplication/SyncGetApplicationApplicationname.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/appplatform/getapplication/SyncGetApplicationString.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/appplatform/getdraft/AsyncGetDraft.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/appplatform/getdraft/SyncGetDraft.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/appplatform/getdraft/SyncGetDraftDraftname.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/appplatform/getdraft/SyncGetDraftString.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/appplatform/getinstance/AsyncGetInstance.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/appplatform/getinstance/SyncGetInstance.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/appplatform/getinstance/SyncGetInstanceInstancename.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/appplatform/getinstance/SyncGetInstanceString.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/appplatform/getprocessor/AsyncGetProcessor.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/appplatform/getprocessor/SyncGetProcessor.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/appplatform/getprocessor/SyncGetProcessorProcessorname.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/appplatform/getprocessor/SyncGetProcessorString.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/appplatform/listapplications/AsyncListApplications.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/appplatform/listapplications/AsyncListApplicationsPaged.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/appplatform/listapplications/SyncListApplications.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/appplatform/listapplications/SyncListApplicationsLocationname.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/appplatform/listapplications/SyncListApplicationsString.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/appplatform/listdrafts/AsyncListDrafts.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/appplatform/listdrafts/AsyncListDraftsPaged.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/appplatform/listdrafts/SyncListDrafts.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/appplatform/listdrafts/SyncListDraftsApplicationname.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/appplatform/listdrafts/SyncListDraftsString.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/appplatform/listinstances/AsyncListInstances.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/appplatform/listinstances/AsyncListInstancesPaged.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/appplatform/listinstances/SyncListInstances.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/appplatform/listinstances/SyncListInstancesApplicationname.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/appplatform/listinstances/SyncListInstancesString.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/appplatform/listprebuiltprocessors/AsyncListPrebuiltProcessors.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/appplatform/listprebuiltprocessors/SyncListPrebuiltProcessors.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/appplatform/listprebuiltprocessors/SyncListPrebuiltProcessorsLocationname.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/appplatform/listprebuiltprocessors/SyncListPrebuiltProcessorsString.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/appplatform/listprocessors/AsyncListProcessors.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/appplatform/listprocessors/AsyncListProcessorsPaged.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/appplatform/listprocessors/SyncListProcessors.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/appplatform/listprocessors/SyncListProcessorsLocationname.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/appplatform/listprocessors/SyncListProcessorsString.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/appplatform/removeapplicationstreaminput/AsyncRemoveApplicationStreamInput.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/appplatform/removeapplicationstreaminput/AsyncRemoveApplicationStreamInputLRO.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/appplatform/removeapplicationstreaminput/SyncRemoveApplicationStreamInput.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/appplatform/removeapplicationstreaminput/SyncRemoveApplicationStreamInputApplicationname.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/appplatform/removeapplicationstreaminput/SyncRemoveApplicationStreamInputString.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/appplatform/undeployapplication/AsyncUndeployApplication.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/appplatform/undeployapplication/AsyncUndeployApplicationLRO.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/appplatform/undeployapplication/SyncUndeployApplication.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/appplatform/undeployapplication/SyncUndeployApplicationApplicationname.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/appplatform/undeployapplication/SyncUndeployApplicationString.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/appplatform/updateapplication/AsyncUpdateApplication.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/appplatform/updateapplication/AsyncUpdateApplicationLRO.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/appplatform/updateapplication/SyncUpdateApplication.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/appplatform/updateapplication/SyncUpdateApplicationApplicationFieldmask.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/appplatform/updateapplicationinstances/AsyncUpdateApplicationInstances.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/appplatform/updateapplicationinstances/AsyncUpdateApplicationInstancesLRO.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/appplatform/updateapplicationinstances/SyncUpdateApplicationInstances.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/appplatform/updateapplicationinstances/SyncUpdateApplicationInstancesApplicationnameListupdateapplicationinstancesrequestupdateapplicationinstance.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/appplatform/updateapplicationinstances/SyncUpdateApplicationInstancesStringListupdateapplicationinstancesrequestupdateapplicationinstance.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/appplatform/updateapplicationstreaminput/AsyncUpdateApplicationStreamInput.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/appplatform/updateapplicationstreaminput/AsyncUpdateApplicationStreamInputLRO.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/appplatform/updateapplicationstreaminput/SyncUpdateApplicationStreamInput.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/appplatform/updateapplicationstreaminput/SyncUpdateApplicationStreamInputApplicationname.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/appplatform/updateapplicationstreaminput/SyncUpdateApplicationStreamInputString.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/appplatform/updatedraft/AsyncUpdateDraft.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/appplatform/updatedraft/AsyncUpdateDraftLRO.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/appplatform/updatedraft/SyncUpdateDraft.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/appplatform/updatedraft/SyncUpdateDraftDraftFieldmask.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/appplatform/updateprocessor/AsyncUpdateProcessor.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/appplatform/updateprocessor/AsyncUpdateProcessorLRO.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/appplatform/updateprocessor/SyncUpdateProcessor.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/appplatform/updateprocessor/SyncUpdateProcessorProcessorFieldmask.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/appplatformsettings/getapplication/SyncGetApplication.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/healthcheckservice/create/SyncCreateSetCredentialsProvider.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/healthcheckservice/create/SyncCreateSetCredentialsProvider1.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/healthcheckservice/create/SyncCreateSetEndpoint.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/healthcheckservice/healthcheck/AsyncHealthCheck.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/healthcheckservice/healthcheck/SyncHealthCheck.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/healthcheckservicesettings/healthcheck/SyncHealthCheck.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/livevideoanalytics/batchrunprocess/AsyncBatchRunProcess.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/livevideoanalytics/batchrunprocess/AsyncBatchRunProcessLRO.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/livevideoanalytics/batchrunprocess/SyncBatchRunProcess.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/livevideoanalytics/batchrunprocess/SyncBatchRunProcessClusternameListcreateprocessrequest.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/livevideoanalytics/batchrunprocess/SyncBatchRunProcessStringListcreateprocessrequest.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/livevideoanalytics/create/SyncCreateSetCredentialsProvider.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/livevideoanalytics/create/SyncCreateSetCredentialsProvider1.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/livevideoanalytics/create/SyncCreateSetEndpoint.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/livevideoanalytics/createanalysis/AsyncCreateAnalysis.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/livevideoanalytics/createanalysis/AsyncCreateAnalysisLRO.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/livevideoanalytics/createanalysis/SyncCreateAnalysis.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/livevideoanalytics/createanalysis/SyncCreateAnalysisClusternameAnalysisString.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/livevideoanalytics/createanalysis/SyncCreateAnalysisStringAnalysisString.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/livevideoanalytics/createoperator/AsyncCreateOperator.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/livevideoanalytics/createoperator/AsyncCreateOperatorLRO.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/livevideoanalytics/createoperator/SyncCreateOperator.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/livevideoanalytics/createoperator/SyncCreateOperatorLocationnameOperatorString.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/livevideoanalytics/createoperator/SyncCreateOperatorStringOperatorString.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/livevideoanalytics/createprocess/AsyncCreateProcess.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/livevideoanalytics/createprocess/AsyncCreateProcessLRO.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/livevideoanalytics/createprocess/SyncCreateProcess.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/livevideoanalytics/createprocess/SyncCreateProcessClusternameProcessString.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/livevideoanalytics/createprocess/SyncCreateProcessStringProcessString.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/livevideoanalytics/deleteanalysis/AsyncDeleteAnalysis.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/livevideoanalytics/deleteanalysis/AsyncDeleteAnalysisLRO.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/livevideoanalytics/deleteanalysis/SyncDeleteAnalysis.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/livevideoanalytics/deleteanalysis/SyncDeleteAnalysisAnalysisname.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/livevideoanalytics/deleteanalysis/SyncDeleteAnalysisString.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/livevideoanalytics/deleteoperator/AsyncDeleteOperator.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/livevideoanalytics/deleteoperator/AsyncDeleteOperatorLRO.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/livevideoanalytics/deleteoperator/SyncDeleteOperator.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/livevideoanalytics/deleteoperator/SyncDeleteOperatorOperatorname.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/livevideoanalytics/deleteoperator/SyncDeleteOperatorString.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/livevideoanalytics/deleteprocess/AsyncDeleteProcess.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/livevideoanalytics/deleteprocess/AsyncDeleteProcessLRO.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/livevideoanalytics/deleteprocess/SyncDeleteProcess.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/livevideoanalytics/deleteprocess/SyncDeleteProcessProcessname.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/livevideoanalytics/deleteprocess/SyncDeleteProcessString.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/livevideoanalytics/getanalysis/AsyncGetAnalysis.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/livevideoanalytics/getanalysis/SyncGetAnalysis.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/livevideoanalytics/getanalysis/SyncGetAnalysisAnalysisname.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/livevideoanalytics/getanalysis/SyncGetAnalysisString.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/livevideoanalytics/getoperator/AsyncGetOperator.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/livevideoanalytics/getoperator/SyncGetOperator.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/livevideoanalytics/getoperator/SyncGetOperatorOperatorname.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/livevideoanalytics/getoperator/SyncGetOperatorString.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/livevideoanalytics/getprocess/AsyncGetProcess.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/livevideoanalytics/getprocess/SyncGetProcess.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/livevideoanalytics/getprocess/SyncGetProcessProcessname.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/livevideoanalytics/getprocess/SyncGetProcessString.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/livevideoanalytics/listanalyses/AsyncListAnalyses.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/livevideoanalytics/listanalyses/AsyncListAnalysesPaged.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/livevideoanalytics/listanalyses/SyncListAnalyses.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/livevideoanalytics/listanalyses/SyncListAnalysesClustername.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/livevideoanalytics/listanalyses/SyncListAnalysesString.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/livevideoanalytics/listoperators/AsyncListOperators.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/livevideoanalytics/listoperators/AsyncListOperatorsPaged.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/livevideoanalytics/listoperators/SyncListOperators.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/livevideoanalytics/listoperators/SyncListOperatorsLocationname.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/livevideoanalytics/listoperators/SyncListOperatorsString.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/livevideoanalytics/listprocesses/AsyncListProcesses.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/livevideoanalytics/listprocesses/AsyncListProcessesPaged.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/livevideoanalytics/listprocesses/SyncListProcesses.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/livevideoanalytics/listprocesses/SyncListProcessesClustername.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/livevideoanalytics/listprocesses/SyncListProcessesString.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/livevideoanalytics/listpublicoperators/AsyncListPublicOperators.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/livevideoanalytics/listpublicoperators/AsyncListPublicOperatorsPaged.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/livevideoanalytics/listpublicoperators/SyncListPublicOperators.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/livevideoanalytics/listpublicoperators/SyncListPublicOperatorsLocationname.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/livevideoanalytics/listpublicoperators/SyncListPublicOperatorsString.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/livevideoanalytics/resolveoperatorinfo/AsyncResolveOperatorInfo.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/livevideoanalytics/resolveoperatorinfo/SyncResolveOperatorInfo.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/livevideoanalytics/resolveoperatorinfo/SyncResolveOperatorInfoLocationnameListoperatorquery.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/livevideoanalytics/resolveoperatorinfo/SyncResolveOperatorInfoStringListoperatorquery.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/livevideoanalytics/updateanalysis/AsyncUpdateAnalysis.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/livevideoanalytics/updateanalysis/AsyncUpdateAnalysisLRO.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/livevideoanalytics/updateanalysis/SyncUpdateAnalysis.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/livevideoanalytics/updateanalysis/SyncUpdateAnalysisAnalysisFieldmask.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/livevideoanalytics/updateoperator/AsyncUpdateOperator.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/livevideoanalytics/updateoperator/AsyncUpdateOperatorLRO.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/livevideoanalytics/updateoperator/SyncUpdateOperator.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/livevideoanalytics/updateoperator/SyncUpdateOperatorOperatorFieldmask.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/livevideoanalytics/updateprocess/AsyncUpdateProcess.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/livevideoanalytics/updateprocess/AsyncUpdateProcessLRO.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/livevideoanalytics/updateprocess/SyncUpdateProcess.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/livevideoanalytics/updateprocess/SyncUpdateProcessProcessFieldmask.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/livevideoanalyticssettings/resolveoperatorinfo/SyncResolveOperatorInfo.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/streamingservice/acquirelease/AsyncAcquireLease.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/streamingservice/acquirelease/SyncAcquireLease.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/streamingservice/create/SyncCreateSetCredentialsProvider.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/streamingservice/create/SyncCreateSetCredentialsProvider1.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/streamingservice/create/SyncCreateSetEndpoint.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/streamingservice/receiveevents/AsyncReceiveEvents.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/streamingservice/receivepackets/AsyncReceivePackets.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/streamingservice/releaselease/AsyncReleaseLease.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/streamingservice/releaselease/SyncReleaseLease.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/streamingservice/renewlease/AsyncRenewLease.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/streamingservice/renewlease/SyncRenewLease.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/streamingservice/sendpackets/AsyncSendPackets.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/streamingservicesettings/acquirelease/SyncAcquireLease.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/streamsservice/create/SyncCreateSetCredentialsProvider.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/streamsservice/create/SyncCreateSetCredentialsProvider1.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/streamsservice/create/SyncCreateSetEndpoint.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/streamsservice/createcluster/AsyncCreateCluster.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/streamsservice/createcluster/AsyncCreateClusterLRO.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/streamsservice/createcluster/SyncCreateCluster.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/streamsservice/createcluster/SyncCreateClusterLocationnameClusterString.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/streamsservice/createcluster/SyncCreateClusterStringClusterString.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/streamsservice/createevent/AsyncCreateEvent.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/streamsservice/createevent/AsyncCreateEventLRO.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/streamsservice/createevent/SyncCreateEvent.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/streamsservice/createevent/SyncCreateEventClusternameEventString.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/streamsservice/createevent/SyncCreateEventStringEventString.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/streamsservice/createseries/AsyncCreateSeries.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/streamsservice/createseries/AsyncCreateSeriesLRO.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/streamsservice/createseries/SyncCreateSeries.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/streamsservice/createseries/SyncCreateSeriesClusternameSeriesString.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/streamsservice/createseries/SyncCreateSeriesStringSeriesString.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/streamsservice/createstream/AsyncCreateStream.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/streamsservice/createstream/AsyncCreateStreamLRO.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/streamsservice/createstream/SyncCreateStream.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/streamsservice/createstream/SyncCreateStreamClusternameStreamString.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/streamsservice/createstream/SyncCreateStreamStringStreamString.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/streamsservice/deletecluster/AsyncDeleteCluster.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/streamsservice/deletecluster/AsyncDeleteClusterLRO.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/streamsservice/deletecluster/SyncDeleteCluster.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/streamsservice/deletecluster/SyncDeleteClusterClustername.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/streamsservice/deletecluster/SyncDeleteClusterString.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/streamsservice/deleteevent/AsyncDeleteEvent.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/streamsservice/deleteevent/AsyncDeleteEventLRO.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/streamsservice/deleteevent/SyncDeleteEvent.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/streamsservice/deleteevent/SyncDeleteEventEventname.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/streamsservice/deleteevent/SyncDeleteEventString.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/streamsservice/deleteseries/AsyncDeleteSeries.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/streamsservice/deleteseries/AsyncDeleteSeriesLRO.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/streamsservice/deleteseries/SyncDeleteSeries.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/streamsservice/deleteseries/SyncDeleteSeriesSeriesname.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/streamsservice/deleteseries/SyncDeleteSeriesString.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/streamsservice/deletestream/AsyncDeleteStream.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/streamsservice/deletestream/AsyncDeleteStreamLRO.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/streamsservice/deletestream/SyncDeleteStream.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/streamsservice/deletestream/SyncDeleteStreamStreamname.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/streamsservice/deletestream/SyncDeleteStreamString.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/streamsservice/generatestreamhlstoken/AsyncGenerateStreamHlsToken.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/streamsservice/generatestreamhlstoken/SyncGenerateStreamHlsToken.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/streamsservice/generatestreamhlstoken/SyncGenerateStreamHlsTokenString.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/streamsservice/getcluster/AsyncGetCluster.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/streamsservice/getcluster/SyncGetCluster.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/streamsservice/getcluster/SyncGetClusterClustername.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/streamsservice/getcluster/SyncGetClusterString.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/streamsservice/getevent/AsyncGetEvent.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/streamsservice/getevent/SyncGetEvent.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/streamsservice/getevent/SyncGetEventEventname.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/streamsservice/getevent/SyncGetEventString.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/streamsservice/getseries/AsyncGetSeries.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/streamsservice/getseries/SyncGetSeries.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/streamsservice/getseries/SyncGetSeriesSeriesname.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/streamsservice/getseries/SyncGetSeriesString.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/streamsservice/getstream/AsyncGetStream.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/streamsservice/getstream/SyncGetStream.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/streamsservice/getstream/SyncGetStreamStreamname.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/streamsservice/getstream/SyncGetStreamString.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/streamsservice/getstreamthumbnail/AsyncGetStreamThumbnail.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/streamsservice/getstreamthumbnail/AsyncGetStreamThumbnailLRO.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/streamsservice/getstreamthumbnail/SyncGetStreamThumbnail.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/streamsservice/getstreamthumbnail/SyncGetStreamThumbnailStringString.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/streamsservice/listclusters/AsyncListClusters.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/streamsservice/listclusters/AsyncListClustersPaged.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/streamsservice/listclusters/SyncListClusters.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/streamsservice/listclusters/SyncListClustersLocationname.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/streamsservice/listclusters/SyncListClustersString.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/streamsservice/listevents/AsyncListEvents.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/streamsservice/listevents/AsyncListEventsPaged.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/streamsservice/listevents/SyncListEvents.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/streamsservice/listevents/SyncListEventsClustername.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/streamsservice/listevents/SyncListEventsString.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/streamsservice/listseries/AsyncListSeries.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/streamsservice/listseries/AsyncListSeriesPaged.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/streamsservice/listseries/SyncListSeries.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/streamsservice/listseries/SyncListSeriesClustername.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/streamsservice/listseries/SyncListSeriesString.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/streamsservice/liststreams/AsyncListStreams.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/streamsservice/liststreams/AsyncListStreamsPaged.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/streamsservice/liststreams/SyncListStreams.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/streamsservice/liststreams/SyncListStreamsClustername.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/streamsservice/liststreams/SyncListStreamsString.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/streamsservice/materializechannel/AsyncMaterializeChannel.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/streamsservice/materializechannel/AsyncMaterializeChannelLRO.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/streamsservice/materializechannel/SyncMaterializeChannel.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/streamsservice/materializechannel/SyncMaterializeChannelClusternameChannelString.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/streamsservice/materializechannel/SyncMaterializeChannelStringChannelString.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/streamsservice/updatecluster/AsyncUpdateCluster.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/streamsservice/updatecluster/AsyncUpdateClusterLRO.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/streamsservice/updatecluster/SyncUpdateCluster.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/streamsservice/updatecluster/SyncUpdateClusterClusterFieldmask.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/streamsservice/updateevent/AsyncUpdateEvent.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/streamsservice/updateevent/AsyncUpdateEventLRO.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/streamsservice/updateevent/SyncUpdateEvent.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/streamsservice/updateevent/SyncUpdateEventEventFieldmask.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/streamsservice/updateseries/AsyncUpdateSeries.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/streamsservice/updateseries/AsyncUpdateSeriesLRO.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/streamsservice/updateseries/SyncUpdateSeries.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/streamsservice/updateseries/SyncUpdateSeriesSeriesFieldmask.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/streamsservice/updatestream/AsyncUpdateStream.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/streamsservice/updatestream/AsyncUpdateStreamLRO.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/streamsservice/updatestream/SyncUpdateStream.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/streamsservice/updatestream/SyncUpdateStreamStreamFieldmask.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/streamsservicesettings/getcluster/SyncGetCluster.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/stub/appplatformstubsettings/getapplication/SyncGetApplication.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/stub/healthcheckservicestubsettings/healthcheck/SyncHealthCheck.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/stub/livevideoanalyticsstubsettings/resolveoperatorinfo/SyncResolveOperatorInfo.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/stub/streamingservicestubsettings/acquirelease/SyncAcquireLease.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/stub/streamsservicestubsettings/getcluster/SyncGetCluster.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/stub/warehousestubsettings/createasset/SyncCreateAsset.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/warehouse/addcollectionitem/AsyncAddCollectionItem.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/warehouse/addcollectionitem/SyncAddCollectionItem.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/warehouse/addcollectionitem/SyncAddCollectionItemCollectionitem.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/warehouse/analyzeasset/AsyncAnalyzeAsset.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/warehouse/analyzeasset/AsyncAnalyzeAssetLRO.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/warehouse/analyzeasset/SyncAnalyzeAsset.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/warehouse/analyzecorpus/AsyncAnalyzeCorpus.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/warehouse/analyzecorpus/AsyncAnalyzeCorpusLRO.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/warehouse/analyzecorpus/SyncAnalyzeCorpus.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/warehouse/clipasset/AsyncClipAsset.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/warehouse/clipasset/SyncClipAsset.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/warehouse/create/SyncCreateSetCredentialsProvider.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/warehouse/create/SyncCreateSetCredentialsProvider1.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/warehouse/create/SyncCreateSetEndpoint.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/warehouse/createannotation/AsyncCreateAnnotation.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/warehouse/createannotation/SyncCreateAnnotation.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/warehouse/createannotation/SyncCreateAnnotationAssetnameAnnotationString.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/warehouse/createannotation/SyncCreateAnnotationStringAnnotationString.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/warehouse/createasset/AsyncCreateAsset.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/warehouse/createasset/SyncCreateAsset.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/warehouse/createasset/SyncCreateAssetCorpusnameAssetString.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/warehouse/createasset/SyncCreateAssetStringAssetString.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/warehouse/createcollection/AsyncCreateCollection.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/warehouse/createcollection/AsyncCreateCollectionLRO.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/warehouse/createcollection/SyncCreateCollection.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/warehouse/createcollection/SyncCreateCollectionCorpusnameCollectionString.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/warehouse/createcollection/SyncCreateCollectionStringCollectionString.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/warehouse/createcorpus/AsyncCreateCorpus.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/warehouse/createcorpus/AsyncCreateCorpusLRO.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/warehouse/createcorpus/SyncCreateCorpus.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/warehouse/createcorpus/SyncCreateCorpusStringCorpus.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/warehouse/createdataschema/AsyncCreateDataSchema.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/warehouse/createdataschema/SyncCreateDataSchema.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/warehouse/createdataschema/SyncCreateDataSchemaCorpusnameDataschema.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/warehouse/createdataschema/SyncCreateDataSchemaStringDataschema.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/warehouse/createindex/AsyncCreateIndex.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/warehouse/createindex/AsyncCreateIndexLRO.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/warehouse/createindex/SyncCreateIndex.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/warehouse/createindex/SyncCreateIndexCorpusnameIndexString.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/warehouse/createindex/SyncCreateIndexStringIndexString.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/warehouse/createindexendpoint/AsyncCreateIndexEndpoint.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/warehouse/createindexendpoint/AsyncCreateIndexEndpointLRO.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/warehouse/createindexendpoint/SyncCreateIndexEndpoint.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/warehouse/createindexendpoint/SyncCreateIndexEndpointLocationnameIndexendpointString.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/warehouse/createindexendpoint/SyncCreateIndexEndpointStringIndexendpointString.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/warehouse/createsearchconfig/AsyncCreateSearchConfig.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/warehouse/createsearchconfig/SyncCreateSearchConfig.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/warehouse/createsearchconfig/SyncCreateSearchConfigCorpusnameSearchconfigString.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/warehouse/createsearchconfig/SyncCreateSearchConfigStringSearchconfigString.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/warehouse/createsearchhypernym/AsyncCreateSearchHypernym.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/warehouse/createsearchhypernym/SyncCreateSearchHypernym.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/warehouse/createsearchhypernym/SyncCreateSearchHypernymCorpusnameSearchhypernymString.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/warehouse/createsearchhypernym/SyncCreateSearchHypernymStringSearchhypernymString.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/warehouse/deleteannotation/AsyncDeleteAnnotation.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/warehouse/deleteannotation/SyncDeleteAnnotation.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/warehouse/deleteannotation/SyncDeleteAnnotationAnnotationname.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/warehouse/deleteannotation/SyncDeleteAnnotationString.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/warehouse/deleteasset/AsyncDeleteAsset.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/warehouse/deleteasset/AsyncDeleteAssetLRO.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/warehouse/deleteasset/SyncDeleteAsset.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/warehouse/deleteasset/SyncDeleteAssetAssetname.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/warehouse/deleteasset/SyncDeleteAssetString.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/warehouse/deletecollection/AsyncDeleteCollection.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/warehouse/deletecollection/AsyncDeleteCollectionLRO.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/warehouse/deletecollection/SyncDeleteCollection.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/warehouse/deletecollection/SyncDeleteCollectionCollectionname.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/warehouse/deletecollection/SyncDeleteCollectionString.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/warehouse/deletecorpus/AsyncDeleteCorpus.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/warehouse/deletecorpus/SyncDeleteCorpus.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/warehouse/deletecorpus/SyncDeleteCorpusCorpusname.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/warehouse/deletecorpus/SyncDeleteCorpusString.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/warehouse/deletedataschema/AsyncDeleteDataSchema.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/warehouse/deletedataschema/SyncDeleteDataSchema.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/warehouse/deletedataschema/SyncDeleteDataSchemaDataschemaname.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/warehouse/deletedataschema/SyncDeleteDataSchemaString.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/warehouse/deleteindex/AsyncDeleteIndex.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/warehouse/deleteindex/AsyncDeleteIndexLRO.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/warehouse/deleteindex/SyncDeleteIndex.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/warehouse/deleteindex/SyncDeleteIndexIndexname.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/warehouse/deleteindex/SyncDeleteIndexString.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/warehouse/deleteindexendpoint/AsyncDeleteIndexEndpoint.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/warehouse/deleteindexendpoint/AsyncDeleteIndexEndpointLRO.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/warehouse/deleteindexendpoint/SyncDeleteIndexEndpoint.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/warehouse/deleteindexendpoint/SyncDeleteIndexEndpointIndexendpointname.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/warehouse/deleteindexendpoint/SyncDeleteIndexEndpointString.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/warehouse/deletesearchconfig/AsyncDeleteSearchConfig.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/warehouse/deletesearchconfig/SyncDeleteSearchConfig.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/warehouse/deletesearchconfig/SyncDeleteSearchConfigSearchconfigname.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/warehouse/deletesearchconfig/SyncDeleteSearchConfigString.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/warehouse/deletesearchhypernym/AsyncDeleteSearchHypernym.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/warehouse/deletesearchhypernym/SyncDeleteSearchHypernym.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/warehouse/deletesearchhypernym/SyncDeleteSearchHypernymSearchhypernymname.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/warehouse/deletesearchhypernym/SyncDeleteSearchHypernymString.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/warehouse/deployindex/AsyncDeployIndex.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/warehouse/deployindex/AsyncDeployIndexLRO.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/warehouse/deployindex/SyncDeployIndex.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/warehouse/generatehlsuri/AsyncGenerateHlsUri.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/warehouse/generatehlsuri/SyncGenerateHlsUri.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/warehouse/generateretrievalurl/AsyncGenerateRetrievalUrl.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/warehouse/generateretrievalurl/SyncGenerateRetrievalUrl.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/warehouse/getannotation/AsyncGetAnnotation.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/warehouse/getannotation/SyncGetAnnotation.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/warehouse/getannotation/SyncGetAnnotationAnnotationname.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/warehouse/getannotation/SyncGetAnnotationString.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/warehouse/getasset/AsyncGetAsset.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/warehouse/getasset/SyncGetAsset.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/warehouse/getasset/SyncGetAssetAssetname.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/warehouse/getasset/SyncGetAssetString.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/warehouse/getcollection/AsyncGetCollection.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/warehouse/getcollection/SyncGetCollection.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/warehouse/getcollection/SyncGetCollectionCollectionname.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/warehouse/getcollection/SyncGetCollectionString.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/warehouse/getcorpus/AsyncGetCorpus.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/warehouse/getcorpus/SyncGetCorpus.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/warehouse/getcorpus/SyncGetCorpusCorpusname.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/warehouse/getcorpus/SyncGetCorpusString.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/warehouse/getdataschema/AsyncGetDataSchema.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/warehouse/getdataschema/SyncGetDataSchema.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/warehouse/getdataschema/SyncGetDataSchemaDataschemaname.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/warehouse/getdataschema/SyncGetDataSchemaString.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/warehouse/getindex/AsyncGetIndex.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/warehouse/getindex/SyncGetIndex.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/warehouse/getindex/SyncGetIndexIndexname.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/warehouse/getindex/SyncGetIndexString.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/warehouse/getindexendpoint/AsyncGetIndexEndpoint.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/warehouse/getindexendpoint/SyncGetIndexEndpoint.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/warehouse/getindexendpoint/SyncGetIndexEndpointIndexendpointname.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/warehouse/getindexendpoint/SyncGetIndexEndpointString.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/warehouse/getsearchconfig/AsyncGetSearchConfig.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/warehouse/getsearchconfig/SyncGetSearchConfig.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/warehouse/getsearchconfig/SyncGetSearchConfigSearchconfigname.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/warehouse/getsearchconfig/SyncGetSearchConfigString.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/warehouse/getsearchhypernym/AsyncGetSearchHypernym.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/warehouse/getsearchhypernym/SyncGetSearchHypernym.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/warehouse/getsearchhypernym/SyncGetSearchHypernymSearchhypernymname.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/warehouse/getsearchhypernym/SyncGetSearchHypernymString.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/warehouse/importassets/AsyncImportAssets.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/warehouse/importassets/AsyncImportAssetsLRO.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/warehouse/importassets/SyncImportAssets.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/warehouse/indexasset/AsyncIndexAsset.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/warehouse/indexasset/AsyncIndexAssetLRO.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/warehouse/indexasset/SyncIndexAsset.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/warehouse/ingestasset/AsyncIngestAsset.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/warehouse/listannotations/AsyncListAnnotations.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/warehouse/listannotations/AsyncListAnnotationsPaged.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/warehouse/listannotations/SyncListAnnotations.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/warehouse/listannotations/SyncListAnnotationsAssetname.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/warehouse/listannotations/SyncListAnnotationsString.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/warehouse/listassets/AsyncListAssets.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/warehouse/listassets/AsyncListAssetsPaged.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/warehouse/listassets/SyncListAssets.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/warehouse/listassets/SyncListAssetsCorpusname.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/warehouse/listassets/SyncListAssetsString.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/warehouse/listcollections/AsyncListCollections.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/warehouse/listcollections/AsyncListCollectionsPaged.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/warehouse/listcollections/SyncListCollections.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/warehouse/listcollections/SyncListCollectionsCorpusname.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/warehouse/listcollections/SyncListCollectionsString.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/warehouse/listcorpora/AsyncListCorpora.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/warehouse/listcorpora/AsyncListCorporaPaged.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/warehouse/listcorpora/SyncListCorpora.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/warehouse/listcorpora/SyncListCorporaString.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/warehouse/listdataschemas/AsyncListDataSchemas.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/warehouse/listdataschemas/AsyncListDataSchemasPaged.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/warehouse/listdataschemas/SyncListDataSchemas.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/warehouse/listdataschemas/SyncListDataSchemasCorpusname.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/warehouse/listdataschemas/SyncListDataSchemasString.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/warehouse/listindexendpoints/AsyncListIndexEndpoints.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/warehouse/listindexendpoints/AsyncListIndexEndpointsPaged.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/warehouse/listindexendpoints/SyncListIndexEndpoints.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/warehouse/listindexendpoints/SyncListIndexEndpointsLocationname.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/warehouse/listindexendpoints/SyncListIndexEndpointsString.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/warehouse/listindexes/AsyncListIndexes.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/warehouse/listindexes/AsyncListIndexesPaged.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/warehouse/listindexes/SyncListIndexes.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/warehouse/listindexes/SyncListIndexesCorpusname.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/warehouse/listindexes/SyncListIndexesString.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/warehouse/listsearchconfigs/AsyncListSearchConfigs.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/warehouse/listsearchconfigs/AsyncListSearchConfigsPaged.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/warehouse/listsearchconfigs/SyncListSearchConfigs.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/warehouse/listsearchconfigs/SyncListSearchConfigsCorpusname.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/warehouse/listsearchconfigs/SyncListSearchConfigsString.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/warehouse/listsearchhypernyms/AsyncListSearchHypernyms.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/warehouse/listsearchhypernyms/AsyncListSearchHypernymsPaged.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/warehouse/listsearchhypernyms/SyncListSearchHypernyms.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/warehouse/listsearchhypernyms/SyncListSearchHypernymsCorpusname.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/warehouse/listsearchhypernyms/SyncListSearchHypernymsString.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/warehouse/removecollectionitem/AsyncRemoveCollectionItem.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/warehouse/removecollectionitem/SyncRemoveCollectionItem.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/warehouse/removecollectionitem/SyncRemoveCollectionItemCollectionitem.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/warehouse/removeindexasset/AsyncRemoveIndexAsset.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/warehouse/removeindexasset/AsyncRemoveIndexAssetLRO.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/warehouse/removeindexasset/SyncRemoveIndexAsset.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/warehouse/searchassets/AsyncSearchAssets.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/warehouse/searchassets/AsyncSearchAssetsPaged.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/warehouse/searchassets/SyncSearchAssets.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/warehouse/searchindexendpoint/AsyncSearchIndexEndpoint.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/warehouse/searchindexendpoint/AsyncSearchIndexEndpointPaged.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/warehouse/searchindexendpoint/SyncSearchIndexEndpoint.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/warehouse/undeployindex/AsyncUndeployIndex.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/warehouse/undeployindex/AsyncUndeployIndexLRO.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/warehouse/undeployindex/SyncUndeployIndex.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/warehouse/updateannotation/AsyncUpdateAnnotation.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/warehouse/updateannotation/SyncUpdateAnnotation.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/warehouse/updateannotation/SyncUpdateAnnotationAnnotationFieldmask.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/warehouse/updateasset/AsyncUpdateAsset.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/warehouse/updateasset/SyncUpdateAsset.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/warehouse/updateasset/SyncUpdateAssetAssetFieldmask.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/warehouse/updatecollection/AsyncUpdateCollection.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/warehouse/updatecollection/SyncUpdateCollection.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/warehouse/updatecollection/SyncUpdateCollectionCollectionFieldmask.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/warehouse/updatecorpus/AsyncUpdateCorpus.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/warehouse/updatecorpus/SyncUpdateCorpus.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/warehouse/updatecorpus/SyncUpdateCorpusCorpusFieldmask.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/warehouse/updatedataschema/AsyncUpdateDataSchema.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/warehouse/updatedataschema/SyncUpdateDataSchema.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/warehouse/updatedataschema/SyncUpdateDataSchemaDataschemaFieldmask.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/warehouse/updateindex/AsyncUpdateIndex.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/warehouse/updateindex/AsyncUpdateIndexLRO.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/warehouse/updateindex/SyncUpdateIndex.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/warehouse/updateindex/SyncUpdateIndexIndexFieldmask.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/warehouse/updateindexendpoint/AsyncUpdateIndexEndpoint.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/warehouse/updateindexendpoint/AsyncUpdateIndexEndpointLRO.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/warehouse/updateindexendpoint/SyncUpdateIndexEndpoint.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/warehouse/updateindexendpoint/SyncUpdateIndexEndpointIndexendpointFieldmask.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/warehouse/updatesearchconfig/AsyncUpdateSearchConfig.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/warehouse/updatesearchconfig/SyncUpdateSearchConfig.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/warehouse/updatesearchconfig/SyncUpdateSearchConfigSearchconfigFieldmask.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/warehouse/updatesearchhypernym/AsyncUpdateSearchHypernym.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/warehouse/updatesearchhypernym/SyncUpdateSearchHypernym.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/warehouse/updatesearchhypernym/SyncUpdateSearchHypernymSearchhypernymFieldmask.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/warehouse/uploadasset/AsyncUploadAsset.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/warehouse/uploadasset/AsyncUploadAssetLRO.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/warehouse/uploadasset/SyncUploadAsset.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/warehouse/viewcollectionitems/AsyncViewCollectionItems.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/warehouse/viewcollectionitems/AsyncViewCollectionItemsPaged.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/warehouse/viewcollectionitems/SyncViewCollectionItems.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/warehouse/viewcollectionitems/SyncViewCollectionItemsCollectionname.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/warehouse/viewcollectionitems/SyncViewCollectionItemsString.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/warehouse/viewindexedassets/AsyncViewIndexedAssets.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/warehouse/viewindexedassets/AsyncViewIndexedAssetsPaged.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/warehouse/viewindexedassets/SyncViewIndexedAssets.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/warehouse/viewindexedassets/SyncViewIndexedAssetsIndexname.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/warehouse/viewindexedassets/SyncViewIndexedAssetsString.java create mode 100644 java-visionai/samples/snippets/generated/com/google/cloud/visionai/v1/warehousesettings/createasset/SyncCreateAsset.java diff --git a/gapic-libraries-bom/pom.xml b/gapic-libraries-bom/pom.xml index 2611aa2bf030..b46b8c929c53 100644 --- a/gapic-libraries-bom/pom.xml +++ b/gapic-libraries-bom/pom.xml @@ -1130,6 +1130,13 @@ pom import + + com.google.cloud + google-cloud-visionai-bom + 0.0.1-SNAPSHOT + pom + import + com.google.cloud google-cloud-vmmigration-bom diff --git a/generation_config.yaml b/generation_config.yaml index 3cd88e517c9a..ddec69e977e5 100644 --- a/generation_config.yaml +++ b/generation_config.yaml @@ -1514,8 +1514,8 @@ libraries: - api_shortname: publicca name_pretty: Public Certificate Authority API product_documentation: https://cloud.google.com/certificate-manager/docs/public-ca - api_description: The Public Certificate Authority API may be used to create and manage ACME - external account binding keys associated with Google Trust Services' + api_description: The Public Certificate Authority API may be used to create and + manage ACME external account binding keys associated with Google Trust Services' publicly trusted certificate authority. rpc_documentation: https://cloud.google.com/certificate-manager/docs/reference/public-ca/rpc GAPICs: @@ -2077,6 +2077,23 @@ libraries: - proto_path: google/cloud/vision/v1p3beta1 - proto_path: google/cloud/vision/v1p4beta1 +- api_shortname: visionai + name_pretty: Vision AI API + product_documentation: https://cloud.google.com/vision-ai/docs + api_description: Vertex AI Vision is an AI-powered platform to ingest, analyze and + store video data. + client_documentation: + https://cloud.google.com/java/docs/reference/google-cloud-visionai/latest/overview + release_level: preview + distribution_name: com.google.cloud:google-cloud-visionai + api_id: visionai.googleapis.com + library_type: GAPIC_AUTO + group_id: com.google.cloud + cloud_api: true + GAPICs: + - proto_path: google/cloud/visionai/v1 + requires_billing: true + rpc_documentation: https://cloud.google.com/vision-ai/docs/reference/rpc - api_shortname: vmmigration name_pretty: VM Migration product_documentation: n/a diff --git a/java-visionai/.OwlBot-hermetic.yaml b/java-visionai/.OwlBot-hermetic.yaml new file mode 100644 index 000000000000..f2189a01e6e4 --- /dev/null +++ b/java-visionai/.OwlBot-hermetic.yaml @@ -0,0 +1,35 @@ +# Copyright 2024 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. + + +deep-remove-regex: +- "/java-visionai/grpc-google-.*/src" +- "/java-visionai/proto-google-.*/src" +- "/java-visionai/google-.*/src" +- "/java-visionai/samples/snippets/generated" + +deep-preserve-regex: +- "/java-visionai/google-.*/src/test/java/com/google/cloud/.*/v.*/it/IT.*Test.java" + +deep-copy-regex: +- source: "/google/cloud/visionai/(v.*)/.*-java/proto-google-.*/src" + dest: "/owl-bot-staging/java-visionai/$1/proto-google-cloud-visionai-$1/src" +- source: "/google/cloud/visionai/(v.*)/.*-java/grpc-google-.*/src" + dest: "/owl-bot-staging/java-visionai/$1/grpc-google-cloud-visionai-$1/src" +- source: "/google/cloud/visionai/(v.*)/.*-java/gapic-google-.*/src" + dest: "/owl-bot-staging/java-visionai/$1/google-cloud-visionai/src" +- source: "/google/cloud/visionai/(v.*)/.*-java/samples/snippets/generated" + dest: "/owl-bot-staging/java-visionai/$1/samples/snippets/generated" + +api-name: visionai \ No newline at end of file diff --git a/java-visionai/.repo-metadata.json b/java-visionai/.repo-metadata.json new file mode 100644 index 000000000000..dcfb1d2a013d --- /dev/null +++ b/java-visionai/.repo-metadata.json @@ -0,0 +1,17 @@ +{ + "api_shortname": "visionai", + "name_pretty": "Vision AI API", + "product_documentation": "https://cloud.google.com/vision-ai/docs", + "api_description": "Vertex AI Vision is an AI-powered platform to ingest, analyze and store video data.", + "client_documentation": "https://cloud.google.com/java/docs/reference/google-cloud-visionai/latest/overview", + "release_level": "preview", + "transport": "both", + "language": "java", + "repo": "googleapis/google-cloud-java", + "repo_short": "java-visionai", + "distribution_name": "com.google.cloud:google-cloud-visionai", + "api_id": "visionai.googleapis.com", + "library_type": "GAPIC_AUTO", + "requires_billing": true, + "rpc_documentation": "https://cloud.google.com/vision-ai/docs/reference/rpc" +} \ No newline at end of file diff --git a/java-visionai/README.md b/java-visionai/README.md new file mode 100644 index 000000000000..a7d1c2105cb6 --- /dev/null +++ b/java-visionai/README.md @@ -0,0 +1,225 @@ +# Google Vision AI API Client for Java + +Java idiomatic client for [Vision AI API][product-docs]. + +[![Maven][maven-version-image]][maven-version-link] +![Stability][stability-image] + +- [Product Documentation][product-docs] +- [Client Library Documentation][javadocs] + +> Note: This client is a work-in-progress, and may occasionally +> make backwards-incompatible changes. + + +## Quickstart + + +If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file: + +```xml + + + + com.google.cloud + libraries-bom + 26.39.0 + pom + import + + + + + + + com.google.cloud + google-cloud-visionai + +``` + +If you are using Maven without the BOM, add this to your dependencies: + + + +```xml + + com.google.cloud + google-cloud-visionai + 0.0.0 + +``` + +If you are using Gradle without BOM, add this to your dependencies: + +```Groovy +implementation 'com.google.cloud:google-cloud-visionai:0.0.0' +``` + +If you are using SBT, add this to your dependencies: + +```Scala +libraryDependencies += "com.google.cloud" % "google-cloud-visionai" % "0.0.0" +``` + + +## Authentication + +See the [Authentication][authentication] section in the base directory's README. + +## Authorization + +The client application making API calls must be granted [authorization scopes][auth-scopes] required for the desired Vision AI API APIs, and the authenticated principal must have the [IAM role(s)][predefined-iam-roles] required to access GCP resources using the Vision AI API API calls. + +## Getting Started + +### Prerequisites + +You will need a [Google Cloud Platform Console][developer-console] project with the Vision AI API [API enabled][enable-api]. +You will need to [enable billing][enable-billing] to use Google Vision AI API. +[Follow these instructions][create-project] to get your project set up. You will also need to set up the local development environment by +[installing the Google Cloud Command Line Interface][cloud-cli] and running the following commands in command line: +`gcloud auth login` and `gcloud config set project [YOUR PROJECT ID]`. + +### Installation and setup + +You'll need to obtain the `google-cloud-visionai` library. See the [Quickstart](#quickstart) section +to add `google-cloud-visionai` as a dependency in your code. + +## About Vision AI API + + +[Vision AI API][product-docs] Vertex AI Vision is an AI-powered platform to ingest, analyze and store video data. + +See the [Vision AI API client library docs][javadocs] to learn how to +use this Vision AI API Client Library. + + + + + + +## Troubleshooting + +To get help, follow the instructions in the [shared Troubleshooting document][troubleshooting]. + +## Transport + +Vision AI API uses both gRPC and HTTP/JSON for the transport layer. + +## Supported Java Versions + +Java 8 or above is required for using this client. + +Google's Java client libraries, +[Google Cloud Client Libraries][cloudlibs] +and +[Google Cloud API Libraries][apilibs], +follow the +[Oracle Java SE support roadmap][oracle] +(see the Oracle Java SE Product Releases section). + +### For new development + +In general, new feature development occurs with support for the lowest Java +LTS version covered by Oracle's Premier Support (which typically lasts 5 years +from initial General Availability). If the minimum required JVM for a given +library is changed, it is accompanied by a [semver][semver] major release. + +Java 11 and (in September 2021) Java 17 are the best choices for new +development. + +### Keeping production systems current + +Google tests its client libraries with all current LTS versions covered by +Oracle's Extended Support (which typically lasts 8 years from initial +General Availability). + +#### Legacy support + +Google's client libraries support legacy versions of Java runtimes with long +term stable libraries that don't receive feature updates on a best efforts basis +as it may not be possible to backport all patches. + +Google provides updates on a best efforts basis to apps that continue to use +Java 7, though apps might need to upgrade to current versions of the library +that supports their JVM. + +#### Where to find specific information + +The latest versions and the supported Java versions are identified on +the individual GitHub repository `github.com/GoogleAPIs/java-SERVICENAME` +and on [google-cloud-java][g-c-j]. + +## Versioning + + +This library follows [Semantic Versioning](http://semver.org/). + + +It is currently in major version zero (``0.y.z``), which means that anything may change at any time +and the public API should not be considered stable. + + +## Contributing + + +Contributions to this library are always welcome and highly encouraged. + +See [CONTRIBUTING][contributing] for more information how to get started. + +Please note that this project is released with a Contributor Code of Conduct. By participating in +this project you agree to abide by its terms. See [Code of Conduct][code-of-conduct] for more +information. + + +## License + +Apache 2.0 - See [LICENSE][license] for more information. + +## CI Status + +Java Version | Status +------------ | ------ +Java 8 | [![Kokoro CI][kokoro-badge-image-2]][kokoro-badge-link-2] +Java 8 OSX | [![Kokoro CI][kokoro-badge-image-3]][kokoro-badge-link-3] +Java 8 Windows | [![Kokoro CI][kokoro-badge-image-4]][kokoro-badge-link-4] +Java 11 | [![Kokoro CI][kokoro-badge-image-5]][kokoro-badge-link-5] + +Java is a registered trademark of Oracle and/or its affiliates. + +[product-docs]: https://cloud.google.com/vision-ai/docs +[javadocs]: https://cloud.google.com/java/docs/reference/google-cloud-visionai/latest/overview +[kokoro-badge-image-1]: http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/java7.svg +[kokoro-badge-link-1]: http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/java7.html +[kokoro-badge-image-2]: http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/java8.svg +[kokoro-badge-link-2]: http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/java8.html +[kokoro-badge-image-3]: http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/java8-osx.svg +[kokoro-badge-link-3]: http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/java8-osx.html +[kokoro-badge-image-4]: http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/java8-win.svg +[kokoro-badge-link-4]: http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/java8-win.html +[kokoro-badge-image-5]: http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/java11.svg +[kokoro-badge-link-5]: http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/java11.html +[stability-image]: https://img.shields.io/badge/stability-preview-yellow +[maven-version-image]: https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-visionai.svg +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-visionai/0.0.0 +[authentication]: https://github.com/googleapis/google-cloud-java#authentication +[auth-scopes]: https://developers.google.com/identity/protocols/oauth2/scopes +[predefined-iam-roles]: https://cloud.google.com/iam/docs/understanding-roles#predefined_roles +[iam-policy]: https://cloud.google.com/iam/docs/overview#cloud-iam-policy +[developer-console]: https://console.developers.google.com/ +[create-project]: https://cloud.google.com/resource-manager/docs/creating-managing-projects +[cloud-cli]: https://cloud.google.com/cli +[troubleshooting]: https://github.com/googleapis/google-cloud-java/blob/main/TROUBLESHOOTING.md +[contributing]: https://github.com/googleapis/google-cloud-java/blob/main/CONTRIBUTING.md +[code-of-conduct]: https://github.com/googleapis/google-cloud-java/blob/main/CODE_OF_CONDUCT.md#contributor-code-of-conduct +[license]: https://github.com/googleapis/google-cloud-java/blob/main/LICENSE +[enable-billing]: https://cloud.google.com/apis/docs/getting-started#enabling_billing +[enable-api]: https://console.cloud.google.com/flows/enableapi?apiid=visionai.googleapis.com +[libraries-bom]: https://github.com/GoogleCloudPlatform/cloud-opensource-java/wiki/The-Google-Cloud-Platform-Libraries-BOM +[shell_img]: https://gstatic.com/cloudssh/images/open-btn.png + +[semver]: https://semver.org/ +[cloudlibs]: https://cloud.google.com/apis/docs/client-libraries-explained +[apilibs]: https://cloud.google.com/apis/docs/client-libraries-explained#google_api_client_libraries +[oracle]: https://www.oracle.com/java/technologies/java-se-support-roadmap.html +[g-c-j]: http://github.com/googleapis/google-cloud-java diff --git a/java-visionai/google-cloud-visionai-bom/pom.xml b/java-visionai/google-cloud-visionai-bom/pom.xml new file mode 100644 index 000000000000..3b204ba9b316 --- /dev/null +++ b/java-visionai/google-cloud-visionai-bom/pom.xml @@ -0,0 +1,43 @@ + + + 4.0.0 + com.google.cloud + google-cloud-visionai-bom + 0.0.1-SNAPSHOT + pom + + com.google.cloud + google-cloud-pom-parent + 1.38.0-SNAPSHOT + ../../google-cloud-pom-parent/pom.xml + + + Google Vision AI API BOM + + BOM for Vision AI API + + + + true + + + + + + com.google.cloud + google-cloud-visionai + 0.0.1-SNAPSHOT + + + com.google.api.grpc + grpc-google-cloud-visionai-v1 + 0.0.1-SNAPSHOT + + + com.google.api.grpc + proto-google-cloud-visionai-v1 + 0.0.1-SNAPSHOT + + + + diff --git a/java-visionai/google-cloud-visionai/pom.xml b/java-visionai/google-cloud-visionai/pom.xml new file mode 100644 index 000000000000..28422a3cf94d --- /dev/null +++ b/java-visionai/google-cloud-visionai/pom.xml @@ -0,0 +1,113 @@ + + + 4.0.0 + com.google.cloud + google-cloud-visionai + 0.0.1-SNAPSHOT + jar + Google Vision AI API + Vision AI API Vertex AI Vision is an AI-powered platform to ingest, analyze and store video data. + + com.google.cloud + google-cloud-visionai-parent + 0.0.1-SNAPSHOT + + + google-cloud-visionai + + + + io.grpc + grpc-api + + + io.grpc + grpc-stub + + + io.grpc + grpc-protobuf + + + com.google.api + api-common + + + com.google.protobuf + protobuf-java + + + com.google.api.grpc + proto-google-common-protos + + + + com.google.api.grpc + proto-google-cloud-visionai-v1 + + + com.google.guava + guava + + + com.google.api + gax + + + com.google.api + gax-grpc + + + com.google.api + gax-httpjson + + + com.google.api.grpc + grpc-google-common-protos + + + com.google.api.grpc + proto-google-iam-v1 + + + com.google.api.grpc + grpc-google-iam-v1 + + + org.threeten + threetenbp + + + + + junit + junit + test + + + + com.google.api.grpc + grpc-google-cloud-visionai-v1 + test + + + + com.google.api + gax + testlib + test + + + com.google.api + gax-grpc + testlib + test + + + com.google.api + gax-httpjson + testlib + test + + + diff --git a/java-visionai/google-cloud-visionai/src/main/java/com/google/cloud/visionai/v1/AppPlatformClient.java b/java-visionai/google-cloud-visionai/src/main/java/com/google/cloud/visionai/v1/AppPlatformClient.java new file mode 100644 index 000000000000..696047a907f0 --- /dev/null +++ b/java-visionai/google-cloud-visionai/src/main/java/com/google/cloud/visionai/v1/AppPlatformClient.java @@ -0,0 +1,4910 @@ +/* + * Copyright 2024 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.visionai.v1; + +import com.google.api.core.ApiFuture; +import com.google.api.core.ApiFutures; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.httpjson.longrunning.OperationsClient; +import com.google.api.gax.longrunning.OperationFuture; +import com.google.api.gax.paging.AbstractFixedSizeCollection; +import com.google.api.gax.paging.AbstractPage; +import com.google.api.gax.paging.AbstractPagedListResponse; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PageContext; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.visionai.v1.stub.AppPlatformStub; +import com.google.cloud.visionai.v1.stub.AppPlatformStubSettings; +import com.google.common.util.concurrent.MoreExecutors; +import com.google.longrunning.Operation; +import com.google.protobuf.Empty; +import com.google.protobuf.FieldMask; +import java.io.IOException; +import java.util.List; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Service Description: Service describing handlers for resources + * + *

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: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (AppPlatformClient appPlatformClient = AppPlatformClient.create()) {
+ *   ApplicationName name = ApplicationName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]");
+ *   Application response = appPlatformClient.getApplication(name);
+ * }
+ * }
+ * + *

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

ListApplications

Lists Applications in a given project and location.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • listApplications(ListApplicationsRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • listApplications(LocationName parent) + *

  • listApplications(String parent) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • listApplicationsPagedCallable() + *

  • listApplicationsCallable() + *

+ *

GetApplication

Gets details of a single Application.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • getApplication(GetApplicationRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • getApplication(ApplicationName name) + *

  • getApplication(String name) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • getApplicationCallable() + *

+ *

CreateApplication

Creates a new Application in a given project and location.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • createApplicationAsync(CreateApplicationRequest request) + *

+ *

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

+ *
    + *
  • createApplicationAsync(LocationName parent, Application application) + *

  • createApplicationAsync(String parent, Application application) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • createApplicationOperationCallable() + *

  • createApplicationCallable() + *

+ *

UpdateApplication

Updates the parameters of a single Application.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • updateApplicationAsync(UpdateApplicationRequest request) + *

+ *

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

+ *
    + *
  • updateApplicationAsync(Application application, FieldMask updateMask) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • updateApplicationOperationCallable() + *

  • updateApplicationCallable() + *

+ *

DeleteApplication

Deletes a single Application.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • deleteApplicationAsync(DeleteApplicationRequest request) + *

+ *

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

+ *
    + *
  • deleteApplicationAsync(ApplicationName name) + *

  • deleteApplicationAsync(String name) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • deleteApplicationOperationCallable() + *

  • deleteApplicationCallable() + *

+ *

DeployApplication

Deploys a single Application.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • deployApplicationAsync(DeployApplicationRequest request) + *

+ *

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

+ *
    + *
  • deployApplicationAsync(ApplicationName name) + *

  • deployApplicationAsync(String name) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • deployApplicationOperationCallable() + *

  • deployApplicationCallable() + *

+ *

UndeployApplication

Undeploys a single Application.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • undeployApplicationAsync(UndeployApplicationRequest request) + *

+ *

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

+ *
    + *
  • undeployApplicationAsync(ApplicationName name) + *

  • undeployApplicationAsync(String name) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • undeployApplicationOperationCallable() + *

  • undeployApplicationCallable() + *

+ *

AddApplicationStreamInput

Adds target stream input to the Application. If the Application is deployed, the corresponding new Application instance will be created. If the stream has already been in the Application, the RPC will fail.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • addApplicationStreamInputAsync(AddApplicationStreamInputRequest request) + *

+ *

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

+ *
    + *
  • addApplicationStreamInputAsync(ApplicationName name) + *

  • addApplicationStreamInputAsync(String name) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • addApplicationStreamInputOperationCallable() + *

  • addApplicationStreamInputCallable() + *

+ *

RemoveApplicationStreamInput

Remove target stream input to the Application, if the Application is deployed, the corresponding instance based will be deleted. If the stream is not in the Application, the RPC will fail.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • removeApplicationStreamInputAsync(RemoveApplicationStreamInputRequest request) + *

+ *

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

+ *
    + *
  • removeApplicationStreamInputAsync(ApplicationName name) + *

  • removeApplicationStreamInputAsync(String name) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • removeApplicationStreamInputOperationCallable() + *

  • removeApplicationStreamInputCallable() + *

+ *

UpdateApplicationStreamInput

Update target stream input to the Application, if the Application is deployed, the corresponding instance based will be deployed. For CreateOrUpdate behavior, set allow_missing to true.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • updateApplicationStreamInputAsync(UpdateApplicationStreamInputRequest request) + *

+ *

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

+ *
    + *
  • updateApplicationStreamInputAsync(ApplicationName name) + *

  • updateApplicationStreamInputAsync(String name) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • updateApplicationStreamInputOperationCallable() + *

  • updateApplicationStreamInputCallable() + *

+ *

ListInstances

Lists Instances in a given project and location.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • listInstances(ListInstancesRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • listInstances(ApplicationName parent) + *

  • listInstances(String parent) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • listInstancesPagedCallable() + *

  • listInstancesCallable() + *

+ *

GetInstance

Gets details of a single Instance.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • getInstance(GetInstanceRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • getInstance(InstanceName name) + *

  • getInstance(String name) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • getInstanceCallable() + *

+ *

CreateApplicationInstances

Adds target stream input to the Application. If the Application is deployed, the corresponding new Application instance will be created. If the stream has already been in the Application, the RPC will fail.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • createApplicationInstancesAsync(CreateApplicationInstancesRequest request) + *

+ *

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

+ *
    + *
  • createApplicationInstancesAsync(ApplicationName name) + *

  • createApplicationInstancesAsync(String name) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • createApplicationInstancesOperationCallable() + *

  • createApplicationInstancesCallable() + *

+ *

DeleteApplicationInstances

Remove target stream input to the Application, if the Application is deployed, the corresponding instance based will be deleted. If the stream is not in the Application, the RPC will fail.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • deleteApplicationInstancesAsync(DeleteApplicationInstancesRequest request) + *

+ *

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

+ *
    + *
  • deleteApplicationInstancesAsync(ApplicationName name) + *

  • deleteApplicationInstancesAsync(String name) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • deleteApplicationInstancesOperationCallable() + *

  • deleteApplicationInstancesCallable() + *

+ *

UpdateApplicationInstances

Adds target stream input to the Application. If the Application is deployed, the corresponding new Application instance will be created. If the stream has already been in the Application, the RPC will fail.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • updateApplicationInstancesAsync(UpdateApplicationInstancesRequest request) + *

+ *

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

+ *
    + *
  • updateApplicationInstancesAsync(ApplicationName name, List<UpdateApplicationInstancesRequest.UpdateApplicationInstance> applicationInstances) + *

  • updateApplicationInstancesAsync(String name, List<UpdateApplicationInstancesRequest.UpdateApplicationInstance> applicationInstances) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • updateApplicationInstancesOperationCallable() + *

  • updateApplicationInstancesCallable() + *

+ *

ListDrafts

Lists Drafts in a given project and location.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • listDrafts(ListDraftsRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • listDrafts(ApplicationName parent) + *

  • listDrafts(String parent) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • listDraftsPagedCallable() + *

  • listDraftsCallable() + *

+ *

GetDraft

Gets details of a single Draft.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • getDraft(GetDraftRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • getDraft(DraftName name) + *

  • getDraft(String name) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • getDraftCallable() + *

+ *

CreateDraft

Creates a new Draft in a given project and location.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • createDraftAsync(CreateDraftRequest request) + *

+ *

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

+ *
    + *
  • createDraftAsync(ApplicationName parent, Draft draft, String draftId) + *

  • createDraftAsync(String parent, Draft draft, String draftId) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • createDraftOperationCallable() + *

  • createDraftCallable() + *

+ *

UpdateDraft

Updates the parameters of a single Draft.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • updateDraftAsync(UpdateDraftRequest request) + *

+ *

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

+ *
    + *
  • updateDraftAsync(Draft draft, FieldMask updateMask) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • updateDraftOperationCallable() + *

  • updateDraftCallable() + *

+ *

DeleteDraft

Deletes a single Draft.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • deleteDraftAsync(DeleteDraftRequest request) + *

+ *

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

+ *
    + *
  • deleteDraftAsync(DraftName name) + *

  • deleteDraftAsync(String name) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • deleteDraftOperationCallable() + *

  • deleteDraftCallable() + *

+ *

ListProcessors

Lists Processors in a given project and location.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • listProcessors(ListProcessorsRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • listProcessors(LocationName parent) + *

  • listProcessors(String parent) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • listProcessorsPagedCallable() + *

  • listProcessorsCallable() + *

+ *

ListPrebuiltProcessors

ListPrebuiltProcessors is a custom pass-through verb that Lists Prebuilt Processors.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • listPrebuiltProcessors(ListPrebuiltProcessorsRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • listPrebuiltProcessors(LocationName parent) + *

  • listPrebuiltProcessors(String parent) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • listPrebuiltProcessorsCallable() + *

+ *

GetProcessor

Gets details of a single Processor.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • getProcessor(GetProcessorRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • getProcessor(ProcessorName name) + *

  • getProcessor(String name) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • getProcessorCallable() + *

+ *

CreateProcessor

Creates a new Processor in a given project and location.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • createProcessorAsync(CreateProcessorRequest request) + *

+ *

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

+ *
    + *
  • createProcessorAsync(LocationName parent, Processor processor, String processorId) + *

  • createProcessorAsync(String parent, Processor processor, String processorId) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • createProcessorOperationCallable() + *

  • createProcessorCallable() + *

+ *

UpdateProcessor

Updates the parameters of a single Processor.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • updateProcessorAsync(UpdateProcessorRequest request) + *

+ *

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

+ *
    + *
  • updateProcessorAsync(Processor processor, FieldMask updateMask) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • updateProcessorOperationCallable() + *

  • updateProcessorCallable() + *

+ *

DeleteProcessor

Deletes a single Processor.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • deleteProcessorAsync(DeleteProcessorRequest request) + *

+ *

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

+ *
    + *
  • deleteProcessorAsync(ProcessorName name) + *

  • deleteProcessorAsync(String name) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • deleteProcessorOperationCallable() + *

  • deleteProcessorCallable() + *

+ *
+ * + *

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 AppPlatformSettings to + * create(). For example: + * + *

To customize credentials: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * AppPlatformSettings appPlatformSettings =
+ *     AppPlatformSettings.newBuilder()
+ *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ *         .build();
+ * AppPlatformClient appPlatformClient = AppPlatformClient.create(appPlatformSettings);
+ * }
+ * + *

To customize the endpoint: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * AppPlatformSettings appPlatformSettings =
+ *     AppPlatformSettings.newBuilder().setEndpoint(myEndpoint).build();
+ * AppPlatformClient appPlatformClient = AppPlatformClient.create(appPlatformSettings);
+ * }
+ * + *

To use REST (HTTP1.1/JSON) transport (instead of gRPC) for sending and receiving requests over + * the wire: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * AppPlatformSettings appPlatformSettings = AppPlatformSettings.newHttpJsonBuilder().build();
+ * AppPlatformClient appPlatformClient = AppPlatformClient.create(appPlatformSettings);
+ * }
+ * + *

Please refer to the GitHub repository's samples for more quickstart code snippets. + */ +@Generated("by gapic-generator-java") +public class AppPlatformClient implements BackgroundResource { + private final AppPlatformSettings settings; + private final AppPlatformStub stub; + private final OperationsClient httpJsonOperationsClient; + private final com.google.longrunning.OperationsClient operationsClient; + + /** Constructs an instance of AppPlatformClient with default settings. */ + public static final AppPlatformClient create() throws IOException { + return create(AppPlatformSettings.newBuilder().build()); + } + + /** + * Constructs an instance of AppPlatformClient, 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 AppPlatformClient create(AppPlatformSettings settings) throws IOException { + return new AppPlatformClient(settings); + } + + /** + * Constructs an instance of AppPlatformClient, using the given stub for making calls. This is for + * advanced usage - prefer using create(AppPlatformSettings). + */ + public static final AppPlatformClient create(AppPlatformStub stub) { + return new AppPlatformClient(stub); + } + + /** + * Constructs an instance of AppPlatformClient, 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 AppPlatformClient(AppPlatformSettings settings) throws IOException { + this.settings = settings; + this.stub = ((AppPlatformStubSettings) settings.getStubSettings()).createStub(); + this.operationsClient = + com.google.longrunning.OperationsClient.create(this.stub.getOperationsStub()); + this.httpJsonOperationsClient = OperationsClient.create(this.stub.getHttpJsonOperationsStub()); + } + + protected AppPlatformClient(AppPlatformStub stub) { + this.settings = null; + this.stub = stub; + this.operationsClient = + com.google.longrunning.OperationsClient.create(this.stub.getOperationsStub()); + this.httpJsonOperationsClient = OperationsClient.create(this.stub.getHttpJsonOperationsStub()); + } + + public final AppPlatformSettings getSettings() { + return settings; + } + + public AppPlatformStub 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. + */ + public final com.google.longrunning.OperationsClient getOperationsClient() { + return operationsClient; + } + + /** + * Returns the OperationsClient that can be used to query the status of a long-running operation + * returned by another API method call. + */ + @BetaApi + public final OperationsClient getHttpJsonOperationsClient() { + return httpJsonOperationsClient; + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Applications in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AppPlatformClient appPlatformClient = AppPlatformClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   for (Application element : appPlatformClient.listApplications(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. Parent value for ListApplicationsRequest. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListApplicationsPagedResponse listApplications(LocationName parent) { + ListApplicationsRequest request = + ListApplicationsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listApplications(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Applications in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AppPlatformClient appPlatformClient = AppPlatformClient.create()) {
+   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+   *   for (Application element : appPlatformClient.listApplications(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. Parent value for ListApplicationsRequest. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListApplicationsPagedResponse listApplications(String parent) { + ListApplicationsRequest request = + ListApplicationsRequest.newBuilder().setParent(parent).build(); + return listApplications(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Applications in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AppPlatformClient appPlatformClient = AppPlatformClient.create()) {
+   *   ListApplicationsRequest request =
+   *       ListApplicationsRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   for (Application element : appPlatformClient.listApplications(request).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @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 + */ + public final ListApplicationsPagedResponse listApplications(ListApplicationsRequest request) { + return listApplicationsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Applications in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AppPlatformClient appPlatformClient = AppPlatformClient.create()) {
+   *   ListApplicationsRequest request =
+   *       ListApplicationsRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   ApiFuture future =
+   *       appPlatformClient.listApplicationsPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (Application element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listApplicationsPagedCallable() { + return stub.listApplicationsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Applications in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AppPlatformClient appPlatformClient = AppPlatformClient.create()) {
+   *   ListApplicationsRequest request =
+   *       ListApplicationsRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   while (true) {
+   *     ListApplicationsResponse response =
+   *         appPlatformClient.listApplicationsCallable().call(request);
+   *     for (Application element : response.getApplicationsList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listApplicationsCallable() { + return stub.listApplicationsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single Application. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AppPlatformClient appPlatformClient = AppPlatformClient.create()) {
+   *   ApplicationName name = ApplicationName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]");
+   *   Application response = appPlatformClient.getApplication(name);
+   * }
+   * }
+ * + * @param name Required. Name of the resource. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Application getApplication(ApplicationName name) { + GetApplicationRequest request = + GetApplicationRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return getApplication(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single Application. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AppPlatformClient appPlatformClient = AppPlatformClient.create()) {
+   *   String name = ApplicationName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]").toString();
+   *   Application response = appPlatformClient.getApplication(name);
+   * }
+   * }
+ * + * @param name Required. Name of the resource. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Application getApplication(String name) { + GetApplicationRequest request = GetApplicationRequest.newBuilder().setName(name).build(); + return getApplication(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single Application. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AppPlatformClient appPlatformClient = AppPlatformClient.create()) {
+   *   GetApplicationRequest request =
+   *       GetApplicationRequest.newBuilder()
+   *           .setName(ApplicationName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]").toString())
+   *           .build();
+   *   Application response = appPlatformClient.getApplication(request);
+   * }
+   * }
+ * + * @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 + */ + public final Application getApplication(GetApplicationRequest request) { + return getApplicationCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single Application. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AppPlatformClient appPlatformClient = AppPlatformClient.create()) {
+   *   GetApplicationRequest request =
+   *       GetApplicationRequest.newBuilder()
+   *           .setName(ApplicationName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]").toString())
+   *           .build();
+   *   ApiFuture future =
+   *       appPlatformClient.getApplicationCallable().futureCall(request);
+   *   // Do something.
+   *   Application response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getApplicationCallable() { + return stub.getApplicationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new Application in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AppPlatformClient appPlatformClient = AppPlatformClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   Application application = Application.newBuilder().build();
+   *   Application response = appPlatformClient.createApplicationAsync(parent, application).get();
+   * }
+   * }
+ * + * @param parent Required. Value for parent. + * @param application Required. The resource being created. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture createApplicationAsync( + LocationName parent, Application application) { + CreateApplicationRequest request = + CreateApplicationRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setApplication(application) + .build(); + return createApplicationAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new Application in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AppPlatformClient appPlatformClient = AppPlatformClient.create()) {
+   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+   *   Application application = Application.newBuilder().build();
+   *   Application response = appPlatformClient.createApplicationAsync(parent, application).get();
+   * }
+   * }
+ * + * @param parent Required. Value for parent. + * @param application Required. The resource being created. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture createApplicationAsync( + String parent, Application application) { + CreateApplicationRequest request = + CreateApplicationRequest.newBuilder().setParent(parent).setApplication(application).build(); + return createApplicationAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new Application in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AppPlatformClient appPlatformClient = AppPlatformClient.create()) {
+   *   CreateApplicationRequest request =
+   *       CreateApplicationRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setApplicationId("applicationId-1011352949")
+   *           .setApplication(Application.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   Application response = appPlatformClient.createApplicationAsync(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 + */ + public final OperationFuture createApplicationAsync( + CreateApplicationRequest request) { + return createApplicationOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new Application in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AppPlatformClient appPlatformClient = AppPlatformClient.create()) {
+   *   CreateApplicationRequest request =
+   *       CreateApplicationRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setApplicationId("applicationId-1011352949")
+   *           .setApplication(Application.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   OperationFuture future =
+   *       appPlatformClient.createApplicationOperationCallable().futureCall(request);
+   *   // Do something.
+   *   Application response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + createApplicationOperationCallable() { + return stub.createApplicationOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new Application in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AppPlatformClient appPlatformClient = AppPlatformClient.create()) {
+   *   CreateApplicationRequest request =
+   *       CreateApplicationRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setApplicationId("applicationId-1011352949")
+   *           .setApplication(Application.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   ApiFuture future =
+   *       appPlatformClient.createApplicationCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable createApplicationCallable() { + return stub.createApplicationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the parameters of a single Application. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AppPlatformClient appPlatformClient = AppPlatformClient.create()) {
+   *   Application application = Application.newBuilder().build();
+   *   FieldMask updateMask = FieldMask.newBuilder().build();
+   *   Application response =
+   *       appPlatformClient.updateApplicationAsync(application, updateMask).get();
+   * }
+   * }
+ * + * @param application Required. The resource being updated. + * @param updateMask Optional. Field mask is used to specify the fields to be overwritten in the + * Application resource by the update. The fields specified in the update_mask are relative to + * the resource, not the full request. A field will be overwritten if it is in the mask. If + * the user does not provide a mask then all fields will be overwritten. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture updateApplicationAsync( + Application application, FieldMask updateMask) { + UpdateApplicationRequest request = + UpdateApplicationRequest.newBuilder() + .setApplication(application) + .setUpdateMask(updateMask) + .build(); + return updateApplicationAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the parameters of a single Application. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AppPlatformClient appPlatformClient = AppPlatformClient.create()) {
+   *   UpdateApplicationRequest request =
+   *       UpdateApplicationRequest.newBuilder()
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .setApplication(Application.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   Application response = appPlatformClient.updateApplicationAsync(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 + */ + public final OperationFuture updateApplicationAsync( + UpdateApplicationRequest request) { + return updateApplicationOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the parameters of a single Application. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AppPlatformClient appPlatformClient = AppPlatformClient.create()) {
+   *   UpdateApplicationRequest request =
+   *       UpdateApplicationRequest.newBuilder()
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .setApplication(Application.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   OperationFuture future =
+   *       appPlatformClient.updateApplicationOperationCallable().futureCall(request);
+   *   // Do something.
+   *   Application response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + updateApplicationOperationCallable() { + return stub.updateApplicationOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the parameters of a single Application. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AppPlatformClient appPlatformClient = AppPlatformClient.create()) {
+   *   UpdateApplicationRequest request =
+   *       UpdateApplicationRequest.newBuilder()
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .setApplication(Application.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   ApiFuture future =
+   *       appPlatformClient.updateApplicationCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable updateApplicationCallable() { + return stub.updateApplicationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single Application. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AppPlatformClient appPlatformClient = AppPlatformClient.create()) {
+   *   ApplicationName name = ApplicationName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]");
+   *   appPlatformClient.deleteApplicationAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. Name of the resource. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteApplicationAsync( + ApplicationName name) { + DeleteApplicationRequest request = + DeleteApplicationRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + return deleteApplicationAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single Application. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AppPlatformClient appPlatformClient = AppPlatformClient.create()) {
+   *   String name = ApplicationName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]").toString();
+   *   appPlatformClient.deleteApplicationAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. Name of the resource. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteApplicationAsync(String name) { + DeleteApplicationRequest request = DeleteApplicationRequest.newBuilder().setName(name).build(); + return deleteApplicationAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single Application. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AppPlatformClient appPlatformClient = AppPlatformClient.create()) {
+   *   DeleteApplicationRequest request =
+   *       DeleteApplicationRequest.newBuilder()
+   *           .setName(ApplicationName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]").toString())
+   *           .setRequestId("requestId693933066")
+   *           .setForce(true)
+   *           .build();
+   *   appPlatformClient.deleteApplicationAsync(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 + */ + public final OperationFuture deleteApplicationAsync( + DeleteApplicationRequest request) { + return deleteApplicationOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single Application. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AppPlatformClient appPlatformClient = AppPlatformClient.create()) {
+   *   DeleteApplicationRequest request =
+   *       DeleteApplicationRequest.newBuilder()
+   *           .setName(ApplicationName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]").toString())
+   *           .setRequestId("requestId693933066")
+   *           .setForce(true)
+   *           .build();
+   *   OperationFuture future =
+   *       appPlatformClient.deleteApplicationOperationCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final OperationCallable + deleteApplicationOperationCallable() { + return stub.deleteApplicationOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single Application. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AppPlatformClient appPlatformClient = AppPlatformClient.create()) {
+   *   DeleteApplicationRequest request =
+   *       DeleteApplicationRequest.newBuilder()
+   *           .setName(ApplicationName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]").toString())
+   *           .setRequestId("requestId693933066")
+   *           .setForce(true)
+   *           .build();
+   *   ApiFuture future =
+   *       appPlatformClient.deleteApplicationCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final UnaryCallable deleteApplicationCallable() { + return stub.deleteApplicationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deploys a single Application. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AppPlatformClient appPlatformClient = AppPlatformClient.create()) {
+   *   ApplicationName name = ApplicationName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]");
+   *   DeployApplicationResponse response = appPlatformClient.deployApplicationAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. the name of the application to retrieve. Format: + * "projects/{project}/locations/{location}/applications/{application}" + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deployApplicationAsync( + ApplicationName name) { + DeployApplicationRequest request = + DeployApplicationRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + return deployApplicationAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deploys a single Application. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AppPlatformClient appPlatformClient = AppPlatformClient.create()) {
+   *   String name = ApplicationName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]").toString();
+   *   DeployApplicationResponse response = appPlatformClient.deployApplicationAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. the name of the application to retrieve. Format: + * "projects/{project}/locations/{location}/applications/{application}" + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deployApplicationAsync( + String name) { + DeployApplicationRequest request = DeployApplicationRequest.newBuilder().setName(name).build(); + return deployApplicationAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deploys a single Application. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AppPlatformClient appPlatformClient = AppPlatformClient.create()) {
+   *   DeployApplicationRequest request =
+   *       DeployApplicationRequest.newBuilder()
+   *           .setName(ApplicationName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]").toString())
+   *           .setValidateOnly(true)
+   *           .setRequestId("requestId693933066")
+   *           .setEnableMonitoring(true)
+   *           .build();
+   *   DeployApplicationResponse response = appPlatformClient.deployApplicationAsync(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 + */ + public final OperationFuture deployApplicationAsync( + DeployApplicationRequest request) { + return deployApplicationOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deploys a single Application. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AppPlatformClient appPlatformClient = AppPlatformClient.create()) {
+   *   DeployApplicationRequest request =
+   *       DeployApplicationRequest.newBuilder()
+   *           .setName(ApplicationName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]").toString())
+   *           .setValidateOnly(true)
+   *           .setRequestId("requestId693933066")
+   *           .setEnableMonitoring(true)
+   *           .build();
+   *   OperationFuture future =
+   *       appPlatformClient.deployApplicationOperationCallable().futureCall(request);
+   *   // Do something.
+   *   DeployApplicationResponse response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable< + DeployApplicationRequest, DeployApplicationResponse, OperationMetadata> + deployApplicationOperationCallable() { + return stub.deployApplicationOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deploys a single Application. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AppPlatformClient appPlatformClient = AppPlatformClient.create()) {
+   *   DeployApplicationRequest request =
+   *       DeployApplicationRequest.newBuilder()
+   *           .setName(ApplicationName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]").toString())
+   *           .setValidateOnly(true)
+   *           .setRequestId("requestId693933066")
+   *           .setEnableMonitoring(true)
+   *           .build();
+   *   ApiFuture future =
+   *       appPlatformClient.deployApplicationCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable deployApplicationCallable() { + return stub.deployApplicationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Undeploys a single Application. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AppPlatformClient appPlatformClient = AppPlatformClient.create()) {
+   *   ApplicationName name = ApplicationName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]");
+   *   UndeployApplicationResponse response = appPlatformClient.undeployApplicationAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. the name of the application to retrieve. Format: + * "projects/{project}/locations/{location}/applications/{application}" + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture + undeployApplicationAsync(ApplicationName name) { + UndeployApplicationRequest request = + UndeployApplicationRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + return undeployApplicationAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Undeploys a single Application. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AppPlatformClient appPlatformClient = AppPlatformClient.create()) {
+   *   String name = ApplicationName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]").toString();
+   *   UndeployApplicationResponse response = appPlatformClient.undeployApplicationAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. the name of the application to retrieve. Format: + * "projects/{project}/locations/{location}/applications/{application}" + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture + undeployApplicationAsync(String name) { + UndeployApplicationRequest request = + UndeployApplicationRequest.newBuilder().setName(name).build(); + return undeployApplicationAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Undeploys a single Application. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AppPlatformClient appPlatformClient = AppPlatformClient.create()) {
+   *   UndeployApplicationRequest request =
+   *       UndeployApplicationRequest.newBuilder()
+   *           .setName(ApplicationName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]").toString())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   UndeployApplicationResponse response =
+   *       appPlatformClient.undeployApplicationAsync(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 + */ + public final OperationFuture + undeployApplicationAsync(UndeployApplicationRequest request) { + return undeployApplicationOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Undeploys a single Application. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AppPlatformClient appPlatformClient = AppPlatformClient.create()) {
+   *   UndeployApplicationRequest request =
+   *       UndeployApplicationRequest.newBuilder()
+   *           .setName(ApplicationName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]").toString())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   OperationFuture future =
+   *       appPlatformClient.undeployApplicationOperationCallable().futureCall(request);
+   *   // Do something.
+   *   UndeployApplicationResponse response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable< + UndeployApplicationRequest, UndeployApplicationResponse, OperationMetadata> + undeployApplicationOperationCallable() { + return stub.undeployApplicationOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Undeploys a single Application. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AppPlatformClient appPlatformClient = AppPlatformClient.create()) {
+   *   UndeployApplicationRequest request =
+   *       UndeployApplicationRequest.newBuilder()
+   *           .setName(ApplicationName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]").toString())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   ApiFuture future =
+   *       appPlatformClient.undeployApplicationCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable undeployApplicationCallable() { + return stub.undeployApplicationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Adds target stream input to the Application. If the Application is deployed, the corresponding + * new Application instance will be created. If the stream has already been in the Application, + * the RPC will fail. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AppPlatformClient appPlatformClient = AppPlatformClient.create()) {
+   *   ApplicationName name = ApplicationName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]");
+   *   AddApplicationStreamInputResponse response =
+   *       appPlatformClient.addApplicationStreamInputAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. the name of the application to retrieve. Format: + * "projects/{project}/locations/{location}/applications/{application}" + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture + addApplicationStreamInputAsync(ApplicationName name) { + AddApplicationStreamInputRequest request = + AddApplicationStreamInputRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + return addApplicationStreamInputAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Adds target stream input to the Application. If the Application is deployed, the corresponding + * new Application instance will be created. If the stream has already been in the Application, + * the RPC will fail. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AppPlatformClient appPlatformClient = AppPlatformClient.create()) {
+   *   String name = ApplicationName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]").toString();
+   *   AddApplicationStreamInputResponse response =
+   *       appPlatformClient.addApplicationStreamInputAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. the name of the application to retrieve. Format: + * "projects/{project}/locations/{location}/applications/{application}" + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture + addApplicationStreamInputAsync(String name) { + AddApplicationStreamInputRequest request = + AddApplicationStreamInputRequest.newBuilder().setName(name).build(); + return addApplicationStreamInputAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Adds target stream input to the Application. If the Application is deployed, the corresponding + * new Application instance will be created. If the stream has already been in the Application, + * the RPC will fail. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AppPlatformClient appPlatformClient = AppPlatformClient.create()) {
+   *   AddApplicationStreamInputRequest request =
+   *       AddApplicationStreamInputRequest.newBuilder()
+   *           .setName(ApplicationName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]").toString())
+   *           .addAllApplicationStreamInputs(new ArrayList())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   AddApplicationStreamInputResponse response =
+   *       appPlatformClient.addApplicationStreamInputAsync(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 + */ + public final OperationFuture + addApplicationStreamInputAsync(AddApplicationStreamInputRequest request) { + return addApplicationStreamInputOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Adds target stream input to the Application. If the Application is deployed, the corresponding + * new Application instance will be created. If the stream has already been in the Application, + * the RPC will fail. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AppPlatformClient appPlatformClient = AppPlatformClient.create()) {
+   *   AddApplicationStreamInputRequest request =
+   *       AddApplicationStreamInputRequest.newBuilder()
+   *           .setName(ApplicationName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]").toString())
+   *           .addAllApplicationStreamInputs(new ArrayList())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   OperationFuture future =
+   *       appPlatformClient.addApplicationStreamInputOperationCallable().futureCall(request);
+   *   // Do something.
+   *   AddApplicationStreamInputResponse response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable< + AddApplicationStreamInputRequest, AddApplicationStreamInputResponse, OperationMetadata> + addApplicationStreamInputOperationCallable() { + return stub.addApplicationStreamInputOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Adds target stream input to the Application. If the Application is deployed, the corresponding + * new Application instance will be created. If the stream has already been in the Application, + * the RPC will fail. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AppPlatformClient appPlatformClient = AppPlatformClient.create()) {
+   *   AddApplicationStreamInputRequest request =
+   *       AddApplicationStreamInputRequest.newBuilder()
+   *           .setName(ApplicationName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]").toString())
+   *           .addAllApplicationStreamInputs(new ArrayList())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   ApiFuture future =
+   *       appPlatformClient.addApplicationStreamInputCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + addApplicationStreamInputCallable() { + return stub.addApplicationStreamInputCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Remove target stream input to the Application, if the Application is deployed, the + * corresponding instance based will be deleted. If the stream is not in the Application, the RPC + * will fail. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AppPlatformClient appPlatformClient = AppPlatformClient.create()) {
+   *   ApplicationName name = ApplicationName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]");
+   *   RemoveApplicationStreamInputResponse response =
+   *       appPlatformClient.removeApplicationStreamInputAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. the name of the application to retrieve. Format: + * "projects/{project}/locations/{location}/applications/{application}" + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture + removeApplicationStreamInputAsync(ApplicationName name) { + RemoveApplicationStreamInputRequest request = + RemoveApplicationStreamInputRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + return removeApplicationStreamInputAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Remove target stream input to the Application, if the Application is deployed, the + * corresponding instance based will be deleted. If the stream is not in the Application, the RPC + * will fail. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AppPlatformClient appPlatformClient = AppPlatformClient.create()) {
+   *   String name = ApplicationName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]").toString();
+   *   RemoveApplicationStreamInputResponse response =
+   *       appPlatformClient.removeApplicationStreamInputAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. the name of the application to retrieve. Format: + * "projects/{project}/locations/{location}/applications/{application}" + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture + removeApplicationStreamInputAsync(String name) { + RemoveApplicationStreamInputRequest request = + RemoveApplicationStreamInputRequest.newBuilder().setName(name).build(); + return removeApplicationStreamInputAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Remove target stream input to the Application, if the Application is deployed, the + * corresponding instance based will be deleted. If the stream is not in the Application, the RPC + * will fail. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AppPlatformClient appPlatformClient = AppPlatformClient.create()) {
+   *   RemoveApplicationStreamInputRequest request =
+   *       RemoveApplicationStreamInputRequest.newBuilder()
+   *           .setName(ApplicationName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]").toString())
+   *           .addAllTargetStreamInputs(
+   *               new ArrayList())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   RemoveApplicationStreamInputResponse response =
+   *       appPlatformClient.removeApplicationStreamInputAsync(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 + */ + public final OperationFuture + removeApplicationStreamInputAsync(RemoveApplicationStreamInputRequest request) { + return removeApplicationStreamInputOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Remove target stream input to the Application, if the Application is deployed, the + * corresponding instance based will be deleted. If the stream is not in the Application, the RPC + * will fail. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AppPlatformClient appPlatformClient = AppPlatformClient.create()) {
+   *   RemoveApplicationStreamInputRequest request =
+   *       RemoveApplicationStreamInputRequest.newBuilder()
+   *           .setName(ApplicationName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]").toString())
+   *           .addAllTargetStreamInputs(
+   *               new ArrayList())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   OperationFuture future =
+   *       appPlatformClient.removeApplicationStreamInputOperationCallable().futureCall(request);
+   *   // Do something.
+   *   RemoveApplicationStreamInputResponse response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable< + RemoveApplicationStreamInputRequest, + RemoveApplicationStreamInputResponse, + OperationMetadata> + removeApplicationStreamInputOperationCallable() { + return stub.removeApplicationStreamInputOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Remove target stream input to the Application, if the Application is deployed, the + * corresponding instance based will be deleted. If the stream is not in the Application, the RPC + * will fail. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AppPlatformClient appPlatformClient = AppPlatformClient.create()) {
+   *   RemoveApplicationStreamInputRequest request =
+   *       RemoveApplicationStreamInputRequest.newBuilder()
+   *           .setName(ApplicationName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]").toString())
+   *           .addAllTargetStreamInputs(
+   *               new ArrayList())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   ApiFuture future =
+   *       appPlatformClient.removeApplicationStreamInputCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + removeApplicationStreamInputCallable() { + return stub.removeApplicationStreamInputCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Update target stream input to the Application, if the Application is deployed, the + * corresponding instance based will be deployed. For CreateOrUpdate behavior, set allow_missing + * to true. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AppPlatformClient appPlatformClient = AppPlatformClient.create()) {
+   *   ApplicationName name = ApplicationName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]");
+   *   UpdateApplicationStreamInputResponse response =
+   *       appPlatformClient.updateApplicationStreamInputAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. the name of the application to retrieve. Format: + * "projects/{project}/locations/{location}/applications/{application}" + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture + updateApplicationStreamInputAsync(ApplicationName name) { + UpdateApplicationStreamInputRequest request = + UpdateApplicationStreamInputRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + return updateApplicationStreamInputAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Update target stream input to the Application, if the Application is deployed, the + * corresponding instance based will be deployed. For CreateOrUpdate behavior, set allow_missing + * to true. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AppPlatformClient appPlatformClient = AppPlatformClient.create()) {
+   *   String name = ApplicationName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]").toString();
+   *   UpdateApplicationStreamInputResponse response =
+   *       appPlatformClient.updateApplicationStreamInputAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. the name of the application to retrieve. Format: + * "projects/{project}/locations/{location}/applications/{application}" + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture + updateApplicationStreamInputAsync(String name) { + UpdateApplicationStreamInputRequest request = + UpdateApplicationStreamInputRequest.newBuilder().setName(name).build(); + return updateApplicationStreamInputAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Update target stream input to the Application, if the Application is deployed, the + * corresponding instance based will be deployed. For CreateOrUpdate behavior, set allow_missing + * to true. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AppPlatformClient appPlatformClient = AppPlatformClient.create()) {
+   *   UpdateApplicationStreamInputRequest request =
+   *       UpdateApplicationStreamInputRequest.newBuilder()
+   *           .setName(ApplicationName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]").toString())
+   *           .addAllApplicationStreamInputs(new ArrayList())
+   *           .setRequestId("requestId693933066")
+   *           .setAllowMissing(true)
+   *           .build();
+   *   UpdateApplicationStreamInputResponse response =
+   *       appPlatformClient.updateApplicationStreamInputAsync(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 + */ + public final OperationFuture + updateApplicationStreamInputAsync(UpdateApplicationStreamInputRequest request) { + return updateApplicationStreamInputOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Update target stream input to the Application, if the Application is deployed, the + * corresponding instance based will be deployed. For CreateOrUpdate behavior, set allow_missing + * to true. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AppPlatformClient appPlatformClient = AppPlatformClient.create()) {
+   *   UpdateApplicationStreamInputRequest request =
+   *       UpdateApplicationStreamInputRequest.newBuilder()
+   *           .setName(ApplicationName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]").toString())
+   *           .addAllApplicationStreamInputs(new ArrayList())
+   *           .setRequestId("requestId693933066")
+   *           .setAllowMissing(true)
+   *           .build();
+   *   OperationFuture future =
+   *       appPlatformClient.updateApplicationStreamInputOperationCallable().futureCall(request);
+   *   // Do something.
+   *   UpdateApplicationStreamInputResponse response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable< + UpdateApplicationStreamInputRequest, + UpdateApplicationStreamInputResponse, + OperationMetadata> + updateApplicationStreamInputOperationCallable() { + return stub.updateApplicationStreamInputOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Update target stream input to the Application, if the Application is deployed, the + * corresponding instance based will be deployed. For CreateOrUpdate behavior, set allow_missing + * to true. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AppPlatformClient appPlatformClient = AppPlatformClient.create()) {
+   *   UpdateApplicationStreamInputRequest request =
+   *       UpdateApplicationStreamInputRequest.newBuilder()
+   *           .setName(ApplicationName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]").toString())
+   *           .addAllApplicationStreamInputs(new ArrayList())
+   *           .setRequestId("requestId693933066")
+   *           .setAllowMissing(true)
+   *           .build();
+   *   ApiFuture future =
+   *       appPlatformClient.updateApplicationStreamInputCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + updateApplicationStreamInputCallable() { + return stub.updateApplicationStreamInputCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Instances in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AppPlatformClient appPlatformClient = AppPlatformClient.create()) {
+   *   ApplicationName parent = ApplicationName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]");
+   *   for (Instance element : appPlatformClient.listInstances(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. Parent value for ListInstancesRequest. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListInstancesPagedResponse listInstances(ApplicationName parent) { + ListInstancesRequest request = + ListInstancesRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listInstances(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Instances in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AppPlatformClient appPlatformClient = AppPlatformClient.create()) {
+   *   String parent = ApplicationName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]").toString();
+   *   for (Instance element : appPlatformClient.listInstances(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. Parent value for ListInstancesRequest. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListInstancesPagedResponse listInstances(String parent) { + ListInstancesRequest request = ListInstancesRequest.newBuilder().setParent(parent).build(); + return listInstances(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Instances in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AppPlatformClient appPlatformClient = AppPlatformClient.create()) {
+   *   ListInstancesRequest request =
+   *       ListInstancesRequest.newBuilder()
+   *           .setParent(ApplicationName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   for (Instance element : appPlatformClient.listInstances(request).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @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 + */ + public final ListInstancesPagedResponse listInstances(ListInstancesRequest request) { + return listInstancesPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Instances in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AppPlatformClient appPlatformClient = AppPlatformClient.create()) {
+   *   ListInstancesRequest request =
+   *       ListInstancesRequest.newBuilder()
+   *           .setParent(ApplicationName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   ApiFuture future =
+   *       appPlatformClient.listInstancesPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (Instance element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listInstancesPagedCallable() { + return stub.listInstancesPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Instances in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AppPlatformClient appPlatformClient = AppPlatformClient.create()) {
+   *   ListInstancesRequest request =
+   *       ListInstancesRequest.newBuilder()
+   *           .setParent(ApplicationName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   while (true) {
+   *     ListInstancesResponse response = appPlatformClient.listInstancesCallable().call(request);
+   *     for (Instance element : response.getInstancesList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable listInstancesCallable() { + return stub.listInstancesCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single Instance. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AppPlatformClient appPlatformClient = AppPlatformClient.create()) {
+   *   InstanceName name = InstanceName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]", "[INSTANCE]");
+   *   Instance response = appPlatformClient.getInstance(name);
+   * }
+   * }
+ * + * @param name Required. Name of the resource. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Instance getInstance(InstanceName name) { + GetInstanceRequest request = + GetInstanceRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return getInstance(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single Instance. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AppPlatformClient appPlatformClient = AppPlatformClient.create()) {
+   *   String name =
+   *       InstanceName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]", "[INSTANCE]").toString();
+   *   Instance response = appPlatformClient.getInstance(name);
+   * }
+   * }
+ * + * @param name Required. Name of the resource. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Instance getInstance(String name) { + GetInstanceRequest request = GetInstanceRequest.newBuilder().setName(name).build(); + return getInstance(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single Instance. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AppPlatformClient appPlatformClient = AppPlatformClient.create()) {
+   *   GetInstanceRequest request =
+   *       GetInstanceRequest.newBuilder()
+   *           .setName(
+   *               InstanceName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]", "[INSTANCE]")
+   *                   .toString())
+   *           .build();
+   *   Instance response = appPlatformClient.getInstance(request);
+   * }
+   * }
+ * + * @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 + */ + public final Instance getInstance(GetInstanceRequest request) { + return getInstanceCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single Instance. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AppPlatformClient appPlatformClient = AppPlatformClient.create()) {
+   *   GetInstanceRequest request =
+   *       GetInstanceRequest.newBuilder()
+   *           .setName(
+   *               InstanceName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]", "[INSTANCE]")
+   *                   .toString())
+   *           .build();
+   *   ApiFuture future = appPlatformClient.getInstanceCallable().futureCall(request);
+   *   // Do something.
+   *   Instance response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getInstanceCallable() { + return stub.getInstanceCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Adds target stream input to the Application. If the Application is deployed, the corresponding + * new Application instance will be created. If the stream has already been in the Application, + * the RPC will fail. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AppPlatformClient appPlatformClient = AppPlatformClient.create()) {
+   *   ApplicationName name = ApplicationName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]");
+   *   CreateApplicationInstancesResponse response =
+   *       appPlatformClient.createApplicationInstancesAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. the name of the application to retrieve. Format: + * "projects/{project}/locations/{location}/applications/{application}" + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture + createApplicationInstancesAsync(ApplicationName name) { + CreateApplicationInstancesRequest request = + CreateApplicationInstancesRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + return createApplicationInstancesAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Adds target stream input to the Application. If the Application is deployed, the corresponding + * new Application instance will be created. If the stream has already been in the Application, + * the RPC will fail. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AppPlatformClient appPlatformClient = AppPlatformClient.create()) {
+   *   String name = ApplicationName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]").toString();
+   *   CreateApplicationInstancesResponse response =
+   *       appPlatformClient.createApplicationInstancesAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. the name of the application to retrieve. Format: + * "projects/{project}/locations/{location}/applications/{application}" + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture + createApplicationInstancesAsync(String name) { + CreateApplicationInstancesRequest request = + CreateApplicationInstancesRequest.newBuilder().setName(name).build(); + return createApplicationInstancesAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Adds target stream input to the Application. If the Application is deployed, the corresponding + * new Application instance will be created. If the stream has already been in the Application, + * the RPC will fail. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AppPlatformClient appPlatformClient = AppPlatformClient.create()) {
+   *   CreateApplicationInstancesRequest request =
+   *       CreateApplicationInstancesRequest.newBuilder()
+   *           .setName(ApplicationName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]").toString())
+   *           .addAllApplicationInstances(new ArrayList())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   CreateApplicationInstancesResponse response =
+   *       appPlatformClient.createApplicationInstancesAsync(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 + */ + public final OperationFuture + createApplicationInstancesAsync(CreateApplicationInstancesRequest request) { + return createApplicationInstancesOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Adds target stream input to the Application. If the Application is deployed, the corresponding + * new Application instance will be created. If the stream has already been in the Application, + * the RPC will fail. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AppPlatformClient appPlatformClient = AppPlatformClient.create()) {
+   *   CreateApplicationInstancesRequest request =
+   *       CreateApplicationInstancesRequest.newBuilder()
+   *           .setName(ApplicationName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]").toString())
+   *           .addAllApplicationInstances(new ArrayList())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   OperationFuture future =
+   *       appPlatformClient.createApplicationInstancesOperationCallable().futureCall(request);
+   *   // Do something.
+   *   CreateApplicationInstancesResponse response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable< + CreateApplicationInstancesRequest, CreateApplicationInstancesResponse, OperationMetadata> + createApplicationInstancesOperationCallable() { + return stub.createApplicationInstancesOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Adds target stream input to the Application. If the Application is deployed, the corresponding + * new Application instance will be created. If the stream has already been in the Application, + * the RPC will fail. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AppPlatformClient appPlatformClient = AppPlatformClient.create()) {
+   *   CreateApplicationInstancesRequest request =
+   *       CreateApplicationInstancesRequest.newBuilder()
+   *           .setName(ApplicationName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]").toString())
+   *           .addAllApplicationInstances(new ArrayList())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   ApiFuture future =
+   *       appPlatformClient.createApplicationInstancesCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + createApplicationInstancesCallable() { + return stub.createApplicationInstancesCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Remove target stream input to the Application, if the Application is deployed, the + * corresponding instance based will be deleted. If the stream is not in the Application, the RPC + * will fail. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AppPlatformClient appPlatformClient = AppPlatformClient.create()) {
+   *   ApplicationName name = ApplicationName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]");
+   *   Instance response = appPlatformClient.deleteApplicationInstancesAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. the name of the application to retrieve. Format: + * "projects/{project}/locations/{location}/applications/{application}" + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteApplicationInstancesAsync( + ApplicationName name) { + DeleteApplicationInstancesRequest request = + DeleteApplicationInstancesRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + return deleteApplicationInstancesAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Remove target stream input to the Application, if the Application is deployed, the + * corresponding instance based will be deleted. If the stream is not in the Application, the RPC + * will fail. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AppPlatformClient appPlatformClient = AppPlatformClient.create()) {
+   *   String name = ApplicationName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]").toString();
+   *   Instance response = appPlatformClient.deleteApplicationInstancesAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. the name of the application to retrieve. Format: + * "projects/{project}/locations/{location}/applications/{application}" + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteApplicationInstancesAsync( + String name) { + DeleteApplicationInstancesRequest request = + DeleteApplicationInstancesRequest.newBuilder().setName(name).build(); + return deleteApplicationInstancesAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Remove target stream input to the Application, if the Application is deployed, the + * corresponding instance based will be deleted. If the stream is not in the Application, the RPC + * will fail. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AppPlatformClient appPlatformClient = AppPlatformClient.create()) {
+   *   DeleteApplicationInstancesRequest request =
+   *       DeleteApplicationInstancesRequest.newBuilder()
+   *           .setName(ApplicationName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]").toString())
+   *           .addAllInstanceIds(new ArrayList())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   Instance response = appPlatformClient.deleteApplicationInstancesAsync(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 + */ + public final OperationFuture deleteApplicationInstancesAsync( + DeleteApplicationInstancesRequest request) { + return deleteApplicationInstancesOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Remove target stream input to the Application, if the Application is deployed, the + * corresponding instance based will be deleted. If the stream is not in the Application, the RPC + * will fail. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AppPlatformClient appPlatformClient = AppPlatformClient.create()) {
+   *   DeleteApplicationInstancesRequest request =
+   *       DeleteApplicationInstancesRequest.newBuilder()
+   *           .setName(ApplicationName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]").toString())
+   *           .addAllInstanceIds(new ArrayList())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   OperationFuture future =
+   *       appPlatformClient.deleteApplicationInstancesOperationCallable().futureCall(request);
+   *   // Do something.
+   *   Instance response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + deleteApplicationInstancesOperationCallable() { + return stub.deleteApplicationInstancesOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Remove target stream input to the Application, if the Application is deployed, the + * corresponding instance based will be deleted. If the stream is not in the Application, the RPC + * will fail. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AppPlatformClient appPlatformClient = AppPlatformClient.create()) {
+   *   DeleteApplicationInstancesRequest request =
+   *       DeleteApplicationInstancesRequest.newBuilder()
+   *           .setName(ApplicationName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]").toString())
+   *           .addAllInstanceIds(new ArrayList())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   ApiFuture future =
+   *       appPlatformClient.deleteApplicationInstancesCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + deleteApplicationInstancesCallable() { + return stub.deleteApplicationInstancesCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Adds target stream input to the Application. If the Application is deployed, the corresponding + * new Application instance will be created. If the stream has already been in the Application, + * the RPC will fail. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AppPlatformClient appPlatformClient = AppPlatformClient.create()) {
+   *   ApplicationName name = ApplicationName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]");
+   *   List applicationInstances =
+   *       new ArrayList<>();
+   *   UpdateApplicationInstancesResponse response =
+   *       appPlatformClient.updateApplicationInstancesAsync(name, applicationInstances).get();
+   * }
+   * }
+ * + * @param name Required. the name of the application to retrieve. Format: + * "projects/{project}/locations/{location}/applications/{application}" + * @param applicationInstances + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture + updateApplicationInstancesAsync( + ApplicationName name, + List applicationInstances) { + UpdateApplicationInstancesRequest request = + UpdateApplicationInstancesRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .addAllApplicationInstances(applicationInstances) + .build(); + return updateApplicationInstancesAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Adds target stream input to the Application. If the Application is deployed, the corresponding + * new Application instance will be created. If the stream has already been in the Application, + * the RPC will fail. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AppPlatformClient appPlatformClient = AppPlatformClient.create()) {
+   *   String name = ApplicationName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]").toString();
+   *   List applicationInstances =
+   *       new ArrayList<>();
+   *   UpdateApplicationInstancesResponse response =
+   *       appPlatformClient.updateApplicationInstancesAsync(name, applicationInstances).get();
+   * }
+   * }
+ * + * @param name Required. the name of the application to retrieve. Format: + * "projects/{project}/locations/{location}/applications/{application}" + * @param applicationInstances + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture + updateApplicationInstancesAsync( + String name, + List applicationInstances) { + UpdateApplicationInstancesRequest request = + UpdateApplicationInstancesRequest.newBuilder() + .setName(name) + .addAllApplicationInstances(applicationInstances) + .build(); + return updateApplicationInstancesAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Adds target stream input to the Application. If the Application is deployed, the corresponding + * new Application instance will be created. If the stream has already been in the Application, + * the RPC will fail. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AppPlatformClient appPlatformClient = AppPlatformClient.create()) {
+   *   UpdateApplicationInstancesRequest request =
+   *       UpdateApplicationInstancesRequest.newBuilder()
+   *           .setName(ApplicationName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]").toString())
+   *           .addAllApplicationInstances(
+   *               new ArrayList())
+   *           .setRequestId("requestId693933066")
+   *           .setAllowMissing(true)
+   *           .build();
+   *   UpdateApplicationInstancesResponse response =
+   *       appPlatformClient.updateApplicationInstancesAsync(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 + */ + public final OperationFuture + updateApplicationInstancesAsync(UpdateApplicationInstancesRequest request) { + return updateApplicationInstancesOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Adds target stream input to the Application. If the Application is deployed, the corresponding + * new Application instance will be created. If the stream has already been in the Application, + * the RPC will fail. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AppPlatformClient appPlatformClient = AppPlatformClient.create()) {
+   *   UpdateApplicationInstancesRequest request =
+   *       UpdateApplicationInstancesRequest.newBuilder()
+   *           .setName(ApplicationName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]").toString())
+   *           .addAllApplicationInstances(
+   *               new ArrayList())
+   *           .setRequestId("requestId693933066")
+   *           .setAllowMissing(true)
+   *           .build();
+   *   OperationFuture future =
+   *       appPlatformClient.updateApplicationInstancesOperationCallable().futureCall(request);
+   *   // Do something.
+   *   UpdateApplicationInstancesResponse response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable< + UpdateApplicationInstancesRequest, UpdateApplicationInstancesResponse, OperationMetadata> + updateApplicationInstancesOperationCallable() { + return stub.updateApplicationInstancesOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Adds target stream input to the Application. If the Application is deployed, the corresponding + * new Application instance will be created. If the stream has already been in the Application, + * the RPC will fail. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AppPlatformClient appPlatformClient = AppPlatformClient.create()) {
+   *   UpdateApplicationInstancesRequest request =
+   *       UpdateApplicationInstancesRequest.newBuilder()
+   *           .setName(ApplicationName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]").toString())
+   *           .addAllApplicationInstances(
+   *               new ArrayList())
+   *           .setRequestId("requestId693933066")
+   *           .setAllowMissing(true)
+   *           .build();
+   *   ApiFuture future =
+   *       appPlatformClient.updateApplicationInstancesCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + updateApplicationInstancesCallable() { + return stub.updateApplicationInstancesCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Drafts in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AppPlatformClient appPlatformClient = AppPlatformClient.create()) {
+   *   ApplicationName parent = ApplicationName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]");
+   *   for (Draft element : appPlatformClient.listDrafts(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. Parent value for ListDraftsRequest. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListDraftsPagedResponse listDrafts(ApplicationName parent) { + ListDraftsRequest request = + ListDraftsRequest.newBuilder().setParent(parent == null ? null : parent.toString()).build(); + return listDrafts(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Drafts in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AppPlatformClient appPlatformClient = AppPlatformClient.create()) {
+   *   String parent = ApplicationName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]").toString();
+   *   for (Draft element : appPlatformClient.listDrafts(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. Parent value for ListDraftsRequest. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListDraftsPagedResponse listDrafts(String parent) { + ListDraftsRequest request = ListDraftsRequest.newBuilder().setParent(parent).build(); + return listDrafts(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Drafts in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AppPlatformClient appPlatformClient = AppPlatformClient.create()) {
+   *   ListDraftsRequest request =
+   *       ListDraftsRequest.newBuilder()
+   *           .setParent(ApplicationName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   for (Draft element : appPlatformClient.listDrafts(request).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @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 + */ + public final ListDraftsPagedResponse listDrafts(ListDraftsRequest request) { + return listDraftsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Drafts in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AppPlatformClient appPlatformClient = AppPlatformClient.create()) {
+   *   ListDraftsRequest request =
+   *       ListDraftsRequest.newBuilder()
+   *           .setParent(ApplicationName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   ApiFuture future = appPlatformClient.listDraftsPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (Draft element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable listDraftsPagedCallable() { + return stub.listDraftsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Drafts in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AppPlatformClient appPlatformClient = AppPlatformClient.create()) {
+   *   ListDraftsRequest request =
+   *       ListDraftsRequest.newBuilder()
+   *           .setParent(ApplicationName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   while (true) {
+   *     ListDraftsResponse response = appPlatformClient.listDraftsCallable().call(request);
+   *     for (Draft element : response.getDraftsList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable listDraftsCallable() { + return stub.listDraftsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single Draft. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AppPlatformClient appPlatformClient = AppPlatformClient.create()) {
+   *   DraftName name = DraftName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]", "[DRAFT]");
+   *   Draft response = appPlatformClient.getDraft(name);
+   * }
+   * }
+ * + * @param name Required. Name of the resource. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Draft getDraft(DraftName name) { + GetDraftRequest request = + GetDraftRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return getDraft(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single Draft. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AppPlatformClient appPlatformClient = AppPlatformClient.create()) {
+   *   String name = DraftName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]", "[DRAFT]").toString();
+   *   Draft response = appPlatformClient.getDraft(name);
+   * }
+   * }
+ * + * @param name Required. Name of the resource. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Draft getDraft(String name) { + GetDraftRequest request = GetDraftRequest.newBuilder().setName(name).build(); + return getDraft(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single Draft. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AppPlatformClient appPlatformClient = AppPlatformClient.create()) {
+   *   GetDraftRequest request =
+   *       GetDraftRequest.newBuilder()
+   *           .setName(
+   *               DraftName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]", "[DRAFT]").toString())
+   *           .build();
+   *   Draft response = appPlatformClient.getDraft(request);
+   * }
+   * }
+ * + * @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 + */ + public final Draft getDraft(GetDraftRequest request) { + return getDraftCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single Draft. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AppPlatformClient appPlatformClient = AppPlatformClient.create()) {
+   *   GetDraftRequest request =
+   *       GetDraftRequest.newBuilder()
+   *           .setName(
+   *               DraftName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]", "[DRAFT]").toString())
+   *           .build();
+   *   ApiFuture future = appPlatformClient.getDraftCallable().futureCall(request);
+   *   // Do something.
+   *   Draft response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getDraftCallable() { + return stub.getDraftCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new Draft in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AppPlatformClient appPlatformClient = AppPlatformClient.create()) {
+   *   ApplicationName parent = ApplicationName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]");
+   *   Draft draft = Draft.newBuilder().build();
+   *   String draftId = "draftId1912512156";
+   *   Draft response = appPlatformClient.createDraftAsync(parent, draft, draftId).get();
+   * }
+   * }
+ * + * @param parent Required. Value for parent. + * @param draft Required. The resource being created. + * @param draftId Required. Id of the requesting object. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture createDraftAsync( + ApplicationName parent, Draft draft, String draftId) { + CreateDraftRequest request = + CreateDraftRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setDraft(draft) + .setDraftId(draftId) + .build(); + return createDraftAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new Draft in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AppPlatformClient appPlatformClient = AppPlatformClient.create()) {
+   *   String parent = ApplicationName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]").toString();
+   *   Draft draft = Draft.newBuilder().build();
+   *   String draftId = "draftId1912512156";
+   *   Draft response = appPlatformClient.createDraftAsync(parent, draft, draftId).get();
+   * }
+   * }
+ * + * @param parent Required. Value for parent. + * @param draft Required. The resource being created. + * @param draftId Required. Id of the requesting object. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture createDraftAsync( + String parent, Draft draft, String draftId) { + CreateDraftRequest request = + CreateDraftRequest.newBuilder() + .setParent(parent) + .setDraft(draft) + .setDraftId(draftId) + .build(); + return createDraftAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new Draft in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AppPlatformClient appPlatformClient = AppPlatformClient.create()) {
+   *   CreateDraftRequest request =
+   *       CreateDraftRequest.newBuilder()
+   *           .setParent(ApplicationName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]").toString())
+   *           .setDraftId("draftId1912512156")
+   *           .setDraft(Draft.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   Draft response = appPlatformClient.createDraftAsync(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 + */ + public final OperationFuture createDraftAsync( + CreateDraftRequest request) { + return createDraftOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new Draft in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AppPlatformClient appPlatformClient = AppPlatformClient.create()) {
+   *   CreateDraftRequest request =
+   *       CreateDraftRequest.newBuilder()
+   *           .setParent(ApplicationName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]").toString())
+   *           .setDraftId("draftId1912512156")
+   *           .setDraft(Draft.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   OperationFuture future =
+   *       appPlatformClient.createDraftOperationCallable().futureCall(request);
+   *   // Do something.
+   *   Draft response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + createDraftOperationCallable() { + return stub.createDraftOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new Draft in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AppPlatformClient appPlatformClient = AppPlatformClient.create()) {
+   *   CreateDraftRequest request =
+   *       CreateDraftRequest.newBuilder()
+   *           .setParent(ApplicationName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]").toString())
+   *           .setDraftId("draftId1912512156")
+   *           .setDraft(Draft.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   ApiFuture future = appPlatformClient.createDraftCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable createDraftCallable() { + return stub.createDraftCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the parameters of a single Draft. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AppPlatformClient appPlatformClient = AppPlatformClient.create()) {
+   *   Draft draft = Draft.newBuilder().build();
+   *   FieldMask updateMask = FieldMask.newBuilder().build();
+   *   Draft response = appPlatformClient.updateDraftAsync(draft, updateMask).get();
+   * }
+   * }
+ * + * @param draft Required. The resource being updated. + * @param updateMask Optional. Field mask is used to specify the fields to be overwritten in the + * Draft resource by the update. The fields specified in the update_mask are relative to the + * resource, not the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields will be overwritten. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture updateDraftAsync( + Draft draft, FieldMask updateMask) { + UpdateDraftRequest request = + UpdateDraftRequest.newBuilder().setDraft(draft).setUpdateMask(updateMask).build(); + return updateDraftAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the parameters of a single Draft. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AppPlatformClient appPlatformClient = AppPlatformClient.create()) {
+   *   UpdateDraftRequest request =
+   *       UpdateDraftRequest.newBuilder()
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .setDraft(Draft.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .setAllowMissing(true)
+   *           .build();
+   *   Draft response = appPlatformClient.updateDraftAsync(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 + */ + public final OperationFuture updateDraftAsync( + UpdateDraftRequest request) { + return updateDraftOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the parameters of a single Draft. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AppPlatformClient appPlatformClient = AppPlatformClient.create()) {
+   *   UpdateDraftRequest request =
+   *       UpdateDraftRequest.newBuilder()
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .setDraft(Draft.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .setAllowMissing(true)
+   *           .build();
+   *   OperationFuture future =
+   *       appPlatformClient.updateDraftOperationCallable().futureCall(request);
+   *   // Do something.
+   *   Draft response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + updateDraftOperationCallable() { + return stub.updateDraftOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the parameters of a single Draft. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AppPlatformClient appPlatformClient = AppPlatformClient.create()) {
+   *   UpdateDraftRequest request =
+   *       UpdateDraftRequest.newBuilder()
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .setDraft(Draft.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .setAllowMissing(true)
+   *           .build();
+   *   ApiFuture future = appPlatformClient.updateDraftCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable updateDraftCallable() { + return stub.updateDraftCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single Draft. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AppPlatformClient appPlatformClient = AppPlatformClient.create()) {
+   *   DraftName name = DraftName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]", "[DRAFT]");
+   *   appPlatformClient.deleteDraftAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. Name of the resource. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteDraftAsync(DraftName name) { + DeleteDraftRequest request = + DeleteDraftRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return deleteDraftAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single Draft. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AppPlatformClient appPlatformClient = AppPlatformClient.create()) {
+   *   String name = DraftName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]", "[DRAFT]").toString();
+   *   appPlatformClient.deleteDraftAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. Name of the resource. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteDraftAsync(String name) { + DeleteDraftRequest request = DeleteDraftRequest.newBuilder().setName(name).build(); + return deleteDraftAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single Draft. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AppPlatformClient appPlatformClient = AppPlatformClient.create()) {
+   *   DeleteDraftRequest request =
+   *       DeleteDraftRequest.newBuilder()
+   *           .setName(
+   *               DraftName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]", "[DRAFT]").toString())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   appPlatformClient.deleteDraftAsync(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 + */ + public final OperationFuture deleteDraftAsync( + DeleteDraftRequest request) { + return deleteDraftOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single Draft. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AppPlatformClient appPlatformClient = AppPlatformClient.create()) {
+   *   DeleteDraftRequest request =
+   *       DeleteDraftRequest.newBuilder()
+   *           .setName(
+   *               DraftName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]", "[DRAFT]").toString())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   OperationFuture future =
+   *       appPlatformClient.deleteDraftOperationCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final OperationCallable + deleteDraftOperationCallable() { + return stub.deleteDraftOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single Draft. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AppPlatformClient appPlatformClient = AppPlatformClient.create()) {
+   *   DeleteDraftRequest request =
+   *       DeleteDraftRequest.newBuilder()
+   *           .setName(
+   *               DraftName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]", "[DRAFT]").toString())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   ApiFuture future = appPlatformClient.deleteDraftCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final UnaryCallable deleteDraftCallable() { + return stub.deleteDraftCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Processors in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AppPlatformClient appPlatformClient = AppPlatformClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   for (Processor element : appPlatformClient.listProcessors(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. Parent value for ListProcessorsRequest. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListProcessorsPagedResponse listProcessors(LocationName parent) { + ListProcessorsRequest request = + ListProcessorsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listProcessors(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Processors in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AppPlatformClient appPlatformClient = AppPlatformClient.create()) {
+   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+   *   for (Processor element : appPlatformClient.listProcessors(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. Parent value for ListProcessorsRequest. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListProcessorsPagedResponse listProcessors(String parent) { + ListProcessorsRequest request = ListProcessorsRequest.newBuilder().setParent(parent).build(); + return listProcessors(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Processors in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AppPlatformClient appPlatformClient = AppPlatformClient.create()) {
+   *   ListProcessorsRequest request =
+   *       ListProcessorsRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   for (Processor element : appPlatformClient.listProcessors(request).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @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 + */ + public final ListProcessorsPagedResponse listProcessors(ListProcessorsRequest request) { + return listProcessorsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Processors in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AppPlatformClient appPlatformClient = AppPlatformClient.create()) {
+   *   ListProcessorsRequest request =
+   *       ListProcessorsRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   ApiFuture future =
+   *       appPlatformClient.listProcessorsPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (Processor element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listProcessorsPagedCallable() { + return stub.listProcessorsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Processors in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AppPlatformClient appPlatformClient = AppPlatformClient.create()) {
+   *   ListProcessorsRequest request =
+   *       ListProcessorsRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   while (true) {
+   *     ListProcessorsResponse response = appPlatformClient.listProcessorsCallable().call(request);
+   *     for (Processor element : response.getProcessorsList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listProcessorsCallable() { + return stub.listProcessorsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * ListPrebuiltProcessors is a custom pass-through verb that Lists Prebuilt Processors. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AppPlatformClient appPlatformClient = AppPlatformClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   ListPrebuiltProcessorsResponse response = appPlatformClient.listPrebuiltProcessors(parent);
+   * }
+   * }
+ * + * @param parent Required. Parent path. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListPrebuiltProcessorsResponse listPrebuiltProcessors(LocationName parent) { + ListPrebuiltProcessorsRequest request = + ListPrebuiltProcessorsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listPrebuiltProcessors(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * ListPrebuiltProcessors is a custom pass-through verb that Lists Prebuilt Processors. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AppPlatformClient appPlatformClient = AppPlatformClient.create()) {
+   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+   *   ListPrebuiltProcessorsResponse response = appPlatformClient.listPrebuiltProcessors(parent);
+   * }
+   * }
+ * + * @param parent Required. Parent path. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListPrebuiltProcessorsResponse listPrebuiltProcessors(String parent) { + ListPrebuiltProcessorsRequest request = + ListPrebuiltProcessorsRequest.newBuilder().setParent(parent).build(); + return listPrebuiltProcessors(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * ListPrebuiltProcessors is a custom pass-through verb that Lists Prebuilt Processors. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AppPlatformClient appPlatformClient = AppPlatformClient.create()) {
+   *   ListPrebuiltProcessorsRequest request =
+   *       ListPrebuiltProcessorsRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .build();
+   *   ListPrebuiltProcessorsResponse response = appPlatformClient.listPrebuiltProcessors(request);
+   * }
+   * }
+ * + * @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 + */ + public final ListPrebuiltProcessorsResponse listPrebuiltProcessors( + ListPrebuiltProcessorsRequest request) { + return listPrebuiltProcessorsCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * ListPrebuiltProcessors is a custom pass-through verb that Lists Prebuilt Processors. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AppPlatformClient appPlatformClient = AppPlatformClient.create()) {
+   *   ListPrebuiltProcessorsRequest request =
+   *       ListPrebuiltProcessorsRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .build();
+   *   ApiFuture future =
+   *       appPlatformClient.listPrebuiltProcessorsCallable().futureCall(request);
+   *   // Do something.
+   *   ListPrebuiltProcessorsResponse response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + listPrebuiltProcessorsCallable() { + return stub.listPrebuiltProcessorsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single Processor. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AppPlatformClient appPlatformClient = AppPlatformClient.create()) {
+   *   ProcessorName name = ProcessorName.of("[PROJECT]", "[LOCATION]", "[PROCESSOR]");
+   *   Processor response = appPlatformClient.getProcessor(name);
+   * }
+   * }
+ * + * @param name Required. Name of the resource. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Processor getProcessor(ProcessorName name) { + GetProcessorRequest request = + GetProcessorRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return getProcessor(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single Processor. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AppPlatformClient appPlatformClient = AppPlatformClient.create()) {
+   *   String name = ProcessorName.of("[PROJECT]", "[LOCATION]", "[PROCESSOR]").toString();
+   *   Processor response = appPlatformClient.getProcessor(name);
+   * }
+   * }
+ * + * @param name Required. Name of the resource. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Processor getProcessor(String name) { + GetProcessorRequest request = GetProcessorRequest.newBuilder().setName(name).build(); + return getProcessor(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single Processor. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AppPlatformClient appPlatformClient = AppPlatformClient.create()) {
+   *   GetProcessorRequest request =
+   *       GetProcessorRequest.newBuilder()
+   *           .setName(ProcessorName.of("[PROJECT]", "[LOCATION]", "[PROCESSOR]").toString())
+   *           .build();
+   *   Processor response = appPlatformClient.getProcessor(request);
+   * }
+   * }
+ * + * @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 + */ + public final Processor getProcessor(GetProcessorRequest request) { + return getProcessorCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single Processor. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AppPlatformClient appPlatformClient = AppPlatformClient.create()) {
+   *   GetProcessorRequest request =
+   *       GetProcessorRequest.newBuilder()
+   *           .setName(ProcessorName.of("[PROJECT]", "[LOCATION]", "[PROCESSOR]").toString())
+   *           .build();
+   *   ApiFuture future = appPlatformClient.getProcessorCallable().futureCall(request);
+   *   // Do something.
+   *   Processor response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getProcessorCallable() { + return stub.getProcessorCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new Processor in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AppPlatformClient appPlatformClient = AppPlatformClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   Processor processor = Processor.newBuilder().build();
+   *   String processorId = "processorId203323725";
+   *   Processor response =
+   *       appPlatformClient.createProcessorAsync(parent, processor, processorId).get();
+   * }
+   * }
+ * + * @param parent Required. Value for parent. + * @param processor Required. The resource being created. + * @param processorId Required. Id of the requesting object. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture createProcessorAsync( + LocationName parent, Processor processor, String processorId) { + CreateProcessorRequest request = + CreateProcessorRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setProcessor(processor) + .setProcessorId(processorId) + .build(); + return createProcessorAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new Processor in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AppPlatformClient appPlatformClient = AppPlatformClient.create()) {
+   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+   *   Processor processor = Processor.newBuilder().build();
+   *   String processorId = "processorId203323725";
+   *   Processor response =
+   *       appPlatformClient.createProcessorAsync(parent, processor, processorId).get();
+   * }
+   * }
+ * + * @param parent Required. Value for parent. + * @param processor Required. The resource being created. + * @param processorId Required. Id of the requesting object. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture createProcessorAsync( + String parent, Processor processor, String processorId) { + CreateProcessorRequest request = + CreateProcessorRequest.newBuilder() + .setParent(parent) + .setProcessor(processor) + .setProcessorId(processorId) + .build(); + return createProcessorAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new Processor in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AppPlatformClient appPlatformClient = AppPlatformClient.create()) {
+   *   CreateProcessorRequest request =
+   *       CreateProcessorRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setProcessorId("processorId203323725")
+   *           .setProcessor(Processor.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   Processor response = appPlatformClient.createProcessorAsync(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 + */ + public final OperationFuture createProcessorAsync( + CreateProcessorRequest request) { + return createProcessorOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new Processor in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AppPlatformClient appPlatformClient = AppPlatformClient.create()) {
+   *   CreateProcessorRequest request =
+   *       CreateProcessorRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setProcessorId("processorId203323725")
+   *           .setProcessor(Processor.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   OperationFuture future =
+   *       appPlatformClient.createProcessorOperationCallable().futureCall(request);
+   *   // Do something.
+   *   Processor response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + createProcessorOperationCallable() { + return stub.createProcessorOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new Processor in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AppPlatformClient appPlatformClient = AppPlatformClient.create()) {
+   *   CreateProcessorRequest request =
+   *       CreateProcessorRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setProcessorId("processorId203323725")
+   *           .setProcessor(Processor.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   ApiFuture future = appPlatformClient.createProcessorCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable createProcessorCallable() { + return stub.createProcessorCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the parameters of a single Processor. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AppPlatformClient appPlatformClient = AppPlatformClient.create()) {
+   *   Processor processor = Processor.newBuilder().build();
+   *   FieldMask updateMask = FieldMask.newBuilder().build();
+   *   Processor response = appPlatformClient.updateProcessorAsync(processor, updateMask).get();
+   * }
+   * }
+ * + * @param processor Required. The resource being updated. + * @param updateMask Optional. Field mask is used to specify the fields to be overwritten in the + * Processor resource by the update. The fields specified in the update_mask are relative to + * the resource, not the full request. A field will be overwritten if it is in the mask. If + * the user does not provide a mask then all fields will be overwritten. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture updateProcessorAsync( + Processor processor, FieldMask updateMask) { + UpdateProcessorRequest request = + UpdateProcessorRequest.newBuilder() + .setProcessor(processor) + .setUpdateMask(updateMask) + .build(); + return updateProcessorAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the parameters of a single Processor. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AppPlatformClient appPlatformClient = AppPlatformClient.create()) {
+   *   UpdateProcessorRequest request =
+   *       UpdateProcessorRequest.newBuilder()
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .setProcessor(Processor.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   Processor response = appPlatformClient.updateProcessorAsync(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 + */ + public final OperationFuture updateProcessorAsync( + UpdateProcessorRequest request) { + return updateProcessorOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the parameters of a single Processor. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AppPlatformClient appPlatformClient = AppPlatformClient.create()) {
+   *   UpdateProcessorRequest request =
+   *       UpdateProcessorRequest.newBuilder()
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .setProcessor(Processor.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   OperationFuture future =
+   *       appPlatformClient.updateProcessorOperationCallable().futureCall(request);
+   *   // Do something.
+   *   Processor response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + updateProcessorOperationCallable() { + return stub.updateProcessorOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the parameters of a single Processor. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AppPlatformClient appPlatformClient = AppPlatformClient.create()) {
+   *   UpdateProcessorRequest request =
+   *       UpdateProcessorRequest.newBuilder()
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .setProcessor(Processor.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   ApiFuture future = appPlatformClient.updateProcessorCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable updateProcessorCallable() { + return stub.updateProcessorCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single Processor. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AppPlatformClient appPlatformClient = AppPlatformClient.create()) {
+   *   ProcessorName name = ProcessorName.of("[PROJECT]", "[LOCATION]", "[PROCESSOR]");
+   *   appPlatformClient.deleteProcessorAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. Name of the resource + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteProcessorAsync(ProcessorName name) { + DeleteProcessorRequest request = + DeleteProcessorRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return deleteProcessorAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single Processor. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AppPlatformClient appPlatformClient = AppPlatformClient.create()) {
+   *   String name = ProcessorName.of("[PROJECT]", "[LOCATION]", "[PROCESSOR]").toString();
+   *   appPlatformClient.deleteProcessorAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. Name of the resource + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteProcessorAsync(String name) { + DeleteProcessorRequest request = DeleteProcessorRequest.newBuilder().setName(name).build(); + return deleteProcessorAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single Processor. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AppPlatformClient appPlatformClient = AppPlatformClient.create()) {
+   *   DeleteProcessorRequest request =
+   *       DeleteProcessorRequest.newBuilder()
+   *           .setName(ProcessorName.of("[PROJECT]", "[LOCATION]", "[PROCESSOR]").toString())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   appPlatformClient.deleteProcessorAsync(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 + */ + public final OperationFuture deleteProcessorAsync( + DeleteProcessorRequest request) { + return deleteProcessorOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single Processor. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AppPlatformClient appPlatformClient = AppPlatformClient.create()) {
+   *   DeleteProcessorRequest request =
+   *       DeleteProcessorRequest.newBuilder()
+   *           .setName(ProcessorName.of("[PROJECT]", "[LOCATION]", "[PROCESSOR]").toString())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   OperationFuture future =
+   *       appPlatformClient.deleteProcessorOperationCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final OperationCallable + deleteProcessorOperationCallable() { + return stub.deleteProcessorOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single Processor. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AppPlatformClient appPlatformClient = AppPlatformClient.create()) {
+   *   DeleteProcessorRequest request =
+   *       DeleteProcessorRequest.newBuilder()
+   *           .setName(ProcessorName.of("[PROJECT]", "[LOCATION]", "[PROCESSOR]").toString())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   ApiFuture future = appPlatformClient.deleteProcessorCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final UnaryCallable deleteProcessorCallable() { + return stub.deleteProcessorCallable(); + } + + @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); + } + + public static class ListApplicationsPagedResponse + extends AbstractPagedListResponse< + ListApplicationsRequest, + ListApplicationsResponse, + Application, + ListApplicationsPage, + ListApplicationsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListApplicationsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListApplicationsPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListApplicationsPagedResponse(ListApplicationsPage page) { + super(page, ListApplicationsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListApplicationsPage + extends AbstractPage< + ListApplicationsRequest, ListApplicationsResponse, Application, ListApplicationsPage> { + + private ListApplicationsPage( + PageContext context, + ListApplicationsResponse response) { + super(context, response); + } + + private static ListApplicationsPage createEmptyPage() { + return new ListApplicationsPage(null, null); + } + + @Override + protected ListApplicationsPage createPage( + PageContext context, + ListApplicationsResponse response) { + return new ListApplicationsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListApplicationsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListApplicationsRequest, + ListApplicationsResponse, + Application, + ListApplicationsPage, + ListApplicationsFixedSizeCollection> { + + private ListApplicationsFixedSizeCollection( + List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListApplicationsFixedSizeCollection createEmptyCollection() { + return new ListApplicationsFixedSizeCollection(null, 0); + } + + @Override + protected ListApplicationsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListApplicationsFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListInstancesPagedResponse + extends AbstractPagedListResponse< + ListInstancesRequest, + ListInstancesResponse, + Instance, + ListInstancesPage, + ListInstancesFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListInstancesPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListInstancesPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListInstancesPagedResponse(ListInstancesPage page) { + super(page, ListInstancesFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListInstancesPage + extends AbstractPage< + ListInstancesRequest, ListInstancesResponse, Instance, ListInstancesPage> { + + private ListInstancesPage( + PageContext context, + ListInstancesResponse response) { + super(context, response); + } + + private static ListInstancesPage createEmptyPage() { + return new ListInstancesPage(null, null); + } + + @Override + protected ListInstancesPage createPage( + PageContext context, + ListInstancesResponse response) { + return new ListInstancesPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListInstancesFixedSizeCollection + extends AbstractFixedSizeCollection< + ListInstancesRequest, + ListInstancesResponse, + Instance, + ListInstancesPage, + ListInstancesFixedSizeCollection> { + + private ListInstancesFixedSizeCollection(List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListInstancesFixedSizeCollection createEmptyCollection() { + return new ListInstancesFixedSizeCollection(null, 0); + } + + @Override + protected ListInstancesFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListInstancesFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListDraftsPagedResponse + extends AbstractPagedListResponse< + ListDraftsRequest, + ListDraftsResponse, + Draft, + ListDraftsPage, + ListDraftsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListDraftsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, input -> new ListDraftsPagedResponse(input), MoreExecutors.directExecutor()); + } + + private ListDraftsPagedResponse(ListDraftsPage page) { + super(page, ListDraftsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListDraftsPage + extends AbstractPage { + + private ListDraftsPage( + PageContext context, + ListDraftsResponse response) { + super(context, response); + } + + private static ListDraftsPage createEmptyPage() { + return new ListDraftsPage(null, null); + } + + @Override + protected ListDraftsPage createPage( + PageContext context, + ListDraftsResponse response) { + return new ListDraftsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListDraftsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListDraftsRequest, + ListDraftsResponse, + Draft, + ListDraftsPage, + ListDraftsFixedSizeCollection> { + + private ListDraftsFixedSizeCollection(List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListDraftsFixedSizeCollection createEmptyCollection() { + return new ListDraftsFixedSizeCollection(null, 0); + } + + @Override + protected ListDraftsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListDraftsFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListProcessorsPagedResponse + extends AbstractPagedListResponse< + ListProcessorsRequest, + ListProcessorsResponse, + Processor, + ListProcessorsPage, + ListProcessorsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListProcessorsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListProcessorsPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListProcessorsPagedResponse(ListProcessorsPage page) { + super(page, ListProcessorsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListProcessorsPage + extends AbstractPage< + ListProcessorsRequest, ListProcessorsResponse, Processor, ListProcessorsPage> { + + private ListProcessorsPage( + PageContext context, + ListProcessorsResponse response) { + super(context, response); + } + + private static ListProcessorsPage createEmptyPage() { + return new ListProcessorsPage(null, null); + } + + @Override + protected ListProcessorsPage createPage( + PageContext context, + ListProcessorsResponse response) { + return new ListProcessorsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListProcessorsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListProcessorsRequest, + ListProcessorsResponse, + Processor, + ListProcessorsPage, + ListProcessorsFixedSizeCollection> { + + private ListProcessorsFixedSizeCollection(List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListProcessorsFixedSizeCollection createEmptyCollection() { + return new ListProcessorsFixedSizeCollection(null, 0); + } + + @Override + protected ListProcessorsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListProcessorsFixedSizeCollection(pages, collectionSize); + } + } +} diff --git a/java-visionai/google-cloud-visionai/src/main/java/com/google/cloud/visionai/v1/AppPlatformSettings.java b/java-visionai/google-cloud-visionai/src/main/java/com/google/cloud/visionai/v1/AppPlatformSettings.java new file mode 100644 index 000000000000..4ea4e010bde2 --- /dev/null +++ b/java-visionai/google-cloud-visionai/src/main/java/com/google/cloud/visionai/v1/AppPlatformSettings.java @@ -0,0 +1,728 @@ +/* + * Copyright 2024 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.visionai.v1; + +import static com.google.cloud.visionai.v1.AppPlatformClient.ListApplicationsPagedResponse; +import static com.google.cloud.visionai.v1.AppPlatformClient.ListDraftsPagedResponse; +import static com.google.cloud.visionai.v1.AppPlatformClient.ListInstancesPagedResponse; +import static com.google.cloud.visionai.v1.AppPlatformClient.ListProcessorsPagedResponse; + +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.httpjson.InstantiatingHttpJsonChannelProvider; +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.PagedCallSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.cloud.visionai.v1.stub.AppPlatformStubSettings; +import com.google.longrunning.Operation; +import com.google.protobuf.Empty; +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 AppPlatformClient}. + * + *

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

    + *
  • The default service address (visionai.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 getApplication to 30 seconds: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * AppPlatformSettings.Builder appPlatformSettingsBuilder = AppPlatformSettings.newBuilder();
+ * appPlatformSettingsBuilder
+ *     .getApplicationSettings()
+ *     .setRetrySettings(
+ *         appPlatformSettingsBuilder
+ *             .getApplicationSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * AppPlatformSettings appPlatformSettings = appPlatformSettingsBuilder.build();
+ * }
+ */ +@Generated("by gapic-generator-java") +public class AppPlatformSettings extends ClientSettings { + + /** Returns the object with the settings used for calls to listApplications. */ + public PagedCallSettings< + ListApplicationsRequest, ListApplicationsResponse, ListApplicationsPagedResponse> + listApplicationsSettings() { + return ((AppPlatformStubSettings) getStubSettings()).listApplicationsSettings(); + } + + /** Returns the object with the settings used for calls to getApplication. */ + public UnaryCallSettings getApplicationSettings() { + return ((AppPlatformStubSettings) getStubSettings()).getApplicationSettings(); + } + + /** Returns the object with the settings used for calls to createApplication. */ + public UnaryCallSettings createApplicationSettings() { + return ((AppPlatformStubSettings) getStubSettings()).createApplicationSettings(); + } + + /** Returns the object with the settings used for calls to createApplication. */ + public OperationCallSettings + createApplicationOperationSettings() { + return ((AppPlatformStubSettings) getStubSettings()).createApplicationOperationSettings(); + } + + /** Returns the object with the settings used for calls to updateApplication. */ + public UnaryCallSettings updateApplicationSettings() { + return ((AppPlatformStubSettings) getStubSettings()).updateApplicationSettings(); + } + + /** Returns the object with the settings used for calls to updateApplication. */ + public OperationCallSettings + updateApplicationOperationSettings() { + return ((AppPlatformStubSettings) getStubSettings()).updateApplicationOperationSettings(); + } + + /** Returns the object with the settings used for calls to deleteApplication. */ + public UnaryCallSettings deleteApplicationSettings() { + return ((AppPlatformStubSettings) getStubSettings()).deleteApplicationSettings(); + } + + /** Returns the object with the settings used for calls to deleteApplication. */ + public OperationCallSettings + deleteApplicationOperationSettings() { + return ((AppPlatformStubSettings) getStubSettings()).deleteApplicationOperationSettings(); + } + + /** Returns the object with the settings used for calls to deployApplication. */ + public UnaryCallSettings deployApplicationSettings() { + return ((AppPlatformStubSettings) getStubSettings()).deployApplicationSettings(); + } + + /** Returns the object with the settings used for calls to deployApplication. */ + public OperationCallSettings< + DeployApplicationRequest, DeployApplicationResponse, OperationMetadata> + deployApplicationOperationSettings() { + return ((AppPlatformStubSettings) getStubSettings()).deployApplicationOperationSettings(); + } + + /** Returns the object with the settings used for calls to undeployApplication. */ + public UnaryCallSettings undeployApplicationSettings() { + return ((AppPlatformStubSettings) getStubSettings()).undeployApplicationSettings(); + } + + /** Returns the object with the settings used for calls to undeployApplication. */ + public OperationCallSettings< + UndeployApplicationRequest, UndeployApplicationResponse, OperationMetadata> + undeployApplicationOperationSettings() { + return ((AppPlatformStubSettings) getStubSettings()).undeployApplicationOperationSettings(); + } + + /** Returns the object with the settings used for calls to addApplicationStreamInput. */ + public UnaryCallSettings + addApplicationStreamInputSettings() { + return ((AppPlatformStubSettings) getStubSettings()).addApplicationStreamInputSettings(); + } + + /** Returns the object with the settings used for calls to addApplicationStreamInput. */ + public OperationCallSettings< + AddApplicationStreamInputRequest, AddApplicationStreamInputResponse, OperationMetadata> + addApplicationStreamInputOperationSettings() { + return ((AppPlatformStubSettings) getStubSettings()) + .addApplicationStreamInputOperationSettings(); + } + + /** Returns the object with the settings used for calls to removeApplicationStreamInput. */ + public UnaryCallSettings + removeApplicationStreamInputSettings() { + return ((AppPlatformStubSettings) getStubSettings()).removeApplicationStreamInputSettings(); + } + + /** Returns the object with the settings used for calls to removeApplicationStreamInput. */ + public OperationCallSettings< + RemoveApplicationStreamInputRequest, + RemoveApplicationStreamInputResponse, + OperationMetadata> + removeApplicationStreamInputOperationSettings() { + return ((AppPlatformStubSettings) getStubSettings()) + .removeApplicationStreamInputOperationSettings(); + } + + /** Returns the object with the settings used for calls to updateApplicationStreamInput. */ + public UnaryCallSettings + updateApplicationStreamInputSettings() { + return ((AppPlatformStubSettings) getStubSettings()).updateApplicationStreamInputSettings(); + } + + /** Returns the object with the settings used for calls to updateApplicationStreamInput. */ + public OperationCallSettings< + UpdateApplicationStreamInputRequest, + UpdateApplicationStreamInputResponse, + OperationMetadata> + updateApplicationStreamInputOperationSettings() { + return ((AppPlatformStubSettings) getStubSettings()) + .updateApplicationStreamInputOperationSettings(); + } + + /** Returns the object with the settings used for calls to listInstances. */ + public PagedCallSettings + listInstancesSettings() { + return ((AppPlatformStubSettings) getStubSettings()).listInstancesSettings(); + } + + /** Returns the object with the settings used for calls to getInstance. */ + public UnaryCallSettings getInstanceSettings() { + return ((AppPlatformStubSettings) getStubSettings()).getInstanceSettings(); + } + + /** Returns the object with the settings used for calls to createApplicationInstances. */ + public UnaryCallSettings + createApplicationInstancesSettings() { + return ((AppPlatformStubSettings) getStubSettings()).createApplicationInstancesSettings(); + } + + /** Returns the object with the settings used for calls to createApplicationInstances. */ + public OperationCallSettings< + CreateApplicationInstancesRequest, CreateApplicationInstancesResponse, OperationMetadata> + createApplicationInstancesOperationSettings() { + return ((AppPlatformStubSettings) getStubSettings()) + .createApplicationInstancesOperationSettings(); + } + + /** Returns the object with the settings used for calls to deleteApplicationInstances. */ + public UnaryCallSettings + deleteApplicationInstancesSettings() { + return ((AppPlatformStubSettings) getStubSettings()).deleteApplicationInstancesSettings(); + } + + /** Returns the object with the settings used for calls to deleteApplicationInstances. */ + public OperationCallSettings + deleteApplicationInstancesOperationSettings() { + return ((AppPlatformStubSettings) getStubSettings()) + .deleteApplicationInstancesOperationSettings(); + } + + /** Returns the object with the settings used for calls to updateApplicationInstances. */ + public UnaryCallSettings + updateApplicationInstancesSettings() { + return ((AppPlatformStubSettings) getStubSettings()).updateApplicationInstancesSettings(); + } + + /** Returns the object with the settings used for calls to updateApplicationInstances. */ + public OperationCallSettings< + UpdateApplicationInstancesRequest, UpdateApplicationInstancesResponse, OperationMetadata> + updateApplicationInstancesOperationSettings() { + return ((AppPlatformStubSettings) getStubSettings()) + .updateApplicationInstancesOperationSettings(); + } + + /** Returns the object with the settings used for calls to listDrafts. */ + public PagedCallSettings + listDraftsSettings() { + return ((AppPlatformStubSettings) getStubSettings()).listDraftsSettings(); + } + + /** Returns the object with the settings used for calls to getDraft. */ + public UnaryCallSettings getDraftSettings() { + return ((AppPlatformStubSettings) getStubSettings()).getDraftSettings(); + } + + /** Returns the object with the settings used for calls to createDraft. */ + public UnaryCallSettings createDraftSettings() { + return ((AppPlatformStubSettings) getStubSettings()).createDraftSettings(); + } + + /** Returns the object with the settings used for calls to createDraft. */ + public OperationCallSettings + createDraftOperationSettings() { + return ((AppPlatformStubSettings) getStubSettings()).createDraftOperationSettings(); + } + + /** Returns the object with the settings used for calls to updateDraft. */ + public UnaryCallSettings updateDraftSettings() { + return ((AppPlatformStubSettings) getStubSettings()).updateDraftSettings(); + } + + /** Returns the object with the settings used for calls to updateDraft. */ + public OperationCallSettings + updateDraftOperationSettings() { + return ((AppPlatformStubSettings) getStubSettings()).updateDraftOperationSettings(); + } + + /** Returns the object with the settings used for calls to deleteDraft. */ + public UnaryCallSettings deleteDraftSettings() { + return ((AppPlatformStubSettings) getStubSettings()).deleteDraftSettings(); + } + + /** Returns the object with the settings used for calls to deleteDraft. */ + public OperationCallSettings + deleteDraftOperationSettings() { + return ((AppPlatformStubSettings) getStubSettings()).deleteDraftOperationSettings(); + } + + /** Returns the object with the settings used for calls to listProcessors. */ + public PagedCallSettings< + ListProcessorsRequest, ListProcessorsResponse, ListProcessorsPagedResponse> + listProcessorsSettings() { + return ((AppPlatformStubSettings) getStubSettings()).listProcessorsSettings(); + } + + /** Returns the object with the settings used for calls to listPrebuiltProcessors. */ + public UnaryCallSettings + listPrebuiltProcessorsSettings() { + return ((AppPlatformStubSettings) getStubSettings()).listPrebuiltProcessorsSettings(); + } + + /** Returns the object with the settings used for calls to getProcessor. */ + public UnaryCallSettings getProcessorSettings() { + return ((AppPlatformStubSettings) getStubSettings()).getProcessorSettings(); + } + + /** Returns the object with the settings used for calls to createProcessor. */ + public UnaryCallSettings createProcessorSettings() { + return ((AppPlatformStubSettings) getStubSettings()).createProcessorSettings(); + } + + /** Returns the object with the settings used for calls to createProcessor. */ + public OperationCallSettings + createProcessorOperationSettings() { + return ((AppPlatformStubSettings) getStubSettings()).createProcessorOperationSettings(); + } + + /** Returns the object with the settings used for calls to updateProcessor. */ + public UnaryCallSettings updateProcessorSettings() { + return ((AppPlatformStubSettings) getStubSettings()).updateProcessorSettings(); + } + + /** Returns the object with the settings used for calls to updateProcessor. */ + public OperationCallSettings + updateProcessorOperationSettings() { + return ((AppPlatformStubSettings) getStubSettings()).updateProcessorOperationSettings(); + } + + /** Returns the object with the settings used for calls to deleteProcessor. */ + public UnaryCallSettings deleteProcessorSettings() { + return ((AppPlatformStubSettings) getStubSettings()).deleteProcessorSettings(); + } + + /** Returns the object with the settings used for calls to deleteProcessor. */ + public OperationCallSettings + deleteProcessorOperationSettings() { + return ((AppPlatformStubSettings) getStubSettings()).deleteProcessorOperationSettings(); + } + + public static final AppPlatformSettings create(AppPlatformStubSettings stub) throws IOException { + return new AppPlatformSettings.Builder(stub.toBuilder()).build(); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return AppPlatformStubSettings.defaultExecutorProviderBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return AppPlatformStubSettings.getDefaultEndpoint(); + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return AppPlatformStubSettings.getDefaultServiceScopes(); + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return AppPlatformStubSettings.defaultCredentialsProviderBuilder(); + } + + /** Returns a builder for the default gRPC ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return AppPlatformStubSettings.defaultGrpcTransportProviderBuilder(); + } + + /** Returns a builder for the default REST ChannelProvider for this service. */ + @BetaApi + public static InstantiatingHttpJsonChannelProvider.Builder + defaultHttpJsonTransportProviderBuilder() { + return AppPlatformStubSettings.defaultHttpJsonTransportProviderBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return AppPlatformStubSettings.defaultTransportChannelProvider(); + } + + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return AppPlatformStubSettings.defaultApiClientHeaderProviderBuilder(); + } + + /** Returns a new gRPC builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new REST builder for this class. */ + public static Builder newHttpJsonBuilder() { + return Builder.createHttpJsonDefault(); + } + + /** 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 AppPlatformSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + } + + /** Builder for AppPlatformSettings. */ + public static class Builder extends ClientSettings.Builder { + + protected Builder() throws IOException { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(AppPlatformStubSettings.newBuilder(clientContext)); + } + + protected Builder(AppPlatformSettings settings) { + super(settings.getStubSettings().toBuilder()); + } + + protected Builder(AppPlatformStubSettings.Builder stubSettings) { + super(stubSettings); + } + + private static Builder createDefault() { + return new Builder(AppPlatformStubSettings.newBuilder()); + } + + private static Builder createHttpJsonDefault() { + return new Builder(AppPlatformStubSettings.newHttpJsonBuilder()); + } + + public AppPlatformStubSettings.Builder getStubSettingsBuilder() { + return ((AppPlatformStubSettings.Builder) getStubSettings()); + } + + /** + * 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) { + super.applyToAllUnaryMethods( + getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater); + return this; + } + + /** Returns the builder for the settings used for calls to listApplications. */ + public PagedCallSettings.Builder< + ListApplicationsRequest, ListApplicationsResponse, ListApplicationsPagedResponse> + listApplicationsSettings() { + return getStubSettingsBuilder().listApplicationsSettings(); + } + + /** Returns the builder for the settings used for calls to getApplication. */ + public UnaryCallSettings.Builder getApplicationSettings() { + return getStubSettingsBuilder().getApplicationSettings(); + } + + /** Returns the builder for the settings used for calls to createApplication. */ + public UnaryCallSettings.Builder + createApplicationSettings() { + return getStubSettingsBuilder().createApplicationSettings(); + } + + /** Returns the builder for the settings used for calls to createApplication. */ + public OperationCallSettings.Builder + createApplicationOperationSettings() { + return getStubSettingsBuilder().createApplicationOperationSettings(); + } + + /** Returns the builder for the settings used for calls to updateApplication. */ + public UnaryCallSettings.Builder + updateApplicationSettings() { + return getStubSettingsBuilder().updateApplicationSettings(); + } + + /** Returns the builder for the settings used for calls to updateApplication. */ + public OperationCallSettings.Builder + updateApplicationOperationSettings() { + return getStubSettingsBuilder().updateApplicationOperationSettings(); + } + + /** Returns the builder for the settings used for calls to deleteApplication. */ + public UnaryCallSettings.Builder + deleteApplicationSettings() { + return getStubSettingsBuilder().deleteApplicationSettings(); + } + + /** Returns the builder for the settings used for calls to deleteApplication. */ + public OperationCallSettings.Builder + deleteApplicationOperationSettings() { + return getStubSettingsBuilder().deleteApplicationOperationSettings(); + } + + /** Returns the builder for the settings used for calls to deployApplication. */ + public UnaryCallSettings.Builder + deployApplicationSettings() { + return getStubSettingsBuilder().deployApplicationSettings(); + } + + /** Returns the builder for the settings used for calls to deployApplication. */ + public OperationCallSettings.Builder< + DeployApplicationRequest, DeployApplicationResponse, OperationMetadata> + deployApplicationOperationSettings() { + return getStubSettingsBuilder().deployApplicationOperationSettings(); + } + + /** Returns the builder for the settings used for calls to undeployApplication. */ + public UnaryCallSettings.Builder + undeployApplicationSettings() { + return getStubSettingsBuilder().undeployApplicationSettings(); + } + + /** Returns the builder for the settings used for calls to undeployApplication. */ + public OperationCallSettings.Builder< + UndeployApplicationRequest, UndeployApplicationResponse, OperationMetadata> + undeployApplicationOperationSettings() { + return getStubSettingsBuilder().undeployApplicationOperationSettings(); + } + + /** Returns the builder for the settings used for calls to addApplicationStreamInput. */ + public UnaryCallSettings.Builder + addApplicationStreamInputSettings() { + return getStubSettingsBuilder().addApplicationStreamInputSettings(); + } + + /** Returns the builder for the settings used for calls to addApplicationStreamInput. */ + public OperationCallSettings.Builder< + AddApplicationStreamInputRequest, AddApplicationStreamInputResponse, OperationMetadata> + addApplicationStreamInputOperationSettings() { + return getStubSettingsBuilder().addApplicationStreamInputOperationSettings(); + } + + /** Returns the builder for the settings used for calls to removeApplicationStreamInput. */ + public UnaryCallSettings.Builder + removeApplicationStreamInputSettings() { + return getStubSettingsBuilder().removeApplicationStreamInputSettings(); + } + + /** Returns the builder for the settings used for calls to removeApplicationStreamInput. */ + public OperationCallSettings.Builder< + RemoveApplicationStreamInputRequest, + RemoveApplicationStreamInputResponse, + OperationMetadata> + removeApplicationStreamInputOperationSettings() { + return getStubSettingsBuilder().removeApplicationStreamInputOperationSettings(); + } + + /** Returns the builder for the settings used for calls to updateApplicationStreamInput. */ + public UnaryCallSettings.Builder + updateApplicationStreamInputSettings() { + return getStubSettingsBuilder().updateApplicationStreamInputSettings(); + } + + /** Returns the builder for the settings used for calls to updateApplicationStreamInput. */ + public OperationCallSettings.Builder< + UpdateApplicationStreamInputRequest, + UpdateApplicationStreamInputResponse, + OperationMetadata> + updateApplicationStreamInputOperationSettings() { + return getStubSettingsBuilder().updateApplicationStreamInputOperationSettings(); + } + + /** Returns the builder for the settings used for calls to listInstances. */ + public PagedCallSettings.Builder< + ListInstancesRequest, ListInstancesResponse, ListInstancesPagedResponse> + listInstancesSettings() { + return getStubSettingsBuilder().listInstancesSettings(); + } + + /** Returns the builder for the settings used for calls to getInstance. */ + public UnaryCallSettings.Builder getInstanceSettings() { + return getStubSettingsBuilder().getInstanceSettings(); + } + + /** Returns the builder for the settings used for calls to createApplicationInstances. */ + public UnaryCallSettings.Builder + createApplicationInstancesSettings() { + return getStubSettingsBuilder().createApplicationInstancesSettings(); + } + + /** Returns the builder for the settings used for calls to createApplicationInstances. */ + public OperationCallSettings.Builder< + CreateApplicationInstancesRequest, + CreateApplicationInstancesResponse, + OperationMetadata> + createApplicationInstancesOperationSettings() { + return getStubSettingsBuilder().createApplicationInstancesOperationSettings(); + } + + /** Returns the builder for the settings used for calls to deleteApplicationInstances. */ + public UnaryCallSettings.Builder + deleteApplicationInstancesSettings() { + return getStubSettingsBuilder().deleteApplicationInstancesSettings(); + } + + /** Returns the builder for the settings used for calls to deleteApplicationInstances. */ + public OperationCallSettings.Builder< + DeleteApplicationInstancesRequest, Instance, OperationMetadata> + deleteApplicationInstancesOperationSettings() { + return getStubSettingsBuilder().deleteApplicationInstancesOperationSettings(); + } + + /** Returns the builder for the settings used for calls to updateApplicationInstances. */ + public UnaryCallSettings.Builder + updateApplicationInstancesSettings() { + return getStubSettingsBuilder().updateApplicationInstancesSettings(); + } + + /** Returns the builder for the settings used for calls to updateApplicationInstances. */ + public OperationCallSettings.Builder< + UpdateApplicationInstancesRequest, + UpdateApplicationInstancesResponse, + OperationMetadata> + updateApplicationInstancesOperationSettings() { + return getStubSettingsBuilder().updateApplicationInstancesOperationSettings(); + } + + /** Returns the builder for the settings used for calls to listDrafts. */ + public PagedCallSettings.Builder + listDraftsSettings() { + return getStubSettingsBuilder().listDraftsSettings(); + } + + /** Returns the builder for the settings used for calls to getDraft. */ + public UnaryCallSettings.Builder getDraftSettings() { + return getStubSettingsBuilder().getDraftSettings(); + } + + /** Returns the builder for the settings used for calls to createDraft. */ + public UnaryCallSettings.Builder createDraftSettings() { + return getStubSettingsBuilder().createDraftSettings(); + } + + /** Returns the builder for the settings used for calls to createDraft. */ + public OperationCallSettings.Builder + createDraftOperationSettings() { + return getStubSettingsBuilder().createDraftOperationSettings(); + } + + /** Returns the builder for the settings used for calls to updateDraft. */ + public UnaryCallSettings.Builder updateDraftSettings() { + return getStubSettingsBuilder().updateDraftSettings(); + } + + /** Returns the builder for the settings used for calls to updateDraft. */ + public OperationCallSettings.Builder + updateDraftOperationSettings() { + return getStubSettingsBuilder().updateDraftOperationSettings(); + } + + /** Returns the builder for the settings used for calls to deleteDraft. */ + public UnaryCallSettings.Builder deleteDraftSettings() { + return getStubSettingsBuilder().deleteDraftSettings(); + } + + /** Returns the builder for the settings used for calls to deleteDraft. */ + public OperationCallSettings.Builder + deleteDraftOperationSettings() { + return getStubSettingsBuilder().deleteDraftOperationSettings(); + } + + /** Returns the builder for the settings used for calls to listProcessors. */ + public PagedCallSettings.Builder< + ListProcessorsRequest, ListProcessorsResponse, ListProcessorsPagedResponse> + listProcessorsSettings() { + return getStubSettingsBuilder().listProcessorsSettings(); + } + + /** Returns the builder for the settings used for calls to listPrebuiltProcessors. */ + public UnaryCallSettings.Builder + listPrebuiltProcessorsSettings() { + return getStubSettingsBuilder().listPrebuiltProcessorsSettings(); + } + + /** Returns the builder for the settings used for calls to getProcessor. */ + public UnaryCallSettings.Builder getProcessorSettings() { + return getStubSettingsBuilder().getProcessorSettings(); + } + + /** Returns the builder for the settings used for calls to createProcessor. */ + public UnaryCallSettings.Builder createProcessorSettings() { + return getStubSettingsBuilder().createProcessorSettings(); + } + + /** Returns the builder for the settings used for calls to createProcessor. */ + public OperationCallSettings.Builder + createProcessorOperationSettings() { + return getStubSettingsBuilder().createProcessorOperationSettings(); + } + + /** Returns the builder for the settings used for calls to updateProcessor. */ + public UnaryCallSettings.Builder updateProcessorSettings() { + return getStubSettingsBuilder().updateProcessorSettings(); + } + + /** Returns the builder for the settings used for calls to updateProcessor. */ + public OperationCallSettings.Builder + updateProcessorOperationSettings() { + return getStubSettingsBuilder().updateProcessorOperationSettings(); + } + + /** Returns the builder for the settings used for calls to deleteProcessor. */ + public UnaryCallSettings.Builder deleteProcessorSettings() { + return getStubSettingsBuilder().deleteProcessorSettings(); + } + + /** Returns the builder for the settings used for calls to deleteProcessor. */ + public OperationCallSettings.Builder + deleteProcessorOperationSettings() { + return getStubSettingsBuilder().deleteProcessorOperationSettings(); + } + + @Override + public AppPlatformSettings build() throws IOException { + return new AppPlatformSettings(this); + } + } +} diff --git a/java-visionai/google-cloud-visionai/src/main/java/com/google/cloud/visionai/v1/HealthCheckServiceClient.java b/java-visionai/google-cloud-visionai/src/main/java/com/google/cloud/visionai/v1/HealthCheckServiceClient.java new file mode 100644 index 000000000000..8e8b12315e9e --- /dev/null +++ b/java-visionai/google-cloud-visionai/src/main/java/com/google/cloud/visionai/v1/HealthCheckServiceClient.java @@ -0,0 +1,268 @@ +/* + * Copyright 2024 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.visionai.v1; + +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.visionai.v1.stub.HealthCheckServiceStub; +import com.google.cloud.visionai.v1.stub.HealthCheckServiceStubSettings; +import java.io.IOException; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Service Description: HealthCheckService provides an interface for Vertex AI Vision Cluster Health + * Check. + * + *

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: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (HealthCheckServiceClient healthCheckServiceClient = HealthCheckServiceClient.create()) {
+ *   HealthCheckRequest request =
+ *       HealthCheckRequest.newBuilder()
+ *           .setCluster(ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString())
+ *           .build();
+ *   HealthCheckResponse response = healthCheckServiceClient.healthCheck(request);
+ * }
+ * }
+ * + *

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

HealthCheck

HealthCheck method checks the health status of the cluster.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • healthCheck(HealthCheckRequest request) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • healthCheckCallable() + *

+ *
+ * + *

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 HealthCheckServiceSettings to + * create(). For example: + * + *

To customize credentials: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * HealthCheckServiceSettings healthCheckServiceSettings =
+ *     HealthCheckServiceSettings.newBuilder()
+ *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ *         .build();
+ * HealthCheckServiceClient healthCheckServiceClient =
+ *     HealthCheckServiceClient.create(healthCheckServiceSettings);
+ * }
+ * + *

To customize the endpoint: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * HealthCheckServiceSettings healthCheckServiceSettings =
+ *     HealthCheckServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
+ * HealthCheckServiceClient healthCheckServiceClient =
+ *     HealthCheckServiceClient.create(healthCheckServiceSettings);
+ * }
+ * + *

To use REST (HTTP1.1/JSON) transport (instead of gRPC) for sending and receiving requests over + * the wire: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * HealthCheckServiceSettings healthCheckServiceSettings =
+ *     HealthCheckServiceSettings.newHttpJsonBuilder().build();
+ * HealthCheckServiceClient healthCheckServiceClient =
+ *     HealthCheckServiceClient.create(healthCheckServiceSettings);
+ * }
+ * + *

Please refer to the GitHub repository's samples for more quickstart code snippets. + */ +@Generated("by gapic-generator-java") +public class HealthCheckServiceClient implements BackgroundResource { + private final HealthCheckServiceSettings settings; + private final HealthCheckServiceStub stub; + + /** Constructs an instance of HealthCheckServiceClient with default settings. */ + public static final HealthCheckServiceClient create() throws IOException { + return create(HealthCheckServiceSettings.newBuilder().build()); + } + + /** + * Constructs an instance of HealthCheckServiceClient, 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 HealthCheckServiceClient create(HealthCheckServiceSettings settings) + throws IOException { + return new HealthCheckServiceClient(settings); + } + + /** + * Constructs an instance of HealthCheckServiceClient, using the given stub for making calls. This + * is for advanced usage - prefer using create(HealthCheckServiceSettings). + */ + public static final HealthCheckServiceClient create(HealthCheckServiceStub stub) { + return new HealthCheckServiceClient(stub); + } + + /** + * Constructs an instance of HealthCheckServiceClient, 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 HealthCheckServiceClient(HealthCheckServiceSettings settings) throws IOException { + this.settings = settings; + this.stub = ((HealthCheckServiceStubSettings) settings.getStubSettings()).createStub(); + } + + protected HealthCheckServiceClient(HealthCheckServiceStub stub) { + this.settings = null; + this.stub = stub; + } + + public final HealthCheckServiceSettings getSettings() { + return settings; + } + + public HealthCheckServiceStub getStub() { + return stub; + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * HealthCheck method checks the health status of the cluster. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (HealthCheckServiceClient healthCheckServiceClient = HealthCheckServiceClient.create()) {
+   *   HealthCheckRequest request =
+   *       HealthCheckRequest.newBuilder()
+   *           .setCluster(ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString())
+   *           .build();
+   *   HealthCheckResponse response = healthCheckServiceClient.healthCheck(request);
+   * }
+   * }
+ * + * @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 + */ + public final HealthCheckResponse healthCheck(HealthCheckRequest request) { + return healthCheckCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * HealthCheck method checks the health status of the cluster. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (HealthCheckServiceClient healthCheckServiceClient = HealthCheckServiceClient.create()) {
+   *   HealthCheckRequest request =
+   *       HealthCheckRequest.newBuilder()
+   *           .setCluster(ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString())
+   *           .build();
+   *   ApiFuture future =
+   *       healthCheckServiceClient.healthCheckCallable().futureCall(request);
+   *   // Do something.
+   *   HealthCheckResponse response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable healthCheckCallable() { + return stub.healthCheckCallable(); + } + + @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/java-visionai/google-cloud-visionai/src/main/java/com/google/cloud/visionai/v1/HealthCheckServiceSettings.java b/java-visionai/google-cloud-visionai/src/main/java/com/google/cloud/visionai/v1/HealthCheckServiceSettings.java new file mode 100644 index 000000000000..db04cb8679c8 --- /dev/null +++ b/java-visionai/google-cloud-visionai/src/main/java/com/google/cloud/visionai/v1/HealthCheckServiceSettings.java @@ -0,0 +1,204 @@ +/* + * Copyright 2024 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.visionai.v1; + +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.httpjson.InstantiatingHttpJsonChannelProvider; +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.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.cloud.visionai.v1.stub.HealthCheckServiceStubSettings; +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 HealthCheckServiceClient}. + * + *

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

    + *
  • The default service address (visionai.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 healthCheck to 30 seconds: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * HealthCheckServiceSettings.Builder healthCheckServiceSettingsBuilder =
+ *     HealthCheckServiceSettings.newBuilder();
+ * healthCheckServiceSettingsBuilder
+ *     .healthCheckSettings()
+ *     .setRetrySettings(
+ *         healthCheckServiceSettingsBuilder
+ *             .healthCheckSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * HealthCheckServiceSettings healthCheckServiceSettings =
+ *     healthCheckServiceSettingsBuilder.build();
+ * }
+ */ +@Generated("by gapic-generator-java") +public class HealthCheckServiceSettings extends ClientSettings { + + /** Returns the object with the settings used for calls to healthCheck. */ + public UnaryCallSettings healthCheckSettings() { + return ((HealthCheckServiceStubSettings) getStubSettings()).healthCheckSettings(); + } + + public static final HealthCheckServiceSettings create(HealthCheckServiceStubSettings stub) + throws IOException { + return new HealthCheckServiceSettings.Builder(stub.toBuilder()).build(); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return HealthCheckServiceStubSettings.defaultExecutorProviderBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return HealthCheckServiceStubSettings.getDefaultEndpoint(); + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return HealthCheckServiceStubSettings.getDefaultServiceScopes(); + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return HealthCheckServiceStubSettings.defaultCredentialsProviderBuilder(); + } + + /** Returns a builder for the default gRPC ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return HealthCheckServiceStubSettings.defaultGrpcTransportProviderBuilder(); + } + + /** Returns a builder for the default REST ChannelProvider for this service. */ + @BetaApi + public static InstantiatingHttpJsonChannelProvider.Builder + defaultHttpJsonTransportProviderBuilder() { + return HealthCheckServiceStubSettings.defaultHttpJsonTransportProviderBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return HealthCheckServiceStubSettings.defaultTransportChannelProvider(); + } + + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return HealthCheckServiceStubSettings.defaultApiClientHeaderProviderBuilder(); + } + + /** Returns a new gRPC builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new REST builder for this class. */ + public static Builder newHttpJsonBuilder() { + return Builder.createHttpJsonDefault(); + } + + /** 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 HealthCheckServiceSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + } + + /** Builder for HealthCheckServiceSettings. */ + public static class Builder extends ClientSettings.Builder { + + protected Builder() throws IOException { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(HealthCheckServiceStubSettings.newBuilder(clientContext)); + } + + protected Builder(HealthCheckServiceSettings settings) { + super(settings.getStubSettings().toBuilder()); + } + + protected Builder(HealthCheckServiceStubSettings.Builder stubSettings) { + super(stubSettings); + } + + private static Builder createDefault() { + return new Builder(HealthCheckServiceStubSettings.newBuilder()); + } + + private static Builder createHttpJsonDefault() { + return new Builder(HealthCheckServiceStubSettings.newHttpJsonBuilder()); + } + + public HealthCheckServiceStubSettings.Builder getStubSettingsBuilder() { + return ((HealthCheckServiceStubSettings.Builder) getStubSettings()); + } + + /** + * 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) { + super.applyToAllUnaryMethods( + getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater); + return this; + } + + /** Returns the builder for the settings used for calls to healthCheck. */ + public UnaryCallSettings.Builder + healthCheckSettings() { + return getStubSettingsBuilder().healthCheckSettings(); + } + + @Override + public HealthCheckServiceSettings build() throws IOException { + return new HealthCheckServiceSettings(this); + } + } +} diff --git a/java-visionai/google-cloud-visionai/src/main/java/com/google/cloud/visionai/v1/LiveVideoAnalyticsClient.java b/java-visionai/google-cloud-visionai/src/main/java/com/google/cloud/visionai/v1/LiveVideoAnalyticsClient.java new file mode 100644 index 000000000000..1987ff6aa7c2 --- /dev/null +++ b/java-visionai/google-cloud-visionai/src/main/java/com/google/cloud/visionai/v1/LiveVideoAnalyticsClient.java @@ -0,0 +1,3504 @@ +/* + * Copyright 2024 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.visionai.v1; + +import com.google.api.core.ApiFuture; +import com.google.api.core.ApiFutures; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.httpjson.longrunning.OperationsClient; +import com.google.api.gax.longrunning.OperationFuture; +import com.google.api.gax.paging.AbstractFixedSizeCollection; +import com.google.api.gax.paging.AbstractPage; +import com.google.api.gax.paging.AbstractPagedListResponse; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PageContext; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.visionai.v1.stub.LiveVideoAnalyticsStub; +import com.google.cloud.visionai.v1.stub.LiveVideoAnalyticsStubSettings; +import com.google.common.util.concurrent.MoreExecutors; +import com.google.longrunning.Operation; +import com.google.protobuf.Empty; +import com.google.protobuf.FieldMask; +import java.io.IOException; +import java.util.List; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Service Description: Service describing handlers for resources. The service enables clients to + * run Live Video Analytics (LVA) on the streaming inputs. + * + *

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: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (LiveVideoAnalyticsClient liveVideoAnalyticsClient = LiveVideoAnalyticsClient.create()) {
+ *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+ *   List queries = new ArrayList<>();
+ *   ResolveOperatorInfoResponse response =
+ *       liveVideoAnalyticsClient.resolveOperatorInfo(parent, queries);
+ * }
+ * }
+ * + *

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

ListPublicOperators

ListPublicOperators returns all the operators in public registry.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • listPublicOperators(ListPublicOperatorsRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • listPublicOperators(LocationName parent) + *

  • listPublicOperators(String parent) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • listPublicOperatorsPagedCallable() + *

  • listPublicOperatorsCallable() + *

+ *

ResolveOperatorInfo

ResolveOperatorInfo returns the operator information based on the request.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • resolveOperatorInfo(ResolveOperatorInfoRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • resolveOperatorInfo(LocationName parent, List<OperatorQuery> queries) + *

  • resolveOperatorInfo(String parent, List<OperatorQuery> queries) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • resolveOperatorInfoCallable() + *

+ *

ListOperators

Lists Operators in a given project and location.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • listOperators(ListOperatorsRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • listOperators(LocationName parent) + *

  • listOperators(String parent) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • listOperatorsPagedCallable() + *

  • listOperatorsCallable() + *

+ *

GetOperator

Gets details of a single Operator.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • getOperator(GetOperatorRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • getOperator(OperatorName name) + *

  • getOperator(String name) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • getOperatorCallable() + *

+ *

CreateOperator

Creates a new Operator in a given project and location.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • createOperatorAsync(CreateOperatorRequest request) + *

+ *

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

+ *
    + *
  • createOperatorAsync(LocationName parent, Operator operator, String operatorId) + *

  • createOperatorAsync(String parent, Operator operator, String operatorId) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • createOperatorOperationCallable() + *

  • createOperatorCallable() + *

+ *

UpdateOperator

Updates the parameters of a single Operator.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • updateOperatorAsync(UpdateOperatorRequest request) + *

+ *

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

+ *
    + *
  • updateOperatorAsync(Operator operator, FieldMask updateMask) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • updateOperatorOperationCallable() + *

  • updateOperatorCallable() + *

+ *

DeleteOperator

Deletes a single Operator.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • deleteOperatorAsync(DeleteOperatorRequest request) + *

+ *

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

+ *
    + *
  • deleteOperatorAsync(OperatorName name) + *

  • deleteOperatorAsync(String name) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • deleteOperatorOperationCallable() + *

  • deleteOperatorCallable() + *

+ *

ListAnalyses

Lists Analyses in a given project and location.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • listAnalyses(ListAnalysesRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • listAnalyses(ClusterName parent) + *

  • listAnalyses(String parent) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • listAnalysesPagedCallable() + *

  • listAnalysesCallable() + *

+ *

GetAnalysis

Gets details of a single Analysis.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • getAnalysis(GetAnalysisRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • getAnalysis(AnalysisName name) + *

  • getAnalysis(String name) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • getAnalysisCallable() + *

+ *

CreateAnalysis

Creates a new Analysis in a given project and location.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • createAnalysisAsync(CreateAnalysisRequest request) + *

+ *

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

+ *
    + *
  • createAnalysisAsync(ClusterName parent, Analysis analysis, String analysisId) + *

  • createAnalysisAsync(String parent, Analysis analysis, String analysisId) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • createAnalysisOperationCallable() + *

  • createAnalysisCallable() + *

+ *

UpdateAnalysis

Updates the parameters of a single Analysis.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • updateAnalysisAsync(UpdateAnalysisRequest request) + *

+ *

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

+ *
    + *
  • updateAnalysisAsync(Analysis analysis, FieldMask updateMask) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • updateAnalysisOperationCallable() + *

  • updateAnalysisCallable() + *

+ *

DeleteAnalysis

Deletes a single Analysis.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • deleteAnalysisAsync(DeleteAnalysisRequest request) + *

+ *

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

+ *
    + *
  • deleteAnalysisAsync(AnalysisName name) + *

  • deleteAnalysisAsync(String name) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • deleteAnalysisOperationCallable() + *

  • deleteAnalysisCallable() + *

+ *

ListProcesses

Lists Processes in a given project and location.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • listProcesses(ListProcessesRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • listProcesses(ClusterName parent) + *

  • listProcesses(String parent) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • listProcessesPagedCallable() + *

  • listProcessesCallable() + *

+ *

GetProcess

Gets details of a single Process.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • getProcess(GetProcessRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • getProcess(ProcessName name) + *

  • getProcess(String name) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • getProcessCallable() + *

+ *

CreateProcess

Creates a new Process in a given project and location.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • createProcessAsync(CreateProcessRequest request) + *

+ *

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

+ *
    + *
  • createProcessAsync(ClusterName parent, Process process, String processId) + *

  • createProcessAsync(String parent, Process process, String processId) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • createProcessOperationCallable() + *

  • createProcessCallable() + *

+ *

UpdateProcess

Updates the parameters of a single Process.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • updateProcessAsync(UpdateProcessRequest request) + *

+ *

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

+ *
    + *
  • updateProcessAsync(Process process, FieldMask updateMask) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • updateProcessOperationCallable() + *

  • updateProcessCallable() + *

+ *

DeleteProcess

Deletes a single Process.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • deleteProcessAsync(DeleteProcessRequest request) + *

+ *

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

+ *
    + *
  • deleteProcessAsync(ProcessName name) + *

  • deleteProcessAsync(String name) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • deleteProcessOperationCallable() + *

  • deleteProcessCallable() + *

+ *

BatchRunProcess

Run all of the processes to "completion". Max time for each process is the LRO time limit.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • batchRunProcessAsync(ClusterName parent, List<CreateProcessRequest> requests) + *

  • batchRunProcessAsync(String parent, List<CreateProcessRequest> requests) + *

  • batchRunProcessAsync(BatchRunProcessRequest request) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • batchRunProcessOperationCallable() + *

  • batchRunProcessCallable() + *

+ *
+ * + *

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 LiveVideoAnalyticsSettings to + * create(). For example: + * + *

To customize credentials: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * LiveVideoAnalyticsSettings liveVideoAnalyticsSettings =
+ *     LiveVideoAnalyticsSettings.newBuilder()
+ *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ *         .build();
+ * LiveVideoAnalyticsClient liveVideoAnalyticsClient =
+ *     LiveVideoAnalyticsClient.create(liveVideoAnalyticsSettings);
+ * }
+ * + *

To customize the endpoint: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * LiveVideoAnalyticsSettings liveVideoAnalyticsSettings =
+ *     LiveVideoAnalyticsSettings.newBuilder().setEndpoint(myEndpoint).build();
+ * LiveVideoAnalyticsClient liveVideoAnalyticsClient =
+ *     LiveVideoAnalyticsClient.create(liveVideoAnalyticsSettings);
+ * }
+ * + *

To use REST (HTTP1.1/JSON) transport (instead of gRPC) for sending and receiving requests over + * the wire: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * LiveVideoAnalyticsSettings liveVideoAnalyticsSettings =
+ *     LiveVideoAnalyticsSettings.newHttpJsonBuilder().build();
+ * LiveVideoAnalyticsClient liveVideoAnalyticsClient =
+ *     LiveVideoAnalyticsClient.create(liveVideoAnalyticsSettings);
+ * }
+ * + *

Please refer to the GitHub repository's samples for more quickstart code snippets. + */ +@Generated("by gapic-generator-java") +public class LiveVideoAnalyticsClient implements BackgroundResource { + private final LiveVideoAnalyticsSettings settings; + private final LiveVideoAnalyticsStub stub; + private final OperationsClient httpJsonOperationsClient; + private final com.google.longrunning.OperationsClient operationsClient; + + /** Constructs an instance of LiveVideoAnalyticsClient with default settings. */ + public static final LiveVideoAnalyticsClient create() throws IOException { + return create(LiveVideoAnalyticsSettings.newBuilder().build()); + } + + /** + * Constructs an instance of LiveVideoAnalyticsClient, 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 LiveVideoAnalyticsClient create(LiveVideoAnalyticsSettings settings) + throws IOException { + return new LiveVideoAnalyticsClient(settings); + } + + /** + * Constructs an instance of LiveVideoAnalyticsClient, using the given stub for making calls. This + * is for advanced usage - prefer using create(LiveVideoAnalyticsSettings). + */ + public static final LiveVideoAnalyticsClient create(LiveVideoAnalyticsStub stub) { + return new LiveVideoAnalyticsClient(stub); + } + + /** + * Constructs an instance of LiveVideoAnalyticsClient, 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 LiveVideoAnalyticsClient(LiveVideoAnalyticsSettings settings) throws IOException { + this.settings = settings; + this.stub = ((LiveVideoAnalyticsStubSettings) settings.getStubSettings()).createStub(); + this.operationsClient = + com.google.longrunning.OperationsClient.create(this.stub.getOperationsStub()); + this.httpJsonOperationsClient = OperationsClient.create(this.stub.getHttpJsonOperationsStub()); + } + + protected LiveVideoAnalyticsClient(LiveVideoAnalyticsStub stub) { + this.settings = null; + this.stub = stub; + this.operationsClient = + com.google.longrunning.OperationsClient.create(this.stub.getOperationsStub()); + this.httpJsonOperationsClient = OperationsClient.create(this.stub.getHttpJsonOperationsStub()); + } + + public final LiveVideoAnalyticsSettings getSettings() { + return settings; + } + + public LiveVideoAnalyticsStub 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. + */ + public final com.google.longrunning.OperationsClient getOperationsClient() { + return operationsClient; + } + + /** + * Returns the OperationsClient that can be used to query the status of a long-running operation + * returned by another API method call. + */ + @BetaApi + public final OperationsClient getHttpJsonOperationsClient() { + return httpJsonOperationsClient; + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * ListPublicOperators returns all the operators in public registry. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (LiveVideoAnalyticsClient liveVideoAnalyticsClient = LiveVideoAnalyticsClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   for (Operator element : liveVideoAnalyticsClient.listPublicOperators(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. Parent value for ListPublicOperatorsRequest. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListPublicOperatorsPagedResponse listPublicOperators(LocationName parent) { + ListPublicOperatorsRequest request = + ListPublicOperatorsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listPublicOperators(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * ListPublicOperators returns all the operators in public registry. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (LiveVideoAnalyticsClient liveVideoAnalyticsClient = LiveVideoAnalyticsClient.create()) {
+   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+   *   for (Operator element : liveVideoAnalyticsClient.listPublicOperators(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. Parent value for ListPublicOperatorsRequest. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListPublicOperatorsPagedResponse listPublicOperators(String parent) { + ListPublicOperatorsRequest request = + ListPublicOperatorsRequest.newBuilder().setParent(parent).build(); + return listPublicOperators(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * ListPublicOperators returns all the operators in public registry. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (LiveVideoAnalyticsClient liveVideoAnalyticsClient = LiveVideoAnalyticsClient.create()) {
+   *   ListPublicOperatorsRequest request =
+   *       ListPublicOperatorsRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   for (Operator element : liveVideoAnalyticsClient.listPublicOperators(request).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @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 + */ + public final ListPublicOperatorsPagedResponse listPublicOperators( + ListPublicOperatorsRequest request) { + return listPublicOperatorsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * ListPublicOperators returns all the operators in public registry. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (LiveVideoAnalyticsClient liveVideoAnalyticsClient = LiveVideoAnalyticsClient.create()) {
+   *   ListPublicOperatorsRequest request =
+   *       ListPublicOperatorsRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   ApiFuture future =
+   *       liveVideoAnalyticsClient.listPublicOperatorsPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (Operator element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listPublicOperatorsPagedCallable() { + return stub.listPublicOperatorsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * ListPublicOperators returns all the operators in public registry. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (LiveVideoAnalyticsClient liveVideoAnalyticsClient = LiveVideoAnalyticsClient.create()) {
+   *   ListPublicOperatorsRequest request =
+   *       ListPublicOperatorsRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   while (true) {
+   *     ListPublicOperatorsResponse response =
+   *         liveVideoAnalyticsClient.listPublicOperatorsCallable().call(request);
+   *     for (Operator element : response.getOperatorsList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listPublicOperatorsCallable() { + return stub.listPublicOperatorsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * ResolveOperatorInfo returns the operator information based on the request. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (LiveVideoAnalyticsClient liveVideoAnalyticsClient = LiveVideoAnalyticsClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   List queries = new ArrayList<>();
+   *   ResolveOperatorInfoResponse response =
+   *       liveVideoAnalyticsClient.resolveOperatorInfo(parent, queries);
+   * }
+   * }
+ * + * @param parent Required. Parent value for ResolveOperatorInfoRequest. + * @param queries Required. The operator queries. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ResolveOperatorInfoResponse resolveOperatorInfo( + LocationName parent, List queries) { + ResolveOperatorInfoRequest request = + ResolveOperatorInfoRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .addAllQueries(queries) + .build(); + return resolveOperatorInfo(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * ResolveOperatorInfo returns the operator information based on the request. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (LiveVideoAnalyticsClient liveVideoAnalyticsClient = LiveVideoAnalyticsClient.create()) {
+   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+   *   List queries = new ArrayList<>();
+   *   ResolveOperatorInfoResponse response =
+   *       liveVideoAnalyticsClient.resolveOperatorInfo(parent, queries);
+   * }
+   * }
+ * + * @param parent Required. Parent value for ResolveOperatorInfoRequest. + * @param queries Required. The operator queries. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ResolveOperatorInfoResponse resolveOperatorInfo( + String parent, List queries) { + ResolveOperatorInfoRequest request = + ResolveOperatorInfoRequest.newBuilder().setParent(parent).addAllQueries(queries).build(); + return resolveOperatorInfo(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * ResolveOperatorInfo returns the operator information based on the request. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (LiveVideoAnalyticsClient liveVideoAnalyticsClient = LiveVideoAnalyticsClient.create()) {
+   *   ResolveOperatorInfoRequest request =
+   *       ResolveOperatorInfoRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .addAllQueries(new ArrayList())
+   *           .build();
+   *   ResolveOperatorInfoResponse response = liveVideoAnalyticsClient.resolveOperatorInfo(request);
+   * }
+   * }
+ * + * @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 + */ + public final ResolveOperatorInfoResponse resolveOperatorInfo(ResolveOperatorInfoRequest request) { + return resolveOperatorInfoCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * ResolveOperatorInfo returns the operator information based on the request. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (LiveVideoAnalyticsClient liveVideoAnalyticsClient = LiveVideoAnalyticsClient.create()) {
+   *   ResolveOperatorInfoRequest request =
+   *       ResolveOperatorInfoRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .addAllQueries(new ArrayList())
+   *           .build();
+   *   ApiFuture future =
+   *       liveVideoAnalyticsClient.resolveOperatorInfoCallable().futureCall(request);
+   *   // Do something.
+   *   ResolveOperatorInfoResponse response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + resolveOperatorInfoCallable() { + return stub.resolveOperatorInfoCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Operators in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (LiveVideoAnalyticsClient liveVideoAnalyticsClient = LiveVideoAnalyticsClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   for (Operator element : liveVideoAnalyticsClient.listOperators(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. Parent value for ListOperatorsRequest. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListOperatorsPagedResponse listOperators(LocationName parent) { + ListOperatorsRequest request = + ListOperatorsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listOperators(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Operators in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (LiveVideoAnalyticsClient liveVideoAnalyticsClient = LiveVideoAnalyticsClient.create()) {
+   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+   *   for (Operator element : liveVideoAnalyticsClient.listOperators(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. Parent value for ListOperatorsRequest. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListOperatorsPagedResponse listOperators(String parent) { + ListOperatorsRequest request = ListOperatorsRequest.newBuilder().setParent(parent).build(); + return listOperators(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Operators in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (LiveVideoAnalyticsClient liveVideoAnalyticsClient = LiveVideoAnalyticsClient.create()) {
+   *   ListOperatorsRequest request =
+   *       ListOperatorsRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   for (Operator element : liveVideoAnalyticsClient.listOperators(request).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @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 + */ + public final ListOperatorsPagedResponse listOperators(ListOperatorsRequest request) { + return listOperatorsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Operators in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (LiveVideoAnalyticsClient liveVideoAnalyticsClient = LiveVideoAnalyticsClient.create()) {
+   *   ListOperatorsRequest request =
+   *       ListOperatorsRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   ApiFuture future =
+   *       liveVideoAnalyticsClient.listOperatorsPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (Operator element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listOperatorsPagedCallable() { + return stub.listOperatorsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Operators in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (LiveVideoAnalyticsClient liveVideoAnalyticsClient = LiveVideoAnalyticsClient.create()) {
+   *   ListOperatorsRequest request =
+   *       ListOperatorsRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   while (true) {
+   *     ListOperatorsResponse response =
+   *         liveVideoAnalyticsClient.listOperatorsCallable().call(request);
+   *     for (Operator element : response.getOperatorsList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable listOperatorsCallable() { + return stub.listOperatorsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single Operator. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (LiveVideoAnalyticsClient liveVideoAnalyticsClient = LiveVideoAnalyticsClient.create()) {
+   *   OperatorName name = OperatorName.of("[PROJECT]", "[LOCATION]", "[OPERATOR]");
+   *   Operator response = liveVideoAnalyticsClient.getOperator(name);
+   * }
+   * }
+ * + * @param name Required. Name of the resource. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Operator getOperator(OperatorName name) { + GetOperatorRequest request = + GetOperatorRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return getOperator(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single Operator. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (LiveVideoAnalyticsClient liveVideoAnalyticsClient = LiveVideoAnalyticsClient.create()) {
+   *   String name = OperatorName.of("[PROJECT]", "[LOCATION]", "[OPERATOR]").toString();
+   *   Operator response = liveVideoAnalyticsClient.getOperator(name);
+   * }
+   * }
+ * + * @param name Required. Name of the resource. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Operator getOperator(String name) { + GetOperatorRequest request = GetOperatorRequest.newBuilder().setName(name).build(); + return getOperator(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single Operator. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (LiveVideoAnalyticsClient liveVideoAnalyticsClient = LiveVideoAnalyticsClient.create()) {
+   *   GetOperatorRequest request =
+   *       GetOperatorRequest.newBuilder()
+   *           .setName(OperatorName.of("[PROJECT]", "[LOCATION]", "[OPERATOR]").toString())
+   *           .build();
+   *   Operator response = liveVideoAnalyticsClient.getOperator(request);
+   * }
+   * }
+ * + * @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 + */ + public final Operator getOperator(GetOperatorRequest request) { + return getOperatorCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single Operator. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (LiveVideoAnalyticsClient liveVideoAnalyticsClient = LiveVideoAnalyticsClient.create()) {
+   *   GetOperatorRequest request =
+   *       GetOperatorRequest.newBuilder()
+   *           .setName(OperatorName.of("[PROJECT]", "[LOCATION]", "[OPERATOR]").toString())
+   *           .build();
+   *   ApiFuture future =
+   *       liveVideoAnalyticsClient.getOperatorCallable().futureCall(request);
+   *   // Do something.
+   *   Operator response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getOperatorCallable() { + return stub.getOperatorCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new Operator in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (LiveVideoAnalyticsClient liveVideoAnalyticsClient = LiveVideoAnalyticsClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   Operator operator = Operator.newBuilder().build();
+   *   String operatorId = "operatorId4364511";
+   *   Operator response =
+   *       liveVideoAnalyticsClient.createOperatorAsync(parent, operator, operatorId).get();
+   * }
+   * }
+ * + * @param parent Required. Value for parent. + * @param operator Required. The resource being created. + * @param operatorId Required. Id of the requesting object. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture createOperatorAsync( + LocationName parent, Operator operator, String operatorId) { + CreateOperatorRequest request = + CreateOperatorRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setOperator(operator) + .setOperatorId(operatorId) + .build(); + return createOperatorAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new Operator in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (LiveVideoAnalyticsClient liveVideoAnalyticsClient = LiveVideoAnalyticsClient.create()) {
+   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+   *   Operator operator = Operator.newBuilder().build();
+   *   String operatorId = "operatorId4364511";
+   *   Operator response =
+   *       liveVideoAnalyticsClient.createOperatorAsync(parent, operator, operatorId).get();
+   * }
+   * }
+ * + * @param parent Required. Value for parent. + * @param operator Required. The resource being created. + * @param operatorId Required. Id of the requesting object. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture createOperatorAsync( + String parent, Operator operator, String operatorId) { + CreateOperatorRequest request = + CreateOperatorRequest.newBuilder() + .setParent(parent) + .setOperator(operator) + .setOperatorId(operatorId) + .build(); + return createOperatorAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new Operator in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (LiveVideoAnalyticsClient liveVideoAnalyticsClient = LiveVideoAnalyticsClient.create()) {
+   *   CreateOperatorRequest request =
+   *       CreateOperatorRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setOperatorId("operatorId4364511")
+   *           .setOperator(Operator.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   Operator response = liveVideoAnalyticsClient.createOperatorAsync(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 + */ + public final OperationFuture createOperatorAsync( + CreateOperatorRequest request) { + return createOperatorOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new Operator in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (LiveVideoAnalyticsClient liveVideoAnalyticsClient = LiveVideoAnalyticsClient.create()) {
+   *   CreateOperatorRequest request =
+   *       CreateOperatorRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setOperatorId("operatorId4364511")
+   *           .setOperator(Operator.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   OperationFuture future =
+   *       liveVideoAnalyticsClient.createOperatorOperationCallable().futureCall(request);
+   *   // Do something.
+   *   Operator response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + createOperatorOperationCallable() { + return stub.createOperatorOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new Operator in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (LiveVideoAnalyticsClient liveVideoAnalyticsClient = LiveVideoAnalyticsClient.create()) {
+   *   CreateOperatorRequest request =
+   *       CreateOperatorRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setOperatorId("operatorId4364511")
+   *           .setOperator(Operator.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   ApiFuture future =
+   *       liveVideoAnalyticsClient.createOperatorCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable createOperatorCallable() { + return stub.createOperatorCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the parameters of a single Operator. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (LiveVideoAnalyticsClient liveVideoAnalyticsClient = LiveVideoAnalyticsClient.create()) {
+   *   Operator operator = Operator.newBuilder().build();
+   *   FieldMask updateMask = FieldMask.newBuilder().build();
+   *   Operator response = liveVideoAnalyticsClient.updateOperatorAsync(operator, updateMask).get();
+   * }
+   * }
+ * + * @param operator Required. The resource being updated + * @param updateMask Required. Field mask is used to specify the fields to be overwritten in the + * Operator resource by the update. The fields specified in the update_mask are relative to + * the resource, not the full request. A field will be overwritten if it is in the mask. If + * the user does not provide a mask then all fields will be overwritten. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture updateOperatorAsync( + Operator operator, FieldMask updateMask) { + UpdateOperatorRequest request = + UpdateOperatorRequest.newBuilder().setOperator(operator).setUpdateMask(updateMask).build(); + return updateOperatorAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the parameters of a single Operator. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (LiveVideoAnalyticsClient liveVideoAnalyticsClient = LiveVideoAnalyticsClient.create()) {
+   *   UpdateOperatorRequest request =
+   *       UpdateOperatorRequest.newBuilder()
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .setOperator(Operator.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   Operator response = liveVideoAnalyticsClient.updateOperatorAsync(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 + */ + public final OperationFuture updateOperatorAsync( + UpdateOperatorRequest request) { + return updateOperatorOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the parameters of a single Operator. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (LiveVideoAnalyticsClient liveVideoAnalyticsClient = LiveVideoAnalyticsClient.create()) {
+   *   UpdateOperatorRequest request =
+   *       UpdateOperatorRequest.newBuilder()
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .setOperator(Operator.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   OperationFuture future =
+   *       liveVideoAnalyticsClient.updateOperatorOperationCallable().futureCall(request);
+   *   // Do something.
+   *   Operator response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + updateOperatorOperationCallable() { + return stub.updateOperatorOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the parameters of a single Operator. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (LiveVideoAnalyticsClient liveVideoAnalyticsClient = LiveVideoAnalyticsClient.create()) {
+   *   UpdateOperatorRequest request =
+   *       UpdateOperatorRequest.newBuilder()
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .setOperator(Operator.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   ApiFuture future =
+   *       liveVideoAnalyticsClient.updateOperatorCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable updateOperatorCallable() { + return stub.updateOperatorCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single Operator. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (LiveVideoAnalyticsClient liveVideoAnalyticsClient = LiveVideoAnalyticsClient.create()) {
+   *   OperatorName name = OperatorName.of("[PROJECT]", "[LOCATION]", "[OPERATOR]");
+   *   liveVideoAnalyticsClient.deleteOperatorAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. Name of the resource + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteOperatorAsync(OperatorName name) { + DeleteOperatorRequest request = + DeleteOperatorRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return deleteOperatorAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single Operator. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (LiveVideoAnalyticsClient liveVideoAnalyticsClient = LiveVideoAnalyticsClient.create()) {
+   *   String name = OperatorName.of("[PROJECT]", "[LOCATION]", "[OPERATOR]").toString();
+   *   liveVideoAnalyticsClient.deleteOperatorAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. Name of the resource + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteOperatorAsync(String name) { + DeleteOperatorRequest request = DeleteOperatorRequest.newBuilder().setName(name).build(); + return deleteOperatorAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single Operator. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (LiveVideoAnalyticsClient liveVideoAnalyticsClient = LiveVideoAnalyticsClient.create()) {
+   *   DeleteOperatorRequest request =
+   *       DeleteOperatorRequest.newBuilder()
+   *           .setName(OperatorName.of("[PROJECT]", "[LOCATION]", "[OPERATOR]").toString())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   liveVideoAnalyticsClient.deleteOperatorAsync(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 + */ + public final OperationFuture deleteOperatorAsync( + DeleteOperatorRequest request) { + return deleteOperatorOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single Operator. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (LiveVideoAnalyticsClient liveVideoAnalyticsClient = LiveVideoAnalyticsClient.create()) {
+   *   DeleteOperatorRequest request =
+   *       DeleteOperatorRequest.newBuilder()
+   *           .setName(OperatorName.of("[PROJECT]", "[LOCATION]", "[OPERATOR]").toString())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   OperationFuture future =
+   *       liveVideoAnalyticsClient.deleteOperatorOperationCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final OperationCallable + deleteOperatorOperationCallable() { + return stub.deleteOperatorOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single Operator. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (LiveVideoAnalyticsClient liveVideoAnalyticsClient = LiveVideoAnalyticsClient.create()) {
+   *   DeleteOperatorRequest request =
+   *       DeleteOperatorRequest.newBuilder()
+   *           .setName(OperatorName.of("[PROJECT]", "[LOCATION]", "[OPERATOR]").toString())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   ApiFuture future =
+   *       liveVideoAnalyticsClient.deleteOperatorCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final UnaryCallable deleteOperatorCallable() { + return stub.deleteOperatorCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Analyses in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (LiveVideoAnalyticsClient liveVideoAnalyticsClient = LiveVideoAnalyticsClient.create()) {
+   *   ClusterName parent = ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]");
+   *   for (Analysis element : liveVideoAnalyticsClient.listAnalyses(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. Parent value for ListAnalysesRequest + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListAnalysesPagedResponse listAnalyses(ClusterName parent) { + ListAnalysesRequest request = + ListAnalysesRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listAnalyses(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Analyses in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (LiveVideoAnalyticsClient liveVideoAnalyticsClient = LiveVideoAnalyticsClient.create()) {
+   *   String parent = ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString();
+   *   for (Analysis element : liveVideoAnalyticsClient.listAnalyses(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. Parent value for ListAnalysesRequest + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListAnalysesPagedResponse listAnalyses(String parent) { + ListAnalysesRequest request = ListAnalysesRequest.newBuilder().setParent(parent).build(); + return listAnalyses(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Analyses in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (LiveVideoAnalyticsClient liveVideoAnalyticsClient = LiveVideoAnalyticsClient.create()) {
+   *   ListAnalysesRequest request =
+   *       ListAnalysesRequest.newBuilder()
+   *           .setParent(ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   for (Analysis element : liveVideoAnalyticsClient.listAnalyses(request).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @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 + */ + public final ListAnalysesPagedResponse listAnalyses(ListAnalysesRequest request) { + return listAnalysesPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Analyses in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (LiveVideoAnalyticsClient liveVideoAnalyticsClient = LiveVideoAnalyticsClient.create()) {
+   *   ListAnalysesRequest request =
+   *       ListAnalysesRequest.newBuilder()
+   *           .setParent(ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   ApiFuture future =
+   *       liveVideoAnalyticsClient.listAnalysesPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (Analysis element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listAnalysesPagedCallable() { + return stub.listAnalysesPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Analyses in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (LiveVideoAnalyticsClient liveVideoAnalyticsClient = LiveVideoAnalyticsClient.create()) {
+   *   ListAnalysesRequest request =
+   *       ListAnalysesRequest.newBuilder()
+   *           .setParent(ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   while (true) {
+   *     ListAnalysesResponse response =
+   *         liveVideoAnalyticsClient.listAnalysesCallable().call(request);
+   *     for (Analysis element : response.getAnalysesList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable listAnalysesCallable() { + return stub.listAnalysesCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single Analysis. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (LiveVideoAnalyticsClient liveVideoAnalyticsClient = LiveVideoAnalyticsClient.create()) {
+   *   AnalysisName name = AnalysisName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[ANALYSIS]");
+   *   Analysis response = liveVideoAnalyticsClient.getAnalysis(name);
+   * }
+   * }
+ * + * @param name Required. Name of the resource. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Analysis getAnalysis(AnalysisName name) { + GetAnalysisRequest request = + GetAnalysisRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return getAnalysis(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single Analysis. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (LiveVideoAnalyticsClient liveVideoAnalyticsClient = LiveVideoAnalyticsClient.create()) {
+   *   String name =
+   *       AnalysisName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[ANALYSIS]").toString();
+   *   Analysis response = liveVideoAnalyticsClient.getAnalysis(name);
+   * }
+   * }
+ * + * @param name Required. Name of the resource. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Analysis getAnalysis(String name) { + GetAnalysisRequest request = GetAnalysisRequest.newBuilder().setName(name).build(); + return getAnalysis(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single Analysis. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (LiveVideoAnalyticsClient liveVideoAnalyticsClient = LiveVideoAnalyticsClient.create()) {
+   *   GetAnalysisRequest request =
+   *       GetAnalysisRequest.newBuilder()
+   *           .setName(
+   *               AnalysisName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[ANALYSIS]").toString())
+   *           .build();
+   *   Analysis response = liveVideoAnalyticsClient.getAnalysis(request);
+   * }
+   * }
+ * + * @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 + */ + public final Analysis getAnalysis(GetAnalysisRequest request) { + return getAnalysisCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single Analysis. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (LiveVideoAnalyticsClient liveVideoAnalyticsClient = LiveVideoAnalyticsClient.create()) {
+   *   GetAnalysisRequest request =
+   *       GetAnalysisRequest.newBuilder()
+   *           .setName(
+   *               AnalysisName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[ANALYSIS]").toString())
+   *           .build();
+   *   ApiFuture future =
+   *       liveVideoAnalyticsClient.getAnalysisCallable().futureCall(request);
+   *   // Do something.
+   *   Analysis response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getAnalysisCallable() { + return stub.getAnalysisCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new Analysis in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (LiveVideoAnalyticsClient liveVideoAnalyticsClient = LiveVideoAnalyticsClient.create()) {
+   *   ClusterName parent = ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]");
+   *   Analysis analysis = Analysis.newBuilder().build();
+   *   String analysisId = "analysisId-944835305";
+   *   Analysis response =
+   *       liveVideoAnalyticsClient.createAnalysisAsync(parent, analysis, analysisId).get();
+   * }
+   * }
+ * + * @param parent Required. Value for parent. + * @param analysis Required. The resource being created. + * @param analysisId Required. Id of the requesting object. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture createAnalysisAsync( + ClusterName parent, Analysis analysis, String analysisId) { + CreateAnalysisRequest request = + CreateAnalysisRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setAnalysis(analysis) + .setAnalysisId(analysisId) + .build(); + return createAnalysisAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new Analysis in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (LiveVideoAnalyticsClient liveVideoAnalyticsClient = LiveVideoAnalyticsClient.create()) {
+   *   String parent = ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString();
+   *   Analysis analysis = Analysis.newBuilder().build();
+   *   String analysisId = "analysisId-944835305";
+   *   Analysis response =
+   *       liveVideoAnalyticsClient.createAnalysisAsync(parent, analysis, analysisId).get();
+   * }
+   * }
+ * + * @param parent Required. Value for parent. + * @param analysis Required. The resource being created. + * @param analysisId Required. Id of the requesting object. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture createAnalysisAsync( + String parent, Analysis analysis, String analysisId) { + CreateAnalysisRequest request = + CreateAnalysisRequest.newBuilder() + .setParent(parent) + .setAnalysis(analysis) + .setAnalysisId(analysisId) + .build(); + return createAnalysisAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new Analysis in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (LiveVideoAnalyticsClient liveVideoAnalyticsClient = LiveVideoAnalyticsClient.create()) {
+   *   CreateAnalysisRequest request =
+   *       CreateAnalysisRequest.newBuilder()
+   *           .setParent(ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString())
+   *           .setAnalysisId("analysisId-944835305")
+   *           .setAnalysis(Analysis.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   Analysis response = liveVideoAnalyticsClient.createAnalysisAsync(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 + */ + public final OperationFuture createAnalysisAsync( + CreateAnalysisRequest request) { + return createAnalysisOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new Analysis in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (LiveVideoAnalyticsClient liveVideoAnalyticsClient = LiveVideoAnalyticsClient.create()) {
+   *   CreateAnalysisRequest request =
+   *       CreateAnalysisRequest.newBuilder()
+   *           .setParent(ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString())
+   *           .setAnalysisId("analysisId-944835305")
+   *           .setAnalysis(Analysis.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   OperationFuture future =
+   *       liveVideoAnalyticsClient.createAnalysisOperationCallable().futureCall(request);
+   *   // Do something.
+   *   Analysis response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + createAnalysisOperationCallable() { + return stub.createAnalysisOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new Analysis in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (LiveVideoAnalyticsClient liveVideoAnalyticsClient = LiveVideoAnalyticsClient.create()) {
+   *   CreateAnalysisRequest request =
+   *       CreateAnalysisRequest.newBuilder()
+   *           .setParent(ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString())
+   *           .setAnalysisId("analysisId-944835305")
+   *           .setAnalysis(Analysis.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   ApiFuture future =
+   *       liveVideoAnalyticsClient.createAnalysisCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable createAnalysisCallable() { + return stub.createAnalysisCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the parameters of a single Analysis. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (LiveVideoAnalyticsClient liveVideoAnalyticsClient = LiveVideoAnalyticsClient.create()) {
+   *   Analysis analysis = Analysis.newBuilder().build();
+   *   FieldMask updateMask = FieldMask.newBuilder().build();
+   *   Analysis response = liveVideoAnalyticsClient.updateAnalysisAsync(analysis, updateMask).get();
+   * }
+   * }
+ * + * @param analysis Required. The resource being updated. + * @param updateMask Required. Field mask is used to specify the fields to be overwritten in the + * Analysis resource by the update. The fields specified in the update_mask are relative to + * the resource, not the full request. A field will be overwritten if it is in the mask. If + * the user does not provide a mask then all fields will be overwritten. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture updateAnalysisAsync( + Analysis analysis, FieldMask updateMask) { + UpdateAnalysisRequest request = + UpdateAnalysisRequest.newBuilder().setAnalysis(analysis).setUpdateMask(updateMask).build(); + return updateAnalysisAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the parameters of a single Analysis. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (LiveVideoAnalyticsClient liveVideoAnalyticsClient = LiveVideoAnalyticsClient.create()) {
+   *   UpdateAnalysisRequest request =
+   *       UpdateAnalysisRequest.newBuilder()
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .setAnalysis(Analysis.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   Analysis response = liveVideoAnalyticsClient.updateAnalysisAsync(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 + */ + public final OperationFuture updateAnalysisAsync( + UpdateAnalysisRequest request) { + return updateAnalysisOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the parameters of a single Analysis. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (LiveVideoAnalyticsClient liveVideoAnalyticsClient = LiveVideoAnalyticsClient.create()) {
+   *   UpdateAnalysisRequest request =
+   *       UpdateAnalysisRequest.newBuilder()
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .setAnalysis(Analysis.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   OperationFuture future =
+   *       liveVideoAnalyticsClient.updateAnalysisOperationCallable().futureCall(request);
+   *   // Do something.
+   *   Analysis response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + updateAnalysisOperationCallable() { + return stub.updateAnalysisOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the parameters of a single Analysis. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (LiveVideoAnalyticsClient liveVideoAnalyticsClient = LiveVideoAnalyticsClient.create()) {
+   *   UpdateAnalysisRequest request =
+   *       UpdateAnalysisRequest.newBuilder()
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .setAnalysis(Analysis.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   ApiFuture future =
+   *       liveVideoAnalyticsClient.updateAnalysisCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable updateAnalysisCallable() { + return stub.updateAnalysisCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single Analysis. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (LiveVideoAnalyticsClient liveVideoAnalyticsClient = LiveVideoAnalyticsClient.create()) {
+   *   AnalysisName name = AnalysisName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[ANALYSIS]");
+   *   liveVideoAnalyticsClient.deleteAnalysisAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. Name of the resource. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteAnalysisAsync(AnalysisName name) { + DeleteAnalysisRequest request = + DeleteAnalysisRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return deleteAnalysisAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single Analysis. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (LiveVideoAnalyticsClient liveVideoAnalyticsClient = LiveVideoAnalyticsClient.create()) {
+   *   String name =
+   *       AnalysisName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[ANALYSIS]").toString();
+   *   liveVideoAnalyticsClient.deleteAnalysisAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. Name of the resource. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteAnalysisAsync(String name) { + DeleteAnalysisRequest request = DeleteAnalysisRequest.newBuilder().setName(name).build(); + return deleteAnalysisAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single Analysis. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (LiveVideoAnalyticsClient liveVideoAnalyticsClient = LiveVideoAnalyticsClient.create()) {
+   *   DeleteAnalysisRequest request =
+   *       DeleteAnalysisRequest.newBuilder()
+   *           .setName(
+   *               AnalysisName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[ANALYSIS]").toString())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   liveVideoAnalyticsClient.deleteAnalysisAsync(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 + */ + public final OperationFuture deleteAnalysisAsync( + DeleteAnalysisRequest request) { + return deleteAnalysisOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single Analysis. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (LiveVideoAnalyticsClient liveVideoAnalyticsClient = LiveVideoAnalyticsClient.create()) {
+   *   DeleteAnalysisRequest request =
+   *       DeleteAnalysisRequest.newBuilder()
+   *           .setName(
+   *               AnalysisName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[ANALYSIS]").toString())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   OperationFuture future =
+   *       liveVideoAnalyticsClient.deleteAnalysisOperationCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final OperationCallable + deleteAnalysisOperationCallable() { + return stub.deleteAnalysisOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single Analysis. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (LiveVideoAnalyticsClient liveVideoAnalyticsClient = LiveVideoAnalyticsClient.create()) {
+   *   DeleteAnalysisRequest request =
+   *       DeleteAnalysisRequest.newBuilder()
+   *           .setName(
+   *               AnalysisName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[ANALYSIS]").toString())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   ApiFuture future =
+   *       liveVideoAnalyticsClient.deleteAnalysisCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final UnaryCallable deleteAnalysisCallable() { + return stub.deleteAnalysisCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Processes in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (LiveVideoAnalyticsClient liveVideoAnalyticsClient = LiveVideoAnalyticsClient.create()) {
+   *   ClusterName parent = ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]");
+   *   for (Process element : liveVideoAnalyticsClient.listProcesses(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. Parent value for ListProcessesRequest. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListProcessesPagedResponse listProcesses(ClusterName parent) { + ListProcessesRequest request = + ListProcessesRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listProcesses(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Processes in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (LiveVideoAnalyticsClient liveVideoAnalyticsClient = LiveVideoAnalyticsClient.create()) {
+   *   String parent = ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString();
+   *   for (Process element : liveVideoAnalyticsClient.listProcesses(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. Parent value for ListProcessesRequest. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListProcessesPagedResponse listProcesses(String parent) { + ListProcessesRequest request = ListProcessesRequest.newBuilder().setParent(parent).build(); + return listProcesses(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Processes in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (LiveVideoAnalyticsClient liveVideoAnalyticsClient = LiveVideoAnalyticsClient.create()) {
+   *   ListProcessesRequest request =
+   *       ListProcessesRequest.newBuilder()
+   *           .setParent(ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   for (Process element : liveVideoAnalyticsClient.listProcesses(request).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @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 + */ + public final ListProcessesPagedResponse listProcesses(ListProcessesRequest request) { + return listProcessesPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Processes in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (LiveVideoAnalyticsClient liveVideoAnalyticsClient = LiveVideoAnalyticsClient.create()) {
+   *   ListProcessesRequest request =
+   *       ListProcessesRequest.newBuilder()
+   *           .setParent(ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   ApiFuture future =
+   *       liveVideoAnalyticsClient.listProcessesPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (Process element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listProcessesPagedCallable() { + return stub.listProcessesPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Processes in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (LiveVideoAnalyticsClient liveVideoAnalyticsClient = LiveVideoAnalyticsClient.create()) {
+   *   ListProcessesRequest request =
+   *       ListProcessesRequest.newBuilder()
+   *           .setParent(ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   while (true) {
+   *     ListProcessesResponse response =
+   *         liveVideoAnalyticsClient.listProcessesCallable().call(request);
+   *     for (Process element : response.getProcessesList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable listProcessesCallable() { + return stub.listProcessesCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single Process. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (LiveVideoAnalyticsClient liveVideoAnalyticsClient = LiveVideoAnalyticsClient.create()) {
+   *   ProcessName name = ProcessName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[PROCESS]");
+   *   Process response = liveVideoAnalyticsClient.getProcess(name);
+   * }
+   * }
+ * + * @param name Required. Name of the resource. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Process getProcess(ProcessName name) { + GetProcessRequest request = + GetProcessRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return getProcess(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single Process. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (LiveVideoAnalyticsClient liveVideoAnalyticsClient = LiveVideoAnalyticsClient.create()) {
+   *   String name = ProcessName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[PROCESS]").toString();
+   *   Process response = liveVideoAnalyticsClient.getProcess(name);
+   * }
+   * }
+ * + * @param name Required. Name of the resource. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Process getProcess(String name) { + GetProcessRequest request = GetProcessRequest.newBuilder().setName(name).build(); + return getProcess(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single Process. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (LiveVideoAnalyticsClient liveVideoAnalyticsClient = LiveVideoAnalyticsClient.create()) {
+   *   GetProcessRequest request =
+   *       GetProcessRequest.newBuilder()
+   *           .setName(
+   *               ProcessName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[PROCESS]").toString())
+   *           .build();
+   *   Process response = liveVideoAnalyticsClient.getProcess(request);
+   * }
+   * }
+ * + * @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 + */ + public final Process getProcess(GetProcessRequest request) { + return getProcessCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single Process. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (LiveVideoAnalyticsClient liveVideoAnalyticsClient = LiveVideoAnalyticsClient.create()) {
+   *   GetProcessRequest request =
+   *       GetProcessRequest.newBuilder()
+   *           .setName(
+   *               ProcessName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[PROCESS]").toString())
+   *           .build();
+   *   ApiFuture future = liveVideoAnalyticsClient.getProcessCallable().futureCall(request);
+   *   // Do something.
+   *   Process response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getProcessCallable() { + return stub.getProcessCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new Process in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (LiveVideoAnalyticsClient liveVideoAnalyticsClient = LiveVideoAnalyticsClient.create()) {
+   *   ClusterName parent = ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]");
+   *   Process process = Process.newBuilder().build();
+   *   String processId = "processId-1094760470";
+   *   Process response =
+   *       liveVideoAnalyticsClient.createProcessAsync(parent, process, processId).get();
+   * }
+   * }
+ * + * @param parent Required. Value for parent. + * @param process Required. The resource being created. + * @param processId Required. Id of the requesting object. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture createProcessAsync( + ClusterName parent, Process process, String processId) { + CreateProcessRequest request = + CreateProcessRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setProcess(process) + .setProcessId(processId) + .build(); + return createProcessAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new Process in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (LiveVideoAnalyticsClient liveVideoAnalyticsClient = LiveVideoAnalyticsClient.create()) {
+   *   String parent = ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString();
+   *   Process process = Process.newBuilder().build();
+   *   String processId = "processId-1094760470";
+   *   Process response =
+   *       liveVideoAnalyticsClient.createProcessAsync(parent, process, processId).get();
+   * }
+   * }
+ * + * @param parent Required. Value for parent. + * @param process Required. The resource being created. + * @param processId Required. Id of the requesting object. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture createProcessAsync( + String parent, Process process, String processId) { + CreateProcessRequest request = + CreateProcessRequest.newBuilder() + .setParent(parent) + .setProcess(process) + .setProcessId(processId) + .build(); + return createProcessAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new Process in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (LiveVideoAnalyticsClient liveVideoAnalyticsClient = LiveVideoAnalyticsClient.create()) {
+   *   CreateProcessRequest request =
+   *       CreateProcessRequest.newBuilder()
+   *           .setParent(ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString())
+   *           .setProcessId("processId-1094760470")
+   *           .setProcess(Process.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   Process response = liveVideoAnalyticsClient.createProcessAsync(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 + */ + public final OperationFuture createProcessAsync( + CreateProcessRequest request) { + return createProcessOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new Process in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (LiveVideoAnalyticsClient liveVideoAnalyticsClient = LiveVideoAnalyticsClient.create()) {
+   *   CreateProcessRequest request =
+   *       CreateProcessRequest.newBuilder()
+   *           .setParent(ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString())
+   *           .setProcessId("processId-1094760470")
+   *           .setProcess(Process.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   OperationFuture future =
+   *       liveVideoAnalyticsClient.createProcessOperationCallable().futureCall(request);
+   *   // Do something.
+   *   Process response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + createProcessOperationCallable() { + return stub.createProcessOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new Process in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (LiveVideoAnalyticsClient liveVideoAnalyticsClient = LiveVideoAnalyticsClient.create()) {
+   *   CreateProcessRequest request =
+   *       CreateProcessRequest.newBuilder()
+   *           .setParent(ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString())
+   *           .setProcessId("processId-1094760470")
+   *           .setProcess(Process.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   ApiFuture future =
+   *       liveVideoAnalyticsClient.createProcessCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable createProcessCallable() { + return stub.createProcessCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the parameters of a single Process. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (LiveVideoAnalyticsClient liveVideoAnalyticsClient = LiveVideoAnalyticsClient.create()) {
+   *   Process process = Process.newBuilder().build();
+   *   FieldMask updateMask = FieldMask.newBuilder().build();
+   *   Process response = liveVideoAnalyticsClient.updateProcessAsync(process, updateMask).get();
+   * }
+   * }
+ * + * @param process Required. The resource being updated. + * @param updateMask Required. Field mask is used to specify the fields to be overwritten in the + * Process resource by the update. The fields specified in the update_mask are relative to the + * resource, not the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields will be overwritten. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture updateProcessAsync( + Process process, FieldMask updateMask) { + UpdateProcessRequest request = + UpdateProcessRequest.newBuilder().setProcess(process).setUpdateMask(updateMask).build(); + return updateProcessAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the parameters of a single Process. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (LiveVideoAnalyticsClient liveVideoAnalyticsClient = LiveVideoAnalyticsClient.create()) {
+   *   UpdateProcessRequest request =
+   *       UpdateProcessRequest.newBuilder()
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .setProcess(Process.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   Process response = liveVideoAnalyticsClient.updateProcessAsync(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 + */ + public final OperationFuture updateProcessAsync( + UpdateProcessRequest request) { + return updateProcessOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the parameters of a single Process. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (LiveVideoAnalyticsClient liveVideoAnalyticsClient = LiveVideoAnalyticsClient.create()) {
+   *   UpdateProcessRequest request =
+   *       UpdateProcessRequest.newBuilder()
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .setProcess(Process.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   OperationFuture future =
+   *       liveVideoAnalyticsClient.updateProcessOperationCallable().futureCall(request);
+   *   // Do something.
+   *   Process response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + updateProcessOperationCallable() { + return stub.updateProcessOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the parameters of a single Process. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (LiveVideoAnalyticsClient liveVideoAnalyticsClient = LiveVideoAnalyticsClient.create()) {
+   *   UpdateProcessRequest request =
+   *       UpdateProcessRequest.newBuilder()
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .setProcess(Process.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   ApiFuture future =
+   *       liveVideoAnalyticsClient.updateProcessCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable updateProcessCallable() { + return stub.updateProcessCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single Process. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (LiveVideoAnalyticsClient liveVideoAnalyticsClient = LiveVideoAnalyticsClient.create()) {
+   *   ProcessName name = ProcessName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[PROCESS]");
+   *   liveVideoAnalyticsClient.deleteProcessAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. Name of the resource. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteProcessAsync(ProcessName name) { + DeleteProcessRequest request = + DeleteProcessRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return deleteProcessAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single Process. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (LiveVideoAnalyticsClient liveVideoAnalyticsClient = LiveVideoAnalyticsClient.create()) {
+   *   String name = ProcessName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[PROCESS]").toString();
+   *   liveVideoAnalyticsClient.deleteProcessAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. Name of the resource. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteProcessAsync(String name) { + DeleteProcessRequest request = DeleteProcessRequest.newBuilder().setName(name).build(); + return deleteProcessAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single Process. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (LiveVideoAnalyticsClient liveVideoAnalyticsClient = LiveVideoAnalyticsClient.create()) {
+   *   DeleteProcessRequest request =
+   *       DeleteProcessRequest.newBuilder()
+   *           .setName(
+   *               ProcessName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[PROCESS]").toString())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   liveVideoAnalyticsClient.deleteProcessAsync(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 + */ + public final OperationFuture deleteProcessAsync( + DeleteProcessRequest request) { + return deleteProcessOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single Process. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (LiveVideoAnalyticsClient liveVideoAnalyticsClient = LiveVideoAnalyticsClient.create()) {
+   *   DeleteProcessRequest request =
+   *       DeleteProcessRequest.newBuilder()
+   *           .setName(
+   *               ProcessName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[PROCESS]").toString())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   OperationFuture future =
+   *       liveVideoAnalyticsClient.deleteProcessOperationCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final OperationCallable + deleteProcessOperationCallable() { + return stub.deleteProcessOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single Process. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (LiveVideoAnalyticsClient liveVideoAnalyticsClient = LiveVideoAnalyticsClient.create()) {
+   *   DeleteProcessRequest request =
+   *       DeleteProcessRequest.newBuilder()
+   *           .setName(
+   *               ProcessName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[PROCESS]").toString())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   ApiFuture future =
+   *       liveVideoAnalyticsClient.deleteProcessCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final UnaryCallable deleteProcessCallable() { + return stub.deleteProcessCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Run all of the processes to "completion". Max time for each process is the LRO time limit. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (LiveVideoAnalyticsClient liveVideoAnalyticsClient = LiveVideoAnalyticsClient.create()) {
+   *   ClusterName parent = ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]");
+   *   List requests = new ArrayList<>();
+   *   BatchRunProcessResponse response =
+   *       liveVideoAnalyticsClient.batchRunProcessAsync(parent, requests).get();
+   * }
+   * }
+ * + * @param parent Required. The parent resource shared by all processes being created. + * @param requests Required. The create process requests. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture batchRunProcessAsync( + ClusterName parent, List requests) { + BatchRunProcessRequest request = + BatchRunProcessRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .addAllRequests(requests) + .build(); + return batchRunProcessAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Run all of the processes to "completion". Max time for each process is the LRO time limit. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (LiveVideoAnalyticsClient liveVideoAnalyticsClient = LiveVideoAnalyticsClient.create()) {
+   *   String parent = ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString();
+   *   List requests = new ArrayList<>();
+   *   BatchRunProcessResponse response =
+   *       liveVideoAnalyticsClient.batchRunProcessAsync(parent, requests).get();
+   * }
+   * }
+ * + * @param parent Required. The parent resource shared by all processes being created. + * @param requests Required. The create process requests. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture batchRunProcessAsync( + String parent, List requests) { + BatchRunProcessRequest request = + BatchRunProcessRequest.newBuilder().setParent(parent).addAllRequests(requests).build(); + return batchRunProcessAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Run all of the processes to "completion". Max time for each process is the LRO time limit. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (LiveVideoAnalyticsClient liveVideoAnalyticsClient = LiveVideoAnalyticsClient.create()) {
+   *   BatchRunProcessRequest request =
+   *       BatchRunProcessRequest.newBuilder()
+   *           .setParent(ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString())
+   *           .addAllRequests(new ArrayList())
+   *           .setOptions(BatchRunProcessRequest.BatchRunProcessOptions.newBuilder().build())
+   *           .setBatchId("batchId-331744779")
+   *           .build();
+   *   BatchRunProcessResponse response =
+   *       liveVideoAnalyticsClient.batchRunProcessAsync(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 + */ + public final OperationFuture batchRunProcessAsync( + BatchRunProcessRequest request) { + return batchRunProcessOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Run all of the processes to "completion". Max time for each process is the LRO time limit. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (LiveVideoAnalyticsClient liveVideoAnalyticsClient = LiveVideoAnalyticsClient.create()) {
+   *   BatchRunProcessRequest request =
+   *       BatchRunProcessRequest.newBuilder()
+   *           .setParent(ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString())
+   *           .addAllRequests(new ArrayList())
+   *           .setOptions(BatchRunProcessRequest.BatchRunProcessOptions.newBuilder().build())
+   *           .setBatchId("batchId-331744779")
+   *           .build();
+   *   OperationFuture future =
+   *       liveVideoAnalyticsClient.batchRunProcessOperationCallable().futureCall(request);
+   *   // Do something.
+   *   BatchRunProcessResponse response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + batchRunProcessOperationCallable() { + return stub.batchRunProcessOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Run all of the processes to "completion". Max time for each process is the LRO time limit. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (LiveVideoAnalyticsClient liveVideoAnalyticsClient = LiveVideoAnalyticsClient.create()) {
+   *   BatchRunProcessRequest request =
+   *       BatchRunProcessRequest.newBuilder()
+   *           .setParent(ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString())
+   *           .addAllRequests(new ArrayList())
+   *           .setOptions(BatchRunProcessRequest.BatchRunProcessOptions.newBuilder().build())
+   *           .setBatchId("batchId-331744779")
+   *           .build();
+   *   ApiFuture future =
+   *       liveVideoAnalyticsClient.batchRunProcessCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable batchRunProcessCallable() { + return stub.batchRunProcessCallable(); + } + + @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); + } + + public static class ListPublicOperatorsPagedResponse + extends AbstractPagedListResponse< + ListPublicOperatorsRequest, + ListPublicOperatorsResponse, + Operator, + ListPublicOperatorsPage, + ListPublicOperatorsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListPublicOperatorsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListPublicOperatorsPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListPublicOperatorsPagedResponse(ListPublicOperatorsPage page) { + super(page, ListPublicOperatorsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListPublicOperatorsPage + extends AbstractPage< + ListPublicOperatorsRequest, + ListPublicOperatorsResponse, + Operator, + ListPublicOperatorsPage> { + + private ListPublicOperatorsPage( + PageContext context, + ListPublicOperatorsResponse response) { + super(context, response); + } + + private static ListPublicOperatorsPage createEmptyPage() { + return new ListPublicOperatorsPage(null, null); + } + + @Override + protected ListPublicOperatorsPage createPage( + PageContext context, + ListPublicOperatorsResponse response) { + return new ListPublicOperatorsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListPublicOperatorsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListPublicOperatorsRequest, + ListPublicOperatorsResponse, + Operator, + ListPublicOperatorsPage, + ListPublicOperatorsFixedSizeCollection> { + + private ListPublicOperatorsFixedSizeCollection( + List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListPublicOperatorsFixedSizeCollection createEmptyCollection() { + return new ListPublicOperatorsFixedSizeCollection(null, 0); + } + + @Override + protected ListPublicOperatorsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListPublicOperatorsFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListOperatorsPagedResponse + extends AbstractPagedListResponse< + ListOperatorsRequest, + ListOperatorsResponse, + Operator, + ListOperatorsPage, + ListOperatorsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListOperatorsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListOperatorsPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListOperatorsPagedResponse(ListOperatorsPage page) { + super(page, ListOperatorsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListOperatorsPage + extends AbstractPage< + ListOperatorsRequest, ListOperatorsResponse, Operator, ListOperatorsPage> { + + private ListOperatorsPage( + PageContext context, + ListOperatorsResponse response) { + super(context, response); + } + + private static ListOperatorsPage createEmptyPage() { + return new ListOperatorsPage(null, null); + } + + @Override + protected ListOperatorsPage createPage( + PageContext context, + ListOperatorsResponse response) { + return new ListOperatorsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListOperatorsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListOperatorsRequest, + ListOperatorsResponse, + Operator, + ListOperatorsPage, + ListOperatorsFixedSizeCollection> { + + private ListOperatorsFixedSizeCollection(List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListOperatorsFixedSizeCollection createEmptyCollection() { + return new ListOperatorsFixedSizeCollection(null, 0); + } + + @Override + protected ListOperatorsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListOperatorsFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListAnalysesPagedResponse + extends AbstractPagedListResponse< + ListAnalysesRequest, + ListAnalysesResponse, + Analysis, + ListAnalysesPage, + ListAnalysesFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListAnalysesPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListAnalysesPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListAnalysesPagedResponse(ListAnalysesPage page) { + super(page, ListAnalysesFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListAnalysesPage + extends AbstractPage { + + private ListAnalysesPage( + PageContext context, + ListAnalysesResponse response) { + super(context, response); + } + + private static ListAnalysesPage createEmptyPage() { + return new ListAnalysesPage(null, null); + } + + @Override + protected ListAnalysesPage createPage( + PageContext context, + ListAnalysesResponse response) { + return new ListAnalysesPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListAnalysesFixedSizeCollection + extends AbstractFixedSizeCollection< + ListAnalysesRequest, + ListAnalysesResponse, + Analysis, + ListAnalysesPage, + ListAnalysesFixedSizeCollection> { + + private ListAnalysesFixedSizeCollection(List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListAnalysesFixedSizeCollection createEmptyCollection() { + return new ListAnalysesFixedSizeCollection(null, 0); + } + + @Override + protected ListAnalysesFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListAnalysesFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListProcessesPagedResponse + extends AbstractPagedListResponse< + ListProcessesRequest, + ListProcessesResponse, + Process, + ListProcessesPage, + ListProcessesFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListProcessesPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListProcessesPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListProcessesPagedResponse(ListProcessesPage page) { + super(page, ListProcessesFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListProcessesPage + extends AbstractPage< + ListProcessesRequest, ListProcessesResponse, Process, ListProcessesPage> { + + private ListProcessesPage( + PageContext context, + ListProcessesResponse response) { + super(context, response); + } + + private static ListProcessesPage createEmptyPage() { + return new ListProcessesPage(null, null); + } + + @Override + protected ListProcessesPage createPage( + PageContext context, + ListProcessesResponse response) { + return new ListProcessesPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListProcessesFixedSizeCollection + extends AbstractFixedSizeCollection< + ListProcessesRequest, + ListProcessesResponse, + Process, + ListProcessesPage, + ListProcessesFixedSizeCollection> { + + private ListProcessesFixedSizeCollection(List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListProcessesFixedSizeCollection createEmptyCollection() { + return new ListProcessesFixedSizeCollection(null, 0); + } + + @Override + protected ListProcessesFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListProcessesFixedSizeCollection(pages, collectionSize); + } + } +} diff --git a/java-visionai/google-cloud-visionai/src/main/java/com/google/cloud/visionai/v1/LiveVideoAnalyticsSettings.java b/java-visionai/google-cloud-visionai/src/main/java/com/google/cloud/visionai/v1/LiveVideoAnalyticsSettings.java new file mode 100644 index 000000000000..40213065b86d --- /dev/null +++ b/java-visionai/google-cloud-visionai/src/main/java/com/google/cloud/visionai/v1/LiveVideoAnalyticsSettings.java @@ -0,0 +1,520 @@ +/* + * Copyright 2024 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.visionai.v1; + +import static com.google.cloud.visionai.v1.LiveVideoAnalyticsClient.ListAnalysesPagedResponse; +import static com.google.cloud.visionai.v1.LiveVideoAnalyticsClient.ListOperatorsPagedResponse; +import static com.google.cloud.visionai.v1.LiveVideoAnalyticsClient.ListProcessesPagedResponse; +import static com.google.cloud.visionai.v1.LiveVideoAnalyticsClient.ListPublicOperatorsPagedResponse; + +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.httpjson.InstantiatingHttpJsonChannelProvider; +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.PagedCallSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.cloud.visionai.v1.stub.LiveVideoAnalyticsStubSettings; +import com.google.longrunning.Operation; +import com.google.protobuf.Empty; +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 LiveVideoAnalyticsClient}. + * + *

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

    + *
  • The default service address (visionai.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 resolveOperatorInfo to 30 seconds: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * LiveVideoAnalyticsSettings.Builder liveVideoAnalyticsSettingsBuilder =
+ *     LiveVideoAnalyticsSettings.newBuilder();
+ * liveVideoAnalyticsSettingsBuilder
+ *     .resolveOperatorInfoSettings()
+ *     .setRetrySettings(
+ *         liveVideoAnalyticsSettingsBuilder
+ *             .resolveOperatorInfoSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * LiveVideoAnalyticsSettings liveVideoAnalyticsSettings =
+ *     liveVideoAnalyticsSettingsBuilder.build();
+ * }
+ */ +@Generated("by gapic-generator-java") +public class LiveVideoAnalyticsSettings extends ClientSettings { + + /** Returns the object with the settings used for calls to listPublicOperators. */ + public PagedCallSettings< + ListPublicOperatorsRequest, ListPublicOperatorsResponse, ListPublicOperatorsPagedResponse> + listPublicOperatorsSettings() { + return ((LiveVideoAnalyticsStubSettings) getStubSettings()).listPublicOperatorsSettings(); + } + + /** Returns the object with the settings used for calls to resolveOperatorInfo. */ + public UnaryCallSettings + resolveOperatorInfoSettings() { + return ((LiveVideoAnalyticsStubSettings) getStubSettings()).resolveOperatorInfoSettings(); + } + + /** Returns the object with the settings used for calls to listOperators. */ + public PagedCallSettings + listOperatorsSettings() { + return ((LiveVideoAnalyticsStubSettings) getStubSettings()).listOperatorsSettings(); + } + + /** Returns the object with the settings used for calls to getOperator. */ + public UnaryCallSettings getOperatorSettings() { + return ((LiveVideoAnalyticsStubSettings) getStubSettings()).getOperatorSettings(); + } + + /** Returns the object with the settings used for calls to createOperator. */ + public UnaryCallSettings createOperatorSettings() { + return ((LiveVideoAnalyticsStubSettings) getStubSettings()).createOperatorSettings(); + } + + /** Returns the object with the settings used for calls to createOperator. */ + public OperationCallSettings + createOperatorOperationSettings() { + return ((LiveVideoAnalyticsStubSettings) getStubSettings()).createOperatorOperationSettings(); + } + + /** Returns the object with the settings used for calls to updateOperator. */ + public UnaryCallSettings updateOperatorSettings() { + return ((LiveVideoAnalyticsStubSettings) getStubSettings()).updateOperatorSettings(); + } + + /** Returns the object with the settings used for calls to updateOperator. */ + public OperationCallSettings + updateOperatorOperationSettings() { + return ((LiveVideoAnalyticsStubSettings) getStubSettings()).updateOperatorOperationSettings(); + } + + /** Returns the object with the settings used for calls to deleteOperator. */ + public UnaryCallSettings deleteOperatorSettings() { + return ((LiveVideoAnalyticsStubSettings) getStubSettings()).deleteOperatorSettings(); + } + + /** Returns the object with the settings used for calls to deleteOperator. */ + public OperationCallSettings + deleteOperatorOperationSettings() { + return ((LiveVideoAnalyticsStubSettings) getStubSettings()).deleteOperatorOperationSettings(); + } + + /** Returns the object with the settings used for calls to listAnalyses. */ + public PagedCallSettings + listAnalysesSettings() { + return ((LiveVideoAnalyticsStubSettings) getStubSettings()).listAnalysesSettings(); + } + + /** Returns the object with the settings used for calls to getAnalysis. */ + public UnaryCallSettings getAnalysisSettings() { + return ((LiveVideoAnalyticsStubSettings) getStubSettings()).getAnalysisSettings(); + } + + /** Returns the object with the settings used for calls to createAnalysis. */ + public UnaryCallSettings createAnalysisSettings() { + return ((LiveVideoAnalyticsStubSettings) getStubSettings()).createAnalysisSettings(); + } + + /** Returns the object with the settings used for calls to createAnalysis. */ + public OperationCallSettings + createAnalysisOperationSettings() { + return ((LiveVideoAnalyticsStubSettings) getStubSettings()).createAnalysisOperationSettings(); + } + + /** Returns the object with the settings used for calls to updateAnalysis. */ + public UnaryCallSettings updateAnalysisSettings() { + return ((LiveVideoAnalyticsStubSettings) getStubSettings()).updateAnalysisSettings(); + } + + /** Returns the object with the settings used for calls to updateAnalysis. */ + public OperationCallSettings + updateAnalysisOperationSettings() { + return ((LiveVideoAnalyticsStubSettings) getStubSettings()).updateAnalysisOperationSettings(); + } + + /** Returns the object with the settings used for calls to deleteAnalysis. */ + public UnaryCallSettings deleteAnalysisSettings() { + return ((LiveVideoAnalyticsStubSettings) getStubSettings()).deleteAnalysisSettings(); + } + + /** Returns the object with the settings used for calls to deleteAnalysis. */ + public OperationCallSettings + deleteAnalysisOperationSettings() { + return ((LiveVideoAnalyticsStubSettings) getStubSettings()).deleteAnalysisOperationSettings(); + } + + /** Returns the object with the settings used for calls to listProcesses. */ + public PagedCallSettings + listProcessesSettings() { + return ((LiveVideoAnalyticsStubSettings) getStubSettings()).listProcessesSettings(); + } + + /** Returns the object with the settings used for calls to getProcess. */ + public UnaryCallSettings getProcessSettings() { + return ((LiveVideoAnalyticsStubSettings) getStubSettings()).getProcessSettings(); + } + + /** Returns the object with the settings used for calls to createProcess. */ + public UnaryCallSettings createProcessSettings() { + return ((LiveVideoAnalyticsStubSettings) getStubSettings()).createProcessSettings(); + } + + /** Returns the object with the settings used for calls to createProcess. */ + public OperationCallSettings + createProcessOperationSettings() { + return ((LiveVideoAnalyticsStubSettings) getStubSettings()).createProcessOperationSettings(); + } + + /** Returns the object with the settings used for calls to updateProcess. */ + public UnaryCallSettings updateProcessSettings() { + return ((LiveVideoAnalyticsStubSettings) getStubSettings()).updateProcessSettings(); + } + + /** Returns the object with the settings used for calls to updateProcess. */ + public OperationCallSettings + updateProcessOperationSettings() { + return ((LiveVideoAnalyticsStubSettings) getStubSettings()).updateProcessOperationSettings(); + } + + /** Returns the object with the settings used for calls to deleteProcess. */ + public UnaryCallSettings deleteProcessSettings() { + return ((LiveVideoAnalyticsStubSettings) getStubSettings()).deleteProcessSettings(); + } + + /** Returns the object with the settings used for calls to deleteProcess. */ + public OperationCallSettings + deleteProcessOperationSettings() { + return ((LiveVideoAnalyticsStubSettings) getStubSettings()).deleteProcessOperationSettings(); + } + + /** Returns the object with the settings used for calls to batchRunProcess. */ + public UnaryCallSettings batchRunProcessSettings() { + return ((LiveVideoAnalyticsStubSettings) getStubSettings()).batchRunProcessSettings(); + } + + /** Returns the object with the settings used for calls to batchRunProcess. */ + public OperationCallSettings + batchRunProcessOperationSettings() { + return ((LiveVideoAnalyticsStubSettings) getStubSettings()).batchRunProcessOperationSettings(); + } + + public static final LiveVideoAnalyticsSettings create(LiveVideoAnalyticsStubSettings stub) + throws IOException { + return new LiveVideoAnalyticsSettings.Builder(stub.toBuilder()).build(); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return LiveVideoAnalyticsStubSettings.defaultExecutorProviderBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return LiveVideoAnalyticsStubSettings.getDefaultEndpoint(); + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return LiveVideoAnalyticsStubSettings.getDefaultServiceScopes(); + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return LiveVideoAnalyticsStubSettings.defaultCredentialsProviderBuilder(); + } + + /** Returns a builder for the default gRPC ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return LiveVideoAnalyticsStubSettings.defaultGrpcTransportProviderBuilder(); + } + + /** Returns a builder for the default REST ChannelProvider for this service. */ + @BetaApi + public static InstantiatingHttpJsonChannelProvider.Builder + defaultHttpJsonTransportProviderBuilder() { + return LiveVideoAnalyticsStubSettings.defaultHttpJsonTransportProviderBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return LiveVideoAnalyticsStubSettings.defaultTransportChannelProvider(); + } + + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return LiveVideoAnalyticsStubSettings.defaultApiClientHeaderProviderBuilder(); + } + + /** Returns a new gRPC builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new REST builder for this class. */ + public static Builder newHttpJsonBuilder() { + return Builder.createHttpJsonDefault(); + } + + /** 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 LiveVideoAnalyticsSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + } + + /** Builder for LiveVideoAnalyticsSettings. */ + public static class Builder extends ClientSettings.Builder { + + protected Builder() throws IOException { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(LiveVideoAnalyticsStubSettings.newBuilder(clientContext)); + } + + protected Builder(LiveVideoAnalyticsSettings settings) { + super(settings.getStubSettings().toBuilder()); + } + + protected Builder(LiveVideoAnalyticsStubSettings.Builder stubSettings) { + super(stubSettings); + } + + private static Builder createDefault() { + return new Builder(LiveVideoAnalyticsStubSettings.newBuilder()); + } + + private static Builder createHttpJsonDefault() { + return new Builder(LiveVideoAnalyticsStubSettings.newHttpJsonBuilder()); + } + + public LiveVideoAnalyticsStubSettings.Builder getStubSettingsBuilder() { + return ((LiveVideoAnalyticsStubSettings.Builder) getStubSettings()); + } + + /** + * 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) { + super.applyToAllUnaryMethods( + getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater); + return this; + } + + /** Returns the builder for the settings used for calls to listPublicOperators. */ + public PagedCallSettings.Builder< + ListPublicOperatorsRequest, + ListPublicOperatorsResponse, + ListPublicOperatorsPagedResponse> + listPublicOperatorsSettings() { + return getStubSettingsBuilder().listPublicOperatorsSettings(); + } + + /** Returns the builder for the settings used for calls to resolveOperatorInfo. */ + public UnaryCallSettings.Builder + resolveOperatorInfoSettings() { + return getStubSettingsBuilder().resolveOperatorInfoSettings(); + } + + /** Returns the builder for the settings used for calls to listOperators. */ + public PagedCallSettings.Builder< + ListOperatorsRequest, ListOperatorsResponse, ListOperatorsPagedResponse> + listOperatorsSettings() { + return getStubSettingsBuilder().listOperatorsSettings(); + } + + /** Returns the builder for the settings used for calls to getOperator. */ + public UnaryCallSettings.Builder getOperatorSettings() { + return getStubSettingsBuilder().getOperatorSettings(); + } + + /** Returns the builder for the settings used for calls to createOperator. */ + public UnaryCallSettings.Builder createOperatorSettings() { + return getStubSettingsBuilder().createOperatorSettings(); + } + + /** Returns the builder for the settings used for calls to createOperator. */ + public OperationCallSettings.Builder + createOperatorOperationSettings() { + return getStubSettingsBuilder().createOperatorOperationSettings(); + } + + /** Returns the builder for the settings used for calls to updateOperator. */ + public UnaryCallSettings.Builder updateOperatorSettings() { + return getStubSettingsBuilder().updateOperatorSettings(); + } + + /** Returns the builder for the settings used for calls to updateOperator. */ + public OperationCallSettings.Builder + updateOperatorOperationSettings() { + return getStubSettingsBuilder().updateOperatorOperationSettings(); + } + + /** Returns the builder for the settings used for calls to deleteOperator. */ + public UnaryCallSettings.Builder deleteOperatorSettings() { + return getStubSettingsBuilder().deleteOperatorSettings(); + } + + /** Returns the builder for the settings used for calls to deleteOperator. */ + public OperationCallSettings.Builder + deleteOperatorOperationSettings() { + return getStubSettingsBuilder().deleteOperatorOperationSettings(); + } + + /** Returns the builder for the settings used for calls to listAnalyses. */ + public PagedCallSettings.Builder< + ListAnalysesRequest, ListAnalysesResponse, ListAnalysesPagedResponse> + listAnalysesSettings() { + return getStubSettingsBuilder().listAnalysesSettings(); + } + + /** Returns the builder for the settings used for calls to getAnalysis. */ + public UnaryCallSettings.Builder getAnalysisSettings() { + return getStubSettingsBuilder().getAnalysisSettings(); + } + + /** Returns the builder for the settings used for calls to createAnalysis. */ + public UnaryCallSettings.Builder createAnalysisSettings() { + return getStubSettingsBuilder().createAnalysisSettings(); + } + + /** Returns the builder for the settings used for calls to createAnalysis. */ + public OperationCallSettings.Builder + createAnalysisOperationSettings() { + return getStubSettingsBuilder().createAnalysisOperationSettings(); + } + + /** Returns the builder for the settings used for calls to updateAnalysis. */ + public UnaryCallSettings.Builder updateAnalysisSettings() { + return getStubSettingsBuilder().updateAnalysisSettings(); + } + + /** Returns the builder for the settings used for calls to updateAnalysis. */ + public OperationCallSettings.Builder + updateAnalysisOperationSettings() { + return getStubSettingsBuilder().updateAnalysisOperationSettings(); + } + + /** Returns the builder for the settings used for calls to deleteAnalysis. */ + public UnaryCallSettings.Builder deleteAnalysisSettings() { + return getStubSettingsBuilder().deleteAnalysisSettings(); + } + + /** Returns the builder for the settings used for calls to deleteAnalysis. */ + public OperationCallSettings.Builder + deleteAnalysisOperationSettings() { + return getStubSettingsBuilder().deleteAnalysisOperationSettings(); + } + + /** Returns the builder for the settings used for calls to listProcesses. */ + public PagedCallSettings.Builder< + ListProcessesRequest, ListProcessesResponse, ListProcessesPagedResponse> + listProcessesSettings() { + return getStubSettingsBuilder().listProcessesSettings(); + } + + /** Returns the builder for the settings used for calls to getProcess. */ + public UnaryCallSettings.Builder getProcessSettings() { + return getStubSettingsBuilder().getProcessSettings(); + } + + /** Returns the builder for the settings used for calls to createProcess. */ + public UnaryCallSettings.Builder createProcessSettings() { + return getStubSettingsBuilder().createProcessSettings(); + } + + /** Returns the builder for the settings used for calls to createProcess. */ + public OperationCallSettings.Builder + createProcessOperationSettings() { + return getStubSettingsBuilder().createProcessOperationSettings(); + } + + /** Returns the builder for the settings used for calls to updateProcess. */ + public UnaryCallSettings.Builder updateProcessSettings() { + return getStubSettingsBuilder().updateProcessSettings(); + } + + /** Returns the builder for the settings used for calls to updateProcess. */ + public OperationCallSettings.Builder + updateProcessOperationSettings() { + return getStubSettingsBuilder().updateProcessOperationSettings(); + } + + /** Returns the builder for the settings used for calls to deleteProcess. */ + public UnaryCallSettings.Builder deleteProcessSettings() { + return getStubSettingsBuilder().deleteProcessSettings(); + } + + /** Returns the builder for the settings used for calls to deleteProcess. */ + public OperationCallSettings.Builder + deleteProcessOperationSettings() { + return getStubSettingsBuilder().deleteProcessOperationSettings(); + } + + /** Returns the builder for the settings used for calls to batchRunProcess. */ + public UnaryCallSettings.Builder batchRunProcessSettings() { + return getStubSettingsBuilder().batchRunProcessSettings(); + } + + /** Returns the builder for the settings used for calls to batchRunProcess. */ + public OperationCallSettings.Builder< + BatchRunProcessRequest, BatchRunProcessResponse, OperationMetadata> + batchRunProcessOperationSettings() { + return getStubSettingsBuilder().batchRunProcessOperationSettings(); + } + + @Override + public LiveVideoAnalyticsSettings build() throws IOException { + return new LiveVideoAnalyticsSettings(this); + } + } +} diff --git a/java-visionai/google-cloud-visionai/src/main/java/com/google/cloud/visionai/v1/StreamingServiceClient.java b/java-visionai/google-cloud-visionai/src/main/java/com/google/cloud/visionai/v1/StreamingServiceClient.java new file mode 100644 index 000000000000..f1f1a13b839a --- /dev/null +++ b/java-visionai/google-cloud-visionai/src/main/java/com/google/cloud/visionai/v1/StreamingServiceClient.java @@ -0,0 +1,539 @@ +/* + * Copyright 2024 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.visionai.v1; + +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.rpc.BidiStreamingCallable; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.visionai.v1.stub.StreamingServiceStub; +import com.google.cloud.visionai.v1.stub.StreamingServiceStubSettings; +import java.io.IOException; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Service Description: Streaming service for receiving and sending packets. + * + *

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: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (StreamingServiceClient streamingServiceClient = StreamingServiceClient.create()) {
+ *   AcquireLeaseRequest request =
+ *       AcquireLeaseRequest.newBuilder()
+ *           .setSeries("series-905838985")
+ *           .setOwner("owner106164915")
+ *           .setTerm(Duration.newBuilder().build())
+ *           .setLeaseType(LeaseType.forNumber(0))
+ *           .build();
+ *   Lease response = streamingServiceClient.acquireLease(request);
+ * }
+ * }
+ * + *

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

SendPackets

Send packets to the series.

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • sendPacketsCallable() + *

+ *

ReceivePackets

Receive packets from the series.

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • receivePacketsCallable() + *

+ *

ReceiveEvents

Receive events given the stream name.

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • receiveEventsCallable() + *

+ *

AcquireLease

AcquireLease acquires a lease.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • acquireLease(AcquireLeaseRequest request) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • acquireLeaseCallable() + *

+ *

RenewLease

RenewLease renews a lease.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • renewLease(RenewLeaseRequest request) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • renewLeaseCallable() + *

+ *

ReleaseLease

RleaseLease releases a lease.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • releaseLease(ReleaseLeaseRequest request) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • releaseLeaseCallable() + *

+ *
+ * + *

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 StreamingServiceSettings to + * create(). For example: + * + *

To customize credentials: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * StreamingServiceSettings streamingServiceSettings =
+ *     StreamingServiceSettings.newBuilder()
+ *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ *         .build();
+ * StreamingServiceClient streamingServiceClient =
+ *     StreamingServiceClient.create(streamingServiceSettings);
+ * }
+ * + *

To customize the endpoint: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * StreamingServiceSettings streamingServiceSettings =
+ *     StreamingServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
+ * StreamingServiceClient streamingServiceClient =
+ *     StreamingServiceClient.create(streamingServiceSettings);
+ * }
+ * + *

To use REST (HTTP1.1/JSON) transport (instead of gRPC) for sending and receiving requests over + * the wire: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * StreamingServiceSettings streamingServiceSettings =
+ *     StreamingServiceSettings.newHttpJsonBuilder().build();
+ * StreamingServiceClient streamingServiceClient =
+ *     StreamingServiceClient.create(streamingServiceSettings);
+ * }
+ * + *

Please refer to the GitHub repository's samples for more quickstart code snippets. + */ +@Generated("by gapic-generator-java") +public class StreamingServiceClient implements BackgroundResource { + private final StreamingServiceSettings settings; + private final StreamingServiceStub stub; + + /** Constructs an instance of StreamingServiceClient with default settings. */ + public static final StreamingServiceClient create() throws IOException { + return create(StreamingServiceSettings.newBuilder().build()); + } + + /** + * Constructs an instance of StreamingServiceClient, 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 StreamingServiceClient create(StreamingServiceSettings settings) + throws IOException { + return new StreamingServiceClient(settings); + } + + /** + * Constructs an instance of StreamingServiceClient, using the given stub for making calls. This + * is for advanced usage - prefer using create(StreamingServiceSettings). + */ + public static final StreamingServiceClient create(StreamingServiceStub stub) { + return new StreamingServiceClient(stub); + } + + /** + * Constructs an instance of StreamingServiceClient, 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 StreamingServiceClient(StreamingServiceSettings settings) throws IOException { + this.settings = settings; + this.stub = ((StreamingServiceStubSettings) settings.getStubSettings()).createStub(); + } + + protected StreamingServiceClient(StreamingServiceStub stub) { + this.settings = null; + this.stub = stub; + } + + public final StreamingServiceSettings getSettings() { + return settings; + } + + public StreamingServiceStub getStub() { + return stub; + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Send packets to the series. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (StreamingServiceClient streamingServiceClient = StreamingServiceClient.create()) {
+   *   BidiStream bidiStream =
+   *       streamingServiceClient.sendPacketsCallable().call();
+   *   SendPacketsRequest request = SendPacketsRequest.newBuilder().build();
+   *   bidiStream.send(request);
+   *   for (SendPacketsResponse response : bidiStream) {
+   *     // Do something when a response is received.
+   *   }
+   * }
+   * }
+ */ + public final BidiStreamingCallable + sendPacketsCallable() { + return stub.sendPacketsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Receive packets from the series. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (StreamingServiceClient streamingServiceClient = StreamingServiceClient.create()) {
+   *   BidiStream bidiStream =
+   *       streamingServiceClient.receivePacketsCallable().call();
+   *   ReceivePacketsRequest request = ReceivePacketsRequest.newBuilder().build();
+   *   bidiStream.send(request);
+   *   for (ReceivePacketsResponse response : bidiStream) {
+   *     // Do something when a response is received.
+   *   }
+   * }
+   * }
+ */ + public final BidiStreamingCallable + receivePacketsCallable() { + return stub.receivePacketsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Receive events given the stream name. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (StreamingServiceClient streamingServiceClient = StreamingServiceClient.create()) {
+   *   BidiStream bidiStream =
+   *       streamingServiceClient.receiveEventsCallable().call();
+   *   ReceiveEventsRequest request = ReceiveEventsRequest.newBuilder().build();
+   *   bidiStream.send(request);
+   *   for (ReceiveEventsResponse response : bidiStream) {
+   *     // Do something when a response is received.
+   *   }
+   * }
+   * }
+ */ + public final BidiStreamingCallable + receiveEventsCallable() { + return stub.receiveEventsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * AcquireLease acquires a lease. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (StreamingServiceClient streamingServiceClient = StreamingServiceClient.create()) {
+   *   AcquireLeaseRequest request =
+   *       AcquireLeaseRequest.newBuilder()
+   *           .setSeries("series-905838985")
+   *           .setOwner("owner106164915")
+   *           .setTerm(Duration.newBuilder().build())
+   *           .setLeaseType(LeaseType.forNumber(0))
+   *           .build();
+   *   Lease response = streamingServiceClient.acquireLease(request);
+   * }
+   * }
+ * + * @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 + */ + public final Lease acquireLease(AcquireLeaseRequest request) { + return acquireLeaseCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * AcquireLease acquires a lease. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (StreamingServiceClient streamingServiceClient = StreamingServiceClient.create()) {
+   *   AcquireLeaseRequest request =
+   *       AcquireLeaseRequest.newBuilder()
+   *           .setSeries("series-905838985")
+   *           .setOwner("owner106164915")
+   *           .setTerm(Duration.newBuilder().build())
+   *           .setLeaseType(LeaseType.forNumber(0))
+   *           .build();
+   *   ApiFuture future = streamingServiceClient.acquireLeaseCallable().futureCall(request);
+   *   // Do something.
+   *   Lease response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable acquireLeaseCallable() { + return stub.acquireLeaseCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * RenewLease renews a lease. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (StreamingServiceClient streamingServiceClient = StreamingServiceClient.create()) {
+   *   RenewLeaseRequest request =
+   *       RenewLeaseRequest.newBuilder()
+   *           .setId("id3355")
+   *           .setSeries("series-905838985")
+   *           .setOwner("owner106164915")
+   *           .setTerm(Duration.newBuilder().build())
+   *           .build();
+   *   Lease response = streamingServiceClient.renewLease(request);
+   * }
+   * }
+ * + * @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 + */ + public final Lease renewLease(RenewLeaseRequest request) { + return renewLeaseCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * RenewLease renews a lease. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (StreamingServiceClient streamingServiceClient = StreamingServiceClient.create()) {
+   *   RenewLeaseRequest request =
+   *       RenewLeaseRequest.newBuilder()
+   *           .setId("id3355")
+   *           .setSeries("series-905838985")
+   *           .setOwner("owner106164915")
+   *           .setTerm(Duration.newBuilder().build())
+   *           .build();
+   *   ApiFuture future = streamingServiceClient.renewLeaseCallable().futureCall(request);
+   *   // Do something.
+   *   Lease response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable renewLeaseCallable() { + return stub.renewLeaseCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * RleaseLease releases a lease. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (StreamingServiceClient streamingServiceClient = StreamingServiceClient.create()) {
+   *   ReleaseLeaseRequest request =
+   *       ReleaseLeaseRequest.newBuilder()
+   *           .setId("id3355")
+   *           .setSeries("series-905838985")
+   *           .setOwner("owner106164915")
+   *           .build();
+   *   ReleaseLeaseResponse response = streamingServiceClient.releaseLease(request);
+   * }
+   * }
+ * + * @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 + */ + public final ReleaseLeaseResponse releaseLease(ReleaseLeaseRequest request) { + return releaseLeaseCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * RleaseLease releases a lease. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (StreamingServiceClient streamingServiceClient = StreamingServiceClient.create()) {
+   *   ReleaseLeaseRequest request =
+   *       ReleaseLeaseRequest.newBuilder()
+   *           .setId("id3355")
+   *           .setSeries("series-905838985")
+   *           .setOwner("owner106164915")
+   *           .build();
+   *   ApiFuture future =
+   *       streamingServiceClient.releaseLeaseCallable().futureCall(request);
+   *   // Do something.
+   *   ReleaseLeaseResponse response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable releaseLeaseCallable() { + return stub.releaseLeaseCallable(); + } + + @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/java-visionai/google-cloud-visionai/src/main/java/com/google/cloud/visionai/v1/StreamingServiceSettings.java b/java-visionai/google-cloud-visionai/src/main/java/com/google/cloud/visionai/v1/StreamingServiceSettings.java new file mode 100644 index 000000000000..83297611d3e6 --- /dev/null +++ b/java-visionai/google-cloud-visionai/src/main/java/com/google/cloud/visionai/v1/StreamingServiceSettings.java @@ -0,0 +1,259 @@ +/* + * Copyright 2024 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.visionai.v1; + +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.httpjson.InstantiatingHttpJsonChannelProvider; +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.visionai.v1.stub.StreamingServiceStubSettings; +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 StreamingServiceClient}. + * + *

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

    + *
  • The default service address (visionai.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 acquireLease to 30 seconds: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * StreamingServiceSettings.Builder streamingServiceSettingsBuilder =
+ *     StreamingServiceSettings.newBuilder();
+ * streamingServiceSettingsBuilder
+ *     .acquireLeaseSettings()
+ *     .setRetrySettings(
+ *         streamingServiceSettingsBuilder
+ *             .acquireLeaseSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * StreamingServiceSettings streamingServiceSettings = streamingServiceSettingsBuilder.build();
+ * }
+ */ +@Generated("by gapic-generator-java") +public class StreamingServiceSettings extends ClientSettings { + + /** Returns the object with the settings used for calls to sendPackets. */ + public StreamingCallSettings sendPacketsSettings() { + return ((StreamingServiceStubSettings) getStubSettings()).sendPacketsSettings(); + } + + /** Returns the object with the settings used for calls to receivePackets. */ + public StreamingCallSettings + receivePacketsSettings() { + return ((StreamingServiceStubSettings) getStubSettings()).receivePacketsSettings(); + } + + /** Returns the object with the settings used for calls to receiveEvents. */ + public StreamingCallSettings + receiveEventsSettings() { + return ((StreamingServiceStubSettings) getStubSettings()).receiveEventsSettings(); + } + + /** Returns the object with the settings used for calls to acquireLease. */ + public UnaryCallSettings acquireLeaseSettings() { + return ((StreamingServiceStubSettings) getStubSettings()).acquireLeaseSettings(); + } + + /** Returns the object with the settings used for calls to renewLease. */ + public UnaryCallSettings renewLeaseSettings() { + return ((StreamingServiceStubSettings) getStubSettings()).renewLeaseSettings(); + } + + /** Returns the object with the settings used for calls to releaseLease. */ + public UnaryCallSettings releaseLeaseSettings() { + return ((StreamingServiceStubSettings) getStubSettings()).releaseLeaseSettings(); + } + + public static final StreamingServiceSettings create(StreamingServiceStubSettings stub) + throws IOException { + return new StreamingServiceSettings.Builder(stub.toBuilder()).build(); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return StreamingServiceStubSettings.defaultExecutorProviderBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return StreamingServiceStubSettings.getDefaultEndpoint(); + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return StreamingServiceStubSettings.getDefaultServiceScopes(); + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return StreamingServiceStubSettings.defaultCredentialsProviderBuilder(); + } + + /** Returns a builder for the default gRPC ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return StreamingServiceStubSettings.defaultGrpcTransportProviderBuilder(); + } + + /** Returns a builder for the default REST ChannelProvider for this service. */ + @BetaApi + public static InstantiatingHttpJsonChannelProvider.Builder + defaultHttpJsonTransportProviderBuilder() { + return StreamingServiceStubSettings.defaultHttpJsonTransportProviderBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return StreamingServiceStubSettings.defaultTransportChannelProvider(); + } + + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return StreamingServiceStubSettings.defaultApiClientHeaderProviderBuilder(); + } + + /** Returns a new gRPC builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new REST builder for this class. */ + public static Builder newHttpJsonBuilder() { + return Builder.createHttpJsonDefault(); + } + + /** 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 StreamingServiceSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + } + + /** Builder for StreamingServiceSettings. */ + public static class Builder extends ClientSettings.Builder { + + protected Builder() throws IOException { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(StreamingServiceStubSettings.newBuilder(clientContext)); + } + + protected Builder(StreamingServiceSettings settings) { + super(settings.getStubSettings().toBuilder()); + } + + protected Builder(StreamingServiceStubSettings.Builder stubSettings) { + super(stubSettings); + } + + private static Builder createDefault() { + return new Builder(StreamingServiceStubSettings.newBuilder()); + } + + private static Builder createHttpJsonDefault() { + return new Builder(StreamingServiceStubSettings.newHttpJsonBuilder()); + } + + public StreamingServiceStubSettings.Builder getStubSettingsBuilder() { + return ((StreamingServiceStubSettings.Builder) getStubSettings()); + } + + /** + * 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) { + super.applyToAllUnaryMethods( + getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater); + return this; + } + + /** Returns the builder for the settings used for calls to sendPackets. */ + public StreamingCallSettings.Builder + sendPacketsSettings() { + return getStubSettingsBuilder().sendPacketsSettings(); + } + + /** Returns the builder for the settings used for calls to receivePackets. */ + public StreamingCallSettings.Builder + receivePacketsSettings() { + return getStubSettingsBuilder().receivePacketsSettings(); + } + + /** Returns the builder for the settings used for calls to receiveEvents. */ + public StreamingCallSettings.Builder + receiveEventsSettings() { + return getStubSettingsBuilder().receiveEventsSettings(); + } + + /** Returns the builder for the settings used for calls to acquireLease. */ + public UnaryCallSettings.Builder acquireLeaseSettings() { + return getStubSettingsBuilder().acquireLeaseSettings(); + } + + /** Returns the builder for the settings used for calls to renewLease. */ + public UnaryCallSettings.Builder renewLeaseSettings() { + return getStubSettingsBuilder().renewLeaseSettings(); + } + + /** Returns the builder for the settings used for calls to releaseLease. */ + public UnaryCallSettings.Builder + releaseLeaseSettings() { + return getStubSettingsBuilder().releaseLeaseSettings(); + } + + @Override + public StreamingServiceSettings build() throws IOException { + return new StreamingServiceSettings(this); + } + } +} diff --git a/java-visionai/google-cloud-visionai/src/main/java/com/google/cloud/visionai/v1/StreamsServiceClient.java b/java-visionai/google-cloud-visionai/src/main/java/com/google/cloud/visionai/v1/StreamsServiceClient.java new file mode 100644 index 000000000000..286ef8a33cd5 --- /dev/null +++ b/java-visionai/google-cloud-visionai/src/main/java/com/google/cloud/visionai/v1/StreamsServiceClient.java @@ -0,0 +1,4180 @@ +/* + * Copyright 2024 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.visionai.v1; + +import com.google.api.core.ApiFuture; +import com.google.api.core.ApiFutures; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.httpjson.longrunning.OperationsClient; +import com.google.api.gax.longrunning.OperationFuture; +import com.google.api.gax.paging.AbstractFixedSizeCollection; +import com.google.api.gax.paging.AbstractPage; +import com.google.api.gax.paging.AbstractPagedListResponse; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PageContext; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.visionai.v1.stub.StreamsServiceStub; +import com.google.cloud.visionai.v1.stub.StreamsServiceStubSettings; +import com.google.common.util.concurrent.MoreExecutors; +import com.google.longrunning.Operation; +import com.google.protobuf.Empty; +import com.google.protobuf.FieldMask; +import java.io.IOException; +import java.util.List; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Service Description: Service describing handlers for resources. Vision API and Vision AI API are + * two independent APIs developed by the same team. Vision API is for people to annotate their image + * while Vision AI is an e2e solution for customer to build their own computer vision application. + * + *

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: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (StreamsServiceClient streamsServiceClient = StreamsServiceClient.create()) {
+ *   ClusterName name = ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]");
+ *   Cluster response = streamsServiceClient.getCluster(name);
+ * }
+ * }
+ * + *

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

ListClusters

Lists Clusters in a given project and location.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • listClusters(ListClustersRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • listClusters(LocationName parent) + *

  • listClusters(String parent) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • listClustersPagedCallable() + *

  • listClustersCallable() + *

+ *

GetCluster

Gets details of a single Cluster.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • getCluster(GetClusterRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • getCluster(ClusterName name) + *

  • getCluster(String name) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • getClusterCallable() + *

+ *

CreateCluster

Creates a new Cluster in a given project and location.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • createClusterAsync(CreateClusterRequest request) + *

+ *

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

+ *
    + *
  • createClusterAsync(LocationName parent, Cluster cluster, String clusterId) + *

  • createClusterAsync(String parent, Cluster cluster, String clusterId) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • createClusterOperationCallable() + *

  • createClusterCallable() + *

+ *

UpdateCluster

Updates the parameters of a single Cluster.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • updateClusterAsync(UpdateClusterRequest request) + *

+ *

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

+ *
    + *
  • updateClusterAsync(Cluster cluster, FieldMask updateMask) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • updateClusterOperationCallable() + *

  • updateClusterCallable() + *

+ *

DeleteCluster

Deletes a single Cluster.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • deleteClusterAsync(DeleteClusterRequest request) + *

+ *

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

+ *
    + *
  • deleteClusterAsync(ClusterName name) + *

  • deleteClusterAsync(String name) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • deleteClusterOperationCallable() + *

  • deleteClusterCallable() + *

+ *

ListStreams

Lists Streams in a given project and location.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • listStreams(ListStreamsRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • listStreams(ClusterName parent) + *

  • listStreams(String parent) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • listStreamsPagedCallable() + *

  • listStreamsCallable() + *

+ *

GetStream

Gets details of a single Stream.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • getStream(GetStreamRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • getStream(StreamName name) + *

  • getStream(String name) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • getStreamCallable() + *

+ *

CreateStream

Creates a new Stream in a given project and location.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • createStreamAsync(CreateStreamRequest request) + *

+ *

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

+ *
    + *
  • createStreamAsync(ClusterName parent, Stream stream, String streamId) + *

  • createStreamAsync(String parent, Stream stream, String streamId) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • createStreamOperationCallable() + *

  • createStreamCallable() + *

+ *

UpdateStream

Updates the parameters of a single Stream.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • updateStreamAsync(UpdateStreamRequest request) + *

+ *

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

+ *
    + *
  • updateStreamAsync(Stream stream, FieldMask updateMask) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • updateStreamOperationCallable() + *

  • updateStreamCallable() + *

+ *

DeleteStream

Deletes a single Stream.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • deleteStreamAsync(DeleteStreamRequest request) + *

+ *

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

+ *
    + *
  • deleteStreamAsync(StreamName name) + *

  • deleteStreamAsync(String name) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • deleteStreamOperationCallable() + *

  • deleteStreamCallable() + *

+ *

GetStreamThumbnail

Gets the thumbnail (image snapshot) of a single Stream.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • getStreamThumbnailAsync(GetStreamThumbnailRequest request) + *

+ *

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

+ *
    + *
  • getStreamThumbnailAsync(String stream, String gcsObjectName) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • getStreamThumbnailOperationCallable() + *

  • getStreamThumbnailCallable() + *

+ *

GenerateStreamHlsToken

Generate the JWT auth token required to get the stream HLS contents.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • generateStreamHlsToken(GenerateStreamHlsTokenRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • generateStreamHlsToken(String stream) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • generateStreamHlsTokenCallable() + *

+ *

ListEvents

Lists Events in a given project and location.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • listEvents(ListEventsRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • listEvents(ClusterName parent) + *

  • listEvents(String parent) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • listEventsPagedCallable() + *

  • listEventsCallable() + *

+ *

GetEvent

Gets details of a single Event.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • getEvent(GetEventRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • getEvent(EventName name) + *

  • getEvent(String name) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • getEventCallable() + *

+ *

CreateEvent

Creates a new Event in a given project and location.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • createEventAsync(CreateEventRequest request) + *

+ *

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

+ *
    + *
  • createEventAsync(ClusterName parent, Event event, String eventId) + *

  • createEventAsync(String parent, Event event, String eventId) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • createEventOperationCallable() + *

  • createEventCallable() + *

+ *

UpdateEvent

Updates the parameters of a single Event.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • updateEventAsync(UpdateEventRequest request) + *

+ *

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

+ *
    + *
  • updateEventAsync(Event event, FieldMask updateMask) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • updateEventOperationCallable() + *

  • updateEventCallable() + *

+ *

DeleteEvent

Deletes a single Event.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • deleteEventAsync(DeleteEventRequest request) + *

+ *

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

+ *
    + *
  • deleteEventAsync(EventName name) + *

  • deleteEventAsync(String name) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • deleteEventOperationCallable() + *

  • deleteEventCallable() + *

+ *

ListSeries

Lists Series in a given project and location.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • listSeries(ListSeriesRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • listSeries(ClusterName parent) + *

  • listSeries(String parent) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • listSeriesPagedCallable() + *

  • listSeriesCallable() + *

+ *

GetSeries

Gets details of a single Series.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • getSeries(GetSeriesRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • getSeries(SeriesName name) + *

  • getSeries(String name) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • getSeriesCallable() + *

+ *

CreateSeries

Creates a new Series in a given project and location.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • createSeriesAsync(CreateSeriesRequest request) + *

+ *

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

+ *
    + *
  • createSeriesAsync(ClusterName parent, Series series, String seriesId) + *

  • createSeriesAsync(String parent, Series series, String seriesId) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • createSeriesOperationCallable() + *

  • createSeriesCallable() + *

+ *

UpdateSeries

Updates the parameters of a single Event.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • updateSeriesAsync(UpdateSeriesRequest request) + *

+ *

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

+ *
    + *
  • updateSeriesAsync(Series series, FieldMask updateMask) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • updateSeriesOperationCallable() + *

  • updateSeriesCallable() + *

+ *

DeleteSeries

Deletes a single Series.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • deleteSeriesAsync(DeleteSeriesRequest request) + *

+ *

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

+ *
    + *
  • deleteSeriesAsync(SeriesName name) + *

  • deleteSeriesAsync(String name) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • deleteSeriesOperationCallable() + *

  • deleteSeriesCallable() + *

+ *

MaterializeChannel

Materialize a channel.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • materializeChannelAsync(MaterializeChannelRequest request) + *

+ *

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

+ *
    + *
  • materializeChannelAsync(ClusterName parent, Channel channel, String channelId) + *

  • materializeChannelAsync(String parent, Channel channel, String channelId) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • materializeChannelOperationCallable() + *

  • materializeChannelCallable() + *

+ *
+ * + *

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 StreamsServiceSettings to + * create(). For example: + * + *

To customize credentials: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * StreamsServiceSettings streamsServiceSettings =
+ *     StreamsServiceSettings.newBuilder()
+ *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ *         .build();
+ * StreamsServiceClient streamsServiceClient = StreamsServiceClient.create(streamsServiceSettings);
+ * }
+ * + *

To customize the endpoint: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * StreamsServiceSettings streamsServiceSettings =
+ *     StreamsServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
+ * StreamsServiceClient streamsServiceClient = StreamsServiceClient.create(streamsServiceSettings);
+ * }
+ * + *

To use REST (HTTP1.1/JSON) transport (instead of gRPC) for sending and receiving requests over + * the wire: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * StreamsServiceSettings streamsServiceSettings =
+ *     StreamsServiceSettings.newHttpJsonBuilder().build();
+ * StreamsServiceClient streamsServiceClient = StreamsServiceClient.create(streamsServiceSettings);
+ * }
+ * + *

Please refer to the GitHub repository's samples for more quickstart code snippets. + */ +@Generated("by gapic-generator-java") +public class StreamsServiceClient implements BackgroundResource { + private final StreamsServiceSettings settings; + private final StreamsServiceStub stub; + private final OperationsClient httpJsonOperationsClient; + private final com.google.longrunning.OperationsClient operationsClient; + + /** Constructs an instance of StreamsServiceClient with default settings. */ + public static final StreamsServiceClient create() throws IOException { + return create(StreamsServiceSettings.newBuilder().build()); + } + + /** + * Constructs an instance of StreamsServiceClient, 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 StreamsServiceClient create(StreamsServiceSettings settings) + throws IOException { + return new StreamsServiceClient(settings); + } + + /** + * Constructs an instance of StreamsServiceClient, using the given stub for making calls. This is + * for advanced usage - prefer using create(StreamsServiceSettings). + */ + public static final StreamsServiceClient create(StreamsServiceStub stub) { + return new StreamsServiceClient(stub); + } + + /** + * Constructs an instance of StreamsServiceClient, 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 StreamsServiceClient(StreamsServiceSettings settings) throws IOException { + this.settings = settings; + this.stub = ((StreamsServiceStubSettings) settings.getStubSettings()).createStub(); + this.operationsClient = + com.google.longrunning.OperationsClient.create(this.stub.getOperationsStub()); + this.httpJsonOperationsClient = OperationsClient.create(this.stub.getHttpJsonOperationsStub()); + } + + protected StreamsServiceClient(StreamsServiceStub stub) { + this.settings = null; + this.stub = stub; + this.operationsClient = + com.google.longrunning.OperationsClient.create(this.stub.getOperationsStub()); + this.httpJsonOperationsClient = OperationsClient.create(this.stub.getHttpJsonOperationsStub()); + } + + public final StreamsServiceSettings getSettings() { + return settings; + } + + public StreamsServiceStub 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. + */ + public final com.google.longrunning.OperationsClient getOperationsClient() { + return operationsClient; + } + + /** + * Returns the OperationsClient that can be used to query the status of a long-running operation + * returned by another API method call. + */ + @BetaApi + public final OperationsClient getHttpJsonOperationsClient() { + return httpJsonOperationsClient; + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Clusters in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (StreamsServiceClient streamsServiceClient = StreamsServiceClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   for (Cluster element : streamsServiceClient.listClusters(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. Parent value for ListClustersRequest. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListClustersPagedResponse listClusters(LocationName parent) { + ListClustersRequest request = + ListClustersRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listClusters(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Clusters in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (StreamsServiceClient streamsServiceClient = StreamsServiceClient.create()) {
+   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+   *   for (Cluster element : streamsServiceClient.listClusters(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. Parent value for ListClustersRequest. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListClustersPagedResponse listClusters(String parent) { + ListClustersRequest request = ListClustersRequest.newBuilder().setParent(parent).build(); + return listClusters(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Clusters in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (StreamsServiceClient streamsServiceClient = StreamsServiceClient.create()) {
+   *   ListClustersRequest request =
+   *       ListClustersRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   for (Cluster element : streamsServiceClient.listClusters(request).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @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 + */ + public final ListClustersPagedResponse listClusters(ListClustersRequest request) { + return listClustersPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Clusters in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (StreamsServiceClient streamsServiceClient = StreamsServiceClient.create()) {
+   *   ListClustersRequest request =
+   *       ListClustersRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   ApiFuture future =
+   *       streamsServiceClient.listClustersPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (Cluster element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listClustersPagedCallable() { + return stub.listClustersPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Clusters in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (StreamsServiceClient streamsServiceClient = StreamsServiceClient.create()) {
+   *   ListClustersRequest request =
+   *       ListClustersRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   while (true) {
+   *     ListClustersResponse response = streamsServiceClient.listClustersCallable().call(request);
+   *     for (Cluster element : response.getClustersList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable listClustersCallable() { + return stub.listClustersCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single Cluster. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (StreamsServiceClient streamsServiceClient = StreamsServiceClient.create()) {
+   *   ClusterName name = ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]");
+   *   Cluster response = streamsServiceClient.getCluster(name);
+   * }
+   * }
+ * + * @param name Required. Name of the resource. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Cluster getCluster(ClusterName name) { + GetClusterRequest request = + GetClusterRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return getCluster(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single Cluster. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (StreamsServiceClient streamsServiceClient = StreamsServiceClient.create()) {
+   *   String name = ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString();
+   *   Cluster response = streamsServiceClient.getCluster(name);
+   * }
+   * }
+ * + * @param name Required. Name of the resource. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Cluster getCluster(String name) { + GetClusterRequest request = GetClusterRequest.newBuilder().setName(name).build(); + return getCluster(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single Cluster. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (StreamsServiceClient streamsServiceClient = StreamsServiceClient.create()) {
+   *   GetClusterRequest request =
+   *       GetClusterRequest.newBuilder()
+   *           .setName(ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString())
+   *           .build();
+   *   Cluster response = streamsServiceClient.getCluster(request);
+   * }
+   * }
+ * + * @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 + */ + public final Cluster getCluster(GetClusterRequest request) { + return getClusterCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single Cluster. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (StreamsServiceClient streamsServiceClient = StreamsServiceClient.create()) {
+   *   GetClusterRequest request =
+   *       GetClusterRequest.newBuilder()
+   *           .setName(ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString())
+   *           .build();
+   *   ApiFuture future = streamsServiceClient.getClusterCallable().futureCall(request);
+   *   // Do something.
+   *   Cluster response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getClusterCallable() { + return stub.getClusterCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new Cluster in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (StreamsServiceClient streamsServiceClient = StreamsServiceClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   Cluster cluster = Cluster.newBuilder().build();
+   *   String clusterId = "clusterId561939637";
+   *   Cluster response = streamsServiceClient.createClusterAsync(parent, cluster, clusterId).get();
+   * }
+   * }
+ * + * @param parent Required. Value for parent. + * @param cluster Required. The resource being created. + * @param clusterId Required. Id of the requesting object. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture createClusterAsync( + LocationName parent, Cluster cluster, String clusterId) { + CreateClusterRequest request = + CreateClusterRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setCluster(cluster) + .setClusterId(clusterId) + .build(); + return createClusterAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new Cluster in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (StreamsServiceClient streamsServiceClient = StreamsServiceClient.create()) {
+   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+   *   Cluster cluster = Cluster.newBuilder().build();
+   *   String clusterId = "clusterId561939637";
+   *   Cluster response = streamsServiceClient.createClusterAsync(parent, cluster, clusterId).get();
+   * }
+   * }
+ * + * @param parent Required. Value for parent. + * @param cluster Required. The resource being created. + * @param clusterId Required. Id of the requesting object. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture createClusterAsync( + String parent, Cluster cluster, String clusterId) { + CreateClusterRequest request = + CreateClusterRequest.newBuilder() + .setParent(parent) + .setCluster(cluster) + .setClusterId(clusterId) + .build(); + return createClusterAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new Cluster in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (StreamsServiceClient streamsServiceClient = StreamsServiceClient.create()) {
+   *   CreateClusterRequest request =
+   *       CreateClusterRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setClusterId("clusterId561939637")
+   *           .setCluster(Cluster.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   Cluster response = streamsServiceClient.createClusterAsync(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 + */ + public final OperationFuture createClusterAsync( + CreateClusterRequest request) { + return createClusterOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new Cluster in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (StreamsServiceClient streamsServiceClient = StreamsServiceClient.create()) {
+   *   CreateClusterRequest request =
+   *       CreateClusterRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setClusterId("clusterId561939637")
+   *           .setCluster(Cluster.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   OperationFuture future =
+   *       streamsServiceClient.createClusterOperationCallable().futureCall(request);
+   *   // Do something.
+   *   Cluster response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + createClusterOperationCallable() { + return stub.createClusterOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new Cluster in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (StreamsServiceClient streamsServiceClient = StreamsServiceClient.create()) {
+   *   CreateClusterRequest request =
+   *       CreateClusterRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setClusterId("clusterId561939637")
+   *           .setCluster(Cluster.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   ApiFuture future =
+   *       streamsServiceClient.createClusterCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable createClusterCallable() { + return stub.createClusterCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the parameters of a single Cluster. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (StreamsServiceClient streamsServiceClient = StreamsServiceClient.create()) {
+   *   Cluster cluster = Cluster.newBuilder().build();
+   *   FieldMask updateMask = FieldMask.newBuilder().build();
+   *   Cluster response = streamsServiceClient.updateClusterAsync(cluster, updateMask).get();
+   * }
+   * }
+ * + * @param cluster Required. The resource being updated + * @param updateMask Required. Field mask is used to specify the fields to be overwritten in the + * Cluster resource by the update. The fields specified in the update_mask are relative to the + * resource, not the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields will be overwritten. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture updateClusterAsync( + Cluster cluster, FieldMask updateMask) { + UpdateClusterRequest request = + UpdateClusterRequest.newBuilder().setCluster(cluster).setUpdateMask(updateMask).build(); + return updateClusterAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the parameters of a single Cluster. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (StreamsServiceClient streamsServiceClient = StreamsServiceClient.create()) {
+   *   UpdateClusterRequest request =
+   *       UpdateClusterRequest.newBuilder()
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .setCluster(Cluster.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   Cluster response = streamsServiceClient.updateClusterAsync(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 + */ + public final OperationFuture updateClusterAsync( + UpdateClusterRequest request) { + return updateClusterOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the parameters of a single Cluster. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (StreamsServiceClient streamsServiceClient = StreamsServiceClient.create()) {
+   *   UpdateClusterRequest request =
+   *       UpdateClusterRequest.newBuilder()
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .setCluster(Cluster.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   OperationFuture future =
+   *       streamsServiceClient.updateClusterOperationCallable().futureCall(request);
+   *   // Do something.
+   *   Cluster response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + updateClusterOperationCallable() { + return stub.updateClusterOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the parameters of a single Cluster. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (StreamsServiceClient streamsServiceClient = StreamsServiceClient.create()) {
+   *   UpdateClusterRequest request =
+   *       UpdateClusterRequest.newBuilder()
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .setCluster(Cluster.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   ApiFuture future =
+   *       streamsServiceClient.updateClusterCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable updateClusterCallable() { + return stub.updateClusterCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single Cluster. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (StreamsServiceClient streamsServiceClient = StreamsServiceClient.create()) {
+   *   ClusterName name = ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]");
+   *   streamsServiceClient.deleteClusterAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. Name of the resource + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteClusterAsync(ClusterName name) { + DeleteClusterRequest request = + DeleteClusterRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return deleteClusterAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single Cluster. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (StreamsServiceClient streamsServiceClient = StreamsServiceClient.create()) {
+   *   String name = ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString();
+   *   streamsServiceClient.deleteClusterAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. Name of the resource + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteClusterAsync(String name) { + DeleteClusterRequest request = DeleteClusterRequest.newBuilder().setName(name).build(); + return deleteClusterAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single Cluster. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (StreamsServiceClient streamsServiceClient = StreamsServiceClient.create()) {
+   *   DeleteClusterRequest request =
+   *       DeleteClusterRequest.newBuilder()
+   *           .setName(ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   streamsServiceClient.deleteClusterAsync(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 + */ + public final OperationFuture deleteClusterAsync( + DeleteClusterRequest request) { + return deleteClusterOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single Cluster. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (StreamsServiceClient streamsServiceClient = StreamsServiceClient.create()) {
+   *   DeleteClusterRequest request =
+   *       DeleteClusterRequest.newBuilder()
+   *           .setName(ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   OperationFuture future =
+   *       streamsServiceClient.deleteClusterOperationCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final OperationCallable + deleteClusterOperationCallable() { + return stub.deleteClusterOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single Cluster. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (StreamsServiceClient streamsServiceClient = StreamsServiceClient.create()) {
+   *   DeleteClusterRequest request =
+   *       DeleteClusterRequest.newBuilder()
+   *           .setName(ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   ApiFuture future =
+   *       streamsServiceClient.deleteClusterCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final UnaryCallable deleteClusterCallable() { + return stub.deleteClusterCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Streams in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (StreamsServiceClient streamsServiceClient = StreamsServiceClient.create()) {
+   *   ClusterName parent = ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]");
+   *   for (Stream element : streamsServiceClient.listStreams(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. Parent value for ListStreamsRequest. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListStreamsPagedResponse listStreams(ClusterName parent) { + ListStreamsRequest request = + ListStreamsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listStreams(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Streams in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (StreamsServiceClient streamsServiceClient = StreamsServiceClient.create()) {
+   *   String parent = ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString();
+   *   for (Stream element : streamsServiceClient.listStreams(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. Parent value for ListStreamsRequest. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListStreamsPagedResponse listStreams(String parent) { + ListStreamsRequest request = ListStreamsRequest.newBuilder().setParent(parent).build(); + return listStreams(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Streams in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (StreamsServiceClient streamsServiceClient = StreamsServiceClient.create()) {
+   *   ListStreamsRequest request =
+   *       ListStreamsRequest.newBuilder()
+   *           .setParent(ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   for (Stream element : streamsServiceClient.listStreams(request).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @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 + */ + public final ListStreamsPagedResponse listStreams(ListStreamsRequest request) { + return listStreamsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Streams in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (StreamsServiceClient streamsServiceClient = StreamsServiceClient.create()) {
+   *   ListStreamsRequest request =
+   *       ListStreamsRequest.newBuilder()
+   *           .setParent(ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   ApiFuture future =
+   *       streamsServiceClient.listStreamsPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (Stream element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listStreamsPagedCallable() { + return stub.listStreamsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Streams in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (StreamsServiceClient streamsServiceClient = StreamsServiceClient.create()) {
+   *   ListStreamsRequest request =
+   *       ListStreamsRequest.newBuilder()
+   *           .setParent(ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   while (true) {
+   *     ListStreamsResponse response = streamsServiceClient.listStreamsCallable().call(request);
+   *     for (Stream element : response.getStreamsList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable listStreamsCallable() { + return stub.listStreamsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single Stream. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (StreamsServiceClient streamsServiceClient = StreamsServiceClient.create()) {
+   *   StreamName name = StreamName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[STREAM]");
+   *   Stream response = streamsServiceClient.getStream(name);
+   * }
+   * }
+ * + * @param name Required. Name of the resource. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Stream getStream(StreamName name) { + GetStreamRequest request = + GetStreamRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return getStream(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single Stream. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (StreamsServiceClient streamsServiceClient = StreamsServiceClient.create()) {
+   *   String name = StreamName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[STREAM]").toString();
+   *   Stream response = streamsServiceClient.getStream(name);
+   * }
+   * }
+ * + * @param name Required. Name of the resource. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Stream getStream(String name) { + GetStreamRequest request = GetStreamRequest.newBuilder().setName(name).build(); + return getStream(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single Stream. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (StreamsServiceClient streamsServiceClient = StreamsServiceClient.create()) {
+   *   GetStreamRequest request =
+   *       GetStreamRequest.newBuilder()
+   *           .setName(StreamName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[STREAM]").toString())
+   *           .build();
+   *   Stream response = streamsServiceClient.getStream(request);
+   * }
+   * }
+ * + * @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 + */ + public final Stream getStream(GetStreamRequest request) { + return getStreamCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single Stream. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (StreamsServiceClient streamsServiceClient = StreamsServiceClient.create()) {
+   *   GetStreamRequest request =
+   *       GetStreamRequest.newBuilder()
+   *           .setName(StreamName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[STREAM]").toString())
+   *           .build();
+   *   ApiFuture future = streamsServiceClient.getStreamCallable().futureCall(request);
+   *   // Do something.
+   *   Stream response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getStreamCallable() { + return stub.getStreamCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new Stream in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (StreamsServiceClient streamsServiceClient = StreamsServiceClient.create()) {
+   *   ClusterName parent = ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]");
+   *   Stream stream = Stream.newBuilder().build();
+   *   String streamId = "streamId1790933179";
+   *   Stream response = streamsServiceClient.createStreamAsync(parent, stream, streamId).get();
+   * }
+   * }
+ * + * @param parent Required. Value for parent. + * @param stream Required. The resource being created. + * @param streamId Required. Id of the requesting object. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture createStreamAsync( + ClusterName parent, Stream stream, String streamId) { + CreateStreamRequest request = + CreateStreamRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setStream(stream) + .setStreamId(streamId) + .build(); + return createStreamAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new Stream in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (StreamsServiceClient streamsServiceClient = StreamsServiceClient.create()) {
+   *   String parent = ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString();
+   *   Stream stream = Stream.newBuilder().build();
+   *   String streamId = "streamId1790933179";
+   *   Stream response = streamsServiceClient.createStreamAsync(parent, stream, streamId).get();
+   * }
+   * }
+ * + * @param parent Required. Value for parent. + * @param stream Required. The resource being created. + * @param streamId Required. Id of the requesting object. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture createStreamAsync( + String parent, Stream stream, String streamId) { + CreateStreamRequest request = + CreateStreamRequest.newBuilder() + .setParent(parent) + .setStream(stream) + .setStreamId(streamId) + .build(); + return createStreamAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new Stream in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (StreamsServiceClient streamsServiceClient = StreamsServiceClient.create()) {
+   *   CreateStreamRequest request =
+   *       CreateStreamRequest.newBuilder()
+   *           .setParent(ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString())
+   *           .setStreamId("streamId1790933179")
+   *           .setStream(Stream.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   Stream response = streamsServiceClient.createStreamAsync(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 + */ + public final OperationFuture createStreamAsync( + CreateStreamRequest request) { + return createStreamOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new Stream in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (StreamsServiceClient streamsServiceClient = StreamsServiceClient.create()) {
+   *   CreateStreamRequest request =
+   *       CreateStreamRequest.newBuilder()
+   *           .setParent(ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString())
+   *           .setStreamId("streamId1790933179")
+   *           .setStream(Stream.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   OperationFuture future =
+   *       streamsServiceClient.createStreamOperationCallable().futureCall(request);
+   *   // Do something.
+   *   Stream response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + createStreamOperationCallable() { + return stub.createStreamOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new Stream in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (StreamsServiceClient streamsServiceClient = StreamsServiceClient.create()) {
+   *   CreateStreamRequest request =
+   *       CreateStreamRequest.newBuilder()
+   *           .setParent(ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString())
+   *           .setStreamId("streamId1790933179")
+   *           .setStream(Stream.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   ApiFuture future = streamsServiceClient.createStreamCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable createStreamCallable() { + return stub.createStreamCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the parameters of a single Stream. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (StreamsServiceClient streamsServiceClient = StreamsServiceClient.create()) {
+   *   Stream stream = Stream.newBuilder().build();
+   *   FieldMask updateMask = FieldMask.newBuilder().build();
+   *   Stream response = streamsServiceClient.updateStreamAsync(stream, updateMask).get();
+   * }
+   * }
+ * + * @param stream Required. The resource being updated. + * @param updateMask Required. Field mask is used to specify the fields to be overwritten in the + * Stream resource by the update. The fields specified in the update_mask are relative to the + * resource, not the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields will be overwritten. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture updateStreamAsync( + Stream stream, FieldMask updateMask) { + UpdateStreamRequest request = + UpdateStreamRequest.newBuilder().setStream(stream).setUpdateMask(updateMask).build(); + return updateStreamAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the parameters of a single Stream. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (StreamsServiceClient streamsServiceClient = StreamsServiceClient.create()) {
+   *   UpdateStreamRequest request =
+   *       UpdateStreamRequest.newBuilder()
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .setStream(Stream.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   Stream response = streamsServiceClient.updateStreamAsync(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 + */ + public final OperationFuture updateStreamAsync( + UpdateStreamRequest request) { + return updateStreamOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the parameters of a single Stream. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (StreamsServiceClient streamsServiceClient = StreamsServiceClient.create()) {
+   *   UpdateStreamRequest request =
+   *       UpdateStreamRequest.newBuilder()
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .setStream(Stream.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   OperationFuture future =
+   *       streamsServiceClient.updateStreamOperationCallable().futureCall(request);
+   *   // Do something.
+   *   Stream response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + updateStreamOperationCallable() { + return stub.updateStreamOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the parameters of a single Stream. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (StreamsServiceClient streamsServiceClient = StreamsServiceClient.create()) {
+   *   UpdateStreamRequest request =
+   *       UpdateStreamRequest.newBuilder()
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .setStream(Stream.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   ApiFuture future = streamsServiceClient.updateStreamCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable updateStreamCallable() { + return stub.updateStreamCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single Stream. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (StreamsServiceClient streamsServiceClient = StreamsServiceClient.create()) {
+   *   StreamName name = StreamName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[STREAM]");
+   *   streamsServiceClient.deleteStreamAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. Name of the resource. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteStreamAsync(StreamName name) { + DeleteStreamRequest request = + DeleteStreamRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return deleteStreamAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single Stream. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (StreamsServiceClient streamsServiceClient = StreamsServiceClient.create()) {
+   *   String name = StreamName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[STREAM]").toString();
+   *   streamsServiceClient.deleteStreamAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. Name of the resource. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteStreamAsync(String name) { + DeleteStreamRequest request = DeleteStreamRequest.newBuilder().setName(name).build(); + return deleteStreamAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single Stream. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (StreamsServiceClient streamsServiceClient = StreamsServiceClient.create()) {
+   *   DeleteStreamRequest request =
+   *       DeleteStreamRequest.newBuilder()
+   *           .setName(StreamName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[STREAM]").toString())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   streamsServiceClient.deleteStreamAsync(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 + */ + public final OperationFuture deleteStreamAsync( + DeleteStreamRequest request) { + return deleteStreamOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single Stream. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (StreamsServiceClient streamsServiceClient = StreamsServiceClient.create()) {
+   *   DeleteStreamRequest request =
+   *       DeleteStreamRequest.newBuilder()
+   *           .setName(StreamName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[STREAM]").toString())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   OperationFuture future =
+   *       streamsServiceClient.deleteStreamOperationCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final OperationCallable + deleteStreamOperationCallable() { + return stub.deleteStreamOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single Stream. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (StreamsServiceClient streamsServiceClient = StreamsServiceClient.create()) {
+   *   DeleteStreamRequest request =
+   *       DeleteStreamRequest.newBuilder()
+   *           .setName(StreamName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[STREAM]").toString())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   ApiFuture future = streamsServiceClient.deleteStreamCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final UnaryCallable deleteStreamCallable() { + return stub.deleteStreamCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the thumbnail (image snapshot) of a single Stream. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (StreamsServiceClient streamsServiceClient = StreamsServiceClient.create()) {
+   *   String stream = "stream-891990144";
+   *   String gcsObjectName = "gcsObjectName-1987275551";
+   *   GetStreamThumbnailResponse response =
+   *       streamsServiceClient.getStreamThumbnailAsync(stream, gcsObjectName).get();
+   * }
+   * }
+ * + * @param stream Required. The name of the stream for to get the thumbnail from. + * @param gcsObjectName Required. The name of the GCS object to store the thumbnail image. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture + getStreamThumbnailAsync(String stream, String gcsObjectName) { + GetStreamThumbnailRequest request = + GetStreamThumbnailRequest.newBuilder() + .setStream(stream) + .setGcsObjectName(gcsObjectName) + .build(); + return getStreamThumbnailAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the thumbnail (image snapshot) of a single Stream. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (StreamsServiceClient streamsServiceClient = StreamsServiceClient.create()) {
+   *   GetStreamThumbnailRequest request =
+   *       GetStreamThumbnailRequest.newBuilder()
+   *           .setStream("stream-891990144")
+   *           .setGcsObjectName("gcsObjectName-1987275551")
+   *           .setEvent("event96891546")
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   GetStreamThumbnailResponse response =
+   *       streamsServiceClient.getStreamThumbnailAsync(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 + */ + public final OperationFuture + getStreamThumbnailAsync(GetStreamThumbnailRequest request) { + return getStreamThumbnailOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the thumbnail (image snapshot) of a single Stream. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (StreamsServiceClient streamsServiceClient = StreamsServiceClient.create()) {
+   *   GetStreamThumbnailRequest request =
+   *       GetStreamThumbnailRequest.newBuilder()
+   *           .setStream("stream-891990144")
+   *           .setGcsObjectName("gcsObjectName-1987275551")
+   *           .setEvent("event96891546")
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   OperationFuture future =
+   *       streamsServiceClient.getStreamThumbnailOperationCallable().futureCall(request);
+   *   // Do something.
+   *   GetStreamThumbnailResponse response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable< + GetStreamThumbnailRequest, GetStreamThumbnailResponse, OperationMetadata> + getStreamThumbnailOperationCallable() { + return stub.getStreamThumbnailOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the thumbnail (image snapshot) of a single Stream. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (StreamsServiceClient streamsServiceClient = StreamsServiceClient.create()) {
+   *   GetStreamThumbnailRequest request =
+   *       GetStreamThumbnailRequest.newBuilder()
+   *           .setStream("stream-891990144")
+   *           .setGcsObjectName("gcsObjectName-1987275551")
+   *           .setEvent("event96891546")
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   ApiFuture future =
+   *       streamsServiceClient.getStreamThumbnailCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getStreamThumbnailCallable() { + return stub.getStreamThumbnailCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Generate the JWT auth token required to get the stream HLS contents. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (StreamsServiceClient streamsServiceClient = StreamsServiceClient.create()) {
+   *   String stream = "stream-891990144";
+   *   GenerateStreamHlsTokenResponse response = streamsServiceClient.generateStreamHlsToken(stream);
+   * }
+   * }
+ * + * @param stream Required. The name of the stream. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final GenerateStreamHlsTokenResponse generateStreamHlsToken(String stream) { + GenerateStreamHlsTokenRequest request = + GenerateStreamHlsTokenRequest.newBuilder().setStream(stream).build(); + return generateStreamHlsToken(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Generate the JWT auth token required to get the stream HLS contents. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (StreamsServiceClient streamsServiceClient = StreamsServiceClient.create()) {
+   *   GenerateStreamHlsTokenRequest request =
+   *       GenerateStreamHlsTokenRequest.newBuilder().setStream("stream-891990144").build();
+   *   GenerateStreamHlsTokenResponse response =
+   *       streamsServiceClient.generateStreamHlsToken(request);
+   * }
+   * }
+ * + * @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 + */ + public final GenerateStreamHlsTokenResponse generateStreamHlsToken( + GenerateStreamHlsTokenRequest request) { + return generateStreamHlsTokenCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Generate the JWT auth token required to get the stream HLS contents. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (StreamsServiceClient streamsServiceClient = StreamsServiceClient.create()) {
+   *   GenerateStreamHlsTokenRequest request =
+   *       GenerateStreamHlsTokenRequest.newBuilder().setStream("stream-891990144").build();
+   *   ApiFuture future =
+   *       streamsServiceClient.generateStreamHlsTokenCallable().futureCall(request);
+   *   // Do something.
+   *   GenerateStreamHlsTokenResponse response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + generateStreamHlsTokenCallable() { + return stub.generateStreamHlsTokenCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Events in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (StreamsServiceClient streamsServiceClient = StreamsServiceClient.create()) {
+   *   ClusterName parent = ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]");
+   *   for (Event element : streamsServiceClient.listEvents(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. Parent value for ListEventsRequest. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListEventsPagedResponse listEvents(ClusterName parent) { + ListEventsRequest request = + ListEventsRequest.newBuilder().setParent(parent == null ? null : parent.toString()).build(); + return listEvents(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Events in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (StreamsServiceClient streamsServiceClient = StreamsServiceClient.create()) {
+   *   String parent = ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString();
+   *   for (Event element : streamsServiceClient.listEvents(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. Parent value for ListEventsRequest. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListEventsPagedResponse listEvents(String parent) { + ListEventsRequest request = ListEventsRequest.newBuilder().setParent(parent).build(); + return listEvents(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Events in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (StreamsServiceClient streamsServiceClient = StreamsServiceClient.create()) {
+   *   ListEventsRequest request =
+   *       ListEventsRequest.newBuilder()
+   *           .setParent(ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   for (Event element : streamsServiceClient.listEvents(request).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @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 + */ + public final ListEventsPagedResponse listEvents(ListEventsRequest request) { + return listEventsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Events in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (StreamsServiceClient streamsServiceClient = StreamsServiceClient.create()) {
+   *   ListEventsRequest request =
+   *       ListEventsRequest.newBuilder()
+   *           .setParent(ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   ApiFuture future = streamsServiceClient.listEventsPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (Event element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable listEventsPagedCallable() { + return stub.listEventsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Events in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (StreamsServiceClient streamsServiceClient = StreamsServiceClient.create()) {
+   *   ListEventsRequest request =
+   *       ListEventsRequest.newBuilder()
+   *           .setParent(ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   while (true) {
+   *     ListEventsResponse response = streamsServiceClient.listEventsCallable().call(request);
+   *     for (Event element : response.getEventsList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable listEventsCallable() { + return stub.listEventsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single Event. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (StreamsServiceClient streamsServiceClient = StreamsServiceClient.create()) {
+   *   EventName name = EventName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[EVENT]");
+   *   Event response = streamsServiceClient.getEvent(name);
+   * }
+   * }
+ * + * @param name Required. Name of the resource. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Event getEvent(EventName name) { + GetEventRequest request = + GetEventRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return getEvent(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single Event. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (StreamsServiceClient streamsServiceClient = StreamsServiceClient.create()) {
+   *   String name = EventName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[EVENT]").toString();
+   *   Event response = streamsServiceClient.getEvent(name);
+   * }
+   * }
+ * + * @param name Required. Name of the resource. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Event getEvent(String name) { + GetEventRequest request = GetEventRequest.newBuilder().setName(name).build(); + return getEvent(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single Event. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (StreamsServiceClient streamsServiceClient = StreamsServiceClient.create()) {
+   *   GetEventRequest request =
+   *       GetEventRequest.newBuilder()
+   *           .setName(EventName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[EVENT]").toString())
+   *           .build();
+   *   Event response = streamsServiceClient.getEvent(request);
+   * }
+   * }
+ * + * @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 + */ + public final Event getEvent(GetEventRequest request) { + return getEventCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single Event. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (StreamsServiceClient streamsServiceClient = StreamsServiceClient.create()) {
+   *   GetEventRequest request =
+   *       GetEventRequest.newBuilder()
+   *           .setName(EventName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[EVENT]").toString())
+   *           .build();
+   *   ApiFuture future = streamsServiceClient.getEventCallable().futureCall(request);
+   *   // Do something.
+   *   Event response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getEventCallable() { + return stub.getEventCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new Event in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (StreamsServiceClient streamsServiceClient = StreamsServiceClient.create()) {
+   *   ClusterName parent = ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]");
+   *   Event event = Event.newBuilder().build();
+   *   String eventId = "eventId-1376502443";
+   *   Event response = streamsServiceClient.createEventAsync(parent, event, eventId).get();
+   * }
+   * }
+ * + * @param parent Required. Value for parent. + * @param event Required. The resource being created. + * @param eventId Required. Id of the requesting object. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture createEventAsync( + ClusterName parent, Event event, String eventId) { + CreateEventRequest request = + CreateEventRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setEvent(event) + .setEventId(eventId) + .build(); + return createEventAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new Event in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (StreamsServiceClient streamsServiceClient = StreamsServiceClient.create()) {
+   *   String parent = ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString();
+   *   Event event = Event.newBuilder().build();
+   *   String eventId = "eventId-1376502443";
+   *   Event response = streamsServiceClient.createEventAsync(parent, event, eventId).get();
+   * }
+   * }
+ * + * @param parent Required. Value for parent. + * @param event Required. The resource being created. + * @param eventId Required. Id of the requesting object. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture createEventAsync( + String parent, Event event, String eventId) { + CreateEventRequest request = + CreateEventRequest.newBuilder() + .setParent(parent) + .setEvent(event) + .setEventId(eventId) + .build(); + return createEventAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new Event in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (StreamsServiceClient streamsServiceClient = StreamsServiceClient.create()) {
+   *   CreateEventRequest request =
+   *       CreateEventRequest.newBuilder()
+   *           .setParent(ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString())
+   *           .setEventId("eventId-1376502443")
+   *           .setEvent(Event.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   Event response = streamsServiceClient.createEventAsync(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 + */ + public final OperationFuture createEventAsync( + CreateEventRequest request) { + return createEventOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new Event in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (StreamsServiceClient streamsServiceClient = StreamsServiceClient.create()) {
+   *   CreateEventRequest request =
+   *       CreateEventRequest.newBuilder()
+   *           .setParent(ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString())
+   *           .setEventId("eventId-1376502443")
+   *           .setEvent(Event.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   OperationFuture future =
+   *       streamsServiceClient.createEventOperationCallable().futureCall(request);
+   *   // Do something.
+   *   Event response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + createEventOperationCallable() { + return stub.createEventOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new Event in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (StreamsServiceClient streamsServiceClient = StreamsServiceClient.create()) {
+   *   CreateEventRequest request =
+   *       CreateEventRequest.newBuilder()
+   *           .setParent(ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString())
+   *           .setEventId("eventId-1376502443")
+   *           .setEvent(Event.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   ApiFuture future = streamsServiceClient.createEventCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable createEventCallable() { + return stub.createEventCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the parameters of a single Event. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (StreamsServiceClient streamsServiceClient = StreamsServiceClient.create()) {
+   *   Event event = Event.newBuilder().build();
+   *   FieldMask updateMask = FieldMask.newBuilder().build();
+   *   Event response = streamsServiceClient.updateEventAsync(event, updateMask).get();
+   * }
+   * }
+ * + * @param event Required. The resource being updated. + * @param updateMask Required. Field mask is used to specify the fields to be overwritten in the + * Event resource by the update. The fields specified in the update_mask are relative to the + * resource, not the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields will be overwritten. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture updateEventAsync( + Event event, FieldMask updateMask) { + UpdateEventRequest request = + UpdateEventRequest.newBuilder().setEvent(event).setUpdateMask(updateMask).build(); + return updateEventAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the parameters of a single Event. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (StreamsServiceClient streamsServiceClient = StreamsServiceClient.create()) {
+   *   UpdateEventRequest request =
+   *       UpdateEventRequest.newBuilder()
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .setEvent(Event.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   Event response = streamsServiceClient.updateEventAsync(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 + */ + public final OperationFuture updateEventAsync( + UpdateEventRequest request) { + return updateEventOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the parameters of a single Event. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (StreamsServiceClient streamsServiceClient = StreamsServiceClient.create()) {
+   *   UpdateEventRequest request =
+   *       UpdateEventRequest.newBuilder()
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .setEvent(Event.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   OperationFuture future =
+   *       streamsServiceClient.updateEventOperationCallable().futureCall(request);
+   *   // Do something.
+   *   Event response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + updateEventOperationCallable() { + return stub.updateEventOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the parameters of a single Event. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (StreamsServiceClient streamsServiceClient = StreamsServiceClient.create()) {
+   *   UpdateEventRequest request =
+   *       UpdateEventRequest.newBuilder()
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .setEvent(Event.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   ApiFuture future = streamsServiceClient.updateEventCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable updateEventCallable() { + return stub.updateEventCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single Event. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (StreamsServiceClient streamsServiceClient = StreamsServiceClient.create()) {
+   *   EventName name = EventName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[EVENT]");
+   *   streamsServiceClient.deleteEventAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. Name of the resource. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteEventAsync(EventName name) { + DeleteEventRequest request = + DeleteEventRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return deleteEventAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single Event. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (StreamsServiceClient streamsServiceClient = StreamsServiceClient.create()) {
+   *   String name = EventName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[EVENT]").toString();
+   *   streamsServiceClient.deleteEventAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. Name of the resource. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteEventAsync(String name) { + DeleteEventRequest request = DeleteEventRequest.newBuilder().setName(name).build(); + return deleteEventAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single Event. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (StreamsServiceClient streamsServiceClient = StreamsServiceClient.create()) {
+   *   DeleteEventRequest request =
+   *       DeleteEventRequest.newBuilder()
+   *           .setName(EventName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[EVENT]").toString())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   streamsServiceClient.deleteEventAsync(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 + */ + public final OperationFuture deleteEventAsync( + DeleteEventRequest request) { + return deleteEventOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single Event. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (StreamsServiceClient streamsServiceClient = StreamsServiceClient.create()) {
+   *   DeleteEventRequest request =
+   *       DeleteEventRequest.newBuilder()
+   *           .setName(EventName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[EVENT]").toString())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   OperationFuture future =
+   *       streamsServiceClient.deleteEventOperationCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final OperationCallable + deleteEventOperationCallable() { + return stub.deleteEventOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single Event. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (StreamsServiceClient streamsServiceClient = StreamsServiceClient.create()) {
+   *   DeleteEventRequest request =
+   *       DeleteEventRequest.newBuilder()
+   *           .setName(EventName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[EVENT]").toString())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   ApiFuture future = streamsServiceClient.deleteEventCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final UnaryCallable deleteEventCallable() { + return stub.deleteEventCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Series in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (StreamsServiceClient streamsServiceClient = StreamsServiceClient.create()) {
+   *   ClusterName parent = ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]");
+   *   for (Series element : streamsServiceClient.listSeries(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. Parent value for ListSeriesRequest. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListSeriesPagedResponse listSeries(ClusterName parent) { + ListSeriesRequest request = + ListSeriesRequest.newBuilder().setParent(parent == null ? null : parent.toString()).build(); + return listSeries(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Series in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (StreamsServiceClient streamsServiceClient = StreamsServiceClient.create()) {
+   *   String parent = ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString();
+   *   for (Series element : streamsServiceClient.listSeries(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. Parent value for ListSeriesRequest. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListSeriesPagedResponse listSeries(String parent) { + ListSeriesRequest request = ListSeriesRequest.newBuilder().setParent(parent).build(); + return listSeries(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Series in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (StreamsServiceClient streamsServiceClient = StreamsServiceClient.create()) {
+   *   ListSeriesRequest request =
+   *       ListSeriesRequest.newBuilder()
+   *           .setParent(ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   for (Series element : streamsServiceClient.listSeries(request).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @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 + */ + public final ListSeriesPagedResponse listSeries(ListSeriesRequest request) { + return listSeriesPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Series in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (StreamsServiceClient streamsServiceClient = StreamsServiceClient.create()) {
+   *   ListSeriesRequest request =
+   *       ListSeriesRequest.newBuilder()
+   *           .setParent(ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   ApiFuture future = streamsServiceClient.listSeriesPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (Series element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable listSeriesPagedCallable() { + return stub.listSeriesPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Series in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (StreamsServiceClient streamsServiceClient = StreamsServiceClient.create()) {
+   *   ListSeriesRequest request =
+   *       ListSeriesRequest.newBuilder()
+   *           .setParent(ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   while (true) {
+   *     ListSeriesResponse response = streamsServiceClient.listSeriesCallable().call(request);
+   *     for (Series element : response.getSeriesList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable listSeriesCallable() { + return stub.listSeriesCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single Series. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (StreamsServiceClient streamsServiceClient = StreamsServiceClient.create()) {
+   *   SeriesName name = SeriesName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[SERIES]");
+   *   Series response = streamsServiceClient.getSeries(name);
+   * }
+   * }
+ * + * @param name Required. Name of the resource. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Series getSeries(SeriesName name) { + GetSeriesRequest request = + GetSeriesRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return getSeries(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single Series. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (StreamsServiceClient streamsServiceClient = StreamsServiceClient.create()) {
+   *   String name = SeriesName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[SERIES]").toString();
+   *   Series response = streamsServiceClient.getSeries(name);
+   * }
+   * }
+ * + * @param name Required. Name of the resource. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Series getSeries(String name) { + GetSeriesRequest request = GetSeriesRequest.newBuilder().setName(name).build(); + return getSeries(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single Series. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (StreamsServiceClient streamsServiceClient = StreamsServiceClient.create()) {
+   *   GetSeriesRequest request =
+   *       GetSeriesRequest.newBuilder()
+   *           .setName(SeriesName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[SERIES]").toString())
+   *           .build();
+   *   Series response = streamsServiceClient.getSeries(request);
+   * }
+   * }
+ * + * @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 + */ + public final Series getSeries(GetSeriesRequest request) { + return getSeriesCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single Series. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (StreamsServiceClient streamsServiceClient = StreamsServiceClient.create()) {
+   *   GetSeriesRequest request =
+   *       GetSeriesRequest.newBuilder()
+   *           .setName(SeriesName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[SERIES]").toString())
+   *           .build();
+   *   ApiFuture future = streamsServiceClient.getSeriesCallable().futureCall(request);
+   *   // Do something.
+   *   Series response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getSeriesCallable() { + return stub.getSeriesCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new Series in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (StreamsServiceClient streamsServiceClient = StreamsServiceClient.create()) {
+   *   ClusterName parent = ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]");
+   *   Series series = Series.newBuilder().build();
+   *   String seriesId = "seriesId1367098866";
+   *   Series response = streamsServiceClient.createSeriesAsync(parent, series, seriesId).get();
+   * }
+   * }
+ * + * @param parent Required. Value for parent. + * @param series Required. The resource being created. + * @param seriesId Required. Id of the requesting object. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture createSeriesAsync( + ClusterName parent, Series series, String seriesId) { + CreateSeriesRequest request = + CreateSeriesRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setSeries(series) + .setSeriesId(seriesId) + .build(); + return createSeriesAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new Series in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (StreamsServiceClient streamsServiceClient = StreamsServiceClient.create()) {
+   *   String parent = ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString();
+   *   Series series = Series.newBuilder().build();
+   *   String seriesId = "seriesId1367098866";
+   *   Series response = streamsServiceClient.createSeriesAsync(parent, series, seriesId).get();
+   * }
+   * }
+ * + * @param parent Required. Value for parent. + * @param series Required. The resource being created. + * @param seriesId Required. Id of the requesting object. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture createSeriesAsync( + String parent, Series series, String seriesId) { + CreateSeriesRequest request = + CreateSeriesRequest.newBuilder() + .setParent(parent) + .setSeries(series) + .setSeriesId(seriesId) + .build(); + return createSeriesAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new Series in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (StreamsServiceClient streamsServiceClient = StreamsServiceClient.create()) {
+   *   CreateSeriesRequest request =
+   *       CreateSeriesRequest.newBuilder()
+   *           .setParent(ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString())
+   *           .setSeriesId("seriesId1367098866")
+   *           .setSeries(Series.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   Series response = streamsServiceClient.createSeriesAsync(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 + */ + public final OperationFuture createSeriesAsync( + CreateSeriesRequest request) { + return createSeriesOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new Series in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (StreamsServiceClient streamsServiceClient = StreamsServiceClient.create()) {
+   *   CreateSeriesRequest request =
+   *       CreateSeriesRequest.newBuilder()
+   *           .setParent(ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString())
+   *           .setSeriesId("seriesId1367098866")
+   *           .setSeries(Series.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   OperationFuture future =
+   *       streamsServiceClient.createSeriesOperationCallable().futureCall(request);
+   *   // Do something.
+   *   Series response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + createSeriesOperationCallable() { + return stub.createSeriesOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new Series in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (StreamsServiceClient streamsServiceClient = StreamsServiceClient.create()) {
+   *   CreateSeriesRequest request =
+   *       CreateSeriesRequest.newBuilder()
+   *           .setParent(ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString())
+   *           .setSeriesId("seriesId1367098866")
+   *           .setSeries(Series.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   ApiFuture future = streamsServiceClient.createSeriesCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable createSeriesCallable() { + return stub.createSeriesCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the parameters of a single Event. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (StreamsServiceClient streamsServiceClient = StreamsServiceClient.create()) {
+   *   Series series = Series.newBuilder().build();
+   *   FieldMask updateMask = FieldMask.newBuilder().build();
+   *   Series response = streamsServiceClient.updateSeriesAsync(series, updateMask).get();
+   * }
+   * }
+ * + * @param series Required. The resource being updated + * @param updateMask Required. Field mask is used to specify the fields to be overwritten in the + * Series resource by the update. The fields specified in the update_mask are relative to the + * resource, not the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields will be overwritten. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture updateSeriesAsync( + Series series, FieldMask updateMask) { + UpdateSeriesRequest request = + UpdateSeriesRequest.newBuilder().setSeries(series).setUpdateMask(updateMask).build(); + return updateSeriesAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the parameters of a single Event. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (StreamsServiceClient streamsServiceClient = StreamsServiceClient.create()) {
+   *   UpdateSeriesRequest request =
+   *       UpdateSeriesRequest.newBuilder()
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .setSeries(Series.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   Series response = streamsServiceClient.updateSeriesAsync(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 + */ + public final OperationFuture updateSeriesAsync( + UpdateSeriesRequest request) { + return updateSeriesOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the parameters of a single Event. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (StreamsServiceClient streamsServiceClient = StreamsServiceClient.create()) {
+   *   UpdateSeriesRequest request =
+   *       UpdateSeriesRequest.newBuilder()
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .setSeries(Series.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   OperationFuture future =
+   *       streamsServiceClient.updateSeriesOperationCallable().futureCall(request);
+   *   // Do something.
+   *   Series response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + updateSeriesOperationCallable() { + return stub.updateSeriesOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the parameters of a single Event. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (StreamsServiceClient streamsServiceClient = StreamsServiceClient.create()) {
+   *   UpdateSeriesRequest request =
+   *       UpdateSeriesRequest.newBuilder()
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .setSeries(Series.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   ApiFuture future = streamsServiceClient.updateSeriesCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable updateSeriesCallable() { + return stub.updateSeriesCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single Series. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (StreamsServiceClient streamsServiceClient = StreamsServiceClient.create()) {
+   *   SeriesName name = SeriesName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[SERIES]");
+   *   streamsServiceClient.deleteSeriesAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. Name of the resource. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteSeriesAsync(SeriesName name) { + DeleteSeriesRequest request = + DeleteSeriesRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return deleteSeriesAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single Series. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (StreamsServiceClient streamsServiceClient = StreamsServiceClient.create()) {
+   *   String name = SeriesName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[SERIES]").toString();
+   *   streamsServiceClient.deleteSeriesAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. Name of the resource. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteSeriesAsync(String name) { + DeleteSeriesRequest request = DeleteSeriesRequest.newBuilder().setName(name).build(); + return deleteSeriesAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single Series. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (StreamsServiceClient streamsServiceClient = StreamsServiceClient.create()) {
+   *   DeleteSeriesRequest request =
+   *       DeleteSeriesRequest.newBuilder()
+   *           .setName(SeriesName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[SERIES]").toString())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   streamsServiceClient.deleteSeriesAsync(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 + */ + public final OperationFuture deleteSeriesAsync( + DeleteSeriesRequest request) { + return deleteSeriesOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single Series. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (StreamsServiceClient streamsServiceClient = StreamsServiceClient.create()) {
+   *   DeleteSeriesRequest request =
+   *       DeleteSeriesRequest.newBuilder()
+   *           .setName(SeriesName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[SERIES]").toString())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   OperationFuture future =
+   *       streamsServiceClient.deleteSeriesOperationCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final OperationCallable + deleteSeriesOperationCallable() { + return stub.deleteSeriesOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single Series. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (StreamsServiceClient streamsServiceClient = StreamsServiceClient.create()) {
+   *   DeleteSeriesRequest request =
+   *       DeleteSeriesRequest.newBuilder()
+   *           .setName(SeriesName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[SERIES]").toString())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   ApiFuture future = streamsServiceClient.deleteSeriesCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final UnaryCallable deleteSeriesCallable() { + return stub.deleteSeriesCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Materialize a channel. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (StreamsServiceClient streamsServiceClient = StreamsServiceClient.create()) {
+   *   ClusterName parent = ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]");
+   *   Channel channel = Channel.newBuilder().build();
+   *   String channelId = "channelId1461735806";
+   *   Channel response =
+   *       streamsServiceClient.materializeChannelAsync(parent, channel, channelId).get();
+   * }
+   * }
+ * + * @param parent Required. Value for parent. + * @param channel Required. The resource being created. + * @param channelId Required. Id of the channel. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture materializeChannelAsync( + ClusterName parent, Channel channel, String channelId) { + MaterializeChannelRequest request = + MaterializeChannelRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setChannel(channel) + .setChannelId(channelId) + .build(); + return materializeChannelAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Materialize a channel. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (StreamsServiceClient streamsServiceClient = StreamsServiceClient.create()) {
+   *   String parent = ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString();
+   *   Channel channel = Channel.newBuilder().build();
+   *   String channelId = "channelId1461735806";
+   *   Channel response =
+   *       streamsServiceClient.materializeChannelAsync(parent, channel, channelId).get();
+   * }
+   * }
+ * + * @param parent Required. Value for parent. + * @param channel Required. The resource being created. + * @param channelId Required. Id of the channel. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture materializeChannelAsync( + String parent, Channel channel, String channelId) { + MaterializeChannelRequest request = + MaterializeChannelRequest.newBuilder() + .setParent(parent) + .setChannel(channel) + .setChannelId(channelId) + .build(); + return materializeChannelAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Materialize a channel. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (StreamsServiceClient streamsServiceClient = StreamsServiceClient.create()) {
+   *   MaterializeChannelRequest request =
+   *       MaterializeChannelRequest.newBuilder()
+   *           .setParent(ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString())
+   *           .setChannelId("channelId1461735806")
+   *           .setChannel(Channel.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   Channel response = streamsServiceClient.materializeChannelAsync(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 + */ + public final OperationFuture materializeChannelAsync( + MaterializeChannelRequest request) { + return materializeChannelOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Materialize a channel. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (StreamsServiceClient streamsServiceClient = StreamsServiceClient.create()) {
+   *   MaterializeChannelRequest request =
+   *       MaterializeChannelRequest.newBuilder()
+   *           .setParent(ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString())
+   *           .setChannelId("channelId1461735806")
+   *           .setChannel(Channel.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   OperationFuture future =
+   *       streamsServiceClient.materializeChannelOperationCallable().futureCall(request);
+   *   // Do something.
+   *   Channel response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + materializeChannelOperationCallable() { + return stub.materializeChannelOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Materialize a channel. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (StreamsServiceClient streamsServiceClient = StreamsServiceClient.create()) {
+   *   MaterializeChannelRequest request =
+   *       MaterializeChannelRequest.newBuilder()
+   *           .setParent(ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString())
+   *           .setChannelId("channelId1461735806")
+   *           .setChannel(Channel.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   ApiFuture future =
+   *       streamsServiceClient.materializeChannelCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable materializeChannelCallable() { + return stub.materializeChannelCallable(); + } + + @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); + } + + public static class ListClustersPagedResponse + extends AbstractPagedListResponse< + ListClustersRequest, + ListClustersResponse, + Cluster, + ListClustersPage, + ListClustersFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListClustersPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListClustersPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListClustersPagedResponse(ListClustersPage page) { + super(page, ListClustersFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListClustersPage + extends AbstractPage { + + private ListClustersPage( + PageContext context, + ListClustersResponse response) { + super(context, response); + } + + private static ListClustersPage createEmptyPage() { + return new ListClustersPage(null, null); + } + + @Override + protected ListClustersPage createPage( + PageContext context, + ListClustersResponse response) { + return new ListClustersPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListClustersFixedSizeCollection + extends AbstractFixedSizeCollection< + ListClustersRequest, + ListClustersResponse, + Cluster, + ListClustersPage, + ListClustersFixedSizeCollection> { + + private ListClustersFixedSizeCollection(List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListClustersFixedSizeCollection createEmptyCollection() { + return new ListClustersFixedSizeCollection(null, 0); + } + + @Override + protected ListClustersFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListClustersFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListStreamsPagedResponse + extends AbstractPagedListResponse< + ListStreamsRequest, + ListStreamsResponse, + Stream, + ListStreamsPage, + ListStreamsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListStreamsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, input -> new ListStreamsPagedResponse(input), MoreExecutors.directExecutor()); + } + + private ListStreamsPagedResponse(ListStreamsPage page) { + super(page, ListStreamsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListStreamsPage + extends AbstractPage { + + private ListStreamsPage( + PageContext context, + ListStreamsResponse response) { + super(context, response); + } + + private static ListStreamsPage createEmptyPage() { + return new ListStreamsPage(null, null); + } + + @Override + protected ListStreamsPage createPage( + PageContext context, + ListStreamsResponse response) { + return new ListStreamsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListStreamsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListStreamsRequest, + ListStreamsResponse, + Stream, + ListStreamsPage, + ListStreamsFixedSizeCollection> { + + private ListStreamsFixedSizeCollection(List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListStreamsFixedSizeCollection createEmptyCollection() { + return new ListStreamsFixedSizeCollection(null, 0); + } + + @Override + protected ListStreamsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListStreamsFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListEventsPagedResponse + extends AbstractPagedListResponse< + ListEventsRequest, + ListEventsResponse, + Event, + ListEventsPage, + ListEventsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListEventsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, input -> new ListEventsPagedResponse(input), MoreExecutors.directExecutor()); + } + + private ListEventsPagedResponse(ListEventsPage page) { + super(page, ListEventsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListEventsPage + extends AbstractPage { + + private ListEventsPage( + PageContext context, + ListEventsResponse response) { + super(context, response); + } + + private static ListEventsPage createEmptyPage() { + return new ListEventsPage(null, null); + } + + @Override + protected ListEventsPage createPage( + PageContext context, + ListEventsResponse response) { + return new ListEventsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListEventsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListEventsRequest, + ListEventsResponse, + Event, + ListEventsPage, + ListEventsFixedSizeCollection> { + + private ListEventsFixedSizeCollection(List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListEventsFixedSizeCollection createEmptyCollection() { + return new ListEventsFixedSizeCollection(null, 0); + } + + @Override + protected ListEventsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListEventsFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListSeriesPagedResponse + extends AbstractPagedListResponse< + ListSeriesRequest, + ListSeriesResponse, + Series, + ListSeriesPage, + ListSeriesFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListSeriesPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, input -> new ListSeriesPagedResponse(input), MoreExecutors.directExecutor()); + } + + private ListSeriesPagedResponse(ListSeriesPage page) { + super(page, ListSeriesFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListSeriesPage + extends AbstractPage { + + private ListSeriesPage( + PageContext context, + ListSeriesResponse response) { + super(context, response); + } + + private static ListSeriesPage createEmptyPage() { + return new ListSeriesPage(null, null); + } + + @Override + protected ListSeriesPage createPage( + PageContext context, + ListSeriesResponse response) { + return new ListSeriesPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListSeriesFixedSizeCollection + extends AbstractFixedSizeCollection< + ListSeriesRequest, + ListSeriesResponse, + Series, + ListSeriesPage, + ListSeriesFixedSizeCollection> { + + private ListSeriesFixedSizeCollection(List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListSeriesFixedSizeCollection createEmptyCollection() { + return new ListSeriesFixedSizeCollection(null, 0); + } + + @Override + protected ListSeriesFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListSeriesFixedSizeCollection(pages, collectionSize); + } + } +} diff --git a/java-visionai/google-cloud-visionai/src/main/java/com/google/cloud/visionai/v1/StreamsServiceSettings.java b/java-visionai/google-cloud-visionai/src/main/java/com/google/cloud/visionai/v1/StreamsServiceSettings.java new file mode 100644 index 000000000000..ad3aa91f8fb2 --- /dev/null +++ b/java-visionai/google-cloud-visionai/src/main/java/com/google/cloud/visionai/v1/StreamsServiceSettings.java @@ -0,0 +1,615 @@ +/* + * Copyright 2024 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.visionai.v1; + +import static com.google.cloud.visionai.v1.StreamsServiceClient.ListClustersPagedResponse; +import static com.google.cloud.visionai.v1.StreamsServiceClient.ListEventsPagedResponse; +import static com.google.cloud.visionai.v1.StreamsServiceClient.ListSeriesPagedResponse; +import static com.google.cloud.visionai.v1.StreamsServiceClient.ListStreamsPagedResponse; + +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.httpjson.InstantiatingHttpJsonChannelProvider; +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.PagedCallSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.cloud.visionai.v1.stub.StreamsServiceStubSettings; +import com.google.longrunning.Operation; +import com.google.protobuf.Empty; +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 StreamsServiceClient}. + * + *

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

    + *
  • The default service address (visionai.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 getCluster to 30 seconds: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * StreamsServiceSettings.Builder streamsServiceSettingsBuilder =
+ *     StreamsServiceSettings.newBuilder();
+ * streamsServiceSettingsBuilder
+ *     .getClusterSettings()
+ *     .setRetrySettings(
+ *         streamsServiceSettingsBuilder
+ *             .getClusterSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * StreamsServiceSettings streamsServiceSettings = streamsServiceSettingsBuilder.build();
+ * }
+ */ +@Generated("by gapic-generator-java") +public class StreamsServiceSettings extends ClientSettings { + + /** Returns the object with the settings used for calls to listClusters. */ + public PagedCallSettings + listClustersSettings() { + return ((StreamsServiceStubSettings) getStubSettings()).listClustersSettings(); + } + + /** Returns the object with the settings used for calls to getCluster. */ + public UnaryCallSettings getClusterSettings() { + return ((StreamsServiceStubSettings) getStubSettings()).getClusterSettings(); + } + + /** Returns the object with the settings used for calls to createCluster. */ + public UnaryCallSettings createClusterSettings() { + return ((StreamsServiceStubSettings) getStubSettings()).createClusterSettings(); + } + + /** Returns the object with the settings used for calls to createCluster. */ + public OperationCallSettings + createClusterOperationSettings() { + return ((StreamsServiceStubSettings) getStubSettings()).createClusterOperationSettings(); + } + + /** Returns the object with the settings used for calls to updateCluster. */ + public UnaryCallSettings updateClusterSettings() { + return ((StreamsServiceStubSettings) getStubSettings()).updateClusterSettings(); + } + + /** Returns the object with the settings used for calls to updateCluster. */ + public OperationCallSettings + updateClusterOperationSettings() { + return ((StreamsServiceStubSettings) getStubSettings()).updateClusterOperationSettings(); + } + + /** Returns the object with the settings used for calls to deleteCluster. */ + public UnaryCallSettings deleteClusterSettings() { + return ((StreamsServiceStubSettings) getStubSettings()).deleteClusterSettings(); + } + + /** Returns the object with the settings used for calls to deleteCluster. */ + public OperationCallSettings + deleteClusterOperationSettings() { + return ((StreamsServiceStubSettings) getStubSettings()).deleteClusterOperationSettings(); + } + + /** Returns the object with the settings used for calls to listStreams. */ + public PagedCallSettings + listStreamsSettings() { + return ((StreamsServiceStubSettings) getStubSettings()).listStreamsSettings(); + } + + /** Returns the object with the settings used for calls to getStream. */ + public UnaryCallSettings getStreamSettings() { + return ((StreamsServiceStubSettings) getStubSettings()).getStreamSettings(); + } + + /** Returns the object with the settings used for calls to createStream. */ + public UnaryCallSettings createStreamSettings() { + return ((StreamsServiceStubSettings) getStubSettings()).createStreamSettings(); + } + + /** Returns the object with the settings used for calls to createStream. */ + public OperationCallSettings + createStreamOperationSettings() { + return ((StreamsServiceStubSettings) getStubSettings()).createStreamOperationSettings(); + } + + /** Returns the object with the settings used for calls to updateStream. */ + public UnaryCallSettings updateStreamSettings() { + return ((StreamsServiceStubSettings) getStubSettings()).updateStreamSettings(); + } + + /** Returns the object with the settings used for calls to updateStream. */ + public OperationCallSettings + updateStreamOperationSettings() { + return ((StreamsServiceStubSettings) getStubSettings()).updateStreamOperationSettings(); + } + + /** Returns the object with the settings used for calls to deleteStream. */ + public UnaryCallSettings deleteStreamSettings() { + return ((StreamsServiceStubSettings) getStubSettings()).deleteStreamSettings(); + } + + /** Returns the object with the settings used for calls to deleteStream. */ + public OperationCallSettings + deleteStreamOperationSettings() { + return ((StreamsServiceStubSettings) getStubSettings()).deleteStreamOperationSettings(); + } + + /** Returns the object with the settings used for calls to getStreamThumbnail. */ + public UnaryCallSettings getStreamThumbnailSettings() { + return ((StreamsServiceStubSettings) getStubSettings()).getStreamThumbnailSettings(); + } + + /** Returns the object with the settings used for calls to getStreamThumbnail. */ + public OperationCallSettings< + GetStreamThumbnailRequest, GetStreamThumbnailResponse, OperationMetadata> + getStreamThumbnailOperationSettings() { + return ((StreamsServiceStubSettings) getStubSettings()).getStreamThumbnailOperationSettings(); + } + + /** Returns the object with the settings used for calls to generateStreamHlsToken. */ + public UnaryCallSettings + generateStreamHlsTokenSettings() { + return ((StreamsServiceStubSettings) getStubSettings()).generateStreamHlsTokenSettings(); + } + + /** Returns the object with the settings used for calls to listEvents. */ + public PagedCallSettings + listEventsSettings() { + return ((StreamsServiceStubSettings) getStubSettings()).listEventsSettings(); + } + + /** Returns the object with the settings used for calls to getEvent. */ + public UnaryCallSettings getEventSettings() { + return ((StreamsServiceStubSettings) getStubSettings()).getEventSettings(); + } + + /** Returns the object with the settings used for calls to createEvent. */ + public UnaryCallSettings createEventSettings() { + return ((StreamsServiceStubSettings) getStubSettings()).createEventSettings(); + } + + /** Returns the object with the settings used for calls to createEvent. */ + public OperationCallSettings + createEventOperationSettings() { + return ((StreamsServiceStubSettings) getStubSettings()).createEventOperationSettings(); + } + + /** Returns the object with the settings used for calls to updateEvent. */ + public UnaryCallSettings updateEventSettings() { + return ((StreamsServiceStubSettings) getStubSettings()).updateEventSettings(); + } + + /** Returns the object with the settings used for calls to updateEvent. */ + public OperationCallSettings + updateEventOperationSettings() { + return ((StreamsServiceStubSettings) getStubSettings()).updateEventOperationSettings(); + } + + /** Returns the object with the settings used for calls to deleteEvent. */ + public UnaryCallSettings deleteEventSettings() { + return ((StreamsServiceStubSettings) getStubSettings()).deleteEventSettings(); + } + + /** Returns the object with the settings used for calls to deleteEvent. */ + public OperationCallSettings + deleteEventOperationSettings() { + return ((StreamsServiceStubSettings) getStubSettings()).deleteEventOperationSettings(); + } + + /** Returns the object with the settings used for calls to listSeries. */ + public PagedCallSettings + listSeriesSettings() { + return ((StreamsServiceStubSettings) getStubSettings()).listSeriesSettings(); + } + + /** Returns the object with the settings used for calls to getSeries. */ + public UnaryCallSettings getSeriesSettings() { + return ((StreamsServiceStubSettings) getStubSettings()).getSeriesSettings(); + } + + /** Returns the object with the settings used for calls to createSeries. */ + public UnaryCallSettings createSeriesSettings() { + return ((StreamsServiceStubSettings) getStubSettings()).createSeriesSettings(); + } + + /** Returns the object with the settings used for calls to createSeries. */ + public OperationCallSettings + createSeriesOperationSettings() { + return ((StreamsServiceStubSettings) getStubSettings()).createSeriesOperationSettings(); + } + + /** Returns the object with the settings used for calls to updateSeries. */ + public UnaryCallSettings updateSeriesSettings() { + return ((StreamsServiceStubSettings) getStubSettings()).updateSeriesSettings(); + } + + /** Returns the object with the settings used for calls to updateSeries. */ + public OperationCallSettings + updateSeriesOperationSettings() { + return ((StreamsServiceStubSettings) getStubSettings()).updateSeriesOperationSettings(); + } + + /** Returns the object with the settings used for calls to deleteSeries. */ + public UnaryCallSettings deleteSeriesSettings() { + return ((StreamsServiceStubSettings) getStubSettings()).deleteSeriesSettings(); + } + + /** Returns the object with the settings used for calls to deleteSeries. */ + public OperationCallSettings + deleteSeriesOperationSettings() { + return ((StreamsServiceStubSettings) getStubSettings()).deleteSeriesOperationSettings(); + } + + /** Returns the object with the settings used for calls to materializeChannel. */ + public UnaryCallSettings materializeChannelSettings() { + return ((StreamsServiceStubSettings) getStubSettings()).materializeChannelSettings(); + } + + /** Returns the object with the settings used for calls to materializeChannel. */ + public OperationCallSettings + materializeChannelOperationSettings() { + return ((StreamsServiceStubSettings) getStubSettings()).materializeChannelOperationSettings(); + } + + public static final StreamsServiceSettings create(StreamsServiceStubSettings stub) + throws IOException { + return new StreamsServiceSettings.Builder(stub.toBuilder()).build(); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return StreamsServiceStubSettings.defaultExecutorProviderBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return StreamsServiceStubSettings.getDefaultEndpoint(); + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return StreamsServiceStubSettings.getDefaultServiceScopes(); + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return StreamsServiceStubSettings.defaultCredentialsProviderBuilder(); + } + + /** Returns a builder for the default gRPC ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return StreamsServiceStubSettings.defaultGrpcTransportProviderBuilder(); + } + + /** Returns a builder for the default REST ChannelProvider for this service. */ + @BetaApi + public static InstantiatingHttpJsonChannelProvider.Builder + defaultHttpJsonTransportProviderBuilder() { + return StreamsServiceStubSettings.defaultHttpJsonTransportProviderBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return StreamsServiceStubSettings.defaultTransportChannelProvider(); + } + + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return StreamsServiceStubSettings.defaultApiClientHeaderProviderBuilder(); + } + + /** Returns a new gRPC builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new REST builder for this class. */ + public static Builder newHttpJsonBuilder() { + return Builder.createHttpJsonDefault(); + } + + /** 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 StreamsServiceSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + } + + /** Builder for StreamsServiceSettings. */ + public static class Builder extends ClientSettings.Builder { + + protected Builder() throws IOException { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(StreamsServiceStubSettings.newBuilder(clientContext)); + } + + protected Builder(StreamsServiceSettings settings) { + super(settings.getStubSettings().toBuilder()); + } + + protected Builder(StreamsServiceStubSettings.Builder stubSettings) { + super(stubSettings); + } + + private static Builder createDefault() { + return new Builder(StreamsServiceStubSettings.newBuilder()); + } + + private static Builder createHttpJsonDefault() { + return new Builder(StreamsServiceStubSettings.newHttpJsonBuilder()); + } + + public StreamsServiceStubSettings.Builder getStubSettingsBuilder() { + return ((StreamsServiceStubSettings.Builder) getStubSettings()); + } + + /** + * 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) { + super.applyToAllUnaryMethods( + getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater); + return this; + } + + /** Returns the builder for the settings used for calls to listClusters. */ + public PagedCallSettings.Builder< + ListClustersRequest, ListClustersResponse, ListClustersPagedResponse> + listClustersSettings() { + return getStubSettingsBuilder().listClustersSettings(); + } + + /** Returns the builder for the settings used for calls to getCluster. */ + public UnaryCallSettings.Builder getClusterSettings() { + return getStubSettingsBuilder().getClusterSettings(); + } + + /** Returns the builder for the settings used for calls to createCluster. */ + public UnaryCallSettings.Builder createClusterSettings() { + return getStubSettingsBuilder().createClusterSettings(); + } + + /** Returns the builder for the settings used for calls to createCluster. */ + public OperationCallSettings.Builder + createClusterOperationSettings() { + return getStubSettingsBuilder().createClusterOperationSettings(); + } + + /** Returns the builder for the settings used for calls to updateCluster. */ + public UnaryCallSettings.Builder updateClusterSettings() { + return getStubSettingsBuilder().updateClusterSettings(); + } + + /** Returns the builder for the settings used for calls to updateCluster. */ + public OperationCallSettings.Builder + updateClusterOperationSettings() { + return getStubSettingsBuilder().updateClusterOperationSettings(); + } + + /** Returns the builder for the settings used for calls to deleteCluster. */ + public UnaryCallSettings.Builder deleteClusterSettings() { + return getStubSettingsBuilder().deleteClusterSettings(); + } + + /** Returns the builder for the settings used for calls to deleteCluster. */ + public OperationCallSettings.Builder + deleteClusterOperationSettings() { + return getStubSettingsBuilder().deleteClusterOperationSettings(); + } + + /** Returns the builder for the settings used for calls to listStreams. */ + public PagedCallSettings.Builder< + ListStreamsRequest, ListStreamsResponse, ListStreamsPagedResponse> + listStreamsSettings() { + return getStubSettingsBuilder().listStreamsSettings(); + } + + /** Returns the builder for the settings used for calls to getStream. */ + public UnaryCallSettings.Builder getStreamSettings() { + return getStubSettingsBuilder().getStreamSettings(); + } + + /** Returns the builder for the settings used for calls to createStream. */ + public UnaryCallSettings.Builder createStreamSettings() { + return getStubSettingsBuilder().createStreamSettings(); + } + + /** Returns the builder for the settings used for calls to createStream. */ + public OperationCallSettings.Builder + createStreamOperationSettings() { + return getStubSettingsBuilder().createStreamOperationSettings(); + } + + /** Returns the builder for the settings used for calls to updateStream. */ + public UnaryCallSettings.Builder updateStreamSettings() { + return getStubSettingsBuilder().updateStreamSettings(); + } + + /** Returns the builder for the settings used for calls to updateStream. */ + public OperationCallSettings.Builder + updateStreamOperationSettings() { + return getStubSettingsBuilder().updateStreamOperationSettings(); + } + + /** Returns the builder for the settings used for calls to deleteStream. */ + public UnaryCallSettings.Builder deleteStreamSettings() { + return getStubSettingsBuilder().deleteStreamSettings(); + } + + /** Returns the builder for the settings used for calls to deleteStream. */ + public OperationCallSettings.Builder + deleteStreamOperationSettings() { + return getStubSettingsBuilder().deleteStreamOperationSettings(); + } + + /** Returns the builder for the settings used for calls to getStreamThumbnail. */ + public UnaryCallSettings.Builder + getStreamThumbnailSettings() { + return getStubSettingsBuilder().getStreamThumbnailSettings(); + } + + /** Returns the builder for the settings used for calls to getStreamThumbnail. */ + public OperationCallSettings.Builder< + GetStreamThumbnailRequest, GetStreamThumbnailResponse, OperationMetadata> + getStreamThumbnailOperationSettings() { + return getStubSettingsBuilder().getStreamThumbnailOperationSettings(); + } + + /** Returns the builder for the settings used for calls to generateStreamHlsToken. */ + public UnaryCallSettings.Builder + generateStreamHlsTokenSettings() { + return getStubSettingsBuilder().generateStreamHlsTokenSettings(); + } + + /** Returns the builder for the settings used for calls to listEvents. */ + public PagedCallSettings.Builder + listEventsSettings() { + return getStubSettingsBuilder().listEventsSettings(); + } + + /** Returns the builder for the settings used for calls to getEvent. */ + public UnaryCallSettings.Builder getEventSettings() { + return getStubSettingsBuilder().getEventSettings(); + } + + /** Returns the builder for the settings used for calls to createEvent. */ + public UnaryCallSettings.Builder createEventSettings() { + return getStubSettingsBuilder().createEventSettings(); + } + + /** Returns the builder for the settings used for calls to createEvent. */ + public OperationCallSettings.Builder + createEventOperationSettings() { + return getStubSettingsBuilder().createEventOperationSettings(); + } + + /** Returns the builder for the settings used for calls to updateEvent. */ + public UnaryCallSettings.Builder updateEventSettings() { + return getStubSettingsBuilder().updateEventSettings(); + } + + /** Returns the builder for the settings used for calls to updateEvent. */ + public OperationCallSettings.Builder + updateEventOperationSettings() { + return getStubSettingsBuilder().updateEventOperationSettings(); + } + + /** Returns the builder for the settings used for calls to deleteEvent. */ + public UnaryCallSettings.Builder deleteEventSettings() { + return getStubSettingsBuilder().deleteEventSettings(); + } + + /** Returns the builder for the settings used for calls to deleteEvent. */ + public OperationCallSettings.Builder + deleteEventOperationSettings() { + return getStubSettingsBuilder().deleteEventOperationSettings(); + } + + /** Returns the builder for the settings used for calls to listSeries. */ + public PagedCallSettings.Builder + listSeriesSettings() { + return getStubSettingsBuilder().listSeriesSettings(); + } + + /** Returns the builder for the settings used for calls to getSeries. */ + public UnaryCallSettings.Builder getSeriesSettings() { + return getStubSettingsBuilder().getSeriesSettings(); + } + + /** Returns the builder for the settings used for calls to createSeries. */ + public UnaryCallSettings.Builder createSeriesSettings() { + return getStubSettingsBuilder().createSeriesSettings(); + } + + /** Returns the builder for the settings used for calls to createSeries. */ + public OperationCallSettings.Builder + createSeriesOperationSettings() { + return getStubSettingsBuilder().createSeriesOperationSettings(); + } + + /** Returns the builder for the settings used for calls to updateSeries. */ + public UnaryCallSettings.Builder updateSeriesSettings() { + return getStubSettingsBuilder().updateSeriesSettings(); + } + + /** Returns the builder for the settings used for calls to updateSeries. */ + public OperationCallSettings.Builder + updateSeriesOperationSettings() { + return getStubSettingsBuilder().updateSeriesOperationSettings(); + } + + /** Returns the builder for the settings used for calls to deleteSeries. */ + public UnaryCallSettings.Builder deleteSeriesSettings() { + return getStubSettingsBuilder().deleteSeriesSettings(); + } + + /** Returns the builder for the settings used for calls to deleteSeries. */ + public OperationCallSettings.Builder + deleteSeriesOperationSettings() { + return getStubSettingsBuilder().deleteSeriesOperationSettings(); + } + + /** Returns the builder for the settings used for calls to materializeChannel. */ + public UnaryCallSettings.Builder + materializeChannelSettings() { + return getStubSettingsBuilder().materializeChannelSettings(); + } + + /** Returns the builder for the settings used for calls to materializeChannel. */ + public OperationCallSettings.Builder + materializeChannelOperationSettings() { + return getStubSettingsBuilder().materializeChannelOperationSettings(); + } + + @Override + public StreamsServiceSettings build() throws IOException { + return new StreamsServiceSettings(this); + } + } +} diff --git a/java-visionai/google-cloud-visionai/src/main/java/com/google/cloud/visionai/v1/WarehouseClient.java b/java-visionai/google-cloud-visionai/src/main/java/com/google/cloud/visionai/v1/WarehouseClient.java new file mode 100644 index 000000000000..51113005c37f --- /dev/null +++ b/java-visionai/google-cloud-visionai/src/main/java/com/google/cloud/visionai/v1/WarehouseClient.java @@ -0,0 +1,10074 @@ +/* + * Copyright 2024 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.visionai.v1; + +import com.google.api.core.ApiFuture; +import com.google.api.core.ApiFutures; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.httpjson.longrunning.OperationsClient; +import com.google.api.gax.longrunning.OperationFuture; +import com.google.api.gax.paging.AbstractFixedSizeCollection; +import com.google.api.gax.paging.AbstractPage; +import com.google.api.gax.paging.AbstractPagedListResponse; +import com.google.api.gax.rpc.BidiStreamingCallable; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PageContext; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.visionai.v1.stub.WarehouseStub; +import com.google.cloud.visionai.v1.stub.WarehouseStubSettings; +import com.google.common.util.concurrent.MoreExecutors; +import com.google.longrunning.Operation; +import com.google.protobuf.Empty; +import com.google.protobuf.FieldMask; +import java.io.IOException; +import java.util.List; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Service Description: Service that manages media content + metadata for streaming. + * + *

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: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (WarehouseClient warehouseClient = WarehouseClient.create()) {
+ *   CorpusName parent = CorpusName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]");
+ *   Asset asset = Asset.newBuilder().build();
+ *   String assetId = "assetId-704776149";
+ *   Asset response = warehouseClient.createAsset(parent, asset, assetId);
+ * }
+ * }
+ * + *

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

CreateAsset

Creates an asset inside corpus.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • createAsset(CreateAssetRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • createAsset(CorpusName parent, Asset asset, String assetId) + *

  • createAsset(String parent, Asset asset, String assetId) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • createAssetCallable() + *

+ *

UpdateAsset

Updates an asset inside corpus.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • updateAsset(UpdateAssetRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • updateAsset(Asset asset, FieldMask updateMask) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • updateAssetCallable() + *

+ *

GetAsset

Reads an asset inside corpus.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • getAsset(GetAssetRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • getAsset(AssetName name) + *

  • getAsset(String name) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • getAssetCallable() + *

+ *

ListAssets

Lists an list of assets inside corpus.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • listAssets(ListAssetsRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • listAssets(CorpusName parent) + *

  • listAssets(String parent) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • listAssetsPagedCallable() + *

  • listAssetsCallable() + *

+ *

DeleteAsset

Deletes asset inside corpus.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • deleteAssetAsync(DeleteAssetRequest request) + *

+ *

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

+ *
    + *
  • deleteAssetAsync(AssetName name) + *

  • deleteAssetAsync(String name) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • deleteAssetOperationCallable() + *

  • deleteAssetCallable() + *

+ *

UploadAsset

Upload asset by specifing the asset Cloud Storage uri. For video warehouse, it requires users who call this API have read access to the cloud storage file. Once it is uploaded, it can be retrieved by GenerateRetrievalUrl API which by default, only can retrieve cloud storage files from the same project of the warehouse. To allow retrieval cloud storage files that are in a separate project, it requires to find the vision ai service account (Go to IAM, check checkbox to show "Include Google-provided role grants", search for "Cloud Vision AI Service Agent") and grant the read access of the cloud storage files to that service account.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • uploadAssetAsync(UploadAssetRequest request) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • uploadAssetOperationCallable() + *

  • uploadAssetCallable() + *

+ *

GenerateRetrievalUrl

Generates a signed url for downloading the asset. For video warehouse, please see comment of UploadAsset about how to allow retrieval of cloud storage files in a different project.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • generateRetrievalUrl(GenerateRetrievalUrlRequest request) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • generateRetrievalUrlCallable() + *

+ *

AnalyzeAsset

Analyze asset to power search capability.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • analyzeAssetAsync(AnalyzeAssetRequest request) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • analyzeAssetOperationCallable() + *

  • analyzeAssetCallable() + *

+ *

IndexAsset

Index one asset for search. Supported corpus type: Corpus.Type.VIDEO_ON_DEMAND

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • indexAssetAsync(IndexAssetRequest request) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • indexAssetOperationCallable() + *

  • indexAssetCallable() + *

+ *

RemoveIndexAsset

Remove one asset's index data for search. Supported corpus type: Corpus.Type.VIDEO_ON_DEMAND

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • removeIndexAssetAsync(RemoveIndexAssetRequest request) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • removeIndexAssetOperationCallable() + *

  • removeIndexAssetCallable() + *

+ *

ViewIndexedAssets

Lists assets inside an index.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • viewIndexedAssets(ViewIndexedAssetsRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • viewIndexedAssets(IndexName index) + *

  • viewIndexedAssets(String index) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • viewIndexedAssetsPagedCallable() + *

  • viewIndexedAssetsCallable() + *

+ *

CreateIndex

Creates an Index under the corpus.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • createIndexAsync(CreateIndexRequest request) + *

+ *

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

+ *
    + *
  • createIndexAsync(CorpusName parent, Index index, String indexId) + *

  • createIndexAsync(String parent, Index index, String indexId) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • createIndexOperationCallable() + *

  • createIndexCallable() + *

+ *

UpdateIndex

Updates an Index under the corpus. Users can perform a metadata-only update or trigger a full index rebuild with different update_mask values.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • updateIndexAsync(UpdateIndexRequest request) + *

+ *

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

+ *
    + *
  • updateIndexAsync(Index index, FieldMask updateMask) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • updateIndexOperationCallable() + *

  • updateIndexCallable() + *

+ *

GetIndex

Gets the details of a single Index under a Corpus.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • getIndex(GetIndexRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • getIndex(IndexName name) + *

  • getIndex(String name) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • getIndexCallable() + *

+ *

ListIndexes

List all Indexes in a given Corpus.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • listIndexes(ListIndexesRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • listIndexes(CorpusName parent) + *

  • listIndexes(String parent) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • listIndexesPagedCallable() + *

  • listIndexesCallable() + *

+ *

DeleteIndex

Delete a single Index. In order to delete an index, the caller must make sure that it is not deployed to any index endpoint.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • deleteIndexAsync(DeleteIndexRequest request) + *

+ *

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

+ *
    + *
  • deleteIndexAsync(IndexName name) + *

  • deleteIndexAsync(String name) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • deleteIndexOperationCallable() + *

  • deleteIndexCallable() + *

+ *

CreateCorpus

Creates a corpus inside a project.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • createCorpusAsync(CreateCorpusRequest request) + *

+ *

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

+ *
    + *
  • createCorpusAsync(String parent, Corpus corpus) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • createCorpusOperationCallable() + *

  • createCorpusCallable() + *

+ *

GetCorpus

Gets corpus details inside a project.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • getCorpus(GetCorpusRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • getCorpus(CorpusName name) + *

  • getCorpus(String name) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • getCorpusCallable() + *

+ *

UpdateCorpus

Updates a corpus in a project.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • updateCorpus(UpdateCorpusRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • updateCorpus(Corpus corpus, FieldMask updateMask) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • updateCorpusCallable() + *

+ *

ListCorpora

Lists all corpora in a project.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • listCorpora(ListCorporaRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • listCorpora(String parent) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • listCorporaPagedCallable() + *

  • listCorporaCallable() + *

+ *

DeleteCorpus

Deletes a corpus only if its empty. Returns empty response.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • deleteCorpus(DeleteCorpusRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • deleteCorpus(CorpusName name) + *

  • deleteCorpus(String name) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • deleteCorpusCallable() + *

+ *

AnalyzeCorpus

Analyzes a corpus.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • analyzeCorpusAsync(AnalyzeCorpusRequest request) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • analyzeCorpusOperationCallable() + *

  • analyzeCorpusCallable() + *

+ *

CreateDataSchema

Creates data schema inside corpus.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • createDataSchema(CreateDataSchemaRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • createDataSchema(CorpusName parent, DataSchema dataSchema) + *

  • createDataSchema(String parent, DataSchema dataSchema) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • createDataSchemaCallable() + *

+ *

UpdateDataSchema

Updates data schema inside corpus.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • updateDataSchema(UpdateDataSchemaRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • updateDataSchema(DataSchema dataSchema, FieldMask updateMask) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • updateDataSchemaCallable() + *

+ *

GetDataSchema

Gets data schema inside corpus.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • getDataSchema(GetDataSchemaRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • getDataSchema(DataSchemaName name) + *

  • getDataSchema(String name) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • getDataSchemaCallable() + *

+ *

DeleteDataSchema

Deletes data schema inside corpus.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • deleteDataSchema(DeleteDataSchemaRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • deleteDataSchema(DataSchemaName name) + *

  • deleteDataSchema(String name) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • deleteDataSchemaCallable() + *

+ *

ListDataSchemas

Lists a list of data schemas inside corpus.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • listDataSchemas(ListDataSchemasRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • listDataSchemas(CorpusName parent) + *

  • listDataSchemas(String parent) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • listDataSchemasPagedCallable() + *

  • listDataSchemasCallable() + *

+ *

CreateAnnotation

Creates annotation inside asset.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • createAnnotation(CreateAnnotationRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • createAnnotation(AssetName parent, Annotation annotation, String annotationId) + *

  • createAnnotation(String parent, Annotation annotation, String annotationId) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • createAnnotationCallable() + *

+ *

GetAnnotation

Reads annotation inside asset.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • getAnnotation(GetAnnotationRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • getAnnotation(AnnotationName name) + *

  • getAnnotation(String name) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • getAnnotationCallable() + *

+ *

ListAnnotations

Lists a list of annotations inside asset.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • listAnnotations(ListAnnotationsRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • listAnnotations(AssetName parent) + *

  • listAnnotations(String parent) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • listAnnotationsPagedCallable() + *

  • listAnnotationsCallable() + *

+ *

UpdateAnnotation

Updates annotation inside asset.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • updateAnnotation(UpdateAnnotationRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • updateAnnotation(Annotation annotation, FieldMask updateMask) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • updateAnnotationCallable() + *

+ *

DeleteAnnotation

Deletes annotation inside asset.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • deleteAnnotation(DeleteAnnotationRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • deleteAnnotation(AnnotationName name) + *

  • deleteAnnotation(String name) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • deleteAnnotationCallable() + *

+ *

IngestAsset

Ingests data for the asset. It is not allowed to ingest a data chunk which is already expired according to TTL. This method is only available via the gRPC API (not HTTP since bi-directional streaming is not supported via HTTP).

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • ingestAssetCallable() + *

+ *

ClipAsset

Generates clips for downloading. The api takes in a time range, and generates a clip of the first content available after start_time and before end_time, which may overflow beyond these bounds. Returned clips are truncated if the total size of the clips are larger than 100MB.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • clipAsset(ClipAssetRequest request) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • clipAssetCallable() + *

+ *

GenerateHlsUri

Generates a uri for an HLS manifest. The api takes in a collection of time ranges, and generates a URI for an HLS manifest that covers all the requested time ranges.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • generateHlsUri(GenerateHlsUriRequest request) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • generateHlsUriCallable() + *

+ *

ImportAssets

Imports assets (images plus annotations) from a meta file on cloud storage. Each row in the meta file is corresponding to an image (specified by a cloud storage uri) and its annotations.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • importAssetsAsync(ImportAssetsRequest request) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • importAssetsOperationCallable() + *

  • importAssetsCallable() + *

+ *

CreateSearchConfig

Creates a search configuration inside a corpus. + *

Please follow the rules below to create a valid CreateSearchConfigRequest. --- General Rules --- 1. Request.search_config_id must not be associated with an existing SearchConfig. 2. Request must contain at least one non-empty search_criteria_property or facet_property. 3. mapped_fields must not be empty, and must map to existing UGA keys. 4. All mapped_fields must be of the same type. 5. All mapped_fields must share the same granularity. 6. All mapped_fields must share the same semantic SearchConfig match options. For property-specific rules, please reference the comments for FacetProperty and SearchCriteriaProperty.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • createSearchConfig(CreateSearchConfigRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • createSearchConfig(CorpusName parent, SearchConfig searchConfig, String searchConfigId) + *

  • createSearchConfig(String parent, SearchConfig searchConfig, String searchConfigId) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • createSearchConfigCallable() + *

+ *

UpdateSearchConfig

Updates a search configuration inside a corpus. + *

Please follow the rules below to create a valid UpdateSearchConfigRequest. --- General Rules --- 1. Request.search_configuration.name must already exist. 2. Request must contain at least one non-empty search_criteria_property or facet_property. 3. mapped_fields must not be empty, and must map to existing UGA keys. 4. All mapped_fields must be of the same type. 5. All mapped_fields must share the same granularity. 6. All mapped_fields must share the same semantic SearchConfig match options. For property-specific rules, please reference the comments for FacetProperty and SearchCriteriaProperty.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • updateSearchConfig(UpdateSearchConfigRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • updateSearchConfig(SearchConfig searchConfig, FieldMask updateMask) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • updateSearchConfigCallable() + *

+ *

GetSearchConfig

Gets a search configuration inside a corpus.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • getSearchConfig(GetSearchConfigRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • getSearchConfig(SearchConfigName name) + *

  • getSearchConfig(String name) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • getSearchConfigCallable() + *

+ *

DeleteSearchConfig

Deletes a search configuration inside a corpus. + *

For a DeleteSearchConfigRequest to be valid, Request.search_configuration.name must already exist.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • deleteSearchConfig(DeleteSearchConfigRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • deleteSearchConfig(SearchConfigName name) + *

  • deleteSearchConfig(String name) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • deleteSearchConfigCallable() + *

+ *

ListSearchConfigs

Lists all search configurations inside a corpus.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • listSearchConfigs(ListSearchConfigsRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • listSearchConfigs(CorpusName parent) + *

  • listSearchConfigs(String parent) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • listSearchConfigsPagedCallable() + *

  • listSearchConfigsCallable() + *

+ *

CreateSearchHypernym

Creates a SearchHypernym inside a corpus.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • createSearchHypernym(CreateSearchHypernymRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • createSearchHypernym(CorpusName parent, SearchHypernym searchHypernym, String searchHypernymId) + *

  • createSearchHypernym(String parent, SearchHypernym searchHypernym, String searchHypernymId) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • createSearchHypernymCallable() + *

+ *

UpdateSearchHypernym

Updates a SearchHypernym inside a corpus.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • updateSearchHypernym(UpdateSearchHypernymRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • updateSearchHypernym(SearchHypernym searchHypernym, FieldMask updateMask) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • updateSearchHypernymCallable() + *

+ *

GetSearchHypernym

Gets a SearchHypernym inside a corpus.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • getSearchHypernym(GetSearchHypernymRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • getSearchHypernym(SearchHypernymName name) + *

  • getSearchHypernym(String name) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • getSearchHypernymCallable() + *

+ *

DeleteSearchHypernym

Deletes a SearchHypernym inside a corpus.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • deleteSearchHypernym(DeleteSearchHypernymRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • deleteSearchHypernym(SearchHypernymName name) + *

  • deleteSearchHypernym(String name) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • deleteSearchHypernymCallable() + *

+ *

ListSearchHypernyms

Lists SearchHypernyms inside a corpus.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • listSearchHypernyms(ListSearchHypernymsRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • listSearchHypernyms(CorpusName parent) + *

  • listSearchHypernyms(String parent) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • listSearchHypernymsPagedCallable() + *

  • listSearchHypernymsCallable() + *

+ *

SearchAssets

Search media asset.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • searchAssets(SearchAssetsRequest request) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • searchAssetsPagedCallable() + *

  • searchAssetsCallable() + *

+ *

SearchIndexEndpoint

Search a deployed index endpoint (IMAGE corpus type only).

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • searchIndexEndpoint(SearchIndexEndpointRequest request) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • searchIndexEndpointPagedCallable() + *

  • searchIndexEndpointCallable() + *

+ *

CreateIndexEndpoint

Creates an IndexEndpoint.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • createIndexEndpointAsync(CreateIndexEndpointRequest request) + *

+ *

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

+ *
    + *
  • createIndexEndpointAsync(LocationName parent, IndexEndpoint indexEndpoint, String indexEndpointId) + *

  • createIndexEndpointAsync(String parent, IndexEndpoint indexEndpoint, String indexEndpointId) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • createIndexEndpointOperationCallable() + *

  • createIndexEndpointCallable() + *

+ *

GetIndexEndpoint

Gets an IndexEndpoint.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • getIndexEndpoint(GetIndexEndpointRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • getIndexEndpoint(IndexEndpointName name) + *

  • getIndexEndpoint(String name) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • getIndexEndpointCallable() + *

+ *

ListIndexEndpoints

Lists all IndexEndpoints in a project.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • listIndexEndpoints(ListIndexEndpointsRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • listIndexEndpoints(LocationName parent) + *

  • listIndexEndpoints(String parent) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • listIndexEndpointsPagedCallable() + *

  • listIndexEndpointsCallable() + *

+ *

UpdateIndexEndpoint

Updates an IndexEndpoint.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • updateIndexEndpointAsync(UpdateIndexEndpointRequest request) + *

+ *

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

+ *
    + *
  • updateIndexEndpointAsync(IndexEndpoint indexEndpoint, FieldMask updateMask) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • updateIndexEndpointOperationCallable() + *

  • updateIndexEndpointCallable() + *

+ *

DeleteIndexEndpoint

Deletes an IndexEndpoint.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • deleteIndexEndpointAsync(DeleteIndexEndpointRequest request) + *

+ *

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

+ *
    + *
  • deleteIndexEndpointAsync(IndexEndpointName name) + *

  • deleteIndexEndpointAsync(String name) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • deleteIndexEndpointOperationCallable() + *

  • deleteIndexEndpointCallable() + *

+ *

DeployIndex

Deploys an Index to IndexEndpoint.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • deployIndexAsync(DeployIndexRequest request) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • deployIndexOperationCallable() + *

  • deployIndexCallable() + *

+ *

UndeployIndex

Undeploys an Index from IndexEndpoint.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • undeployIndexAsync(UndeployIndexRequest request) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • undeployIndexOperationCallable() + *

  • undeployIndexCallable() + *

+ *

CreateCollection

Creates a collection.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • createCollectionAsync(CreateCollectionRequest request) + *

+ *

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

+ *
    + *
  • createCollectionAsync(CorpusName parent, Collection collection, String collectionId) + *

  • createCollectionAsync(String parent, Collection collection, String collectionId) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • createCollectionOperationCallable() + *

  • createCollectionCallable() + *

+ *

DeleteCollection

Deletes a collection.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • deleteCollectionAsync(DeleteCollectionRequest request) + *

+ *

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

+ *
    + *
  • deleteCollectionAsync(CollectionName name) + *

  • deleteCollectionAsync(String name) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • deleteCollectionOperationCallable() + *

  • deleteCollectionCallable() + *

+ *

GetCollection

Gets a collection.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • getCollection(GetCollectionRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • getCollection(CollectionName name) + *

  • getCollection(String name) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • getCollectionCallable() + *

+ *

UpdateCollection

Updates a collection.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • updateCollection(UpdateCollectionRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • updateCollection(Collection collection, FieldMask updateMask) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • updateCollectionCallable() + *

+ *

ListCollections

Lists collections inside a corpus.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • listCollections(ListCollectionsRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • listCollections(CorpusName parent) + *

  • listCollections(String parent) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • listCollectionsPagedCallable() + *

  • listCollectionsCallable() + *

+ *

AddCollectionItem

Adds an item into a Collection.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • addCollectionItem(AddCollectionItemRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • addCollectionItem(CollectionItem item) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • addCollectionItemCallable() + *

+ *

RemoveCollectionItem

Removes an item from a collection.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • removeCollectionItem(RemoveCollectionItemRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • removeCollectionItem(CollectionItem item) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • removeCollectionItemCallable() + *

+ *

ViewCollectionItems

View items inside a collection.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • viewCollectionItems(ViewCollectionItemsRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • viewCollectionItems(CollectionName collection) + *

  • viewCollectionItems(String collection) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • viewCollectionItemsPagedCallable() + *

  • viewCollectionItemsCallable() + *

+ *
+ * + *

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 WarehouseSettings to create(). + * For example: + * + *

To customize credentials: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * WarehouseSettings warehouseSettings =
+ *     WarehouseSettings.newBuilder()
+ *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ *         .build();
+ * WarehouseClient warehouseClient = WarehouseClient.create(warehouseSettings);
+ * }
+ * + *

To customize the endpoint: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * WarehouseSettings warehouseSettings =
+ *     WarehouseSettings.newBuilder().setEndpoint(myEndpoint).build();
+ * WarehouseClient warehouseClient = WarehouseClient.create(warehouseSettings);
+ * }
+ * + *

To use REST (HTTP1.1/JSON) transport (instead of gRPC) for sending and receiving requests over + * the wire: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * WarehouseSettings warehouseSettings = WarehouseSettings.newHttpJsonBuilder().build();
+ * WarehouseClient warehouseClient = WarehouseClient.create(warehouseSettings);
+ * }
+ * + *

Please refer to the GitHub repository's samples for more quickstart code snippets. + */ +@Generated("by gapic-generator-java") +public class WarehouseClient implements BackgroundResource { + private final WarehouseSettings settings; + private final WarehouseStub stub; + private final OperationsClient httpJsonOperationsClient; + private final com.google.longrunning.OperationsClient operationsClient; + + /** Constructs an instance of WarehouseClient with default settings. */ + public static final WarehouseClient create() throws IOException { + return create(WarehouseSettings.newBuilder().build()); + } + + /** + * Constructs an instance of WarehouseClient, 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 WarehouseClient create(WarehouseSettings settings) throws IOException { + return new WarehouseClient(settings); + } + + /** + * Constructs an instance of WarehouseClient, using the given stub for making calls. This is for + * advanced usage - prefer using create(WarehouseSettings). + */ + public static final WarehouseClient create(WarehouseStub stub) { + return new WarehouseClient(stub); + } + + /** + * Constructs an instance of WarehouseClient, 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 WarehouseClient(WarehouseSettings settings) throws IOException { + this.settings = settings; + this.stub = ((WarehouseStubSettings) settings.getStubSettings()).createStub(); + this.operationsClient = + com.google.longrunning.OperationsClient.create(this.stub.getOperationsStub()); + this.httpJsonOperationsClient = OperationsClient.create(this.stub.getHttpJsonOperationsStub()); + } + + protected WarehouseClient(WarehouseStub stub) { + this.settings = null; + this.stub = stub; + this.operationsClient = + com.google.longrunning.OperationsClient.create(this.stub.getOperationsStub()); + this.httpJsonOperationsClient = OperationsClient.create(this.stub.getHttpJsonOperationsStub()); + } + + public final WarehouseSettings getSettings() { + return settings; + } + + public WarehouseStub 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. + */ + public final com.google.longrunning.OperationsClient getOperationsClient() { + return operationsClient; + } + + /** + * Returns the OperationsClient that can be used to query the status of a long-running operation + * returned by another API method call. + */ + @BetaApi + public final OperationsClient getHttpJsonOperationsClient() { + return httpJsonOperationsClient; + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates an asset inside corpus. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (WarehouseClient warehouseClient = WarehouseClient.create()) {
+   *   CorpusName parent = CorpusName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]");
+   *   Asset asset = Asset.newBuilder().build();
+   *   String assetId = "assetId-704776149";
+   *   Asset response = warehouseClient.createAsset(parent, asset, assetId);
+   * }
+   * }
+ * + * @param parent Required. The parent resource where this asset will be created. Format: + * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}` + * @param asset Required. The asset to create. + * @param assetId Optional. The ID to use for the asset, which will become the final component of + * the asset's resource name if user choose to specify. Otherwise, asset id will be generated + * by system. + *

This value should be up to 63 characters, and valid characters are /[a-z][0-9]-/. The + * first character must be a letter, the last could be a letter or a number. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Asset createAsset(CorpusName parent, Asset asset, String assetId) { + CreateAssetRequest request = + CreateAssetRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setAsset(asset) + .setAssetId(assetId) + .build(); + return createAsset(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates an asset inside corpus. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (WarehouseClient warehouseClient = WarehouseClient.create()) {
+   *   String parent = CorpusName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]").toString();
+   *   Asset asset = Asset.newBuilder().build();
+   *   String assetId = "assetId-704776149";
+   *   Asset response = warehouseClient.createAsset(parent, asset, assetId);
+   * }
+   * }
+ * + * @param parent Required. The parent resource where this asset will be created. Format: + * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}` + * @param asset Required. The asset to create. + * @param assetId Optional. The ID to use for the asset, which will become the final component of + * the asset's resource name if user choose to specify. Otherwise, asset id will be generated + * by system. + *

This value should be up to 63 characters, and valid characters are /[a-z][0-9]-/. The + * first character must be a letter, the last could be a letter or a number. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Asset createAsset(String parent, Asset asset, String assetId) { + CreateAssetRequest request = + CreateAssetRequest.newBuilder() + .setParent(parent) + .setAsset(asset) + .setAssetId(assetId) + .build(); + return createAsset(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates an asset inside corpus. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (WarehouseClient warehouseClient = WarehouseClient.create()) {
+   *   CreateAssetRequest request =
+   *       CreateAssetRequest.newBuilder()
+   *           .setParent(CorpusName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]").toString())
+   *           .setAsset(Asset.newBuilder().build())
+   *           .setAssetId("assetId-704776149")
+   *           .build();
+   *   Asset response = warehouseClient.createAsset(request);
+   * }
+   * }
+ * + * @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 + */ + public final Asset createAsset(CreateAssetRequest request) { + return createAssetCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates an asset inside corpus. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (WarehouseClient warehouseClient = WarehouseClient.create()) {
+   *   CreateAssetRequest request =
+   *       CreateAssetRequest.newBuilder()
+   *           .setParent(CorpusName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]").toString())
+   *           .setAsset(Asset.newBuilder().build())
+   *           .setAssetId("assetId-704776149")
+   *           .build();
+   *   ApiFuture future = warehouseClient.createAssetCallable().futureCall(request);
+   *   // Do something.
+   *   Asset response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable createAssetCallable() { + return stub.createAssetCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates an asset inside corpus. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (WarehouseClient warehouseClient = WarehouseClient.create()) {
+   *   Asset asset = Asset.newBuilder().build();
+   *   FieldMask updateMask = FieldMask.newBuilder().build();
+   *   Asset response = warehouseClient.updateAsset(asset, updateMask);
+   * }
+   * }
+ * + * @param asset Required. The asset to update. + *

The asset's `name` field is used to identify the asset to be updated. Format: + * `projects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset}` + * @param updateMask The list of fields to be updated. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Asset updateAsset(Asset asset, FieldMask updateMask) { + UpdateAssetRequest request = + UpdateAssetRequest.newBuilder().setAsset(asset).setUpdateMask(updateMask).build(); + return updateAsset(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates an asset inside corpus. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (WarehouseClient warehouseClient = WarehouseClient.create()) {
+   *   UpdateAssetRequest request =
+   *       UpdateAssetRequest.newBuilder()
+   *           .setAsset(Asset.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   Asset response = warehouseClient.updateAsset(request);
+   * }
+   * }
+ * + * @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 + */ + public final Asset updateAsset(UpdateAssetRequest request) { + return updateAssetCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates an asset inside corpus. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (WarehouseClient warehouseClient = WarehouseClient.create()) {
+   *   UpdateAssetRequest request =
+   *       UpdateAssetRequest.newBuilder()
+   *           .setAsset(Asset.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   ApiFuture future = warehouseClient.updateAssetCallable().futureCall(request);
+   *   // Do something.
+   *   Asset response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable updateAssetCallable() { + return stub.updateAssetCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Reads an asset inside corpus. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (WarehouseClient warehouseClient = WarehouseClient.create()) {
+   *   AssetName name = AssetName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[ASSET]");
+   *   Asset response = warehouseClient.getAsset(name);
+   * }
+   * }
+ * + * @param name Required. The name of the asset to retrieve. Format: + * projects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset} + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Asset getAsset(AssetName name) { + GetAssetRequest request = + GetAssetRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return getAsset(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Reads an asset inside corpus. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (WarehouseClient warehouseClient = WarehouseClient.create()) {
+   *   String name =
+   *       AssetName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[ASSET]").toString();
+   *   Asset response = warehouseClient.getAsset(name);
+   * }
+   * }
+ * + * @param name Required. The name of the asset to retrieve. Format: + * projects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset} + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Asset getAsset(String name) { + GetAssetRequest request = GetAssetRequest.newBuilder().setName(name).build(); + return getAsset(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Reads an asset inside corpus. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (WarehouseClient warehouseClient = WarehouseClient.create()) {
+   *   GetAssetRequest request =
+   *       GetAssetRequest.newBuilder()
+   *           .setName(
+   *               AssetName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[ASSET]").toString())
+   *           .build();
+   *   Asset response = warehouseClient.getAsset(request);
+   * }
+   * }
+ * + * @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 + */ + public final Asset getAsset(GetAssetRequest request) { + return getAssetCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Reads an asset inside corpus. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (WarehouseClient warehouseClient = WarehouseClient.create()) {
+   *   GetAssetRequest request =
+   *       GetAssetRequest.newBuilder()
+   *           .setName(
+   *               AssetName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[ASSET]").toString())
+   *           .build();
+   *   ApiFuture future = warehouseClient.getAssetCallable().futureCall(request);
+   *   // Do something.
+   *   Asset response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getAssetCallable() { + return stub.getAssetCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists an list of assets inside corpus. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (WarehouseClient warehouseClient = WarehouseClient.create()) {
+   *   CorpusName parent = CorpusName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]");
+   *   for (Asset element : warehouseClient.listAssets(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The parent, which owns this collection of assets. Format: + * `projects/{project_number}/locations/{location}/corpora/{corpus}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListAssetsPagedResponse listAssets(CorpusName parent) { + ListAssetsRequest request = + ListAssetsRequest.newBuilder().setParent(parent == null ? null : parent.toString()).build(); + return listAssets(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists an list of assets inside corpus. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (WarehouseClient warehouseClient = WarehouseClient.create()) {
+   *   String parent = CorpusName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]").toString();
+   *   for (Asset element : warehouseClient.listAssets(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The parent, which owns this collection of assets. Format: + * `projects/{project_number}/locations/{location}/corpora/{corpus}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListAssetsPagedResponse listAssets(String parent) { + ListAssetsRequest request = ListAssetsRequest.newBuilder().setParent(parent).build(); + return listAssets(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists an list of assets inside corpus. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (WarehouseClient warehouseClient = WarehouseClient.create()) {
+   *   ListAssetsRequest request =
+   *       ListAssetsRequest.newBuilder()
+   *           .setParent(CorpusName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .build();
+   *   for (Asset element : warehouseClient.listAssets(request).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @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 + */ + public final ListAssetsPagedResponse listAssets(ListAssetsRequest request) { + return listAssetsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists an list of assets inside corpus. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (WarehouseClient warehouseClient = WarehouseClient.create()) {
+   *   ListAssetsRequest request =
+   *       ListAssetsRequest.newBuilder()
+   *           .setParent(CorpusName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .build();
+   *   ApiFuture future = warehouseClient.listAssetsPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (Asset element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable listAssetsPagedCallable() { + return stub.listAssetsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists an list of assets inside corpus. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (WarehouseClient warehouseClient = WarehouseClient.create()) {
+   *   ListAssetsRequest request =
+   *       ListAssetsRequest.newBuilder()
+   *           .setParent(CorpusName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .build();
+   *   while (true) {
+   *     ListAssetsResponse response = warehouseClient.listAssetsCallable().call(request);
+   *     for (Asset element : response.getAssetsList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable listAssetsCallable() { + return stub.listAssetsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes asset inside corpus. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (WarehouseClient warehouseClient = WarehouseClient.create()) {
+   *   AssetName name = AssetName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[ASSET]");
+   *   warehouseClient.deleteAssetAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. The name of the asset to delete. Format: + * `projects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteAssetAsync(AssetName name) { + DeleteAssetRequest request = + DeleteAssetRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return deleteAssetAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes asset inside corpus. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (WarehouseClient warehouseClient = WarehouseClient.create()) {
+   *   String name =
+   *       AssetName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[ASSET]").toString();
+   *   warehouseClient.deleteAssetAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. The name of the asset to delete. Format: + * `projects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteAssetAsync(String name) { + DeleteAssetRequest request = DeleteAssetRequest.newBuilder().setName(name).build(); + return deleteAssetAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes asset inside corpus. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (WarehouseClient warehouseClient = WarehouseClient.create()) {
+   *   DeleteAssetRequest request =
+   *       DeleteAssetRequest.newBuilder()
+   *           .setName(
+   *               AssetName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[ASSET]").toString())
+   *           .build();
+   *   warehouseClient.deleteAssetAsync(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 + */ + public final OperationFuture deleteAssetAsync( + DeleteAssetRequest request) { + return deleteAssetOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes asset inside corpus. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (WarehouseClient warehouseClient = WarehouseClient.create()) {
+   *   DeleteAssetRequest request =
+   *       DeleteAssetRequest.newBuilder()
+   *           .setName(
+   *               AssetName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[ASSET]").toString())
+   *           .build();
+   *   OperationFuture future =
+   *       warehouseClient.deleteAssetOperationCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final OperationCallable + deleteAssetOperationCallable() { + return stub.deleteAssetOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes asset inside corpus. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (WarehouseClient warehouseClient = WarehouseClient.create()) {
+   *   DeleteAssetRequest request =
+   *       DeleteAssetRequest.newBuilder()
+   *           .setName(
+   *               AssetName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[ASSET]").toString())
+   *           .build();
+   *   ApiFuture future = warehouseClient.deleteAssetCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final UnaryCallable deleteAssetCallable() { + return stub.deleteAssetCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Upload asset by specifing the asset Cloud Storage uri. For video warehouse, it requires users + * who call this API have read access to the cloud storage file. Once it is uploaded, it can be + * retrieved by GenerateRetrievalUrl API which by default, only can retrieve cloud storage files + * from the same project of the warehouse. To allow retrieval cloud storage files that are in a + * separate project, it requires to find the vision ai service account (Go to IAM, check checkbox + * to show "Include Google-provided role grants", search for "Cloud Vision AI Service Agent") and + * grant the read access of the cloud storage files to that service account. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (WarehouseClient warehouseClient = WarehouseClient.create()) {
+   *   UploadAssetRequest request =
+   *       UploadAssetRequest.newBuilder()
+   *           .setName(
+   *               AssetName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[ASSET]").toString())
+   *           .setAssetSource(AssetSource.newBuilder().build())
+   *           .build();
+   *   UploadAssetResponse response = warehouseClient.uploadAssetAsync(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 + */ + public final OperationFuture uploadAssetAsync( + UploadAssetRequest request) { + return uploadAssetOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Upload asset by specifing the asset Cloud Storage uri. For video warehouse, it requires users + * who call this API have read access to the cloud storage file. Once it is uploaded, it can be + * retrieved by GenerateRetrievalUrl API which by default, only can retrieve cloud storage files + * from the same project of the warehouse. To allow retrieval cloud storage files that are in a + * separate project, it requires to find the vision ai service account (Go to IAM, check checkbox + * to show "Include Google-provided role grants", search for "Cloud Vision AI Service Agent") and + * grant the read access of the cloud storage files to that service account. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (WarehouseClient warehouseClient = WarehouseClient.create()) {
+   *   UploadAssetRequest request =
+   *       UploadAssetRequest.newBuilder()
+   *           .setName(
+   *               AssetName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[ASSET]").toString())
+   *           .setAssetSource(AssetSource.newBuilder().build())
+   *           .build();
+   *   OperationFuture future =
+   *       warehouseClient.uploadAssetOperationCallable().futureCall(request);
+   *   // Do something.
+   *   UploadAssetResponse response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + uploadAssetOperationCallable() { + return stub.uploadAssetOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Upload asset by specifing the asset Cloud Storage uri. For video warehouse, it requires users + * who call this API have read access to the cloud storage file. Once it is uploaded, it can be + * retrieved by GenerateRetrievalUrl API which by default, only can retrieve cloud storage files + * from the same project of the warehouse. To allow retrieval cloud storage files that are in a + * separate project, it requires to find the vision ai service account (Go to IAM, check checkbox + * to show "Include Google-provided role grants", search for "Cloud Vision AI Service Agent") and + * grant the read access of the cloud storage files to that service account. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (WarehouseClient warehouseClient = WarehouseClient.create()) {
+   *   UploadAssetRequest request =
+   *       UploadAssetRequest.newBuilder()
+   *           .setName(
+   *               AssetName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[ASSET]").toString())
+   *           .setAssetSource(AssetSource.newBuilder().build())
+   *           .build();
+   *   ApiFuture future = warehouseClient.uploadAssetCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable uploadAssetCallable() { + return stub.uploadAssetCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Generates a signed url for downloading the asset. For video warehouse, please see comment of + * UploadAsset about how to allow retrieval of cloud storage files in a different project. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (WarehouseClient warehouseClient = WarehouseClient.create()) {
+   *   GenerateRetrievalUrlRequest request =
+   *       GenerateRetrievalUrlRequest.newBuilder()
+   *           .setName(
+   *               AssetName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[ASSET]").toString())
+   *           .build();
+   *   GenerateRetrievalUrlResponse response = warehouseClient.generateRetrievalUrl(request);
+   * }
+   * }
+ * + * @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 + */ + public final GenerateRetrievalUrlResponse generateRetrievalUrl( + GenerateRetrievalUrlRequest request) { + return generateRetrievalUrlCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Generates a signed url for downloading the asset. For video warehouse, please see comment of + * UploadAsset about how to allow retrieval of cloud storage files in a different project. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (WarehouseClient warehouseClient = WarehouseClient.create()) {
+   *   GenerateRetrievalUrlRequest request =
+   *       GenerateRetrievalUrlRequest.newBuilder()
+   *           .setName(
+   *               AssetName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[ASSET]").toString())
+   *           .build();
+   *   ApiFuture future =
+   *       warehouseClient.generateRetrievalUrlCallable().futureCall(request);
+   *   // Do something.
+   *   GenerateRetrievalUrlResponse response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + generateRetrievalUrlCallable() { + return stub.generateRetrievalUrlCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Analyze asset to power search capability. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (WarehouseClient warehouseClient = WarehouseClient.create()) {
+   *   AnalyzeAssetRequest request =
+   *       AnalyzeAssetRequest.newBuilder()
+   *           .setName(
+   *               AssetName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[ASSET]").toString())
+   *           .build();
+   *   AnalyzeAssetResponse response = warehouseClient.analyzeAssetAsync(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 + */ + public final OperationFuture analyzeAssetAsync( + AnalyzeAssetRequest request) { + return analyzeAssetOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Analyze asset to power search capability. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (WarehouseClient warehouseClient = WarehouseClient.create()) {
+   *   AnalyzeAssetRequest request =
+   *       AnalyzeAssetRequest.newBuilder()
+   *           .setName(
+   *               AssetName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[ASSET]").toString())
+   *           .build();
+   *   OperationFuture future =
+   *       warehouseClient.analyzeAssetOperationCallable().futureCall(request);
+   *   // Do something.
+   *   AnalyzeAssetResponse response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + analyzeAssetOperationCallable() { + return stub.analyzeAssetOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Analyze asset to power search capability. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (WarehouseClient warehouseClient = WarehouseClient.create()) {
+   *   AnalyzeAssetRequest request =
+   *       AnalyzeAssetRequest.newBuilder()
+   *           .setName(
+   *               AssetName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[ASSET]").toString())
+   *           .build();
+   *   ApiFuture future = warehouseClient.analyzeAssetCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable analyzeAssetCallable() { + return stub.analyzeAssetCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Index one asset for search. Supported corpus type: Corpus.Type.VIDEO_ON_DEMAND + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (WarehouseClient warehouseClient = WarehouseClient.create()) {
+   *   IndexAssetRequest request =
+   *       IndexAssetRequest.newBuilder()
+   *           .setName(
+   *               AssetName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[ASSET]").toString())
+   *           .setIndex(
+   *               IndexName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[INDEX]").toString())
+   *           .build();
+   *   IndexAssetResponse response = warehouseClient.indexAssetAsync(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 + */ + public final OperationFuture indexAssetAsync( + IndexAssetRequest request) { + return indexAssetOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Index one asset for search. Supported corpus type: Corpus.Type.VIDEO_ON_DEMAND + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (WarehouseClient warehouseClient = WarehouseClient.create()) {
+   *   IndexAssetRequest request =
+   *       IndexAssetRequest.newBuilder()
+   *           .setName(
+   *               AssetName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[ASSET]").toString())
+   *           .setIndex(
+   *               IndexName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[INDEX]").toString())
+   *           .build();
+   *   OperationFuture future =
+   *       warehouseClient.indexAssetOperationCallable().futureCall(request);
+   *   // Do something.
+   *   IndexAssetResponse response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + indexAssetOperationCallable() { + return stub.indexAssetOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Index one asset for search. Supported corpus type: Corpus.Type.VIDEO_ON_DEMAND + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (WarehouseClient warehouseClient = WarehouseClient.create()) {
+   *   IndexAssetRequest request =
+   *       IndexAssetRequest.newBuilder()
+   *           .setName(
+   *               AssetName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[ASSET]").toString())
+   *           .setIndex(
+   *               IndexName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[INDEX]").toString())
+   *           .build();
+   *   ApiFuture future = warehouseClient.indexAssetCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable indexAssetCallable() { + return stub.indexAssetCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Remove one asset's index data for search. Supported corpus type: Corpus.Type.VIDEO_ON_DEMAND + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (WarehouseClient warehouseClient = WarehouseClient.create()) {
+   *   RemoveIndexAssetRequest request =
+   *       RemoveIndexAssetRequest.newBuilder()
+   *           .setName(
+   *               AssetName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[ASSET]").toString())
+   *           .setIndex(
+   *               IndexName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[INDEX]").toString())
+   *           .build();
+   *   RemoveIndexAssetResponse response = warehouseClient.removeIndexAssetAsync(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 + */ + public final OperationFuture + removeIndexAssetAsync(RemoveIndexAssetRequest request) { + return removeIndexAssetOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Remove one asset's index data for search. Supported corpus type: Corpus.Type.VIDEO_ON_DEMAND + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (WarehouseClient warehouseClient = WarehouseClient.create()) {
+   *   RemoveIndexAssetRequest request =
+   *       RemoveIndexAssetRequest.newBuilder()
+   *           .setName(
+   *               AssetName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[ASSET]").toString())
+   *           .setIndex(
+   *               IndexName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[INDEX]").toString())
+   *           .build();
+   *   OperationFuture future =
+   *       warehouseClient.removeIndexAssetOperationCallable().futureCall(request);
+   *   // Do something.
+   *   RemoveIndexAssetResponse response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable< + RemoveIndexAssetRequest, RemoveIndexAssetResponse, RemoveIndexAssetMetadata> + removeIndexAssetOperationCallable() { + return stub.removeIndexAssetOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Remove one asset's index data for search. Supported corpus type: Corpus.Type.VIDEO_ON_DEMAND + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (WarehouseClient warehouseClient = WarehouseClient.create()) {
+   *   RemoveIndexAssetRequest request =
+   *       RemoveIndexAssetRequest.newBuilder()
+   *           .setName(
+   *               AssetName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[ASSET]").toString())
+   *           .setIndex(
+   *               IndexName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[INDEX]").toString())
+   *           .build();
+   *   ApiFuture future = warehouseClient.removeIndexAssetCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable removeIndexAssetCallable() { + return stub.removeIndexAssetCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists assets inside an index. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (WarehouseClient warehouseClient = WarehouseClient.create()) {
+   *   IndexName index = IndexName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[INDEX]");
+   *   for (IndexedAsset element : warehouseClient.viewIndexedAssets(index).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param index Required. The index that owns this collection of assets. Format: + * `projects/{project_number}/locations/{location}/corpora/{corpus}/indexes/{index}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ViewIndexedAssetsPagedResponse viewIndexedAssets(IndexName index) { + ViewIndexedAssetsRequest request = + ViewIndexedAssetsRequest.newBuilder() + .setIndex(index == null ? null : index.toString()) + .build(); + return viewIndexedAssets(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists assets inside an index. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (WarehouseClient warehouseClient = WarehouseClient.create()) {
+   *   String index =
+   *       IndexName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[INDEX]").toString();
+   *   for (IndexedAsset element : warehouseClient.viewIndexedAssets(index).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param index Required. The index that owns this collection of assets. Format: + * `projects/{project_number}/locations/{location}/corpora/{corpus}/indexes/{index}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ViewIndexedAssetsPagedResponse viewIndexedAssets(String index) { + ViewIndexedAssetsRequest request = + ViewIndexedAssetsRequest.newBuilder().setIndex(index).build(); + return viewIndexedAssets(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists assets inside an index. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (WarehouseClient warehouseClient = WarehouseClient.create()) {
+   *   ViewIndexedAssetsRequest request =
+   *       ViewIndexedAssetsRequest.newBuilder()
+   *           .setIndex(
+   *               IndexName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[INDEX]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .build();
+   *   for (IndexedAsset element : warehouseClient.viewIndexedAssets(request).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @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 + */ + public final ViewIndexedAssetsPagedResponse viewIndexedAssets(ViewIndexedAssetsRequest request) { + return viewIndexedAssetsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists assets inside an index. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (WarehouseClient warehouseClient = WarehouseClient.create()) {
+   *   ViewIndexedAssetsRequest request =
+   *       ViewIndexedAssetsRequest.newBuilder()
+   *           .setIndex(
+   *               IndexName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[INDEX]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .build();
+   *   ApiFuture future =
+   *       warehouseClient.viewIndexedAssetsPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (IndexedAsset element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + viewIndexedAssetsPagedCallable() { + return stub.viewIndexedAssetsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists assets inside an index. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (WarehouseClient warehouseClient = WarehouseClient.create()) {
+   *   ViewIndexedAssetsRequest request =
+   *       ViewIndexedAssetsRequest.newBuilder()
+   *           .setIndex(
+   *               IndexName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[INDEX]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .build();
+   *   while (true) {
+   *     ViewIndexedAssetsResponse response =
+   *         warehouseClient.viewIndexedAssetsCallable().call(request);
+   *     for (IndexedAsset element : response.getIndexedAssetsList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + viewIndexedAssetsCallable() { + return stub.viewIndexedAssetsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates an Index under the corpus. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (WarehouseClient warehouseClient = WarehouseClient.create()) {
+   *   CorpusName parent = CorpusName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]");
+   *   Index index = Index.newBuilder().build();
+   *   String indexId = "indexId1943291277";
+   *   Index response = warehouseClient.createIndexAsync(parent, index, indexId).get();
+   * }
+   * }
+ * + * @param parent Required. Value for the parent. The resource name of the Corpus under which this + * index is created. Format: + * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}` + * @param index Required. The index being created. + * @param indexId Optional. The ID for the index. This will become the final resource name for the + * index. If the user does not specify this value, it will be generated by system. + *

This value should be up to 63 characters, and valid characters are /[a-z][0-9]-/. The + * first character must be a letter, the last could be a letter or a number. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture createIndexAsync( + CorpusName parent, Index index, String indexId) { + CreateIndexRequest request = + CreateIndexRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setIndex(index) + .setIndexId(indexId) + .build(); + return createIndexAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates an Index under the corpus. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (WarehouseClient warehouseClient = WarehouseClient.create()) {
+   *   String parent = CorpusName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]").toString();
+   *   Index index = Index.newBuilder().build();
+   *   String indexId = "indexId1943291277";
+   *   Index response = warehouseClient.createIndexAsync(parent, index, indexId).get();
+   * }
+   * }
+ * + * @param parent Required. Value for the parent. The resource name of the Corpus under which this + * index is created. Format: + * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}` + * @param index Required. The index being created. + * @param indexId Optional. The ID for the index. This will become the final resource name for the + * index. If the user does not specify this value, it will be generated by system. + *

This value should be up to 63 characters, and valid characters are /[a-z][0-9]-/. The + * first character must be a letter, the last could be a letter or a number. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture createIndexAsync( + String parent, Index index, String indexId) { + CreateIndexRequest request = + CreateIndexRequest.newBuilder() + .setParent(parent) + .setIndex(index) + .setIndexId(indexId) + .build(); + return createIndexAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates an Index under the corpus. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (WarehouseClient warehouseClient = WarehouseClient.create()) {
+   *   CreateIndexRequest request =
+   *       CreateIndexRequest.newBuilder()
+   *           .setParent(CorpusName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]").toString())
+   *           .setIndexId("indexId1943291277")
+   *           .setIndex(Index.newBuilder().build())
+   *           .build();
+   *   Index response = warehouseClient.createIndexAsync(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 + */ + public final OperationFuture createIndexAsync( + CreateIndexRequest request) { + return createIndexOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates an Index under the corpus. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (WarehouseClient warehouseClient = WarehouseClient.create()) {
+   *   CreateIndexRequest request =
+   *       CreateIndexRequest.newBuilder()
+   *           .setParent(CorpusName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]").toString())
+   *           .setIndexId("indexId1943291277")
+   *           .setIndex(Index.newBuilder().build())
+   *           .build();
+   *   OperationFuture future =
+   *       warehouseClient.createIndexOperationCallable().futureCall(request);
+   *   // Do something.
+   *   Index response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + createIndexOperationCallable() { + return stub.createIndexOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates an Index under the corpus. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (WarehouseClient warehouseClient = WarehouseClient.create()) {
+   *   CreateIndexRequest request =
+   *       CreateIndexRequest.newBuilder()
+   *           .setParent(CorpusName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]").toString())
+   *           .setIndexId("indexId1943291277")
+   *           .setIndex(Index.newBuilder().build())
+   *           .build();
+   *   ApiFuture future = warehouseClient.createIndexCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable createIndexCallable() { + return stub.createIndexCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates an Index under the corpus. Users can perform a metadata-only update or trigger a full + * index rebuild with different update_mask values. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (WarehouseClient warehouseClient = WarehouseClient.create()) {
+   *   Index index = Index.newBuilder().build();
+   *   FieldMask updateMask = FieldMask.newBuilder().build();
+   *   Index response = warehouseClient.updateIndexAsync(index, updateMask).get();
+   * }
+   * }
+ * + * @param index Required. The resource being updated. + * @param updateMask Required. Field mask is used to specify the fields to be overwritten in the + * Index resource by the update. The fields specified in the update_mask are relative to the + * resource, not the full request. A field of the resource will be overwritten if it is in the + * mask. Empty field mask is not allowed. If the mask is "*", it triggers a full update of + * the index, and also a whole rebuild of index data. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture updateIndexAsync( + Index index, FieldMask updateMask) { + UpdateIndexRequest request = + UpdateIndexRequest.newBuilder().setIndex(index).setUpdateMask(updateMask).build(); + return updateIndexAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates an Index under the corpus. Users can perform a metadata-only update or trigger a full + * index rebuild with different update_mask values. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (WarehouseClient warehouseClient = WarehouseClient.create()) {
+   *   UpdateIndexRequest request =
+   *       UpdateIndexRequest.newBuilder()
+   *           .setIndex(Index.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   Index response = warehouseClient.updateIndexAsync(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 + */ + public final OperationFuture updateIndexAsync( + UpdateIndexRequest request) { + return updateIndexOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates an Index under the corpus. Users can perform a metadata-only update or trigger a full + * index rebuild with different update_mask values. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (WarehouseClient warehouseClient = WarehouseClient.create()) {
+   *   UpdateIndexRequest request =
+   *       UpdateIndexRequest.newBuilder()
+   *           .setIndex(Index.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   OperationFuture future =
+   *       warehouseClient.updateIndexOperationCallable().futureCall(request);
+   *   // Do something.
+   *   Index response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + updateIndexOperationCallable() { + return stub.updateIndexOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates an Index under the corpus. Users can perform a metadata-only update or trigger a full + * index rebuild with different update_mask values. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (WarehouseClient warehouseClient = WarehouseClient.create()) {
+   *   UpdateIndexRequest request =
+   *       UpdateIndexRequest.newBuilder()
+   *           .setIndex(Index.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   ApiFuture future = warehouseClient.updateIndexCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable updateIndexCallable() { + return stub.updateIndexCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the details of a single Index under a Corpus. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (WarehouseClient warehouseClient = WarehouseClient.create()) {
+   *   IndexName name = IndexName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[INDEX]");
+   *   Index response = warehouseClient.getIndex(name);
+   * }
+   * }
+ * + * @param name Required. Name of the Index resource. Format: + * `projects/{project_number}/locations/{location}/corpora/{corpus}/indexes/{index}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Index getIndex(IndexName name) { + GetIndexRequest request = + GetIndexRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return getIndex(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the details of a single Index under a Corpus. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (WarehouseClient warehouseClient = WarehouseClient.create()) {
+   *   String name =
+   *       IndexName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[INDEX]").toString();
+   *   Index response = warehouseClient.getIndex(name);
+   * }
+   * }
+ * + * @param name Required. Name of the Index resource. Format: + * `projects/{project_number}/locations/{location}/corpora/{corpus}/indexes/{index}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Index getIndex(String name) { + GetIndexRequest request = GetIndexRequest.newBuilder().setName(name).build(); + return getIndex(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the details of a single Index under a Corpus. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (WarehouseClient warehouseClient = WarehouseClient.create()) {
+   *   GetIndexRequest request =
+   *       GetIndexRequest.newBuilder()
+   *           .setName(
+   *               IndexName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[INDEX]").toString())
+   *           .build();
+   *   Index response = warehouseClient.getIndex(request);
+   * }
+   * }
+ * + * @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 + */ + public final Index getIndex(GetIndexRequest request) { + return getIndexCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the details of a single Index under a Corpus. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (WarehouseClient warehouseClient = WarehouseClient.create()) {
+   *   GetIndexRequest request =
+   *       GetIndexRequest.newBuilder()
+   *           .setName(
+   *               IndexName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[INDEX]").toString())
+   *           .build();
+   *   ApiFuture future = warehouseClient.getIndexCallable().futureCall(request);
+   *   // Do something.
+   *   Index response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getIndexCallable() { + return stub.getIndexCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * List all Indexes in a given Corpus. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (WarehouseClient warehouseClient = WarehouseClient.create()) {
+   *   CorpusName parent = CorpusName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]");
+   *   for (Index element : warehouseClient.listIndexes(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The parent corpus that owns this collection of indexes. Format: + * `projects/{project_number}/locations/{location}/corpora/{corpus}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListIndexesPagedResponse listIndexes(CorpusName parent) { + ListIndexesRequest request = + ListIndexesRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listIndexes(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * List all Indexes in a given Corpus. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (WarehouseClient warehouseClient = WarehouseClient.create()) {
+   *   String parent = CorpusName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]").toString();
+   *   for (Index element : warehouseClient.listIndexes(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The parent corpus that owns this collection of indexes. Format: + * `projects/{project_number}/locations/{location}/corpora/{corpus}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListIndexesPagedResponse listIndexes(String parent) { + ListIndexesRequest request = ListIndexesRequest.newBuilder().setParent(parent).build(); + return listIndexes(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * List all Indexes in a given Corpus. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (WarehouseClient warehouseClient = WarehouseClient.create()) {
+   *   ListIndexesRequest request =
+   *       ListIndexesRequest.newBuilder()
+   *           .setParent(CorpusName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   for (Index element : warehouseClient.listIndexes(request).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @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 + */ + public final ListIndexesPagedResponse listIndexes(ListIndexesRequest request) { + return listIndexesPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * List all Indexes in a given Corpus. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (WarehouseClient warehouseClient = WarehouseClient.create()) {
+   *   ListIndexesRequest request =
+   *       ListIndexesRequest.newBuilder()
+   *           .setParent(CorpusName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   ApiFuture future = warehouseClient.listIndexesPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (Index element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listIndexesPagedCallable() { + return stub.listIndexesPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * List all Indexes in a given Corpus. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (WarehouseClient warehouseClient = WarehouseClient.create()) {
+   *   ListIndexesRequest request =
+   *       ListIndexesRequest.newBuilder()
+   *           .setParent(CorpusName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   while (true) {
+   *     ListIndexesResponse response = warehouseClient.listIndexesCallable().call(request);
+   *     for (Index element : response.getIndexesList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable listIndexesCallable() { + return stub.listIndexesCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Delete a single Index. In order to delete an index, the caller must make sure that it is not + * deployed to any index endpoint. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (WarehouseClient warehouseClient = WarehouseClient.create()) {
+   *   IndexName name = IndexName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[INDEX]");
+   *   warehouseClient.deleteIndexAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. The name of the index to delete. Format: + * `projects/{project_number}/locations/{location}/corpora/{corpus}/indexes/{index}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteIndexAsync(IndexName name) { + DeleteIndexRequest request = + DeleteIndexRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return deleteIndexAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Delete a single Index. In order to delete an index, the caller must make sure that it is not + * deployed to any index endpoint. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (WarehouseClient warehouseClient = WarehouseClient.create()) {
+   *   String name =
+   *       IndexName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[INDEX]").toString();
+   *   warehouseClient.deleteIndexAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. The name of the index to delete. Format: + * `projects/{project_number}/locations/{location}/corpora/{corpus}/indexes/{index}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteIndexAsync(String name) { + DeleteIndexRequest request = DeleteIndexRequest.newBuilder().setName(name).build(); + return deleteIndexAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Delete a single Index. In order to delete an index, the caller must make sure that it is not + * deployed to any index endpoint. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (WarehouseClient warehouseClient = WarehouseClient.create()) {
+   *   DeleteIndexRequest request =
+   *       DeleteIndexRequest.newBuilder()
+   *           .setName(
+   *               IndexName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[INDEX]").toString())
+   *           .build();
+   *   warehouseClient.deleteIndexAsync(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 + */ + public final OperationFuture deleteIndexAsync( + DeleteIndexRequest request) { + return deleteIndexOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Delete a single Index. In order to delete an index, the caller must make sure that it is not + * deployed to any index endpoint. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (WarehouseClient warehouseClient = WarehouseClient.create()) {
+   *   DeleteIndexRequest request =
+   *       DeleteIndexRequest.newBuilder()
+   *           .setName(
+   *               IndexName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[INDEX]").toString())
+   *           .build();
+   *   OperationFuture future =
+   *       warehouseClient.deleteIndexOperationCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final OperationCallable + deleteIndexOperationCallable() { + return stub.deleteIndexOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Delete a single Index. In order to delete an index, the caller must make sure that it is not + * deployed to any index endpoint. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (WarehouseClient warehouseClient = WarehouseClient.create()) {
+   *   DeleteIndexRequest request =
+   *       DeleteIndexRequest.newBuilder()
+   *           .setName(
+   *               IndexName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[INDEX]").toString())
+   *           .build();
+   *   ApiFuture future = warehouseClient.deleteIndexCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final UnaryCallable deleteIndexCallable() { + return stub.deleteIndexCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a corpus inside a project. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (WarehouseClient warehouseClient = WarehouseClient.create()) {
+   *   String parent = "parent-995424086";
+   *   Corpus corpus = Corpus.newBuilder().build();
+   *   Corpus response = warehouseClient.createCorpusAsync(parent, corpus).get();
+   * }
+   * }
+ * + * @param parent Required. Form: `projects/{project_number}/locations/{location_id}` + * @param corpus Required. The corpus to be created. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture createCorpusAsync( + String parent, Corpus corpus) { + CreateCorpusRequest request = + CreateCorpusRequest.newBuilder().setParent(parent).setCorpus(corpus).build(); + return createCorpusAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a corpus inside a project. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (WarehouseClient warehouseClient = WarehouseClient.create()) {
+   *   CreateCorpusRequest request =
+   *       CreateCorpusRequest.newBuilder()
+   *           .setParent("parent-995424086")
+   *           .setCorpus(Corpus.newBuilder().build())
+   *           .build();
+   *   Corpus response = warehouseClient.createCorpusAsync(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 + */ + public final OperationFuture createCorpusAsync( + CreateCorpusRequest request) { + return createCorpusOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a corpus inside a project. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (WarehouseClient warehouseClient = WarehouseClient.create()) {
+   *   CreateCorpusRequest request =
+   *       CreateCorpusRequest.newBuilder()
+   *           .setParent("parent-995424086")
+   *           .setCorpus(Corpus.newBuilder().build())
+   *           .build();
+   *   OperationFuture future =
+   *       warehouseClient.createCorpusOperationCallable().futureCall(request);
+   *   // Do something.
+   *   Corpus response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + createCorpusOperationCallable() { + return stub.createCorpusOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a corpus inside a project. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (WarehouseClient warehouseClient = WarehouseClient.create()) {
+   *   CreateCorpusRequest request =
+   *       CreateCorpusRequest.newBuilder()
+   *           .setParent("parent-995424086")
+   *           .setCorpus(Corpus.newBuilder().build())
+   *           .build();
+   *   ApiFuture future = warehouseClient.createCorpusCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable createCorpusCallable() { + return stub.createCorpusCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets corpus details inside a project. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (WarehouseClient warehouseClient = WarehouseClient.create()) {
+   *   CorpusName name = CorpusName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]");
+   *   Corpus response = warehouseClient.getCorpus(name);
+   * }
+   * }
+ * + * @param name Required. The resource name of the corpus to retrieve. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Corpus getCorpus(CorpusName name) { + GetCorpusRequest request = + GetCorpusRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return getCorpus(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets corpus details inside a project. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (WarehouseClient warehouseClient = WarehouseClient.create()) {
+   *   String name = CorpusName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]").toString();
+   *   Corpus response = warehouseClient.getCorpus(name);
+   * }
+   * }
+ * + * @param name Required. The resource name of the corpus to retrieve. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Corpus getCorpus(String name) { + GetCorpusRequest request = GetCorpusRequest.newBuilder().setName(name).build(); + return getCorpus(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets corpus details inside a project. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (WarehouseClient warehouseClient = WarehouseClient.create()) {
+   *   GetCorpusRequest request =
+   *       GetCorpusRequest.newBuilder()
+   *           .setName(CorpusName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]").toString())
+   *           .build();
+   *   Corpus response = warehouseClient.getCorpus(request);
+   * }
+   * }
+ * + * @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 + */ + public final Corpus getCorpus(GetCorpusRequest request) { + return getCorpusCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets corpus details inside a project. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (WarehouseClient warehouseClient = WarehouseClient.create()) {
+   *   GetCorpusRequest request =
+   *       GetCorpusRequest.newBuilder()
+   *           .setName(CorpusName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]").toString())
+   *           .build();
+   *   ApiFuture future = warehouseClient.getCorpusCallable().futureCall(request);
+   *   // Do something.
+   *   Corpus response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getCorpusCallable() { + return stub.getCorpusCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates a corpus in a project. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (WarehouseClient warehouseClient = WarehouseClient.create()) {
+   *   Corpus corpus = Corpus.newBuilder().build();
+   *   FieldMask updateMask = FieldMask.newBuilder().build();
+   *   Corpus response = warehouseClient.updateCorpus(corpus, updateMask);
+   * }
+   * }
+ * + * @param corpus Required. The corpus which replaces the resource on the server. + * @param updateMask The list of fields to be updated. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Corpus updateCorpus(Corpus corpus, FieldMask updateMask) { + UpdateCorpusRequest request = + UpdateCorpusRequest.newBuilder().setCorpus(corpus).setUpdateMask(updateMask).build(); + return updateCorpus(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates a corpus in a project. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (WarehouseClient warehouseClient = WarehouseClient.create()) {
+   *   UpdateCorpusRequest request =
+   *       UpdateCorpusRequest.newBuilder()
+   *           .setCorpus(Corpus.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   Corpus response = warehouseClient.updateCorpus(request);
+   * }
+   * }
+ * + * @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 + */ + public final Corpus updateCorpus(UpdateCorpusRequest request) { + return updateCorpusCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates a corpus in a project. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (WarehouseClient warehouseClient = WarehouseClient.create()) {
+   *   UpdateCorpusRequest request =
+   *       UpdateCorpusRequest.newBuilder()
+   *           .setCorpus(Corpus.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   ApiFuture future = warehouseClient.updateCorpusCallable().futureCall(request);
+   *   // Do something.
+   *   Corpus response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable updateCorpusCallable() { + return stub.updateCorpusCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists all corpora in a project. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (WarehouseClient warehouseClient = WarehouseClient.create()) {
+   *   String parent = "parent-995424086";
+   *   for (Corpus element : warehouseClient.listCorpora(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The resource name of the project from which to list corpora. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListCorporaPagedResponse listCorpora(String parent) { + ListCorporaRequest request = ListCorporaRequest.newBuilder().setParent(parent).build(); + return listCorpora(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists all corpora in a project. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (WarehouseClient warehouseClient = WarehouseClient.create()) {
+   *   ListCorporaRequest request =
+   *       ListCorporaRequest.newBuilder()
+   *           .setParent("parent-995424086")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .build();
+   *   for (Corpus element : warehouseClient.listCorpora(request).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @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 + */ + public final ListCorporaPagedResponse listCorpora(ListCorporaRequest request) { + return listCorporaPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists all corpora in a project. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (WarehouseClient warehouseClient = WarehouseClient.create()) {
+   *   ListCorporaRequest request =
+   *       ListCorporaRequest.newBuilder()
+   *           .setParent("parent-995424086")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .build();
+   *   ApiFuture future = warehouseClient.listCorporaPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (Corpus element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listCorporaPagedCallable() { + return stub.listCorporaPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists all corpora in a project. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (WarehouseClient warehouseClient = WarehouseClient.create()) {
+   *   ListCorporaRequest request =
+   *       ListCorporaRequest.newBuilder()
+   *           .setParent("parent-995424086")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .build();
+   *   while (true) {
+   *     ListCorporaResponse response = warehouseClient.listCorporaCallable().call(request);
+   *     for (Corpus element : response.getCorporaList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable listCorporaCallable() { + return stub.listCorporaCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a corpus only if its empty. Returns empty response. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (WarehouseClient warehouseClient = WarehouseClient.create()) {
+   *   CorpusName name = CorpusName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]");
+   *   warehouseClient.deleteCorpus(name);
+   * }
+   * }
+ * + * @param name Required. The resource name of the corpus to delete. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteCorpus(CorpusName name) { + DeleteCorpusRequest request = + DeleteCorpusRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + deleteCorpus(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a corpus only if its empty. Returns empty response. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (WarehouseClient warehouseClient = WarehouseClient.create()) {
+   *   String name = CorpusName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]").toString();
+   *   warehouseClient.deleteCorpus(name);
+   * }
+   * }
+ * + * @param name Required. The resource name of the corpus to delete. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteCorpus(String name) { + DeleteCorpusRequest request = DeleteCorpusRequest.newBuilder().setName(name).build(); + deleteCorpus(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a corpus only if its empty. Returns empty response. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (WarehouseClient warehouseClient = WarehouseClient.create()) {
+   *   DeleteCorpusRequest request =
+   *       DeleteCorpusRequest.newBuilder()
+   *           .setName(CorpusName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]").toString())
+   *           .build();
+   *   warehouseClient.deleteCorpus(request);
+   * }
+   * }
+ * + * @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 + */ + public final void deleteCorpus(DeleteCorpusRequest request) { + deleteCorpusCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a corpus only if its empty. Returns empty response. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (WarehouseClient warehouseClient = WarehouseClient.create()) {
+   *   DeleteCorpusRequest request =
+   *       DeleteCorpusRequest.newBuilder()
+   *           .setName(CorpusName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]").toString())
+   *           .build();
+   *   ApiFuture future = warehouseClient.deleteCorpusCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final UnaryCallable deleteCorpusCallable() { + return stub.deleteCorpusCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Analyzes a corpus. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (WarehouseClient warehouseClient = WarehouseClient.create()) {
+   *   AnalyzeCorpusRequest request =
+   *       AnalyzeCorpusRequest.newBuilder()
+   *           .setName(CorpusName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]").toString())
+   *           .build();
+   *   AnalyzeCorpusResponse response = warehouseClient.analyzeCorpusAsync(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 + */ + public final OperationFuture analyzeCorpusAsync( + AnalyzeCorpusRequest request) { + return analyzeCorpusOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Analyzes a corpus. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (WarehouseClient warehouseClient = WarehouseClient.create()) {
+   *   AnalyzeCorpusRequest request =
+   *       AnalyzeCorpusRequest.newBuilder()
+   *           .setName(CorpusName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]").toString())
+   *           .build();
+   *   OperationFuture future =
+   *       warehouseClient.analyzeCorpusOperationCallable().futureCall(request);
+   *   // Do something.
+   *   AnalyzeCorpusResponse response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + analyzeCorpusOperationCallable() { + return stub.analyzeCorpusOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Analyzes a corpus. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (WarehouseClient warehouseClient = WarehouseClient.create()) {
+   *   AnalyzeCorpusRequest request =
+   *       AnalyzeCorpusRequest.newBuilder()
+   *           .setName(CorpusName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]").toString())
+   *           .build();
+   *   ApiFuture future = warehouseClient.analyzeCorpusCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable analyzeCorpusCallable() { + return stub.analyzeCorpusCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates data schema inside corpus. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (WarehouseClient warehouseClient = WarehouseClient.create()) {
+   *   CorpusName parent = CorpusName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]");
+   *   DataSchema dataSchema = DataSchema.newBuilder().build();
+   *   DataSchema response = warehouseClient.createDataSchema(parent, dataSchema);
+   * }
+   * }
+ * + * @param parent Required. The parent resource where this data schema will be created. Format: + * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}` + * @param dataSchema Required. The data schema to create. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final DataSchema createDataSchema(CorpusName parent, DataSchema dataSchema) { + CreateDataSchemaRequest request = + CreateDataSchemaRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setDataSchema(dataSchema) + .build(); + return createDataSchema(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates data schema inside corpus. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (WarehouseClient warehouseClient = WarehouseClient.create()) {
+   *   String parent = CorpusName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]").toString();
+   *   DataSchema dataSchema = DataSchema.newBuilder().build();
+   *   DataSchema response = warehouseClient.createDataSchema(parent, dataSchema);
+   * }
+   * }
+ * + * @param parent Required. The parent resource where this data schema will be created. Format: + * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}` + * @param dataSchema Required. The data schema to create. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final DataSchema createDataSchema(String parent, DataSchema dataSchema) { + CreateDataSchemaRequest request = + CreateDataSchemaRequest.newBuilder().setParent(parent).setDataSchema(dataSchema).build(); + return createDataSchema(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates data schema inside corpus. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (WarehouseClient warehouseClient = WarehouseClient.create()) {
+   *   CreateDataSchemaRequest request =
+   *       CreateDataSchemaRequest.newBuilder()
+   *           .setParent(CorpusName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]").toString())
+   *           .setDataSchema(DataSchema.newBuilder().build())
+   *           .build();
+   *   DataSchema response = warehouseClient.createDataSchema(request);
+   * }
+   * }
+ * + * @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 + */ + public final DataSchema createDataSchema(CreateDataSchemaRequest request) { + return createDataSchemaCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates data schema inside corpus. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (WarehouseClient warehouseClient = WarehouseClient.create()) {
+   *   CreateDataSchemaRequest request =
+   *       CreateDataSchemaRequest.newBuilder()
+   *           .setParent(CorpusName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]").toString())
+   *           .setDataSchema(DataSchema.newBuilder().build())
+   *           .build();
+   *   ApiFuture future = warehouseClient.createDataSchemaCallable().futureCall(request);
+   *   // Do something.
+   *   DataSchema response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable createDataSchemaCallable() { + return stub.createDataSchemaCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates data schema inside corpus. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (WarehouseClient warehouseClient = WarehouseClient.create()) {
+   *   DataSchema dataSchema = DataSchema.newBuilder().build();
+   *   FieldMask updateMask = FieldMask.newBuilder().build();
+   *   DataSchema response = warehouseClient.updateDataSchema(dataSchema, updateMask);
+   * }
+   * }
+ * + * @param dataSchema Required. The data schema's `name` field is used to identify the data schema + * to be updated. Format: + * `projects/{project_number}/locations/{location}/corpora/{corpus}/dataSchemas/{data_schema}` + * @param updateMask The list of fields to be updated. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final DataSchema updateDataSchema(DataSchema dataSchema, FieldMask updateMask) { + UpdateDataSchemaRequest request = + UpdateDataSchemaRequest.newBuilder() + .setDataSchema(dataSchema) + .setUpdateMask(updateMask) + .build(); + return updateDataSchema(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates data schema inside corpus. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (WarehouseClient warehouseClient = WarehouseClient.create()) {
+   *   UpdateDataSchemaRequest request =
+   *       UpdateDataSchemaRequest.newBuilder()
+   *           .setDataSchema(DataSchema.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   DataSchema response = warehouseClient.updateDataSchema(request);
+   * }
+   * }
+ * + * @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 + */ + public final DataSchema updateDataSchema(UpdateDataSchemaRequest request) { + return updateDataSchemaCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates data schema inside corpus. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (WarehouseClient warehouseClient = WarehouseClient.create()) {
+   *   UpdateDataSchemaRequest request =
+   *       UpdateDataSchemaRequest.newBuilder()
+   *           .setDataSchema(DataSchema.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   ApiFuture future = warehouseClient.updateDataSchemaCallable().futureCall(request);
+   *   // Do something.
+   *   DataSchema response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable updateDataSchemaCallable() { + return stub.updateDataSchemaCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets data schema inside corpus. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (WarehouseClient warehouseClient = WarehouseClient.create()) {
+   *   DataSchemaName name =
+   *       DataSchemaName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[DATA_SCHEMA]");
+   *   DataSchema response = warehouseClient.getDataSchema(name);
+   * }
+   * }
+ * + * @param name Required. The name of the data schema to retrieve. Format: + * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/dataSchemas/{data_schema_id}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final DataSchema getDataSchema(DataSchemaName name) { + GetDataSchemaRequest request = + GetDataSchemaRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return getDataSchema(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets data schema inside corpus. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (WarehouseClient warehouseClient = WarehouseClient.create()) {
+   *   String name =
+   *       DataSchemaName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[DATA_SCHEMA]")
+   *           .toString();
+   *   DataSchema response = warehouseClient.getDataSchema(name);
+   * }
+   * }
+ * + * @param name Required. The name of the data schema to retrieve. Format: + * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/dataSchemas/{data_schema_id}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final DataSchema getDataSchema(String name) { + GetDataSchemaRequest request = GetDataSchemaRequest.newBuilder().setName(name).build(); + return getDataSchema(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets data schema inside corpus. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (WarehouseClient warehouseClient = WarehouseClient.create()) {
+   *   GetDataSchemaRequest request =
+   *       GetDataSchemaRequest.newBuilder()
+   *           .setName(
+   *               DataSchemaName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[DATA_SCHEMA]")
+   *                   .toString())
+   *           .build();
+   *   DataSchema response = warehouseClient.getDataSchema(request);
+   * }
+   * }
+ * + * @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 + */ + public final DataSchema getDataSchema(GetDataSchemaRequest request) { + return getDataSchemaCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets data schema inside corpus. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (WarehouseClient warehouseClient = WarehouseClient.create()) {
+   *   GetDataSchemaRequest request =
+   *       GetDataSchemaRequest.newBuilder()
+   *           .setName(
+   *               DataSchemaName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[DATA_SCHEMA]")
+   *                   .toString())
+   *           .build();
+   *   ApiFuture future = warehouseClient.getDataSchemaCallable().futureCall(request);
+   *   // Do something.
+   *   DataSchema response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getDataSchemaCallable() { + return stub.getDataSchemaCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes data schema inside corpus. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (WarehouseClient warehouseClient = WarehouseClient.create()) {
+   *   DataSchemaName name =
+   *       DataSchemaName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[DATA_SCHEMA]");
+   *   warehouseClient.deleteDataSchema(name);
+   * }
+   * }
+ * + * @param name Required. The name of the data schema to delete. Format: + * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/dataSchemas/{data_schema_id}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteDataSchema(DataSchemaName name) { + DeleteDataSchemaRequest request = + DeleteDataSchemaRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + deleteDataSchema(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes data schema inside corpus. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (WarehouseClient warehouseClient = WarehouseClient.create()) {
+   *   String name =
+   *       DataSchemaName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[DATA_SCHEMA]")
+   *           .toString();
+   *   warehouseClient.deleteDataSchema(name);
+   * }
+   * }
+ * + * @param name Required. The name of the data schema to delete. Format: + * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/dataSchemas/{data_schema_id}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteDataSchema(String name) { + DeleteDataSchemaRequest request = DeleteDataSchemaRequest.newBuilder().setName(name).build(); + deleteDataSchema(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes data schema inside corpus. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (WarehouseClient warehouseClient = WarehouseClient.create()) {
+   *   DeleteDataSchemaRequest request =
+   *       DeleteDataSchemaRequest.newBuilder()
+   *           .setName(
+   *               DataSchemaName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[DATA_SCHEMA]")
+   *                   .toString())
+   *           .build();
+   *   warehouseClient.deleteDataSchema(request);
+   * }
+   * }
+ * + * @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 + */ + public final void deleteDataSchema(DeleteDataSchemaRequest request) { + deleteDataSchemaCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes data schema inside corpus. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (WarehouseClient warehouseClient = WarehouseClient.create()) {
+   *   DeleteDataSchemaRequest request =
+   *       DeleteDataSchemaRequest.newBuilder()
+   *           .setName(
+   *               DataSchemaName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[DATA_SCHEMA]")
+   *                   .toString())
+   *           .build();
+   *   ApiFuture future = warehouseClient.deleteDataSchemaCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final UnaryCallable deleteDataSchemaCallable() { + return stub.deleteDataSchemaCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists a list of data schemas inside corpus. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (WarehouseClient warehouseClient = WarehouseClient.create()) {
+   *   CorpusName parent = CorpusName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]");
+   *   for (DataSchema element : warehouseClient.listDataSchemas(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The parent, which owns this collection of data schemas. Format: + * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListDataSchemasPagedResponse listDataSchemas(CorpusName parent) { + ListDataSchemasRequest request = + ListDataSchemasRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listDataSchemas(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists a list of data schemas inside corpus. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (WarehouseClient warehouseClient = WarehouseClient.create()) {
+   *   String parent = CorpusName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]").toString();
+   *   for (DataSchema element : warehouseClient.listDataSchemas(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The parent, which owns this collection of data schemas. Format: + * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListDataSchemasPagedResponse listDataSchemas(String parent) { + ListDataSchemasRequest request = ListDataSchemasRequest.newBuilder().setParent(parent).build(); + return listDataSchemas(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists a list of data schemas inside corpus. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (WarehouseClient warehouseClient = WarehouseClient.create()) {
+   *   ListDataSchemasRequest request =
+   *       ListDataSchemasRequest.newBuilder()
+   *           .setParent(CorpusName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   for (DataSchema element : warehouseClient.listDataSchemas(request).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @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 + */ + public final ListDataSchemasPagedResponse listDataSchemas(ListDataSchemasRequest request) { + return listDataSchemasPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists a list of data schemas inside corpus. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (WarehouseClient warehouseClient = WarehouseClient.create()) {
+   *   ListDataSchemasRequest request =
+   *       ListDataSchemasRequest.newBuilder()
+   *           .setParent(CorpusName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   ApiFuture future =
+   *       warehouseClient.listDataSchemasPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (DataSchema element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listDataSchemasPagedCallable() { + return stub.listDataSchemasPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists a list of data schemas inside corpus. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (WarehouseClient warehouseClient = WarehouseClient.create()) {
+   *   ListDataSchemasRequest request =
+   *       ListDataSchemasRequest.newBuilder()
+   *           .setParent(CorpusName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   while (true) {
+   *     ListDataSchemasResponse response = warehouseClient.listDataSchemasCallable().call(request);
+   *     for (DataSchema element : response.getDataSchemasList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listDataSchemasCallable() { + return stub.listDataSchemasCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates annotation inside asset. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (WarehouseClient warehouseClient = WarehouseClient.create()) {
+   *   AssetName parent = AssetName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[ASSET]");
+   *   Annotation annotation = Annotation.newBuilder().build();
+   *   String annotationId = "annotationId251782314";
+   *   Annotation response = warehouseClient.createAnnotation(parent, annotation, annotationId);
+   * }
+   * }
+ * + * @param parent Required. The parent resource where this annotation will be created. Format: + * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/assets/{asset_id}` + * @param annotation Required. The annotation to create. + * @param annotationId Optional. The ID to use for the annotation, which will become the final + * component of the annotation's resource name if user choose to specify. Otherwise, + * annotation id will be generated by system. + *

This value should be up to 63 characters, and valid characters are /[a-z][0-9]-/. The + * first character must be a letter, the last could be a letter or a number. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Annotation createAnnotation( + AssetName parent, Annotation annotation, String annotationId) { + CreateAnnotationRequest request = + CreateAnnotationRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setAnnotation(annotation) + .setAnnotationId(annotationId) + .build(); + return createAnnotation(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates annotation inside asset. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (WarehouseClient warehouseClient = WarehouseClient.create()) {
+   *   String parent =
+   *       AssetName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[ASSET]").toString();
+   *   Annotation annotation = Annotation.newBuilder().build();
+   *   String annotationId = "annotationId251782314";
+   *   Annotation response = warehouseClient.createAnnotation(parent, annotation, annotationId);
+   * }
+   * }
+ * + * @param parent Required. The parent resource where this annotation will be created. Format: + * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/assets/{asset_id}` + * @param annotation Required. The annotation to create. + * @param annotationId Optional. The ID to use for the annotation, which will become the final + * component of the annotation's resource name if user choose to specify. Otherwise, + * annotation id will be generated by system. + *

This value should be up to 63 characters, and valid characters are /[a-z][0-9]-/. The + * first character must be a letter, the last could be a letter or a number. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Annotation createAnnotation( + String parent, Annotation annotation, String annotationId) { + CreateAnnotationRequest request = + CreateAnnotationRequest.newBuilder() + .setParent(parent) + .setAnnotation(annotation) + .setAnnotationId(annotationId) + .build(); + return createAnnotation(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates annotation inside asset. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (WarehouseClient warehouseClient = WarehouseClient.create()) {
+   *   CreateAnnotationRequest request =
+   *       CreateAnnotationRequest.newBuilder()
+   *           .setParent(
+   *               AssetName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[ASSET]").toString())
+   *           .setAnnotation(Annotation.newBuilder().build())
+   *           .setAnnotationId("annotationId251782314")
+   *           .build();
+   *   Annotation response = warehouseClient.createAnnotation(request);
+   * }
+   * }
+ * + * @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 + */ + public final Annotation createAnnotation(CreateAnnotationRequest request) { + return createAnnotationCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates annotation inside asset. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (WarehouseClient warehouseClient = WarehouseClient.create()) {
+   *   CreateAnnotationRequest request =
+   *       CreateAnnotationRequest.newBuilder()
+   *           .setParent(
+   *               AssetName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[ASSET]").toString())
+   *           .setAnnotation(Annotation.newBuilder().build())
+   *           .setAnnotationId("annotationId251782314")
+   *           .build();
+   *   ApiFuture future = warehouseClient.createAnnotationCallable().futureCall(request);
+   *   // Do something.
+   *   Annotation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable createAnnotationCallable() { + return stub.createAnnotationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Reads annotation inside asset. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (WarehouseClient warehouseClient = WarehouseClient.create()) {
+   *   AnnotationName name =
+   *       AnnotationName.of(
+   *           "[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[ASSET]", "[ANNOTATION]");
+   *   Annotation response = warehouseClient.getAnnotation(name);
+   * }
+   * }
+ * + * @param name Required. The name of the annotation to retrieve. Format: + * `projects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset}/annotations/{annotation}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Annotation getAnnotation(AnnotationName name) { + GetAnnotationRequest request = + GetAnnotationRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return getAnnotation(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Reads annotation inside asset. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (WarehouseClient warehouseClient = WarehouseClient.create()) {
+   *   String name =
+   *       AnnotationName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[ASSET]", "[ANNOTATION]")
+   *           .toString();
+   *   Annotation response = warehouseClient.getAnnotation(name);
+   * }
+   * }
+ * + * @param name Required. The name of the annotation to retrieve. Format: + * `projects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset}/annotations/{annotation}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Annotation getAnnotation(String name) { + GetAnnotationRequest request = GetAnnotationRequest.newBuilder().setName(name).build(); + return getAnnotation(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Reads annotation inside asset. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (WarehouseClient warehouseClient = WarehouseClient.create()) {
+   *   GetAnnotationRequest request =
+   *       GetAnnotationRequest.newBuilder()
+   *           .setName(
+   *               AnnotationName.of(
+   *                       "[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[ASSET]", "[ANNOTATION]")
+   *                   .toString())
+   *           .build();
+   *   Annotation response = warehouseClient.getAnnotation(request);
+   * }
+   * }
+ * + * @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 + */ + public final Annotation getAnnotation(GetAnnotationRequest request) { + return getAnnotationCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Reads annotation inside asset. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (WarehouseClient warehouseClient = WarehouseClient.create()) {
+   *   GetAnnotationRequest request =
+   *       GetAnnotationRequest.newBuilder()
+   *           .setName(
+   *               AnnotationName.of(
+   *                       "[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[ASSET]", "[ANNOTATION]")
+   *                   .toString())
+   *           .build();
+   *   ApiFuture future = warehouseClient.getAnnotationCallable().futureCall(request);
+   *   // Do something.
+   *   Annotation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getAnnotationCallable() { + return stub.getAnnotationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists a list of annotations inside asset. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (WarehouseClient warehouseClient = WarehouseClient.create()) {
+   *   AssetName parent = AssetName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[ASSET]");
+   *   for (Annotation element : warehouseClient.listAnnotations(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent The parent, which owns this collection of annotations. Format: + * `projects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListAnnotationsPagedResponse listAnnotations(AssetName parent) { + ListAnnotationsRequest request = + ListAnnotationsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listAnnotations(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists a list of annotations inside asset. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (WarehouseClient warehouseClient = WarehouseClient.create()) {
+   *   String parent =
+   *       AssetName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[ASSET]").toString();
+   *   for (Annotation element : warehouseClient.listAnnotations(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent The parent, which owns this collection of annotations. Format: + * `projects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListAnnotationsPagedResponse listAnnotations(String parent) { + ListAnnotationsRequest request = ListAnnotationsRequest.newBuilder().setParent(parent).build(); + return listAnnotations(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists a list of annotations inside asset. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (WarehouseClient warehouseClient = WarehouseClient.create()) {
+   *   ListAnnotationsRequest request =
+   *       ListAnnotationsRequest.newBuilder()
+   *           .setParent(
+   *               AssetName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[ASSET]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .build();
+   *   for (Annotation element : warehouseClient.listAnnotations(request).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @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 + */ + public final ListAnnotationsPagedResponse listAnnotations(ListAnnotationsRequest request) { + return listAnnotationsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists a list of annotations inside asset. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (WarehouseClient warehouseClient = WarehouseClient.create()) {
+   *   ListAnnotationsRequest request =
+   *       ListAnnotationsRequest.newBuilder()
+   *           .setParent(
+   *               AssetName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[ASSET]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .build();
+   *   ApiFuture future =
+   *       warehouseClient.listAnnotationsPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (Annotation element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listAnnotationsPagedCallable() { + return stub.listAnnotationsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists a list of annotations inside asset. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (WarehouseClient warehouseClient = WarehouseClient.create()) {
+   *   ListAnnotationsRequest request =
+   *       ListAnnotationsRequest.newBuilder()
+   *           .setParent(
+   *               AssetName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[ASSET]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .build();
+   *   while (true) {
+   *     ListAnnotationsResponse response = warehouseClient.listAnnotationsCallable().call(request);
+   *     for (Annotation element : response.getAnnotationsList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listAnnotationsCallable() { + return stub.listAnnotationsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates annotation inside asset. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (WarehouseClient warehouseClient = WarehouseClient.create()) {
+   *   Annotation annotation = Annotation.newBuilder().build();
+   *   FieldMask updateMask = FieldMask.newBuilder().build();
+   *   Annotation response = warehouseClient.updateAnnotation(annotation, updateMask);
+   * }
+   * }
+ * + * @param annotation Required. The annotation to update. The annotation's `name` field is used to + * identify the annotation to be updated. Format: + * `projects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset}/annotations/{annotation}` + * @param updateMask The list of fields to be updated. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Annotation updateAnnotation(Annotation annotation, FieldMask updateMask) { + UpdateAnnotationRequest request = + UpdateAnnotationRequest.newBuilder() + .setAnnotation(annotation) + .setUpdateMask(updateMask) + .build(); + return updateAnnotation(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates annotation inside asset. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (WarehouseClient warehouseClient = WarehouseClient.create()) {
+   *   UpdateAnnotationRequest request =
+   *       UpdateAnnotationRequest.newBuilder()
+   *           .setAnnotation(Annotation.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   Annotation response = warehouseClient.updateAnnotation(request);
+   * }
+   * }
+ * + * @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 + */ + public final Annotation updateAnnotation(UpdateAnnotationRequest request) { + return updateAnnotationCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates annotation inside asset. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (WarehouseClient warehouseClient = WarehouseClient.create()) {
+   *   UpdateAnnotationRequest request =
+   *       UpdateAnnotationRequest.newBuilder()
+   *           .setAnnotation(Annotation.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   ApiFuture future = warehouseClient.updateAnnotationCallable().futureCall(request);
+   *   // Do something.
+   *   Annotation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable updateAnnotationCallable() { + return stub.updateAnnotationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes annotation inside asset. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (WarehouseClient warehouseClient = WarehouseClient.create()) {
+   *   AnnotationName name =
+   *       AnnotationName.of(
+   *           "[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[ASSET]", "[ANNOTATION]");
+   *   warehouseClient.deleteAnnotation(name);
+   * }
+   * }
+ * + * @param name Required. The name of the annotation to delete. Format: + * `projects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset}/annotations/{annotation}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteAnnotation(AnnotationName name) { + DeleteAnnotationRequest request = + DeleteAnnotationRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + deleteAnnotation(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes annotation inside asset. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (WarehouseClient warehouseClient = WarehouseClient.create()) {
+   *   String name =
+   *       AnnotationName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[ASSET]", "[ANNOTATION]")
+   *           .toString();
+   *   warehouseClient.deleteAnnotation(name);
+   * }
+   * }
+ * + * @param name Required. The name of the annotation to delete. Format: + * `projects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset}/annotations/{annotation}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteAnnotation(String name) { + DeleteAnnotationRequest request = DeleteAnnotationRequest.newBuilder().setName(name).build(); + deleteAnnotation(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes annotation inside asset. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (WarehouseClient warehouseClient = WarehouseClient.create()) {
+   *   DeleteAnnotationRequest request =
+   *       DeleteAnnotationRequest.newBuilder()
+   *           .setName(
+   *               AnnotationName.of(
+   *                       "[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[ASSET]", "[ANNOTATION]")
+   *                   .toString())
+   *           .build();
+   *   warehouseClient.deleteAnnotation(request);
+   * }
+   * }
+ * + * @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 + */ + public final void deleteAnnotation(DeleteAnnotationRequest request) { + deleteAnnotationCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes annotation inside asset. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (WarehouseClient warehouseClient = WarehouseClient.create()) {
+   *   DeleteAnnotationRequest request =
+   *       DeleteAnnotationRequest.newBuilder()
+   *           .setName(
+   *               AnnotationName.of(
+   *                       "[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[ASSET]", "[ANNOTATION]")
+   *                   .toString())
+   *           .build();
+   *   ApiFuture future = warehouseClient.deleteAnnotationCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final UnaryCallable deleteAnnotationCallable() { + return stub.deleteAnnotationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Ingests data for the asset. It is not allowed to ingest a data chunk which is already expired + * according to TTL. This method is only available via the gRPC API (not HTTP since bi-directional + * streaming is not supported via HTTP). + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (WarehouseClient warehouseClient = WarehouseClient.create()) {
+   *   BidiStream bidiStream =
+   *       warehouseClient.ingestAssetCallable().call();
+   *   IngestAssetRequest request = IngestAssetRequest.newBuilder().build();
+   *   bidiStream.send(request);
+   *   for (IngestAssetResponse response : bidiStream) {
+   *     // Do something when a response is received.
+   *   }
+   * }
+   * }
+ */ + public final BidiStreamingCallable + ingestAssetCallable() { + return stub.ingestAssetCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Generates clips for downloading. The api takes in a time range, and generates a clip of the + * first content available after start_time and before end_time, which may overflow beyond these + * bounds. Returned clips are truncated if the total size of the clips are larger than 100MB. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (WarehouseClient warehouseClient = WarehouseClient.create()) {
+   *   ClipAssetRequest request =
+   *       ClipAssetRequest.newBuilder()
+   *           .setName(
+   *               AssetName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[ASSET]").toString())
+   *           .setTemporalPartition(Partition.TemporalPartition.newBuilder().build())
+   *           .build();
+   *   ClipAssetResponse response = warehouseClient.clipAsset(request);
+   * }
+   * }
+ * + * @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 + */ + public final ClipAssetResponse clipAsset(ClipAssetRequest request) { + return clipAssetCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Generates clips for downloading. The api takes in a time range, and generates a clip of the + * first content available after start_time and before end_time, which may overflow beyond these + * bounds. Returned clips are truncated if the total size of the clips are larger than 100MB. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (WarehouseClient warehouseClient = WarehouseClient.create()) {
+   *   ClipAssetRequest request =
+   *       ClipAssetRequest.newBuilder()
+   *           .setName(
+   *               AssetName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[ASSET]").toString())
+   *           .setTemporalPartition(Partition.TemporalPartition.newBuilder().build())
+   *           .build();
+   *   ApiFuture future = warehouseClient.clipAssetCallable().futureCall(request);
+   *   // Do something.
+   *   ClipAssetResponse response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable clipAssetCallable() { + return stub.clipAssetCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Generates a uri for an HLS manifest. The api takes in a collection of time ranges, and + * generates a URI for an HLS manifest that covers all the requested time ranges. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (WarehouseClient warehouseClient = WarehouseClient.create()) {
+   *   GenerateHlsUriRequest request =
+   *       GenerateHlsUriRequest.newBuilder()
+   *           .setName(
+   *               AssetName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[ASSET]").toString())
+   *           .addAllTemporalPartitions(new ArrayList())
+   *           .setLiveViewEnabled(true)
+   *           .build();
+   *   GenerateHlsUriResponse response = warehouseClient.generateHlsUri(request);
+   * }
+   * }
+ * + * @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 + */ + public final GenerateHlsUriResponse generateHlsUri(GenerateHlsUriRequest request) { + return generateHlsUriCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Generates a uri for an HLS manifest. The api takes in a collection of time ranges, and + * generates a URI for an HLS manifest that covers all the requested time ranges. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (WarehouseClient warehouseClient = WarehouseClient.create()) {
+   *   GenerateHlsUriRequest request =
+   *       GenerateHlsUriRequest.newBuilder()
+   *           .setName(
+   *               AssetName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[ASSET]").toString())
+   *           .addAllTemporalPartitions(new ArrayList())
+   *           .setLiveViewEnabled(true)
+   *           .build();
+   *   ApiFuture future =
+   *       warehouseClient.generateHlsUriCallable().futureCall(request);
+   *   // Do something.
+   *   GenerateHlsUriResponse response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + generateHlsUriCallable() { + return stub.generateHlsUriCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Imports assets (images plus annotations) from a meta file on cloud storage. Each row in the + * meta file is corresponding to an image (specified by a cloud storage uri) and its annotations. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (WarehouseClient warehouseClient = WarehouseClient.create()) {
+   *   ImportAssetsRequest request =
+   *       ImportAssetsRequest.newBuilder()
+   *           .setParent(CorpusName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]").toString())
+   *           .build();
+   *   ImportAssetsResponse response = warehouseClient.importAssetsAsync(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 + */ + public final OperationFuture importAssetsAsync( + ImportAssetsRequest request) { + return importAssetsOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Imports assets (images plus annotations) from a meta file on cloud storage. Each row in the + * meta file is corresponding to an image (specified by a cloud storage uri) and its annotations. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (WarehouseClient warehouseClient = WarehouseClient.create()) {
+   *   ImportAssetsRequest request =
+   *       ImportAssetsRequest.newBuilder()
+   *           .setParent(CorpusName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]").toString())
+   *           .build();
+   *   OperationFuture future =
+   *       warehouseClient.importAssetsOperationCallable().futureCall(request);
+   *   // Do something.
+   *   ImportAssetsResponse response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + importAssetsOperationCallable() { + return stub.importAssetsOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Imports assets (images plus annotations) from a meta file on cloud storage. Each row in the + * meta file is corresponding to an image (specified by a cloud storage uri) and its annotations. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (WarehouseClient warehouseClient = WarehouseClient.create()) {
+   *   ImportAssetsRequest request =
+   *       ImportAssetsRequest.newBuilder()
+   *           .setParent(CorpusName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]").toString())
+   *           .build();
+   *   ApiFuture future = warehouseClient.importAssetsCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable importAssetsCallable() { + return stub.importAssetsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a search configuration inside a corpus. + * + *

Please follow the rules below to create a valid CreateSearchConfigRequest. --- General Rules + * --- 1. Request.search_config_id must not be associated with an existing SearchConfig. 2. + * Request must contain at least one non-empty search_criteria_property or facet_property. 3. + * mapped_fields must not be empty, and must map to existing UGA keys. 4. All mapped_fields must + * be of the same type. 5. All mapped_fields must share the same granularity. 6. All mapped_fields + * must share the same semantic SearchConfig match options. For property-specific rules, please + * reference the comments for FacetProperty and SearchCriteriaProperty. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (WarehouseClient warehouseClient = WarehouseClient.create()) {
+   *   CorpusName parent = CorpusName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]");
+   *   SearchConfig searchConfig = SearchConfig.newBuilder().build();
+   *   String searchConfigId = "searchConfigId1576297925";
+   *   SearchConfig response =
+   *       warehouseClient.createSearchConfig(parent, searchConfig, searchConfigId);
+   * }
+   * }
+ * + * @param parent Required. The parent resource where this search configuration will be created. + * Format: `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}` + * @param searchConfig Required. The search config to create. + * @param searchConfigId Required. ID to use for the new search config. Will become the final + * component of the SearchConfig's resource name. This value should be up to 63 characters, + * and valid characters are /[a-z][0-9]-_/. The first character must be a letter, the last + * could be a letter or a number. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final SearchConfig createSearchConfig( + CorpusName parent, SearchConfig searchConfig, String searchConfigId) { + CreateSearchConfigRequest request = + CreateSearchConfigRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setSearchConfig(searchConfig) + .setSearchConfigId(searchConfigId) + .build(); + return createSearchConfig(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a search configuration inside a corpus. + * + *

Please follow the rules below to create a valid CreateSearchConfigRequest. --- General Rules + * --- 1. Request.search_config_id must not be associated with an existing SearchConfig. 2. + * Request must contain at least one non-empty search_criteria_property or facet_property. 3. + * mapped_fields must not be empty, and must map to existing UGA keys. 4. All mapped_fields must + * be of the same type. 5. All mapped_fields must share the same granularity. 6. All mapped_fields + * must share the same semantic SearchConfig match options. For property-specific rules, please + * reference the comments for FacetProperty and SearchCriteriaProperty. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (WarehouseClient warehouseClient = WarehouseClient.create()) {
+   *   String parent = CorpusName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]").toString();
+   *   SearchConfig searchConfig = SearchConfig.newBuilder().build();
+   *   String searchConfigId = "searchConfigId1576297925";
+   *   SearchConfig response =
+   *       warehouseClient.createSearchConfig(parent, searchConfig, searchConfigId);
+   * }
+   * }
+ * + * @param parent Required. The parent resource where this search configuration will be created. + * Format: `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}` + * @param searchConfig Required. The search config to create. + * @param searchConfigId Required. ID to use for the new search config. Will become the final + * component of the SearchConfig's resource name. This value should be up to 63 characters, + * and valid characters are /[a-z][0-9]-_/. The first character must be a letter, the last + * could be a letter or a number. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final SearchConfig createSearchConfig( + String parent, SearchConfig searchConfig, String searchConfigId) { + CreateSearchConfigRequest request = + CreateSearchConfigRequest.newBuilder() + .setParent(parent) + .setSearchConfig(searchConfig) + .setSearchConfigId(searchConfigId) + .build(); + return createSearchConfig(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a search configuration inside a corpus. + * + *

Please follow the rules below to create a valid CreateSearchConfigRequest. --- General Rules + * --- 1. Request.search_config_id must not be associated with an existing SearchConfig. 2. + * Request must contain at least one non-empty search_criteria_property or facet_property. 3. + * mapped_fields must not be empty, and must map to existing UGA keys. 4. All mapped_fields must + * be of the same type. 5. All mapped_fields must share the same granularity. 6. All mapped_fields + * must share the same semantic SearchConfig match options. For property-specific rules, please + * reference the comments for FacetProperty and SearchCriteriaProperty. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (WarehouseClient warehouseClient = WarehouseClient.create()) {
+   *   CreateSearchConfigRequest request =
+   *       CreateSearchConfigRequest.newBuilder()
+   *           .setParent(CorpusName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]").toString())
+   *           .setSearchConfig(SearchConfig.newBuilder().build())
+   *           .setSearchConfigId("searchConfigId1576297925")
+   *           .build();
+   *   SearchConfig response = warehouseClient.createSearchConfig(request);
+   * }
+   * }
+ * + * @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 + */ + public final SearchConfig createSearchConfig(CreateSearchConfigRequest request) { + return createSearchConfigCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a search configuration inside a corpus. + * + *

Please follow the rules below to create a valid CreateSearchConfigRequest. --- General Rules + * --- 1. Request.search_config_id must not be associated with an existing SearchConfig. 2. + * Request must contain at least one non-empty search_criteria_property or facet_property. 3. + * mapped_fields must not be empty, and must map to existing UGA keys. 4. All mapped_fields must + * be of the same type. 5. All mapped_fields must share the same granularity. 6. All mapped_fields + * must share the same semantic SearchConfig match options. For property-specific rules, please + * reference the comments for FacetProperty and SearchCriteriaProperty. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (WarehouseClient warehouseClient = WarehouseClient.create()) {
+   *   CreateSearchConfigRequest request =
+   *       CreateSearchConfigRequest.newBuilder()
+   *           .setParent(CorpusName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]").toString())
+   *           .setSearchConfig(SearchConfig.newBuilder().build())
+   *           .setSearchConfigId("searchConfigId1576297925")
+   *           .build();
+   *   ApiFuture future =
+   *       warehouseClient.createSearchConfigCallable().futureCall(request);
+   *   // Do something.
+   *   SearchConfig response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable createSearchConfigCallable() { + return stub.createSearchConfigCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates a search configuration inside a corpus. + * + *

Please follow the rules below to create a valid UpdateSearchConfigRequest. --- General Rules + * --- 1. Request.search_configuration.name must already exist. 2. Request must contain at least + * one non-empty search_criteria_property or facet_property. 3. mapped_fields must not be empty, + * and must map to existing UGA keys. 4. All mapped_fields must be of the same type. 5. All + * mapped_fields must share the same granularity. 6. All mapped_fields must share the same + * semantic SearchConfig match options. For property-specific rules, please reference the comments + * for FacetProperty and SearchCriteriaProperty. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (WarehouseClient warehouseClient = WarehouseClient.create()) {
+   *   SearchConfig searchConfig = SearchConfig.newBuilder().build();
+   *   FieldMask updateMask = FieldMask.newBuilder().build();
+   *   SearchConfig response = warehouseClient.updateSearchConfig(searchConfig, updateMask);
+   * }
+   * }
+ * + * @param searchConfig Required. The search configuration to update. + *

The search configuration's `name` field is used to identify the resource to be updated. + * Format: + * `projects/{project_number}/locations/{location}/corpora/{corpus}/searchConfigs/{search_config}` + * @param updateMask The list of fields to be updated. If left unset, all field paths will be + * updated/overwritten. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final SearchConfig updateSearchConfig(SearchConfig searchConfig, FieldMask updateMask) { + UpdateSearchConfigRequest request = + UpdateSearchConfigRequest.newBuilder() + .setSearchConfig(searchConfig) + .setUpdateMask(updateMask) + .build(); + return updateSearchConfig(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates a search configuration inside a corpus. + * + *

Please follow the rules below to create a valid UpdateSearchConfigRequest. --- General Rules + * --- 1. Request.search_configuration.name must already exist. 2. Request must contain at least + * one non-empty search_criteria_property or facet_property. 3. mapped_fields must not be empty, + * and must map to existing UGA keys. 4. All mapped_fields must be of the same type. 5. All + * mapped_fields must share the same granularity. 6. All mapped_fields must share the same + * semantic SearchConfig match options. For property-specific rules, please reference the comments + * for FacetProperty and SearchCriteriaProperty. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (WarehouseClient warehouseClient = WarehouseClient.create()) {
+   *   UpdateSearchConfigRequest request =
+   *       UpdateSearchConfigRequest.newBuilder()
+   *           .setSearchConfig(SearchConfig.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   SearchConfig response = warehouseClient.updateSearchConfig(request);
+   * }
+   * }
+ * + * @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 + */ + public final SearchConfig updateSearchConfig(UpdateSearchConfigRequest request) { + return updateSearchConfigCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates a search configuration inside a corpus. + * + *

Please follow the rules below to create a valid UpdateSearchConfigRequest. --- General Rules + * --- 1. Request.search_configuration.name must already exist. 2. Request must contain at least + * one non-empty search_criteria_property or facet_property. 3. mapped_fields must not be empty, + * and must map to existing UGA keys. 4. All mapped_fields must be of the same type. 5. All + * mapped_fields must share the same granularity. 6. All mapped_fields must share the same + * semantic SearchConfig match options. For property-specific rules, please reference the comments + * for FacetProperty and SearchCriteriaProperty. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (WarehouseClient warehouseClient = WarehouseClient.create()) {
+   *   UpdateSearchConfigRequest request =
+   *       UpdateSearchConfigRequest.newBuilder()
+   *           .setSearchConfig(SearchConfig.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       warehouseClient.updateSearchConfigCallable().futureCall(request);
+   *   // Do something.
+   *   SearchConfig response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable updateSearchConfigCallable() { + return stub.updateSearchConfigCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a search configuration inside a corpus. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (WarehouseClient warehouseClient = WarehouseClient.create()) {
+   *   SearchConfigName name =
+   *       SearchConfigName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[SEARCH_CONFIG]");
+   *   SearchConfig response = warehouseClient.getSearchConfig(name);
+   * }
+   * }
+ * + * @param name Required. The name of the search configuration to retrieve. Format: + * `projects/{project_number}/locations/{location}/corpora/{corpus}/searchConfigs/{search_config}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final SearchConfig getSearchConfig(SearchConfigName name) { + GetSearchConfigRequest request = + GetSearchConfigRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return getSearchConfig(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a search configuration inside a corpus. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (WarehouseClient warehouseClient = WarehouseClient.create()) {
+   *   String name =
+   *       SearchConfigName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[SEARCH_CONFIG]")
+   *           .toString();
+   *   SearchConfig response = warehouseClient.getSearchConfig(name);
+   * }
+   * }
+ * + * @param name Required. The name of the search configuration to retrieve. Format: + * `projects/{project_number}/locations/{location}/corpora/{corpus}/searchConfigs/{search_config}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final SearchConfig getSearchConfig(String name) { + GetSearchConfigRequest request = GetSearchConfigRequest.newBuilder().setName(name).build(); + return getSearchConfig(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a search configuration inside a corpus. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (WarehouseClient warehouseClient = WarehouseClient.create()) {
+   *   GetSearchConfigRequest request =
+   *       GetSearchConfigRequest.newBuilder()
+   *           .setName(
+   *               SearchConfigName.of(
+   *                       "[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[SEARCH_CONFIG]")
+   *                   .toString())
+   *           .build();
+   *   SearchConfig response = warehouseClient.getSearchConfig(request);
+   * }
+   * }
+ * + * @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 + */ + public final SearchConfig getSearchConfig(GetSearchConfigRequest request) { + return getSearchConfigCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a search configuration inside a corpus. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (WarehouseClient warehouseClient = WarehouseClient.create()) {
+   *   GetSearchConfigRequest request =
+   *       GetSearchConfigRequest.newBuilder()
+   *           .setName(
+   *               SearchConfigName.of(
+   *                       "[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[SEARCH_CONFIG]")
+   *                   .toString())
+   *           .build();
+   *   ApiFuture future =
+   *       warehouseClient.getSearchConfigCallable().futureCall(request);
+   *   // Do something.
+   *   SearchConfig response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getSearchConfigCallable() { + return stub.getSearchConfigCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a search configuration inside a corpus. + * + *

For a DeleteSearchConfigRequest to be valid, Request.search_configuration.name must already + * exist. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (WarehouseClient warehouseClient = WarehouseClient.create()) {
+   *   SearchConfigName name =
+   *       SearchConfigName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[SEARCH_CONFIG]");
+   *   warehouseClient.deleteSearchConfig(name);
+   * }
+   * }
+ * + * @param name Required. The name of the search configuration to delete. Format: + * `projects/{project_number}/locations/{location}/corpora/{corpus}/searchConfigs/{search_config}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteSearchConfig(SearchConfigName name) { + DeleteSearchConfigRequest request = + DeleteSearchConfigRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + deleteSearchConfig(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a search configuration inside a corpus. + * + *

For a DeleteSearchConfigRequest to be valid, Request.search_configuration.name must already + * exist. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (WarehouseClient warehouseClient = WarehouseClient.create()) {
+   *   String name =
+   *       SearchConfigName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[SEARCH_CONFIG]")
+   *           .toString();
+   *   warehouseClient.deleteSearchConfig(name);
+   * }
+   * }
+ * + * @param name Required. The name of the search configuration to delete. Format: + * `projects/{project_number}/locations/{location}/corpora/{corpus}/searchConfigs/{search_config}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteSearchConfig(String name) { + DeleteSearchConfigRequest request = + DeleteSearchConfigRequest.newBuilder().setName(name).build(); + deleteSearchConfig(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a search configuration inside a corpus. + * + *

For a DeleteSearchConfigRequest to be valid, Request.search_configuration.name must already + * exist. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (WarehouseClient warehouseClient = WarehouseClient.create()) {
+   *   DeleteSearchConfigRequest request =
+   *       DeleteSearchConfigRequest.newBuilder()
+   *           .setName(
+   *               SearchConfigName.of(
+   *                       "[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[SEARCH_CONFIG]")
+   *                   .toString())
+   *           .build();
+   *   warehouseClient.deleteSearchConfig(request);
+   * }
+   * }
+ * + * @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 + */ + public final void deleteSearchConfig(DeleteSearchConfigRequest request) { + deleteSearchConfigCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a search configuration inside a corpus. + * + *

For a DeleteSearchConfigRequest to be valid, Request.search_configuration.name must already + * exist. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (WarehouseClient warehouseClient = WarehouseClient.create()) {
+   *   DeleteSearchConfigRequest request =
+   *       DeleteSearchConfigRequest.newBuilder()
+   *           .setName(
+   *               SearchConfigName.of(
+   *                       "[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[SEARCH_CONFIG]")
+   *                   .toString())
+   *           .build();
+   *   ApiFuture future = warehouseClient.deleteSearchConfigCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final UnaryCallable deleteSearchConfigCallable() { + return stub.deleteSearchConfigCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists all search configurations inside a corpus. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (WarehouseClient warehouseClient = WarehouseClient.create()) {
+   *   CorpusName parent = CorpusName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]");
+   *   for (SearchConfig element : warehouseClient.listSearchConfigs(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The parent, which owns this collection of search configurations. + * Format: `projects/{project_number}/locations/{location}/corpora/{corpus}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListSearchConfigsPagedResponse listSearchConfigs(CorpusName parent) { + ListSearchConfigsRequest request = + ListSearchConfigsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listSearchConfigs(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists all search configurations inside a corpus. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (WarehouseClient warehouseClient = WarehouseClient.create()) {
+   *   String parent = CorpusName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]").toString();
+   *   for (SearchConfig element : warehouseClient.listSearchConfigs(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The parent, which owns this collection of search configurations. + * Format: `projects/{project_number}/locations/{location}/corpora/{corpus}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListSearchConfigsPagedResponse listSearchConfigs(String parent) { + ListSearchConfigsRequest request = + ListSearchConfigsRequest.newBuilder().setParent(parent).build(); + return listSearchConfigs(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists all search configurations inside a corpus. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (WarehouseClient warehouseClient = WarehouseClient.create()) {
+   *   ListSearchConfigsRequest request =
+   *       ListSearchConfigsRequest.newBuilder()
+   *           .setParent(CorpusName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   for (SearchConfig element : warehouseClient.listSearchConfigs(request).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @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 + */ + public final ListSearchConfigsPagedResponse listSearchConfigs(ListSearchConfigsRequest request) { + return listSearchConfigsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists all search configurations inside a corpus. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (WarehouseClient warehouseClient = WarehouseClient.create()) {
+   *   ListSearchConfigsRequest request =
+   *       ListSearchConfigsRequest.newBuilder()
+   *           .setParent(CorpusName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   ApiFuture future =
+   *       warehouseClient.listSearchConfigsPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (SearchConfig element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listSearchConfigsPagedCallable() { + return stub.listSearchConfigsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists all search configurations inside a corpus. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (WarehouseClient warehouseClient = WarehouseClient.create()) {
+   *   ListSearchConfigsRequest request =
+   *       ListSearchConfigsRequest.newBuilder()
+   *           .setParent(CorpusName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   while (true) {
+   *     ListSearchConfigsResponse response =
+   *         warehouseClient.listSearchConfigsCallable().call(request);
+   *     for (SearchConfig element : response.getSearchConfigsList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listSearchConfigsCallable() { + return stub.listSearchConfigsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a SearchHypernym inside a corpus. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (WarehouseClient warehouseClient = WarehouseClient.create()) {
+   *   CorpusName parent = CorpusName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]");
+   *   SearchHypernym searchHypernym = SearchHypernym.newBuilder().build();
+   *   String searchHypernymId = "searchHypernymId-314707559";
+   *   SearchHypernym response =
+   *       warehouseClient.createSearchHypernym(parent, searchHypernym, searchHypernymId);
+   * }
+   * }
+ * + * @param parent Required. The parent resource where this SearchHypernym will be created. Format: + * `projects/{project_number}/locations/{location}/corpora/{corpus}` + * @param searchHypernym Required. The SearchHypernym to create. + * @param searchHypernymId Optional. The search hypernym id. If omitted, a random UUID will be + * generated. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final SearchHypernym createSearchHypernym( + CorpusName parent, SearchHypernym searchHypernym, String searchHypernymId) { + CreateSearchHypernymRequest request = + CreateSearchHypernymRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setSearchHypernym(searchHypernym) + .setSearchHypernymId(searchHypernymId) + .build(); + return createSearchHypernym(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a SearchHypernym inside a corpus. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (WarehouseClient warehouseClient = WarehouseClient.create()) {
+   *   String parent = CorpusName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]").toString();
+   *   SearchHypernym searchHypernym = SearchHypernym.newBuilder().build();
+   *   String searchHypernymId = "searchHypernymId-314707559";
+   *   SearchHypernym response =
+   *       warehouseClient.createSearchHypernym(parent, searchHypernym, searchHypernymId);
+   * }
+   * }
+ * + * @param parent Required. The parent resource where this SearchHypernym will be created. Format: + * `projects/{project_number}/locations/{location}/corpora/{corpus}` + * @param searchHypernym Required. The SearchHypernym to create. + * @param searchHypernymId Optional. The search hypernym id. If omitted, a random UUID will be + * generated. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final SearchHypernym createSearchHypernym( + String parent, SearchHypernym searchHypernym, String searchHypernymId) { + CreateSearchHypernymRequest request = + CreateSearchHypernymRequest.newBuilder() + .setParent(parent) + .setSearchHypernym(searchHypernym) + .setSearchHypernymId(searchHypernymId) + .build(); + return createSearchHypernym(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a SearchHypernym inside a corpus. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (WarehouseClient warehouseClient = WarehouseClient.create()) {
+   *   CreateSearchHypernymRequest request =
+   *       CreateSearchHypernymRequest.newBuilder()
+   *           .setParent(CorpusName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]").toString())
+   *           .setSearchHypernym(SearchHypernym.newBuilder().build())
+   *           .setSearchHypernymId("searchHypernymId-314707559")
+   *           .build();
+   *   SearchHypernym response = warehouseClient.createSearchHypernym(request);
+   * }
+   * }
+ * + * @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 + */ + public final SearchHypernym createSearchHypernym(CreateSearchHypernymRequest request) { + return createSearchHypernymCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a SearchHypernym inside a corpus. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (WarehouseClient warehouseClient = WarehouseClient.create()) {
+   *   CreateSearchHypernymRequest request =
+   *       CreateSearchHypernymRequest.newBuilder()
+   *           .setParent(CorpusName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]").toString())
+   *           .setSearchHypernym(SearchHypernym.newBuilder().build())
+   *           .setSearchHypernymId("searchHypernymId-314707559")
+   *           .build();
+   *   ApiFuture future =
+   *       warehouseClient.createSearchHypernymCallable().futureCall(request);
+   *   // Do something.
+   *   SearchHypernym response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + createSearchHypernymCallable() { + return stub.createSearchHypernymCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates a SearchHypernym inside a corpus. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (WarehouseClient warehouseClient = WarehouseClient.create()) {
+   *   SearchHypernym searchHypernym = SearchHypernym.newBuilder().build();
+   *   FieldMask updateMask = FieldMask.newBuilder().build();
+   *   SearchHypernym response = warehouseClient.updateSearchHypernym(searchHypernym, updateMask);
+   * }
+   * }
+ * + * @param searchHypernym Required. The SearchHypernym to update. The search hypernym's `name` + * field is used to identify the search hypernym to be updated. Format: + * `projects/{project_number}/locations/{location}/corpora/{corpus}/searchHypernyms/{search_hypernym}` + * @param updateMask The list of fields to be updated. If left unset, all field paths will be + * updated/overwritten. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final SearchHypernym updateSearchHypernym( + SearchHypernym searchHypernym, FieldMask updateMask) { + UpdateSearchHypernymRequest request = + UpdateSearchHypernymRequest.newBuilder() + .setSearchHypernym(searchHypernym) + .setUpdateMask(updateMask) + .build(); + return updateSearchHypernym(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates a SearchHypernym inside a corpus. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (WarehouseClient warehouseClient = WarehouseClient.create()) {
+   *   UpdateSearchHypernymRequest request =
+   *       UpdateSearchHypernymRequest.newBuilder()
+   *           .setSearchHypernym(SearchHypernym.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   SearchHypernym response = warehouseClient.updateSearchHypernym(request);
+   * }
+   * }
+ * + * @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 + */ + public final SearchHypernym updateSearchHypernym(UpdateSearchHypernymRequest request) { + return updateSearchHypernymCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates a SearchHypernym inside a corpus. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (WarehouseClient warehouseClient = WarehouseClient.create()) {
+   *   UpdateSearchHypernymRequest request =
+   *       UpdateSearchHypernymRequest.newBuilder()
+   *           .setSearchHypernym(SearchHypernym.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       warehouseClient.updateSearchHypernymCallable().futureCall(request);
+   *   // Do something.
+   *   SearchHypernym response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + updateSearchHypernymCallable() { + return stub.updateSearchHypernymCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a SearchHypernym inside a corpus. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (WarehouseClient warehouseClient = WarehouseClient.create()) {
+   *   SearchHypernymName name =
+   *       SearchHypernymName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[SEARCH_HYPERNYM]");
+   *   SearchHypernym response = warehouseClient.getSearchHypernym(name);
+   * }
+   * }
+ * + * @param name Required. The name of the SearchHypernym to retrieve. Format: + * `projects/{project_number}/locations/{location}/corpora/{corpus}/searchHypernyms/{search_hypernym}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final SearchHypernym getSearchHypernym(SearchHypernymName name) { + GetSearchHypernymRequest request = + GetSearchHypernymRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + return getSearchHypernym(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a SearchHypernym inside a corpus. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (WarehouseClient warehouseClient = WarehouseClient.create()) {
+   *   String name =
+   *       SearchHypernymName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[SEARCH_HYPERNYM]")
+   *           .toString();
+   *   SearchHypernym response = warehouseClient.getSearchHypernym(name);
+   * }
+   * }
+ * + * @param name Required. The name of the SearchHypernym to retrieve. Format: + * `projects/{project_number}/locations/{location}/corpora/{corpus}/searchHypernyms/{search_hypernym}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final SearchHypernym getSearchHypernym(String name) { + GetSearchHypernymRequest request = GetSearchHypernymRequest.newBuilder().setName(name).build(); + return getSearchHypernym(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a SearchHypernym inside a corpus. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (WarehouseClient warehouseClient = WarehouseClient.create()) {
+   *   GetSearchHypernymRequest request =
+   *       GetSearchHypernymRequest.newBuilder()
+   *           .setName(
+   *               SearchHypernymName.of(
+   *                       "[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[SEARCH_HYPERNYM]")
+   *                   .toString())
+   *           .build();
+   *   SearchHypernym response = warehouseClient.getSearchHypernym(request);
+   * }
+   * }
+ * + * @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 + */ + public final SearchHypernym getSearchHypernym(GetSearchHypernymRequest request) { + return getSearchHypernymCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a SearchHypernym inside a corpus. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (WarehouseClient warehouseClient = WarehouseClient.create()) {
+   *   GetSearchHypernymRequest request =
+   *       GetSearchHypernymRequest.newBuilder()
+   *           .setName(
+   *               SearchHypernymName.of(
+   *                       "[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[SEARCH_HYPERNYM]")
+   *                   .toString())
+   *           .build();
+   *   ApiFuture future =
+   *       warehouseClient.getSearchHypernymCallable().futureCall(request);
+   *   // Do something.
+   *   SearchHypernym response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getSearchHypernymCallable() { + return stub.getSearchHypernymCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a SearchHypernym inside a corpus. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (WarehouseClient warehouseClient = WarehouseClient.create()) {
+   *   SearchHypernymName name =
+   *       SearchHypernymName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[SEARCH_HYPERNYM]");
+   *   warehouseClient.deleteSearchHypernym(name);
+   * }
+   * }
+ * + * @param name Required. The name of the SearchHypernym to delete. Format: + * `projects/{project_number}/locations/{location}/corpora/{corpus}/searchHypernyms/{search_hypernym}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteSearchHypernym(SearchHypernymName name) { + DeleteSearchHypernymRequest request = + DeleteSearchHypernymRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + deleteSearchHypernym(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a SearchHypernym inside a corpus. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (WarehouseClient warehouseClient = WarehouseClient.create()) {
+   *   String name =
+   *       SearchHypernymName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[SEARCH_HYPERNYM]")
+   *           .toString();
+   *   warehouseClient.deleteSearchHypernym(name);
+   * }
+   * }
+ * + * @param name Required. The name of the SearchHypernym to delete. Format: + * `projects/{project_number}/locations/{location}/corpora/{corpus}/searchHypernyms/{search_hypernym}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteSearchHypernym(String name) { + DeleteSearchHypernymRequest request = + DeleteSearchHypernymRequest.newBuilder().setName(name).build(); + deleteSearchHypernym(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a SearchHypernym inside a corpus. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (WarehouseClient warehouseClient = WarehouseClient.create()) {
+   *   DeleteSearchHypernymRequest request =
+   *       DeleteSearchHypernymRequest.newBuilder()
+   *           .setName(
+   *               SearchHypernymName.of(
+   *                       "[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[SEARCH_HYPERNYM]")
+   *                   .toString())
+   *           .build();
+   *   warehouseClient.deleteSearchHypernym(request);
+   * }
+   * }
+ * + * @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 + */ + public final void deleteSearchHypernym(DeleteSearchHypernymRequest request) { + deleteSearchHypernymCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a SearchHypernym inside a corpus. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (WarehouseClient warehouseClient = WarehouseClient.create()) {
+   *   DeleteSearchHypernymRequest request =
+   *       DeleteSearchHypernymRequest.newBuilder()
+   *           .setName(
+   *               SearchHypernymName.of(
+   *                       "[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[SEARCH_HYPERNYM]")
+   *                   .toString())
+   *           .build();
+   *   ApiFuture future = warehouseClient.deleteSearchHypernymCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final UnaryCallable deleteSearchHypernymCallable() { + return stub.deleteSearchHypernymCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists SearchHypernyms inside a corpus. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (WarehouseClient warehouseClient = WarehouseClient.create()) {
+   *   CorpusName parent = CorpusName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]");
+   *   for (SearchHypernym element : warehouseClient.listSearchHypernyms(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The parent, which owns this collection of SearchHypernyms. Format: + * `projects/{project_number}/locations/{location}/corpora/{corpus}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListSearchHypernymsPagedResponse listSearchHypernyms(CorpusName parent) { + ListSearchHypernymsRequest request = + ListSearchHypernymsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listSearchHypernyms(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists SearchHypernyms inside a corpus. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (WarehouseClient warehouseClient = WarehouseClient.create()) {
+   *   String parent = CorpusName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]").toString();
+   *   for (SearchHypernym element : warehouseClient.listSearchHypernyms(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The parent, which owns this collection of SearchHypernyms. Format: + * `projects/{project_number}/locations/{location}/corpora/{corpus}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListSearchHypernymsPagedResponse listSearchHypernyms(String parent) { + ListSearchHypernymsRequest request = + ListSearchHypernymsRequest.newBuilder().setParent(parent).build(); + return listSearchHypernyms(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists SearchHypernyms inside a corpus. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (WarehouseClient warehouseClient = WarehouseClient.create()) {
+   *   ListSearchHypernymsRequest request =
+   *       ListSearchHypernymsRequest.newBuilder()
+   *           .setParent(CorpusName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   for (SearchHypernym element : warehouseClient.listSearchHypernyms(request).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @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 + */ + public final ListSearchHypernymsPagedResponse listSearchHypernyms( + ListSearchHypernymsRequest request) { + return listSearchHypernymsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists SearchHypernyms inside a corpus. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (WarehouseClient warehouseClient = WarehouseClient.create()) {
+   *   ListSearchHypernymsRequest request =
+   *       ListSearchHypernymsRequest.newBuilder()
+   *           .setParent(CorpusName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   ApiFuture future =
+   *       warehouseClient.listSearchHypernymsPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (SearchHypernym element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listSearchHypernymsPagedCallable() { + return stub.listSearchHypernymsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists SearchHypernyms inside a corpus. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (WarehouseClient warehouseClient = WarehouseClient.create()) {
+   *   ListSearchHypernymsRequest request =
+   *       ListSearchHypernymsRequest.newBuilder()
+   *           .setParent(CorpusName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   while (true) {
+   *     ListSearchHypernymsResponse response =
+   *         warehouseClient.listSearchHypernymsCallable().call(request);
+   *     for (SearchHypernym element : response.getSearchHypernymsList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listSearchHypernymsCallable() { + return stub.listSearchHypernymsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Search media asset. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (WarehouseClient warehouseClient = WarehouseClient.create()) {
+   *   SearchAssetsRequest request =
+   *       SearchAssetsRequest.newBuilder()
+   *           .setCorpus(CorpusName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setContentTimeRanges(DateTimeRangeArray.newBuilder().build())
+   *           .addAllCriteria(new ArrayList())
+   *           .addAllFacetSelections(new ArrayList())
+   *           .addAllResultAnnotationKeys(new ArrayList())
+   *           .setSearchQuery("searchQuery-552137728")
+   *           .build();
+   *   for (SearchResultItem element : warehouseClient.searchAssets(request).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @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 + */ + public final SearchAssetsPagedResponse searchAssets(SearchAssetsRequest request) { + return searchAssetsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Search media asset. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (WarehouseClient warehouseClient = WarehouseClient.create()) {
+   *   SearchAssetsRequest request =
+   *       SearchAssetsRequest.newBuilder()
+   *           .setCorpus(CorpusName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setContentTimeRanges(DateTimeRangeArray.newBuilder().build())
+   *           .addAllCriteria(new ArrayList())
+   *           .addAllFacetSelections(new ArrayList())
+   *           .addAllResultAnnotationKeys(new ArrayList())
+   *           .setSearchQuery("searchQuery-552137728")
+   *           .build();
+   *   ApiFuture future =
+   *       warehouseClient.searchAssetsPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (SearchResultItem element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + searchAssetsPagedCallable() { + return stub.searchAssetsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Search media asset. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (WarehouseClient warehouseClient = WarehouseClient.create()) {
+   *   SearchAssetsRequest request =
+   *       SearchAssetsRequest.newBuilder()
+   *           .setCorpus(CorpusName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setContentTimeRanges(DateTimeRangeArray.newBuilder().build())
+   *           .addAllCriteria(new ArrayList())
+   *           .addAllFacetSelections(new ArrayList())
+   *           .addAllResultAnnotationKeys(new ArrayList())
+   *           .setSearchQuery("searchQuery-552137728")
+   *           .build();
+   *   while (true) {
+   *     SearchAssetsResponse response = warehouseClient.searchAssetsCallable().call(request);
+   *     for (SearchResultItem element : response.getSearchResultItemsList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable searchAssetsCallable() { + return stub.searchAssetsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Search a deployed index endpoint (IMAGE corpus type only). + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (WarehouseClient warehouseClient = WarehouseClient.create()) {
+   *   SearchIndexEndpointRequest request =
+   *       SearchIndexEndpointRequest.newBuilder()
+   *           .setIndexEndpoint(
+   *               IndexEndpointName.of("[PROJECT]", "[LOCATION]", "[INDEX_ENDPOINT]").toString())
+   *           .addAllCriteria(new ArrayList())
+   *           .addAllExclusionCriteria(new ArrayList())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   for (SearchResultItem element : warehouseClient.searchIndexEndpoint(request).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @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 + */ + public final SearchIndexEndpointPagedResponse searchIndexEndpoint( + SearchIndexEndpointRequest request) { + return searchIndexEndpointPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Search a deployed index endpoint (IMAGE corpus type only). + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (WarehouseClient warehouseClient = WarehouseClient.create()) {
+   *   SearchIndexEndpointRequest request =
+   *       SearchIndexEndpointRequest.newBuilder()
+   *           .setIndexEndpoint(
+   *               IndexEndpointName.of("[PROJECT]", "[LOCATION]", "[INDEX_ENDPOINT]").toString())
+   *           .addAllCriteria(new ArrayList())
+   *           .addAllExclusionCriteria(new ArrayList())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   ApiFuture future =
+   *       warehouseClient.searchIndexEndpointPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (SearchResultItem element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + searchIndexEndpointPagedCallable() { + return stub.searchIndexEndpointPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Search a deployed index endpoint (IMAGE corpus type only). + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (WarehouseClient warehouseClient = WarehouseClient.create()) {
+   *   SearchIndexEndpointRequest request =
+   *       SearchIndexEndpointRequest.newBuilder()
+   *           .setIndexEndpoint(
+   *               IndexEndpointName.of("[PROJECT]", "[LOCATION]", "[INDEX_ENDPOINT]").toString())
+   *           .addAllCriteria(new ArrayList())
+   *           .addAllExclusionCriteria(new ArrayList())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   while (true) {
+   *     SearchIndexEndpointResponse response =
+   *         warehouseClient.searchIndexEndpointCallable().call(request);
+   *     for (SearchResultItem element : response.getSearchResultItemsList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + searchIndexEndpointCallable() { + return stub.searchIndexEndpointCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates an IndexEndpoint. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (WarehouseClient warehouseClient = WarehouseClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   IndexEndpoint indexEndpoint = IndexEndpoint.newBuilder().build();
+   *   String indexEndpointId = "indexEndpointId-250889214";
+   *   IndexEndpoint response =
+   *       warehouseClient.createIndexEndpointAsync(parent, indexEndpoint, indexEndpointId).get();
+   * }
+   * }
+ * + * @param parent Required. Format: `projects/{project}/locations/{location}` + * @param indexEndpoint Required. The resource being created. + * @param indexEndpointId Optional. The ID to use for the IndexEndpoint, which will become the + * final component of the IndexEndpoint's resource name if the user specifies it. Otherwise, + * IndexEndpoint id will be autogenerated. + *

This value should be up to 63 characters, and valid characters are a-z, 0-9 and dash + * (-). The first character must be a letter, the last must be a letter or a number. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture createIndexEndpointAsync( + LocationName parent, IndexEndpoint indexEndpoint, String indexEndpointId) { + CreateIndexEndpointRequest request = + CreateIndexEndpointRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setIndexEndpoint(indexEndpoint) + .setIndexEndpointId(indexEndpointId) + .build(); + return createIndexEndpointAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates an IndexEndpoint. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (WarehouseClient warehouseClient = WarehouseClient.create()) {
+   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+   *   IndexEndpoint indexEndpoint = IndexEndpoint.newBuilder().build();
+   *   String indexEndpointId = "indexEndpointId-250889214";
+   *   IndexEndpoint response =
+   *       warehouseClient.createIndexEndpointAsync(parent, indexEndpoint, indexEndpointId).get();
+   * }
+   * }
+ * + * @param parent Required. Format: `projects/{project}/locations/{location}` + * @param indexEndpoint Required. The resource being created. + * @param indexEndpointId Optional. The ID to use for the IndexEndpoint, which will become the + * final component of the IndexEndpoint's resource name if the user specifies it. Otherwise, + * IndexEndpoint id will be autogenerated. + *

This value should be up to 63 characters, and valid characters are a-z, 0-9 and dash + * (-). The first character must be a letter, the last must be a letter or a number. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture createIndexEndpointAsync( + String parent, IndexEndpoint indexEndpoint, String indexEndpointId) { + CreateIndexEndpointRequest request = + CreateIndexEndpointRequest.newBuilder() + .setParent(parent) + .setIndexEndpoint(indexEndpoint) + .setIndexEndpointId(indexEndpointId) + .build(); + return createIndexEndpointAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates an IndexEndpoint. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (WarehouseClient warehouseClient = WarehouseClient.create()) {
+   *   CreateIndexEndpointRequest request =
+   *       CreateIndexEndpointRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setIndexEndpointId("indexEndpointId-250889214")
+   *           .setIndexEndpoint(IndexEndpoint.newBuilder().build())
+   *           .build();
+   *   IndexEndpoint response = warehouseClient.createIndexEndpointAsync(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 + */ + public final OperationFuture createIndexEndpointAsync( + CreateIndexEndpointRequest request) { + return createIndexEndpointOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates an IndexEndpoint. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (WarehouseClient warehouseClient = WarehouseClient.create()) {
+   *   CreateIndexEndpointRequest request =
+   *       CreateIndexEndpointRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setIndexEndpointId("indexEndpointId-250889214")
+   *           .setIndexEndpoint(IndexEndpoint.newBuilder().build())
+   *           .build();
+   *   OperationFuture future =
+   *       warehouseClient.createIndexEndpointOperationCallable().futureCall(request);
+   *   // Do something.
+   *   IndexEndpoint response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable< + CreateIndexEndpointRequest, IndexEndpoint, CreateIndexEndpointMetadata> + createIndexEndpointOperationCallable() { + return stub.createIndexEndpointOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates an IndexEndpoint. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (WarehouseClient warehouseClient = WarehouseClient.create()) {
+   *   CreateIndexEndpointRequest request =
+   *       CreateIndexEndpointRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setIndexEndpointId("indexEndpointId-250889214")
+   *           .setIndexEndpoint(IndexEndpoint.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       warehouseClient.createIndexEndpointCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable createIndexEndpointCallable() { + return stub.createIndexEndpointCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets an IndexEndpoint. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (WarehouseClient warehouseClient = WarehouseClient.create()) {
+   *   IndexEndpointName name = IndexEndpointName.of("[PROJECT]", "[LOCATION]", "[INDEX_ENDPOINT]");
+   *   IndexEndpoint response = warehouseClient.getIndexEndpoint(name);
+   * }
+   * }
+ * + * @param name Required. Name of the IndexEndpoint resource. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final IndexEndpoint getIndexEndpoint(IndexEndpointName name) { + GetIndexEndpointRequest request = + GetIndexEndpointRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return getIndexEndpoint(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets an IndexEndpoint. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (WarehouseClient warehouseClient = WarehouseClient.create()) {
+   *   String name = IndexEndpointName.of("[PROJECT]", "[LOCATION]", "[INDEX_ENDPOINT]").toString();
+   *   IndexEndpoint response = warehouseClient.getIndexEndpoint(name);
+   * }
+   * }
+ * + * @param name Required. Name of the IndexEndpoint resource. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final IndexEndpoint getIndexEndpoint(String name) { + GetIndexEndpointRequest request = GetIndexEndpointRequest.newBuilder().setName(name).build(); + return getIndexEndpoint(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets an IndexEndpoint. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (WarehouseClient warehouseClient = WarehouseClient.create()) {
+   *   GetIndexEndpointRequest request =
+   *       GetIndexEndpointRequest.newBuilder()
+   *           .setName(
+   *               IndexEndpointName.of("[PROJECT]", "[LOCATION]", "[INDEX_ENDPOINT]").toString())
+   *           .build();
+   *   IndexEndpoint response = warehouseClient.getIndexEndpoint(request);
+   * }
+   * }
+ * + * @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 + */ + public final IndexEndpoint getIndexEndpoint(GetIndexEndpointRequest request) { + return getIndexEndpointCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets an IndexEndpoint. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (WarehouseClient warehouseClient = WarehouseClient.create()) {
+   *   GetIndexEndpointRequest request =
+   *       GetIndexEndpointRequest.newBuilder()
+   *           .setName(
+   *               IndexEndpointName.of("[PROJECT]", "[LOCATION]", "[INDEX_ENDPOINT]").toString())
+   *           .build();
+   *   ApiFuture future =
+   *       warehouseClient.getIndexEndpointCallable().futureCall(request);
+   *   // Do something.
+   *   IndexEndpoint response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getIndexEndpointCallable() { + return stub.getIndexEndpointCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists all IndexEndpoints in a project. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (WarehouseClient warehouseClient = WarehouseClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   for (IndexEndpoint element : warehouseClient.listIndexEndpoints(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. Format: `projects/{project}/locations/{location}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListIndexEndpointsPagedResponse listIndexEndpoints(LocationName parent) { + ListIndexEndpointsRequest request = + ListIndexEndpointsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listIndexEndpoints(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists all IndexEndpoints in a project. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (WarehouseClient warehouseClient = WarehouseClient.create()) {
+   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+   *   for (IndexEndpoint element : warehouseClient.listIndexEndpoints(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. Format: `projects/{project}/locations/{location}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListIndexEndpointsPagedResponse listIndexEndpoints(String parent) { + ListIndexEndpointsRequest request = + ListIndexEndpointsRequest.newBuilder().setParent(parent).build(); + return listIndexEndpoints(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists all IndexEndpoints in a project. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (WarehouseClient warehouseClient = WarehouseClient.create()) {
+   *   ListIndexEndpointsRequest request =
+   *       ListIndexEndpointsRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .build();
+   *   for (IndexEndpoint element : warehouseClient.listIndexEndpoints(request).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @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 + */ + public final ListIndexEndpointsPagedResponse listIndexEndpoints( + ListIndexEndpointsRequest request) { + return listIndexEndpointsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists all IndexEndpoints in a project. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (WarehouseClient warehouseClient = WarehouseClient.create()) {
+   *   ListIndexEndpointsRequest request =
+   *       ListIndexEndpointsRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .build();
+   *   ApiFuture future =
+   *       warehouseClient.listIndexEndpointsPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (IndexEndpoint element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listIndexEndpointsPagedCallable() { + return stub.listIndexEndpointsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists all IndexEndpoints in a project. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (WarehouseClient warehouseClient = WarehouseClient.create()) {
+   *   ListIndexEndpointsRequest request =
+   *       ListIndexEndpointsRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .build();
+   *   while (true) {
+   *     ListIndexEndpointsResponse response =
+   *         warehouseClient.listIndexEndpointsCallable().call(request);
+   *     for (IndexEndpoint element : response.getIndexEndpointsList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listIndexEndpointsCallable() { + return stub.listIndexEndpointsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates an IndexEndpoint. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (WarehouseClient warehouseClient = WarehouseClient.create()) {
+   *   IndexEndpoint indexEndpoint = IndexEndpoint.newBuilder().build();
+   *   FieldMask updateMask = FieldMask.newBuilder().build();
+   *   IndexEndpoint response =
+   *       warehouseClient.updateIndexEndpointAsync(indexEndpoint, updateMask).get();
+   * }
+   * }
+ * + * @param indexEndpoint Required. The resource being updated. + * @param updateMask Required. Field mask is used to specify the fields to be overwritten in the + * IndexEndpoint resource by the update. The fields specified in the update_mask are relative + * to the resource, not the full request. A field of the resource will be overwritten if it is + * in the mask. Empty field mask is not allowed. If the mask is "*", then this is a full + * replacement of the resource. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture updateIndexEndpointAsync( + IndexEndpoint indexEndpoint, FieldMask updateMask) { + UpdateIndexEndpointRequest request = + UpdateIndexEndpointRequest.newBuilder() + .setIndexEndpoint(indexEndpoint) + .setUpdateMask(updateMask) + .build(); + return updateIndexEndpointAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates an IndexEndpoint. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (WarehouseClient warehouseClient = WarehouseClient.create()) {
+   *   UpdateIndexEndpointRequest request =
+   *       UpdateIndexEndpointRequest.newBuilder()
+   *           .setIndexEndpoint(IndexEndpoint.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   IndexEndpoint response = warehouseClient.updateIndexEndpointAsync(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 + */ + public final OperationFuture updateIndexEndpointAsync( + UpdateIndexEndpointRequest request) { + return updateIndexEndpointOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates an IndexEndpoint. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (WarehouseClient warehouseClient = WarehouseClient.create()) {
+   *   UpdateIndexEndpointRequest request =
+   *       UpdateIndexEndpointRequest.newBuilder()
+   *           .setIndexEndpoint(IndexEndpoint.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   OperationFuture future =
+   *       warehouseClient.updateIndexEndpointOperationCallable().futureCall(request);
+   *   // Do something.
+   *   IndexEndpoint response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable< + UpdateIndexEndpointRequest, IndexEndpoint, UpdateIndexEndpointMetadata> + updateIndexEndpointOperationCallable() { + return stub.updateIndexEndpointOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates an IndexEndpoint. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (WarehouseClient warehouseClient = WarehouseClient.create()) {
+   *   UpdateIndexEndpointRequest request =
+   *       UpdateIndexEndpointRequest.newBuilder()
+   *           .setIndexEndpoint(IndexEndpoint.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       warehouseClient.updateIndexEndpointCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable updateIndexEndpointCallable() { + return stub.updateIndexEndpointCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes an IndexEndpoint. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (WarehouseClient warehouseClient = WarehouseClient.create()) {
+   *   IndexEndpointName name = IndexEndpointName.of("[PROJECT]", "[LOCATION]", "[INDEX_ENDPOINT]");
+   *   warehouseClient.deleteIndexEndpointAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. Name of the resource. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteIndexEndpointAsync( + IndexEndpointName name) { + DeleteIndexEndpointRequest request = + DeleteIndexEndpointRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + return deleteIndexEndpointAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes an IndexEndpoint. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (WarehouseClient warehouseClient = WarehouseClient.create()) {
+   *   String name = IndexEndpointName.of("[PROJECT]", "[LOCATION]", "[INDEX_ENDPOINT]").toString();
+   *   warehouseClient.deleteIndexEndpointAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. Name of the resource. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteIndexEndpointAsync( + String name) { + DeleteIndexEndpointRequest request = + DeleteIndexEndpointRequest.newBuilder().setName(name).build(); + return deleteIndexEndpointAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes an IndexEndpoint. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (WarehouseClient warehouseClient = WarehouseClient.create()) {
+   *   DeleteIndexEndpointRequest request =
+   *       DeleteIndexEndpointRequest.newBuilder()
+   *           .setName(
+   *               IndexEndpointName.of("[PROJECT]", "[LOCATION]", "[INDEX_ENDPOINT]").toString())
+   *           .build();
+   *   warehouseClient.deleteIndexEndpointAsync(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 + */ + public final OperationFuture deleteIndexEndpointAsync( + DeleteIndexEndpointRequest request) { + return deleteIndexEndpointOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes an IndexEndpoint. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (WarehouseClient warehouseClient = WarehouseClient.create()) {
+   *   DeleteIndexEndpointRequest request =
+   *       DeleteIndexEndpointRequest.newBuilder()
+   *           .setName(
+   *               IndexEndpointName.of("[PROJECT]", "[LOCATION]", "[INDEX_ENDPOINT]").toString())
+   *           .build();
+   *   OperationFuture future =
+   *       warehouseClient.deleteIndexEndpointOperationCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final OperationCallable + deleteIndexEndpointOperationCallable() { + return stub.deleteIndexEndpointOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes an IndexEndpoint. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (WarehouseClient warehouseClient = WarehouseClient.create()) {
+   *   DeleteIndexEndpointRequest request =
+   *       DeleteIndexEndpointRequest.newBuilder()
+   *           .setName(
+   *               IndexEndpointName.of("[PROJECT]", "[LOCATION]", "[INDEX_ENDPOINT]").toString())
+   *           .build();
+   *   ApiFuture future =
+   *       warehouseClient.deleteIndexEndpointCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final UnaryCallable deleteIndexEndpointCallable() { + return stub.deleteIndexEndpointCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deploys an Index to IndexEndpoint. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (WarehouseClient warehouseClient = WarehouseClient.create()) {
+   *   DeployIndexRequest request =
+   *       DeployIndexRequest.newBuilder()
+   *           .setIndexEndpoint(
+   *               IndexEndpointName.of("[PROJECT]", "[LOCATION]", "[INDEX_ENDPOINT]").toString())
+   *           .setDeployedIndex(DeployedIndex.newBuilder().build())
+   *           .build();
+   *   DeployIndexResponse response = warehouseClient.deployIndexAsync(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 + */ + public final OperationFuture deployIndexAsync( + DeployIndexRequest request) { + return deployIndexOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deploys an Index to IndexEndpoint. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (WarehouseClient warehouseClient = WarehouseClient.create()) {
+   *   DeployIndexRequest request =
+   *       DeployIndexRequest.newBuilder()
+   *           .setIndexEndpoint(
+   *               IndexEndpointName.of("[PROJECT]", "[LOCATION]", "[INDEX_ENDPOINT]").toString())
+   *           .setDeployedIndex(DeployedIndex.newBuilder().build())
+   *           .build();
+   *   OperationFuture future =
+   *       warehouseClient.deployIndexOperationCallable().futureCall(request);
+   *   // Do something.
+   *   DeployIndexResponse response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + deployIndexOperationCallable() { + return stub.deployIndexOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deploys an Index to IndexEndpoint. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (WarehouseClient warehouseClient = WarehouseClient.create()) {
+   *   DeployIndexRequest request =
+   *       DeployIndexRequest.newBuilder()
+   *           .setIndexEndpoint(
+   *               IndexEndpointName.of("[PROJECT]", "[LOCATION]", "[INDEX_ENDPOINT]").toString())
+   *           .setDeployedIndex(DeployedIndex.newBuilder().build())
+   *           .build();
+   *   ApiFuture future = warehouseClient.deployIndexCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable deployIndexCallable() { + return stub.deployIndexCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Undeploys an Index from IndexEndpoint. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (WarehouseClient warehouseClient = WarehouseClient.create()) {
+   *   UndeployIndexRequest request =
+   *       UndeployIndexRequest.newBuilder()
+   *           .setIndexEndpoint(
+   *               IndexEndpointName.of("[PROJECT]", "[LOCATION]", "[INDEX_ENDPOINT]").toString())
+   *           .build();
+   *   UndeployIndexResponse response = warehouseClient.undeployIndexAsync(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 + */ + public final OperationFuture undeployIndexAsync( + UndeployIndexRequest request) { + return undeployIndexOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Undeploys an Index from IndexEndpoint. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (WarehouseClient warehouseClient = WarehouseClient.create()) {
+   *   UndeployIndexRequest request =
+   *       UndeployIndexRequest.newBuilder()
+   *           .setIndexEndpoint(
+   *               IndexEndpointName.of("[PROJECT]", "[LOCATION]", "[INDEX_ENDPOINT]").toString())
+   *           .build();
+   *   OperationFuture future =
+   *       warehouseClient.undeployIndexOperationCallable().futureCall(request);
+   *   // Do something.
+   *   UndeployIndexResponse response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + undeployIndexOperationCallable() { + return stub.undeployIndexOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Undeploys an Index from IndexEndpoint. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (WarehouseClient warehouseClient = WarehouseClient.create()) {
+   *   UndeployIndexRequest request =
+   *       UndeployIndexRequest.newBuilder()
+   *           .setIndexEndpoint(
+   *               IndexEndpointName.of("[PROJECT]", "[LOCATION]", "[INDEX_ENDPOINT]").toString())
+   *           .build();
+   *   ApiFuture future = warehouseClient.undeployIndexCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable undeployIndexCallable() { + return stub.undeployIndexCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a collection. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (WarehouseClient warehouseClient = WarehouseClient.create()) {
+   *   CorpusName parent = CorpusName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]");
+   *   Collection collection = Collection.newBuilder().build();
+   *   String collectionId = "collectionId1636075609";
+   *   Collection response =
+   *       warehouseClient.createCollectionAsync(parent, collection, collectionId).get();
+   * }
+   * }
+ * + * @param parent Required. The parent resource where this collection will be created. Format: + * `projects/{project_number}/locations/{location}/corpora/{corpus}` + * @param collection Required. The collection resource to be created. + * @param collectionId Optional. The ID to use for the collection, which will become the final + * component of the resource name if user choose to specify. Otherwise, collection id will be + * generated by system. + *

This value should be up to 55 characters, and valid characters are /[a-z][0-9]-/. The + * first character must be a letter, the last could be a letter or a number. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture createCollectionAsync( + CorpusName parent, Collection collection, String collectionId) { + CreateCollectionRequest request = + CreateCollectionRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setCollection(collection) + .setCollectionId(collectionId) + .build(); + return createCollectionAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a collection. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (WarehouseClient warehouseClient = WarehouseClient.create()) {
+   *   String parent = CorpusName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]").toString();
+   *   Collection collection = Collection.newBuilder().build();
+   *   String collectionId = "collectionId1636075609";
+   *   Collection response =
+   *       warehouseClient.createCollectionAsync(parent, collection, collectionId).get();
+   * }
+   * }
+ * + * @param parent Required. The parent resource where this collection will be created. Format: + * `projects/{project_number}/locations/{location}/corpora/{corpus}` + * @param collection Required. The collection resource to be created. + * @param collectionId Optional. The ID to use for the collection, which will become the final + * component of the resource name if user choose to specify. Otherwise, collection id will be + * generated by system. + *

This value should be up to 55 characters, and valid characters are /[a-z][0-9]-/. The + * first character must be a letter, the last could be a letter or a number. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture createCollectionAsync( + String parent, Collection collection, String collectionId) { + CreateCollectionRequest request = + CreateCollectionRequest.newBuilder() + .setParent(parent) + .setCollection(collection) + .setCollectionId(collectionId) + .build(); + return createCollectionAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a collection. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (WarehouseClient warehouseClient = WarehouseClient.create()) {
+   *   CreateCollectionRequest request =
+   *       CreateCollectionRequest.newBuilder()
+   *           .setParent(CorpusName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]").toString())
+   *           .setCollection(Collection.newBuilder().build())
+   *           .setCollectionId("collectionId1636075609")
+   *           .build();
+   *   Collection response = warehouseClient.createCollectionAsync(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 + */ + public final OperationFuture createCollectionAsync( + CreateCollectionRequest request) { + return createCollectionOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a collection. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (WarehouseClient warehouseClient = WarehouseClient.create()) {
+   *   CreateCollectionRequest request =
+   *       CreateCollectionRequest.newBuilder()
+   *           .setParent(CorpusName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]").toString())
+   *           .setCollection(Collection.newBuilder().build())
+   *           .setCollectionId("collectionId1636075609")
+   *           .build();
+   *   OperationFuture future =
+   *       warehouseClient.createCollectionOperationCallable().futureCall(request);
+   *   // Do something.
+   *   Collection response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + createCollectionOperationCallable() { + return stub.createCollectionOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a collection. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (WarehouseClient warehouseClient = WarehouseClient.create()) {
+   *   CreateCollectionRequest request =
+   *       CreateCollectionRequest.newBuilder()
+   *           .setParent(CorpusName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]").toString())
+   *           .setCollection(Collection.newBuilder().build())
+   *           .setCollectionId("collectionId1636075609")
+   *           .build();
+   *   ApiFuture future = warehouseClient.createCollectionCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable createCollectionCallable() { + return stub.createCollectionCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a collection. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (WarehouseClient warehouseClient = WarehouseClient.create()) {
+   *   CollectionName name =
+   *       CollectionName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[COLLECTION]");
+   *   warehouseClient.deleteCollectionAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. The name of the collection to delete. Format: + * `projects/{project_number}/locations/{location}/corpora/{corpus}/collections/{collection}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteCollectionAsync( + CollectionName name) { + DeleteCollectionRequest request = + DeleteCollectionRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return deleteCollectionAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a collection. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (WarehouseClient warehouseClient = WarehouseClient.create()) {
+   *   String name =
+   *       CollectionName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[COLLECTION]")
+   *           .toString();
+   *   warehouseClient.deleteCollectionAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. The name of the collection to delete. Format: + * `projects/{project_number}/locations/{location}/corpora/{corpus}/collections/{collection}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteCollectionAsync(String name) { + DeleteCollectionRequest request = DeleteCollectionRequest.newBuilder().setName(name).build(); + return deleteCollectionAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a collection. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (WarehouseClient warehouseClient = WarehouseClient.create()) {
+   *   DeleteCollectionRequest request =
+   *       DeleteCollectionRequest.newBuilder()
+   *           .setName(
+   *               CollectionName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[COLLECTION]")
+   *                   .toString())
+   *           .build();
+   *   warehouseClient.deleteCollectionAsync(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 + */ + public final OperationFuture deleteCollectionAsync( + DeleteCollectionRequest request) { + return deleteCollectionOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a collection. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (WarehouseClient warehouseClient = WarehouseClient.create()) {
+   *   DeleteCollectionRequest request =
+   *       DeleteCollectionRequest.newBuilder()
+   *           .setName(
+   *               CollectionName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[COLLECTION]")
+   *                   .toString())
+   *           .build();
+   *   OperationFuture future =
+   *       warehouseClient.deleteCollectionOperationCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final OperationCallable + deleteCollectionOperationCallable() { + return stub.deleteCollectionOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a collection. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (WarehouseClient warehouseClient = WarehouseClient.create()) {
+   *   DeleteCollectionRequest request =
+   *       DeleteCollectionRequest.newBuilder()
+   *           .setName(
+   *               CollectionName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[COLLECTION]")
+   *                   .toString())
+   *           .build();
+   *   ApiFuture future = warehouseClient.deleteCollectionCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final UnaryCallable deleteCollectionCallable() { + return stub.deleteCollectionCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a collection. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (WarehouseClient warehouseClient = WarehouseClient.create()) {
+   *   CollectionName name =
+   *       CollectionName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[COLLECTION]");
+   *   Collection response = warehouseClient.getCollection(name);
+   * }
+   * }
+ * + * @param name Required. The name of the collection to retrieve. Format: + * `projects/{project_number}/locations/{location}/corpora/{corpus}/collections/{collection}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Collection getCollection(CollectionName name) { + GetCollectionRequest request = + GetCollectionRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return getCollection(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a collection. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (WarehouseClient warehouseClient = WarehouseClient.create()) {
+   *   String name =
+   *       CollectionName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[COLLECTION]")
+   *           .toString();
+   *   Collection response = warehouseClient.getCollection(name);
+   * }
+   * }
+ * + * @param name Required. The name of the collection to retrieve. Format: + * `projects/{project_number}/locations/{location}/corpora/{corpus}/collections/{collection}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Collection getCollection(String name) { + GetCollectionRequest request = GetCollectionRequest.newBuilder().setName(name).build(); + return getCollection(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a collection. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (WarehouseClient warehouseClient = WarehouseClient.create()) {
+   *   GetCollectionRequest request =
+   *       GetCollectionRequest.newBuilder()
+   *           .setName(
+   *               CollectionName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[COLLECTION]")
+   *                   .toString())
+   *           .build();
+   *   Collection response = warehouseClient.getCollection(request);
+   * }
+   * }
+ * + * @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 + */ + public final Collection getCollection(GetCollectionRequest request) { + return getCollectionCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a collection. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (WarehouseClient warehouseClient = WarehouseClient.create()) {
+   *   GetCollectionRequest request =
+   *       GetCollectionRequest.newBuilder()
+   *           .setName(
+   *               CollectionName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[COLLECTION]")
+   *                   .toString())
+   *           .build();
+   *   ApiFuture future = warehouseClient.getCollectionCallable().futureCall(request);
+   *   // Do something.
+   *   Collection response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getCollectionCallable() { + return stub.getCollectionCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates a collection. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (WarehouseClient warehouseClient = WarehouseClient.create()) {
+   *   Collection collection = Collection.newBuilder().build();
+   *   FieldMask updateMask = FieldMask.newBuilder().build();
+   *   Collection response = warehouseClient.updateCollection(collection, updateMask);
+   * }
+   * }
+ * + * @param collection Required. The collection to update. + *

The collection's `name` field is used to identify the collection to be updated. Format: + * `projects/{project_number}/locations/{location}/corpora/{corpus}/collections/{collection}` + * @param updateMask The list of fields to be updated. - Unset `update_mask` or set `update_mask` + * to be a single "*" only will update all updatable fields with the value provided in + * `collection`. - To update `display_name` value to empty string, set it in the `collection` + * to empty string, and set `update_mask` with "display_name". Same applies to other updatable + * string fields in the `collection`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Collection updateCollection(Collection collection, FieldMask updateMask) { + UpdateCollectionRequest request = + UpdateCollectionRequest.newBuilder() + .setCollection(collection) + .setUpdateMask(updateMask) + .build(); + return updateCollection(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates a collection. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (WarehouseClient warehouseClient = WarehouseClient.create()) {
+   *   UpdateCollectionRequest request =
+   *       UpdateCollectionRequest.newBuilder()
+   *           .setCollection(Collection.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   Collection response = warehouseClient.updateCollection(request);
+   * }
+   * }
+ * + * @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 + */ + public final Collection updateCollection(UpdateCollectionRequest request) { + return updateCollectionCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates a collection. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (WarehouseClient warehouseClient = WarehouseClient.create()) {
+   *   UpdateCollectionRequest request =
+   *       UpdateCollectionRequest.newBuilder()
+   *           .setCollection(Collection.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   ApiFuture future = warehouseClient.updateCollectionCallable().futureCall(request);
+   *   // Do something.
+   *   Collection response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable updateCollectionCallable() { + return stub.updateCollectionCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists collections inside a corpus. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (WarehouseClient warehouseClient = WarehouseClient.create()) {
+   *   CorpusName parent = CorpusName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]");
+   *   for (Collection element : warehouseClient.listCollections(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The parent corpus. Format: + * `projects/{project_number}/locations/{location}/corpora/{corpus}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListCollectionsPagedResponse listCollections(CorpusName parent) { + ListCollectionsRequest request = + ListCollectionsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listCollections(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists collections inside a corpus. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (WarehouseClient warehouseClient = WarehouseClient.create()) {
+   *   String parent = CorpusName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]").toString();
+   *   for (Collection element : warehouseClient.listCollections(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The parent corpus. Format: + * `projects/{project_number}/locations/{location}/corpora/{corpus}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListCollectionsPagedResponse listCollections(String parent) { + ListCollectionsRequest request = ListCollectionsRequest.newBuilder().setParent(parent).build(); + return listCollections(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists collections inside a corpus. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (WarehouseClient warehouseClient = WarehouseClient.create()) {
+   *   ListCollectionsRequest request =
+   *       ListCollectionsRequest.newBuilder()
+   *           .setParent(CorpusName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   for (Collection element : warehouseClient.listCollections(request).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @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 + */ + public final ListCollectionsPagedResponse listCollections(ListCollectionsRequest request) { + return listCollectionsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists collections inside a corpus. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (WarehouseClient warehouseClient = WarehouseClient.create()) {
+   *   ListCollectionsRequest request =
+   *       ListCollectionsRequest.newBuilder()
+   *           .setParent(CorpusName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   ApiFuture future =
+   *       warehouseClient.listCollectionsPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (Collection element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listCollectionsPagedCallable() { + return stub.listCollectionsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists collections inside a corpus. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (WarehouseClient warehouseClient = WarehouseClient.create()) {
+   *   ListCollectionsRequest request =
+   *       ListCollectionsRequest.newBuilder()
+   *           .setParent(CorpusName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   while (true) {
+   *     ListCollectionsResponse response = warehouseClient.listCollectionsCallable().call(request);
+   *     for (Collection element : response.getCollectionsList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listCollectionsCallable() { + return stub.listCollectionsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Adds an item into a Collection. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (WarehouseClient warehouseClient = WarehouseClient.create()) {
+   *   CollectionItem item = CollectionItem.newBuilder().build();
+   *   AddCollectionItemResponse response = warehouseClient.addCollectionItem(item);
+   * }
+   * }
+ * + * @param item Required. The item to be added. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final AddCollectionItemResponse addCollectionItem(CollectionItem item) { + AddCollectionItemRequest request = AddCollectionItemRequest.newBuilder().setItem(item).build(); + return addCollectionItem(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Adds an item into a Collection. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (WarehouseClient warehouseClient = WarehouseClient.create()) {
+   *   AddCollectionItemRequest request =
+   *       AddCollectionItemRequest.newBuilder()
+   *           .setItem(CollectionItem.newBuilder().build())
+   *           .build();
+   *   AddCollectionItemResponse response = warehouseClient.addCollectionItem(request);
+   * }
+   * }
+ * + * @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 + */ + public final AddCollectionItemResponse addCollectionItem(AddCollectionItemRequest request) { + return addCollectionItemCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Adds an item into a Collection. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (WarehouseClient warehouseClient = WarehouseClient.create()) {
+   *   AddCollectionItemRequest request =
+   *       AddCollectionItemRequest.newBuilder()
+   *           .setItem(CollectionItem.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       warehouseClient.addCollectionItemCallable().futureCall(request);
+   *   // Do something.
+   *   AddCollectionItemResponse response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + addCollectionItemCallable() { + return stub.addCollectionItemCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Removes an item from a collection. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (WarehouseClient warehouseClient = WarehouseClient.create()) {
+   *   CollectionItem item = CollectionItem.newBuilder().build();
+   *   RemoveCollectionItemResponse response = warehouseClient.removeCollectionItem(item);
+   * }
+   * }
+ * + * @param item Required. The item to be removed. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final RemoveCollectionItemResponse removeCollectionItem(CollectionItem item) { + RemoveCollectionItemRequest request = + RemoveCollectionItemRequest.newBuilder().setItem(item).build(); + return removeCollectionItem(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Removes an item from a collection. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (WarehouseClient warehouseClient = WarehouseClient.create()) {
+   *   RemoveCollectionItemRequest request =
+   *       RemoveCollectionItemRequest.newBuilder()
+   *           .setItem(CollectionItem.newBuilder().build())
+   *           .build();
+   *   RemoveCollectionItemResponse response = warehouseClient.removeCollectionItem(request);
+   * }
+   * }
+ * + * @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 + */ + public final RemoveCollectionItemResponse removeCollectionItem( + RemoveCollectionItemRequest request) { + return removeCollectionItemCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Removes an item from a collection. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (WarehouseClient warehouseClient = WarehouseClient.create()) {
+   *   RemoveCollectionItemRequest request =
+   *       RemoveCollectionItemRequest.newBuilder()
+   *           .setItem(CollectionItem.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       warehouseClient.removeCollectionItemCallable().futureCall(request);
+   *   // Do something.
+   *   RemoveCollectionItemResponse response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + removeCollectionItemCallable() { + return stub.removeCollectionItemCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * View items inside a collection. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (WarehouseClient warehouseClient = WarehouseClient.create()) {
+   *   CollectionName collection =
+   *       CollectionName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[COLLECTION]");
+   *   for (CollectionItem element : warehouseClient.viewCollectionItems(collection).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param collection Required. The collection to view. Format: + * `projects/{project_number}/locations/{location}/corpora/{corpus}/collections/{collection}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ViewCollectionItemsPagedResponse viewCollectionItems(CollectionName collection) { + ViewCollectionItemsRequest request = + ViewCollectionItemsRequest.newBuilder() + .setCollection(collection == null ? null : collection.toString()) + .build(); + return viewCollectionItems(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * View items inside a collection. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (WarehouseClient warehouseClient = WarehouseClient.create()) {
+   *   String collection =
+   *       CollectionName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[COLLECTION]")
+   *           .toString();
+   *   for (CollectionItem element : warehouseClient.viewCollectionItems(collection).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param collection Required. The collection to view. Format: + * `projects/{project_number}/locations/{location}/corpora/{corpus}/collections/{collection}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ViewCollectionItemsPagedResponse viewCollectionItems(String collection) { + ViewCollectionItemsRequest request = + ViewCollectionItemsRequest.newBuilder().setCollection(collection).build(); + return viewCollectionItems(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * View items inside a collection. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (WarehouseClient warehouseClient = WarehouseClient.create()) {
+   *   ViewCollectionItemsRequest request =
+   *       ViewCollectionItemsRequest.newBuilder()
+   *           .setCollection(
+   *               CollectionName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[COLLECTION]")
+   *                   .toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   for (CollectionItem element : warehouseClient.viewCollectionItems(request).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @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 + */ + public final ViewCollectionItemsPagedResponse viewCollectionItems( + ViewCollectionItemsRequest request) { + return viewCollectionItemsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * View items inside a collection. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (WarehouseClient warehouseClient = WarehouseClient.create()) {
+   *   ViewCollectionItemsRequest request =
+   *       ViewCollectionItemsRequest.newBuilder()
+   *           .setCollection(
+   *               CollectionName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[COLLECTION]")
+   *                   .toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   ApiFuture future =
+   *       warehouseClient.viewCollectionItemsPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (CollectionItem element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + viewCollectionItemsPagedCallable() { + return stub.viewCollectionItemsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * View items inside a collection. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (WarehouseClient warehouseClient = WarehouseClient.create()) {
+   *   ViewCollectionItemsRequest request =
+   *       ViewCollectionItemsRequest.newBuilder()
+   *           .setCollection(
+   *               CollectionName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[COLLECTION]")
+   *                   .toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   while (true) {
+   *     ViewCollectionItemsResponse response =
+   *         warehouseClient.viewCollectionItemsCallable().call(request);
+   *     for (CollectionItem element : response.getItemsList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + viewCollectionItemsCallable() { + return stub.viewCollectionItemsCallable(); + } + + @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); + } + + public static class ListAssetsPagedResponse + extends AbstractPagedListResponse< + ListAssetsRequest, + ListAssetsResponse, + Asset, + ListAssetsPage, + ListAssetsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListAssetsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, input -> new ListAssetsPagedResponse(input), MoreExecutors.directExecutor()); + } + + private ListAssetsPagedResponse(ListAssetsPage page) { + super(page, ListAssetsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListAssetsPage + extends AbstractPage { + + private ListAssetsPage( + PageContext context, + ListAssetsResponse response) { + super(context, response); + } + + private static ListAssetsPage createEmptyPage() { + return new ListAssetsPage(null, null); + } + + @Override + protected ListAssetsPage createPage( + PageContext context, + ListAssetsResponse response) { + return new ListAssetsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListAssetsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListAssetsRequest, + ListAssetsResponse, + Asset, + ListAssetsPage, + ListAssetsFixedSizeCollection> { + + private ListAssetsFixedSizeCollection(List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListAssetsFixedSizeCollection createEmptyCollection() { + return new ListAssetsFixedSizeCollection(null, 0); + } + + @Override + protected ListAssetsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListAssetsFixedSizeCollection(pages, collectionSize); + } + } + + public static class ViewIndexedAssetsPagedResponse + extends AbstractPagedListResponse< + ViewIndexedAssetsRequest, + ViewIndexedAssetsResponse, + IndexedAsset, + ViewIndexedAssetsPage, + ViewIndexedAssetsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ViewIndexedAssetsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ViewIndexedAssetsPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ViewIndexedAssetsPagedResponse(ViewIndexedAssetsPage page) { + super(page, ViewIndexedAssetsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ViewIndexedAssetsPage + extends AbstractPage< + ViewIndexedAssetsRequest, + ViewIndexedAssetsResponse, + IndexedAsset, + ViewIndexedAssetsPage> { + + private ViewIndexedAssetsPage( + PageContext context, + ViewIndexedAssetsResponse response) { + super(context, response); + } + + private static ViewIndexedAssetsPage createEmptyPage() { + return new ViewIndexedAssetsPage(null, null); + } + + @Override + protected ViewIndexedAssetsPage createPage( + PageContext context, + ViewIndexedAssetsResponse response) { + return new ViewIndexedAssetsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ViewIndexedAssetsFixedSizeCollection + extends AbstractFixedSizeCollection< + ViewIndexedAssetsRequest, + ViewIndexedAssetsResponse, + IndexedAsset, + ViewIndexedAssetsPage, + ViewIndexedAssetsFixedSizeCollection> { + + private ViewIndexedAssetsFixedSizeCollection( + List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ViewIndexedAssetsFixedSizeCollection createEmptyCollection() { + return new ViewIndexedAssetsFixedSizeCollection(null, 0); + } + + @Override + protected ViewIndexedAssetsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ViewIndexedAssetsFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListIndexesPagedResponse + extends AbstractPagedListResponse< + ListIndexesRequest, + ListIndexesResponse, + Index, + ListIndexesPage, + ListIndexesFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListIndexesPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, input -> new ListIndexesPagedResponse(input), MoreExecutors.directExecutor()); + } + + private ListIndexesPagedResponse(ListIndexesPage page) { + super(page, ListIndexesFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListIndexesPage + extends AbstractPage { + + private ListIndexesPage( + PageContext context, + ListIndexesResponse response) { + super(context, response); + } + + private static ListIndexesPage createEmptyPage() { + return new ListIndexesPage(null, null); + } + + @Override + protected ListIndexesPage createPage( + PageContext context, + ListIndexesResponse response) { + return new ListIndexesPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListIndexesFixedSizeCollection + extends AbstractFixedSizeCollection< + ListIndexesRequest, + ListIndexesResponse, + Index, + ListIndexesPage, + ListIndexesFixedSizeCollection> { + + private ListIndexesFixedSizeCollection(List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListIndexesFixedSizeCollection createEmptyCollection() { + return new ListIndexesFixedSizeCollection(null, 0); + } + + @Override + protected ListIndexesFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListIndexesFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListCorporaPagedResponse + extends AbstractPagedListResponse< + ListCorporaRequest, + ListCorporaResponse, + Corpus, + ListCorporaPage, + ListCorporaFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListCorporaPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, input -> new ListCorporaPagedResponse(input), MoreExecutors.directExecutor()); + } + + private ListCorporaPagedResponse(ListCorporaPage page) { + super(page, ListCorporaFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListCorporaPage + extends AbstractPage { + + private ListCorporaPage( + PageContext context, + ListCorporaResponse response) { + super(context, response); + } + + private static ListCorporaPage createEmptyPage() { + return new ListCorporaPage(null, null); + } + + @Override + protected ListCorporaPage createPage( + PageContext context, + ListCorporaResponse response) { + return new ListCorporaPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListCorporaFixedSizeCollection + extends AbstractFixedSizeCollection< + ListCorporaRequest, + ListCorporaResponse, + Corpus, + ListCorporaPage, + ListCorporaFixedSizeCollection> { + + private ListCorporaFixedSizeCollection(List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListCorporaFixedSizeCollection createEmptyCollection() { + return new ListCorporaFixedSizeCollection(null, 0); + } + + @Override + protected ListCorporaFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListCorporaFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListDataSchemasPagedResponse + extends AbstractPagedListResponse< + ListDataSchemasRequest, + ListDataSchemasResponse, + DataSchema, + ListDataSchemasPage, + ListDataSchemasFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListDataSchemasPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListDataSchemasPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListDataSchemasPagedResponse(ListDataSchemasPage page) { + super(page, ListDataSchemasFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListDataSchemasPage + extends AbstractPage< + ListDataSchemasRequest, ListDataSchemasResponse, DataSchema, ListDataSchemasPage> { + + private ListDataSchemasPage( + PageContext context, + ListDataSchemasResponse response) { + super(context, response); + } + + private static ListDataSchemasPage createEmptyPage() { + return new ListDataSchemasPage(null, null); + } + + @Override + protected ListDataSchemasPage createPage( + PageContext context, + ListDataSchemasResponse response) { + return new ListDataSchemasPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListDataSchemasFixedSizeCollection + extends AbstractFixedSizeCollection< + ListDataSchemasRequest, + ListDataSchemasResponse, + DataSchema, + ListDataSchemasPage, + ListDataSchemasFixedSizeCollection> { + + private ListDataSchemasFixedSizeCollection( + List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListDataSchemasFixedSizeCollection createEmptyCollection() { + return new ListDataSchemasFixedSizeCollection(null, 0); + } + + @Override + protected ListDataSchemasFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListDataSchemasFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListAnnotationsPagedResponse + extends AbstractPagedListResponse< + ListAnnotationsRequest, + ListAnnotationsResponse, + Annotation, + ListAnnotationsPage, + ListAnnotationsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListAnnotationsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListAnnotationsPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListAnnotationsPagedResponse(ListAnnotationsPage page) { + super(page, ListAnnotationsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListAnnotationsPage + extends AbstractPage< + ListAnnotationsRequest, ListAnnotationsResponse, Annotation, ListAnnotationsPage> { + + private ListAnnotationsPage( + PageContext context, + ListAnnotationsResponse response) { + super(context, response); + } + + private static ListAnnotationsPage createEmptyPage() { + return new ListAnnotationsPage(null, null); + } + + @Override + protected ListAnnotationsPage createPage( + PageContext context, + ListAnnotationsResponse response) { + return new ListAnnotationsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListAnnotationsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListAnnotationsRequest, + ListAnnotationsResponse, + Annotation, + ListAnnotationsPage, + ListAnnotationsFixedSizeCollection> { + + private ListAnnotationsFixedSizeCollection( + List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListAnnotationsFixedSizeCollection createEmptyCollection() { + return new ListAnnotationsFixedSizeCollection(null, 0); + } + + @Override + protected ListAnnotationsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListAnnotationsFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListSearchConfigsPagedResponse + extends AbstractPagedListResponse< + ListSearchConfigsRequest, + ListSearchConfigsResponse, + SearchConfig, + ListSearchConfigsPage, + ListSearchConfigsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListSearchConfigsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListSearchConfigsPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListSearchConfigsPagedResponse(ListSearchConfigsPage page) { + super(page, ListSearchConfigsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListSearchConfigsPage + extends AbstractPage< + ListSearchConfigsRequest, + ListSearchConfigsResponse, + SearchConfig, + ListSearchConfigsPage> { + + private ListSearchConfigsPage( + PageContext context, + ListSearchConfigsResponse response) { + super(context, response); + } + + private static ListSearchConfigsPage createEmptyPage() { + return new ListSearchConfigsPage(null, null); + } + + @Override + protected ListSearchConfigsPage createPage( + PageContext context, + ListSearchConfigsResponse response) { + return new ListSearchConfigsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListSearchConfigsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListSearchConfigsRequest, + ListSearchConfigsResponse, + SearchConfig, + ListSearchConfigsPage, + ListSearchConfigsFixedSizeCollection> { + + private ListSearchConfigsFixedSizeCollection( + List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListSearchConfigsFixedSizeCollection createEmptyCollection() { + return new ListSearchConfigsFixedSizeCollection(null, 0); + } + + @Override + protected ListSearchConfigsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListSearchConfigsFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListSearchHypernymsPagedResponse + extends AbstractPagedListResponse< + ListSearchHypernymsRequest, + ListSearchHypernymsResponse, + SearchHypernym, + ListSearchHypernymsPage, + ListSearchHypernymsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext + context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListSearchHypernymsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListSearchHypernymsPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListSearchHypernymsPagedResponse(ListSearchHypernymsPage page) { + super(page, ListSearchHypernymsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListSearchHypernymsPage + extends AbstractPage< + ListSearchHypernymsRequest, + ListSearchHypernymsResponse, + SearchHypernym, + ListSearchHypernymsPage> { + + private ListSearchHypernymsPage( + PageContext + context, + ListSearchHypernymsResponse response) { + super(context, response); + } + + private static ListSearchHypernymsPage createEmptyPage() { + return new ListSearchHypernymsPage(null, null); + } + + @Override + protected ListSearchHypernymsPage createPage( + PageContext + context, + ListSearchHypernymsResponse response) { + return new ListSearchHypernymsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext + context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListSearchHypernymsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListSearchHypernymsRequest, + ListSearchHypernymsResponse, + SearchHypernym, + ListSearchHypernymsPage, + ListSearchHypernymsFixedSizeCollection> { + + private ListSearchHypernymsFixedSizeCollection( + List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListSearchHypernymsFixedSizeCollection createEmptyCollection() { + return new ListSearchHypernymsFixedSizeCollection(null, 0); + } + + @Override + protected ListSearchHypernymsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListSearchHypernymsFixedSizeCollection(pages, collectionSize); + } + } + + public static class SearchAssetsPagedResponse + extends AbstractPagedListResponse< + SearchAssetsRequest, + SearchAssetsResponse, + SearchResultItem, + SearchAssetsPage, + SearchAssetsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + SearchAssetsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new SearchAssetsPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private SearchAssetsPagedResponse(SearchAssetsPage page) { + super(page, SearchAssetsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class SearchAssetsPage + extends AbstractPage< + SearchAssetsRequest, SearchAssetsResponse, SearchResultItem, SearchAssetsPage> { + + private SearchAssetsPage( + PageContext context, + SearchAssetsResponse response) { + super(context, response); + } + + private static SearchAssetsPage createEmptyPage() { + return new SearchAssetsPage(null, null); + } + + @Override + protected SearchAssetsPage createPage( + PageContext context, + SearchAssetsResponse response) { + return new SearchAssetsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class SearchAssetsFixedSizeCollection + extends AbstractFixedSizeCollection< + SearchAssetsRequest, + SearchAssetsResponse, + SearchResultItem, + SearchAssetsPage, + SearchAssetsFixedSizeCollection> { + + private SearchAssetsFixedSizeCollection(List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static SearchAssetsFixedSizeCollection createEmptyCollection() { + return new SearchAssetsFixedSizeCollection(null, 0); + } + + @Override + protected SearchAssetsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new SearchAssetsFixedSizeCollection(pages, collectionSize); + } + } + + public static class SearchIndexEndpointPagedResponse + extends AbstractPagedListResponse< + SearchIndexEndpointRequest, + SearchIndexEndpointResponse, + SearchResultItem, + SearchIndexEndpointPage, + SearchIndexEndpointFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext + context, + ApiFuture futureResponse) { + ApiFuture futurePage = + SearchIndexEndpointPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new SearchIndexEndpointPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private SearchIndexEndpointPagedResponse(SearchIndexEndpointPage page) { + super(page, SearchIndexEndpointFixedSizeCollection.createEmptyCollection()); + } + } + + public static class SearchIndexEndpointPage + extends AbstractPage< + SearchIndexEndpointRequest, + SearchIndexEndpointResponse, + SearchResultItem, + SearchIndexEndpointPage> { + + private SearchIndexEndpointPage( + PageContext + context, + SearchIndexEndpointResponse response) { + super(context, response); + } + + private static SearchIndexEndpointPage createEmptyPage() { + return new SearchIndexEndpointPage(null, null); + } + + @Override + protected SearchIndexEndpointPage createPage( + PageContext + context, + SearchIndexEndpointResponse response) { + return new SearchIndexEndpointPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext + context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class SearchIndexEndpointFixedSizeCollection + extends AbstractFixedSizeCollection< + SearchIndexEndpointRequest, + SearchIndexEndpointResponse, + SearchResultItem, + SearchIndexEndpointPage, + SearchIndexEndpointFixedSizeCollection> { + + private SearchIndexEndpointFixedSizeCollection( + List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static SearchIndexEndpointFixedSizeCollection createEmptyCollection() { + return new SearchIndexEndpointFixedSizeCollection(null, 0); + } + + @Override + protected SearchIndexEndpointFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new SearchIndexEndpointFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListIndexEndpointsPagedResponse + extends AbstractPagedListResponse< + ListIndexEndpointsRequest, + ListIndexEndpointsResponse, + IndexEndpoint, + ListIndexEndpointsPage, + ListIndexEndpointsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListIndexEndpointsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListIndexEndpointsPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListIndexEndpointsPagedResponse(ListIndexEndpointsPage page) { + super(page, ListIndexEndpointsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListIndexEndpointsPage + extends AbstractPage< + ListIndexEndpointsRequest, + ListIndexEndpointsResponse, + IndexEndpoint, + ListIndexEndpointsPage> { + + private ListIndexEndpointsPage( + PageContext context, + ListIndexEndpointsResponse response) { + super(context, response); + } + + private static ListIndexEndpointsPage createEmptyPage() { + return new ListIndexEndpointsPage(null, null); + } + + @Override + protected ListIndexEndpointsPage createPage( + PageContext context, + ListIndexEndpointsResponse response) { + return new ListIndexEndpointsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListIndexEndpointsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListIndexEndpointsRequest, + ListIndexEndpointsResponse, + IndexEndpoint, + ListIndexEndpointsPage, + ListIndexEndpointsFixedSizeCollection> { + + private ListIndexEndpointsFixedSizeCollection( + List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListIndexEndpointsFixedSizeCollection createEmptyCollection() { + return new ListIndexEndpointsFixedSizeCollection(null, 0); + } + + @Override + protected ListIndexEndpointsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListIndexEndpointsFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListCollectionsPagedResponse + extends AbstractPagedListResponse< + ListCollectionsRequest, + ListCollectionsResponse, + Collection, + ListCollectionsPage, + ListCollectionsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListCollectionsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListCollectionsPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListCollectionsPagedResponse(ListCollectionsPage page) { + super(page, ListCollectionsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListCollectionsPage + extends AbstractPage< + ListCollectionsRequest, ListCollectionsResponse, Collection, ListCollectionsPage> { + + private ListCollectionsPage( + PageContext context, + ListCollectionsResponse response) { + super(context, response); + } + + private static ListCollectionsPage createEmptyPage() { + return new ListCollectionsPage(null, null); + } + + @Override + protected ListCollectionsPage createPage( + PageContext context, + ListCollectionsResponse response) { + return new ListCollectionsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListCollectionsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListCollectionsRequest, + ListCollectionsResponse, + Collection, + ListCollectionsPage, + ListCollectionsFixedSizeCollection> { + + private ListCollectionsFixedSizeCollection( + List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListCollectionsFixedSizeCollection createEmptyCollection() { + return new ListCollectionsFixedSizeCollection(null, 0); + } + + @Override + protected ListCollectionsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListCollectionsFixedSizeCollection(pages, collectionSize); + } + } + + public static class ViewCollectionItemsPagedResponse + extends AbstractPagedListResponse< + ViewCollectionItemsRequest, + ViewCollectionItemsResponse, + CollectionItem, + ViewCollectionItemsPage, + ViewCollectionItemsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext + context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ViewCollectionItemsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ViewCollectionItemsPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ViewCollectionItemsPagedResponse(ViewCollectionItemsPage page) { + super(page, ViewCollectionItemsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ViewCollectionItemsPage + extends AbstractPage< + ViewCollectionItemsRequest, + ViewCollectionItemsResponse, + CollectionItem, + ViewCollectionItemsPage> { + + private ViewCollectionItemsPage( + PageContext + context, + ViewCollectionItemsResponse response) { + super(context, response); + } + + private static ViewCollectionItemsPage createEmptyPage() { + return new ViewCollectionItemsPage(null, null); + } + + @Override + protected ViewCollectionItemsPage createPage( + PageContext + context, + ViewCollectionItemsResponse response) { + return new ViewCollectionItemsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext + context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ViewCollectionItemsFixedSizeCollection + extends AbstractFixedSizeCollection< + ViewCollectionItemsRequest, + ViewCollectionItemsResponse, + CollectionItem, + ViewCollectionItemsPage, + ViewCollectionItemsFixedSizeCollection> { + + private ViewCollectionItemsFixedSizeCollection( + List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ViewCollectionItemsFixedSizeCollection createEmptyCollection() { + return new ViewCollectionItemsFixedSizeCollection(null, 0); + } + + @Override + protected ViewCollectionItemsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ViewCollectionItemsFixedSizeCollection(pages, collectionSize); + } + } +} diff --git a/java-visionai/google-cloud-visionai/src/main/java/com/google/cloud/visionai/v1/WarehouseSettings.java b/java-visionai/google-cloud-visionai/src/main/java/com/google/cloud/visionai/v1/WarehouseSettings.java new file mode 100644 index 000000000000..227fe58132a4 --- /dev/null +++ b/java-visionai/google-cloud-visionai/src/main/java/com/google/cloud/visionai/v1/WarehouseSettings.java @@ -0,0 +1,1152 @@ +/* + * Copyright 2024 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.visionai.v1; + +import static com.google.cloud.visionai.v1.WarehouseClient.ListAnnotationsPagedResponse; +import static com.google.cloud.visionai.v1.WarehouseClient.ListAssetsPagedResponse; +import static com.google.cloud.visionai.v1.WarehouseClient.ListCollectionsPagedResponse; +import static com.google.cloud.visionai.v1.WarehouseClient.ListCorporaPagedResponse; +import static com.google.cloud.visionai.v1.WarehouseClient.ListDataSchemasPagedResponse; +import static com.google.cloud.visionai.v1.WarehouseClient.ListIndexEndpointsPagedResponse; +import static com.google.cloud.visionai.v1.WarehouseClient.ListIndexesPagedResponse; +import static com.google.cloud.visionai.v1.WarehouseClient.ListSearchConfigsPagedResponse; +import static com.google.cloud.visionai.v1.WarehouseClient.ListSearchHypernymsPagedResponse; +import static com.google.cloud.visionai.v1.WarehouseClient.SearchAssetsPagedResponse; +import static com.google.cloud.visionai.v1.WarehouseClient.SearchIndexEndpointPagedResponse; +import static com.google.cloud.visionai.v1.WarehouseClient.ViewCollectionItemsPagedResponse; +import static com.google.cloud.visionai.v1.WarehouseClient.ViewIndexedAssetsPagedResponse; + +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.httpjson.InstantiatingHttpJsonChannelProvider; +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.PagedCallSettings; +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.visionai.v1.stub.WarehouseStubSettings; +import com.google.longrunning.Operation; +import com.google.protobuf.Empty; +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 WarehouseClient}. + * + *

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

    + *
  • The default service address (visionai.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 createAsset to 30 seconds: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * WarehouseSettings.Builder warehouseSettingsBuilder = WarehouseSettings.newBuilder();
+ * warehouseSettingsBuilder
+ *     .createAssetSettings()
+ *     .setRetrySettings(
+ *         warehouseSettingsBuilder
+ *             .createAssetSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * WarehouseSettings warehouseSettings = warehouseSettingsBuilder.build();
+ * }
+ */ +@Generated("by gapic-generator-java") +public class WarehouseSettings extends ClientSettings { + + /** Returns the object with the settings used for calls to createAsset. */ + public UnaryCallSettings createAssetSettings() { + return ((WarehouseStubSettings) getStubSettings()).createAssetSettings(); + } + + /** Returns the object with the settings used for calls to updateAsset. */ + public UnaryCallSettings updateAssetSettings() { + return ((WarehouseStubSettings) getStubSettings()).updateAssetSettings(); + } + + /** Returns the object with the settings used for calls to getAsset. */ + public UnaryCallSettings getAssetSettings() { + return ((WarehouseStubSettings) getStubSettings()).getAssetSettings(); + } + + /** Returns the object with the settings used for calls to listAssets. */ + public PagedCallSettings + listAssetsSettings() { + return ((WarehouseStubSettings) getStubSettings()).listAssetsSettings(); + } + + /** Returns the object with the settings used for calls to deleteAsset. */ + public UnaryCallSettings deleteAssetSettings() { + return ((WarehouseStubSettings) getStubSettings()).deleteAssetSettings(); + } + + /** Returns the object with the settings used for calls to deleteAsset. */ + public OperationCallSettings + deleteAssetOperationSettings() { + return ((WarehouseStubSettings) getStubSettings()).deleteAssetOperationSettings(); + } + + /** Returns the object with the settings used for calls to uploadAsset. */ + public UnaryCallSettings uploadAssetSettings() { + return ((WarehouseStubSettings) getStubSettings()).uploadAssetSettings(); + } + + /** Returns the object with the settings used for calls to uploadAsset. */ + public OperationCallSettings + uploadAssetOperationSettings() { + return ((WarehouseStubSettings) getStubSettings()).uploadAssetOperationSettings(); + } + + /** Returns the object with the settings used for calls to generateRetrievalUrl. */ + public UnaryCallSettings + generateRetrievalUrlSettings() { + return ((WarehouseStubSettings) getStubSettings()).generateRetrievalUrlSettings(); + } + + /** Returns the object with the settings used for calls to analyzeAsset. */ + public UnaryCallSettings analyzeAssetSettings() { + return ((WarehouseStubSettings) getStubSettings()).analyzeAssetSettings(); + } + + /** Returns the object with the settings used for calls to analyzeAsset. */ + public OperationCallSettings + analyzeAssetOperationSettings() { + return ((WarehouseStubSettings) getStubSettings()).analyzeAssetOperationSettings(); + } + + /** Returns the object with the settings used for calls to indexAsset. */ + public UnaryCallSettings indexAssetSettings() { + return ((WarehouseStubSettings) getStubSettings()).indexAssetSettings(); + } + + /** Returns the object with the settings used for calls to indexAsset. */ + public OperationCallSettings + indexAssetOperationSettings() { + return ((WarehouseStubSettings) getStubSettings()).indexAssetOperationSettings(); + } + + /** Returns the object with the settings used for calls to removeIndexAsset. */ + public UnaryCallSettings removeIndexAssetSettings() { + return ((WarehouseStubSettings) getStubSettings()).removeIndexAssetSettings(); + } + + /** Returns the object with the settings used for calls to removeIndexAsset. */ + public OperationCallSettings< + RemoveIndexAssetRequest, RemoveIndexAssetResponse, RemoveIndexAssetMetadata> + removeIndexAssetOperationSettings() { + return ((WarehouseStubSettings) getStubSettings()).removeIndexAssetOperationSettings(); + } + + /** Returns the object with the settings used for calls to viewIndexedAssets. */ + public PagedCallSettings< + ViewIndexedAssetsRequest, ViewIndexedAssetsResponse, ViewIndexedAssetsPagedResponse> + viewIndexedAssetsSettings() { + return ((WarehouseStubSettings) getStubSettings()).viewIndexedAssetsSettings(); + } + + /** Returns the object with the settings used for calls to createIndex. */ + public UnaryCallSettings createIndexSettings() { + return ((WarehouseStubSettings) getStubSettings()).createIndexSettings(); + } + + /** Returns the object with the settings used for calls to createIndex. */ + public OperationCallSettings + createIndexOperationSettings() { + return ((WarehouseStubSettings) getStubSettings()).createIndexOperationSettings(); + } + + /** Returns the object with the settings used for calls to updateIndex. */ + public UnaryCallSettings updateIndexSettings() { + return ((WarehouseStubSettings) getStubSettings()).updateIndexSettings(); + } + + /** Returns the object with the settings used for calls to updateIndex. */ + public OperationCallSettings + updateIndexOperationSettings() { + return ((WarehouseStubSettings) getStubSettings()).updateIndexOperationSettings(); + } + + /** Returns the object with the settings used for calls to getIndex. */ + public UnaryCallSettings getIndexSettings() { + return ((WarehouseStubSettings) getStubSettings()).getIndexSettings(); + } + + /** Returns the object with the settings used for calls to listIndexes. */ + public PagedCallSettings + listIndexesSettings() { + return ((WarehouseStubSettings) getStubSettings()).listIndexesSettings(); + } + + /** Returns the object with the settings used for calls to deleteIndex. */ + public UnaryCallSettings deleteIndexSettings() { + return ((WarehouseStubSettings) getStubSettings()).deleteIndexSettings(); + } + + /** Returns the object with the settings used for calls to deleteIndex. */ + public OperationCallSettings + deleteIndexOperationSettings() { + return ((WarehouseStubSettings) getStubSettings()).deleteIndexOperationSettings(); + } + + /** Returns the object with the settings used for calls to createCorpus. */ + public UnaryCallSettings createCorpusSettings() { + return ((WarehouseStubSettings) getStubSettings()).createCorpusSettings(); + } + + /** Returns the object with the settings used for calls to createCorpus. */ + public OperationCallSettings + createCorpusOperationSettings() { + return ((WarehouseStubSettings) getStubSettings()).createCorpusOperationSettings(); + } + + /** Returns the object with the settings used for calls to getCorpus. */ + public UnaryCallSettings getCorpusSettings() { + return ((WarehouseStubSettings) getStubSettings()).getCorpusSettings(); + } + + /** Returns the object with the settings used for calls to updateCorpus. */ + public UnaryCallSettings updateCorpusSettings() { + return ((WarehouseStubSettings) getStubSettings()).updateCorpusSettings(); + } + + /** Returns the object with the settings used for calls to listCorpora. */ + public PagedCallSettings + listCorporaSettings() { + return ((WarehouseStubSettings) getStubSettings()).listCorporaSettings(); + } + + /** Returns the object with the settings used for calls to deleteCorpus. */ + public UnaryCallSettings deleteCorpusSettings() { + return ((WarehouseStubSettings) getStubSettings()).deleteCorpusSettings(); + } + + /** Returns the object with the settings used for calls to analyzeCorpus. */ + public UnaryCallSettings analyzeCorpusSettings() { + return ((WarehouseStubSettings) getStubSettings()).analyzeCorpusSettings(); + } + + /** Returns the object with the settings used for calls to analyzeCorpus. */ + public OperationCallSettings + analyzeCorpusOperationSettings() { + return ((WarehouseStubSettings) getStubSettings()).analyzeCorpusOperationSettings(); + } + + /** Returns the object with the settings used for calls to createDataSchema. */ + public UnaryCallSettings createDataSchemaSettings() { + return ((WarehouseStubSettings) getStubSettings()).createDataSchemaSettings(); + } + + /** Returns the object with the settings used for calls to updateDataSchema. */ + public UnaryCallSettings updateDataSchemaSettings() { + return ((WarehouseStubSettings) getStubSettings()).updateDataSchemaSettings(); + } + + /** Returns the object with the settings used for calls to getDataSchema. */ + public UnaryCallSettings getDataSchemaSettings() { + return ((WarehouseStubSettings) getStubSettings()).getDataSchemaSettings(); + } + + /** Returns the object with the settings used for calls to deleteDataSchema. */ + public UnaryCallSettings deleteDataSchemaSettings() { + return ((WarehouseStubSettings) getStubSettings()).deleteDataSchemaSettings(); + } + + /** Returns the object with the settings used for calls to listDataSchemas. */ + public PagedCallSettings< + ListDataSchemasRequest, ListDataSchemasResponse, ListDataSchemasPagedResponse> + listDataSchemasSettings() { + return ((WarehouseStubSettings) getStubSettings()).listDataSchemasSettings(); + } + + /** Returns the object with the settings used for calls to createAnnotation. */ + public UnaryCallSettings createAnnotationSettings() { + return ((WarehouseStubSettings) getStubSettings()).createAnnotationSettings(); + } + + /** Returns the object with the settings used for calls to getAnnotation. */ + public UnaryCallSettings getAnnotationSettings() { + return ((WarehouseStubSettings) getStubSettings()).getAnnotationSettings(); + } + + /** Returns the object with the settings used for calls to listAnnotations. */ + public PagedCallSettings< + ListAnnotationsRequest, ListAnnotationsResponse, ListAnnotationsPagedResponse> + listAnnotationsSettings() { + return ((WarehouseStubSettings) getStubSettings()).listAnnotationsSettings(); + } + + /** Returns the object with the settings used for calls to updateAnnotation. */ + public UnaryCallSettings updateAnnotationSettings() { + return ((WarehouseStubSettings) getStubSettings()).updateAnnotationSettings(); + } + + /** Returns the object with the settings used for calls to deleteAnnotation. */ + public UnaryCallSettings deleteAnnotationSettings() { + return ((WarehouseStubSettings) getStubSettings()).deleteAnnotationSettings(); + } + + /** Returns the object with the settings used for calls to ingestAsset. */ + public StreamingCallSettings ingestAssetSettings() { + return ((WarehouseStubSettings) getStubSettings()).ingestAssetSettings(); + } + + /** Returns the object with the settings used for calls to clipAsset. */ + public UnaryCallSettings clipAssetSettings() { + return ((WarehouseStubSettings) getStubSettings()).clipAssetSettings(); + } + + /** Returns the object with the settings used for calls to generateHlsUri. */ + public UnaryCallSettings generateHlsUriSettings() { + return ((WarehouseStubSettings) getStubSettings()).generateHlsUriSettings(); + } + + /** Returns the object with the settings used for calls to importAssets. */ + public UnaryCallSettings importAssetsSettings() { + return ((WarehouseStubSettings) getStubSettings()).importAssetsSettings(); + } + + /** Returns the object with the settings used for calls to importAssets. */ + public OperationCallSettings + importAssetsOperationSettings() { + return ((WarehouseStubSettings) getStubSettings()).importAssetsOperationSettings(); + } + + /** Returns the object with the settings used for calls to createSearchConfig. */ + public UnaryCallSettings createSearchConfigSettings() { + return ((WarehouseStubSettings) getStubSettings()).createSearchConfigSettings(); + } + + /** Returns the object with the settings used for calls to updateSearchConfig. */ + public UnaryCallSettings updateSearchConfigSettings() { + return ((WarehouseStubSettings) getStubSettings()).updateSearchConfigSettings(); + } + + /** Returns the object with the settings used for calls to getSearchConfig. */ + public UnaryCallSettings getSearchConfigSettings() { + return ((WarehouseStubSettings) getStubSettings()).getSearchConfigSettings(); + } + + /** Returns the object with the settings used for calls to deleteSearchConfig. */ + public UnaryCallSettings deleteSearchConfigSettings() { + return ((WarehouseStubSettings) getStubSettings()).deleteSearchConfigSettings(); + } + + /** Returns the object with the settings used for calls to listSearchConfigs. */ + public PagedCallSettings< + ListSearchConfigsRequest, ListSearchConfigsResponse, ListSearchConfigsPagedResponse> + listSearchConfigsSettings() { + return ((WarehouseStubSettings) getStubSettings()).listSearchConfigsSettings(); + } + + /** Returns the object with the settings used for calls to createSearchHypernym. */ + public UnaryCallSettings + createSearchHypernymSettings() { + return ((WarehouseStubSettings) getStubSettings()).createSearchHypernymSettings(); + } + + /** Returns the object with the settings used for calls to updateSearchHypernym. */ + public UnaryCallSettings + updateSearchHypernymSettings() { + return ((WarehouseStubSettings) getStubSettings()).updateSearchHypernymSettings(); + } + + /** Returns the object with the settings used for calls to getSearchHypernym. */ + public UnaryCallSettings getSearchHypernymSettings() { + return ((WarehouseStubSettings) getStubSettings()).getSearchHypernymSettings(); + } + + /** Returns the object with the settings used for calls to deleteSearchHypernym. */ + public UnaryCallSettings deleteSearchHypernymSettings() { + return ((WarehouseStubSettings) getStubSettings()).deleteSearchHypernymSettings(); + } + + /** Returns the object with the settings used for calls to listSearchHypernyms. */ + public PagedCallSettings< + ListSearchHypernymsRequest, ListSearchHypernymsResponse, ListSearchHypernymsPagedResponse> + listSearchHypernymsSettings() { + return ((WarehouseStubSettings) getStubSettings()).listSearchHypernymsSettings(); + } + + /** Returns the object with the settings used for calls to searchAssets. */ + public PagedCallSettings + searchAssetsSettings() { + return ((WarehouseStubSettings) getStubSettings()).searchAssetsSettings(); + } + + /** Returns the object with the settings used for calls to searchIndexEndpoint. */ + public PagedCallSettings< + SearchIndexEndpointRequest, SearchIndexEndpointResponse, SearchIndexEndpointPagedResponse> + searchIndexEndpointSettings() { + return ((WarehouseStubSettings) getStubSettings()).searchIndexEndpointSettings(); + } + + /** Returns the object with the settings used for calls to createIndexEndpoint. */ + public UnaryCallSettings createIndexEndpointSettings() { + return ((WarehouseStubSettings) getStubSettings()).createIndexEndpointSettings(); + } + + /** Returns the object with the settings used for calls to createIndexEndpoint. */ + public OperationCallSettings< + CreateIndexEndpointRequest, IndexEndpoint, CreateIndexEndpointMetadata> + createIndexEndpointOperationSettings() { + return ((WarehouseStubSettings) getStubSettings()).createIndexEndpointOperationSettings(); + } + + /** Returns the object with the settings used for calls to getIndexEndpoint. */ + public UnaryCallSettings getIndexEndpointSettings() { + return ((WarehouseStubSettings) getStubSettings()).getIndexEndpointSettings(); + } + + /** Returns the object with the settings used for calls to listIndexEndpoints. */ + public PagedCallSettings< + ListIndexEndpointsRequest, ListIndexEndpointsResponse, ListIndexEndpointsPagedResponse> + listIndexEndpointsSettings() { + return ((WarehouseStubSettings) getStubSettings()).listIndexEndpointsSettings(); + } + + /** Returns the object with the settings used for calls to updateIndexEndpoint. */ + public UnaryCallSettings updateIndexEndpointSettings() { + return ((WarehouseStubSettings) getStubSettings()).updateIndexEndpointSettings(); + } + + /** Returns the object with the settings used for calls to updateIndexEndpoint. */ + public OperationCallSettings< + UpdateIndexEndpointRequest, IndexEndpoint, UpdateIndexEndpointMetadata> + updateIndexEndpointOperationSettings() { + return ((WarehouseStubSettings) getStubSettings()).updateIndexEndpointOperationSettings(); + } + + /** Returns the object with the settings used for calls to deleteIndexEndpoint. */ + public UnaryCallSettings deleteIndexEndpointSettings() { + return ((WarehouseStubSettings) getStubSettings()).deleteIndexEndpointSettings(); + } + + /** Returns the object with the settings used for calls to deleteIndexEndpoint. */ + public OperationCallSettings + deleteIndexEndpointOperationSettings() { + return ((WarehouseStubSettings) getStubSettings()).deleteIndexEndpointOperationSettings(); + } + + /** Returns the object with the settings used for calls to deployIndex. */ + public UnaryCallSettings deployIndexSettings() { + return ((WarehouseStubSettings) getStubSettings()).deployIndexSettings(); + } + + /** Returns the object with the settings used for calls to deployIndex. */ + public OperationCallSettings + deployIndexOperationSettings() { + return ((WarehouseStubSettings) getStubSettings()).deployIndexOperationSettings(); + } + + /** Returns the object with the settings used for calls to undeployIndex. */ + public UnaryCallSettings undeployIndexSettings() { + return ((WarehouseStubSettings) getStubSettings()).undeployIndexSettings(); + } + + /** Returns the object with the settings used for calls to undeployIndex. */ + public OperationCallSettings + undeployIndexOperationSettings() { + return ((WarehouseStubSettings) getStubSettings()).undeployIndexOperationSettings(); + } + + /** Returns the object with the settings used for calls to createCollection. */ + public UnaryCallSettings createCollectionSettings() { + return ((WarehouseStubSettings) getStubSettings()).createCollectionSettings(); + } + + /** Returns the object with the settings used for calls to createCollection. */ + public OperationCallSettings + createCollectionOperationSettings() { + return ((WarehouseStubSettings) getStubSettings()).createCollectionOperationSettings(); + } + + /** Returns the object with the settings used for calls to deleteCollection. */ + public UnaryCallSettings deleteCollectionSettings() { + return ((WarehouseStubSettings) getStubSettings()).deleteCollectionSettings(); + } + + /** Returns the object with the settings used for calls to deleteCollection. */ + public OperationCallSettings + deleteCollectionOperationSettings() { + return ((WarehouseStubSettings) getStubSettings()).deleteCollectionOperationSettings(); + } + + /** Returns the object with the settings used for calls to getCollection. */ + public UnaryCallSettings getCollectionSettings() { + return ((WarehouseStubSettings) getStubSettings()).getCollectionSettings(); + } + + /** Returns the object with the settings used for calls to updateCollection. */ + public UnaryCallSettings updateCollectionSettings() { + return ((WarehouseStubSettings) getStubSettings()).updateCollectionSettings(); + } + + /** Returns the object with the settings used for calls to listCollections. */ + public PagedCallSettings< + ListCollectionsRequest, ListCollectionsResponse, ListCollectionsPagedResponse> + listCollectionsSettings() { + return ((WarehouseStubSettings) getStubSettings()).listCollectionsSettings(); + } + + /** Returns the object with the settings used for calls to addCollectionItem. */ + public UnaryCallSettings + addCollectionItemSettings() { + return ((WarehouseStubSettings) getStubSettings()).addCollectionItemSettings(); + } + + /** Returns the object with the settings used for calls to removeCollectionItem. */ + public UnaryCallSettings + removeCollectionItemSettings() { + return ((WarehouseStubSettings) getStubSettings()).removeCollectionItemSettings(); + } + + /** Returns the object with the settings used for calls to viewCollectionItems. */ + public PagedCallSettings< + ViewCollectionItemsRequest, ViewCollectionItemsResponse, ViewCollectionItemsPagedResponse> + viewCollectionItemsSettings() { + return ((WarehouseStubSettings) getStubSettings()).viewCollectionItemsSettings(); + } + + public static final WarehouseSettings create(WarehouseStubSettings stub) throws IOException { + return new WarehouseSettings.Builder(stub.toBuilder()).build(); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return WarehouseStubSettings.defaultExecutorProviderBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return WarehouseStubSettings.getDefaultEndpoint(); + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return WarehouseStubSettings.getDefaultServiceScopes(); + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return WarehouseStubSettings.defaultCredentialsProviderBuilder(); + } + + /** Returns a builder for the default gRPC ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return WarehouseStubSettings.defaultGrpcTransportProviderBuilder(); + } + + /** Returns a builder for the default REST ChannelProvider for this service. */ + @BetaApi + public static InstantiatingHttpJsonChannelProvider.Builder + defaultHttpJsonTransportProviderBuilder() { + return WarehouseStubSettings.defaultHttpJsonTransportProviderBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return WarehouseStubSettings.defaultTransportChannelProvider(); + } + + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return WarehouseStubSettings.defaultApiClientHeaderProviderBuilder(); + } + + /** Returns a new gRPC builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new REST builder for this class. */ + public static Builder newHttpJsonBuilder() { + return Builder.createHttpJsonDefault(); + } + + /** 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 WarehouseSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + } + + /** Builder for WarehouseSettings. */ + public static class Builder extends ClientSettings.Builder { + + protected Builder() throws IOException { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(WarehouseStubSettings.newBuilder(clientContext)); + } + + protected Builder(WarehouseSettings settings) { + super(settings.getStubSettings().toBuilder()); + } + + protected Builder(WarehouseStubSettings.Builder stubSettings) { + super(stubSettings); + } + + private static Builder createDefault() { + return new Builder(WarehouseStubSettings.newBuilder()); + } + + private static Builder createHttpJsonDefault() { + return new Builder(WarehouseStubSettings.newHttpJsonBuilder()); + } + + public WarehouseStubSettings.Builder getStubSettingsBuilder() { + return ((WarehouseStubSettings.Builder) getStubSettings()); + } + + /** + * 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) { + super.applyToAllUnaryMethods( + getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater); + return this; + } + + /** Returns the builder for the settings used for calls to createAsset. */ + public UnaryCallSettings.Builder createAssetSettings() { + return getStubSettingsBuilder().createAssetSettings(); + } + + /** Returns the builder for the settings used for calls to updateAsset. */ + public UnaryCallSettings.Builder updateAssetSettings() { + return getStubSettingsBuilder().updateAssetSettings(); + } + + /** Returns the builder for the settings used for calls to getAsset. */ + public UnaryCallSettings.Builder getAssetSettings() { + return getStubSettingsBuilder().getAssetSettings(); + } + + /** Returns the builder for the settings used for calls to listAssets. */ + public PagedCallSettings.Builder + listAssetsSettings() { + return getStubSettingsBuilder().listAssetsSettings(); + } + + /** Returns the builder for the settings used for calls to deleteAsset. */ + public UnaryCallSettings.Builder deleteAssetSettings() { + return getStubSettingsBuilder().deleteAssetSettings(); + } + + /** Returns the builder for the settings used for calls to deleteAsset. */ + public OperationCallSettings.Builder + deleteAssetOperationSettings() { + return getStubSettingsBuilder().deleteAssetOperationSettings(); + } + + /** Returns the builder for the settings used for calls to uploadAsset. */ + public UnaryCallSettings.Builder uploadAssetSettings() { + return getStubSettingsBuilder().uploadAssetSettings(); + } + + /** Returns the builder for the settings used for calls to uploadAsset. */ + public OperationCallSettings.Builder< + UploadAssetRequest, UploadAssetResponse, UploadAssetMetadata> + uploadAssetOperationSettings() { + return getStubSettingsBuilder().uploadAssetOperationSettings(); + } + + /** Returns the builder for the settings used for calls to generateRetrievalUrl. */ + public UnaryCallSettings.Builder + generateRetrievalUrlSettings() { + return getStubSettingsBuilder().generateRetrievalUrlSettings(); + } + + /** Returns the builder for the settings used for calls to analyzeAsset. */ + public UnaryCallSettings.Builder analyzeAssetSettings() { + return getStubSettingsBuilder().analyzeAssetSettings(); + } + + /** Returns the builder for the settings used for calls to analyzeAsset. */ + public OperationCallSettings.Builder< + AnalyzeAssetRequest, AnalyzeAssetResponse, AnalyzeAssetMetadata> + analyzeAssetOperationSettings() { + return getStubSettingsBuilder().analyzeAssetOperationSettings(); + } + + /** Returns the builder for the settings used for calls to indexAsset. */ + public UnaryCallSettings.Builder indexAssetSettings() { + return getStubSettingsBuilder().indexAssetSettings(); + } + + /** Returns the builder for the settings used for calls to indexAsset. */ + public OperationCallSettings.Builder + indexAssetOperationSettings() { + return getStubSettingsBuilder().indexAssetOperationSettings(); + } + + /** Returns the builder for the settings used for calls to removeIndexAsset. */ + public UnaryCallSettings.Builder + removeIndexAssetSettings() { + return getStubSettingsBuilder().removeIndexAssetSettings(); + } + + /** Returns the builder for the settings used for calls to removeIndexAsset. */ + public OperationCallSettings.Builder< + RemoveIndexAssetRequest, RemoveIndexAssetResponse, RemoveIndexAssetMetadata> + removeIndexAssetOperationSettings() { + return getStubSettingsBuilder().removeIndexAssetOperationSettings(); + } + + /** Returns the builder for the settings used for calls to viewIndexedAssets. */ + public PagedCallSettings.Builder< + ViewIndexedAssetsRequest, ViewIndexedAssetsResponse, ViewIndexedAssetsPagedResponse> + viewIndexedAssetsSettings() { + return getStubSettingsBuilder().viewIndexedAssetsSettings(); + } + + /** Returns the builder for the settings used for calls to createIndex. */ + public UnaryCallSettings.Builder createIndexSettings() { + return getStubSettingsBuilder().createIndexSettings(); + } + + /** Returns the builder for the settings used for calls to createIndex. */ + public OperationCallSettings.Builder + createIndexOperationSettings() { + return getStubSettingsBuilder().createIndexOperationSettings(); + } + + /** Returns the builder for the settings used for calls to updateIndex. */ + public UnaryCallSettings.Builder updateIndexSettings() { + return getStubSettingsBuilder().updateIndexSettings(); + } + + /** Returns the builder for the settings used for calls to updateIndex. */ + public OperationCallSettings.Builder + updateIndexOperationSettings() { + return getStubSettingsBuilder().updateIndexOperationSettings(); + } + + /** Returns the builder for the settings used for calls to getIndex. */ + public UnaryCallSettings.Builder getIndexSettings() { + return getStubSettingsBuilder().getIndexSettings(); + } + + /** Returns the builder for the settings used for calls to listIndexes. */ + public PagedCallSettings.Builder< + ListIndexesRequest, ListIndexesResponse, ListIndexesPagedResponse> + listIndexesSettings() { + return getStubSettingsBuilder().listIndexesSettings(); + } + + /** Returns the builder for the settings used for calls to deleteIndex. */ + public UnaryCallSettings.Builder deleteIndexSettings() { + return getStubSettingsBuilder().deleteIndexSettings(); + } + + /** Returns the builder for the settings used for calls to deleteIndex. */ + public OperationCallSettings.Builder + deleteIndexOperationSettings() { + return getStubSettingsBuilder().deleteIndexOperationSettings(); + } + + /** Returns the builder for the settings used for calls to createCorpus. */ + public UnaryCallSettings.Builder createCorpusSettings() { + return getStubSettingsBuilder().createCorpusSettings(); + } + + /** Returns the builder for the settings used for calls to createCorpus. */ + public OperationCallSettings.Builder + createCorpusOperationSettings() { + return getStubSettingsBuilder().createCorpusOperationSettings(); + } + + /** Returns the builder for the settings used for calls to getCorpus. */ + public UnaryCallSettings.Builder getCorpusSettings() { + return getStubSettingsBuilder().getCorpusSettings(); + } + + /** Returns the builder for the settings used for calls to updateCorpus. */ + public UnaryCallSettings.Builder updateCorpusSettings() { + return getStubSettingsBuilder().updateCorpusSettings(); + } + + /** Returns the builder for the settings used for calls to listCorpora. */ + public PagedCallSettings.Builder< + ListCorporaRequest, ListCorporaResponse, ListCorporaPagedResponse> + listCorporaSettings() { + return getStubSettingsBuilder().listCorporaSettings(); + } + + /** Returns the builder for the settings used for calls to deleteCorpus. */ + public UnaryCallSettings.Builder deleteCorpusSettings() { + return getStubSettingsBuilder().deleteCorpusSettings(); + } + + /** Returns the builder for the settings used for calls to analyzeCorpus. */ + public UnaryCallSettings.Builder analyzeCorpusSettings() { + return getStubSettingsBuilder().analyzeCorpusSettings(); + } + + /** Returns the builder for the settings used for calls to analyzeCorpus. */ + public OperationCallSettings.Builder< + AnalyzeCorpusRequest, AnalyzeCorpusResponse, AnalyzeCorpusMetadata> + analyzeCorpusOperationSettings() { + return getStubSettingsBuilder().analyzeCorpusOperationSettings(); + } + + /** Returns the builder for the settings used for calls to createDataSchema. */ + public UnaryCallSettings.Builder + createDataSchemaSettings() { + return getStubSettingsBuilder().createDataSchemaSettings(); + } + + /** Returns the builder for the settings used for calls to updateDataSchema. */ + public UnaryCallSettings.Builder + updateDataSchemaSettings() { + return getStubSettingsBuilder().updateDataSchemaSettings(); + } + + /** Returns the builder for the settings used for calls to getDataSchema. */ + public UnaryCallSettings.Builder getDataSchemaSettings() { + return getStubSettingsBuilder().getDataSchemaSettings(); + } + + /** Returns the builder for the settings used for calls to deleteDataSchema. */ + public UnaryCallSettings.Builder deleteDataSchemaSettings() { + return getStubSettingsBuilder().deleteDataSchemaSettings(); + } + + /** Returns the builder for the settings used for calls to listDataSchemas. */ + public PagedCallSettings.Builder< + ListDataSchemasRequest, ListDataSchemasResponse, ListDataSchemasPagedResponse> + listDataSchemasSettings() { + return getStubSettingsBuilder().listDataSchemasSettings(); + } + + /** Returns the builder for the settings used for calls to createAnnotation. */ + public UnaryCallSettings.Builder + createAnnotationSettings() { + return getStubSettingsBuilder().createAnnotationSettings(); + } + + /** Returns the builder for the settings used for calls to getAnnotation. */ + public UnaryCallSettings.Builder getAnnotationSettings() { + return getStubSettingsBuilder().getAnnotationSettings(); + } + + /** Returns the builder for the settings used for calls to listAnnotations. */ + public PagedCallSettings.Builder< + ListAnnotationsRequest, ListAnnotationsResponse, ListAnnotationsPagedResponse> + listAnnotationsSettings() { + return getStubSettingsBuilder().listAnnotationsSettings(); + } + + /** Returns the builder for the settings used for calls to updateAnnotation. */ + public UnaryCallSettings.Builder + updateAnnotationSettings() { + return getStubSettingsBuilder().updateAnnotationSettings(); + } + + /** Returns the builder for the settings used for calls to deleteAnnotation. */ + public UnaryCallSettings.Builder deleteAnnotationSettings() { + return getStubSettingsBuilder().deleteAnnotationSettings(); + } + + /** Returns the builder for the settings used for calls to ingestAsset. */ + public StreamingCallSettings.Builder + ingestAssetSettings() { + return getStubSettingsBuilder().ingestAssetSettings(); + } + + /** Returns the builder for the settings used for calls to clipAsset. */ + public UnaryCallSettings.Builder clipAssetSettings() { + return getStubSettingsBuilder().clipAssetSettings(); + } + + /** Returns the builder for the settings used for calls to generateHlsUri. */ + public UnaryCallSettings.Builder + generateHlsUriSettings() { + return getStubSettingsBuilder().generateHlsUriSettings(); + } + + /** Returns the builder for the settings used for calls to importAssets. */ + public UnaryCallSettings.Builder importAssetsSettings() { + return getStubSettingsBuilder().importAssetsSettings(); + } + + /** Returns the builder for the settings used for calls to importAssets. */ + public OperationCallSettings.Builder< + ImportAssetsRequest, ImportAssetsResponse, ImportAssetsMetadata> + importAssetsOperationSettings() { + return getStubSettingsBuilder().importAssetsOperationSettings(); + } + + /** Returns the builder for the settings used for calls to createSearchConfig. */ + public UnaryCallSettings.Builder + createSearchConfigSettings() { + return getStubSettingsBuilder().createSearchConfigSettings(); + } + + /** Returns the builder for the settings used for calls to updateSearchConfig. */ + public UnaryCallSettings.Builder + updateSearchConfigSettings() { + return getStubSettingsBuilder().updateSearchConfigSettings(); + } + + /** Returns the builder for the settings used for calls to getSearchConfig. */ + public UnaryCallSettings.Builder + getSearchConfigSettings() { + return getStubSettingsBuilder().getSearchConfigSettings(); + } + + /** Returns the builder for the settings used for calls to deleteSearchConfig. */ + public UnaryCallSettings.Builder + deleteSearchConfigSettings() { + return getStubSettingsBuilder().deleteSearchConfigSettings(); + } + + /** Returns the builder for the settings used for calls to listSearchConfigs. */ + public PagedCallSettings.Builder< + ListSearchConfigsRequest, ListSearchConfigsResponse, ListSearchConfigsPagedResponse> + listSearchConfigsSettings() { + return getStubSettingsBuilder().listSearchConfigsSettings(); + } + + /** Returns the builder for the settings used for calls to createSearchHypernym. */ + public UnaryCallSettings.Builder + createSearchHypernymSettings() { + return getStubSettingsBuilder().createSearchHypernymSettings(); + } + + /** Returns the builder for the settings used for calls to updateSearchHypernym. */ + public UnaryCallSettings.Builder + updateSearchHypernymSettings() { + return getStubSettingsBuilder().updateSearchHypernymSettings(); + } + + /** Returns the builder for the settings used for calls to getSearchHypernym. */ + public UnaryCallSettings.Builder + getSearchHypernymSettings() { + return getStubSettingsBuilder().getSearchHypernymSettings(); + } + + /** Returns the builder for the settings used for calls to deleteSearchHypernym. */ + public UnaryCallSettings.Builder + deleteSearchHypernymSettings() { + return getStubSettingsBuilder().deleteSearchHypernymSettings(); + } + + /** Returns the builder for the settings used for calls to listSearchHypernyms. */ + public PagedCallSettings.Builder< + ListSearchHypernymsRequest, + ListSearchHypernymsResponse, + ListSearchHypernymsPagedResponse> + listSearchHypernymsSettings() { + return getStubSettingsBuilder().listSearchHypernymsSettings(); + } + + /** Returns the builder for the settings used for calls to searchAssets. */ + public PagedCallSettings.Builder< + SearchAssetsRequest, SearchAssetsResponse, SearchAssetsPagedResponse> + searchAssetsSettings() { + return getStubSettingsBuilder().searchAssetsSettings(); + } + + /** Returns the builder for the settings used for calls to searchIndexEndpoint. */ + public PagedCallSettings.Builder< + SearchIndexEndpointRequest, + SearchIndexEndpointResponse, + SearchIndexEndpointPagedResponse> + searchIndexEndpointSettings() { + return getStubSettingsBuilder().searchIndexEndpointSettings(); + } + + /** Returns the builder for the settings used for calls to createIndexEndpoint. */ + public UnaryCallSettings.Builder + createIndexEndpointSettings() { + return getStubSettingsBuilder().createIndexEndpointSettings(); + } + + /** Returns the builder for the settings used for calls to createIndexEndpoint. */ + public OperationCallSettings.Builder< + CreateIndexEndpointRequest, IndexEndpoint, CreateIndexEndpointMetadata> + createIndexEndpointOperationSettings() { + return getStubSettingsBuilder().createIndexEndpointOperationSettings(); + } + + /** Returns the builder for the settings used for calls to getIndexEndpoint. */ + public UnaryCallSettings.Builder + getIndexEndpointSettings() { + return getStubSettingsBuilder().getIndexEndpointSettings(); + } + + /** Returns the builder for the settings used for calls to listIndexEndpoints. */ + public PagedCallSettings.Builder< + ListIndexEndpointsRequest, ListIndexEndpointsResponse, ListIndexEndpointsPagedResponse> + listIndexEndpointsSettings() { + return getStubSettingsBuilder().listIndexEndpointsSettings(); + } + + /** Returns the builder for the settings used for calls to updateIndexEndpoint. */ + public UnaryCallSettings.Builder + updateIndexEndpointSettings() { + return getStubSettingsBuilder().updateIndexEndpointSettings(); + } + + /** Returns the builder for the settings used for calls to updateIndexEndpoint. */ + public OperationCallSettings.Builder< + UpdateIndexEndpointRequest, IndexEndpoint, UpdateIndexEndpointMetadata> + updateIndexEndpointOperationSettings() { + return getStubSettingsBuilder().updateIndexEndpointOperationSettings(); + } + + /** Returns the builder for the settings used for calls to deleteIndexEndpoint. */ + public UnaryCallSettings.Builder + deleteIndexEndpointSettings() { + return getStubSettingsBuilder().deleteIndexEndpointSettings(); + } + + /** Returns the builder for the settings used for calls to deleteIndexEndpoint. */ + public OperationCallSettings.Builder< + DeleteIndexEndpointRequest, Empty, DeleteIndexEndpointMetadata> + deleteIndexEndpointOperationSettings() { + return getStubSettingsBuilder().deleteIndexEndpointOperationSettings(); + } + + /** Returns the builder for the settings used for calls to deployIndex. */ + public UnaryCallSettings.Builder deployIndexSettings() { + return getStubSettingsBuilder().deployIndexSettings(); + } + + /** Returns the builder for the settings used for calls to deployIndex. */ + public OperationCallSettings.Builder< + DeployIndexRequest, DeployIndexResponse, DeployIndexMetadata> + deployIndexOperationSettings() { + return getStubSettingsBuilder().deployIndexOperationSettings(); + } + + /** Returns the builder for the settings used for calls to undeployIndex. */ + public UnaryCallSettings.Builder undeployIndexSettings() { + return getStubSettingsBuilder().undeployIndexSettings(); + } + + /** Returns the builder for the settings used for calls to undeployIndex. */ + public OperationCallSettings.Builder< + UndeployIndexRequest, UndeployIndexResponse, UndeployIndexMetadata> + undeployIndexOperationSettings() { + return getStubSettingsBuilder().undeployIndexOperationSettings(); + } + + /** Returns the builder for the settings used for calls to createCollection. */ + public UnaryCallSettings.Builder + createCollectionSettings() { + return getStubSettingsBuilder().createCollectionSettings(); + } + + /** Returns the builder for the settings used for calls to createCollection. */ + public OperationCallSettings.Builder< + CreateCollectionRequest, Collection, CreateCollectionMetadata> + createCollectionOperationSettings() { + return getStubSettingsBuilder().createCollectionOperationSettings(); + } + + /** Returns the builder for the settings used for calls to deleteCollection. */ + public UnaryCallSettings.Builder + deleteCollectionSettings() { + return getStubSettingsBuilder().deleteCollectionSettings(); + } + + /** Returns the builder for the settings used for calls to deleteCollection. */ + public OperationCallSettings.Builder + deleteCollectionOperationSettings() { + return getStubSettingsBuilder().deleteCollectionOperationSettings(); + } + + /** Returns the builder for the settings used for calls to getCollection. */ + public UnaryCallSettings.Builder getCollectionSettings() { + return getStubSettingsBuilder().getCollectionSettings(); + } + + /** Returns the builder for the settings used for calls to updateCollection. */ + public UnaryCallSettings.Builder + updateCollectionSettings() { + return getStubSettingsBuilder().updateCollectionSettings(); + } + + /** Returns the builder for the settings used for calls to listCollections. */ + public PagedCallSettings.Builder< + ListCollectionsRequest, ListCollectionsResponse, ListCollectionsPagedResponse> + listCollectionsSettings() { + return getStubSettingsBuilder().listCollectionsSettings(); + } + + /** Returns the builder for the settings used for calls to addCollectionItem. */ + public UnaryCallSettings.Builder + addCollectionItemSettings() { + return getStubSettingsBuilder().addCollectionItemSettings(); + } + + /** Returns the builder for the settings used for calls to removeCollectionItem. */ + public UnaryCallSettings.Builder + removeCollectionItemSettings() { + return getStubSettingsBuilder().removeCollectionItemSettings(); + } + + /** Returns the builder for the settings used for calls to viewCollectionItems. */ + public PagedCallSettings.Builder< + ViewCollectionItemsRequest, + ViewCollectionItemsResponse, + ViewCollectionItemsPagedResponse> + viewCollectionItemsSettings() { + return getStubSettingsBuilder().viewCollectionItemsSettings(); + } + + @Override + public WarehouseSettings build() throws IOException { + return new WarehouseSettings(this); + } + } +} diff --git a/java-visionai/google-cloud-visionai/src/main/java/com/google/cloud/visionai/v1/gapic_metadata.json b/java-visionai/google-cloud-visionai/src/main/java/com/google/cloud/visionai/v1/gapic_metadata.json new file mode 100644 index 000000000000..7c0e1a1ce64e --- /dev/null +++ b/java-visionai/google-cloud-visionai/src/main/java/com/google/cloud/visionai/v1/gapic_metadata.json @@ -0,0 +1,474 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "java", + "protoPackage": "google.cloud.visionai.v1", + "libraryPackage": "com.google.cloud.visionai.v1", + "services": { + "HealthCheckService": { + "clients": { + "grpc": { + "libraryClient": "HealthCheckServiceClient", + "rpcs": { + "HealthCheck": { + "methods": ["healthCheck", "healthCheckCallable"] + } + } + } + } + }, + "LiveVideoAnalytics": { + "clients": { + "grpc": { + "libraryClient": "LiveVideoAnalyticsClient", + "rpcs": { + "BatchRunProcess": { + "methods": ["batchRunProcessAsync", "batchRunProcessAsync", "batchRunProcessAsync", "batchRunProcessOperationCallable", "batchRunProcessCallable"] + }, + "CreateAnalysis": { + "methods": ["createAnalysisAsync", "createAnalysisAsync", "createAnalysisAsync", "createAnalysisOperationCallable", "createAnalysisCallable"] + }, + "CreateOperator": { + "methods": ["createOperatorAsync", "createOperatorAsync", "createOperatorAsync", "createOperatorOperationCallable", "createOperatorCallable"] + }, + "CreateProcess": { + "methods": ["createProcessAsync", "createProcessAsync", "createProcessAsync", "createProcessOperationCallable", "createProcessCallable"] + }, + "DeleteAnalysis": { + "methods": ["deleteAnalysisAsync", "deleteAnalysisAsync", "deleteAnalysisAsync", "deleteAnalysisOperationCallable", "deleteAnalysisCallable"] + }, + "DeleteOperator": { + "methods": ["deleteOperatorAsync", "deleteOperatorAsync", "deleteOperatorAsync", "deleteOperatorOperationCallable", "deleteOperatorCallable"] + }, + "DeleteProcess": { + "methods": ["deleteProcessAsync", "deleteProcessAsync", "deleteProcessAsync", "deleteProcessOperationCallable", "deleteProcessCallable"] + }, + "GetAnalysis": { + "methods": ["getAnalysis", "getAnalysis", "getAnalysis", "getAnalysisCallable"] + }, + "GetOperator": { + "methods": ["getOperator", "getOperator", "getOperator", "getOperatorCallable"] + }, + "GetProcess": { + "methods": ["getProcess", "getProcess", "getProcess", "getProcessCallable"] + }, + "ListAnalyses": { + "methods": ["listAnalyses", "listAnalyses", "listAnalyses", "listAnalysesPagedCallable", "listAnalysesCallable"] + }, + "ListOperators": { + "methods": ["listOperators", "listOperators", "listOperators", "listOperatorsPagedCallable", "listOperatorsCallable"] + }, + "ListProcesses": { + "methods": ["listProcesses", "listProcesses", "listProcesses", "listProcessesPagedCallable", "listProcessesCallable"] + }, + "ListPublicOperators": { + "methods": ["listPublicOperators", "listPublicOperators", "listPublicOperators", "listPublicOperatorsPagedCallable", "listPublicOperatorsCallable"] + }, + "ResolveOperatorInfo": { + "methods": ["resolveOperatorInfo", "resolveOperatorInfo", "resolveOperatorInfo", "resolveOperatorInfoCallable"] + }, + "UpdateAnalysis": { + "methods": ["updateAnalysisAsync", "updateAnalysisAsync", "updateAnalysisOperationCallable", "updateAnalysisCallable"] + }, + "UpdateOperator": { + "methods": ["updateOperatorAsync", "updateOperatorAsync", "updateOperatorOperationCallable", "updateOperatorCallable"] + }, + "UpdateProcess": { + "methods": ["updateProcessAsync", "updateProcessAsync", "updateProcessOperationCallable", "updateProcessCallable"] + } + } + } + } + }, + "AppPlatform": { + "clients": { + "grpc": { + "libraryClient": "AppPlatformClient", + "rpcs": { + "AddApplicationStreamInput": { + "methods": ["addApplicationStreamInputAsync", "addApplicationStreamInputAsync", "addApplicationStreamInputAsync", "addApplicationStreamInputOperationCallable", "addApplicationStreamInputCallable"] + }, + "CreateApplication": { + "methods": ["createApplicationAsync", "createApplicationAsync", "createApplicationAsync", "createApplicationOperationCallable", "createApplicationCallable"] + }, + "CreateApplicationInstances": { + "methods": ["createApplicationInstancesAsync", "createApplicationInstancesAsync", "createApplicationInstancesAsync", "createApplicationInstancesOperationCallable", "createApplicationInstancesCallable"] + }, + "CreateDraft": { + "methods": ["createDraftAsync", "createDraftAsync", "createDraftAsync", "createDraftOperationCallable", "createDraftCallable"] + }, + "CreateProcessor": { + "methods": ["createProcessorAsync", "createProcessorAsync", "createProcessorAsync", "createProcessorOperationCallable", "createProcessorCallable"] + }, + "DeleteApplication": { + "methods": ["deleteApplicationAsync", "deleteApplicationAsync", "deleteApplicationAsync", "deleteApplicationOperationCallable", "deleteApplicationCallable"] + }, + "DeleteApplicationInstances": { + "methods": ["deleteApplicationInstancesAsync", "deleteApplicationInstancesAsync", "deleteApplicationInstancesAsync", "deleteApplicationInstancesOperationCallable", "deleteApplicationInstancesCallable"] + }, + "DeleteDraft": { + "methods": ["deleteDraftAsync", "deleteDraftAsync", "deleteDraftAsync", "deleteDraftOperationCallable", "deleteDraftCallable"] + }, + "DeleteProcessor": { + "methods": ["deleteProcessorAsync", "deleteProcessorAsync", "deleteProcessorAsync", "deleteProcessorOperationCallable", "deleteProcessorCallable"] + }, + "DeployApplication": { + "methods": ["deployApplicationAsync", "deployApplicationAsync", "deployApplicationAsync", "deployApplicationOperationCallable", "deployApplicationCallable"] + }, + "GetApplication": { + "methods": ["getApplication", "getApplication", "getApplication", "getApplicationCallable"] + }, + "GetDraft": { + "methods": ["getDraft", "getDraft", "getDraft", "getDraftCallable"] + }, + "GetInstance": { + "methods": ["getInstance", "getInstance", "getInstance", "getInstanceCallable"] + }, + "GetProcessor": { + "methods": ["getProcessor", "getProcessor", "getProcessor", "getProcessorCallable"] + }, + "ListApplications": { + "methods": ["listApplications", "listApplications", "listApplications", "listApplicationsPagedCallable", "listApplicationsCallable"] + }, + "ListDrafts": { + "methods": ["listDrafts", "listDrafts", "listDrafts", "listDraftsPagedCallable", "listDraftsCallable"] + }, + "ListInstances": { + "methods": ["listInstances", "listInstances", "listInstances", "listInstancesPagedCallable", "listInstancesCallable"] + }, + "ListPrebuiltProcessors": { + "methods": ["listPrebuiltProcessors", "listPrebuiltProcessors", "listPrebuiltProcessors", "listPrebuiltProcessorsCallable"] + }, + "ListProcessors": { + "methods": ["listProcessors", "listProcessors", "listProcessors", "listProcessorsPagedCallable", "listProcessorsCallable"] + }, + "RemoveApplicationStreamInput": { + "methods": ["removeApplicationStreamInputAsync", "removeApplicationStreamInputAsync", "removeApplicationStreamInputAsync", "removeApplicationStreamInputOperationCallable", "removeApplicationStreamInputCallable"] + }, + "UndeployApplication": { + "methods": ["undeployApplicationAsync", "undeployApplicationAsync", "undeployApplicationAsync", "undeployApplicationOperationCallable", "undeployApplicationCallable"] + }, + "UpdateApplication": { + "methods": ["updateApplicationAsync", "updateApplicationAsync", "updateApplicationOperationCallable", "updateApplicationCallable"] + }, + "UpdateApplicationInstances": { + "methods": ["updateApplicationInstancesAsync", "updateApplicationInstancesAsync", "updateApplicationInstancesAsync", "updateApplicationInstancesOperationCallable", "updateApplicationInstancesCallable"] + }, + "UpdateApplicationStreamInput": { + "methods": ["updateApplicationStreamInputAsync", "updateApplicationStreamInputAsync", "updateApplicationStreamInputAsync", "updateApplicationStreamInputOperationCallable", "updateApplicationStreamInputCallable"] + }, + "UpdateDraft": { + "methods": ["updateDraftAsync", "updateDraftAsync", "updateDraftOperationCallable", "updateDraftCallable"] + }, + "UpdateProcessor": { + "methods": ["updateProcessorAsync", "updateProcessorAsync", "updateProcessorOperationCallable", "updateProcessorCallable"] + } + } + } + } + }, + "StreamingService": { + "clients": { + "grpc": { + "libraryClient": "StreamingServiceClient", + "rpcs": { + "AcquireLease": { + "methods": ["acquireLease", "acquireLeaseCallable"] + }, + "ReceiveEvents": { + "methods": ["receiveEventsCallable"] + }, + "ReceivePackets": { + "methods": ["receivePacketsCallable"] + }, + "ReleaseLease": { + "methods": ["releaseLease", "releaseLeaseCallable"] + }, + "RenewLease": { + "methods": ["renewLease", "renewLeaseCallable"] + }, + "SendPackets": { + "methods": ["sendPacketsCallable"] + } + } + } + } + }, + "StreamsService": { + "clients": { + "grpc": { + "libraryClient": "StreamsServiceClient", + "rpcs": { + "CreateCluster": { + "methods": ["createClusterAsync", "createClusterAsync", "createClusterAsync", "createClusterOperationCallable", "createClusterCallable"] + }, + "CreateEvent": { + "methods": ["createEventAsync", "createEventAsync", "createEventAsync", "createEventOperationCallable", "createEventCallable"] + }, + "CreateSeries": { + "methods": ["createSeriesAsync", "createSeriesAsync", "createSeriesAsync", "createSeriesOperationCallable", "createSeriesCallable"] + }, + "CreateStream": { + "methods": ["createStreamAsync", "createStreamAsync", "createStreamAsync", "createStreamOperationCallable", "createStreamCallable"] + }, + "DeleteCluster": { + "methods": ["deleteClusterAsync", "deleteClusterAsync", "deleteClusterAsync", "deleteClusterOperationCallable", "deleteClusterCallable"] + }, + "DeleteEvent": { + "methods": ["deleteEventAsync", "deleteEventAsync", "deleteEventAsync", "deleteEventOperationCallable", "deleteEventCallable"] + }, + "DeleteSeries": { + "methods": ["deleteSeriesAsync", "deleteSeriesAsync", "deleteSeriesAsync", "deleteSeriesOperationCallable", "deleteSeriesCallable"] + }, + "DeleteStream": { + "methods": ["deleteStreamAsync", "deleteStreamAsync", "deleteStreamAsync", "deleteStreamOperationCallable", "deleteStreamCallable"] + }, + "GenerateStreamHlsToken": { + "methods": ["generateStreamHlsToken", "generateStreamHlsToken", "generateStreamHlsTokenCallable"] + }, + "GetCluster": { + "methods": ["getCluster", "getCluster", "getCluster", "getClusterCallable"] + }, + "GetEvent": { + "methods": ["getEvent", "getEvent", "getEvent", "getEventCallable"] + }, + "GetSeries": { + "methods": ["getSeries", "getSeries", "getSeries", "getSeriesCallable"] + }, + "GetStream": { + "methods": ["getStream", "getStream", "getStream", "getStreamCallable"] + }, + "GetStreamThumbnail": { + "methods": ["getStreamThumbnailAsync", "getStreamThumbnailAsync", "getStreamThumbnailOperationCallable", "getStreamThumbnailCallable"] + }, + "ListClusters": { + "methods": ["listClusters", "listClusters", "listClusters", "listClustersPagedCallable", "listClustersCallable"] + }, + "ListEvents": { + "methods": ["listEvents", "listEvents", "listEvents", "listEventsPagedCallable", "listEventsCallable"] + }, + "ListSeries": { + "methods": ["listSeries", "listSeries", "listSeries", "listSeriesPagedCallable", "listSeriesCallable"] + }, + "ListStreams": { + "methods": ["listStreams", "listStreams", "listStreams", "listStreamsPagedCallable", "listStreamsCallable"] + }, + "MaterializeChannel": { + "methods": ["materializeChannelAsync", "materializeChannelAsync", "materializeChannelAsync", "materializeChannelOperationCallable", "materializeChannelCallable"] + }, + "UpdateCluster": { + "methods": ["updateClusterAsync", "updateClusterAsync", "updateClusterOperationCallable", "updateClusterCallable"] + }, + "UpdateEvent": { + "methods": ["updateEventAsync", "updateEventAsync", "updateEventOperationCallable", "updateEventCallable"] + }, + "UpdateSeries": { + "methods": ["updateSeriesAsync", "updateSeriesAsync", "updateSeriesOperationCallable", "updateSeriesCallable"] + }, + "UpdateStream": { + "methods": ["updateStreamAsync", "updateStreamAsync", "updateStreamOperationCallable", "updateStreamCallable"] + } + } + } + } + }, + "Warehouse": { + "clients": { + "grpc": { + "libraryClient": "WarehouseClient", + "rpcs": { + "AddCollectionItem": { + "methods": ["addCollectionItem", "addCollectionItem", "addCollectionItemCallable"] + }, + "AnalyzeAsset": { + "methods": ["analyzeAssetAsync", "analyzeAssetOperationCallable", "analyzeAssetCallable"] + }, + "AnalyzeCorpus": { + "methods": ["analyzeCorpusAsync", "analyzeCorpusOperationCallable", "analyzeCorpusCallable"] + }, + "ClipAsset": { + "methods": ["clipAsset", "clipAssetCallable"] + }, + "CreateAnnotation": { + "methods": ["createAnnotation", "createAnnotation", "createAnnotation", "createAnnotationCallable"] + }, + "CreateAsset": { + "methods": ["createAsset", "createAsset", "createAsset", "createAssetCallable"] + }, + "CreateCollection": { + "methods": ["createCollectionAsync", "createCollectionAsync", "createCollectionAsync", "createCollectionOperationCallable", "createCollectionCallable"] + }, + "CreateCorpus": { + "methods": ["createCorpusAsync", "createCorpusAsync", "createCorpusOperationCallable", "createCorpusCallable"] + }, + "CreateDataSchema": { + "methods": ["createDataSchema", "createDataSchema", "createDataSchema", "createDataSchemaCallable"] + }, + "CreateIndex": { + "methods": ["createIndexAsync", "createIndexAsync", "createIndexAsync", "createIndexOperationCallable", "createIndexCallable"] + }, + "CreateIndexEndpoint": { + "methods": ["createIndexEndpointAsync", "createIndexEndpointAsync", "createIndexEndpointAsync", "createIndexEndpointOperationCallable", "createIndexEndpointCallable"] + }, + "CreateSearchConfig": { + "methods": ["createSearchConfig", "createSearchConfig", "createSearchConfig", "createSearchConfigCallable"] + }, + "CreateSearchHypernym": { + "methods": ["createSearchHypernym", "createSearchHypernym", "createSearchHypernym", "createSearchHypernymCallable"] + }, + "DeleteAnnotation": { + "methods": ["deleteAnnotation", "deleteAnnotation", "deleteAnnotation", "deleteAnnotationCallable"] + }, + "DeleteAsset": { + "methods": ["deleteAssetAsync", "deleteAssetAsync", "deleteAssetAsync", "deleteAssetOperationCallable", "deleteAssetCallable"] + }, + "DeleteCollection": { + "methods": ["deleteCollectionAsync", "deleteCollectionAsync", "deleteCollectionAsync", "deleteCollectionOperationCallable", "deleteCollectionCallable"] + }, + "DeleteCorpus": { + "methods": ["deleteCorpus", "deleteCorpus", "deleteCorpus", "deleteCorpusCallable"] + }, + "DeleteDataSchema": { + "methods": ["deleteDataSchema", "deleteDataSchema", "deleteDataSchema", "deleteDataSchemaCallable"] + }, + "DeleteIndex": { + "methods": ["deleteIndexAsync", "deleteIndexAsync", "deleteIndexAsync", "deleteIndexOperationCallable", "deleteIndexCallable"] + }, + "DeleteIndexEndpoint": { + "methods": ["deleteIndexEndpointAsync", "deleteIndexEndpointAsync", "deleteIndexEndpointAsync", "deleteIndexEndpointOperationCallable", "deleteIndexEndpointCallable"] + }, + "DeleteSearchConfig": { + "methods": ["deleteSearchConfig", "deleteSearchConfig", "deleteSearchConfig", "deleteSearchConfigCallable"] + }, + "DeleteSearchHypernym": { + "methods": ["deleteSearchHypernym", "deleteSearchHypernym", "deleteSearchHypernym", "deleteSearchHypernymCallable"] + }, + "DeployIndex": { + "methods": ["deployIndexAsync", "deployIndexOperationCallable", "deployIndexCallable"] + }, + "GenerateHlsUri": { + "methods": ["generateHlsUri", "generateHlsUriCallable"] + }, + "GenerateRetrievalUrl": { + "methods": ["generateRetrievalUrl", "generateRetrievalUrlCallable"] + }, + "GetAnnotation": { + "methods": ["getAnnotation", "getAnnotation", "getAnnotation", "getAnnotationCallable"] + }, + "GetAsset": { + "methods": ["getAsset", "getAsset", "getAsset", "getAssetCallable"] + }, + "GetCollection": { + "methods": ["getCollection", "getCollection", "getCollection", "getCollectionCallable"] + }, + "GetCorpus": { + "methods": ["getCorpus", "getCorpus", "getCorpus", "getCorpusCallable"] + }, + "GetDataSchema": { + "methods": ["getDataSchema", "getDataSchema", "getDataSchema", "getDataSchemaCallable"] + }, + "GetIndex": { + "methods": ["getIndex", "getIndex", "getIndex", "getIndexCallable"] + }, + "GetIndexEndpoint": { + "methods": ["getIndexEndpoint", "getIndexEndpoint", "getIndexEndpoint", "getIndexEndpointCallable"] + }, + "GetSearchConfig": { + "methods": ["getSearchConfig", "getSearchConfig", "getSearchConfig", "getSearchConfigCallable"] + }, + "GetSearchHypernym": { + "methods": ["getSearchHypernym", "getSearchHypernym", "getSearchHypernym", "getSearchHypernymCallable"] + }, + "ImportAssets": { + "methods": ["importAssetsAsync", "importAssetsOperationCallable", "importAssetsCallable"] + }, + "IndexAsset": { + "methods": ["indexAssetAsync", "indexAssetOperationCallable", "indexAssetCallable"] + }, + "IngestAsset": { + "methods": ["ingestAssetCallable"] + }, + "ListAnnotations": { + "methods": ["listAnnotations", "listAnnotations", "listAnnotations", "listAnnotationsPagedCallable", "listAnnotationsCallable"] + }, + "ListAssets": { + "methods": ["listAssets", "listAssets", "listAssets", "listAssetsPagedCallable", "listAssetsCallable"] + }, + "ListCollections": { + "methods": ["listCollections", "listCollections", "listCollections", "listCollectionsPagedCallable", "listCollectionsCallable"] + }, + "ListCorpora": { + "methods": ["listCorpora", "listCorpora", "listCorporaPagedCallable", "listCorporaCallable"] + }, + "ListDataSchemas": { + "methods": ["listDataSchemas", "listDataSchemas", "listDataSchemas", "listDataSchemasPagedCallable", "listDataSchemasCallable"] + }, + "ListIndexEndpoints": { + "methods": ["listIndexEndpoints", "listIndexEndpoints", "listIndexEndpoints", "listIndexEndpointsPagedCallable", "listIndexEndpointsCallable"] + }, + "ListIndexes": { + "methods": ["listIndexes", "listIndexes", "listIndexes", "listIndexesPagedCallable", "listIndexesCallable"] + }, + "ListSearchConfigs": { + "methods": ["listSearchConfigs", "listSearchConfigs", "listSearchConfigs", "listSearchConfigsPagedCallable", "listSearchConfigsCallable"] + }, + "ListSearchHypernyms": { + "methods": ["listSearchHypernyms", "listSearchHypernyms", "listSearchHypernyms", "listSearchHypernymsPagedCallable", "listSearchHypernymsCallable"] + }, + "RemoveCollectionItem": { + "methods": ["removeCollectionItem", "removeCollectionItem", "removeCollectionItemCallable"] + }, + "RemoveIndexAsset": { + "methods": ["removeIndexAssetAsync", "removeIndexAssetOperationCallable", "removeIndexAssetCallable"] + }, + "SearchAssets": { + "methods": ["searchAssets", "searchAssetsPagedCallable", "searchAssetsCallable"] + }, + "SearchIndexEndpoint": { + "methods": ["searchIndexEndpoint", "searchIndexEndpointPagedCallable", "searchIndexEndpointCallable"] + }, + "UndeployIndex": { + "methods": ["undeployIndexAsync", "undeployIndexOperationCallable", "undeployIndexCallable"] + }, + "UpdateAnnotation": { + "methods": ["updateAnnotation", "updateAnnotation", "updateAnnotationCallable"] + }, + "UpdateAsset": { + "methods": ["updateAsset", "updateAsset", "updateAssetCallable"] + }, + "UpdateCollection": { + "methods": ["updateCollection", "updateCollection", "updateCollectionCallable"] + }, + "UpdateCorpus": { + "methods": ["updateCorpus", "updateCorpus", "updateCorpusCallable"] + }, + "UpdateDataSchema": { + "methods": ["updateDataSchema", "updateDataSchema", "updateDataSchemaCallable"] + }, + "UpdateIndex": { + "methods": ["updateIndexAsync", "updateIndexAsync", "updateIndexOperationCallable", "updateIndexCallable"] + }, + "UpdateIndexEndpoint": { + "methods": ["updateIndexEndpointAsync", "updateIndexEndpointAsync", "updateIndexEndpointOperationCallable", "updateIndexEndpointCallable"] + }, + "UpdateSearchConfig": { + "methods": ["updateSearchConfig", "updateSearchConfig", "updateSearchConfigCallable"] + }, + "UpdateSearchHypernym": { + "methods": ["updateSearchHypernym", "updateSearchHypernym", "updateSearchHypernymCallable"] + }, + "UploadAsset": { + "methods": ["uploadAssetAsync", "uploadAssetOperationCallable", "uploadAssetCallable"] + }, + "ViewCollectionItems": { + "methods": ["viewCollectionItems", "viewCollectionItems", "viewCollectionItems", "viewCollectionItemsPagedCallable", "viewCollectionItemsCallable"] + }, + "ViewIndexedAssets": { + "methods": ["viewIndexedAssets", "viewIndexedAssets", "viewIndexedAssets", "viewIndexedAssetsPagedCallable", "viewIndexedAssetsCallable"] + } + } + } + } + } + } +} \ No newline at end of file diff --git a/java-visionai/google-cloud-visionai/src/main/java/com/google/cloud/visionai/v1/package-info.java b/java-visionai/google-cloud-visionai/src/main/java/com/google/cloud/visionai/v1/package-info.java new file mode 100644 index 000000000000..15072ff35947 --- /dev/null +++ b/java-visionai/google-cloud-visionai/src/main/java/com/google/cloud/visionai/v1/package-info.java @@ -0,0 +1,151 @@ +/* + * Copyright 2024 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 Vision AI API + * + *

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

======================= HealthCheckServiceClient ======================= + * + *

Service Description: HealthCheckService provides an interface for Vertex AI Vision Cluster + * Health Check. + * + *

Sample for HealthCheckServiceClient: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (HealthCheckServiceClient healthCheckServiceClient = HealthCheckServiceClient.create()) {
+ *   HealthCheckRequest request =
+ *       HealthCheckRequest.newBuilder()
+ *           .setCluster(ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString())
+ *           .build();
+ *   HealthCheckResponse response = healthCheckServiceClient.healthCheck(request);
+ * }
+ * }
+ * + *

======================= LiveVideoAnalyticsClient ======================= + * + *

Service Description: Service describing handlers for resources. The service enables clients to + * run Live Video Analytics (LVA) on the streaming inputs. + * + *

Sample for LiveVideoAnalyticsClient: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (LiveVideoAnalyticsClient liveVideoAnalyticsClient = LiveVideoAnalyticsClient.create()) {
+ *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+ *   List queries = new ArrayList<>();
+ *   ResolveOperatorInfoResponse response =
+ *       liveVideoAnalyticsClient.resolveOperatorInfo(parent, queries);
+ * }
+ * }
+ * + *

======================= AppPlatformClient ======================= + * + *

Service Description: Service describing handlers for resources + * + *

Sample for AppPlatformClient: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (AppPlatformClient appPlatformClient = AppPlatformClient.create()) {
+ *   ApplicationName name = ApplicationName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]");
+ *   Application response = appPlatformClient.getApplication(name);
+ * }
+ * }
+ * + *

======================= StreamingServiceClient ======================= + * + *

Service Description: Streaming service for receiving and sending packets. + * + *

Sample for StreamingServiceClient: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (StreamingServiceClient streamingServiceClient = StreamingServiceClient.create()) {
+ *   AcquireLeaseRequest request =
+ *       AcquireLeaseRequest.newBuilder()
+ *           .setSeries("series-905838985")
+ *           .setOwner("owner106164915")
+ *           .setTerm(Duration.newBuilder().build())
+ *           .setLeaseType(LeaseType.forNumber(0))
+ *           .build();
+ *   Lease response = streamingServiceClient.acquireLease(request);
+ * }
+ * }
+ * + *

======================= StreamsServiceClient ======================= + * + *

Service Description: Service describing handlers for resources. Vision API and Vision AI API + * are two independent APIs developed by the same team. Vision API is for people to annotate their + * image while Vision AI is an e2e solution for customer to build their own computer vision + * application. + * + *

Sample for StreamsServiceClient: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (StreamsServiceClient streamsServiceClient = StreamsServiceClient.create()) {
+ *   ClusterName name = ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]");
+ *   Cluster response = streamsServiceClient.getCluster(name);
+ * }
+ * }
+ * + *

======================= WarehouseClient ======================= + * + *

Service Description: Service that manages media content + metadata for streaming. + * + *

Sample for WarehouseClient: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (WarehouseClient warehouseClient = WarehouseClient.create()) {
+ *   CorpusName parent = CorpusName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]");
+ *   Asset asset = Asset.newBuilder().build();
+ *   String assetId = "assetId-704776149";
+ *   Asset response = warehouseClient.createAsset(parent, asset, assetId);
+ * }
+ * }
+ */ +@Generated("by gapic-generator-java") +package com.google.cloud.visionai.v1; + +import javax.annotation.Generated; diff --git a/java-visionai/google-cloud-visionai/src/main/java/com/google/cloud/visionai/v1/stub/AppPlatformStub.java b/java-visionai/google-cloud-visionai/src/main/java/com/google/cloud/visionai/v1/stub/AppPlatformStub.java new file mode 100644 index 000000000000..a9feedaf1fdb --- /dev/null +++ b/java-visionai/google-cloud-visionai/src/main/java/com/google/cloud/visionai/v1/stub/AppPlatformStub.java @@ -0,0 +1,336 @@ +/* + * Copyright 2024 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.visionai.v1.stub; + +import static com.google.cloud.visionai.v1.AppPlatformClient.ListApplicationsPagedResponse; +import static com.google.cloud.visionai.v1.AppPlatformClient.ListDraftsPagedResponse; +import static com.google.cloud.visionai.v1.AppPlatformClient.ListInstancesPagedResponse; +import static com.google.cloud.visionai.v1.AppPlatformClient.ListProcessorsPagedResponse; + +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.visionai.v1.AddApplicationStreamInputRequest; +import com.google.cloud.visionai.v1.AddApplicationStreamInputResponse; +import com.google.cloud.visionai.v1.Application; +import com.google.cloud.visionai.v1.CreateApplicationInstancesRequest; +import com.google.cloud.visionai.v1.CreateApplicationInstancesResponse; +import com.google.cloud.visionai.v1.CreateApplicationRequest; +import com.google.cloud.visionai.v1.CreateDraftRequest; +import com.google.cloud.visionai.v1.CreateProcessorRequest; +import com.google.cloud.visionai.v1.DeleteApplicationInstancesRequest; +import com.google.cloud.visionai.v1.DeleteApplicationRequest; +import com.google.cloud.visionai.v1.DeleteDraftRequest; +import com.google.cloud.visionai.v1.DeleteProcessorRequest; +import com.google.cloud.visionai.v1.DeployApplicationRequest; +import com.google.cloud.visionai.v1.DeployApplicationResponse; +import com.google.cloud.visionai.v1.Draft; +import com.google.cloud.visionai.v1.GetApplicationRequest; +import com.google.cloud.visionai.v1.GetDraftRequest; +import com.google.cloud.visionai.v1.GetInstanceRequest; +import com.google.cloud.visionai.v1.GetProcessorRequest; +import com.google.cloud.visionai.v1.Instance; +import com.google.cloud.visionai.v1.ListApplicationsRequest; +import com.google.cloud.visionai.v1.ListApplicationsResponse; +import com.google.cloud.visionai.v1.ListDraftsRequest; +import com.google.cloud.visionai.v1.ListDraftsResponse; +import com.google.cloud.visionai.v1.ListInstancesRequest; +import com.google.cloud.visionai.v1.ListInstancesResponse; +import com.google.cloud.visionai.v1.ListPrebuiltProcessorsRequest; +import com.google.cloud.visionai.v1.ListPrebuiltProcessorsResponse; +import com.google.cloud.visionai.v1.ListProcessorsRequest; +import com.google.cloud.visionai.v1.ListProcessorsResponse; +import com.google.cloud.visionai.v1.OperationMetadata; +import com.google.cloud.visionai.v1.Processor; +import com.google.cloud.visionai.v1.RemoveApplicationStreamInputRequest; +import com.google.cloud.visionai.v1.RemoveApplicationStreamInputResponse; +import com.google.cloud.visionai.v1.UndeployApplicationRequest; +import com.google.cloud.visionai.v1.UndeployApplicationResponse; +import com.google.cloud.visionai.v1.UpdateApplicationInstancesRequest; +import com.google.cloud.visionai.v1.UpdateApplicationInstancesResponse; +import com.google.cloud.visionai.v1.UpdateApplicationRequest; +import com.google.cloud.visionai.v1.UpdateApplicationStreamInputRequest; +import com.google.cloud.visionai.v1.UpdateApplicationStreamInputResponse; +import com.google.cloud.visionai.v1.UpdateDraftRequest; +import com.google.cloud.visionai.v1.UpdateProcessorRequest; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.OperationsStub; +import com.google.protobuf.Empty; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Base stub class for the AppPlatform service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") +public abstract class AppPlatformStub implements BackgroundResource { + + public OperationsStub getOperationsStub() { + return null; + } + + public com.google.api.gax.httpjson.longrunning.stub.OperationsStub getHttpJsonOperationsStub() { + return null; + } + + public UnaryCallable + listApplicationsPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listApplicationsPagedCallable()"); + } + + public UnaryCallable + listApplicationsCallable() { + throw new UnsupportedOperationException("Not implemented: listApplicationsCallable()"); + } + + public UnaryCallable getApplicationCallable() { + throw new UnsupportedOperationException("Not implemented: getApplicationCallable()"); + } + + public OperationCallable + createApplicationOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: createApplicationOperationCallable()"); + } + + public UnaryCallable createApplicationCallable() { + throw new UnsupportedOperationException("Not implemented: createApplicationCallable()"); + } + + public OperationCallable + updateApplicationOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: updateApplicationOperationCallable()"); + } + + public UnaryCallable updateApplicationCallable() { + throw new UnsupportedOperationException("Not implemented: updateApplicationCallable()"); + } + + public OperationCallable + deleteApplicationOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: deleteApplicationOperationCallable()"); + } + + public UnaryCallable deleteApplicationCallable() { + throw new UnsupportedOperationException("Not implemented: deleteApplicationCallable()"); + } + + public OperationCallable + deployApplicationOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: deployApplicationOperationCallable()"); + } + + public UnaryCallable deployApplicationCallable() { + throw new UnsupportedOperationException("Not implemented: deployApplicationCallable()"); + } + + public OperationCallable< + UndeployApplicationRequest, UndeployApplicationResponse, OperationMetadata> + undeployApplicationOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: undeployApplicationOperationCallable()"); + } + + public UnaryCallable undeployApplicationCallable() { + throw new UnsupportedOperationException("Not implemented: undeployApplicationCallable()"); + } + + public OperationCallable< + AddApplicationStreamInputRequest, AddApplicationStreamInputResponse, OperationMetadata> + addApplicationStreamInputOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: addApplicationStreamInputOperationCallable()"); + } + + public UnaryCallable + addApplicationStreamInputCallable() { + throw new UnsupportedOperationException("Not implemented: addApplicationStreamInputCallable()"); + } + + public OperationCallable< + RemoveApplicationStreamInputRequest, + RemoveApplicationStreamInputResponse, + OperationMetadata> + removeApplicationStreamInputOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: removeApplicationStreamInputOperationCallable()"); + } + + public UnaryCallable + removeApplicationStreamInputCallable() { + throw new UnsupportedOperationException( + "Not implemented: removeApplicationStreamInputCallable()"); + } + + public OperationCallable< + UpdateApplicationStreamInputRequest, + UpdateApplicationStreamInputResponse, + OperationMetadata> + updateApplicationStreamInputOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: updateApplicationStreamInputOperationCallable()"); + } + + public UnaryCallable + updateApplicationStreamInputCallable() { + throw new UnsupportedOperationException( + "Not implemented: updateApplicationStreamInputCallable()"); + } + + public UnaryCallable + listInstancesPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listInstancesPagedCallable()"); + } + + public UnaryCallable listInstancesCallable() { + throw new UnsupportedOperationException("Not implemented: listInstancesCallable()"); + } + + public UnaryCallable getInstanceCallable() { + throw new UnsupportedOperationException("Not implemented: getInstanceCallable()"); + } + + public OperationCallable< + CreateApplicationInstancesRequest, CreateApplicationInstancesResponse, OperationMetadata> + createApplicationInstancesOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: createApplicationInstancesOperationCallable()"); + } + + public UnaryCallable + createApplicationInstancesCallable() { + throw new UnsupportedOperationException( + "Not implemented: createApplicationInstancesCallable()"); + } + + public OperationCallable + deleteApplicationInstancesOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: deleteApplicationInstancesOperationCallable()"); + } + + public UnaryCallable + deleteApplicationInstancesCallable() { + throw new UnsupportedOperationException( + "Not implemented: deleteApplicationInstancesCallable()"); + } + + public OperationCallable< + UpdateApplicationInstancesRequest, UpdateApplicationInstancesResponse, OperationMetadata> + updateApplicationInstancesOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: updateApplicationInstancesOperationCallable()"); + } + + public UnaryCallable + updateApplicationInstancesCallable() { + throw new UnsupportedOperationException( + "Not implemented: updateApplicationInstancesCallable()"); + } + + public UnaryCallable listDraftsPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listDraftsPagedCallable()"); + } + + public UnaryCallable listDraftsCallable() { + throw new UnsupportedOperationException("Not implemented: listDraftsCallable()"); + } + + public UnaryCallable getDraftCallable() { + throw new UnsupportedOperationException("Not implemented: getDraftCallable()"); + } + + public OperationCallable + createDraftOperationCallable() { + throw new UnsupportedOperationException("Not implemented: createDraftOperationCallable()"); + } + + public UnaryCallable createDraftCallable() { + throw new UnsupportedOperationException("Not implemented: createDraftCallable()"); + } + + public OperationCallable + updateDraftOperationCallable() { + throw new UnsupportedOperationException("Not implemented: updateDraftOperationCallable()"); + } + + public UnaryCallable updateDraftCallable() { + throw new UnsupportedOperationException("Not implemented: updateDraftCallable()"); + } + + public OperationCallable + deleteDraftOperationCallable() { + throw new UnsupportedOperationException("Not implemented: deleteDraftOperationCallable()"); + } + + public UnaryCallable deleteDraftCallable() { + throw new UnsupportedOperationException("Not implemented: deleteDraftCallable()"); + } + + public UnaryCallable + listProcessorsPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listProcessorsPagedCallable()"); + } + + public UnaryCallable listProcessorsCallable() { + throw new UnsupportedOperationException("Not implemented: listProcessorsCallable()"); + } + + public UnaryCallable + listPrebuiltProcessorsCallable() { + throw new UnsupportedOperationException("Not implemented: listPrebuiltProcessorsCallable()"); + } + + public UnaryCallable getProcessorCallable() { + throw new UnsupportedOperationException("Not implemented: getProcessorCallable()"); + } + + public OperationCallable + createProcessorOperationCallable() { + throw new UnsupportedOperationException("Not implemented: createProcessorOperationCallable()"); + } + + public UnaryCallable createProcessorCallable() { + throw new UnsupportedOperationException("Not implemented: createProcessorCallable()"); + } + + public OperationCallable + updateProcessorOperationCallable() { + throw new UnsupportedOperationException("Not implemented: updateProcessorOperationCallable()"); + } + + public UnaryCallable updateProcessorCallable() { + throw new UnsupportedOperationException("Not implemented: updateProcessorCallable()"); + } + + public OperationCallable + deleteProcessorOperationCallable() { + throw new UnsupportedOperationException("Not implemented: deleteProcessorOperationCallable()"); + } + + public UnaryCallable deleteProcessorCallable() { + throw new UnsupportedOperationException("Not implemented: deleteProcessorCallable()"); + } + + @Override + public abstract void close(); +} diff --git a/java-visionai/google-cloud-visionai/src/main/java/com/google/cloud/visionai/v1/stub/AppPlatformStubSettings.java b/java-visionai/google-cloud-visionai/src/main/java/com/google/cloud/visionai/v1/stub/AppPlatformStubSettings.java new file mode 100644 index 000000000000..31e0002a34d0 --- /dev/null +++ b/java-visionai/google-cloud-visionai/src/main/java/com/google/cloud/visionai/v1/stub/AppPlatformStubSettings.java @@ -0,0 +1,2043 @@ +/* + * Copyright 2024 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.visionai.v1.stub; + +import static com.google.cloud.visionai.v1.AppPlatformClient.ListApplicationsPagedResponse; +import static com.google.cloud.visionai.v1.AppPlatformClient.ListDraftsPagedResponse; +import static com.google.cloud.visionai.v1.AppPlatformClient.ListInstancesPagedResponse; +import static com.google.cloud.visionai.v1.AppPlatformClient.ListProcessorsPagedResponse; + +import com.google.api.core.ApiFunction; +import com.google.api.core.ApiFuture; +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.httpjson.GaxHttpJsonProperties; +import com.google.api.gax.httpjson.HttpJsonTransportChannel; +import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider; +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.ApiCallContext; +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.PageContext; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.PagedListDescriptor; +import com.google.api.gax.rpc.PagedListResponseFactory; +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.api.gax.rpc.UnaryCallable; +import com.google.cloud.visionai.v1.AddApplicationStreamInputRequest; +import com.google.cloud.visionai.v1.AddApplicationStreamInputResponse; +import com.google.cloud.visionai.v1.Application; +import com.google.cloud.visionai.v1.CreateApplicationInstancesRequest; +import com.google.cloud.visionai.v1.CreateApplicationInstancesResponse; +import com.google.cloud.visionai.v1.CreateApplicationRequest; +import com.google.cloud.visionai.v1.CreateDraftRequest; +import com.google.cloud.visionai.v1.CreateProcessorRequest; +import com.google.cloud.visionai.v1.DeleteApplicationInstancesRequest; +import com.google.cloud.visionai.v1.DeleteApplicationRequest; +import com.google.cloud.visionai.v1.DeleteDraftRequest; +import com.google.cloud.visionai.v1.DeleteProcessorRequest; +import com.google.cloud.visionai.v1.DeployApplicationRequest; +import com.google.cloud.visionai.v1.DeployApplicationResponse; +import com.google.cloud.visionai.v1.Draft; +import com.google.cloud.visionai.v1.GetApplicationRequest; +import com.google.cloud.visionai.v1.GetDraftRequest; +import com.google.cloud.visionai.v1.GetInstanceRequest; +import com.google.cloud.visionai.v1.GetProcessorRequest; +import com.google.cloud.visionai.v1.Instance; +import com.google.cloud.visionai.v1.ListApplicationsRequest; +import com.google.cloud.visionai.v1.ListApplicationsResponse; +import com.google.cloud.visionai.v1.ListDraftsRequest; +import com.google.cloud.visionai.v1.ListDraftsResponse; +import com.google.cloud.visionai.v1.ListInstancesRequest; +import com.google.cloud.visionai.v1.ListInstancesResponse; +import com.google.cloud.visionai.v1.ListPrebuiltProcessorsRequest; +import com.google.cloud.visionai.v1.ListPrebuiltProcessorsResponse; +import com.google.cloud.visionai.v1.ListProcessorsRequest; +import com.google.cloud.visionai.v1.ListProcessorsResponse; +import com.google.cloud.visionai.v1.OperationMetadata; +import com.google.cloud.visionai.v1.Processor; +import com.google.cloud.visionai.v1.RemoveApplicationStreamInputRequest; +import com.google.cloud.visionai.v1.RemoveApplicationStreamInputResponse; +import com.google.cloud.visionai.v1.UndeployApplicationRequest; +import com.google.cloud.visionai.v1.UndeployApplicationResponse; +import com.google.cloud.visionai.v1.UpdateApplicationInstancesRequest; +import com.google.cloud.visionai.v1.UpdateApplicationInstancesResponse; +import com.google.cloud.visionai.v1.UpdateApplicationRequest; +import com.google.cloud.visionai.v1.UpdateApplicationStreamInputRequest; +import com.google.cloud.visionai.v1.UpdateApplicationStreamInputResponse; +import com.google.cloud.visionai.v1.UpdateDraftRequest; +import com.google.cloud.visionai.v1.UpdateProcessorRequest; +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 com.google.protobuf.Empty; +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 AppPlatformStub}. + * + *

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

    + *
  • The default service address (visionai.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 getApplication to 30 seconds: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * AppPlatformStubSettings.Builder appPlatformSettingsBuilder =
+ *     AppPlatformStubSettings.newBuilder();
+ * appPlatformSettingsBuilder
+ *     .getApplicationSettings()
+ *     .setRetrySettings(
+ *         appPlatformSettingsBuilder
+ *             .getApplicationSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * AppPlatformStubSettings appPlatformSettings = appPlatformSettingsBuilder.build();
+ * }
+ */ +@Generated("by gapic-generator-java") +public class AppPlatformStubSettings 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 PagedCallSettings< + ListApplicationsRequest, ListApplicationsResponse, ListApplicationsPagedResponse> + listApplicationsSettings; + private final UnaryCallSettings getApplicationSettings; + private final UnaryCallSettings createApplicationSettings; + private final OperationCallSettings + createApplicationOperationSettings; + private final UnaryCallSettings updateApplicationSettings; + private final OperationCallSettings + updateApplicationOperationSettings; + private final UnaryCallSettings deleteApplicationSettings; + private final OperationCallSettings + deleteApplicationOperationSettings; + private final UnaryCallSettings deployApplicationSettings; + private final OperationCallSettings< + DeployApplicationRequest, DeployApplicationResponse, OperationMetadata> + deployApplicationOperationSettings; + private final UnaryCallSettings + undeployApplicationSettings; + private final OperationCallSettings< + UndeployApplicationRequest, UndeployApplicationResponse, OperationMetadata> + undeployApplicationOperationSettings; + private final UnaryCallSettings + addApplicationStreamInputSettings; + private final OperationCallSettings< + AddApplicationStreamInputRequest, AddApplicationStreamInputResponse, OperationMetadata> + addApplicationStreamInputOperationSettings; + private final UnaryCallSettings + removeApplicationStreamInputSettings; + private final OperationCallSettings< + RemoveApplicationStreamInputRequest, + RemoveApplicationStreamInputResponse, + OperationMetadata> + removeApplicationStreamInputOperationSettings; + private final UnaryCallSettings + updateApplicationStreamInputSettings; + private final OperationCallSettings< + UpdateApplicationStreamInputRequest, + UpdateApplicationStreamInputResponse, + OperationMetadata> + updateApplicationStreamInputOperationSettings; + private final PagedCallSettings< + ListInstancesRequest, ListInstancesResponse, ListInstancesPagedResponse> + listInstancesSettings; + private final UnaryCallSettings getInstanceSettings; + private final UnaryCallSettings + createApplicationInstancesSettings; + private final OperationCallSettings< + CreateApplicationInstancesRequest, CreateApplicationInstancesResponse, OperationMetadata> + createApplicationInstancesOperationSettings; + private final UnaryCallSettings + deleteApplicationInstancesSettings; + private final OperationCallSettings< + DeleteApplicationInstancesRequest, Instance, OperationMetadata> + deleteApplicationInstancesOperationSettings; + private final UnaryCallSettings + updateApplicationInstancesSettings; + private final OperationCallSettings< + UpdateApplicationInstancesRequest, UpdateApplicationInstancesResponse, OperationMetadata> + updateApplicationInstancesOperationSettings; + private final PagedCallSettings + listDraftsSettings; + private final UnaryCallSettings getDraftSettings; + private final UnaryCallSettings createDraftSettings; + private final OperationCallSettings + createDraftOperationSettings; + private final UnaryCallSettings updateDraftSettings; + private final OperationCallSettings + updateDraftOperationSettings; + private final UnaryCallSettings deleteDraftSettings; + private final OperationCallSettings + deleteDraftOperationSettings; + private final PagedCallSettings< + ListProcessorsRequest, ListProcessorsResponse, ListProcessorsPagedResponse> + listProcessorsSettings; + private final UnaryCallSettings + listPrebuiltProcessorsSettings; + private final UnaryCallSettings getProcessorSettings; + private final UnaryCallSettings createProcessorSettings; + private final OperationCallSettings + createProcessorOperationSettings; + private final UnaryCallSettings updateProcessorSettings; + private final OperationCallSettings + updateProcessorOperationSettings; + private final UnaryCallSettings deleteProcessorSettings; + private final OperationCallSettings + deleteProcessorOperationSettings; + + private static final PagedListDescriptor< + ListApplicationsRequest, ListApplicationsResponse, Application> + LIST_APPLICATIONS_PAGE_STR_DESC = + new PagedListDescriptor< + ListApplicationsRequest, ListApplicationsResponse, Application>() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListApplicationsRequest injectToken( + ListApplicationsRequest payload, String token) { + return ListApplicationsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListApplicationsRequest injectPageSize( + ListApplicationsRequest payload, int pageSize) { + return ListApplicationsRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListApplicationsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListApplicationsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListApplicationsResponse payload) { + return payload.getApplicationsList() == null + ? ImmutableList.of() + : payload.getApplicationsList(); + } + }; + + private static final PagedListDescriptor + LIST_INSTANCES_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListInstancesRequest injectToken(ListInstancesRequest payload, String token) { + return ListInstancesRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListInstancesRequest injectPageSize(ListInstancesRequest payload, int pageSize) { + return ListInstancesRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListInstancesRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListInstancesResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListInstancesResponse payload) { + return payload.getInstancesList() == null + ? ImmutableList.of() + : payload.getInstancesList(); + } + }; + + private static final PagedListDescriptor + LIST_DRAFTS_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListDraftsRequest injectToken(ListDraftsRequest payload, String token) { + return ListDraftsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListDraftsRequest injectPageSize(ListDraftsRequest payload, int pageSize) { + return ListDraftsRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListDraftsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListDraftsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListDraftsResponse payload) { + return payload.getDraftsList() == null + ? ImmutableList.of() + : payload.getDraftsList(); + } + }; + + private static final PagedListDescriptor + LIST_PROCESSORS_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListProcessorsRequest injectToken(ListProcessorsRequest payload, String token) { + return ListProcessorsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListProcessorsRequest injectPageSize( + ListProcessorsRequest payload, int pageSize) { + return ListProcessorsRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListProcessorsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListProcessorsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListProcessorsResponse payload) { + return payload.getProcessorsList() == null + ? ImmutableList.of() + : payload.getProcessorsList(); + } + }; + + private static final PagedListResponseFactory< + ListApplicationsRequest, ListApplicationsResponse, ListApplicationsPagedResponse> + LIST_APPLICATIONS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListApplicationsRequest, ListApplicationsResponse, ListApplicationsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListApplicationsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext + pageContext = + PageContext.create( + callable, LIST_APPLICATIONS_PAGE_STR_DESC, request, context); + return ListApplicationsPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListInstancesRequest, ListInstancesResponse, ListInstancesPagedResponse> + LIST_INSTANCES_PAGE_STR_FACT = + new PagedListResponseFactory< + ListInstancesRequest, ListInstancesResponse, ListInstancesPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListInstancesRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, LIST_INSTANCES_PAGE_STR_DESC, request, context); + return ListInstancesPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListDraftsRequest, ListDraftsResponse, ListDraftsPagedResponse> + LIST_DRAFTS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListDraftsRequest, ListDraftsResponse, ListDraftsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListDraftsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, LIST_DRAFTS_PAGE_STR_DESC, request, context); + return ListDraftsPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListProcessorsRequest, ListProcessorsResponse, ListProcessorsPagedResponse> + LIST_PROCESSORS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListProcessorsRequest, ListProcessorsResponse, ListProcessorsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListProcessorsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, LIST_PROCESSORS_PAGE_STR_DESC, request, context); + return ListProcessorsPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + /** Returns the object with the settings used for calls to listApplications. */ + public PagedCallSettings< + ListApplicationsRequest, ListApplicationsResponse, ListApplicationsPagedResponse> + listApplicationsSettings() { + return listApplicationsSettings; + } + + /** Returns the object with the settings used for calls to getApplication. */ + public UnaryCallSettings getApplicationSettings() { + return getApplicationSettings; + } + + /** Returns the object with the settings used for calls to createApplication. */ + public UnaryCallSettings createApplicationSettings() { + return createApplicationSettings; + } + + /** Returns the object with the settings used for calls to createApplication. */ + public OperationCallSettings + createApplicationOperationSettings() { + return createApplicationOperationSettings; + } + + /** Returns the object with the settings used for calls to updateApplication. */ + public UnaryCallSettings updateApplicationSettings() { + return updateApplicationSettings; + } + + /** Returns the object with the settings used for calls to updateApplication. */ + public OperationCallSettings + updateApplicationOperationSettings() { + return updateApplicationOperationSettings; + } + + /** Returns the object with the settings used for calls to deleteApplication. */ + public UnaryCallSettings deleteApplicationSettings() { + return deleteApplicationSettings; + } + + /** Returns the object with the settings used for calls to deleteApplication. */ + public OperationCallSettings + deleteApplicationOperationSettings() { + return deleteApplicationOperationSettings; + } + + /** Returns the object with the settings used for calls to deployApplication. */ + public UnaryCallSettings deployApplicationSettings() { + return deployApplicationSettings; + } + + /** Returns the object with the settings used for calls to deployApplication. */ + public OperationCallSettings< + DeployApplicationRequest, DeployApplicationResponse, OperationMetadata> + deployApplicationOperationSettings() { + return deployApplicationOperationSettings; + } + + /** Returns the object with the settings used for calls to undeployApplication. */ + public UnaryCallSettings undeployApplicationSettings() { + return undeployApplicationSettings; + } + + /** Returns the object with the settings used for calls to undeployApplication. */ + public OperationCallSettings< + UndeployApplicationRequest, UndeployApplicationResponse, OperationMetadata> + undeployApplicationOperationSettings() { + return undeployApplicationOperationSettings; + } + + /** Returns the object with the settings used for calls to addApplicationStreamInput. */ + public UnaryCallSettings + addApplicationStreamInputSettings() { + return addApplicationStreamInputSettings; + } + + /** Returns the object with the settings used for calls to addApplicationStreamInput. */ + public OperationCallSettings< + AddApplicationStreamInputRequest, AddApplicationStreamInputResponse, OperationMetadata> + addApplicationStreamInputOperationSettings() { + return addApplicationStreamInputOperationSettings; + } + + /** Returns the object with the settings used for calls to removeApplicationStreamInput. */ + public UnaryCallSettings + removeApplicationStreamInputSettings() { + return removeApplicationStreamInputSettings; + } + + /** Returns the object with the settings used for calls to removeApplicationStreamInput. */ + public OperationCallSettings< + RemoveApplicationStreamInputRequest, + RemoveApplicationStreamInputResponse, + OperationMetadata> + removeApplicationStreamInputOperationSettings() { + return removeApplicationStreamInputOperationSettings; + } + + /** Returns the object with the settings used for calls to updateApplicationStreamInput. */ + public UnaryCallSettings + updateApplicationStreamInputSettings() { + return updateApplicationStreamInputSettings; + } + + /** Returns the object with the settings used for calls to updateApplicationStreamInput. */ + public OperationCallSettings< + UpdateApplicationStreamInputRequest, + UpdateApplicationStreamInputResponse, + OperationMetadata> + updateApplicationStreamInputOperationSettings() { + return updateApplicationStreamInputOperationSettings; + } + + /** Returns the object with the settings used for calls to listInstances. */ + public PagedCallSettings + listInstancesSettings() { + return listInstancesSettings; + } + + /** Returns the object with the settings used for calls to getInstance. */ + public UnaryCallSettings getInstanceSettings() { + return getInstanceSettings; + } + + /** Returns the object with the settings used for calls to createApplicationInstances. */ + public UnaryCallSettings + createApplicationInstancesSettings() { + return createApplicationInstancesSettings; + } + + /** Returns the object with the settings used for calls to createApplicationInstances. */ + public OperationCallSettings< + CreateApplicationInstancesRequest, CreateApplicationInstancesResponse, OperationMetadata> + createApplicationInstancesOperationSettings() { + return createApplicationInstancesOperationSettings; + } + + /** Returns the object with the settings used for calls to deleteApplicationInstances. */ + public UnaryCallSettings + deleteApplicationInstancesSettings() { + return deleteApplicationInstancesSettings; + } + + /** Returns the object with the settings used for calls to deleteApplicationInstances. */ + public OperationCallSettings + deleteApplicationInstancesOperationSettings() { + return deleteApplicationInstancesOperationSettings; + } + + /** Returns the object with the settings used for calls to updateApplicationInstances. */ + public UnaryCallSettings + updateApplicationInstancesSettings() { + return updateApplicationInstancesSettings; + } + + /** Returns the object with the settings used for calls to updateApplicationInstances. */ + public OperationCallSettings< + UpdateApplicationInstancesRequest, UpdateApplicationInstancesResponse, OperationMetadata> + updateApplicationInstancesOperationSettings() { + return updateApplicationInstancesOperationSettings; + } + + /** Returns the object with the settings used for calls to listDrafts. */ + public PagedCallSettings + listDraftsSettings() { + return listDraftsSettings; + } + + /** Returns the object with the settings used for calls to getDraft. */ + public UnaryCallSettings getDraftSettings() { + return getDraftSettings; + } + + /** Returns the object with the settings used for calls to createDraft. */ + public UnaryCallSettings createDraftSettings() { + return createDraftSettings; + } + + /** Returns the object with the settings used for calls to createDraft. */ + public OperationCallSettings + createDraftOperationSettings() { + return createDraftOperationSettings; + } + + /** Returns the object with the settings used for calls to updateDraft. */ + public UnaryCallSettings updateDraftSettings() { + return updateDraftSettings; + } + + /** Returns the object with the settings used for calls to updateDraft. */ + public OperationCallSettings + updateDraftOperationSettings() { + return updateDraftOperationSettings; + } + + /** Returns the object with the settings used for calls to deleteDraft. */ + public UnaryCallSettings deleteDraftSettings() { + return deleteDraftSettings; + } + + /** Returns the object with the settings used for calls to deleteDraft. */ + public OperationCallSettings + deleteDraftOperationSettings() { + return deleteDraftOperationSettings; + } + + /** Returns the object with the settings used for calls to listProcessors. */ + public PagedCallSettings< + ListProcessorsRequest, ListProcessorsResponse, ListProcessorsPagedResponse> + listProcessorsSettings() { + return listProcessorsSettings; + } + + /** Returns the object with the settings used for calls to listPrebuiltProcessors. */ + public UnaryCallSettings + listPrebuiltProcessorsSettings() { + return listPrebuiltProcessorsSettings; + } + + /** Returns the object with the settings used for calls to getProcessor. */ + public UnaryCallSettings getProcessorSettings() { + return getProcessorSettings; + } + + /** Returns the object with the settings used for calls to createProcessor. */ + public UnaryCallSettings createProcessorSettings() { + return createProcessorSettings; + } + + /** Returns the object with the settings used for calls to createProcessor. */ + public OperationCallSettings + createProcessorOperationSettings() { + return createProcessorOperationSettings; + } + + /** Returns the object with the settings used for calls to updateProcessor. */ + public UnaryCallSettings updateProcessorSettings() { + return updateProcessorSettings; + } + + /** Returns the object with the settings used for calls to updateProcessor. */ + public OperationCallSettings + updateProcessorOperationSettings() { + return updateProcessorOperationSettings; + } + + /** Returns the object with the settings used for calls to deleteProcessor. */ + public UnaryCallSettings deleteProcessorSettings() { + return deleteProcessorSettings; + } + + /** Returns the object with the settings used for calls to deleteProcessor. */ + public OperationCallSettings + deleteProcessorOperationSettings() { + return deleteProcessorOperationSettings; + } + + public AppPlatformStub createStub() throws IOException { + if (getTransportChannelProvider() + .getTransportName() + .equals(GrpcTransportChannel.getGrpcTransportName())) { + return GrpcAppPlatformStub.create(this); + } + if (getTransportChannelProvider() + .getTransportName() + .equals(HttpJsonTransportChannel.getHttpJsonTransportName())) { + return HttpJsonAppPlatformStub.create(this); + } + throw new UnsupportedOperationException( + String.format( + "Transport not supported: %s", getTransportChannelProvider().getTransportName())); + } + + /** Returns the default service name. */ + @Override + public String getServiceName() { + return "visionai"; + } + + /** 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 "visionai.googleapis.com:443"; + } + + /** Returns the default mTLS service endpoint. */ + public static String getDefaultMtlsEndpoint() { + return "visionai.mtls.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) + .setUseJwtAccessWithScope(true); + } + + /** Returns a builder for the default gRPC ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return InstantiatingGrpcChannelProvider.newBuilder() + .setMaxInboundMessageSize(Integer.MAX_VALUE); + } + + /** Returns a builder for the default REST ChannelProvider for this service. */ + @BetaApi + public static InstantiatingHttpJsonChannelProvider.Builder + defaultHttpJsonTransportProviderBuilder() { + return InstantiatingHttpJsonChannelProvider.newBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return defaultGrpcTransportProviderBuilder().build(); + } + + public static ApiClientHeaderProvider.Builder defaultGrpcApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken( + "gapic", GaxProperties.getLibraryVersion(AppPlatformStubSettings.class)) + .setTransportToken( + GaxGrpcProperties.getGrpcTokenName(), GaxGrpcProperties.getGrpcVersion()); + } + + public static ApiClientHeaderProvider.Builder defaultHttpJsonApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken( + "gapic", GaxProperties.getLibraryVersion(AppPlatformStubSettings.class)) + .setTransportToken( + GaxHttpJsonProperties.getHttpJsonTokenName(), + GaxHttpJsonProperties.getHttpJsonVersion()); + } + + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return AppPlatformStubSettings.defaultGrpcApiClientHeaderProviderBuilder(); + } + + /** Returns a new gRPC builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new REST builder for this class. */ + public static Builder newHttpJsonBuilder() { + return Builder.createHttpJsonDefault(); + } + + /** 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 AppPlatformStubSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + + listApplicationsSettings = settingsBuilder.listApplicationsSettings().build(); + getApplicationSettings = settingsBuilder.getApplicationSettings().build(); + createApplicationSettings = settingsBuilder.createApplicationSettings().build(); + createApplicationOperationSettings = + settingsBuilder.createApplicationOperationSettings().build(); + updateApplicationSettings = settingsBuilder.updateApplicationSettings().build(); + updateApplicationOperationSettings = + settingsBuilder.updateApplicationOperationSettings().build(); + deleteApplicationSettings = settingsBuilder.deleteApplicationSettings().build(); + deleteApplicationOperationSettings = + settingsBuilder.deleteApplicationOperationSettings().build(); + deployApplicationSettings = settingsBuilder.deployApplicationSettings().build(); + deployApplicationOperationSettings = + settingsBuilder.deployApplicationOperationSettings().build(); + undeployApplicationSettings = settingsBuilder.undeployApplicationSettings().build(); + undeployApplicationOperationSettings = + settingsBuilder.undeployApplicationOperationSettings().build(); + addApplicationStreamInputSettings = settingsBuilder.addApplicationStreamInputSettings().build(); + addApplicationStreamInputOperationSettings = + settingsBuilder.addApplicationStreamInputOperationSettings().build(); + removeApplicationStreamInputSettings = + settingsBuilder.removeApplicationStreamInputSettings().build(); + removeApplicationStreamInputOperationSettings = + settingsBuilder.removeApplicationStreamInputOperationSettings().build(); + updateApplicationStreamInputSettings = + settingsBuilder.updateApplicationStreamInputSettings().build(); + updateApplicationStreamInputOperationSettings = + settingsBuilder.updateApplicationStreamInputOperationSettings().build(); + listInstancesSettings = settingsBuilder.listInstancesSettings().build(); + getInstanceSettings = settingsBuilder.getInstanceSettings().build(); + createApplicationInstancesSettings = + settingsBuilder.createApplicationInstancesSettings().build(); + createApplicationInstancesOperationSettings = + settingsBuilder.createApplicationInstancesOperationSettings().build(); + deleteApplicationInstancesSettings = + settingsBuilder.deleteApplicationInstancesSettings().build(); + deleteApplicationInstancesOperationSettings = + settingsBuilder.deleteApplicationInstancesOperationSettings().build(); + updateApplicationInstancesSettings = + settingsBuilder.updateApplicationInstancesSettings().build(); + updateApplicationInstancesOperationSettings = + settingsBuilder.updateApplicationInstancesOperationSettings().build(); + listDraftsSettings = settingsBuilder.listDraftsSettings().build(); + getDraftSettings = settingsBuilder.getDraftSettings().build(); + createDraftSettings = settingsBuilder.createDraftSettings().build(); + createDraftOperationSettings = settingsBuilder.createDraftOperationSettings().build(); + updateDraftSettings = settingsBuilder.updateDraftSettings().build(); + updateDraftOperationSettings = settingsBuilder.updateDraftOperationSettings().build(); + deleteDraftSettings = settingsBuilder.deleteDraftSettings().build(); + deleteDraftOperationSettings = settingsBuilder.deleteDraftOperationSettings().build(); + listProcessorsSettings = settingsBuilder.listProcessorsSettings().build(); + listPrebuiltProcessorsSettings = settingsBuilder.listPrebuiltProcessorsSettings().build(); + getProcessorSettings = settingsBuilder.getProcessorSettings().build(); + createProcessorSettings = settingsBuilder.createProcessorSettings().build(); + createProcessorOperationSettings = settingsBuilder.createProcessorOperationSettings().build(); + updateProcessorSettings = settingsBuilder.updateProcessorSettings().build(); + updateProcessorOperationSettings = settingsBuilder.updateProcessorOperationSettings().build(); + deleteProcessorSettings = settingsBuilder.deleteProcessorSettings().build(); + deleteProcessorOperationSettings = settingsBuilder.deleteProcessorOperationSettings().build(); + } + + /** Builder for AppPlatformStubSettings. */ + public static class Builder extends StubSettings.Builder { + private final ImmutableList> unaryMethodSettingsBuilders; + private final PagedCallSettings.Builder< + ListApplicationsRequest, ListApplicationsResponse, ListApplicationsPagedResponse> + listApplicationsSettings; + private final UnaryCallSettings.Builder + getApplicationSettings; + private final UnaryCallSettings.Builder + createApplicationSettings; + private final OperationCallSettings.Builder< + CreateApplicationRequest, Application, OperationMetadata> + createApplicationOperationSettings; + private final UnaryCallSettings.Builder + updateApplicationSettings; + private final OperationCallSettings.Builder< + UpdateApplicationRequest, Application, OperationMetadata> + updateApplicationOperationSettings; + private final UnaryCallSettings.Builder + deleteApplicationSettings; + private final OperationCallSettings.Builder + deleteApplicationOperationSettings; + private final UnaryCallSettings.Builder + deployApplicationSettings; + private final OperationCallSettings.Builder< + DeployApplicationRequest, DeployApplicationResponse, OperationMetadata> + deployApplicationOperationSettings; + private final UnaryCallSettings.Builder + undeployApplicationSettings; + private final OperationCallSettings.Builder< + UndeployApplicationRequest, UndeployApplicationResponse, OperationMetadata> + undeployApplicationOperationSettings; + private final UnaryCallSettings.Builder + addApplicationStreamInputSettings; + private final OperationCallSettings.Builder< + AddApplicationStreamInputRequest, AddApplicationStreamInputResponse, OperationMetadata> + addApplicationStreamInputOperationSettings; + private final UnaryCallSettings.Builder + removeApplicationStreamInputSettings; + private final OperationCallSettings.Builder< + RemoveApplicationStreamInputRequest, + RemoveApplicationStreamInputResponse, + OperationMetadata> + removeApplicationStreamInputOperationSettings; + private final UnaryCallSettings.Builder + updateApplicationStreamInputSettings; + private final OperationCallSettings.Builder< + UpdateApplicationStreamInputRequest, + UpdateApplicationStreamInputResponse, + OperationMetadata> + updateApplicationStreamInputOperationSettings; + private final PagedCallSettings.Builder< + ListInstancesRequest, ListInstancesResponse, ListInstancesPagedResponse> + listInstancesSettings; + private final UnaryCallSettings.Builder getInstanceSettings; + private final UnaryCallSettings.Builder + createApplicationInstancesSettings; + private final OperationCallSettings.Builder< + CreateApplicationInstancesRequest, + CreateApplicationInstancesResponse, + OperationMetadata> + createApplicationInstancesOperationSettings; + private final UnaryCallSettings.Builder + deleteApplicationInstancesSettings; + private final OperationCallSettings.Builder< + DeleteApplicationInstancesRequest, Instance, OperationMetadata> + deleteApplicationInstancesOperationSettings; + private final UnaryCallSettings.Builder + updateApplicationInstancesSettings; + private final OperationCallSettings.Builder< + UpdateApplicationInstancesRequest, + UpdateApplicationInstancesResponse, + OperationMetadata> + updateApplicationInstancesOperationSettings; + private final PagedCallSettings.Builder< + ListDraftsRequest, ListDraftsResponse, ListDraftsPagedResponse> + listDraftsSettings; + private final UnaryCallSettings.Builder getDraftSettings; + private final UnaryCallSettings.Builder createDraftSettings; + private final OperationCallSettings.Builder + createDraftOperationSettings; + private final UnaryCallSettings.Builder updateDraftSettings; + private final OperationCallSettings.Builder + updateDraftOperationSettings; + private final UnaryCallSettings.Builder deleteDraftSettings; + private final OperationCallSettings.Builder + deleteDraftOperationSettings; + private final PagedCallSettings.Builder< + ListProcessorsRequest, ListProcessorsResponse, ListProcessorsPagedResponse> + listProcessorsSettings; + private final UnaryCallSettings.Builder< + ListPrebuiltProcessorsRequest, ListPrebuiltProcessorsResponse> + listPrebuiltProcessorsSettings; + private final UnaryCallSettings.Builder getProcessorSettings; + private final UnaryCallSettings.Builder + createProcessorSettings; + private final OperationCallSettings.Builder< + CreateProcessorRequest, Processor, OperationMetadata> + createProcessorOperationSettings; + private final UnaryCallSettings.Builder + updateProcessorSettings; + private final OperationCallSettings.Builder< + UpdateProcessorRequest, Processor, OperationMetadata> + updateProcessorOperationSettings; + private final UnaryCallSettings.Builder + deleteProcessorSettings; + private final OperationCallSettings.Builder + deleteProcessorOperationSettings; + private static final ImmutableMap> + RETRYABLE_CODE_DEFINITIONS; + + static { + ImmutableMap.Builder> definitions = + ImmutableMap.builder(); + definitions.put("no_retry_codes", 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().setRpcTimeoutMultiplier(1.0).build(); + definitions.put("no_retry_params", settings); + RETRY_PARAM_DEFINITIONS = definitions.build(); + } + + protected Builder() { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(clientContext); + + listApplicationsSettings = PagedCallSettings.newBuilder(LIST_APPLICATIONS_PAGE_STR_FACT); + getApplicationSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createApplicationSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createApplicationOperationSettings = OperationCallSettings.newBuilder(); + updateApplicationSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + updateApplicationOperationSettings = OperationCallSettings.newBuilder(); + deleteApplicationSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + deleteApplicationOperationSettings = OperationCallSettings.newBuilder(); + deployApplicationSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + deployApplicationOperationSettings = OperationCallSettings.newBuilder(); + undeployApplicationSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + undeployApplicationOperationSettings = OperationCallSettings.newBuilder(); + addApplicationStreamInputSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + addApplicationStreamInputOperationSettings = OperationCallSettings.newBuilder(); + removeApplicationStreamInputSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + removeApplicationStreamInputOperationSettings = OperationCallSettings.newBuilder(); + updateApplicationStreamInputSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + updateApplicationStreamInputOperationSettings = OperationCallSettings.newBuilder(); + listInstancesSettings = PagedCallSettings.newBuilder(LIST_INSTANCES_PAGE_STR_FACT); + getInstanceSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createApplicationInstancesSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createApplicationInstancesOperationSettings = OperationCallSettings.newBuilder(); + deleteApplicationInstancesSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + deleteApplicationInstancesOperationSettings = OperationCallSettings.newBuilder(); + updateApplicationInstancesSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + updateApplicationInstancesOperationSettings = OperationCallSettings.newBuilder(); + listDraftsSettings = PagedCallSettings.newBuilder(LIST_DRAFTS_PAGE_STR_FACT); + getDraftSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createDraftSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createDraftOperationSettings = OperationCallSettings.newBuilder(); + updateDraftSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + updateDraftOperationSettings = OperationCallSettings.newBuilder(); + deleteDraftSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + deleteDraftOperationSettings = OperationCallSettings.newBuilder(); + listProcessorsSettings = PagedCallSettings.newBuilder(LIST_PROCESSORS_PAGE_STR_FACT); + listPrebuiltProcessorsSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + getProcessorSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createProcessorSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createProcessorOperationSettings = OperationCallSettings.newBuilder(); + updateProcessorSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + updateProcessorOperationSettings = OperationCallSettings.newBuilder(); + deleteProcessorSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + deleteProcessorOperationSettings = OperationCallSettings.newBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + listApplicationsSettings, + getApplicationSettings, + createApplicationSettings, + updateApplicationSettings, + deleteApplicationSettings, + deployApplicationSettings, + undeployApplicationSettings, + addApplicationStreamInputSettings, + removeApplicationStreamInputSettings, + updateApplicationStreamInputSettings, + listInstancesSettings, + getInstanceSettings, + createApplicationInstancesSettings, + deleteApplicationInstancesSettings, + updateApplicationInstancesSettings, + listDraftsSettings, + getDraftSettings, + createDraftSettings, + updateDraftSettings, + deleteDraftSettings, + listProcessorsSettings, + listPrebuiltProcessorsSettings, + getProcessorSettings, + createProcessorSettings, + updateProcessorSettings, + deleteProcessorSettings); + initDefaults(this); + } + + protected Builder(AppPlatformStubSettings settings) { + super(settings); + + listApplicationsSettings = settings.listApplicationsSettings.toBuilder(); + getApplicationSettings = settings.getApplicationSettings.toBuilder(); + createApplicationSettings = settings.createApplicationSettings.toBuilder(); + createApplicationOperationSettings = settings.createApplicationOperationSettings.toBuilder(); + updateApplicationSettings = settings.updateApplicationSettings.toBuilder(); + updateApplicationOperationSettings = settings.updateApplicationOperationSettings.toBuilder(); + deleteApplicationSettings = settings.deleteApplicationSettings.toBuilder(); + deleteApplicationOperationSettings = settings.deleteApplicationOperationSettings.toBuilder(); + deployApplicationSettings = settings.deployApplicationSettings.toBuilder(); + deployApplicationOperationSettings = settings.deployApplicationOperationSettings.toBuilder(); + undeployApplicationSettings = settings.undeployApplicationSettings.toBuilder(); + undeployApplicationOperationSettings = + settings.undeployApplicationOperationSettings.toBuilder(); + addApplicationStreamInputSettings = settings.addApplicationStreamInputSettings.toBuilder(); + addApplicationStreamInputOperationSettings = + settings.addApplicationStreamInputOperationSettings.toBuilder(); + removeApplicationStreamInputSettings = + settings.removeApplicationStreamInputSettings.toBuilder(); + removeApplicationStreamInputOperationSettings = + settings.removeApplicationStreamInputOperationSettings.toBuilder(); + updateApplicationStreamInputSettings = + settings.updateApplicationStreamInputSettings.toBuilder(); + updateApplicationStreamInputOperationSettings = + settings.updateApplicationStreamInputOperationSettings.toBuilder(); + listInstancesSettings = settings.listInstancesSettings.toBuilder(); + getInstanceSettings = settings.getInstanceSettings.toBuilder(); + createApplicationInstancesSettings = settings.createApplicationInstancesSettings.toBuilder(); + createApplicationInstancesOperationSettings = + settings.createApplicationInstancesOperationSettings.toBuilder(); + deleteApplicationInstancesSettings = settings.deleteApplicationInstancesSettings.toBuilder(); + deleteApplicationInstancesOperationSettings = + settings.deleteApplicationInstancesOperationSettings.toBuilder(); + updateApplicationInstancesSettings = settings.updateApplicationInstancesSettings.toBuilder(); + updateApplicationInstancesOperationSettings = + settings.updateApplicationInstancesOperationSettings.toBuilder(); + listDraftsSettings = settings.listDraftsSettings.toBuilder(); + getDraftSettings = settings.getDraftSettings.toBuilder(); + createDraftSettings = settings.createDraftSettings.toBuilder(); + createDraftOperationSettings = settings.createDraftOperationSettings.toBuilder(); + updateDraftSettings = settings.updateDraftSettings.toBuilder(); + updateDraftOperationSettings = settings.updateDraftOperationSettings.toBuilder(); + deleteDraftSettings = settings.deleteDraftSettings.toBuilder(); + deleteDraftOperationSettings = settings.deleteDraftOperationSettings.toBuilder(); + listProcessorsSettings = settings.listProcessorsSettings.toBuilder(); + listPrebuiltProcessorsSettings = settings.listPrebuiltProcessorsSettings.toBuilder(); + getProcessorSettings = settings.getProcessorSettings.toBuilder(); + createProcessorSettings = settings.createProcessorSettings.toBuilder(); + createProcessorOperationSettings = settings.createProcessorOperationSettings.toBuilder(); + updateProcessorSettings = settings.updateProcessorSettings.toBuilder(); + updateProcessorOperationSettings = settings.updateProcessorOperationSettings.toBuilder(); + deleteProcessorSettings = settings.deleteProcessorSettings.toBuilder(); + deleteProcessorOperationSettings = settings.deleteProcessorOperationSettings.toBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + listApplicationsSettings, + getApplicationSettings, + createApplicationSettings, + updateApplicationSettings, + deleteApplicationSettings, + deployApplicationSettings, + undeployApplicationSettings, + addApplicationStreamInputSettings, + removeApplicationStreamInputSettings, + updateApplicationStreamInputSettings, + listInstancesSettings, + getInstanceSettings, + createApplicationInstancesSettings, + deleteApplicationInstancesSettings, + updateApplicationInstancesSettings, + listDraftsSettings, + getDraftSettings, + createDraftSettings, + updateDraftSettings, + deleteDraftSettings, + listProcessorsSettings, + listPrebuiltProcessorsSettings, + getProcessorSettings, + createProcessorSettings, + updateProcessorSettings, + deleteProcessorSettings); + } + + private static Builder createDefault() { + Builder builder = new Builder(((ClientContext) null)); + + builder.setTransportChannelProvider(defaultTransportChannelProvider()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultApiClientHeaderProviderBuilder().build()); + builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); + builder.setSwitchToMtlsEndpointAllowed(true); + + return initDefaults(builder); + } + + private static Builder createHttpJsonDefault() { + Builder builder = new Builder(((ClientContext) null)); + + builder.setTransportChannelProvider(defaultHttpJsonTransportProviderBuilder().build()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultHttpJsonApiClientHeaderProviderBuilder().build()); + builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); + builder.setSwitchToMtlsEndpointAllowed(true); + + return initDefaults(builder); + } + + private static Builder initDefaults(Builder builder) { + builder + .listApplicationsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .getApplicationSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .createApplicationSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .updateApplicationSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .deleteApplicationSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .deployApplicationSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .undeployApplicationSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .addApplicationStreamInputSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .removeApplicationStreamInputSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .updateApplicationStreamInputSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .listInstancesSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .getInstanceSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .createApplicationInstancesSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .deleteApplicationInstancesSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .updateApplicationInstancesSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .listDraftsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .getDraftSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .createDraftSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .updateDraftSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .deleteDraftSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .listProcessorsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .listPrebuiltProcessorsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .getProcessorSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .createProcessorSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .updateProcessorSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .deleteProcessorSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .createApplicationOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Application.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + builder + .updateApplicationOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Application.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + builder + .deleteApplicationOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Empty.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + builder + .deployApplicationOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create( + DeployApplicationResponse.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + builder + .undeployApplicationOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create( + UndeployApplicationResponse.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + builder + .addApplicationStreamInputOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + . + newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create( + AddApplicationStreamInputResponse.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + builder + .removeApplicationStreamInputOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + . + newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create( + RemoveApplicationStreamInputResponse.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + builder + .updateApplicationStreamInputOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + . + newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create( + UpdateApplicationStreamInputResponse.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + builder + .createApplicationInstancesOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + . + newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create( + CreateApplicationInstancesResponse.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + builder + .deleteApplicationInstancesOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + . + newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Instance.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + builder + .updateApplicationInstancesOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + . + newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create( + UpdateApplicationInstancesResponse.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + builder + .createDraftOperationSettings() + .setInitialCallSettings( + UnaryCallSettings.newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Draft.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + builder + .updateDraftOperationSettings() + .setInitialCallSettings( + UnaryCallSettings.newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Draft.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + builder + .deleteDraftOperationSettings() + .setInitialCallSettings( + UnaryCallSettings.newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Empty.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + builder + .createProcessorOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Processor.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + builder + .updateProcessorOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Processor.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + builder + .deleteProcessorOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Empty.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + return builder; + } + + /** + * 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) { + super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater); + return this; + } + + public ImmutableList> unaryMethodSettingsBuilders() { + return unaryMethodSettingsBuilders; + } + + /** Returns the builder for the settings used for calls to listApplications. */ + public PagedCallSettings.Builder< + ListApplicationsRequest, ListApplicationsResponse, ListApplicationsPagedResponse> + listApplicationsSettings() { + return listApplicationsSettings; + } + + /** Returns the builder for the settings used for calls to getApplication. */ + public UnaryCallSettings.Builder getApplicationSettings() { + return getApplicationSettings; + } + + /** Returns the builder for the settings used for calls to createApplication. */ + public UnaryCallSettings.Builder + createApplicationSettings() { + return createApplicationSettings; + } + + /** Returns the builder for the settings used for calls to createApplication. */ + public OperationCallSettings.Builder + createApplicationOperationSettings() { + return createApplicationOperationSettings; + } + + /** Returns the builder for the settings used for calls to updateApplication. */ + public UnaryCallSettings.Builder + updateApplicationSettings() { + return updateApplicationSettings; + } + + /** Returns the builder for the settings used for calls to updateApplication. */ + public OperationCallSettings.Builder + updateApplicationOperationSettings() { + return updateApplicationOperationSettings; + } + + /** Returns the builder for the settings used for calls to deleteApplication. */ + public UnaryCallSettings.Builder + deleteApplicationSettings() { + return deleteApplicationSettings; + } + + /** Returns the builder for the settings used for calls to deleteApplication. */ + public OperationCallSettings.Builder + deleteApplicationOperationSettings() { + return deleteApplicationOperationSettings; + } + + /** Returns the builder for the settings used for calls to deployApplication. */ + public UnaryCallSettings.Builder + deployApplicationSettings() { + return deployApplicationSettings; + } + + /** Returns the builder for the settings used for calls to deployApplication. */ + public OperationCallSettings.Builder< + DeployApplicationRequest, DeployApplicationResponse, OperationMetadata> + deployApplicationOperationSettings() { + return deployApplicationOperationSettings; + } + + /** Returns the builder for the settings used for calls to undeployApplication. */ + public UnaryCallSettings.Builder + undeployApplicationSettings() { + return undeployApplicationSettings; + } + + /** Returns the builder for the settings used for calls to undeployApplication. */ + public OperationCallSettings.Builder< + UndeployApplicationRequest, UndeployApplicationResponse, OperationMetadata> + undeployApplicationOperationSettings() { + return undeployApplicationOperationSettings; + } + + /** Returns the builder for the settings used for calls to addApplicationStreamInput. */ + public UnaryCallSettings.Builder + addApplicationStreamInputSettings() { + return addApplicationStreamInputSettings; + } + + /** Returns the builder for the settings used for calls to addApplicationStreamInput. */ + public OperationCallSettings.Builder< + AddApplicationStreamInputRequest, AddApplicationStreamInputResponse, OperationMetadata> + addApplicationStreamInputOperationSettings() { + return addApplicationStreamInputOperationSettings; + } + + /** Returns the builder for the settings used for calls to removeApplicationStreamInput. */ + public UnaryCallSettings.Builder + removeApplicationStreamInputSettings() { + return removeApplicationStreamInputSettings; + } + + /** Returns the builder for the settings used for calls to removeApplicationStreamInput. */ + public OperationCallSettings.Builder< + RemoveApplicationStreamInputRequest, + RemoveApplicationStreamInputResponse, + OperationMetadata> + removeApplicationStreamInputOperationSettings() { + return removeApplicationStreamInputOperationSettings; + } + + /** Returns the builder for the settings used for calls to updateApplicationStreamInput. */ + public UnaryCallSettings.Builder + updateApplicationStreamInputSettings() { + return updateApplicationStreamInputSettings; + } + + /** Returns the builder for the settings used for calls to updateApplicationStreamInput. */ + public OperationCallSettings.Builder< + UpdateApplicationStreamInputRequest, + UpdateApplicationStreamInputResponse, + OperationMetadata> + updateApplicationStreamInputOperationSettings() { + return updateApplicationStreamInputOperationSettings; + } + + /** Returns the builder for the settings used for calls to listInstances. */ + public PagedCallSettings.Builder< + ListInstancesRequest, ListInstancesResponse, ListInstancesPagedResponse> + listInstancesSettings() { + return listInstancesSettings; + } + + /** Returns the builder for the settings used for calls to getInstance. */ + public UnaryCallSettings.Builder getInstanceSettings() { + return getInstanceSettings; + } + + /** Returns the builder for the settings used for calls to createApplicationInstances. */ + public UnaryCallSettings.Builder + createApplicationInstancesSettings() { + return createApplicationInstancesSettings; + } + + /** Returns the builder for the settings used for calls to createApplicationInstances. */ + public OperationCallSettings.Builder< + CreateApplicationInstancesRequest, + CreateApplicationInstancesResponse, + OperationMetadata> + createApplicationInstancesOperationSettings() { + return createApplicationInstancesOperationSettings; + } + + /** Returns the builder for the settings used for calls to deleteApplicationInstances. */ + public UnaryCallSettings.Builder + deleteApplicationInstancesSettings() { + return deleteApplicationInstancesSettings; + } + + /** Returns the builder for the settings used for calls to deleteApplicationInstances. */ + public OperationCallSettings.Builder< + DeleteApplicationInstancesRequest, Instance, OperationMetadata> + deleteApplicationInstancesOperationSettings() { + return deleteApplicationInstancesOperationSettings; + } + + /** Returns the builder for the settings used for calls to updateApplicationInstances. */ + public UnaryCallSettings.Builder + updateApplicationInstancesSettings() { + return updateApplicationInstancesSettings; + } + + /** Returns the builder for the settings used for calls to updateApplicationInstances. */ + public OperationCallSettings.Builder< + UpdateApplicationInstancesRequest, + UpdateApplicationInstancesResponse, + OperationMetadata> + updateApplicationInstancesOperationSettings() { + return updateApplicationInstancesOperationSettings; + } + + /** Returns the builder for the settings used for calls to listDrafts. */ + public PagedCallSettings.Builder + listDraftsSettings() { + return listDraftsSettings; + } + + /** Returns the builder for the settings used for calls to getDraft. */ + public UnaryCallSettings.Builder getDraftSettings() { + return getDraftSettings; + } + + /** Returns the builder for the settings used for calls to createDraft. */ + public UnaryCallSettings.Builder createDraftSettings() { + return createDraftSettings; + } + + /** Returns the builder for the settings used for calls to createDraft. */ + public OperationCallSettings.Builder + createDraftOperationSettings() { + return createDraftOperationSettings; + } + + /** Returns the builder for the settings used for calls to updateDraft. */ + public UnaryCallSettings.Builder updateDraftSettings() { + return updateDraftSettings; + } + + /** Returns the builder for the settings used for calls to updateDraft. */ + public OperationCallSettings.Builder + updateDraftOperationSettings() { + return updateDraftOperationSettings; + } + + /** Returns the builder for the settings used for calls to deleteDraft. */ + public UnaryCallSettings.Builder deleteDraftSettings() { + return deleteDraftSettings; + } + + /** Returns the builder for the settings used for calls to deleteDraft. */ + public OperationCallSettings.Builder + deleteDraftOperationSettings() { + return deleteDraftOperationSettings; + } + + /** Returns the builder for the settings used for calls to listProcessors. */ + public PagedCallSettings.Builder< + ListProcessorsRequest, ListProcessorsResponse, ListProcessorsPagedResponse> + listProcessorsSettings() { + return listProcessorsSettings; + } + + /** Returns the builder for the settings used for calls to listPrebuiltProcessors. */ + public UnaryCallSettings.Builder + listPrebuiltProcessorsSettings() { + return listPrebuiltProcessorsSettings; + } + + /** Returns the builder for the settings used for calls to getProcessor. */ + public UnaryCallSettings.Builder getProcessorSettings() { + return getProcessorSettings; + } + + /** Returns the builder for the settings used for calls to createProcessor. */ + public UnaryCallSettings.Builder createProcessorSettings() { + return createProcessorSettings; + } + + /** Returns the builder for the settings used for calls to createProcessor. */ + public OperationCallSettings.Builder + createProcessorOperationSettings() { + return createProcessorOperationSettings; + } + + /** Returns the builder for the settings used for calls to updateProcessor. */ + public UnaryCallSettings.Builder updateProcessorSettings() { + return updateProcessorSettings; + } + + /** Returns the builder for the settings used for calls to updateProcessor. */ + public OperationCallSettings.Builder + updateProcessorOperationSettings() { + return updateProcessorOperationSettings; + } + + /** Returns the builder for the settings used for calls to deleteProcessor. */ + public UnaryCallSettings.Builder deleteProcessorSettings() { + return deleteProcessorSettings; + } + + /** Returns the builder for the settings used for calls to deleteProcessor. */ + public OperationCallSettings.Builder + deleteProcessorOperationSettings() { + return deleteProcessorOperationSettings; + } + + @Override + public AppPlatformStubSettings build() throws IOException { + return new AppPlatformStubSettings(this); + } + } +} diff --git a/java-visionai/google-cloud-visionai/src/main/java/com/google/cloud/visionai/v1/stub/GrpcAppPlatformCallableFactory.java b/java-visionai/google-cloud-visionai/src/main/java/com/google/cloud/visionai/v1/stub/GrpcAppPlatformCallableFactory.java new file mode 100644 index 000000000000..1249246517f8 --- /dev/null +++ b/java-visionai/google-cloud-visionai/src/main/java/com/google/cloud/visionai/v1/stub/GrpcAppPlatformCallableFactory.java @@ -0,0 +1,113 @@ +/* + * Copyright 2024 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.visionai.v1.stub; + +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.Operation; +import com.google.longrunning.stub.OperationsStub; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * gRPC callable factory implementation for the AppPlatform service API. + * + *

This class is for advanced usage. + */ +@Generated("by gapic-generator-java") +public class GrpcAppPlatformCallableFactory 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 callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createPagedCallable(grpcCallSettings, callSettings, clientContext); + } + + @Override + public UnaryCallable createBatchingCallable( + GrpcCallSettings grpcCallSettings, + BatchingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createBatchingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + OperationCallable createOperationCallable( + GrpcCallSettings grpcCallSettings, + OperationCallSettings callSettings, + ClientContext clientContext, + OperationsStub operationsStub) { + return GrpcCallableFactory.createOperationCallable( + grpcCallSettings, callSettings, clientContext, operationsStub); + } + + @Override + public + BidiStreamingCallable createBidiStreamingCallable( + GrpcCallSettings grpcCallSettings, + StreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createBidiStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + ServerStreamingCallable createServerStreamingCallable( + GrpcCallSettings grpcCallSettings, + ServerStreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createServerStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + ClientStreamingCallable createClientStreamingCallable( + GrpcCallSettings grpcCallSettings, + StreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createClientStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } +} diff --git a/java-visionai/google-cloud-visionai/src/main/java/com/google/cloud/visionai/v1/stub/GrpcAppPlatformStub.java b/java-visionai/google-cloud-visionai/src/main/java/com/google/cloud/visionai/v1/stub/GrpcAppPlatformStub.java new file mode 100644 index 000000000000..c35a511358a5 --- /dev/null +++ b/java-visionai/google-cloud-visionai/src/main/java/com/google/cloud/visionai/v1/stub/GrpcAppPlatformStub.java @@ -0,0 +1,1282 @@ +/* + * Copyright 2024 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.visionai.v1.stub; + +import static com.google.cloud.visionai.v1.AppPlatformClient.ListApplicationsPagedResponse; +import static com.google.cloud.visionai.v1.AppPlatformClient.ListDraftsPagedResponse; +import static com.google.cloud.visionai.v1.AppPlatformClient.ListInstancesPagedResponse; +import static com.google.cloud.visionai.v1.AppPlatformClient.ListProcessorsPagedResponse; + +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.RequestParamsBuilder; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.visionai.v1.AddApplicationStreamInputRequest; +import com.google.cloud.visionai.v1.AddApplicationStreamInputResponse; +import com.google.cloud.visionai.v1.Application; +import com.google.cloud.visionai.v1.CreateApplicationInstancesRequest; +import com.google.cloud.visionai.v1.CreateApplicationInstancesResponse; +import com.google.cloud.visionai.v1.CreateApplicationRequest; +import com.google.cloud.visionai.v1.CreateDraftRequest; +import com.google.cloud.visionai.v1.CreateProcessorRequest; +import com.google.cloud.visionai.v1.DeleteApplicationInstancesRequest; +import com.google.cloud.visionai.v1.DeleteApplicationRequest; +import com.google.cloud.visionai.v1.DeleteDraftRequest; +import com.google.cloud.visionai.v1.DeleteProcessorRequest; +import com.google.cloud.visionai.v1.DeployApplicationRequest; +import com.google.cloud.visionai.v1.DeployApplicationResponse; +import com.google.cloud.visionai.v1.Draft; +import com.google.cloud.visionai.v1.GetApplicationRequest; +import com.google.cloud.visionai.v1.GetDraftRequest; +import com.google.cloud.visionai.v1.GetInstanceRequest; +import com.google.cloud.visionai.v1.GetProcessorRequest; +import com.google.cloud.visionai.v1.Instance; +import com.google.cloud.visionai.v1.ListApplicationsRequest; +import com.google.cloud.visionai.v1.ListApplicationsResponse; +import com.google.cloud.visionai.v1.ListDraftsRequest; +import com.google.cloud.visionai.v1.ListDraftsResponse; +import com.google.cloud.visionai.v1.ListInstancesRequest; +import com.google.cloud.visionai.v1.ListInstancesResponse; +import com.google.cloud.visionai.v1.ListPrebuiltProcessorsRequest; +import com.google.cloud.visionai.v1.ListPrebuiltProcessorsResponse; +import com.google.cloud.visionai.v1.ListProcessorsRequest; +import com.google.cloud.visionai.v1.ListProcessorsResponse; +import com.google.cloud.visionai.v1.OperationMetadata; +import com.google.cloud.visionai.v1.Processor; +import com.google.cloud.visionai.v1.RemoveApplicationStreamInputRequest; +import com.google.cloud.visionai.v1.RemoveApplicationStreamInputResponse; +import com.google.cloud.visionai.v1.UndeployApplicationRequest; +import com.google.cloud.visionai.v1.UndeployApplicationResponse; +import com.google.cloud.visionai.v1.UpdateApplicationInstancesRequest; +import com.google.cloud.visionai.v1.UpdateApplicationInstancesResponse; +import com.google.cloud.visionai.v1.UpdateApplicationRequest; +import com.google.cloud.visionai.v1.UpdateApplicationStreamInputRequest; +import com.google.cloud.visionai.v1.UpdateApplicationStreamInputResponse; +import com.google.cloud.visionai.v1.UpdateDraftRequest; +import com.google.cloud.visionai.v1.UpdateProcessorRequest; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.GrpcOperationsStub; +import com.google.protobuf.Empty; +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 the AppPlatform service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") +public class GrpcAppPlatformStub extends AppPlatformStub { + private static final MethodDescriptor + listApplicationsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.visionai.v1.AppPlatform/ListApplications") + .setRequestMarshaller( + ProtoUtils.marshaller(ListApplicationsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListApplicationsResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + getApplicationMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.visionai.v1.AppPlatform/GetApplication") + .setRequestMarshaller( + ProtoUtils.marshaller(GetApplicationRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Application.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + createApplicationMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.visionai.v1.AppPlatform/CreateApplication") + .setRequestMarshaller( + ProtoUtils.marshaller(CreateApplicationRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + updateApplicationMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.visionai.v1.AppPlatform/UpdateApplication") + .setRequestMarshaller( + ProtoUtils.marshaller(UpdateApplicationRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + deleteApplicationMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.visionai.v1.AppPlatform/DeleteApplication") + .setRequestMarshaller( + ProtoUtils.marshaller(DeleteApplicationRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + deployApplicationMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.visionai.v1.AppPlatform/DeployApplication") + .setRequestMarshaller( + ProtoUtils.marshaller(DeployApplicationRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + undeployApplicationMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.visionai.v1.AppPlatform/UndeployApplication") + .setRequestMarshaller( + ProtoUtils.marshaller(UndeployApplicationRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + addApplicationStreamInputMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.visionai.v1.AppPlatform/AddApplicationStreamInput") + .setRequestMarshaller( + ProtoUtils.marshaller(AddApplicationStreamInputRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + removeApplicationStreamInputMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.visionai.v1.AppPlatform/RemoveApplicationStreamInput") + .setRequestMarshaller( + ProtoUtils.marshaller(RemoveApplicationStreamInputRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + updateApplicationStreamInputMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.visionai.v1.AppPlatform/UpdateApplicationStreamInput") + .setRequestMarshaller( + ProtoUtils.marshaller(UpdateApplicationStreamInputRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + listInstancesMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.visionai.v1.AppPlatform/ListInstances") + .setRequestMarshaller( + ProtoUtils.marshaller(ListInstancesRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListInstancesResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor getInstanceMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.visionai.v1.AppPlatform/GetInstance") + .setRequestMarshaller(ProtoUtils.marshaller(GetInstanceRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Instance.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + createApplicationInstancesMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.visionai.v1.AppPlatform/CreateApplicationInstances") + .setRequestMarshaller( + ProtoUtils.marshaller(CreateApplicationInstancesRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + deleteApplicationInstancesMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.visionai.v1.AppPlatform/DeleteApplicationInstances") + .setRequestMarshaller( + ProtoUtils.marshaller(DeleteApplicationInstancesRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + updateApplicationInstancesMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.visionai.v1.AppPlatform/UpdateApplicationInstances") + .setRequestMarshaller( + ProtoUtils.marshaller(UpdateApplicationInstancesRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + listDraftsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.visionai.v1.AppPlatform/ListDrafts") + .setRequestMarshaller(ProtoUtils.marshaller(ListDraftsRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(ListDraftsResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor getDraftMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.visionai.v1.AppPlatform/GetDraft") + .setRequestMarshaller(ProtoUtils.marshaller(GetDraftRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Draft.getDefaultInstance())) + .build(); + + private static final MethodDescriptor createDraftMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.visionai.v1.AppPlatform/CreateDraft") + .setRequestMarshaller(ProtoUtils.marshaller(CreateDraftRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor updateDraftMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.visionai.v1.AppPlatform/UpdateDraft") + .setRequestMarshaller(ProtoUtils.marshaller(UpdateDraftRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor deleteDraftMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.visionai.v1.AppPlatform/DeleteDraft") + .setRequestMarshaller(ProtoUtils.marshaller(DeleteDraftRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + listProcessorsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.visionai.v1.AppPlatform/ListProcessors") + .setRequestMarshaller( + ProtoUtils.marshaller(ListProcessorsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListProcessorsResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor< + ListPrebuiltProcessorsRequest, ListPrebuiltProcessorsResponse> + listPrebuiltProcessorsMethodDescriptor = + MethodDescriptor + .newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.visionai.v1.AppPlatform/ListPrebuiltProcessors") + .setRequestMarshaller( + ProtoUtils.marshaller(ListPrebuiltProcessorsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListPrebuiltProcessorsResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + getProcessorMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.visionai.v1.AppPlatform/GetProcessor") + .setRequestMarshaller(ProtoUtils.marshaller(GetProcessorRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Processor.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + createProcessorMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.visionai.v1.AppPlatform/CreateProcessor") + .setRequestMarshaller( + ProtoUtils.marshaller(CreateProcessorRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + updateProcessorMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.visionai.v1.AppPlatform/UpdateProcessor") + .setRequestMarshaller( + ProtoUtils.marshaller(UpdateProcessorRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + deleteProcessorMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.visionai.v1.AppPlatform/DeleteProcessor") + .setRequestMarshaller( + ProtoUtils.marshaller(DeleteProcessorRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private final UnaryCallable + listApplicationsCallable; + private final UnaryCallable + listApplicationsPagedCallable; + private final UnaryCallable getApplicationCallable; + private final UnaryCallable createApplicationCallable; + private final OperationCallable + createApplicationOperationCallable; + private final UnaryCallable updateApplicationCallable; + private final OperationCallable + updateApplicationOperationCallable; + private final UnaryCallable deleteApplicationCallable; + private final OperationCallable + deleteApplicationOperationCallable; + private final UnaryCallable deployApplicationCallable; + private final OperationCallable< + DeployApplicationRequest, DeployApplicationResponse, OperationMetadata> + deployApplicationOperationCallable; + private final UnaryCallable undeployApplicationCallable; + private final OperationCallable< + UndeployApplicationRequest, UndeployApplicationResponse, OperationMetadata> + undeployApplicationOperationCallable; + private final UnaryCallable + addApplicationStreamInputCallable; + private final OperationCallable< + AddApplicationStreamInputRequest, AddApplicationStreamInputResponse, OperationMetadata> + addApplicationStreamInputOperationCallable; + private final UnaryCallable + removeApplicationStreamInputCallable; + private final OperationCallable< + RemoveApplicationStreamInputRequest, + RemoveApplicationStreamInputResponse, + OperationMetadata> + removeApplicationStreamInputOperationCallable; + private final UnaryCallable + updateApplicationStreamInputCallable; + private final OperationCallable< + UpdateApplicationStreamInputRequest, + UpdateApplicationStreamInputResponse, + OperationMetadata> + updateApplicationStreamInputOperationCallable; + private final UnaryCallable listInstancesCallable; + private final UnaryCallable + listInstancesPagedCallable; + private final UnaryCallable getInstanceCallable; + private final UnaryCallable + createApplicationInstancesCallable; + private final OperationCallable< + CreateApplicationInstancesRequest, CreateApplicationInstancesResponse, OperationMetadata> + createApplicationInstancesOperationCallable; + private final UnaryCallable + deleteApplicationInstancesCallable; + private final OperationCallable + deleteApplicationInstancesOperationCallable; + private final UnaryCallable + updateApplicationInstancesCallable; + private final OperationCallable< + UpdateApplicationInstancesRequest, UpdateApplicationInstancesResponse, OperationMetadata> + updateApplicationInstancesOperationCallable; + private final UnaryCallable listDraftsCallable; + private final UnaryCallable listDraftsPagedCallable; + private final UnaryCallable getDraftCallable; + private final UnaryCallable createDraftCallable; + private final OperationCallable + createDraftOperationCallable; + private final UnaryCallable updateDraftCallable; + private final OperationCallable + updateDraftOperationCallable; + private final UnaryCallable deleteDraftCallable; + private final OperationCallable + deleteDraftOperationCallable; + private final UnaryCallable listProcessorsCallable; + private final UnaryCallable + listProcessorsPagedCallable; + private final UnaryCallable + listPrebuiltProcessorsCallable; + private final UnaryCallable getProcessorCallable; + private final UnaryCallable createProcessorCallable; + private final OperationCallable + createProcessorOperationCallable; + private final UnaryCallable updateProcessorCallable; + private final OperationCallable + updateProcessorOperationCallable; + private final UnaryCallable deleteProcessorCallable; + private final OperationCallable + deleteProcessorOperationCallable; + + private final BackgroundResource backgroundResources; + private final GrpcOperationsStub operationsStub; + private final GrpcStubCallableFactory callableFactory; + + public static final GrpcAppPlatformStub create(AppPlatformStubSettings settings) + throws IOException { + return new GrpcAppPlatformStub(settings, ClientContext.create(settings)); + } + + public static final GrpcAppPlatformStub create(ClientContext clientContext) throws IOException { + return new GrpcAppPlatformStub(AppPlatformStubSettings.newBuilder().build(), clientContext); + } + + public static final GrpcAppPlatformStub create( + ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException { + return new GrpcAppPlatformStub( + AppPlatformStubSettings.newBuilder().build(), clientContext, callableFactory); + } + + /** + * Constructs an instance of GrpcAppPlatformStub, 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 GrpcAppPlatformStub(AppPlatformStubSettings settings, ClientContext clientContext) + throws IOException { + this(settings, clientContext, new GrpcAppPlatformCallableFactory()); + } + + /** + * Constructs an instance of GrpcAppPlatformStub, 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 GrpcAppPlatformStub( + AppPlatformStubSettings settings, + ClientContext clientContext, + GrpcStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory); + + GrpcCallSettings + listApplicationsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listApplicationsMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + GrpcCallSettings getApplicationTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getApplicationMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings createApplicationTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createApplicationMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + GrpcCallSettings updateApplicationTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(updateApplicationMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add( + "application.name", String.valueOf(request.getApplication().getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings deleteApplicationTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deleteApplicationMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings deployApplicationTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deployApplicationMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings undeployApplicationTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(undeployApplicationMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings + addApplicationStreamInputTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(addApplicationStreamInputMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings + removeApplicationStreamInputTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(removeApplicationStreamInputMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings + updateApplicationStreamInputTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(updateApplicationStreamInputMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings listInstancesTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listInstancesMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + GrpcCallSettings getInstanceTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getInstanceMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings + createApplicationInstancesTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createApplicationInstancesMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings + deleteApplicationInstancesTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deleteApplicationInstancesMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings + updateApplicationInstancesTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(updateApplicationInstancesMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings listDraftsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listDraftsMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + GrpcCallSettings getDraftTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getDraftMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings createDraftTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createDraftMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + GrpcCallSettings updateDraftTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(updateDraftMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("draft.name", String.valueOf(request.getDraft().getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings deleteDraftTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deleteDraftMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings + listProcessorsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listProcessorsMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + GrpcCallSettings + listPrebuiltProcessorsTransportSettings = + GrpcCallSettings + .newBuilder() + .setMethodDescriptor(listPrebuiltProcessorsMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + GrpcCallSettings getProcessorTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getProcessorMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings createProcessorTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createProcessorMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + GrpcCallSettings updateProcessorTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(updateProcessorMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("processor.name", String.valueOf(request.getProcessor().getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings deleteProcessorTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deleteProcessorMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + + this.listApplicationsCallable = + callableFactory.createUnaryCallable( + listApplicationsTransportSettings, settings.listApplicationsSettings(), clientContext); + this.listApplicationsPagedCallable = + callableFactory.createPagedCallable( + listApplicationsTransportSettings, settings.listApplicationsSettings(), clientContext); + this.getApplicationCallable = + callableFactory.createUnaryCallable( + getApplicationTransportSettings, settings.getApplicationSettings(), clientContext); + this.createApplicationCallable = + callableFactory.createUnaryCallable( + createApplicationTransportSettings, + settings.createApplicationSettings(), + clientContext); + this.createApplicationOperationCallable = + callableFactory.createOperationCallable( + createApplicationTransportSettings, + settings.createApplicationOperationSettings(), + clientContext, + operationsStub); + this.updateApplicationCallable = + callableFactory.createUnaryCallable( + updateApplicationTransportSettings, + settings.updateApplicationSettings(), + clientContext); + this.updateApplicationOperationCallable = + callableFactory.createOperationCallable( + updateApplicationTransportSettings, + settings.updateApplicationOperationSettings(), + clientContext, + operationsStub); + this.deleteApplicationCallable = + callableFactory.createUnaryCallable( + deleteApplicationTransportSettings, + settings.deleteApplicationSettings(), + clientContext); + this.deleteApplicationOperationCallable = + callableFactory.createOperationCallable( + deleteApplicationTransportSettings, + settings.deleteApplicationOperationSettings(), + clientContext, + operationsStub); + this.deployApplicationCallable = + callableFactory.createUnaryCallable( + deployApplicationTransportSettings, + settings.deployApplicationSettings(), + clientContext); + this.deployApplicationOperationCallable = + callableFactory.createOperationCallable( + deployApplicationTransportSettings, + settings.deployApplicationOperationSettings(), + clientContext, + operationsStub); + this.undeployApplicationCallable = + callableFactory.createUnaryCallable( + undeployApplicationTransportSettings, + settings.undeployApplicationSettings(), + clientContext); + this.undeployApplicationOperationCallable = + callableFactory.createOperationCallable( + undeployApplicationTransportSettings, + settings.undeployApplicationOperationSettings(), + clientContext, + operationsStub); + this.addApplicationStreamInputCallable = + callableFactory.createUnaryCallable( + addApplicationStreamInputTransportSettings, + settings.addApplicationStreamInputSettings(), + clientContext); + this.addApplicationStreamInputOperationCallable = + callableFactory.createOperationCallable( + addApplicationStreamInputTransportSettings, + settings.addApplicationStreamInputOperationSettings(), + clientContext, + operationsStub); + this.removeApplicationStreamInputCallable = + callableFactory.createUnaryCallable( + removeApplicationStreamInputTransportSettings, + settings.removeApplicationStreamInputSettings(), + clientContext); + this.removeApplicationStreamInputOperationCallable = + callableFactory.createOperationCallable( + removeApplicationStreamInputTransportSettings, + settings.removeApplicationStreamInputOperationSettings(), + clientContext, + operationsStub); + this.updateApplicationStreamInputCallable = + callableFactory.createUnaryCallable( + updateApplicationStreamInputTransportSettings, + settings.updateApplicationStreamInputSettings(), + clientContext); + this.updateApplicationStreamInputOperationCallable = + callableFactory.createOperationCallable( + updateApplicationStreamInputTransportSettings, + settings.updateApplicationStreamInputOperationSettings(), + clientContext, + operationsStub); + this.listInstancesCallable = + callableFactory.createUnaryCallable( + listInstancesTransportSettings, settings.listInstancesSettings(), clientContext); + this.listInstancesPagedCallable = + callableFactory.createPagedCallable( + listInstancesTransportSettings, settings.listInstancesSettings(), clientContext); + this.getInstanceCallable = + callableFactory.createUnaryCallable( + getInstanceTransportSettings, settings.getInstanceSettings(), clientContext); + this.createApplicationInstancesCallable = + callableFactory.createUnaryCallable( + createApplicationInstancesTransportSettings, + settings.createApplicationInstancesSettings(), + clientContext); + this.createApplicationInstancesOperationCallable = + callableFactory.createOperationCallable( + createApplicationInstancesTransportSettings, + settings.createApplicationInstancesOperationSettings(), + clientContext, + operationsStub); + this.deleteApplicationInstancesCallable = + callableFactory.createUnaryCallable( + deleteApplicationInstancesTransportSettings, + settings.deleteApplicationInstancesSettings(), + clientContext); + this.deleteApplicationInstancesOperationCallable = + callableFactory.createOperationCallable( + deleteApplicationInstancesTransportSettings, + settings.deleteApplicationInstancesOperationSettings(), + clientContext, + operationsStub); + this.updateApplicationInstancesCallable = + callableFactory.createUnaryCallable( + updateApplicationInstancesTransportSettings, + settings.updateApplicationInstancesSettings(), + clientContext); + this.updateApplicationInstancesOperationCallable = + callableFactory.createOperationCallable( + updateApplicationInstancesTransportSettings, + settings.updateApplicationInstancesOperationSettings(), + clientContext, + operationsStub); + this.listDraftsCallable = + callableFactory.createUnaryCallable( + listDraftsTransportSettings, settings.listDraftsSettings(), clientContext); + this.listDraftsPagedCallable = + callableFactory.createPagedCallable( + listDraftsTransportSettings, settings.listDraftsSettings(), clientContext); + this.getDraftCallable = + callableFactory.createUnaryCallable( + getDraftTransportSettings, settings.getDraftSettings(), clientContext); + this.createDraftCallable = + callableFactory.createUnaryCallable( + createDraftTransportSettings, settings.createDraftSettings(), clientContext); + this.createDraftOperationCallable = + callableFactory.createOperationCallable( + createDraftTransportSettings, + settings.createDraftOperationSettings(), + clientContext, + operationsStub); + this.updateDraftCallable = + callableFactory.createUnaryCallable( + updateDraftTransportSettings, settings.updateDraftSettings(), clientContext); + this.updateDraftOperationCallable = + callableFactory.createOperationCallable( + updateDraftTransportSettings, + settings.updateDraftOperationSettings(), + clientContext, + operationsStub); + this.deleteDraftCallable = + callableFactory.createUnaryCallable( + deleteDraftTransportSettings, settings.deleteDraftSettings(), clientContext); + this.deleteDraftOperationCallable = + callableFactory.createOperationCallable( + deleteDraftTransportSettings, + settings.deleteDraftOperationSettings(), + clientContext, + operationsStub); + this.listProcessorsCallable = + callableFactory.createUnaryCallable( + listProcessorsTransportSettings, settings.listProcessorsSettings(), clientContext); + this.listProcessorsPagedCallable = + callableFactory.createPagedCallable( + listProcessorsTransportSettings, settings.listProcessorsSettings(), clientContext); + this.listPrebuiltProcessorsCallable = + callableFactory.createUnaryCallable( + listPrebuiltProcessorsTransportSettings, + settings.listPrebuiltProcessorsSettings(), + clientContext); + this.getProcessorCallable = + callableFactory.createUnaryCallable( + getProcessorTransportSettings, settings.getProcessorSettings(), clientContext); + this.createProcessorCallable = + callableFactory.createUnaryCallable( + createProcessorTransportSettings, settings.createProcessorSettings(), clientContext); + this.createProcessorOperationCallable = + callableFactory.createOperationCallable( + createProcessorTransportSettings, + settings.createProcessorOperationSettings(), + clientContext, + operationsStub); + this.updateProcessorCallable = + callableFactory.createUnaryCallable( + updateProcessorTransportSettings, settings.updateProcessorSettings(), clientContext); + this.updateProcessorOperationCallable = + callableFactory.createOperationCallable( + updateProcessorTransportSettings, + settings.updateProcessorOperationSettings(), + clientContext, + operationsStub); + this.deleteProcessorCallable = + callableFactory.createUnaryCallable( + deleteProcessorTransportSettings, settings.deleteProcessorSettings(), clientContext); + this.deleteProcessorOperationCallable = + callableFactory.createOperationCallable( + deleteProcessorTransportSettings, + settings.deleteProcessorOperationSettings(), + clientContext, + operationsStub); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + public GrpcOperationsStub getOperationsStub() { + return operationsStub; + } + + @Override + public UnaryCallable + listApplicationsCallable() { + return listApplicationsCallable; + } + + @Override + public UnaryCallable + listApplicationsPagedCallable() { + return listApplicationsPagedCallable; + } + + @Override + public UnaryCallable getApplicationCallable() { + return getApplicationCallable; + } + + @Override + public UnaryCallable createApplicationCallable() { + return createApplicationCallable; + } + + @Override + public OperationCallable + createApplicationOperationCallable() { + return createApplicationOperationCallable; + } + + @Override + public UnaryCallable updateApplicationCallable() { + return updateApplicationCallable; + } + + @Override + public OperationCallable + updateApplicationOperationCallable() { + return updateApplicationOperationCallable; + } + + @Override + public UnaryCallable deleteApplicationCallable() { + return deleteApplicationCallable; + } + + @Override + public OperationCallable + deleteApplicationOperationCallable() { + return deleteApplicationOperationCallable; + } + + @Override + public UnaryCallable deployApplicationCallable() { + return deployApplicationCallable; + } + + @Override + public OperationCallable + deployApplicationOperationCallable() { + return deployApplicationOperationCallable; + } + + @Override + public UnaryCallable undeployApplicationCallable() { + return undeployApplicationCallable; + } + + @Override + public OperationCallable< + UndeployApplicationRequest, UndeployApplicationResponse, OperationMetadata> + undeployApplicationOperationCallable() { + return undeployApplicationOperationCallable; + } + + @Override + public UnaryCallable + addApplicationStreamInputCallable() { + return addApplicationStreamInputCallable; + } + + @Override + public OperationCallable< + AddApplicationStreamInputRequest, AddApplicationStreamInputResponse, OperationMetadata> + addApplicationStreamInputOperationCallable() { + return addApplicationStreamInputOperationCallable; + } + + @Override + public UnaryCallable + removeApplicationStreamInputCallable() { + return removeApplicationStreamInputCallable; + } + + @Override + public OperationCallable< + RemoveApplicationStreamInputRequest, + RemoveApplicationStreamInputResponse, + OperationMetadata> + removeApplicationStreamInputOperationCallable() { + return removeApplicationStreamInputOperationCallable; + } + + @Override + public UnaryCallable + updateApplicationStreamInputCallable() { + return updateApplicationStreamInputCallable; + } + + @Override + public OperationCallable< + UpdateApplicationStreamInputRequest, + UpdateApplicationStreamInputResponse, + OperationMetadata> + updateApplicationStreamInputOperationCallable() { + return updateApplicationStreamInputOperationCallable; + } + + @Override + public UnaryCallable listInstancesCallable() { + return listInstancesCallable; + } + + @Override + public UnaryCallable + listInstancesPagedCallable() { + return listInstancesPagedCallable; + } + + @Override + public UnaryCallable getInstanceCallable() { + return getInstanceCallable; + } + + @Override + public UnaryCallable + createApplicationInstancesCallable() { + return createApplicationInstancesCallable; + } + + @Override + public OperationCallable< + CreateApplicationInstancesRequest, CreateApplicationInstancesResponse, OperationMetadata> + createApplicationInstancesOperationCallable() { + return createApplicationInstancesOperationCallable; + } + + @Override + public UnaryCallable + deleteApplicationInstancesCallable() { + return deleteApplicationInstancesCallable; + } + + @Override + public OperationCallable + deleteApplicationInstancesOperationCallable() { + return deleteApplicationInstancesOperationCallable; + } + + @Override + public UnaryCallable + updateApplicationInstancesCallable() { + return updateApplicationInstancesCallable; + } + + @Override + public OperationCallable< + UpdateApplicationInstancesRequest, UpdateApplicationInstancesResponse, OperationMetadata> + updateApplicationInstancesOperationCallable() { + return updateApplicationInstancesOperationCallable; + } + + @Override + public UnaryCallable listDraftsCallable() { + return listDraftsCallable; + } + + @Override + public UnaryCallable listDraftsPagedCallable() { + return listDraftsPagedCallable; + } + + @Override + public UnaryCallable getDraftCallable() { + return getDraftCallable; + } + + @Override + public UnaryCallable createDraftCallable() { + return createDraftCallable; + } + + @Override + public OperationCallable + createDraftOperationCallable() { + return createDraftOperationCallable; + } + + @Override + public UnaryCallable updateDraftCallable() { + return updateDraftCallable; + } + + @Override + public OperationCallable + updateDraftOperationCallable() { + return updateDraftOperationCallable; + } + + @Override + public UnaryCallable deleteDraftCallable() { + return deleteDraftCallable; + } + + @Override + public OperationCallable + deleteDraftOperationCallable() { + return deleteDraftOperationCallable; + } + + @Override + public UnaryCallable listProcessorsCallable() { + return listProcessorsCallable; + } + + @Override + public UnaryCallable + listProcessorsPagedCallable() { + return listProcessorsPagedCallable; + } + + @Override + public UnaryCallable + listPrebuiltProcessorsCallable() { + return listPrebuiltProcessorsCallable; + } + + @Override + public UnaryCallable getProcessorCallable() { + return getProcessorCallable; + } + + @Override + public UnaryCallable createProcessorCallable() { + return createProcessorCallable; + } + + @Override + public OperationCallable + createProcessorOperationCallable() { + return createProcessorOperationCallable; + } + + @Override + public UnaryCallable updateProcessorCallable() { + return updateProcessorCallable; + } + + @Override + public OperationCallable + updateProcessorOperationCallable() { + return updateProcessorOperationCallable; + } + + @Override + public UnaryCallable deleteProcessorCallable() { + return deleteProcessorCallable; + } + + @Override + public OperationCallable + deleteProcessorOperationCallable() { + return deleteProcessorOperationCallable; + } + + @Override + public final void close() { + try { + backgroundResources.close(); + } catch (RuntimeException e) { + throw e; + } catch (Exception e) { + throw new IllegalStateException("Failed to close resource", e); + } + } + + @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/java-visionai/google-cloud-visionai/src/main/java/com/google/cloud/visionai/v1/stub/GrpcHealthCheckServiceCallableFactory.java b/java-visionai/google-cloud-visionai/src/main/java/com/google/cloud/visionai/v1/stub/GrpcHealthCheckServiceCallableFactory.java new file mode 100644 index 000000000000..56320e909ac5 --- /dev/null +++ b/java-visionai/google-cloud-visionai/src/main/java/com/google/cloud/visionai/v1/stub/GrpcHealthCheckServiceCallableFactory.java @@ -0,0 +1,113 @@ +/* + * Copyright 2024 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.visionai.v1.stub; + +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.Operation; +import com.google.longrunning.stub.OperationsStub; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * gRPC callable factory implementation for the HealthCheckService service API. + * + *

This class is for advanced usage. + */ +@Generated("by gapic-generator-java") +public class GrpcHealthCheckServiceCallableFactory 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 callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createPagedCallable(grpcCallSettings, callSettings, clientContext); + } + + @Override + public UnaryCallable createBatchingCallable( + GrpcCallSettings grpcCallSettings, + BatchingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createBatchingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + OperationCallable createOperationCallable( + GrpcCallSettings grpcCallSettings, + OperationCallSettings callSettings, + ClientContext clientContext, + OperationsStub operationsStub) { + return GrpcCallableFactory.createOperationCallable( + grpcCallSettings, callSettings, clientContext, operationsStub); + } + + @Override + public + BidiStreamingCallable createBidiStreamingCallable( + GrpcCallSettings grpcCallSettings, + StreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createBidiStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + ServerStreamingCallable createServerStreamingCallable( + GrpcCallSettings grpcCallSettings, + ServerStreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createServerStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + ClientStreamingCallable createClientStreamingCallable( + GrpcCallSettings grpcCallSettings, + StreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createClientStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } +} diff --git a/java-visionai/google-cloud-visionai/src/main/java/com/google/cloud/visionai/v1/stub/GrpcHealthCheckServiceStub.java b/java-visionai/google-cloud-visionai/src/main/java/com/google/cloud/visionai/v1/stub/GrpcHealthCheckServiceStub.java new file mode 100644 index 000000000000..e8d60b328f13 --- /dev/null +++ b/java-visionai/google-cloud-visionai/src/main/java/com/google/cloud/visionai/v1/stub/GrpcHealthCheckServiceStub.java @@ -0,0 +1,162 @@ +/* + * Copyright 2024 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.visionai.v1.stub; + +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.RequestParamsBuilder; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.visionai.v1.HealthCheckRequest; +import com.google.cloud.visionai.v1.HealthCheckResponse; +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 the HealthCheckService service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") +public class GrpcHealthCheckServiceStub extends HealthCheckServiceStub { + private static final MethodDescriptor + healthCheckMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.visionai.v1.HealthCheckService/HealthCheck") + .setRequestMarshaller(ProtoUtils.marshaller(HealthCheckRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(HealthCheckResponse.getDefaultInstance())) + .build(); + + private final UnaryCallable healthCheckCallable; + + private final BackgroundResource backgroundResources; + private final GrpcOperationsStub operationsStub; + private final GrpcStubCallableFactory callableFactory; + + public static final GrpcHealthCheckServiceStub create(HealthCheckServiceStubSettings settings) + throws IOException { + return new GrpcHealthCheckServiceStub(settings, ClientContext.create(settings)); + } + + public static final GrpcHealthCheckServiceStub create(ClientContext clientContext) + throws IOException { + return new GrpcHealthCheckServiceStub( + HealthCheckServiceStubSettings.newBuilder().build(), clientContext); + } + + public static final GrpcHealthCheckServiceStub create( + ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException { + return new GrpcHealthCheckServiceStub( + HealthCheckServiceStubSettings.newBuilder().build(), clientContext, callableFactory); + } + + /** + * Constructs an instance of GrpcHealthCheckServiceStub, 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 GrpcHealthCheckServiceStub( + HealthCheckServiceStubSettings settings, ClientContext clientContext) throws IOException { + this(settings, clientContext, new GrpcHealthCheckServiceCallableFactory()); + } + + /** + * Constructs an instance of GrpcHealthCheckServiceStub, 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 GrpcHealthCheckServiceStub( + HealthCheckServiceStubSettings settings, + ClientContext clientContext, + GrpcStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory); + + GrpcCallSettings healthCheckTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(healthCheckMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("cluster", String.valueOf(request.getCluster())); + return builder.build(); + }) + .build(); + + this.healthCheckCallable = + callableFactory.createUnaryCallable( + healthCheckTransportSettings, settings.healthCheckSettings(), clientContext); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + public GrpcOperationsStub getOperationsStub() { + return operationsStub; + } + + @Override + public UnaryCallable healthCheckCallable() { + return healthCheckCallable; + } + + @Override + public final void close() { + try { + backgroundResources.close(); + } catch (RuntimeException e) { + throw e; + } catch (Exception e) { + throw new IllegalStateException("Failed to close resource", e); + } + } + + @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/java-visionai/google-cloud-visionai/src/main/java/com/google/cloud/visionai/v1/stub/GrpcLiveVideoAnalyticsCallableFactory.java b/java-visionai/google-cloud-visionai/src/main/java/com/google/cloud/visionai/v1/stub/GrpcLiveVideoAnalyticsCallableFactory.java new file mode 100644 index 000000000000..4e9373b60945 --- /dev/null +++ b/java-visionai/google-cloud-visionai/src/main/java/com/google/cloud/visionai/v1/stub/GrpcLiveVideoAnalyticsCallableFactory.java @@ -0,0 +1,113 @@ +/* + * Copyright 2024 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.visionai.v1.stub; + +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.Operation; +import com.google.longrunning.stub.OperationsStub; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * gRPC callable factory implementation for the LiveVideoAnalytics service API. + * + *

This class is for advanced usage. + */ +@Generated("by gapic-generator-java") +public class GrpcLiveVideoAnalyticsCallableFactory 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 callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createPagedCallable(grpcCallSettings, callSettings, clientContext); + } + + @Override + public UnaryCallable createBatchingCallable( + GrpcCallSettings grpcCallSettings, + BatchingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createBatchingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + OperationCallable createOperationCallable( + GrpcCallSettings grpcCallSettings, + OperationCallSettings callSettings, + ClientContext clientContext, + OperationsStub operationsStub) { + return GrpcCallableFactory.createOperationCallable( + grpcCallSettings, callSettings, clientContext, operationsStub); + } + + @Override + public + BidiStreamingCallable createBidiStreamingCallable( + GrpcCallSettings grpcCallSettings, + StreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createBidiStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + ServerStreamingCallable createServerStreamingCallable( + GrpcCallSettings grpcCallSettings, + ServerStreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createServerStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + ClientStreamingCallable createClientStreamingCallable( + GrpcCallSettings grpcCallSettings, + StreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createClientStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } +} diff --git a/java-visionai/google-cloud-visionai/src/main/java/com/google/cloud/visionai/v1/stub/GrpcLiveVideoAnalyticsStub.java b/java-visionai/google-cloud-visionai/src/main/java/com/google/cloud/visionai/v1/stub/GrpcLiveVideoAnalyticsStub.java new file mode 100644 index 000000000000..48374d1fb599 --- /dev/null +++ b/java-visionai/google-cloud-visionai/src/main/java/com/google/cloud/visionai/v1/stub/GrpcLiveVideoAnalyticsStub.java @@ -0,0 +1,883 @@ +/* + * Copyright 2024 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.visionai.v1.stub; + +import static com.google.cloud.visionai.v1.LiveVideoAnalyticsClient.ListAnalysesPagedResponse; +import static com.google.cloud.visionai.v1.LiveVideoAnalyticsClient.ListOperatorsPagedResponse; +import static com.google.cloud.visionai.v1.LiveVideoAnalyticsClient.ListProcessesPagedResponse; +import static com.google.cloud.visionai.v1.LiveVideoAnalyticsClient.ListPublicOperatorsPagedResponse; + +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.RequestParamsBuilder; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.visionai.v1.Analysis; +import com.google.cloud.visionai.v1.BatchRunProcessRequest; +import com.google.cloud.visionai.v1.BatchRunProcessResponse; +import com.google.cloud.visionai.v1.CreateAnalysisRequest; +import com.google.cloud.visionai.v1.CreateOperatorRequest; +import com.google.cloud.visionai.v1.CreateProcessRequest; +import com.google.cloud.visionai.v1.DeleteAnalysisRequest; +import com.google.cloud.visionai.v1.DeleteOperatorRequest; +import com.google.cloud.visionai.v1.DeleteProcessRequest; +import com.google.cloud.visionai.v1.GetAnalysisRequest; +import com.google.cloud.visionai.v1.GetOperatorRequest; +import com.google.cloud.visionai.v1.GetProcessRequest; +import com.google.cloud.visionai.v1.ListAnalysesRequest; +import com.google.cloud.visionai.v1.ListAnalysesResponse; +import com.google.cloud.visionai.v1.ListOperatorsRequest; +import com.google.cloud.visionai.v1.ListOperatorsResponse; +import com.google.cloud.visionai.v1.ListProcessesRequest; +import com.google.cloud.visionai.v1.ListProcessesResponse; +import com.google.cloud.visionai.v1.ListPublicOperatorsRequest; +import com.google.cloud.visionai.v1.ListPublicOperatorsResponse; +import com.google.cloud.visionai.v1.OperationMetadata; +import com.google.cloud.visionai.v1.Operator; +import com.google.cloud.visionai.v1.Process; +import com.google.cloud.visionai.v1.ResolveOperatorInfoRequest; +import com.google.cloud.visionai.v1.ResolveOperatorInfoResponse; +import com.google.cloud.visionai.v1.UpdateAnalysisRequest; +import com.google.cloud.visionai.v1.UpdateOperatorRequest; +import com.google.cloud.visionai.v1.UpdateProcessRequest; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.GrpcOperationsStub; +import com.google.protobuf.Empty; +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 the LiveVideoAnalytics service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") +public class GrpcLiveVideoAnalyticsStub extends LiveVideoAnalyticsStub { + private static final MethodDescriptor + listPublicOperatorsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.visionai.v1.LiveVideoAnalytics/ListPublicOperators") + .setRequestMarshaller( + ProtoUtils.marshaller(ListPublicOperatorsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListPublicOperatorsResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + resolveOperatorInfoMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.visionai.v1.LiveVideoAnalytics/ResolveOperatorInfo") + .setRequestMarshaller( + ProtoUtils.marshaller(ResolveOperatorInfoRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ResolveOperatorInfoResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + listOperatorsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.visionai.v1.LiveVideoAnalytics/ListOperators") + .setRequestMarshaller( + ProtoUtils.marshaller(ListOperatorsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListOperatorsResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor getOperatorMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.visionai.v1.LiveVideoAnalytics/GetOperator") + .setRequestMarshaller(ProtoUtils.marshaller(GetOperatorRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operator.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + createOperatorMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.visionai.v1.LiveVideoAnalytics/CreateOperator") + .setRequestMarshaller( + ProtoUtils.marshaller(CreateOperatorRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + updateOperatorMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.visionai.v1.LiveVideoAnalytics/UpdateOperator") + .setRequestMarshaller( + ProtoUtils.marshaller(UpdateOperatorRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + deleteOperatorMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.visionai.v1.LiveVideoAnalytics/DeleteOperator") + .setRequestMarshaller( + ProtoUtils.marshaller(DeleteOperatorRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + listAnalysesMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.visionai.v1.LiveVideoAnalytics/ListAnalyses") + .setRequestMarshaller(ProtoUtils.marshaller(ListAnalysesRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListAnalysesResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor getAnalysisMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.visionai.v1.LiveVideoAnalytics/GetAnalysis") + .setRequestMarshaller(ProtoUtils.marshaller(GetAnalysisRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Analysis.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + createAnalysisMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.visionai.v1.LiveVideoAnalytics/CreateAnalysis") + .setRequestMarshaller( + ProtoUtils.marshaller(CreateAnalysisRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + updateAnalysisMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.visionai.v1.LiveVideoAnalytics/UpdateAnalysis") + .setRequestMarshaller( + ProtoUtils.marshaller(UpdateAnalysisRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + deleteAnalysisMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.visionai.v1.LiveVideoAnalytics/DeleteAnalysis") + .setRequestMarshaller( + ProtoUtils.marshaller(DeleteAnalysisRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + listProcessesMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.visionai.v1.LiveVideoAnalytics/ListProcesses") + .setRequestMarshaller( + ProtoUtils.marshaller(ListProcessesRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListProcessesResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor getProcessMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.visionai.v1.LiveVideoAnalytics/GetProcess") + .setRequestMarshaller(ProtoUtils.marshaller(GetProcessRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Process.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + createProcessMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.visionai.v1.LiveVideoAnalytics/CreateProcess") + .setRequestMarshaller( + ProtoUtils.marshaller(CreateProcessRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + updateProcessMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.visionai.v1.LiveVideoAnalytics/UpdateProcess") + .setRequestMarshaller( + ProtoUtils.marshaller(UpdateProcessRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + deleteProcessMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.visionai.v1.LiveVideoAnalytics/DeleteProcess") + .setRequestMarshaller( + ProtoUtils.marshaller(DeleteProcessRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + batchRunProcessMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.visionai.v1.LiveVideoAnalytics/BatchRunProcess") + .setRequestMarshaller( + ProtoUtils.marshaller(BatchRunProcessRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private final UnaryCallable + listPublicOperatorsCallable; + private final UnaryCallable + listPublicOperatorsPagedCallable; + private final UnaryCallable + resolveOperatorInfoCallable; + private final UnaryCallable listOperatorsCallable; + private final UnaryCallable + listOperatorsPagedCallable; + private final UnaryCallable getOperatorCallable; + private final UnaryCallable createOperatorCallable; + private final OperationCallable + createOperatorOperationCallable; + private final UnaryCallable updateOperatorCallable; + private final OperationCallable + updateOperatorOperationCallable; + private final UnaryCallable deleteOperatorCallable; + private final OperationCallable + deleteOperatorOperationCallable; + private final UnaryCallable listAnalysesCallable; + private final UnaryCallable + listAnalysesPagedCallable; + private final UnaryCallable getAnalysisCallable; + private final UnaryCallable createAnalysisCallable; + private final OperationCallable + createAnalysisOperationCallable; + private final UnaryCallable updateAnalysisCallable; + private final OperationCallable + updateAnalysisOperationCallable; + private final UnaryCallable deleteAnalysisCallable; + private final OperationCallable + deleteAnalysisOperationCallable; + private final UnaryCallable listProcessesCallable; + private final UnaryCallable + listProcessesPagedCallable; + private final UnaryCallable getProcessCallable; + private final UnaryCallable createProcessCallable; + private final OperationCallable + createProcessOperationCallable; + private final UnaryCallable updateProcessCallable; + private final OperationCallable + updateProcessOperationCallable; + private final UnaryCallable deleteProcessCallable; + private final OperationCallable + deleteProcessOperationCallable; + private final UnaryCallable batchRunProcessCallable; + private final OperationCallable< + BatchRunProcessRequest, BatchRunProcessResponse, OperationMetadata> + batchRunProcessOperationCallable; + + private final BackgroundResource backgroundResources; + private final GrpcOperationsStub operationsStub; + private final GrpcStubCallableFactory callableFactory; + + public static final GrpcLiveVideoAnalyticsStub create(LiveVideoAnalyticsStubSettings settings) + throws IOException { + return new GrpcLiveVideoAnalyticsStub(settings, ClientContext.create(settings)); + } + + public static final GrpcLiveVideoAnalyticsStub create(ClientContext clientContext) + throws IOException { + return new GrpcLiveVideoAnalyticsStub( + LiveVideoAnalyticsStubSettings.newBuilder().build(), clientContext); + } + + public static final GrpcLiveVideoAnalyticsStub create( + ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException { + return new GrpcLiveVideoAnalyticsStub( + LiveVideoAnalyticsStubSettings.newBuilder().build(), clientContext, callableFactory); + } + + /** + * Constructs an instance of GrpcLiveVideoAnalyticsStub, 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 GrpcLiveVideoAnalyticsStub( + LiveVideoAnalyticsStubSettings settings, ClientContext clientContext) throws IOException { + this(settings, clientContext, new GrpcLiveVideoAnalyticsCallableFactory()); + } + + /** + * Constructs an instance of GrpcLiveVideoAnalyticsStub, 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 GrpcLiveVideoAnalyticsStub( + LiveVideoAnalyticsStubSettings settings, + ClientContext clientContext, + GrpcStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory); + + GrpcCallSettings + listPublicOperatorsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listPublicOperatorsMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + GrpcCallSettings + resolveOperatorInfoTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(resolveOperatorInfoMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + GrpcCallSettings listOperatorsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listOperatorsMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + GrpcCallSettings getOperatorTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getOperatorMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings createOperatorTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createOperatorMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + GrpcCallSettings updateOperatorTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(updateOperatorMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("operator.name", String.valueOf(request.getOperator().getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings deleteOperatorTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deleteOperatorMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings listAnalysesTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listAnalysesMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + GrpcCallSettings getAnalysisTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getAnalysisMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings createAnalysisTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createAnalysisMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + GrpcCallSettings updateAnalysisTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(updateAnalysisMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("analysis.name", String.valueOf(request.getAnalysis().getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings deleteAnalysisTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deleteAnalysisMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings listProcessesTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listProcessesMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + GrpcCallSettings getProcessTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getProcessMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings createProcessTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createProcessMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + GrpcCallSettings updateProcessTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(updateProcessMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("process.name", String.valueOf(request.getProcess().getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings deleteProcessTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deleteProcessMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings batchRunProcessTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(batchRunProcessMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + + this.listPublicOperatorsCallable = + callableFactory.createUnaryCallable( + listPublicOperatorsTransportSettings, + settings.listPublicOperatorsSettings(), + clientContext); + this.listPublicOperatorsPagedCallable = + callableFactory.createPagedCallable( + listPublicOperatorsTransportSettings, + settings.listPublicOperatorsSettings(), + clientContext); + this.resolveOperatorInfoCallable = + callableFactory.createUnaryCallable( + resolveOperatorInfoTransportSettings, + settings.resolveOperatorInfoSettings(), + clientContext); + this.listOperatorsCallable = + callableFactory.createUnaryCallable( + listOperatorsTransportSettings, settings.listOperatorsSettings(), clientContext); + this.listOperatorsPagedCallable = + callableFactory.createPagedCallable( + listOperatorsTransportSettings, settings.listOperatorsSettings(), clientContext); + this.getOperatorCallable = + callableFactory.createUnaryCallable( + getOperatorTransportSettings, settings.getOperatorSettings(), clientContext); + this.createOperatorCallable = + callableFactory.createUnaryCallable( + createOperatorTransportSettings, settings.createOperatorSettings(), clientContext); + this.createOperatorOperationCallable = + callableFactory.createOperationCallable( + createOperatorTransportSettings, + settings.createOperatorOperationSettings(), + clientContext, + operationsStub); + this.updateOperatorCallable = + callableFactory.createUnaryCallable( + updateOperatorTransportSettings, settings.updateOperatorSettings(), clientContext); + this.updateOperatorOperationCallable = + callableFactory.createOperationCallable( + updateOperatorTransportSettings, + settings.updateOperatorOperationSettings(), + clientContext, + operationsStub); + this.deleteOperatorCallable = + callableFactory.createUnaryCallable( + deleteOperatorTransportSettings, settings.deleteOperatorSettings(), clientContext); + this.deleteOperatorOperationCallable = + callableFactory.createOperationCallable( + deleteOperatorTransportSettings, + settings.deleteOperatorOperationSettings(), + clientContext, + operationsStub); + this.listAnalysesCallable = + callableFactory.createUnaryCallable( + listAnalysesTransportSettings, settings.listAnalysesSettings(), clientContext); + this.listAnalysesPagedCallable = + callableFactory.createPagedCallable( + listAnalysesTransportSettings, settings.listAnalysesSettings(), clientContext); + this.getAnalysisCallable = + callableFactory.createUnaryCallable( + getAnalysisTransportSettings, settings.getAnalysisSettings(), clientContext); + this.createAnalysisCallable = + callableFactory.createUnaryCallable( + createAnalysisTransportSettings, settings.createAnalysisSettings(), clientContext); + this.createAnalysisOperationCallable = + callableFactory.createOperationCallable( + createAnalysisTransportSettings, + settings.createAnalysisOperationSettings(), + clientContext, + operationsStub); + this.updateAnalysisCallable = + callableFactory.createUnaryCallable( + updateAnalysisTransportSettings, settings.updateAnalysisSettings(), clientContext); + this.updateAnalysisOperationCallable = + callableFactory.createOperationCallable( + updateAnalysisTransportSettings, + settings.updateAnalysisOperationSettings(), + clientContext, + operationsStub); + this.deleteAnalysisCallable = + callableFactory.createUnaryCallable( + deleteAnalysisTransportSettings, settings.deleteAnalysisSettings(), clientContext); + this.deleteAnalysisOperationCallable = + callableFactory.createOperationCallable( + deleteAnalysisTransportSettings, + settings.deleteAnalysisOperationSettings(), + clientContext, + operationsStub); + this.listProcessesCallable = + callableFactory.createUnaryCallable( + listProcessesTransportSettings, settings.listProcessesSettings(), clientContext); + this.listProcessesPagedCallable = + callableFactory.createPagedCallable( + listProcessesTransportSettings, settings.listProcessesSettings(), clientContext); + this.getProcessCallable = + callableFactory.createUnaryCallable( + getProcessTransportSettings, settings.getProcessSettings(), clientContext); + this.createProcessCallable = + callableFactory.createUnaryCallable( + createProcessTransportSettings, settings.createProcessSettings(), clientContext); + this.createProcessOperationCallable = + callableFactory.createOperationCallable( + createProcessTransportSettings, + settings.createProcessOperationSettings(), + clientContext, + operationsStub); + this.updateProcessCallable = + callableFactory.createUnaryCallable( + updateProcessTransportSettings, settings.updateProcessSettings(), clientContext); + this.updateProcessOperationCallable = + callableFactory.createOperationCallable( + updateProcessTransportSettings, + settings.updateProcessOperationSettings(), + clientContext, + operationsStub); + this.deleteProcessCallable = + callableFactory.createUnaryCallable( + deleteProcessTransportSettings, settings.deleteProcessSettings(), clientContext); + this.deleteProcessOperationCallable = + callableFactory.createOperationCallable( + deleteProcessTransportSettings, + settings.deleteProcessOperationSettings(), + clientContext, + operationsStub); + this.batchRunProcessCallable = + callableFactory.createUnaryCallable( + batchRunProcessTransportSettings, settings.batchRunProcessSettings(), clientContext); + this.batchRunProcessOperationCallable = + callableFactory.createOperationCallable( + batchRunProcessTransportSettings, + settings.batchRunProcessOperationSettings(), + clientContext, + operationsStub); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + public GrpcOperationsStub getOperationsStub() { + return operationsStub; + } + + @Override + public UnaryCallable + listPublicOperatorsCallable() { + return listPublicOperatorsCallable; + } + + @Override + public UnaryCallable + listPublicOperatorsPagedCallable() { + return listPublicOperatorsPagedCallable; + } + + @Override + public UnaryCallable + resolveOperatorInfoCallable() { + return resolveOperatorInfoCallable; + } + + @Override + public UnaryCallable listOperatorsCallable() { + return listOperatorsCallable; + } + + @Override + public UnaryCallable + listOperatorsPagedCallable() { + return listOperatorsPagedCallable; + } + + @Override + public UnaryCallable getOperatorCallable() { + return getOperatorCallable; + } + + @Override + public UnaryCallable createOperatorCallable() { + return createOperatorCallable; + } + + @Override + public OperationCallable + createOperatorOperationCallable() { + return createOperatorOperationCallable; + } + + @Override + public UnaryCallable updateOperatorCallable() { + return updateOperatorCallable; + } + + @Override + public OperationCallable + updateOperatorOperationCallable() { + return updateOperatorOperationCallable; + } + + @Override + public UnaryCallable deleteOperatorCallable() { + return deleteOperatorCallable; + } + + @Override + public OperationCallable + deleteOperatorOperationCallable() { + return deleteOperatorOperationCallable; + } + + @Override + public UnaryCallable listAnalysesCallable() { + return listAnalysesCallable; + } + + @Override + public UnaryCallable listAnalysesPagedCallable() { + return listAnalysesPagedCallable; + } + + @Override + public UnaryCallable getAnalysisCallable() { + return getAnalysisCallable; + } + + @Override + public UnaryCallable createAnalysisCallable() { + return createAnalysisCallable; + } + + @Override + public OperationCallable + createAnalysisOperationCallable() { + return createAnalysisOperationCallable; + } + + @Override + public UnaryCallable updateAnalysisCallable() { + return updateAnalysisCallable; + } + + @Override + public OperationCallable + updateAnalysisOperationCallable() { + return updateAnalysisOperationCallable; + } + + @Override + public UnaryCallable deleteAnalysisCallable() { + return deleteAnalysisCallable; + } + + @Override + public OperationCallable + deleteAnalysisOperationCallable() { + return deleteAnalysisOperationCallable; + } + + @Override + public UnaryCallable listProcessesCallable() { + return listProcessesCallable; + } + + @Override + public UnaryCallable + listProcessesPagedCallable() { + return listProcessesPagedCallable; + } + + @Override + public UnaryCallable getProcessCallable() { + return getProcessCallable; + } + + @Override + public UnaryCallable createProcessCallable() { + return createProcessCallable; + } + + @Override + public OperationCallable + createProcessOperationCallable() { + return createProcessOperationCallable; + } + + @Override + public UnaryCallable updateProcessCallable() { + return updateProcessCallable; + } + + @Override + public OperationCallable + updateProcessOperationCallable() { + return updateProcessOperationCallable; + } + + @Override + public UnaryCallable deleteProcessCallable() { + return deleteProcessCallable; + } + + @Override + public OperationCallable + deleteProcessOperationCallable() { + return deleteProcessOperationCallable; + } + + @Override + public UnaryCallable batchRunProcessCallable() { + return batchRunProcessCallable; + } + + @Override + public OperationCallable + batchRunProcessOperationCallable() { + return batchRunProcessOperationCallable; + } + + @Override + public final void close() { + try { + backgroundResources.close(); + } catch (RuntimeException e) { + throw e; + } catch (Exception e) { + throw new IllegalStateException("Failed to close resource", e); + } + } + + @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/java-visionai/google-cloud-visionai/src/main/java/com/google/cloud/visionai/v1/stub/GrpcStreamingServiceCallableFactory.java b/java-visionai/google-cloud-visionai/src/main/java/com/google/cloud/visionai/v1/stub/GrpcStreamingServiceCallableFactory.java new file mode 100644 index 000000000000..b057939e3c1d --- /dev/null +++ b/java-visionai/google-cloud-visionai/src/main/java/com/google/cloud/visionai/v1/stub/GrpcStreamingServiceCallableFactory.java @@ -0,0 +1,113 @@ +/* + * Copyright 2024 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.visionai.v1.stub; + +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.Operation; +import com.google.longrunning.stub.OperationsStub; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * gRPC callable factory implementation for the StreamingService service API. + * + *

This class is for advanced usage. + */ +@Generated("by gapic-generator-java") +public class GrpcStreamingServiceCallableFactory 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 callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createPagedCallable(grpcCallSettings, callSettings, clientContext); + } + + @Override + public UnaryCallable createBatchingCallable( + GrpcCallSettings grpcCallSettings, + BatchingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createBatchingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + OperationCallable createOperationCallable( + GrpcCallSettings grpcCallSettings, + OperationCallSettings callSettings, + ClientContext clientContext, + OperationsStub operationsStub) { + return GrpcCallableFactory.createOperationCallable( + grpcCallSettings, callSettings, clientContext, operationsStub); + } + + @Override + public + BidiStreamingCallable createBidiStreamingCallable( + GrpcCallSettings grpcCallSettings, + StreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createBidiStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + ServerStreamingCallable createServerStreamingCallable( + GrpcCallSettings grpcCallSettings, + ServerStreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createServerStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + ClientStreamingCallable createClientStreamingCallable( + GrpcCallSettings grpcCallSettings, + StreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createClientStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } +} diff --git a/java-visionai/google-cloud-visionai/src/main/java/com/google/cloud/visionai/v1/stub/GrpcStreamingServiceStub.java b/java-visionai/google-cloud-visionai/src/main/java/com/google/cloud/visionai/v1/stub/GrpcStreamingServiceStub.java new file mode 100644 index 000000000000..7890c69a6046 --- /dev/null +++ b/java-visionai/google-cloud-visionai/src/main/java/com/google/cloud/visionai/v1/stub/GrpcStreamingServiceStub.java @@ -0,0 +1,302 @@ +/* + * Copyright 2024 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.visionai.v1.stub; + +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.api.gax.rpc.RequestParamsBuilder; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.visionai.v1.AcquireLeaseRequest; +import com.google.cloud.visionai.v1.Lease; +import com.google.cloud.visionai.v1.ReceiveEventsRequest; +import com.google.cloud.visionai.v1.ReceiveEventsResponse; +import com.google.cloud.visionai.v1.ReceivePacketsRequest; +import com.google.cloud.visionai.v1.ReceivePacketsResponse; +import com.google.cloud.visionai.v1.ReleaseLeaseRequest; +import com.google.cloud.visionai.v1.ReleaseLeaseResponse; +import com.google.cloud.visionai.v1.RenewLeaseRequest; +import com.google.cloud.visionai.v1.SendPacketsRequest; +import com.google.cloud.visionai.v1.SendPacketsResponse; +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 the StreamingService service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") +public class GrpcStreamingServiceStub extends StreamingServiceStub { + private static final MethodDescriptor + sendPacketsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.BIDI_STREAMING) + .setFullMethodName("google.cloud.visionai.v1.StreamingService/SendPackets") + .setRequestMarshaller(ProtoUtils.marshaller(SendPacketsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(SendPacketsResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + receivePacketsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.BIDI_STREAMING) + .setFullMethodName("google.cloud.visionai.v1.StreamingService/ReceivePackets") + .setRequestMarshaller( + ProtoUtils.marshaller(ReceivePacketsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ReceivePacketsResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + receiveEventsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.BIDI_STREAMING) + .setFullMethodName("google.cloud.visionai.v1.StreamingService/ReceiveEvents") + .setRequestMarshaller( + ProtoUtils.marshaller(ReceiveEventsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ReceiveEventsResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor acquireLeaseMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.visionai.v1.StreamingService/AcquireLease") + .setRequestMarshaller(ProtoUtils.marshaller(AcquireLeaseRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Lease.getDefaultInstance())) + .build(); + + private static final MethodDescriptor renewLeaseMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.visionai.v1.StreamingService/RenewLease") + .setRequestMarshaller(ProtoUtils.marshaller(RenewLeaseRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Lease.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + releaseLeaseMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.visionai.v1.StreamingService/ReleaseLease") + .setRequestMarshaller(ProtoUtils.marshaller(ReleaseLeaseRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ReleaseLeaseResponse.getDefaultInstance())) + .build(); + + private final BidiStreamingCallable sendPacketsCallable; + private final BidiStreamingCallable + receivePacketsCallable; + private final BidiStreamingCallable + receiveEventsCallable; + private final UnaryCallable acquireLeaseCallable; + private final UnaryCallable renewLeaseCallable; + private final UnaryCallable releaseLeaseCallable; + + private final BackgroundResource backgroundResources; + private final GrpcOperationsStub operationsStub; + private final GrpcStubCallableFactory callableFactory; + + public static final GrpcStreamingServiceStub create(StreamingServiceStubSettings settings) + throws IOException { + return new GrpcStreamingServiceStub(settings, ClientContext.create(settings)); + } + + public static final GrpcStreamingServiceStub create(ClientContext clientContext) + throws IOException { + return new GrpcStreamingServiceStub( + StreamingServiceStubSettings.newBuilder().build(), clientContext); + } + + public static final GrpcStreamingServiceStub create( + ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException { + return new GrpcStreamingServiceStub( + StreamingServiceStubSettings.newBuilder().build(), clientContext, callableFactory); + } + + /** + * Constructs an instance of GrpcStreamingServiceStub, 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 GrpcStreamingServiceStub( + StreamingServiceStubSettings settings, ClientContext clientContext) throws IOException { + this(settings, clientContext, new GrpcStreamingServiceCallableFactory()); + } + + /** + * Constructs an instance of GrpcStreamingServiceStub, 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 GrpcStreamingServiceStub( + StreamingServiceStubSettings settings, + ClientContext clientContext, + GrpcStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory); + + GrpcCallSettings sendPacketsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(sendPacketsMethodDescriptor) + .build(); + GrpcCallSettings + receivePacketsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(receivePacketsMethodDescriptor) + .build(); + GrpcCallSettings receiveEventsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(receiveEventsMethodDescriptor) + .build(); + GrpcCallSettings acquireLeaseTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(acquireLeaseMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("series", String.valueOf(request.getSeries())); + return builder.build(); + }) + .build(); + GrpcCallSettings renewLeaseTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(renewLeaseMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("series", String.valueOf(request.getSeries())); + return builder.build(); + }) + .build(); + GrpcCallSettings releaseLeaseTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(releaseLeaseMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("series", String.valueOf(request.getSeries())); + return builder.build(); + }) + .build(); + + this.sendPacketsCallable = + callableFactory.createBidiStreamingCallable( + sendPacketsTransportSettings, settings.sendPacketsSettings(), clientContext); + this.receivePacketsCallable = + callableFactory.createBidiStreamingCallable( + receivePacketsTransportSettings, settings.receivePacketsSettings(), clientContext); + this.receiveEventsCallable = + callableFactory.createBidiStreamingCallable( + receiveEventsTransportSettings, settings.receiveEventsSettings(), clientContext); + this.acquireLeaseCallable = + callableFactory.createUnaryCallable( + acquireLeaseTransportSettings, settings.acquireLeaseSettings(), clientContext); + this.renewLeaseCallable = + callableFactory.createUnaryCallable( + renewLeaseTransportSettings, settings.renewLeaseSettings(), clientContext); + this.releaseLeaseCallable = + callableFactory.createUnaryCallable( + releaseLeaseTransportSettings, settings.releaseLeaseSettings(), clientContext); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + public GrpcOperationsStub getOperationsStub() { + return operationsStub; + } + + @Override + public BidiStreamingCallable sendPacketsCallable() { + return sendPacketsCallable; + } + + @Override + public BidiStreamingCallable + receivePacketsCallable() { + return receivePacketsCallable; + } + + @Override + public BidiStreamingCallable + receiveEventsCallable() { + return receiveEventsCallable; + } + + @Override + public UnaryCallable acquireLeaseCallable() { + return acquireLeaseCallable; + } + + @Override + public UnaryCallable renewLeaseCallable() { + return renewLeaseCallable; + } + + @Override + public UnaryCallable releaseLeaseCallable() { + return releaseLeaseCallable; + } + + @Override + public final void close() { + try { + backgroundResources.close(); + } catch (RuntimeException e) { + throw e; + } catch (Exception e) { + throw new IllegalStateException("Failed to close resource", e); + } + } + + @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/java-visionai/google-cloud-visionai/src/main/java/com/google/cloud/visionai/v1/stub/GrpcStreamsServiceCallableFactory.java b/java-visionai/google-cloud-visionai/src/main/java/com/google/cloud/visionai/v1/stub/GrpcStreamsServiceCallableFactory.java new file mode 100644 index 000000000000..efd67ae31209 --- /dev/null +++ b/java-visionai/google-cloud-visionai/src/main/java/com/google/cloud/visionai/v1/stub/GrpcStreamsServiceCallableFactory.java @@ -0,0 +1,113 @@ +/* + * Copyright 2024 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.visionai.v1.stub; + +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.Operation; +import com.google.longrunning.stub.OperationsStub; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * gRPC callable factory implementation for the StreamsService service API. + * + *

This class is for advanced usage. + */ +@Generated("by gapic-generator-java") +public class GrpcStreamsServiceCallableFactory 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 callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createPagedCallable(grpcCallSettings, callSettings, clientContext); + } + + @Override + public UnaryCallable createBatchingCallable( + GrpcCallSettings grpcCallSettings, + BatchingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createBatchingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + OperationCallable createOperationCallable( + GrpcCallSettings grpcCallSettings, + OperationCallSettings callSettings, + ClientContext clientContext, + OperationsStub operationsStub) { + return GrpcCallableFactory.createOperationCallable( + grpcCallSettings, callSettings, clientContext, operationsStub); + } + + @Override + public + BidiStreamingCallable createBidiStreamingCallable( + GrpcCallSettings grpcCallSettings, + StreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createBidiStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + ServerStreamingCallable createServerStreamingCallable( + GrpcCallSettings grpcCallSettings, + ServerStreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createServerStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + ClientStreamingCallable createClientStreamingCallable( + GrpcCallSettings grpcCallSettings, + StreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createClientStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } +} diff --git a/java-visionai/google-cloud-visionai/src/main/java/com/google/cloud/visionai/v1/stub/GrpcStreamsServiceStub.java b/java-visionai/google-cloud-visionai/src/main/java/com/google/cloud/visionai/v1/stub/GrpcStreamsServiceStub.java new file mode 100644 index 000000000000..a1729331f339 --- /dev/null +++ b/java-visionai/google-cloud-visionai/src/main/java/com/google/cloud/visionai/v1/stub/GrpcStreamsServiceStub.java @@ -0,0 +1,1067 @@ +/* + * Copyright 2024 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.visionai.v1.stub; + +import static com.google.cloud.visionai.v1.StreamsServiceClient.ListClustersPagedResponse; +import static com.google.cloud.visionai.v1.StreamsServiceClient.ListEventsPagedResponse; +import static com.google.cloud.visionai.v1.StreamsServiceClient.ListSeriesPagedResponse; +import static com.google.cloud.visionai.v1.StreamsServiceClient.ListStreamsPagedResponse; + +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.RequestParamsBuilder; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.visionai.v1.Channel; +import com.google.cloud.visionai.v1.Cluster; +import com.google.cloud.visionai.v1.CreateClusterRequest; +import com.google.cloud.visionai.v1.CreateEventRequest; +import com.google.cloud.visionai.v1.CreateSeriesRequest; +import com.google.cloud.visionai.v1.CreateStreamRequest; +import com.google.cloud.visionai.v1.DeleteClusterRequest; +import com.google.cloud.visionai.v1.DeleteEventRequest; +import com.google.cloud.visionai.v1.DeleteSeriesRequest; +import com.google.cloud.visionai.v1.DeleteStreamRequest; +import com.google.cloud.visionai.v1.Event; +import com.google.cloud.visionai.v1.GenerateStreamHlsTokenRequest; +import com.google.cloud.visionai.v1.GenerateStreamHlsTokenResponse; +import com.google.cloud.visionai.v1.GetClusterRequest; +import com.google.cloud.visionai.v1.GetEventRequest; +import com.google.cloud.visionai.v1.GetSeriesRequest; +import com.google.cloud.visionai.v1.GetStreamRequest; +import com.google.cloud.visionai.v1.GetStreamThumbnailRequest; +import com.google.cloud.visionai.v1.GetStreamThumbnailResponse; +import com.google.cloud.visionai.v1.ListClustersRequest; +import com.google.cloud.visionai.v1.ListClustersResponse; +import com.google.cloud.visionai.v1.ListEventsRequest; +import com.google.cloud.visionai.v1.ListEventsResponse; +import com.google.cloud.visionai.v1.ListSeriesRequest; +import com.google.cloud.visionai.v1.ListSeriesResponse; +import com.google.cloud.visionai.v1.ListStreamsRequest; +import com.google.cloud.visionai.v1.ListStreamsResponse; +import com.google.cloud.visionai.v1.MaterializeChannelRequest; +import com.google.cloud.visionai.v1.OperationMetadata; +import com.google.cloud.visionai.v1.Series; +import com.google.cloud.visionai.v1.Stream; +import com.google.cloud.visionai.v1.UpdateClusterRequest; +import com.google.cloud.visionai.v1.UpdateEventRequest; +import com.google.cloud.visionai.v1.UpdateSeriesRequest; +import com.google.cloud.visionai.v1.UpdateStreamRequest; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.GrpcOperationsStub; +import com.google.protobuf.Empty; +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 the StreamsService service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") +public class GrpcStreamsServiceStub extends StreamsServiceStub { + private static final MethodDescriptor + listClustersMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.visionai.v1.StreamsService/ListClusters") + .setRequestMarshaller(ProtoUtils.marshaller(ListClustersRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListClustersResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor getClusterMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.visionai.v1.StreamsService/GetCluster") + .setRequestMarshaller(ProtoUtils.marshaller(GetClusterRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Cluster.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + createClusterMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.visionai.v1.StreamsService/CreateCluster") + .setRequestMarshaller( + ProtoUtils.marshaller(CreateClusterRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + updateClusterMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.visionai.v1.StreamsService/UpdateCluster") + .setRequestMarshaller( + ProtoUtils.marshaller(UpdateClusterRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + deleteClusterMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.visionai.v1.StreamsService/DeleteCluster") + .setRequestMarshaller( + ProtoUtils.marshaller(DeleteClusterRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + listStreamsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.visionai.v1.StreamsService/ListStreams") + .setRequestMarshaller(ProtoUtils.marshaller(ListStreamsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListStreamsResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor getStreamMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.visionai.v1.StreamsService/GetStream") + .setRequestMarshaller(ProtoUtils.marshaller(GetStreamRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Stream.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + createStreamMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.visionai.v1.StreamsService/CreateStream") + .setRequestMarshaller(ProtoUtils.marshaller(CreateStreamRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + updateStreamMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.visionai.v1.StreamsService/UpdateStream") + .setRequestMarshaller(ProtoUtils.marshaller(UpdateStreamRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + deleteStreamMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.visionai.v1.StreamsService/DeleteStream") + .setRequestMarshaller(ProtoUtils.marshaller(DeleteStreamRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + getStreamThumbnailMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.visionai.v1.StreamsService/GetStreamThumbnail") + .setRequestMarshaller( + ProtoUtils.marshaller(GetStreamThumbnailRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor< + GenerateStreamHlsTokenRequest, GenerateStreamHlsTokenResponse> + generateStreamHlsTokenMethodDescriptor = + MethodDescriptor + .newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.visionai.v1.StreamsService/GenerateStreamHlsToken") + .setRequestMarshaller( + ProtoUtils.marshaller(GenerateStreamHlsTokenRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(GenerateStreamHlsTokenResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + listEventsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.visionai.v1.StreamsService/ListEvents") + .setRequestMarshaller(ProtoUtils.marshaller(ListEventsRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(ListEventsResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor getEventMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.visionai.v1.StreamsService/GetEvent") + .setRequestMarshaller(ProtoUtils.marshaller(GetEventRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Event.getDefaultInstance())) + .build(); + + private static final MethodDescriptor createEventMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.visionai.v1.StreamsService/CreateEvent") + .setRequestMarshaller(ProtoUtils.marshaller(CreateEventRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor updateEventMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.visionai.v1.StreamsService/UpdateEvent") + .setRequestMarshaller(ProtoUtils.marshaller(UpdateEventRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor deleteEventMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.visionai.v1.StreamsService/DeleteEvent") + .setRequestMarshaller(ProtoUtils.marshaller(DeleteEventRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + listSeriesMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.visionai.v1.StreamsService/ListSeries") + .setRequestMarshaller(ProtoUtils.marshaller(ListSeriesRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(ListSeriesResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor getSeriesMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.visionai.v1.StreamsService/GetSeries") + .setRequestMarshaller(ProtoUtils.marshaller(GetSeriesRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Series.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + createSeriesMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.visionai.v1.StreamsService/CreateSeries") + .setRequestMarshaller(ProtoUtils.marshaller(CreateSeriesRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + updateSeriesMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.visionai.v1.StreamsService/UpdateSeries") + .setRequestMarshaller(ProtoUtils.marshaller(UpdateSeriesRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + deleteSeriesMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.visionai.v1.StreamsService/DeleteSeries") + .setRequestMarshaller(ProtoUtils.marshaller(DeleteSeriesRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + materializeChannelMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.visionai.v1.StreamsService/MaterializeChannel") + .setRequestMarshaller( + ProtoUtils.marshaller(MaterializeChannelRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private final UnaryCallable listClustersCallable; + private final UnaryCallable + listClustersPagedCallable; + private final UnaryCallable getClusterCallable; + private final UnaryCallable createClusterCallable; + private final OperationCallable + createClusterOperationCallable; + private final UnaryCallable updateClusterCallable; + private final OperationCallable + updateClusterOperationCallable; + private final UnaryCallable deleteClusterCallable; + private final OperationCallable + deleteClusterOperationCallable; + private final UnaryCallable listStreamsCallable; + private final UnaryCallable + listStreamsPagedCallable; + private final UnaryCallable getStreamCallable; + private final UnaryCallable createStreamCallable; + private final OperationCallable + createStreamOperationCallable; + private final UnaryCallable updateStreamCallable; + private final OperationCallable + updateStreamOperationCallable; + private final UnaryCallable deleteStreamCallable; + private final OperationCallable + deleteStreamOperationCallable; + private final UnaryCallable getStreamThumbnailCallable; + private final OperationCallable< + GetStreamThumbnailRequest, GetStreamThumbnailResponse, OperationMetadata> + getStreamThumbnailOperationCallable; + private final UnaryCallable + generateStreamHlsTokenCallable; + private final UnaryCallable listEventsCallable; + private final UnaryCallable listEventsPagedCallable; + private final UnaryCallable getEventCallable; + private final UnaryCallable createEventCallable; + private final OperationCallable + createEventOperationCallable; + private final UnaryCallable updateEventCallable; + private final OperationCallable + updateEventOperationCallable; + private final UnaryCallable deleteEventCallable; + private final OperationCallable + deleteEventOperationCallable; + private final UnaryCallable listSeriesCallable; + private final UnaryCallable listSeriesPagedCallable; + private final UnaryCallable getSeriesCallable; + private final UnaryCallable createSeriesCallable; + private final OperationCallable + createSeriesOperationCallable; + private final UnaryCallable updateSeriesCallable; + private final OperationCallable + updateSeriesOperationCallable; + private final UnaryCallable deleteSeriesCallable; + private final OperationCallable + deleteSeriesOperationCallable; + private final UnaryCallable materializeChannelCallable; + private final OperationCallable + materializeChannelOperationCallable; + + private final BackgroundResource backgroundResources; + private final GrpcOperationsStub operationsStub; + private final GrpcStubCallableFactory callableFactory; + + public static final GrpcStreamsServiceStub create(StreamsServiceStubSettings settings) + throws IOException { + return new GrpcStreamsServiceStub(settings, ClientContext.create(settings)); + } + + public static final GrpcStreamsServiceStub create(ClientContext clientContext) + throws IOException { + return new GrpcStreamsServiceStub( + StreamsServiceStubSettings.newBuilder().build(), clientContext); + } + + public static final GrpcStreamsServiceStub create( + ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException { + return new GrpcStreamsServiceStub( + StreamsServiceStubSettings.newBuilder().build(), clientContext, callableFactory); + } + + /** + * Constructs an instance of GrpcStreamsServiceStub, 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 GrpcStreamsServiceStub(StreamsServiceStubSettings settings, ClientContext clientContext) + throws IOException { + this(settings, clientContext, new GrpcStreamsServiceCallableFactory()); + } + + /** + * Constructs an instance of GrpcStreamsServiceStub, 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 GrpcStreamsServiceStub( + StreamsServiceStubSettings settings, + ClientContext clientContext, + GrpcStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory); + + GrpcCallSettings listClustersTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listClustersMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + GrpcCallSettings getClusterTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getClusterMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings createClusterTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createClusterMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + GrpcCallSettings updateClusterTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(updateClusterMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("cluster.name", String.valueOf(request.getCluster().getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings deleteClusterTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deleteClusterMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings listStreamsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listStreamsMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + GrpcCallSettings getStreamTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getStreamMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings createStreamTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createStreamMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + GrpcCallSettings updateStreamTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(updateStreamMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("stream.name", String.valueOf(request.getStream().getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings deleteStreamTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deleteStreamMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings getStreamThumbnailTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getStreamThumbnailMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("stream", String.valueOf(request.getStream())); + return builder.build(); + }) + .build(); + GrpcCallSettings + generateStreamHlsTokenTransportSettings = + GrpcCallSettings + .newBuilder() + .setMethodDescriptor(generateStreamHlsTokenMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("stream", String.valueOf(request.getStream())); + return builder.build(); + }) + .build(); + GrpcCallSettings listEventsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listEventsMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + GrpcCallSettings getEventTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getEventMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings createEventTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createEventMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + GrpcCallSettings updateEventTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(updateEventMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("event.name", String.valueOf(request.getEvent().getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings deleteEventTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deleteEventMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings listSeriesTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listSeriesMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + GrpcCallSettings getSeriesTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getSeriesMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings createSeriesTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createSeriesMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + GrpcCallSettings updateSeriesTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(updateSeriesMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("series.name", String.valueOf(request.getSeries().getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings deleteSeriesTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deleteSeriesMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings materializeChannelTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(materializeChannelMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + + this.listClustersCallable = + callableFactory.createUnaryCallable( + listClustersTransportSettings, settings.listClustersSettings(), clientContext); + this.listClustersPagedCallable = + callableFactory.createPagedCallable( + listClustersTransportSettings, settings.listClustersSettings(), clientContext); + this.getClusterCallable = + callableFactory.createUnaryCallable( + getClusterTransportSettings, settings.getClusterSettings(), clientContext); + this.createClusterCallable = + callableFactory.createUnaryCallable( + createClusterTransportSettings, settings.createClusterSettings(), clientContext); + this.createClusterOperationCallable = + callableFactory.createOperationCallable( + createClusterTransportSettings, + settings.createClusterOperationSettings(), + clientContext, + operationsStub); + this.updateClusterCallable = + callableFactory.createUnaryCallable( + updateClusterTransportSettings, settings.updateClusterSettings(), clientContext); + this.updateClusterOperationCallable = + callableFactory.createOperationCallable( + updateClusterTransportSettings, + settings.updateClusterOperationSettings(), + clientContext, + operationsStub); + this.deleteClusterCallable = + callableFactory.createUnaryCallable( + deleteClusterTransportSettings, settings.deleteClusterSettings(), clientContext); + this.deleteClusterOperationCallable = + callableFactory.createOperationCallable( + deleteClusterTransportSettings, + settings.deleteClusterOperationSettings(), + clientContext, + operationsStub); + this.listStreamsCallable = + callableFactory.createUnaryCallable( + listStreamsTransportSettings, settings.listStreamsSettings(), clientContext); + this.listStreamsPagedCallable = + callableFactory.createPagedCallable( + listStreamsTransportSettings, settings.listStreamsSettings(), clientContext); + this.getStreamCallable = + callableFactory.createUnaryCallable( + getStreamTransportSettings, settings.getStreamSettings(), clientContext); + this.createStreamCallable = + callableFactory.createUnaryCallable( + createStreamTransportSettings, settings.createStreamSettings(), clientContext); + this.createStreamOperationCallable = + callableFactory.createOperationCallable( + createStreamTransportSettings, + settings.createStreamOperationSettings(), + clientContext, + operationsStub); + this.updateStreamCallable = + callableFactory.createUnaryCallable( + updateStreamTransportSettings, settings.updateStreamSettings(), clientContext); + this.updateStreamOperationCallable = + callableFactory.createOperationCallable( + updateStreamTransportSettings, + settings.updateStreamOperationSettings(), + clientContext, + operationsStub); + this.deleteStreamCallable = + callableFactory.createUnaryCallable( + deleteStreamTransportSettings, settings.deleteStreamSettings(), clientContext); + this.deleteStreamOperationCallable = + callableFactory.createOperationCallable( + deleteStreamTransportSettings, + settings.deleteStreamOperationSettings(), + clientContext, + operationsStub); + this.getStreamThumbnailCallable = + callableFactory.createUnaryCallable( + getStreamThumbnailTransportSettings, + settings.getStreamThumbnailSettings(), + clientContext); + this.getStreamThumbnailOperationCallable = + callableFactory.createOperationCallable( + getStreamThumbnailTransportSettings, + settings.getStreamThumbnailOperationSettings(), + clientContext, + operationsStub); + this.generateStreamHlsTokenCallable = + callableFactory.createUnaryCallable( + generateStreamHlsTokenTransportSettings, + settings.generateStreamHlsTokenSettings(), + clientContext); + this.listEventsCallable = + callableFactory.createUnaryCallable( + listEventsTransportSettings, settings.listEventsSettings(), clientContext); + this.listEventsPagedCallable = + callableFactory.createPagedCallable( + listEventsTransportSettings, settings.listEventsSettings(), clientContext); + this.getEventCallable = + callableFactory.createUnaryCallable( + getEventTransportSettings, settings.getEventSettings(), clientContext); + this.createEventCallable = + callableFactory.createUnaryCallable( + createEventTransportSettings, settings.createEventSettings(), clientContext); + this.createEventOperationCallable = + callableFactory.createOperationCallable( + createEventTransportSettings, + settings.createEventOperationSettings(), + clientContext, + operationsStub); + this.updateEventCallable = + callableFactory.createUnaryCallable( + updateEventTransportSettings, settings.updateEventSettings(), clientContext); + this.updateEventOperationCallable = + callableFactory.createOperationCallable( + updateEventTransportSettings, + settings.updateEventOperationSettings(), + clientContext, + operationsStub); + this.deleteEventCallable = + callableFactory.createUnaryCallable( + deleteEventTransportSettings, settings.deleteEventSettings(), clientContext); + this.deleteEventOperationCallable = + callableFactory.createOperationCallable( + deleteEventTransportSettings, + settings.deleteEventOperationSettings(), + clientContext, + operationsStub); + this.listSeriesCallable = + callableFactory.createUnaryCallable( + listSeriesTransportSettings, settings.listSeriesSettings(), clientContext); + this.listSeriesPagedCallable = + callableFactory.createPagedCallable( + listSeriesTransportSettings, settings.listSeriesSettings(), clientContext); + this.getSeriesCallable = + callableFactory.createUnaryCallable( + getSeriesTransportSettings, settings.getSeriesSettings(), clientContext); + this.createSeriesCallable = + callableFactory.createUnaryCallable( + createSeriesTransportSettings, settings.createSeriesSettings(), clientContext); + this.createSeriesOperationCallable = + callableFactory.createOperationCallable( + createSeriesTransportSettings, + settings.createSeriesOperationSettings(), + clientContext, + operationsStub); + this.updateSeriesCallable = + callableFactory.createUnaryCallable( + updateSeriesTransportSettings, settings.updateSeriesSettings(), clientContext); + this.updateSeriesOperationCallable = + callableFactory.createOperationCallable( + updateSeriesTransportSettings, + settings.updateSeriesOperationSettings(), + clientContext, + operationsStub); + this.deleteSeriesCallable = + callableFactory.createUnaryCallable( + deleteSeriesTransportSettings, settings.deleteSeriesSettings(), clientContext); + this.deleteSeriesOperationCallable = + callableFactory.createOperationCallable( + deleteSeriesTransportSettings, + settings.deleteSeriesOperationSettings(), + clientContext, + operationsStub); + this.materializeChannelCallable = + callableFactory.createUnaryCallable( + materializeChannelTransportSettings, + settings.materializeChannelSettings(), + clientContext); + this.materializeChannelOperationCallable = + callableFactory.createOperationCallable( + materializeChannelTransportSettings, + settings.materializeChannelOperationSettings(), + clientContext, + operationsStub); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + public GrpcOperationsStub getOperationsStub() { + return operationsStub; + } + + @Override + public UnaryCallable listClustersCallable() { + return listClustersCallable; + } + + @Override + public UnaryCallable listClustersPagedCallable() { + return listClustersPagedCallable; + } + + @Override + public UnaryCallable getClusterCallable() { + return getClusterCallable; + } + + @Override + public UnaryCallable createClusterCallable() { + return createClusterCallable; + } + + @Override + public OperationCallable + createClusterOperationCallable() { + return createClusterOperationCallable; + } + + @Override + public UnaryCallable updateClusterCallable() { + return updateClusterCallable; + } + + @Override + public OperationCallable + updateClusterOperationCallable() { + return updateClusterOperationCallable; + } + + @Override + public UnaryCallable deleteClusterCallable() { + return deleteClusterCallable; + } + + @Override + public OperationCallable + deleteClusterOperationCallable() { + return deleteClusterOperationCallable; + } + + @Override + public UnaryCallable listStreamsCallable() { + return listStreamsCallable; + } + + @Override + public UnaryCallable listStreamsPagedCallable() { + return listStreamsPagedCallable; + } + + @Override + public UnaryCallable getStreamCallable() { + return getStreamCallable; + } + + @Override + public UnaryCallable createStreamCallable() { + return createStreamCallable; + } + + @Override + public OperationCallable + createStreamOperationCallable() { + return createStreamOperationCallable; + } + + @Override + public UnaryCallable updateStreamCallable() { + return updateStreamCallable; + } + + @Override + public OperationCallable + updateStreamOperationCallable() { + return updateStreamOperationCallable; + } + + @Override + public UnaryCallable deleteStreamCallable() { + return deleteStreamCallable; + } + + @Override + public OperationCallable + deleteStreamOperationCallable() { + return deleteStreamOperationCallable; + } + + @Override + public UnaryCallable getStreamThumbnailCallable() { + return getStreamThumbnailCallable; + } + + @Override + public OperationCallable + getStreamThumbnailOperationCallable() { + return getStreamThumbnailOperationCallable; + } + + @Override + public UnaryCallable + generateStreamHlsTokenCallable() { + return generateStreamHlsTokenCallable; + } + + @Override + public UnaryCallable listEventsCallable() { + return listEventsCallable; + } + + @Override + public UnaryCallable listEventsPagedCallable() { + return listEventsPagedCallable; + } + + @Override + public UnaryCallable getEventCallable() { + return getEventCallable; + } + + @Override + public UnaryCallable createEventCallable() { + return createEventCallable; + } + + @Override + public OperationCallable + createEventOperationCallable() { + return createEventOperationCallable; + } + + @Override + public UnaryCallable updateEventCallable() { + return updateEventCallable; + } + + @Override + public OperationCallable + updateEventOperationCallable() { + return updateEventOperationCallable; + } + + @Override + public UnaryCallable deleteEventCallable() { + return deleteEventCallable; + } + + @Override + public OperationCallable + deleteEventOperationCallable() { + return deleteEventOperationCallable; + } + + @Override + public UnaryCallable listSeriesCallable() { + return listSeriesCallable; + } + + @Override + public UnaryCallable listSeriesPagedCallable() { + return listSeriesPagedCallable; + } + + @Override + public UnaryCallable getSeriesCallable() { + return getSeriesCallable; + } + + @Override + public UnaryCallable createSeriesCallable() { + return createSeriesCallable; + } + + @Override + public OperationCallable + createSeriesOperationCallable() { + return createSeriesOperationCallable; + } + + @Override + public UnaryCallable updateSeriesCallable() { + return updateSeriesCallable; + } + + @Override + public OperationCallable + updateSeriesOperationCallable() { + return updateSeriesOperationCallable; + } + + @Override + public UnaryCallable deleteSeriesCallable() { + return deleteSeriesCallable; + } + + @Override + public OperationCallable + deleteSeriesOperationCallable() { + return deleteSeriesOperationCallable; + } + + @Override + public UnaryCallable materializeChannelCallable() { + return materializeChannelCallable; + } + + @Override + public OperationCallable + materializeChannelOperationCallable() { + return materializeChannelOperationCallable; + } + + @Override + public final void close() { + try { + backgroundResources.close(); + } catch (RuntimeException e) { + throw e; + } catch (Exception e) { + throw new IllegalStateException("Failed to close resource", e); + } + } + + @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/java-visionai/google-cloud-visionai/src/main/java/com/google/cloud/visionai/v1/stub/GrpcWarehouseCallableFactory.java b/java-visionai/google-cloud-visionai/src/main/java/com/google/cloud/visionai/v1/stub/GrpcWarehouseCallableFactory.java new file mode 100644 index 000000000000..83e1d98510f2 --- /dev/null +++ b/java-visionai/google-cloud-visionai/src/main/java/com/google/cloud/visionai/v1/stub/GrpcWarehouseCallableFactory.java @@ -0,0 +1,113 @@ +/* + * Copyright 2024 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.visionai.v1.stub; + +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.Operation; +import com.google.longrunning.stub.OperationsStub; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * gRPC callable factory implementation for the Warehouse service API. + * + *

This class is for advanced usage. + */ +@Generated("by gapic-generator-java") +public class GrpcWarehouseCallableFactory 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 callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createPagedCallable(grpcCallSettings, callSettings, clientContext); + } + + @Override + public UnaryCallable createBatchingCallable( + GrpcCallSettings grpcCallSettings, + BatchingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createBatchingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + OperationCallable createOperationCallable( + GrpcCallSettings grpcCallSettings, + OperationCallSettings callSettings, + ClientContext clientContext, + OperationsStub operationsStub) { + return GrpcCallableFactory.createOperationCallable( + grpcCallSettings, callSettings, clientContext, operationsStub); + } + + @Override + public + BidiStreamingCallable createBidiStreamingCallable( + GrpcCallSettings grpcCallSettings, + StreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createBidiStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + ServerStreamingCallable createServerStreamingCallable( + GrpcCallSettings grpcCallSettings, + ServerStreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createServerStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + ClientStreamingCallable createClientStreamingCallable( + GrpcCallSettings grpcCallSettings, + StreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createClientStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } +} diff --git a/java-visionai/google-cloud-visionai/src/main/java/com/google/cloud/visionai/v1/stub/GrpcWarehouseStub.java b/java-visionai/google-cloud-visionai/src/main/java/com/google/cloud/visionai/v1/stub/GrpcWarehouseStub.java new file mode 100644 index 000000000000..5d6e6d53421d --- /dev/null +++ b/java-visionai/google-cloud-visionai/src/main/java/com/google/cloud/visionai/v1/stub/GrpcWarehouseStub.java @@ -0,0 +1,2555 @@ +/* + * Copyright 2024 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.visionai.v1.stub; + +import static com.google.cloud.visionai.v1.WarehouseClient.ListAnnotationsPagedResponse; +import static com.google.cloud.visionai.v1.WarehouseClient.ListAssetsPagedResponse; +import static com.google.cloud.visionai.v1.WarehouseClient.ListCollectionsPagedResponse; +import static com.google.cloud.visionai.v1.WarehouseClient.ListCorporaPagedResponse; +import static com.google.cloud.visionai.v1.WarehouseClient.ListDataSchemasPagedResponse; +import static com.google.cloud.visionai.v1.WarehouseClient.ListIndexEndpointsPagedResponse; +import static com.google.cloud.visionai.v1.WarehouseClient.ListIndexesPagedResponse; +import static com.google.cloud.visionai.v1.WarehouseClient.ListSearchConfigsPagedResponse; +import static com.google.cloud.visionai.v1.WarehouseClient.ListSearchHypernymsPagedResponse; +import static com.google.cloud.visionai.v1.WarehouseClient.SearchAssetsPagedResponse; +import static com.google.cloud.visionai.v1.WarehouseClient.SearchIndexEndpointPagedResponse; +import static com.google.cloud.visionai.v1.WarehouseClient.ViewCollectionItemsPagedResponse; +import static com.google.cloud.visionai.v1.WarehouseClient.ViewIndexedAssetsPagedResponse; + +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.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.RequestParamsBuilder; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.visionai.v1.AddCollectionItemRequest; +import com.google.cloud.visionai.v1.AddCollectionItemResponse; +import com.google.cloud.visionai.v1.AnalyzeAssetMetadata; +import com.google.cloud.visionai.v1.AnalyzeAssetRequest; +import com.google.cloud.visionai.v1.AnalyzeAssetResponse; +import com.google.cloud.visionai.v1.AnalyzeCorpusMetadata; +import com.google.cloud.visionai.v1.AnalyzeCorpusRequest; +import com.google.cloud.visionai.v1.AnalyzeCorpusResponse; +import com.google.cloud.visionai.v1.Annotation; +import com.google.cloud.visionai.v1.Asset; +import com.google.cloud.visionai.v1.ClipAssetRequest; +import com.google.cloud.visionai.v1.ClipAssetResponse; +import com.google.cloud.visionai.v1.Collection; +import com.google.cloud.visionai.v1.Corpus; +import com.google.cloud.visionai.v1.CreateAnnotationRequest; +import com.google.cloud.visionai.v1.CreateAssetRequest; +import com.google.cloud.visionai.v1.CreateCollectionMetadata; +import com.google.cloud.visionai.v1.CreateCollectionRequest; +import com.google.cloud.visionai.v1.CreateCorpusMetadata; +import com.google.cloud.visionai.v1.CreateCorpusRequest; +import com.google.cloud.visionai.v1.CreateDataSchemaRequest; +import com.google.cloud.visionai.v1.CreateIndexEndpointMetadata; +import com.google.cloud.visionai.v1.CreateIndexEndpointRequest; +import com.google.cloud.visionai.v1.CreateIndexMetadata; +import com.google.cloud.visionai.v1.CreateIndexRequest; +import com.google.cloud.visionai.v1.CreateSearchConfigRequest; +import com.google.cloud.visionai.v1.CreateSearchHypernymRequest; +import com.google.cloud.visionai.v1.DataSchema; +import com.google.cloud.visionai.v1.DeleteAnnotationRequest; +import com.google.cloud.visionai.v1.DeleteAssetMetadata; +import com.google.cloud.visionai.v1.DeleteAssetRequest; +import com.google.cloud.visionai.v1.DeleteCollectionMetadata; +import com.google.cloud.visionai.v1.DeleteCollectionRequest; +import com.google.cloud.visionai.v1.DeleteCorpusRequest; +import com.google.cloud.visionai.v1.DeleteDataSchemaRequest; +import com.google.cloud.visionai.v1.DeleteIndexEndpointMetadata; +import com.google.cloud.visionai.v1.DeleteIndexEndpointRequest; +import com.google.cloud.visionai.v1.DeleteIndexMetadata; +import com.google.cloud.visionai.v1.DeleteIndexRequest; +import com.google.cloud.visionai.v1.DeleteSearchConfigRequest; +import com.google.cloud.visionai.v1.DeleteSearchHypernymRequest; +import com.google.cloud.visionai.v1.DeployIndexMetadata; +import com.google.cloud.visionai.v1.DeployIndexRequest; +import com.google.cloud.visionai.v1.DeployIndexResponse; +import com.google.cloud.visionai.v1.GenerateHlsUriRequest; +import com.google.cloud.visionai.v1.GenerateHlsUriResponse; +import com.google.cloud.visionai.v1.GenerateRetrievalUrlRequest; +import com.google.cloud.visionai.v1.GenerateRetrievalUrlResponse; +import com.google.cloud.visionai.v1.GetAnnotationRequest; +import com.google.cloud.visionai.v1.GetAssetRequest; +import com.google.cloud.visionai.v1.GetCollectionRequest; +import com.google.cloud.visionai.v1.GetCorpusRequest; +import com.google.cloud.visionai.v1.GetDataSchemaRequest; +import com.google.cloud.visionai.v1.GetIndexEndpointRequest; +import com.google.cloud.visionai.v1.GetIndexRequest; +import com.google.cloud.visionai.v1.GetSearchConfigRequest; +import com.google.cloud.visionai.v1.GetSearchHypernymRequest; +import com.google.cloud.visionai.v1.ImportAssetsMetadata; +import com.google.cloud.visionai.v1.ImportAssetsRequest; +import com.google.cloud.visionai.v1.ImportAssetsResponse; +import com.google.cloud.visionai.v1.Index; +import com.google.cloud.visionai.v1.IndexAssetMetadata; +import com.google.cloud.visionai.v1.IndexAssetRequest; +import com.google.cloud.visionai.v1.IndexAssetResponse; +import com.google.cloud.visionai.v1.IndexEndpoint; +import com.google.cloud.visionai.v1.IngestAssetRequest; +import com.google.cloud.visionai.v1.IngestAssetResponse; +import com.google.cloud.visionai.v1.ListAnnotationsRequest; +import com.google.cloud.visionai.v1.ListAnnotationsResponse; +import com.google.cloud.visionai.v1.ListAssetsRequest; +import com.google.cloud.visionai.v1.ListAssetsResponse; +import com.google.cloud.visionai.v1.ListCollectionsRequest; +import com.google.cloud.visionai.v1.ListCollectionsResponse; +import com.google.cloud.visionai.v1.ListCorporaRequest; +import com.google.cloud.visionai.v1.ListCorporaResponse; +import com.google.cloud.visionai.v1.ListDataSchemasRequest; +import com.google.cloud.visionai.v1.ListDataSchemasResponse; +import com.google.cloud.visionai.v1.ListIndexEndpointsRequest; +import com.google.cloud.visionai.v1.ListIndexEndpointsResponse; +import com.google.cloud.visionai.v1.ListIndexesRequest; +import com.google.cloud.visionai.v1.ListIndexesResponse; +import com.google.cloud.visionai.v1.ListSearchConfigsRequest; +import com.google.cloud.visionai.v1.ListSearchConfigsResponse; +import com.google.cloud.visionai.v1.ListSearchHypernymsRequest; +import com.google.cloud.visionai.v1.ListSearchHypernymsResponse; +import com.google.cloud.visionai.v1.RemoveCollectionItemRequest; +import com.google.cloud.visionai.v1.RemoveCollectionItemResponse; +import com.google.cloud.visionai.v1.RemoveIndexAssetMetadata; +import com.google.cloud.visionai.v1.RemoveIndexAssetRequest; +import com.google.cloud.visionai.v1.RemoveIndexAssetResponse; +import com.google.cloud.visionai.v1.SearchAssetsRequest; +import com.google.cloud.visionai.v1.SearchAssetsResponse; +import com.google.cloud.visionai.v1.SearchConfig; +import com.google.cloud.visionai.v1.SearchHypernym; +import com.google.cloud.visionai.v1.SearchIndexEndpointRequest; +import com.google.cloud.visionai.v1.SearchIndexEndpointResponse; +import com.google.cloud.visionai.v1.UndeployIndexMetadata; +import com.google.cloud.visionai.v1.UndeployIndexRequest; +import com.google.cloud.visionai.v1.UndeployIndexResponse; +import com.google.cloud.visionai.v1.UpdateAnnotationRequest; +import com.google.cloud.visionai.v1.UpdateAssetRequest; +import com.google.cloud.visionai.v1.UpdateCollectionRequest; +import com.google.cloud.visionai.v1.UpdateCorpusRequest; +import com.google.cloud.visionai.v1.UpdateDataSchemaRequest; +import com.google.cloud.visionai.v1.UpdateIndexEndpointMetadata; +import com.google.cloud.visionai.v1.UpdateIndexEndpointRequest; +import com.google.cloud.visionai.v1.UpdateIndexMetadata; +import com.google.cloud.visionai.v1.UpdateIndexRequest; +import com.google.cloud.visionai.v1.UpdateSearchConfigRequest; +import com.google.cloud.visionai.v1.UpdateSearchHypernymRequest; +import com.google.cloud.visionai.v1.UploadAssetMetadata; +import com.google.cloud.visionai.v1.UploadAssetRequest; +import com.google.cloud.visionai.v1.UploadAssetResponse; +import com.google.cloud.visionai.v1.ViewCollectionItemsRequest; +import com.google.cloud.visionai.v1.ViewCollectionItemsResponse; +import com.google.cloud.visionai.v1.ViewIndexedAssetsRequest; +import com.google.cloud.visionai.v1.ViewIndexedAssetsResponse; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.GrpcOperationsStub; +import com.google.protobuf.Empty; +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 the Warehouse service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") +public class GrpcWarehouseStub extends WarehouseStub { + private static final MethodDescriptor createAssetMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.visionai.v1.Warehouse/CreateAsset") + .setRequestMarshaller(ProtoUtils.marshaller(CreateAssetRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Asset.getDefaultInstance())) + .build(); + + private static final MethodDescriptor updateAssetMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.visionai.v1.Warehouse/UpdateAsset") + .setRequestMarshaller(ProtoUtils.marshaller(UpdateAssetRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Asset.getDefaultInstance())) + .build(); + + private static final MethodDescriptor getAssetMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.visionai.v1.Warehouse/GetAsset") + .setRequestMarshaller(ProtoUtils.marshaller(GetAssetRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Asset.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + listAssetsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.visionai.v1.Warehouse/ListAssets") + .setRequestMarshaller(ProtoUtils.marshaller(ListAssetsRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(ListAssetsResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor deleteAssetMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.visionai.v1.Warehouse/DeleteAsset") + .setRequestMarshaller(ProtoUtils.marshaller(DeleteAssetRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor uploadAssetMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.visionai.v1.Warehouse/UploadAsset") + .setRequestMarshaller(ProtoUtils.marshaller(UploadAssetRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + generateRetrievalUrlMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.visionai.v1.Warehouse/GenerateRetrievalUrl") + .setRequestMarshaller( + ProtoUtils.marshaller(GenerateRetrievalUrlRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(GenerateRetrievalUrlResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + analyzeAssetMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.visionai.v1.Warehouse/AnalyzeAsset") + .setRequestMarshaller(ProtoUtils.marshaller(AnalyzeAssetRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor indexAssetMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.visionai.v1.Warehouse/IndexAsset") + .setRequestMarshaller(ProtoUtils.marshaller(IndexAssetRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + removeIndexAssetMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.visionai.v1.Warehouse/RemoveIndexAsset") + .setRequestMarshaller( + ProtoUtils.marshaller(RemoveIndexAssetRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + viewIndexedAssetsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.visionai.v1.Warehouse/ViewIndexedAssets") + .setRequestMarshaller( + ProtoUtils.marshaller(ViewIndexedAssetsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ViewIndexedAssetsResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor createIndexMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.visionai.v1.Warehouse/CreateIndex") + .setRequestMarshaller(ProtoUtils.marshaller(CreateIndexRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor updateIndexMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.visionai.v1.Warehouse/UpdateIndex") + .setRequestMarshaller(ProtoUtils.marshaller(UpdateIndexRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor getIndexMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.visionai.v1.Warehouse/GetIndex") + .setRequestMarshaller(ProtoUtils.marshaller(GetIndexRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Index.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + listIndexesMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.visionai.v1.Warehouse/ListIndexes") + .setRequestMarshaller(ProtoUtils.marshaller(ListIndexesRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListIndexesResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor deleteIndexMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.visionai.v1.Warehouse/DeleteIndex") + .setRequestMarshaller(ProtoUtils.marshaller(DeleteIndexRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + createCorpusMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.visionai.v1.Warehouse/CreateCorpus") + .setRequestMarshaller(ProtoUtils.marshaller(CreateCorpusRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor getCorpusMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.visionai.v1.Warehouse/GetCorpus") + .setRequestMarshaller(ProtoUtils.marshaller(GetCorpusRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Corpus.getDefaultInstance())) + .build(); + + private static final MethodDescriptor updateCorpusMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.visionai.v1.Warehouse/UpdateCorpus") + .setRequestMarshaller(ProtoUtils.marshaller(UpdateCorpusRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Corpus.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + listCorporaMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.visionai.v1.Warehouse/ListCorpora") + .setRequestMarshaller(ProtoUtils.marshaller(ListCorporaRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListCorporaResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor deleteCorpusMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.visionai.v1.Warehouse/DeleteCorpus") + .setRequestMarshaller(ProtoUtils.marshaller(DeleteCorpusRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + analyzeCorpusMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.visionai.v1.Warehouse/AnalyzeCorpus") + .setRequestMarshaller( + ProtoUtils.marshaller(AnalyzeCorpusRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + createDataSchemaMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.visionai.v1.Warehouse/CreateDataSchema") + .setRequestMarshaller( + ProtoUtils.marshaller(CreateDataSchemaRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(DataSchema.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + updateDataSchemaMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.visionai.v1.Warehouse/UpdateDataSchema") + .setRequestMarshaller( + ProtoUtils.marshaller(UpdateDataSchemaRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(DataSchema.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + getDataSchemaMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.visionai.v1.Warehouse/GetDataSchema") + .setRequestMarshaller( + ProtoUtils.marshaller(GetDataSchemaRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(DataSchema.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + deleteDataSchemaMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.visionai.v1.Warehouse/DeleteDataSchema") + .setRequestMarshaller( + ProtoUtils.marshaller(DeleteDataSchemaRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + listDataSchemasMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.visionai.v1.Warehouse/ListDataSchemas") + .setRequestMarshaller( + ProtoUtils.marshaller(ListDataSchemasRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListDataSchemasResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + createAnnotationMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.visionai.v1.Warehouse/CreateAnnotation") + .setRequestMarshaller( + ProtoUtils.marshaller(CreateAnnotationRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Annotation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + getAnnotationMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.visionai.v1.Warehouse/GetAnnotation") + .setRequestMarshaller( + ProtoUtils.marshaller(GetAnnotationRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Annotation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + listAnnotationsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.visionai.v1.Warehouse/ListAnnotations") + .setRequestMarshaller( + ProtoUtils.marshaller(ListAnnotationsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListAnnotationsResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + updateAnnotationMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.visionai.v1.Warehouse/UpdateAnnotation") + .setRequestMarshaller( + ProtoUtils.marshaller(UpdateAnnotationRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Annotation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + deleteAnnotationMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.visionai.v1.Warehouse/DeleteAnnotation") + .setRequestMarshaller( + ProtoUtils.marshaller(DeleteAnnotationRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + ingestAssetMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.BIDI_STREAMING) + .setFullMethodName("google.cloud.visionai.v1.Warehouse/IngestAsset") + .setRequestMarshaller(ProtoUtils.marshaller(IngestAssetRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(IngestAssetResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + clipAssetMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.visionai.v1.Warehouse/ClipAsset") + .setRequestMarshaller(ProtoUtils.marshaller(ClipAssetRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(ClipAssetResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + generateHlsUriMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.visionai.v1.Warehouse/GenerateHlsUri") + .setRequestMarshaller( + ProtoUtils.marshaller(GenerateHlsUriRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(GenerateHlsUriResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + importAssetsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.visionai.v1.Warehouse/ImportAssets") + .setRequestMarshaller(ProtoUtils.marshaller(ImportAssetsRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + createSearchConfigMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.visionai.v1.Warehouse/CreateSearchConfig") + .setRequestMarshaller( + ProtoUtils.marshaller(CreateSearchConfigRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(SearchConfig.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + updateSearchConfigMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.visionai.v1.Warehouse/UpdateSearchConfig") + .setRequestMarshaller( + ProtoUtils.marshaller(UpdateSearchConfigRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(SearchConfig.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + getSearchConfigMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.visionai.v1.Warehouse/GetSearchConfig") + .setRequestMarshaller( + ProtoUtils.marshaller(GetSearchConfigRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(SearchConfig.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + deleteSearchConfigMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.visionai.v1.Warehouse/DeleteSearchConfig") + .setRequestMarshaller( + ProtoUtils.marshaller(DeleteSearchConfigRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + listSearchConfigsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.visionai.v1.Warehouse/ListSearchConfigs") + .setRequestMarshaller( + ProtoUtils.marshaller(ListSearchConfigsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListSearchConfigsResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + createSearchHypernymMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.visionai.v1.Warehouse/CreateSearchHypernym") + .setRequestMarshaller( + ProtoUtils.marshaller(CreateSearchHypernymRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(SearchHypernym.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + updateSearchHypernymMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.visionai.v1.Warehouse/UpdateSearchHypernym") + .setRequestMarshaller( + ProtoUtils.marshaller(UpdateSearchHypernymRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(SearchHypernym.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + getSearchHypernymMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.visionai.v1.Warehouse/GetSearchHypernym") + .setRequestMarshaller( + ProtoUtils.marshaller(GetSearchHypernymRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(SearchHypernym.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + deleteSearchHypernymMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.visionai.v1.Warehouse/DeleteSearchHypernym") + .setRequestMarshaller( + ProtoUtils.marshaller(DeleteSearchHypernymRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + listSearchHypernymsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.visionai.v1.Warehouse/ListSearchHypernyms") + .setRequestMarshaller( + ProtoUtils.marshaller(ListSearchHypernymsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListSearchHypernymsResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + searchAssetsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.visionai.v1.Warehouse/SearchAssets") + .setRequestMarshaller(ProtoUtils.marshaller(SearchAssetsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(SearchAssetsResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + searchIndexEndpointMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.visionai.v1.Warehouse/SearchIndexEndpoint") + .setRequestMarshaller( + ProtoUtils.marshaller(SearchIndexEndpointRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(SearchIndexEndpointResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + createIndexEndpointMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.visionai.v1.Warehouse/CreateIndexEndpoint") + .setRequestMarshaller( + ProtoUtils.marshaller(CreateIndexEndpointRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + getIndexEndpointMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.visionai.v1.Warehouse/GetIndexEndpoint") + .setRequestMarshaller( + ProtoUtils.marshaller(GetIndexEndpointRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(IndexEndpoint.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + listIndexEndpointsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.visionai.v1.Warehouse/ListIndexEndpoints") + .setRequestMarshaller( + ProtoUtils.marshaller(ListIndexEndpointsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListIndexEndpointsResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + updateIndexEndpointMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.visionai.v1.Warehouse/UpdateIndexEndpoint") + .setRequestMarshaller( + ProtoUtils.marshaller(UpdateIndexEndpointRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + deleteIndexEndpointMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.visionai.v1.Warehouse/DeleteIndexEndpoint") + .setRequestMarshaller( + ProtoUtils.marshaller(DeleteIndexEndpointRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor deployIndexMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.visionai.v1.Warehouse/DeployIndex") + .setRequestMarshaller(ProtoUtils.marshaller(DeployIndexRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + undeployIndexMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.visionai.v1.Warehouse/UndeployIndex") + .setRequestMarshaller( + ProtoUtils.marshaller(UndeployIndexRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + createCollectionMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.visionai.v1.Warehouse/CreateCollection") + .setRequestMarshaller( + ProtoUtils.marshaller(CreateCollectionRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + deleteCollectionMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.visionai.v1.Warehouse/DeleteCollection") + .setRequestMarshaller( + ProtoUtils.marshaller(DeleteCollectionRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + getCollectionMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.visionai.v1.Warehouse/GetCollection") + .setRequestMarshaller( + ProtoUtils.marshaller(GetCollectionRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Collection.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + updateCollectionMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.visionai.v1.Warehouse/UpdateCollection") + .setRequestMarshaller( + ProtoUtils.marshaller(UpdateCollectionRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Collection.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + listCollectionsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.visionai.v1.Warehouse/ListCollections") + .setRequestMarshaller( + ProtoUtils.marshaller(ListCollectionsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListCollectionsResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + addCollectionItemMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.visionai.v1.Warehouse/AddCollectionItem") + .setRequestMarshaller( + ProtoUtils.marshaller(AddCollectionItemRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(AddCollectionItemResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + removeCollectionItemMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.visionai.v1.Warehouse/RemoveCollectionItem") + .setRequestMarshaller( + ProtoUtils.marshaller(RemoveCollectionItemRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(RemoveCollectionItemResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + viewCollectionItemsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.visionai.v1.Warehouse/ViewCollectionItems") + .setRequestMarshaller( + ProtoUtils.marshaller(ViewCollectionItemsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ViewCollectionItemsResponse.getDefaultInstance())) + .build(); + + private final UnaryCallable createAssetCallable; + private final UnaryCallable updateAssetCallable; + private final UnaryCallable getAssetCallable; + private final UnaryCallable listAssetsCallable; + private final UnaryCallable listAssetsPagedCallable; + private final UnaryCallable deleteAssetCallable; + private final OperationCallable + deleteAssetOperationCallable; + private final UnaryCallable uploadAssetCallable; + private final OperationCallable + uploadAssetOperationCallable; + private final UnaryCallable + generateRetrievalUrlCallable; + private final UnaryCallable analyzeAssetCallable; + private final OperationCallable + analyzeAssetOperationCallable; + private final UnaryCallable indexAssetCallable; + private final OperationCallable + indexAssetOperationCallable; + private final UnaryCallable removeIndexAssetCallable; + private final OperationCallable< + RemoveIndexAssetRequest, RemoveIndexAssetResponse, RemoveIndexAssetMetadata> + removeIndexAssetOperationCallable; + private final UnaryCallable + viewIndexedAssetsCallable; + private final UnaryCallable + viewIndexedAssetsPagedCallable; + private final UnaryCallable createIndexCallable; + private final OperationCallable + createIndexOperationCallable; + private final UnaryCallable updateIndexCallable; + private final OperationCallable + updateIndexOperationCallable; + private final UnaryCallable getIndexCallable; + private final UnaryCallable listIndexesCallable; + private final UnaryCallable + listIndexesPagedCallable; + private final UnaryCallable deleteIndexCallable; + private final OperationCallable + deleteIndexOperationCallable; + private final UnaryCallable createCorpusCallable; + private final OperationCallable + createCorpusOperationCallable; + private final UnaryCallable getCorpusCallable; + private final UnaryCallable updateCorpusCallable; + private final UnaryCallable listCorporaCallable; + private final UnaryCallable + listCorporaPagedCallable; + private final UnaryCallable deleteCorpusCallable; + private final UnaryCallable analyzeCorpusCallable; + private final OperationCallable< + AnalyzeCorpusRequest, AnalyzeCorpusResponse, AnalyzeCorpusMetadata> + analyzeCorpusOperationCallable; + private final UnaryCallable createDataSchemaCallable; + private final UnaryCallable updateDataSchemaCallable; + private final UnaryCallable getDataSchemaCallable; + private final UnaryCallable deleteDataSchemaCallable; + private final UnaryCallable + listDataSchemasCallable; + private final UnaryCallable + listDataSchemasPagedCallable; + private final UnaryCallable createAnnotationCallable; + private final UnaryCallable getAnnotationCallable; + private final UnaryCallable + listAnnotationsCallable; + private final UnaryCallable + listAnnotationsPagedCallable; + private final UnaryCallable updateAnnotationCallable; + private final UnaryCallable deleteAnnotationCallable; + private final BidiStreamingCallable ingestAssetCallable; + private final UnaryCallable clipAssetCallable; + private final UnaryCallable generateHlsUriCallable; + private final UnaryCallable importAssetsCallable; + private final OperationCallable + importAssetsOperationCallable; + private final UnaryCallable createSearchConfigCallable; + private final UnaryCallable updateSearchConfigCallable; + private final UnaryCallable getSearchConfigCallable; + private final UnaryCallable deleteSearchConfigCallable; + private final UnaryCallable + listSearchConfigsCallable; + private final UnaryCallable + listSearchConfigsPagedCallable; + private final UnaryCallable + createSearchHypernymCallable; + private final UnaryCallable + updateSearchHypernymCallable; + private final UnaryCallable getSearchHypernymCallable; + private final UnaryCallable deleteSearchHypernymCallable; + private final UnaryCallable + listSearchHypernymsCallable; + private final UnaryCallable + listSearchHypernymsPagedCallable; + private final UnaryCallable searchAssetsCallable; + private final UnaryCallable + searchAssetsPagedCallable; + private final UnaryCallable + searchIndexEndpointCallable; + private final UnaryCallable + searchIndexEndpointPagedCallable; + private final UnaryCallable createIndexEndpointCallable; + private final OperationCallable< + CreateIndexEndpointRequest, IndexEndpoint, CreateIndexEndpointMetadata> + createIndexEndpointOperationCallable; + private final UnaryCallable getIndexEndpointCallable; + private final UnaryCallable + listIndexEndpointsCallable; + private final UnaryCallable + listIndexEndpointsPagedCallable; + private final UnaryCallable updateIndexEndpointCallable; + private final OperationCallable< + UpdateIndexEndpointRequest, IndexEndpoint, UpdateIndexEndpointMetadata> + updateIndexEndpointOperationCallable; + private final UnaryCallable deleteIndexEndpointCallable; + private final OperationCallable + deleteIndexEndpointOperationCallable; + private final UnaryCallable deployIndexCallable; + private final OperationCallable + deployIndexOperationCallable; + private final UnaryCallable undeployIndexCallable; + private final OperationCallable< + UndeployIndexRequest, UndeployIndexResponse, UndeployIndexMetadata> + undeployIndexOperationCallable; + private final UnaryCallable createCollectionCallable; + private final OperationCallable + createCollectionOperationCallable; + private final UnaryCallable deleteCollectionCallable; + private final OperationCallable + deleteCollectionOperationCallable; + private final UnaryCallable getCollectionCallable; + private final UnaryCallable updateCollectionCallable; + private final UnaryCallable + listCollectionsCallable; + private final UnaryCallable + listCollectionsPagedCallable; + private final UnaryCallable + addCollectionItemCallable; + private final UnaryCallable + removeCollectionItemCallable; + private final UnaryCallable + viewCollectionItemsCallable; + private final UnaryCallable + viewCollectionItemsPagedCallable; + + private final BackgroundResource backgroundResources; + private final GrpcOperationsStub operationsStub; + private final GrpcStubCallableFactory callableFactory; + + public static final GrpcWarehouseStub create(WarehouseStubSettings settings) throws IOException { + return new GrpcWarehouseStub(settings, ClientContext.create(settings)); + } + + public static final GrpcWarehouseStub create(ClientContext clientContext) throws IOException { + return new GrpcWarehouseStub(WarehouseStubSettings.newBuilder().build(), clientContext); + } + + public static final GrpcWarehouseStub create( + ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException { + return new GrpcWarehouseStub( + WarehouseStubSettings.newBuilder().build(), clientContext, callableFactory); + } + + /** + * Constructs an instance of GrpcWarehouseStub, 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 GrpcWarehouseStub(WarehouseStubSettings settings, ClientContext clientContext) + throws IOException { + this(settings, clientContext, new GrpcWarehouseCallableFactory()); + } + + /** + * Constructs an instance of GrpcWarehouseStub, 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 GrpcWarehouseStub( + WarehouseStubSettings settings, + ClientContext clientContext, + GrpcStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory); + + GrpcCallSettings createAssetTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createAssetMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + GrpcCallSettings updateAssetTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(updateAssetMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("asset.name", String.valueOf(request.getAsset().getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings getAssetTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getAssetMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings listAssetsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listAssetsMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + GrpcCallSettings deleteAssetTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deleteAssetMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings uploadAssetTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(uploadAssetMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings + generateRetrievalUrlTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(generateRetrievalUrlMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings analyzeAssetTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(analyzeAssetMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings indexAssetTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(indexAssetMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings removeIndexAssetTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(removeIndexAssetMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings + viewIndexedAssetsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(viewIndexedAssetsMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("index", String.valueOf(request.getIndex())); + return builder.build(); + }) + .build(); + GrpcCallSettings createIndexTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createIndexMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + GrpcCallSettings updateIndexTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(updateIndexMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("index.name", String.valueOf(request.getIndex().getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings getIndexTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getIndexMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings listIndexesTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listIndexesMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + GrpcCallSettings deleteIndexTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deleteIndexMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings createCorpusTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createCorpusMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + GrpcCallSettings getCorpusTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getCorpusMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings updateCorpusTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(updateCorpusMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("corpus.name", String.valueOf(request.getCorpus().getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings listCorporaTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listCorporaMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + GrpcCallSettings deleteCorpusTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deleteCorpusMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings analyzeCorpusTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(analyzeCorpusMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings createDataSchemaTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createDataSchemaMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + GrpcCallSettings updateDataSchemaTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(updateDataSchemaMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add( + "data_schema.name", String.valueOf(request.getDataSchema().getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings getDataSchemaTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getDataSchemaMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings deleteDataSchemaTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deleteDataSchemaMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings + listDataSchemasTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listDataSchemasMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + GrpcCallSettings createAnnotationTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createAnnotationMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + GrpcCallSettings getAnnotationTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getAnnotationMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings + listAnnotationsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listAnnotationsMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + GrpcCallSettings updateAnnotationTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(updateAnnotationMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("annotation.name", String.valueOf(request.getAnnotation().getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings deleteAnnotationTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deleteAnnotationMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings ingestAssetTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(ingestAssetMethodDescriptor) + .build(); + GrpcCallSettings clipAssetTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(clipAssetMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings + generateHlsUriTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(generateHlsUriMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings importAssetsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(importAssetsMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + GrpcCallSettings createSearchConfigTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createSearchConfigMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + GrpcCallSettings updateSearchConfigTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(updateSearchConfigMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add( + "search_config.name", String.valueOf(request.getSearchConfig().getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings getSearchConfigTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getSearchConfigMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings deleteSearchConfigTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deleteSearchConfigMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings + listSearchConfigsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listSearchConfigsMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + GrpcCallSettings + createSearchHypernymTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createSearchHypernymMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + GrpcCallSettings + updateSearchHypernymTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(updateSearchHypernymMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add( + "search_hypernym.name", + String.valueOf(request.getSearchHypernym().getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings getSearchHypernymTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getSearchHypernymMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings deleteSearchHypernymTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deleteSearchHypernymMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings + listSearchHypernymsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listSearchHypernymsMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + GrpcCallSettings searchAssetsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(searchAssetsMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("corpus", String.valueOf(request.getCorpus())); + return builder.build(); + }) + .build(); + GrpcCallSettings + searchIndexEndpointTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(searchIndexEndpointMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("index_endpoint", String.valueOf(request.getIndexEndpoint())); + return builder.build(); + }) + .build(); + GrpcCallSettings createIndexEndpointTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createIndexEndpointMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + GrpcCallSettings getIndexEndpointTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getIndexEndpointMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings + listIndexEndpointsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listIndexEndpointsMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + GrpcCallSettings updateIndexEndpointTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(updateIndexEndpointMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add( + "index_endpoint.name", String.valueOf(request.getIndexEndpoint().getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings deleteIndexEndpointTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deleteIndexEndpointMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings deployIndexTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deployIndexMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("index_endpoint", String.valueOf(request.getIndexEndpoint())); + return builder.build(); + }) + .build(); + GrpcCallSettings undeployIndexTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(undeployIndexMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("index_endpoint", String.valueOf(request.getIndexEndpoint())); + return builder.build(); + }) + .build(); + GrpcCallSettings createCollectionTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createCollectionMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + GrpcCallSettings deleteCollectionTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deleteCollectionMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings getCollectionTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getCollectionMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings updateCollectionTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(updateCollectionMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("collection.name", String.valueOf(request.getCollection().getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings + listCollectionsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listCollectionsMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + GrpcCallSettings + addCollectionItemTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(addCollectionItemMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add( + "item.collection", String.valueOf(request.getItem().getCollection())); + return builder.build(); + }) + .build(); + GrpcCallSettings + removeCollectionItemTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(removeCollectionItemMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add( + "item.collection", String.valueOf(request.getItem().getCollection())); + return builder.build(); + }) + .build(); + GrpcCallSettings + viewCollectionItemsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(viewCollectionItemsMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("collection", String.valueOf(request.getCollection())); + return builder.build(); + }) + .build(); + + this.createAssetCallable = + callableFactory.createUnaryCallable( + createAssetTransportSettings, settings.createAssetSettings(), clientContext); + this.updateAssetCallable = + callableFactory.createUnaryCallable( + updateAssetTransportSettings, settings.updateAssetSettings(), clientContext); + this.getAssetCallable = + callableFactory.createUnaryCallable( + getAssetTransportSettings, settings.getAssetSettings(), clientContext); + this.listAssetsCallable = + callableFactory.createUnaryCallable( + listAssetsTransportSettings, settings.listAssetsSettings(), clientContext); + this.listAssetsPagedCallable = + callableFactory.createPagedCallable( + listAssetsTransportSettings, settings.listAssetsSettings(), clientContext); + this.deleteAssetCallable = + callableFactory.createUnaryCallable( + deleteAssetTransportSettings, settings.deleteAssetSettings(), clientContext); + this.deleteAssetOperationCallable = + callableFactory.createOperationCallable( + deleteAssetTransportSettings, + settings.deleteAssetOperationSettings(), + clientContext, + operationsStub); + this.uploadAssetCallable = + callableFactory.createUnaryCallable( + uploadAssetTransportSettings, settings.uploadAssetSettings(), clientContext); + this.uploadAssetOperationCallable = + callableFactory.createOperationCallable( + uploadAssetTransportSettings, + settings.uploadAssetOperationSettings(), + clientContext, + operationsStub); + this.generateRetrievalUrlCallable = + callableFactory.createUnaryCallable( + generateRetrievalUrlTransportSettings, + settings.generateRetrievalUrlSettings(), + clientContext); + this.analyzeAssetCallable = + callableFactory.createUnaryCallable( + analyzeAssetTransportSettings, settings.analyzeAssetSettings(), clientContext); + this.analyzeAssetOperationCallable = + callableFactory.createOperationCallable( + analyzeAssetTransportSettings, + settings.analyzeAssetOperationSettings(), + clientContext, + operationsStub); + this.indexAssetCallable = + callableFactory.createUnaryCallable( + indexAssetTransportSettings, settings.indexAssetSettings(), clientContext); + this.indexAssetOperationCallable = + callableFactory.createOperationCallable( + indexAssetTransportSettings, + settings.indexAssetOperationSettings(), + clientContext, + operationsStub); + this.removeIndexAssetCallable = + callableFactory.createUnaryCallable( + removeIndexAssetTransportSettings, settings.removeIndexAssetSettings(), clientContext); + this.removeIndexAssetOperationCallable = + callableFactory.createOperationCallable( + removeIndexAssetTransportSettings, + settings.removeIndexAssetOperationSettings(), + clientContext, + operationsStub); + this.viewIndexedAssetsCallable = + callableFactory.createUnaryCallable( + viewIndexedAssetsTransportSettings, + settings.viewIndexedAssetsSettings(), + clientContext); + this.viewIndexedAssetsPagedCallable = + callableFactory.createPagedCallable( + viewIndexedAssetsTransportSettings, + settings.viewIndexedAssetsSettings(), + clientContext); + this.createIndexCallable = + callableFactory.createUnaryCallable( + createIndexTransportSettings, settings.createIndexSettings(), clientContext); + this.createIndexOperationCallable = + callableFactory.createOperationCallable( + createIndexTransportSettings, + settings.createIndexOperationSettings(), + clientContext, + operationsStub); + this.updateIndexCallable = + callableFactory.createUnaryCallable( + updateIndexTransportSettings, settings.updateIndexSettings(), clientContext); + this.updateIndexOperationCallable = + callableFactory.createOperationCallable( + updateIndexTransportSettings, + settings.updateIndexOperationSettings(), + clientContext, + operationsStub); + this.getIndexCallable = + callableFactory.createUnaryCallable( + getIndexTransportSettings, settings.getIndexSettings(), clientContext); + this.listIndexesCallable = + callableFactory.createUnaryCallable( + listIndexesTransportSettings, settings.listIndexesSettings(), clientContext); + this.listIndexesPagedCallable = + callableFactory.createPagedCallable( + listIndexesTransportSettings, settings.listIndexesSettings(), clientContext); + this.deleteIndexCallable = + callableFactory.createUnaryCallable( + deleteIndexTransportSettings, settings.deleteIndexSettings(), clientContext); + this.deleteIndexOperationCallable = + callableFactory.createOperationCallable( + deleteIndexTransportSettings, + settings.deleteIndexOperationSettings(), + clientContext, + operationsStub); + this.createCorpusCallable = + callableFactory.createUnaryCallable( + createCorpusTransportSettings, settings.createCorpusSettings(), clientContext); + this.createCorpusOperationCallable = + callableFactory.createOperationCallable( + createCorpusTransportSettings, + settings.createCorpusOperationSettings(), + clientContext, + operationsStub); + this.getCorpusCallable = + callableFactory.createUnaryCallable( + getCorpusTransportSettings, settings.getCorpusSettings(), clientContext); + this.updateCorpusCallable = + callableFactory.createUnaryCallable( + updateCorpusTransportSettings, settings.updateCorpusSettings(), clientContext); + this.listCorporaCallable = + callableFactory.createUnaryCallable( + listCorporaTransportSettings, settings.listCorporaSettings(), clientContext); + this.listCorporaPagedCallable = + callableFactory.createPagedCallable( + listCorporaTransportSettings, settings.listCorporaSettings(), clientContext); + this.deleteCorpusCallable = + callableFactory.createUnaryCallable( + deleteCorpusTransportSettings, settings.deleteCorpusSettings(), clientContext); + this.analyzeCorpusCallable = + callableFactory.createUnaryCallable( + analyzeCorpusTransportSettings, settings.analyzeCorpusSettings(), clientContext); + this.analyzeCorpusOperationCallable = + callableFactory.createOperationCallable( + analyzeCorpusTransportSettings, + settings.analyzeCorpusOperationSettings(), + clientContext, + operationsStub); + this.createDataSchemaCallable = + callableFactory.createUnaryCallable( + createDataSchemaTransportSettings, settings.createDataSchemaSettings(), clientContext); + this.updateDataSchemaCallable = + callableFactory.createUnaryCallable( + updateDataSchemaTransportSettings, settings.updateDataSchemaSettings(), clientContext); + this.getDataSchemaCallable = + callableFactory.createUnaryCallable( + getDataSchemaTransportSettings, settings.getDataSchemaSettings(), clientContext); + this.deleteDataSchemaCallable = + callableFactory.createUnaryCallable( + deleteDataSchemaTransportSettings, settings.deleteDataSchemaSettings(), clientContext); + this.listDataSchemasCallable = + callableFactory.createUnaryCallable( + listDataSchemasTransportSettings, settings.listDataSchemasSettings(), clientContext); + this.listDataSchemasPagedCallable = + callableFactory.createPagedCallable( + listDataSchemasTransportSettings, settings.listDataSchemasSettings(), clientContext); + this.createAnnotationCallable = + callableFactory.createUnaryCallable( + createAnnotationTransportSettings, settings.createAnnotationSettings(), clientContext); + this.getAnnotationCallable = + callableFactory.createUnaryCallable( + getAnnotationTransportSettings, settings.getAnnotationSettings(), clientContext); + this.listAnnotationsCallable = + callableFactory.createUnaryCallable( + listAnnotationsTransportSettings, settings.listAnnotationsSettings(), clientContext); + this.listAnnotationsPagedCallable = + callableFactory.createPagedCallable( + listAnnotationsTransportSettings, settings.listAnnotationsSettings(), clientContext); + this.updateAnnotationCallable = + callableFactory.createUnaryCallable( + updateAnnotationTransportSettings, settings.updateAnnotationSettings(), clientContext); + this.deleteAnnotationCallable = + callableFactory.createUnaryCallable( + deleteAnnotationTransportSettings, settings.deleteAnnotationSettings(), clientContext); + this.ingestAssetCallable = + callableFactory.createBidiStreamingCallable( + ingestAssetTransportSettings, settings.ingestAssetSettings(), clientContext); + this.clipAssetCallable = + callableFactory.createUnaryCallable( + clipAssetTransportSettings, settings.clipAssetSettings(), clientContext); + this.generateHlsUriCallable = + callableFactory.createUnaryCallable( + generateHlsUriTransportSettings, settings.generateHlsUriSettings(), clientContext); + this.importAssetsCallable = + callableFactory.createUnaryCallable( + importAssetsTransportSettings, settings.importAssetsSettings(), clientContext); + this.importAssetsOperationCallable = + callableFactory.createOperationCallable( + importAssetsTransportSettings, + settings.importAssetsOperationSettings(), + clientContext, + operationsStub); + this.createSearchConfigCallable = + callableFactory.createUnaryCallable( + createSearchConfigTransportSettings, + settings.createSearchConfigSettings(), + clientContext); + this.updateSearchConfigCallable = + callableFactory.createUnaryCallable( + updateSearchConfigTransportSettings, + settings.updateSearchConfigSettings(), + clientContext); + this.getSearchConfigCallable = + callableFactory.createUnaryCallable( + getSearchConfigTransportSettings, settings.getSearchConfigSettings(), clientContext); + this.deleteSearchConfigCallable = + callableFactory.createUnaryCallable( + deleteSearchConfigTransportSettings, + settings.deleteSearchConfigSettings(), + clientContext); + this.listSearchConfigsCallable = + callableFactory.createUnaryCallable( + listSearchConfigsTransportSettings, + settings.listSearchConfigsSettings(), + clientContext); + this.listSearchConfigsPagedCallable = + callableFactory.createPagedCallable( + listSearchConfigsTransportSettings, + settings.listSearchConfigsSettings(), + clientContext); + this.createSearchHypernymCallable = + callableFactory.createUnaryCallable( + createSearchHypernymTransportSettings, + settings.createSearchHypernymSettings(), + clientContext); + this.updateSearchHypernymCallable = + callableFactory.createUnaryCallable( + updateSearchHypernymTransportSettings, + settings.updateSearchHypernymSettings(), + clientContext); + this.getSearchHypernymCallable = + callableFactory.createUnaryCallable( + getSearchHypernymTransportSettings, + settings.getSearchHypernymSettings(), + clientContext); + this.deleteSearchHypernymCallable = + callableFactory.createUnaryCallable( + deleteSearchHypernymTransportSettings, + settings.deleteSearchHypernymSettings(), + clientContext); + this.listSearchHypernymsCallable = + callableFactory.createUnaryCallable( + listSearchHypernymsTransportSettings, + settings.listSearchHypernymsSettings(), + clientContext); + this.listSearchHypernymsPagedCallable = + callableFactory.createPagedCallable( + listSearchHypernymsTransportSettings, + settings.listSearchHypernymsSettings(), + clientContext); + this.searchAssetsCallable = + callableFactory.createUnaryCallable( + searchAssetsTransportSettings, settings.searchAssetsSettings(), clientContext); + this.searchAssetsPagedCallable = + callableFactory.createPagedCallable( + searchAssetsTransportSettings, settings.searchAssetsSettings(), clientContext); + this.searchIndexEndpointCallable = + callableFactory.createUnaryCallable( + searchIndexEndpointTransportSettings, + settings.searchIndexEndpointSettings(), + clientContext); + this.searchIndexEndpointPagedCallable = + callableFactory.createPagedCallable( + searchIndexEndpointTransportSettings, + settings.searchIndexEndpointSettings(), + clientContext); + this.createIndexEndpointCallable = + callableFactory.createUnaryCallable( + createIndexEndpointTransportSettings, + settings.createIndexEndpointSettings(), + clientContext); + this.createIndexEndpointOperationCallable = + callableFactory.createOperationCallable( + createIndexEndpointTransportSettings, + settings.createIndexEndpointOperationSettings(), + clientContext, + operationsStub); + this.getIndexEndpointCallable = + callableFactory.createUnaryCallable( + getIndexEndpointTransportSettings, settings.getIndexEndpointSettings(), clientContext); + this.listIndexEndpointsCallable = + callableFactory.createUnaryCallable( + listIndexEndpointsTransportSettings, + settings.listIndexEndpointsSettings(), + clientContext); + this.listIndexEndpointsPagedCallable = + callableFactory.createPagedCallable( + listIndexEndpointsTransportSettings, + settings.listIndexEndpointsSettings(), + clientContext); + this.updateIndexEndpointCallable = + callableFactory.createUnaryCallable( + updateIndexEndpointTransportSettings, + settings.updateIndexEndpointSettings(), + clientContext); + this.updateIndexEndpointOperationCallable = + callableFactory.createOperationCallable( + updateIndexEndpointTransportSettings, + settings.updateIndexEndpointOperationSettings(), + clientContext, + operationsStub); + this.deleteIndexEndpointCallable = + callableFactory.createUnaryCallable( + deleteIndexEndpointTransportSettings, + settings.deleteIndexEndpointSettings(), + clientContext); + this.deleteIndexEndpointOperationCallable = + callableFactory.createOperationCallable( + deleteIndexEndpointTransportSettings, + settings.deleteIndexEndpointOperationSettings(), + clientContext, + operationsStub); + this.deployIndexCallable = + callableFactory.createUnaryCallable( + deployIndexTransportSettings, settings.deployIndexSettings(), clientContext); + this.deployIndexOperationCallable = + callableFactory.createOperationCallable( + deployIndexTransportSettings, + settings.deployIndexOperationSettings(), + clientContext, + operationsStub); + this.undeployIndexCallable = + callableFactory.createUnaryCallable( + undeployIndexTransportSettings, settings.undeployIndexSettings(), clientContext); + this.undeployIndexOperationCallable = + callableFactory.createOperationCallable( + undeployIndexTransportSettings, + settings.undeployIndexOperationSettings(), + clientContext, + operationsStub); + this.createCollectionCallable = + callableFactory.createUnaryCallable( + createCollectionTransportSettings, settings.createCollectionSettings(), clientContext); + this.createCollectionOperationCallable = + callableFactory.createOperationCallable( + createCollectionTransportSettings, + settings.createCollectionOperationSettings(), + clientContext, + operationsStub); + this.deleteCollectionCallable = + callableFactory.createUnaryCallable( + deleteCollectionTransportSettings, settings.deleteCollectionSettings(), clientContext); + this.deleteCollectionOperationCallable = + callableFactory.createOperationCallable( + deleteCollectionTransportSettings, + settings.deleteCollectionOperationSettings(), + clientContext, + operationsStub); + this.getCollectionCallable = + callableFactory.createUnaryCallable( + getCollectionTransportSettings, settings.getCollectionSettings(), clientContext); + this.updateCollectionCallable = + callableFactory.createUnaryCallable( + updateCollectionTransportSettings, settings.updateCollectionSettings(), clientContext); + this.listCollectionsCallable = + callableFactory.createUnaryCallable( + listCollectionsTransportSettings, settings.listCollectionsSettings(), clientContext); + this.listCollectionsPagedCallable = + callableFactory.createPagedCallable( + listCollectionsTransportSettings, settings.listCollectionsSettings(), clientContext); + this.addCollectionItemCallable = + callableFactory.createUnaryCallable( + addCollectionItemTransportSettings, + settings.addCollectionItemSettings(), + clientContext); + this.removeCollectionItemCallable = + callableFactory.createUnaryCallable( + removeCollectionItemTransportSettings, + settings.removeCollectionItemSettings(), + clientContext); + this.viewCollectionItemsCallable = + callableFactory.createUnaryCallable( + viewCollectionItemsTransportSettings, + settings.viewCollectionItemsSettings(), + clientContext); + this.viewCollectionItemsPagedCallable = + callableFactory.createPagedCallable( + viewCollectionItemsTransportSettings, + settings.viewCollectionItemsSettings(), + clientContext); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + public GrpcOperationsStub getOperationsStub() { + return operationsStub; + } + + @Override + public UnaryCallable createAssetCallable() { + return createAssetCallable; + } + + @Override + public UnaryCallable updateAssetCallable() { + return updateAssetCallable; + } + + @Override + public UnaryCallable getAssetCallable() { + return getAssetCallable; + } + + @Override + public UnaryCallable listAssetsCallable() { + return listAssetsCallable; + } + + @Override + public UnaryCallable listAssetsPagedCallable() { + return listAssetsPagedCallable; + } + + @Override + public UnaryCallable deleteAssetCallable() { + return deleteAssetCallable; + } + + @Override + public OperationCallable + deleteAssetOperationCallable() { + return deleteAssetOperationCallable; + } + + @Override + public UnaryCallable uploadAssetCallable() { + return uploadAssetCallable; + } + + @Override + public OperationCallable + uploadAssetOperationCallable() { + return uploadAssetOperationCallable; + } + + @Override + public UnaryCallable + generateRetrievalUrlCallable() { + return generateRetrievalUrlCallable; + } + + @Override + public UnaryCallable analyzeAssetCallable() { + return analyzeAssetCallable; + } + + @Override + public OperationCallable + analyzeAssetOperationCallable() { + return analyzeAssetOperationCallable; + } + + @Override + public UnaryCallable indexAssetCallable() { + return indexAssetCallable; + } + + @Override + public OperationCallable + indexAssetOperationCallable() { + return indexAssetOperationCallable; + } + + @Override + public UnaryCallable removeIndexAssetCallable() { + return removeIndexAssetCallable; + } + + @Override + public OperationCallable< + RemoveIndexAssetRequest, RemoveIndexAssetResponse, RemoveIndexAssetMetadata> + removeIndexAssetOperationCallable() { + return removeIndexAssetOperationCallable; + } + + @Override + public UnaryCallable + viewIndexedAssetsCallable() { + return viewIndexedAssetsCallable; + } + + @Override + public UnaryCallable + viewIndexedAssetsPagedCallable() { + return viewIndexedAssetsPagedCallable; + } + + @Override + public UnaryCallable createIndexCallable() { + return createIndexCallable; + } + + @Override + public OperationCallable + createIndexOperationCallable() { + return createIndexOperationCallable; + } + + @Override + public UnaryCallable updateIndexCallable() { + return updateIndexCallable; + } + + @Override + public OperationCallable + updateIndexOperationCallable() { + return updateIndexOperationCallable; + } + + @Override + public UnaryCallable getIndexCallable() { + return getIndexCallable; + } + + @Override + public UnaryCallable listIndexesCallable() { + return listIndexesCallable; + } + + @Override + public UnaryCallable listIndexesPagedCallable() { + return listIndexesPagedCallable; + } + + @Override + public UnaryCallable deleteIndexCallable() { + return deleteIndexCallable; + } + + @Override + public OperationCallable + deleteIndexOperationCallable() { + return deleteIndexOperationCallable; + } + + @Override + public UnaryCallable createCorpusCallable() { + return createCorpusCallable; + } + + @Override + public OperationCallable + createCorpusOperationCallable() { + return createCorpusOperationCallable; + } + + @Override + public UnaryCallable getCorpusCallable() { + return getCorpusCallable; + } + + @Override + public UnaryCallable updateCorpusCallable() { + return updateCorpusCallable; + } + + @Override + public UnaryCallable listCorporaCallable() { + return listCorporaCallable; + } + + @Override + public UnaryCallable listCorporaPagedCallable() { + return listCorporaPagedCallable; + } + + @Override + public UnaryCallable deleteCorpusCallable() { + return deleteCorpusCallable; + } + + @Override + public UnaryCallable analyzeCorpusCallable() { + return analyzeCorpusCallable; + } + + @Override + public OperationCallable + analyzeCorpusOperationCallable() { + return analyzeCorpusOperationCallable; + } + + @Override + public UnaryCallable createDataSchemaCallable() { + return createDataSchemaCallable; + } + + @Override + public UnaryCallable updateDataSchemaCallable() { + return updateDataSchemaCallable; + } + + @Override + public UnaryCallable getDataSchemaCallable() { + return getDataSchemaCallable; + } + + @Override + public UnaryCallable deleteDataSchemaCallable() { + return deleteDataSchemaCallable; + } + + @Override + public UnaryCallable listDataSchemasCallable() { + return listDataSchemasCallable; + } + + @Override + public UnaryCallable + listDataSchemasPagedCallable() { + return listDataSchemasPagedCallable; + } + + @Override + public UnaryCallable createAnnotationCallable() { + return createAnnotationCallable; + } + + @Override + public UnaryCallable getAnnotationCallable() { + return getAnnotationCallable; + } + + @Override + public UnaryCallable listAnnotationsCallable() { + return listAnnotationsCallable; + } + + @Override + public UnaryCallable + listAnnotationsPagedCallable() { + return listAnnotationsPagedCallable; + } + + @Override + public UnaryCallable updateAnnotationCallable() { + return updateAnnotationCallable; + } + + @Override + public UnaryCallable deleteAnnotationCallable() { + return deleteAnnotationCallable; + } + + @Override + public BidiStreamingCallable ingestAssetCallable() { + return ingestAssetCallable; + } + + @Override + public UnaryCallable clipAssetCallable() { + return clipAssetCallable; + } + + @Override + public UnaryCallable generateHlsUriCallable() { + return generateHlsUriCallable; + } + + @Override + public UnaryCallable importAssetsCallable() { + return importAssetsCallable; + } + + @Override + public OperationCallable + importAssetsOperationCallable() { + return importAssetsOperationCallable; + } + + @Override + public UnaryCallable createSearchConfigCallable() { + return createSearchConfigCallable; + } + + @Override + public UnaryCallable updateSearchConfigCallable() { + return updateSearchConfigCallable; + } + + @Override + public UnaryCallable getSearchConfigCallable() { + return getSearchConfigCallable; + } + + @Override + public UnaryCallable deleteSearchConfigCallable() { + return deleteSearchConfigCallable; + } + + @Override + public UnaryCallable + listSearchConfigsCallable() { + return listSearchConfigsCallable; + } + + @Override + public UnaryCallable + listSearchConfigsPagedCallable() { + return listSearchConfigsPagedCallable; + } + + @Override + public UnaryCallable createSearchHypernymCallable() { + return createSearchHypernymCallable; + } + + @Override + public UnaryCallable updateSearchHypernymCallable() { + return updateSearchHypernymCallable; + } + + @Override + public UnaryCallable getSearchHypernymCallable() { + return getSearchHypernymCallable; + } + + @Override + public UnaryCallable deleteSearchHypernymCallable() { + return deleteSearchHypernymCallable; + } + + @Override + public UnaryCallable + listSearchHypernymsCallable() { + return listSearchHypernymsCallable; + } + + @Override + public UnaryCallable + listSearchHypernymsPagedCallable() { + return listSearchHypernymsPagedCallable; + } + + @Override + public UnaryCallable searchAssetsCallable() { + return searchAssetsCallable; + } + + @Override + public UnaryCallable searchAssetsPagedCallable() { + return searchAssetsPagedCallable; + } + + @Override + public UnaryCallable + searchIndexEndpointCallable() { + return searchIndexEndpointCallable; + } + + @Override + public UnaryCallable + searchIndexEndpointPagedCallable() { + return searchIndexEndpointPagedCallable; + } + + @Override + public UnaryCallable createIndexEndpointCallable() { + return createIndexEndpointCallable; + } + + @Override + public OperationCallable + createIndexEndpointOperationCallable() { + return createIndexEndpointOperationCallable; + } + + @Override + public UnaryCallable getIndexEndpointCallable() { + return getIndexEndpointCallable; + } + + @Override + public UnaryCallable + listIndexEndpointsCallable() { + return listIndexEndpointsCallable; + } + + @Override + public UnaryCallable + listIndexEndpointsPagedCallable() { + return listIndexEndpointsPagedCallable; + } + + @Override + public UnaryCallable updateIndexEndpointCallable() { + return updateIndexEndpointCallable; + } + + @Override + public OperationCallable + updateIndexEndpointOperationCallable() { + return updateIndexEndpointOperationCallable; + } + + @Override + public UnaryCallable deleteIndexEndpointCallable() { + return deleteIndexEndpointCallable; + } + + @Override + public OperationCallable + deleteIndexEndpointOperationCallable() { + return deleteIndexEndpointOperationCallable; + } + + @Override + public UnaryCallable deployIndexCallable() { + return deployIndexCallable; + } + + @Override + public OperationCallable + deployIndexOperationCallable() { + return deployIndexOperationCallable; + } + + @Override + public UnaryCallable undeployIndexCallable() { + return undeployIndexCallable; + } + + @Override + public OperationCallable + undeployIndexOperationCallable() { + return undeployIndexOperationCallable; + } + + @Override + public UnaryCallable createCollectionCallable() { + return createCollectionCallable; + } + + @Override + public OperationCallable + createCollectionOperationCallable() { + return createCollectionOperationCallable; + } + + @Override + public UnaryCallable deleteCollectionCallable() { + return deleteCollectionCallable; + } + + @Override + public OperationCallable + deleteCollectionOperationCallable() { + return deleteCollectionOperationCallable; + } + + @Override + public UnaryCallable getCollectionCallable() { + return getCollectionCallable; + } + + @Override + public UnaryCallable updateCollectionCallable() { + return updateCollectionCallable; + } + + @Override + public UnaryCallable listCollectionsCallable() { + return listCollectionsCallable; + } + + @Override + public UnaryCallable + listCollectionsPagedCallable() { + return listCollectionsPagedCallable; + } + + @Override + public UnaryCallable + addCollectionItemCallable() { + return addCollectionItemCallable; + } + + @Override + public UnaryCallable + removeCollectionItemCallable() { + return removeCollectionItemCallable; + } + + @Override + public UnaryCallable + viewCollectionItemsCallable() { + return viewCollectionItemsCallable; + } + + @Override + public UnaryCallable + viewCollectionItemsPagedCallable() { + return viewCollectionItemsPagedCallable; + } + + @Override + public final void close() { + try { + backgroundResources.close(); + } catch (RuntimeException e) { + throw e; + } catch (Exception e) { + throw new IllegalStateException("Failed to close resource", e); + } + } + + @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/java-visionai/google-cloud-visionai/src/main/java/com/google/cloud/visionai/v1/stub/HealthCheckServiceStub.java b/java-visionai/google-cloud-visionai/src/main/java/com/google/cloud/visionai/v1/stub/HealthCheckServiceStub.java new file mode 100644 index 000000000000..4d981d35134c --- /dev/null +++ b/java-visionai/google-cloud-visionai/src/main/java/com/google/cloud/visionai/v1/stub/HealthCheckServiceStub.java @@ -0,0 +1,40 @@ +/* + * Copyright 2024 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.visionai.v1.stub; + +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.visionai.v1.HealthCheckRequest; +import com.google.cloud.visionai.v1.HealthCheckResponse; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Base stub class for the HealthCheckService service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") +public abstract class HealthCheckServiceStub implements BackgroundResource { + + public UnaryCallable healthCheckCallable() { + throw new UnsupportedOperationException("Not implemented: healthCheckCallable()"); + } + + @Override + public abstract void close(); +} diff --git a/java-visionai/google-cloud-visionai/src/main/java/com/google/cloud/visionai/v1/stub/HealthCheckServiceStubSettings.java b/java-visionai/google-cloud-visionai/src/main/java/com/google/cloud/visionai/v1/stub/HealthCheckServiceStubSettings.java new file mode 100644 index 000000000000..f99fdfdf61f9 --- /dev/null +++ b/java-visionai/google-cloud-visionai/src/main/java/com/google/cloud/visionai/v1/stub/HealthCheckServiceStubSettings.java @@ -0,0 +1,319 @@ +/* + * Copyright 2024 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.visionai.v1.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.httpjson.GaxHttpJsonProperties; +import com.google.api.gax.httpjson.HttpJsonTransportChannel; +import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider; +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.StubSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.cloud.visionai.v1.HealthCheckRequest; +import com.google.cloud.visionai.v1.HealthCheckResponse; +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; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Settings class to configure an instance of {@link HealthCheckServiceStub}. + * + *

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

    + *
  • The default service address (visionai.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 healthCheck to 30 seconds: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * HealthCheckServiceStubSettings.Builder healthCheckServiceSettingsBuilder =
+ *     HealthCheckServiceStubSettings.newBuilder();
+ * healthCheckServiceSettingsBuilder
+ *     .healthCheckSettings()
+ *     .setRetrySettings(
+ *         healthCheckServiceSettingsBuilder
+ *             .healthCheckSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * HealthCheckServiceStubSettings healthCheckServiceSettings =
+ *     healthCheckServiceSettingsBuilder.build();
+ * }
+ */ +@Generated("by gapic-generator-java") +public class HealthCheckServiceStubSettings 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 healthCheckSettings; + + /** Returns the object with the settings used for calls to healthCheck. */ + public UnaryCallSettings healthCheckSettings() { + return healthCheckSettings; + } + + public HealthCheckServiceStub createStub() throws IOException { + if (getTransportChannelProvider() + .getTransportName() + .equals(GrpcTransportChannel.getGrpcTransportName())) { + return GrpcHealthCheckServiceStub.create(this); + } + if (getTransportChannelProvider() + .getTransportName() + .equals(HttpJsonTransportChannel.getHttpJsonTransportName())) { + return HttpJsonHealthCheckServiceStub.create(this); + } + throw new UnsupportedOperationException( + String.format( + "Transport not supported: %s", getTransportChannelProvider().getTransportName())); + } + + /** Returns the default service name. */ + @Override + public String getServiceName() { + return "visionai"; + } + + /** 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 "visionai.googleapis.com:443"; + } + + /** Returns the default mTLS service endpoint. */ + public static String getDefaultMtlsEndpoint() { + return "visionai.mtls.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) + .setUseJwtAccessWithScope(true); + } + + /** Returns a builder for the default gRPC ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return InstantiatingGrpcChannelProvider.newBuilder() + .setMaxInboundMessageSize(Integer.MAX_VALUE); + } + + /** Returns a builder for the default REST ChannelProvider for this service. */ + @BetaApi + public static InstantiatingHttpJsonChannelProvider.Builder + defaultHttpJsonTransportProviderBuilder() { + return InstantiatingHttpJsonChannelProvider.newBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return defaultGrpcTransportProviderBuilder().build(); + } + + public static ApiClientHeaderProvider.Builder defaultGrpcApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken( + "gapic", GaxProperties.getLibraryVersion(HealthCheckServiceStubSettings.class)) + .setTransportToken( + GaxGrpcProperties.getGrpcTokenName(), GaxGrpcProperties.getGrpcVersion()); + } + + public static ApiClientHeaderProvider.Builder defaultHttpJsonApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken( + "gapic", GaxProperties.getLibraryVersion(HealthCheckServiceStubSettings.class)) + .setTransportToken( + GaxHttpJsonProperties.getHttpJsonTokenName(), + GaxHttpJsonProperties.getHttpJsonVersion()); + } + + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return HealthCheckServiceStubSettings.defaultGrpcApiClientHeaderProviderBuilder(); + } + + /** Returns a new gRPC builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new REST builder for this class. */ + public static Builder newHttpJsonBuilder() { + return Builder.createHttpJsonDefault(); + } + + /** 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 HealthCheckServiceStubSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + + healthCheckSettings = settingsBuilder.healthCheckSettings().build(); + } + + /** Builder for HealthCheckServiceStubSettings. */ + public static class Builder + extends StubSettings.Builder { + private final ImmutableList> unaryMethodSettingsBuilders; + private final UnaryCallSettings.Builder + healthCheckSettings; + private static final ImmutableMap> + RETRYABLE_CODE_DEFINITIONS; + + static { + ImmutableMap.Builder> definitions = + ImmutableMap.builder(); + definitions.put("no_retry_codes", 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().setRpcTimeoutMultiplier(1.0).build(); + definitions.put("no_retry_params", settings); + RETRY_PARAM_DEFINITIONS = definitions.build(); + } + + protected Builder() { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(clientContext); + + healthCheckSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of(healthCheckSettings); + initDefaults(this); + } + + protected Builder(HealthCheckServiceStubSettings settings) { + super(settings); + + healthCheckSettings = settings.healthCheckSettings.toBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of(healthCheckSettings); + } + + private static Builder createDefault() { + Builder builder = new Builder(((ClientContext) null)); + + builder.setTransportChannelProvider(defaultTransportChannelProvider()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultApiClientHeaderProviderBuilder().build()); + builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); + builder.setSwitchToMtlsEndpointAllowed(true); + + return initDefaults(builder); + } + + private static Builder createHttpJsonDefault() { + Builder builder = new Builder(((ClientContext) null)); + + builder.setTransportChannelProvider(defaultHttpJsonTransportProviderBuilder().build()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultHttpJsonApiClientHeaderProviderBuilder().build()); + builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); + builder.setSwitchToMtlsEndpointAllowed(true); + + return initDefaults(builder); + } + + private static Builder initDefaults(Builder builder) { + builder + .healthCheckSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + return builder; + } + + /** + * 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) { + super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater); + return this; + } + + public ImmutableList> unaryMethodSettingsBuilders() { + return unaryMethodSettingsBuilders; + } + + /** Returns the builder for the settings used for calls to healthCheck. */ + public UnaryCallSettings.Builder + healthCheckSettings() { + return healthCheckSettings; + } + + @Override + public HealthCheckServiceStubSettings build() throws IOException { + return new HealthCheckServiceStubSettings(this); + } + } +} diff --git a/java-visionai/google-cloud-visionai/src/main/java/com/google/cloud/visionai/v1/stub/HttpJsonAppPlatformCallableFactory.java b/java-visionai/google-cloud-visionai/src/main/java/com/google/cloud/visionai/v1/stub/HttpJsonAppPlatformCallableFactory.java new file mode 100644 index 000000000000..3a0254db9cf2 --- /dev/null +++ b/java-visionai/google-cloud-visionai/src/main/java/com/google/cloud/visionai/v1/stub/HttpJsonAppPlatformCallableFactory.java @@ -0,0 +1,101 @@ +/* + * Copyright 2024 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.visionai.v1.stub; + +import com.google.api.gax.httpjson.HttpJsonCallSettings; +import com.google.api.gax.httpjson.HttpJsonCallableFactory; +import com.google.api.gax.httpjson.HttpJsonOperationSnapshotCallable; +import com.google.api.gax.httpjson.HttpJsonStubCallableFactory; +import com.google.api.gax.httpjson.longrunning.stub.OperationsStub; +import com.google.api.gax.rpc.BatchingCallSettings; +import com.google.api.gax.rpc.ClientContext; +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.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.longrunning.Operation; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * REST callable factory implementation for the AppPlatform service API. + * + *

This class is for advanced usage. + */ +@Generated("by gapic-generator-java") +public class HttpJsonAppPlatformCallableFactory + implements HttpJsonStubCallableFactory { + + @Override + public UnaryCallable createUnaryCallable( + HttpJsonCallSettings httpJsonCallSettings, + UnaryCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createUnaryCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @Override + public + UnaryCallable createPagedCallable( + HttpJsonCallSettings httpJsonCallSettings, + PagedCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createPagedCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @Override + public UnaryCallable createBatchingCallable( + HttpJsonCallSettings httpJsonCallSettings, + BatchingCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createBatchingCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @Override + public + OperationCallable createOperationCallable( + HttpJsonCallSettings httpJsonCallSettings, + OperationCallSettings callSettings, + ClientContext clientContext, + OperationsStub operationsStub) { + UnaryCallable innerCallable = + HttpJsonCallableFactory.createBaseUnaryCallable( + httpJsonCallSettings, callSettings.getInitialCallSettings(), clientContext); + HttpJsonOperationSnapshotCallable initialCallable = + new HttpJsonOperationSnapshotCallable( + innerCallable, + httpJsonCallSettings.getMethodDescriptor().getOperationSnapshotFactory()); + return HttpJsonCallableFactory.createOperationCallable( + callSettings, clientContext, operationsStub.longRunningClient(), initialCallable); + } + + @Override + public + ServerStreamingCallable createServerStreamingCallable( + HttpJsonCallSettings httpJsonCallSettings, + ServerStreamingCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createServerStreamingCallable( + httpJsonCallSettings, callSettings, clientContext); + } +} diff --git a/java-visionai/google-cloud-visionai/src/main/java/com/google/cloud/visionai/v1/stub/HttpJsonAppPlatformStub.java b/java-visionai/google-cloud-visionai/src/main/java/com/google/cloud/visionai/v1/stub/HttpJsonAppPlatformStub.java new file mode 100644 index 000000000000..42ba5a5ef5b6 --- /dev/null +++ b/java-visionai/google-cloud-visionai/src/main/java/com/google/cloud/visionai/v1/stub/HttpJsonAppPlatformStub.java @@ -0,0 +1,2197 @@ +/* + * Copyright 2024 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.visionai.v1.stub; + +import static com.google.cloud.visionai.v1.AppPlatformClient.ListApplicationsPagedResponse; +import static com.google.cloud.visionai.v1.AppPlatformClient.ListDraftsPagedResponse; +import static com.google.cloud.visionai.v1.AppPlatformClient.ListInstancesPagedResponse; +import static com.google.cloud.visionai.v1.AppPlatformClient.ListProcessorsPagedResponse; + +import com.google.api.HttpRule; +import com.google.api.core.InternalApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.core.BackgroundResourceAggregation; +import com.google.api.gax.httpjson.ApiMethodDescriptor; +import com.google.api.gax.httpjson.HttpJsonCallSettings; +import com.google.api.gax.httpjson.HttpJsonOperationSnapshot; +import com.google.api.gax.httpjson.HttpJsonStubCallableFactory; +import com.google.api.gax.httpjson.ProtoMessageRequestFormatter; +import com.google.api.gax.httpjson.ProtoMessageResponseParser; +import com.google.api.gax.httpjson.ProtoRestSerializer; +import com.google.api.gax.httpjson.longrunning.stub.HttpJsonOperationsStub; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.RequestParamsBuilder; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.visionai.v1.AddApplicationStreamInputRequest; +import com.google.cloud.visionai.v1.AddApplicationStreamInputResponse; +import com.google.cloud.visionai.v1.Application; +import com.google.cloud.visionai.v1.CreateApplicationInstancesRequest; +import com.google.cloud.visionai.v1.CreateApplicationInstancesResponse; +import com.google.cloud.visionai.v1.CreateApplicationRequest; +import com.google.cloud.visionai.v1.CreateDraftRequest; +import com.google.cloud.visionai.v1.CreateProcessorRequest; +import com.google.cloud.visionai.v1.DeleteApplicationInstancesRequest; +import com.google.cloud.visionai.v1.DeleteApplicationRequest; +import com.google.cloud.visionai.v1.DeleteDraftRequest; +import com.google.cloud.visionai.v1.DeleteProcessorRequest; +import com.google.cloud.visionai.v1.DeployApplicationRequest; +import com.google.cloud.visionai.v1.DeployApplicationResponse; +import com.google.cloud.visionai.v1.Draft; +import com.google.cloud.visionai.v1.GetApplicationRequest; +import com.google.cloud.visionai.v1.GetDraftRequest; +import com.google.cloud.visionai.v1.GetInstanceRequest; +import com.google.cloud.visionai.v1.GetProcessorRequest; +import com.google.cloud.visionai.v1.Instance; +import com.google.cloud.visionai.v1.ListApplicationsRequest; +import com.google.cloud.visionai.v1.ListApplicationsResponse; +import com.google.cloud.visionai.v1.ListDraftsRequest; +import com.google.cloud.visionai.v1.ListDraftsResponse; +import com.google.cloud.visionai.v1.ListInstancesRequest; +import com.google.cloud.visionai.v1.ListInstancesResponse; +import com.google.cloud.visionai.v1.ListPrebuiltProcessorsRequest; +import com.google.cloud.visionai.v1.ListPrebuiltProcessorsResponse; +import com.google.cloud.visionai.v1.ListProcessorsRequest; +import com.google.cloud.visionai.v1.ListProcessorsResponse; +import com.google.cloud.visionai.v1.OperationMetadata; +import com.google.cloud.visionai.v1.Processor; +import com.google.cloud.visionai.v1.RemoveApplicationStreamInputRequest; +import com.google.cloud.visionai.v1.RemoveApplicationStreamInputResponse; +import com.google.cloud.visionai.v1.UndeployApplicationRequest; +import com.google.cloud.visionai.v1.UndeployApplicationResponse; +import com.google.cloud.visionai.v1.UpdateApplicationInstancesRequest; +import com.google.cloud.visionai.v1.UpdateApplicationInstancesResponse; +import com.google.cloud.visionai.v1.UpdateApplicationRequest; +import com.google.cloud.visionai.v1.UpdateApplicationStreamInputRequest; +import com.google.cloud.visionai.v1.UpdateApplicationStreamInputResponse; +import com.google.cloud.visionai.v1.UpdateDraftRequest; +import com.google.cloud.visionai.v1.UpdateProcessorRequest; +import com.google.common.collect.ImmutableMap; +import com.google.longrunning.Operation; +import com.google.protobuf.Empty; +import com.google.protobuf.TypeRegistry; +import java.io.IOException; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * REST stub implementation for the AppPlatform service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") +public class HttpJsonAppPlatformStub extends AppPlatformStub { + private static final TypeRegistry typeRegistry = + TypeRegistry.newBuilder() + .add(Draft.getDescriptor()) + .add(Instance.getDescriptor()) + .add(UndeployApplicationResponse.getDescriptor()) + .add(AddApplicationStreamInputResponse.getDescriptor()) + .add(UpdateApplicationStreamInputResponse.getDescriptor()) + .add(OperationMetadata.getDescriptor()) + .add(RemoveApplicationStreamInputResponse.getDescriptor()) + .add(Empty.getDescriptor()) + .add(DeployApplicationResponse.getDescriptor()) + .add(CreateApplicationInstancesResponse.getDescriptor()) + .add(Processor.getDescriptor()) + .add(Application.getDescriptor()) + .add(UpdateApplicationInstancesResponse.getDescriptor()) + .build(); + + private static final ApiMethodDescriptor + listApplicationsMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.visionai.v1.AppPlatform/ListApplications") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{parent=projects/*/locations/*}/applications", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "filter", request.getFilter()); + serializer.putQueryParam(fields, "orderBy", request.getOrderBy()); + serializer.putQueryParam(fields, "pageSize", request.getPageSize()); + serializer.putQueryParam(fields, "pageToken", request.getPageToken()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ListApplicationsResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + getApplicationMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.visionai.v1.AppPlatform/GetApplication") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/applications/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Application.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + createApplicationMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.visionai.v1.AppPlatform/CreateApplication") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{parent=projects/*/locations/*}/applications", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam( + fields, "applicationId", request.getApplicationId()); + serializer.putQueryParam(fields, "requestId", request.getRequestId()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("application", request.getApplication(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (CreateApplicationRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + updateApplicationMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.visionai.v1.AppPlatform/UpdateApplication") + .setHttpMethod("PATCH") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{application.name=projects/*/locations/*/applications/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam( + fields, "application.name", request.getApplication().getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "requestId", request.getRequestId()); + serializer.putQueryParam(fields, "updateMask", request.getUpdateMask()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("application", request.getApplication(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (UpdateApplicationRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + deleteApplicationMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.visionai.v1.AppPlatform/DeleteApplication") + .setHttpMethod("DELETE") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/applications/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "force", request.getForce()); + serializer.putQueryParam(fields, "requestId", request.getRequestId()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (DeleteApplicationRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + deployApplicationMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.visionai.v1.AppPlatform/DeployApplication") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/applications/*}:deploy", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().clearName().build(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (DeployApplicationRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + undeployApplicationMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.visionai.v1.AppPlatform/UndeployApplication") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/applications/*}:undeploy", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().clearName().build(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (UndeployApplicationRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + addApplicationStreamInputMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.visionai.v1.AppPlatform/AddApplicationStreamInput") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/applications/*}:addStreamInput", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().clearName().build(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (AddApplicationStreamInputRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + removeApplicationStreamInputMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.visionai.v1.AppPlatform/RemoveApplicationStreamInput") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/applications/*}:removeStreamInput", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().clearName().build(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (RemoveApplicationStreamInputRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + updateApplicationStreamInputMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.visionai.v1.AppPlatform/UpdateApplicationStreamInput") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/applications/*}:updateStreamInput", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().clearName().build(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (UpdateApplicationStreamInputRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + listInstancesMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.visionai.v1.AppPlatform/ListInstances") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{parent=projects/*/locations/*/applications/*}/instances", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "filter", request.getFilter()); + serializer.putQueryParam(fields, "orderBy", request.getOrderBy()); + serializer.putQueryParam(fields, "pageSize", request.getPageSize()); + serializer.putQueryParam(fields, "pageToken", request.getPageToken()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ListInstancesResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + getInstanceMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.visionai.v1.AppPlatform/GetInstance") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/applications/*/instances/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Instance.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + createApplicationInstancesMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.visionai.v1.AppPlatform/CreateApplicationInstances") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/applications/*}:createApplicationInstances", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().clearName().build(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (CreateApplicationInstancesRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + deleteApplicationInstancesMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.visionai.v1.AppPlatform/DeleteApplicationInstances") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/applications/*}:deleteApplicationInstances", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().clearName().build(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (DeleteApplicationInstancesRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + updateApplicationInstancesMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.visionai.v1.AppPlatform/UpdateApplicationInstances") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/applications/*}:updateApplicationInstances", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().clearName().build(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (UpdateApplicationInstancesRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + listDraftsMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.visionai.v1.AppPlatform/ListDrafts") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{parent=projects/*/locations/*/applications/*}/drafts", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "filter", request.getFilter()); + serializer.putQueryParam(fields, "orderBy", request.getOrderBy()); + serializer.putQueryParam(fields, "pageSize", request.getPageSize()); + serializer.putQueryParam(fields, "pageToken", request.getPageToken()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ListDraftsResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor getDraftMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.visionai.v1.AppPlatform/GetDraft") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/applications/*/drafts/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Draft.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + createDraftMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.visionai.v1.AppPlatform/CreateDraft") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{parent=projects/*/locations/*/applications/*}/drafts", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "draftId", request.getDraftId()); + serializer.putQueryParam(fields, "requestId", request.getRequestId()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("draft", request.getDraft(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (CreateDraftRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + updateDraftMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.visionai.v1.AppPlatform/UpdateDraft") + .setHttpMethod("PATCH") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{draft.name=projects/*/locations/*/applications/*/drafts/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam( + fields, "draft.name", request.getDraft().getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam( + fields, "allowMissing", request.getAllowMissing()); + serializer.putQueryParam(fields, "requestId", request.getRequestId()); + serializer.putQueryParam(fields, "updateMask", request.getUpdateMask()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("draft", request.getDraft(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (UpdateDraftRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + deleteDraftMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.visionai.v1.AppPlatform/DeleteDraft") + .setHttpMethod("DELETE") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/applications/*/drafts/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "requestId", request.getRequestId()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (DeleteDraftRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + listProcessorsMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.visionai.v1.AppPlatform/ListProcessors") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{parent=projects/*/locations/*}/processors", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "filter", request.getFilter()); + serializer.putQueryParam(fields, "orderBy", request.getOrderBy()); + serializer.putQueryParam(fields, "pageSize", request.getPageSize()); + serializer.putQueryParam(fields, "pageToken", request.getPageToken()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ListProcessorsResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor< + ListPrebuiltProcessorsRequest, ListPrebuiltProcessorsResponse> + listPrebuiltProcessorsMethodDescriptor = + ApiMethodDescriptor + .newBuilder() + .setFullMethodName("google.cloud.visionai.v1.AppPlatform/ListPrebuiltProcessors") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{parent=projects/*/locations/*}/processors:prebuilt", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().clearParent().build(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ListPrebuiltProcessorsResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + getProcessorMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.visionai.v1.AppPlatform/GetProcessor") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/processors/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Processor.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + createProcessorMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.visionai.v1.AppPlatform/CreateProcessor") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{parent=projects/*/locations/*}/processors", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam( + fields, "processorId", request.getProcessorId()); + serializer.putQueryParam(fields, "requestId", request.getRequestId()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("processor", request.getProcessor(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (CreateProcessorRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + updateProcessorMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.visionai.v1.AppPlatform/UpdateProcessor") + .setHttpMethod("PATCH") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{processor.name=projects/*/locations/*/processors/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam( + fields, "processor.name", request.getProcessor().getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "requestId", request.getRequestId()); + serializer.putQueryParam(fields, "updateMask", request.getUpdateMask()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("processor", request.getProcessor(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (UpdateProcessorRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + deleteProcessorMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.visionai.v1.AppPlatform/DeleteProcessor") + .setHttpMethod("DELETE") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/processors/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "requestId", request.getRequestId()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (DeleteProcessorRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private final UnaryCallable + listApplicationsCallable; + private final UnaryCallable + listApplicationsPagedCallable; + private final UnaryCallable getApplicationCallable; + private final UnaryCallable createApplicationCallable; + private final OperationCallable + createApplicationOperationCallable; + private final UnaryCallable updateApplicationCallable; + private final OperationCallable + updateApplicationOperationCallable; + private final UnaryCallable deleteApplicationCallable; + private final OperationCallable + deleteApplicationOperationCallable; + private final UnaryCallable deployApplicationCallable; + private final OperationCallable< + DeployApplicationRequest, DeployApplicationResponse, OperationMetadata> + deployApplicationOperationCallable; + private final UnaryCallable undeployApplicationCallable; + private final OperationCallable< + UndeployApplicationRequest, UndeployApplicationResponse, OperationMetadata> + undeployApplicationOperationCallable; + private final UnaryCallable + addApplicationStreamInputCallable; + private final OperationCallable< + AddApplicationStreamInputRequest, AddApplicationStreamInputResponse, OperationMetadata> + addApplicationStreamInputOperationCallable; + private final UnaryCallable + removeApplicationStreamInputCallable; + private final OperationCallable< + RemoveApplicationStreamInputRequest, + RemoveApplicationStreamInputResponse, + OperationMetadata> + removeApplicationStreamInputOperationCallable; + private final UnaryCallable + updateApplicationStreamInputCallable; + private final OperationCallable< + UpdateApplicationStreamInputRequest, + UpdateApplicationStreamInputResponse, + OperationMetadata> + updateApplicationStreamInputOperationCallable; + private final UnaryCallable listInstancesCallable; + private final UnaryCallable + listInstancesPagedCallable; + private final UnaryCallable getInstanceCallable; + private final UnaryCallable + createApplicationInstancesCallable; + private final OperationCallable< + CreateApplicationInstancesRequest, CreateApplicationInstancesResponse, OperationMetadata> + createApplicationInstancesOperationCallable; + private final UnaryCallable + deleteApplicationInstancesCallable; + private final OperationCallable + deleteApplicationInstancesOperationCallable; + private final UnaryCallable + updateApplicationInstancesCallable; + private final OperationCallable< + UpdateApplicationInstancesRequest, UpdateApplicationInstancesResponse, OperationMetadata> + updateApplicationInstancesOperationCallable; + private final UnaryCallable listDraftsCallable; + private final UnaryCallable listDraftsPagedCallable; + private final UnaryCallable getDraftCallable; + private final UnaryCallable createDraftCallable; + private final OperationCallable + createDraftOperationCallable; + private final UnaryCallable updateDraftCallable; + private final OperationCallable + updateDraftOperationCallable; + private final UnaryCallable deleteDraftCallable; + private final OperationCallable + deleteDraftOperationCallable; + private final UnaryCallable listProcessorsCallable; + private final UnaryCallable + listProcessorsPagedCallable; + private final UnaryCallable + listPrebuiltProcessorsCallable; + private final UnaryCallable getProcessorCallable; + private final UnaryCallable createProcessorCallable; + private final OperationCallable + createProcessorOperationCallable; + private final UnaryCallable updateProcessorCallable; + private final OperationCallable + updateProcessorOperationCallable; + private final UnaryCallable deleteProcessorCallable; + private final OperationCallable + deleteProcessorOperationCallable; + + private final BackgroundResource backgroundResources; + private final HttpJsonOperationsStub httpJsonOperationsStub; + private final HttpJsonStubCallableFactory callableFactory; + + public static final HttpJsonAppPlatformStub create(AppPlatformStubSettings settings) + throws IOException { + return new HttpJsonAppPlatformStub(settings, ClientContext.create(settings)); + } + + public static final HttpJsonAppPlatformStub create(ClientContext clientContext) + throws IOException { + return new HttpJsonAppPlatformStub( + AppPlatformStubSettings.newHttpJsonBuilder().build(), clientContext); + } + + public static final HttpJsonAppPlatformStub create( + ClientContext clientContext, HttpJsonStubCallableFactory callableFactory) throws IOException { + return new HttpJsonAppPlatformStub( + AppPlatformStubSettings.newHttpJsonBuilder().build(), clientContext, callableFactory); + } + + /** + * Constructs an instance of HttpJsonAppPlatformStub, 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 HttpJsonAppPlatformStub(AppPlatformStubSettings settings, ClientContext clientContext) + throws IOException { + this(settings, clientContext, new HttpJsonAppPlatformCallableFactory()); + } + + /** + * Constructs an instance of HttpJsonAppPlatformStub, 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 HttpJsonAppPlatformStub( + AppPlatformStubSettings settings, + ClientContext clientContext, + HttpJsonStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + this.httpJsonOperationsStub = + HttpJsonOperationsStub.create( + clientContext, + callableFactory, + typeRegistry, + ImmutableMap.builder() + .put( + "google.longrunning.Operations.CancelOperation", + HttpRule.newBuilder() + .setPost("/v1/{name=projects/*/locations/*/operations/*}:cancel") + .build()) + .put( + "google.longrunning.Operations.DeleteOperation", + HttpRule.newBuilder() + .setDelete("/v1/{name=projects/*/locations/*/operations/*}") + .build()) + .put( + "google.longrunning.Operations.GetOperation", + HttpRule.newBuilder() + .setGet("/v1/{name=projects/*/locations/*/operations/*}") + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet("/v1/{name=projects/*/locations/*/warehouseOperations/*}") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet( + "/v1/{name=projects/*/locations/*/corpora/*/assets/*/operations/*}") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet( + "/v1/{name=projects/*/locations/*/corpora/*/collections/*/operations/*}") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet( + "/v1/{name=projects/*/locations/*/corpora/*/imageIndexes/*/operations/*}") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet( + "/v1/{name=projects/*/locations/*/corpora/*/indexes/*/operations/*}") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet("/v1/{name=projects/*/locations/*/corpora/*/operations/*}") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet( + "/v1/{name=projects/*/locations/*/indexEndpoints/*/operations/*}") + .build()) + .build()) + .put( + "google.longrunning.Operations.ListOperations", + HttpRule.newBuilder() + .setGet("/v1/{name=projects/*/locations/*}/operations") + .build()) + .build()); + + HttpJsonCallSettings + listApplicationsTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(listApplicationsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings getApplicationTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getApplicationMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings createApplicationTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(createApplicationMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings updateApplicationTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(updateApplicationMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add( + "application.name", String.valueOf(request.getApplication().getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings deleteApplicationTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(deleteApplicationMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings deployApplicationTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(deployApplicationMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings + undeployApplicationTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(undeployApplicationMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings + addApplicationStreamInputTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(addApplicationStreamInputMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings + removeApplicationStreamInputTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(removeApplicationStreamInputMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings + updateApplicationStreamInputTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(updateApplicationStreamInputMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings + listInstancesTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(listInstancesMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings getInstanceTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getInstanceMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings + createApplicationInstancesTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(createApplicationInstancesMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings + deleteApplicationInstancesTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(deleteApplicationInstancesMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings + updateApplicationInstancesTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(updateApplicationInstancesMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings listDraftsTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(listDraftsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings getDraftTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getDraftMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings createDraftTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(createDraftMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings updateDraftTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(updateDraftMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("draft.name", String.valueOf(request.getDraft().getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings deleteDraftTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(deleteDraftMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings + listProcessorsTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(listProcessorsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings + listPrebuiltProcessorsTransportSettings = + HttpJsonCallSettings + .newBuilder() + .setMethodDescriptor(listPrebuiltProcessorsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings getProcessorTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getProcessorMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings createProcessorTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(createProcessorMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings updateProcessorTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(updateProcessorMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("processor.name", String.valueOf(request.getProcessor().getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings deleteProcessorTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(deleteProcessorMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + + this.listApplicationsCallable = + callableFactory.createUnaryCallable( + listApplicationsTransportSettings, settings.listApplicationsSettings(), clientContext); + this.listApplicationsPagedCallable = + callableFactory.createPagedCallable( + listApplicationsTransportSettings, settings.listApplicationsSettings(), clientContext); + this.getApplicationCallable = + callableFactory.createUnaryCallable( + getApplicationTransportSettings, settings.getApplicationSettings(), clientContext); + this.createApplicationCallable = + callableFactory.createUnaryCallable( + createApplicationTransportSettings, + settings.createApplicationSettings(), + clientContext); + this.createApplicationOperationCallable = + callableFactory.createOperationCallable( + createApplicationTransportSettings, + settings.createApplicationOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.updateApplicationCallable = + callableFactory.createUnaryCallable( + updateApplicationTransportSettings, + settings.updateApplicationSettings(), + clientContext); + this.updateApplicationOperationCallable = + callableFactory.createOperationCallable( + updateApplicationTransportSettings, + settings.updateApplicationOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.deleteApplicationCallable = + callableFactory.createUnaryCallable( + deleteApplicationTransportSettings, + settings.deleteApplicationSettings(), + clientContext); + this.deleteApplicationOperationCallable = + callableFactory.createOperationCallable( + deleteApplicationTransportSettings, + settings.deleteApplicationOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.deployApplicationCallable = + callableFactory.createUnaryCallable( + deployApplicationTransportSettings, + settings.deployApplicationSettings(), + clientContext); + this.deployApplicationOperationCallable = + callableFactory.createOperationCallable( + deployApplicationTransportSettings, + settings.deployApplicationOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.undeployApplicationCallable = + callableFactory.createUnaryCallable( + undeployApplicationTransportSettings, + settings.undeployApplicationSettings(), + clientContext); + this.undeployApplicationOperationCallable = + callableFactory.createOperationCallable( + undeployApplicationTransportSettings, + settings.undeployApplicationOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.addApplicationStreamInputCallable = + callableFactory.createUnaryCallable( + addApplicationStreamInputTransportSettings, + settings.addApplicationStreamInputSettings(), + clientContext); + this.addApplicationStreamInputOperationCallable = + callableFactory.createOperationCallable( + addApplicationStreamInputTransportSettings, + settings.addApplicationStreamInputOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.removeApplicationStreamInputCallable = + callableFactory.createUnaryCallable( + removeApplicationStreamInputTransportSettings, + settings.removeApplicationStreamInputSettings(), + clientContext); + this.removeApplicationStreamInputOperationCallable = + callableFactory.createOperationCallable( + removeApplicationStreamInputTransportSettings, + settings.removeApplicationStreamInputOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.updateApplicationStreamInputCallable = + callableFactory.createUnaryCallable( + updateApplicationStreamInputTransportSettings, + settings.updateApplicationStreamInputSettings(), + clientContext); + this.updateApplicationStreamInputOperationCallable = + callableFactory.createOperationCallable( + updateApplicationStreamInputTransportSettings, + settings.updateApplicationStreamInputOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.listInstancesCallable = + callableFactory.createUnaryCallable( + listInstancesTransportSettings, settings.listInstancesSettings(), clientContext); + this.listInstancesPagedCallable = + callableFactory.createPagedCallable( + listInstancesTransportSettings, settings.listInstancesSettings(), clientContext); + this.getInstanceCallable = + callableFactory.createUnaryCallable( + getInstanceTransportSettings, settings.getInstanceSettings(), clientContext); + this.createApplicationInstancesCallable = + callableFactory.createUnaryCallable( + createApplicationInstancesTransportSettings, + settings.createApplicationInstancesSettings(), + clientContext); + this.createApplicationInstancesOperationCallable = + callableFactory.createOperationCallable( + createApplicationInstancesTransportSettings, + settings.createApplicationInstancesOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.deleteApplicationInstancesCallable = + callableFactory.createUnaryCallable( + deleteApplicationInstancesTransportSettings, + settings.deleteApplicationInstancesSettings(), + clientContext); + this.deleteApplicationInstancesOperationCallable = + callableFactory.createOperationCallable( + deleteApplicationInstancesTransportSettings, + settings.deleteApplicationInstancesOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.updateApplicationInstancesCallable = + callableFactory.createUnaryCallable( + updateApplicationInstancesTransportSettings, + settings.updateApplicationInstancesSettings(), + clientContext); + this.updateApplicationInstancesOperationCallable = + callableFactory.createOperationCallable( + updateApplicationInstancesTransportSettings, + settings.updateApplicationInstancesOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.listDraftsCallable = + callableFactory.createUnaryCallable( + listDraftsTransportSettings, settings.listDraftsSettings(), clientContext); + this.listDraftsPagedCallable = + callableFactory.createPagedCallable( + listDraftsTransportSettings, settings.listDraftsSettings(), clientContext); + this.getDraftCallable = + callableFactory.createUnaryCallable( + getDraftTransportSettings, settings.getDraftSettings(), clientContext); + this.createDraftCallable = + callableFactory.createUnaryCallable( + createDraftTransportSettings, settings.createDraftSettings(), clientContext); + this.createDraftOperationCallable = + callableFactory.createOperationCallable( + createDraftTransportSettings, + settings.createDraftOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.updateDraftCallable = + callableFactory.createUnaryCallable( + updateDraftTransportSettings, settings.updateDraftSettings(), clientContext); + this.updateDraftOperationCallable = + callableFactory.createOperationCallable( + updateDraftTransportSettings, + settings.updateDraftOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.deleteDraftCallable = + callableFactory.createUnaryCallable( + deleteDraftTransportSettings, settings.deleteDraftSettings(), clientContext); + this.deleteDraftOperationCallable = + callableFactory.createOperationCallable( + deleteDraftTransportSettings, + settings.deleteDraftOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.listProcessorsCallable = + callableFactory.createUnaryCallable( + listProcessorsTransportSettings, settings.listProcessorsSettings(), clientContext); + this.listProcessorsPagedCallable = + callableFactory.createPagedCallable( + listProcessorsTransportSettings, settings.listProcessorsSettings(), clientContext); + this.listPrebuiltProcessorsCallable = + callableFactory.createUnaryCallable( + listPrebuiltProcessorsTransportSettings, + settings.listPrebuiltProcessorsSettings(), + clientContext); + this.getProcessorCallable = + callableFactory.createUnaryCallable( + getProcessorTransportSettings, settings.getProcessorSettings(), clientContext); + this.createProcessorCallable = + callableFactory.createUnaryCallable( + createProcessorTransportSettings, settings.createProcessorSettings(), clientContext); + this.createProcessorOperationCallable = + callableFactory.createOperationCallable( + createProcessorTransportSettings, + settings.createProcessorOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.updateProcessorCallable = + callableFactory.createUnaryCallable( + updateProcessorTransportSettings, settings.updateProcessorSettings(), clientContext); + this.updateProcessorOperationCallable = + callableFactory.createOperationCallable( + updateProcessorTransportSettings, + settings.updateProcessorOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.deleteProcessorCallable = + callableFactory.createUnaryCallable( + deleteProcessorTransportSettings, settings.deleteProcessorSettings(), clientContext); + this.deleteProcessorOperationCallable = + callableFactory.createOperationCallable( + deleteProcessorTransportSettings, + settings.deleteProcessorOperationSettings(), + clientContext, + httpJsonOperationsStub); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + @InternalApi + public static List getMethodDescriptors() { + List methodDescriptors = new ArrayList<>(); + methodDescriptors.add(listApplicationsMethodDescriptor); + methodDescriptors.add(getApplicationMethodDescriptor); + methodDescriptors.add(createApplicationMethodDescriptor); + methodDescriptors.add(updateApplicationMethodDescriptor); + methodDescriptors.add(deleteApplicationMethodDescriptor); + methodDescriptors.add(deployApplicationMethodDescriptor); + methodDescriptors.add(undeployApplicationMethodDescriptor); + methodDescriptors.add(addApplicationStreamInputMethodDescriptor); + methodDescriptors.add(removeApplicationStreamInputMethodDescriptor); + methodDescriptors.add(updateApplicationStreamInputMethodDescriptor); + methodDescriptors.add(listInstancesMethodDescriptor); + methodDescriptors.add(getInstanceMethodDescriptor); + methodDescriptors.add(createApplicationInstancesMethodDescriptor); + methodDescriptors.add(deleteApplicationInstancesMethodDescriptor); + methodDescriptors.add(updateApplicationInstancesMethodDescriptor); + methodDescriptors.add(listDraftsMethodDescriptor); + methodDescriptors.add(getDraftMethodDescriptor); + methodDescriptors.add(createDraftMethodDescriptor); + methodDescriptors.add(updateDraftMethodDescriptor); + methodDescriptors.add(deleteDraftMethodDescriptor); + methodDescriptors.add(listProcessorsMethodDescriptor); + methodDescriptors.add(listPrebuiltProcessorsMethodDescriptor); + methodDescriptors.add(getProcessorMethodDescriptor); + methodDescriptors.add(createProcessorMethodDescriptor); + methodDescriptors.add(updateProcessorMethodDescriptor); + methodDescriptors.add(deleteProcessorMethodDescriptor); + return methodDescriptors; + } + + public HttpJsonOperationsStub getHttpJsonOperationsStub() { + return httpJsonOperationsStub; + } + + @Override + public UnaryCallable + listApplicationsCallable() { + return listApplicationsCallable; + } + + @Override + public UnaryCallable + listApplicationsPagedCallable() { + return listApplicationsPagedCallable; + } + + @Override + public UnaryCallable getApplicationCallable() { + return getApplicationCallable; + } + + @Override + public UnaryCallable createApplicationCallable() { + return createApplicationCallable; + } + + @Override + public OperationCallable + createApplicationOperationCallable() { + return createApplicationOperationCallable; + } + + @Override + public UnaryCallable updateApplicationCallable() { + return updateApplicationCallable; + } + + @Override + public OperationCallable + updateApplicationOperationCallable() { + return updateApplicationOperationCallable; + } + + @Override + public UnaryCallable deleteApplicationCallable() { + return deleteApplicationCallable; + } + + @Override + public OperationCallable + deleteApplicationOperationCallable() { + return deleteApplicationOperationCallable; + } + + @Override + public UnaryCallable deployApplicationCallable() { + return deployApplicationCallable; + } + + @Override + public OperationCallable + deployApplicationOperationCallable() { + return deployApplicationOperationCallable; + } + + @Override + public UnaryCallable undeployApplicationCallable() { + return undeployApplicationCallable; + } + + @Override + public OperationCallable< + UndeployApplicationRequest, UndeployApplicationResponse, OperationMetadata> + undeployApplicationOperationCallable() { + return undeployApplicationOperationCallable; + } + + @Override + public UnaryCallable + addApplicationStreamInputCallable() { + return addApplicationStreamInputCallable; + } + + @Override + public OperationCallable< + AddApplicationStreamInputRequest, AddApplicationStreamInputResponse, OperationMetadata> + addApplicationStreamInputOperationCallable() { + return addApplicationStreamInputOperationCallable; + } + + @Override + public UnaryCallable + removeApplicationStreamInputCallable() { + return removeApplicationStreamInputCallable; + } + + @Override + public OperationCallable< + RemoveApplicationStreamInputRequest, + RemoveApplicationStreamInputResponse, + OperationMetadata> + removeApplicationStreamInputOperationCallable() { + return removeApplicationStreamInputOperationCallable; + } + + @Override + public UnaryCallable + updateApplicationStreamInputCallable() { + return updateApplicationStreamInputCallable; + } + + @Override + public OperationCallable< + UpdateApplicationStreamInputRequest, + UpdateApplicationStreamInputResponse, + OperationMetadata> + updateApplicationStreamInputOperationCallable() { + return updateApplicationStreamInputOperationCallable; + } + + @Override + public UnaryCallable listInstancesCallable() { + return listInstancesCallable; + } + + @Override + public UnaryCallable + listInstancesPagedCallable() { + return listInstancesPagedCallable; + } + + @Override + public UnaryCallable getInstanceCallable() { + return getInstanceCallable; + } + + @Override + public UnaryCallable + createApplicationInstancesCallable() { + return createApplicationInstancesCallable; + } + + @Override + public OperationCallable< + CreateApplicationInstancesRequest, CreateApplicationInstancesResponse, OperationMetadata> + createApplicationInstancesOperationCallable() { + return createApplicationInstancesOperationCallable; + } + + @Override + public UnaryCallable + deleteApplicationInstancesCallable() { + return deleteApplicationInstancesCallable; + } + + @Override + public OperationCallable + deleteApplicationInstancesOperationCallable() { + return deleteApplicationInstancesOperationCallable; + } + + @Override + public UnaryCallable + updateApplicationInstancesCallable() { + return updateApplicationInstancesCallable; + } + + @Override + public OperationCallable< + UpdateApplicationInstancesRequest, UpdateApplicationInstancesResponse, OperationMetadata> + updateApplicationInstancesOperationCallable() { + return updateApplicationInstancesOperationCallable; + } + + @Override + public UnaryCallable listDraftsCallable() { + return listDraftsCallable; + } + + @Override + public UnaryCallable listDraftsPagedCallable() { + return listDraftsPagedCallable; + } + + @Override + public UnaryCallable getDraftCallable() { + return getDraftCallable; + } + + @Override + public UnaryCallable createDraftCallable() { + return createDraftCallable; + } + + @Override + public OperationCallable + createDraftOperationCallable() { + return createDraftOperationCallable; + } + + @Override + public UnaryCallable updateDraftCallable() { + return updateDraftCallable; + } + + @Override + public OperationCallable + updateDraftOperationCallable() { + return updateDraftOperationCallable; + } + + @Override + public UnaryCallable deleteDraftCallable() { + return deleteDraftCallable; + } + + @Override + public OperationCallable + deleteDraftOperationCallable() { + return deleteDraftOperationCallable; + } + + @Override + public UnaryCallable listProcessorsCallable() { + return listProcessorsCallable; + } + + @Override + public UnaryCallable + listProcessorsPagedCallable() { + return listProcessorsPagedCallable; + } + + @Override + public UnaryCallable + listPrebuiltProcessorsCallable() { + return listPrebuiltProcessorsCallable; + } + + @Override + public UnaryCallable getProcessorCallable() { + return getProcessorCallable; + } + + @Override + public UnaryCallable createProcessorCallable() { + return createProcessorCallable; + } + + @Override + public OperationCallable + createProcessorOperationCallable() { + return createProcessorOperationCallable; + } + + @Override + public UnaryCallable updateProcessorCallable() { + return updateProcessorCallable; + } + + @Override + public OperationCallable + updateProcessorOperationCallable() { + return updateProcessorOperationCallable; + } + + @Override + public UnaryCallable deleteProcessorCallable() { + return deleteProcessorCallable; + } + + @Override + public OperationCallable + deleteProcessorOperationCallable() { + return deleteProcessorOperationCallable; + } + + @Override + public final void close() { + try { + backgroundResources.close(); + } catch (RuntimeException e) { + throw e; + } catch (Exception e) { + throw new IllegalStateException("Failed to close resource", e); + } + } + + @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/java-visionai/google-cloud-visionai/src/main/java/com/google/cloud/visionai/v1/stub/HttpJsonHealthCheckServiceCallableFactory.java b/java-visionai/google-cloud-visionai/src/main/java/com/google/cloud/visionai/v1/stub/HttpJsonHealthCheckServiceCallableFactory.java new file mode 100644 index 000000000000..3efbd4c1bb37 --- /dev/null +++ b/java-visionai/google-cloud-visionai/src/main/java/com/google/cloud/visionai/v1/stub/HttpJsonHealthCheckServiceCallableFactory.java @@ -0,0 +1,101 @@ +/* + * Copyright 2024 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.visionai.v1.stub; + +import com.google.api.gax.httpjson.HttpJsonCallSettings; +import com.google.api.gax.httpjson.HttpJsonCallableFactory; +import com.google.api.gax.httpjson.HttpJsonOperationSnapshotCallable; +import com.google.api.gax.httpjson.HttpJsonStubCallableFactory; +import com.google.api.gax.httpjson.longrunning.stub.OperationsStub; +import com.google.api.gax.rpc.BatchingCallSettings; +import com.google.api.gax.rpc.ClientContext; +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.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.longrunning.Operation; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * REST callable factory implementation for the HealthCheckService service API. + * + *

This class is for advanced usage. + */ +@Generated("by gapic-generator-java") +public class HttpJsonHealthCheckServiceCallableFactory + implements HttpJsonStubCallableFactory { + + @Override + public UnaryCallable createUnaryCallable( + HttpJsonCallSettings httpJsonCallSettings, + UnaryCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createUnaryCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @Override + public + UnaryCallable createPagedCallable( + HttpJsonCallSettings httpJsonCallSettings, + PagedCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createPagedCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @Override + public UnaryCallable createBatchingCallable( + HttpJsonCallSettings httpJsonCallSettings, + BatchingCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createBatchingCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @Override + public + OperationCallable createOperationCallable( + HttpJsonCallSettings httpJsonCallSettings, + OperationCallSettings callSettings, + ClientContext clientContext, + OperationsStub operationsStub) { + UnaryCallable innerCallable = + HttpJsonCallableFactory.createBaseUnaryCallable( + httpJsonCallSettings, callSettings.getInitialCallSettings(), clientContext); + HttpJsonOperationSnapshotCallable initialCallable = + new HttpJsonOperationSnapshotCallable( + innerCallable, + httpJsonCallSettings.getMethodDescriptor().getOperationSnapshotFactory()); + return HttpJsonCallableFactory.createOperationCallable( + callSettings, clientContext, operationsStub.longRunningClient(), initialCallable); + } + + @Override + public + ServerStreamingCallable createServerStreamingCallable( + HttpJsonCallSettings httpJsonCallSettings, + ServerStreamingCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createServerStreamingCallable( + httpJsonCallSettings, callSettings, clientContext); + } +} diff --git a/java-visionai/google-cloud-visionai/src/main/java/com/google/cloud/visionai/v1/stub/HttpJsonHealthCheckServiceStub.java b/java-visionai/google-cloud-visionai/src/main/java/com/google/cloud/visionai/v1/stub/HttpJsonHealthCheckServiceStub.java new file mode 100644 index 000000000000..f5cda3ab5d97 --- /dev/null +++ b/java-visionai/google-cloud-visionai/src/main/java/com/google/cloud/visionai/v1/stub/HttpJsonHealthCheckServiceStub.java @@ -0,0 +1,199 @@ +/* + * Copyright 2024 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.visionai.v1.stub; + +import com.google.api.core.InternalApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.core.BackgroundResourceAggregation; +import com.google.api.gax.httpjson.ApiMethodDescriptor; +import com.google.api.gax.httpjson.HttpJsonCallSettings; +import com.google.api.gax.httpjson.HttpJsonStubCallableFactory; +import com.google.api.gax.httpjson.ProtoMessageRequestFormatter; +import com.google.api.gax.httpjson.ProtoMessageResponseParser; +import com.google.api.gax.httpjson.ProtoRestSerializer; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.RequestParamsBuilder; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.visionai.v1.HealthCheckRequest; +import com.google.cloud.visionai.v1.HealthCheckResponse; +import com.google.protobuf.TypeRegistry; +import java.io.IOException; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * REST stub implementation for the HealthCheckService service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") +public class HttpJsonHealthCheckServiceStub extends HealthCheckServiceStub { + private static final TypeRegistry typeRegistry = TypeRegistry.newBuilder().build(); + + private static final ApiMethodDescriptor + healthCheckMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.visionai.v1.HealthCheckService/HealthCheck") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{cluster=projects/*/locations/*/clusters/*}:healthCheck", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "cluster", request.getCluster()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(HealthCheckResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private final UnaryCallable healthCheckCallable; + + private final BackgroundResource backgroundResources; + private final HttpJsonStubCallableFactory callableFactory; + + public static final HttpJsonHealthCheckServiceStub create(HealthCheckServiceStubSettings settings) + throws IOException { + return new HttpJsonHealthCheckServiceStub(settings, ClientContext.create(settings)); + } + + public static final HttpJsonHealthCheckServiceStub create(ClientContext clientContext) + throws IOException { + return new HttpJsonHealthCheckServiceStub( + HealthCheckServiceStubSettings.newHttpJsonBuilder().build(), clientContext); + } + + public static final HttpJsonHealthCheckServiceStub create( + ClientContext clientContext, HttpJsonStubCallableFactory callableFactory) throws IOException { + return new HttpJsonHealthCheckServiceStub( + HealthCheckServiceStubSettings.newHttpJsonBuilder().build(), + clientContext, + callableFactory); + } + + /** + * Constructs an instance of HttpJsonHealthCheckServiceStub, 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 HttpJsonHealthCheckServiceStub( + HealthCheckServiceStubSettings settings, ClientContext clientContext) throws IOException { + this(settings, clientContext, new HttpJsonHealthCheckServiceCallableFactory()); + } + + /** + * Constructs an instance of HttpJsonHealthCheckServiceStub, 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 HttpJsonHealthCheckServiceStub( + HealthCheckServiceStubSettings settings, + ClientContext clientContext, + HttpJsonStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + + HttpJsonCallSettings healthCheckTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(healthCheckMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("cluster", String.valueOf(request.getCluster())); + return builder.build(); + }) + .build(); + + this.healthCheckCallable = + callableFactory.createUnaryCallable( + healthCheckTransportSettings, settings.healthCheckSettings(), clientContext); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + @InternalApi + public static List getMethodDescriptors() { + List methodDescriptors = new ArrayList<>(); + methodDescriptors.add(healthCheckMethodDescriptor); + return methodDescriptors; + } + + @Override + public UnaryCallable healthCheckCallable() { + return healthCheckCallable; + } + + @Override + public final void close() { + try { + backgroundResources.close(); + } catch (RuntimeException e) { + throw e; + } catch (Exception e) { + throw new IllegalStateException("Failed to close resource", e); + } + } + + @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/java-visionai/google-cloud-visionai/src/main/java/com/google/cloud/visionai/v1/stub/HttpJsonLiveVideoAnalyticsCallableFactory.java b/java-visionai/google-cloud-visionai/src/main/java/com/google/cloud/visionai/v1/stub/HttpJsonLiveVideoAnalyticsCallableFactory.java new file mode 100644 index 000000000000..747cf77b766c --- /dev/null +++ b/java-visionai/google-cloud-visionai/src/main/java/com/google/cloud/visionai/v1/stub/HttpJsonLiveVideoAnalyticsCallableFactory.java @@ -0,0 +1,101 @@ +/* + * Copyright 2024 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.visionai.v1.stub; + +import com.google.api.gax.httpjson.HttpJsonCallSettings; +import com.google.api.gax.httpjson.HttpJsonCallableFactory; +import com.google.api.gax.httpjson.HttpJsonOperationSnapshotCallable; +import com.google.api.gax.httpjson.HttpJsonStubCallableFactory; +import com.google.api.gax.httpjson.longrunning.stub.OperationsStub; +import com.google.api.gax.rpc.BatchingCallSettings; +import com.google.api.gax.rpc.ClientContext; +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.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.longrunning.Operation; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * REST callable factory implementation for the LiveVideoAnalytics service API. + * + *

This class is for advanced usage. + */ +@Generated("by gapic-generator-java") +public class HttpJsonLiveVideoAnalyticsCallableFactory + implements HttpJsonStubCallableFactory { + + @Override + public UnaryCallable createUnaryCallable( + HttpJsonCallSettings httpJsonCallSettings, + UnaryCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createUnaryCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @Override + public + UnaryCallable createPagedCallable( + HttpJsonCallSettings httpJsonCallSettings, + PagedCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createPagedCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @Override + public UnaryCallable createBatchingCallable( + HttpJsonCallSettings httpJsonCallSettings, + BatchingCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createBatchingCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @Override + public + OperationCallable createOperationCallable( + HttpJsonCallSettings httpJsonCallSettings, + OperationCallSettings callSettings, + ClientContext clientContext, + OperationsStub operationsStub) { + UnaryCallable innerCallable = + HttpJsonCallableFactory.createBaseUnaryCallable( + httpJsonCallSettings, callSettings.getInitialCallSettings(), clientContext); + HttpJsonOperationSnapshotCallable initialCallable = + new HttpJsonOperationSnapshotCallable( + innerCallable, + httpJsonCallSettings.getMethodDescriptor().getOperationSnapshotFactory()); + return HttpJsonCallableFactory.createOperationCallable( + callSettings, clientContext, operationsStub.longRunningClient(), initialCallable); + } + + @Override + public + ServerStreamingCallable createServerStreamingCallable( + HttpJsonCallSettings httpJsonCallSettings, + ServerStreamingCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createServerStreamingCallable( + httpJsonCallSettings, callSettings, clientContext); + } +} diff --git a/java-visionai/google-cloud-visionai/src/main/java/com/google/cloud/visionai/v1/stub/HttpJsonLiveVideoAnalyticsStub.java b/java-visionai/google-cloud-visionai/src/main/java/com/google/cloud/visionai/v1/stub/HttpJsonLiveVideoAnalyticsStub.java new file mode 100644 index 000000000000..a52345a61679 --- /dev/null +++ b/java-visionai/google-cloud-visionai/src/main/java/com/google/cloud/visionai/v1/stub/HttpJsonLiveVideoAnalyticsStub.java @@ -0,0 +1,1532 @@ +/* + * Copyright 2024 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.visionai.v1.stub; + +import static com.google.cloud.visionai.v1.LiveVideoAnalyticsClient.ListAnalysesPagedResponse; +import static com.google.cloud.visionai.v1.LiveVideoAnalyticsClient.ListOperatorsPagedResponse; +import static com.google.cloud.visionai.v1.LiveVideoAnalyticsClient.ListProcessesPagedResponse; +import static com.google.cloud.visionai.v1.LiveVideoAnalyticsClient.ListPublicOperatorsPagedResponse; + +import com.google.api.HttpRule; +import com.google.api.core.InternalApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.core.BackgroundResourceAggregation; +import com.google.api.gax.httpjson.ApiMethodDescriptor; +import com.google.api.gax.httpjson.HttpJsonCallSettings; +import com.google.api.gax.httpjson.HttpJsonOperationSnapshot; +import com.google.api.gax.httpjson.HttpJsonStubCallableFactory; +import com.google.api.gax.httpjson.ProtoMessageRequestFormatter; +import com.google.api.gax.httpjson.ProtoMessageResponseParser; +import com.google.api.gax.httpjson.ProtoRestSerializer; +import com.google.api.gax.httpjson.longrunning.stub.HttpJsonOperationsStub; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.RequestParamsBuilder; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.visionai.v1.Analysis; +import com.google.cloud.visionai.v1.BatchRunProcessRequest; +import com.google.cloud.visionai.v1.BatchRunProcessResponse; +import com.google.cloud.visionai.v1.CreateAnalysisRequest; +import com.google.cloud.visionai.v1.CreateOperatorRequest; +import com.google.cloud.visionai.v1.CreateProcessRequest; +import com.google.cloud.visionai.v1.DeleteAnalysisRequest; +import com.google.cloud.visionai.v1.DeleteOperatorRequest; +import com.google.cloud.visionai.v1.DeleteProcessRequest; +import com.google.cloud.visionai.v1.GetAnalysisRequest; +import com.google.cloud.visionai.v1.GetOperatorRequest; +import com.google.cloud.visionai.v1.GetProcessRequest; +import com.google.cloud.visionai.v1.ListAnalysesRequest; +import com.google.cloud.visionai.v1.ListAnalysesResponse; +import com.google.cloud.visionai.v1.ListOperatorsRequest; +import com.google.cloud.visionai.v1.ListOperatorsResponse; +import com.google.cloud.visionai.v1.ListProcessesRequest; +import com.google.cloud.visionai.v1.ListProcessesResponse; +import com.google.cloud.visionai.v1.ListPublicOperatorsRequest; +import com.google.cloud.visionai.v1.ListPublicOperatorsResponse; +import com.google.cloud.visionai.v1.OperationMetadata; +import com.google.cloud.visionai.v1.Operator; +import com.google.cloud.visionai.v1.Process; +import com.google.cloud.visionai.v1.ResolveOperatorInfoRequest; +import com.google.cloud.visionai.v1.ResolveOperatorInfoResponse; +import com.google.cloud.visionai.v1.UpdateAnalysisRequest; +import com.google.cloud.visionai.v1.UpdateOperatorRequest; +import com.google.cloud.visionai.v1.UpdateProcessRequest; +import com.google.common.collect.ImmutableMap; +import com.google.longrunning.Operation; +import com.google.protobuf.Empty; +import com.google.protobuf.TypeRegistry; +import java.io.IOException; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * REST stub implementation for the LiveVideoAnalytics service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") +public class HttpJsonLiveVideoAnalyticsStub extends LiveVideoAnalyticsStub { + private static final TypeRegistry typeRegistry = + TypeRegistry.newBuilder() + .add(Analysis.getDescriptor()) + .add(Empty.getDescriptor()) + .add(BatchRunProcessResponse.getDescriptor()) + .add(Operator.getDescriptor()) + .add(OperationMetadata.getDescriptor()) + .add(Process.getDescriptor()) + .build(); + + private static final ApiMethodDescriptor + listPublicOperatorsMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.visionai.v1.LiveVideoAnalytics/ListPublicOperators") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{parent=projects/*/locations/*}:listPublicOperators", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "filter", request.getFilter()); + serializer.putQueryParam(fields, "orderBy", request.getOrderBy()); + serializer.putQueryParam(fields, "pageSize", request.getPageSize()); + serializer.putQueryParam(fields, "pageToken", request.getPageToken()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ListPublicOperatorsResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + resolveOperatorInfoMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.visionai.v1.LiveVideoAnalytics/ResolveOperatorInfo") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{parent=projects/*/locations/*}:resolveOperatorInfo", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().clearParent().build(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ResolveOperatorInfoResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + listOperatorsMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.visionai.v1.LiveVideoAnalytics/ListOperators") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{parent=projects/*/locations/*}/operators", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "filter", request.getFilter()); + serializer.putQueryParam(fields, "orderBy", request.getOrderBy()); + serializer.putQueryParam(fields, "pageSize", request.getPageSize()); + serializer.putQueryParam(fields, "pageToken", request.getPageToken()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ListOperatorsResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + getOperatorMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.visionai.v1.LiveVideoAnalytics/GetOperator") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/operators/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operator.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + createOperatorMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.visionai.v1.LiveVideoAnalytics/CreateOperator") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{parent=projects/*/locations/*}/operators", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "operatorId", request.getOperatorId()); + serializer.putQueryParam(fields, "requestId", request.getRequestId()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("operator", request.getOperator(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (CreateOperatorRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + updateOperatorMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.visionai.v1.LiveVideoAnalytics/UpdateOperator") + .setHttpMethod("PATCH") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{operator.name=projects/*/locations/*/operators/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam( + fields, "operator.name", request.getOperator().getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "requestId", request.getRequestId()); + serializer.putQueryParam(fields, "updateMask", request.getUpdateMask()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("operator", request.getOperator(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (UpdateOperatorRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + deleteOperatorMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.visionai.v1.LiveVideoAnalytics/DeleteOperator") + .setHttpMethod("DELETE") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/operators/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "requestId", request.getRequestId()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (DeleteOperatorRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + listAnalysesMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.visionai.v1.LiveVideoAnalytics/ListAnalyses") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{parent=projects/*/locations/*/clusters/*}/analyses", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "filter", request.getFilter()); + serializer.putQueryParam(fields, "orderBy", request.getOrderBy()); + serializer.putQueryParam(fields, "pageSize", request.getPageSize()); + serializer.putQueryParam(fields, "pageToken", request.getPageToken()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ListAnalysesResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + getAnalysisMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.visionai.v1.LiveVideoAnalytics/GetAnalysis") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/clusters/*/analyses/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Analysis.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + createAnalysisMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.visionai.v1.LiveVideoAnalytics/CreateAnalysis") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{parent=projects/*/locations/*/clusters/*}/analyses", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "analysisId", request.getAnalysisId()); + serializer.putQueryParam(fields, "requestId", request.getRequestId()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("analysis", request.getAnalysis(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (CreateAnalysisRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + updateAnalysisMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.visionai.v1.LiveVideoAnalytics/UpdateAnalysis") + .setHttpMethod("PATCH") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{analysis.name=projects/*/locations/*/clusters/*/analyses/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam( + fields, "analysis.name", request.getAnalysis().getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "requestId", request.getRequestId()); + serializer.putQueryParam(fields, "updateMask", request.getUpdateMask()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("analysis", request.getAnalysis(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (UpdateAnalysisRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + deleteAnalysisMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.visionai.v1.LiveVideoAnalytics/DeleteAnalysis") + .setHttpMethod("DELETE") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/clusters/*/analyses/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "requestId", request.getRequestId()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (DeleteAnalysisRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + listProcessesMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.visionai.v1.LiveVideoAnalytics/ListProcesses") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{parent=projects/*/locations/*/clusters/*}/processes", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "filter", request.getFilter()); + serializer.putQueryParam(fields, "orderBy", request.getOrderBy()); + serializer.putQueryParam(fields, "pageSize", request.getPageSize()); + serializer.putQueryParam(fields, "pageToken", request.getPageToken()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ListProcessesResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor getProcessMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.visionai.v1.LiveVideoAnalytics/GetProcess") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/clusters/*/processes/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Process.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + createProcessMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.visionai.v1.LiveVideoAnalytics/CreateProcess") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{parent=projects/*/locations/*/clusters/*}/processes", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "processId", request.getProcessId()); + serializer.putQueryParam(fields, "requestId", request.getRequestId()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("process", request.getProcess(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (CreateProcessRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + updateProcessMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.visionai.v1.LiveVideoAnalytics/UpdateProcess") + .setHttpMethod("PATCH") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{process.name=projects/*/locations/*/clusters/*/processes/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam( + fields, "process.name", request.getProcess().getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "requestId", request.getRequestId()); + serializer.putQueryParam(fields, "updateMask", request.getUpdateMask()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("process", request.getProcess(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (UpdateProcessRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + deleteProcessMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.visionai.v1.LiveVideoAnalytics/DeleteProcess") + .setHttpMethod("DELETE") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/clusters/*/processes/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "requestId", request.getRequestId()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (DeleteProcessRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + batchRunProcessMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.visionai.v1.LiveVideoAnalytics/BatchRunProcess") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{parent=projects/*/locations/*/clusters/*}/processes:batchRun", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().clearParent().build(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (BatchRunProcessRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private final UnaryCallable + listPublicOperatorsCallable; + private final UnaryCallable + listPublicOperatorsPagedCallable; + private final UnaryCallable + resolveOperatorInfoCallable; + private final UnaryCallable listOperatorsCallable; + private final UnaryCallable + listOperatorsPagedCallable; + private final UnaryCallable getOperatorCallable; + private final UnaryCallable createOperatorCallable; + private final OperationCallable + createOperatorOperationCallable; + private final UnaryCallable updateOperatorCallable; + private final OperationCallable + updateOperatorOperationCallable; + private final UnaryCallable deleteOperatorCallable; + private final OperationCallable + deleteOperatorOperationCallable; + private final UnaryCallable listAnalysesCallable; + private final UnaryCallable + listAnalysesPagedCallable; + private final UnaryCallable getAnalysisCallable; + private final UnaryCallable createAnalysisCallable; + private final OperationCallable + createAnalysisOperationCallable; + private final UnaryCallable updateAnalysisCallable; + private final OperationCallable + updateAnalysisOperationCallable; + private final UnaryCallable deleteAnalysisCallable; + private final OperationCallable + deleteAnalysisOperationCallable; + private final UnaryCallable listProcessesCallable; + private final UnaryCallable + listProcessesPagedCallable; + private final UnaryCallable getProcessCallable; + private final UnaryCallable createProcessCallable; + private final OperationCallable + createProcessOperationCallable; + private final UnaryCallable updateProcessCallable; + private final OperationCallable + updateProcessOperationCallable; + private final UnaryCallable deleteProcessCallable; + private final OperationCallable + deleteProcessOperationCallable; + private final UnaryCallable batchRunProcessCallable; + private final OperationCallable< + BatchRunProcessRequest, BatchRunProcessResponse, OperationMetadata> + batchRunProcessOperationCallable; + + private final BackgroundResource backgroundResources; + private final HttpJsonOperationsStub httpJsonOperationsStub; + private final HttpJsonStubCallableFactory callableFactory; + + public static final HttpJsonLiveVideoAnalyticsStub create(LiveVideoAnalyticsStubSettings settings) + throws IOException { + return new HttpJsonLiveVideoAnalyticsStub(settings, ClientContext.create(settings)); + } + + public static final HttpJsonLiveVideoAnalyticsStub create(ClientContext clientContext) + throws IOException { + return new HttpJsonLiveVideoAnalyticsStub( + LiveVideoAnalyticsStubSettings.newHttpJsonBuilder().build(), clientContext); + } + + public static final HttpJsonLiveVideoAnalyticsStub create( + ClientContext clientContext, HttpJsonStubCallableFactory callableFactory) throws IOException { + return new HttpJsonLiveVideoAnalyticsStub( + LiveVideoAnalyticsStubSettings.newHttpJsonBuilder().build(), + clientContext, + callableFactory); + } + + /** + * Constructs an instance of HttpJsonLiveVideoAnalyticsStub, 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 HttpJsonLiveVideoAnalyticsStub( + LiveVideoAnalyticsStubSettings settings, ClientContext clientContext) throws IOException { + this(settings, clientContext, new HttpJsonLiveVideoAnalyticsCallableFactory()); + } + + /** + * Constructs an instance of HttpJsonLiveVideoAnalyticsStub, 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 HttpJsonLiveVideoAnalyticsStub( + LiveVideoAnalyticsStubSettings settings, + ClientContext clientContext, + HttpJsonStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + this.httpJsonOperationsStub = + HttpJsonOperationsStub.create( + clientContext, + callableFactory, + typeRegistry, + ImmutableMap.builder() + .put( + "google.longrunning.Operations.CancelOperation", + HttpRule.newBuilder() + .setPost("/v1/{name=projects/*/locations/*/operations/*}:cancel") + .build()) + .put( + "google.longrunning.Operations.DeleteOperation", + HttpRule.newBuilder() + .setDelete("/v1/{name=projects/*/locations/*/operations/*}") + .build()) + .put( + "google.longrunning.Operations.GetOperation", + HttpRule.newBuilder() + .setGet("/v1/{name=projects/*/locations/*/operations/*}") + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet("/v1/{name=projects/*/locations/*/warehouseOperations/*}") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet( + "/v1/{name=projects/*/locations/*/corpora/*/assets/*/operations/*}") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet( + "/v1/{name=projects/*/locations/*/corpora/*/collections/*/operations/*}") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet( + "/v1/{name=projects/*/locations/*/corpora/*/imageIndexes/*/operations/*}") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet( + "/v1/{name=projects/*/locations/*/corpora/*/indexes/*/operations/*}") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet("/v1/{name=projects/*/locations/*/corpora/*/operations/*}") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet( + "/v1/{name=projects/*/locations/*/indexEndpoints/*/operations/*}") + .build()) + .build()) + .put( + "google.longrunning.Operations.ListOperations", + HttpRule.newBuilder() + .setGet("/v1/{name=projects/*/locations/*}/operations") + .build()) + .build()); + + HttpJsonCallSettings + listPublicOperatorsTransportSettings = + HttpJsonCallSettings + .newBuilder() + .setMethodDescriptor(listPublicOperatorsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings + resolveOperatorInfoTransportSettings = + HttpJsonCallSettings + .newBuilder() + .setMethodDescriptor(resolveOperatorInfoMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings + listOperatorsTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(listOperatorsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings getOperatorTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getOperatorMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings createOperatorTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(createOperatorMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings updateOperatorTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(updateOperatorMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("operator.name", String.valueOf(request.getOperator().getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings deleteOperatorTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(deleteOperatorMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings listAnalysesTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(listAnalysesMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings getAnalysisTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getAnalysisMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings createAnalysisTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(createAnalysisMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings updateAnalysisTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(updateAnalysisMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("analysis.name", String.valueOf(request.getAnalysis().getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings deleteAnalysisTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(deleteAnalysisMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings + listProcessesTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(listProcessesMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings getProcessTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getProcessMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings createProcessTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(createProcessMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings updateProcessTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(updateProcessMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("process.name", String.valueOf(request.getProcess().getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings deleteProcessTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(deleteProcessMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings batchRunProcessTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(batchRunProcessMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + + this.listPublicOperatorsCallable = + callableFactory.createUnaryCallable( + listPublicOperatorsTransportSettings, + settings.listPublicOperatorsSettings(), + clientContext); + this.listPublicOperatorsPagedCallable = + callableFactory.createPagedCallable( + listPublicOperatorsTransportSettings, + settings.listPublicOperatorsSettings(), + clientContext); + this.resolveOperatorInfoCallable = + callableFactory.createUnaryCallable( + resolveOperatorInfoTransportSettings, + settings.resolveOperatorInfoSettings(), + clientContext); + this.listOperatorsCallable = + callableFactory.createUnaryCallable( + listOperatorsTransportSettings, settings.listOperatorsSettings(), clientContext); + this.listOperatorsPagedCallable = + callableFactory.createPagedCallable( + listOperatorsTransportSettings, settings.listOperatorsSettings(), clientContext); + this.getOperatorCallable = + callableFactory.createUnaryCallable( + getOperatorTransportSettings, settings.getOperatorSettings(), clientContext); + this.createOperatorCallable = + callableFactory.createUnaryCallable( + createOperatorTransportSettings, settings.createOperatorSettings(), clientContext); + this.createOperatorOperationCallable = + callableFactory.createOperationCallable( + createOperatorTransportSettings, + settings.createOperatorOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.updateOperatorCallable = + callableFactory.createUnaryCallable( + updateOperatorTransportSettings, settings.updateOperatorSettings(), clientContext); + this.updateOperatorOperationCallable = + callableFactory.createOperationCallable( + updateOperatorTransportSettings, + settings.updateOperatorOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.deleteOperatorCallable = + callableFactory.createUnaryCallable( + deleteOperatorTransportSettings, settings.deleteOperatorSettings(), clientContext); + this.deleteOperatorOperationCallable = + callableFactory.createOperationCallable( + deleteOperatorTransportSettings, + settings.deleteOperatorOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.listAnalysesCallable = + callableFactory.createUnaryCallable( + listAnalysesTransportSettings, settings.listAnalysesSettings(), clientContext); + this.listAnalysesPagedCallable = + callableFactory.createPagedCallable( + listAnalysesTransportSettings, settings.listAnalysesSettings(), clientContext); + this.getAnalysisCallable = + callableFactory.createUnaryCallable( + getAnalysisTransportSettings, settings.getAnalysisSettings(), clientContext); + this.createAnalysisCallable = + callableFactory.createUnaryCallable( + createAnalysisTransportSettings, settings.createAnalysisSettings(), clientContext); + this.createAnalysisOperationCallable = + callableFactory.createOperationCallable( + createAnalysisTransportSettings, + settings.createAnalysisOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.updateAnalysisCallable = + callableFactory.createUnaryCallable( + updateAnalysisTransportSettings, settings.updateAnalysisSettings(), clientContext); + this.updateAnalysisOperationCallable = + callableFactory.createOperationCallable( + updateAnalysisTransportSettings, + settings.updateAnalysisOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.deleteAnalysisCallable = + callableFactory.createUnaryCallable( + deleteAnalysisTransportSettings, settings.deleteAnalysisSettings(), clientContext); + this.deleteAnalysisOperationCallable = + callableFactory.createOperationCallable( + deleteAnalysisTransportSettings, + settings.deleteAnalysisOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.listProcessesCallable = + callableFactory.createUnaryCallable( + listProcessesTransportSettings, settings.listProcessesSettings(), clientContext); + this.listProcessesPagedCallable = + callableFactory.createPagedCallable( + listProcessesTransportSettings, settings.listProcessesSettings(), clientContext); + this.getProcessCallable = + callableFactory.createUnaryCallable( + getProcessTransportSettings, settings.getProcessSettings(), clientContext); + this.createProcessCallable = + callableFactory.createUnaryCallable( + createProcessTransportSettings, settings.createProcessSettings(), clientContext); + this.createProcessOperationCallable = + callableFactory.createOperationCallable( + createProcessTransportSettings, + settings.createProcessOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.updateProcessCallable = + callableFactory.createUnaryCallable( + updateProcessTransportSettings, settings.updateProcessSettings(), clientContext); + this.updateProcessOperationCallable = + callableFactory.createOperationCallable( + updateProcessTransportSettings, + settings.updateProcessOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.deleteProcessCallable = + callableFactory.createUnaryCallable( + deleteProcessTransportSettings, settings.deleteProcessSettings(), clientContext); + this.deleteProcessOperationCallable = + callableFactory.createOperationCallable( + deleteProcessTransportSettings, + settings.deleteProcessOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.batchRunProcessCallable = + callableFactory.createUnaryCallable( + batchRunProcessTransportSettings, settings.batchRunProcessSettings(), clientContext); + this.batchRunProcessOperationCallable = + callableFactory.createOperationCallable( + batchRunProcessTransportSettings, + settings.batchRunProcessOperationSettings(), + clientContext, + httpJsonOperationsStub); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + @InternalApi + public static List getMethodDescriptors() { + List methodDescriptors = new ArrayList<>(); + methodDescriptors.add(listPublicOperatorsMethodDescriptor); + methodDescriptors.add(resolveOperatorInfoMethodDescriptor); + methodDescriptors.add(listOperatorsMethodDescriptor); + methodDescriptors.add(getOperatorMethodDescriptor); + methodDescriptors.add(createOperatorMethodDescriptor); + methodDescriptors.add(updateOperatorMethodDescriptor); + methodDescriptors.add(deleteOperatorMethodDescriptor); + methodDescriptors.add(listAnalysesMethodDescriptor); + methodDescriptors.add(getAnalysisMethodDescriptor); + methodDescriptors.add(createAnalysisMethodDescriptor); + methodDescriptors.add(updateAnalysisMethodDescriptor); + methodDescriptors.add(deleteAnalysisMethodDescriptor); + methodDescriptors.add(listProcessesMethodDescriptor); + methodDescriptors.add(getProcessMethodDescriptor); + methodDescriptors.add(createProcessMethodDescriptor); + methodDescriptors.add(updateProcessMethodDescriptor); + methodDescriptors.add(deleteProcessMethodDescriptor); + methodDescriptors.add(batchRunProcessMethodDescriptor); + return methodDescriptors; + } + + public HttpJsonOperationsStub getHttpJsonOperationsStub() { + return httpJsonOperationsStub; + } + + @Override + public UnaryCallable + listPublicOperatorsCallable() { + return listPublicOperatorsCallable; + } + + @Override + public UnaryCallable + listPublicOperatorsPagedCallable() { + return listPublicOperatorsPagedCallable; + } + + @Override + public UnaryCallable + resolveOperatorInfoCallable() { + return resolveOperatorInfoCallable; + } + + @Override + public UnaryCallable listOperatorsCallable() { + return listOperatorsCallable; + } + + @Override + public UnaryCallable + listOperatorsPagedCallable() { + return listOperatorsPagedCallable; + } + + @Override + public UnaryCallable getOperatorCallable() { + return getOperatorCallable; + } + + @Override + public UnaryCallable createOperatorCallable() { + return createOperatorCallable; + } + + @Override + public OperationCallable + createOperatorOperationCallable() { + return createOperatorOperationCallable; + } + + @Override + public UnaryCallable updateOperatorCallable() { + return updateOperatorCallable; + } + + @Override + public OperationCallable + updateOperatorOperationCallable() { + return updateOperatorOperationCallable; + } + + @Override + public UnaryCallable deleteOperatorCallable() { + return deleteOperatorCallable; + } + + @Override + public OperationCallable + deleteOperatorOperationCallable() { + return deleteOperatorOperationCallable; + } + + @Override + public UnaryCallable listAnalysesCallable() { + return listAnalysesCallable; + } + + @Override + public UnaryCallable listAnalysesPagedCallable() { + return listAnalysesPagedCallable; + } + + @Override + public UnaryCallable getAnalysisCallable() { + return getAnalysisCallable; + } + + @Override + public UnaryCallable createAnalysisCallable() { + return createAnalysisCallable; + } + + @Override + public OperationCallable + createAnalysisOperationCallable() { + return createAnalysisOperationCallable; + } + + @Override + public UnaryCallable updateAnalysisCallable() { + return updateAnalysisCallable; + } + + @Override + public OperationCallable + updateAnalysisOperationCallable() { + return updateAnalysisOperationCallable; + } + + @Override + public UnaryCallable deleteAnalysisCallable() { + return deleteAnalysisCallable; + } + + @Override + public OperationCallable + deleteAnalysisOperationCallable() { + return deleteAnalysisOperationCallable; + } + + @Override + public UnaryCallable listProcessesCallable() { + return listProcessesCallable; + } + + @Override + public UnaryCallable + listProcessesPagedCallable() { + return listProcessesPagedCallable; + } + + @Override + public UnaryCallable getProcessCallable() { + return getProcessCallable; + } + + @Override + public UnaryCallable createProcessCallable() { + return createProcessCallable; + } + + @Override + public OperationCallable + createProcessOperationCallable() { + return createProcessOperationCallable; + } + + @Override + public UnaryCallable updateProcessCallable() { + return updateProcessCallable; + } + + @Override + public OperationCallable + updateProcessOperationCallable() { + return updateProcessOperationCallable; + } + + @Override + public UnaryCallable deleteProcessCallable() { + return deleteProcessCallable; + } + + @Override + public OperationCallable + deleteProcessOperationCallable() { + return deleteProcessOperationCallable; + } + + @Override + public UnaryCallable batchRunProcessCallable() { + return batchRunProcessCallable; + } + + @Override + public OperationCallable + batchRunProcessOperationCallable() { + return batchRunProcessOperationCallable; + } + + @Override + public final void close() { + try { + backgroundResources.close(); + } catch (RuntimeException e) { + throw e; + } catch (Exception e) { + throw new IllegalStateException("Failed to close resource", e); + } + } + + @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/java-visionai/google-cloud-visionai/src/main/java/com/google/cloud/visionai/v1/stub/HttpJsonStreamingServiceCallableFactory.java b/java-visionai/google-cloud-visionai/src/main/java/com/google/cloud/visionai/v1/stub/HttpJsonStreamingServiceCallableFactory.java new file mode 100644 index 000000000000..6159ae49834c --- /dev/null +++ b/java-visionai/google-cloud-visionai/src/main/java/com/google/cloud/visionai/v1/stub/HttpJsonStreamingServiceCallableFactory.java @@ -0,0 +1,101 @@ +/* + * Copyright 2024 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.visionai.v1.stub; + +import com.google.api.gax.httpjson.HttpJsonCallSettings; +import com.google.api.gax.httpjson.HttpJsonCallableFactory; +import com.google.api.gax.httpjson.HttpJsonOperationSnapshotCallable; +import com.google.api.gax.httpjson.HttpJsonStubCallableFactory; +import com.google.api.gax.httpjson.longrunning.stub.OperationsStub; +import com.google.api.gax.rpc.BatchingCallSettings; +import com.google.api.gax.rpc.ClientContext; +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.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.longrunning.Operation; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * REST callable factory implementation for the StreamingService service API. + * + *

This class is for advanced usage. + */ +@Generated("by gapic-generator-java") +public class HttpJsonStreamingServiceCallableFactory + implements HttpJsonStubCallableFactory { + + @Override + public UnaryCallable createUnaryCallable( + HttpJsonCallSettings httpJsonCallSettings, + UnaryCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createUnaryCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @Override + public + UnaryCallable createPagedCallable( + HttpJsonCallSettings httpJsonCallSettings, + PagedCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createPagedCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @Override + public UnaryCallable createBatchingCallable( + HttpJsonCallSettings httpJsonCallSettings, + BatchingCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createBatchingCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @Override + public + OperationCallable createOperationCallable( + HttpJsonCallSettings httpJsonCallSettings, + OperationCallSettings callSettings, + ClientContext clientContext, + OperationsStub operationsStub) { + UnaryCallable innerCallable = + HttpJsonCallableFactory.createBaseUnaryCallable( + httpJsonCallSettings, callSettings.getInitialCallSettings(), clientContext); + HttpJsonOperationSnapshotCallable initialCallable = + new HttpJsonOperationSnapshotCallable( + innerCallable, + httpJsonCallSettings.getMethodDescriptor().getOperationSnapshotFactory()); + return HttpJsonCallableFactory.createOperationCallable( + callSettings, clientContext, operationsStub.longRunningClient(), initialCallable); + } + + @Override + public + ServerStreamingCallable createServerStreamingCallable( + HttpJsonCallSettings httpJsonCallSettings, + ServerStreamingCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createServerStreamingCallable( + httpJsonCallSettings, callSettings, clientContext); + } +} diff --git a/java-visionai/google-cloud-visionai/src/main/java/com/google/cloud/visionai/v1/stub/HttpJsonStreamingServiceStub.java b/java-visionai/google-cloud-visionai/src/main/java/com/google/cloud/visionai/v1/stub/HttpJsonStreamingServiceStub.java new file mode 100644 index 000000000000..92ea45ab9cc9 --- /dev/null +++ b/java-visionai/google-cloud-visionai/src/main/java/com/google/cloud/visionai/v1/stub/HttpJsonStreamingServiceStub.java @@ -0,0 +1,345 @@ +/* + * Copyright 2024 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.visionai.v1.stub; + +import com.google.api.core.InternalApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.core.BackgroundResourceAggregation; +import com.google.api.gax.httpjson.ApiMethodDescriptor; +import com.google.api.gax.httpjson.HttpJsonCallSettings; +import com.google.api.gax.httpjson.HttpJsonStubCallableFactory; +import com.google.api.gax.httpjson.ProtoMessageRequestFormatter; +import com.google.api.gax.httpjson.ProtoMessageResponseParser; +import com.google.api.gax.httpjson.ProtoRestSerializer; +import com.google.api.gax.rpc.BidiStreamingCallable; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.RequestParamsBuilder; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.visionai.v1.AcquireLeaseRequest; +import com.google.cloud.visionai.v1.Lease; +import com.google.cloud.visionai.v1.ReceiveEventsRequest; +import com.google.cloud.visionai.v1.ReceiveEventsResponse; +import com.google.cloud.visionai.v1.ReceivePacketsRequest; +import com.google.cloud.visionai.v1.ReceivePacketsResponse; +import com.google.cloud.visionai.v1.ReleaseLeaseRequest; +import com.google.cloud.visionai.v1.ReleaseLeaseResponse; +import com.google.cloud.visionai.v1.RenewLeaseRequest; +import com.google.cloud.visionai.v1.SendPacketsRequest; +import com.google.cloud.visionai.v1.SendPacketsResponse; +import com.google.protobuf.TypeRegistry; +import java.io.IOException; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * REST stub implementation for the StreamingService service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") +public class HttpJsonStreamingServiceStub extends StreamingServiceStub { + private static final TypeRegistry typeRegistry = TypeRegistry.newBuilder().build(); + + private static final ApiMethodDescriptor + acquireLeaseMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.visionai.v1.StreamingService/AcquireLease") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{series=projects/*/locations/*/clusters/*/series/*}:acquireLease", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "series", request.getSeries()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().clearSeries().build(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Lease.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor renewLeaseMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.visionai.v1.StreamingService/RenewLease") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{series=projects/*/locations/*/clusters/*/series/*}:renewLease", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "series", request.getSeries()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().clearSeries().build(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Lease.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + releaseLeaseMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.visionai.v1.StreamingService/ReleaseLease") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{series=projects/*/locations/*/clusters/*/series/*}:releaseLease", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "series", request.getSeries()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().clearSeries().build(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ReleaseLeaseResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private final UnaryCallable acquireLeaseCallable; + private final UnaryCallable renewLeaseCallable; + private final UnaryCallable releaseLeaseCallable; + + private final BackgroundResource backgroundResources; + private final HttpJsonStubCallableFactory callableFactory; + + public static final HttpJsonStreamingServiceStub create(StreamingServiceStubSettings settings) + throws IOException { + return new HttpJsonStreamingServiceStub(settings, ClientContext.create(settings)); + } + + public static final HttpJsonStreamingServiceStub create(ClientContext clientContext) + throws IOException { + return new HttpJsonStreamingServiceStub( + StreamingServiceStubSettings.newHttpJsonBuilder().build(), clientContext); + } + + public static final HttpJsonStreamingServiceStub create( + ClientContext clientContext, HttpJsonStubCallableFactory callableFactory) throws IOException { + return new HttpJsonStreamingServiceStub( + StreamingServiceStubSettings.newHttpJsonBuilder().build(), clientContext, callableFactory); + } + + /** + * Constructs an instance of HttpJsonStreamingServiceStub, 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 HttpJsonStreamingServiceStub( + StreamingServiceStubSettings settings, ClientContext clientContext) throws IOException { + this(settings, clientContext, new HttpJsonStreamingServiceCallableFactory()); + } + + /** + * Constructs an instance of HttpJsonStreamingServiceStub, 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 HttpJsonStreamingServiceStub( + StreamingServiceStubSettings settings, + ClientContext clientContext, + HttpJsonStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + + HttpJsonCallSettings acquireLeaseTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(acquireLeaseMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("series", String.valueOf(request.getSeries())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings renewLeaseTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(renewLeaseMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("series", String.valueOf(request.getSeries())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings releaseLeaseTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(releaseLeaseMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("series", String.valueOf(request.getSeries())); + return builder.build(); + }) + .build(); + + this.acquireLeaseCallable = + callableFactory.createUnaryCallable( + acquireLeaseTransportSettings, settings.acquireLeaseSettings(), clientContext); + this.renewLeaseCallable = + callableFactory.createUnaryCallable( + renewLeaseTransportSettings, settings.renewLeaseSettings(), clientContext); + this.releaseLeaseCallable = + callableFactory.createUnaryCallable( + releaseLeaseTransportSettings, settings.releaseLeaseSettings(), clientContext); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + @InternalApi + public static List getMethodDescriptors() { + List methodDescriptors = new ArrayList<>(); + methodDescriptors.add(acquireLeaseMethodDescriptor); + methodDescriptors.add(renewLeaseMethodDescriptor); + methodDescriptors.add(releaseLeaseMethodDescriptor); + return methodDescriptors; + } + + @Override + public UnaryCallable acquireLeaseCallable() { + return acquireLeaseCallable; + } + + @Override + public UnaryCallable renewLeaseCallable() { + return renewLeaseCallable; + } + + @Override + public UnaryCallable releaseLeaseCallable() { + return releaseLeaseCallable; + } + + @Override + public BidiStreamingCallable sendPacketsCallable() { + throw new UnsupportedOperationException( + "Not implemented: sendPacketsCallable(). REST transport is not implemented for this method yet."); + } + + @Override + public BidiStreamingCallable + receivePacketsCallable() { + throw new UnsupportedOperationException( + "Not implemented: receivePacketsCallable(). REST transport is not implemented for this method yet."); + } + + @Override + public BidiStreamingCallable + receiveEventsCallable() { + throw new UnsupportedOperationException( + "Not implemented: receiveEventsCallable(). REST transport is not implemented for this method yet."); + } + + @Override + public final void close() { + try { + backgroundResources.close(); + } catch (RuntimeException e) { + throw e; + } catch (Exception e) { + throw new IllegalStateException("Failed to close resource", e); + } + } + + @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/java-visionai/google-cloud-visionai/src/main/java/com/google/cloud/visionai/v1/stub/HttpJsonStreamsServiceCallableFactory.java b/java-visionai/google-cloud-visionai/src/main/java/com/google/cloud/visionai/v1/stub/HttpJsonStreamsServiceCallableFactory.java new file mode 100644 index 000000000000..c41ff50071b0 --- /dev/null +++ b/java-visionai/google-cloud-visionai/src/main/java/com/google/cloud/visionai/v1/stub/HttpJsonStreamsServiceCallableFactory.java @@ -0,0 +1,101 @@ +/* + * Copyright 2024 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.visionai.v1.stub; + +import com.google.api.gax.httpjson.HttpJsonCallSettings; +import com.google.api.gax.httpjson.HttpJsonCallableFactory; +import com.google.api.gax.httpjson.HttpJsonOperationSnapshotCallable; +import com.google.api.gax.httpjson.HttpJsonStubCallableFactory; +import com.google.api.gax.httpjson.longrunning.stub.OperationsStub; +import com.google.api.gax.rpc.BatchingCallSettings; +import com.google.api.gax.rpc.ClientContext; +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.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.longrunning.Operation; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * REST callable factory implementation for the StreamsService service API. + * + *

This class is for advanced usage. + */ +@Generated("by gapic-generator-java") +public class HttpJsonStreamsServiceCallableFactory + implements HttpJsonStubCallableFactory { + + @Override + public UnaryCallable createUnaryCallable( + HttpJsonCallSettings httpJsonCallSettings, + UnaryCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createUnaryCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @Override + public + UnaryCallable createPagedCallable( + HttpJsonCallSettings httpJsonCallSettings, + PagedCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createPagedCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @Override + public UnaryCallable createBatchingCallable( + HttpJsonCallSettings httpJsonCallSettings, + BatchingCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createBatchingCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @Override + public + OperationCallable createOperationCallable( + HttpJsonCallSettings httpJsonCallSettings, + OperationCallSettings callSettings, + ClientContext clientContext, + OperationsStub operationsStub) { + UnaryCallable innerCallable = + HttpJsonCallableFactory.createBaseUnaryCallable( + httpJsonCallSettings, callSettings.getInitialCallSettings(), clientContext); + HttpJsonOperationSnapshotCallable initialCallable = + new HttpJsonOperationSnapshotCallable( + innerCallable, + httpJsonCallSettings.getMethodDescriptor().getOperationSnapshotFactory()); + return HttpJsonCallableFactory.createOperationCallable( + callSettings, clientContext, operationsStub.longRunningClient(), initialCallable); + } + + @Override + public + ServerStreamingCallable createServerStreamingCallable( + HttpJsonCallSettings httpJsonCallSettings, + ServerStreamingCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createServerStreamingCallable( + httpJsonCallSettings, callSettings, clientContext); + } +} diff --git a/java-visionai/google-cloud-visionai/src/main/java/com/google/cloud/visionai/v1/stub/HttpJsonStreamsServiceStub.java b/java-visionai/google-cloud-visionai/src/main/java/com/google/cloud/visionai/v1/stub/HttpJsonStreamsServiceStub.java new file mode 100644 index 000000000000..c7eeb6a200fd --- /dev/null +++ b/java-visionai/google-cloud-visionai/src/main/java/com/google/cloud/visionai/v1/stub/HttpJsonStreamsServiceStub.java @@ -0,0 +1,1887 @@ +/* + * Copyright 2024 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.visionai.v1.stub; + +import static com.google.cloud.visionai.v1.StreamsServiceClient.ListClustersPagedResponse; +import static com.google.cloud.visionai.v1.StreamsServiceClient.ListEventsPagedResponse; +import static com.google.cloud.visionai.v1.StreamsServiceClient.ListSeriesPagedResponse; +import static com.google.cloud.visionai.v1.StreamsServiceClient.ListStreamsPagedResponse; + +import com.google.api.HttpRule; +import com.google.api.core.InternalApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.core.BackgroundResourceAggregation; +import com.google.api.gax.httpjson.ApiMethodDescriptor; +import com.google.api.gax.httpjson.HttpJsonCallSettings; +import com.google.api.gax.httpjson.HttpJsonOperationSnapshot; +import com.google.api.gax.httpjson.HttpJsonStubCallableFactory; +import com.google.api.gax.httpjson.ProtoMessageRequestFormatter; +import com.google.api.gax.httpjson.ProtoMessageResponseParser; +import com.google.api.gax.httpjson.ProtoRestSerializer; +import com.google.api.gax.httpjson.longrunning.stub.HttpJsonOperationsStub; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.RequestParamsBuilder; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.visionai.v1.Channel; +import com.google.cloud.visionai.v1.Cluster; +import com.google.cloud.visionai.v1.CreateClusterRequest; +import com.google.cloud.visionai.v1.CreateEventRequest; +import com.google.cloud.visionai.v1.CreateSeriesRequest; +import com.google.cloud.visionai.v1.CreateStreamRequest; +import com.google.cloud.visionai.v1.DeleteClusterRequest; +import com.google.cloud.visionai.v1.DeleteEventRequest; +import com.google.cloud.visionai.v1.DeleteSeriesRequest; +import com.google.cloud.visionai.v1.DeleteStreamRequest; +import com.google.cloud.visionai.v1.Event; +import com.google.cloud.visionai.v1.GenerateStreamHlsTokenRequest; +import com.google.cloud.visionai.v1.GenerateStreamHlsTokenResponse; +import com.google.cloud.visionai.v1.GetClusterRequest; +import com.google.cloud.visionai.v1.GetEventRequest; +import com.google.cloud.visionai.v1.GetSeriesRequest; +import com.google.cloud.visionai.v1.GetStreamRequest; +import com.google.cloud.visionai.v1.GetStreamThumbnailRequest; +import com.google.cloud.visionai.v1.GetStreamThumbnailResponse; +import com.google.cloud.visionai.v1.ListClustersRequest; +import com.google.cloud.visionai.v1.ListClustersResponse; +import com.google.cloud.visionai.v1.ListEventsRequest; +import com.google.cloud.visionai.v1.ListEventsResponse; +import com.google.cloud.visionai.v1.ListSeriesRequest; +import com.google.cloud.visionai.v1.ListSeriesResponse; +import com.google.cloud.visionai.v1.ListStreamsRequest; +import com.google.cloud.visionai.v1.ListStreamsResponse; +import com.google.cloud.visionai.v1.MaterializeChannelRequest; +import com.google.cloud.visionai.v1.OperationMetadata; +import com.google.cloud.visionai.v1.Series; +import com.google.cloud.visionai.v1.Stream; +import com.google.cloud.visionai.v1.UpdateClusterRequest; +import com.google.cloud.visionai.v1.UpdateEventRequest; +import com.google.cloud.visionai.v1.UpdateSeriesRequest; +import com.google.cloud.visionai.v1.UpdateStreamRequest; +import com.google.common.collect.ImmutableMap; +import com.google.longrunning.Operation; +import com.google.protobuf.Empty; +import com.google.protobuf.TypeRegistry; +import java.io.IOException; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * REST stub implementation for the StreamsService service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") +public class HttpJsonStreamsServiceStub extends StreamsServiceStub { + private static final TypeRegistry typeRegistry = + TypeRegistry.newBuilder() + .add(Stream.getDescriptor()) + .add(Empty.getDescriptor()) + .add(Channel.getDescriptor()) + .add(OperationMetadata.getDescriptor()) + .add(Cluster.getDescriptor()) + .add(GetStreamThumbnailResponse.getDescriptor()) + .add(Series.getDescriptor()) + .add(Event.getDescriptor()) + .build(); + + private static final ApiMethodDescriptor + listClustersMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.visionai.v1.StreamsService/ListClusters") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{parent=projects/*/locations/*}/clusters", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "filter", request.getFilter()); + serializer.putQueryParam(fields, "orderBy", request.getOrderBy()); + serializer.putQueryParam(fields, "pageSize", request.getPageSize()); + serializer.putQueryParam(fields, "pageToken", request.getPageToken()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ListClustersResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor getClusterMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.visionai.v1.StreamsService/GetCluster") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/clusters/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Cluster.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + createClusterMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.visionai.v1.StreamsService/CreateCluster") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{parent=projects/*/locations/*}/clusters", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "clusterId", request.getClusterId()); + serializer.putQueryParam(fields, "requestId", request.getRequestId()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("cluster", request.getCluster(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (CreateClusterRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + updateClusterMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.visionai.v1.StreamsService/UpdateCluster") + .setHttpMethod("PATCH") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{cluster.name=projects/*/locations/*/clusters/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam( + fields, "cluster.name", request.getCluster().getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "requestId", request.getRequestId()); + serializer.putQueryParam(fields, "updateMask", request.getUpdateMask()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("cluster", request.getCluster(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (UpdateClusterRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + deleteClusterMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.visionai.v1.StreamsService/DeleteCluster") + .setHttpMethod("DELETE") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/clusters/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "requestId", request.getRequestId()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (DeleteClusterRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + listStreamsMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.visionai.v1.StreamsService/ListStreams") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{parent=projects/*/locations/*/clusters/*}/streams", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "filter", request.getFilter()); + serializer.putQueryParam(fields, "orderBy", request.getOrderBy()); + serializer.putQueryParam(fields, "pageSize", request.getPageSize()); + serializer.putQueryParam(fields, "pageToken", request.getPageToken()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ListStreamsResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor getStreamMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.visionai.v1.StreamsService/GetStream") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/clusters/*/streams/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Stream.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + createStreamMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.visionai.v1.StreamsService/CreateStream") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{parent=projects/*/locations/*/clusters/*}/streams", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "requestId", request.getRequestId()); + serializer.putQueryParam(fields, "streamId", request.getStreamId()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("stream", request.getStream(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (CreateStreamRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + updateStreamMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.visionai.v1.StreamsService/UpdateStream") + .setHttpMethod("PATCH") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{stream.name=projects/*/locations/*/clusters/*/streams/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam( + fields, "stream.name", request.getStream().getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "requestId", request.getRequestId()); + serializer.putQueryParam(fields, "updateMask", request.getUpdateMask()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("stream", request.getStream(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (UpdateStreamRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + deleteStreamMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.visionai.v1.StreamsService/DeleteStream") + .setHttpMethod("DELETE") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/clusters/*/streams/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "requestId", request.getRequestId()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (DeleteStreamRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + getStreamThumbnailMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.visionai.v1.StreamsService/GetStreamThumbnail") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{stream=projects/*/locations/*/clusters/*/streams/*}:getThumbnail", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "stream", request.getStream()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().clearStream().build(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (GetStreamThumbnailRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor< + GenerateStreamHlsTokenRequest, GenerateStreamHlsTokenResponse> + generateStreamHlsTokenMethodDescriptor = + ApiMethodDescriptor + .newBuilder() + .setFullMethodName("google.cloud.visionai.v1.StreamsService/GenerateStreamHlsToken") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{stream=projects/*/locations/*/clusters/*/streams/*}:generateStreamHlsToken", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "stream", request.getStream()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().clearStream().build(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(GenerateStreamHlsTokenResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + listEventsMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.visionai.v1.StreamsService/ListEvents") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{parent=projects/*/locations/*/clusters/*}/events", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "filter", request.getFilter()); + serializer.putQueryParam(fields, "orderBy", request.getOrderBy()); + serializer.putQueryParam(fields, "pageSize", request.getPageSize()); + serializer.putQueryParam(fields, "pageToken", request.getPageToken()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ListEventsResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor getEventMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.visionai.v1.StreamsService/GetEvent") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/clusters/*/events/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Event.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + createEventMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.visionai.v1.StreamsService/CreateEvent") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{parent=projects/*/locations/*/clusters/*}/events", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "eventId", request.getEventId()); + serializer.putQueryParam(fields, "requestId", request.getRequestId()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("event", request.getEvent(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (CreateEventRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + updateEventMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.visionai.v1.StreamsService/UpdateEvent") + .setHttpMethod("PATCH") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{event.name=projects/*/locations/*/clusters/*/events/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam( + fields, "event.name", request.getEvent().getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "requestId", request.getRequestId()); + serializer.putQueryParam(fields, "updateMask", request.getUpdateMask()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("event", request.getEvent(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (UpdateEventRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + deleteEventMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.visionai.v1.StreamsService/DeleteEvent") + .setHttpMethod("DELETE") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/clusters/*/events/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "requestId", request.getRequestId()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (DeleteEventRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + listSeriesMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.visionai.v1.StreamsService/ListSeries") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{parent=projects/*/locations/*/clusters/*}/series", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "filter", request.getFilter()); + serializer.putQueryParam(fields, "orderBy", request.getOrderBy()); + serializer.putQueryParam(fields, "pageSize", request.getPageSize()); + serializer.putQueryParam(fields, "pageToken", request.getPageToken()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ListSeriesResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor getSeriesMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.visionai.v1.StreamsService/GetSeries") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/clusters/*/series/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Series.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + createSeriesMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.visionai.v1.StreamsService/CreateSeries") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{parent=projects/*/locations/*/clusters/*}/series", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "requestId", request.getRequestId()); + serializer.putQueryParam(fields, "seriesId", request.getSeriesId()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("series", request.getSeries(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (CreateSeriesRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + updateSeriesMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.visionai.v1.StreamsService/UpdateSeries") + .setHttpMethod("PATCH") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{series.name=projects/*/locations/*/clusters/*/series/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam( + fields, "series.name", request.getSeries().getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "requestId", request.getRequestId()); + serializer.putQueryParam(fields, "updateMask", request.getUpdateMask()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("series", request.getSeries(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (UpdateSeriesRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + deleteSeriesMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.visionai.v1.StreamsService/DeleteSeries") + .setHttpMethod("DELETE") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/clusters/*/series/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "requestId", request.getRequestId()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (DeleteSeriesRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + materializeChannelMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.visionai.v1.StreamsService/MaterializeChannel") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{parent=projects/*/locations/*/clusters/*}/channels", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "channelId", request.getChannelId()); + serializer.putQueryParam(fields, "requestId", request.getRequestId()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("channel", request.getChannel(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (MaterializeChannelRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private final UnaryCallable listClustersCallable; + private final UnaryCallable + listClustersPagedCallable; + private final UnaryCallable getClusterCallable; + private final UnaryCallable createClusterCallable; + private final OperationCallable + createClusterOperationCallable; + private final UnaryCallable updateClusterCallable; + private final OperationCallable + updateClusterOperationCallable; + private final UnaryCallable deleteClusterCallable; + private final OperationCallable + deleteClusterOperationCallable; + private final UnaryCallable listStreamsCallable; + private final UnaryCallable + listStreamsPagedCallable; + private final UnaryCallable getStreamCallable; + private final UnaryCallable createStreamCallable; + private final OperationCallable + createStreamOperationCallable; + private final UnaryCallable updateStreamCallable; + private final OperationCallable + updateStreamOperationCallable; + private final UnaryCallable deleteStreamCallable; + private final OperationCallable + deleteStreamOperationCallable; + private final UnaryCallable getStreamThumbnailCallable; + private final OperationCallable< + GetStreamThumbnailRequest, GetStreamThumbnailResponse, OperationMetadata> + getStreamThumbnailOperationCallable; + private final UnaryCallable + generateStreamHlsTokenCallable; + private final UnaryCallable listEventsCallable; + private final UnaryCallable listEventsPagedCallable; + private final UnaryCallable getEventCallable; + private final UnaryCallable createEventCallable; + private final OperationCallable + createEventOperationCallable; + private final UnaryCallable updateEventCallable; + private final OperationCallable + updateEventOperationCallable; + private final UnaryCallable deleteEventCallable; + private final OperationCallable + deleteEventOperationCallable; + private final UnaryCallable listSeriesCallable; + private final UnaryCallable listSeriesPagedCallable; + private final UnaryCallable getSeriesCallable; + private final UnaryCallable createSeriesCallable; + private final OperationCallable + createSeriesOperationCallable; + private final UnaryCallable updateSeriesCallable; + private final OperationCallable + updateSeriesOperationCallable; + private final UnaryCallable deleteSeriesCallable; + private final OperationCallable + deleteSeriesOperationCallable; + private final UnaryCallable materializeChannelCallable; + private final OperationCallable + materializeChannelOperationCallable; + + private final BackgroundResource backgroundResources; + private final HttpJsonOperationsStub httpJsonOperationsStub; + private final HttpJsonStubCallableFactory callableFactory; + + public static final HttpJsonStreamsServiceStub create(StreamsServiceStubSettings settings) + throws IOException { + return new HttpJsonStreamsServiceStub(settings, ClientContext.create(settings)); + } + + public static final HttpJsonStreamsServiceStub create(ClientContext clientContext) + throws IOException { + return new HttpJsonStreamsServiceStub( + StreamsServiceStubSettings.newHttpJsonBuilder().build(), clientContext); + } + + public static final HttpJsonStreamsServiceStub create( + ClientContext clientContext, HttpJsonStubCallableFactory callableFactory) throws IOException { + return new HttpJsonStreamsServiceStub( + StreamsServiceStubSettings.newHttpJsonBuilder().build(), clientContext, callableFactory); + } + + /** + * Constructs an instance of HttpJsonStreamsServiceStub, 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 HttpJsonStreamsServiceStub( + StreamsServiceStubSettings settings, ClientContext clientContext) throws IOException { + this(settings, clientContext, new HttpJsonStreamsServiceCallableFactory()); + } + + /** + * Constructs an instance of HttpJsonStreamsServiceStub, 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 HttpJsonStreamsServiceStub( + StreamsServiceStubSettings settings, + ClientContext clientContext, + HttpJsonStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + this.httpJsonOperationsStub = + HttpJsonOperationsStub.create( + clientContext, + callableFactory, + typeRegistry, + ImmutableMap.builder() + .put( + "google.longrunning.Operations.CancelOperation", + HttpRule.newBuilder() + .setPost("/v1/{name=projects/*/locations/*/operations/*}:cancel") + .build()) + .put( + "google.longrunning.Operations.DeleteOperation", + HttpRule.newBuilder() + .setDelete("/v1/{name=projects/*/locations/*/operations/*}") + .build()) + .put( + "google.longrunning.Operations.GetOperation", + HttpRule.newBuilder() + .setGet("/v1/{name=projects/*/locations/*/operations/*}") + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet("/v1/{name=projects/*/locations/*/warehouseOperations/*}") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet( + "/v1/{name=projects/*/locations/*/corpora/*/assets/*/operations/*}") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet( + "/v1/{name=projects/*/locations/*/corpora/*/collections/*/operations/*}") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet( + "/v1/{name=projects/*/locations/*/corpora/*/imageIndexes/*/operations/*}") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet( + "/v1/{name=projects/*/locations/*/corpora/*/indexes/*/operations/*}") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet("/v1/{name=projects/*/locations/*/corpora/*/operations/*}") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet( + "/v1/{name=projects/*/locations/*/indexEndpoints/*/operations/*}") + .build()) + .build()) + .put( + "google.longrunning.Operations.ListOperations", + HttpRule.newBuilder() + .setGet("/v1/{name=projects/*/locations/*}/operations") + .build()) + .build()); + + HttpJsonCallSettings listClustersTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(listClustersMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings getClusterTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getClusterMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings createClusterTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(createClusterMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings updateClusterTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(updateClusterMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("cluster.name", String.valueOf(request.getCluster().getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings deleteClusterTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(deleteClusterMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings listStreamsTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(listStreamsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings getStreamTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getStreamMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings createStreamTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(createStreamMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings updateStreamTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(updateStreamMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("stream.name", String.valueOf(request.getStream().getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings deleteStreamTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(deleteStreamMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings getStreamThumbnailTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getStreamThumbnailMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("stream", String.valueOf(request.getStream())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings + generateStreamHlsTokenTransportSettings = + HttpJsonCallSettings + .newBuilder() + .setMethodDescriptor(generateStreamHlsTokenMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("stream", String.valueOf(request.getStream())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings listEventsTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(listEventsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings getEventTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getEventMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings createEventTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(createEventMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings updateEventTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(updateEventMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("event.name", String.valueOf(request.getEvent().getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings deleteEventTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(deleteEventMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings listSeriesTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(listSeriesMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings getSeriesTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getSeriesMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings createSeriesTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(createSeriesMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings updateSeriesTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(updateSeriesMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("series.name", String.valueOf(request.getSeries().getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings deleteSeriesTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(deleteSeriesMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings materializeChannelTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(materializeChannelMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + + this.listClustersCallable = + callableFactory.createUnaryCallable( + listClustersTransportSettings, settings.listClustersSettings(), clientContext); + this.listClustersPagedCallable = + callableFactory.createPagedCallable( + listClustersTransportSettings, settings.listClustersSettings(), clientContext); + this.getClusterCallable = + callableFactory.createUnaryCallable( + getClusterTransportSettings, settings.getClusterSettings(), clientContext); + this.createClusterCallable = + callableFactory.createUnaryCallable( + createClusterTransportSettings, settings.createClusterSettings(), clientContext); + this.createClusterOperationCallable = + callableFactory.createOperationCallable( + createClusterTransportSettings, + settings.createClusterOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.updateClusterCallable = + callableFactory.createUnaryCallable( + updateClusterTransportSettings, settings.updateClusterSettings(), clientContext); + this.updateClusterOperationCallable = + callableFactory.createOperationCallable( + updateClusterTransportSettings, + settings.updateClusterOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.deleteClusterCallable = + callableFactory.createUnaryCallable( + deleteClusterTransportSettings, settings.deleteClusterSettings(), clientContext); + this.deleteClusterOperationCallable = + callableFactory.createOperationCallable( + deleteClusterTransportSettings, + settings.deleteClusterOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.listStreamsCallable = + callableFactory.createUnaryCallable( + listStreamsTransportSettings, settings.listStreamsSettings(), clientContext); + this.listStreamsPagedCallable = + callableFactory.createPagedCallable( + listStreamsTransportSettings, settings.listStreamsSettings(), clientContext); + this.getStreamCallable = + callableFactory.createUnaryCallable( + getStreamTransportSettings, settings.getStreamSettings(), clientContext); + this.createStreamCallable = + callableFactory.createUnaryCallable( + createStreamTransportSettings, settings.createStreamSettings(), clientContext); + this.createStreamOperationCallable = + callableFactory.createOperationCallable( + createStreamTransportSettings, + settings.createStreamOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.updateStreamCallable = + callableFactory.createUnaryCallable( + updateStreamTransportSettings, settings.updateStreamSettings(), clientContext); + this.updateStreamOperationCallable = + callableFactory.createOperationCallable( + updateStreamTransportSettings, + settings.updateStreamOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.deleteStreamCallable = + callableFactory.createUnaryCallable( + deleteStreamTransportSettings, settings.deleteStreamSettings(), clientContext); + this.deleteStreamOperationCallable = + callableFactory.createOperationCallable( + deleteStreamTransportSettings, + settings.deleteStreamOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.getStreamThumbnailCallable = + callableFactory.createUnaryCallable( + getStreamThumbnailTransportSettings, + settings.getStreamThumbnailSettings(), + clientContext); + this.getStreamThumbnailOperationCallable = + callableFactory.createOperationCallable( + getStreamThumbnailTransportSettings, + settings.getStreamThumbnailOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.generateStreamHlsTokenCallable = + callableFactory.createUnaryCallable( + generateStreamHlsTokenTransportSettings, + settings.generateStreamHlsTokenSettings(), + clientContext); + this.listEventsCallable = + callableFactory.createUnaryCallable( + listEventsTransportSettings, settings.listEventsSettings(), clientContext); + this.listEventsPagedCallable = + callableFactory.createPagedCallable( + listEventsTransportSettings, settings.listEventsSettings(), clientContext); + this.getEventCallable = + callableFactory.createUnaryCallable( + getEventTransportSettings, settings.getEventSettings(), clientContext); + this.createEventCallable = + callableFactory.createUnaryCallable( + createEventTransportSettings, settings.createEventSettings(), clientContext); + this.createEventOperationCallable = + callableFactory.createOperationCallable( + createEventTransportSettings, + settings.createEventOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.updateEventCallable = + callableFactory.createUnaryCallable( + updateEventTransportSettings, settings.updateEventSettings(), clientContext); + this.updateEventOperationCallable = + callableFactory.createOperationCallable( + updateEventTransportSettings, + settings.updateEventOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.deleteEventCallable = + callableFactory.createUnaryCallable( + deleteEventTransportSettings, settings.deleteEventSettings(), clientContext); + this.deleteEventOperationCallable = + callableFactory.createOperationCallable( + deleteEventTransportSettings, + settings.deleteEventOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.listSeriesCallable = + callableFactory.createUnaryCallable( + listSeriesTransportSettings, settings.listSeriesSettings(), clientContext); + this.listSeriesPagedCallable = + callableFactory.createPagedCallable( + listSeriesTransportSettings, settings.listSeriesSettings(), clientContext); + this.getSeriesCallable = + callableFactory.createUnaryCallable( + getSeriesTransportSettings, settings.getSeriesSettings(), clientContext); + this.createSeriesCallable = + callableFactory.createUnaryCallable( + createSeriesTransportSettings, settings.createSeriesSettings(), clientContext); + this.createSeriesOperationCallable = + callableFactory.createOperationCallable( + createSeriesTransportSettings, + settings.createSeriesOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.updateSeriesCallable = + callableFactory.createUnaryCallable( + updateSeriesTransportSettings, settings.updateSeriesSettings(), clientContext); + this.updateSeriesOperationCallable = + callableFactory.createOperationCallable( + updateSeriesTransportSettings, + settings.updateSeriesOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.deleteSeriesCallable = + callableFactory.createUnaryCallable( + deleteSeriesTransportSettings, settings.deleteSeriesSettings(), clientContext); + this.deleteSeriesOperationCallable = + callableFactory.createOperationCallable( + deleteSeriesTransportSettings, + settings.deleteSeriesOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.materializeChannelCallable = + callableFactory.createUnaryCallable( + materializeChannelTransportSettings, + settings.materializeChannelSettings(), + clientContext); + this.materializeChannelOperationCallable = + callableFactory.createOperationCallable( + materializeChannelTransportSettings, + settings.materializeChannelOperationSettings(), + clientContext, + httpJsonOperationsStub); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + @InternalApi + public static List getMethodDescriptors() { + List methodDescriptors = new ArrayList<>(); + methodDescriptors.add(listClustersMethodDescriptor); + methodDescriptors.add(getClusterMethodDescriptor); + methodDescriptors.add(createClusterMethodDescriptor); + methodDescriptors.add(updateClusterMethodDescriptor); + methodDescriptors.add(deleteClusterMethodDescriptor); + methodDescriptors.add(listStreamsMethodDescriptor); + methodDescriptors.add(getStreamMethodDescriptor); + methodDescriptors.add(createStreamMethodDescriptor); + methodDescriptors.add(updateStreamMethodDescriptor); + methodDescriptors.add(deleteStreamMethodDescriptor); + methodDescriptors.add(getStreamThumbnailMethodDescriptor); + methodDescriptors.add(generateStreamHlsTokenMethodDescriptor); + methodDescriptors.add(listEventsMethodDescriptor); + methodDescriptors.add(getEventMethodDescriptor); + methodDescriptors.add(createEventMethodDescriptor); + methodDescriptors.add(updateEventMethodDescriptor); + methodDescriptors.add(deleteEventMethodDescriptor); + methodDescriptors.add(listSeriesMethodDescriptor); + methodDescriptors.add(getSeriesMethodDescriptor); + methodDescriptors.add(createSeriesMethodDescriptor); + methodDescriptors.add(updateSeriesMethodDescriptor); + methodDescriptors.add(deleteSeriesMethodDescriptor); + methodDescriptors.add(materializeChannelMethodDescriptor); + return methodDescriptors; + } + + public HttpJsonOperationsStub getHttpJsonOperationsStub() { + return httpJsonOperationsStub; + } + + @Override + public UnaryCallable listClustersCallable() { + return listClustersCallable; + } + + @Override + public UnaryCallable listClustersPagedCallable() { + return listClustersPagedCallable; + } + + @Override + public UnaryCallable getClusterCallable() { + return getClusterCallable; + } + + @Override + public UnaryCallable createClusterCallable() { + return createClusterCallable; + } + + @Override + public OperationCallable + createClusterOperationCallable() { + return createClusterOperationCallable; + } + + @Override + public UnaryCallable updateClusterCallable() { + return updateClusterCallable; + } + + @Override + public OperationCallable + updateClusterOperationCallable() { + return updateClusterOperationCallable; + } + + @Override + public UnaryCallable deleteClusterCallable() { + return deleteClusterCallable; + } + + @Override + public OperationCallable + deleteClusterOperationCallable() { + return deleteClusterOperationCallable; + } + + @Override + public UnaryCallable listStreamsCallable() { + return listStreamsCallable; + } + + @Override + public UnaryCallable listStreamsPagedCallable() { + return listStreamsPagedCallable; + } + + @Override + public UnaryCallable getStreamCallable() { + return getStreamCallable; + } + + @Override + public UnaryCallable createStreamCallable() { + return createStreamCallable; + } + + @Override + public OperationCallable + createStreamOperationCallable() { + return createStreamOperationCallable; + } + + @Override + public UnaryCallable updateStreamCallable() { + return updateStreamCallable; + } + + @Override + public OperationCallable + updateStreamOperationCallable() { + return updateStreamOperationCallable; + } + + @Override + public UnaryCallable deleteStreamCallable() { + return deleteStreamCallable; + } + + @Override + public OperationCallable + deleteStreamOperationCallable() { + return deleteStreamOperationCallable; + } + + @Override + public UnaryCallable getStreamThumbnailCallable() { + return getStreamThumbnailCallable; + } + + @Override + public OperationCallable + getStreamThumbnailOperationCallable() { + return getStreamThumbnailOperationCallable; + } + + @Override + public UnaryCallable + generateStreamHlsTokenCallable() { + return generateStreamHlsTokenCallable; + } + + @Override + public UnaryCallable listEventsCallable() { + return listEventsCallable; + } + + @Override + public UnaryCallable listEventsPagedCallable() { + return listEventsPagedCallable; + } + + @Override + public UnaryCallable getEventCallable() { + return getEventCallable; + } + + @Override + public UnaryCallable createEventCallable() { + return createEventCallable; + } + + @Override + public OperationCallable + createEventOperationCallable() { + return createEventOperationCallable; + } + + @Override + public UnaryCallable updateEventCallable() { + return updateEventCallable; + } + + @Override + public OperationCallable + updateEventOperationCallable() { + return updateEventOperationCallable; + } + + @Override + public UnaryCallable deleteEventCallable() { + return deleteEventCallable; + } + + @Override + public OperationCallable + deleteEventOperationCallable() { + return deleteEventOperationCallable; + } + + @Override + public UnaryCallable listSeriesCallable() { + return listSeriesCallable; + } + + @Override + public UnaryCallable listSeriesPagedCallable() { + return listSeriesPagedCallable; + } + + @Override + public UnaryCallable getSeriesCallable() { + return getSeriesCallable; + } + + @Override + public UnaryCallable createSeriesCallable() { + return createSeriesCallable; + } + + @Override + public OperationCallable + createSeriesOperationCallable() { + return createSeriesOperationCallable; + } + + @Override + public UnaryCallable updateSeriesCallable() { + return updateSeriesCallable; + } + + @Override + public OperationCallable + updateSeriesOperationCallable() { + return updateSeriesOperationCallable; + } + + @Override + public UnaryCallable deleteSeriesCallable() { + return deleteSeriesCallable; + } + + @Override + public OperationCallable + deleteSeriesOperationCallable() { + return deleteSeriesOperationCallable; + } + + @Override + public UnaryCallable materializeChannelCallable() { + return materializeChannelCallable; + } + + @Override + public OperationCallable + materializeChannelOperationCallable() { + return materializeChannelOperationCallable; + } + + @Override + public final void close() { + try { + backgroundResources.close(); + } catch (RuntimeException e) { + throw e; + } catch (Exception e) { + throw new IllegalStateException("Failed to close resource", e); + } + } + + @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/java-visionai/google-cloud-visionai/src/main/java/com/google/cloud/visionai/v1/stub/HttpJsonWarehouseCallableFactory.java b/java-visionai/google-cloud-visionai/src/main/java/com/google/cloud/visionai/v1/stub/HttpJsonWarehouseCallableFactory.java new file mode 100644 index 000000000000..1cbc7d0097e6 --- /dev/null +++ b/java-visionai/google-cloud-visionai/src/main/java/com/google/cloud/visionai/v1/stub/HttpJsonWarehouseCallableFactory.java @@ -0,0 +1,101 @@ +/* + * Copyright 2024 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.visionai.v1.stub; + +import com.google.api.gax.httpjson.HttpJsonCallSettings; +import com.google.api.gax.httpjson.HttpJsonCallableFactory; +import com.google.api.gax.httpjson.HttpJsonOperationSnapshotCallable; +import com.google.api.gax.httpjson.HttpJsonStubCallableFactory; +import com.google.api.gax.httpjson.longrunning.stub.OperationsStub; +import com.google.api.gax.rpc.BatchingCallSettings; +import com.google.api.gax.rpc.ClientContext; +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.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.longrunning.Operation; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * REST callable factory implementation for the Warehouse service API. + * + *

This class is for advanced usage. + */ +@Generated("by gapic-generator-java") +public class HttpJsonWarehouseCallableFactory + implements HttpJsonStubCallableFactory { + + @Override + public UnaryCallable createUnaryCallable( + HttpJsonCallSettings httpJsonCallSettings, + UnaryCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createUnaryCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @Override + public + UnaryCallable createPagedCallable( + HttpJsonCallSettings httpJsonCallSettings, + PagedCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createPagedCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @Override + public UnaryCallable createBatchingCallable( + HttpJsonCallSettings httpJsonCallSettings, + BatchingCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createBatchingCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @Override + public + OperationCallable createOperationCallable( + HttpJsonCallSettings httpJsonCallSettings, + OperationCallSettings callSettings, + ClientContext clientContext, + OperationsStub operationsStub) { + UnaryCallable innerCallable = + HttpJsonCallableFactory.createBaseUnaryCallable( + httpJsonCallSettings, callSettings.getInitialCallSettings(), clientContext); + HttpJsonOperationSnapshotCallable initialCallable = + new HttpJsonOperationSnapshotCallable( + innerCallable, + httpJsonCallSettings.getMethodDescriptor().getOperationSnapshotFactory()); + return HttpJsonCallableFactory.createOperationCallable( + callSettings, clientContext, operationsStub.longRunningClient(), initialCallable); + } + + @Override + public + ServerStreamingCallable createServerStreamingCallable( + HttpJsonCallSettings httpJsonCallSettings, + ServerStreamingCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createServerStreamingCallable( + httpJsonCallSettings, callSettings, clientContext); + } +} diff --git a/java-visionai/google-cloud-visionai/src/main/java/com/google/cloud/visionai/v1/stub/HttpJsonWarehouseStub.java b/java-visionai/google-cloud-visionai/src/main/java/com/google/cloud/visionai/v1/stub/HttpJsonWarehouseStub.java new file mode 100644 index 000000000000..df2f3ffbe720 --- /dev/null +++ b/java-visionai/google-cloud-visionai/src/main/java/com/google/cloud/visionai/v1/stub/HttpJsonWarehouseStub.java @@ -0,0 +1,4520 @@ +/* + * Copyright 2024 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.visionai.v1.stub; + +import static com.google.cloud.visionai.v1.WarehouseClient.ListAnnotationsPagedResponse; +import static com.google.cloud.visionai.v1.WarehouseClient.ListAssetsPagedResponse; +import static com.google.cloud.visionai.v1.WarehouseClient.ListCollectionsPagedResponse; +import static com.google.cloud.visionai.v1.WarehouseClient.ListCorporaPagedResponse; +import static com.google.cloud.visionai.v1.WarehouseClient.ListDataSchemasPagedResponse; +import static com.google.cloud.visionai.v1.WarehouseClient.ListIndexEndpointsPagedResponse; +import static com.google.cloud.visionai.v1.WarehouseClient.ListIndexesPagedResponse; +import static com.google.cloud.visionai.v1.WarehouseClient.ListSearchConfigsPagedResponse; +import static com.google.cloud.visionai.v1.WarehouseClient.ListSearchHypernymsPagedResponse; +import static com.google.cloud.visionai.v1.WarehouseClient.SearchAssetsPagedResponse; +import static com.google.cloud.visionai.v1.WarehouseClient.SearchIndexEndpointPagedResponse; +import static com.google.cloud.visionai.v1.WarehouseClient.ViewCollectionItemsPagedResponse; +import static com.google.cloud.visionai.v1.WarehouseClient.ViewIndexedAssetsPagedResponse; + +import com.google.api.HttpRule; +import com.google.api.core.InternalApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.core.BackgroundResourceAggregation; +import com.google.api.gax.httpjson.ApiMethodDescriptor; +import com.google.api.gax.httpjson.HttpJsonCallSettings; +import com.google.api.gax.httpjson.HttpJsonOperationSnapshot; +import com.google.api.gax.httpjson.HttpJsonStubCallableFactory; +import com.google.api.gax.httpjson.ProtoMessageRequestFormatter; +import com.google.api.gax.httpjson.ProtoMessageResponseParser; +import com.google.api.gax.httpjson.ProtoRestSerializer; +import com.google.api.gax.httpjson.longrunning.stub.HttpJsonOperationsStub; +import com.google.api.gax.rpc.BidiStreamingCallable; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.RequestParamsBuilder; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.visionai.v1.AddCollectionItemRequest; +import com.google.cloud.visionai.v1.AddCollectionItemResponse; +import com.google.cloud.visionai.v1.AnalyzeAssetMetadata; +import com.google.cloud.visionai.v1.AnalyzeAssetRequest; +import com.google.cloud.visionai.v1.AnalyzeAssetResponse; +import com.google.cloud.visionai.v1.AnalyzeCorpusMetadata; +import com.google.cloud.visionai.v1.AnalyzeCorpusRequest; +import com.google.cloud.visionai.v1.AnalyzeCorpusResponse; +import com.google.cloud.visionai.v1.Annotation; +import com.google.cloud.visionai.v1.Asset; +import com.google.cloud.visionai.v1.ClipAssetRequest; +import com.google.cloud.visionai.v1.ClipAssetResponse; +import com.google.cloud.visionai.v1.Collection; +import com.google.cloud.visionai.v1.Corpus; +import com.google.cloud.visionai.v1.CreateAnnotationRequest; +import com.google.cloud.visionai.v1.CreateAssetRequest; +import com.google.cloud.visionai.v1.CreateCollectionMetadata; +import com.google.cloud.visionai.v1.CreateCollectionRequest; +import com.google.cloud.visionai.v1.CreateCorpusMetadata; +import com.google.cloud.visionai.v1.CreateCorpusRequest; +import com.google.cloud.visionai.v1.CreateDataSchemaRequest; +import com.google.cloud.visionai.v1.CreateIndexEndpointMetadata; +import com.google.cloud.visionai.v1.CreateIndexEndpointRequest; +import com.google.cloud.visionai.v1.CreateIndexMetadata; +import com.google.cloud.visionai.v1.CreateIndexRequest; +import com.google.cloud.visionai.v1.CreateSearchConfigRequest; +import com.google.cloud.visionai.v1.CreateSearchHypernymRequest; +import com.google.cloud.visionai.v1.DataSchema; +import com.google.cloud.visionai.v1.DeleteAnnotationRequest; +import com.google.cloud.visionai.v1.DeleteAssetMetadata; +import com.google.cloud.visionai.v1.DeleteAssetRequest; +import com.google.cloud.visionai.v1.DeleteCollectionMetadata; +import com.google.cloud.visionai.v1.DeleteCollectionRequest; +import com.google.cloud.visionai.v1.DeleteCorpusRequest; +import com.google.cloud.visionai.v1.DeleteDataSchemaRequest; +import com.google.cloud.visionai.v1.DeleteIndexEndpointMetadata; +import com.google.cloud.visionai.v1.DeleteIndexEndpointRequest; +import com.google.cloud.visionai.v1.DeleteIndexMetadata; +import com.google.cloud.visionai.v1.DeleteIndexRequest; +import com.google.cloud.visionai.v1.DeleteSearchConfigRequest; +import com.google.cloud.visionai.v1.DeleteSearchHypernymRequest; +import com.google.cloud.visionai.v1.DeployIndexMetadata; +import com.google.cloud.visionai.v1.DeployIndexRequest; +import com.google.cloud.visionai.v1.DeployIndexResponse; +import com.google.cloud.visionai.v1.GenerateHlsUriRequest; +import com.google.cloud.visionai.v1.GenerateHlsUriResponse; +import com.google.cloud.visionai.v1.GenerateRetrievalUrlRequest; +import com.google.cloud.visionai.v1.GenerateRetrievalUrlResponse; +import com.google.cloud.visionai.v1.GetAnnotationRequest; +import com.google.cloud.visionai.v1.GetAssetRequest; +import com.google.cloud.visionai.v1.GetCollectionRequest; +import com.google.cloud.visionai.v1.GetCorpusRequest; +import com.google.cloud.visionai.v1.GetDataSchemaRequest; +import com.google.cloud.visionai.v1.GetIndexEndpointRequest; +import com.google.cloud.visionai.v1.GetIndexRequest; +import com.google.cloud.visionai.v1.GetSearchConfigRequest; +import com.google.cloud.visionai.v1.GetSearchHypernymRequest; +import com.google.cloud.visionai.v1.ImportAssetsMetadata; +import com.google.cloud.visionai.v1.ImportAssetsRequest; +import com.google.cloud.visionai.v1.ImportAssetsResponse; +import com.google.cloud.visionai.v1.Index; +import com.google.cloud.visionai.v1.IndexAssetMetadata; +import com.google.cloud.visionai.v1.IndexAssetRequest; +import com.google.cloud.visionai.v1.IndexAssetResponse; +import com.google.cloud.visionai.v1.IndexEndpoint; +import com.google.cloud.visionai.v1.IngestAssetRequest; +import com.google.cloud.visionai.v1.IngestAssetResponse; +import com.google.cloud.visionai.v1.ListAnnotationsRequest; +import com.google.cloud.visionai.v1.ListAnnotationsResponse; +import com.google.cloud.visionai.v1.ListAssetsRequest; +import com.google.cloud.visionai.v1.ListAssetsResponse; +import com.google.cloud.visionai.v1.ListCollectionsRequest; +import com.google.cloud.visionai.v1.ListCollectionsResponse; +import com.google.cloud.visionai.v1.ListCorporaRequest; +import com.google.cloud.visionai.v1.ListCorporaResponse; +import com.google.cloud.visionai.v1.ListDataSchemasRequest; +import com.google.cloud.visionai.v1.ListDataSchemasResponse; +import com.google.cloud.visionai.v1.ListIndexEndpointsRequest; +import com.google.cloud.visionai.v1.ListIndexEndpointsResponse; +import com.google.cloud.visionai.v1.ListIndexesRequest; +import com.google.cloud.visionai.v1.ListIndexesResponse; +import com.google.cloud.visionai.v1.ListSearchConfigsRequest; +import com.google.cloud.visionai.v1.ListSearchConfigsResponse; +import com.google.cloud.visionai.v1.ListSearchHypernymsRequest; +import com.google.cloud.visionai.v1.ListSearchHypernymsResponse; +import com.google.cloud.visionai.v1.RemoveCollectionItemRequest; +import com.google.cloud.visionai.v1.RemoveCollectionItemResponse; +import com.google.cloud.visionai.v1.RemoveIndexAssetMetadata; +import com.google.cloud.visionai.v1.RemoveIndexAssetRequest; +import com.google.cloud.visionai.v1.RemoveIndexAssetResponse; +import com.google.cloud.visionai.v1.SearchAssetsRequest; +import com.google.cloud.visionai.v1.SearchAssetsResponse; +import com.google.cloud.visionai.v1.SearchConfig; +import com.google.cloud.visionai.v1.SearchHypernym; +import com.google.cloud.visionai.v1.SearchIndexEndpointRequest; +import com.google.cloud.visionai.v1.SearchIndexEndpointResponse; +import com.google.cloud.visionai.v1.UndeployIndexMetadata; +import com.google.cloud.visionai.v1.UndeployIndexRequest; +import com.google.cloud.visionai.v1.UndeployIndexResponse; +import com.google.cloud.visionai.v1.UpdateAnnotationRequest; +import com.google.cloud.visionai.v1.UpdateAssetRequest; +import com.google.cloud.visionai.v1.UpdateCollectionRequest; +import com.google.cloud.visionai.v1.UpdateCorpusRequest; +import com.google.cloud.visionai.v1.UpdateDataSchemaRequest; +import com.google.cloud.visionai.v1.UpdateIndexEndpointMetadata; +import com.google.cloud.visionai.v1.UpdateIndexEndpointRequest; +import com.google.cloud.visionai.v1.UpdateIndexMetadata; +import com.google.cloud.visionai.v1.UpdateIndexRequest; +import com.google.cloud.visionai.v1.UpdateSearchConfigRequest; +import com.google.cloud.visionai.v1.UpdateSearchHypernymRequest; +import com.google.cloud.visionai.v1.UploadAssetMetadata; +import com.google.cloud.visionai.v1.UploadAssetRequest; +import com.google.cloud.visionai.v1.UploadAssetResponse; +import com.google.cloud.visionai.v1.ViewCollectionItemsRequest; +import com.google.cloud.visionai.v1.ViewCollectionItemsResponse; +import com.google.cloud.visionai.v1.ViewIndexedAssetsRequest; +import com.google.cloud.visionai.v1.ViewIndexedAssetsResponse; +import com.google.common.collect.ImmutableMap; +import com.google.longrunning.Operation; +import com.google.protobuf.Empty; +import com.google.protobuf.TypeRegistry; +import java.io.IOException; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * REST stub implementation for the Warehouse service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") +public class HttpJsonWarehouseStub extends WarehouseStub { + private static final TypeRegistry typeRegistry = + TypeRegistry.newBuilder() + .add(DeployIndexResponse.getDescriptor()) + .add(IndexEndpoint.getDescriptor()) + .add(CreateCollectionMetadata.getDescriptor()) + .add(UpdateIndexEndpointMetadata.getDescriptor()) + .add(DeployIndexMetadata.getDescriptor()) + .add(CreateIndexEndpointMetadata.getDescriptor()) + .add(DeleteAssetMetadata.getDescriptor()) + .add(UndeployIndexMetadata.getDescriptor()) + .add(UndeployIndexResponse.getDescriptor()) + .add(Empty.getDescriptor()) + .add(ImportAssetsMetadata.getDescriptor()) + .add(Index.getDescriptor()) + .add(CreateCorpusMetadata.getDescriptor()) + .add(AnalyzeCorpusMetadata.getDescriptor()) + .add(DeleteIndexEndpointMetadata.getDescriptor()) + .add(RemoveIndexAssetResponse.getDescriptor()) + .add(DeleteIndexMetadata.getDescriptor()) + .add(CreateIndexMetadata.getDescriptor()) + .add(Collection.getDescriptor()) + .add(UploadAssetResponse.getDescriptor()) + .add(IndexAssetMetadata.getDescriptor()) + .add(DeleteCollectionMetadata.getDescriptor()) + .add(AnalyzeAssetMetadata.getDescriptor()) + .add(AnalyzeAssetResponse.getDescriptor()) + .add(ImportAssetsResponse.getDescriptor()) + .add(UploadAssetMetadata.getDescriptor()) + .add(IndexAssetResponse.getDescriptor()) + .add(RemoveIndexAssetMetadata.getDescriptor()) + .add(Corpus.getDescriptor()) + .add(AnalyzeCorpusResponse.getDescriptor()) + .add(UpdateIndexMetadata.getDescriptor()) + .build(); + + private static final ApiMethodDescriptor createAssetMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.visionai.v1.Warehouse/CreateAsset") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{parent=projects/*/locations/*/corpora/*}/assets", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + if (request.hasAssetId()) { + serializer.putQueryParam(fields, "assetId", request.getAssetId()); + } + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create().toBody("asset", request.getAsset(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Asset.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor updateAssetMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.visionai.v1.Warehouse/UpdateAsset") + .setHttpMethod("PATCH") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{asset.name=projects/*/locations/*/corpora/*/assets/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "asset.name", request.getAsset().getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "updateMask", request.getUpdateMask()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create().toBody("asset", request.getAsset(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Asset.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor getAssetMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.visionai.v1.Warehouse/GetAsset") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/corpora/*/assets/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Asset.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + listAssetsMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.visionai.v1.Warehouse/ListAssets") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{parent=projects/*/locations/*/corpora/*}/assets", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "filter", request.getFilter()); + serializer.putQueryParam(fields, "pageSize", request.getPageSize()); + serializer.putQueryParam(fields, "pageToken", request.getPageToken()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ListAssetsResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + deleteAssetMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.visionai.v1.Warehouse/DeleteAsset") + .setHttpMethod("DELETE") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/corpora/*/assets/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (DeleteAssetRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + uploadAssetMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.visionai.v1.Warehouse/UploadAsset") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/corpora/*/assets/*}:upload", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().clearName().build(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (UploadAssetRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor< + GenerateRetrievalUrlRequest, GenerateRetrievalUrlResponse> + generateRetrievalUrlMethodDescriptor = + ApiMethodDescriptor + .newBuilder() + .setFullMethodName("google.cloud.visionai.v1.Warehouse/GenerateRetrievalUrl") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/corpora/*/assets/*}:generateRetrievalUrl", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().clearName().build(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(GenerateRetrievalUrlResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + analyzeAssetMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.visionai.v1.Warehouse/AnalyzeAsset") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/corpora/*/assets/*}:analyze", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().clearName().build(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (AnalyzeAssetRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + indexAssetMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.visionai.v1.Warehouse/IndexAsset") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/corpora/*/assets/*}:index", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().clearName().build(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (IndexAssetRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + removeIndexAssetMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.visionai.v1.Warehouse/RemoveIndexAsset") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/corpora/*/assets/*}:removeIndex", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().clearName().build(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (RemoveIndexAssetRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + viewIndexedAssetsMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.visionai.v1.Warehouse/ViewIndexedAssets") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{index=projects/*/locations/*/corpora/*/indexes/*}:viewAssets", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "index", request.getIndex()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "filter", request.getFilter()); + serializer.putQueryParam(fields, "pageSize", request.getPageSize()); + serializer.putQueryParam(fields, "pageToken", request.getPageToken()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ViewIndexedAssetsResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + createIndexMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.visionai.v1.Warehouse/CreateIndex") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{parent=projects/*/locations/*/corpora/*}/indexes", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "indexId", request.getIndexId()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("index", request.getIndex(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (CreateIndexRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + updateIndexMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.visionai.v1.Warehouse/UpdateIndex") + .setHttpMethod("PATCH") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{index.name=projects/*/locations/*/corpora/*/indexes/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam( + fields, "index.name", request.getIndex().getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "updateMask", request.getUpdateMask()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("index", request.getIndex(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (UpdateIndexRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor getIndexMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.visionai.v1.Warehouse/GetIndex") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/corpora/*/indexes/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Index.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + listIndexesMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.visionai.v1.Warehouse/ListIndexes") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{parent=projects/*/locations/*/corpora/*}/indexes", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "pageSize", request.getPageSize()); + serializer.putQueryParam(fields, "pageToken", request.getPageToken()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ListIndexesResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + deleteIndexMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.visionai.v1.Warehouse/DeleteIndex") + .setHttpMethod("DELETE") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/corpora/*/indexes/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (DeleteIndexRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + createCorpusMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.visionai.v1.Warehouse/CreateCorpus") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{parent=projects/*/locations/*}/corpora", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("corpus", request.getCorpus(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (CreateCorpusRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor getCorpusMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.visionai.v1.Warehouse/GetCorpus") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/corpora/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Corpus.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + updateCorpusMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.visionai.v1.Warehouse/UpdateCorpus") + .setHttpMethod("PATCH") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{corpus.name=projects/*/locations/*/corpora/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam( + fields, "corpus.name", request.getCorpus().getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "updateMask", request.getUpdateMask()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("corpus", request.getCorpus(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Corpus.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + listCorporaMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.visionai.v1.Warehouse/ListCorpora") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{parent=projects/*/locations/*}/corpora", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "filter", request.getFilter()); + serializer.putQueryParam(fields, "pageSize", request.getPageSize()); + serializer.putQueryParam(fields, "pageToken", request.getPageToken()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ListCorporaResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + deleteCorpusMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.visionai.v1.Warehouse/DeleteCorpus") + .setHttpMethod("DELETE") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/corpora/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Empty.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + analyzeCorpusMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.visionai.v1.Warehouse/AnalyzeCorpus") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/corpora/*}:analyze", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().clearName().build(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (AnalyzeCorpusRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + createDataSchemaMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.visionai.v1.Warehouse/CreateDataSchema") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{parent=projects/*/locations/*/corpora/*}/dataSchemas", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("dataSchema", request.getDataSchema(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(DataSchema.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + updateDataSchemaMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.visionai.v1.Warehouse/UpdateDataSchema") + .setHttpMethod("PATCH") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{dataSchema.name=projects/*/locations/*/corpora/*/dataSchemas/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam( + fields, "dataSchema.name", request.getDataSchema().getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "updateMask", request.getUpdateMask()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("dataSchema", request.getDataSchema(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(DataSchema.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + getDataSchemaMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.visionai.v1.Warehouse/GetDataSchema") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/corpora/*/dataSchemas/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(DataSchema.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + deleteDataSchemaMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.visionai.v1.Warehouse/DeleteDataSchema") + .setHttpMethod("DELETE") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/corpora/*/dataSchemas/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Empty.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + listDataSchemasMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.visionai.v1.Warehouse/ListDataSchemas") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{parent=projects/*/locations/*/corpora/*}/dataSchemas", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "pageSize", request.getPageSize()); + serializer.putQueryParam(fields, "pageToken", request.getPageToken()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ListDataSchemasResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + createAnnotationMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.visionai.v1.Warehouse/CreateAnnotation") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{parent=projects/*/locations/*/corpora/*/assets/*}/annotations", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + if (request.hasAnnotationId()) { + serializer.putQueryParam( + fields, "annotationId", request.getAnnotationId()); + } + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("annotation", request.getAnnotation(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Annotation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + getAnnotationMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.visionai.v1.Warehouse/GetAnnotation") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/corpora/*/assets/*/annotations/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Annotation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + listAnnotationsMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.visionai.v1.Warehouse/ListAnnotations") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{parent=projects/*/locations/*/corpora/*/assets/*}/annotations", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "filter", request.getFilter()); + serializer.putQueryParam(fields, "pageSize", request.getPageSize()); + serializer.putQueryParam(fields, "pageToken", request.getPageToken()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ListAnnotationsResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + updateAnnotationMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.visionai.v1.Warehouse/UpdateAnnotation") + .setHttpMethod("PATCH") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{annotation.name=projects/*/locations/*/corpora/*/assets/*/annotations/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam( + fields, "annotation.name", request.getAnnotation().getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "updateMask", request.getUpdateMask()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("annotation", request.getAnnotation(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Annotation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + deleteAnnotationMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.visionai.v1.Warehouse/DeleteAnnotation") + .setHttpMethod("DELETE") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/corpora/*/assets/*/annotations/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Empty.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + clipAssetMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.visionai.v1.Warehouse/ClipAsset") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/corpora/*/assets/*}:clip", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().clearName().build(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ClipAssetResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + generateHlsUriMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.visionai.v1.Warehouse/GenerateHlsUri") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/corpora/*/assets/*}:generateHlsUri", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().clearName().build(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(GenerateHlsUriResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + importAssetsMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.visionai.v1.Warehouse/ImportAssets") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{parent=projects/*/locations/*/corpora/*}/assets:import", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().clearParent().build(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (ImportAssetsRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + createSearchConfigMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.visionai.v1.Warehouse/CreateSearchConfig") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{parent=projects/*/locations/*/corpora/*}/searchConfigs", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam( + fields, "searchConfigId", request.getSearchConfigId()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("searchConfig", request.getSearchConfig(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(SearchConfig.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + updateSearchConfigMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.visionai.v1.Warehouse/UpdateSearchConfig") + .setHttpMethod("PATCH") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{searchConfig.name=projects/*/locations/*/corpora/*/searchConfigs/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam( + fields, "searchConfig.name", request.getSearchConfig().getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "updateMask", request.getUpdateMask()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("searchConfig", request.getSearchConfig(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(SearchConfig.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + getSearchConfigMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.visionai.v1.Warehouse/GetSearchConfig") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/corpora/*/searchConfigs/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(SearchConfig.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + deleteSearchConfigMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.visionai.v1.Warehouse/DeleteSearchConfig") + .setHttpMethod("DELETE") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/corpora/*/searchConfigs/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Empty.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + listSearchConfigsMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.visionai.v1.Warehouse/ListSearchConfigs") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{parent=projects/*/locations/*/corpora/*}/searchConfigs", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "pageSize", request.getPageSize()); + serializer.putQueryParam(fields, "pageToken", request.getPageToken()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ListSearchConfigsResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + createSearchHypernymMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.visionai.v1.Warehouse/CreateSearchHypernym") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{parent=projects/*/locations/*/corpora/*}/searchHypernyms", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + if (request.hasSearchHypernymId()) { + serializer.putQueryParam( + fields, "searchHypernymId", request.getSearchHypernymId()); + } + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("searchHypernym", request.getSearchHypernym(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(SearchHypernym.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + updateSearchHypernymMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.visionai.v1.Warehouse/UpdateSearchHypernym") + .setHttpMethod("PATCH") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{searchHypernym.name=projects/*/locations/*/corpora/*/searchHypernyms/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam( + fields, + "searchHypernym.name", + request.getSearchHypernym().getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "updateMask", request.getUpdateMask()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("searchHypernym", request.getSearchHypernym(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(SearchHypernym.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + getSearchHypernymMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.visionai.v1.Warehouse/GetSearchHypernym") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/corpora/*/searchHypernyms/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(SearchHypernym.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + deleteSearchHypernymMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.visionai.v1.Warehouse/DeleteSearchHypernym") + .setHttpMethod("DELETE") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/corpora/*/searchHypernyms/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Empty.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + listSearchHypernymsMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.visionai.v1.Warehouse/ListSearchHypernyms") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{parent=projects/*/locations/*/corpora/*}/searchHypernyms", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "pageSize", request.getPageSize()); + serializer.putQueryParam(fields, "pageToken", request.getPageToken()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ListSearchHypernymsResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + searchAssetsMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.visionai.v1.Warehouse/SearchAssets") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{corpus=projects/*/locations/*/corpora/*}:searchAssets", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "corpus", request.getCorpus()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().clearCorpus().build(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(SearchAssetsResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + searchIndexEndpointMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.visionai.v1.Warehouse/SearchIndexEndpoint") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{indexEndpoint=projects/*/locations/*/indexEndpoints/*}:searchIndexEndpoint", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam( + fields, "indexEndpoint", request.getIndexEndpoint()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody( + "*", request.toBuilder().clearIndexEndpoint().build(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(SearchIndexEndpointResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + createIndexEndpointMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.visionai.v1.Warehouse/CreateIndexEndpoint") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{parent=projects/*/locations/*}/indexEndpoints", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam( + fields, "indexEndpointId", request.getIndexEndpointId()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("indexEndpoint", request.getIndexEndpoint(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (CreateIndexEndpointRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + getIndexEndpointMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.visionai.v1.Warehouse/GetIndexEndpoint") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/indexEndpoints/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(IndexEndpoint.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + listIndexEndpointsMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.visionai.v1.Warehouse/ListIndexEndpoints") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{parent=projects/*/locations/*}/indexEndpoints", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "filter", request.getFilter()); + serializer.putQueryParam(fields, "pageSize", request.getPageSize()); + serializer.putQueryParam(fields, "pageToken", request.getPageToken()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ListIndexEndpointsResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + updateIndexEndpointMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.visionai.v1.Warehouse/UpdateIndexEndpoint") + .setHttpMethod("PATCH") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{indexEndpoint.name=projects/*/locations/*/indexEndpoints/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam( + fields, "indexEndpoint.name", request.getIndexEndpoint().getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "updateMask", request.getUpdateMask()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("indexEndpoint", request.getIndexEndpoint(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (UpdateIndexEndpointRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + deleteIndexEndpointMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.visionai.v1.Warehouse/DeleteIndexEndpoint") + .setHttpMethod("DELETE") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/indexEndpoints/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (DeleteIndexEndpointRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + deployIndexMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.visionai.v1.Warehouse/DeployIndex") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{indexEndpoint=projects/*/locations/*/indexEndpoints/*}:deployIndex", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam( + fields, "indexEndpoint", request.getIndexEndpoint()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody( + "*", request.toBuilder().clearIndexEndpoint().build(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (DeployIndexRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + undeployIndexMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.visionai.v1.Warehouse/UndeployIndex") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{indexEndpoint=projects/*/locations/*/indexEndpoints/*}:undeployIndex", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam( + fields, "indexEndpoint", request.getIndexEndpoint()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody( + "*", request.toBuilder().clearIndexEndpoint().build(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (UndeployIndexRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + createCollectionMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.visionai.v1.Warehouse/CreateCollection") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{parent=projects/*/locations/*/corpora/*}/collections", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + if (request.hasCollectionId()) { + serializer.putQueryParam( + fields, "collectionId", request.getCollectionId()); + } + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("collection", request.getCollection(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (CreateCollectionRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + deleteCollectionMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.visionai.v1.Warehouse/DeleteCollection") + .setHttpMethod("DELETE") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/corpora/*/collections/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (DeleteCollectionRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + getCollectionMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.visionai.v1.Warehouse/GetCollection") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/corpora/*/collections/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Collection.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + updateCollectionMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.visionai.v1.Warehouse/UpdateCollection") + .setHttpMethod("PATCH") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{collection.name=projects/*/locations/*/corpora/*/collections/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam( + fields, "collection.name", request.getCollection().getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "updateMask", request.getUpdateMask()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("collection", request.getCollection(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Collection.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + listCollectionsMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.visionai.v1.Warehouse/ListCollections") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{parent=projects/*/locations/*/corpora/*}/collections", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "pageSize", request.getPageSize()); + serializer.putQueryParam(fields, "pageToken", request.getPageToken()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ListCollectionsResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + addCollectionItemMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.visionai.v1.Warehouse/AddCollectionItem") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{item.collection=projects/*/locations/*/corpora/*/collections/*}:addCollectionItem", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam( + fields, "item.collection", request.getItem().getCollection()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().build(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(AddCollectionItemResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor< + RemoveCollectionItemRequest, RemoveCollectionItemResponse> + removeCollectionItemMethodDescriptor = + ApiMethodDescriptor + .newBuilder() + .setFullMethodName("google.cloud.visionai.v1.Warehouse/RemoveCollectionItem") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{item.collection=projects/*/locations/*/corpora/*/collections/*}:removeCollectionItem", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam( + fields, "item.collection", request.getItem().getCollection()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().build(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(RemoveCollectionItemResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + viewCollectionItemsMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.visionai.v1.Warehouse/ViewCollectionItems") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{collection=projects/*/locations/*/corpora/*/collections/*}:viewCollectionItems", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "collection", request.getCollection()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "pageSize", request.getPageSize()); + serializer.putQueryParam(fields, "pageToken", request.getPageToken()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ViewCollectionItemsResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private final UnaryCallable createAssetCallable; + private final UnaryCallable updateAssetCallable; + private final UnaryCallable getAssetCallable; + private final UnaryCallable listAssetsCallable; + private final UnaryCallable listAssetsPagedCallable; + private final UnaryCallable deleteAssetCallable; + private final OperationCallable + deleteAssetOperationCallable; + private final UnaryCallable uploadAssetCallable; + private final OperationCallable + uploadAssetOperationCallable; + private final UnaryCallable + generateRetrievalUrlCallable; + private final UnaryCallable analyzeAssetCallable; + private final OperationCallable + analyzeAssetOperationCallable; + private final UnaryCallable indexAssetCallable; + private final OperationCallable + indexAssetOperationCallable; + private final UnaryCallable removeIndexAssetCallable; + private final OperationCallable< + RemoveIndexAssetRequest, RemoveIndexAssetResponse, RemoveIndexAssetMetadata> + removeIndexAssetOperationCallable; + private final UnaryCallable + viewIndexedAssetsCallable; + private final UnaryCallable + viewIndexedAssetsPagedCallable; + private final UnaryCallable createIndexCallable; + private final OperationCallable + createIndexOperationCallable; + private final UnaryCallable updateIndexCallable; + private final OperationCallable + updateIndexOperationCallable; + private final UnaryCallable getIndexCallable; + private final UnaryCallable listIndexesCallable; + private final UnaryCallable + listIndexesPagedCallable; + private final UnaryCallable deleteIndexCallable; + private final OperationCallable + deleteIndexOperationCallable; + private final UnaryCallable createCorpusCallable; + private final OperationCallable + createCorpusOperationCallable; + private final UnaryCallable getCorpusCallable; + private final UnaryCallable updateCorpusCallable; + private final UnaryCallable listCorporaCallable; + private final UnaryCallable + listCorporaPagedCallable; + private final UnaryCallable deleteCorpusCallable; + private final UnaryCallable analyzeCorpusCallable; + private final OperationCallable< + AnalyzeCorpusRequest, AnalyzeCorpusResponse, AnalyzeCorpusMetadata> + analyzeCorpusOperationCallable; + private final UnaryCallable createDataSchemaCallable; + private final UnaryCallable updateDataSchemaCallable; + private final UnaryCallable getDataSchemaCallable; + private final UnaryCallable deleteDataSchemaCallable; + private final UnaryCallable + listDataSchemasCallable; + private final UnaryCallable + listDataSchemasPagedCallable; + private final UnaryCallable createAnnotationCallable; + private final UnaryCallable getAnnotationCallable; + private final UnaryCallable + listAnnotationsCallable; + private final UnaryCallable + listAnnotationsPagedCallable; + private final UnaryCallable updateAnnotationCallable; + private final UnaryCallable deleteAnnotationCallable; + private final UnaryCallable clipAssetCallable; + private final UnaryCallable generateHlsUriCallable; + private final UnaryCallable importAssetsCallable; + private final OperationCallable + importAssetsOperationCallable; + private final UnaryCallable createSearchConfigCallable; + private final UnaryCallable updateSearchConfigCallable; + private final UnaryCallable getSearchConfigCallable; + private final UnaryCallable deleteSearchConfigCallable; + private final UnaryCallable + listSearchConfigsCallable; + private final UnaryCallable + listSearchConfigsPagedCallable; + private final UnaryCallable + createSearchHypernymCallable; + private final UnaryCallable + updateSearchHypernymCallable; + private final UnaryCallable getSearchHypernymCallable; + private final UnaryCallable deleteSearchHypernymCallable; + private final UnaryCallable + listSearchHypernymsCallable; + private final UnaryCallable + listSearchHypernymsPagedCallable; + private final UnaryCallable searchAssetsCallable; + private final UnaryCallable + searchAssetsPagedCallable; + private final UnaryCallable + searchIndexEndpointCallable; + private final UnaryCallable + searchIndexEndpointPagedCallable; + private final UnaryCallable createIndexEndpointCallable; + private final OperationCallable< + CreateIndexEndpointRequest, IndexEndpoint, CreateIndexEndpointMetadata> + createIndexEndpointOperationCallable; + private final UnaryCallable getIndexEndpointCallable; + private final UnaryCallable + listIndexEndpointsCallable; + private final UnaryCallable + listIndexEndpointsPagedCallable; + private final UnaryCallable updateIndexEndpointCallable; + private final OperationCallable< + UpdateIndexEndpointRequest, IndexEndpoint, UpdateIndexEndpointMetadata> + updateIndexEndpointOperationCallable; + private final UnaryCallable deleteIndexEndpointCallable; + private final OperationCallable + deleteIndexEndpointOperationCallable; + private final UnaryCallable deployIndexCallable; + private final OperationCallable + deployIndexOperationCallable; + private final UnaryCallable undeployIndexCallable; + private final OperationCallable< + UndeployIndexRequest, UndeployIndexResponse, UndeployIndexMetadata> + undeployIndexOperationCallable; + private final UnaryCallable createCollectionCallable; + private final OperationCallable + createCollectionOperationCallable; + private final UnaryCallable deleteCollectionCallable; + private final OperationCallable + deleteCollectionOperationCallable; + private final UnaryCallable getCollectionCallable; + private final UnaryCallable updateCollectionCallable; + private final UnaryCallable + listCollectionsCallable; + private final UnaryCallable + listCollectionsPagedCallable; + private final UnaryCallable + addCollectionItemCallable; + private final UnaryCallable + removeCollectionItemCallable; + private final UnaryCallable + viewCollectionItemsCallable; + private final UnaryCallable + viewCollectionItemsPagedCallable; + + private final BackgroundResource backgroundResources; + private final HttpJsonOperationsStub httpJsonOperationsStub; + private final HttpJsonStubCallableFactory callableFactory; + + public static final HttpJsonWarehouseStub create(WarehouseStubSettings settings) + throws IOException { + return new HttpJsonWarehouseStub(settings, ClientContext.create(settings)); + } + + public static final HttpJsonWarehouseStub create(ClientContext clientContext) throws IOException { + return new HttpJsonWarehouseStub( + WarehouseStubSettings.newHttpJsonBuilder().build(), clientContext); + } + + public static final HttpJsonWarehouseStub create( + ClientContext clientContext, HttpJsonStubCallableFactory callableFactory) throws IOException { + return new HttpJsonWarehouseStub( + WarehouseStubSettings.newHttpJsonBuilder().build(), clientContext, callableFactory); + } + + /** + * Constructs an instance of HttpJsonWarehouseStub, 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 HttpJsonWarehouseStub(WarehouseStubSettings settings, ClientContext clientContext) + throws IOException { + this(settings, clientContext, new HttpJsonWarehouseCallableFactory()); + } + + /** + * Constructs an instance of HttpJsonWarehouseStub, 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 HttpJsonWarehouseStub( + WarehouseStubSettings settings, + ClientContext clientContext, + HttpJsonStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + this.httpJsonOperationsStub = + HttpJsonOperationsStub.create( + clientContext, + callableFactory, + typeRegistry, + ImmutableMap.builder() + .put( + "google.longrunning.Operations.CancelOperation", + HttpRule.newBuilder() + .setPost("/v1/{name=projects/*/locations/*/operations/*}:cancel") + .build()) + .put( + "google.longrunning.Operations.DeleteOperation", + HttpRule.newBuilder() + .setDelete("/v1/{name=projects/*/locations/*/operations/*}") + .build()) + .put( + "google.longrunning.Operations.GetOperation", + HttpRule.newBuilder() + .setGet("/v1/{name=projects/*/locations/*/operations/*}") + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet("/v1/{name=projects/*/locations/*/warehouseOperations/*}") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet( + "/v1/{name=projects/*/locations/*/corpora/*/assets/*/operations/*}") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet( + "/v1/{name=projects/*/locations/*/corpora/*/collections/*/operations/*}") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet( + "/v1/{name=projects/*/locations/*/corpora/*/imageIndexes/*/operations/*}") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet( + "/v1/{name=projects/*/locations/*/corpora/*/indexes/*/operations/*}") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet("/v1/{name=projects/*/locations/*/corpora/*/operations/*}") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet( + "/v1/{name=projects/*/locations/*/indexEndpoints/*/operations/*}") + .build()) + .build()) + .put( + "google.longrunning.Operations.ListOperations", + HttpRule.newBuilder() + .setGet("/v1/{name=projects/*/locations/*}/operations") + .build()) + .build()); + + HttpJsonCallSettings createAssetTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(createAssetMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings updateAssetTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(updateAssetMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("asset.name", String.valueOf(request.getAsset().getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings getAssetTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getAssetMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings listAssetsTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(listAssetsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings deleteAssetTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(deleteAssetMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings uploadAssetTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(uploadAssetMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings + generateRetrievalUrlTransportSettings = + HttpJsonCallSettings + .newBuilder() + .setMethodDescriptor(generateRetrievalUrlMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings analyzeAssetTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(analyzeAssetMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings indexAssetTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(indexAssetMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings removeIndexAssetTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(removeIndexAssetMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings + viewIndexedAssetsTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(viewIndexedAssetsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("index", String.valueOf(request.getIndex())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings createIndexTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(createIndexMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings updateIndexTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(updateIndexMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("index.name", String.valueOf(request.getIndex().getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings getIndexTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getIndexMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings listIndexesTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(listIndexesMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings deleteIndexTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(deleteIndexMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings createCorpusTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(createCorpusMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings getCorpusTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getCorpusMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings updateCorpusTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(updateCorpusMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("corpus.name", String.valueOf(request.getCorpus().getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings listCorporaTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(listCorporaMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings deleteCorpusTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(deleteCorpusMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings analyzeCorpusTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(analyzeCorpusMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings createDataSchemaTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(createDataSchemaMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings updateDataSchemaTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(updateDataSchemaMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add( + "data_schema.name", String.valueOf(request.getDataSchema().getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings getDataSchemaTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getDataSchemaMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings deleteDataSchemaTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(deleteDataSchemaMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings + listDataSchemasTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(listDataSchemasMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings createAnnotationTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(createAnnotationMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings getAnnotationTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getAnnotationMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings + listAnnotationsTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(listAnnotationsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings updateAnnotationTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(updateAnnotationMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("annotation.name", String.valueOf(request.getAnnotation().getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings deleteAnnotationTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(deleteAnnotationMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings clipAssetTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(clipAssetMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings + generateHlsUriTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(generateHlsUriMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings importAssetsTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(importAssetsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings + createSearchConfigTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(createSearchConfigMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings + updateSearchConfigTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(updateSearchConfigMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add( + "search_config.name", + String.valueOf(request.getSearchConfig().getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings getSearchConfigTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getSearchConfigMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings deleteSearchConfigTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(deleteSearchConfigMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings + listSearchConfigsTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(listSearchConfigsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings + createSearchHypernymTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(createSearchHypernymMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings + updateSearchHypernymTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(updateSearchHypernymMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add( + "search_hypernym.name", + String.valueOf(request.getSearchHypernym().getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings + getSearchHypernymTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getSearchHypernymMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings deleteSearchHypernymTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(deleteSearchHypernymMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings + listSearchHypernymsTransportSettings = + HttpJsonCallSettings + .newBuilder() + .setMethodDescriptor(listSearchHypernymsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings searchAssetsTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(searchAssetsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("corpus", String.valueOf(request.getCorpus())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings + searchIndexEndpointTransportSettings = + HttpJsonCallSettings + .newBuilder() + .setMethodDescriptor(searchIndexEndpointMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("index_endpoint", String.valueOf(request.getIndexEndpoint())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings + createIndexEndpointTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(createIndexEndpointMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings getIndexEndpointTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getIndexEndpointMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings + listIndexEndpointsTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(listIndexEndpointsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings + updateIndexEndpointTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(updateIndexEndpointMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add( + "index_endpoint.name", + String.valueOf(request.getIndexEndpoint().getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings + deleteIndexEndpointTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(deleteIndexEndpointMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings deployIndexTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(deployIndexMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("index_endpoint", String.valueOf(request.getIndexEndpoint())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings undeployIndexTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(undeployIndexMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("index_endpoint", String.valueOf(request.getIndexEndpoint())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings createCollectionTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(createCollectionMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings deleteCollectionTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(deleteCollectionMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings getCollectionTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getCollectionMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings updateCollectionTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(updateCollectionMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("collection.name", String.valueOf(request.getCollection().getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings + listCollectionsTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(listCollectionsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings + addCollectionItemTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(addCollectionItemMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add( + "item.collection", String.valueOf(request.getItem().getCollection())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings + removeCollectionItemTransportSettings = + HttpJsonCallSettings + .newBuilder() + .setMethodDescriptor(removeCollectionItemMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add( + "item.collection", String.valueOf(request.getItem().getCollection())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings + viewCollectionItemsTransportSettings = + HttpJsonCallSettings + .newBuilder() + .setMethodDescriptor(viewCollectionItemsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("collection", String.valueOf(request.getCollection())); + return builder.build(); + }) + .build(); + + this.createAssetCallable = + callableFactory.createUnaryCallable( + createAssetTransportSettings, settings.createAssetSettings(), clientContext); + this.updateAssetCallable = + callableFactory.createUnaryCallable( + updateAssetTransportSettings, settings.updateAssetSettings(), clientContext); + this.getAssetCallable = + callableFactory.createUnaryCallable( + getAssetTransportSettings, settings.getAssetSettings(), clientContext); + this.listAssetsCallable = + callableFactory.createUnaryCallable( + listAssetsTransportSettings, settings.listAssetsSettings(), clientContext); + this.listAssetsPagedCallable = + callableFactory.createPagedCallable( + listAssetsTransportSettings, settings.listAssetsSettings(), clientContext); + this.deleteAssetCallable = + callableFactory.createUnaryCallable( + deleteAssetTransportSettings, settings.deleteAssetSettings(), clientContext); + this.deleteAssetOperationCallable = + callableFactory.createOperationCallable( + deleteAssetTransportSettings, + settings.deleteAssetOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.uploadAssetCallable = + callableFactory.createUnaryCallable( + uploadAssetTransportSettings, settings.uploadAssetSettings(), clientContext); + this.uploadAssetOperationCallable = + callableFactory.createOperationCallable( + uploadAssetTransportSettings, + settings.uploadAssetOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.generateRetrievalUrlCallable = + callableFactory.createUnaryCallable( + generateRetrievalUrlTransportSettings, + settings.generateRetrievalUrlSettings(), + clientContext); + this.analyzeAssetCallable = + callableFactory.createUnaryCallable( + analyzeAssetTransportSettings, settings.analyzeAssetSettings(), clientContext); + this.analyzeAssetOperationCallable = + callableFactory.createOperationCallable( + analyzeAssetTransportSettings, + settings.analyzeAssetOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.indexAssetCallable = + callableFactory.createUnaryCallable( + indexAssetTransportSettings, settings.indexAssetSettings(), clientContext); + this.indexAssetOperationCallable = + callableFactory.createOperationCallable( + indexAssetTransportSettings, + settings.indexAssetOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.removeIndexAssetCallable = + callableFactory.createUnaryCallable( + removeIndexAssetTransportSettings, settings.removeIndexAssetSettings(), clientContext); + this.removeIndexAssetOperationCallable = + callableFactory.createOperationCallable( + removeIndexAssetTransportSettings, + settings.removeIndexAssetOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.viewIndexedAssetsCallable = + callableFactory.createUnaryCallable( + viewIndexedAssetsTransportSettings, + settings.viewIndexedAssetsSettings(), + clientContext); + this.viewIndexedAssetsPagedCallable = + callableFactory.createPagedCallable( + viewIndexedAssetsTransportSettings, + settings.viewIndexedAssetsSettings(), + clientContext); + this.createIndexCallable = + callableFactory.createUnaryCallable( + createIndexTransportSettings, settings.createIndexSettings(), clientContext); + this.createIndexOperationCallable = + callableFactory.createOperationCallable( + createIndexTransportSettings, + settings.createIndexOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.updateIndexCallable = + callableFactory.createUnaryCallable( + updateIndexTransportSettings, settings.updateIndexSettings(), clientContext); + this.updateIndexOperationCallable = + callableFactory.createOperationCallable( + updateIndexTransportSettings, + settings.updateIndexOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.getIndexCallable = + callableFactory.createUnaryCallable( + getIndexTransportSettings, settings.getIndexSettings(), clientContext); + this.listIndexesCallable = + callableFactory.createUnaryCallable( + listIndexesTransportSettings, settings.listIndexesSettings(), clientContext); + this.listIndexesPagedCallable = + callableFactory.createPagedCallable( + listIndexesTransportSettings, settings.listIndexesSettings(), clientContext); + this.deleteIndexCallable = + callableFactory.createUnaryCallable( + deleteIndexTransportSettings, settings.deleteIndexSettings(), clientContext); + this.deleteIndexOperationCallable = + callableFactory.createOperationCallable( + deleteIndexTransportSettings, + settings.deleteIndexOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.createCorpusCallable = + callableFactory.createUnaryCallable( + createCorpusTransportSettings, settings.createCorpusSettings(), clientContext); + this.createCorpusOperationCallable = + callableFactory.createOperationCallable( + createCorpusTransportSettings, + settings.createCorpusOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.getCorpusCallable = + callableFactory.createUnaryCallable( + getCorpusTransportSettings, settings.getCorpusSettings(), clientContext); + this.updateCorpusCallable = + callableFactory.createUnaryCallable( + updateCorpusTransportSettings, settings.updateCorpusSettings(), clientContext); + this.listCorporaCallable = + callableFactory.createUnaryCallable( + listCorporaTransportSettings, settings.listCorporaSettings(), clientContext); + this.listCorporaPagedCallable = + callableFactory.createPagedCallable( + listCorporaTransportSettings, settings.listCorporaSettings(), clientContext); + this.deleteCorpusCallable = + callableFactory.createUnaryCallable( + deleteCorpusTransportSettings, settings.deleteCorpusSettings(), clientContext); + this.analyzeCorpusCallable = + callableFactory.createUnaryCallable( + analyzeCorpusTransportSettings, settings.analyzeCorpusSettings(), clientContext); + this.analyzeCorpusOperationCallable = + callableFactory.createOperationCallable( + analyzeCorpusTransportSettings, + settings.analyzeCorpusOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.createDataSchemaCallable = + callableFactory.createUnaryCallable( + createDataSchemaTransportSettings, settings.createDataSchemaSettings(), clientContext); + this.updateDataSchemaCallable = + callableFactory.createUnaryCallable( + updateDataSchemaTransportSettings, settings.updateDataSchemaSettings(), clientContext); + this.getDataSchemaCallable = + callableFactory.createUnaryCallable( + getDataSchemaTransportSettings, settings.getDataSchemaSettings(), clientContext); + this.deleteDataSchemaCallable = + callableFactory.createUnaryCallable( + deleteDataSchemaTransportSettings, settings.deleteDataSchemaSettings(), clientContext); + this.listDataSchemasCallable = + callableFactory.createUnaryCallable( + listDataSchemasTransportSettings, settings.listDataSchemasSettings(), clientContext); + this.listDataSchemasPagedCallable = + callableFactory.createPagedCallable( + listDataSchemasTransportSettings, settings.listDataSchemasSettings(), clientContext); + this.createAnnotationCallable = + callableFactory.createUnaryCallable( + createAnnotationTransportSettings, settings.createAnnotationSettings(), clientContext); + this.getAnnotationCallable = + callableFactory.createUnaryCallable( + getAnnotationTransportSettings, settings.getAnnotationSettings(), clientContext); + this.listAnnotationsCallable = + callableFactory.createUnaryCallable( + listAnnotationsTransportSettings, settings.listAnnotationsSettings(), clientContext); + this.listAnnotationsPagedCallable = + callableFactory.createPagedCallable( + listAnnotationsTransportSettings, settings.listAnnotationsSettings(), clientContext); + this.updateAnnotationCallable = + callableFactory.createUnaryCallable( + updateAnnotationTransportSettings, settings.updateAnnotationSettings(), clientContext); + this.deleteAnnotationCallable = + callableFactory.createUnaryCallable( + deleteAnnotationTransportSettings, settings.deleteAnnotationSettings(), clientContext); + this.clipAssetCallable = + callableFactory.createUnaryCallable( + clipAssetTransportSettings, settings.clipAssetSettings(), clientContext); + this.generateHlsUriCallable = + callableFactory.createUnaryCallable( + generateHlsUriTransportSettings, settings.generateHlsUriSettings(), clientContext); + this.importAssetsCallable = + callableFactory.createUnaryCallable( + importAssetsTransportSettings, settings.importAssetsSettings(), clientContext); + this.importAssetsOperationCallable = + callableFactory.createOperationCallable( + importAssetsTransportSettings, + settings.importAssetsOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.createSearchConfigCallable = + callableFactory.createUnaryCallable( + createSearchConfigTransportSettings, + settings.createSearchConfigSettings(), + clientContext); + this.updateSearchConfigCallable = + callableFactory.createUnaryCallable( + updateSearchConfigTransportSettings, + settings.updateSearchConfigSettings(), + clientContext); + this.getSearchConfigCallable = + callableFactory.createUnaryCallable( + getSearchConfigTransportSettings, settings.getSearchConfigSettings(), clientContext); + this.deleteSearchConfigCallable = + callableFactory.createUnaryCallable( + deleteSearchConfigTransportSettings, + settings.deleteSearchConfigSettings(), + clientContext); + this.listSearchConfigsCallable = + callableFactory.createUnaryCallable( + listSearchConfigsTransportSettings, + settings.listSearchConfigsSettings(), + clientContext); + this.listSearchConfigsPagedCallable = + callableFactory.createPagedCallable( + listSearchConfigsTransportSettings, + settings.listSearchConfigsSettings(), + clientContext); + this.createSearchHypernymCallable = + callableFactory.createUnaryCallable( + createSearchHypernymTransportSettings, + settings.createSearchHypernymSettings(), + clientContext); + this.updateSearchHypernymCallable = + callableFactory.createUnaryCallable( + updateSearchHypernymTransportSettings, + settings.updateSearchHypernymSettings(), + clientContext); + this.getSearchHypernymCallable = + callableFactory.createUnaryCallable( + getSearchHypernymTransportSettings, + settings.getSearchHypernymSettings(), + clientContext); + this.deleteSearchHypernymCallable = + callableFactory.createUnaryCallable( + deleteSearchHypernymTransportSettings, + settings.deleteSearchHypernymSettings(), + clientContext); + this.listSearchHypernymsCallable = + callableFactory.createUnaryCallable( + listSearchHypernymsTransportSettings, + settings.listSearchHypernymsSettings(), + clientContext); + this.listSearchHypernymsPagedCallable = + callableFactory.createPagedCallable( + listSearchHypernymsTransportSettings, + settings.listSearchHypernymsSettings(), + clientContext); + this.searchAssetsCallable = + callableFactory.createUnaryCallable( + searchAssetsTransportSettings, settings.searchAssetsSettings(), clientContext); + this.searchAssetsPagedCallable = + callableFactory.createPagedCallable( + searchAssetsTransportSettings, settings.searchAssetsSettings(), clientContext); + this.searchIndexEndpointCallable = + callableFactory.createUnaryCallable( + searchIndexEndpointTransportSettings, + settings.searchIndexEndpointSettings(), + clientContext); + this.searchIndexEndpointPagedCallable = + callableFactory.createPagedCallable( + searchIndexEndpointTransportSettings, + settings.searchIndexEndpointSettings(), + clientContext); + this.createIndexEndpointCallable = + callableFactory.createUnaryCallable( + createIndexEndpointTransportSettings, + settings.createIndexEndpointSettings(), + clientContext); + this.createIndexEndpointOperationCallable = + callableFactory.createOperationCallable( + createIndexEndpointTransportSettings, + settings.createIndexEndpointOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.getIndexEndpointCallable = + callableFactory.createUnaryCallable( + getIndexEndpointTransportSettings, settings.getIndexEndpointSettings(), clientContext); + this.listIndexEndpointsCallable = + callableFactory.createUnaryCallable( + listIndexEndpointsTransportSettings, + settings.listIndexEndpointsSettings(), + clientContext); + this.listIndexEndpointsPagedCallable = + callableFactory.createPagedCallable( + listIndexEndpointsTransportSettings, + settings.listIndexEndpointsSettings(), + clientContext); + this.updateIndexEndpointCallable = + callableFactory.createUnaryCallable( + updateIndexEndpointTransportSettings, + settings.updateIndexEndpointSettings(), + clientContext); + this.updateIndexEndpointOperationCallable = + callableFactory.createOperationCallable( + updateIndexEndpointTransportSettings, + settings.updateIndexEndpointOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.deleteIndexEndpointCallable = + callableFactory.createUnaryCallable( + deleteIndexEndpointTransportSettings, + settings.deleteIndexEndpointSettings(), + clientContext); + this.deleteIndexEndpointOperationCallable = + callableFactory.createOperationCallable( + deleteIndexEndpointTransportSettings, + settings.deleteIndexEndpointOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.deployIndexCallable = + callableFactory.createUnaryCallable( + deployIndexTransportSettings, settings.deployIndexSettings(), clientContext); + this.deployIndexOperationCallable = + callableFactory.createOperationCallable( + deployIndexTransportSettings, + settings.deployIndexOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.undeployIndexCallable = + callableFactory.createUnaryCallable( + undeployIndexTransportSettings, settings.undeployIndexSettings(), clientContext); + this.undeployIndexOperationCallable = + callableFactory.createOperationCallable( + undeployIndexTransportSettings, + settings.undeployIndexOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.createCollectionCallable = + callableFactory.createUnaryCallable( + createCollectionTransportSettings, settings.createCollectionSettings(), clientContext); + this.createCollectionOperationCallable = + callableFactory.createOperationCallable( + createCollectionTransportSettings, + settings.createCollectionOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.deleteCollectionCallable = + callableFactory.createUnaryCallable( + deleteCollectionTransportSettings, settings.deleteCollectionSettings(), clientContext); + this.deleteCollectionOperationCallable = + callableFactory.createOperationCallable( + deleteCollectionTransportSettings, + settings.deleteCollectionOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.getCollectionCallable = + callableFactory.createUnaryCallable( + getCollectionTransportSettings, settings.getCollectionSettings(), clientContext); + this.updateCollectionCallable = + callableFactory.createUnaryCallable( + updateCollectionTransportSettings, settings.updateCollectionSettings(), clientContext); + this.listCollectionsCallable = + callableFactory.createUnaryCallable( + listCollectionsTransportSettings, settings.listCollectionsSettings(), clientContext); + this.listCollectionsPagedCallable = + callableFactory.createPagedCallable( + listCollectionsTransportSettings, settings.listCollectionsSettings(), clientContext); + this.addCollectionItemCallable = + callableFactory.createUnaryCallable( + addCollectionItemTransportSettings, + settings.addCollectionItemSettings(), + clientContext); + this.removeCollectionItemCallable = + callableFactory.createUnaryCallable( + removeCollectionItemTransportSettings, + settings.removeCollectionItemSettings(), + clientContext); + this.viewCollectionItemsCallable = + callableFactory.createUnaryCallable( + viewCollectionItemsTransportSettings, + settings.viewCollectionItemsSettings(), + clientContext); + this.viewCollectionItemsPagedCallable = + callableFactory.createPagedCallable( + viewCollectionItemsTransportSettings, + settings.viewCollectionItemsSettings(), + clientContext); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + @InternalApi + public static List getMethodDescriptors() { + List methodDescriptors = new ArrayList<>(); + methodDescriptors.add(createAssetMethodDescriptor); + methodDescriptors.add(updateAssetMethodDescriptor); + methodDescriptors.add(getAssetMethodDescriptor); + methodDescriptors.add(listAssetsMethodDescriptor); + methodDescriptors.add(deleteAssetMethodDescriptor); + methodDescriptors.add(uploadAssetMethodDescriptor); + methodDescriptors.add(generateRetrievalUrlMethodDescriptor); + methodDescriptors.add(analyzeAssetMethodDescriptor); + methodDescriptors.add(indexAssetMethodDescriptor); + methodDescriptors.add(removeIndexAssetMethodDescriptor); + methodDescriptors.add(viewIndexedAssetsMethodDescriptor); + methodDescriptors.add(createIndexMethodDescriptor); + methodDescriptors.add(updateIndexMethodDescriptor); + methodDescriptors.add(getIndexMethodDescriptor); + methodDescriptors.add(listIndexesMethodDescriptor); + methodDescriptors.add(deleteIndexMethodDescriptor); + methodDescriptors.add(createCorpusMethodDescriptor); + methodDescriptors.add(getCorpusMethodDescriptor); + methodDescriptors.add(updateCorpusMethodDescriptor); + methodDescriptors.add(listCorporaMethodDescriptor); + methodDescriptors.add(deleteCorpusMethodDescriptor); + methodDescriptors.add(analyzeCorpusMethodDescriptor); + methodDescriptors.add(createDataSchemaMethodDescriptor); + methodDescriptors.add(updateDataSchemaMethodDescriptor); + methodDescriptors.add(getDataSchemaMethodDescriptor); + methodDescriptors.add(deleteDataSchemaMethodDescriptor); + methodDescriptors.add(listDataSchemasMethodDescriptor); + methodDescriptors.add(createAnnotationMethodDescriptor); + methodDescriptors.add(getAnnotationMethodDescriptor); + methodDescriptors.add(listAnnotationsMethodDescriptor); + methodDescriptors.add(updateAnnotationMethodDescriptor); + methodDescriptors.add(deleteAnnotationMethodDescriptor); + methodDescriptors.add(clipAssetMethodDescriptor); + methodDescriptors.add(generateHlsUriMethodDescriptor); + methodDescriptors.add(importAssetsMethodDescriptor); + methodDescriptors.add(createSearchConfigMethodDescriptor); + methodDescriptors.add(updateSearchConfigMethodDescriptor); + methodDescriptors.add(getSearchConfigMethodDescriptor); + methodDescriptors.add(deleteSearchConfigMethodDescriptor); + methodDescriptors.add(listSearchConfigsMethodDescriptor); + methodDescriptors.add(createSearchHypernymMethodDescriptor); + methodDescriptors.add(updateSearchHypernymMethodDescriptor); + methodDescriptors.add(getSearchHypernymMethodDescriptor); + methodDescriptors.add(deleteSearchHypernymMethodDescriptor); + methodDescriptors.add(listSearchHypernymsMethodDescriptor); + methodDescriptors.add(searchAssetsMethodDescriptor); + methodDescriptors.add(searchIndexEndpointMethodDescriptor); + methodDescriptors.add(createIndexEndpointMethodDescriptor); + methodDescriptors.add(getIndexEndpointMethodDescriptor); + methodDescriptors.add(listIndexEndpointsMethodDescriptor); + methodDescriptors.add(updateIndexEndpointMethodDescriptor); + methodDescriptors.add(deleteIndexEndpointMethodDescriptor); + methodDescriptors.add(deployIndexMethodDescriptor); + methodDescriptors.add(undeployIndexMethodDescriptor); + methodDescriptors.add(createCollectionMethodDescriptor); + methodDescriptors.add(deleteCollectionMethodDescriptor); + methodDescriptors.add(getCollectionMethodDescriptor); + methodDescriptors.add(updateCollectionMethodDescriptor); + methodDescriptors.add(listCollectionsMethodDescriptor); + methodDescriptors.add(addCollectionItemMethodDescriptor); + methodDescriptors.add(removeCollectionItemMethodDescriptor); + methodDescriptors.add(viewCollectionItemsMethodDescriptor); + return methodDescriptors; + } + + public HttpJsonOperationsStub getHttpJsonOperationsStub() { + return httpJsonOperationsStub; + } + + @Override + public UnaryCallable createAssetCallable() { + return createAssetCallable; + } + + @Override + public UnaryCallable updateAssetCallable() { + return updateAssetCallable; + } + + @Override + public UnaryCallable getAssetCallable() { + return getAssetCallable; + } + + @Override + public UnaryCallable listAssetsCallable() { + return listAssetsCallable; + } + + @Override + public UnaryCallable listAssetsPagedCallable() { + return listAssetsPagedCallable; + } + + @Override + public UnaryCallable deleteAssetCallable() { + return deleteAssetCallable; + } + + @Override + public OperationCallable + deleteAssetOperationCallable() { + return deleteAssetOperationCallable; + } + + @Override + public UnaryCallable uploadAssetCallable() { + return uploadAssetCallable; + } + + @Override + public OperationCallable + uploadAssetOperationCallable() { + return uploadAssetOperationCallable; + } + + @Override + public UnaryCallable + generateRetrievalUrlCallable() { + return generateRetrievalUrlCallable; + } + + @Override + public UnaryCallable analyzeAssetCallable() { + return analyzeAssetCallable; + } + + @Override + public OperationCallable + analyzeAssetOperationCallable() { + return analyzeAssetOperationCallable; + } + + @Override + public UnaryCallable indexAssetCallable() { + return indexAssetCallable; + } + + @Override + public OperationCallable + indexAssetOperationCallable() { + return indexAssetOperationCallable; + } + + @Override + public UnaryCallable removeIndexAssetCallable() { + return removeIndexAssetCallable; + } + + @Override + public OperationCallable< + RemoveIndexAssetRequest, RemoveIndexAssetResponse, RemoveIndexAssetMetadata> + removeIndexAssetOperationCallable() { + return removeIndexAssetOperationCallable; + } + + @Override + public UnaryCallable + viewIndexedAssetsCallable() { + return viewIndexedAssetsCallable; + } + + @Override + public UnaryCallable + viewIndexedAssetsPagedCallable() { + return viewIndexedAssetsPagedCallable; + } + + @Override + public UnaryCallable createIndexCallable() { + return createIndexCallable; + } + + @Override + public OperationCallable + createIndexOperationCallable() { + return createIndexOperationCallable; + } + + @Override + public UnaryCallable updateIndexCallable() { + return updateIndexCallable; + } + + @Override + public OperationCallable + updateIndexOperationCallable() { + return updateIndexOperationCallable; + } + + @Override + public UnaryCallable getIndexCallable() { + return getIndexCallable; + } + + @Override + public UnaryCallable listIndexesCallable() { + return listIndexesCallable; + } + + @Override + public UnaryCallable listIndexesPagedCallable() { + return listIndexesPagedCallable; + } + + @Override + public UnaryCallable deleteIndexCallable() { + return deleteIndexCallable; + } + + @Override + public OperationCallable + deleteIndexOperationCallable() { + return deleteIndexOperationCallable; + } + + @Override + public UnaryCallable createCorpusCallable() { + return createCorpusCallable; + } + + @Override + public OperationCallable + createCorpusOperationCallable() { + return createCorpusOperationCallable; + } + + @Override + public UnaryCallable getCorpusCallable() { + return getCorpusCallable; + } + + @Override + public UnaryCallable updateCorpusCallable() { + return updateCorpusCallable; + } + + @Override + public UnaryCallable listCorporaCallable() { + return listCorporaCallable; + } + + @Override + public UnaryCallable listCorporaPagedCallable() { + return listCorporaPagedCallable; + } + + @Override + public UnaryCallable deleteCorpusCallable() { + return deleteCorpusCallable; + } + + @Override + public UnaryCallable analyzeCorpusCallable() { + return analyzeCorpusCallable; + } + + @Override + public OperationCallable + analyzeCorpusOperationCallable() { + return analyzeCorpusOperationCallable; + } + + @Override + public UnaryCallable createDataSchemaCallable() { + return createDataSchemaCallable; + } + + @Override + public UnaryCallable updateDataSchemaCallable() { + return updateDataSchemaCallable; + } + + @Override + public UnaryCallable getDataSchemaCallable() { + return getDataSchemaCallable; + } + + @Override + public UnaryCallable deleteDataSchemaCallable() { + return deleteDataSchemaCallable; + } + + @Override + public UnaryCallable listDataSchemasCallable() { + return listDataSchemasCallable; + } + + @Override + public UnaryCallable + listDataSchemasPagedCallable() { + return listDataSchemasPagedCallable; + } + + @Override + public UnaryCallable createAnnotationCallable() { + return createAnnotationCallable; + } + + @Override + public UnaryCallable getAnnotationCallable() { + return getAnnotationCallable; + } + + @Override + public UnaryCallable listAnnotationsCallable() { + return listAnnotationsCallable; + } + + @Override + public UnaryCallable + listAnnotationsPagedCallable() { + return listAnnotationsPagedCallable; + } + + @Override + public UnaryCallable updateAnnotationCallable() { + return updateAnnotationCallable; + } + + @Override + public UnaryCallable deleteAnnotationCallable() { + return deleteAnnotationCallable; + } + + @Override + public UnaryCallable clipAssetCallable() { + return clipAssetCallable; + } + + @Override + public UnaryCallable generateHlsUriCallable() { + return generateHlsUriCallable; + } + + @Override + public UnaryCallable importAssetsCallable() { + return importAssetsCallable; + } + + @Override + public OperationCallable + importAssetsOperationCallable() { + return importAssetsOperationCallable; + } + + @Override + public UnaryCallable createSearchConfigCallable() { + return createSearchConfigCallable; + } + + @Override + public UnaryCallable updateSearchConfigCallable() { + return updateSearchConfigCallable; + } + + @Override + public UnaryCallable getSearchConfigCallable() { + return getSearchConfigCallable; + } + + @Override + public UnaryCallable deleteSearchConfigCallable() { + return deleteSearchConfigCallable; + } + + @Override + public UnaryCallable + listSearchConfigsCallable() { + return listSearchConfigsCallable; + } + + @Override + public UnaryCallable + listSearchConfigsPagedCallable() { + return listSearchConfigsPagedCallable; + } + + @Override + public UnaryCallable createSearchHypernymCallable() { + return createSearchHypernymCallable; + } + + @Override + public UnaryCallable updateSearchHypernymCallable() { + return updateSearchHypernymCallable; + } + + @Override + public UnaryCallable getSearchHypernymCallable() { + return getSearchHypernymCallable; + } + + @Override + public UnaryCallable deleteSearchHypernymCallable() { + return deleteSearchHypernymCallable; + } + + @Override + public UnaryCallable + listSearchHypernymsCallable() { + return listSearchHypernymsCallable; + } + + @Override + public UnaryCallable + listSearchHypernymsPagedCallable() { + return listSearchHypernymsPagedCallable; + } + + @Override + public UnaryCallable searchAssetsCallable() { + return searchAssetsCallable; + } + + @Override + public UnaryCallable searchAssetsPagedCallable() { + return searchAssetsPagedCallable; + } + + @Override + public UnaryCallable + searchIndexEndpointCallable() { + return searchIndexEndpointCallable; + } + + @Override + public UnaryCallable + searchIndexEndpointPagedCallable() { + return searchIndexEndpointPagedCallable; + } + + @Override + public UnaryCallable createIndexEndpointCallable() { + return createIndexEndpointCallable; + } + + @Override + public OperationCallable + createIndexEndpointOperationCallable() { + return createIndexEndpointOperationCallable; + } + + @Override + public UnaryCallable getIndexEndpointCallable() { + return getIndexEndpointCallable; + } + + @Override + public UnaryCallable + listIndexEndpointsCallable() { + return listIndexEndpointsCallable; + } + + @Override + public UnaryCallable + listIndexEndpointsPagedCallable() { + return listIndexEndpointsPagedCallable; + } + + @Override + public UnaryCallable updateIndexEndpointCallable() { + return updateIndexEndpointCallable; + } + + @Override + public OperationCallable + updateIndexEndpointOperationCallable() { + return updateIndexEndpointOperationCallable; + } + + @Override + public UnaryCallable deleteIndexEndpointCallable() { + return deleteIndexEndpointCallable; + } + + @Override + public OperationCallable + deleteIndexEndpointOperationCallable() { + return deleteIndexEndpointOperationCallable; + } + + @Override + public UnaryCallable deployIndexCallable() { + return deployIndexCallable; + } + + @Override + public OperationCallable + deployIndexOperationCallable() { + return deployIndexOperationCallable; + } + + @Override + public UnaryCallable undeployIndexCallable() { + return undeployIndexCallable; + } + + @Override + public OperationCallable + undeployIndexOperationCallable() { + return undeployIndexOperationCallable; + } + + @Override + public UnaryCallable createCollectionCallable() { + return createCollectionCallable; + } + + @Override + public OperationCallable + createCollectionOperationCallable() { + return createCollectionOperationCallable; + } + + @Override + public UnaryCallable deleteCollectionCallable() { + return deleteCollectionCallable; + } + + @Override + public OperationCallable + deleteCollectionOperationCallable() { + return deleteCollectionOperationCallable; + } + + @Override + public UnaryCallable getCollectionCallable() { + return getCollectionCallable; + } + + @Override + public UnaryCallable updateCollectionCallable() { + return updateCollectionCallable; + } + + @Override + public UnaryCallable listCollectionsCallable() { + return listCollectionsCallable; + } + + @Override + public UnaryCallable + listCollectionsPagedCallable() { + return listCollectionsPagedCallable; + } + + @Override + public UnaryCallable + addCollectionItemCallable() { + return addCollectionItemCallable; + } + + @Override + public UnaryCallable + removeCollectionItemCallable() { + return removeCollectionItemCallable; + } + + @Override + public UnaryCallable + viewCollectionItemsCallable() { + return viewCollectionItemsCallable; + } + + @Override + public UnaryCallable + viewCollectionItemsPagedCallable() { + return viewCollectionItemsPagedCallable; + } + + @Override + public BidiStreamingCallable ingestAssetCallable() { + throw new UnsupportedOperationException( + "Not implemented: ingestAssetCallable(). REST transport is not implemented for this method yet."); + } + + @Override + public final void close() { + try { + backgroundResources.close(); + } catch (RuntimeException e) { + throw e; + } catch (Exception e) { + throw new IllegalStateException("Failed to close resource", e); + } + } + + @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/java-visionai/google-cloud-visionai/src/main/java/com/google/cloud/visionai/v1/stub/LiveVideoAnalyticsStub.java b/java-visionai/google-cloud-visionai/src/main/java/com/google/cloud/visionai/v1/stub/LiveVideoAnalyticsStub.java new file mode 100644 index 000000000000..11e1bc29ddef --- /dev/null +++ b/java-visionai/google-cloud-visionai/src/main/java/com/google/cloud/visionai/v1/stub/LiveVideoAnalyticsStub.java @@ -0,0 +1,222 @@ +/* + * Copyright 2024 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.visionai.v1.stub; + +import static com.google.cloud.visionai.v1.LiveVideoAnalyticsClient.ListAnalysesPagedResponse; +import static com.google.cloud.visionai.v1.LiveVideoAnalyticsClient.ListOperatorsPagedResponse; +import static com.google.cloud.visionai.v1.LiveVideoAnalyticsClient.ListProcessesPagedResponse; +import static com.google.cloud.visionai.v1.LiveVideoAnalyticsClient.ListPublicOperatorsPagedResponse; + +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.visionai.v1.Analysis; +import com.google.cloud.visionai.v1.BatchRunProcessRequest; +import com.google.cloud.visionai.v1.BatchRunProcessResponse; +import com.google.cloud.visionai.v1.CreateAnalysisRequest; +import com.google.cloud.visionai.v1.CreateOperatorRequest; +import com.google.cloud.visionai.v1.CreateProcessRequest; +import com.google.cloud.visionai.v1.DeleteAnalysisRequest; +import com.google.cloud.visionai.v1.DeleteOperatorRequest; +import com.google.cloud.visionai.v1.DeleteProcessRequest; +import com.google.cloud.visionai.v1.GetAnalysisRequest; +import com.google.cloud.visionai.v1.GetOperatorRequest; +import com.google.cloud.visionai.v1.GetProcessRequest; +import com.google.cloud.visionai.v1.ListAnalysesRequest; +import com.google.cloud.visionai.v1.ListAnalysesResponse; +import com.google.cloud.visionai.v1.ListOperatorsRequest; +import com.google.cloud.visionai.v1.ListOperatorsResponse; +import com.google.cloud.visionai.v1.ListProcessesRequest; +import com.google.cloud.visionai.v1.ListProcessesResponse; +import com.google.cloud.visionai.v1.ListPublicOperatorsRequest; +import com.google.cloud.visionai.v1.ListPublicOperatorsResponse; +import com.google.cloud.visionai.v1.OperationMetadata; +import com.google.cloud.visionai.v1.Operator; +import com.google.cloud.visionai.v1.Process; +import com.google.cloud.visionai.v1.ResolveOperatorInfoRequest; +import com.google.cloud.visionai.v1.ResolveOperatorInfoResponse; +import com.google.cloud.visionai.v1.UpdateAnalysisRequest; +import com.google.cloud.visionai.v1.UpdateOperatorRequest; +import com.google.cloud.visionai.v1.UpdateProcessRequest; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.OperationsStub; +import com.google.protobuf.Empty; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Base stub class for the LiveVideoAnalytics service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") +public abstract class LiveVideoAnalyticsStub implements BackgroundResource { + + public OperationsStub getOperationsStub() { + return null; + } + + public com.google.api.gax.httpjson.longrunning.stub.OperationsStub getHttpJsonOperationsStub() { + return null; + } + + public UnaryCallable + listPublicOperatorsPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listPublicOperatorsPagedCallable()"); + } + + public UnaryCallable + listPublicOperatorsCallable() { + throw new UnsupportedOperationException("Not implemented: listPublicOperatorsCallable()"); + } + + public UnaryCallable + resolveOperatorInfoCallable() { + throw new UnsupportedOperationException("Not implemented: resolveOperatorInfoCallable()"); + } + + public UnaryCallable + listOperatorsPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listOperatorsPagedCallable()"); + } + + public UnaryCallable listOperatorsCallable() { + throw new UnsupportedOperationException("Not implemented: listOperatorsCallable()"); + } + + public UnaryCallable getOperatorCallable() { + throw new UnsupportedOperationException("Not implemented: getOperatorCallable()"); + } + + public OperationCallable + createOperatorOperationCallable() { + throw new UnsupportedOperationException("Not implemented: createOperatorOperationCallable()"); + } + + public UnaryCallable createOperatorCallable() { + throw new UnsupportedOperationException("Not implemented: createOperatorCallable()"); + } + + public OperationCallable + updateOperatorOperationCallable() { + throw new UnsupportedOperationException("Not implemented: updateOperatorOperationCallable()"); + } + + public UnaryCallable updateOperatorCallable() { + throw new UnsupportedOperationException("Not implemented: updateOperatorCallable()"); + } + + public OperationCallable + deleteOperatorOperationCallable() { + throw new UnsupportedOperationException("Not implemented: deleteOperatorOperationCallable()"); + } + + public UnaryCallable deleteOperatorCallable() { + throw new UnsupportedOperationException("Not implemented: deleteOperatorCallable()"); + } + + public UnaryCallable listAnalysesPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listAnalysesPagedCallable()"); + } + + public UnaryCallable listAnalysesCallable() { + throw new UnsupportedOperationException("Not implemented: listAnalysesCallable()"); + } + + public UnaryCallable getAnalysisCallable() { + throw new UnsupportedOperationException("Not implemented: getAnalysisCallable()"); + } + + public OperationCallable + createAnalysisOperationCallable() { + throw new UnsupportedOperationException("Not implemented: createAnalysisOperationCallable()"); + } + + public UnaryCallable createAnalysisCallable() { + throw new UnsupportedOperationException("Not implemented: createAnalysisCallable()"); + } + + public OperationCallable + updateAnalysisOperationCallable() { + throw new UnsupportedOperationException("Not implemented: updateAnalysisOperationCallable()"); + } + + public UnaryCallable updateAnalysisCallable() { + throw new UnsupportedOperationException("Not implemented: updateAnalysisCallable()"); + } + + public OperationCallable + deleteAnalysisOperationCallable() { + throw new UnsupportedOperationException("Not implemented: deleteAnalysisOperationCallable()"); + } + + public UnaryCallable deleteAnalysisCallable() { + throw new UnsupportedOperationException("Not implemented: deleteAnalysisCallable()"); + } + + public UnaryCallable + listProcessesPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listProcessesPagedCallable()"); + } + + public UnaryCallable listProcessesCallable() { + throw new UnsupportedOperationException("Not implemented: listProcessesCallable()"); + } + + public UnaryCallable getProcessCallable() { + throw new UnsupportedOperationException("Not implemented: getProcessCallable()"); + } + + public OperationCallable + createProcessOperationCallable() { + throw new UnsupportedOperationException("Not implemented: createProcessOperationCallable()"); + } + + public UnaryCallable createProcessCallable() { + throw new UnsupportedOperationException("Not implemented: createProcessCallable()"); + } + + public OperationCallable + updateProcessOperationCallable() { + throw new UnsupportedOperationException("Not implemented: updateProcessOperationCallable()"); + } + + public UnaryCallable updateProcessCallable() { + throw new UnsupportedOperationException("Not implemented: updateProcessCallable()"); + } + + public OperationCallable + deleteProcessOperationCallable() { + throw new UnsupportedOperationException("Not implemented: deleteProcessOperationCallable()"); + } + + public UnaryCallable deleteProcessCallable() { + throw new UnsupportedOperationException("Not implemented: deleteProcessCallable()"); + } + + public OperationCallable + batchRunProcessOperationCallable() { + throw new UnsupportedOperationException("Not implemented: batchRunProcessOperationCallable()"); + } + + public UnaryCallable batchRunProcessCallable() { + throw new UnsupportedOperationException("Not implemented: batchRunProcessCallable()"); + } + + @Override + public abstract void close(); +} diff --git a/java-visionai/google-cloud-visionai/src/main/java/com/google/cloud/visionai/v1/stub/LiveVideoAnalyticsStubSettings.java b/java-visionai/google-cloud-visionai/src/main/java/com/google/cloud/visionai/v1/stub/LiveVideoAnalyticsStubSettings.java new file mode 100644 index 000000000000..1e7bc2cbc7a4 --- /dev/null +++ b/java-visionai/google-cloud-visionai/src/main/java/com/google/cloud/visionai/v1/stub/LiveVideoAnalyticsStubSettings.java @@ -0,0 +1,1477 @@ +/* + * Copyright 2024 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.visionai.v1.stub; + +import static com.google.cloud.visionai.v1.LiveVideoAnalyticsClient.ListAnalysesPagedResponse; +import static com.google.cloud.visionai.v1.LiveVideoAnalyticsClient.ListOperatorsPagedResponse; +import static com.google.cloud.visionai.v1.LiveVideoAnalyticsClient.ListProcessesPagedResponse; +import static com.google.cloud.visionai.v1.LiveVideoAnalyticsClient.ListPublicOperatorsPagedResponse; + +import com.google.api.core.ApiFunction; +import com.google.api.core.ApiFuture; +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.httpjson.GaxHttpJsonProperties; +import com.google.api.gax.httpjson.HttpJsonTransportChannel; +import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider; +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.ApiCallContext; +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.PageContext; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.PagedListDescriptor; +import com.google.api.gax.rpc.PagedListResponseFactory; +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.api.gax.rpc.UnaryCallable; +import com.google.cloud.visionai.v1.Analysis; +import com.google.cloud.visionai.v1.BatchRunProcessRequest; +import com.google.cloud.visionai.v1.BatchRunProcessResponse; +import com.google.cloud.visionai.v1.CreateAnalysisRequest; +import com.google.cloud.visionai.v1.CreateOperatorRequest; +import com.google.cloud.visionai.v1.CreateProcessRequest; +import com.google.cloud.visionai.v1.DeleteAnalysisRequest; +import com.google.cloud.visionai.v1.DeleteOperatorRequest; +import com.google.cloud.visionai.v1.DeleteProcessRequest; +import com.google.cloud.visionai.v1.GetAnalysisRequest; +import com.google.cloud.visionai.v1.GetOperatorRequest; +import com.google.cloud.visionai.v1.GetProcessRequest; +import com.google.cloud.visionai.v1.ListAnalysesRequest; +import com.google.cloud.visionai.v1.ListAnalysesResponse; +import com.google.cloud.visionai.v1.ListOperatorsRequest; +import com.google.cloud.visionai.v1.ListOperatorsResponse; +import com.google.cloud.visionai.v1.ListProcessesRequest; +import com.google.cloud.visionai.v1.ListProcessesResponse; +import com.google.cloud.visionai.v1.ListPublicOperatorsRequest; +import com.google.cloud.visionai.v1.ListPublicOperatorsResponse; +import com.google.cloud.visionai.v1.OperationMetadata; +import com.google.cloud.visionai.v1.Operator; +import com.google.cloud.visionai.v1.Process; +import com.google.cloud.visionai.v1.ResolveOperatorInfoRequest; +import com.google.cloud.visionai.v1.ResolveOperatorInfoResponse; +import com.google.cloud.visionai.v1.UpdateAnalysisRequest; +import com.google.cloud.visionai.v1.UpdateOperatorRequest; +import com.google.cloud.visionai.v1.UpdateProcessRequest; +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 com.google.protobuf.Empty; +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 LiveVideoAnalyticsStub}. + * + *

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

    + *
  • The default service address (visionai.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 resolveOperatorInfo to 30 seconds: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * LiveVideoAnalyticsStubSettings.Builder liveVideoAnalyticsSettingsBuilder =
+ *     LiveVideoAnalyticsStubSettings.newBuilder();
+ * liveVideoAnalyticsSettingsBuilder
+ *     .resolveOperatorInfoSettings()
+ *     .setRetrySettings(
+ *         liveVideoAnalyticsSettingsBuilder
+ *             .resolveOperatorInfoSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * LiveVideoAnalyticsStubSettings liveVideoAnalyticsSettings =
+ *     liveVideoAnalyticsSettingsBuilder.build();
+ * }
+ */ +@Generated("by gapic-generator-java") +public class LiveVideoAnalyticsStubSettings 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 PagedCallSettings< + ListPublicOperatorsRequest, ListPublicOperatorsResponse, ListPublicOperatorsPagedResponse> + listPublicOperatorsSettings; + private final UnaryCallSettings + resolveOperatorInfoSettings; + private final PagedCallSettings< + ListOperatorsRequest, ListOperatorsResponse, ListOperatorsPagedResponse> + listOperatorsSettings; + private final UnaryCallSettings getOperatorSettings; + private final UnaryCallSettings createOperatorSettings; + private final OperationCallSettings + createOperatorOperationSettings; + private final UnaryCallSettings updateOperatorSettings; + private final OperationCallSettings + updateOperatorOperationSettings; + private final UnaryCallSettings deleteOperatorSettings; + private final OperationCallSettings + deleteOperatorOperationSettings; + private final PagedCallSettings< + ListAnalysesRequest, ListAnalysesResponse, ListAnalysesPagedResponse> + listAnalysesSettings; + private final UnaryCallSettings getAnalysisSettings; + private final UnaryCallSettings createAnalysisSettings; + private final OperationCallSettings + createAnalysisOperationSettings; + private final UnaryCallSettings updateAnalysisSettings; + private final OperationCallSettings + updateAnalysisOperationSettings; + private final UnaryCallSettings deleteAnalysisSettings; + private final OperationCallSettings + deleteAnalysisOperationSettings; + private final PagedCallSettings< + ListProcessesRequest, ListProcessesResponse, ListProcessesPagedResponse> + listProcessesSettings; + private final UnaryCallSettings getProcessSettings; + private final UnaryCallSettings createProcessSettings; + private final OperationCallSettings + createProcessOperationSettings; + private final UnaryCallSettings updateProcessSettings; + private final OperationCallSettings + updateProcessOperationSettings; + private final UnaryCallSettings deleteProcessSettings; + private final OperationCallSettings + deleteProcessOperationSettings; + private final UnaryCallSettings batchRunProcessSettings; + private final OperationCallSettings< + BatchRunProcessRequest, BatchRunProcessResponse, OperationMetadata> + batchRunProcessOperationSettings; + + private static final PagedListDescriptor< + ListPublicOperatorsRequest, ListPublicOperatorsResponse, Operator> + LIST_PUBLIC_OPERATORS_PAGE_STR_DESC = + new PagedListDescriptor< + ListPublicOperatorsRequest, ListPublicOperatorsResponse, Operator>() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListPublicOperatorsRequest injectToken( + ListPublicOperatorsRequest payload, String token) { + return ListPublicOperatorsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListPublicOperatorsRequest injectPageSize( + ListPublicOperatorsRequest payload, int pageSize) { + return ListPublicOperatorsRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListPublicOperatorsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListPublicOperatorsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListPublicOperatorsResponse payload) { + return payload.getOperatorsList() == null + ? ImmutableList.of() + : payload.getOperatorsList(); + } + }; + + private static final PagedListDescriptor + LIST_OPERATORS_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListOperatorsRequest injectToken(ListOperatorsRequest payload, String token) { + return ListOperatorsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListOperatorsRequest injectPageSize(ListOperatorsRequest payload, int pageSize) { + return ListOperatorsRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListOperatorsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListOperatorsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListOperatorsResponse payload) { + return payload.getOperatorsList() == null + ? ImmutableList.of() + : payload.getOperatorsList(); + } + }; + + private static final PagedListDescriptor + LIST_ANALYSES_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListAnalysesRequest injectToken(ListAnalysesRequest payload, String token) { + return ListAnalysesRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListAnalysesRequest injectPageSize(ListAnalysesRequest payload, int pageSize) { + return ListAnalysesRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListAnalysesRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListAnalysesResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListAnalysesResponse payload) { + return payload.getAnalysesList() == null + ? ImmutableList.of() + : payload.getAnalysesList(); + } + }; + + private static final PagedListDescriptor + LIST_PROCESSES_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListProcessesRequest injectToken(ListProcessesRequest payload, String token) { + return ListProcessesRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListProcessesRequest injectPageSize(ListProcessesRequest payload, int pageSize) { + return ListProcessesRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListProcessesRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListProcessesResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListProcessesResponse payload) { + return payload.getProcessesList() == null + ? ImmutableList.of() + : payload.getProcessesList(); + } + }; + + private static final PagedListResponseFactory< + ListPublicOperatorsRequest, ListPublicOperatorsResponse, ListPublicOperatorsPagedResponse> + LIST_PUBLIC_OPERATORS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListPublicOperatorsRequest, + ListPublicOperatorsResponse, + ListPublicOperatorsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListPublicOperatorsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext + pageContext = + PageContext.create( + callable, LIST_PUBLIC_OPERATORS_PAGE_STR_DESC, request, context); + return ListPublicOperatorsPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListOperatorsRequest, ListOperatorsResponse, ListOperatorsPagedResponse> + LIST_OPERATORS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListOperatorsRequest, ListOperatorsResponse, ListOperatorsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListOperatorsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, LIST_OPERATORS_PAGE_STR_DESC, request, context); + return ListOperatorsPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListAnalysesRequest, ListAnalysesResponse, ListAnalysesPagedResponse> + LIST_ANALYSES_PAGE_STR_FACT = + new PagedListResponseFactory< + ListAnalysesRequest, ListAnalysesResponse, ListAnalysesPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListAnalysesRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, LIST_ANALYSES_PAGE_STR_DESC, request, context); + return ListAnalysesPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListProcessesRequest, ListProcessesResponse, ListProcessesPagedResponse> + LIST_PROCESSES_PAGE_STR_FACT = + new PagedListResponseFactory< + ListProcessesRequest, ListProcessesResponse, ListProcessesPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListProcessesRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, LIST_PROCESSES_PAGE_STR_DESC, request, context); + return ListProcessesPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + /** Returns the object with the settings used for calls to listPublicOperators. */ + public PagedCallSettings< + ListPublicOperatorsRequest, ListPublicOperatorsResponse, ListPublicOperatorsPagedResponse> + listPublicOperatorsSettings() { + return listPublicOperatorsSettings; + } + + /** Returns the object with the settings used for calls to resolveOperatorInfo. */ + public UnaryCallSettings + resolveOperatorInfoSettings() { + return resolveOperatorInfoSettings; + } + + /** Returns the object with the settings used for calls to listOperators. */ + public PagedCallSettings + listOperatorsSettings() { + return listOperatorsSettings; + } + + /** Returns the object with the settings used for calls to getOperator. */ + public UnaryCallSettings getOperatorSettings() { + return getOperatorSettings; + } + + /** Returns the object with the settings used for calls to createOperator. */ + public UnaryCallSettings createOperatorSettings() { + return createOperatorSettings; + } + + /** Returns the object with the settings used for calls to createOperator. */ + public OperationCallSettings + createOperatorOperationSettings() { + return createOperatorOperationSettings; + } + + /** Returns the object with the settings used for calls to updateOperator. */ + public UnaryCallSettings updateOperatorSettings() { + return updateOperatorSettings; + } + + /** Returns the object with the settings used for calls to updateOperator. */ + public OperationCallSettings + updateOperatorOperationSettings() { + return updateOperatorOperationSettings; + } + + /** Returns the object with the settings used for calls to deleteOperator. */ + public UnaryCallSettings deleteOperatorSettings() { + return deleteOperatorSettings; + } + + /** Returns the object with the settings used for calls to deleteOperator. */ + public OperationCallSettings + deleteOperatorOperationSettings() { + return deleteOperatorOperationSettings; + } + + /** Returns the object with the settings used for calls to listAnalyses. */ + public PagedCallSettings + listAnalysesSettings() { + return listAnalysesSettings; + } + + /** Returns the object with the settings used for calls to getAnalysis. */ + public UnaryCallSettings getAnalysisSettings() { + return getAnalysisSettings; + } + + /** Returns the object with the settings used for calls to createAnalysis. */ + public UnaryCallSettings createAnalysisSettings() { + return createAnalysisSettings; + } + + /** Returns the object with the settings used for calls to createAnalysis. */ + public OperationCallSettings + createAnalysisOperationSettings() { + return createAnalysisOperationSettings; + } + + /** Returns the object with the settings used for calls to updateAnalysis. */ + public UnaryCallSettings updateAnalysisSettings() { + return updateAnalysisSettings; + } + + /** Returns the object with the settings used for calls to updateAnalysis. */ + public OperationCallSettings + updateAnalysisOperationSettings() { + return updateAnalysisOperationSettings; + } + + /** Returns the object with the settings used for calls to deleteAnalysis. */ + public UnaryCallSettings deleteAnalysisSettings() { + return deleteAnalysisSettings; + } + + /** Returns the object with the settings used for calls to deleteAnalysis. */ + public OperationCallSettings + deleteAnalysisOperationSettings() { + return deleteAnalysisOperationSettings; + } + + /** Returns the object with the settings used for calls to listProcesses. */ + public PagedCallSettings + listProcessesSettings() { + return listProcessesSettings; + } + + /** Returns the object with the settings used for calls to getProcess. */ + public UnaryCallSettings getProcessSettings() { + return getProcessSettings; + } + + /** Returns the object with the settings used for calls to createProcess. */ + public UnaryCallSettings createProcessSettings() { + return createProcessSettings; + } + + /** Returns the object with the settings used for calls to createProcess. */ + public OperationCallSettings + createProcessOperationSettings() { + return createProcessOperationSettings; + } + + /** Returns the object with the settings used for calls to updateProcess. */ + public UnaryCallSettings updateProcessSettings() { + return updateProcessSettings; + } + + /** Returns the object with the settings used for calls to updateProcess. */ + public OperationCallSettings + updateProcessOperationSettings() { + return updateProcessOperationSettings; + } + + /** Returns the object with the settings used for calls to deleteProcess. */ + public UnaryCallSettings deleteProcessSettings() { + return deleteProcessSettings; + } + + /** Returns the object with the settings used for calls to deleteProcess. */ + public OperationCallSettings + deleteProcessOperationSettings() { + return deleteProcessOperationSettings; + } + + /** Returns the object with the settings used for calls to batchRunProcess. */ + public UnaryCallSettings batchRunProcessSettings() { + return batchRunProcessSettings; + } + + /** Returns the object with the settings used for calls to batchRunProcess. */ + public OperationCallSettings + batchRunProcessOperationSettings() { + return batchRunProcessOperationSettings; + } + + public LiveVideoAnalyticsStub createStub() throws IOException { + if (getTransportChannelProvider() + .getTransportName() + .equals(GrpcTransportChannel.getGrpcTransportName())) { + return GrpcLiveVideoAnalyticsStub.create(this); + } + if (getTransportChannelProvider() + .getTransportName() + .equals(HttpJsonTransportChannel.getHttpJsonTransportName())) { + return HttpJsonLiveVideoAnalyticsStub.create(this); + } + throw new UnsupportedOperationException( + String.format( + "Transport not supported: %s", getTransportChannelProvider().getTransportName())); + } + + /** Returns the default service name. */ + @Override + public String getServiceName() { + return "visionai"; + } + + /** 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 "visionai.googleapis.com:443"; + } + + /** Returns the default mTLS service endpoint. */ + public static String getDefaultMtlsEndpoint() { + return "visionai.mtls.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) + .setUseJwtAccessWithScope(true); + } + + /** Returns a builder for the default gRPC ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return InstantiatingGrpcChannelProvider.newBuilder() + .setMaxInboundMessageSize(Integer.MAX_VALUE); + } + + /** Returns a builder for the default REST ChannelProvider for this service. */ + @BetaApi + public static InstantiatingHttpJsonChannelProvider.Builder + defaultHttpJsonTransportProviderBuilder() { + return InstantiatingHttpJsonChannelProvider.newBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return defaultGrpcTransportProviderBuilder().build(); + } + + public static ApiClientHeaderProvider.Builder defaultGrpcApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken( + "gapic", GaxProperties.getLibraryVersion(LiveVideoAnalyticsStubSettings.class)) + .setTransportToken( + GaxGrpcProperties.getGrpcTokenName(), GaxGrpcProperties.getGrpcVersion()); + } + + public static ApiClientHeaderProvider.Builder defaultHttpJsonApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken( + "gapic", GaxProperties.getLibraryVersion(LiveVideoAnalyticsStubSettings.class)) + .setTransportToken( + GaxHttpJsonProperties.getHttpJsonTokenName(), + GaxHttpJsonProperties.getHttpJsonVersion()); + } + + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return LiveVideoAnalyticsStubSettings.defaultGrpcApiClientHeaderProviderBuilder(); + } + + /** Returns a new gRPC builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new REST builder for this class. */ + public static Builder newHttpJsonBuilder() { + return Builder.createHttpJsonDefault(); + } + + /** 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 LiveVideoAnalyticsStubSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + + listPublicOperatorsSettings = settingsBuilder.listPublicOperatorsSettings().build(); + resolveOperatorInfoSettings = settingsBuilder.resolveOperatorInfoSettings().build(); + listOperatorsSettings = settingsBuilder.listOperatorsSettings().build(); + getOperatorSettings = settingsBuilder.getOperatorSettings().build(); + createOperatorSettings = settingsBuilder.createOperatorSettings().build(); + createOperatorOperationSettings = settingsBuilder.createOperatorOperationSettings().build(); + updateOperatorSettings = settingsBuilder.updateOperatorSettings().build(); + updateOperatorOperationSettings = settingsBuilder.updateOperatorOperationSettings().build(); + deleteOperatorSettings = settingsBuilder.deleteOperatorSettings().build(); + deleteOperatorOperationSettings = settingsBuilder.deleteOperatorOperationSettings().build(); + listAnalysesSettings = settingsBuilder.listAnalysesSettings().build(); + getAnalysisSettings = settingsBuilder.getAnalysisSettings().build(); + createAnalysisSettings = settingsBuilder.createAnalysisSettings().build(); + createAnalysisOperationSettings = settingsBuilder.createAnalysisOperationSettings().build(); + updateAnalysisSettings = settingsBuilder.updateAnalysisSettings().build(); + updateAnalysisOperationSettings = settingsBuilder.updateAnalysisOperationSettings().build(); + deleteAnalysisSettings = settingsBuilder.deleteAnalysisSettings().build(); + deleteAnalysisOperationSettings = settingsBuilder.deleteAnalysisOperationSettings().build(); + listProcessesSettings = settingsBuilder.listProcessesSettings().build(); + getProcessSettings = settingsBuilder.getProcessSettings().build(); + createProcessSettings = settingsBuilder.createProcessSettings().build(); + createProcessOperationSettings = settingsBuilder.createProcessOperationSettings().build(); + updateProcessSettings = settingsBuilder.updateProcessSettings().build(); + updateProcessOperationSettings = settingsBuilder.updateProcessOperationSettings().build(); + deleteProcessSettings = settingsBuilder.deleteProcessSettings().build(); + deleteProcessOperationSettings = settingsBuilder.deleteProcessOperationSettings().build(); + batchRunProcessSettings = settingsBuilder.batchRunProcessSettings().build(); + batchRunProcessOperationSettings = settingsBuilder.batchRunProcessOperationSettings().build(); + } + + /** Builder for LiveVideoAnalyticsStubSettings. */ + public static class Builder + extends StubSettings.Builder { + private final ImmutableList> unaryMethodSettingsBuilders; + private final PagedCallSettings.Builder< + ListPublicOperatorsRequest, + ListPublicOperatorsResponse, + ListPublicOperatorsPagedResponse> + listPublicOperatorsSettings; + private final UnaryCallSettings.Builder + resolveOperatorInfoSettings; + private final PagedCallSettings.Builder< + ListOperatorsRequest, ListOperatorsResponse, ListOperatorsPagedResponse> + listOperatorsSettings; + private final UnaryCallSettings.Builder getOperatorSettings; + private final UnaryCallSettings.Builder + createOperatorSettings; + private final OperationCallSettings.Builder + createOperatorOperationSettings; + private final UnaryCallSettings.Builder + updateOperatorSettings; + private final OperationCallSettings.Builder + updateOperatorOperationSettings; + private final UnaryCallSettings.Builder + deleteOperatorSettings; + private final OperationCallSettings.Builder + deleteOperatorOperationSettings; + private final PagedCallSettings.Builder< + ListAnalysesRequest, ListAnalysesResponse, ListAnalysesPagedResponse> + listAnalysesSettings; + private final UnaryCallSettings.Builder getAnalysisSettings; + private final UnaryCallSettings.Builder + createAnalysisSettings; + private final OperationCallSettings.Builder + createAnalysisOperationSettings; + private final UnaryCallSettings.Builder + updateAnalysisSettings; + private final OperationCallSettings.Builder + updateAnalysisOperationSettings; + private final UnaryCallSettings.Builder + deleteAnalysisSettings; + private final OperationCallSettings.Builder + deleteAnalysisOperationSettings; + private final PagedCallSettings.Builder< + ListProcessesRequest, ListProcessesResponse, ListProcessesPagedResponse> + listProcessesSettings; + private final UnaryCallSettings.Builder getProcessSettings; + private final UnaryCallSettings.Builder createProcessSettings; + private final OperationCallSettings.Builder + createProcessOperationSettings; + private final UnaryCallSettings.Builder updateProcessSettings; + private final OperationCallSettings.Builder + updateProcessOperationSettings; + private final UnaryCallSettings.Builder deleteProcessSettings; + private final OperationCallSettings.Builder + deleteProcessOperationSettings; + private final UnaryCallSettings.Builder + batchRunProcessSettings; + private final OperationCallSettings.Builder< + BatchRunProcessRequest, BatchRunProcessResponse, OperationMetadata> + batchRunProcessOperationSettings; + private static final ImmutableMap> + RETRYABLE_CODE_DEFINITIONS; + + static { + ImmutableMap.Builder> definitions = + ImmutableMap.builder(); + definitions.put( + "retry_policy_0_codes", + ImmutableSet.copyOf(Lists.newArrayList(StatusCode.Code.UNAVAILABLE))); + definitions.put( + "no_retry_8_codes", ImmutableSet.copyOf(Lists.newArrayList())); + definitions.put( + "no_retry_5_codes", ImmutableSet.copyOf(Lists.newArrayList())); + definitions.put( + "no_retry_7_codes", 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(1.3) + .setMaxRetryDelay(Duration.ofMillis(10000L)) + .setInitialRpcTimeout(Duration.ofMillis(60000L)) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ofMillis(60000L)) + .setTotalTimeout(Duration.ofMillis(60000L)) + .build(); + definitions.put("retry_policy_0_params", settings); + settings = + RetrySettings.newBuilder() + .setInitialRpcTimeout(Duration.ofMillis(60000L)) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ofMillis(60000L)) + .setTotalTimeout(Duration.ofMillis(60000L)) + .build(); + definitions.put("no_retry_8_params", settings); + settings = + RetrySettings.newBuilder() + .setInitialRpcTimeout(Duration.ofMillis(300000L)) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ofMillis(300000L)) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build(); + definitions.put("no_retry_5_params", settings); + settings = + RetrySettings.newBuilder() + .setInitialRpcTimeout(Duration.ofMillis(300000L)) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ofMillis(300000L)) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build(); + definitions.put("no_retry_7_params", settings); + RETRY_PARAM_DEFINITIONS = definitions.build(); + } + + protected Builder() { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(clientContext); + + listPublicOperatorsSettings = + PagedCallSettings.newBuilder(LIST_PUBLIC_OPERATORS_PAGE_STR_FACT); + resolveOperatorInfoSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + listOperatorsSettings = PagedCallSettings.newBuilder(LIST_OPERATORS_PAGE_STR_FACT); + getOperatorSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createOperatorSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createOperatorOperationSettings = OperationCallSettings.newBuilder(); + updateOperatorSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + updateOperatorOperationSettings = OperationCallSettings.newBuilder(); + deleteOperatorSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + deleteOperatorOperationSettings = OperationCallSettings.newBuilder(); + listAnalysesSettings = PagedCallSettings.newBuilder(LIST_ANALYSES_PAGE_STR_FACT); + getAnalysisSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createAnalysisSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createAnalysisOperationSettings = OperationCallSettings.newBuilder(); + updateAnalysisSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + updateAnalysisOperationSettings = OperationCallSettings.newBuilder(); + deleteAnalysisSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + deleteAnalysisOperationSettings = OperationCallSettings.newBuilder(); + listProcessesSettings = PagedCallSettings.newBuilder(LIST_PROCESSES_PAGE_STR_FACT); + getProcessSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createProcessSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createProcessOperationSettings = OperationCallSettings.newBuilder(); + updateProcessSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + updateProcessOperationSettings = OperationCallSettings.newBuilder(); + deleteProcessSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + deleteProcessOperationSettings = OperationCallSettings.newBuilder(); + batchRunProcessSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + batchRunProcessOperationSettings = OperationCallSettings.newBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + listPublicOperatorsSettings, + resolveOperatorInfoSettings, + listOperatorsSettings, + getOperatorSettings, + createOperatorSettings, + updateOperatorSettings, + deleteOperatorSettings, + listAnalysesSettings, + getAnalysisSettings, + createAnalysisSettings, + updateAnalysisSettings, + deleteAnalysisSettings, + listProcessesSettings, + getProcessSettings, + createProcessSettings, + updateProcessSettings, + deleteProcessSettings, + batchRunProcessSettings); + initDefaults(this); + } + + protected Builder(LiveVideoAnalyticsStubSettings settings) { + super(settings); + + listPublicOperatorsSettings = settings.listPublicOperatorsSettings.toBuilder(); + resolveOperatorInfoSettings = settings.resolveOperatorInfoSettings.toBuilder(); + listOperatorsSettings = settings.listOperatorsSettings.toBuilder(); + getOperatorSettings = settings.getOperatorSettings.toBuilder(); + createOperatorSettings = settings.createOperatorSettings.toBuilder(); + createOperatorOperationSettings = settings.createOperatorOperationSettings.toBuilder(); + updateOperatorSettings = settings.updateOperatorSettings.toBuilder(); + updateOperatorOperationSettings = settings.updateOperatorOperationSettings.toBuilder(); + deleteOperatorSettings = settings.deleteOperatorSettings.toBuilder(); + deleteOperatorOperationSettings = settings.deleteOperatorOperationSettings.toBuilder(); + listAnalysesSettings = settings.listAnalysesSettings.toBuilder(); + getAnalysisSettings = settings.getAnalysisSettings.toBuilder(); + createAnalysisSettings = settings.createAnalysisSettings.toBuilder(); + createAnalysisOperationSettings = settings.createAnalysisOperationSettings.toBuilder(); + updateAnalysisSettings = settings.updateAnalysisSettings.toBuilder(); + updateAnalysisOperationSettings = settings.updateAnalysisOperationSettings.toBuilder(); + deleteAnalysisSettings = settings.deleteAnalysisSettings.toBuilder(); + deleteAnalysisOperationSettings = settings.deleteAnalysisOperationSettings.toBuilder(); + listProcessesSettings = settings.listProcessesSettings.toBuilder(); + getProcessSettings = settings.getProcessSettings.toBuilder(); + createProcessSettings = settings.createProcessSettings.toBuilder(); + createProcessOperationSettings = settings.createProcessOperationSettings.toBuilder(); + updateProcessSettings = settings.updateProcessSettings.toBuilder(); + updateProcessOperationSettings = settings.updateProcessOperationSettings.toBuilder(); + deleteProcessSettings = settings.deleteProcessSettings.toBuilder(); + deleteProcessOperationSettings = settings.deleteProcessOperationSettings.toBuilder(); + batchRunProcessSettings = settings.batchRunProcessSettings.toBuilder(); + batchRunProcessOperationSettings = settings.batchRunProcessOperationSettings.toBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + listPublicOperatorsSettings, + resolveOperatorInfoSettings, + listOperatorsSettings, + getOperatorSettings, + createOperatorSettings, + updateOperatorSettings, + deleteOperatorSettings, + listAnalysesSettings, + getAnalysisSettings, + createAnalysisSettings, + updateAnalysisSettings, + deleteAnalysisSettings, + listProcessesSettings, + getProcessSettings, + createProcessSettings, + updateProcessSettings, + deleteProcessSettings, + batchRunProcessSettings); + } + + private static Builder createDefault() { + Builder builder = new Builder(((ClientContext) null)); + + builder.setTransportChannelProvider(defaultTransportChannelProvider()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultApiClientHeaderProviderBuilder().build()); + builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); + builder.setSwitchToMtlsEndpointAllowed(true); + + return initDefaults(builder); + } + + private static Builder createHttpJsonDefault() { + Builder builder = new Builder(((ClientContext) null)); + + builder.setTransportChannelProvider(defaultHttpJsonTransportProviderBuilder().build()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultHttpJsonApiClientHeaderProviderBuilder().build()); + builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); + builder.setSwitchToMtlsEndpointAllowed(true); + + return initDefaults(builder); + } + + private static Builder initDefaults(Builder builder) { + builder + .listPublicOperatorsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .resolveOperatorInfoSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .listOperatorsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_8_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_8_params")); + + builder + .getOperatorSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_8_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_8_params")); + + builder + .createOperatorSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_5_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_5_params")); + + builder + .updateOperatorSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_8_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_8_params")); + + builder + .deleteOperatorSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_8_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_8_params")); + + builder + .listAnalysesSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_8_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_8_params")); + + builder + .getAnalysisSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_8_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_8_params")); + + builder + .createAnalysisSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_7_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_7_params")); + + builder + .updateAnalysisSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_8_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_8_params")); + + builder + .deleteAnalysisSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_8_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_8_params")); + + builder + .listProcessesSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .getProcessSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .createProcessSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .updateProcessSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .deleteProcessSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .batchRunProcessSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .createOperatorOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_5_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_5_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Operator.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + builder + .updateOperatorOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_8_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_8_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Operator.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + builder + .deleteOperatorOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_8_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_8_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Empty.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + builder + .createAnalysisOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_7_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_7_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Analysis.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + builder + .updateAnalysisOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_8_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_8_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Analysis.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + builder + .deleteAnalysisOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_8_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_8_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Empty.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + builder + .createProcessOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Process.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + builder + .updateProcessOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Process.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + builder + .deleteProcessOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Empty.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + builder + .batchRunProcessOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(BatchRunProcessResponse.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + return builder; + } + + /** + * 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) { + super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater); + return this; + } + + public ImmutableList> unaryMethodSettingsBuilders() { + return unaryMethodSettingsBuilders; + } + + /** Returns the builder for the settings used for calls to listPublicOperators. */ + public PagedCallSettings.Builder< + ListPublicOperatorsRequest, + ListPublicOperatorsResponse, + ListPublicOperatorsPagedResponse> + listPublicOperatorsSettings() { + return listPublicOperatorsSettings; + } + + /** Returns the builder for the settings used for calls to resolveOperatorInfo. */ + public UnaryCallSettings.Builder + resolveOperatorInfoSettings() { + return resolveOperatorInfoSettings; + } + + /** Returns the builder for the settings used for calls to listOperators. */ + public PagedCallSettings.Builder< + ListOperatorsRequest, ListOperatorsResponse, ListOperatorsPagedResponse> + listOperatorsSettings() { + return listOperatorsSettings; + } + + /** Returns the builder for the settings used for calls to getOperator. */ + public UnaryCallSettings.Builder getOperatorSettings() { + return getOperatorSettings; + } + + /** Returns the builder for the settings used for calls to createOperator. */ + public UnaryCallSettings.Builder createOperatorSettings() { + return createOperatorSettings; + } + + /** Returns the builder for the settings used for calls to createOperator. */ + public OperationCallSettings.Builder + createOperatorOperationSettings() { + return createOperatorOperationSettings; + } + + /** Returns the builder for the settings used for calls to updateOperator. */ + public UnaryCallSettings.Builder updateOperatorSettings() { + return updateOperatorSettings; + } + + /** Returns the builder for the settings used for calls to updateOperator. */ + public OperationCallSettings.Builder + updateOperatorOperationSettings() { + return updateOperatorOperationSettings; + } + + /** Returns the builder for the settings used for calls to deleteOperator. */ + public UnaryCallSettings.Builder deleteOperatorSettings() { + return deleteOperatorSettings; + } + + /** Returns the builder for the settings used for calls to deleteOperator. */ + public OperationCallSettings.Builder + deleteOperatorOperationSettings() { + return deleteOperatorOperationSettings; + } + + /** Returns the builder for the settings used for calls to listAnalyses. */ + public PagedCallSettings.Builder< + ListAnalysesRequest, ListAnalysesResponse, ListAnalysesPagedResponse> + listAnalysesSettings() { + return listAnalysesSettings; + } + + /** Returns the builder for the settings used for calls to getAnalysis. */ + public UnaryCallSettings.Builder getAnalysisSettings() { + return getAnalysisSettings; + } + + /** Returns the builder for the settings used for calls to createAnalysis. */ + public UnaryCallSettings.Builder createAnalysisSettings() { + return createAnalysisSettings; + } + + /** Returns the builder for the settings used for calls to createAnalysis. */ + public OperationCallSettings.Builder + createAnalysisOperationSettings() { + return createAnalysisOperationSettings; + } + + /** Returns the builder for the settings used for calls to updateAnalysis. */ + public UnaryCallSettings.Builder updateAnalysisSettings() { + return updateAnalysisSettings; + } + + /** Returns the builder for the settings used for calls to updateAnalysis. */ + public OperationCallSettings.Builder + updateAnalysisOperationSettings() { + return updateAnalysisOperationSettings; + } + + /** Returns the builder for the settings used for calls to deleteAnalysis. */ + public UnaryCallSettings.Builder deleteAnalysisSettings() { + return deleteAnalysisSettings; + } + + /** Returns the builder for the settings used for calls to deleteAnalysis. */ + public OperationCallSettings.Builder + deleteAnalysisOperationSettings() { + return deleteAnalysisOperationSettings; + } + + /** Returns the builder for the settings used for calls to listProcesses. */ + public PagedCallSettings.Builder< + ListProcessesRequest, ListProcessesResponse, ListProcessesPagedResponse> + listProcessesSettings() { + return listProcessesSettings; + } + + /** Returns the builder for the settings used for calls to getProcess. */ + public UnaryCallSettings.Builder getProcessSettings() { + return getProcessSettings; + } + + /** Returns the builder for the settings used for calls to createProcess. */ + public UnaryCallSettings.Builder createProcessSettings() { + return createProcessSettings; + } + + /** Returns the builder for the settings used for calls to createProcess. */ + public OperationCallSettings.Builder + createProcessOperationSettings() { + return createProcessOperationSettings; + } + + /** Returns the builder for the settings used for calls to updateProcess. */ + public UnaryCallSettings.Builder updateProcessSettings() { + return updateProcessSettings; + } + + /** Returns the builder for the settings used for calls to updateProcess. */ + public OperationCallSettings.Builder + updateProcessOperationSettings() { + return updateProcessOperationSettings; + } + + /** Returns the builder for the settings used for calls to deleteProcess. */ + public UnaryCallSettings.Builder deleteProcessSettings() { + return deleteProcessSettings; + } + + /** Returns the builder for the settings used for calls to deleteProcess. */ + public OperationCallSettings.Builder + deleteProcessOperationSettings() { + return deleteProcessOperationSettings; + } + + /** Returns the builder for the settings used for calls to batchRunProcess. */ + public UnaryCallSettings.Builder batchRunProcessSettings() { + return batchRunProcessSettings; + } + + /** Returns the builder for the settings used for calls to batchRunProcess. */ + public OperationCallSettings.Builder< + BatchRunProcessRequest, BatchRunProcessResponse, OperationMetadata> + batchRunProcessOperationSettings() { + return batchRunProcessOperationSettings; + } + + @Override + public LiveVideoAnalyticsStubSettings build() throws IOException { + return new LiveVideoAnalyticsStubSettings(this); + } + } +} diff --git a/java-visionai/google-cloud-visionai/src/main/java/com/google/cloud/visionai/v1/stub/StreamingServiceStub.java b/java-visionai/google-cloud-visionai/src/main/java/com/google/cloud/visionai/v1/stub/StreamingServiceStub.java new file mode 100644 index 000000000000..274291c01865 --- /dev/null +++ b/java-visionai/google-cloud-visionai/src/main/java/com/google/cloud/visionai/v1/stub/StreamingServiceStub.java @@ -0,0 +1,72 @@ +/* + * Copyright 2024 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.visionai.v1.stub; + +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.rpc.BidiStreamingCallable; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.visionai.v1.AcquireLeaseRequest; +import com.google.cloud.visionai.v1.Lease; +import com.google.cloud.visionai.v1.ReceiveEventsRequest; +import com.google.cloud.visionai.v1.ReceiveEventsResponse; +import com.google.cloud.visionai.v1.ReceivePacketsRequest; +import com.google.cloud.visionai.v1.ReceivePacketsResponse; +import com.google.cloud.visionai.v1.ReleaseLeaseRequest; +import com.google.cloud.visionai.v1.ReleaseLeaseResponse; +import com.google.cloud.visionai.v1.RenewLeaseRequest; +import com.google.cloud.visionai.v1.SendPacketsRequest; +import com.google.cloud.visionai.v1.SendPacketsResponse; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Base stub class for the StreamingService service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") +public abstract class StreamingServiceStub implements BackgroundResource { + + public BidiStreamingCallable sendPacketsCallable() { + throw new UnsupportedOperationException("Not implemented: sendPacketsCallable()"); + } + + public BidiStreamingCallable + receivePacketsCallable() { + throw new UnsupportedOperationException("Not implemented: receivePacketsCallable()"); + } + + public BidiStreamingCallable + receiveEventsCallable() { + throw new UnsupportedOperationException("Not implemented: receiveEventsCallable()"); + } + + public UnaryCallable acquireLeaseCallable() { + throw new UnsupportedOperationException("Not implemented: acquireLeaseCallable()"); + } + + public UnaryCallable renewLeaseCallable() { + throw new UnsupportedOperationException("Not implemented: renewLeaseCallable()"); + } + + public UnaryCallable releaseLeaseCallable() { + throw new UnsupportedOperationException("Not implemented: releaseLeaseCallable()"); + } + + @Override + public abstract void close(); +} diff --git a/java-visionai/google-cloud-visionai/src/main/java/com/google/cloud/visionai/v1/stub/StreamingServiceStubSettings.java b/java-visionai/google-cloud-visionai/src/main/java/com/google/cloud/visionai/v1/stub/StreamingServiceStubSettings.java new file mode 100644 index 000000000000..339e62225002 --- /dev/null +++ b/java-visionai/google-cloud-visionai/src/main/java/com/google/cloud/visionai/v1/stub/StreamingServiceStubSettings.java @@ -0,0 +1,424 @@ +/* + * Copyright 2024 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.visionai.v1.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.httpjson.GaxHttpJsonProperties; +import com.google.api.gax.httpjson.HttpJsonTransportChannel; +import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider; +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.visionai.v1.AcquireLeaseRequest; +import com.google.cloud.visionai.v1.Lease; +import com.google.cloud.visionai.v1.ReceiveEventsRequest; +import com.google.cloud.visionai.v1.ReceiveEventsResponse; +import com.google.cloud.visionai.v1.ReceivePacketsRequest; +import com.google.cloud.visionai.v1.ReceivePacketsResponse; +import com.google.cloud.visionai.v1.ReleaseLeaseRequest; +import com.google.cloud.visionai.v1.ReleaseLeaseResponse; +import com.google.cloud.visionai.v1.RenewLeaseRequest; +import com.google.cloud.visionai.v1.SendPacketsRequest; +import com.google.cloud.visionai.v1.SendPacketsResponse; +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; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Settings class to configure an instance of {@link StreamingServiceStub}. + * + *

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

    + *
  • The default service address (visionai.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 acquireLease to 30 seconds: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * StreamingServiceStubSettings.Builder streamingServiceSettingsBuilder =
+ *     StreamingServiceStubSettings.newBuilder();
+ * streamingServiceSettingsBuilder
+ *     .acquireLeaseSettings()
+ *     .setRetrySettings(
+ *         streamingServiceSettingsBuilder
+ *             .acquireLeaseSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * StreamingServiceStubSettings streamingServiceSettings = streamingServiceSettingsBuilder.build();
+ * }
+ */ +@Generated("by gapic-generator-java") +public class StreamingServiceStubSettings 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 sendPacketsSettings; + private final StreamingCallSettings + receivePacketsSettings; + private final StreamingCallSettings + receiveEventsSettings; + private final UnaryCallSettings acquireLeaseSettings; + private final UnaryCallSettings renewLeaseSettings; + private final UnaryCallSettings releaseLeaseSettings; + + /** Returns the object with the settings used for calls to sendPackets. */ + public StreamingCallSettings sendPacketsSettings() { + return sendPacketsSettings; + } + + /** Returns the object with the settings used for calls to receivePackets. */ + public StreamingCallSettings + receivePacketsSettings() { + return receivePacketsSettings; + } + + /** Returns the object with the settings used for calls to receiveEvents. */ + public StreamingCallSettings + receiveEventsSettings() { + return receiveEventsSettings; + } + + /** Returns the object with the settings used for calls to acquireLease. */ + public UnaryCallSettings acquireLeaseSettings() { + return acquireLeaseSettings; + } + + /** Returns the object with the settings used for calls to renewLease. */ + public UnaryCallSettings renewLeaseSettings() { + return renewLeaseSettings; + } + + /** Returns the object with the settings used for calls to releaseLease. */ + public UnaryCallSettings releaseLeaseSettings() { + return releaseLeaseSettings; + } + + public StreamingServiceStub createStub() throws IOException { + if (getTransportChannelProvider() + .getTransportName() + .equals(GrpcTransportChannel.getGrpcTransportName())) { + return GrpcStreamingServiceStub.create(this); + } + if (getTransportChannelProvider() + .getTransportName() + .equals(HttpJsonTransportChannel.getHttpJsonTransportName())) { + return HttpJsonStreamingServiceStub.create(this); + } + throw new UnsupportedOperationException( + String.format( + "Transport not supported: %s", getTransportChannelProvider().getTransportName())); + } + + /** Returns the default service name. */ + @Override + public String getServiceName() { + return "visionai"; + } + + /** 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 "visionai.googleapis.com:443"; + } + + /** Returns the default mTLS service endpoint. */ + public static String getDefaultMtlsEndpoint() { + return "visionai.mtls.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) + .setUseJwtAccessWithScope(true); + } + + /** Returns a builder for the default gRPC ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return InstantiatingGrpcChannelProvider.newBuilder() + .setMaxInboundMessageSize(Integer.MAX_VALUE); + } + + /** Returns a builder for the default REST ChannelProvider for this service. */ + @BetaApi + public static InstantiatingHttpJsonChannelProvider.Builder + defaultHttpJsonTransportProviderBuilder() { + return InstantiatingHttpJsonChannelProvider.newBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return defaultGrpcTransportProviderBuilder().build(); + } + + public static ApiClientHeaderProvider.Builder defaultGrpcApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken( + "gapic", GaxProperties.getLibraryVersion(StreamingServiceStubSettings.class)) + .setTransportToken( + GaxGrpcProperties.getGrpcTokenName(), GaxGrpcProperties.getGrpcVersion()); + } + + public static ApiClientHeaderProvider.Builder defaultHttpJsonApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken( + "gapic", GaxProperties.getLibraryVersion(StreamingServiceStubSettings.class)) + .setTransportToken( + GaxHttpJsonProperties.getHttpJsonTokenName(), + GaxHttpJsonProperties.getHttpJsonVersion()); + } + + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return StreamingServiceStubSettings.defaultGrpcApiClientHeaderProviderBuilder(); + } + + /** Returns a new gRPC builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new REST builder for this class. */ + public static Builder newHttpJsonBuilder() { + return Builder.createHttpJsonDefault(); + } + + /** 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 StreamingServiceStubSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + + sendPacketsSettings = settingsBuilder.sendPacketsSettings().build(); + receivePacketsSettings = settingsBuilder.receivePacketsSettings().build(); + receiveEventsSettings = settingsBuilder.receiveEventsSettings().build(); + acquireLeaseSettings = settingsBuilder.acquireLeaseSettings().build(); + renewLeaseSettings = settingsBuilder.renewLeaseSettings().build(); + releaseLeaseSettings = settingsBuilder.releaseLeaseSettings().build(); + } + + /** Builder for StreamingServiceStubSettings. */ + public static class Builder extends StubSettings.Builder { + private final ImmutableList> unaryMethodSettingsBuilders; + private final StreamingCallSettings.Builder + sendPacketsSettings; + private final StreamingCallSettings.Builder + receivePacketsSettings; + private final StreamingCallSettings.Builder + receiveEventsSettings; + private final UnaryCallSettings.Builder acquireLeaseSettings; + private final UnaryCallSettings.Builder renewLeaseSettings; + private final UnaryCallSettings.Builder + releaseLeaseSettings; + private static final ImmutableMap> + RETRYABLE_CODE_DEFINITIONS; + + static { + ImmutableMap.Builder> definitions = + ImmutableMap.builder(); + definitions.put("no_retry_codes", 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().setRpcTimeoutMultiplier(1.0).build(); + definitions.put("no_retry_params", settings); + RETRY_PARAM_DEFINITIONS = definitions.build(); + } + + protected Builder() { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(clientContext); + + sendPacketsSettings = StreamingCallSettings.newBuilder(); + receivePacketsSettings = StreamingCallSettings.newBuilder(); + receiveEventsSettings = StreamingCallSettings.newBuilder(); + acquireLeaseSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + renewLeaseSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + releaseLeaseSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + acquireLeaseSettings, renewLeaseSettings, releaseLeaseSettings); + initDefaults(this); + } + + protected Builder(StreamingServiceStubSettings settings) { + super(settings); + + sendPacketsSettings = settings.sendPacketsSettings.toBuilder(); + receivePacketsSettings = settings.receivePacketsSettings.toBuilder(); + receiveEventsSettings = settings.receiveEventsSettings.toBuilder(); + acquireLeaseSettings = settings.acquireLeaseSettings.toBuilder(); + renewLeaseSettings = settings.renewLeaseSettings.toBuilder(); + releaseLeaseSettings = settings.releaseLeaseSettings.toBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + acquireLeaseSettings, renewLeaseSettings, releaseLeaseSettings); + } + + private static Builder createDefault() { + Builder builder = new Builder(((ClientContext) null)); + + builder.setTransportChannelProvider(defaultTransportChannelProvider()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultApiClientHeaderProviderBuilder().build()); + builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); + builder.setSwitchToMtlsEndpointAllowed(true); + + return initDefaults(builder); + } + + private static Builder createHttpJsonDefault() { + Builder builder = new Builder(((ClientContext) null)); + + builder.setTransportChannelProvider(defaultHttpJsonTransportProviderBuilder().build()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultHttpJsonApiClientHeaderProviderBuilder().build()); + builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); + builder.setSwitchToMtlsEndpointAllowed(true); + + return initDefaults(builder); + } + + private static Builder initDefaults(Builder builder) { + builder + .acquireLeaseSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .renewLeaseSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .releaseLeaseSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + return builder; + } + + /** + * 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) { + super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater); + return this; + } + + public ImmutableList> unaryMethodSettingsBuilders() { + return unaryMethodSettingsBuilders; + } + + /** Returns the builder for the settings used for calls to sendPackets. */ + public StreamingCallSettings.Builder + sendPacketsSettings() { + return sendPacketsSettings; + } + + /** Returns the builder for the settings used for calls to receivePackets. */ + public StreamingCallSettings.Builder + receivePacketsSettings() { + return receivePacketsSettings; + } + + /** Returns the builder for the settings used for calls to receiveEvents. */ + public StreamingCallSettings.Builder + receiveEventsSettings() { + return receiveEventsSettings; + } + + /** Returns the builder for the settings used for calls to acquireLease. */ + public UnaryCallSettings.Builder acquireLeaseSettings() { + return acquireLeaseSettings; + } + + /** Returns the builder for the settings used for calls to renewLease. */ + public UnaryCallSettings.Builder renewLeaseSettings() { + return renewLeaseSettings; + } + + /** Returns the builder for the settings used for calls to releaseLease. */ + public UnaryCallSettings.Builder + releaseLeaseSettings() { + return releaseLeaseSettings; + } + + @Override + public StreamingServiceStubSettings build() throws IOException { + return new StreamingServiceStubSettings(this); + } + } +} diff --git a/java-visionai/google-cloud-visionai/src/main/java/com/google/cloud/visionai/v1/stub/StreamsServiceStub.java b/java-visionai/google-cloud-visionai/src/main/java/com/google/cloud/visionai/v1/stub/StreamsServiceStub.java new file mode 100644 index 000000000000..4cff9d227a5e --- /dev/null +++ b/java-visionai/google-cloud-visionai/src/main/java/com/google/cloud/visionai/v1/stub/StreamsServiceStub.java @@ -0,0 +1,267 @@ +/* + * Copyright 2024 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.visionai.v1.stub; + +import static com.google.cloud.visionai.v1.StreamsServiceClient.ListClustersPagedResponse; +import static com.google.cloud.visionai.v1.StreamsServiceClient.ListEventsPagedResponse; +import static com.google.cloud.visionai.v1.StreamsServiceClient.ListSeriesPagedResponse; +import static com.google.cloud.visionai.v1.StreamsServiceClient.ListStreamsPagedResponse; + +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.visionai.v1.Channel; +import com.google.cloud.visionai.v1.Cluster; +import com.google.cloud.visionai.v1.CreateClusterRequest; +import com.google.cloud.visionai.v1.CreateEventRequest; +import com.google.cloud.visionai.v1.CreateSeriesRequest; +import com.google.cloud.visionai.v1.CreateStreamRequest; +import com.google.cloud.visionai.v1.DeleteClusterRequest; +import com.google.cloud.visionai.v1.DeleteEventRequest; +import com.google.cloud.visionai.v1.DeleteSeriesRequest; +import com.google.cloud.visionai.v1.DeleteStreamRequest; +import com.google.cloud.visionai.v1.Event; +import com.google.cloud.visionai.v1.GenerateStreamHlsTokenRequest; +import com.google.cloud.visionai.v1.GenerateStreamHlsTokenResponse; +import com.google.cloud.visionai.v1.GetClusterRequest; +import com.google.cloud.visionai.v1.GetEventRequest; +import com.google.cloud.visionai.v1.GetSeriesRequest; +import com.google.cloud.visionai.v1.GetStreamRequest; +import com.google.cloud.visionai.v1.GetStreamThumbnailRequest; +import com.google.cloud.visionai.v1.GetStreamThumbnailResponse; +import com.google.cloud.visionai.v1.ListClustersRequest; +import com.google.cloud.visionai.v1.ListClustersResponse; +import com.google.cloud.visionai.v1.ListEventsRequest; +import com.google.cloud.visionai.v1.ListEventsResponse; +import com.google.cloud.visionai.v1.ListSeriesRequest; +import com.google.cloud.visionai.v1.ListSeriesResponse; +import com.google.cloud.visionai.v1.ListStreamsRequest; +import com.google.cloud.visionai.v1.ListStreamsResponse; +import com.google.cloud.visionai.v1.MaterializeChannelRequest; +import com.google.cloud.visionai.v1.OperationMetadata; +import com.google.cloud.visionai.v1.Series; +import com.google.cloud.visionai.v1.Stream; +import com.google.cloud.visionai.v1.UpdateClusterRequest; +import com.google.cloud.visionai.v1.UpdateEventRequest; +import com.google.cloud.visionai.v1.UpdateSeriesRequest; +import com.google.cloud.visionai.v1.UpdateStreamRequest; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.OperationsStub; +import com.google.protobuf.Empty; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Base stub class for the StreamsService service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") +public abstract class StreamsServiceStub implements BackgroundResource { + + public OperationsStub getOperationsStub() { + return null; + } + + public com.google.api.gax.httpjson.longrunning.stub.OperationsStub getHttpJsonOperationsStub() { + return null; + } + + public UnaryCallable listClustersPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listClustersPagedCallable()"); + } + + public UnaryCallable listClustersCallable() { + throw new UnsupportedOperationException("Not implemented: listClustersCallable()"); + } + + public UnaryCallable getClusterCallable() { + throw new UnsupportedOperationException("Not implemented: getClusterCallable()"); + } + + public OperationCallable + createClusterOperationCallable() { + throw new UnsupportedOperationException("Not implemented: createClusterOperationCallable()"); + } + + public UnaryCallable createClusterCallable() { + throw new UnsupportedOperationException("Not implemented: createClusterCallable()"); + } + + public OperationCallable + updateClusterOperationCallable() { + throw new UnsupportedOperationException("Not implemented: updateClusterOperationCallable()"); + } + + public UnaryCallable updateClusterCallable() { + throw new UnsupportedOperationException("Not implemented: updateClusterCallable()"); + } + + public OperationCallable + deleteClusterOperationCallable() { + throw new UnsupportedOperationException("Not implemented: deleteClusterOperationCallable()"); + } + + public UnaryCallable deleteClusterCallable() { + throw new UnsupportedOperationException("Not implemented: deleteClusterCallable()"); + } + + public UnaryCallable listStreamsPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listStreamsPagedCallable()"); + } + + public UnaryCallable listStreamsCallable() { + throw new UnsupportedOperationException("Not implemented: listStreamsCallable()"); + } + + public UnaryCallable getStreamCallable() { + throw new UnsupportedOperationException("Not implemented: getStreamCallable()"); + } + + public OperationCallable + createStreamOperationCallable() { + throw new UnsupportedOperationException("Not implemented: createStreamOperationCallable()"); + } + + public UnaryCallable createStreamCallable() { + throw new UnsupportedOperationException("Not implemented: createStreamCallable()"); + } + + public OperationCallable + updateStreamOperationCallable() { + throw new UnsupportedOperationException("Not implemented: updateStreamOperationCallable()"); + } + + public UnaryCallable updateStreamCallable() { + throw new UnsupportedOperationException("Not implemented: updateStreamCallable()"); + } + + public OperationCallable + deleteStreamOperationCallable() { + throw new UnsupportedOperationException("Not implemented: deleteStreamOperationCallable()"); + } + + public UnaryCallable deleteStreamCallable() { + throw new UnsupportedOperationException("Not implemented: deleteStreamCallable()"); + } + + public OperationCallable + getStreamThumbnailOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: getStreamThumbnailOperationCallable()"); + } + + public UnaryCallable getStreamThumbnailCallable() { + throw new UnsupportedOperationException("Not implemented: getStreamThumbnailCallable()"); + } + + public UnaryCallable + generateStreamHlsTokenCallable() { + throw new UnsupportedOperationException("Not implemented: generateStreamHlsTokenCallable()"); + } + + public UnaryCallable listEventsPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listEventsPagedCallable()"); + } + + public UnaryCallable listEventsCallable() { + throw new UnsupportedOperationException("Not implemented: listEventsCallable()"); + } + + public UnaryCallable getEventCallable() { + throw new UnsupportedOperationException("Not implemented: getEventCallable()"); + } + + public OperationCallable + createEventOperationCallable() { + throw new UnsupportedOperationException("Not implemented: createEventOperationCallable()"); + } + + public UnaryCallable createEventCallable() { + throw new UnsupportedOperationException("Not implemented: createEventCallable()"); + } + + public OperationCallable + updateEventOperationCallable() { + throw new UnsupportedOperationException("Not implemented: updateEventOperationCallable()"); + } + + public UnaryCallable updateEventCallable() { + throw new UnsupportedOperationException("Not implemented: updateEventCallable()"); + } + + public OperationCallable + deleteEventOperationCallable() { + throw new UnsupportedOperationException("Not implemented: deleteEventOperationCallable()"); + } + + public UnaryCallable deleteEventCallable() { + throw new UnsupportedOperationException("Not implemented: deleteEventCallable()"); + } + + public UnaryCallable listSeriesPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listSeriesPagedCallable()"); + } + + public UnaryCallable listSeriesCallable() { + throw new UnsupportedOperationException("Not implemented: listSeriesCallable()"); + } + + public UnaryCallable getSeriesCallable() { + throw new UnsupportedOperationException("Not implemented: getSeriesCallable()"); + } + + public OperationCallable + createSeriesOperationCallable() { + throw new UnsupportedOperationException("Not implemented: createSeriesOperationCallable()"); + } + + public UnaryCallable createSeriesCallable() { + throw new UnsupportedOperationException("Not implemented: createSeriesCallable()"); + } + + public OperationCallable + updateSeriesOperationCallable() { + throw new UnsupportedOperationException("Not implemented: updateSeriesOperationCallable()"); + } + + public UnaryCallable updateSeriesCallable() { + throw new UnsupportedOperationException("Not implemented: updateSeriesCallable()"); + } + + public OperationCallable + deleteSeriesOperationCallable() { + throw new UnsupportedOperationException("Not implemented: deleteSeriesOperationCallable()"); + } + + public UnaryCallable deleteSeriesCallable() { + throw new UnsupportedOperationException("Not implemented: deleteSeriesCallable()"); + } + + public OperationCallable + materializeChannelOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: materializeChannelOperationCallable()"); + } + + public UnaryCallable materializeChannelCallable() { + throw new UnsupportedOperationException("Not implemented: materializeChannelCallable()"); + } + + @Override + public abstract void close(); +} diff --git a/java-visionai/google-cloud-visionai/src/main/java/com/google/cloud/visionai/v1/stub/StreamsServiceStubSettings.java b/java-visionai/google-cloud-visionai/src/main/java/com/google/cloud/visionai/v1/stub/StreamsServiceStubSettings.java new file mode 100644 index 000000000000..3cf78e3feb84 --- /dev/null +++ b/java-visionai/google-cloud-visionai/src/main/java/com/google/cloud/visionai/v1/stub/StreamsServiceStubSettings.java @@ -0,0 +1,1706 @@ +/* + * Copyright 2024 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.visionai.v1.stub; + +import static com.google.cloud.visionai.v1.StreamsServiceClient.ListClustersPagedResponse; +import static com.google.cloud.visionai.v1.StreamsServiceClient.ListEventsPagedResponse; +import static com.google.cloud.visionai.v1.StreamsServiceClient.ListSeriesPagedResponse; +import static com.google.cloud.visionai.v1.StreamsServiceClient.ListStreamsPagedResponse; + +import com.google.api.core.ApiFunction; +import com.google.api.core.ApiFuture; +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.httpjson.GaxHttpJsonProperties; +import com.google.api.gax.httpjson.HttpJsonTransportChannel; +import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider; +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.ApiCallContext; +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.PageContext; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.PagedListDescriptor; +import com.google.api.gax.rpc.PagedListResponseFactory; +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.api.gax.rpc.UnaryCallable; +import com.google.cloud.visionai.v1.Channel; +import com.google.cloud.visionai.v1.Cluster; +import com.google.cloud.visionai.v1.CreateClusterRequest; +import com.google.cloud.visionai.v1.CreateEventRequest; +import com.google.cloud.visionai.v1.CreateSeriesRequest; +import com.google.cloud.visionai.v1.CreateStreamRequest; +import com.google.cloud.visionai.v1.DeleteClusterRequest; +import com.google.cloud.visionai.v1.DeleteEventRequest; +import com.google.cloud.visionai.v1.DeleteSeriesRequest; +import com.google.cloud.visionai.v1.DeleteStreamRequest; +import com.google.cloud.visionai.v1.Event; +import com.google.cloud.visionai.v1.GenerateStreamHlsTokenRequest; +import com.google.cloud.visionai.v1.GenerateStreamHlsTokenResponse; +import com.google.cloud.visionai.v1.GetClusterRequest; +import com.google.cloud.visionai.v1.GetEventRequest; +import com.google.cloud.visionai.v1.GetSeriesRequest; +import com.google.cloud.visionai.v1.GetStreamRequest; +import com.google.cloud.visionai.v1.GetStreamThumbnailRequest; +import com.google.cloud.visionai.v1.GetStreamThumbnailResponse; +import com.google.cloud.visionai.v1.ListClustersRequest; +import com.google.cloud.visionai.v1.ListClustersResponse; +import com.google.cloud.visionai.v1.ListEventsRequest; +import com.google.cloud.visionai.v1.ListEventsResponse; +import com.google.cloud.visionai.v1.ListSeriesRequest; +import com.google.cloud.visionai.v1.ListSeriesResponse; +import com.google.cloud.visionai.v1.ListStreamsRequest; +import com.google.cloud.visionai.v1.ListStreamsResponse; +import com.google.cloud.visionai.v1.MaterializeChannelRequest; +import com.google.cloud.visionai.v1.OperationMetadata; +import com.google.cloud.visionai.v1.Series; +import com.google.cloud.visionai.v1.Stream; +import com.google.cloud.visionai.v1.UpdateClusterRequest; +import com.google.cloud.visionai.v1.UpdateEventRequest; +import com.google.cloud.visionai.v1.UpdateSeriesRequest; +import com.google.cloud.visionai.v1.UpdateStreamRequest; +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 com.google.protobuf.Empty; +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 StreamsServiceStub}. + * + *

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

    + *
  • The default service address (visionai.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 getCluster to 30 seconds: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * StreamsServiceStubSettings.Builder streamsServiceSettingsBuilder =
+ *     StreamsServiceStubSettings.newBuilder();
+ * streamsServiceSettingsBuilder
+ *     .getClusterSettings()
+ *     .setRetrySettings(
+ *         streamsServiceSettingsBuilder
+ *             .getClusterSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * StreamsServiceStubSettings streamsServiceSettings = streamsServiceSettingsBuilder.build();
+ * }
+ */ +@Generated("by gapic-generator-java") +public class StreamsServiceStubSettings 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 PagedCallSettings< + ListClustersRequest, ListClustersResponse, ListClustersPagedResponse> + listClustersSettings; + private final UnaryCallSettings getClusterSettings; + private final UnaryCallSettings createClusterSettings; + private final OperationCallSettings + createClusterOperationSettings; + private final UnaryCallSettings updateClusterSettings; + private final OperationCallSettings + updateClusterOperationSettings; + private final UnaryCallSettings deleteClusterSettings; + private final OperationCallSettings + deleteClusterOperationSettings; + private final PagedCallSettings + listStreamsSettings; + private final UnaryCallSettings getStreamSettings; + private final UnaryCallSettings createStreamSettings; + private final OperationCallSettings + createStreamOperationSettings; + private final UnaryCallSettings updateStreamSettings; + private final OperationCallSettings + updateStreamOperationSettings; + private final UnaryCallSettings deleteStreamSettings; + private final OperationCallSettings + deleteStreamOperationSettings; + private final UnaryCallSettings getStreamThumbnailSettings; + private final OperationCallSettings< + GetStreamThumbnailRequest, GetStreamThumbnailResponse, OperationMetadata> + getStreamThumbnailOperationSettings; + private final UnaryCallSettings + generateStreamHlsTokenSettings; + private final PagedCallSettings + listEventsSettings; + private final UnaryCallSettings getEventSettings; + private final UnaryCallSettings createEventSettings; + private final OperationCallSettings + createEventOperationSettings; + private final UnaryCallSettings updateEventSettings; + private final OperationCallSettings + updateEventOperationSettings; + private final UnaryCallSettings deleteEventSettings; + private final OperationCallSettings + deleteEventOperationSettings; + private final PagedCallSettings + listSeriesSettings; + private final UnaryCallSettings getSeriesSettings; + private final UnaryCallSettings createSeriesSettings; + private final OperationCallSettings + createSeriesOperationSettings; + private final UnaryCallSettings updateSeriesSettings; + private final OperationCallSettings + updateSeriesOperationSettings; + private final UnaryCallSettings deleteSeriesSettings; + private final OperationCallSettings + deleteSeriesOperationSettings; + private final UnaryCallSettings materializeChannelSettings; + private final OperationCallSettings + materializeChannelOperationSettings; + + private static final PagedListDescriptor + LIST_CLUSTERS_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListClustersRequest injectToken(ListClustersRequest payload, String token) { + return ListClustersRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListClustersRequest injectPageSize(ListClustersRequest payload, int pageSize) { + return ListClustersRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListClustersRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListClustersResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListClustersResponse payload) { + return payload.getClustersList() == null + ? ImmutableList.of() + : payload.getClustersList(); + } + }; + + private static final PagedListDescriptor + LIST_STREAMS_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListStreamsRequest injectToken(ListStreamsRequest payload, String token) { + return ListStreamsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListStreamsRequest injectPageSize(ListStreamsRequest payload, int pageSize) { + return ListStreamsRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListStreamsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListStreamsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListStreamsResponse payload) { + return payload.getStreamsList() == null + ? ImmutableList.of() + : payload.getStreamsList(); + } + }; + + private static final PagedListDescriptor + LIST_EVENTS_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListEventsRequest injectToken(ListEventsRequest payload, String token) { + return ListEventsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListEventsRequest injectPageSize(ListEventsRequest payload, int pageSize) { + return ListEventsRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListEventsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListEventsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListEventsResponse payload) { + return payload.getEventsList() == null + ? ImmutableList.of() + : payload.getEventsList(); + } + }; + + private static final PagedListDescriptor + LIST_SERIES_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListSeriesRequest injectToken(ListSeriesRequest payload, String token) { + return ListSeriesRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListSeriesRequest injectPageSize(ListSeriesRequest payload, int pageSize) { + return ListSeriesRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListSeriesRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListSeriesResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListSeriesResponse payload) { + return payload.getSeriesList() == null + ? ImmutableList.of() + : payload.getSeriesList(); + } + }; + + private static final PagedListResponseFactory< + ListClustersRequest, ListClustersResponse, ListClustersPagedResponse> + LIST_CLUSTERS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListClustersRequest, ListClustersResponse, ListClustersPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListClustersRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, LIST_CLUSTERS_PAGE_STR_DESC, request, context); + return ListClustersPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListStreamsRequest, ListStreamsResponse, ListStreamsPagedResponse> + LIST_STREAMS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListStreamsRequest, ListStreamsResponse, ListStreamsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListStreamsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, LIST_STREAMS_PAGE_STR_DESC, request, context); + return ListStreamsPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListEventsRequest, ListEventsResponse, ListEventsPagedResponse> + LIST_EVENTS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListEventsRequest, ListEventsResponse, ListEventsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListEventsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, LIST_EVENTS_PAGE_STR_DESC, request, context); + return ListEventsPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListSeriesRequest, ListSeriesResponse, ListSeriesPagedResponse> + LIST_SERIES_PAGE_STR_FACT = + new PagedListResponseFactory< + ListSeriesRequest, ListSeriesResponse, ListSeriesPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListSeriesRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, LIST_SERIES_PAGE_STR_DESC, request, context); + return ListSeriesPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + /** Returns the object with the settings used for calls to listClusters. */ + public PagedCallSettings + listClustersSettings() { + return listClustersSettings; + } + + /** Returns the object with the settings used for calls to getCluster. */ + public UnaryCallSettings getClusterSettings() { + return getClusterSettings; + } + + /** Returns the object with the settings used for calls to createCluster. */ + public UnaryCallSettings createClusterSettings() { + return createClusterSettings; + } + + /** Returns the object with the settings used for calls to createCluster. */ + public OperationCallSettings + createClusterOperationSettings() { + return createClusterOperationSettings; + } + + /** Returns the object with the settings used for calls to updateCluster. */ + public UnaryCallSettings updateClusterSettings() { + return updateClusterSettings; + } + + /** Returns the object with the settings used for calls to updateCluster. */ + public OperationCallSettings + updateClusterOperationSettings() { + return updateClusterOperationSettings; + } + + /** Returns the object with the settings used for calls to deleteCluster. */ + public UnaryCallSettings deleteClusterSettings() { + return deleteClusterSettings; + } + + /** Returns the object with the settings used for calls to deleteCluster. */ + public OperationCallSettings + deleteClusterOperationSettings() { + return deleteClusterOperationSettings; + } + + /** Returns the object with the settings used for calls to listStreams. */ + public PagedCallSettings + listStreamsSettings() { + return listStreamsSettings; + } + + /** Returns the object with the settings used for calls to getStream. */ + public UnaryCallSettings getStreamSettings() { + return getStreamSettings; + } + + /** Returns the object with the settings used for calls to createStream. */ + public UnaryCallSettings createStreamSettings() { + return createStreamSettings; + } + + /** Returns the object with the settings used for calls to createStream. */ + public OperationCallSettings + createStreamOperationSettings() { + return createStreamOperationSettings; + } + + /** Returns the object with the settings used for calls to updateStream. */ + public UnaryCallSettings updateStreamSettings() { + return updateStreamSettings; + } + + /** Returns the object with the settings used for calls to updateStream. */ + public OperationCallSettings + updateStreamOperationSettings() { + return updateStreamOperationSettings; + } + + /** Returns the object with the settings used for calls to deleteStream. */ + public UnaryCallSettings deleteStreamSettings() { + return deleteStreamSettings; + } + + /** Returns the object with the settings used for calls to deleteStream. */ + public OperationCallSettings + deleteStreamOperationSettings() { + return deleteStreamOperationSettings; + } + + /** Returns the object with the settings used for calls to getStreamThumbnail. */ + public UnaryCallSettings getStreamThumbnailSettings() { + return getStreamThumbnailSettings; + } + + /** Returns the object with the settings used for calls to getStreamThumbnail. */ + public OperationCallSettings< + GetStreamThumbnailRequest, GetStreamThumbnailResponse, OperationMetadata> + getStreamThumbnailOperationSettings() { + return getStreamThumbnailOperationSettings; + } + + /** Returns the object with the settings used for calls to generateStreamHlsToken. */ + public UnaryCallSettings + generateStreamHlsTokenSettings() { + return generateStreamHlsTokenSettings; + } + + /** Returns the object with the settings used for calls to listEvents. */ + public PagedCallSettings + listEventsSettings() { + return listEventsSettings; + } + + /** Returns the object with the settings used for calls to getEvent. */ + public UnaryCallSettings getEventSettings() { + return getEventSettings; + } + + /** Returns the object with the settings used for calls to createEvent. */ + public UnaryCallSettings createEventSettings() { + return createEventSettings; + } + + /** Returns the object with the settings used for calls to createEvent. */ + public OperationCallSettings + createEventOperationSettings() { + return createEventOperationSettings; + } + + /** Returns the object with the settings used for calls to updateEvent. */ + public UnaryCallSettings updateEventSettings() { + return updateEventSettings; + } + + /** Returns the object with the settings used for calls to updateEvent. */ + public OperationCallSettings + updateEventOperationSettings() { + return updateEventOperationSettings; + } + + /** Returns the object with the settings used for calls to deleteEvent. */ + public UnaryCallSettings deleteEventSettings() { + return deleteEventSettings; + } + + /** Returns the object with the settings used for calls to deleteEvent. */ + public OperationCallSettings + deleteEventOperationSettings() { + return deleteEventOperationSettings; + } + + /** Returns the object with the settings used for calls to listSeries. */ + public PagedCallSettings + listSeriesSettings() { + return listSeriesSettings; + } + + /** Returns the object with the settings used for calls to getSeries. */ + public UnaryCallSettings getSeriesSettings() { + return getSeriesSettings; + } + + /** Returns the object with the settings used for calls to createSeries. */ + public UnaryCallSettings createSeriesSettings() { + return createSeriesSettings; + } + + /** Returns the object with the settings used for calls to createSeries. */ + public OperationCallSettings + createSeriesOperationSettings() { + return createSeriesOperationSettings; + } + + /** Returns the object with the settings used for calls to updateSeries. */ + public UnaryCallSettings updateSeriesSettings() { + return updateSeriesSettings; + } + + /** Returns the object with the settings used for calls to updateSeries. */ + public OperationCallSettings + updateSeriesOperationSettings() { + return updateSeriesOperationSettings; + } + + /** Returns the object with the settings used for calls to deleteSeries. */ + public UnaryCallSettings deleteSeriesSettings() { + return deleteSeriesSettings; + } + + /** Returns the object with the settings used for calls to deleteSeries. */ + public OperationCallSettings + deleteSeriesOperationSettings() { + return deleteSeriesOperationSettings; + } + + /** Returns the object with the settings used for calls to materializeChannel. */ + public UnaryCallSettings materializeChannelSettings() { + return materializeChannelSettings; + } + + /** Returns the object with the settings used for calls to materializeChannel. */ + public OperationCallSettings + materializeChannelOperationSettings() { + return materializeChannelOperationSettings; + } + + public StreamsServiceStub createStub() throws IOException { + if (getTransportChannelProvider() + .getTransportName() + .equals(GrpcTransportChannel.getGrpcTransportName())) { + return GrpcStreamsServiceStub.create(this); + } + if (getTransportChannelProvider() + .getTransportName() + .equals(HttpJsonTransportChannel.getHttpJsonTransportName())) { + return HttpJsonStreamsServiceStub.create(this); + } + throw new UnsupportedOperationException( + String.format( + "Transport not supported: %s", getTransportChannelProvider().getTransportName())); + } + + /** Returns the default service name. */ + @Override + public String getServiceName() { + return "visionai"; + } + + /** 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 "visionai.googleapis.com:443"; + } + + /** Returns the default mTLS service endpoint. */ + public static String getDefaultMtlsEndpoint() { + return "visionai.mtls.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) + .setUseJwtAccessWithScope(true); + } + + /** Returns a builder for the default gRPC ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return InstantiatingGrpcChannelProvider.newBuilder() + .setMaxInboundMessageSize(Integer.MAX_VALUE); + } + + /** Returns a builder for the default REST ChannelProvider for this service. */ + @BetaApi + public static InstantiatingHttpJsonChannelProvider.Builder + defaultHttpJsonTransportProviderBuilder() { + return InstantiatingHttpJsonChannelProvider.newBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return defaultGrpcTransportProviderBuilder().build(); + } + + public static ApiClientHeaderProvider.Builder defaultGrpcApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken( + "gapic", GaxProperties.getLibraryVersion(StreamsServiceStubSettings.class)) + .setTransportToken( + GaxGrpcProperties.getGrpcTokenName(), GaxGrpcProperties.getGrpcVersion()); + } + + public static ApiClientHeaderProvider.Builder defaultHttpJsonApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken( + "gapic", GaxProperties.getLibraryVersion(StreamsServiceStubSettings.class)) + .setTransportToken( + GaxHttpJsonProperties.getHttpJsonTokenName(), + GaxHttpJsonProperties.getHttpJsonVersion()); + } + + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return StreamsServiceStubSettings.defaultGrpcApiClientHeaderProviderBuilder(); + } + + /** Returns a new gRPC builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new REST builder for this class. */ + public static Builder newHttpJsonBuilder() { + return Builder.createHttpJsonDefault(); + } + + /** 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 StreamsServiceStubSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + + listClustersSettings = settingsBuilder.listClustersSettings().build(); + getClusterSettings = settingsBuilder.getClusterSettings().build(); + createClusterSettings = settingsBuilder.createClusterSettings().build(); + createClusterOperationSettings = settingsBuilder.createClusterOperationSettings().build(); + updateClusterSettings = settingsBuilder.updateClusterSettings().build(); + updateClusterOperationSettings = settingsBuilder.updateClusterOperationSettings().build(); + deleteClusterSettings = settingsBuilder.deleteClusterSettings().build(); + deleteClusterOperationSettings = settingsBuilder.deleteClusterOperationSettings().build(); + listStreamsSettings = settingsBuilder.listStreamsSettings().build(); + getStreamSettings = settingsBuilder.getStreamSettings().build(); + createStreamSettings = settingsBuilder.createStreamSettings().build(); + createStreamOperationSettings = settingsBuilder.createStreamOperationSettings().build(); + updateStreamSettings = settingsBuilder.updateStreamSettings().build(); + updateStreamOperationSettings = settingsBuilder.updateStreamOperationSettings().build(); + deleteStreamSettings = settingsBuilder.deleteStreamSettings().build(); + deleteStreamOperationSettings = settingsBuilder.deleteStreamOperationSettings().build(); + getStreamThumbnailSettings = settingsBuilder.getStreamThumbnailSettings().build(); + getStreamThumbnailOperationSettings = + settingsBuilder.getStreamThumbnailOperationSettings().build(); + generateStreamHlsTokenSettings = settingsBuilder.generateStreamHlsTokenSettings().build(); + listEventsSettings = settingsBuilder.listEventsSettings().build(); + getEventSettings = settingsBuilder.getEventSettings().build(); + createEventSettings = settingsBuilder.createEventSettings().build(); + createEventOperationSettings = settingsBuilder.createEventOperationSettings().build(); + updateEventSettings = settingsBuilder.updateEventSettings().build(); + updateEventOperationSettings = settingsBuilder.updateEventOperationSettings().build(); + deleteEventSettings = settingsBuilder.deleteEventSettings().build(); + deleteEventOperationSettings = settingsBuilder.deleteEventOperationSettings().build(); + listSeriesSettings = settingsBuilder.listSeriesSettings().build(); + getSeriesSettings = settingsBuilder.getSeriesSettings().build(); + createSeriesSettings = settingsBuilder.createSeriesSettings().build(); + createSeriesOperationSettings = settingsBuilder.createSeriesOperationSettings().build(); + updateSeriesSettings = settingsBuilder.updateSeriesSettings().build(); + updateSeriesOperationSettings = settingsBuilder.updateSeriesOperationSettings().build(); + deleteSeriesSettings = settingsBuilder.deleteSeriesSettings().build(); + deleteSeriesOperationSettings = settingsBuilder.deleteSeriesOperationSettings().build(); + materializeChannelSettings = settingsBuilder.materializeChannelSettings().build(); + materializeChannelOperationSettings = + settingsBuilder.materializeChannelOperationSettings().build(); + } + + /** Builder for StreamsServiceStubSettings. */ + public static class Builder extends StubSettings.Builder { + private final ImmutableList> unaryMethodSettingsBuilders; + private final PagedCallSettings.Builder< + ListClustersRequest, ListClustersResponse, ListClustersPagedResponse> + listClustersSettings; + private final UnaryCallSettings.Builder getClusterSettings; + private final UnaryCallSettings.Builder createClusterSettings; + private final OperationCallSettings.Builder + createClusterOperationSettings; + private final UnaryCallSettings.Builder updateClusterSettings; + private final OperationCallSettings.Builder + updateClusterOperationSettings; + private final UnaryCallSettings.Builder deleteClusterSettings; + private final OperationCallSettings.Builder + deleteClusterOperationSettings; + private final PagedCallSettings.Builder< + ListStreamsRequest, ListStreamsResponse, ListStreamsPagedResponse> + listStreamsSettings; + private final UnaryCallSettings.Builder getStreamSettings; + private final UnaryCallSettings.Builder createStreamSettings; + private final OperationCallSettings.Builder + createStreamOperationSettings; + private final UnaryCallSettings.Builder updateStreamSettings; + private final OperationCallSettings.Builder + updateStreamOperationSettings; + private final UnaryCallSettings.Builder deleteStreamSettings; + private final OperationCallSettings.Builder + deleteStreamOperationSettings; + private final UnaryCallSettings.Builder + getStreamThumbnailSettings; + private final OperationCallSettings.Builder< + GetStreamThumbnailRequest, GetStreamThumbnailResponse, OperationMetadata> + getStreamThumbnailOperationSettings; + private final UnaryCallSettings.Builder< + GenerateStreamHlsTokenRequest, GenerateStreamHlsTokenResponse> + generateStreamHlsTokenSettings; + private final PagedCallSettings.Builder< + ListEventsRequest, ListEventsResponse, ListEventsPagedResponse> + listEventsSettings; + private final UnaryCallSettings.Builder getEventSettings; + private final UnaryCallSettings.Builder createEventSettings; + private final OperationCallSettings.Builder + createEventOperationSettings; + private final UnaryCallSettings.Builder updateEventSettings; + private final OperationCallSettings.Builder + updateEventOperationSettings; + private final UnaryCallSettings.Builder deleteEventSettings; + private final OperationCallSettings.Builder + deleteEventOperationSettings; + private final PagedCallSettings.Builder< + ListSeriesRequest, ListSeriesResponse, ListSeriesPagedResponse> + listSeriesSettings; + private final UnaryCallSettings.Builder getSeriesSettings; + private final UnaryCallSettings.Builder createSeriesSettings; + private final OperationCallSettings.Builder + createSeriesOperationSettings; + private final UnaryCallSettings.Builder updateSeriesSettings; + private final OperationCallSettings.Builder + updateSeriesOperationSettings; + private final UnaryCallSettings.Builder deleteSeriesSettings; + private final OperationCallSettings.Builder + deleteSeriesOperationSettings; + private final UnaryCallSettings.Builder + materializeChannelSettings; + private final OperationCallSettings.Builder< + MaterializeChannelRequest, Channel, OperationMetadata> + materializeChannelOperationSettings; + private static final ImmutableMap> + RETRYABLE_CODE_DEFINITIONS; + + static { + ImmutableMap.Builder> definitions = + ImmutableMap.builder(); + definitions.put("no_retry_codes", 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().setRpcTimeoutMultiplier(1.0).build(); + definitions.put("no_retry_params", settings); + RETRY_PARAM_DEFINITIONS = definitions.build(); + } + + protected Builder() { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(clientContext); + + listClustersSettings = PagedCallSettings.newBuilder(LIST_CLUSTERS_PAGE_STR_FACT); + getClusterSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createClusterSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createClusterOperationSettings = OperationCallSettings.newBuilder(); + updateClusterSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + updateClusterOperationSettings = OperationCallSettings.newBuilder(); + deleteClusterSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + deleteClusterOperationSettings = OperationCallSettings.newBuilder(); + listStreamsSettings = PagedCallSettings.newBuilder(LIST_STREAMS_PAGE_STR_FACT); + getStreamSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createStreamSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createStreamOperationSettings = OperationCallSettings.newBuilder(); + updateStreamSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + updateStreamOperationSettings = OperationCallSettings.newBuilder(); + deleteStreamSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + deleteStreamOperationSettings = OperationCallSettings.newBuilder(); + getStreamThumbnailSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + getStreamThumbnailOperationSettings = OperationCallSettings.newBuilder(); + generateStreamHlsTokenSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + listEventsSettings = PagedCallSettings.newBuilder(LIST_EVENTS_PAGE_STR_FACT); + getEventSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createEventSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createEventOperationSettings = OperationCallSettings.newBuilder(); + updateEventSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + updateEventOperationSettings = OperationCallSettings.newBuilder(); + deleteEventSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + deleteEventOperationSettings = OperationCallSettings.newBuilder(); + listSeriesSettings = PagedCallSettings.newBuilder(LIST_SERIES_PAGE_STR_FACT); + getSeriesSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createSeriesSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createSeriesOperationSettings = OperationCallSettings.newBuilder(); + updateSeriesSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + updateSeriesOperationSettings = OperationCallSettings.newBuilder(); + deleteSeriesSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + deleteSeriesOperationSettings = OperationCallSettings.newBuilder(); + materializeChannelSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + materializeChannelOperationSettings = OperationCallSettings.newBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + listClustersSettings, + getClusterSettings, + createClusterSettings, + updateClusterSettings, + deleteClusterSettings, + listStreamsSettings, + getStreamSettings, + createStreamSettings, + updateStreamSettings, + deleteStreamSettings, + getStreamThumbnailSettings, + generateStreamHlsTokenSettings, + listEventsSettings, + getEventSettings, + createEventSettings, + updateEventSettings, + deleteEventSettings, + listSeriesSettings, + getSeriesSettings, + createSeriesSettings, + updateSeriesSettings, + deleteSeriesSettings, + materializeChannelSettings); + initDefaults(this); + } + + protected Builder(StreamsServiceStubSettings settings) { + super(settings); + + listClustersSettings = settings.listClustersSettings.toBuilder(); + getClusterSettings = settings.getClusterSettings.toBuilder(); + createClusterSettings = settings.createClusterSettings.toBuilder(); + createClusterOperationSettings = settings.createClusterOperationSettings.toBuilder(); + updateClusterSettings = settings.updateClusterSettings.toBuilder(); + updateClusterOperationSettings = settings.updateClusterOperationSettings.toBuilder(); + deleteClusterSettings = settings.deleteClusterSettings.toBuilder(); + deleteClusterOperationSettings = settings.deleteClusterOperationSettings.toBuilder(); + listStreamsSettings = settings.listStreamsSettings.toBuilder(); + getStreamSettings = settings.getStreamSettings.toBuilder(); + createStreamSettings = settings.createStreamSettings.toBuilder(); + createStreamOperationSettings = settings.createStreamOperationSettings.toBuilder(); + updateStreamSettings = settings.updateStreamSettings.toBuilder(); + updateStreamOperationSettings = settings.updateStreamOperationSettings.toBuilder(); + deleteStreamSettings = settings.deleteStreamSettings.toBuilder(); + deleteStreamOperationSettings = settings.deleteStreamOperationSettings.toBuilder(); + getStreamThumbnailSettings = settings.getStreamThumbnailSettings.toBuilder(); + getStreamThumbnailOperationSettings = + settings.getStreamThumbnailOperationSettings.toBuilder(); + generateStreamHlsTokenSettings = settings.generateStreamHlsTokenSettings.toBuilder(); + listEventsSettings = settings.listEventsSettings.toBuilder(); + getEventSettings = settings.getEventSettings.toBuilder(); + createEventSettings = settings.createEventSettings.toBuilder(); + createEventOperationSettings = settings.createEventOperationSettings.toBuilder(); + updateEventSettings = settings.updateEventSettings.toBuilder(); + updateEventOperationSettings = settings.updateEventOperationSettings.toBuilder(); + deleteEventSettings = settings.deleteEventSettings.toBuilder(); + deleteEventOperationSettings = settings.deleteEventOperationSettings.toBuilder(); + listSeriesSettings = settings.listSeriesSettings.toBuilder(); + getSeriesSettings = settings.getSeriesSettings.toBuilder(); + createSeriesSettings = settings.createSeriesSettings.toBuilder(); + createSeriesOperationSettings = settings.createSeriesOperationSettings.toBuilder(); + updateSeriesSettings = settings.updateSeriesSettings.toBuilder(); + updateSeriesOperationSettings = settings.updateSeriesOperationSettings.toBuilder(); + deleteSeriesSettings = settings.deleteSeriesSettings.toBuilder(); + deleteSeriesOperationSettings = settings.deleteSeriesOperationSettings.toBuilder(); + materializeChannelSettings = settings.materializeChannelSettings.toBuilder(); + materializeChannelOperationSettings = + settings.materializeChannelOperationSettings.toBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + listClustersSettings, + getClusterSettings, + createClusterSettings, + updateClusterSettings, + deleteClusterSettings, + listStreamsSettings, + getStreamSettings, + createStreamSettings, + updateStreamSettings, + deleteStreamSettings, + getStreamThumbnailSettings, + generateStreamHlsTokenSettings, + listEventsSettings, + getEventSettings, + createEventSettings, + updateEventSettings, + deleteEventSettings, + listSeriesSettings, + getSeriesSettings, + createSeriesSettings, + updateSeriesSettings, + deleteSeriesSettings, + materializeChannelSettings); + } + + private static Builder createDefault() { + Builder builder = new Builder(((ClientContext) null)); + + builder.setTransportChannelProvider(defaultTransportChannelProvider()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultApiClientHeaderProviderBuilder().build()); + builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); + builder.setSwitchToMtlsEndpointAllowed(true); + + return initDefaults(builder); + } + + private static Builder createHttpJsonDefault() { + Builder builder = new Builder(((ClientContext) null)); + + builder.setTransportChannelProvider(defaultHttpJsonTransportProviderBuilder().build()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultHttpJsonApiClientHeaderProviderBuilder().build()); + builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); + builder.setSwitchToMtlsEndpointAllowed(true); + + return initDefaults(builder); + } + + private static Builder initDefaults(Builder builder) { + builder + .listClustersSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .getClusterSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .createClusterSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .updateClusterSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .deleteClusterSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .listStreamsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .getStreamSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .createStreamSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .updateStreamSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .deleteStreamSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .getStreamThumbnailSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .generateStreamHlsTokenSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .listEventsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .getEventSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .createEventSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .updateEventSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .deleteEventSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .listSeriesSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .getSeriesSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .createSeriesSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .updateSeriesSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .deleteSeriesSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .materializeChannelSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .createClusterOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Cluster.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + builder + .updateClusterOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Cluster.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + builder + .deleteClusterOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Empty.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + builder + .createStreamOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Stream.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + builder + .updateStreamOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Stream.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + builder + .deleteStreamOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Empty.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + builder + .getStreamThumbnailOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create( + GetStreamThumbnailResponse.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + builder + .createEventOperationSettings() + .setInitialCallSettings( + UnaryCallSettings.newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Event.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + builder + .updateEventOperationSettings() + .setInitialCallSettings( + UnaryCallSettings.newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Event.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + builder + .deleteEventOperationSettings() + .setInitialCallSettings( + UnaryCallSettings.newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Empty.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + builder + .createSeriesOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Series.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + builder + .updateSeriesOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Series.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + builder + .deleteSeriesOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Empty.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + builder + .materializeChannelOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Channel.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + return builder; + } + + /** + * 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) { + super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater); + return this; + } + + public ImmutableList> unaryMethodSettingsBuilders() { + return unaryMethodSettingsBuilders; + } + + /** Returns the builder for the settings used for calls to listClusters. */ + public PagedCallSettings.Builder< + ListClustersRequest, ListClustersResponse, ListClustersPagedResponse> + listClustersSettings() { + return listClustersSettings; + } + + /** Returns the builder for the settings used for calls to getCluster. */ + public UnaryCallSettings.Builder getClusterSettings() { + return getClusterSettings; + } + + /** Returns the builder for the settings used for calls to createCluster. */ + public UnaryCallSettings.Builder createClusterSettings() { + return createClusterSettings; + } + + /** Returns the builder for the settings used for calls to createCluster. */ + public OperationCallSettings.Builder + createClusterOperationSettings() { + return createClusterOperationSettings; + } + + /** Returns the builder for the settings used for calls to updateCluster. */ + public UnaryCallSettings.Builder updateClusterSettings() { + return updateClusterSettings; + } + + /** Returns the builder for the settings used for calls to updateCluster. */ + public OperationCallSettings.Builder + updateClusterOperationSettings() { + return updateClusterOperationSettings; + } + + /** Returns the builder for the settings used for calls to deleteCluster. */ + public UnaryCallSettings.Builder deleteClusterSettings() { + return deleteClusterSettings; + } + + /** Returns the builder for the settings used for calls to deleteCluster. */ + public OperationCallSettings.Builder + deleteClusterOperationSettings() { + return deleteClusterOperationSettings; + } + + /** Returns the builder for the settings used for calls to listStreams. */ + public PagedCallSettings.Builder< + ListStreamsRequest, ListStreamsResponse, ListStreamsPagedResponse> + listStreamsSettings() { + return listStreamsSettings; + } + + /** Returns the builder for the settings used for calls to getStream. */ + public UnaryCallSettings.Builder getStreamSettings() { + return getStreamSettings; + } + + /** Returns the builder for the settings used for calls to createStream. */ + public UnaryCallSettings.Builder createStreamSettings() { + return createStreamSettings; + } + + /** Returns the builder for the settings used for calls to createStream. */ + public OperationCallSettings.Builder + createStreamOperationSettings() { + return createStreamOperationSettings; + } + + /** Returns the builder for the settings used for calls to updateStream. */ + public UnaryCallSettings.Builder updateStreamSettings() { + return updateStreamSettings; + } + + /** Returns the builder for the settings used for calls to updateStream. */ + public OperationCallSettings.Builder + updateStreamOperationSettings() { + return updateStreamOperationSettings; + } + + /** Returns the builder for the settings used for calls to deleteStream. */ + public UnaryCallSettings.Builder deleteStreamSettings() { + return deleteStreamSettings; + } + + /** Returns the builder for the settings used for calls to deleteStream. */ + public OperationCallSettings.Builder + deleteStreamOperationSettings() { + return deleteStreamOperationSettings; + } + + /** Returns the builder for the settings used for calls to getStreamThumbnail. */ + public UnaryCallSettings.Builder + getStreamThumbnailSettings() { + return getStreamThumbnailSettings; + } + + /** Returns the builder for the settings used for calls to getStreamThumbnail. */ + public OperationCallSettings.Builder< + GetStreamThumbnailRequest, GetStreamThumbnailResponse, OperationMetadata> + getStreamThumbnailOperationSettings() { + return getStreamThumbnailOperationSettings; + } + + /** Returns the builder for the settings used for calls to generateStreamHlsToken. */ + public UnaryCallSettings.Builder + generateStreamHlsTokenSettings() { + return generateStreamHlsTokenSettings; + } + + /** Returns the builder for the settings used for calls to listEvents. */ + public PagedCallSettings.Builder + listEventsSettings() { + return listEventsSettings; + } + + /** Returns the builder for the settings used for calls to getEvent. */ + public UnaryCallSettings.Builder getEventSettings() { + return getEventSettings; + } + + /** Returns the builder for the settings used for calls to createEvent. */ + public UnaryCallSettings.Builder createEventSettings() { + return createEventSettings; + } + + /** Returns the builder for the settings used for calls to createEvent. */ + public OperationCallSettings.Builder + createEventOperationSettings() { + return createEventOperationSettings; + } + + /** Returns the builder for the settings used for calls to updateEvent. */ + public UnaryCallSettings.Builder updateEventSettings() { + return updateEventSettings; + } + + /** Returns the builder for the settings used for calls to updateEvent. */ + public OperationCallSettings.Builder + updateEventOperationSettings() { + return updateEventOperationSettings; + } + + /** Returns the builder for the settings used for calls to deleteEvent. */ + public UnaryCallSettings.Builder deleteEventSettings() { + return deleteEventSettings; + } + + /** Returns the builder for the settings used for calls to deleteEvent. */ + public OperationCallSettings.Builder + deleteEventOperationSettings() { + return deleteEventOperationSettings; + } + + /** Returns the builder for the settings used for calls to listSeries. */ + public PagedCallSettings.Builder + listSeriesSettings() { + return listSeriesSettings; + } + + /** Returns the builder for the settings used for calls to getSeries. */ + public UnaryCallSettings.Builder getSeriesSettings() { + return getSeriesSettings; + } + + /** Returns the builder for the settings used for calls to createSeries. */ + public UnaryCallSettings.Builder createSeriesSettings() { + return createSeriesSettings; + } + + /** Returns the builder for the settings used for calls to createSeries. */ + public OperationCallSettings.Builder + createSeriesOperationSettings() { + return createSeriesOperationSettings; + } + + /** Returns the builder for the settings used for calls to updateSeries. */ + public UnaryCallSettings.Builder updateSeriesSettings() { + return updateSeriesSettings; + } + + /** Returns the builder for the settings used for calls to updateSeries. */ + public OperationCallSettings.Builder + updateSeriesOperationSettings() { + return updateSeriesOperationSettings; + } + + /** Returns the builder for the settings used for calls to deleteSeries. */ + public UnaryCallSettings.Builder deleteSeriesSettings() { + return deleteSeriesSettings; + } + + /** Returns the builder for the settings used for calls to deleteSeries. */ + public OperationCallSettings.Builder + deleteSeriesOperationSettings() { + return deleteSeriesOperationSettings; + } + + /** Returns the builder for the settings used for calls to materializeChannel. */ + public UnaryCallSettings.Builder + materializeChannelSettings() { + return materializeChannelSettings; + } + + /** Returns the builder for the settings used for calls to materializeChannel. */ + public OperationCallSettings.Builder + materializeChannelOperationSettings() { + return materializeChannelOperationSettings; + } + + @Override + public StreamsServiceStubSettings build() throws IOException { + return new StreamsServiceStubSettings(this); + } + } +} diff --git a/java-visionai/google-cloud-visionai/src/main/java/com/google/cloud/visionai/v1/stub/WarehouseStub.java b/java-visionai/google-cloud-visionai/src/main/java/com/google/cloud/visionai/v1/stub/WarehouseStub.java new file mode 100644 index 000000000000..8c01a6c89bf1 --- /dev/null +++ b/java-visionai/google-cloud-visionai/src/main/java/com/google/cloud/visionai/v1/stub/WarehouseStub.java @@ -0,0 +1,594 @@ +/* + * Copyright 2024 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.visionai.v1.stub; + +import static com.google.cloud.visionai.v1.WarehouseClient.ListAnnotationsPagedResponse; +import static com.google.cloud.visionai.v1.WarehouseClient.ListAssetsPagedResponse; +import static com.google.cloud.visionai.v1.WarehouseClient.ListCollectionsPagedResponse; +import static com.google.cloud.visionai.v1.WarehouseClient.ListCorporaPagedResponse; +import static com.google.cloud.visionai.v1.WarehouseClient.ListDataSchemasPagedResponse; +import static com.google.cloud.visionai.v1.WarehouseClient.ListIndexEndpointsPagedResponse; +import static com.google.cloud.visionai.v1.WarehouseClient.ListIndexesPagedResponse; +import static com.google.cloud.visionai.v1.WarehouseClient.ListSearchConfigsPagedResponse; +import static com.google.cloud.visionai.v1.WarehouseClient.ListSearchHypernymsPagedResponse; +import static com.google.cloud.visionai.v1.WarehouseClient.SearchAssetsPagedResponse; +import static com.google.cloud.visionai.v1.WarehouseClient.SearchIndexEndpointPagedResponse; +import static com.google.cloud.visionai.v1.WarehouseClient.ViewCollectionItemsPagedResponse; +import static com.google.cloud.visionai.v1.WarehouseClient.ViewIndexedAssetsPagedResponse; + +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.rpc.BidiStreamingCallable; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.visionai.v1.AddCollectionItemRequest; +import com.google.cloud.visionai.v1.AddCollectionItemResponse; +import com.google.cloud.visionai.v1.AnalyzeAssetMetadata; +import com.google.cloud.visionai.v1.AnalyzeAssetRequest; +import com.google.cloud.visionai.v1.AnalyzeAssetResponse; +import com.google.cloud.visionai.v1.AnalyzeCorpusMetadata; +import com.google.cloud.visionai.v1.AnalyzeCorpusRequest; +import com.google.cloud.visionai.v1.AnalyzeCorpusResponse; +import com.google.cloud.visionai.v1.Annotation; +import com.google.cloud.visionai.v1.Asset; +import com.google.cloud.visionai.v1.ClipAssetRequest; +import com.google.cloud.visionai.v1.ClipAssetResponse; +import com.google.cloud.visionai.v1.Collection; +import com.google.cloud.visionai.v1.Corpus; +import com.google.cloud.visionai.v1.CreateAnnotationRequest; +import com.google.cloud.visionai.v1.CreateAssetRequest; +import com.google.cloud.visionai.v1.CreateCollectionMetadata; +import com.google.cloud.visionai.v1.CreateCollectionRequest; +import com.google.cloud.visionai.v1.CreateCorpusMetadata; +import com.google.cloud.visionai.v1.CreateCorpusRequest; +import com.google.cloud.visionai.v1.CreateDataSchemaRequest; +import com.google.cloud.visionai.v1.CreateIndexEndpointMetadata; +import com.google.cloud.visionai.v1.CreateIndexEndpointRequest; +import com.google.cloud.visionai.v1.CreateIndexMetadata; +import com.google.cloud.visionai.v1.CreateIndexRequest; +import com.google.cloud.visionai.v1.CreateSearchConfigRequest; +import com.google.cloud.visionai.v1.CreateSearchHypernymRequest; +import com.google.cloud.visionai.v1.DataSchema; +import com.google.cloud.visionai.v1.DeleteAnnotationRequest; +import com.google.cloud.visionai.v1.DeleteAssetMetadata; +import com.google.cloud.visionai.v1.DeleteAssetRequest; +import com.google.cloud.visionai.v1.DeleteCollectionMetadata; +import com.google.cloud.visionai.v1.DeleteCollectionRequest; +import com.google.cloud.visionai.v1.DeleteCorpusRequest; +import com.google.cloud.visionai.v1.DeleteDataSchemaRequest; +import com.google.cloud.visionai.v1.DeleteIndexEndpointMetadata; +import com.google.cloud.visionai.v1.DeleteIndexEndpointRequest; +import com.google.cloud.visionai.v1.DeleteIndexMetadata; +import com.google.cloud.visionai.v1.DeleteIndexRequest; +import com.google.cloud.visionai.v1.DeleteSearchConfigRequest; +import com.google.cloud.visionai.v1.DeleteSearchHypernymRequest; +import com.google.cloud.visionai.v1.DeployIndexMetadata; +import com.google.cloud.visionai.v1.DeployIndexRequest; +import com.google.cloud.visionai.v1.DeployIndexResponse; +import com.google.cloud.visionai.v1.GenerateHlsUriRequest; +import com.google.cloud.visionai.v1.GenerateHlsUriResponse; +import com.google.cloud.visionai.v1.GenerateRetrievalUrlRequest; +import com.google.cloud.visionai.v1.GenerateRetrievalUrlResponse; +import com.google.cloud.visionai.v1.GetAnnotationRequest; +import com.google.cloud.visionai.v1.GetAssetRequest; +import com.google.cloud.visionai.v1.GetCollectionRequest; +import com.google.cloud.visionai.v1.GetCorpusRequest; +import com.google.cloud.visionai.v1.GetDataSchemaRequest; +import com.google.cloud.visionai.v1.GetIndexEndpointRequest; +import com.google.cloud.visionai.v1.GetIndexRequest; +import com.google.cloud.visionai.v1.GetSearchConfigRequest; +import com.google.cloud.visionai.v1.GetSearchHypernymRequest; +import com.google.cloud.visionai.v1.ImportAssetsMetadata; +import com.google.cloud.visionai.v1.ImportAssetsRequest; +import com.google.cloud.visionai.v1.ImportAssetsResponse; +import com.google.cloud.visionai.v1.Index; +import com.google.cloud.visionai.v1.IndexAssetMetadata; +import com.google.cloud.visionai.v1.IndexAssetRequest; +import com.google.cloud.visionai.v1.IndexAssetResponse; +import com.google.cloud.visionai.v1.IndexEndpoint; +import com.google.cloud.visionai.v1.IngestAssetRequest; +import com.google.cloud.visionai.v1.IngestAssetResponse; +import com.google.cloud.visionai.v1.ListAnnotationsRequest; +import com.google.cloud.visionai.v1.ListAnnotationsResponse; +import com.google.cloud.visionai.v1.ListAssetsRequest; +import com.google.cloud.visionai.v1.ListAssetsResponse; +import com.google.cloud.visionai.v1.ListCollectionsRequest; +import com.google.cloud.visionai.v1.ListCollectionsResponse; +import com.google.cloud.visionai.v1.ListCorporaRequest; +import com.google.cloud.visionai.v1.ListCorporaResponse; +import com.google.cloud.visionai.v1.ListDataSchemasRequest; +import com.google.cloud.visionai.v1.ListDataSchemasResponse; +import com.google.cloud.visionai.v1.ListIndexEndpointsRequest; +import com.google.cloud.visionai.v1.ListIndexEndpointsResponse; +import com.google.cloud.visionai.v1.ListIndexesRequest; +import com.google.cloud.visionai.v1.ListIndexesResponse; +import com.google.cloud.visionai.v1.ListSearchConfigsRequest; +import com.google.cloud.visionai.v1.ListSearchConfigsResponse; +import com.google.cloud.visionai.v1.ListSearchHypernymsRequest; +import com.google.cloud.visionai.v1.ListSearchHypernymsResponse; +import com.google.cloud.visionai.v1.RemoveCollectionItemRequest; +import com.google.cloud.visionai.v1.RemoveCollectionItemResponse; +import com.google.cloud.visionai.v1.RemoveIndexAssetMetadata; +import com.google.cloud.visionai.v1.RemoveIndexAssetRequest; +import com.google.cloud.visionai.v1.RemoveIndexAssetResponse; +import com.google.cloud.visionai.v1.SearchAssetsRequest; +import com.google.cloud.visionai.v1.SearchAssetsResponse; +import com.google.cloud.visionai.v1.SearchConfig; +import com.google.cloud.visionai.v1.SearchHypernym; +import com.google.cloud.visionai.v1.SearchIndexEndpointRequest; +import com.google.cloud.visionai.v1.SearchIndexEndpointResponse; +import com.google.cloud.visionai.v1.UndeployIndexMetadata; +import com.google.cloud.visionai.v1.UndeployIndexRequest; +import com.google.cloud.visionai.v1.UndeployIndexResponse; +import com.google.cloud.visionai.v1.UpdateAnnotationRequest; +import com.google.cloud.visionai.v1.UpdateAssetRequest; +import com.google.cloud.visionai.v1.UpdateCollectionRequest; +import com.google.cloud.visionai.v1.UpdateCorpusRequest; +import com.google.cloud.visionai.v1.UpdateDataSchemaRequest; +import com.google.cloud.visionai.v1.UpdateIndexEndpointMetadata; +import com.google.cloud.visionai.v1.UpdateIndexEndpointRequest; +import com.google.cloud.visionai.v1.UpdateIndexMetadata; +import com.google.cloud.visionai.v1.UpdateIndexRequest; +import com.google.cloud.visionai.v1.UpdateSearchConfigRequest; +import com.google.cloud.visionai.v1.UpdateSearchHypernymRequest; +import com.google.cloud.visionai.v1.UploadAssetMetadata; +import com.google.cloud.visionai.v1.UploadAssetRequest; +import com.google.cloud.visionai.v1.UploadAssetResponse; +import com.google.cloud.visionai.v1.ViewCollectionItemsRequest; +import com.google.cloud.visionai.v1.ViewCollectionItemsResponse; +import com.google.cloud.visionai.v1.ViewIndexedAssetsRequest; +import com.google.cloud.visionai.v1.ViewIndexedAssetsResponse; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.OperationsStub; +import com.google.protobuf.Empty; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Base stub class for the Warehouse service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") +public abstract class WarehouseStub implements BackgroundResource { + + public OperationsStub getOperationsStub() { + return null; + } + + public com.google.api.gax.httpjson.longrunning.stub.OperationsStub getHttpJsonOperationsStub() { + return null; + } + + public UnaryCallable createAssetCallable() { + throw new UnsupportedOperationException("Not implemented: createAssetCallable()"); + } + + public UnaryCallable updateAssetCallable() { + throw new UnsupportedOperationException("Not implemented: updateAssetCallable()"); + } + + public UnaryCallable getAssetCallable() { + throw new UnsupportedOperationException("Not implemented: getAssetCallable()"); + } + + public UnaryCallable listAssetsPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listAssetsPagedCallable()"); + } + + public UnaryCallable listAssetsCallable() { + throw new UnsupportedOperationException("Not implemented: listAssetsCallable()"); + } + + public OperationCallable + deleteAssetOperationCallable() { + throw new UnsupportedOperationException("Not implemented: deleteAssetOperationCallable()"); + } + + public UnaryCallable deleteAssetCallable() { + throw new UnsupportedOperationException("Not implemented: deleteAssetCallable()"); + } + + public OperationCallable + uploadAssetOperationCallable() { + throw new UnsupportedOperationException("Not implemented: uploadAssetOperationCallable()"); + } + + public UnaryCallable uploadAssetCallable() { + throw new UnsupportedOperationException("Not implemented: uploadAssetCallable()"); + } + + public UnaryCallable + generateRetrievalUrlCallable() { + throw new UnsupportedOperationException("Not implemented: generateRetrievalUrlCallable()"); + } + + public OperationCallable + analyzeAssetOperationCallable() { + throw new UnsupportedOperationException("Not implemented: analyzeAssetOperationCallable()"); + } + + public UnaryCallable analyzeAssetCallable() { + throw new UnsupportedOperationException("Not implemented: analyzeAssetCallable()"); + } + + public OperationCallable + indexAssetOperationCallable() { + throw new UnsupportedOperationException("Not implemented: indexAssetOperationCallable()"); + } + + public UnaryCallable indexAssetCallable() { + throw new UnsupportedOperationException("Not implemented: indexAssetCallable()"); + } + + public OperationCallable< + RemoveIndexAssetRequest, RemoveIndexAssetResponse, RemoveIndexAssetMetadata> + removeIndexAssetOperationCallable() { + throw new UnsupportedOperationException("Not implemented: removeIndexAssetOperationCallable()"); + } + + public UnaryCallable removeIndexAssetCallable() { + throw new UnsupportedOperationException("Not implemented: removeIndexAssetCallable()"); + } + + public UnaryCallable + viewIndexedAssetsPagedCallable() { + throw new UnsupportedOperationException("Not implemented: viewIndexedAssetsPagedCallable()"); + } + + public UnaryCallable + viewIndexedAssetsCallable() { + throw new UnsupportedOperationException("Not implemented: viewIndexedAssetsCallable()"); + } + + public OperationCallable + createIndexOperationCallable() { + throw new UnsupportedOperationException("Not implemented: createIndexOperationCallable()"); + } + + public UnaryCallable createIndexCallable() { + throw new UnsupportedOperationException("Not implemented: createIndexCallable()"); + } + + public OperationCallable + updateIndexOperationCallable() { + throw new UnsupportedOperationException("Not implemented: updateIndexOperationCallable()"); + } + + public UnaryCallable updateIndexCallable() { + throw new UnsupportedOperationException("Not implemented: updateIndexCallable()"); + } + + public UnaryCallable getIndexCallable() { + throw new UnsupportedOperationException("Not implemented: getIndexCallable()"); + } + + public UnaryCallable listIndexesPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listIndexesPagedCallable()"); + } + + public UnaryCallable listIndexesCallable() { + throw new UnsupportedOperationException("Not implemented: listIndexesCallable()"); + } + + public OperationCallable + deleteIndexOperationCallable() { + throw new UnsupportedOperationException("Not implemented: deleteIndexOperationCallable()"); + } + + public UnaryCallable deleteIndexCallable() { + throw new UnsupportedOperationException("Not implemented: deleteIndexCallable()"); + } + + public OperationCallable + createCorpusOperationCallable() { + throw new UnsupportedOperationException("Not implemented: createCorpusOperationCallable()"); + } + + public UnaryCallable createCorpusCallable() { + throw new UnsupportedOperationException("Not implemented: createCorpusCallable()"); + } + + public UnaryCallable getCorpusCallable() { + throw new UnsupportedOperationException("Not implemented: getCorpusCallable()"); + } + + public UnaryCallable updateCorpusCallable() { + throw new UnsupportedOperationException("Not implemented: updateCorpusCallable()"); + } + + public UnaryCallable listCorporaPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listCorporaPagedCallable()"); + } + + public UnaryCallable listCorporaCallable() { + throw new UnsupportedOperationException("Not implemented: listCorporaCallable()"); + } + + public UnaryCallable deleteCorpusCallable() { + throw new UnsupportedOperationException("Not implemented: deleteCorpusCallable()"); + } + + public OperationCallable + analyzeCorpusOperationCallable() { + throw new UnsupportedOperationException("Not implemented: analyzeCorpusOperationCallable()"); + } + + public UnaryCallable analyzeCorpusCallable() { + throw new UnsupportedOperationException("Not implemented: analyzeCorpusCallable()"); + } + + public UnaryCallable createDataSchemaCallable() { + throw new UnsupportedOperationException("Not implemented: createDataSchemaCallable()"); + } + + public UnaryCallable updateDataSchemaCallable() { + throw new UnsupportedOperationException("Not implemented: updateDataSchemaCallable()"); + } + + public UnaryCallable getDataSchemaCallable() { + throw new UnsupportedOperationException("Not implemented: getDataSchemaCallable()"); + } + + public UnaryCallable deleteDataSchemaCallable() { + throw new UnsupportedOperationException("Not implemented: deleteDataSchemaCallable()"); + } + + public UnaryCallable + listDataSchemasPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listDataSchemasPagedCallable()"); + } + + public UnaryCallable listDataSchemasCallable() { + throw new UnsupportedOperationException("Not implemented: listDataSchemasCallable()"); + } + + public UnaryCallable createAnnotationCallable() { + throw new UnsupportedOperationException("Not implemented: createAnnotationCallable()"); + } + + public UnaryCallable getAnnotationCallable() { + throw new UnsupportedOperationException("Not implemented: getAnnotationCallable()"); + } + + public UnaryCallable + listAnnotationsPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listAnnotationsPagedCallable()"); + } + + public UnaryCallable listAnnotationsCallable() { + throw new UnsupportedOperationException("Not implemented: listAnnotationsCallable()"); + } + + public UnaryCallable updateAnnotationCallable() { + throw new UnsupportedOperationException("Not implemented: updateAnnotationCallable()"); + } + + public UnaryCallable deleteAnnotationCallable() { + throw new UnsupportedOperationException("Not implemented: deleteAnnotationCallable()"); + } + + public BidiStreamingCallable ingestAssetCallable() { + throw new UnsupportedOperationException("Not implemented: ingestAssetCallable()"); + } + + public UnaryCallable clipAssetCallable() { + throw new UnsupportedOperationException("Not implemented: clipAssetCallable()"); + } + + public UnaryCallable generateHlsUriCallable() { + throw new UnsupportedOperationException("Not implemented: generateHlsUriCallable()"); + } + + public OperationCallable + importAssetsOperationCallable() { + throw new UnsupportedOperationException("Not implemented: importAssetsOperationCallable()"); + } + + public UnaryCallable importAssetsCallable() { + throw new UnsupportedOperationException("Not implemented: importAssetsCallable()"); + } + + public UnaryCallable createSearchConfigCallable() { + throw new UnsupportedOperationException("Not implemented: createSearchConfigCallable()"); + } + + public UnaryCallable updateSearchConfigCallable() { + throw new UnsupportedOperationException("Not implemented: updateSearchConfigCallable()"); + } + + public UnaryCallable getSearchConfigCallable() { + throw new UnsupportedOperationException("Not implemented: getSearchConfigCallable()"); + } + + public UnaryCallable deleteSearchConfigCallable() { + throw new UnsupportedOperationException("Not implemented: deleteSearchConfigCallable()"); + } + + public UnaryCallable + listSearchConfigsPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listSearchConfigsPagedCallable()"); + } + + public UnaryCallable + listSearchConfigsCallable() { + throw new UnsupportedOperationException("Not implemented: listSearchConfigsCallable()"); + } + + public UnaryCallable createSearchHypernymCallable() { + throw new UnsupportedOperationException("Not implemented: createSearchHypernymCallable()"); + } + + public UnaryCallable updateSearchHypernymCallable() { + throw new UnsupportedOperationException("Not implemented: updateSearchHypernymCallable()"); + } + + public UnaryCallable getSearchHypernymCallable() { + throw new UnsupportedOperationException("Not implemented: getSearchHypernymCallable()"); + } + + public UnaryCallable deleteSearchHypernymCallable() { + throw new UnsupportedOperationException("Not implemented: deleteSearchHypernymCallable()"); + } + + public UnaryCallable + listSearchHypernymsPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listSearchHypernymsPagedCallable()"); + } + + public UnaryCallable + listSearchHypernymsCallable() { + throw new UnsupportedOperationException("Not implemented: listSearchHypernymsCallable()"); + } + + public UnaryCallable searchAssetsPagedCallable() { + throw new UnsupportedOperationException("Not implemented: searchAssetsPagedCallable()"); + } + + public UnaryCallable searchAssetsCallable() { + throw new UnsupportedOperationException("Not implemented: searchAssetsCallable()"); + } + + public UnaryCallable + searchIndexEndpointPagedCallable() { + throw new UnsupportedOperationException("Not implemented: searchIndexEndpointPagedCallable()"); + } + + public UnaryCallable + searchIndexEndpointCallable() { + throw new UnsupportedOperationException("Not implemented: searchIndexEndpointCallable()"); + } + + public OperationCallable + createIndexEndpointOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: createIndexEndpointOperationCallable()"); + } + + public UnaryCallable createIndexEndpointCallable() { + throw new UnsupportedOperationException("Not implemented: createIndexEndpointCallable()"); + } + + public UnaryCallable getIndexEndpointCallable() { + throw new UnsupportedOperationException("Not implemented: getIndexEndpointCallable()"); + } + + public UnaryCallable + listIndexEndpointsPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listIndexEndpointsPagedCallable()"); + } + + public UnaryCallable + listIndexEndpointsCallable() { + throw new UnsupportedOperationException("Not implemented: listIndexEndpointsCallable()"); + } + + public OperationCallable + updateIndexEndpointOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: updateIndexEndpointOperationCallable()"); + } + + public UnaryCallable updateIndexEndpointCallable() { + throw new UnsupportedOperationException("Not implemented: updateIndexEndpointCallable()"); + } + + public OperationCallable + deleteIndexEndpointOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: deleteIndexEndpointOperationCallable()"); + } + + public UnaryCallable deleteIndexEndpointCallable() { + throw new UnsupportedOperationException("Not implemented: deleteIndexEndpointCallable()"); + } + + public OperationCallable + deployIndexOperationCallable() { + throw new UnsupportedOperationException("Not implemented: deployIndexOperationCallable()"); + } + + public UnaryCallable deployIndexCallable() { + throw new UnsupportedOperationException("Not implemented: deployIndexCallable()"); + } + + public OperationCallable + undeployIndexOperationCallable() { + throw new UnsupportedOperationException("Not implemented: undeployIndexOperationCallable()"); + } + + public UnaryCallable undeployIndexCallable() { + throw new UnsupportedOperationException("Not implemented: undeployIndexCallable()"); + } + + public OperationCallable + createCollectionOperationCallable() { + throw new UnsupportedOperationException("Not implemented: createCollectionOperationCallable()"); + } + + public UnaryCallable createCollectionCallable() { + throw new UnsupportedOperationException("Not implemented: createCollectionCallable()"); + } + + public OperationCallable + deleteCollectionOperationCallable() { + throw new UnsupportedOperationException("Not implemented: deleteCollectionOperationCallable()"); + } + + public UnaryCallable deleteCollectionCallable() { + throw new UnsupportedOperationException("Not implemented: deleteCollectionCallable()"); + } + + public UnaryCallable getCollectionCallable() { + throw new UnsupportedOperationException("Not implemented: getCollectionCallable()"); + } + + public UnaryCallable updateCollectionCallable() { + throw new UnsupportedOperationException("Not implemented: updateCollectionCallable()"); + } + + public UnaryCallable + listCollectionsPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listCollectionsPagedCallable()"); + } + + public UnaryCallable listCollectionsCallable() { + throw new UnsupportedOperationException("Not implemented: listCollectionsCallable()"); + } + + public UnaryCallable + addCollectionItemCallable() { + throw new UnsupportedOperationException("Not implemented: addCollectionItemCallable()"); + } + + public UnaryCallable + removeCollectionItemCallable() { + throw new UnsupportedOperationException("Not implemented: removeCollectionItemCallable()"); + } + + public UnaryCallable + viewCollectionItemsPagedCallable() { + throw new UnsupportedOperationException("Not implemented: viewCollectionItemsPagedCallable()"); + } + + public UnaryCallable + viewCollectionItemsCallable() { + throw new UnsupportedOperationException("Not implemented: viewCollectionItemsCallable()"); + } + + @Override + public abstract void close(); +} diff --git a/java-visionai/google-cloud-visionai/src/main/java/com/google/cloud/visionai/v1/stub/WarehouseStubSettings.java b/java-visionai/google-cloud-visionai/src/main/java/com/google/cloud/visionai/v1/stub/WarehouseStubSettings.java new file mode 100644 index 000000000000..c5dce1302009 --- /dev/null +++ b/java-visionai/google-cloud-visionai/src/main/java/com/google/cloud/visionai/v1/stub/WarehouseStubSettings.java @@ -0,0 +1,3584 @@ +/* + * Copyright 2024 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.visionai.v1.stub; + +import static com.google.cloud.visionai.v1.WarehouseClient.ListAnnotationsPagedResponse; +import static com.google.cloud.visionai.v1.WarehouseClient.ListAssetsPagedResponse; +import static com.google.cloud.visionai.v1.WarehouseClient.ListCollectionsPagedResponse; +import static com.google.cloud.visionai.v1.WarehouseClient.ListCorporaPagedResponse; +import static com.google.cloud.visionai.v1.WarehouseClient.ListDataSchemasPagedResponse; +import static com.google.cloud.visionai.v1.WarehouseClient.ListIndexEndpointsPagedResponse; +import static com.google.cloud.visionai.v1.WarehouseClient.ListIndexesPagedResponse; +import static com.google.cloud.visionai.v1.WarehouseClient.ListSearchConfigsPagedResponse; +import static com.google.cloud.visionai.v1.WarehouseClient.ListSearchHypernymsPagedResponse; +import static com.google.cloud.visionai.v1.WarehouseClient.SearchAssetsPagedResponse; +import static com.google.cloud.visionai.v1.WarehouseClient.SearchIndexEndpointPagedResponse; +import static com.google.cloud.visionai.v1.WarehouseClient.ViewCollectionItemsPagedResponse; +import static com.google.cloud.visionai.v1.WarehouseClient.ViewIndexedAssetsPagedResponse; + +import com.google.api.core.ApiFunction; +import com.google.api.core.ApiFuture; +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.httpjson.GaxHttpJsonProperties; +import com.google.api.gax.httpjson.HttpJsonTransportChannel; +import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider; +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.ApiCallContext; +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.PageContext; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.PagedListDescriptor; +import com.google.api.gax.rpc.PagedListResponseFactory; +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.api.gax.rpc.UnaryCallable; +import com.google.cloud.visionai.v1.AddCollectionItemRequest; +import com.google.cloud.visionai.v1.AddCollectionItemResponse; +import com.google.cloud.visionai.v1.AnalyzeAssetMetadata; +import com.google.cloud.visionai.v1.AnalyzeAssetRequest; +import com.google.cloud.visionai.v1.AnalyzeAssetResponse; +import com.google.cloud.visionai.v1.AnalyzeCorpusMetadata; +import com.google.cloud.visionai.v1.AnalyzeCorpusRequest; +import com.google.cloud.visionai.v1.AnalyzeCorpusResponse; +import com.google.cloud.visionai.v1.Annotation; +import com.google.cloud.visionai.v1.Asset; +import com.google.cloud.visionai.v1.ClipAssetRequest; +import com.google.cloud.visionai.v1.ClipAssetResponse; +import com.google.cloud.visionai.v1.Collection; +import com.google.cloud.visionai.v1.CollectionItem; +import com.google.cloud.visionai.v1.Corpus; +import com.google.cloud.visionai.v1.CreateAnnotationRequest; +import com.google.cloud.visionai.v1.CreateAssetRequest; +import com.google.cloud.visionai.v1.CreateCollectionMetadata; +import com.google.cloud.visionai.v1.CreateCollectionRequest; +import com.google.cloud.visionai.v1.CreateCorpusMetadata; +import com.google.cloud.visionai.v1.CreateCorpusRequest; +import com.google.cloud.visionai.v1.CreateDataSchemaRequest; +import com.google.cloud.visionai.v1.CreateIndexEndpointMetadata; +import com.google.cloud.visionai.v1.CreateIndexEndpointRequest; +import com.google.cloud.visionai.v1.CreateIndexMetadata; +import com.google.cloud.visionai.v1.CreateIndexRequest; +import com.google.cloud.visionai.v1.CreateSearchConfigRequest; +import com.google.cloud.visionai.v1.CreateSearchHypernymRequest; +import com.google.cloud.visionai.v1.DataSchema; +import com.google.cloud.visionai.v1.DeleteAnnotationRequest; +import com.google.cloud.visionai.v1.DeleteAssetMetadata; +import com.google.cloud.visionai.v1.DeleteAssetRequest; +import com.google.cloud.visionai.v1.DeleteCollectionMetadata; +import com.google.cloud.visionai.v1.DeleteCollectionRequest; +import com.google.cloud.visionai.v1.DeleteCorpusRequest; +import com.google.cloud.visionai.v1.DeleteDataSchemaRequest; +import com.google.cloud.visionai.v1.DeleteIndexEndpointMetadata; +import com.google.cloud.visionai.v1.DeleteIndexEndpointRequest; +import com.google.cloud.visionai.v1.DeleteIndexMetadata; +import com.google.cloud.visionai.v1.DeleteIndexRequest; +import com.google.cloud.visionai.v1.DeleteSearchConfigRequest; +import com.google.cloud.visionai.v1.DeleteSearchHypernymRequest; +import com.google.cloud.visionai.v1.DeployIndexMetadata; +import com.google.cloud.visionai.v1.DeployIndexRequest; +import com.google.cloud.visionai.v1.DeployIndexResponse; +import com.google.cloud.visionai.v1.GenerateHlsUriRequest; +import com.google.cloud.visionai.v1.GenerateHlsUriResponse; +import com.google.cloud.visionai.v1.GenerateRetrievalUrlRequest; +import com.google.cloud.visionai.v1.GenerateRetrievalUrlResponse; +import com.google.cloud.visionai.v1.GetAnnotationRequest; +import com.google.cloud.visionai.v1.GetAssetRequest; +import com.google.cloud.visionai.v1.GetCollectionRequest; +import com.google.cloud.visionai.v1.GetCorpusRequest; +import com.google.cloud.visionai.v1.GetDataSchemaRequest; +import com.google.cloud.visionai.v1.GetIndexEndpointRequest; +import com.google.cloud.visionai.v1.GetIndexRequest; +import com.google.cloud.visionai.v1.GetSearchConfigRequest; +import com.google.cloud.visionai.v1.GetSearchHypernymRequest; +import com.google.cloud.visionai.v1.ImportAssetsMetadata; +import com.google.cloud.visionai.v1.ImportAssetsRequest; +import com.google.cloud.visionai.v1.ImportAssetsResponse; +import com.google.cloud.visionai.v1.Index; +import com.google.cloud.visionai.v1.IndexAssetMetadata; +import com.google.cloud.visionai.v1.IndexAssetRequest; +import com.google.cloud.visionai.v1.IndexAssetResponse; +import com.google.cloud.visionai.v1.IndexEndpoint; +import com.google.cloud.visionai.v1.IndexedAsset; +import com.google.cloud.visionai.v1.IngestAssetRequest; +import com.google.cloud.visionai.v1.IngestAssetResponse; +import com.google.cloud.visionai.v1.ListAnnotationsRequest; +import com.google.cloud.visionai.v1.ListAnnotationsResponse; +import com.google.cloud.visionai.v1.ListAssetsRequest; +import com.google.cloud.visionai.v1.ListAssetsResponse; +import com.google.cloud.visionai.v1.ListCollectionsRequest; +import com.google.cloud.visionai.v1.ListCollectionsResponse; +import com.google.cloud.visionai.v1.ListCorporaRequest; +import com.google.cloud.visionai.v1.ListCorporaResponse; +import com.google.cloud.visionai.v1.ListDataSchemasRequest; +import com.google.cloud.visionai.v1.ListDataSchemasResponse; +import com.google.cloud.visionai.v1.ListIndexEndpointsRequest; +import com.google.cloud.visionai.v1.ListIndexEndpointsResponse; +import com.google.cloud.visionai.v1.ListIndexesRequest; +import com.google.cloud.visionai.v1.ListIndexesResponse; +import com.google.cloud.visionai.v1.ListSearchConfigsRequest; +import com.google.cloud.visionai.v1.ListSearchConfigsResponse; +import com.google.cloud.visionai.v1.ListSearchHypernymsRequest; +import com.google.cloud.visionai.v1.ListSearchHypernymsResponse; +import com.google.cloud.visionai.v1.RemoveCollectionItemRequest; +import com.google.cloud.visionai.v1.RemoveCollectionItemResponse; +import com.google.cloud.visionai.v1.RemoveIndexAssetMetadata; +import com.google.cloud.visionai.v1.RemoveIndexAssetRequest; +import com.google.cloud.visionai.v1.RemoveIndexAssetResponse; +import com.google.cloud.visionai.v1.SearchAssetsRequest; +import com.google.cloud.visionai.v1.SearchAssetsResponse; +import com.google.cloud.visionai.v1.SearchConfig; +import com.google.cloud.visionai.v1.SearchHypernym; +import com.google.cloud.visionai.v1.SearchIndexEndpointRequest; +import com.google.cloud.visionai.v1.SearchIndexEndpointResponse; +import com.google.cloud.visionai.v1.SearchResultItem; +import com.google.cloud.visionai.v1.UndeployIndexMetadata; +import com.google.cloud.visionai.v1.UndeployIndexRequest; +import com.google.cloud.visionai.v1.UndeployIndexResponse; +import com.google.cloud.visionai.v1.UpdateAnnotationRequest; +import com.google.cloud.visionai.v1.UpdateAssetRequest; +import com.google.cloud.visionai.v1.UpdateCollectionRequest; +import com.google.cloud.visionai.v1.UpdateCorpusRequest; +import com.google.cloud.visionai.v1.UpdateDataSchemaRequest; +import com.google.cloud.visionai.v1.UpdateIndexEndpointMetadata; +import com.google.cloud.visionai.v1.UpdateIndexEndpointRequest; +import com.google.cloud.visionai.v1.UpdateIndexMetadata; +import com.google.cloud.visionai.v1.UpdateIndexRequest; +import com.google.cloud.visionai.v1.UpdateSearchConfigRequest; +import com.google.cloud.visionai.v1.UpdateSearchHypernymRequest; +import com.google.cloud.visionai.v1.UploadAssetMetadata; +import com.google.cloud.visionai.v1.UploadAssetRequest; +import com.google.cloud.visionai.v1.UploadAssetResponse; +import com.google.cloud.visionai.v1.ViewCollectionItemsRequest; +import com.google.cloud.visionai.v1.ViewCollectionItemsResponse; +import com.google.cloud.visionai.v1.ViewIndexedAssetsRequest; +import com.google.cloud.visionai.v1.ViewIndexedAssetsResponse; +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 com.google.protobuf.Empty; +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 WarehouseStub}. + * + *

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

    + *
  • The default service address (visionai.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 createAsset to 30 seconds: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * WarehouseStubSettings.Builder warehouseSettingsBuilder = WarehouseStubSettings.newBuilder();
+ * warehouseSettingsBuilder
+ *     .createAssetSettings()
+ *     .setRetrySettings(
+ *         warehouseSettingsBuilder
+ *             .createAssetSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * WarehouseStubSettings warehouseSettings = warehouseSettingsBuilder.build();
+ * }
+ */ +@Generated("by gapic-generator-java") +public class WarehouseStubSettings 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 createAssetSettings; + private final UnaryCallSettings updateAssetSettings; + private final UnaryCallSettings getAssetSettings; + private final PagedCallSettings + listAssetsSettings; + private final UnaryCallSettings deleteAssetSettings; + private final OperationCallSettings + deleteAssetOperationSettings; + private final UnaryCallSettings uploadAssetSettings; + private final OperationCallSettings + uploadAssetOperationSettings; + private final UnaryCallSettings + generateRetrievalUrlSettings; + private final UnaryCallSettings analyzeAssetSettings; + private final OperationCallSettings< + AnalyzeAssetRequest, AnalyzeAssetResponse, AnalyzeAssetMetadata> + analyzeAssetOperationSettings; + private final UnaryCallSettings indexAssetSettings; + private final OperationCallSettings + indexAssetOperationSettings; + private final UnaryCallSettings removeIndexAssetSettings; + private final OperationCallSettings< + RemoveIndexAssetRequest, RemoveIndexAssetResponse, RemoveIndexAssetMetadata> + removeIndexAssetOperationSettings; + private final PagedCallSettings< + ViewIndexedAssetsRequest, ViewIndexedAssetsResponse, ViewIndexedAssetsPagedResponse> + viewIndexedAssetsSettings; + private final UnaryCallSettings createIndexSettings; + private final OperationCallSettings + createIndexOperationSettings; + private final UnaryCallSettings updateIndexSettings; + private final OperationCallSettings + updateIndexOperationSettings; + private final UnaryCallSettings getIndexSettings; + private final PagedCallSettings + listIndexesSettings; + private final UnaryCallSettings deleteIndexSettings; + private final OperationCallSettings + deleteIndexOperationSettings; + private final UnaryCallSettings createCorpusSettings; + private final OperationCallSettings + createCorpusOperationSettings; + private final UnaryCallSettings getCorpusSettings; + private final UnaryCallSettings updateCorpusSettings; + private final PagedCallSettings + listCorporaSettings; + private final UnaryCallSettings deleteCorpusSettings; + private final UnaryCallSettings analyzeCorpusSettings; + private final OperationCallSettings< + AnalyzeCorpusRequest, AnalyzeCorpusResponse, AnalyzeCorpusMetadata> + analyzeCorpusOperationSettings; + private final UnaryCallSettings createDataSchemaSettings; + private final UnaryCallSettings updateDataSchemaSettings; + private final UnaryCallSettings getDataSchemaSettings; + private final UnaryCallSettings deleteDataSchemaSettings; + private final PagedCallSettings< + ListDataSchemasRequest, ListDataSchemasResponse, ListDataSchemasPagedResponse> + listDataSchemasSettings; + private final UnaryCallSettings createAnnotationSettings; + private final UnaryCallSettings getAnnotationSettings; + private final PagedCallSettings< + ListAnnotationsRequest, ListAnnotationsResponse, ListAnnotationsPagedResponse> + listAnnotationsSettings; + private final UnaryCallSettings updateAnnotationSettings; + private final UnaryCallSettings deleteAnnotationSettings; + private final StreamingCallSettings ingestAssetSettings; + private final UnaryCallSettings clipAssetSettings; + private final UnaryCallSettings + generateHlsUriSettings; + private final UnaryCallSettings importAssetsSettings; + private final OperationCallSettings< + ImportAssetsRequest, ImportAssetsResponse, ImportAssetsMetadata> + importAssetsOperationSettings; + private final UnaryCallSettings + createSearchConfigSettings; + private final UnaryCallSettings + updateSearchConfigSettings; + private final UnaryCallSettings getSearchConfigSettings; + private final UnaryCallSettings deleteSearchConfigSettings; + private final PagedCallSettings< + ListSearchConfigsRequest, ListSearchConfigsResponse, ListSearchConfigsPagedResponse> + listSearchConfigsSettings; + private final UnaryCallSettings + createSearchHypernymSettings; + private final UnaryCallSettings + updateSearchHypernymSettings; + private final UnaryCallSettings + getSearchHypernymSettings; + private final UnaryCallSettings deleteSearchHypernymSettings; + private final PagedCallSettings< + ListSearchHypernymsRequest, ListSearchHypernymsResponse, ListSearchHypernymsPagedResponse> + listSearchHypernymsSettings; + private final PagedCallSettings< + SearchAssetsRequest, SearchAssetsResponse, SearchAssetsPagedResponse> + searchAssetsSettings; + private final PagedCallSettings< + SearchIndexEndpointRequest, SearchIndexEndpointResponse, SearchIndexEndpointPagedResponse> + searchIndexEndpointSettings; + private final UnaryCallSettings + createIndexEndpointSettings; + private final OperationCallSettings< + CreateIndexEndpointRequest, IndexEndpoint, CreateIndexEndpointMetadata> + createIndexEndpointOperationSettings; + private final UnaryCallSettings getIndexEndpointSettings; + private final PagedCallSettings< + ListIndexEndpointsRequest, ListIndexEndpointsResponse, ListIndexEndpointsPagedResponse> + listIndexEndpointsSettings; + private final UnaryCallSettings + updateIndexEndpointSettings; + private final OperationCallSettings< + UpdateIndexEndpointRequest, IndexEndpoint, UpdateIndexEndpointMetadata> + updateIndexEndpointOperationSettings; + private final UnaryCallSettings + deleteIndexEndpointSettings; + private final OperationCallSettings< + DeleteIndexEndpointRequest, Empty, DeleteIndexEndpointMetadata> + deleteIndexEndpointOperationSettings; + private final UnaryCallSettings deployIndexSettings; + private final OperationCallSettings + deployIndexOperationSettings; + private final UnaryCallSettings undeployIndexSettings; + private final OperationCallSettings< + UndeployIndexRequest, UndeployIndexResponse, UndeployIndexMetadata> + undeployIndexOperationSettings; + private final UnaryCallSettings createCollectionSettings; + private final OperationCallSettings + createCollectionOperationSettings; + private final UnaryCallSettings deleteCollectionSettings; + private final OperationCallSettings + deleteCollectionOperationSettings; + private final UnaryCallSettings getCollectionSettings; + private final UnaryCallSettings updateCollectionSettings; + private final PagedCallSettings< + ListCollectionsRequest, ListCollectionsResponse, ListCollectionsPagedResponse> + listCollectionsSettings; + private final UnaryCallSettings + addCollectionItemSettings; + private final UnaryCallSettings + removeCollectionItemSettings; + private final PagedCallSettings< + ViewCollectionItemsRequest, ViewCollectionItemsResponse, ViewCollectionItemsPagedResponse> + viewCollectionItemsSettings; + + private static final PagedListDescriptor + LIST_ASSETS_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListAssetsRequest injectToken(ListAssetsRequest payload, String token) { + return ListAssetsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListAssetsRequest injectPageSize(ListAssetsRequest payload, int pageSize) { + return ListAssetsRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListAssetsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListAssetsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListAssetsResponse payload) { + return payload.getAssetsList() == null + ? ImmutableList.of() + : payload.getAssetsList(); + } + }; + + private static final PagedListDescriptor< + ViewIndexedAssetsRequest, ViewIndexedAssetsResponse, IndexedAsset> + VIEW_INDEXED_ASSETS_PAGE_STR_DESC = + new PagedListDescriptor< + ViewIndexedAssetsRequest, ViewIndexedAssetsResponse, IndexedAsset>() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ViewIndexedAssetsRequest injectToken( + ViewIndexedAssetsRequest payload, String token) { + return ViewIndexedAssetsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ViewIndexedAssetsRequest injectPageSize( + ViewIndexedAssetsRequest payload, int pageSize) { + return ViewIndexedAssetsRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ViewIndexedAssetsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ViewIndexedAssetsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ViewIndexedAssetsResponse payload) { + return payload.getIndexedAssetsList() == null + ? ImmutableList.of() + : payload.getIndexedAssetsList(); + } + }; + + private static final PagedListDescriptor + LIST_INDEXES_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListIndexesRequest injectToken(ListIndexesRequest payload, String token) { + return ListIndexesRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListIndexesRequest injectPageSize(ListIndexesRequest payload, int pageSize) { + return ListIndexesRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListIndexesRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListIndexesResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListIndexesResponse payload) { + return payload.getIndexesList() == null + ? ImmutableList.of() + : payload.getIndexesList(); + } + }; + + private static final PagedListDescriptor + LIST_CORPORA_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListCorporaRequest injectToken(ListCorporaRequest payload, String token) { + return ListCorporaRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListCorporaRequest injectPageSize(ListCorporaRequest payload, int pageSize) { + return ListCorporaRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListCorporaRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListCorporaResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListCorporaResponse payload) { + return payload.getCorporaList() == null + ? ImmutableList.of() + : payload.getCorporaList(); + } + }; + + private static final PagedListDescriptor< + ListDataSchemasRequest, ListDataSchemasResponse, DataSchema> + LIST_DATA_SCHEMAS_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListDataSchemasRequest injectToken( + ListDataSchemasRequest payload, String token) { + return ListDataSchemasRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListDataSchemasRequest injectPageSize( + ListDataSchemasRequest payload, int pageSize) { + return ListDataSchemasRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListDataSchemasRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListDataSchemasResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListDataSchemasResponse payload) { + return payload.getDataSchemasList() == null + ? ImmutableList.of() + : payload.getDataSchemasList(); + } + }; + + private static final PagedListDescriptor< + ListAnnotationsRequest, ListAnnotationsResponse, Annotation> + LIST_ANNOTATIONS_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListAnnotationsRequest injectToken( + ListAnnotationsRequest payload, String token) { + return ListAnnotationsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListAnnotationsRequest injectPageSize( + ListAnnotationsRequest payload, int pageSize) { + return ListAnnotationsRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListAnnotationsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListAnnotationsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListAnnotationsResponse payload) { + return payload.getAnnotationsList() == null + ? ImmutableList.of() + : payload.getAnnotationsList(); + } + }; + + private static final PagedListDescriptor< + ListSearchConfigsRequest, ListSearchConfigsResponse, SearchConfig> + LIST_SEARCH_CONFIGS_PAGE_STR_DESC = + new PagedListDescriptor< + ListSearchConfigsRequest, ListSearchConfigsResponse, SearchConfig>() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListSearchConfigsRequest injectToken( + ListSearchConfigsRequest payload, String token) { + return ListSearchConfigsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListSearchConfigsRequest injectPageSize( + ListSearchConfigsRequest payload, int pageSize) { + return ListSearchConfigsRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListSearchConfigsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListSearchConfigsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListSearchConfigsResponse payload) { + return payload.getSearchConfigsList() == null + ? ImmutableList.of() + : payload.getSearchConfigsList(); + } + }; + + private static final PagedListDescriptor< + ListSearchHypernymsRequest, ListSearchHypernymsResponse, SearchHypernym> + LIST_SEARCH_HYPERNYMS_PAGE_STR_DESC = + new PagedListDescriptor< + ListSearchHypernymsRequest, ListSearchHypernymsResponse, SearchHypernym>() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListSearchHypernymsRequest injectToken( + ListSearchHypernymsRequest payload, String token) { + return ListSearchHypernymsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListSearchHypernymsRequest injectPageSize( + ListSearchHypernymsRequest payload, int pageSize) { + return ListSearchHypernymsRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListSearchHypernymsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListSearchHypernymsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListSearchHypernymsResponse payload) { + return payload.getSearchHypernymsList() == null + ? ImmutableList.of() + : payload.getSearchHypernymsList(); + } + }; + + private static final PagedListDescriptor< + SearchAssetsRequest, SearchAssetsResponse, SearchResultItem> + SEARCH_ASSETS_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public SearchAssetsRequest injectToken(SearchAssetsRequest payload, String token) { + return SearchAssetsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public SearchAssetsRequest injectPageSize(SearchAssetsRequest payload, int pageSize) { + return SearchAssetsRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(SearchAssetsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(SearchAssetsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(SearchAssetsResponse payload) { + return payload.getSearchResultItemsList() == null + ? ImmutableList.of() + : payload.getSearchResultItemsList(); + } + }; + + private static final PagedListDescriptor< + SearchIndexEndpointRequest, SearchIndexEndpointResponse, SearchResultItem> + SEARCH_INDEX_ENDPOINT_PAGE_STR_DESC = + new PagedListDescriptor< + SearchIndexEndpointRequest, SearchIndexEndpointResponse, SearchResultItem>() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public SearchIndexEndpointRequest injectToken( + SearchIndexEndpointRequest payload, String token) { + return SearchIndexEndpointRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public SearchIndexEndpointRequest injectPageSize( + SearchIndexEndpointRequest payload, int pageSize) { + return SearchIndexEndpointRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(SearchIndexEndpointRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(SearchIndexEndpointResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources( + SearchIndexEndpointResponse payload) { + return payload.getSearchResultItemsList() == null + ? ImmutableList.of() + : payload.getSearchResultItemsList(); + } + }; + + private static final PagedListDescriptor< + ListIndexEndpointsRequest, ListIndexEndpointsResponse, IndexEndpoint> + LIST_INDEX_ENDPOINTS_PAGE_STR_DESC = + new PagedListDescriptor< + ListIndexEndpointsRequest, ListIndexEndpointsResponse, IndexEndpoint>() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListIndexEndpointsRequest injectToken( + ListIndexEndpointsRequest payload, String token) { + return ListIndexEndpointsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListIndexEndpointsRequest injectPageSize( + ListIndexEndpointsRequest payload, int pageSize) { + return ListIndexEndpointsRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListIndexEndpointsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListIndexEndpointsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListIndexEndpointsResponse payload) { + return payload.getIndexEndpointsList() == null + ? ImmutableList.of() + : payload.getIndexEndpointsList(); + } + }; + + private static final PagedListDescriptor< + ListCollectionsRequest, ListCollectionsResponse, Collection> + LIST_COLLECTIONS_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListCollectionsRequest injectToken( + ListCollectionsRequest payload, String token) { + return ListCollectionsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListCollectionsRequest injectPageSize( + ListCollectionsRequest payload, int pageSize) { + return ListCollectionsRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListCollectionsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListCollectionsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListCollectionsResponse payload) { + return payload.getCollectionsList() == null + ? ImmutableList.of() + : payload.getCollectionsList(); + } + }; + + private static final PagedListDescriptor< + ViewCollectionItemsRequest, ViewCollectionItemsResponse, CollectionItem> + VIEW_COLLECTION_ITEMS_PAGE_STR_DESC = + new PagedListDescriptor< + ViewCollectionItemsRequest, ViewCollectionItemsResponse, CollectionItem>() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ViewCollectionItemsRequest injectToken( + ViewCollectionItemsRequest payload, String token) { + return ViewCollectionItemsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ViewCollectionItemsRequest injectPageSize( + ViewCollectionItemsRequest payload, int pageSize) { + return ViewCollectionItemsRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ViewCollectionItemsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ViewCollectionItemsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ViewCollectionItemsResponse payload) { + return payload.getItemsList() == null + ? ImmutableList.of() + : payload.getItemsList(); + } + }; + + private static final PagedListResponseFactory< + ListAssetsRequest, ListAssetsResponse, ListAssetsPagedResponse> + LIST_ASSETS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListAssetsRequest, ListAssetsResponse, ListAssetsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListAssetsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, LIST_ASSETS_PAGE_STR_DESC, request, context); + return ListAssetsPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ViewIndexedAssetsRequest, ViewIndexedAssetsResponse, ViewIndexedAssetsPagedResponse> + VIEW_INDEXED_ASSETS_PAGE_STR_FACT = + new PagedListResponseFactory< + ViewIndexedAssetsRequest, + ViewIndexedAssetsResponse, + ViewIndexedAssetsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ViewIndexedAssetsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext + pageContext = + PageContext.create( + callable, VIEW_INDEXED_ASSETS_PAGE_STR_DESC, request, context); + return ViewIndexedAssetsPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListIndexesRequest, ListIndexesResponse, ListIndexesPagedResponse> + LIST_INDEXES_PAGE_STR_FACT = + new PagedListResponseFactory< + ListIndexesRequest, ListIndexesResponse, ListIndexesPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListIndexesRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, LIST_INDEXES_PAGE_STR_DESC, request, context); + return ListIndexesPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListCorporaRequest, ListCorporaResponse, ListCorporaPagedResponse> + LIST_CORPORA_PAGE_STR_FACT = + new PagedListResponseFactory< + ListCorporaRequest, ListCorporaResponse, ListCorporaPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListCorporaRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, LIST_CORPORA_PAGE_STR_DESC, request, context); + return ListCorporaPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListDataSchemasRequest, ListDataSchemasResponse, ListDataSchemasPagedResponse> + LIST_DATA_SCHEMAS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListDataSchemasRequest, ListDataSchemasResponse, ListDataSchemasPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListDataSchemasRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, LIST_DATA_SCHEMAS_PAGE_STR_DESC, request, context); + return ListDataSchemasPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListAnnotationsRequest, ListAnnotationsResponse, ListAnnotationsPagedResponse> + LIST_ANNOTATIONS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListAnnotationsRequest, ListAnnotationsResponse, ListAnnotationsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListAnnotationsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, LIST_ANNOTATIONS_PAGE_STR_DESC, request, context); + return ListAnnotationsPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListSearchConfigsRequest, ListSearchConfigsResponse, ListSearchConfigsPagedResponse> + LIST_SEARCH_CONFIGS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListSearchConfigsRequest, + ListSearchConfigsResponse, + ListSearchConfigsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListSearchConfigsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext + pageContext = + PageContext.create( + callable, LIST_SEARCH_CONFIGS_PAGE_STR_DESC, request, context); + return ListSearchConfigsPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListSearchHypernymsRequest, ListSearchHypernymsResponse, ListSearchHypernymsPagedResponse> + LIST_SEARCH_HYPERNYMS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListSearchHypernymsRequest, + ListSearchHypernymsResponse, + ListSearchHypernymsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListSearchHypernymsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext + pageContext = + PageContext.create( + callable, LIST_SEARCH_HYPERNYMS_PAGE_STR_DESC, request, context); + return ListSearchHypernymsPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + SearchAssetsRequest, SearchAssetsResponse, SearchAssetsPagedResponse> + SEARCH_ASSETS_PAGE_STR_FACT = + new PagedListResponseFactory< + SearchAssetsRequest, SearchAssetsResponse, SearchAssetsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + SearchAssetsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, SEARCH_ASSETS_PAGE_STR_DESC, request, context); + return SearchAssetsPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + SearchIndexEndpointRequest, SearchIndexEndpointResponse, SearchIndexEndpointPagedResponse> + SEARCH_INDEX_ENDPOINT_PAGE_STR_FACT = + new PagedListResponseFactory< + SearchIndexEndpointRequest, + SearchIndexEndpointResponse, + SearchIndexEndpointPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + SearchIndexEndpointRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext + pageContext = + PageContext.create( + callable, SEARCH_INDEX_ENDPOINT_PAGE_STR_DESC, request, context); + return SearchIndexEndpointPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListIndexEndpointsRequest, ListIndexEndpointsResponse, ListIndexEndpointsPagedResponse> + LIST_INDEX_ENDPOINTS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListIndexEndpointsRequest, + ListIndexEndpointsResponse, + ListIndexEndpointsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListIndexEndpointsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext + pageContext = + PageContext.create( + callable, LIST_INDEX_ENDPOINTS_PAGE_STR_DESC, request, context); + return ListIndexEndpointsPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListCollectionsRequest, ListCollectionsResponse, ListCollectionsPagedResponse> + LIST_COLLECTIONS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListCollectionsRequest, ListCollectionsResponse, ListCollectionsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListCollectionsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, LIST_COLLECTIONS_PAGE_STR_DESC, request, context); + return ListCollectionsPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ViewCollectionItemsRequest, ViewCollectionItemsResponse, ViewCollectionItemsPagedResponse> + VIEW_COLLECTION_ITEMS_PAGE_STR_FACT = + new PagedListResponseFactory< + ViewCollectionItemsRequest, + ViewCollectionItemsResponse, + ViewCollectionItemsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ViewCollectionItemsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext + pageContext = + PageContext.create( + callable, VIEW_COLLECTION_ITEMS_PAGE_STR_DESC, request, context); + return ViewCollectionItemsPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + /** Returns the object with the settings used for calls to createAsset. */ + public UnaryCallSettings createAssetSettings() { + return createAssetSettings; + } + + /** Returns the object with the settings used for calls to updateAsset. */ + public UnaryCallSettings updateAssetSettings() { + return updateAssetSettings; + } + + /** Returns the object with the settings used for calls to getAsset. */ + public UnaryCallSettings getAssetSettings() { + return getAssetSettings; + } + + /** Returns the object with the settings used for calls to listAssets. */ + public PagedCallSettings + listAssetsSettings() { + return listAssetsSettings; + } + + /** Returns the object with the settings used for calls to deleteAsset. */ + public UnaryCallSettings deleteAssetSettings() { + return deleteAssetSettings; + } + + /** Returns the object with the settings used for calls to deleteAsset. */ + public OperationCallSettings + deleteAssetOperationSettings() { + return deleteAssetOperationSettings; + } + + /** Returns the object with the settings used for calls to uploadAsset. */ + public UnaryCallSettings uploadAssetSettings() { + return uploadAssetSettings; + } + + /** Returns the object with the settings used for calls to uploadAsset. */ + public OperationCallSettings + uploadAssetOperationSettings() { + return uploadAssetOperationSettings; + } + + /** Returns the object with the settings used for calls to generateRetrievalUrl. */ + public UnaryCallSettings + generateRetrievalUrlSettings() { + return generateRetrievalUrlSettings; + } + + /** Returns the object with the settings used for calls to analyzeAsset. */ + public UnaryCallSettings analyzeAssetSettings() { + return analyzeAssetSettings; + } + + /** Returns the object with the settings used for calls to analyzeAsset. */ + public OperationCallSettings + analyzeAssetOperationSettings() { + return analyzeAssetOperationSettings; + } + + /** Returns the object with the settings used for calls to indexAsset. */ + public UnaryCallSettings indexAssetSettings() { + return indexAssetSettings; + } + + /** Returns the object with the settings used for calls to indexAsset. */ + public OperationCallSettings + indexAssetOperationSettings() { + return indexAssetOperationSettings; + } + + /** Returns the object with the settings used for calls to removeIndexAsset. */ + public UnaryCallSettings removeIndexAssetSettings() { + return removeIndexAssetSettings; + } + + /** Returns the object with the settings used for calls to removeIndexAsset. */ + public OperationCallSettings< + RemoveIndexAssetRequest, RemoveIndexAssetResponse, RemoveIndexAssetMetadata> + removeIndexAssetOperationSettings() { + return removeIndexAssetOperationSettings; + } + + /** Returns the object with the settings used for calls to viewIndexedAssets. */ + public PagedCallSettings< + ViewIndexedAssetsRequest, ViewIndexedAssetsResponse, ViewIndexedAssetsPagedResponse> + viewIndexedAssetsSettings() { + return viewIndexedAssetsSettings; + } + + /** Returns the object with the settings used for calls to createIndex. */ + public UnaryCallSettings createIndexSettings() { + return createIndexSettings; + } + + /** Returns the object with the settings used for calls to createIndex. */ + public OperationCallSettings + createIndexOperationSettings() { + return createIndexOperationSettings; + } + + /** Returns the object with the settings used for calls to updateIndex. */ + public UnaryCallSettings updateIndexSettings() { + return updateIndexSettings; + } + + /** Returns the object with the settings used for calls to updateIndex. */ + public OperationCallSettings + updateIndexOperationSettings() { + return updateIndexOperationSettings; + } + + /** Returns the object with the settings used for calls to getIndex. */ + public UnaryCallSettings getIndexSettings() { + return getIndexSettings; + } + + /** Returns the object with the settings used for calls to listIndexes. */ + public PagedCallSettings + listIndexesSettings() { + return listIndexesSettings; + } + + /** Returns the object with the settings used for calls to deleteIndex. */ + public UnaryCallSettings deleteIndexSettings() { + return deleteIndexSettings; + } + + /** Returns the object with the settings used for calls to deleteIndex. */ + public OperationCallSettings + deleteIndexOperationSettings() { + return deleteIndexOperationSettings; + } + + /** Returns the object with the settings used for calls to createCorpus. */ + public UnaryCallSettings createCorpusSettings() { + return createCorpusSettings; + } + + /** Returns the object with the settings used for calls to createCorpus. */ + public OperationCallSettings + createCorpusOperationSettings() { + return createCorpusOperationSettings; + } + + /** Returns the object with the settings used for calls to getCorpus. */ + public UnaryCallSettings getCorpusSettings() { + return getCorpusSettings; + } + + /** Returns the object with the settings used for calls to updateCorpus. */ + public UnaryCallSettings updateCorpusSettings() { + return updateCorpusSettings; + } + + /** Returns the object with the settings used for calls to listCorpora. */ + public PagedCallSettings + listCorporaSettings() { + return listCorporaSettings; + } + + /** Returns the object with the settings used for calls to deleteCorpus. */ + public UnaryCallSettings deleteCorpusSettings() { + return deleteCorpusSettings; + } + + /** Returns the object with the settings used for calls to analyzeCorpus. */ + public UnaryCallSettings analyzeCorpusSettings() { + return analyzeCorpusSettings; + } + + /** Returns the object with the settings used for calls to analyzeCorpus. */ + public OperationCallSettings + analyzeCorpusOperationSettings() { + return analyzeCorpusOperationSettings; + } + + /** Returns the object with the settings used for calls to createDataSchema. */ + public UnaryCallSettings createDataSchemaSettings() { + return createDataSchemaSettings; + } + + /** Returns the object with the settings used for calls to updateDataSchema. */ + public UnaryCallSettings updateDataSchemaSettings() { + return updateDataSchemaSettings; + } + + /** Returns the object with the settings used for calls to getDataSchema. */ + public UnaryCallSettings getDataSchemaSettings() { + return getDataSchemaSettings; + } + + /** Returns the object with the settings used for calls to deleteDataSchema. */ + public UnaryCallSettings deleteDataSchemaSettings() { + return deleteDataSchemaSettings; + } + + /** Returns the object with the settings used for calls to listDataSchemas. */ + public PagedCallSettings< + ListDataSchemasRequest, ListDataSchemasResponse, ListDataSchemasPagedResponse> + listDataSchemasSettings() { + return listDataSchemasSettings; + } + + /** Returns the object with the settings used for calls to createAnnotation. */ + public UnaryCallSettings createAnnotationSettings() { + return createAnnotationSettings; + } + + /** Returns the object with the settings used for calls to getAnnotation. */ + public UnaryCallSettings getAnnotationSettings() { + return getAnnotationSettings; + } + + /** Returns the object with the settings used for calls to listAnnotations. */ + public PagedCallSettings< + ListAnnotationsRequest, ListAnnotationsResponse, ListAnnotationsPagedResponse> + listAnnotationsSettings() { + return listAnnotationsSettings; + } + + /** Returns the object with the settings used for calls to updateAnnotation. */ + public UnaryCallSettings updateAnnotationSettings() { + return updateAnnotationSettings; + } + + /** Returns the object with the settings used for calls to deleteAnnotation. */ + public UnaryCallSettings deleteAnnotationSettings() { + return deleteAnnotationSettings; + } + + /** Returns the object with the settings used for calls to ingestAsset. */ + public StreamingCallSettings ingestAssetSettings() { + return ingestAssetSettings; + } + + /** Returns the object with the settings used for calls to clipAsset. */ + public UnaryCallSettings clipAssetSettings() { + return clipAssetSettings; + } + + /** Returns the object with the settings used for calls to generateHlsUri. */ + public UnaryCallSettings generateHlsUriSettings() { + return generateHlsUriSettings; + } + + /** Returns the object with the settings used for calls to importAssets. */ + public UnaryCallSettings importAssetsSettings() { + return importAssetsSettings; + } + + /** Returns the object with the settings used for calls to importAssets. */ + public OperationCallSettings + importAssetsOperationSettings() { + return importAssetsOperationSettings; + } + + /** Returns the object with the settings used for calls to createSearchConfig. */ + public UnaryCallSettings createSearchConfigSettings() { + return createSearchConfigSettings; + } + + /** Returns the object with the settings used for calls to updateSearchConfig. */ + public UnaryCallSettings updateSearchConfigSettings() { + return updateSearchConfigSettings; + } + + /** Returns the object with the settings used for calls to getSearchConfig. */ + public UnaryCallSettings getSearchConfigSettings() { + return getSearchConfigSettings; + } + + /** Returns the object with the settings used for calls to deleteSearchConfig. */ + public UnaryCallSettings deleteSearchConfigSettings() { + return deleteSearchConfigSettings; + } + + /** Returns the object with the settings used for calls to listSearchConfigs. */ + public PagedCallSettings< + ListSearchConfigsRequest, ListSearchConfigsResponse, ListSearchConfigsPagedResponse> + listSearchConfigsSettings() { + return listSearchConfigsSettings; + } + + /** Returns the object with the settings used for calls to createSearchHypernym. */ + public UnaryCallSettings + createSearchHypernymSettings() { + return createSearchHypernymSettings; + } + + /** Returns the object with the settings used for calls to updateSearchHypernym. */ + public UnaryCallSettings + updateSearchHypernymSettings() { + return updateSearchHypernymSettings; + } + + /** Returns the object with the settings used for calls to getSearchHypernym. */ + public UnaryCallSettings getSearchHypernymSettings() { + return getSearchHypernymSettings; + } + + /** Returns the object with the settings used for calls to deleteSearchHypernym. */ + public UnaryCallSettings deleteSearchHypernymSettings() { + return deleteSearchHypernymSettings; + } + + /** Returns the object with the settings used for calls to listSearchHypernyms. */ + public PagedCallSettings< + ListSearchHypernymsRequest, ListSearchHypernymsResponse, ListSearchHypernymsPagedResponse> + listSearchHypernymsSettings() { + return listSearchHypernymsSettings; + } + + /** Returns the object with the settings used for calls to searchAssets. */ + public PagedCallSettings + searchAssetsSettings() { + return searchAssetsSettings; + } + + /** Returns the object with the settings used for calls to searchIndexEndpoint. */ + public PagedCallSettings< + SearchIndexEndpointRequest, SearchIndexEndpointResponse, SearchIndexEndpointPagedResponse> + searchIndexEndpointSettings() { + return searchIndexEndpointSettings; + } + + /** Returns the object with the settings used for calls to createIndexEndpoint. */ + public UnaryCallSettings createIndexEndpointSettings() { + return createIndexEndpointSettings; + } + + /** Returns the object with the settings used for calls to createIndexEndpoint. */ + public OperationCallSettings< + CreateIndexEndpointRequest, IndexEndpoint, CreateIndexEndpointMetadata> + createIndexEndpointOperationSettings() { + return createIndexEndpointOperationSettings; + } + + /** Returns the object with the settings used for calls to getIndexEndpoint. */ + public UnaryCallSettings getIndexEndpointSettings() { + return getIndexEndpointSettings; + } + + /** Returns the object with the settings used for calls to listIndexEndpoints. */ + public PagedCallSettings< + ListIndexEndpointsRequest, ListIndexEndpointsResponse, ListIndexEndpointsPagedResponse> + listIndexEndpointsSettings() { + return listIndexEndpointsSettings; + } + + /** Returns the object with the settings used for calls to updateIndexEndpoint. */ + public UnaryCallSettings updateIndexEndpointSettings() { + return updateIndexEndpointSettings; + } + + /** Returns the object with the settings used for calls to updateIndexEndpoint. */ + public OperationCallSettings< + UpdateIndexEndpointRequest, IndexEndpoint, UpdateIndexEndpointMetadata> + updateIndexEndpointOperationSettings() { + return updateIndexEndpointOperationSettings; + } + + /** Returns the object with the settings used for calls to deleteIndexEndpoint. */ + public UnaryCallSettings deleteIndexEndpointSettings() { + return deleteIndexEndpointSettings; + } + + /** Returns the object with the settings used for calls to deleteIndexEndpoint. */ + public OperationCallSettings + deleteIndexEndpointOperationSettings() { + return deleteIndexEndpointOperationSettings; + } + + /** Returns the object with the settings used for calls to deployIndex. */ + public UnaryCallSettings deployIndexSettings() { + return deployIndexSettings; + } + + /** Returns the object with the settings used for calls to deployIndex. */ + public OperationCallSettings + deployIndexOperationSettings() { + return deployIndexOperationSettings; + } + + /** Returns the object with the settings used for calls to undeployIndex. */ + public UnaryCallSettings undeployIndexSettings() { + return undeployIndexSettings; + } + + /** Returns the object with the settings used for calls to undeployIndex. */ + public OperationCallSettings + undeployIndexOperationSettings() { + return undeployIndexOperationSettings; + } + + /** Returns the object with the settings used for calls to createCollection. */ + public UnaryCallSettings createCollectionSettings() { + return createCollectionSettings; + } + + /** Returns the object with the settings used for calls to createCollection. */ + public OperationCallSettings + createCollectionOperationSettings() { + return createCollectionOperationSettings; + } + + /** Returns the object with the settings used for calls to deleteCollection. */ + public UnaryCallSettings deleteCollectionSettings() { + return deleteCollectionSettings; + } + + /** Returns the object with the settings used for calls to deleteCollection. */ + public OperationCallSettings + deleteCollectionOperationSettings() { + return deleteCollectionOperationSettings; + } + + /** Returns the object with the settings used for calls to getCollection. */ + public UnaryCallSettings getCollectionSettings() { + return getCollectionSettings; + } + + /** Returns the object with the settings used for calls to updateCollection. */ + public UnaryCallSettings updateCollectionSettings() { + return updateCollectionSettings; + } + + /** Returns the object with the settings used for calls to listCollections. */ + public PagedCallSettings< + ListCollectionsRequest, ListCollectionsResponse, ListCollectionsPagedResponse> + listCollectionsSettings() { + return listCollectionsSettings; + } + + /** Returns the object with the settings used for calls to addCollectionItem. */ + public UnaryCallSettings + addCollectionItemSettings() { + return addCollectionItemSettings; + } + + /** Returns the object with the settings used for calls to removeCollectionItem. */ + public UnaryCallSettings + removeCollectionItemSettings() { + return removeCollectionItemSettings; + } + + /** Returns the object with the settings used for calls to viewCollectionItems. */ + public PagedCallSettings< + ViewCollectionItemsRequest, ViewCollectionItemsResponse, ViewCollectionItemsPagedResponse> + viewCollectionItemsSettings() { + return viewCollectionItemsSettings; + } + + public WarehouseStub createStub() throws IOException { + if (getTransportChannelProvider() + .getTransportName() + .equals(GrpcTransportChannel.getGrpcTransportName())) { + return GrpcWarehouseStub.create(this); + } + if (getTransportChannelProvider() + .getTransportName() + .equals(HttpJsonTransportChannel.getHttpJsonTransportName())) { + return HttpJsonWarehouseStub.create(this); + } + throw new UnsupportedOperationException( + String.format( + "Transport not supported: %s", getTransportChannelProvider().getTransportName())); + } + + /** Returns the default service name. */ + @Override + public String getServiceName() { + return "visionai"; + } + + /** 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 "visionai.googleapis.com:443"; + } + + /** Returns the default mTLS service endpoint. */ + public static String getDefaultMtlsEndpoint() { + return "visionai.mtls.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) + .setUseJwtAccessWithScope(true); + } + + /** Returns a builder for the default gRPC ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return InstantiatingGrpcChannelProvider.newBuilder() + .setMaxInboundMessageSize(Integer.MAX_VALUE); + } + + /** Returns a builder for the default REST ChannelProvider for this service. */ + @BetaApi + public static InstantiatingHttpJsonChannelProvider.Builder + defaultHttpJsonTransportProviderBuilder() { + return InstantiatingHttpJsonChannelProvider.newBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return defaultGrpcTransportProviderBuilder().build(); + } + + public static ApiClientHeaderProvider.Builder defaultGrpcApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken("gapic", GaxProperties.getLibraryVersion(WarehouseStubSettings.class)) + .setTransportToken( + GaxGrpcProperties.getGrpcTokenName(), GaxGrpcProperties.getGrpcVersion()); + } + + public static ApiClientHeaderProvider.Builder defaultHttpJsonApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken("gapic", GaxProperties.getLibraryVersion(WarehouseStubSettings.class)) + .setTransportToken( + GaxHttpJsonProperties.getHttpJsonTokenName(), + GaxHttpJsonProperties.getHttpJsonVersion()); + } + + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return WarehouseStubSettings.defaultGrpcApiClientHeaderProviderBuilder(); + } + + /** Returns a new gRPC builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new REST builder for this class. */ + public static Builder newHttpJsonBuilder() { + return Builder.createHttpJsonDefault(); + } + + /** 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 WarehouseStubSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + + createAssetSettings = settingsBuilder.createAssetSettings().build(); + updateAssetSettings = settingsBuilder.updateAssetSettings().build(); + getAssetSettings = settingsBuilder.getAssetSettings().build(); + listAssetsSettings = settingsBuilder.listAssetsSettings().build(); + deleteAssetSettings = settingsBuilder.deleteAssetSettings().build(); + deleteAssetOperationSettings = settingsBuilder.deleteAssetOperationSettings().build(); + uploadAssetSettings = settingsBuilder.uploadAssetSettings().build(); + uploadAssetOperationSettings = settingsBuilder.uploadAssetOperationSettings().build(); + generateRetrievalUrlSettings = settingsBuilder.generateRetrievalUrlSettings().build(); + analyzeAssetSettings = settingsBuilder.analyzeAssetSettings().build(); + analyzeAssetOperationSettings = settingsBuilder.analyzeAssetOperationSettings().build(); + indexAssetSettings = settingsBuilder.indexAssetSettings().build(); + indexAssetOperationSettings = settingsBuilder.indexAssetOperationSettings().build(); + removeIndexAssetSettings = settingsBuilder.removeIndexAssetSettings().build(); + removeIndexAssetOperationSettings = settingsBuilder.removeIndexAssetOperationSettings().build(); + viewIndexedAssetsSettings = settingsBuilder.viewIndexedAssetsSettings().build(); + createIndexSettings = settingsBuilder.createIndexSettings().build(); + createIndexOperationSettings = settingsBuilder.createIndexOperationSettings().build(); + updateIndexSettings = settingsBuilder.updateIndexSettings().build(); + updateIndexOperationSettings = settingsBuilder.updateIndexOperationSettings().build(); + getIndexSettings = settingsBuilder.getIndexSettings().build(); + listIndexesSettings = settingsBuilder.listIndexesSettings().build(); + deleteIndexSettings = settingsBuilder.deleteIndexSettings().build(); + deleteIndexOperationSettings = settingsBuilder.deleteIndexOperationSettings().build(); + createCorpusSettings = settingsBuilder.createCorpusSettings().build(); + createCorpusOperationSettings = settingsBuilder.createCorpusOperationSettings().build(); + getCorpusSettings = settingsBuilder.getCorpusSettings().build(); + updateCorpusSettings = settingsBuilder.updateCorpusSettings().build(); + listCorporaSettings = settingsBuilder.listCorporaSettings().build(); + deleteCorpusSettings = settingsBuilder.deleteCorpusSettings().build(); + analyzeCorpusSettings = settingsBuilder.analyzeCorpusSettings().build(); + analyzeCorpusOperationSettings = settingsBuilder.analyzeCorpusOperationSettings().build(); + createDataSchemaSettings = settingsBuilder.createDataSchemaSettings().build(); + updateDataSchemaSettings = settingsBuilder.updateDataSchemaSettings().build(); + getDataSchemaSettings = settingsBuilder.getDataSchemaSettings().build(); + deleteDataSchemaSettings = settingsBuilder.deleteDataSchemaSettings().build(); + listDataSchemasSettings = settingsBuilder.listDataSchemasSettings().build(); + createAnnotationSettings = settingsBuilder.createAnnotationSettings().build(); + getAnnotationSettings = settingsBuilder.getAnnotationSettings().build(); + listAnnotationsSettings = settingsBuilder.listAnnotationsSettings().build(); + updateAnnotationSettings = settingsBuilder.updateAnnotationSettings().build(); + deleteAnnotationSettings = settingsBuilder.deleteAnnotationSettings().build(); + ingestAssetSettings = settingsBuilder.ingestAssetSettings().build(); + clipAssetSettings = settingsBuilder.clipAssetSettings().build(); + generateHlsUriSettings = settingsBuilder.generateHlsUriSettings().build(); + importAssetsSettings = settingsBuilder.importAssetsSettings().build(); + importAssetsOperationSettings = settingsBuilder.importAssetsOperationSettings().build(); + createSearchConfigSettings = settingsBuilder.createSearchConfigSettings().build(); + updateSearchConfigSettings = settingsBuilder.updateSearchConfigSettings().build(); + getSearchConfigSettings = settingsBuilder.getSearchConfigSettings().build(); + deleteSearchConfigSettings = settingsBuilder.deleteSearchConfigSettings().build(); + listSearchConfigsSettings = settingsBuilder.listSearchConfigsSettings().build(); + createSearchHypernymSettings = settingsBuilder.createSearchHypernymSettings().build(); + updateSearchHypernymSettings = settingsBuilder.updateSearchHypernymSettings().build(); + getSearchHypernymSettings = settingsBuilder.getSearchHypernymSettings().build(); + deleteSearchHypernymSettings = settingsBuilder.deleteSearchHypernymSettings().build(); + listSearchHypernymsSettings = settingsBuilder.listSearchHypernymsSettings().build(); + searchAssetsSettings = settingsBuilder.searchAssetsSettings().build(); + searchIndexEndpointSettings = settingsBuilder.searchIndexEndpointSettings().build(); + createIndexEndpointSettings = settingsBuilder.createIndexEndpointSettings().build(); + createIndexEndpointOperationSettings = + settingsBuilder.createIndexEndpointOperationSettings().build(); + getIndexEndpointSettings = settingsBuilder.getIndexEndpointSettings().build(); + listIndexEndpointsSettings = settingsBuilder.listIndexEndpointsSettings().build(); + updateIndexEndpointSettings = settingsBuilder.updateIndexEndpointSettings().build(); + updateIndexEndpointOperationSettings = + settingsBuilder.updateIndexEndpointOperationSettings().build(); + deleteIndexEndpointSettings = settingsBuilder.deleteIndexEndpointSettings().build(); + deleteIndexEndpointOperationSettings = + settingsBuilder.deleteIndexEndpointOperationSettings().build(); + deployIndexSettings = settingsBuilder.deployIndexSettings().build(); + deployIndexOperationSettings = settingsBuilder.deployIndexOperationSettings().build(); + undeployIndexSettings = settingsBuilder.undeployIndexSettings().build(); + undeployIndexOperationSettings = settingsBuilder.undeployIndexOperationSettings().build(); + createCollectionSettings = settingsBuilder.createCollectionSettings().build(); + createCollectionOperationSettings = settingsBuilder.createCollectionOperationSettings().build(); + deleteCollectionSettings = settingsBuilder.deleteCollectionSettings().build(); + deleteCollectionOperationSettings = settingsBuilder.deleteCollectionOperationSettings().build(); + getCollectionSettings = settingsBuilder.getCollectionSettings().build(); + updateCollectionSettings = settingsBuilder.updateCollectionSettings().build(); + listCollectionsSettings = settingsBuilder.listCollectionsSettings().build(); + addCollectionItemSettings = settingsBuilder.addCollectionItemSettings().build(); + removeCollectionItemSettings = settingsBuilder.removeCollectionItemSettings().build(); + viewCollectionItemsSettings = settingsBuilder.viewCollectionItemsSettings().build(); + } + + /** Builder for WarehouseStubSettings. */ + public static class Builder extends StubSettings.Builder { + private final ImmutableList> unaryMethodSettingsBuilders; + private final UnaryCallSettings.Builder createAssetSettings; + private final UnaryCallSettings.Builder updateAssetSettings; + private final UnaryCallSettings.Builder getAssetSettings; + private final PagedCallSettings.Builder< + ListAssetsRequest, ListAssetsResponse, ListAssetsPagedResponse> + listAssetsSettings; + private final UnaryCallSettings.Builder deleteAssetSettings; + private final OperationCallSettings.Builder + deleteAssetOperationSettings; + private final UnaryCallSettings.Builder uploadAssetSettings; + private final OperationCallSettings.Builder< + UploadAssetRequest, UploadAssetResponse, UploadAssetMetadata> + uploadAssetOperationSettings; + private final UnaryCallSettings.Builder< + GenerateRetrievalUrlRequest, GenerateRetrievalUrlResponse> + generateRetrievalUrlSettings; + private final UnaryCallSettings.Builder analyzeAssetSettings; + private final OperationCallSettings.Builder< + AnalyzeAssetRequest, AnalyzeAssetResponse, AnalyzeAssetMetadata> + analyzeAssetOperationSettings; + private final UnaryCallSettings.Builder indexAssetSettings; + private final OperationCallSettings.Builder< + IndexAssetRequest, IndexAssetResponse, IndexAssetMetadata> + indexAssetOperationSettings; + private final UnaryCallSettings.Builder + removeIndexAssetSettings; + private final OperationCallSettings.Builder< + RemoveIndexAssetRequest, RemoveIndexAssetResponse, RemoveIndexAssetMetadata> + removeIndexAssetOperationSettings; + private final PagedCallSettings.Builder< + ViewIndexedAssetsRequest, ViewIndexedAssetsResponse, ViewIndexedAssetsPagedResponse> + viewIndexedAssetsSettings; + private final UnaryCallSettings.Builder createIndexSettings; + private final OperationCallSettings.Builder + createIndexOperationSettings; + private final UnaryCallSettings.Builder updateIndexSettings; + private final OperationCallSettings.Builder + updateIndexOperationSettings; + private final UnaryCallSettings.Builder getIndexSettings; + private final PagedCallSettings.Builder< + ListIndexesRequest, ListIndexesResponse, ListIndexesPagedResponse> + listIndexesSettings; + private final UnaryCallSettings.Builder deleteIndexSettings; + private final OperationCallSettings.Builder + deleteIndexOperationSettings; + private final UnaryCallSettings.Builder createCorpusSettings; + private final OperationCallSettings.Builder + createCorpusOperationSettings; + private final UnaryCallSettings.Builder getCorpusSettings; + private final UnaryCallSettings.Builder updateCorpusSettings; + private final PagedCallSettings.Builder< + ListCorporaRequest, ListCorporaResponse, ListCorporaPagedResponse> + listCorporaSettings; + private final UnaryCallSettings.Builder deleteCorpusSettings; + private final UnaryCallSettings.Builder analyzeCorpusSettings; + private final OperationCallSettings.Builder< + AnalyzeCorpusRequest, AnalyzeCorpusResponse, AnalyzeCorpusMetadata> + analyzeCorpusOperationSettings; + private final UnaryCallSettings.Builder + createDataSchemaSettings; + private final UnaryCallSettings.Builder + updateDataSchemaSettings; + private final UnaryCallSettings.Builder getDataSchemaSettings; + private final UnaryCallSettings.Builder + deleteDataSchemaSettings; + private final PagedCallSettings.Builder< + ListDataSchemasRequest, ListDataSchemasResponse, ListDataSchemasPagedResponse> + listDataSchemasSettings; + private final UnaryCallSettings.Builder + createAnnotationSettings; + private final UnaryCallSettings.Builder getAnnotationSettings; + private final PagedCallSettings.Builder< + ListAnnotationsRequest, ListAnnotationsResponse, ListAnnotationsPagedResponse> + listAnnotationsSettings; + private final UnaryCallSettings.Builder + updateAnnotationSettings; + private final UnaryCallSettings.Builder + deleteAnnotationSettings; + private final StreamingCallSettings.Builder + ingestAssetSettings; + private final UnaryCallSettings.Builder clipAssetSettings; + private final UnaryCallSettings.Builder + generateHlsUriSettings; + private final UnaryCallSettings.Builder importAssetsSettings; + private final OperationCallSettings.Builder< + ImportAssetsRequest, ImportAssetsResponse, ImportAssetsMetadata> + importAssetsOperationSettings; + private final UnaryCallSettings.Builder + createSearchConfigSettings; + private final UnaryCallSettings.Builder + updateSearchConfigSettings; + private final UnaryCallSettings.Builder + getSearchConfigSettings; + private final UnaryCallSettings.Builder + deleteSearchConfigSettings; + private final PagedCallSettings.Builder< + ListSearchConfigsRequest, ListSearchConfigsResponse, ListSearchConfigsPagedResponse> + listSearchConfigsSettings; + private final UnaryCallSettings.Builder + createSearchHypernymSettings; + private final UnaryCallSettings.Builder + updateSearchHypernymSettings; + private final UnaryCallSettings.Builder + getSearchHypernymSettings; + private final UnaryCallSettings.Builder + deleteSearchHypernymSettings; + private final PagedCallSettings.Builder< + ListSearchHypernymsRequest, + ListSearchHypernymsResponse, + ListSearchHypernymsPagedResponse> + listSearchHypernymsSettings; + private final PagedCallSettings.Builder< + SearchAssetsRequest, SearchAssetsResponse, SearchAssetsPagedResponse> + searchAssetsSettings; + private final PagedCallSettings.Builder< + SearchIndexEndpointRequest, + SearchIndexEndpointResponse, + SearchIndexEndpointPagedResponse> + searchIndexEndpointSettings; + private final UnaryCallSettings.Builder + createIndexEndpointSettings; + private final OperationCallSettings.Builder< + CreateIndexEndpointRequest, IndexEndpoint, CreateIndexEndpointMetadata> + createIndexEndpointOperationSettings; + private final UnaryCallSettings.Builder + getIndexEndpointSettings; + private final PagedCallSettings.Builder< + ListIndexEndpointsRequest, ListIndexEndpointsResponse, ListIndexEndpointsPagedResponse> + listIndexEndpointsSettings; + private final UnaryCallSettings.Builder + updateIndexEndpointSettings; + private final OperationCallSettings.Builder< + UpdateIndexEndpointRequest, IndexEndpoint, UpdateIndexEndpointMetadata> + updateIndexEndpointOperationSettings; + private final UnaryCallSettings.Builder + deleteIndexEndpointSettings; + private final OperationCallSettings.Builder< + DeleteIndexEndpointRequest, Empty, DeleteIndexEndpointMetadata> + deleteIndexEndpointOperationSettings; + private final UnaryCallSettings.Builder deployIndexSettings; + private final OperationCallSettings.Builder< + DeployIndexRequest, DeployIndexResponse, DeployIndexMetadata> + deployIndexOperationSettings; + private final UnaryCallSettings.Builder undeployIndexSettings; + private final OperationCallSettings.Builder< + UndeployIndexRequest, UndeployIndexResponse, UndeployIndexMetadata> + undeployIndexOperationSettings; + private final UnaryCallSettings.Builder + createCollectionSettings; + private final OperationCallSettings.Builder< + CreateCollectionRequest, Collection, CreateCollectionMetadata> + createCollectionOperationSettings; + private final UnaryCallSettings.Builder + deleteCollectionSettings; + private final OperationCallSettings.Builder< + DeleteCollectionRequest, Empty, DeleteCollectionMetadata> + deleteCollectionOperationSettings; + private final UnaryCallSettings.Builder getCollectionSettings; + private final UnaryCallSettings.Builder + updateCollectionSettings; + private final PagedCallSettings.Builder< + ListCollectionsRequest, ListCollectionsResponse, ListCollectionsPagedResponse> + listCollectionsSettings; + private final UnaryCallSettings.Builder + addCollectionItemSettings; + private final UnaryCallSettings.Builder< + RemoveCollectionItemRequest, RemoveCollectionItemResponse> + removeCollectionItemSettings; + private final PagedCallSettings.Builder< + ViewCollectionItemsRequest, + ViewCollectionItemsResponse, + ViewCollectionItemsPagedResponse> + viewCollectionItemsSettings; + private static final ImmutableMap> + RETRYABLE_CODE_DEFINITIONS; + + static { + ImmutableMap.Builder> definitions = + ImmutableMap.builder(); + definitions.put( + "retry_policy_9_codes", + ImmutableSet.copyOf(Lists.newArrayList(StatusCode.Code.UNAVAILABLE))); + definitions.put( + "retry_policy_0_codes", + ImmutableSet.copyOf(Lists.newArrayList(StatusCode.Code.UNAVAILABLE))); + 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(120000L)) + .build(); + definitions.put("retry_policy_9_params", settings); + settings = + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(1000L)) + .setRetryDelayMultiplier(1.3) + .setMaxRetryDelay(Duration.ofMillis(10000L)) + .setInitialRpcTimeout(Duration.ofMillis(60000L)) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ofMillis(60000L)) + .setTotalTimeout(Duration.ofMillis(60000L)) + .build(); + definitions.put("retry_policy_0_params", settings); + RETRY_PARAM_DEFINITIONS = definitions.build(); + } + + protected Builder() { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(clientContext); + + createAssetSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + updateAssetSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + getAssetSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + listAssetsSettings = PagedCallSettings.newBuilder(LIST_ASSETS_PAGE_STR_FACT); + deleteAssetSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + deleteAssetOperationSettings = OperationCallSettings.newBuilder(); + uploadAssetSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + uploadAssetOperationSettings = OperationCallSettings.newBuilder(); + generateRetrievalUrlSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + analyzeAssetSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + analyzeAssetOperationSettings = OperationCallSettings.newBuilder(); + indexAssetSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + indexAssetOperationSettings = OperationCallSettings.newBuilder(); + removeIndexAssetSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + removeIndexAssetOperationSettings = OperationCallSettings.newBuilder(); + viewIndexedAssetsSettings = PagedCallSettings.newBuilder(VIEW_INDEXED_ASSETS_PAGE_STR_FACT); + createIndexSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createIndexOperationSettings = OperationCallSettings.newBuilder(); + updateIndexSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + updateIndexOperationSettings = OperationCallSettings.newBuilder(); + getIndexSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + listIndexesSettings = PagedCallSettings.newBuilder(LIST_INDEXES_PAGE_STR_FACT); + deleteIndexSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + deleteIndexOperationSettings = OperationCallSettings.newBuilder(); + createCorpusSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createCorpusOperationSettings = OperationCallSettings.newBuilder(); + getCorpusSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + updateCorpusSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + listCorporaSettings = PagedCallSettings.newBuilder(LIST_CORPORA_PAGE_STR_FACT); + deleteCorpusSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + analyzeCorpusSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + analyzeCorpusOperationSettings = OperationCallSettings.newBuilder(); + createDataSchemaSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + updateDataSchemaSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + getDataSchemaSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + deleteDataSchemaSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + listDataSchemasSettings = PagedCallSettings.newBuilder(LIST_DATA_SCHEMAS_PAGE_STR_FACT); + createAnnotationSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + getAnnotationSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + listAnnotationsSettings = PagedCallSettings.newBuilder(LIST_ANNOTATIONS_PAGE_STR_FACT); + updateAnnotationSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + deleteAnnotationSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + ingestAssetSettings = StreamingCallSettings.newBuilder(); + clipAssetSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + generateHlsUriSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + importAssetsSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + importAssetsOperationSettings = OperationCallSettings.newBuilder(); + createSearchConfigSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + updateSearchConfigSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + getSearchConfigSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + deleteSearchConfigSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + listSearchConfigsSettings = PagedCallSettings.newBuilder(LIST_SEARCH_CONFIGS_PAGE_STR_FACT); + createSearchHypernymSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + updateSearchHypernymSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + getSearchHypernymSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + deleteSearchHypernymSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + listSearchHypernymsSettings = + PagedCallSettings.newBuilder(LIST_SEARCH_HYPERNYMS_PAGE_STR_FACT); + searchAssetsSettings = PagedCallSettings.newBuilder(SEARCH_ASSETS_PAGE_STR_FACT); + searchIndexEndpointSettings = + PagedCallSettings.newBuilder(SEARCH_INDEX_ENDPOINT_PAGE_STR_FACT); + createIndexEndpointSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createIndexEndpointOperationSettings = OperationCallSettings.newBuilder(); + getIndexEndpointSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + listIndexEndpointsSettings = PagedCallSettings.newBuilder(LIST_INDEX_ENDPOINTS_PAGE_STR_FACT); + updateIndexEndpointSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + updateIndexEndpointOperationSettings = OperationCallSettings.newBuilder(); + deleteIndexEndpointSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + deleteIndexEndpointOperationSettings = OperationCallSettings.newBuilder(); + deployIndexSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + deployIndexOperationSettings = OperationCallSettings.newBuilder(); + undeployIndexSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + undeployIndexOperationSettings = OperationCallSettings.newBuilder(); + createCollectionSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createCollectionOperationSettings = OperationCallSettings.newBuilder(); + deleteCollectionSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + deleteCollectionOperationSettings = OperationCallSettings.newBuilder(); + getCollectionSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + updateCollectionSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + listCollectionsSettings = PagedCallSettings.newBuilder(LIST_COLLECTIONS_PAGE_STR_FACT); + addCollectionItemSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + removeCollectionItemSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + viewCollectionItemsSettings = + PagedCallSettings.newBuilder(VIEW_COLLECTION_ITEMS_PAGE_STR_FACT); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + createAssetSettings, + updateAssetSettings, + getAssetSettings, + listAssetsSettings, + deleteAssetSettings, + uploadAssetSettings, + generateRetrievalUrlSettings, + analyzeAssetSettings, + indexAssetSettings, + removeIndexAssetSettings, + viewIndexedAssetsSettings, + createIndexSettings, + updateIndexSettings, + getIndexSettings, + listIndexesSettings, + deleteIndexSettings, + createCorpusSettings, + getCorpusSettings, + updateCorpusSettings, + listCorporaSettings, + deleteCorpusSettings, + analyzeCorpusSettings, + createDataSchemaSettings, + updateDataSchemaSettings, + getDataSchemaSettings, + deleteDataSchemaSettings, + listDataSchemasSettings, + createAnnotationSettings, + getAnnotationSettings, + listAnnotationsSettings, + updateAnnotationSettings, + deleteAnnotationSettings, + clipAssetSettings, + generateHlsUriSettings, + importAssetsSettings, + createSearchConfigSettings, + updateSearchConfigSettings, + getSearchConfigSettings, + deleteSearchConfigSettings, + listSearchConfigsSettings, + createSearchHypernymSettings, + updateSearchHypernymSettings, + getSearchHypernymSettings, + deleteSearchHypernymSettings, + listSearchHypernymsSettings, + searchAssetsSettings, + searchIndexEndpointSettings, + createIndexEndpointSettings, + getIndexEndpointSettings, + listIndexEndpointsSettings, + updateIndexEndpointSettings, + deleteIndexEndpointSettings, + deployIndexSettings, + undeployIndexSettings, + createCollectionSettings, + deleteCollectionSettings, + getCollectionSettings, + updateCollectionSettings, + listCollectionsSettings, + addCollectionItemSettings, + removeCollectionItemSettings, + viewCollectionItemsSettings); + initDefaults(this); + } + + protected Builder(WarehouseStubSettings settings) { + super(settings); + + createAssetSettings = settings.createAssetSettings.toBuilder(); + updateAssetSettings = settings.updateAssetSettings.toBuilder(); + getAssetSettings = settings.getAssetSettings.toBuilder(); + listAssetsSettings = settings.listAssetsSettings.toBuilder(); + deleteAssetSettings = settings.deleteAssetSettings.toBuilder(); + deleteAssetOperationSettings = settings.deleteAssetOperationSettings.toBuilder(); + uploadAssetSettings = settings.uploadAssetSettings.toBuilder(); + uploadAssetOperationSettings = settings.uploadAssetOperationSettings.toBuilder(); + generateRetrievalUrlSettings = settings.generateRetrievalUrlSettings.toBuilder(); + analyzeAssetSettings = settings.analyzeAssetSettings.toBuilder(); + analyzeAssetOperationSettings = settings.analyzeAssetOperationSettings.toBuilder(); + indexAssetSettings = settings.indexAssetSettings.toBuilder(); + indexAssetOperationSettings = settings.indexAssetOperationSettings.toBuilder(); + removeIndexAssetSettings = settings.removeIndexAssetSettings.toBuilder(); + removeIndexAssetOperationSettings = settings.removeIndexAssetOperationSettings.toBuilder(); + viewIndexedAssetsSettings = settings.viewIndexedAssetsSettings.toBuilder(); + createIndexSettings = settings.createIndexSettings.toBuilder(); + createIndexOperationSettings = settings.createIndexOperationSettings.toBuilder(); + updateIndexSettings = settings.updateIndexSettings.toBuilder(); + updateIndexOperationSettings = settings.updateIndexOperationSettings.toBuilder(); + getIndexSettings = settings.getIndexSettings.toBuilder(); + listIndexesSettings = settings.listIndexesSettings.toBuilder(); + deleteIndexSettings = settings.deleteIndexSettings.toBuilder(); + deleteIndexOperationSettings = settings.deleteIndexOperationSettings.toBuilder(); + createCorpusSettings = settings.createCorpusSettings.toBuilder(); + createCorpusOperationSettings = settings.createCorpusOperationSettings.toBuilder(); + getCorpusSettings = settings.getCorpusSettings.toBuilder(); + updateCorpusSettings = settings.updateCorpusSettings.toBuilder(); + listCorporaSettings = settings.listCorporaSettings.toBuilder(); + deleteCorpusSettings = settings.deleteCorpusSettings.toBuilder(); + analyzeCorpusSettings = settings.analyzeCorpusSettings.toBuilder(); + analyzeCorpusOperationSettings = settings.analyzeCorpusOperationSettings.toBuilder(); + createDataSchemaSettings = settings.createDataSchemaSettings.toBuilder(); + updateDataSchemaSettings = settings.updateDataSchemaSettings.toBuilder(); + getDataSchemaSettings = settings.getDataSchemaSettings.toBuilder(); + deleteDataSchemaSettings = settings.deleteDataSchemaSettings.toBuilder(); + listDataSchemasSettings = settings.listDataSchemasSettings.toBuilder(); + createAnnotationSettings = settings.createAnnotationSettings.toBuilder(); + getAnnotationSettings = settings.getAnnotationSettings.toBuilder(); + listAnnotationsSettings = settings.listAnnotationsSettings.toBuilder(); + updateAnnotationSettings = settings.updateAnnotationSettings.toBuilder(); + deleteAnnotationSettings = settings.deleteAnnotationSettings.toBuilder(); + ingestAssetSettings = settings.ingestAssetSettings.toBuilder(); + clipAssetSettings = settings.clipAssetSettings.toBuilder(); + generateHlsUriSettings = settings.generateHlsUriSettings.toBuilder(); + importAssetsSettings = settings.importAssetsSettings.toBuilder(); + importAssetsOperationSettings = settings.importAssetsOperationSettings.toBuilder(); + createSearchConfigSettings = settings.createSearchConfigSettings.toBuilder(); + updateSearchConfigSettings = settings.updateSearchConfigSettings.toBuilder(); + getSearchConfigSettings = settings.getSearchConfigSettings.toBuilder(); + deleteSearchConfigSettings = settings.deleteSearchConfigSettings.toBuilder(); + listSearchConfigsSettings = settings.listSearchConfigsSettings.toBuilder(); + createSearchHypernymSettings = settings.createSearchHypernymSettings.toBuilder(); + updateSearchHypernymSettings = settings.updateSearchHypernymSettings.toBuilder(); + getSearchHypernymSettings = settings.getSearchHypernymSettings.toBuilder(); + deleteSearchHypernymSettings = settings.deleteSearchHypernymSettings.toBuilder(); + listSearchHypernymsSettings = settings.listSearchHypernymsSettings.toBuilder(); + searchAssetsSettings = settings.searchAssetsSettings.toBuilder(); + searchIndexEndpointSettings = settings.searchIndexEndpointSettings.toBuilder(); + createIndexEndpointSettings = settings.createIndexEndpointSettings.toBuilder(); + createIndexEndpointOperationSettings = + settings.createIndexEndpointOperationSettings.toBuilder(); + getIndexEndpointSettings = settings.getIndexEndpointSettings.toBuilder(); + listIndexEndpointsSettings = settings.listIndexEndpointsSettings.toBuilder(); + updateIndexEndpointSettings = settings.updateIndexEndpointSettings.toBuilder(); + updateIndexEndpointOperationSettings = + settings.updateIndexEndpointOperationSettings.toBuilder(); + deleteIndexEndpointSettings = settings.deleteIndexEndpointSettings.toBuilder(); + deleteIndexEndpointOperationSettings = + settings.deleteIndexEndpointOperationSettings.toBuilder(); + deployIndexSettings = settings.deployIndexSettings.toBuilder(); + deployIndexOperationSettings = settings.deployIndexOperationSettings.toBuilder(); + undeployIndexSettings = settings.undeployIndexSettings.toBuilder(); + undeployIndexOperationSettings = settings.undeployIndexOperationSettings.toBuilder(); + createCollectionSettings = settings.createCollectionSettings.toBuilder(); + createCollectionOperationSettings = settings.createCollectionOperationSettings.toBuilder(); + deleteCollectionSettings = settings.deleteCollectionSettings.toBuilder(); + deleteCollectionOperationSettings = settings.deleteCollectionOperationSettings.toBuilder(); + getCollectionSettings = settings.getCollectionSettings.toBuilder(); + updateCollectionSettings = settings.updateCollectionSettings.toBuilder(); + listCollectionsSettings = settings.listCollectionsSettings.toBuilder(); + addCollectionItemSettings = settings.addCollectionItemSettings.toBuilder(); + removeCollectionItemSettings = settings.removeCollectionItemSettings.toBuilder(); + viewCollectionItemsSettings = settings.viewCollectionItemsSettings.toBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + createAssetSettings, + updateAssetSettings, + getAssetSettings, + listAssetsSettings, + deleteAssetSettings, + uploadAssetSettings, + generateRetrievalUrlSettings, + analyzeAssetSettings, + indexAssetSettings, + removeIndexAssetSettings, + viewIndexedAssetsSettings, + createIndexSettings, + updateIndexSettings, + getIndexSettings, + listIndexesSettings, + deleteIndexSettings, + createCorpusSettings, + getCorpusSettings, + updateCorpusSettings, + listCorporaSettings, + deleteCorpusSettings, + analyzeCorpusSettings, + createDataSchemaSettings, + updateDataSchemaSettings, + getDataSchemaSettings, + deleteDataSchemaSettings, + listDataSchemasSettings, + createAnnotationSettings, + getAnnotationSettings, + listAnnotationsSettings, + updateAnnotationSettings, + deleteAnnotationSettings, + clipAssetSettings, + generateHlsUriSettings, + importAssetsSettings, + createSearchConfigSettings, + updateSearchConfigSettings, + getSearchConfigSettings, + deleteSearchConfigSettings, + listSearchConfigsSettings, + createSearchHypernymSettings, + updateSearchHypernymSettings, + getSearchHypernymSettings, + deleteSearchHypernymSettings, + listSearchHypernymsSettings, + searchAssetsSettings, + searchIndexEndpointSettings, + createIndexEndpointSettings, + getIndexEndpointSettings, + listIndexEndpointsSettings, + updateIndexEndpointSettings, + deleteIndexEndpointSettings, + deployIndexSettings, + undeployIndexSettings, + createCollectionSettings, + deleteCollectionSettings, + getCollectionSettings, + updateCollectionSettings, + listCollectionsSettings, + addCollectionItemSettings, + removeCollectionItemSettings, + viewCollectionItemsSettings); + } + + private static Builder createDefault() { + Builder builder = new Builder(((ClientContext) null)); + + builder.setTransportChannelProvider(defaultTransportChannelProvider()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultApiClientHeaderProviderBuilder().build()); + builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); + builder.setSwitchToMtlsEndpointAllowed(true); + + return initDefaults(builder); + } + + private static Builder createHttpJsonDefault() { + Builder builder = new Builder(((ClientContext) null)); + + builder.setTransportChannelProvider(defaultHttpJsonTransportProviderBuilder().build()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultHttpJsonApiClientHeaderProviderBuilder().build()); + builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); + builder.setSwitchToMtlsEndpointAllowed(true); + + return initDefaults(builder); + } + + private static Builder initDefaults(Builder builder) { + builder + .createAssetSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_9_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_9_params")); + + builder + .updateAssetSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .getAssetSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .listAssetsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .deleteAssetSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .uploadAssetSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .generateRetrievalUrlSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .analyzeAssetSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .indexAssetSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .removeIndexAssetSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .viewIndexedAssetsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .createIndexSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .updateIndexSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .getIndexSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .listIndexesSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .deleteIndexSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .createCorpusSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_9_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_9_params")); + + builder + .getCorpusSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .updateCorpusSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .listCorporaSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .deleteCorpusSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .analyzeCorpusSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .createDataSchemaSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_9_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_9_params")); + + builder + .updateDataSchemaSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .getDataSchemaSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .deleteDataSchemaSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .listDataSchemasSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .createAnnotationSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_9_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_9_params")); + + builder + .getAnnotationSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .listAnnotationsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .updateAnnotationSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .deleteAnnotationSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .clipAssetSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .generateHlsUriSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .importAssetsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .createSearchConfigSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .updateSearchConfigSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .getSearchConfigSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .deleteSearchConfigSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .listSearchConfigsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .createSearchHypernymSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .updateSearchHypernymSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .getSearchHypernymSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .deleteSearchHypernymSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .listSearchHypernymsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .searchAssetsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .searchIndexEndpointSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .createIndexEndpointSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .getIndexEndpointSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .listIndexEndpointsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .updateIndexEndpointSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .deleteIndexEndpointSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .deployIndexSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .undeployIndexSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .createCollectionSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .deleteCollectionSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .getCollectionSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .updateCollectionSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .listCollectionsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .addCollectionItemSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .removeCollectionItemSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .viewCollectionItemsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .deleteAssetOperationSettings() + .setInitialCallSettings( + UnaryCallSettings.newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Empty.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(DeleteAssetMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + builder + .uploadAssetOperationSettings() + .setInitialCallSettings( + UnaryCallSettings.newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(UploadAssetResponse.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(UploadAssetMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + builder + .analyzeAssetOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(AnalyzeAssetResponse.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(AnalyzeAssetMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + builder + .indexAssetOperationSettings() + .setInitialCallSettings( + UnaryCallSettings.newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(IndexAssetResponse.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(IndexAssetMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + builder + .removeIndexAssetOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(RemoveIndexAssetResponse.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(RemoveIndexAssetMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + builder + .createIndexOperationSettings() + .setInitialCallSettings( + UnaryCallSettings.newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Index.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(CreateIndexMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + builder + .updateIndexOperationSettings() + .setInitialCallSettings( + UnaryCallSettings.newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Index.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(UpdateIndexMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + builder + .deleteIndexOperationSettings() + .setInitialCallSettings( + UnaryCallSettings.newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Empty.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(DeleteIndexMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + builder + .createCorpusOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_9_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_9_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Corpus.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(CreateCorpusMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + builder + .analyzeCorpusOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(AnalyzeCorpusResponse.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(AnalyzeCorpusMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + builder + .importAssetsOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(ImportAssetsResponse.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(ImportAssetsMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + builder + .createIndexEndpointOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(IndexEndpoint.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create( + CreateIndexEndpointMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + builder + .updateIndexEndpointOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(IndexEndpoint.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create( + UpdateIndexEndpointMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + builder + .deleteIndexEndpointOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Empty.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create( + DeleteIndexEndpointMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + builder + .deployIndexOperationSettings() + .setInitialCallSettings( + UnaryCallSettings.newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(DeployIndexResponse.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(DeployIndexMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + builder + .undeployIndexOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(UndeployIndexResponse.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(UndeployIndexMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + builder + .createCollectionOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Collection.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(CreateCollectionMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + builder + .deleteCollectionOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Empty.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(DeleteCollectionMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + return builder; + } + + /** + * 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) { + super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater); + return this; + } + + public ImmutableList> unaryMethodSettingsBuilders() { + return unaryMethodSettingsBuilders; + } + + /** Returns the builder for the settings used for calls to createAsset. */ + public UnaryCallSettings.Builder createAssetSettings() { + return createAssetSettings; + } + + /** Returns the builder for the settings used for calls to updateAsset. */ + public UnaryCallSettings.Builder updateAssetSettings() { + return updateAssetSettings; + } + + /** Returns the builder for the settings used for calls to getAsset. */ + public UnaryCallSettings.Builder getAssetSettings() { + return getAssetSettings; + } + + /** Returns the builder for the settings used for calls to listAssets. */ + public PagedCallSettings.Builder + listAssetsSettings() { + return listAssetsSettings; + } + + /** Returns the builder for the settings used for calls to deleteAsset. */ + public UnaryCallSettings.Builder deleteAssetSettings() { + return deleteAssetSettings; + } + + /** Returns the builder for the settings used for calls to deleteAsset. */ + public OperationCallSettings.Builder + deleteAssetOperationSettings() { + return deleteAssetOperationSettings; + } + + /** Returns the builder for the settings used for calls to uploadAsset. */ + public UnaryCallSettings.Builder uploadAssetSettings() { + return uploadAssetSettings; + } + + /** Returns the builder for the settings used for calls to uploadAsset. */ + public OperationCallSettings.Builder< + UploadAssetRequest, UploadAssetResponse, UploadAssetMetadata> + uploadAssetOperationSettings() { + return uploadAssetOperationSettings; + } + + /** Returns the builder for the settings used for calls to generateRetrievalUrl. */ + public UnaryCallSettings.Builder + generateRetrievalUrlSettings() { + return generateRetrievalUrlSettings; + } + + /** Returns the builder for the settings used for calls to analyzeAsset. */ + public UnaryCallSettings.Builder analyzeAssetSettings() { + return analyzeAssetSettings; + } + + /** Returns the builder for the settings used for calls to analyzeAsset. */ + public OperationCallSettings.Builder< + AnalyzeAssetRequest, AnalyzeAssetResponse, AnalyzeAssetMetadata> + analyzeAssetOperationSettings() { + return analyzeAssetOperationSettings; + } + + /** Returns the builder for the settings used for calls to indexAsset. */ + public UnaryCallSettings.Builder indexAssetSettings() { + return indexAssetSettings; + } + + /** Returns the builder for the settings used for calls to indexAsset. */ + public OperationCallSettings.Builder + indexAssetOperationSettings() { + return indexAssetOperationSettings; + } + + /** Returns the builder for the settings used for calls to removeIndexAsset. */ + public UnaryCallSettings.Builder + removeIndexAssetSettings() { + return removeIndexAssetSettings; + } + + /** Returns the builder for the settings used for calls to removeIndexAsset. */ + public OperationCallSettings.Builder< + RemoveIndexAssetRequest, RemoveIndexAssetResponse, RemoveIndexAssetMetadata> + removeIndexAssetOperationSettings() { + return removeIndexAssetOperationSettings; + } + + /** Returns the builder for the settings used for calls to viewIndexedAssets. */ + public PagedCallSettings.Builder< + ViewIndexedAssetsRequest, ViewIndexedAssetsResponse, ViewIndexedAssetsPagedResponse> + viewIndexedAssetsSettings() { + return viewIndexedAssetsSettings; + } + + /** Returns the builder for the settings used for calls to createIndex. */ + public UnaryCallSettings.Builder createIndexSettings() { + return createIndexSettings; + } + + /** Returns the builder for the settings used for calls to createIndex. */ + public OperationCallSettings.Builder + createIndexOperationSettings() { + return createIndexOperationSettings; + } + + /** Returns the builder for the settings used for calls to updateIndex. */ + public UnaryCallSettings.Builder updateIndexSettings() { + return updateIndexSettings; + } + + /** Returns the builder for the settings used for calls to updateIndex. */ + public OperationCallSettings.Builder + updateIndexOperationSettings() { + return updateIndexOperationSettings; + } + + /** Returns the builder for the settings used for calls to getIndex. */ + public UnaryCallSettings.Builder getIndexSettings() { + return getIndexSettings; + } + + /** Returns the builder for the settings used for calls to listIndexes. */ + public PagedCallSettings.Builder< + ListIndexesRequest, ListIndexesResponse, ListIndexesPagedResponse> + listIndexesSettings() { + return listIndexesSettings; + } + + /** Returns the builder for the settings used for calls to deleteIndex. */ + public UnaryCallSettings.Builder deleteIndexSettings() { + return deleteIndexSettings; + } + + /** Returns the builder for the settings used for calls to deleteIndex. */ + public OperationCallSettings.Builder + deleteIndexOperationSettings() { + return deleteIndexOperationSettings; + } + + /** Returns the builder for the settings used for calls to createCorpus. */ + public UnaryCallSettings.Builder createCorpusSettings() { + return createCorpusSettings; + } + + /** Returns the builder for the settings used for calls to createCorpus. */ + public OperationCallSettings.Builder + createCorpusOperationSettings() { + return createCorpusOperationSettings; + } + + /** Returns the builder for the settings used for calls to getCorpus. */ + public UnaryCallSettings.Builder getCorpusSettings() { + return getCorpusSettings; + } + + /** Returns the builder for the settings used for calls to updateCorpus. */ + public UnaryCallSettings.Builder updateCorpusSettings() { + return updateCorpusSettings; + } + + /** Returns the builder for the settings used for calls to listCorpora. */ + public PagedCallSettings.Builder< + ListCorporaRequest, ListCorporaResponse, ListCorporaPagedResponse> + listCorporaSettings() { + return listCorporaSettings; + } + + /** Returns the builder for the settings used for calls to deleteCorpus. */ + public UnaryCallSettings.Builder deleteCorpusSettings() { + return deleteCorpusSettings; + } + + /** Returns the builder for the settings used for calls to analyzeCorpus. */ + public UnaryCallSettings.Builder analyzeCorpusSettings() { + return analyzeCorpusSettings; + } + + /** Returns the builder for the settings used for calls to analyzeCorpus. */ + public OperationCallSettings.Builder< + AnalyzeCorpusRequest, AnalyzeCorpusResponse, AnalyzeCorpusMetadata> + analyzeCorpusOperationSettings() { + return analyzeCorpusOperationSettings; + } + + /** Returns the builder for the settings used for calls to createDataSchema. */ + public UnaryCallSettings.Builder + createDataSchemaSettings() { + return createDataSchemaSettings; + } + + /** Returns the builder for the settings used for calls to updateDataSchema. */ + public UnaryCallSettings.Builder + updateDataSchemaSettings() { + return updateDataSchemaSettings; + } + + /** Returns the builder for the settings used for calls to getDataSchema. */ + public UnaryCallSettings.Builder getDataSchemaSettings() { + return getDataSchemaSettings; + } + + /** Returns the builder for the settings used for calls to deleteDataSchema. */ + public UnaryCallSettings.Builder deleteDataSchemaSettings() { + return deleteDataSchemaSettings; + } + + /** Returns the builder for the settings used for calls to listDataSchemas. */ + public PagedCallSettings.Builder< + ListDataSchemasRequest, ListDataSchemasResponse, ListDataSchemasPagedResponse> + listDataSchemasSettings() { + return listDataSchemasSettings; + } + + /** Returns the builder for the settings used for calls to createAnnotation. */ + public UnaryCallSettings.Builder + createAnnotationSettings() { + return createAnnotationSettings; + } + + /** Returns the builder for the settings used for calls to getAnnotation. */ + public UnaryCallSettings.Builder getAnnotationSettings() { + return getAnnotationSettings; + } + + /** Returns the builder for the settings used for calls to listAnnotations. */ + public PagedCallSettings.Builder< + ListAnnotationsRequest, ListAnnotationsResponse, ListAnnotationsPagedResponse> + listAnnotationsSettings() { + return listAnnotationsSettings; + } + + /** Returns the builder for the settings used for calls to updateAnnotation. */ + public UnaryCallSettings.Builder + updateAnnotationSettings() { + return updateAnnotationSettings; + } + + /** Returns the builder for the settings used for calls to deleteAnnotation. */ + public UnaryCallSettings.Builder deleteAnnotationSettings() { + return deleteAnnotationSettings; + } + + /** Returns the builder for the settings used for calls to ingestAsset. */ + public StreamingCallSettings.Builder + ingestAssetSettings() { + return ingestAssetSettings; + } + + /** Returns the builder for the settings used for calls to clipAsset. */ + public UnaryCallSettings.Builder clipAssetSettings() { + return clipAssetSettings; + } + + /** Returns the builder for the settings used for calls to generateHlsUri. */ + public UnaryCallSettings.Builder + generateHlsUriSettings() { + return generateHlsUriSettings; + } + + /** Returns the builder for the settings used for calls to importAssets. */ + public UnaryCallSettings.Builder importAssetsSettings() { + return importAssetsSettings; + } + + /** Returns the builder for the settings used for calls to importAssets. */ + public OperationCallSettings.Builder< + ImportAssetsRequest, ImportAssetsResponse, ImportAssetsMetadata> + importAssetsOperationSettings() { + return importAssetsOperationSettings; + } + + /** Returns the builder for the settings used for calls to createSearchConfig. */ + public UnaryCallSettings.Builder + createSearchConfigSettings() { + return createSearchConfigSettings; + } + + /** Returns the builder for the settings used for calls to updateSearchConfig. */ + public UnaryCallSettings.Builder + updateSearchConfigSettings() { + return updateSearchConfigSettings; + } + + /** Returns the builder for the settings used for calls to getSearchConfig. */ + public UnaryCallSettings.Builder + getSearchConfigSettings() { + return getSearchConfigSettings; + } + + /** Returns the builder for the settings used for calls to deleteSearchConfig. */ + public UnaryCallSettings.Builder + deleteSearchConfigSettings() { + return deleteSearchConfigSettings; + } + + /** Returns the builder for the settings used for calls to listSearchConfigs. */ + public PagedCallSettings.Builder< + ListSearchConfigsRequest, ListSearchConfigsResponse, ListSearchConfigsPagedResponse> + listSearchConfigsSettings() { + return listSearchConfigsSettings; + } + + /** Returns the builder for the settings used for calls to createSearchHypernym. */ + public UnaryCallSettings.Builder + createSearchHypernymSettings() { + return createSearchHypernymSettings; + } + + /** Returns the builder for the settings used for calls to updateSearchHypernym. */ + public UnaryCallSettings.Builder + updateSearchHypernymSettings() { + return updateSearchHypernymSettings; + } + + /** Returns the builder for the settings used for calls to getSearchHypernym. */ + public UnaryCallSettings.Builder + getSearchHypernymSettings() { + return getSearchHypernymSettings; + } + + /** Returns the builder for the settings used for calls to deleteSearchHypernym. */ + public UnaryCallSettings.Builder + deleteSearchHypernymSettings() { + return deleteSearchHypernymSettings; + } + + /** Returns the builder for the settings used for calls to listSearchHypernyms. */ + public PagedCallSettings.Builder< + ListSearchHypernymsRequest, + ListSearchHypernymsResponse, + ListSearchHypernymsPagedResponse> + listSearchHypernymsSettings() { + return listSearchHypernymsSettings; + } + + /** Returns the builder for the settings used for calls to searchAssets. */ + public PagedCallSettings.Builder< + SearchAssetsRequest, SearchAssetsResponse, SearchAssetsPagedResponse> + searchAssetsSettings() { + return searchAssetsSettings; + } + + /** Returns the builder for the settings used for calls to searchIndexEndpoint. */ + public PagedCallSettings.Builder< + SearchIndexEndpointRequest, + SearchIndexEndpointResponse, + SearchIndexEndpointPagedResponse> + searchIndexEndpointSettings() { + return searchIndexEndpointSettings; + } + + /** Returns the builder for the settings used for calls to createIndexEndpoint. */ + public UnaryCallSettings.Builder + createIndexEndpointSettings() { + return createIndexEndpointSettings; + } + + /** Returns the builder for the settings used for calls to createIndexEndpoint. */ + public OperationCallSettings.Builder< + CreateIndexEndpointRequest, IndexEndpoint, CreateIndexEndpointMetadata> + createIndexEndpointOperationSettings() { + return createIndexEndpointOperationSettings; + } + + /** Returns the builder for the settings used for calls to getIndexEndpoint. */ + public UnaryCallSettings.Builder + getIndexEndpointSettings() { + return getIndexEndpointSettings; + } + + /** Returns the builder for the settings used for calls to listIndexEndpoints. */ + public PagedCallSettings.Builder< + ListIndexEndpointsRequest, ListIndexEndpointsResponse, ListIndexEndpointsPagedResponse> + listIndexEndpointsSettings() { + return listIndexEndpointsSettings; + } + + /** Returns the builder for the settings used for calls to updateIndexEndpoint. */ + public UnaryCallSettings.Builder + updateIndexEndpointSettings() { + return updateIndexEndpointSettings; + } + + /** Returns the builder for the settings used for calls to updateIndexEndpoint. */ + public OperationCallSettings.Builder< + UpdateIndexEndpointRequest, IndexEndpoint, UpdateIndexEndpointMetadata> + updateIndexEndpointOperationSettings() { + return updateIndexEndpointOperationSettings; + } + + /** Returns the builder for the settings used for calls to deleteIndexEndpoint. */ + public UnaryCallSettings.Builder + deleteIndexEndpointSettings() { + return deleteIndexEndpointSettings; + } + + /** Returns the builder for the settings used for calls to deleteIndexEndpoint. */ + public OperationCallSettings.Builder< + DeleteIndexEndpointRequest, Empty, DeleteIndexEndpointMetadata> + deleteIndexEndpointOperationSettings() { + return deleteIndexEndpointOperationSettings; + } + + /** Returns the builder for the settings used for calls to deployIndex. */ + public UnaryCallSettings.Builder deployIndexSettings() { + return deployIndexSettings; + } + + /** Returns the builder for the settings used for calls to deployIndex. */ + public OperationCallSettings.Builder< + DeployIndexRequest, DeployIndexResponse, DeployIndexMetadata> + deployIndexOperationSettings() { + return deployIndexOperationSettings; + } + + /** Returns the builder for the settings used for calls to undeployIndex. */ + public UnaryCallSettings.Builder undeployIndexSettings() { + return undeployIndexSettings; + } + + /** Returns the builder for the settings used for calls to undeployIndex. */ + public OperationCallSettings.Builder< + UndeployIndexRequest, UndeployIndexResponse, UndeployIndexMetadata> + undeployIndexOperationSettings() { + return undeployIndexOperationSettings; + } + + /** Returns the builder for the settings used for calls to createCollection. */ + public UnaryCallSettings.Builder + createCollectionSettings() { + return createCollectionSettings; + } + + /** Returns the builder for the settings used for calls to createCollection. */ + public OperationCallSettings.Builder< + CreateCollectionRequest, Collection, CreateCollectionMetadata> + createCollectionOperationSettings() { + return createCollectionOperationSettings; + } + + /** Returns the builder for the settings used for calls to deleteCollection. */ + public UnaryCallSettings.Builder + deleteCollectionSettings() { + return deleteCollectionSettings; + } + + /** Returns the builder for the settings used for calls to deleteCollection. */ + public OperationCallSettings.Builder + deleteCollectionOperationSettings() { + return deleteCollectionOperationSettings; + } + + /** Returns the builder for the settings used for calls to getCollection. */ + public UnaryCallSettings.Builder getCollectionSettings() { + return getCollectionSettings; + } + + /** Returns the builder for the settings used for calls to updateCollection. */ + public UnaryCallSettings.Builder + updateCollectionSettings() { + return updateCollectionSettings; + } + + /** Returns the builder for the settings used for calls to listCollections. */ + public PagedCallSettings.Builder< + ListCollectionsRequest, ListCollectionsResponse, ListCollectionsPagedResponse> + listCollectionsSettings() { + return listCollectionsSettings; + } + + /** Returns the builder for the settings used for calls to addCollectionItem. */ + public UnaryCallSettings.Builder + addCollectionItemSettings() { + return addCollectionItemSettings; + } + + /** Returns the builder for the settings used for calls to removeCollectionItem. */ + public UnaryCallSettings.Builder + removeCollectionItemSettings() { + return removeCollectionItemSettings; + } + + /** Returns the builder for the settings used for calls to viewCollectionItems. */ + public PagedCallSettings.Builder< + ViewCollectionItemsRequest, + ViewCollectionItemsResponse, + ViewCollectionItemsPagedResponse> + viewCollectionItemsSettings() { + return viewCollectionItemsSettings; + } + + @Override + public WarehouseStubSettings build() throws IOException { + return new WarehouseStubSettings(this); + } + } +} diff --git a/java-visionai/google-cloud-visionai/src/main/resources/META-INF/native-image/com.google.cloud.visionai.v1/reflect-config.json b/java-visionai/google-cloud-visionai/src/main/resources/META-INF/native-image/com.google.cloud.visionai.v1/reflect-config.json new file mode 100644 index 000000000000..ba3eb7228f28 --- /dev/null +++ b/java-visionai/google-cloud-visionai/src/main/resources/META-INF/native-image/com.google.cloud.visionai.v1/reflect-config.json @@ -0,0 +1,9506 @@ +[ + { + "name": "com.google.api.ClientLibraryDestination", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.ClientLibraryOrganization", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.ClientLibrarySettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.ClientLibrarySettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.CommonLanguageSettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.CommonLanguageSettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.CppSettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.CppSettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.CustomHttpPattern", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.CustomHttpPattern$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.DotnetSettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.DotnetSettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.FieldBehavior", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.GoSettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.GoSettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.Http", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.Http$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.HttpRule", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.HttpRule$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.JavaSettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.JavaSettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.LaunchStage", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.MethodSettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.MethodSettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.MethodSettings$LongRunning", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.MethodSettings$LongRunning$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.NodeSettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.NodeSettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.PhpSettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.PhpSettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.Publishing", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.Publishing$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.PythonSettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.PythonSettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.ResourceDescriptor", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.ResourceDescriptor$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.ResourceDescriptor$History", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.ResourceDescriptor$Style", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.ResourceReference", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.ResourceReference$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.RubySettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.RubySettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.location.GetLocationRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.location.GetLocationRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.location.ListLocationsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.location.ListLocationsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.location.ListLocationsResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.location.ListLocationsResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.location.Location", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.location.Location$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.AIEnabledDevicesInputConfig", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.AIEnabledDevicesInputConfig$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.AcceleratorType", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.AcquireLeaseRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.AcquireLeaseRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.AddApplicationStreamInputRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.AddApplicationStreamInputRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.AddApplicationStreamInputResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.AddApplicationStreamInputResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.AddCollectionItemRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.AddCollectionItemRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.AddCollectionItemResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.AddCollectionItemResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.Analysis", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.Analysis$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.AnalysisDefinition", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.AnalysisDefinition$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.AnalyzeAssetMetadata", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.AnalyzeAssetMetadata$AnalysisStatus", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.AnalyzeAssetMetadata$AnalysisStatus$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.AnalyzeAssetMetadata$AnalysisStatus$State", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.AnalyzeAssetMetadata$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.AnalyzeAssetRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.AnalyzeAssetRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.AnalyzeAssetResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.AnalyzeAssetResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.AnalyzeCorpusMetadata", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.AnalyzeCorpusMetadata$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.AnalyzeCorpusRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.AnalyzeCorpusRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.AnalyzeCorpusResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.AnalyzeCorpusResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.AnalyzerDefinition", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.AnalyzerDefinition$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.AnalyzerDefinition$DebugOptions", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.AnalyzerDefinition$DebugOptions$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.AnalyzerDefinition$OperatorOption", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.AnalyzerDefinition$OperatorOption$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.AnalyzerDefinition$StreamInput", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.AnalyzerDefinition$StreamInput$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.Annotation", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.Annotation$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.AnnotationCustomizedStruct", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.AnnotationCustomizedStruct$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.AnnotationList", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.AnnotationList$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.AnnotationMatchingResult", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.AnnotationMatchingResult$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.AnnotationValue", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.AnnotationValue$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.AppPlatformCloudFunctionRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.AppPlatformCloudFunctionRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.AppPlatformCloudFunctionRequest$StructedInputAnnotation", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.AppPlatformCloudFunctionRequest$StructedInputAnnotation$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.AppPlatformCloudFunctionResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.AppPlatformCloudFunctionResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.AppPlatformCloudFunctionResponse$StructedOutputAnnotation", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.AppPlatformCloudFunctionResponse$StructedOutputAnnotation$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.AppPlatformEventBody", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.AppPlatformEventBody$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.AppPlatformMetadata", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.AppPlatformMetadata$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.Application", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.Application$ApplicationRuntimeInfo", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.Application$ApplicationRuntimeInfo$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.Application$ApplicationRuntimeInfo$GlobalOutputResource", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.Application$ApplicationRuntimeInfo$GlobalOutputResource$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.Application$ApplicationRuntimeInfo$MonitoringConfig", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.Application$ApplicationRuntimeInfo$MonitoringConfig$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.Application$BillingMode", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.Application$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.Application$State", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.ApplicationConfigs", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.ApplicationConfigs$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.ApplicationConfigs$EventDeliveryConfig", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.ApplicationConfigs$EventDeliveryConfig$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.ApplicationInstance", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.ApplicationInstance$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.ApplicationNodeAnnotation", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.ApplicationNodeAnnotation$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.ApplicationStreamInput", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.ApplicationStreamInput$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.Asset", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.Asset$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.AssetSource", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.AssetSource$AssetContentData", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.AssetSource$AssetContentData$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.AssetSource$AssetGcsSource", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.AssetSource$AssetGcsSource$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.AssetSource$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.AttributeValue", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.AttributeValue$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.AutoscalingMetricSpec", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.AutoscalingMetricSpec$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.BatchRunProcessRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.BatchRunProcessRequest$BatchRunProcessOptions", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.BatchRunProcessRequest$BatchRunProcessOptions$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.BatchRunProcessRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.BatchRunProcessResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.BatchRunProcessResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.BigQueryConfig", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.BigQueryConfig$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.BoolValue", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.BoolValue$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.Channel", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.Channel$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.CircleArea", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.CircleArea$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.ClassificationPredictionResult", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.ClassificationPredictionResult$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.ClipAssetRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.ClipAssetRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.ClipAssetResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.ClipAssetResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.ClipAssetResponse$TimeIndexedUri", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.ClipAssetResponse$TimeIndexedUri$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.Cluster", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.Cluster$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.Cluster$State", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.ClusterInfo", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.ClusterInfo$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.Collection", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.Collection$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.CollectionItem", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.CollectionItem$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.CollectionItem$Type", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.CommitRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.CommitRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.ControlledMode", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.ControlledMode$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.Corpus", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.Corpus$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.Corpus$Type", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.CreateAnalysisRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.CreateAnalysisRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.CreateAnnotationRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.CreateAnnotationRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.CreateApplicationInstancesRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.CreateApplicationInstancesRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.CreateApplicationInstancesResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.CreateApplicationInstancesResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.CreateApplicationRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.CreateApplicationRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.CreateAssetRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.CreateAssetRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.CreateClusterRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.CreateClusterRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.CreateCollectionMetadata", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.CreateCollectionMetadata$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.CreateCollectionRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.CreateCollectionRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.CreateCorpusMetadata", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.CreateCorpusMetadata$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.CreateCorpusRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.CreateCorpusRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.CreateDataSchemaRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.CreateDataSchemaRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.CreateDraftRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.CreateDraftRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.CreateEventRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.CreateEventRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.CreateIndexEndpointMetadata", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.CreateIndexEndpointMetadata$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.CreateIndexEndpointRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.CreateIndexEndpointRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.CreateIndexMetadata", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.CreateIndexMetadata$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.CreateIndexRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.CreateIndexRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.CreateOperatorRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.CreateOperatorRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.CreateProcessRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.CreateProcessRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.CreateProcessorRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.CreateProcessorRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.CreateSearchConfigRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.CreateSearchConfigRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.CreateSearchHypernymRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.CreateSearchHypernymRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.CreateSeriesRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.CreateSeriesRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.CreateStreamRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.CreateStreamRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.Criteria", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.Criteria$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.CustomProcessorSourceInfo", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.CustomProcessorSourceInfo$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.CustomProcessorSourceInfo$ModelSchema", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.CustomProcessorSourceInfo$ModelSchema$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.CustomProcessorSourceInfo$ProductRecognizerArtifact", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.CustomProcessorSourceInfo$ProductRecognizerArtifact$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.CustomProcessorSourceInfo$SourceType", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.DataSchema", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.DataSchema$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.DataSchemaDetails", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.DataSchemaDetails$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.DataSchemaDetails$CustomizedStructConfig", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.DataSchemaDetails$CustomizedStructConfig$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.DataSchemaDetails$DataType", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.DataSchemaDetails$Granularity", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.DataSchemaDetails$ListConfig", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.DataSchemaDetails$ListConfig$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.DataSchemaDetails$ProtoAnyConfig", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.DataSchemaDetails$ProtoAnyConfig$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.DataSchemaDetails$SearchStrategy", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.DataSchemaDetails$SearchStrategy$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.DataSchemaDetails$SearchStrategy$ConfidenceScoreIndexConfig", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.DataSchemaDetails$SearchStrategy$ConfidenceScoreIndexConfig$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.DataSchemaDetails$SearchStrategy$SearchStrategyType", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.DataType", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.DateTimeRange", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.DateTimeRange$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.DateTimeRangeArray", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.DateTimeRangeArray$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.DedicatedResources", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.DedicatedResources$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.DeleteAnalysisRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.DeleteAnalysisRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.DeleteAnnotationRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.DeleteAnnotationRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.DeleteApplicationInstancesRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.DeleteApplicationInstancesRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.DeleteApplicationInstancesResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.DeleteApplicationInstancesResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.DeleteApplicationRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.DeleteApplicationRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.DeleteAssetMetadata", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.DeleteAssetMetadata$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.DeleteAssetRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.DeleteAssetRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.DeleteClusterRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.DeleteClusterRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.DeleteCollectionMetadata", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.DeleteCollectionMetadata$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.DeleteCollectionRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.DeleteCollectionRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.DeleteCorpusRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.DeleteCorpusRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.DeleteDataSchemaRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.DeleteDataSchemaRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.DeleteDraftRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.DeleteDraftRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.DeleteEventRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.DeleteEventRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.DeleteIndexEndpointMetadata", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.DeleteIndexEndpointMetadata$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.DeleteIndexEndpointRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.DeleteIndexEndpointRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.DeleteIndexMetadata", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.DeleteIndexMetadata$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.DeleteIndexRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.DeleteIndexRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.DeleteOperatorRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.DeleteOperatorRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.DeleteProcessRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.DeleteProcessRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.DeleteProcessorRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.DeleteProcessorRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.DeleteSearchConfigRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.DeleteSearchConfigRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.DeleteSearchHypernymRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.DeleteSearchHypernymRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.DeleteSeriesRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.DeleteSeriesRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.DeleteStreamRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.DeleteStreamRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.DeployApplicationRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.DeployApplicationRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.DeployApplicationResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.DeployApplicationResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.DeployIndexMetadata", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.DeployIndexMetadata$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.DeployIndexRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.DeployIndexRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.DeployIndexResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.DeployIndexResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.DeployedIndex", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.DeployedIndex$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.DeployedIndexReference", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.DeployedIndexReference$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.Draft", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.Draft$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.EagerMode", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.EagerMode$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.Event", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.Event$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.Event$Clock", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.EventUpdate", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.EventUpdate$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.FacetBucket", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.FacetBucket$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.FacetBucket$Range", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.FacetBucket$Range$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.FacetBucketType", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.FacetGroup", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.FacetGroup$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.FacetProperty", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.FacetProperty$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.FacetProperty$CustomRangeBucketSpec", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.FacetProperty$CustomRangeBucketSpec$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.FacetProperty$DateTimeBucketSpec", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.FacetProperty$DateTimeBucketSpec$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.FacetProperty$DateTimeBucketSpec$Granularity", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.FacetProperty$FixedRangeBucketSpec", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.FacetProperty$FixedRangeBucketSpec$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.FacetValue", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.FacetValue$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.FloatRange", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.FloatRange$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.FloatRangeArray", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.FloatRangeArray$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.GcsOutputConfig", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.GcsOutputConfig$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.GcsSource", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.GcsSource$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.GeneralObjectDetectionConfig", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.GeneralObjectDetectionConfig$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.GenerateHlsUriRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.GenerateHlsUriRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.GenerateHlsUriResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.GenerateHlsUriResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.GenerateRetrievalUrlRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.GenerateRetrievalUrlRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.GenerateRetrievalUrlResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.GenerateRetrievalUrlResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.GenerateStreamHlsTokenRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.GenerateStreamHlsTokenRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.GenerateStreamHlsTokenResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.GenerateStreamHlsTokenResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.GeoCoordinate", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.GeoCoordinate$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.GeoLocationArray", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.GeoLocationArray$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.GetAnalysisRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.GetAnalysisRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.GetAnnotationRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.GetAnnotationRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.GetApplicationRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.GetApplicationRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.GetAssetRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.GetAssetRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.GetClusterRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.GetClusterRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.GetCollectionRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.GetCollectionRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.GetCorpusRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.GetCorpusRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.GetDataSchemaRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.GetDataSchemaRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.GetDraftRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.GetDraftRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.GetEventRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.GetEventRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.GetIndexEndpointRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.GetIndexEndpointRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.GetIndexRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.GetIndexRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.GetInstanceRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.GetInstanceRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.GetOperatorRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.GetOperatorRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.GetProcessRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.GetProcessRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.GetProcessorRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.GetProcessorRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.GetSearchConfigRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.GetSearchConfigRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.GetSearchHypernymRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.GetSearchHypernymRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.GetSeriesRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.GetSeriesRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.GetStreamRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.GetStreamRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.GetStreamThumbnailRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.GetStreamThumbnailRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.GetStreamThumbnailResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.GetStreamThumbnailResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.GstreamerBufferDescriptor", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.GstreamerBufferDescriptor$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.HealthCheckRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.HealthCheckRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.HealthCheckResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.HealthCheckResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.ImageObjectDetectionPredictionResult", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.ImageObjectDetectionPredictionResult$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.ImageQuery", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.ImageQuery$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.ImageSegmentationPredictionResult", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.ImageSegmentationPredictionResult$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.ImportAssetsMetadata", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.ImportAssetsMetadata$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.ImportAssetsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.ImportAssetsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.ImportAssetsResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.ImportAssetsResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.Index", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.Index$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.Index$State", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.IndexAssetMetadata", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.IndexAssetMetadata$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.IndexAssetRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.IndexAssetRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.IndexAssetResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.IndexAssetResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.IndexEndpoint", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.IndexEndpoint$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.IndexEndpoint$State", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.IndexedAsset", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.IndexedAsset$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.IndexingStatus", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.IndexingStatus$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.IndexingStatus$State", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.IngestAssetRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.IngestAssetRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.IngestAssetRequest$Config", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.IngestAssetRequest$Config$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.IngestAssetRequest$Config$VideoType", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.IngestAssetRequest$Config$VideoType$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.IngestAssetRequest$Config$VideoType$ContainerFormat", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.IngestAssetRequest$TimeIndexedData", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.IngestAssetRequest$TimeIndexedData$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.IngestAssetResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.IngestAssetResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.Instance", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.Instance$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.Instance$InputResource", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.Instance$InputResource$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.Instance$InstanceType", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.Instance$OutputResource", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.Instance$OutputResource$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.Instance$State", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.IntRange", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.IntRange$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.IntRangeArray", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.IntRangeArray$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.Lease", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.Lease$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.LeaseType", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.ListAnalysesRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.ListAnalysesRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.ListAnalysesResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.ListAnalysesResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.ListAnnotationsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.ListAnnotationsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.ListAnnotationsResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.ListAnnotationsResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.ListApplicationsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.ListApplicationsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.ListApplicationsResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.ListApplicationsResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.ListAssetsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.ListAssetsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.ListAssetsResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.ListAssetsResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.ListClustersRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.ListClustersRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.ListClustersResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.ListClustersResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.ListCollectionsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.ListCollectionsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.ListCollectionsResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.ListCollectionsResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.ListCorporaRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.ListCorporaRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.ListCorporaResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.ListCorporaResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.ListDataSchemasRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.ListDataSchemasRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.ListDataSchemasResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.ListDataSchemasResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.ListDraftsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.ListDraftsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.ListDraftsResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.ListDraftsResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.ListEventsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.ListEventsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.ListEventsResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.ListEventsResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.ListIndexEndpointsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.ListIndexEndpointsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.ListIndexEndpointsResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.ListIndexEndpointsResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.ListIndexesRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.ListIndexesRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.ListIndexesResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.ListIndexesResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.ListInstancesRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.ListInstancesRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.ListInstancesResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.ListInstancesResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.ListOperatorsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.ListOperatorsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.ListOperatorsResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.ListOperatorsResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.ListPrebuiltProcessorsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.ListPrebuiltProcessorsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.ListPrebuiltProcessorsResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.ListPrebuiltProcessorsResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.ListProcessesRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.ListProcessesRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.ListProcessesResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.ListProcessesResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.ListProcessorsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.ListProcessorsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.ListProcessorsResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.ListProcessorsResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.ListPublicOperatorsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.ListPublicOperatorsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.ListPublicOperatorsResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.ListPublicOperatorsResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.ListSearchConfigsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.ListSearchConfigsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.ListSearchConfigsResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.ListSearchConfigsResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.ListSearchHypernymsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.ListSearchHypernymsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.ListSearchHypernymsResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.ListSearchHypernymsResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.ListSeriesRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.ListSeriesRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.ListSeriesResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.ListSeriesResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.ListStreamsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.ListStreamsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.ListStreamsResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.ListStreamsResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.MachineSpec", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.MachineSpec$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.MaterializeChannelRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.MaterializeChannelRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.MediaWarehouseConfig", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.MediaWarehouseConfig$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.ModelType", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.Node", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.Node$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.Node$InputEdge", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.Node$InputEdge$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.NormalizedPolygon", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.NormalizedPolygon$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.NormalizedPolyline", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.NormalizedPolyline$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.NormalizedVertex", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.NormalizedVertex$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.ObjectDetectionPredictionResult", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.ObjectDetectionPredictionResult$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.ObjectDetectionPredictionResult$Entity", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.ObjectDetectionPredictionResult$Entity$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.ObjectDetectionPredictionResult$IdentifiedBox", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.ObjectDetectionPredictionResult$IdentifiedBox$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.ObjectDetectionPredictionResult$IdentifiedBox$NormalizedBoundingBox", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.ObjectDetectionPredictionResult$IdentifiedBox$NormalizedBoundingBox$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.OccupancyCountConfig", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.OccupancyCountConfig$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.OccupancyCountingPredictionResult", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.OccupancyCountingPredictionResult$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.OccupancyCountingPredictionResult$DwellTimeInfo", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.OccupancyCountingPredictionResult$DwellTimeInfo$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.OccupancyCountingPredictionResult$Entity", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.OccupancyCountingPredictionResult$Entity$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.OccupancyCountingPredictionResult$IdentifiedBox", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.OccupancyCountingPredictionResult$IdentifiedBox$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.OccupancyCountingPredictionResult$IdentifiedBox$NormalizedBoundingBox", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.OccupancyCountingPredictionResult$IdentifiedBox$NormalizedBoundingBox$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.OccupancyCountingPredictionResult$Stats", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.OccupancyCountingPredictionResult$Stats$AccumulatedObjectCount", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.OccupancyCountingPredictionResult$Stats$AccumulatedObjectCount$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.OccupancyCountingPredictionResult$Stats$ActiveZoneCount", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.OccupancyCountingPredictionResult$Stats$ActiveZoneCount$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.OccupancyCountingPredictionResult$Stats$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.OccupancyCountingPredictionResult$Stats$CrossingLineCount", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.OccupancyCountingPredictionResult$Stats$CrossingLineCount$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.OccupancyCountingPredictionResult$Stats$ObjectCount", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.OccupancyCountingPredictionResult$Stats$ObjectCount$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.OccupancyCountingPredictionResult$TrackInfo", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.OccupancyCountingPredictionResult$TrackInfo$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.OperationMetadata", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.OperationMetadata$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.Operator", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.Operator$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.OperatorDefinition", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.OperatorDefinition$ArgumentDefinition", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.OperatorDefinition$ArgumentDefinition$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.OperatorDefinition$AttributeDefinition", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.OperatorDefinition$AttributeDefinition$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.OperatorDefinition$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.OperatorQuery", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.OperatorQuery$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.Packet", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.Packet$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.PacketHeader", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.PacketHeader$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.PacketType", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.PacketType$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.PacketType$TypeDescriptor", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.PacketType$TypeDescriptor$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.Partition", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.Partition$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.Partition$RelativeTemporalPartition", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.Partition$RelativeTemporalPartition$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.Partition$SpatialPartition", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.Partition$SpatialPartition$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.Partition$TemporalPartition", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.Partition$TemporalPartition$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.PersonBlurConfig", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.PersonBlurConfig$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.PersonBlurConfig$PersonBlurType", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.PersonVehicleDetectionConfig", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.PersonVehicleDetectionConfig$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionConfig", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionConfig$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput$DetectedPerson", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput$DetectedPerson$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput$NormalizedBoundingBox", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput$NormalizedBoundingBox$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput$PPEEntity", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput$PPEEntity$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput$PPEIdentifiedBox", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput$PPEIdentifiedBox$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput$PersonEntity", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput$PersonEntity$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput$PersonIdentifiedBox", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput$PersonIdentifiedBox$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.Process", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.Process$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.Processor", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.Processor$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.Processor$ProcessorState", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.Processor$ProcessorType", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.ProcessorConfig", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.ProcessorConfig$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.ProcessorIOSpec", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.ProcessorIOSpec$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.ProcessorIOSpec$GraphInputChannelSpec", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.ProcessorIOSpec$GraphInputChannelSpec$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.ProcessorIOSpec$GraphOutputChannelSpec", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.ProcessorIOSpec$GraphOutputChannelSpec$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.ProcessorIOSpec$InstanceResourceInputBindingSpec", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.ProcessorIOSpec$InstanceResourceInputBindingSpec$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.ProcessorIOSpec$InstanceResourceOutputBindingSpec", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.ProcessorIOSpec$InstanceResourceOutputBindingSpec$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.ProductRecognizerConfig", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.ProductRecognizerConfig$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.RawImageDescriptor", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.RawImageDescriptor$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.ReceiveEventsControlResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.ReceiveEventsControlResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.ReceiveEventsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.ReceiveEventsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.ReceiveEventsRequest$SetupRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.ReceiveEventsRequest$SetupRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.ReceiveEventsResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.ReceiveEventsResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.ReceivePacketsControlResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.ReceivePacketsControlResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.ReceivePacketsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.ReceivePacketsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.ReceivePacketsRequest$SetupRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.ReceivePacketsRequest$SetupRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.ReceivePacketsResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.ReceivePacketsResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.Registry", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.ReleaseLeaseRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.ReleaseLeaseRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.ReleaseLeaseResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.ReleaseLeaseResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.RemoveApplicationStreamInputRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.RemoveApplicationStreamInputRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.RemoveApplicationStreamInputRequest$TargetStreamInput", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.RemoveApplicationStreamInputRequest$TargetStreamInput$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.RemoveApplicationStreamInputResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.RemoveApplicationStreamInputResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.RemoveCollectionItemRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.RemoveCollectionItemRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.RemoveCollectionItemResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.RemoveCollectionItemResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.RemoveIndexAssetMetadata", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.RemoveIndexAssetMetadata$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.RemoveIndexAssetRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.RemoveIndexAssetRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.RemoveIndexAssetResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.RemoveIndexAssetResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.RenewLeaseRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.RenewLeaseRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.RequestMetadata", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.RequestMetadata$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.ResolveOperatorInfoRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.ResolveOperatorInfoRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.ResolveOperatorInfoResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.ResolveOperatorInfoResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.ResourceAnnotations", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.ResourceAnnotations$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.ResourceSpecification", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.ResourceSpecification$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.RunMode", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.RunStatus", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.RunStatus$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.RunStatus$State", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.SchemaKeySortingStrategy", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.SchemaKeySortingStrategy$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.SchemaKeySortingStrategy$Option", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.SchemaKeySortingStrategy$Option$AggregateMethod", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.SchemaKeySortingStrategy$Option$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.SearchAssetsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.SearchAssetsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.SearchAssetsResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.SearchAssetsResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.SearchCapability", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.SearchCapability$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.SearchCapability$Type", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.SearchCapabilitySetting", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.SearchCapabilitySetting$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.SearchConfig", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.SearchConfig$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.SearchCriteriaProperty", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.SearchCriteriaProperty$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.SearchHypernym", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.SearchHypernym$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.SearchIndexEndpointRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.SearchIndexEndpointRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.SearchIndexEndpointResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.SearchIndexEndpointResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.SearchResultItem", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.SearchResultItem$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.SendPacketsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.SendPacketsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.SendPacketsResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.SendPacketsResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.Series", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.Series$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.SeriesMetadata", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.SeriesMetadata$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.ServerMetadata", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.ServerMetadata$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.Stream", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.Stream$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.StreamAnnotation", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.StreamAnnotation$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.StreamAnnotationType", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.StreamAnnotations", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.StreamAnnotations$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.StreamWithAnnotation", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.StreamWithAnnotation$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.StreamWithAnnotation$NodeAnnotation", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.StreamWithAnnotation$NodeAnnotation$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.StringArray", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.StringArray$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.TagParsingConfig", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.TagParsingConfig$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.TagParsingConfig$EntityParsingConfig", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.TagParsingConfig$EntityParsingConfig$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.TagParsingConfig$EntityParsingConfig$EntityMatchingStrategy", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.TagRecognizerConfig", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.TagRecognizerConfig$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.UndeployApplicationRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.UndeployApplicationRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.UndeployApplicationResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.UndeployApplicationResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.UndeployIndexMetadata", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.UndeployIndexMetadata$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.UndeployIndexRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.UndeployIndexRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.UndeployIndexResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.UndeployIndexResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.UniversalInputConfig", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.UniversalInputConfig$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.UpdateAnalysisRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.UpdateAnalysisRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.UpdateAnnotationRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.UpdateAnnotationRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.UpdateApplicationInstancesRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.UpdateApplicationInstancesRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.UpdateApplicationInstancesRequest$UpdateApplicationInstance", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.UpdateApplicationInstancesRequest$UpdateApplicationInstance$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.UpdateApplicationInstancesResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.UpdateApplicationInstancesResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.UpdateApplicationRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.UpdateApplicationRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.UpdateApplicationStreamInputRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.UpdateApplicationStreamInputRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.UpdateApplicationStreamInputResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.UpdateApplicationStreamInputResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.UpdateAssetRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.UpdateAssetRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.UpdateClusterRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.UpdateClusterRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.UpdateCollectionRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.UpdateCollectionRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.UpdateCorpusRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.UpdateCorpusRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.UpdateDataSchemaRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.UpdateDataSchemaRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.UpdateDraftRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.UpdateDraftRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.UpdateEventRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.UpdateEventRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.UpdateIndexEndpointMetadata", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.UpdateIndexEndpointMetadata$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.UpdateIndexEndpointRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.UpdateIndexEndpointRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.UpdateIndexMetadata", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.UpdateIndexMetadata$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.UpdateIndexRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.UpdateIndexRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.UpdateOperatorRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.UpdateOperatorRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.UpdateProcessRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.UpdateProcessRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.UpdateProcessorRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.UpdateProcessorRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.UpdateSearchConfigRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.UpdateSearchConfigRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.UpdateSearchHypernymRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.UpdateSearchHypernymRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.UpdateSeriesRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.UpdateSeriesRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.UpdateStreamRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.UpdateStreamRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.UploadAssetMetadata", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.UploadAssetMetadata$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.UploadAssetRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.UploadAssetRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.UploadAssetResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.UploadAssetResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.UserSpecifiedAnnotation", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.UserSpecifiedAnnotation$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.VertexAutoMLVideoConfig", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.VertexAutoMLVideoConfig$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.VertexAutoMLVisionConfig", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.VertexAutoMLVisionConfig$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.VertexCustomConfig", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.VertexCustomConfig$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.VideoActionRecognitionPredictionResult", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.VideoActionRecognitionPredictionResult$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.VideoActionRecognitionPredictionResult$IdentifiedAction", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.VideoActionRecognitionPredictionResult$IdentifiedAction$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.VideoClassificationPredictionResult", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.VideoClassificationPredictionResult$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.VideoClassificationPredictionResult$IdentifiedClassification", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.VideoClassificationPredictionResult$IdentifiedClassification$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.VideoObjectTrackingPredictionResult", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.VideoObjectTrackingPredictionResult$BoundingBox", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.VideoObjectTrackingPredictionResult$BoundingBox$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.VideoObjectTrackingPredictionResult$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.VideoObjectTrackingPredictionResult$DetectedObject", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.VideoObjectTrackingPredictionResult$DetectedObject$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.VideoStreamInputConfig", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.VideoStreamInputConfig$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.ViewCollectionItemsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.ViewCollectionItemsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.ViewCollectionItemsResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.ViewCollectionItemsResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.ViewIndexedAssetsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.ViewIndexedAssetsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.ViewIndexedAssetsResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.visionai.v1.ViewIndexedAssetsResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v1.AuditConfig", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v1.AuditConfig$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v1.AuditConfigDelta", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v1.AuditConfigDelta$Action", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v1.AuditConfigDelta$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v1.AuditLogConfig", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v1.AuditLogConfig$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v1.AuditLogConfig$LogType", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v1.Binding", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v1.Binding$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v1.BindingDelta", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v1.BindingDelta$Action", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v1.BindingDelta$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v1.GetIamPolicyRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v1.GetIamPolicyRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v1.GetPolicyOptions", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v1.GetPolicyOptions$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v1.Policy", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v1.Policy$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v1.PolicyDelta", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v1.PolicyDelta$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v1.SetIamPolicyRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v1.SetIamPolicyRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v1.TestIamPermissionsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v1.TestIamPermissionsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v1.TestIamPermissionsResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v1.TestIamPermissionsResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.CancelOperationRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.CancelOperationRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.DeleteOperationRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.DeleteOperationRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.GetOperationRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.GetOperationRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.ListOperationsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.ListOperationsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.ListOperationsResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.ListOperationsResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.Operation", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.Operation$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.OperationInfo", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.OperationInfo$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.WaitOperationRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.WaitOperationRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.Any", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.Any$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$DescriptorProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$DescriptorProto$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$DescriptorProto$ExtensionRange", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$DescriptorProto$ExtensionRange$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$DescriptorProto$ReservedRange", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$DescriptorProto$ReservedRange$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$Edition", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$EnumDescriptorProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$EnumDescriptorProto$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$EnumDescriptorProto$EnumReservedRange", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$EnumDescriptorProto$EnumReservedRange$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$EnumOptions", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$EnumOptions$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$EnumValueDescriptorProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$EnumValueDescriptorProto$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$EnumValueOptions", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$EnumValueOptions$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$ExtensionRangeOptions", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$ExtensionRangeOptions$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$ExtensionRangeOptions$Declaration", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$ExtensionRangeOptions$Declaration$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$ExtensionRangeOptions$VerificationState", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSet", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSet$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSet$EnumType", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSet$FieldPresence", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSet$JsonFormat", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSet$MessageEncoding", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSet$RepeatedFieldEncoding", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSet$Utf8Validation", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSetDefaults", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSetDefaults$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSetDefaults$FeatureSetEditionDefault", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSetDefaults$FeatureSetEditionDefault$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldDescriptorProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldDescriptorProto$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldDescriptorProto$Label", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldDescriptorProto$Type", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldOptions", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldOptions$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldOptions$CType", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldOptions$EditionDefault", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldOptions$EditionDefault$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldOptions$JSType", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldOptions$OptionRetention", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldOptions$OptionTargetType", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FileDescriptorProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FileDescriptorProto$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FileDescriptorSet", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FileDescriptorSet$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FileOptions", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FileOptions$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FileOptions$OptimizeMode", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$GeneratedCodeInfo", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$GeneratedCodeInfo$Annotation", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$GeneratedCodeInfo$Annotation$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$GeneratedCodeInfo$Annotation$Semantic", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$GeneratedCodeInfo$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$MessageOptions", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$MessageOptions$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$MethodDescriptorProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$MethodDescriptorProto$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$MethodOptions", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$MethodOptions$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$MethodOptions$IdempotencyLevel", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$OneofDescriptorProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$OneofDescriptorProto$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$OneofOptions", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$OneofOptions$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$ServiceDescriptorProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$ServiceDescriptorProto$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$ServiceOptions", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$ServiceOptions$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$SourceCodeInfo", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$SourceCodeInfo$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$SourceCodeInfo$Location", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$SourceCodeInfo$Location$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$UninterpretedOption", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$UninterpretedOption$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$UninterpretedOption$NamePart", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$UninterpretedOption$NamePart$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.Duration", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.Duration$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.Empty", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.Empty$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.FieldMask", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.FieldMask$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.ListValue", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.ListValue$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.NullValue", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.Struct", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.Struct$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.Timestamp", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.Timestamp$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.Value", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.Value$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.rpc.Status", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.rpc.Status$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.type.DateTime", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.type.DateTime$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.type.Expr", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.type.Expr$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.type.TimeZone", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.type.TimeZone$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + } +] \ No newline at end of file diff --git a/java-visionai/google-cloud-visionai/src/test/java/com/google/cloud/visionai/v1/AppPlatformClientHttpJsonTest.java b/java-visionai/google-cloud-visionai/src/test/java/com/google/cloud/visionai/v1/AppPlatformClientHttpJsonTest.java new file mode 100644 index 000000000000..d1917ed20bee --- /dev/null +++ b/java-visionai/google-cloud-visionai/src/test/java/com/google/cloud/visionai/v1/AppPlatformClientHttpJsonTest.java @@ -0,0 +1,2671 @@ +/* + * Copyright 2024 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.visionai.v1; + +import static com.google.cloud.visionai.v1.AppPlatformClient.ListApplicationsPagedResponse; +import static com.google.cloud.visionai.v1.AppPlatformClient.ListDraftsPagedResponse; +import static com.google.cloud.visionai.v1.AppPlatformClient.ListInstancesPagedResponse; +import static com.google.cloud.visionai.v1.AppPlatformClient.ListProcessorsPagedResponse; + +import com.google.api.gax.core.NoCredentialsProvider; +import com.google.api.gax.httpjson.GaxHttpJsonProperties; +import com.google.api.gax.httpjson.testing.MockHttpService; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ApiException; +import com.google.api.gax.rpc.ApiExceptionFactory; +import com.google.api.gax.rpc.InvalidArgumentException; +import com.google.api.gax.rpc.StatusCode; +import com.google.api.gax.rpc.testing.FakeStatusCode; +import com.google.cloud.visionai.v1.stub.HttpJsonAppPlatformStub; +import com.google.common.collect.Lists; +import com.google.longrunning.Operation; +import com.google.protobuf.Any; +import com.google.protobuf.Empty; +import com.google.protobuf.FieldMask; +import com.google.protobuf.Timestamp; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.concurrent.ExecutionException; +import javax.annotation.Generated; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +@Generated("by gapic-generator-java") +public class AppPlatformClientHttpJsonTest { + private static MockHttpService mockService; + private static AppPlatformClient client; + + @BeforeClass + public static void startStaticServer() throws IOException { + mockService = + new MockHttpService( + HttpJsonAppPlatformStub.getMethodDescriptors(), + AppPlatformSettings.getDefaultEndpoint()); + AppPlatformSettings settings = + AppPlatformSettings.newHttpJsonBuilder() + .setTransportChannelProvider( + AppPlatformSettings.defaultHttpJsonTransportProviderBuilder() + .setHttpTransport(mockService) + .build()) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = AppPlatformClient.create(settings); + } + + @AfterClass + public static void stopServer() { + client.close(); + } + + @Before + public void setUp() {} + + @After + public void tearDown() throws Exception { + mockService.reset(); + } + + @Test + public void listApplicationsTest() throws Exception { + Application responsesElement = Application.newBuilder().build(); + ListApplicationsResponse expectedResponse = + ListApplicationsResponse.newBuilder() + .setNextPageToken("") + .addAllApplications(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + ListApplicationsPagedResponse pagedListResponse = client.listApplications(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getApplicationsList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listApplicationsExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + client.listApplications(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listApplicationsTest2() throws Exception { + Application responsesElement = Application.newBuilder().build(); + ListApplicationsResponse expectedResponse = + ListApplicationsResponse.newBuilder() + .setNextPageToken("") + .addAllApplications(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "projects/project-5833/locations/location-5833"; + + ListApplicationsPagedResponse pagedListResponse = client.listApplications(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getApplicationsList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listApplicationsExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-5833/locations/location-5833"; + client.listApplications(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getApplicationTest() throws Exception { + Application expectedResponse = + Application.newBuilder() + .setName(ApplicationName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setApplicationConfigs(ApplicationConfigs.newBuilder().build()) + .setRuntimeInfo(Application.ApplicationRuntimeInfo.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + ApplicationName name = ApplicationName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]"); + + Application actualResponse = client.getApplication(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getApplicationExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ApplicationName name = ApplicationName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]"); + client.getApplication(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getApplicationTest2() throws Exception { + Application expectedResponse = + Application.newBuilder() + .setName(ApplicationName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setApplicationConfigs(ApplicationConfigs.newBuilder().build()) + .setRuntimeInfo(Application.ApplicationRuntimeInfo.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + String name = "projects/project-8131/locations/location-8131/applications/application-8131"; + + Application actualResponse = client.getApplication(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getApplicationExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "projects/project-8131/locations/location-8131/applications/application-8131"; + client.getApplication(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createApplicationTest() throws Exception { + Application expectedResponse = + Application.newBuilder() + .setName(ApplicationName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setApplicationConfigs(ApplicationConfigs.newBuilder().build()) + .setRuntimeInfo(Application.ApplicationRuntimeInfo.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createApplicationTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + Application application = Application.newBuilder().build(); + + Application actualResponse = client.createApplicationAsync(parent, application).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createApplicationExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + Application application = Application.newBuilder().build(); + client.createApplicationAsync(parent, application).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void createApplicationTest2() throws Exception { + Application expectedResponse = + Application.newBuilder() + .setName(ApplicationName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setApplicationConfigs(ApplicationConfigs.newBuilder().build()) + .setRuntimeInfo(Application.ApplicationRuntimeInfo.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createApplicationTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + String parent = "projects/project-5833/locations/location-5833"; + Application application = Application.newBuilder().build(); + + Application actualResponse = client.createApplicationAsync(parent, application).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createApplicationExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-5833/locations/location-5833"; + Application application = Application.newBuilder().build(); + client.createApplicationAsync(parent, application).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void updateApplicationTest() throws Exception { + Application expectedResponse = + Application.newBuilder() + .setName(ApplicationName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setApplicationConfigs(ApplicationConfigs.newBuilder().build()) + .setRuntimeInfo(Application.ApplicationRuntimeInfo.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("updateApplicationTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + Application application = + Application.newBuilder() + .setName(ApplicationName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setApplicationConfigs(ApplicationConfigs.newBuilder().build()) + .setRuntimeInfo(Application.ApplicationRuntimeInfo.newBuilder().build()) + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + Application actualResponse = client.updateApplicationAsync(application, updateMask).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void updateApplicationExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + Application application = + Application.newBuilder() + .setName(ApplicationName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setApplicationConfigs(ApplicationConfigs.newBuilder().build()) + .setRuntimeInfo(Application.ApplicationRuntimeInfo.newBuilder().build()) + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateApplicationAsync(application, updateMask).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void deleteApplicationTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteApplicationTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + ApplicationName name = ApplicationName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]"); + + client.deleteApplicationAsync(name).get(); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void deleteApplicationExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ApplicationName name = ApplicationName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]"); + client.deleteApplicationAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void deleteApplicationTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteApplicationTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + String name = "projects/project-8131/locations/location-8131/applications/application-8131"; + + client.deleteApplicationAsync(name).get(); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void deleteApplicationExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "projects/project-8131/locations/location-8131/applications/application-8131"; + client.deleteApplicationAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void deployApplicationTest() throws Exception { + DeployApplicationResponse expectedResponse = DeployApplicationResponse.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deployApplicationTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + ApplicationName name = ApplicationName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]"); + + DeployApplicationResponse actualResponse = client.deployApplicationAsync(name).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void deployApplicationExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ApplicationName name = ApplicationName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]"); + client.deployApplicationAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void deployApplicationTest2() throws Exception { + DeployApplicationResponse expectedResponse = DeployApplicationResponse.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deployApplicationTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + String name = "projects/project-8131/locations/location-8131/applications/application-8131"; + + DeployApplicationResponse actualResponse = client.deployApplicationAsync(name).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void deployApplicationExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "projects/project-8131/locations/location-8131/applications/application-8131"; + client.deployApplicationAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void undeployApplicationTest() throws Exception { + UndeployApplicationResponse expectedResponse = UndeployApplicationResponse.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("undeployApplicationTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + ApplicationName name = ApplicationName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]"); + + UndeployApplicationResponse actualResponse = client.undeployApplicationAsync(name).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void undeployApplicationExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ApplicationName name = ApplicationName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]"); + client.undeployApplicationAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void undeployApplicationTest2() throws Exception { + UndeployApplicationResponse expectedResponse = UndeployApplicationResponse.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("undeployApplicationTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + String name = "projects/project-8131/locations/location-8131/applications/application-8131"; + + UndeployApplicationResponse actualResponse = client.undeployApplicationAsync(name).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void undeployApplicationExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "projects/project-8131/locations/location-8131/applications/application-8131"; + client.undeployApplicationAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void addApplicationStreamInputTest() throws Exception { + AddApplicationStreamInputResponse expectedResponse = + AddApplicationStreamInputResponse.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("addApplicationStreamInputTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + ApplicationName name = ApplicationName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]"); + + AddApplicationStreamInputResponse actualResponse = + client.addApplicationStreamInputAsync(name).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void addApplicationStreamInputExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ApplicationName name = ApplicationName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]"); + client.addApplicationStreamInputAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void addApplicationStreamInputTest2() throws Exception { + AddApplicationStreamInputResponse expectedResponse = + AddApplicationStreamInputResponse.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("addApplicationStreamInputTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + String name = "projects/project-8131/locations/location-8131/applications/application-8131"; + + AddApplicationStreamInputResponse actualResponse = + client.addApplicationStreamInputAsync(name).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void addApplicationStreamInputExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "projects/project-8131/locations/location-8131/applications/application-8131"; + client.addApplicationStreamInputAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void removeApplicationStreamInputTest() throws Exception { + RemoveApplicationStreamInputResponse expectedResponse = + RemoveApplicationStreamInputResponse.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("removeApplicationStreamInputTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + ApplicationName name = ApplicationName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]"); + + RemoveApplicationStreamInputResponse actualResponse = + client.removeApplicationStreamInputAsync(name).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void removeApplicationStreamInputExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ApplicationName name = ApplicationName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]"); + client.removeApplicationStreamInputAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void removeApplicationStreamInputTest2() throws Exception { + RemoveApplicationStreamInputResponse expectedResponse = + RemoveApplicationStreamInputResponse.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("removeApplicationStreamInputTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + String name = "projects/project-8131/locations/location-8131/applications/application-8131"; + + RemoveApplicationStreamInputResponse actualResponse = + client.removeApplicationStreamInputAsync(name).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void removeApplicationStreamInputExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "projects/project-8131/locations/location-8131/applications/application-8131"; + client.removeApplicationStreamInputAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void updateApplicationStreamInputTest() throws Exception { + UpdateApplicationStreamInputResponse expectedResponse = + UpdateApplicationStreamInputResponse.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("updateApplicationStreamInputTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + ApplicationName name = ApplicationName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]"); + + UpdateApplicationStreamInputResponse actualResponse = + client.updateApplicationStreamInputAsync(name).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void updateApplicationStreamInputExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ApplicationName name = ApplicationName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]"); + client.updateApplicationStreamInputAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void updateApplicationStreamInputTest2() throws Exception { + UpdateApplicationStreamInputResponse expectedResponse = + UpdateApplicationStreamInputResponse.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("updateApplicationStreamInputTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + String name = "projects/project-8131/locations/location-8131/applications/application-8131"; + + UpdateApplicationStreamInputResponse actualResponse = + client.updateApplicationStreamInputAsync(name).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void updateApplicationStreamInputExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "projects/project-8131/locations/location-8131/applications/application-8131"; + client.updateApplicationStreamInputAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void listInstancesTest() throws Exception { + Instance responsesElement = Instance.newBuilder().build(); + ListInstancesResponse expectedResponse = + ListInstancesResponse.newBuilder() + .setNextPageToken("") + .addAllInstances(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + ApplicationName parent = ApplicationName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]"); + + ListInstancesPagedResponse pagedListResponse = client.listInstances(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getInstancesList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listInstancesExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ApplicationName parent = ApplicationName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]"); + client.listInstances(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listInstancesTest2() throws Exception { + Instance responsesElement = Instance.newBuilder().build(); + ListInstancesResponse expectedResponse = + ListInstancesResponse.newBuilder() + .setNextPageToken("") + .addAllInstances(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "projects/project-3956/locations/location-3956/applications/application-3956"; + + ListInstancesPagedResponse pagedListResponse = client.listInstances(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getInstancesList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listInstancesExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-3956/locations/location-3956/applications/application-3956"; + client.listInstances(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getInstanceTest() throws Exception { + Instance expectedResponse = + Instance.newBuilder() + .setName( + InstanceName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]", "[INSTANCE]") + .toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .addAllInputResources(new ArrayList()) + .addAllOutputResources(new ArrayList()) + .build(); + mockService.addResponse(expectedResponse); + + InstanceName name = InstanceName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]", "[INSTANCE]"); + + Instance actualResponse = client.getInstance(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getInstanceExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + InstanceName name = InstanceName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]", "[INSTANCE]"); + client.getInstance(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getInstanceTest2() throws Exception { + Instance expectedResponse = + Instance.newBuilder() + .setName( + InstanceName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]", "[INSTANCE]") + .toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .addAllInputResources(new ArrayList()) + .addAllOutputResources(new ArrayList()) + .build(); + mockService.addResponse(expectedResponse); + + String name = + "projects/project-2349/locations/location-2349/applications/application-2349/instances/instance-2349"; + + Instance actualResponse = client.getInstance(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getInstanceExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = + "projects/project-2349/locations/location-2349/applications/application-2349/instances/instance-2349"; + client.getInstance(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createApplicationInstancesTest() throws Exception { + CreateApplicationInstancesResponse expectedResponse = + CreateApplicationInstancesResponse.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createApplicationInstancesTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + ApplicationName name = ApplicationName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]"); + + CreateApplicationInstancesResponse actualResponse = + client.createApplicationInstancesAsync(name).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createApplicationInstancesExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ApplicationName name = ApplicationName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]"); + client.createApplicationInstancesAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void createApplicationInstancesTest2() throws Exception { + CreateApplicationInstancesResponse expectedResponse = + CreateApplicationInstancesResponse.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createApplicationInstancesTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + String name = "projects/project-8131/locations/location-8131/applications/application-8131"; + + CreateApplicationInstancesResponse actualResponse = + client.createApplicationInstancesAsync(name).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createApplicationInstancesExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "projects/project-8131/locations/location-8131/applications/application-8131"; + client.createApplicationInstancesAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void deleteApplicationInstancesTest() throws Exception { + Instance expectedResponse = + Instance.newBuilder() + .setName( + InstanceName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]", "[INSTANCE]") + .toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .addAllInputResources(new ArrayList()) + .addAllOutputResources(new ArrayList()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteApplicationInstancesTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + ApplicationName name = ApplicationName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]"); + + Instance actualResponse = client.deleteApplicationInstancesAsync(name).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void deleteApplicationInstancesExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ApplicationName name = ApplicationName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]"); + client.deleteApplicationInstancesAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void deleteApplicationInstancesTest2() throws Exception { + Instance expectedResponse = + Instance.newBuilder() + .setName( + InstanceName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]", "[INSTANCE]") + .toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .addAllInputResources(new ArrayList()) + .addAllOutputResources(new ArrayList()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteApplicationInstancesTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + String name = "projects/project-8131/locations/location-8131/applications/application-8131"; + + Instance actualResponse = client.deleteApplicationInstancesAsync(name).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void deleteApplicationInstancesExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "projects/project-8131/locations/location-8131/applications/application-8131"; + client.deleteApplicationInstancesAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void updateApplicationInstancesTest() throws Exception { + UpdateApplicationInstancesResponse expectedResponse = + UpdateApplicationInstancesResponse.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("updateApplicationInstancesTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + ApplicationName name = ApplicationName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]"); + List applicationInstances = + new ArrayList<>(); + + UpdateApplicationInstancesResponse actualResponse = + client.updateApplicationInstancesAsync(name, applicationInstances).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void updateApplicationInstancesExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ApplicationName name = ApplicationName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]"); + List applicationInstances = + new ArrayList<>(); + client.updateApplicationInstancesAsync(name, applicationInstances).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void updateApplicationInstancesTest2() throws Exception { + UpdateApplicationInstancesResponse expectedResponse = + UpdateApplicationInstancesResponse.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("updateApplicationInstancesTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + String name = "projects/project-8131/locations/location-8131/applications/application-8131"; + List applicationInstances = + new ArrayList<>(); + + UpdateApplicationInstancesResponse actualResponse = + client.updateApplicationInstancesAsync(name, applicationInstances).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void updateApplicationInstancesExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "projects/project-8131/locations/location-8131/applications/application-8131"; + List applicationInstances = + new ArrayList<>(); + client.updateApplicationInstancesAsync(name, applicationInstances).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void listDraftsTest() throws Exception { + Draft responsesElement = Draft.newBuilder().build(); + ListDraftsResponse expectedResponse = + ListDraftsResponse.newBuilder() + .setNextPageToken("") + .addAllDrafts(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + ApplicationName parent = ApplicationName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]"); + + ListDraftsPagedResponse pagedListResponse = client.listDrafts(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getDraftsList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listDraftsExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ApplicationName parent = ApplicationName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]"); + client.listDrafts(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listDraftsTest2() throws Exception { + Draft responsesElement = Draft.newBuilder().build(); + ListDraftsResponse expectedResponse = + ListDraftsResponse.newBuilder() + .setNextPageToken("") + .addAllDrafts(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "projects/project-3956/locations/location-3956/applications/application-3956"; + + ListDraftsPagedResponse pagedListResponse = client.listDrafts(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getDraftsList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listDraftsExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-3956/locations/location-3956/applications/application-3956"; + client.listDrafts(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getDraftTest() throws Exception { + Draft expectedResponse = + Draft.newBuilder() + .setName(DraftName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]", "[DRAFT]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setDraftApplicationConfigs(ApplicationConfigs.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + DraftName name = DraftName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]", "[DRAFT]"); + + Draft actualResponse = client.getDraft(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getDraftExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + DraftName name = DraftName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]", "[DRAFT]"); + client.getDraft(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getDraftTest2() throws Exception { + Draft expectedResponse = + Draft.newBuilder() + .setName(DraftName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]", "[DRAFT]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setDraftApplicationConfigs(ApplicationConfigs.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + String name = + "projects/project-8201/locations/location-8201/applications/application-8201/drafts/draft-8201"; + + Draft actualResponse = client.getDraft(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getDraftExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = + "projects/project-8201/locations/location-8201/applications/application-8201/drafts/draft-8201"; + client.getDraft(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createDraftTest() throws Exception { + Draft expectedResponse = + Draft.newBuilder() + .setName(DraftName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]", "[DRAFT]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setDraftApplicationConfigs(ApplicationConfigs.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createDraftTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + ApplicationName parent = ApplicationName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]"); + Draft draft = Draft.newBuilder().build(); + String draftId = "draftId1912512156"; + + Draft actualResponse = client.createDraftAsync(parent, draft, draftId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createDraftExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ApplicationName parent = ApplicationName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]"); + Draft draft = Draft.newBuilder().build(); + String draftId = "draftId1912512156"; + client.createDraftAsync(parent, draft, draftId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void createDraftTest2() throws Exception { + Draft expectedResponse = + Draft.newBuilder() + .setName(DraftName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]", "[DRAFT]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setDraftApplicationConfigs(ApplicationConfigs.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createDraftTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + String parent = "projects/project-3956/locations/location-3956/applications/application-3956"; + Draft draft = Draft.newBuilder().build(); + String draftId = "draftId1912512156"; + + Draft actualResponse = client.createDraftAsync(parent, draft, draftId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createDraftExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-3956/locations/location-3956/applications/application-3956"; + Draft draft = Draft.newBuilder().build(); + String draftId = "draftId1912512156"; + client.createDraftAsync(parent, draft, draftId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void updateDraftTest() throws Exception { + Draft expectedResponse = + Draft.newBuilder() + .setName(DraftName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]", "[DRAFT]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setDraftApplicationConfigs(ApplicationConfigs.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("updateDraftTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + Draft draft = + Draft.newBuilder() + .setName(DraftName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]", "[DRAFT]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setDraftApplicationConfigs(ApplicationConfigs.newBuilder().build()) + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + Draft actualResponse = client.updateDraftAsync(draft, updateMask).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void updateDraftExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + Draft draft = + Draft.newBuilder() + .setName( + DraftName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]", "[DRAFT]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setDraftApplicationConfigs(ApplicationConfigs.newBuilder().build()) + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateDraftAsync(draft, updateMask).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void deleteDraftTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteDraftTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + DraftName name = DraftName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]", "[DRAFT]"); + + client.deleteDraftAsync(name).get(); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void deleteDraftExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + DraftName name = DraftName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]", "[DRAFT]"); + client.deleteDraftAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void deleteDraftTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteDraftTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + String name = + "projects/project-8201/locations/location-8201/applications/application-8201/drafts/draft-8201"; + + client.deleteDraftAsync(name).get(); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void deleteDraftExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = + "projects/project-8201/locations/location-8201/applications/application-8201/drafts/draft-8201"; + client.deleteDraftAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void listProcessorsTest() throws Exception { + Processor responsesElement = Processor.newBuilder().build(); + ListProcessorsResponse expectedResponse = + ListProcessorsResponse.newBuilder() + .setNextPageToken("") + .addAllProcessors(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + ListProcessorsPagedResponse pagedListResponse = client.listProcessors(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getProcessorsList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listProcessorsExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + client.listProcessors(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listProcessorsTest2() throws Exception { + Processor responsesElement = Processor.newBuilder().build(); + ListProcessorsResponse expectedResponse = + ListProcessorsResponse.newBuilder() + .setNextPageToken("") + .addAllProcessors(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "projects/project-5833/locations/location-5833"; + + ListProcessorsPagedResponse pagedListResponse = client.listProcessors(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getProcessorsList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listProcessorsExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-5833/locations/location-5833"; + client.listProcessors(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listPrebuiltProcessorsTest() throws Exception { + ListPrebuiltProcessorsResponse expectedResponse = + ListPrebuiltProcessorsResponse.newBuilder() + .addAllProcessors(new ArrayList()) + .build(); + mockService.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + ListPrebuiltProcessorsResponse actualResponse = client.listPrebuiltProcessors(parent); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listPrebuiltProcessorsExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + client.listPrebuiltProcessors(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listPrebuiltProcessorsTest2() throws Exception { + ListPrebuiltProcessorsResponse expectedResponse = + ListPrebuiltProcessorsResponse.newBuilder() + .addAllProcessors(new ArrayList()) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "projects/project-5833/locations/location-5833"; + + ListPrebuiltProcessorsResponse actualResponse = client.listPrebuiltProcessors(parent); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listPrebuiltProcessorsExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-5833/locations/location-5833"; + client.listPrebuiltProcessors(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getProcessorTest() throws Exception { + Processor expectedResponse = + Processor.newBuilder() + .setName(ProcessorName.of("[PROJECT]", "[LOCATION]", "[PROCESSOR]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setModelType(ModelType.forNumber(0)) + .setCustomProcessorSourceInfo(CustomProcessorSourceInfo.newBuilder().build()) + .setProcessorIoSpec(ProcessorIOSpec.newBuilder().build()) + .setConfigurationTypeurl("configurationTypeurl679671327") + .addAllSupportedAnnotationTypes(new ArrayList()) + .setSupportsPostProcessing(true) + .addAllSupportedInstanceTypes(new ArrayList()) + .build(); + mockService.addResponse(expectedResponse); + + ProcessorName name = ProcessorName.of("[PROJECT]", "[LOCATION]", "[PROCESSOR]"); + + Processor actualResponse = client.getProcessor(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getProcessorExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ProcessorName name = ProcessorName.of("[PROJECT]", "[LOCATION]", "[PROCESSOR]"); + client.getProcessor(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getProcessorTest2() throws Exception { + Processor expectedResponse = + Processor.newBuilder() + .setName(ProcessorName.of("[PROJECT]", "[LOCATION]", "[PROCESSOR]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setModelType(ModelType.forNumber(0)) + .setCustomProcessorSourceInfo(CustomProcessorSourceInfo.newBuilder().build()) + .setProcessorIoSpec(ProcessorIOSpec.newBuilder().build()) + .setConfigurationTypeurl("configurationTypeurl679671327") + .addAllSupportedAnnotationTypes(new ArrayList()) + .setSupportsPostProcessing(true) + .addAllSupportedInstanceTypes(new ArrayList()) + .build(); + mockService.addResponse(expectedResponse); + + String name = "projects/project-5167/locations/location-5167/processors/processor-5167"; + + Processor actualResponse = client.getProcessor(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getProcessorExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "projects/project-5167/locations/location-5167/processors/processor-5167"; + client.getProcessor(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createProcessorTest() throws Exception { + Processor expectedResponse = + Processor.newBuilder() + .setName(ProcessorName.of("[PROJECT]", "[LOCATION]", "[PROCESSOR]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setModelType(ModelType.forNumber(0)) + .setCustomProcessorSourceInfo(CustomProcessorSourceInfo.newBuilder().build()) + .setProcessorIoSpec(ProcessorIOSpec.newBuilder().build()) + .setConfigurationTypeurl("configurationTypeurl679671327") + .addAllSupportedAnnotationTypes(new ArrayList()) + .setSupportsPostProcessing(true) + .addAllSupportedInstanceTypes(new ArrayList()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createProcessorTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + Processor processor = Processor.newBuilder().build(); + String processorId = "processorId203323725"; + + Processor actualResponse = client.createProcessorAsync(parent, processor, processorId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createProcessorExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + Processor processor = Processor.newBuilder().build(); + String processorId = "processorId203323725"; + client.createProcessorAsync(parent, processor, processorId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void createProcessorTest2() throws Exception { + Processor expectedResponse = + Processor.newBuilder() + .setName(ProcessorName.of("[PROJECT]", "[LOCATION]", "[PROCESSOR]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setModelType(ModelType.forNumber(0)) + .setCustomProcessorSourceInfo(CustomProcessorSourceInfo.newBuilder().build()) + .setProcessorIoSpec(ProcessorIOSpec.newBuilder().build()) + .setConfigurationTypeurl("configurationTypeurl679671327") + .addAllSupportedAnnotationTypes(new ArrayList()) + .setSupportsPostProcessing(true) + .addAllSupportedInstanceTypes(new ArrayList()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createProcessorTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + String parent = "projects/project-5833/locations/location-5833"; + Processor processor = Processor.newBuilder().build(); + String processorId = "processorId203323725"; + + Processor actualResponse = client.createProcessorAsync(parent, processor, processorId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createProcessorExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-5833/locations/location-5833"; + Processor processor = Processor.newBuilder().build(); + String processorId = "processorId203323725"; + client.createProcessorAsync(parent, processor, processorId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void updateProcessorTest() throws Exception { + Processor expectedResponse = + Processor.newBuilder() + .setName(ProcessorName.of("[PROJECT]", "[LOCATION]", "[PROCESSOR]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setModelType(ModelType.forNumber(0)) + .setCustomProcessorSourceInfo(CustomProcessorSourceInfo.newBuilder().build()) + .setProcessorIoSpec(ProcessorIOSpec.newBuilder().build()) + .setConfigurationTypeurl("configurationTypeurl679671327") + .addAllSupportedAnnotationTypes(new ArrayList()) + .setSupportsPostProcessing(true) + .addAllSupportedInstanceTypes(new ArrayList()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("updateProcessorTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + Processor processor = + Processor.newBuilder() + .setName(ProcessorName.of("[PROJECT]", "[LOCATION]", "[PROCESSOR]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setModelType(ModelType.forNumber(0)) + .setCustomProcessorSourceInfo(CustomProcessorSourceInfo.newBuilder().build()) + .setProcessorIoSpec(ProcessorIOSpec.newBuilder().build()) + .setConfigurationTypeurl("configurationTypeurl679671327") + .addAllSupportedAnnotationTypes(new ArrayList()) + .setSupportsPostProcessing(true) + .addAllSupportedInstanceTypes(new ArrayList()) + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + Processor actualResponse = client.updateProcessorAsync(processor, updateMask).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void updateProcessorExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + Processor processor = + Processor.newBuilder() + .setName(ProcessorName.of("[PROJECT]", "[LOCATION]", "[PROCESSOR]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setModelType(ModelType.forNumber(0)) + .setCustomProcessorSourceInfo(CustomProcessorSourceInfo.newBuilder().build()) + .setProcessorIoSpec(ProcessorIOSpec.newBuilder().build()) + .setConfigurationTypeurl("configurationTypeurl679671327") + .addAllSupportedAnnotationTypes(new ArrayList()) + .setSupportsPostProcessing(true) + .addAllSupportedInstanceTypes(new ArrayList()) + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateProcessorAsync(processor, updateMask).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void deleteProcessorTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteProcessorTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + ProcessorName name = ProcessorName.of("[PROJECT]", "[LOCATION]", "[PROCESSOR]"); + + client.deleteProcessorAsync(name).get(); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void deleteProcessorExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ProcessorName name = ProcessorName.of("[PROJECT]", "[LOCATION]", "[PROCESSOR]"); + client.deleteProcessorAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void deleteProcessorTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteProcessorTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + String name = "projects/project-5167/locations/location-5167/processors/processor-5167"; + + client.deleteProcessorAsync(name).get(); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void deleteProcessorExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "projects/project-5167/locations/location-5167/processors/processor-5167"; + client.deleteProcessorAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } +} diff --git a/java-visionai/google-cloud-visionai/src/test/java/com/google/cloud/visionai/v1/AppPlatformClientTest.java b/java-visionai/google-cloud-visionai/src/test/java/com/google/cloud/visionai/v1/AppPlatformClientTest.java new file mode 100644 index 000000000000..13ae1e4e088f --- /dev/null +++ b/java-visionai/google-cloud-visionai/src/test/java/com/google/cloud/visionai/v1/AppPlatformClientTest.java @@ -0,0 +1,2433 @@ +/* + * Copyright 2024 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.visionai.v1; + +import static com.google.cloud.visionai.v1.AppPlatformClient.ListApplicationsPagedResponse; +import static com.google.cloud.visionai.v1.AppPlatformClient.ListDraftsPagedResponse; +import static com.google.cloud.visionai.v1.AppPlatformClient.ListInstancesPagedResponse; +import static com.google.cloud.visionai.v1.AppPlatformClient.ListProcessorsPagedResponse; + +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.common.collect.Lists; +import com.google.longrunning.Operation; +import com.google.protobuf.AbstractMessage; +import com.google.protobuf.Any; +import com.google.protobuf.Empty; +import com.google.protobuf.FieldMask; +import com.google.protobuf.Timestamp; +import io.grpc.StatusRuntimeException; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.UUID; +import java.util.concurrent.ExecutionException; +import javax.annotation.Generated; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +@Generated("by gapic-generator-java") +public class AppPlatformClientTest { + private static MockAppPlatform mockAppPlatform; + private static MockIAMPolicy mockIAMPolicy; + private static MockLocations mockLocations; + private static MockServiceHelper mockServiceHelper; + private LocalChannelProvider channelProvider; + private AppPlatformClient client; + + @BeforeClass + public static void startStaticServer() { + mockAppPlatform = new MockAppPlatform(); + mockLocations = new MockLocations(); + mockIAMPolicy = new MockIAMPolicy(); + mockServiceHelper = + new MockServiceHelper( + UUID.randomUUID().toString(), + Arrays.asList(mockAppPlatform, mockLocations, mockIAMPolicy)); + mockServiceHelper.start(); + } + + @AfterClass + public static void stopServer() { + mockServiceHelper.stop(); + } + + @Before + public void setUp() throws IOException { + mockServiceHelper.reset(); + channelProvider = mockServiceHelper.createChannelProvider(); + AppPlatformSettings settings = + AppPlatformSettings.newBuilder() + .setTransportChannelProvider(channelProvider) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = AppPlatformClient.create(settings); + } + + @After + public void tearDown() throws Exception { + client.close(); + } + + @Test + public void listApplicationsTest() throws Exception { + Application responsesElement = Application.newBuilder().build(); + ListApplicationsResponse expectedResponse = + ListApplicationsResponse.newBuilder() + .setNextPageToken("") + .addAllApplications(Arrays.asList(responsesElement)) + .build(); + mockAppPlatform.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + ListApplicationsPagedResponse pagedListResponse = client.listApplications(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getApplicationsList().get(0), resources.get(0)); + + List actualRequests = mockAppPlatform.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListApplicationsRequest actualRequest = ((ListApplicationsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listApplicationsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAppPlatform.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + client.listApplications(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listApplicationsTest2() throws Exception { + Application responsesElement = Application.newBuilder().build(); + ListApplicationsResponse expectedResponse = + ListApplicationsResponse.newBuilder() + .setNextPageToken("") + .addAllApplications(Arrays.asList(responsesElement)) + .build(); + mockAppPlatform.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListApplicationsPagedResponse pagedListResponse = client.listApplications(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getApplicationsList().get(0), resources.get(0)); + + List actualRequests = mockAppPlatform.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListApplicationsRequest actualRequest = ((ListApplicationsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listApplicationsExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAppPlatform.addException(exception); + + try { + String parent = "parent-995424086"; + client.listApplications(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getApplicationTest() throws Exception { + Application expectedResponse = + Application.newBuilder() + .setName(ApplicationName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setApplicationConfigs(ApplicationConfigs.newBuilder().build()) + .setRuntimeInfo(Application.ApplicationRuntimeInfo.newBuilder().build()) + .build(); + mockAppPlatform.addResponse(expectedResponse); + + ApplicationName name = ApplicationName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]"); + + Application actualResponse = client.getApplication(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockAppPlatform.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetApplicationRequest actualRequest = ((GetApplicationRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getApplicationExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAppPlatform.addException(exception); + + try { + ApplicationName name = ApplicationName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]"); + client.getApplication(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getApplicationTest2() throws Exception { + Application expectedResponse = + Application.newBuilder() + .setName(ApplicationName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setApplicationConfigs(ApplicationConfigs.newBuilder().build()) + .setRuntimeInfo(Application.ApplicationRuntimeInfo.newBuilder().build()) + .build(); + mockAppPlatform.addResponse(expectedResponse); + + String name = "name3373707"; + + Application actualResponse = client.getApplication(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockAppPlatform.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetApplicationRequest actualRequest = ((GetApplicationRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getApplicationExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAppPlatform.addException(exception); + + try { + String name = "name3373707"; + client.getApplication(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createApplicationTest() throws Exception { + Application expectedResponse = + Application.newBuilder() + .setName(ApplicationName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setApplicationConfigs(ApplicationConfigs.newBuilder().build()) + .setRuntimeInfo(Application.ApplicationRuntimeInfo.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createApplicationTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockAppPlatform.addResponse(resultOperation); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + Application application = Application.newBuilder().build(); + + Application actualResponse = client.createApplicationAsync(parent, application).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockAppPlatform.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateApplicationRequest actualRequest = ((CreateApplicationRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(application, actualRequest.getApplication()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createApplicationExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAppPlatform.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + Application application = Application.newBuilder().build(); + client.createApplicationAsync(parent, application).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()); + } + } + + @Test + public void createApplicationTest2() throws Exception { + Application expectedResponse = + Application.newBuilder() + .setName(ApplicationName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setApplicationConfigs(ApplicationConfigs.newBuilder().build()) + .setRuntimeInfo(Application.ApplicationRuntimeInfo.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createApplicationTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockAppPlatform.addResponse(resultOperation); + + String parent = "parent-995424086"; + Application application = Application.newBuilder().build(); + + Application actualResponse = client.createApplicationAsync(parent, application).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockAppPlatform.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateApplicationRequest actualRequest = ((CreateApplicationRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(application, actualRequest.getApplication()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createApplicationExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAppPlatform.addException(exception); + + try { + String parent = "parent-995424086"; + Application application = Application.newBuilder().build(); + client.createApplicationAsync(parent, application).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()); + } + } + + @Test + public void updateApplicationTest() throws Exception { + Application expectedResponse = + Application.newBuilder() + .setName(ApplicationName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setApplicationConfigs(ApplicationConfigs.newBuilder().build()) + .setRuntimeInfo(Application.ApplicationRuntimeInfo.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("updateApplicationTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockAppPlatform.addResponse(resultOperation); + + Application application = Application.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + Application actualResponse = client.updateApplicationAsync(application, updateMask).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockAppPlatform.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpdateApplicationRequest actualRequest = ((UpdateApplicationRequest) actualRequests.get(0)); + + Assert.assertEquals(application, actualRequest.getApplication()); + Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void updateApplicationExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAppPlatform.addException(exception); + + try { + Application application = Application.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateApplicationAsync(application, updateMask).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()); + } + } + + @Test + public void deleteApplicationTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteApplicationTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockAppPlatform.addResponse(resultOperation); + + ApplicationName name = ApplicationName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]"); + + client.deleteApplicationAsync(name).get(); + + List actualRequests = mockAppPlatform.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteApplicationRequest actualRequest = ((DeleteApplicationRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteApplicationExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAppPlatform.addException(exception); + + try { + ApplicationName name = ApplicationName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]"); + client.deleteApplicationAsync(name).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()); + } + } + + @Test + public void deleteApplicationTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteApplicationTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockAppPlatform.addResponse(resultOperation); + + String name = "name3373707"; + + client.deleteApplicationAsync(name).get(); + + List actualRequests = mockAppPlatform.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteApplicationRequest actualRequest = ((DeleteApplicationRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteApplicationExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAppPlatform.addException(exception); + + try { + String name = "name3373707"; + client.deleteApplicationAsync(name).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()); + } + } + + @Test + public void deployApplicationTest() throws Exception { + DeployApplicationResponse expectedResponse = DeployApplicationResponse.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deployApplicationTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockAppPlatform.addResponse(resultOperation); + + ApplicationName name = ApplicationName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]"); + + DeployApplicationResponse actualResponse = client.deployApplicationAsync(name).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockAppPlatform.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeployApplicationRequest actualRequest = ((DeployApplicationRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deployApplicationExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAppPlatform.addException(exception); + + try { + ApplicationName name = ApplicationName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]"); + client.deployApplicationAsync(name).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()); + } + } + + @Test + public void deployApplicationTest2() throws Exception { + DeployApplicationResponse expectedResponse = DeployApplicationResponse.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deployApplicationTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockAppPlatform.addResponse(resultOperation); + + String name = "name3373707"; + + DeployApplicationResponse actualResponse = client.deployApplicationAsync(name).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockAppPlatform.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeployApplicationRequest actualRequest = ((DeployApplicationRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deployApplicationExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAppPlatform.addException(exception); + + try { + String name = "name3373707"; + client.deployApplicationAsync(name).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()); + } + } + + @Test + public void undeployApplicationTest() throws Exception { + UndeployApplicationResponse expectedResponse = UndeployApplicationResponse.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("undeployApplicationTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockAppPlatform.addResponse(resultOperation); + + ApplicationName name = ApplicationName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]"); + + UndeployApplicationResponse actualResponse = client.undeployApplicationAsync(name).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockAppPlatform.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UndeployApplicationRequest actualRequest = ((UndeployApplicationRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void undeployApplicationExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAppPlatform.addException(exception); + + try { + ApplicationName name = ApplicationName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]"); + client.undeployApplicationAsync(name).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()); + } + } + + @Test + public void undeployApplicationTest2() throws Exception { + UndeployApplicationResponse expectedResponse = UndeployApplicationResponse.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("undeployApplicationTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockAppPlatform.addResponse(resultOperation); + + String name = "name3373707"; + + UndeployApplicationResponse actualResponse = client.undeployApplicationAsync(name).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockAppPlatform.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UndeployApplicationRequest actualRequest = ((UndeployApplicationRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void undeployApplicationExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAppPlatform.addException(exception); + + try { + String name = "name3373707"; + client.undeployApplicationAsync(name).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()); + } + } + + @Test + public void addApplicationStreamInputTest() throws Exception { + AddApplicationStreamInputResponse expectedResponse = + AddApplicationStreamInputResponse.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("addApplicationStreamInputTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockAppPlatform.addResponse(resultOperation); + + ApplicationName name = ApplicationName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]"); + + AddApplicationStreamInputResponse actualResponse = + client.addApplicationStreamInputAsync(name).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockAppPlatform.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + AddApplicationStreamInputRequest actualRequest = + ((AddApplicationStreamInputRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void addApplicationStreamInputExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAppPlatform.addException(exception); + + try { + ApplicationName name = ApplicationName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]"); + client.addApplicationStreamInputAsync(name).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()); + } + } + + @Test + public void addApplicationStreamInputTest2() throws Exception { + AddApplicationStreamInputResponse expectedResponse = + AddApplicationStreamInputResponse.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("addApplicationStreamInputTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockAppPlatform.addResponse(resultOperation); + + String name = "name3373707"; + + AddApplicationStreamInputResponse actualResponse = + client.addApplicationStreamInputAsync(name).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockAppPlatform.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + AddApplicationStreamInputRequest actualRequest = + ((AddApplicationStreamInputRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void addApplicationStreamInputExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAppPlatform.addException(exception); + + try { + String name = "name3373707"; + client.addApplicationStreamInputAsync(name).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()); + } + } + + @Test + public void removeApplicationStreamInputTest() throws Exception { + RemoveApplicationStreamInputResponse expectedResponse = + RemoveApplicationStreamInputResponse.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("removeApplicationStreamInputTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockAppPlatform.addResponse(resultOperation); + + ApplicationName name = ApplicationName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]"); + + RemoveApplicationStreamInputResponse actualResponse = + client.removeApplicationStreamInputAsync(name).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockAppPlatform.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + RemoveApplicationStreamInputRequest actualRequest = + ((RemoveApplicationStreamInputRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void removeApplicationStreamInputExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAppPlatform.addException(exception); + + try { + ApplicationName name = ApplicationName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]"); + client.removeApplicationStreamInputAsync(name).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()); + } + } + + @Test + public void removeApplicationStreamInputTest2() throws Exception { + RemoveApplicationStreamInputResponse expectedResponse = + RemoveApplicationStreamInputResponse.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("removeApplicationStreamInputTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockAppPlatform.addResponse(resultOperation); + + String name = "name3373707"; + + RemoveApplicationStreamInputResponse actualResponse = + client.removeApplicationStreamInputAsync(name).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockAppPlatform.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + RemoveApplicationStreamInputRequest actualRequest = + ((RemoveApplicationStreamInputRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void removeApplicationStreamInputExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAppPlatform.addException(exception); + + try { + String name = "name3373707"; + client.removeApplicationStreamInputAsync(name).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()); + } + } + + @Test + public void updateApplicationStreamInputTest() throws Exception { + UpdateApplicationStreamInputResponse expectedResponse = + UpdateApplicationStreamInputResponse.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("updateApplicationStreamInputTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockAppPlatform.addResponse(resultOperation); + + ApplicationName name = ApplicationName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]"); + + UpdateApplicationStreamInputResponse actualResponse = + client.updateApplicationStreamInputAsync(name).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockAppPlatform.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpdateApplicationStreamInputRequest actualRequest = + ((UpdateApplicationStreamInputRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void updateApplicationStreamInputExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAppPlatform.addException(exception); + + try { + ApplicationName name = ApplicationName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]"); + client.updateApplicationStreamInputAsync(name).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()); + } + } + + @Test + public void updateApplicationStreamInputTest2() throws Exception { + UpdateApplicationStreamInputResponse expectedResponse = + UpdateApplicationStreamInputResponse.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("updateApplicationStreamInputTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockAppPlatform.addResponse(resultOperation); + + String name = "name3373707"; + + UpdateApplicationStreamInputResponse actualResponse = + client.updateApplicationStreamInputAsync(name).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockAppPlatform.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpdateApplicationStreamInputRequest actualRequest = + ((UpdateApplicationStreamInputRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void updateApplicationStreamInputExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAppPlatform.addException(exception); + + try { + String name = "name3373707"; + client.updateApplicationStreamInputAsync(name).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()); + } + } + + @Test + public void listInstancesTest() throws Exception { + Instance responsesElement = Instance.newBuilder().build(); + ListInstancesResponse expectedResponse = + ListInstancesResponse.newBuilder() + .setNextPageToken("") + .addAllInstances(Arrays.asList(responsesElement)) + .build(); + mockAppPlatform.addResponse(expectedResponse); + + ApplicationName parent = ApplicationName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]"); + + ListInstancesPagedResponse pagedListResponse = client.listInstances(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getInstancesList().get(0), resources.get(0)); + + List actualRequests = mockAppPlatform.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListInstancesRequest actualRequest = ((ListInstancesRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listInstancesExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAppPlatform.addException(exception); + + try { + ApplicationName parent = ApplicationName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]"); + client.listInstances(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listInstancesTest2() throws Exception { + Instance responsesElement = Instance.newBuilder().build(); + ListInstancesResponse expectedResponse = + ListInstancesResponse.newBuilder() + .setNextPageToken("") + .addAllInstances(Arrays.asList(responsesElement)) + .build(); + mockAppPlatform.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListInstancesPagedResponse pagedListResponse = client.listInstances(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getInstancesList().get(0), resources.get(0)); + + List actualRequests = mockAppPlatform.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListInstancesRequest actualRequest = ((ListInstancesRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listInstancesExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAppPlatform.addException(exception); + + try { + String parent = "parent-995424086"; + client.listInstances(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getInstanceTest() throws Exception { + Instance expectedResponse = + Instance.newBuilder() + .setName( + InstanceName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]", "[INSTANCE]") + .toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .addAllInputResources(new ArrayList()) + .addAllOutputResources(new ArrayList()) + .build(); + mockAppPlatform.addResponse(expectedResponse); + + InstanceName name = InstanceName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]", "[INSTANCE]"); + + Instance actualResponse = client.getInstance(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockAppPlatform.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetInstanceRequest actualRequest = ((GetInstanceRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getInstanceExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAppPlatform.addException(exception); + + try { + InstanceName name = InstanceName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]", "[INSTANCE]"); + client.getInstance(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getInstanceTest2() throws Exception { + Instance expectedResponse = + Instance.newBuilder() + .setName( + InstanceName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]", "[INSTANCE]") + .toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .addAllInputResources(new ArrayList()) + .addAllOutputResources(new ArrayList()) + .build(); + mockAppPlatform.addResponse(expectedResponse); + + String name = "name3373707"; + + Instance actualResponse = client.getInstance(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockAppPlatform.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetInstanceRequest actualRequest = ((GetInstanceRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getInstanceExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAppPlatform.addException(exception); + + try { + String name = "name3373707"; + client.getInstance(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createApplicationInstancesTest() throws Exception { + CreateApplicationInstancesResponse expectedResponse = + CreateApplicationInstancesResponse.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createApplicationInstancesTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockAppPlatform.addResponse(resultOperation); + + ApplicationName name = ApplicationName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]"); + + CreateApplicationInstancesResponse actualResponse = + client.createApplicationInstancesAsync(name).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockAppPlatform.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateApplicationInstancesRequest actualRequest = + ((CreateApplicationInstancesRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createApplicationInstancesExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAppPlatform.addException(exception); + + try { + ApplicationName name = ApplicationName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]"); + client.createApplicationInstancesAsync(name).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()); + } + } + + @Test + public void createApplicationInstancesTest2() throws Exception { + CreateApplicationInstancesResponse expectedResponse = + CreateApplicationInstancesResponse.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createApplicationInstancesTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockAppPlatform.addResponse(resultOperation); + + String name = "name3373707"; + + CreateApplicationInstancesResponse actualResponse = + client.createApplicationInstancesAsync(name).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockAppPlatform.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateApplicationInstancesRequest actualRequest = + ((CreateApplicationInstancesRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createApplicationInstancesExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAppPlatform.addException(exception); + + try { + String name = "name3373707"; + client.createApplicationInstancesAsync(name).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()); + } + } + + @Test + public void deleteApplicationInstancesTest() throws Exception { + Instance expectedResponse = + Instance.newBuilder() + .setName( + InstanceName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]", "[INSTANCE]") + .toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .addAllInputResources(new ArrayList()) + .addAllOutputResources(new ArrayList()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteApplicationInstancesTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockAppPlatform.addResponse(resultOperation); + + ApplicationName name = ApplicationName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]"); + + Instance actualResponse = client.deleteApplicationInstancesAsync(name).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockAppPlatform.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteApplicationInstancesRequest actualRequest = + ((DeleteApplicationInstancesRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteApplicationInstancesExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAppPlatform.addException(exception); + + try { + ApplicationName name = ApplicationName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]"); + client.deleteApplicationInstancesAsync(name).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()); + } + } + + @Test + public void deleteApplicationInstancesTest2() throws Exception { + Instance expectedResponse = + Instance.newBuilder() + .setName( + InstanceName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]", "[INSTANCE]") + .toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .addAllInputResources(new ArrayList()) + .addAllOutputResources(new ArrayList()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteApplicationInstancesTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockAppPlatform.addResponse(resultOperation); + + String name = "name3373707"; + + Instance actualResponse = client.deleteApplicationInstancesAsync(name).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockAppPlatform.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteApplicationInstancesRequest actualRequest = + ((DeleteApplicationInstancesRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteApplicationInstancesExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAppPlatform.addException(exception); + + try { + String name = "name3373707"; + client.deleteApplicationInstancesAsync(name).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()); + } + } + + @Test + public void updateApplicationInstancesTest() throws Exception { + UpdateApplicationInstancesResponse expectedResponse = + UpdateApplicationInstancesResponse.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("updateApplicationInstancesTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockAppPlatform.addResponse(resultOperation); + + ApplicationName name = ApplicationName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]"); + List applicationInstances = + new ArrayList<>(); + + UpdateApplicationInstancesResponse actualResponse = + client.updateApplicationInstancesAsync(name, applicationInstances).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockAppPlatform.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpdateApplicationInstancesRequest actualRequest = + ((UpdateApplicationInstancesRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertEquals(applicationInstances, actualRequest.getApplicationInstancesList()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void updateApplicationInstancesExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAppPlatform.addException(exception); + + try { + ApplicationName name = ApplicationName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]"); + List applicationInstances = + new ArrayList<>(); + client.updateApplicationInstancesAsync(name, applicationInstances).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()); + } + } + + @Test + public void updateApplicationInstancesTest2() throws Exception { + UpdateApplicationInstancesResponse expectedResponse = + UpdateApplicationInstancesResponse.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("updateApplicationInstancesTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockAppPlatform.addResponse(resultOperation); + + String name = "name3373707"; + List applicationInstances = + new ArrayList<>(); + + UpdateApplicationInstancesResponse actualResponse = + client.updateApplicationInstancesAsync(name, applicationInstances).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockAppPlatform.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpdateApplicationInstancesRequest actualRequest = + ((UpdateApplicationInstancesRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertEquals(applicationInstances, actualRequest.getApplicationInstancesList()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void updateApplicationInstancesExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAppPlatform.addException(exception); + + try { + String name = "name3373707"; + List applicationInstances = + new ArrayList<>(); + client.updateApplicationInstancesAsync(name, applicationInstances).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()); + } + } + + @Test + public void listDraftsTest() throws Exception { + Draft responsesElement = Draft.newBuilder().build(); + ListDraftsResponse expectedResponse = + ListDraftsResponse.newBuilder() + .setNextPageToken("") + .addAllDrafts(Arrays.asList(responsesElement)) + .build(); + mockAppPlatform.addResponse(expectedResponse); + + ApplicationName parent = ApplicationName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]"); + + ListDraftsPagedResponse pagedListResponse = client.listDrafts(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getDraftsList().get(0), resources.get(0)); + + List actualRequests = mockAppPlatform.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListDraftsRequest actualRequest = ((ListDraftsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listDraftsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAppPlatform.addException(exception); + + try { + ApplicationName parent = ApplicationName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]"); + client.listDrafts(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listDraftsTest2() throws Exception { + Draft responsesElement = Draft.newBuilder().build(); + ListDraftsResponse expectedResponse = + ListDraftsResponse.newBuilder() + .setNextPageToken("") + .addAllDrafts(Arrays.asList(responsesElement)) + .build(); + mockAppPlatform.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListDraftsPagedResponse pagedListResponse = client.listDrafts(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getDraftsList().get(0), resources.get(0)); + + List actualRequests = mockAppPlatform.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListDraftsRequest actualRequest = ((ListDraftsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listDraftsExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAppPlatform.addException(exception); + + try { + String parent = "parent-995424086"; + client.listDrafts(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getDraftTest() throws Exception { + Draft expectedResponse = + Draft.newBuilder() + .setName(DraftName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]", "[DRAFT]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setDraftApplicationConfigs(ApplicationConfigs.newBuilder().build()) + .build(); + mockAppPlatform.addResponse(expectedResponse); + + DraftName name = DraftName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]", "[DRAFT]"); + + Draft actualResponse = client.getDraft(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockAppPlatform.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetDraftRequest actualRequest = ((GetDraftRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getDraftExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAppPlatform.addException(exception); + + try { + DraftName name = DraftName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]", "[DRAFT]"); + client.getDraft(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getDraftTest2() throws Exception { + Draft expectedResponse = + Draft.newBuilder() + .setName(DraftName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]", "[DRAFT]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setDraftApplicationConfigs(ApplicationConfigs.newBuilder().build()) + .build(); + mockAppPlatform.addResponse(expectedResponse); + + String name = "name3373707"; + + Draft actualResponse = client.getDraft(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockAppPlatform.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetDraftRequest actualRequest = ((GetDraftRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getDraftExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAppPlatform.addException(exception); + + try { + String name = "name3373707"; + client.getDraft(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createDraftTest() throws Exception { + Draft expectedResponse = + Draft.newBuilder() + .setName(DraftName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]", "[DRAFT]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setDraftApplicationConfigs(ApplicationConfigs.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createDraftTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockAppPlatform.addResponse(resultOperation); + + ApplicationName parent = ApplicationName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]"); + Draft draft = Draft.newBuilder().build(); + String draftId = "draftId1912512156"; + + Draft actualResponse = client.createDraftAsync(parent, draft, draftId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockAppPlatform.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateDraftRequest actualRequest = ((CreateDraftRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(draft, actualRequest.getDraft()); + Assert.assertEquals(draftId, actualRequest.getDraftId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createDraftExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAppPlatform.addException(exception); + + try { + ApplicationName parent = ApplicationName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]"); + Draft draft = Draft.newBuilder().build(); + String draftId = "draftId1912512156"; + client.createDraftAsync(parent, draft, draftId).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()); + } + } + + @Test + public void createDraftTest2() throws Exception { + Draft expectedResponse = + Draft.newBuilder() + .setName(DraftName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]", "[DRAFT]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setDraftApplicationConfigs(ApplicationConfigs.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createDraftTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockAppPlatform.addResponse(resultOperation); + + String parent = "parent-995424086"; + Draft draft = Draft.newBuilder().build(); + String draftId = "draftId1912512156"; + + Draft actualResponse = client.createDraftAsync(parent, draft, draftId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockAppPlatform.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateDraftRequest actualRequest = ((CreateDraftRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(draft, actualRequest.getDraft()); + Assert.assertEquals(draftId, actualRequest.getDraftId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createDraftExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAppPlatform.addException(exception); + + try { + String parent = "parent-995424086"; + Draft draft = Draft.newBuilder().build(); + String draftId = "draftId1912512156"; + client.createDraftAsync(parent, draft, draftId).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()); + } + } + + @Test + public void updateDraftTest() throws Exception { + Draft expectedResponse = + Draft.newBuilder() + .setName(DraftName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]", "[DRAFT]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setDraftApplicationConfigs(ApplicationConfigs.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("updateDraftTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockAppPlatform.addResponse(resultOperation); + + Draft draft = Draft.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + Draft actualResponse = client.updateDraftAsync(draft, updateMask).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockAppPlatform.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpdateDraftRequest actualRequest = ((UpdateDraftRequest) actualRequests.get(0)); + + Assert.assertEquals(draft, actualRequest.getDraft()); + Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void updateDraftExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAppPlatform.addException(exception); + + try { + Draft draft = Draft.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateDraftAsync(draft, updateMask).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()); + } + } + + @Test + public void deleteDraftTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteDraftTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockAppPlatform.addResponse(resultOperation); + + DraftName name = DraftName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]", "[DRAFT]"); + + client.deleteDraftAsync(name).get(); + + List actualRequests = mockAppPlatform.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteDraftRequest actualRequest = ((DeleteDraftRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteDraftExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAppPlatform.addException(exception); + + try { + DraftName name = DraftName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]", "[DRAFT]"); + client.deleteDraftAsync(name).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()); + } + } + + @Test + public void deleteDraftTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteDraftTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockAppPlatform.addResponse(resultOperation); + + String name = "name3373707"; + + client.deleteDraftAsync(name).get(); + + List actualRequests = mockAppPlatform.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteDraftRequest actualRequest = ((DeleteDraftRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteDraftExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAppPlatform.addException(exception); + + try { + String name = "name3373707"; + client.deleteDraftAsync(name).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()); + } + } + + @Test + public void listProcessorsTest() throws Exception { + Processor responsesElement = Processor.newBuilder().build(); + ListProcessorsResponse expectedResponse = + ListProcessorsResponse.newBuilder() + .setNextPageToken("") + .addAllProcessors(Arrays.asList(responsesElement)) + .build(); + mockAppPlatform.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + ListProcessorsPagedResponse pagedListResponse = client.listProcessors(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getProcessorsList().get(0), resources.get(0)); + + List actualRequests = mockAppPlatform.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListProcessorsRequest actualRequest = ((ListProcessorsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listProcessorsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAppPlatform.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + client.listProcessors(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listProcessorsTest2() throws Exception { + Processor responsesElement = Processor.newBuilder().build(); + ListProcessorsResponse expectedResponse = + ListProcessorsResponse.newBuilder() + .setNextPageToken("") + .addAllProcessors(Arrays.asList(responsesElement)) + .build(); + mockAppPlatform.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListProcessorsPagedResponse pagedListResponse = client.listProcessors(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getProcessorsList().get(0), resources.get(0)); + + List actualRequests = mockAppPlatform.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListProcessorsRequest actualRequest = ((ListProcessorsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listProcessorsExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAppPlatform.addException(exception); + + try { + String parent = "parent-995424086"; + client.listProcessors(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listPrebuiltProcessorsTest() throws Exception { + ListPrebuiltProcessorsResponse expectedResponse = + ListPrebuiltProcessorsResponse.newBuilder() + .addAllProcessors(new ArrayList()) + .build(); + mockAppPlatform.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + ListPrebuiltProcessorsResponse actualResponse = client.listPrebuiltProcessors(parent); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockAppPlatform.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListPrebuiltProcessorsRequest actualRequest = + ((ListPrebuiltProcessorsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listPrebuiltProcessorsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAppPlatform.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + client.listPrebuiltProcessors(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listPrebuiltProcessorsTest2() throws Exception { + ListPrebuiltProcessorsResponse expectedResponse = + ListPrebuiltProcessorsResponse.newBuilder() + .addAllProcessors(new ArrayList()) + .build(); + mockAppPlatform.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListPrebuiltProcessorsResponse actualResponse = client.listPrebuiltProcessors(parent); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockAppPlatform.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListPrebuiltProcessorsRequest actualRequest = + ((ListPrebuiltProcessorsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listPrebuiltProcessorsExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAppPlatform.addException(exception); + + try { + String parent = "parent-995424086"; + client.listPrebuiltProcessors(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getProcessorTest() throws Exception { + Processor expectedResponse = + Processor.newBuilder() + .setName(ProcessorName.of("[PROJECT]", "[LOCATION]", "[PROCESSOR]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setModelType(ModelType.forNumber(0)) + .setCustomProcessorSourceInfo(CustomProcessorSourceInfo.newBuilder().build()) + .setProcessorIoSpec(ProcessorIOSpec.newBuilder().build()) + .setConfigurationTypeurl("configurationTypeurl679671327") + .addAllSupportedAnnotationTypes(new ArrayList()) + .setSupportsPostProcessing(true) + .addAllSupportedInstanceTypes(new ArrayList()) + .build(); + mockAppPlatform.addResponse(expectedResponse); + + ProcessorName name = ProcessorName.of("[PROJECT]", "[LOCATION]", "[PROCESSOR]"); + + Processor actualResponse = client.getProcessor(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockAppPlatform.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetProcessorRequest actualRequest = ((GetProcessorRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getProcessorExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAppPlatform.addException(exception); + + try { + ProcessorName name = ProcessorName.of("[PROJECT]", "[LOCATION]", "[PROCESSOR]"); + client.getProcessor(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getProcessorTest2() throws Exception { + Processor expectedResponse = + Processor.newBuilder() + .setName(ProcessorName.of("[PROJECT]", "[LOCATION]", "[PROCESSOR]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setModelType(ModelType.forNumber(0)) + .setCustomProcessorSourceInfo(CustomProcessorSourceInfo.newBuilder().build()) + .setProcessorIoSpec(ProcessorIOSpec.newBuilder().build()) + .setConfigurationTypeurl("configurationTypeurl679671327") + .addAllSupportedAnnotationTypes(new ArrayList()) + .setSupportsPostProcessing(true) + .addAllSupportedInstanceTypes(new ArrayList()) + .build(); + mockAppPlatform.addResponse(expectedResponse); + + String name = "name3373707"; + + Processor actualResponse = client.getProcessor(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockAppPlatform.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetProcessorRequest actualRequest = ((GetProcessorRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getProcessorExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAppPlatform.addException(exception); + + try { + String name = "name3373707"; + client.getProcessor(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createProcessorTest() throws Exception { + Processor expectedResponse = + Processor.newBuilder() + .setName(ProcessorName.of("[PROJECT]", "[LOCATION]", "[PROCESSOR]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setModelType(ModelType.forNumber(0)) + .setCustomProcessorSourceInfo(CustomProcessorSourceInfo.newBuilder().build()) + .setProcessorIoSpec(ProcessorIOSpec.newBuilder().build()) + .setConfigurationTypeurl("configurationTypeurl679671327") + .addAllSupportedAnnotationTypes(new ArrayList()) + .setSupportsPostProcessing(true) + .addAllSupportedInstanceTypes(new ArrayList()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createProcessorTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockAppPlatform.addResponse(resultOperation); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + Processor processor = Processor.newBuilder().build(); + String processorId = "processorId203323725"; + + Processor actualResponse = client.createProcessorAsync(parent, processor, processorId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockAppPlatform.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateProcessorRequest actualRequest = ((CreateProcessorRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(processor, actualRequest.getProcessor()); + Assert.assertEquals(processorId, actualRequest.getProcessorId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createProcessorExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAppPlatform.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + Processor processor = Processor.newBuilder().build(); + String processorId = "processorId203323725"; + client.createProcessorAsync(parent, processor, processorId).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()); + } + } + + @Test + public void createProcessorTest2() throws Exception { + Processor expectedResponse = + Processor.newBuilder() + .setName(ProcessorName.of("[PROJECT]", "[LOCATION]", "[PROCESSOR]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setModelType(ModelType.forNumber(0)) + .setCustomProcessorSourceInfo(CustomProcessorSourceInfo.newBuilder().build()) + .setProcessorIoSpec(ProcessorIOSpec.newBuilder().build()) + .setConfigurationTypeurl("configurationTypeurl679671327") + .addAllSupportedAnnotationTypes(new ArrayList()) + .setSupportsPostProcessing(true) + .addAllSupportedInstanceTypes(new ArrayList()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createProcessorTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockAppPlatform.addResponse(resultOperation); + + String parent = "parent-995424086"; + Processor processor = Processor.newBuilder().build(); + String processorId = "processorId203323725"; + + Processor actualResponse = client.createProcessorAsync(parent, processor, processorId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockAppPlatform.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateProcessorRequest actualRequest = ((CreateProcessorRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(processor, actualRequest.getProcessor()); + Assert.assertEquals(processorId, actualRequest.getProcessorId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createProcessorExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAppPlatform.addException(exception); + + try { + String parent = "parent-995424086"; + Processor processor = Processor.newBuilder().build(); + String processorId = "processorId203323725"; + client.createProcessorAsync(parent, processor, processorId).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()); + } + } + + @Test + public void updateProcessorTest() throws Exception { + Processor expectedResponse = + Processor.newBuilder() + .setName(ProcessorName.of("[PROJECT]", "[LOCATION]", "[PROCESSOR]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setModelType(ModelType.forNumber(0)) + .setCustomProcessorSourceInfo(CustomProcessorSourceInfo.newBuilder().build()) + .setProcessorIoSpec(ProcessorIOSpec.newBuilder().build()) + .setConfigurationTypeurl("configurationTypeurl679671327") + .addAllSupportedAnnotationTypes(new ArrayList()) + .setSupportsPostProcessing(true) + .addAllSupportedInstanceTypes(new ArrayList()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("updateProcessorTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockAppPlatform.addResponse(resultOperation); + + Processor processor = Processor.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + Processor actualResponse = client.updateProcessorAsync(processor, updateMask).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockAppPlatform.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpdateProcessorRequest actualRequest = ((UpdateProcessorRequest) actualRequests.get(0)); + + Assert.assertEquals(processor, actualRequest.getProcessor()); + Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void updateProcessorExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAppPlatform.addException(exception); + + try { + Processor processor = Processor.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateProcessorAsync(processor, updateMask).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()); + } + } + + @Test + public void deleteProcessorTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteProcessorTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockAppPlatform.addResponse(resultOperation); + + ProcessorName name = ProcessorName.of("[PROJECT]", "[LOCATION]", "[PROCESSOR]"); + + client.deleteProcessorAsync(name).get(); + + List actualRequests = mockAppPlatform.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteProcessorRequest actualRequest = ((DeleteProcessorRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteProcessorExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAppPlatform.addException(exception); + + try { + ProcessorName name = ProcessorName.of("[PROJECT]", "[LOCATION]", "[PROCESSOR]"); + client.deleteProcessorAsync(name).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()); + } + } + + @Test + public void deleteProcessorTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteProcessorTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockAppPlatform.addResponse(resultOperation); + + String name = "name3373707"; + + client.deleteProcessorAsync(name).get(); + + List actualRequests = mockAppPlatform.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteProcessorRequest actualRequest = ((DeleteProcessorRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteProcessorExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAppPlatform.addException(exception); + + try { + String name = "name3373707"; + client.deleteProcessorAsync(name).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/java-visionai/google-cloud-visionai/src/test/java/com/google/cloud/visionai/v1/HealthCheckServiceClientHttpJsonTest.java b/java-visionai/google-cloud-visionai/src/test/java/com/google/cloud/visionai/v1/HealthCheckServiceClientHttpJsonTest.java new file mode 100644 index 000000000000..b1d7f4cf9852 --- /dev/null +++ b/java-visionai/google-cloud-visionai/src/test/java/com/google/cloud/visionai/v1/HealthCheckServiceClientHttpJsonTest.java @@ -0,0 +1,125 @@ +/* + * Copyright 2024 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.visionai.v1; + +import com.google.api.gax.core.NoCredentialsProvider; +import com.google.api.gax.httpjson.GaxHttpJsonProperties; +import com.google.api.gax.httpjson.testing.MockHttpService; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ApiException; +import com.google.api.gax.rpc.ApiExceptionFactory; +import com.google.api.gax.rpc.InvalidArgumentException; +import com.google.api.gax.rpc.StatusCode; +import com.google.api.gax.rpc.testing.FakeStatusCode; +import com.google.cloud.visionai.v1.stub.HttpJsonHealthCheckServiceStub; +import java.io.IOException; +import java.util.List; +import javax.annotation.Generated; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +@Generated("by gapic-generator-java") +public class HealthCheckServiceClientHttpJsonTest { + private static MockHttpService mockService; + private static HealthCheckServiceClient client; + + @BeforeClass + public static void startStaticServer() throws IOException { + mockService = + new MockHttpService( + HttpJsonHealthCheckServiceStub.getMethodDescriptors(), + HealthCheckServiceSettings.getDefaultEndpoint()); + HealthCheckServiceSettings settings = + HealthCheckServiceSettings.newHttpJsonBuilder() + .setTransportChannelProvider( + HealthCheckServiceSettings.defaultHttpJsonTransportProviderBuilder() + .setHttpTransport(mockService) + .build()) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = HealthCheckServiceClient.create(settings); + } + + @AfterClass + public static void stopServer() { + client.close(); + } + + @Before + public void setUp() {} + + @After + public void tearDown() throws Exception { + mockService.reset(); + } + + @Test + public void healthCheckTest() throws Exception { + HealthCheckResponse expectedResponse = + HealthCheckResponse.newBuilder() + .setHealthy(true) + .setReason("reason-934964668") + .setClusterInfo(ClusterInfo.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + HealthCheckRequest request = + HealthCheckRequest.newBuilder() + .setCluster(ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString()) + .build(); + + HealthCheckResponse actualResponse = client.healthCheck(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void healthCheckExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + HealthCheckRequest request = + HealthCheckRequest.newBuilder() + .setCluster(ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString()) + .build(); + client.healthCheck(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } +} diff --git a/java-visionai/google-cloud-visionai/src/test/java/com/google/cloud/visionai/v1/HealthCheckServiceClientTest.java b/java-visionai/google-cloud-visionai/src/test/java/com/google/cloud/visionai/v1/HealthCheckServiceClientTest.java new file mode 100644 index 000000000000..71cfc81f97f9 --- /dev/null +++ b/java-visionai/google-cloud-visionai/src/test/java/com/google/cloud/visionai/v1/HealthCheckServiceClientTest.java @@ -0,0 +1,128 @@ +/* + * Copyright 2024 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.visionai.v1; + +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.protobuf.AbstractMessage; +import io.grpc.StatusRuntimeException; +import java.io.IOException; +import java.util.Arrays; +import java.util.List; +import java.util.UUID; +import javax.annotation.Generated; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +@Generated("by gapic-generator-java") +public class HealthCheckServiceClientTest { + private static MockHealthCheckService mockHealthCheckService; + private static MockIAMPolicy mockIAMPolicy; + private static MockLocations mockLocations; + private static MockServiceHelper mockServiceHelper; + private LocalChannelProvider channelProvider; + private HealthCheckServiceClient client; + + @BeforeClass + public static void startStaticServer() { + mockHealthCheckService = new MockHealthCheckService(); + mockLocations = new MockLocations(); + mockIAMPolicy = new MockIAMPolicy(); + mockServiceHelper = + new MockServiceHelper( + UUID.randomUUID().toString(), + Arrays.asList(mockHealthCheckService, mockLocations, mockIAMPolicy)); + mockServiceHelper.start(); + } + + @AfterClass + public static void stopServer() { + mockServiceHelper.stop(); + } + + @Before + public void setUp() throws IOException { + mockServiceHelper.reset(); + channelProvider = mockServiceHelper.createChannelProvider(); + HealthCheckServiceSettings settings = + HealthCheckServiceSettings.newBuilder() + .setTransportChannelProvider(channelProvider) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = HealthCheckServiceClient.create(settings); + } + + @After + public void tearDown() throws Exception { + client.close(); + } + + @Test + public void healthCheckTest() throws Exception { + HealthCheckResponse expectedResponse = + HealthCheckResponse.newBuilder() + .setHealthy(true) + .setReason("reason-934964668") + .setClusterInfo(ClusterInfo.newBuilder().build()) + .build(); + mockHealthCheckService.addResponse(expectedResponse); + + HealthCheckRequest request = + HealthCheckRequest.newBuilder() + .setCluster(ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString()) + .build(); + + HealthCheckResponse actualResponse = client.healthCheck(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockHealthCheckService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + HealthCheckRequest actualRequest = ((HealthCheckRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getCluster(), actualRequest.getCluster()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void healthCheckExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockHealthCheckService.addException(exception); + + try { + HealthCheckRequest request = + HealthCheckRequest.newBuilder() + .setCluster(ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString()) + .build(); + client.healthCheck(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } +} diff --git a/java-visionai/google-cloud-visionai/src/test/java/com/google/cloud/visionai/v1/LiveVideoAnalyticsClientHttpJsonTest.java b/java-visionai/google-cloud-visionai/src/test/java/com/google/cloud/visionai/v1/LiveVideoAnalyticsClientHttpJsonTest.java new file mode 100644 index 000000000000..5b660121115f --- /dev/null +++ b/java-visionai/google-cloud-visionai/src/test/java/com/google/cloud/visionai/v1/LiveVideoAnalyticsClientHttpJsonTest.java @@ -0,0 +1,1873 @@ +/* + * Copyright 2024 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.visionai.v1; + +import static com.google.cloud.visionai.v1.LiveVideoAnalyticsClient.ListAnalysesPagedResponse; +import static com.google.cloud.visionai.v1.LiveVideoAnalyticsClient.ListOperatorsPagedResponse; +import static com.google.cloud.visionai.v1.LiveVideoAnalyticsClient.ListProcessesPagedResponse; +import static com.google.cloud.visionai.v1.LiveVideoAnalyticsClient.ListPublicOperatorsPagedResponse; + +import com.google.api.gax.core.NoCredentialsProvider; +import com.google.api.gax.httpjson.GaxHttpJsonProperties; +import com.google.api.gax.httpjson.testing.MockHttpService; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ApiException; +import com.google.api.gax.rpc.ApiExceptionFactory; +import com.google.api.gax.rpc.InvalidArgumentException; +import com.google.api.gax.rpc.StatusCode; +import com.google.api.gax.rpc.testing.FakeStatusCode; +import com.google.cloud.visionai.v1.stub.HttpJsonLiveVideoAnalyticsStub; +import com.google.common.collect.Lists; +import com.google.longrunning.Operation; +import com.google.protobuf.Any; +import com.google.protobuf.Empty; +import com.google.protobuf.FieldMask; +import com.google.protobuf.Timestamp; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.concurrent.ExecutionException; +import javax.annotation.Generated; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +@Generated("by gapic-generator-java") +public class LiveVideoAnalyticsClientHttpJsonTest { + private static MockHttpService mockService; + private static LiveVideoAnalyticsClient client; + + @BeforeClass + public static void startStaticServer() throws IOException { + mockService = + new MockHttpService( + HttpJsonLiveVideoAnalyticsStub.getMethodDescriptors(), + LiveVideoAnalyticsSettings.getDefaultEndpoint()); + LiveVideoAnalyticsSettings settings = + LiveVideoAnalyticsSettings.newHttpJsonBuilder() + .setTransportChannelProvider( + LiveVideoAnalyticsSettings.defaultHttpJsonTransportProviderBuilder() + .setHttpTransport(mockService) + .build()) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = LiveVideoAnalyticsClient.create(settings); + } + + @AfterClass + public static void stopServer() { + client.close(); + } + + @Before + public void setUp() {} + + @After + public void tearDown() throws Exception { + mockService.reset(); + } + + @Test + public void listPublicOperatorsTest() throws Exception { + Operator responsesElement = Operator.newBuilder().build(); + ListPublicOperatorsResponse expectedResponse = + ListPublicOperatorsResponse.newBuilder() + .setNextPageToken("") + .addAllOperators(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + ListPublicOperatorsPagedResponse pagedListResponse = client.listPublicOperators(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getOperatorsList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listPublicOperatorsExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + client.listPublicOperators(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listPublicOperatorsTest2() throws Exception { + Operator responsesElement = Operator.newBuilder().build(); + ListPublicOperatorsResponse expectedResponse = + ListPublicOperatorsResponse.newBuilder() + .setNextPageToken("") + .addAllOperators(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "projects/project-5833/locations/location-5833"; + + ListPublicOperatorsPagedResponse pagedListResponse = client.listPublicOperators(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getOperatorsList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listPublicOperatorsExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-5833/locations/location-5833"; + client.listPublicOperators(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void resolveOperatorInfoTest() throws Exception { + ResolveOperatorInfoResponse expectedResponse = + ResolveOperatorInfoResponse.newBuilder().addAllOperators(new ArrayList()).build(); + mockService.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + List queries = new ArrayList<>(); + + ResolveOperatorInfoResponse actualResponse = client.resolveOperatorInfo(parent, queries); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void resolveOperatorInfoExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + List queries = new ArrayList<>(); + client.resolveOperatorInfo(parent, queries); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void resolveOperatorInfoTest2() throws Exception { + ResolveOperatorInfoResponse expectedResponse = + ResolveOperatorInfoResponse.newBuilder().addAllOperators(new ArrayList()).build(); + mockService.addResponse(expectedResponse); + + String parent = "projects/project-5833/locations/location-5833"; + List queries = new ArrayList<>(); + + ResolveOperatorInfoResponse actualResponse = client.resolveOperatorInfo(parent, queries); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void resolveOperatorInfoExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-5833/locations/location-5833"; + List queries = new ArrayList<>(); + client.resolveOperatorInfo(parent, queries); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listOperatorsTest() throws Exception { + Operator responsesElement = Operator.newBuilder().build(); + ListOperatorsResponse expectedResponse = + ListOperatorsResponse.newBuilder() + .setNextPageToken("") + .addAllOperators(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + ListOperatorsPagedResponse pagedListResponse = client.listOperators(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getOperatorsList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listOperatorsExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + client.listOperators(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listOperatorsTest2() throws Exception { + Operator responsesElement = Operator.newBuilder().build(); + ListOperatorsResponse expectedResponse = + ListOperatorsResponse.newBuilder() + .setNextPageToken("") + .addAllOperators(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "projects/project-5833/locations/location-5833"; + + ListOperatorsPagedResponse pagedListResponse = client.listOperators(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getOperatorsList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listOperatorsExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-5833/locations/location-5833"; + client.listOperators(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getOperatorTest() throws Exception { + Operator expectedResponse = + Operator.newBuilder() + .setName(OperatorName.of("[PROJECT]", "[LOCATION]", "[OPERATOR]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setOperatorDefinition(OperatorDefinition.newBuilder().build()) + .setDockerImage("dockerImage2086149915") + .build(); + mockService.addResponse(expectedResponse); + + OperatorName name = OperatorName.of("[PROJECT]", "[LOCATION]", "[OPERATOR]"); + + Operator actualResponse = client.getOperator(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getOperatorExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + OperatorName name = OperatorName.of("[PROJECT]", "[LOCATION]", "[OPERATOR]"); + client.getOperator(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getOperatorTest2() throws Exception { + Operator expectedResponse = + Operator.newBuilder() + .setName(OperatorName.of("[PROJECT]", "[LOCATION]", "[OPERATOR]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setOperatorDefinition(OperatorDefinition.newBuilder().build()) + .setDockerImage("dockerImage2086149915") + .build(); + mockService.addResponse(expectedResponse); + + String name = "projects/project-1387/locations/location-1387/operators/operator-1387"; + + Operator actualResponse = client.getOperator(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getOperatorExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "projects/project-1387/locations/location-1387/operators/operator-1387"; + client.getOperator(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createOperatorTest() throws Exception { + Operator expectedResponse = + Operator.newBuilder() + .setName(OperatorName.of("[PROJECT]", "[LOCATION]", "[OPERATOR]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setOperatorDefinition(OperatorDefinition.newBuilder().build()) + .setDockerImage("dockerImage2086149915") + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createOperatorTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + Operator operator = Operator.newBuilder().build(); + String operatorId = "operatorId4364511"; + + Operator actualResponse = client.createOperatorAsync(parent, operator, operatorId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createOperatorExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + Operator operator = Operator.newBuilder().build(); + String operatorId = "operatorId4364511"; + client.createOperatorAsync(parent, operator, operatorId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void createOperatorTest2() throws Exception { + Operator expectedResponse = + Operator.newBuilder() + .setName(OperatorName.of("[PROJECT]", "[LOCATION]", "[OPERATOR]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setOperatorDefinition(OperatorDefinition.newBuilder().build()) + .setDockerImage("dockerImage2086149915") + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createOperatorTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + String parent = "projects/project-5833/locations/location-5833"; + Operator operator = Operator.newBuilder().build(); + String operatorId = "operatorId4364511"; + + Operator actualResponse = client.createOperatorAsync(parent, operator, operatorId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createOperatorExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-5833/locations/location-5833"; + Operator operator = Operator.newBuilder().build(); + String operatorId = "operatorId4364511"; + client.createOperatorAsync(parent, operator, operatorId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void updateOperatorTest() throws Exception { + Operator expectedResponse = + Operator.newBuilder() + .setName(OperatorName.of("[PROJECT]", "[LOCATION]", "[OPERATOR]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setOperatorDefinition(OperatorDefinition.newBuilder().build()) + .setDockerImage("dockerImage2086149915") + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("updateOperatorTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + Operator operator = + Operator.newBuilder() + .setName(OperatorName.of("[PROJECT]", "[LOCATION]", "[OPERATOR]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setOperatorDefinition(OperatorDefinition.newBuilder().build()) + .setDockerImage("dockerImage2086149915") + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + Operator actualResponse = client.updateOperatorAsync(operator, updateMask).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void updateOperatorExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + Operator operator = + Operator.newBuilder() + .setName(OperatorName.of("[PROJECT]", "[LOCATION]", "[OPERATOR]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setOperatorDefinition(OperatorDefinition.newBuilder().build()) + .setDockerImage("dockerImage2086149915") + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateOperatorAsync(operator, updateMask).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void deleteOperatorTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteOperatorTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + OperatorName name = OperatorName.of("[PROJECT]", "[LOCATION]", "[OPERATOR]"); + + client.deleteOperatorAsync(name).get(); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void deleteOperatorExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + OperatorName name = OperatorName.of("[PROJECT]", "[LOCATION]", "[OPERATOR]"); + client.deleteOperatorAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void deleteOperatorTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteOperatorTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + String name = "projects/project-1387/locations/location-1387/operators/operator-1387"; + + client.deleteOperatorAsync(name).get(); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void deleteOperatorExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "projects/project-1387/locations/location-1387/operators/operator-1387"; + client.deleteOperatorAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void listAnalysesTest() throws Exception { + Analysis responsesElement = Analysis.newBuilder().build(); + ListAnalysesResponse expectedResponse = + ListAnalysesResponse.newBuilder() + .setNextPageToken("") + .addAllAnalyses(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + ClusterName parent = ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]"); + + ListAnalysesPagedResponse pagedListResponse = client.listAnalyses(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getAnalysesList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listAnalysesExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ClusterName parent = ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]"); + client.listAnalyses(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listAnalysesTest2() throws Exception { + Analysis responsesElement = Analysis.newBuilder().build(); + ListAnalysesResponse expectedResponse = + ListAnalysesResponse.newBuilder() + .setNextPageToken("") + .addAllAnalyses(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "projects/project-9466/locations/location-9466/clusters/cluster-9466"; + + ListAnalysesPagedResponse pagedListResponse = client.listAnalyses(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getAnalysesList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listAnalysesExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-9466/locations/location-9466/clusters/cluster-9466"; + client.listAnalyses(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getAnalysisTest() throws Exception { + Analysis expectedResponse = + Analysis.newBuilder() + .setName( + AnalysisName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[ANALYSIS]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setAnalysisDefinition(AnalysisDefinition.newBuilder().build()) + .putAllInputStreamsMapping(new HashMap()) + .putAllOutputStreamsMapping(new HashMap()) + .setDisableEventWatch(true) + .build(); + mockService.addResponse(expectedResponse); + + AnalysisName name = AnalysisName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[ANALYSIS]"); + + Analysis actualResponse = client.getAnalysis(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getAnalysisExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + AnalysisName name = AnalysisName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[ANALYSIS]"); + client.getAnalysis(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getAnalysisTest2() throws Exception { + Analysis expectedResponse = + Analysis.newBuilder() + .setName( + AnalysisName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[ANALYSIS]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setAnalysisDefinition(AnalysisDefinition.newBuilder().build()) + .putAllInputStreamsMapping(new HashMap()) + .putAllOutputStreamsMapping(new HashMap()) + .setDisableEventWatch(true) + .build(); + mockService.addResponse(expectedResponse); + + String name = + "projects/project-7631/locations/location-7631/clusters/cluster-7631/analyses/analyse-7631"; + + Analysis actualResponse = client.getAnalysis(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getAnalysisExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = + "projects/project-7631/locations/location-7631/clusters/cluster-7631/analyses/analyse-7631"; + client.getAnalysis(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createAnalysisTest() throws Exception { + Analysis expectedResponse = + Analysis.newBuilder() + .setName( + AnalysisName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[ANALYSIS]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setAnalysisDefinition(AnalysisDefinition.newBuilder().build()) + .putAllInputStreamsMapping(new HashMap()) + .putAllOutputStreamsMapping(new HashMap()) + .setDisableEventWatch(true) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createAnalysisTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + ClusterName parent = ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]"); + Analysis analysis = Analysis.newBuilder().build(); + String analysisId = "analysisId-944835305"; + + Analysis actualResponse = client.createAnalysisAsync(parent, analysis, analysisId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createAnalysisExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ClusterName parent = ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]"); + Analysis analysis = Analysis.newBuilder().build(); + String analysisId = "analysisId-944835305"; + client.createAnalysisAsync(parent, analysis, analysisId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void createAnalysisTest2() throws Exception { + Analysis expectedResponse = + Analysis.newBuilder() + .setName( + AnalysisName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[ANALYSIS]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setAnalysisDefinition(AnalysisDefinition.newBuilder().build()) + .putAllInputStreamsMapping(new HashMap()) + .putAllOutputStreamsMapping(new HashMap()) + .setDisableEventWatch(true) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createAnalysisTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + String parent = "projects/project-9466/locations/location-9466/clusters/cluster-9466"; + Analysis analysis = Analysis.newBuilder().build(); + String analysisId = "analysisId-944835305"; + + Analysis actualResponse = client.createAnalysisAsync(parent, analysis, analysisId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createAnalysisExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-9466/locations/location-9466/clusters/cluster-9466"; + Analysis analysis = Analysis.newBuilder().build(); + String analysisId = "analysisId-944835305"; + client.createAnalysisAsync(parent, analysis, analysisId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void updateAnalysisTest() throws Exception { + Analysis expectedResponse = + Analysis.newBuilder() + .setName( + AnalysisName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[ANALYSIS]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setAnalysisDefinition(AnalysisDefinition.newBuilder().build()) + .putAllInputStreamsMapping(new HashMap()) + .putAllOutputStreamsMapping(new HashMap()) + .setDisableEventWatch(true) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("updateAnalysisTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + Analysis analysis = + Analysis.newBuilder() + .setName( + AnalysisName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[ANALYSIS]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setAnalysisDefinition(AnalysisDefinition.newBuilder().build()) + .putAllInputStreamsMapping(new HashMap()) + .putAllOutputStreamsMapping(new HashMap()) + .setDisableEventWatch(true) + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + Analysis actualResponse = client.updateAnalysisAsync(analysis, updateMask).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void updateAnalysisExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + Analysis analysis = + Analysis.newBuilder() + .setName( + AnalysisName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[ANALYSIS]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setAnalysisDefinition(AnalysisDefinition.newBuilder().build()) + .putAllInputStreamsMapping(new HashMap()) + .putAllOutputStreamsMapping(new HashMap()) + .setDisableEventWatch(true) + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateAnalysisAsync(analysis, updateMask).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void deleteAnalysisTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteAnalysisTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + AnalysisName name = AnalysisName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[ANALYSIS]"); + + client.deleteAnalysisAsync(name).get(); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void deleteAnalysisExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + AnalysisName name = AnalysisName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[ANALYSIS]"); + client.deleteAnalysisAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void deleteAnalysisTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteAnalysisTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + String name = + "projects/project-7631/locations/location-7631/clusters/cluster-7631/analyses/analyse-7631"; + + client.deleteAnalysisAsync(name).get(); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void deleteAnalysisExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = + "projects/project-7631/locations/location-7631/clusters/cluster-7631/analyses/analyse-7631"; + client.deleteAnalysisAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void listProcessesTest() throws Exception { + Process responsesElement = Process.newBuilder().build(); + ListProcessesResponse expectedResponse = + ListProcessesResponse.newBuilder() + .setNextPageToken("") + .addAllProcesses(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + ClusterName parent = ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]"); + + ListProcessesPagedResponse pagedListResponse = client.listProcesses(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getProcessesList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listProcessesExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ClusterName parent = ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]"); + client.listProcesses(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listProcessesTest2() throws Exception { + Process responsesElement = Process.newBuilder().build(); + ListProcessesResponse expectedResponse = + ListProcessesResponse.newBuilder() + .setNextPageToken("") + .addAllProcesses(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "projects/project-9466/locations/location-9466/clusters/cluster-9466"; + + ListProcessesPagedResponse pagedListResponse = client.listProcesses(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getProcessesList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listProcessesExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-9466/locations/location-9466/clusters/cluster-9466"; + client.listProcesses(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getProcessTest() throws Exception { + Process expectedResponse = + Process.newBuilder() + .setName(ProcessName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[PROCESS]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setAnalysis( + AnalysisName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[ANALYSIS]").toString()) + .addAllAttributeOverrides(new ArrayList()) + .setRunStatus(RunStatus.newBuilder().build()) + .setRunMode(RunMode.forNumber(0)) + .setEventId("eventId-1376502443") + .setBatchId("batchId-331744779") + .setRetryCount(-928040776) + .build(); + mockService.addResponse(expectedResponse); + + ProcessName name = ProcessName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[PROCESS]"); + + Process actualResponse = client.getProcess(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getProcessExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ProcessName name = ProcessName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[PROCESS]"); + client.getProcess(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getProcessTest2() throws Exception { + Process expectedResponse = + Process.newBuilder() + .setName(ProcessName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[PROCESS]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setAnalysis( + AnalysisName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[ANALYSIS]").toString()) + .addAllAttributeOverrides(new ArrayList()) + .setRunStatus(RunStatus.newBuilder().build()) + .setRunMode(RunMode.forNumber(0)) + .setEventId("eventId-1376502443") + .setBatchId("batchId-331744779") + .setRetryCount(-928040776) + .build(); + mockService.addResponse(expectedResponse); + + String name = + "projects/project-2622/locations/location-2622/clusters/cluster-2622/processes/processe-2622"; + + Process actualResponse = client.getProcess(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getProcessExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = + "projects/project-2622/locations/location-2622/clusters/cluster-2622/processes/processe-2622"; + client.getProcess(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createProcessTest() throws Exception { + Process expectedResponse = + Process.newBuilder() + .setName(ProcessName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[PROCESS]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setAnalysis( + AnalysisName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[ANALYSIS]").toString()) + .addAllAttributeOverrides(new ArrayList()) + .setRunStatus(RunStatus.newBuilder().build()) + .setRunMode(RunMode.forNumber(0)) + .setEventId("eventId-1376502443") + .setBatchId("batchId-331744779") + .setRetryCount(-928040776) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createProcessTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + ClusterName parent = ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]"); + Process process = Process.newBuilder().build(); + String processId = "processId-1094760470"; + + Process actualResponse = client.createProcessAsync(parent, process, processId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createProcessExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ClusterName parent = ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]"); + Process process = Process.newBuilder().build(); + String processId = "processId-1094760470"; + client.createProcessAsync(parent, process, processId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void createProcessTest2() throws Exception { + Process expectedResponse = + Process.newBuilder() + .setName(ProcessName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[PROCESS]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setAnalysis( + AnalysisName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[ANALYSIS]").toString()) + .addAllAttributeOverrides(new ArrayList()) + .setRunStatus(RunStatus.newBuilder().build()) + .setRunMode(RunMode.forNumber(0)) + .setEventId("eventId-1376502443") + .setBatchId("batchId-331744779") + .setRetryCount(-928040776) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createProcessTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + String parent = "projects/project-9466/locations/location-9466/clusters/cluster-9466"; + Process process = Process.newBuilder().build(); + String processId = "processId-1094760470"; + + Process actualResponse = client.createProcessAsync(parent, process, processId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createProcessExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-9466/locations/location-9466/clusters/cluster-9466"; + Process process = Process.newBuilder().build(); + String processId = "processId-1094760470"; + client.createProcessAsync(parent, process, processId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void updateProcessTest() throws Exception { + Process expectedResponse = + Process.newBuilder() + .setName(ProcessName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[PROCESS]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setAnalysis( + AnalysisName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[ANALYSIS]").toString()) + .addAllAttributeOverrides(new ArrayList()) + .setRunStatus(RunStatus.newBuilder().build()) + .setRunMode(RunMode.forNumber(0)) + .setEventId("eventId-1376502443") + .setBatchId("batchId-331744779") + .setRetryCount(-928040776) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("updateProcessTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + Process process = + Process.newBuilder() + .setName(ProcessName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[PROCESS]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setAnalysis( + AnalysisName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[ANALYSIS]").toString()) + .addAllAttributeOverrides(new ArrayList()) + .setRunStatus(RunStatus.newBuilder().build()) + .setRunMode(RunMode.forNumber(0)) + .setEventId("eventId-1376502443") + .setBatchId("batchId-331744779") + .setRetryCount(-928040776) + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + Process actualResponse = client.updateProcessAsync(process, updateMask).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void updateProcessExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + Process process = + Process.newBuilder() + .setName( + ProcessName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[PROCESS]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setAnalysis( + AnalysisName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[ANALYSIS]").toString()) + .addAllAttributeOverrides(new ArrayList()) + .setRunStatus(RunStatus.newBuilder().build()) + .setRunMode(RunMode.forNumber(0)) + .setEventId("eventId-1376502443") + .setBatchId("batchId-331744779") + .setRetryCount(-928040776) + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateProcessAsync(process, updateMask).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void deleteProcessTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteProcessTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + ProcessName name = ProcessName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[PROCESS]"); + + client.deleteProcessAsync(name).get(); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void deleteProcessExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ProcessName name = ProcessName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[PROCESS]"); + client.deleteProcessAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void deleteProcessTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteProcessTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + String name = + "projects/project-2622/locations/location-2622/clusters/cluster-2622/processes/processe-2622"; + + client.deleteProcessAsync(name).get(); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void deleteProcessExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = + "projects/project-2622/locations/location-2622/clusters/cluster-2622/processes/processe-2622"; + client.deleteProcessAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void batchRunProcessTest() throws Exception { + BatchRunProcessResponse expectedResponse = + BatchRunProcessResponse.newBuilder() + .setBatchId("batchId-331744779") + .addAllProcesses(new ArrayList()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("batchRunProcessTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + ClusterName parent = ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]"); + List requests = new ArrayList<>(); + + BatchRunProcessResponse actualResponse = client.batchRunProcessAsync(parent, requests).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void batchRunProcessExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ClusterName parent = ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]"); + List requests = new ArrayList<>(); + client.batchRunProcessAsync(parent, requests).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void batchRunProcessTest2() throws Exception { + BatchRunProcessResponse expectedResponse = + BatchRunProcessResponse.newBuilder() + .setBatchId("batchId-331744779") + .addAllProcesses(new ArrayList()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("batchRunProcessTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + String parent = "projects/project-9466/locations/location-9466/clusters/cluster-9466"; + List requests = new ArrayList<>(); + + BatchRunProcessResponse actualResponse = client.batchRunProcessAsync(parent, requests).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void batchRunProcessExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-9466/locations/location-9466/clusters/cluster-9466"; + List requests = new ArrayList<>(); + client.batchRunProcessAsync(parent, requests).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } +} diff --git a/java-visionai/google-cloud-visionai/src/test/java/com/google/cloud/visionai/v1/LiveVideoAnalyticsClientTest.java b/java-visionai/google-cloud-visionai/src/test/java/com/google/cloud/visionai/v1/LiveVideoAnalyticsClientTest.java new file mode 100644 index 000000000000..f27044000729 --- /dev/null +++ b/java-visionai/google-cloud-visionai/src/test/java/com/google/cloud/visionai/v1/LiveVideoAnalyticsClientTest.java @@ -0,0 +1,1681 @@ +/* + * Copyright 2024 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.visionai.v1; + +import static com.google.cloud.visionai.v1.LiveVideoAnalyticsClient.ListAnalysesPagedResponse; +import static com.google.cloud.visionai.v1.LiveVideoAnalyticsClient.ListOperatorsPagedResponse; +import static com.google.cloud.visionai.v1.LiveVideoAnalyticsClient.ListProcessesPagedResponse; +import static com.google.cloud.visionai.v1.LiveVideoAnalyticsClient.ListPublicOperatorsPagedResponse; + +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.common.collect.Lists; +import com.google.longrunning.Operation; +import com.google.protobuf.AbstractMessage; +import com.google.protobuf.Any; +import com.google.protobuf.Empty; +import com.google.protobuf.FieldMask; +import com.google.protobuf.Timestamp; +import io.grpc.StatusRuntimeException; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.UUID; +import java.util.concurrent.ExecutionException; +import javax.annotation.Generated; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +@Generated("by gapic-generator-java") +public class LiveVideoAnalyticsClientTest { + private static MockIAMPolicy mockIAMPolicy; + private static MockLiveVideoAnalytics mockLiveVideoAnalytics; + private static MockLocations mockLocations; + private static MockServiceHelper mockServiceHelper; + private LocalChannelProvider channelProvider; + private LiveVideoAnalyticsClient client; + + @BeforeClass + public static void startStaticServer() { + mockLiveVideoAnalytics = new MockLiveVideoAnalytics(); + mockLocations = new MockLocations(); + mockIAMPolicy = new MockIAMPolicy(); + mockServiceHelper = + new MockServiceHelper( + UUID.randomUUID().toString(), + Arrays.asList(mockLiveVideoAnalytics, mockLocations, mockIAMPolicy)); + mockServiceHelper.start(); + } + + @AfterClass + public static void stopServer() { + mockServiceHelper.stop(); + } + + @Before + public void setUp() throws IOException { + mockServiceHelper.reset(); + channelProvider = mockServiceHelper.createChannelProvider(); + LiveVideoAnalyticsSettings settings = + LiveVideoAnalyticsSettings.newBuilder() + .setTransportChannelProvider(channelProvider) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = LiveVideoAnalyticsClient.create(settings); + } + + @After + public void tearDown() throws Exception { + client.close(); + } + + @Test + public void listPublicOperatorsTest() throws Exception { + Operator responsesElement = Operator.newBuilder().build(); + ListPublicOperatorsResponse expectedResponse = + ListPublicOperatorsResponse.newBuilder() + .setNextPageToken("") + .addAllOperators(Arrays.asList(responsesElement)) + .build(); + mockLiveVideoAnalytics.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + ListPublicOperatorsPagedResponse pagedListResponse = client.listPublicOperators(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getOperatorsList().get(0), resources.get(0)); + + List actualRequests = mockLiveVideoAnalytics.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListPublicOperatorsRequest actualRequest = ((ListPublicOperatorsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listPublicOperatorsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockLiveVideoAnalytics.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + client.listPublicOperators(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listPublicOperatorsTest2() throws Exception { + Operator responsesElement = Operator.newBuilder().build(); + ListPublicOperatorsResponse expectedResponse = + ListPublicOperatorsResponse.newBuilder() + .setNextPageToken("") + .addAllOperators(Arrays.asList(responsesElement)) + .build(); + mockLiveVideoAnalytics.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListPublicOperatorsPagedResponse pagedListResponse = client.listPublicOperators(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getOperatorsList().get(0), resources.get(0)); + + List actualRequests = mockLiveVideoAnalytics.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListPublicOperatorsRequest actualRequest = ((ListPublicOperatorsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listPublicOperatorsExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockLiveVideoAnalytics.addException(exception); + + try { + String parent = "parent-995424086"; + client.listPublicOperators(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void resolveOperatorInfoTest() throws Exception { + ResolveOperatorInfoResponse expectedResponse = + ResolveOperatorInfoResponse.newBuilder().addAllOperators(new ArrayList()).build(); + mockLiveVideoAnalytics.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + List queries = new ArrayList<>(); + + ResolveOperatorInfoResponse actualResponse = client.resolveOperatorInfo(parent, queries); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockLiveVideoAnalytics.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ResolveOperatorInfoRequest actualRequest = ((ResolveOperatorInfoRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(queries, actualRequest.getQueriesList()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void resolveOperatorInfoExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockLiveVideoAnalytics.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + List queries = new ArrayList<>(); + client.resolveOperatorInfo(parent, queries); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void resolveOperatorInfoTest2() throws Exception { + ResolveOperatorInfoResponse expectedResponse = + ResolveOperatorInfoResponse.newBuilder().addAllOperators(new ArrayList()).build(); + mockLiveVideoAnalytics.addResponse(expectedResponse); + + String parent = "parent-995424086"; + List queries = new ArrayList<>(); + + ResolveOperatorInfoResponse actualResponse = client.resolveOperatorInfo(parent, queries); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockLiveVideoAnalytics.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ResolveOperatorInfoRequest actualRequest = ((ResolveOperatorInfoRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(queries, actualRequest.getQueriesList()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void resolveOperatorInfoExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockLiveVideoAnalytics.addException(exception); + + try { + String parent = "parent-995424086"; + List queries = new ArrayList<>(); + client.resolveOperatorInfo(parent, queries); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listOperatorsTest() throws Exception { + Operator responsesElement = Operator.newBuilder().build(); + ListOperatorsResponse expectedResponse = + ListOperatorsResponse.newBuilder() + .setNextPageToken("") + .addAllOperators(Arrays.asList(responsesElement)) + .build(); + mockLiveVideoAnalytics.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + ListOperatorsPagedResponse pagedListResponse = client.listOperators(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getOperatorsList().get(0), resources.get(0)); + + List actualRequests = mockLiveVideoAnalytics.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListOperatorsRequest actualRequest = ((ListOperatorsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listOperatorsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockLiveVideoAnalytics.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + client.listOperators(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listOperatorsTest2() throws Exception { + Operator responsesElement = Operator.newBuilder().build(); + ListOperatorsResponse expectedResponse = + ListOperatorsResponse.newBuilder() + .setNextPageToken("") + .addAllOperators(Arrays.asList(responsesElement)) + .build(); + mockLiveVideoAnalytics.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListOperatorsPagedResponse pagedListResponse = client.listOperators(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getOperatorsList().get(0), resources.get(0)); + + List actualRequests = mockLiveVideoAnalytics.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListOperatorsRequest actualRequest = ((ListOperatorsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listOperatorsExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockLiveVideoAnalytics.addException(exception); + + try { + String parent = "parent-995424086"; + client.listOperators(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getOperatorTest() throws Exception { + Operator expectedResponse = + Operator.newBuilder() + .setName(OperatorName.of("[PROJECT]", "[LOCATION]", "[OPERATOR]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setOperatorDefinition(OperatorDefinition.newBuilder().build()) + .setDockerImage("dockerImage2086149915") + .build(); + mockLiveVideoAnalytics.addResponse(expectedResponse); + + OperatorName name = OperatorName.of("[PROJECT]", "[LOCATION]", "[OPERATOR]"); + + Operator actualResponse = client.getOperator(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockLiveVideoAnalytics.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetOperatorRequest actualRequest = ((GetOperatorRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getOperatorExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockLiveVideoAnalytics.addException(exception); + + try { + OperatorName name = OperatorName.of("[PROJECT]", "[LOCATION]", "[OPERATOR]"); + client.getOperator(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getOperatorTest2() throws Exception { + Operator expectedResponse = + Operator.newBuilder() + .setName(OperatorName.of("[PROJECT]", "[LOCATION]", "[OPERATOR]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setOperatorDefinition(OperatorDefinition.newBuilder().build()) + .setDockerImage("dockerImage2086149915") + .build(); + mockLiveVideoAnalytics.addResponse(expectedResponse); + + String name = "name3373707"; + + Operator actualResponse = client.getOperator(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockLiveVideoAnalytics.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetOperatorRequest actualRequest = ((GetOperatorRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getOperatorExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockLiveVideoAnalytics.addException(exception); + + try { + String name = "name3373707"; + client.getOperator(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createOperatorTest() throws Exception { + Operator expectedResponse = + Operator.newBuilder() + .setName(OperatorName.of("[PROJECT]", "[LOCATION]", "[OPERATOR]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setOperatorDefinition(OperatorDefinition.newBuilder().build()) + .setDockerImage("dockerImage2086149915") + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createOperatorTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockLiveVideoAnalytics.addResponse(resultOperation); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + Operator operator = Operator.newBuilder().build(); + String operatorId = "operatorId4364511"; + + Operator actualResponse = client.createOperatorAsync(parent, operator, operatorId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockLiveVideoAnalytics.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateOperatorRequest actualRequest = ((CreateOperatorRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(operator, actualRequest.getOperator()); + Assert.assertEquals(operatorId, actualRequest.getOperatorId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createOperatorExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockLiveVideoAnalytics.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + Operator operator = Operator.newBuilder().build(); + String operatorId = "operatorId4364511"; + client.createOperatorAsync(parent, operator, operatorId).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()); + } + } + + @Test + public void createOperatorTest2() throws Exception { + Operator expectedResponse = + Operator.newBuilder() + .setName(OperatorName.of("[PROJECT]", "[LOCATION]", "[OPERATOR]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setOperatorDefinition(OperatorDefinition.newBuilder().build()) + .setDockerImage("dockerImage2086149915") + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createOperatorTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockLiveVideoAnalytics.addResponse(resultOperation); + + String parent = "parent-995424086"; + Operator operator = Operator.newBuilder().build(); + String operatorId = "operatorId4364511"; + + Operator actualResponse = client.createOperatorAsync(parent, operator, operatorId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockLiveVideoAnalytics.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateOperatorRequest actualRequest = ((CreateOperatorRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(operator, actualRequest.getOperator()); + Assert.assertEquals(operatorId, actualRequest.getOperatorId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createOperatorExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockLiveVideoAnalytics.addException(exception); + + try { + String parent = "parent-995424086"; + Operator operator = Operator.newBuilder().build(); + String operatorId = "operatorId4364511"; + client.createOperatorAsync(parent, operator, operatorId).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()); + } + } + + @Test + public void updateOperatorTest() throws Exception { + Operator expectedResponse = + Operator.newBuilder() + .setName(OperatorName.of("[PROJECT]", "[LOCATION]", "[OPERATOR]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setOperatorDefinition(OperatorDefinition.newBuilder().build()) + .setDockerImage("dockerImage2086149915") + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("updateOperatorTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockLiveVideoAnalytics.addResponse(resultOperation); + + Operator operator = Operator.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + Operator actualResponse = client.updateOperatorAsync(operator, updateMask).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockLiveVideoAnalytics.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpdateOperatorRequest actualRequest = ((UpdateOperatorRequest) actualRequests.get(0)); + + Assert.assertEquals(operator, actualRequest.getOperator()); + Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void updateOperatorExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockLiveVideoAnalytics.addException(exception); + + try { + Operator operator = Operator.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateOperatorAsync(operator, updateMask).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()); + } + } + + @Test + public void deleteOperatorTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteOperatorTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockLiveVideoAnalytics.addResponse(resultOperation); + + OperatorName name = OperatorName.of("[PROJECT]", "[LOCATION]", "[OPERATOR]"); + + client.deleteOperatorAsync(name).get(); + + List actualRequests = mockLiveVideoAnalytics.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteOperatorRequest actualRequest = ((DeleteOperatorRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteOperatorExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockLiveVideoAnalytics.addException(exception); + + try { + OperatorName name = OperatorName.of("[PROJECT]", "[LOCATION]", "[OPERATOR]"); + client.deleteOperatorAsync(name).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()); + } + } + + @Test + public void deleteOperatorTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteOperatorTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockLiveVideoAnalytics.addResponse(resultOperation); + + String name = "name3373707"; + + client.deleteOperatorAsync(name).get(); + + List actualRequests = mockLiveVideoAnalytics.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteOperatorRequest actualRequest = ((DeleteOperatorRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteOperatorExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockLiveVideoAnalytics.addException(exception); + + try { + String name = "name3373707"; + client.deleteOperatorAsync(name).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()); + } + } + + @Test + public void listAnalysesTest() throws Exception { + Analysis responsesElement = Analysis.newBuilder().build(); + ListAnalysesResponse expectedResponse = + ListAnalysesResponse.newBuilder() + .setNextPageToken("") + .addAllAnalyses(Arrays.asList(responsesElement)) + .build(); + mockLiveVideoAnalytics.addResponse(expectedResponse); + + ClusterName parent = ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]"); + + ListAnalysesPagedResponse pagedListResponse = client.listAnalyses(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getAnalysesList().get(0), resources.get(0)); + + List actualRequests = mockLiveVideoAnalytics.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListAnalysesRequest actualRequest = ((ListAnalysesRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listAnalysesExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockLiveVideoAnalytics.addException(exception); + + try { + ClusterName parent = ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]"); + client.listAnalyses(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listAnalysesTest2() throws Exception { + Analysis responsesElement = Analysis.newBuilder().build(); + ListAnalysesResponse expectedResponse = + ListAnalysesResponse.newBuilder() + .setNextPageToken("") + .addAllAnalyses(Arrays.asList(responsesElement)) + .build(); + mockLiveVideoAnalytics.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListAnalysesPagedResponse pagedListResponse = client.listAnalyses(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getAnalysesList().get(0), resources.get(0)); + + List actualRequests = mockLiveVideoAnalytics.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListAnalysesRequest actualRequest = ((ListAnalysesRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listAnalysesExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockLiveVideoAnalytics.addException(exception); + + try { + String parent = "parent-995424086"; + client.listAnalyses(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getAnalysisTest() throws Exception { + Analysis expectedResponse = + Analysis.newBuilder() + .setName( + AnalysisName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[ANALYSIS]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setAnalysisDefinition(AnalysisDefinition.newBuilder().build()) + .putAllInputStreamsMapping(new HashMap()) + .putAllOutputStreamsMapping(new HashMap()) + .setDisableEventWatch(true) + .build(); + mockLiveVideoAnalytics.addResponse(expectedResponse); + + AnalysisName name = AnalysisName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[ANALYSIS]"); + + Analysis actualResponse = client.getAnalysis(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockLiveVideoAnalytics.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetAnalysisRequest actualRequest = ((GetAnalysisRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getAnalysisExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockLiveVideoAnalytics.addException(exception); + + try { + AnalysisName name = AnalysisName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[ANALYSIS]"); + client.getAnalysis(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getAnalysisTest2() throws Exception { + Analysis expectedResponse = + Analysis.newBuilder() + .setName( + AnalysisName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[ANALYSIS]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setAnalysisDefinition(AnalysisDefinition.newBuilder().build()) + .putAllInputStreamsMapping(new HashMap()) + .putAllOutputStreamsMapping(new HashMap()) + .setDisableEventWatch(true) + .build(); + mockLiveVideoAnalytics.addResponse(expectedResponse); + + String name = "name3373707"; + + Analysis actualResponse = client.getAnalysis(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockLiveVideoAnalytics.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetAnalysisRequest actualRequest = ((GetAnalysisRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getAnalysisExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockLiveVideoAnalytics.addException(exception); + + try { + String name = "name3373707"; + client.getAnalysis(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createAnalysisTest() throws Exception { + Analysis expectedResponse = + Analysis.newBuilder() + .setName( + AnalysisName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[ANALYSIS]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setAnalysisDefinition(AnalysisDefinition.newBuilder().build()) + .putAllInputStreamsMapping(new HashMap()) + .putAllOutputStreamsMapping(new HashMap()) + .setDisableEventWatch(true) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createAnalysisTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockLiveVideoAnalytics.addResponse(resultOperation); + + ClusterName parent = ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]"); + Analysis analysis = Analysis.newBuilder().build(); + String analysisId = "analysisId-944835305"; + + Analysis actualResponse = client.createAnalysisAsync(parent, analysis, analysisId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockLiveVideoAnalytics.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateAnalysisRequest actualRequest = ((CreateAnalysisRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(analysis, actualRequest.getAnalysis()); + Assert.assertEquals(analysisId, actualRequest.getAnalysisId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createAnalysisExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockLiveVideoAnalytics.addException(exception); + + try { + ClusterName parent = ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]"); + Analysis analysis = Analysis.newBuilder().build(); + String analysisId = "analysisId-944835305"; + client.createAnalysisAsync(parent, analysis, analysisId).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()); + } + } + + @Test + public void createAnalysisTest2() throws Exception { + Analysis expectedResponse = + Analysis.newBuilder() + .setName( + AnalysisName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[ANALYSIS]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setAnalysisDefinition(AnalysisDefinition.newBuilder().build()) + .putAllInputStreamsMapping(new HashMap()) + .putAllOutputStreamsMapping(new HashMap()) + .setDisableEventWatch(true) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createAnalysisTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockLiveVideoAnalytics.addResponse(resultOperation); + + String parent = "parent-995424086"; + Analysis analysis = Analysis.newBuilder().build(); + String analysisId = "analysisId-944835305"; + + Analysis actualResponse = client.createAnalysisAsync(parent, analysis, analysisId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockLiveVideoAnalytics.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateAnalysisRequest actualRequest = ((CreateAnalysisRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(analysis, actualRequest.getAnalysis()); + Assert.assertEquals(analysisId, actualRequest.getAnalysisId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createAnalysisExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockLiveVideoAnalytics.addException(exception); + + try { + String parent = "parent-995424086"; + Analysis analysis = Analysis.newBuilder().build(); + String analysisId = "analysisId-944835305"; + client.createAnalysisAsync(parent, analysis, analysisId).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()); + } + } + + @Test + public void updateAnalysisTest() throws Exception { + Analysis expectedResponse = + Analysis.newBuilder() + .setName( + AnalysisName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[ANALYSIS]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setAnalysisDefinition(AnalysisDefinition.newBuilder().build()) + .putAllInputStreamsMapping(new HashMap()) + .putAllOutputStreamsMapping(new HashMap()) + .setDisableEventWatch(true) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("updateAnalysisTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockLiveVideoAnalytics.addResponse(resultOperation); + + Analysis analysis = Analysis.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + Analysis actualResponse = client.updateAnalysisAsync(analysis, updateMask).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockLiveVideoAnalytics.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpdateAnalysisRequest actualRequest = ((UpdateAnalysisRequest) actualRequests.get(0)); + + Assert.assertEquals(analysis, actualRequest.getAnalysis()); + Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void updateAnalysisExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockLiveVideoAnalytics.addException(exception); + + try { + Analysis analysis = Analysis.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateAnalysisAsync(analysis, updateMask).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()); + } + } + + @Test + public void deleteAnalysisTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteAnalysisTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockLiveVideoAnalytics.addResponse(resultOperation); + + AnalysisName name = AnalysisName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[ANALYSIS]"); + + client.deleteAnalysisAsync(name).get(); + + List actualRequests = mockLiveVideoAnalytics.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteAnalysisRequest actualRequest = ((DeleteAnalysisRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteAnalysisExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockLiveVideoAnalytics.addException(exception); + + try { + AnalysisName name = AnalysisName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[ANALYSIS]"); + client.deleteAnalysisAsync(name).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()); + } + } + + @Test + public void deleteAnalysisTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteAnalysisTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockLiveVideoAnalytics.addResponse(resultOperation); + + String name = "name3373707"; + + client.deleteAnalysisAsync(name).get(); + + List actualRequests = mockLiveVideoAnalytics.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteAnalysisRequest actualRequest = ((DeleteAnalysisRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteAnalysisExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockLiveVideoAnalytics.addException(exception); + + try { + String name = "name3373707"; + client.deleteAnalysisAsync(name).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()); + } + } + + @Test + public void listProcessesTest() throws Exception { + Process responsesElement = Process.newBuilder().build(); + ListProcessesResponse expectedResponse = + ListProcessesResponse.newBuilder() + .setNextPageToken("") + .addAllProcesses(Arrays.asList(responsesElement)) + .build(); + mockLiveVideoAnalytics.addResponse(expectedResponse); + + ClusterName parent = ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]"); + + ListProcessesPagedResponse pagedListResponse = client.listProcesses(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getProcessesList().get(0), resources.get(0)); + + List actualRequests = mockLiveVideoAnalytics.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListProcessesRequest actualRequest = ((ListProcessesRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listProcessesExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockLiveVideoAnalytics.addException(exception); + + try { + ClusterName parent = ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]"); + client.listProcesses(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listProcessesTest2() throws Exception { + Process responsesElement = Process.newBuilder().build(); + ListProcessesResponse expectedResponse = + ListProcessesResponse.newBuilder() + .setNextPageToken("") + .addAllProcesses(Arrays.asList(responsesElement)) + .build(); + mockLiveVideoAnalytics.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListProcessesPagedResponse pagedListResponse = client.listProcesses(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getProcessesList().get(0), resources.get(0)); + + List actualRequests = mockLiveVideoAnalytics.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListProcessesRequest actualRequest = ((ListProcessesRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listProcessesExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockLiveVideoAnalytics.addException(exception); + + try { + String parent = "parent-995424086"; + client.listProcesses(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getProcessTest() throws Exception { + Process expectedResponse = + Process.newBuilder() + .setName(ProcessName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[PROCESS]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setAnalysis( + AnalysisName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[ANALYSIS]").toString()) + .addAllAttributeOverrides(new ArrayList()) + .setRunStatus(RunStatus.newBuilder().build()) + .setRunMode(RunMode.forNumber(0)) + .setEventId("eventId-1376502443") + .setBatchId("batchId-331744779") + .setRetryCount(-928040776) + .build(); + mockLiveVideoAnalytics.addResponse(expectedResponse); + + ProcessName name = ProcessName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[PROCESS]"); + + Process actualResponse = client.getProcess(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockLiveVideoAnalytics.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetProcessRequest actualRequest = ((GetProcessRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getProcessExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockLiveVideoAnalytics.addException(exception); + + try { + ProcessName name = ProcessName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[PROCESS]"); + client.getProcess(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getProcessTest2() throws Exception { + Process expectedResponse = + Process.newBuilder() + .setName(ProcessName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[PROCESS]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setAnalysis( + AnalysisName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[ANALYSIS]").toString()) + .addAllAttributeOverrides(new ArrayList()) + .setRunStatus(RunStatus.newBuilder().build()) + .setRunMode(RunMode.forNumber(0)) + .setEventId("eventId-1376502443") + .setBatchId("batchId-331744779") + .setRetryCount(-928040776) + .build(); + mockLiveVideoAnalytics.addResponse(expectedResponse); + + String name = "name3373707"; + + Process actualResponse = client.getProcess(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockLiveVideoAnalytics.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetProcessRequest actualRequest = ((GetProcessRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getProcessExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockLiveVideoAnalytics.addException(exception); + + try { + String name = "name3373707"; + client.getProcess(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createProcessTest() throws Exception { + Process expectedResponse = + Process.newBuilder() + .setName(ProcessName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[PROCESS]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setAnalysis( + AnalysisName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[ANALYSIS]").toString()) + .addAllAttributeOverrides(new ArrayList()) + .setRunStatus(RunStatus.newBuilder().build()) + .setRunMode(RunMode.forNumber(0)) + .setEventId("eventId-1376502443") + .setBatchId("batchId-331744779") + .setRetryCount(-928040776) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createProcessTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockLiveVideoAnalytics.addResponse(resultOperation); + + ClusterName parent = ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]"); + Process process = Process.newBuilder().build(); + String processId = "processId-1094760470"; + + Process actualResponse = client.createProcessAsync(parent, process, processId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockLiveVideoAnalytics.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateProcessRequest actualRequest = ((CreateProcessRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(process, actualRequest.getProcess()); + Assert.assertEquals(processId, actualRequest.getProcessId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createProcessExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockLiveVideoAnalytics.addException(exception); + + try { + ClusterName parent = ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]"); + Process process = Process.newBuilder().build(); + String processId = "processId-1094760470"; + client.createProcessAsync(parent, process, processId).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()); + } + } + + @Test + public void createProcessTest2() throws Exception { + Process expectedResponse = + Process.newBuilder() + .setName(ProcessName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[PROCESS]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setAnalysis( + AnalysisName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[ANALYSIS]").toString()) + .addAllAttributeOverrides(new ArrayList()) + .setRunStatus(RunStatus.newBuilder().build()) + .setRunMode(RunMode.forNumber(0)) + .setEventId("eventId-1376502443") + .setBatchId("batchId-331744779") + .setRetryCount(-928040776) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createProcessTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockLiveVideoAnalytics.addResponse(resultOperation); + + String parent = "parent-995424086"; + Process process = Process.newBuilder().build(); + String processId = "processId-1094760470"; + + Process actualResponse = client.createProcessAsync(parent, process, processId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockLiveVideoAnalytics.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateProcessRequest actualRequest = ((CreateProcessRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(process, actualRequest.getProcess()); + Assert.assertEquals(processId, actualRequest.getProcessId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createProcessExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockLiveVideoAnalytics.addException(exception); + + try { + String parent = "parent-995424086"; + Process process = Process.newBuilder().build(); + String processId = "processId-1094760470"; + client.createProcessAsync(parent, process, processId).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()); + } + } + + @Test + public void updateProcessTest() throws Exception { + Process expectedResponse = + Process.newBuilder() + .setName(ProcessName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[PROCESS]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setAnalysis( + AnalysisName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[ANALYSIS]").toString()) + .addAllAttributeOverrides(new ArrayList()) + .setRunStatus(RunStatus.newBuilder().build()) + .setRunMode(RunMode.forNumber(0)) + .setEventId("eventId-1376502443") + .setBatchId("batchId-331744779") + .setRetryCount(-928040776) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("updateProcessTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockLiveVideoAnalytics.addResponse(resultOperation); + + Process process = Process.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + Process actualResponse = client.updateProcessAsync(process, updateMask).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockLiveVideoAnalytics.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpdateProcessRequest actualRequest = ((UpdateProcessRequest) actualRequests.get(0)); + + Assert.assertEquals(process, actualRequest.getProcess()); + Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void updateProcessExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockLiveVideoAnalytics.addException(exception); + + try { + Process process = Process.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateProcessAsync(process, updateMask).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()); + } + } + + @Test + public void deleteProcessTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteProcessTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockLiveVideoAnalytics.addResponse(resultOperation); + + ProcessName name = ProcessName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[PROCESS]"); + + client.deleteProcessAsync(name).get(); + + List actualRequests = mockLiveVideoAnalytics.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteProcessRequest actualRequest = ((DeleteProcessRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteProcessExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockLiveVideoAnalytics.addException(exception); + + try { + ProcessName name = ProcessName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[PROCESS]"); + client.deleteProcessAsync(name).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()); + } + } + + @Test + public void deleteProcessTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteProcessTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockLiveVideoAnalytics.addResponse(resultOperation); + + String name = "name3373707"; + + client.deleteProcessAsync(name).get(); + + List actualRequests = mockLiveVideoAnalytics.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteProcessRequest actualRequest = ((DeleteProcessRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteProcessExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockLiveVideoAnalytics.addException(exception); + + try { + String name = "name3373707"; + client.deleteProcessAsync(name).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()); + } + } + + @Test + public void batchRunProcessTest() throws Exception { + BatchRunProcessResponse expectedResponse = + BatchRunProcessResponse.newBuilder() + .setBatchId("batchId-331744779") + .addAllProcesses(new ArrayList()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("batchRunProcessTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockLiveVideoAnalytics.addResponse(resultOperation); + + ClusterName parent = ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]"); + List requests = new ArrayList<>(); + + BatchRunProcessResponse actualResponse = client.batchRunProcessAsync(parent, requests).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockLiveVideoAnalytics.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + BatchRunProcessRequest actualRequest = ((BatchRunProcessRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(requests, actualRequest.getRequestsList()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void batchRunProcessExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockLiveVideoAnalytics.addException(exception); + + try { + ClusterName parent = ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]"); + List requests = new ArrayList<>(); + client.batchRunProcessAsync(parent, requests).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()); + } + } + + @Test + public void batchRunProcessTest2() throws Exception { + BatchRunProcessResponse expectedResponse = + BatchRunProcessResponse.newBuilder() + .setBatchId("batchId-331744779") + .addAllProcesses(new ArrayList()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("batchRunProcessTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockLiveVideoAnalytics.addResponse(resultOperation); + + String parent = "parent-995424086"; + List requests = new ArrayList<>(); + + BatchRunProcessResponse actualResponse = client.batchRunProcessAsync(parent, requests).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockLiveVideoAnalytics.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + BatchRunProcessRequest actualRequest = ((BatchRunProcessRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(requests, actualRequest.getRequestsList()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void batchRunProcessExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockLiveVideoAnalytics.addException(exception); + + try { + String parent = "parent-995424086"; + List requests = new ArrayList<>(); + client.batchRunProcessAsync(parent, requests).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/java-visionai/google-cloud-visionai/src/test/java/com/google/cloud/visionai/v1/MockAppPlatform.java b/java-visionai/google-cloud-visionai/src/test/java/com/google/cloud/visionai/v1/MockAppPlatform.java new file mode 100644 index 000000000000..fe2bc3dac691 --- /dev/null +++ b/java-visionai/google-cloud-visionai/src/test/java/com/google/cloud/visionai/v1/MockAppPlatform.java @@ -0,0 +1,59 @@ +/* + * Copyright 2024 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.visionai.v1; + +import com.google.api.core.BetaApi; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.protobuf.AbstractMessage; +import io.grpc.ServerServiceDefinition; +import java.util.List; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockAppPlatform implements MockGrpcService { + private final MockAppPlatformImpl serviceImpl; + + public MockAppPlatform() { + serviceImpl = new MockAppPlatformImpl(); + } + + @Override + public List getRequests() { + return serviceImpl.getRequests(); + } + + @Override + public void addResponse(AbstractMessage 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/java-visionai/google-cloud-visionai/src/test/java/com/google/cloud/visionai/v1/MockAppPlatformImpl.java b/java-visionai/google-cloud-visionai/src/test/java/com/google/cloud/visionai/v1/MockAppPlatformImpl.java new file mode 100644 index 000000000000..435b48459b38 --- /dev/null +++ b/java-visionai/google-cloud-visionai/src/test/java/com/google/cloud/visionai/v1/MockAppPlatformImpl.java @@ -0,0 +1,603 @@ +/* + * Copyright 2024 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.visionai.v1; + +import com.google.api.core.BetaApi; +import com.google.cloud.visionai.v1.AppPlatformGrpc.AppPlatformImplBase; +import com.google.longrunning.Operation; +import com.google.protobuf.AbstractMessage; +import io.grpc.stub.StreamObserver; +import java.util.ArrayList; +import java.util.LinkedList; +import java.util.List; +import java.util.Queue; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockAppPlatformImpl extends AppPlatformImplBase { + private List requests; + private Queue responses; + + public MockAppPlatformImpl() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + public List getRequests() { + return requests; + } + + public void addResponse(AbstractMessage 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 listApplications( + ListApplicationsRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListApplicationsResponse) { + requests.add(request); + responseObserver.onNext(((ListApplicationsResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ListApplications, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListApplicationsResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getApplication( + GetApplicationRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Application) { + requests.add(request); + responseObserver.onNext(((Application) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method GetApplication, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Application.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void createApplication( + CreateApplicationRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + 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( + String.format( + "Unrecognized response type %s for method CreateApplication, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void updateApplication( + UpdateApplicationRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + 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( + String.format( + "Unrecognized response type %s for method UpdateApplication, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void deleteApplication( + DeleteApplicationRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + 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( + String.format( + "Unrecognized response type %s for method DeleteApplication, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void deployApplication( + DeployApplicationRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + 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( + String.format( + "Unrecognized response type %s for method DeployApplication, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void undeployApplication( + UndeployApplicationRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + 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( + String.format( + "Unrecognized response type %s for method UndeployApplication, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void addApplicationStreamInput( + AddApplicationStreamInputRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + 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( + String.format( + "Unrecognized response type %s for method AddApplicationStreamInput, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void removeApplicationStreamInput( + RemoveApplicationStreamInputRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + 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( + String.format( + "Unrecognized response type %s for method RemoveApplicationStreamInput, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void updateApplicationStreamInput( + UpdateApplicationStreamInputRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + 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( + String.format( + "Unrecognized response type %s for method UpdateApplicationStreamInput, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listInstances( + ListInstancesRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListInstancesResponse) { + requests.add(request); + responseObserver.onNext(((ListInstancesResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ListInstances, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListInstancesResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getInstance(GetInstanceRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Instance) { + requests.add(request); + responseObserver.onNext(((Instance) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method GetInstance, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Instance.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void createApplicationInstances( + CreateApplicationInstancesRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + 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( + String.format( + "Unrecognized response type %s for method CreateApplicationInstances, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void deleteApplicationInstances( + DeleteApplicationInstancesRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + 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( + String.format( + "Unrecognized response type %s for method DeleteApplicationInstances, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void updateApplicationInstances( + UpdateApplicationInstancesRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + 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( + String.format( + "Unrecognized response type %s for method UpdateApplicationInstances, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listDrafts( + ListDraftsRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListDraftsResponse) { + requests.add(request); + responseObserver.onNext(((ListDraftsResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ListDrafts, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListDraftsResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getDraft(GetDraftRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Draft) { + requests.add(request); + responseObserver.onNext(((Draft) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method GetDraft, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Draft.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void createDraft(CreateDraftRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + 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( + String.format( + "Unrecognized response type %s for method CreateDraft, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void updateDraft(UpdateDraftRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + 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( + String.format( + "Unrecognized response type %s for method UpdateDraft, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void deleteDraft(DeleteDraftRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + 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( + String.format( + "Unrecognized response type %s for method DeleteDraft, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listProcessors( + ListProcessorsRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListProcessorsResponse) { + requests.add(request); + responseObserver.onNext(((ListProcessorsResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ListProcessors, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListProcessorsResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listPrebuiltProcessors( + ListPrebuiltProcessorsRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListPrebuiltProcessorsResponse) { + requests.add(request); + responseObserver.onNext(((ListPrebuiltProcessorsResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ListPrebuiltProcessors, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListPrebuiltProcessorsResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getProcessor( + GetProcessorRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Processor) { + requests.add(request); + responseObserver.onNext(((Processor) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method GetProcessor, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Processor.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void createProcessor( + CreateProcessorRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + 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( + String.format( + "Unrecognized response type %s for method CreateProcessor, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void updateProcessor( + UpdateProcessorRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + 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( + String.format( + "Unrecognized response type %s for method UpdateProcessor, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void deleteProcessor( + DeleteProcessorRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + 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( + String.format( + "Unrecognized response type %s for method DeleteProcessor, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } +} diff --git a/java-visionai/google-cloud-visionai/src/test/java/com/google/cloud/visionai/v1/MockHealthCheckService.java b/java-visionai/google-cloud-visionai/src/test/java/com/google/cloud/visionai/v1/MockHealthCheckService.java new file mode 100644 index 000000000000..f9d3057662c2 --- /dev/null +++ b/java-visionai/google-cloud-visionai/src/test/java/com/google/cloud/visionai/v1/MockHealthCheckService.java @@ -0,0 +1,59 @@ +/* + * Copyright 2024 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.visionai.v1; + +import com.google.api.core.BetaApi; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.protobuf.AbstractMessage; +import io.grpc.ServerServiceDefinition; +import java.util.List; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockHealthCheckService implements MockGrpcService { + private final MockHealthCheckServiceImpl serviceImpl; + + public MockHealthCheckService() { + serviceImpl = new MockHealthCheckServiceImpl(); + } + + @Override + public List getRequests() { + return serviceImpl.getRequests(); + } + + @Override + public void addResponse(AbstractMessage 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/java-visionai/google-cloud-visionai/src/test/java/com/google/cloud/visionai/v1/MockHealthCheckServiceImpl.java b/java-visionai/google-cloud-visionai/src/test/java/com/google/cloud/visionai/v1/MockHealthCheckServiceImpl.java new file mode 100644 index 000000000000..57883e8a209d --- /dev/null +++ b/java-visionai/google-cloud-visionai/src/test/java/com/google/cloud/visionai/v1/MockHealthCheckServiceImpl.java @@ -0,0 +1,81 @@ +/* + * Copyright 2024 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.visionai.v1; + +import com.google.api.core.BetaApi; +import com.google.cloud.visionai.v1.HealthCheckServiceGrpc.HealthCheckServiceImplBase; +import com.google.protobuf.AbstractMessage; +import io.grpc.stub.StreamObserver; +import java.util.ArrayList; +import java.util.LinkedList; +import java.util.List; +import java.util.Queue; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockHealthCheckServiceImpl extends HealthCheckServiceImplBase { + private List requests; + private Queue responses; + + public MockHealthCheckServiceImpl() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + public List getRequests() { + return requests; + } + + public void addResponse(AbstractMessage 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 healthCheck( + HealthCheckRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof HealthCheckResponse) { + requests.add(request); + responseObserver.onNext(((HealthCheckResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method HealthCheck, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + HealthCheckResponse.class.getName(), + Exception.class.getName()))); + } + } +} diff --git a/java-visionai/google-cloud-visionai/src/test/java/com/google/cloud/visionai/v1/MockIAMPolicy.java b/java-visionai/google-cloud-visionai/src/test/java/com/google/cloud/visionai/v1/MockIAMPolicy.java new file mode 100644 index 000000000000..45c84c4cf6ce --- /dev/null +++ b/java-visionai/google-cloud-visionai/src/test/java/com/google/cloud/visionai/v1/MockIAMPolicy.java @@ -0,0 +1,59 @@ +/* + * Copyright 2024 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.visionai.v1; + +import com.google.api.core.BetaApi; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.protobuf.AbstractMessage; +import io.grpc.ServerServiceDefinition; +import java.util.List; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockIAMPolicy implements MockGrpcService { + private final MockIAMPolicyImpl serviceImpl; + + public MockIAMPolicy() { + serviceImpl = new MockIAMPolicyImpl(); + } + + @Override + public List getRequests() { + return serviceImpl.getRequests(); + } + + @Override + public void addResponse(AbstractMessage 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/java-visionai/google-cloud-visionai/src/test/java/com/google/cloud/visionai/v1/MockIAMPolicyImpl.java b/java-visionai/google-cloud-visionai/src/test/java/com/google/cloud/visionai/v1/MockIAMPolicyImpl.java new file mode 100644 index 000000000000..189badebee09 --- /dev/null +++ b/java-visionai/google-cloud-visionai/src/test/java/com/google/cloud/visionai/v1/MockIAMPolicyImpl.java @@ -0,0 +1,59 @@ +/* + * Copyright 2024 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.visionai.v1; + +import com.google.api.core.BetaApi; +import com.google.iam.v1.IAMPolicyGrpc.IAMPolicyImplBase; +import com.google.protobuf.AbstractMessage; +import java.util.ArrayList; +import java.util.LinkedList; +import java.util.List; +import java.util.Queue; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockIAMPolicyImpl extends IAMPolicyImplBase { + private List requests; + private Queue responses; + + public MockIAMPolicyImpl() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + public List getRequests() { + return requests; + } + + public void addResponse(AbstractMessage 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<>(); + } +} diff --git a/java-visionai/google-cloud-visionai/src/test/java/com/google/cloud/visionai/v1/MockLiveVideoAnalytics.java b/java-visionai/google-cloud-visionai/src/test/java/com/google/cloud/visionai/v1/MockLiveVideoAnalytics.java new file mode 100644 index 000000000000..e810470209ed --- /dev/null +++ b/java-visionai/google-cloud-visionai/src/test/java/com/google/cloud/visionai/v1/MockLiveVideoAnalytics.java @@ -0,0 +1,59 @@ +/* + * Copyright 2024 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.visionai.v1; + +import com.google.api.core.BetaApi; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.protobuf.AbstractMessage; +import io.grpc.ServerServiceDefinition; +import java.util.List; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockLiveVideoAnalytics implements MockGrpcService { + private final MockLiveVideoAnalyticsImpl serviceImpl; + + public MockLiveVideoAnalytics() { + serviceImpl = new MockLiveVideoAnalyticsImpl(); + } + + @Override + public List getRequests() { + return serviceImpl.getRequests(); + } + + @Override + public void addResponse(AbstractMessage 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/java-visionai/google-cloud-visionai/src/test/java/com/google/cloud/visionai/v1/MockLiveVideoAnalyticsImpl.java b/java-visionai/google-cloud-visionai/src/test/java/com/google/cloud/visionai/v1/MockLiveVideoAnalyticsImpl.java new file mode 100644 index 000000000000..9b9c83d96a22 --- /dev/null +++ b/java-visionai/google-cloud-visionai/src/test/java/com/google/cloud/visionai/v1/MockLiveVideoAnalyticsImpl.java @@ -0,0 +1,438 @@ +/* + * Copyright 2024 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.visionai.v1; + +import com.google.api.core.BetaApi; +import com.google.cloud.visionai.v1.LiveVideoAnalyticsGrpc.LiveVideoAnalyticsImplBase; +import com.google.longrunning.Operation; +import com.google.protobuf.AbstractMessage; +import io.grpc.stub.StreamObserver; +import java.util.ArrayList; +import java.util.LinkedList; +import java.util.List; +import java.util.Queue; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockLiveVideoAnalyticsImpl extends LiveVideoAnalyticsImplBase { + private List requests; + private Queue responses; + + public MockLiveVideoAnalyticsImpl() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + public List getRequests() { + return requests; + } + + public void addResponse(AbstractMessage 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 listPublicOperators( + ListPublicOperatorsRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListPublicOperatorsResponse) { + requests.add(request); + responseObserver.onNext(((ListPublicOperatorsResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ListPublicOperators, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListPublicOperatorsResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void resolveOperatorInfo( + ResolveOperatorInfoRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ResolveOperatorInfoResponse) { + requests.add(request); + responseObserver.onNext(((ResolveOperatorInfoResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ResolveOperatorInfo, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ResolveOperatorInfoResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listOperators( + ListOperatorsRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListOperatorsResponse) { + requests.add(request); + responseObserver.onNext(((ListOperatorsResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ListOperators, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListOperatorsResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getOperator(GetOperatorRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Operator) { + requests.add(request); + responseObserver.onNext(((Operator) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method GetOperator, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operator.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void createOperator( + CreateOperatorRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + 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( + String.format( + "Unrecognized response type %s for method CreateOperator, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void updateOperator( + UpdateOperatorRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + 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( + String.format( + "Unrecognized response type %s for method UpdateOperator, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void deleteOperator( + DeleteOperatorRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + 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( + String.format( + "Unrecognized response type %s for method DeleteOperator, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listAnalyses( + ListAnalysesRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListAnalysesResponse) { + requests.add(request); + responseObserver.onNext(((ListAnalysesResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ListAnalyses, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListAnalysesResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getAnalysis(GetAnalysisRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Analysis) { + requests.add(request); + responseObserver.onNext(((Analysis) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method GetAnalysis, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Analysis.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void createAnalysis( + CreateAnalysisRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + 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( + String.format( + "Unrecognized response type %s for method CreateAnalysis, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void updateAnalysis( + UpdateAnalysisRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + 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( + String.format( + "Unrecognized response type %s for method UpdateAnalysis, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void deleteAnalysis( + DeleteAnalysisRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + 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( + String.format( + "Unrecognized response type %s for method DeleteAnalysis, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listProcesses( + ListProcessesRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListProcessesResponse) { + requests.add(request); + responseObserver.onNext(((ListProcessesResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ListProcesses, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListProcessesResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getProcess(GetProcessRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Process) { + requests.add(request); + responseObserver.onNext(((Process) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method GetProcess, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Process.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void createProcess( + CreateProcessRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + 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( + String.format( + "Unrecognized response type %s for method CreateProcess, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void updateProcess( + UpdateProcessRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + 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( + String.format( + "Unrecognized response type %s for method UpdateProcess, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void deleteProcess( + DeleteProcessRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + 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( + String.format( + "Unrecognized response type %s for method DeleteProcess, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void batchRunProcess( + BatchRunProcessRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + 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( + String.format( + "Unrecognized response type %s for method BatchRunProcess, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } +} diff --git a/java-visionai/google-cloud-visionai/src/test/java/com/google/cloud/visionai/v1/MockLocations.java b/java-visionai/google-cloud-visionai/src/test/java/com/google/cloud/visionai/v1/MockLocations.java new file mode 100644 index 000000000000..0adbb10bf4ee --- /dev/null +++ b/java-visionai/google-cloud-visionai/src/test/java/com/google/cloud/visionai/v1/MockLocations.java @@ -0,0 +1,59 @@ +/* + * Copyright 2024 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.visionai.v1; + +import com.google.api.core.BetaApi; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.protobuf.AbstractMessage; +import io.grpc.ServerServiceDefinition; +import java.util.List; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockLocations implements MockGrpcService { + private final MockLocationsImpl serviceImpl; + + public MockLocations() { + serviceImpl = new MockLocationsImpl(); + } + + @Override + public List getRequests() { + return serviceImpl.getRequests(); + } + + @Override + public void addResponse(AbstractMessage 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/java-visionai/google-cloud-visionai/src/test/java/com/google/cloud/visionai/v1/MockLocationsImpl.java b/java-visionai/google-cloud-visionai/src/test/java/com/google/cloud/visionai/v1/MockLocationsImpl.java new file mode 100644 index 000000000000..e7386b6497f5 --- /dev/null +++ b/java-visionai/google-cloud-visionai/src/test/java/com/google/cloud/visionai/v1/MockLocationsImpl.java @@ -0,0 +1,59 @@ +/* + * Copyright 2024 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.visionai.v1; + +import com.google.api.core.BetaApi; +import com.google.cloud.location.LocationsGrpc.LocationsImplBase; +import com.google.protobuf.AbstractMessage; +import java.util.ArrayList; +import java.util.LinkedList; +import java.util.List; +import java.util.Queue; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockLocationsImpl extends LocationsImplBase { + private List requests; + private Queue responses; + + public MockLocationsImpl() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + public List getRequests() { + return requests; + } + + public void addResponse(AbstractMessage 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<>(); + } +} diff --git a/java-visionai/google-cloud-visionai/src/test/java/com/google/cloud/visionai/v1/MockStreamingService.java b/java-visionai/google-cloud-visionai/src/test/java/com/google/cloud/visionai/v1/MockStreamingService.java new file mode 100644 index 000000000000..e52385c7b825 --- /dev/null +++ b/java-visionai/google-cloud-visionai/src/test/java/com/google/cloud/visionai/v1/MockStreamingService.java @@ -0,0 +1,59 @@ +/* + * Copyright 2024 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.visionai.v1; + +import com.google.api.core.BetaApi; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.protobuf.AbstractMessage; +import io.grpc.ServerServiceDefinition; +import java.util.List; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockStreamingService implements MockGrpcService { + private final MockStreamingServiceImpl serviceImpl; + + public MockStreamingService() { + serviceImpl = new MockStreamingServiceImpl(); + } + + @Override + public List getRequests() { + return serviceImpl.getRequests(); + } + + @Override + public void addResponse(AbstractMessage 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/java-visionai/google-cloud-visionai/src/test/java/com/google/cloud/visionai/v1/MockStreamingServiceImpl.java b/java-visionai/google-cloud-visionai/src/test/java/com/google/cloud/visionai/v1/MockStreamingServiceImpl.java new file mode 100644 index 000000000000..2a0737179946 --- /dev/null +++ b/java-visionai/google-cloud-visionai/src/test/java/com/google/cloud/visionai/v1/MockStreamingServiceImpl.java @@ -0,0 +1,232 @@ +/* + * Copyright 2024 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.visionai.v1; + +import com.google.api.core.BetaApi; +import com.google.cloud.visionai.v1.StreamingServiceGrpc.StreamingServiceImplBase; +import com.google.protobuf.AbstractMessage; +import io.grpc.stub.StreamObserver; +import java.util.ArrayList; +import java.util.LinkedList; +import java.util.List; +import java.util.Queue; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockStreamingServiceImpl extends StreamingServiceImplBase { + private List requests; + private Queue responses; + + public MockStreamingServiceImpl() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + public List getRequests() { + return requests; + } + + public void addResponse(AbstractMessage 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 sendPackets( + final StreamObserver responseObserver) { + StreamObserver requestObserver = + new StreamObserver() { + @Override + public void onNext(SendPacketsRequest value) { + requests.add(value); + final Object response = responses.remove(); + if (response instanceof SendPacketsResponse) { + responseObserver.onNext(((SendPacketsResponse) response)); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method SendPackets, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + SendPacketsResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void onError(Throwable t) { + responseObserver.onError(t); + } + + @Override + public void onCompleted() { + responseObserver.onCompleted(); + } + }; + return requestObserver; + } + + @Override + public StreamObserver receivePackets( + final StreamObserver responseObserver) { + StreamObserver requestObserver = + new StreamObserver() { + @Override + public void onNext(ReceivePacketsRequest value) { + requests.add(value); + final Object response = responses.remove(); + if (response instanceof ReceivePacketsResponse) { + responseObserver.onNext(((ReceivePacketsResponse) response)); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ReceivePackets, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ReceivePacketsResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void onError(Throwable t) { + responseObserver.onError(t); + } + + @Override + public void onCompleted() { + responseObserver.onCompleted(); + } + }; + return requestObserver; + } + + @Override + public StreamObserver receiveEvents( + final StreamObserver responseObserver) { + StreamObserver requestObserver = + new StreamObserver() { + @Override + public void onNext(ReceiveEventsRequest value) { + requests.add(value); + final Object response = responses.remove(); + if (response instanceof ReceiveEventsResponse) { + responseObserver.onNext(((ReceiveEventsResponse) response)); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ReceiveEvents, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ReceiveEventsResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void onError(Throwable t) { + responseObserver.onError(t); + } + + @Override + public void onCompleted() { + responseObserver.onCompleted(); + } + }; + return requestObserver; + } + + @Override + public void acquireLease(AcquireLeaseRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Lease) { + requests.add(request); + responseObserver.onNext(((Lease) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method AcquireLease, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Lease.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void renewLease(RenewLeaseRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Lease) { + requests.add(request); + responseObserver.onNext(((Lease) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method RenewLease, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Lease.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void releaseLease( + ReleaseLeaseRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ReleaseLeaseResponse) { + requests.add(request); + responseObserver.onNext(((ReleaseLeaseResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ReleaseLease, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ReleaseLeaseResponse.class.getName(), + Exception.class.getName()))); + } + } +} diff --git a/java-visionai/google-cloud-visionai/src/test/java/com/google/cloud/visionai/v1/MockStreamsService.java b/java-visionai/google-cloud-visionai/src/test/java/com/google/cloud/visionai/v1/MockStreamsService.java new file mode 100644 index 000000000000..6984834553f7 --- /dev/null +++ b/java-visionai/google-cloud-visionai/src/test/java/com/google/cloud/visionai/v1/MockStreamsService.java @@ -0,0 +1,59 @@ +/* + * Copyright 2024 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.visionai.v1; + +import com.google.api.core.BetaApi; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.protobuf.AbstractMessage; +import io.grpc.ServerServiceDefinition; +import java.util.List; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockStreamsService implements MockGrpcService { + private final MockStreamsServiceImpl serviceImpl; + + public MockStreamsService() { + serviceImpl = new MockStreamsServiceImpl(); + } + + @Override + public List getRequests() { + return serviceImpl.getRequests(); + } + + @Override + public void addResponse(AbstractMessage 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/java-visionai/google-cloud-visionai/src/test/java/com/google/cloud/visionai/v1/MockStreamsServiceImpl.java b/java-visionai/google-cloud-visionai/src/test/java/com/google/cloud/visionai/v1/MockStreamsServiceImpl.java new file mode 100644 index 000000000000..796e214b0bb7 --- /dev/null +++ b/java-visionai/google-cloud-visionai/src/test/java/com/google/cloud/visionai/v1/MockStreamsServiceImpl.java @@ -0,0 +1,538 @@ +/* + * Copyright 2024 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.visionai.v1; + +import com.google.api.core.BetaApi; +import com.google.cloud.visionai.v1.StreamsServiceGrpc.StreamsServiceImplBase; +import com.google.longrunning.Operation; +import com.google.protobuf.AbstractMessage; +import io.grpc.stub.StreamObserver; +import java.util.ArrayList; +import java.util.LinkedList; +import java.util.List; +import java.util.Queue; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockStreamsServiceImpl extends StreamsServiceImplBase { + private List requests; + private Queue responses; + + public MockStreamsServiceImpl() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + public List getRequests() { + return requests; + } + + public void addResponse(AbstractMessage 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 listClusters( + ListClustersRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListClustersResponse) { + requests.add(request); + responseObserver.onNext(((ListClustersResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ListClusters, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListClustersResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getCluster(GetClusterRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Cluster) { + requests.add(request); + responseObserver.onNext(((Cluster) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method GetCluster, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Cluster.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void createCluster( + CreateClusterRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + 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( + String.format( + "Unrecognized response type %s for method CreateCluster, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void updateCluster( + UpdateClusterRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + 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( + String.format( + "Unrecognized response type %s for method UpdateCluster, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void deleteCluster( + DeleteClusterRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + 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( + String.format( + "Unrecognized response type %s for method DeleteCluster, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listStreams( + ListStreamsRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListStreamsResponse) { + requests.add(request); + responseObserver.onNext(((ListStreamsResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ListStreams, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListStreamsResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getStream(GetStreamRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Stream) { + requests.add(request); + responseObserver.onNext(((Stream) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method GetStream, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Stream.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void createStream( + CreateStreamRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + 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( + String.format( + "Unrecognized response type %s for method CreateStream, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void updateStream( + UpdateStreamRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + 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( + String.format( + "Unrecognized response type %s for method UpdateStream, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void deleteStream( + DeleteStreamRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + 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( + String.format( + "Unrecognized response type %s for method DeleteStream, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getStreamThumbnail( + GetStreamThumbnailRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + 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( + String.format( + "Unrecognized response type %s for method GetStreamThumbnail, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void generateStreamHlsToken( + GenerateStreamHlsTokenRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof GenerateStreamHlsTokenResponse) { + requests.add(request); + responseObserver.onNext(((GenerateStreamHlsTokenResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method GenerateStreamHlsToken, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + GenerateStreamHlsTokenResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listEvents( + ListEventsRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListEventsResponse) { + requests.add(request); + responseObserver.onNext(((ListEventsResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ListEvents, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListEventsResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getEvent(GetEventRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Event) { + requests.add(request); + responseObserver.onNext(((Event) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method GetEvent, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Event.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void createEvent(CreateEventRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + 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( + String.format( + "Unrecognized response type %s for method CreateEvent, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void updateEvent(UpdateEventRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + 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( + String.format( + "Unrecognized response type %s for method UpdateEvent, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void deleteEvent(DeleteEventRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + 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( + String.format( + "Unrecognized response type %s for method DeleteEvent, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listSeries( + ListSeriesRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListSeriesResponse) { + requests.add(request); + responseObserver.onNext(((ListSeriesResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ListSeries, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListSeriesResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getSeries(GetSeriesRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Series) { + requests.add(request); + responseObserver.onNext(((Series) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method GetSeries, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Series.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void createSeries( + CreateSeriesRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + 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( + String.format( + "Unrecognized response type %s for method CreateSeries, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void updateSeries( + UpdateSeriesRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + 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( + String.format( + "Unrecognized response type %s for method UpdateSeries, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void deleteSeries( + DeleteSeriesRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + 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( + String.format( + "Unrecognized response type %s for method DeleteSeries, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void materializeChannel( + MaterializeChannelRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + 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( + String.format( + "Unrecognized response type %s for method MaterializeChannel, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } +} diff --git a/java-visionai/google-cloud-visionai/src/test/java/com/google/cloud/visionai/v1/MockWarehouse.java b/java-visionai/google-cloud-visionai/src/test/java/com/google/cloud/visionai/v1/MockWarehouse.java new file mode 100644 index 000000000000..0fca99f7faa6 --- /dev/null +++ b/java-visionai/google-cloud-visionai/src/test/java/com/google/cloud/visionai/v1/MockWarehouse.java @@ -0,0 +1,59 @@ +/* + * Copyright 2024 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.visionai.v1; + +import com.google.api.core.BetaApi; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.protobuf.AbstractMessage; +import io.grpc.ServerServiceDefinition; +import java.util.List; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockWarehouse implements MockGrpcService { + private final MockWarehouseImpl serviceImpl; + + public MockWarehouse() { + serviceImpl = new MockWarehouseImpl(); + } + + @Override + public List getRequests() { + return serviceImpl.getRequests(); + } + + @Override + public void addResponse(AbstractMessage 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/java-visionai/google-cloud-visionai/src/test/java/com/google/cloud/visionai/v1/MockWarehouseImpl.java b/java-visionai/google-cloud-visionai/src/test/java/com/google/cloud/visionai/v1/MockWarehouseImpl.java new file mode 100644 index 000000000000..b22ddb128059 --- /dev/null +++ b/java-visionai/google-cloud-visionai/src/test/java/com/google/cloud/visionai/v1/MockWarehouseImpl.java @@ -0,0 +1,1396 @@ +/* + * Copyright 2024 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.visionai.v1; + +import com.google.api.core.BetaApi; +import com.google.cloud.visionai.v1.WarehouseGrpc.WarehouseImplBase; +import com.google.longrunning.Operation; +import com.google.protobuf.AbstractMessage; +import com.google.protobuf.Empty; +import io.grpc.stub.StreamObserver; +import java.util.ArrayList; +import java.util.LinkedList; +import java.util.List; +import java.util.Queue; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockWarehouseImpl extends WarehouseImplBase { + private List requests; + private Queue responses; + + public MockWarehouseImpl() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + public List getRequests() { + return requests; + } + + public void addResponse(AbstractMessage 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 createAsset(CreateAssetRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Asset) { + requests.add(request); + responseObserver.onNext(((Asset) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method CreateAsset, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Asset.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void updateAsset(UpdateAssetRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Asset) { + requests.add(request); + responseObserver.onNext(((Asset) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method UpdateAsset, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Asset.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getAsset(GetAssetRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Asset) { + requests.add(request); + responseObserver.onNext(((Asset) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method GetAsset, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Asset.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listAssets( + ListAssetsRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListAssetsResponse) { + requests.add(request); + responseObserver.onNext(((ListAssetsResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ListAssets, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListAssetsResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void deleteAsset(DeleteAssetRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + 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( + String.format( + "Unrecognized response type %s for method DeleteAsset, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void uploadAsset(UploadAssetRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + 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( + String.format( + "Unrecognized response type %s for method UploadAsset, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void generateRetrievalUrl( + GenerateRetrievalUrlRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof GenerateRetrievalUrlResponse) { + requests.add(request); + responseObserver.onNext(((GenerateRetrievalUrlResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method GenerateRetrievalUrl, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + GenerateRetrievalUrlResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void analyzeAsset( + AnalyzeAssetRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + 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( + String.format( + "Unrecognized response type %s for method AnalyzeAsset, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void indexAsset(IndexAssetRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + 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( + String.format( + "Unrecognized response type %s for method IndexAsset, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void removeIndexAsset( + RemoveIndexAssetRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + 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( + String.format( + "Unrecognized response type %s for method RemoveIndexAsset, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void viewIndexedAssets( + ViewIndexedAssetsRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ViewIndexedAssetsResponse) { + requests.add(request); + responseObserver.onNext(((ViewIndexedAssetsResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ViewIndexedAssets, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ViewIndexedAssetsResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void createIndex(CreateIndexRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + 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( + String.format( + "Unrecognized response type %s for method CreateIndex, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void updateIndex(UpdateIndexRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + 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( + String.format( + "Unrecognized response type %s for method UpdateIndex, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getIndex(GetIndexRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Index) { + requests.add(request); + responseObserver.onNext(((Index) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method GetIndex, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Index.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listIndexes( + ListIndexesRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListIndexesResponse) { + requests.add(request); + responseObserver.onNext(((ListIndexesResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ListIndexes, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListIndexesResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void deleteIndex(DeleteIndexRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + 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( + String.format( + "Unrecognized response type %s for method DeleteIndex, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void createCorpus( + CreateCorpusRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + 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( + String.format( + "Unrecognized response type %s for method CreateCorpus, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getCorpus(GetCorpusRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Corpus) { + requests.add(request); + responseObserver.onNext(((Corpus) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method GetCorpus, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Corpus.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void updateCorpus(UpdateCorpusRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Corpus) { + requests.add(request); + responseObserver.onNext(((Corpus) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method UpdateCorpus, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Corpus.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listCorpora( + ListCorporaRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListCorporaResponse) { + requests.add(request); + responseObserver.onNext(((ListCorporaResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ListCorpora, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListCorporaResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void deleteCorpus(DeleteCorpusRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Empty) { + requests.add(request); + responseObserver.onNext(((Empty) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method DeleteCorpus, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Empty.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void analyzeCorpus( + AnalyzeCorpusRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + 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( + String.format( + "Unrecognized response type %s for method AnalyzeCorpus, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void createDataSchema( + CreateDataSchemaRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof DataSchema) { + requests.add(request); + responseObserver.onNext(((DataSchema) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method CreateDataSchema, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + DataSchema.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void updateDataSchema( + UpdateDataSchemaRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof DataSchema) { + requests.add(request); + responseObserver.onNext(((DataSchema) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method UpdateDataSchema, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + DataSchema.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getDataSchema( + GetDataSchemaRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof DataSchema) { + requests.add(request); + responseObserver.onNext(((DataSchema) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method GetDataSchema, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + DataSchema.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void deleteDataSchema( + DeleteDataSchemaRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Empty) { + requests.add(request); + responseObserver.onNext(((Empty) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method DeleteDataSchema, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Empty.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listDataSchemas( + ListDataSchemasRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListDataSchemasResponse) { + requests.add(request); + responseObserver.onNext(((ListDataSchemasResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ListDataSchemas, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListDataSchemasResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void createAnnotation( + CreateAnnotationRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Annotation) { + requests.add(request); + responseObserver.onNext(((Annotation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method CreateAnnotation, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Annotation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getAnnotation( + GetAnnotationRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Annotation) { + requests.add(request); + responseObserver.onNext(((Annotation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method GetAnnotation, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Annotation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listAnnotations( + ListAnnotationsRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListAnnotationsResponse) { + requests.add(request); + responseObserver.onNext(((ListAnnotationsResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ListAnnotations, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListAnnotationsResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void updateAnnotation( + UpdateAnnotationRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Annotation) { + requests.add(request); + responseObserver.onNext(((Annotation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method UpdateAnnotation, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Annotation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void deleteAnnotation( + DeleteAnnotationRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Empty) { + requests.add(request); + responseObserver.onNext(((Empty) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method DeleteAnnotation, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Empty.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public StreamObserver ingestAsset( + final StreamObserver responseObserver) { + StreamObserver requestObserver = + new StreamObserver() { + @Override + public void onNext(IngestAssetRequest value) { + requests.add(value); + final Object response = responses.remove(); + if (response instanceof IngestAssetResponse) { + responseObserver.onNext(((IngestAssetResponse) response)); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method IngestAsset, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + IngestAssetResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void onError(Throwable t) { + responseObserver.onError(t); + } + + @Override + public void onCompleted() { + responseObserver.onCompleted(); + } + }; + return requestObserver; + } + + @Override + public void clipAsset( + ClipAssetRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ClipAssetResponse) { + requests.add(request); + responseObserver.onNext(((ClipAssetResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ClipAsset, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ClipAssetResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void generateHlsUri( + GenerateHlsUriRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof GenerateHlsUriResponse) { + requests.add(request); + responseObserver.onNext(((GenerateHlsUriResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method GenerateHlsUri, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + GenerateHlsUriResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void importAssets( + ImportAssetsRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + 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( + String.format( + "Unrecognized response type %s for method ImportAssets, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void createSearchConfig( + CreateSearchConfigRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof SearchConfig) { + requests.add(request); + responseObserver.onNext(((SearchConfig) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method CreateSearchConfig, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + SearchConfig.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void updateSearchConfig( + UpdateSearchConfigRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof SearchConfig) { + requests.add(request); + responseObserver.onNext(((SearchConfig) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method UpdateSearchConfig, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + SearchConfig.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getSearchConfig( + GetSearchConfigRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof SearchConfig) { + requests.add(request); + responseObserver.onNext(((SearchConfig) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method GetSearchConfig, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + SearchConfig.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void deleteSearchConfig( + DeleteSearchConfigRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Empty) { + requests.add(request); + responseObserver.onNext(((Empty) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method DeleteSearchConfig, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Empty.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listSearchConfigs( + ListSearchConfigsRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListSearchConfigsResponse) { + requests.add(request); + responseObserver.onNext(((ListSearchConfigsResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ListSearchConfigs, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListSearchConfigsResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void createSearchHypernym( + CreateSearchHypernymRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof SearchHypernym) { + requests.add(request); + responseObserver.onNext(((SearchHypernym) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method CreateSearchHypernym, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + SearchHypernym.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void updateSearchHypernym( + UpdateSearchHypernymRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof SearchHypernym) { + requests.add(request); + responseObserver.onNext(((SearchHypernym) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method UpdateSearchHypernym, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + SearchHypernym.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getSearchHypernym( + GetSearchHypernymRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof SearchHypernym) { + requests.add(request); + responseObserver.onNext(((SearchHypernym) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method GetSearchHypernym, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + SearchHypernym.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void deleteSearchHypernym( + DeleteSearchHypernymRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Empty) { + requests.add(request); + responseObserver.onNext(((Empty) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method DeleteSearchHypernym, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Empty.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listSearchHypernyms( + ListSearchHypernymsRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListSearchHypernymsResponse) { + requests.add(request); + responseObserver.onNext(((ListSearchHypernymsResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ListSearchHypernyms, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListSearchHypernymsResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void searchAssets( + SearchAssetsRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof SearchAssetsResponse) { + requests.add(request); + responseObserver.onNext(((SearchAssetsResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method SearchAssets, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + SearchAssetsResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void searchIndexEndpoint( + SearchIndexEndpointRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof SearchIndexEndpointResponse) { + requests.add(request); + responseObserver.onNext(((SearchIndexEndpointResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method SearchIndexEndpoint, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + SearchIndexEndpointResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void createIndexEndpoint( + CreateIndexEndpointRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + 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( + String.format( + "Unrecognized response type %s for method CreateIndexEndpoint, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getIndexEndpoint( + GetIndexEndpointRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof IndexEndpoint) { + requests.add(request); + responseObserver.onNext(((IndexEndpoint) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method GetIndexEndpoint, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + IndexEndpoint.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listIndexEndpoints( + ListIndexEndpointsRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListIndexEndpointsResponse) { + requests.add(request); + responseObserver.onNext(((ListIndexEndpointsResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ListIndexEndpoints, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListIndexEndpointsResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void updateIndexEndpoint( + UpdateIndexEndpointRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + 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( + String.format( + "Unrecognized response type %s for method UpdateIndexEndpoint, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void deleteIndexEndpoint( + DeleteIndexEndpointRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + 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( + String.format( + "Unrecognized response type %s for method DeleteIndexEndpoint, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void deployIndex(DeployIndexRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + 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( + String.format( + "Unrecognized response type %s for method DeployIndex, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void undeployIndex( + UndeployIndexRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + 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( + String.format( + "Unrecognized response type %s for method UndeployIndex, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void createCollection( + CreateCollectionRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + 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( + String.format( + "Unrecognized response type %s for method CreateCollection, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void deleteCollection( + DeleteCollectionRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + 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( + String.format( + "Unrecognized response type %s for method DeleteCollection, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getCollection( + GetCollectionRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Collection) { + requests.add(request); + responseObserver.onNext(((Collection) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method GetCollection, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Collection.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void updateCollection( + UpdateCollectionRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Collection) { + requests.add(request); + responseObserver.onNext(((Collection) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method UpdateCollection, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Collection.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listCollections( + ListCollectionsRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListCollectionsResponse) { + requests.add(request); + responseObserver.onNext(((ListCollectionsResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ListCollections, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListCollectionsResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void addCollectionItem( + AddCollectionItemRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof AddCollectionItemResponse) { + requests.add(request); + responseObserver.onNext(((AddCollectionItemResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method AddCollectionItem, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + AddCollectionItemResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void removeCollectionItem( + RemoveCollectionItemRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof RemoveCollectionItemResponse) { + requests.add(request); + responseObserver.onNext(((RemoveCollectionItemResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method RemoveCollectionItem, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + RemoveCollectionItemResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void viewCollectionItems( + ViewCollectionItemsRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ViewCollectionItemsResponse) { + requests.add(request); + responseObserver.onNext(((ViewCollectionItemsResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ViewCollectionItems, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ViewCollectionItemsResponse.class.getName(), + Exception.class.getName()))); + } + } +} diff --git a/java-visionai/google-cloud-visionai/src/test/java/com/google/cloud/visionai/v1/StreamingServiceClientHttpJsonTest.java b/java-visionai/google-cloud-visionai/src/test/java/com/google/cloud/visionai/v1/StreamingServiceClientHttpJsonTest.java new file mode 100644 index 000000000000..b8bfb4cdffee --- /dev/null +++ b/java-visionai/google-cloud-visionai/src/test/java/com/google/cloud/visionai/v1/StreamingServiceClientHttpJsonTest.java @@ -0,0 +1,270 @@ +/* + * Copyright 2024 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.visionai.v1; + +import com.google.api.gax.core.NoCredentialsProvider; +import com.google.api.gax.httpjson.GaxHttpJsonProperties; +import com.google.api.gax.httpjson.testing.MockHttpService; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ApiException; +import com.google.api.gax.rpc.ApiExceptionFactory; +import com.google.api.gax.rpc.InvalidArgumentException; +import com.google.api.gax.rpc.StatusCode; +import com.google.api.gax.rpc.testing.FakeStatusCode; +import com.google.cloud.visionai.v1.stub.HttpJsonStreamingServiceStub; +import com.google.protobuf.Duration; +import com.google.protobuf.Timestamp; +import java.io.IOException; +import java.util.List; +import javax.annotation.Generated; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +@Generated("by gapic-generator-java") +public class StreamingServiceClientHttpJsonTest { + private static MockHttpService mockService; + private static StreamingServiceClient client; + + @BeforeClass + public static void startStaticServer() throws IOException { + mockService = + new MockHttpService( + HttpJsonStreamingServiceStub.getMethodDescriptors(), + StreamingServiceSettings.getDefaultEndpoint()); + StreamingServiceSettings settings = + StreamingServiceSettings.newHttpJsonBuilder() + .setTransportChannelProvider( + StreamingServiceSettings.defaultHttpJsonTransportProviderBuilder() + .setHttpTransport(mockService) + .build()) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = StreamingServiceClient.create(settings); + } + + @AfterClass + public static void stopServer() { + client.close(); + } + + @Before + public void setUp() {} + + @After + public void tearDown() throws Exception { + mockService.reset(); + } + + @Test + public void sendPacketsUnsupportedMethodTest() throws Exception { + // The sendPackets() method is not supported in REST transport. + // This empty test is generated for technical reasons. + } + + @Test + public void receivePacketsUnsupportedMethodTest() throws Exception { + // The receivePackets() method is not supported in REST transport. + // This empty test is generated for technical reasons. + } + + @Test + public void receiveEventsUnsupportedMethodTest() throws Exception { + // The receiveEvents() method is not supported in REST transport. + // This empty test is generated for technical reasons. + } + + @Test + public void acquireLeaseTest() throws Exception { + Lease expectedResponse = + Lease.newBuilder() + .setId("id3355") + .setSeries("series-905838985") + .setOwner("owner106164915") + .setExpireTime(Timestamp.newBuilder().build()) + .setLeaseType(LeaseType.forNumber(0)) + .build(); + mockService.addResponse(expectedResponse); + + AcquireLeaseRequest request = + AcquireLeaseRequest.newBuilder() + .setSeries( + "projects/project-4804/locations/location-4804/clusters/cluster-4804/series/serie-4804") + .setOwner("owner106164915") + .setTerm(Duration.newBuilder().build()) + .setLeaseType(LeaseType.forNumber(0)) + .build(); + + Lease actualResponse = client.acquireLease(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void acquireLeaseExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + AcquireLeaseRequest request = + AcquireLeaseRequest.newBuilder() + .setSeries( + "projects/project-4804/locations/location-4804/clusters/cluster-4804/series/serie-4804") + .setOwner("owner106164915") + .setTerm(Duration.newBuilder().build()) + .setLeaseType(LeaseType.forNumber(0)) + .build(); + client.acquireLease(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void renewLeaseTest() throws Exception { + Lease expectedResponse = + Lease.newBuilder() + .setId("id3355") + .setSeries("series-905838985") + .setOwner("owner106164915") + .setExpireTime(Timestamp.newBuilder().build()) + .setLeaseType(LeaseType.forNumber(0)) + .build(); + mockService.addResponse(expectedResponse); + + RenewLeaseRequest request = + RenewLeaseRequest.newBuilder() + .setId("id3355") + .setSeries( + "projects/project-4804/locations/location-4804/clusters/cluster-4804/series/serie-4804") + .setOwner("owner106164915") + .setTerm(Duration.newBuilder().build()) + .build(); + + Lease actualResponse = client.renewLease(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void renewLeaseExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + RenewLeaseRequest request = + RenewLeaseRequest.newBuilder() + .setId("id3355") + .setSeries( + "projects/project-4804/locations/location-4804/clusters/cluster-4804/series/serie-4804") + .setOwner("owner106164915") + .setTerm(Duration.newBuilder().build()) + .build(); + client.renewLease(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void releaseLeaseTest() throws Exception { + ReleaseLeaseResponse expectedResponse = ReleaseLeaseResponse.newBuilder().build(); + mockService.addResponse(expectedResponse); + + ReleaseLeaseRequest request = + ReleaseLeaseRequest.newBuilder() + .setId("id3355") + .setSeries( + "projects/project-4804/locations/location-4804/clusters/cluster-4804/series/serie-4804") + .setOwner("owner106164915") + .build(); + + ReleaseLeaseResponse actualResponse = client.releaseLease(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void releaseLeaseExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ReleaseLeaseRequest request = + ReleaseLeaseRequest.newBuilder() + .setId("id3355") + .setSeries( + "projects/project-4804/locations/location-4804/clusters/cluster-4804/series/serie-4804") + .setOwner("owner106164915") + .build(); + client.releaseLease(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } +} diff --git a/java-visionai/google-cloud-visionai/src/test/java/com/google/cloud/visionai/v1/StreamingServiceClientTest.java b/java-visionai/google-cloud-visionai/src/test/java/com/google/cloud/visionai/v1/StreamingServiceClientTest.java new file mode 100644 index 000000000000..e2969db8549b --- /dev/null +++ b/java-visionai/google-cloud-visionai/src/test/java/com/google/cloud/visionai/v1/StreamingServiceClientTest.java @@ -0,0 +1,388 @@ +/* + * Copyright 2024 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.visionai.v1; + +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.grpc.testing.MockStreamObserver; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +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 com.google.protobuf.AbstractMessage; +import com.google.protobuf.Duration; +import com.google.protobuf.Timestamp; +import io.grpc.StatusRuntimeException; +import java.io.IOException; +import java.util.Arrays; +import java.util.List; +import java.util.UUID; +import java.util.concurrent.ExecutionException; +import javax.annotation.Generated; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +@Generated("by gapic-generator-java") +public class StreamingServiceClientTest { + private static MockIAMPolicy mockIAMPolicy; + private static MockLocations mockLocations; + private static MockServiceHelper mockServiceHelper; + private static MockStreamingService mockStreamingService; + private LocalChannelProvider channelProvider; + private StreamingServiceClient client; + + @BeforeClass + public static void startStaticServer() { + mockStreamingService = new MockStreamingService(); + mockLocations = new MockLocations(); + mockIAMPolicy = new MockIAMPolicy(); + mockServiceHelper = + new MockServiceHelper( + UUID.randomUUID().toString(), + Arrays.asList(mockStreamingService, mockLocations, mockIAMPolicy)); + mockServiceHelper.start(); + } + + @AfterClass + public static void stopServer() { + mockServiceHelper.stop(); + } + + @Before + public void setUp() throws IOException { + mockServiceHelper.reset(); + channelProvider = mockServiceHelper.createChannelProvider(); + StreamingServiceSettings settings = + StreamingServiceSettings.newBuilder() + .setTransportChannelProvider(channelProvider) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = StreamingServiceClient.create(settings); + } + + @After + public void tearDown() throws Exception { + client.close(); + } + + @Test + public void sendPacketsTest() throws Exception { + SendPacketsResponse expectedResponse = SendPacketsResponse.newBuilder().build(); + mockStreamingService.addResponse(expectedResponse); + SendPacketsRequest request = SendPacketsRequest.newBuilder().build(); + + MockStreamObserver responseObserver = new MockStreamObserver<>(); + + BidiStreamingCallable callable = + client.sendPacketsCallable(); + 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 + public void sendPacketsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockStreamingService.addException(exception); + SendPacketsRequest request = SendPacketsRequest.newBuilder().build(); + + MockStreamObserver responseObserver = new MockStreamObserver<>(); + + BidiStreamingCallable callable = + client.sendPacketsCallable(); + 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()); + } + } + + @Test + public void receivePacketsTest() throws Exception { + ReceivePacketsResponse expectedResponse = ReceivePacketsResponse.newBuilder().build(); + mockStreamingService.addResponse(expectedResponse); + ReceivePacketsRequest request = ReceivePacketsRequest.newBuilder().build(); + + MockStreamObserver responseObserver = new MockStreamObserver<>(); + + BidiStreamingCallable callable = + client.receivePacketsCallable(); + 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 + public void receivePacketsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockStreamingService.addException(exception); + ReceivePacketsRequest request = ReceivePacketsRequest.newBuilder().build(); + + MockStreamObserver responseObserver = new MockStreamObserver<>(); + + BidiStreamingCallable callable = + client.receivePacketsCallable(); + 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()); + } + } + + @Test + public void receiveEventsTest() throws Exception { + ReceiveEventsResponse expectedResponse = ReceiveEventsResponse.newBuilder().build(); + mockStreamingService.addResponse(expectedResponse); + ReceiveEventsRequest request = ReceiveEventsRequest.newBuilder().build(); + + MockStreamObserver responseObserver = new MockStreamObserver<>(); + + BidiStreamingCallable callable = + client.receiveEventsCallable(); + 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 + public void receiveEventsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockStreamingService.addException(exception); + ReceiveEventsRequest request = ReceiveEventsRequest.newBuilder().build(); + + MockStreamObserver responseObserver = new MockStreamObserver<>(); + + BidiStreamingCallable callable = + client.receiveEventsCallable(); + 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()); + } + } + + @Test + public void acquireLeaseTest() throws Exception { + Lease expectedResponse = + Lease.newBuilder() + .setId("id3355") + .setSeries("series-905838985") + .setOwner("owner106164915") + .setExpireTime(Timestamp.newBuilder().build()) + .setLeaseType(LeaseType.forNumber(0)) + .build(); + mockStreamingService.addResponse(expectedResponse); + + AcquireLeaseRequest request = + AcquireLeaseRequest.newBuilder() + .setSeries("series-905838985") + .setOwner("owner106164915") + .setTerm(Duration.newBuilder().build()) + .setLeaseType(LeaseType.forNumber(0)) + .build(); + + Lease actualResponse = client.acquireLease(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockStreamingService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + AcquireLeaseRequest actualRequest = ((AcquireLeaseRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getSeries(), actualRequest.getSeries()); + Assert.assertEquals(request.getOwner(), actualRequest.getOwner()); + Assert.assertEquals(request.getTerm(), actualRequest.getTerm()); + Assert.assertEquals(request.getLeaseType(), actualRequest.getLeaseType()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void acquireLeaseExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockStreamingService.addException(exception); + + try { + AcquireLeaseRequest request = + AcquireLeaseRequest.newBuilder() + .setSeries("series-905838985") + .setOwner("owner106164915") + .setTerm(Duration.newBuilder().build()) + .setLeaseType(LeaseType.forNumber(0)) + .build(); + client.acquireLease(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void renewLeaseTest() throws Exception { + Lease expectedResponse = + Lease.newBuilder() + .setId("id3355") + .setSeries("series-905838985") + .setOwner("owner106164915") + .setExpireTime(Timestamp.newBuilder().build()) + .setLeaseType(LeaseType.forNumber(0)) + .build(); + mockStreamingService.addResponse(expectedResponse); + + RenewLeaseRequest request = + RenewLeaseRequest.newBuilder() + .setId("id3355") + .setSeries("series-905838985") + .setOwner("owner106164915") + .setTerm(Duration.newBuilder().build()) + .build(); + + Lease actualResponse = client.renewLease(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockStreamingService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + RenewLeaseRequest actualRequest = ((RenewLeaseRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getId(), actualRequest.getId()); + Assert.assertEquals(request.getSeries(), actualRequest.getSeries()); + Assert.assertEquals(request.getOwner(), actualRequest.getOwner()); + Assert.assertEquals(request.getTerm(), actualRequest.getTerm()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void renewLeaseExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockStreamingService.addException(exception); + + try { + RenewLeaseRequest request = + RenewLeaseRequest.newBuilder() + .setId("id3355") + .setSeries("series-905838985") + .setOwner("owner106164915") + .setTerm(Duration.newBuilder().build()) + .build(); + client.renewLease(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void releaseLeaseTest() throws Exception { + ReleaseLeaseResponse expectedResponse = ReleaseLeaseResponse.newBuilder().build(); + mockStreamingService.addResponse(expectedResponse); + + ReleaseLeaseRequest request = + ReleaseLeaseRequest.newBuilder() + .setId("id3355") + .setSeries("series-905838985") + .setOwner("owner106164915") + .build(); + + ReleaseLeaseResponse actualResponse = client.releaseLease(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockStreamingService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ReleaseLeaseRequest actualRequest = ((ReleaseLeaseRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getId(), actualRequest.getId()); + Assert.assertEquals(request.getSeries(), actualRequest.getSeries()); + Assert.assertEquals(request.getOwner(), actualRequest.getOwner()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void releaseLeaseExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockStreamingService.addException(exception); + + try { + ReleaseLeaseRequest request = + ReleaseLeaseRequest.newBuilder() + .setId("id3355") + .setSeries("series-905838985") + .setOwner("owner106164915") + .build(); + client.releaseLease(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } +} diff --git a/java-visionai/google-cloud-visionai/src/test/java/com/google/cloud/visionai/v1/StreamsServiceClientHttpJsonTest.java b/java-visionai/google-cloud-visionai/src/test/java/com/google/cloud/visionai/v1/StreamsServiceClientHttpJsonTest.java new file mode 100644 index 000000000000..d514b5fc1e96 --- /dev/null +++ b/java-visionai/google-cloud-visionai/src/test/java/com/google/cloud/visionai/v1/StreamsServiceClientHttpJsonTest.java @@ -0,0 +1,2249 @@ +/* + * Copyright 2024 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.visionai.v1; + +import static com.google.cloud.visionai.v1.StreamsServiceClient.ListClustersPagedResponse; +import static com.google.cloud.visionai.v1.StreamsServiceClient.ListEventsPagedResponse; +import static com.google.cloud.visionai.v1.StreamsServiceClient.ListSeriesPagedResponse; +import static com.google.cloud.visionai.v1.StreamsServiceClient.ListStreamsPagedResponse; + +import com.google.api.gax.core.NoCredentialsProvider; +import com.google.api.gax.httpjson.GaxHttpJsonProperties; +import com.google.api.gax.httpjson.testing.MockHttpService; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ApiException; +import com.google.api.gax.rpc.ApiExceptionFactory; +import com.google.api.gax.rpc.InvalidArgumentException; +import com.google.api.gax.rpc.StatusCode; +import com.google.api.gax.rpc.testing.FakeStatusCode; +import com.google.cloud.visionai.v1.stub.HttpJsonStreamsServiceStub; +import com.google.common.collect.Lists; +import com.google.longrunning.Operation; +import com.google.protobuf.Any; +import com.google.protobuf.Duration; +import com.google.protobuf.Empty; +import com.google.protobuf.FieldMask; +import com.google.protobuf.Timestamp; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.concurrent.ExecutionException; +import javax.annotation.Generated; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +@Generated("by gapic-generator-java") +public class StreamsServiceClientHttpJsonTest { + private static MockHttpService mockService; + private static StreamsServiceClient client; + + @BeforeClass + public static void startStaticServer() throws IOException { + mockService = + new MockHttpService( + HttpJsonStreamsServiceStub.getMethodDescriptors(), + StreamsServiceSettings.getDefaultEndpoint()); + StreamsServiceSettings settings = + StreamsServiceSettings.newHttpJsonBuilder() + .setTransportChannelProvider( + StreamsServiceSettings.defaultHttpJsonTransportProviderBuilder() + .setHttpTransport(mockService) + .build()) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = StreamsServiceClient.create(settings); + } + + @AfterClass + public static void stopServer() { + client.close(); + } + + @Before + public void setUp() {} + + @After + public void tearDown() throws Exception { + mockService.reset(); + } + + @Test + public void listClustersTest() throws Exception { + Cluster responsesElement = Cluster.newBuilder().build(); + ListClustersResponse expectedResponse = + ListClustersResponse.newBuilder() + .setNextPageToken("") + .addAllClusters(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + ListClustersPagedResponse pagedListResponse = client.listClusters(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getClustersList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listClustersExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + client.listClusters(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listClustersTest2() throws Exception { + Cluster responsesElement = Cluster.newBuilder().build(); + ListClustersResponse expectedResponse = + ListClustersResponse.newBuilder() + .setNextPageToken("") + .addAllClusters(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "projects/project-5833/locations/location-5833"; + + ListClustersPagedResponse pagedListResponse = client.listClusters(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getClustersList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listClustersExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-5833/locations/location-5833"; + client.listClusters(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getClusterTest() throws Exception { + Cluster expectedResponse = + Cluster.newBuilder() + .setName(ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .putAllAnnotations(new HashMap()) + .setDataplaneServiceEndpoint("dataplaneServiceEndpoint-81226728") + .setPscTarget("pscTarget-1845231503") + .build(); + mockService.addResponse(expectedResponse); + + ClusterName name = ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]"); + + Cluster actualResponse = client.getCluster(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getClusterExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ClusterName name = ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]"); + client.getCluster(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getClusterTest2() throws Exception { + Cluster expectedResponse = + Cluster.newBuilder() + .setName(ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .putAllAnnotations(new HashMap()) + .setDataplaneServiceEndpoint("dataplaneServiceEndpoint-81226728") + .setPscTarget("pscTarget-1845231503") + .build(); + mockService.addResponse(expectedResponse); + + String name = "projects/project-6537/locations/location-6537/clusters/cluster-6537"; + + Cluster actualResponse = client.getCluster(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getClusterExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "projects/project-6537/locations/location-6537/clusters/cluster-6537"; + client.getCluster(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createClusterTest() throws Exception { + Cluster expectedResponse = + Cluster.newBuilder() + .setName(ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .putAllAnnotations(new HashMap()) + .setDataplaneServiceEndpoint("dataplaneServiceEndpoint-81226728") + .setPscTarget("pscTarget-1845231503") + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createClusterTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + Cluster cluster = Cluster.newBuilder().build(); + String clusterId = "clusterId561939637"; + + Cluster actualResponse = client.createClusterAsync(parent, cluster, clusterId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createClusterExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + Cluster cluster = Cluster.newBuilder().build(); + String clusterId = "clusterId561939637"; + client.createClusterAsync(parent, cluster, clusterId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void createClusterTest2() throws Exception { + Cluster expectedResponse = + Cluster.newBuilder() + .setName(ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .putAllAnnotations(new HashMap()) + .setDataplaneServiceEndpoint("dataplaneServiceEndpoint-81226728") + .setPscTarget("pscTarget-1845231503") + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createClusterTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + String parent = "projects/project-5833/locations/location-5833"; + Cluster cluster = Cluster.newBuilder().build(); + String clusterId = "clusterId561939637"; + + Cluster actualResponse = client.createClusterAsync(parent, cluster, clusterId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createClusterExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-5833/locations/location-5833"; + Cluster cluster = Cluster.newBuilder().build(); + String clusterId = "clusterId561939637"; + client.createClusterAsync(parent, cluster, clusterId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void updateClusterTest() throws Exception { + Cluster expectedResponse = + Cluster.newBuilder() + .setName(ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .putAllAnnotations(new HashMap()) + .setDataplaneServiceEndpoint("dataplaneServiceEndpoint-81226728") + .setPscTarget("pscTarget-1845231503") + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("updateClusterTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + Cluster cluster = + Cluster.newBuilder() + .setName(ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .putAllAnnotations(new HashMap()) + .setDataplaneServiceEndpoint("dataplaneServiceEndpoint-81226728") + .setPscTarget("pscTarget-1845231503") + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + Cluster actualResponse = client.updateClusterAsync(cluster, updateMask).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void updateClusterExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + Cluster cluster = + Cluster.newBuilder() + .setName(ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .putAllAnnotations(new HashMap()) + .setDataplaneServiceEndpoint("dataplaneServiceEndpoint-81226728") + .setPscTarget("pscTarget-1845231503") + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateClusterAsync(cluster, updateMask).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void deleteClusterTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteClusterTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + ClusterName name = ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]"); + + client.deleteClusterAsync(name).get(); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void deleteClusterExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ClusterName name = ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]"); + client.deleteClusterAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void deleteClusterTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteClusterTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + String name = "projects/project-6537/locations/location-6537/clusters/cluster-6537"; + + client.deleteClusterAsync(name).get(); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void deleteClusterExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "projects/project-6537/locations/location-6537/clusters/cluster-6537"; + client.deleteClusterAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void listStreamsTest() throws Exception { + Stream responsesElement = Stream.newBuilder().build(); + ListStreamsResponse expectedResponse = + ListStreamsResponse.newBuilder() + .setNextPageToken("") + .addAllStreams(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + ClusterName parent = ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]"); + + ListStreamsPagedResponse pagedListResponse = client.listStreams(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getStreamsList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listStreamsExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ClusterName parent = ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]"); + client.listStreams(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listStreamsTest2() throws Exception { + Stream responsesElement = Stream.newBuilder().build(); + ListStreamsResponse expectedResponse = + ListStreamsResponse.newBuilder() + .setNextPageToken("") + .addAllStreams(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "projects/project-9466/locations/location-9466/clusters/cluster-9466"; + + ListStreamsPagedResponse pagedListResponse = client.listStreams(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getStreamsList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listStreamsExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-9466/locations/location-9466/clusters/cluster-9466"; + client.listStreams(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getStreamTest() throws Exception { + Stream expectedResponse = + Stream.newBuilder() + .setName(StreamName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[STREAM]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .putAllAnnotations(new HashMap()) + .setDisplayName("displayName1714148973") + .setEnableHlsPlayback(true) + .setMediaWarehouseAsset("mediaWarehouseAsset-188571919") + .build(); + mockService.addResponse(expectedResponse); + + StreamName name = StreamName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[STREAM]"); + + Stream actualResponse = client.getStream(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getStreamExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + StreamName name = StreamName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[STREAM]"); + client.getStream(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getStreamTest2() throws Exception { + Stream expectedResponse = + Stream.newBuilder() + .setName(StreamName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[STREAM]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .putAllAnnotations(new HashMap()) + .setDisplayName("displayName1714148973") + .setEnableHlsPlayback(true) + .setMediaWarehouseAsset("mediaWarehouseAsset-188571919") + .build(); + mockService.addResponse(expectedResponse); + + String name = + "projects/project-9704/locations/location-9704/clusters/cluster-9704/streams/stream-9704"; + + Stream actualResponse = client.getStream(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getStreamExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = + "projects/project-9704/locations/location-9704/clusters/cluster-9704/streams/stream-9704"; + client.getStream(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createStreamTest() throws Exception { + Stream expectedResponse = + Stream.newBuilder() + .setName(StreamName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[STREAM]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .putAllAnnotations(new HashMap()) + .setDisplayName("displayName1714148973") + .setEnableHlsPlayback(true) + .setMediaWarehouseAsset("mediaWarehouseAsset-188571919") + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createStreamTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + ClusterName parent = ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]"); + Stream stream = Stream.newBuilder().build(); + String streamId = "streamId1790933179"; + + Stream actualResponse = client.createStreamAsync(parent, stream, streamId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createStreamExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ClusterName parent = ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]"); + Stream stream = Stream.newBuilder().build(); + String streamId = "streamId1790933179"; + client.createStreamAsync(parent, stream, streamId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void createStreamTest2() throws Exception { + Stream expectedResponse = + Stream.newBuilder() + .setName(StreamName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[STREAM]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .putAllAnnotations(new HashMap()) + .setDisplayName("displayName1714148973") + .setEnableHlsPlayback(true) + .setMediaWarehouseAsset("mediaWarehouseAsset-188571919") + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createStreamTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + String parent = "projects/project-9466/locations/location-9466/clusters/cluster-9466"; + Stream stream = Stream.newBuilder().build(); + String streamId = "streamId1790933179"; + + Stream actualResponse = client.createStreamAsync(parent, stream, streamId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createStreamExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-9466/locations/location-9466/clusters/cluster-9466"; + Stream stream = Stream.newBuilder().build(); + String streamId = "streamId1790933179"; + client.createStreamAsync(parent, stream, streamId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void updateStreamTest() throws Exception { + Stream expectedResponse = + Stream.newBuilder() + .setName(StreamName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[STREAM]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .putAllAnnotations(new HashMap()) + .setDisplayName("displayName1714148973") + .setEnableHlsPlayback(true) + .setMediaWarehouseAsset("mediaWarehouseAsset-188571919") + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("updateStreamTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + Stream stream = + Stream.newBuilder() + .setName(StreamName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[STREAM]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .putAllAnnotations(new HashMap()) + .setDisplayName("displayName1714148973") + .setEnableHlsPlayback(true) + .setMediaWarehouseAsset("mediaWarehouseAsset-188571919") + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + Stream actualResponse = client.updateStreamAsync(stream, updateMask).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void updateStreamExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + Stream stream = + Stream.newBuilder() + .setName(StreamName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[STREAM]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .putAllAnnotations(new HashMap()) + .setDisplayName("displayName1714148973") + .setEnableHlsPlayback(true) + .setMediaWarehouseAsset("mediaWarehouseAsset-188571919") + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateStreamAsync(stream, updateMask).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void deleteStreamTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteStreamTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + StreamName name = StreamName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[STREAM]"); + + client.deleteStreamAsync(name).get(); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void deleteStreamExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + StreamName name = StreamName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[STREAM]"); + client.deleteStreamAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void deleteStreamTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteStreamTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + String name = + "projects/project-9704/locations/location-9704/clusters/cluster-9704/streams/stream-9704"; + + client.deleteStreamAsync(name).get(); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void deleteStreamExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = + "projects/project-9704/locations/location-9704/clusters/cluster-9704/streams/stream-9704"; + client.deleteStreamAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void getStreamThumbnailTest() throws Exception { + GetStreamThumbnailResponse expectedResponse = GetStreamThumbnailResponse.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("getStreamThumbnailTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + String stream = + "projects/project-4115/locations/location-4115/clusters/cluster-4115/streams/stream-4115"; + String gcsObjectName = "gcsObjectName-1987275551"; + + GetStreamThumbnailResponse actualResponse = + client.getStreamThumbnailAsync(stream, gcsObjectName).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getStreamThumbnailExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String stream = + "projects/project-4115/locations/location-4115/clusters/cluster-4115/streams/stream-4115"; + String gcsObjectName = "gcsObjectName-1987275551"; + client.getStreamThumbnailAsync(stream, gcsObjectName).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void generateStreamHlsTokenTest() throws Exception { + GenerateStreamHlsTokenResponse expectedResponse = + GenerateStreamHlsTokenResponse.newBuilder() + .setToken("token110541305") + .setExpirationTime(Timestamp.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + String stream = + "projects/project-4115/locations/location-4115/clusters/cluster-4115/streams/stream-4115"; + + GenerateStreamHlsTokenResponse actualResponse = client.generateStreamHlsToken(stream); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void generateStreamHlsTokenExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String stream = + "projects/project-4115/locations/location-4115/clusters/cluster-4115/streams/stream-4115"; + client.generateStreamHlsToken(stream); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listEventsTest() throws Exception { + Event responsesElement = Event.newBuilder().build(); + ListEventsResponse expectedResponse = + ListEventsResponse.newBuilder() + .setNextPageToken("") + .addAllEvents(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + ClusterName parent = ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]"); + + ListEventsPagedResponse pagedListResponse = client.listEvents(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getEventsList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listEventsExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ClusterName parent = ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]"); + client.listEvents(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listEventsTest2() throws Exception { + Event responsesElement = Event.newBuilder().build(); + ListEventsResponse expectedResponse = + ListEventsResponse.newBuilder() + .setNextPageToken("") + .addAllEvents(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "projects/project-9466/locations/location-9466/clusters/cluster-9466"; + + ListEventsPagedResponse pagedListResponse = client.listEvents(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getEventsList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listEventsExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-9466/locations/location-9466/clusters/cluster-9466"; + client.listEvents(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getEventTest() throws Exception { + Event expectedResponse = + Event.newBuilder() + .setName(EventName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[EVENT]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .putAllAnnotations(new HashMap()) + .setGracePeriod(Duration.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + EventName name = EventName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[EVENT]"); + + Event actualResponse = client.getEvent(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getEventExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + EventName name = EventName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[EVENT]"); + client.getEvent(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getEventTest2() throws Exception { + Event expectedResponse = + Event.newBuilder() + .setName(EventName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[EVENT]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .putAllAnnotations(new HashMap()) + .setGracePeriod(Duration.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + String name = + "projects/project-8010/locations/location-8010/clusters/cluster-8010/events/event-8010"; + + Event actualResponse = client.getEvent(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getEventExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = + "projects/project-8010/locations/location-8010/clusters/cluster-8010/events/event-8010"; + client.getEvent(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createEventTest() throws Exception { + Event expectedResponse = + Event.newBuilder() + .setName(EventName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[EVENT]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .putAllAnnotations(new HashMap()) + .setGracePeriod(Duration.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createEventTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + ClusterName parent = ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]"); + Event event = Event.newBuilder().build(); + String eventId = "eventId-1376502443"; + + Event actualResponse = client.createEventAsync(parent, event, eventId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createEventExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ClusterName parent = ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]"); + Event event = Event.newBuilder().build(); + String eventId = "eventId-1376502443"; + client.createEventAsync(parent, event, eventId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void createEventTest2() throws Exception { + Event expectedResponse = + Event.newBuilder() + .setName(EventName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[EVENT]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .putAllAnnotations(new HashMap()) + .setGracePeriod(Duration.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createEventTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + String parent = "projects/project-9466/locations/location-9466/clusters/cluster-9466"; + Event event = Event.newBuilder().build(); + String eventId = "eventId-1376502443"; + + Event actualResponse = client.createEventAsync(parent, event, eventId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createEventExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-9466/locations/location-9466/clusters/cluster-9466"; + Event event = Event.newBuilder().build(); + String eventId = "eventId-1376502443"; + client.createEventAsync(parent, event, eventId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void updateEventTest() throws Exception { + Event expectedResponse = + Event.newBuilder() + .setName(EventName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[EVENT]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .putAllAnnotations(new HashMap()) + .setGracePeriod(Duration.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("updateEventTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + Event event = + Event.newBuilder() + .setName(EventName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[EVENT]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .putAllAnnotations(new HashMap()) + .setGracePeriod(Duration.newBuilder().build()) + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + Event actualResponse = client.updateEventAsync(event, updateMask).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void updateEventExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + Event event = + Event.newBuilder() + .setName(EventName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[EVENT]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .putAllAnnotations(new HashMap()) + .setGracePeriod(Duration.newBuilder().build()) + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateEventAsync(event, updateMask).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void deleteEventTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteEventTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + EventName name = EventName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[EVENT]"); + + client.deleteEventAsync(name).get(); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void deleteEventExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + EventName name = EventName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[EVENT]"); + client.deleteEventAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void deleteEventTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteEventTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + String name = + "projects/project-8010/locations/location-8010/clusters/cluster-8010/events/event-8010"; + + client.deleteEventAsync(name).get(); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void deleteEventExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = + "projects/project-8010/locations/location-8010/clusters/cluster-8010/events/event-8010"; + client.deleteEventAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void listSeriesTest() throws Exception { + Series responsesElement = Series.newBuilder().build(); + ListSeriesResponse expectedResponse = + ListSeriesResponse.newBuilder() + .setNextPageToken("") + .addAllSeries(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + ClusterName parent = ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]"); + + ListSeriesPagedResponse pagedListResponse = client.listSeries(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getSeriesList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listSeriesExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ClusterName parent = ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]"); + client.listSeries(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listSeriesTest2() throws Exception { + Series responsesElement = Series.newBuilder().build(); + ListSeriesResponse expectedResponse = + ListSeriesResponse.newBuilder() + .setNextPageToken("") + .addAllSeries(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "projects/project-9466/locations/location-9466/clusters/cluster-9466"; + + ListSeriesPagedResponse pagedListResponse = client.listSeries(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getSeriesList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listSeriesExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-9466/locations/location-9466/clusters/cluster-9466"; + client.listSeries(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getSeriesTest() throws Exception { + Series expectedResponse = + Series.newBuilder() + .setName(SeriesName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[SERIES]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .putAllAnnotations(new HashMap()) + .setStream(StreamName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[STREAM]").toString()) + .setEvent(EventName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[EVENT]").toString()) + .build(); + mockService.addResponse(expectedResponse); + + SeriesName name = SeriesName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[SERIES]"); + + Series actualResponse = client.getSeries(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getSeriesExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + SeriesName name = SeriesName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[SERIES]"); + client.getSeries(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getSeriesTest2() throws Exception { + Series expectedResponse = + Series.newBuilder() + .setName(SeriesName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[SERIES]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .putAllAnnotations(new HashMap()) + .setStream(StreamName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[STREAM]").toString()) + .setEvent(EventName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[EVENT]").toString()) + .build(); + mockService.addResponse(expectedResponse); + + String name = + "projects/project-7272/locations/location-7272/clusters/cluster-7272/series/serie-7272"; + + Series actualResponse = client.getSeries(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getSeriesExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = + "projects/project-7272/locations/location-7272/clusters/cluster-7272/series/serie-7272"; + client.getSeries(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createSeriesTest() throws Exception { + Series expectedResponse = + Series.newBuilder() + .setName(SeriesName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[SERIES]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .putAllAnnotations(new HashMap()) + .setStream(StreamName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[STREAM]").toString()) + .setEvent(EventName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[EVENT]").toString()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createSeriesTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + ClusterName parent = ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]"); + Series series = Series.newBuilder().build(); + String seriesId = "seriesId1367098866"; + + Series actualResponse = client.createSeriesAsync(parent, series, seriesId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createSeriesExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ClusterName parent = ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]"); + Series series = Series.newBuilder().build(); + String seriesId = "seriesId1367098866"; + client.createSeriesAsync(parent, series, seriesId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void createSeriesTest2() throws Exception { + Series expectedResponse = + Series.newBuilder() + .setName(SeriesName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[SERIES]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .putAllAnnotations(new HashMap()) + .setStream(StreamName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[STREAM]").toString()) + .setEvent(EventName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[EVENT]").toString()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createSeriesTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + String parent = "projects/project-9466/locations/location-9466/clusters/cluster-9466"; + Series series = Series.newBuilder().build(); + String seriesId = "seriesId1367098866"; + + Series actualResponse = client.createSeriesAsync(parent, series, seriesId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createSeriesExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-9466/locations/location-9466/clusters/cluster-9466"; + Series series = Series.newBuilder().build(); + String seriesId = "seriesId1367098866"; + client.createSeriesAsync(parent, series, seriesId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void updateSeriesTest() throws Exception { + Series expectedResponse = + Series.newBuilder() + .setName(SeriesName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[SERIES]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .putAllAnnotations(new HashMap()) + .setStream(StreamName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[STREAM]").toString()) + .setEvent(EventName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[EVENT]").toString()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("updateSeriesTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + Series series = + Series.newBuilder() + .setName(SeriesName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[SERIES]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .putAllAnnotations(new HashMap()) + .setStream(StreamName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[STREAM]").toString()) + .setEvent(EventName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[EVENT]").toString()) + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + Series actualResponse = client.updateSeriesAsync(series, updateMask).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void updateSeriesExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + Series series = + Series.newBuilder() + .setName(SeriesName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[SERIES]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .putAllAnnotations(new HashMap()) + .setStream( + StreamName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[STREAM]").toString()) + .setEvent(EventName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[EVENT]").toString()) + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateSeriesAsync(series, updateMask).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void deleteSeriesTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteSeriesTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + SeriesName name = SeriesName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[SERIES]"); + + client.deleteSeriesAsync(name).get(); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void deleteSeriesExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + SeriesName name = SeriesName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[SERIES]"); + client.deleteSeriesAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void deleteSeriesTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteSeriesTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + String name = + "projects/project-7272/locations/location-7272/clusters/cluster-7272/series/serie-7272"; + + client.deleteSeriesAsync(name).get(); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void deleteSeriesExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = + "projects/project-7272/locations/location-7272/clusters/cluster-7272/series/serie-7272"; + client.deleteSeriesAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void materializeChannelTest() throws Exception { + Channel expectedResponse = + Channel.newBuilder() + .setName("name3373707") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .putAllAnnotations(new HashMap()) + .setStream(StreamName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[STREAM]").toString()) + .setEvent(EventName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[EVENT]").toString()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("materializeChannelTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + ClusterName parent = ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]"); + Channel channel = Channel.newBuilder().build(); + String channelId = "channelId1461735806"; + + Channel actualResponse = client.materializeChannelAsync(parent, channel, channelId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void materializeChannelExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ClusterName parent = ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]"); + Channel channel = Channel.newBuilder().build(); + String channelId = "channelId1461735806"; + client.materializeChannelAsync(parent, channel, channelId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void materializeChannelTest2() throws Exception { + Channel expectedResponse = + Channel.newBuilder() + .setName("name3373707") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .putAllAnnotations(new HashMap()) + .setStream(StreamName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[STREAM]").toString()) + .setEvent(EventName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[EVENT]").toString()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("materializeChannelTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + String parent = "projects/project-9466/locations/location-9466/clusters/cluster-9466"; + Channel channel = Channel.newBuilder().build(); + String channelId = "channelId1461735806"; + + Channel actualResponse = client.materializeChannelAsync(parent, channel, channelId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void materializeChannelExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-9466/locations/location-9466/clusters/cluster-9466"; + Channel channel = Channel.newBuilder().build(); + String channelId = "channelId1461735806"; + client.materializeChannelAsync(parent, channel, channelId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } +} diff --git a/java-visionai/google-cloud-visionai/src/test/java/com/google/cloud/visionai/v1/StreamsServiceClientTest.java b/java-visionai/google-cloud-visionai/src/test/java/com/google/cloud/visionai/v1/StreamsServiceClientTest.java new file mode 100644 index 000000000000..1035deb244d1 --- /dev/null +++ b/java-visionai/google-cloud-visionai/src/test/java/com/google/cloud/visionai/v1/StreamsServiceClientTest.java @@ -0,0 +1,2024 @@ +/* + * Copyright 2024 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.visionai.v1; + +import static com.google.cloud.visionai.v1.StreamsServiceClient.ListClustersPagedResponse; +import static com.google.cloud.visionai.v1.StreamsServiceClient.ListEventsPagedResponse; +import static com.google.cloud.visionai.v1.StreamsServiceClient.ListSeriesPagedResponse; +import static com.google.cloud.visionai.v1.StreamsServiceClient.ListStreamsPagedResponse; + +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.common.collect.Lists; +import com.google.longrunning.Operation; +import com.google.protobuf.AbstractMessage; +import com.google.protobuf.Any; +import com.google.protobuf.Duration; +import com.google.protobuf.Empty; +import com.google.protobuf.FieldMask; +import com.google.protobuf.Timestamp; +import io.grpc.StatusRuntimeException; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.UUID; +import java.util.concurrent.ExecutionException; +import javax.annotation.Generated; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +@Generated("by gapic-generator-java") +public class StreamsServiceClientTest { + private static MockIAMPolicy mockIAMPolicy; + private static MockLocations mockLocations; + private static MockServiceHelper mockServiceHelper; + private static MockStreamsService mockStreamsService; + private LocalChannelProvider channelProvider; + private StreamsServiceClient client; + + @BeforeClass + public static void startStaticServer() { + mockStreamsService = new MockStreamsService(); + mockLocations = new MockLocations(); + mockIAMPolicy = new MockIAMPolicy(); + mockServiceHelper = + new MockServiceHelper( + UUID.randomUUID().toString(), + Arrays.asList(mockStreamsService, mockLocations, mockIAMPolicy)); + mockServiceHelper.start(); + } + + @AfterClass + public static void stopServer() { + mockServiceHelper.stop(); + } + + @Before + public void setUp() throws IOException { + mockServiceHelper.reset(); + channelProvider = mockServiceHelper.createChannelProvider(); + StreamsServiceSettings settings = + StreamsServiceSettings.newBuilder() + .setTransportChannelProvider(channelProvider) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = StreamsServiceClient.create(settings); + } + + @After + public void tearDown() throws Exception { + client.close(); + } + + @Test + public void listClustersTest() throws Exception { + Cluster responsesElement = Cluster.newBuilder().build(); + ListClustersResponse expectedResponse = + ListClustersResponse.newBuilder() + .setNextPageToken("") + .addAllClusters(Arrays.asList(responsesElement)) + .build(); + mockStreamsService.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + ListClustersPagedResponse pagedListResponse = client.listClusters(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getClustersList().get(0), resources.get(0)); + + List actualRequests = mockStreamsService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListClustersRequest actualRequest = ((ListClustersRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listClustersExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockStreamsService.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + client.listClusters(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listClustersTest2() throws Exception { + Cluster responsesElement = Cluster.newBuilder().build(); + ListClustersResponse expectedResponse = + ListClustersResponse.newBuilder() + .setNextPageToken("") + .addAllClusters(Arrays.asList(responsesElement)) + .build(); + mockStreamsService.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListClustersPagedResponse pagedListResponse = client.listClusters(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getClustersList().get(0), resources.get(0)); + + List actualRequests = mockStreamsService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListClustersRequest actualRequest = ((ListClustersRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listClustersExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockStreamsService.addException(exception); + + try { + String parent = "parent-995424086"; + client.listClusters(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getClusterTest() throws Exception { + Cluster expectedResponse = + Cluster.newBuilder() + .setName(ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .putAllAnnotations(new HashMap()) + .setDataplaneServiceEndpoint("dataplaneServiceEndpoint-81226728") + .setPscTarget("pscTarget-1845231503") + .build(); + mockStreamsService.addResponse(expectedResponse); + + ClusterName name = ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]"); + + Cluster actualResponse = client.getCluster(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockStreamsService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetClusterRequest actualRequest = ((GetClusterRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getClusterExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockStreamsService.addException(exception); + + try { + ClusterName name = ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]"); + client.getCluster(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getClusterTest2() throws Exception { + Cluster expectedResponse = + Cluster.newBuilder() + .setName(ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .putAllAnnotations(new HashMap()) + .setDataplaneServiceEndpoint("dataplaneServiceEndpoint-81226728") + .setPscTarget("pscTarget-1845231503") + .build(); + mockStreamsService.addResponse(expectedResponse); + + String name = "name3373707"; + + Cluster actualResponse = client.getCluster(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockStreamsService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetClusterRequest actualRequest = ((GetClusterRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getClusterExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockStreamsService.addException(exception); + + try { + String name = "name3373707"; + client.getCluster(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createClusterTest() throws Exception { + Cluster expectedResponse = + Cluster.newBuilder() + .setName(ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .putAllAnnotations(new HashMap()) + .setDataplaneServiceEndpoint("dataplaneServiceEndpoint-81226728") + .setPscTarget("pscTarget-1845231503") + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createClusterTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockStreamsService.addResponse(resultOperation); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + Cluster cluster = Cluster.newBuilder().build(); + String clusterId = "clusterId561939637"; + + Cluster actualResponse = client.createClusterAsync(parent, cluster, clusterId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockStreamsService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateClusterRequest actualRequest = ((CreateClusterRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(cluster, actualRequest.getCluster()); + Assert.assertEquals(clusterId, actualRequest.getClusterId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createClusterExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockStreamsService.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + Cluster cluster = Cluster.newBuilder().build(); + String clusterId = "clusterId561939637"; + client.createClusterAsync(parent, cluster, clusterId).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()); + } + } + + @Test + public void createClusterTest2() throws Exception { + Cluster expectedResponse = + Cluster.newBuilder() + .setName(ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .putAllAnnotations(new HashMap()) + .setDataplaneServiceEndpoint("dataplaneServiceEndpoint-81226728") + .setPscTarget("pscTarget-1845231503") + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createClusterTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockStreamsService.addResponse(resultOperation); + + String parent = "parent-995424086"; + Cluster cluster = Cluster.newBuilder().build(); + String clusterId = "clusterId561939637"; + + Cluster actualResponse = client.createClusterAsync(parent, cluster, clusterId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockStreamsService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateClusterRequest actualRequest = ((CreateClusterRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(cluster, actualRequest.getCluster()); + Assert.assertEquals(clusterId, actualRequest.getClusterId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createClusterExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockStreamsService.addException(exception); + + try { + String parent = "parent-995424086"; + Cluster cluster = Cluster.newBuilder().build(); + String clusterId = "clusterId561939637"; + client.createClusterAsync(parent, cluster, clusterId).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()); + } + } + + @Test + public void updateClusterTest() throws Exception { + Cluster expectedResponse = + Cluster.newBuilder() + .setName(ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .putAllAnnotations(new HashMap()) + .setDataplaneServiceEndpoint("dataplaneServiceEndpoint-81226728") + .setPscTarget("pscTarget-1845231503") + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("updateClusterTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockStreamsService.addResponse(resultOperation); + + Cluster cluster = Cluster.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + Cluster actualResponse = client.updateClusterAsync(cluster, updateMask).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockStreamsService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpdateClusterRequest actualRequest = ((UpdateClusterRequest) actualRequests.get(0)); + + Assert.assertEquals(cluster, actualRequest.getCluster()); + Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void updateClusterExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockStreamsService.addException(exception); + + try { + Cluster cluster = Cluster.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateClusterAsync(cluster, updateMask).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()); + } + } + + @Test + public void deleteClusterTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteClusterTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockStreamsService.addResponse(resultOperation); + + ClusterName name = ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]"); + + client.deleteClusterAsync(name).get(); + + List actualRequests = mockStreamsService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteClusterRequest actualRequest = ((DeleteClusterRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteClusterExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockStreamsService.addException(exception); + + try { + ClusterName name = ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]"); + client.deleteClusterAsync(name).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()); + } + } + + @Test + public void deleteClusterTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteClusterTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockStreamsService.addResponse(resultOperation); + + String name = "name3373707"; + + client.deleteClusterAsync(name).get(); + + List actualRequests = mockStreamsService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteClusterRequest actualRequest = ((DeleteClusterRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteClusterExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockStreamsService.addException(exception); + + try { + String name = "name3373707"; + client.deleteClusterAsync(name).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()); + } + } + + @Test + public void listStreamsTest() throws Exception { + Stream responsesElement = Stream.newBuilder().build(); + ListStreamsResponse expectedResponse = + ListStreamsResponse.newBuilder() + .setNextPageToken("") + .addAllStreams(Arrays.asList(responsesElement)) + .build(); + mockStreamsService.addResponse(expectedResponse); + + ClusterName parent = ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]"); + + ListStreamsPagedResponse pagedListResponse = client.listStreams(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getStreamsList().get(0), resources.get(0)); + + List actualRequests = mockStreamsService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListStreamsRequest actualRequest = ((ListStreamsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listStreamsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockStreamsService.addException(exception); + + try { + ClusterName parent = ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]"); + client.listStreams(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listStreamsTest2() throws Exception { + Stream responsesElement = Stream.newBuilder().build(); + ListStreamsResponse expectedResponse = + ListStreamsResponse.newBuilder() + .setNextPageToken("") + .addAllStreams(Arrays.asList(responsesElement)) + .build(); + mockStreamsService.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListStreamsPagedResponse pagedListResponse = client.listStreams(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getStreamsList().get(0), resources.get(0)); + + List actualRequests = mockStreamsService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListStreamsRequest actualRequest = ((ListStreamsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listStreamsExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockStreamsService.addException(exception); + + try { + String parent = "parent-995424086"; + client.listStreams(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getStreamTest() throws Exception { + Stream expectedResponse = + Stream.newBuilder() + .setName(StreamName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[STREAM]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .putAllAnnotations(new HashMap()) + .setDisplayName("displayName1714148973") + .setEnableHlsPlayback(true) + .setMediaWarehouseAsset("mediaWarehouseAsset-188571919") + .build(); + mockStreamsService.addResponse(expectedResponse); + + StreamName name = StreamName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[STREAM]"); + + Stream actualResponse = client.getStream(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockStreamsService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetStreamRequest actualRequest = ((GetStreamRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getStreamExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockStreamsService.addException(exception); + + try { + StreamName name = StreamName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[STREAM]"); + client.getStream(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getStreamTest2() throws Exception { + Stream expectedResponse = + Stream.newBuilder() + .setName(StreamName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[STREAM]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .putAllAnnotations(new HashMap()) + .setDisplayName("displayName1714148973") + .setEnableHlsPlayback(true) + .setMediaWarehouseAsset("mediaWarehouseAsset-188571919") + .build(); + mockStreamsService.addResponse(expectedResponse); + + String name = "name3373707"; + + Stream actualResponse = client.getStream(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockStreamsService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetStreamRequest actualRequest = ((GetStreamRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getStreamExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockStreamsService.addException(exception); + + try { + String name = "name3373707"; + client.getStream(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createStreamTest() throws Exception { + Stream expectedResponse = + Stream.newBuilder() + .setName(StreamName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[STREAM]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .putAllAnnotations(new HashMap()) + .setDisplayName("displayName1714148973") + .setEnableHlsPlayback(true) + .setMediaWarehouseAsset("mediaWarehouseAsset-188571919") + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createStreamTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockStreamsService.addResponse(resultOperation); + + ClusterName parent = ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]"); + Stream stream = Stream.newBuilder().build(); + String streamId = "streamId1790933179"; + + Stream actualResponse = client.createStreamAsync(parent, stream, streamId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockStreamsService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateStreamRequest actualRequest = ((CreateStreamRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(stream, actualRequest.getStream()); + Assert.assertEquals(streamId, actualRequest.getStreamId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createStreamExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockStreamsService.addException(exception); + + try { + ClusterName parent = ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]"); + Stream stream = Stream.newBuilder().build(); + String streamId = "streamId1790933179"; + client.createStreamAsync(parent, stream, streamId).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()); + } + } + + @Test + public void createStreamTest2() throws Exception { + Stream expectedResponse = + Stream.newBuilder() + .setName(StreamName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[STREAM]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .putAllAnnotations(new HashMap()) + .setDisplayName("displayName1714148973") + .setEnableHlsPlayback(true) + .setMediaWarehouseAsset("mediaWarehouseAsset-188571919") + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createStreamTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockStreamsService.addResponse(resultOperation); + + String parent = "parent-995424086"; + Stream stream = Stream.newBuilder().build(); + String streamId = "streamId1790933179"; + + Stream actualResponse = client.createStreamAsync(parent, stream, streamId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockStreamsService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateStreamRequest actualRequest = ((CreateStreamRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(stream, actualRequest.getStream()); + Assert.assertEquals(streamId, actualRequest.getStreamId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createStreamExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockStreamsService.addException(exception); + + try { + String parent = "parent-995424086"; + Stream stream = Stream.newBuilder().build(); + String streamId = "streamId1790933179"; + client.createStreamAsync(parent, stream, streamId).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()); + } + } + + @Test + public void updateStreamTest() throws Exception { + Stream expectedResponse = + Stream.newBuilder() + .setName(StreamName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[STREAM]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .putAllAnnotations(new HashMap()) + .setDisplayName("displayName1714148973") + .setEnableHlsPlayback(true) + .setMediaWarehouseAsset("mediaWarehouseAsset-188571919") + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("updateStreamTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockStreamsService.addResponse(resultOperation); + + Stream stream = Stream.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + Stream actualResponse = client.updateStreamAsync(stream, updateMask).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockStreamsService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpdateStreamRequest actualRequest = ((UpdateStreamRequest) actualRequests.get(0)); + + Assert.assertEquals(stream, actualRequest.getStream()); + Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void updateStreamExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockStreamsService.addException(exception); + + try { + Stream stream = Stream.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateStreamAsync(stream, updateMask).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()); + } + } + + @Test + public void deleteStreamTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteStreamTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockStreamsService.addResponse(resultOperation); + + StreamName name = StreamName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[STREAM]"); + + client.deleteStreamAsync(name).get(); + + List actualRequests = mockStreamsService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteStreamRequest actualRequest = ((DeleteStreamRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteStreamExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockStreamsService.addException(exception); + + try { + StreamName name = StreamName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[STREAM]"); + client.deleteStreamAsync(name).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()); + } + } + + @Test + public void deleteStreamTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteStreamTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockStreamsService.addResponse(resultOperation); + + String name = "name3373707"; + + client.deleteStreamAsync(name).get(); + + List actualRequests = mockStreamsService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteStreamRequest actualRequest = ((DeleteStreamRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteStreamExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockStreamsService.addException(exception); + + try { + String name = "name3373707"; + client.deleteStreamAsync(name).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()); + } + } + + @Test + public void getStreamThumbnailTest() throws Exception { + GetStreamThumbnailResponse expectedResponse = GetStreamThumbnailResponse.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("getStreamThumbnailTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockStreamsService.addResponse(resultOperation); + + String stream = "stream-891990144"; + String gcsObjectName = "gcsObjectName-1987275551"; + + GetStreamThumbnailResponse actualResponse = + client.getStreamThumbnailAsync(stream, gcsObjectName).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockStreamsService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetStreamThumbnailRequest actualRequest = ((GetStreamThumbnailRequest) actualRequests.get(0)); + + Assert.assertEquals(stream, actualRequest.getStream()); + Assert.assertEquals(gcsObjectName, actualRequest.getGcsObjectName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getStreamThumbnailExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockStreamsService.addException(exception); + + try { + String stream = "stream-891990144"; + String gcsObjectName = "gcsObjectName-1987275551"; + client.getStreamThumbnailAsync(stream, gcsObjectName).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()); + } + } + + @Test + public void generateStreamHlsTokenTest() throws Exception { + GenerateStreamHlsTokenResponse expectedResponse = + GenerateStreamHlsTokenResponse.newBuilder() + .setToken("token110541305") + .setExpirationTime(Timestamp.newBuilder().build()) + .build(); + mockStreamsService.addResponse(expectedResponse); + + String stream = "stream-891990144"; + + GenerateStreamHlsTokenResponse actualResponse = client.generateStreamHlsToken(stream); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockStreamsService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GenerateStreamHlsTokenRequest actualRequest = + ((GenerateStreamHlsTokenRequest) actualRequests.get(0)); + + Assert.assertEquals(stream, actualRequest.getStream()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void generateStreamHlsTokenExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockStreamsService.addException(exception); + + try { + String stream = "stream-891990144"; + client.generateStreamHlsToken(stream); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listEventsTest() throws Exception { + Event responsesElement = Event.newBuilder().build(); + ListEventsResponse expectedResponse = + ListEventsResponse.newBuilder() + .setNextPageToken("") + .addAllEvents(Arrays.asList(responsesElement)) + .build(); + mockStreamsService.addResponse(expectedResponse); + + ClusterName parent = ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]"); + + ListEventsPagedResponse pagedListResponse = client.listEvents(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getEventsList().get(0), resources.get(0)); + + List actualRequests = mockStreamsService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListEventsRequest actualRequest = ((ListEventsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listEventsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockStreamsService.addException(exception); + + try { + ClusterName parent = ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]"); + client.listEvents(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listEventsTest2() throws Exception { + Event responsesElement = Event.newBuilder().build(); + ListEventsResponse expectedResponse = + ListEventsResponse.newBuilder() + .setNextPageToken("") + .addAllEvents(Arrays.asList(responsesElement)) + .build(); + mockStreamsService.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListEventsPagedResponse pagedListResponse = client.listEvents(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getEventsList().get(0), resources.get(0)); + + List actualRequests = mockStreamsService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListEventsRequest actualRequest = ((ListEventsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listEventsExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockStreamsService.addException(exception); + + try { + String parent = "parent-995424086"; + client.listEvents(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getEventTest() throws Exception { + Event expectedResponse = + Event.newBuilder() + .setName(EventName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[EVENT]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .putAllAnnotations(new HashMap()) + .setGracePeriod(Duration.newBuilder().build()) + .build(); + mockStreamsService.addResponse(expectedResponse); + + EventName name = EventName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[EVENT]"); + + Event actualResponse = client.getEvent(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockStreamsService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetEventRequest actualRequest = ((GetEventRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getEventExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockStreamsService.addException(exception); + + try { + EventName name = EventName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[EVENT]"); + client.getEvent(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getEventTest2() throws Exception { + Event expectedResponse = + Event.newBuilder() + .setName(EventName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[EVENT]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .putAllAnnotations(new HashMap()) + .setGracePeriod(Duration.newBuilder().build()) + .build(); + mockStreamsService.addResponse(expectedResponse); + + String name = "name3373707"; + + Event actualResponse = client.getEvent(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockStreamsService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetEventRequest actualRequest = ((GetEventRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getEventExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockStreamsService.addException(exception); + + try { + String name = "name3373707"; + client.getEvent(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createEventTest() throws Exception { + Event expectedResponse = + Event.newBuilder() + .setName(EventName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[EVENT]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .putAllAnnotations(new HashMap()) + .setGracePeriod(Duration.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createEventTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockStreamsService.addResponse(resultOperation); + + ClusterName parent = ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]"); + Event event = Event.newBuilder().build(); + String eventId = "eventId-1376502443"; + + Event actualResponse = client.createEventAsync(parent, event, eventId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockStreamsService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateEventRequest actualRequest = ((CreateEventRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(event, actualRequest.getEvent()); + Assert.assertEquals(eventId, actualRequest.getEventId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createEventExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockStreamsService.addException(exception); + + try { + ClusterName parent = ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]"); + Event event = Event.newBuilder().build(); + String eventId = "eventId-1376502443"; + client.createEventAsync(parent, event, eventId).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()); + } + } + + @Test + public void createEventTest2() throws Exception { + Event expectedResponse = + Event.newBuilder() + .setName(EventName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[EVENT]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .putAllAnnotations(new HashMap()) + .setGracePeriod(Duration.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createEventTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockStreamsService.addResponse(resultOperation); + + String parent = "parent-995424086"; + Event event = Event.newBuilder().build(); + String eventId = "eventId-1376502443"; + + Event actualResponse = client.createEventAsync(parent, event, eventId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockStreamsService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateEventRequest actualRequest = ((CreateEventRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(event, actualRequest.getEvent()); + Assert.assertEquals(eventId, actualRequest.getEventId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createEventExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockStreamsService.addException(exception); + + try { + String parent = "parent-995424086"; + Event event = Event.newBuilder().build(); + String eventId = "eventId-1376502443"; + client.createEventAsync(parent, event, eventId).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()); + } + } + + @Test + public void updateEventTest() throws Exception { + Event expectedResponse = + Event.newBuilder() + .setName(EventName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[EVENT]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .putAllAnnotations(new HashMap()) + .setGracePeriod(Duration.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("updateEventTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockStreamsService.addResponse(resultOperation); + + Event event = Event.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + Event actualResponse = client.updateEventAsync(event, updateMask).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockStreamsService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpdateEventRequest actualRequest = ((UpdateEventRequest) actualRequests.get(0)); + + Assert.assertEquals(event, actualRequest.getEvent()); + Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void updateEventExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockStreamsService.addException(exception); + + try { + Event event = Event.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateEventAsync(event, updateMask).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()); + } + } + + @Test + public void deleteEventTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteEventTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockStreamsService.addResponse(resultOperation); + + EventName name = EventName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[EVENT]"); + + client.deleteEventAsync(name).get(); + + List actualRequests = mockStreamsService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteEventRequest actualRequest = ((DeleteEventRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteEventExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockStreamsService.addException(exception); + + try { + EventName name = EventName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[EVENT]"); + client.deleteEventAsync(name).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()); + } + } + + @Test + public void deleteEventTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteEventTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockStreamsService.addResponse(resultOperation); + + String name = "name3373707"; + + client.deleteEventAsync(name).get(); + + List actualRequests = mockStreamsService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteEventRequest actualRequest = ((DeleteEventRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteEventExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockStreamsService.addException(exception); + + try { + String name = "name3373707"; + client.deleteEventAsync(name).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()); + } + } + + @Test + public void listSeriesTest() throws Exception { + Series responsesElement = Series.newBuilder().build(); + ListSeriesResponse expectedResponse = + ListSeriesResponse.newBuilder() + .setNextPageToken("") + .addAllSeries(Arrays.asList(responsesElement)) + .build(); + mockStreamsService.addResponse(expectedResponse); + + ClusterName parent = ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]"); + + ListSeriesPagedResponse pagedListResponse = client.listSeries(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getSeriesList().get(0), resources.get(0)); + + List actualRequests = mockStreamsService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListSeriesRequest actualRequest = ((ListSeriesRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listSeriesExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockStreamsService.addException(exception); + + try { + ClusterName parent = ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]"); + client.listSeries(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listSeriesTest2() throws Exception { + Series responsesElement = Series.newBuilder().build(); + ListSeriesResponse expectedResponse = + ListSeriesResponse.newBuilder() + .setNextPageToken("") + .addAllSeries(Arrays.asList(responsesElement)) + .build(); + mockStreamsService.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListSeriesPagedResponse pagedListResponse = client.listSeries(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getSeriesList().get(0), resources.get(0)); + + List actualRequests = mockStreamsService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListSeriesRequest actualRequest = ((ListSeriesRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listSeriesExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockStreamsService.addException(exception); + + try { + String parent = "parent-995424086"; + client.listSeries(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getSeriesTest() throws Exception { + Series expectedResponse = + Series.newBuilder() + .setName(SeriesName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[SERIES]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .putAllAnnotations(new HashMap()) + .setStream(StreamName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[STREAM]").toString()) + .setEvent(EventName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[EVENT]").toString()) + .build(); + mockStreamsService.addResponse(expectedResponse); + + SeriesName name = SeriesName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[SERIES]"); + + Series actualResponse = client.getSeries(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockStreamsService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetSeriesRequest actualRequest = ((GetSeriesRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getSeriesExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockStreamsService.addException(exception); + + try { + SeriesName name = SeriesName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[SERIES]"); + client.getSeries(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getSeriesTest2() throws Exception { + Series expectedResponse = + Series.newBuilder() + .setName(SeriesName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[SERIES]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .putAllAnnotations(new HashMap()) + .setStream(StreamName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[STREAM]").toString()) + .setEvent(EventName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[EVENT]").toString()) + .build(); + mockStreamsService.addResponse(expectedResponse); + + String name = "name3373707"; + + Series actualResponse = client.getSeries(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockStreamsService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetSeriesRequest actualRequest = ((GetSeriesRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getSeriesExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockStreamsService.addException(exception); + + try { + String name = "name3373707"; + client.getSeries(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createSeriesTest() throws Exception { + Series expectedResponse = + Series.newBuilder() + .setName(SeriesName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[SERIES]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .putAllAnnotations(new HashMap()) + .setStream(StreamName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[STREAM]").toString()) + .setEvent(EventName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[EVENT]").toString()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createSeriesTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockStreamsService.addResponse(resultOperation); + + ClusterName parent = ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]"); + Series series = Series.newBuilder().build(); + String seriesId = "seriesId1367098866"; + + Series actualResponse = client.createSeriesAsync(parent, series, seriesId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockStreamsService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateSeriesRequest actualRequest = ((CreateSeriesRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(series, actualRequest.getSeries()); + Assert.assertEquals(seriesId, actualRequest.getSeriesId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createSeriesExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockStreamsService.addException(exception); + + try { + ClusterName parent = ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]"); + Series series = Series.newBuilder().build(); + String seriesId = "seriesId1367098866"; + client.createSeriesAsync(parent, series, seriesId).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()); + } + } + + @Test + public void createSeriesTest2() throws Exception { + Series expectedResponse = + Series.newBuilder() + .setName(SeriesName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[SERIES]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .putAllAnnotations(new HashMap()) + .setStream(StreamName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[STREAM]").toString()) + .setEvent(EventName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[EVENT]").toString()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createSeriesTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockStreamsService.addResponse(resultOperation); + + String parent = "parent-995424086"; + Series series = Series.newBuilder().build(); + String seriesId = "seriesId1367098866"; + + Series actualResponse = client.createSeriesAsync(parent, series, seriesId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockStreamsService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateSeriesRequest actualRequest = ((CreateSeriesRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(series, actualRequest.getSeries()); + Assert.assertEquals(seriesId, actualRequest.getSeriesId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createSeriesExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockStreamsService.addException(exception); + + try { + String parent = "parent-995424086"; + Series series = Series.newBuilder().build(); + String seriesId = "seriesId1367098866"; + client.createSeriesAsync(parent, series, seriesId).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()); + } + } + + @Test + public void updateSeriesTest() throws Exception { + Series expectedResponse = + Series.newBuilder() + .setName(SeriesName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[SERIES]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .putAllAnnotations(new HashMap()) + .setStream(StreamName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[STREAM]").toString()) + .setEvent(EventName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[EVENT]").toString()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("updateSeriesTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockStreamsService.addResponse(resultOperation); + + Series series = Series.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + Series actualResponse = client.updateSeriesAsync(series, updateMask).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockStreamsService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpdateSeriesRequest actualRequest = ((UpdateSeriesRequest) actualRequests.get(0)); + + Assert.assertEquals(series, actualRequest.getSeries()); + Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void updateSeriesExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockStreamsService.addException(exception); + + try { + Series series = Series.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateSeriesAsync(series, updateMask).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()); + } + } + + @Test + public void deleteSeriesTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteSeriesTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockStreamsService.addResponse(resultOperation); + + SeriesName name = SeriesName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[SERIES]"); + + client.deleteSeriesAsync(name).get(); + + List actualRequests = mockStreamsService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteSeriesRequest actualRequest = ((DeleteSeriesRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteSeriesExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockStreamsService.addException(exception); + + try { + SeriesName name = SeriesName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[SERIES]"); + client.deleteSeriesAsync(name).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()); + } + } + + @Test + public void deleteSeriesTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteSeriesTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockStreamsService.addResponse(resultOperation); + + String name = "name3373707"; + + client.deleteSeriesAsync(name).get(); + + List actualRequests = mockStreamsService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteSeriesRequest actualRequest = ((DeleteSeriesRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteSeriesExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockStreamsService.addException(exception); + + try { + String name = "name3373707"; + client.deleteSeriesAsync(name).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()); + } + } + + @Test + public void materializeChannelTest() throws Exception { + Channel expectedResponse = + Channel.newBuilder() + .setName("name3373707") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .putAllAnnotations(new HashMap()) + .setStream(StreamName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[STREAM]").toString()) + .setEvent(EventName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[EVENT]").toString()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("materializeChannelTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockStreamsService.addResponse(resultOperation); + + ClusterName parent = ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]"); + Channel channel = Channel.newBuilder().build(); + String channelId = "channelId1461735806"; + + Channel actualResponse = client.materializeChannelAsync(parent, channel, channelId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockStreamsService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + MaterializeChannelRequest actualRequest = ((MaterializeChannelRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(channel, actualRequest.getChannel()); + Assert.assertEquals(channelId, actualRequest.getChannelId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void materializeChannelExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockStreamsService.addException(exception); + + try { + ClusterName parent = ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]"); + Channel channel = Channel.newBuilder().build(); + String channelId = "channelId1461735806"; + client.materializeChannelAsync(parent, channel, channelId).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()); + } + } + + @Test + public void materializeChannelTest2() throws Exception { + Channel expectedResponse = + Channel.newBuilder() + .setName("name3373707") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .putAllAnnotations(new HashMap()) + .setStream(StreamName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[STREAM]").toString()) + .setEvent(EventName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[EVENT]").toString()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("materializeChannelTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockStreamsService.addResponse(resultOperation); + + String parent = "parent-995424086"; + Channel channel = Channel.newBuilder().build(); + String channelId = "channelId1461735806"; + + Channel actualResponse = client.materializeChannelAsync(parent, channel, channelId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockStreamsService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + MaterializeChannelRequest actualRequest = ((MaterializeChannelRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(channel, actualRequest.getChannel()); + Assert.assertEquals(channelId, actualRequest.getChannelId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void materializeChannelExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockStreamsService.addException(exception); + + try { + String parent = "parent-995424086"; + Channel channel = Channel.newBuilder().build(); + String channelId = "channelId1461735806"; + client.materializeChannelAsync(parent, channel, channelId).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/java-visionai/google-cloud-visionai/src/test/java/com/google/cloud/visionai/v1/WarehouseClientHttpJsonTest.java b/java-visionai/google-cloud-visionai/src/test/java/com/google/cloud/visionai/v1/WarehouseClientHttpJsonTest.java new file mode 100644 index 000000000000..4f75caba0fa7 --- /dev/null +++ b/java-visionai/google-cloud-visionai/src/test/java/com/google/cloud/visionai/v1/WarehouseClientHttpJsonTest.java @@ -0,0 +1,5221 @@ +/* + * Copyright 2024 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.visionai.v1; + +import static com.google.cloud.visionai.v1.WarehouseClient.ListAnnotationsPagedResponse; +import static com.google.cloud.visionai.v1.WarehouseClient.ListAssetsPagedResponse; +import static com.google.cloud.visionai.v1.WarehouseClient.ListCollectionsPagedResponse; +import static com.google.cloud.visionai.v1.WarehouseClient.ListCorporaPagedResponse; +import static com.google.cloud.visionai.v1.WarehouseClient.ListDataSchemasPagedResponse; +import static com.google.cloud.visionai.v1.WarehouseClient.ListIndexEndpointsPagedResponse; +import static com.google.cloud.visionai.v1.WarehouseClient.ListIndexesPagedResponse; +import static com.google.cloud.visionai.v1.WarehouseClient.ListSearchConfigsPagedResponse; +import static com.google.cloud.visionai.v1.WarehouseClient.ListSearchHypernymsPagedResponse; +import static com.google.cloud.visionai.v1.WarehouseClient.SearchAssetsPagedResponse; +import static com.google.cloud.visionai.v1.WarehouseClient.SearchIndexEndpointPagedResponse; +import static com.google.cloud.visionai.v1.WarehouseClient.ViewCollectionItemsPagedResponse; +import static com.google.cloud.visionai.v1.WarehouseClient.ViewIndexedAssetsPagedResponse; + +import com.google.api.gax.core.NoCredentialsProvider; +import com.google.api.gax.httpjson.GaxHttpJsonProperties; +import com.google.api.gax.httpjson.testing.MockHttpService; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ApiException; +import com.google.api.gax.rpc.ApiExceptionFactory; +import com.google.api.gax.rpc.InvalidArgumentException; +import com.google.api.gax.rpc.StatusCode; +import com.google.api.gax.rpc.testing.FakeStatusCode; +import com.google.cloud.visionai.v1.stub.HttpJsonWarehouseStub; +import com.google.common.collect.Lists; +import com.google.longrunning.Operation; +import com.google.protobuf.Any; +import com.google.protobuf.Duration; +import com.google.protobuf.Empty; +import com.google.protobuf.FieldMask; +import com.google.protobuf.Timestamp; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.concurrent.ExecutionException; +import javax.annotation.Generated; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +@Generated("by gapic-generator-java") +public class WarehouseClientHttpJsonTest { + private static MockHttpService mockService; + private static WarehouseClient client; + + @BeforeClass + public static void startStaticServer() throws IOException { + mockService = + new MockHttpService( + HttpJsonWarehouseStub.getMethodDescriptors(), WarehouseSettings.getDefaultEndpoint()); + WarehouseSettings settings = + WarehouseSettings.newHttpJsonBuilder() + .setTransportChannelProvider( + WarehouseSettings.defaultHttpJsonTransportProviderBuilder() + .setHttpTransport(mockService) + .build()) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = WarehouseClient.create(settings); + } + + @AfterClass + public static void stopServer() { + client.close(); + } + + @Before + public void setUp() {} + + @After + public void tearDown() throws Exception { + mockService.reset(); + } + + @Test + public void createAssetTest() throws Exception { + Asset expectedResponse = + Asset.newBuilder() + .setName( + AssetName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[ASSET]").toString()) + .setTtl(Duration.newBuilder().build()) + .setAssetGcsSource(AssetSource.AssetGcsSource.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + CorpusName parent = CorpusName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]"); + Asset asset = Asset.newBuilder().build(); + String assetId = "assetId-704776149"; + + Asset actualResponse = client.createAsset(parent, asset, assetId); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createAssetExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + CorpusName parent = CorpusName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]"); + Asset asset = Asset.newBuilder().build(); + String assetId = "assetId-704776149"; + client.createAsset(parent, asset, assetId); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createAssetTest2() throws Exception { + Asset expectedResponse = + Asset.newBuilder() + .setName( + AssetName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[ASSET]").toString()) + .setTtl(Duration.newBuilder().build()) + .setAssetGcsSource(AssetSource.AssetGcsSource.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "projects/project-7911/locations/location-7911/corpora/corpor-7911"; + Asset asset = Asset.newBuilder().build(); + String assetId = "assetId-704776149"; + + Asset actualResponse = client.createAsset(parent, asset, assetId); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createAssetExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-7911/locations/location-7911/corpora/corpor-7911"; + Asset asset = Asset.newBuilder().build(); + String assetId = "assetId-704776149"; + client.createAsset(parent, asset, assetId); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void updateAssetTest() throws Exception { + Asset expectedResponse = + Asset.newBuilder() + .setName( + AssetName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[ASSET]").toString()) + .setTtl(Duration.newBuilder().build()) + .setAssetGcsSource(AssetSource.AssetGcsSource.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + Asset asset = + Asset.newBuilder() + .setName( + AssetName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[ASSET]").toString()) + .setTtl(Duration.newBuilder().build()) + .setAssetGcsSource(AssetSource.AssetGcsSource.newBuilder().build()) + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + Asset actualResponse = client.updateAsset(asset, updateMask); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void updateAssetExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + Asset asset = + Asset.newBuilder() + .setName( + AssetName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[ASSET]").toString()) + .setTtl(Duration.newBuilder().build()) + .setAssetGcsSource(AssetSource.AssetGcsSource.newBuilder().build()) + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateAsset(asset, updateMask); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getAssetTest() throws Exception { + Asset expectedResponse = + Asset.newBuilder() + .setName( + AssetName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[ASSET]").toString()) + .setTtl(Duration.newBuilder().build()) + .setAssetGcsSource(AssetSource.AssetGcsSource.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + AssetName name = AssetName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[ASSET]"); + + Asset actualResponse = client.getAsset(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getAssetExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + AssetName name = AssetName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[ASSET]"); + client.getAsset(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getAssetTest2() throws Exception { + Asset expectedResponse = + Asset.newBuilder() + .setName( + AssetName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[ASSET]").toString()) + .setTtl(Duration.newBuilder().build()) + .setAssetGcsSource(AssetSource.AssetGcsSource.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + String name = + "projects/project-1853/locations/location-1853/corpora/corpor-1853/assets/asset-1853"; + + Asset actualResponse = client.getAsset(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getAssetExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = + "projects/project-1853/locations/location-1853/corpora/corpor-1853/assets/asset-1853"; + client.getAsset(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listAssetsTest() throws Exception { + Asset responsesElement = Asset.newBuilder().build(); + ListAssetsResponse expectedResponse = + ListAssetsResponse.newBuilder() + .setNextPageToken("") + .addAllAssets(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + CorpusName parent = CorpusName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]"); + + ListAssetsPagedResponse pagedListResponse = client.listAssets(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getAssetsList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listAssetsExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + CorpusName parent = CorpusName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]"); + client.listAssets(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listAssetsTest2() throws Exception { + Asset responsesElement = Asset.newBuilder().build(); + ListAssetsResponse expectedResponse = + ListAssetsResponse.newBuilder() + .setNextPageToken("") + .addAllAssets(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "projects/project-7911/locations/location-7911/corpora/corpor-7911"; + + ListAssetsPagedResponse pagedListResponse = client.listAssets(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getAssetsList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listAssetsExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-7911/locations/location-7911/corpora/corpor-7911"; + client.listAssets(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteAssetTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteAssetTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + AssetName name = AssetName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[ASSET]"); + + client.deleteAssetAsync(name).get(); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void deleteAssetExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + AssetName name = AssetName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[ASSET]"); + client.deleteAssetAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void deleteAssetTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteAssetTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + String name = + "projects/project-1853/locations/location-1853/corpora/corpor-1853/assets/asset-1853"; + + client.deleteAssetAsync(name).get(); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void deleteAssetExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = + "projects/project-1853/locations/location-1853/corpora/corpor-1853/assets/asset-1853"; + client.deleteAssetAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void uploadAssetTest() throws Exception { + UploadAssetResponse expectedResponse = UploadAssetResponse.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("uploadAssetTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + UploadAssetRequest request = + UploadAssetRequest.newBuilder() + .setName( + AssetName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[ASSET]").toString()) + .setAssetSource(AssetSource.newBuilder().build()) + .build(); + + UploadAssetResponse actualResponse = client.uploadAssetAsync(request).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void uploadAssetExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + UploadAssetRequest request = + UploadAssetRequest.newBuilder() + .setName( + AssetName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[ASSET]").toString()) + .setAssetSource(AssetSource.newBuilder().build()) + .build(); + client.uploadAssetAsync(request).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void generateRetrievalUrlTest() throws Exception { + GenerateRetrievalUrlResponse expectedResponse = + GenerateRetrievalUrlResponse.newBuilder().setSignedUri("signedUri1076770992").build(); + mockService.addResponse(expectedResponse); + + GenerateRetrievalUrlRequest request = + GenerateRetrievalUrlRequest.newBuilder() + .setName( + AssetName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[ASSET]").toString()) + .build(); + + GenerateRetrievalUrlResponse actualResponse = client.generateRetrievalUrl(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void generateRetrievalUrlExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + GenerateRetrievalUrlRequest request = + GenerateRetrievalUrlRequest.newBuilder() + .setName( + AssetName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[ASSET]").toString()) + .build(); + client.generateRetrievalUrl(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void analyzeAssetTest() throws Exception { + AnalyzeAssetResponse expectedResponse = AnalyzeAssetResponse.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("analyzeAssetTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + AnalyzeAssetRequest request = + AnalyzeAssetRequest.newBuilder() + .setName( + AssetName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[ASSET]").toString()) + .build(); + + AnalyzeAssetResponse actualResponse = client.analyzeAssetAsync(request).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void analyzeAssetExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + AnalyzeAssetRequest request = + AnalyzeAssetRequest.newBuilder() + .setName( + AssetName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[ASSET]").toString()) + .build(); + client.analyzeAssetAsync(request).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void indexAssetTest() throws Exception { + IndexAssetResponse expectedResponse = IndexAssetResponse.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("indexAssetTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + IndexAssetRequest request = + IndexAssetRequest.newBuilder() + .setName( + AssetName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[ASSET]").toString()) + .setIndex( + IndexName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[INDEX]").toString()) + .build(); + + IndexAssetResponse actualResponse = client.indexAssetAsync(request).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void indexAssetExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + IndexAssetRequest request = + IndexAssetRequest.newBuilder() + .setName( + AssetName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[ASSET]").toString()) + .setIndex( + IndexName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[INDEX]").toString()) + .build(); + client.indexAssetAsync(request).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void removeIndexAssetTest() throws Exception { + RemoveIndexAssetResponse expectedResponse = RemoveIndexAssetResponse.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("removeIndexAssetTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + RemoveIndexAssetRequest request = + RemoveIndexAssetRequest.newBuilder() + .setName( + AssetName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[ASSET]").toString()) + .setIndex( + IndexName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[INDEX]").toString()) + .build(); + + RemoveIndexAssetResponse actualResponse = client.removeIndexAssetAsync(request).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void removeIndexAssetExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + RemoveIndexAssetRequest request = + RemoveIndexAssetRequest.newBuilder() + .setName( + AssetName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[ASSET]").toString()) + .setIndex( + IndexName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[INDEX]").toString()) + .build(); + client.removeIndexAssetAsync(request).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void viewIndexedAssetsTest() throws Exception { + IndexedAsset responsesElement = IndexedAsset.newBuilder().build(); + ViewIndexedAssetsResponse expectedResponse = + ViewIndexedAssetsResponse.newBuilder() + .setNextPageToken("") + .addAllIndexedAssets(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + IndexName index = IndexName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[INDEX]"); + + ViewIndexedAssetsPagedResponse pagedListResponse = client.viewIndexedAssets(index); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getIndexedAssetsList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void viewIndexedAssetsExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + IndexName index = IndexName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[INDEX]"); + client.viewIndexedAssets(index); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void viewIndexedAssetsTest2() throws Exception { + IndexedAsset responsesElement = IndexedAsset.newBuilder().build(); + ViewIndexedAssetsResponse expectedResponse = + ViewIndexedAssetsResponse.newBuilder() + .setNextPageToken("") + .addAllIndexedAssets(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + String index = + "projects/project-3117/locations/location-3117/corpora/corpor-3117/indexes/indexe-3117"; + + ViewIndexedAssetsPagedResponse pagedListResponse = client.viewIndexedAssets(index); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getIndexedAssetsList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void viewIndexedAssetsExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String index = + "projects/project-3117/locations/location-3117/corpora/corpor-3117/indexes/indexe-3117"; + client.viewIndexedAssets(index); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createIndexTest() throws Exception { + Index expectedResponse = + Index.newBuilder() + .setName( + IndexName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[INDEX]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .addAllDeployedIndexes(new ArrayList()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createIndexTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + CorpusName parent = CorpusName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]"); + Index index = Index.newBuilder().build(); + String indexId = "indexId1943291277"; + + Index actualResponse = client.createIndexAsync(parent, index, indexId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createIndexExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + CorpusName parent = CorpusName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]"); + Index index = Index.newBuilder().build(); + String indexId = "indexId1943291277"; + client.createIndexAsync(parent, index, indexId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void createIndexTest2() throws Exception { + Index expectedResponse = + Index.newBuilder() + .setName( + IndexName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[INDEX]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .addAllDeployedIndexes(new ArrayList()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createIndexTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + String parent = "projects/project-7911/locations/location-7911/corpora/corpor-7911"; + Index index = Index.newBuilder().build(); + String indexId = "indexId1943291277"; + + Index actualResponse = client.createIndexAsync(parent, index, indexId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createIndexExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-7911/locations/location-7911/corpora/corpor-7911"; + Index index = Index.newBuilder().build(); + String indexId = "indexId1943291277"; + client.createIndexAsync(parent, index, indexId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void updateIndexTest() throws Exception { + Index expectedResponse = + Index.newBuilder() + .setName( + IndexName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[INDEX]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .addAllDeployedIndexes(new ArrayList()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("updateIndexTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + Index index = + Index.newBuilder() + .setName( + IndexName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[INDEX]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .addAllDeployedIndexes(new ArrayList()) + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + Index actualResponse = client.updateIndexAsync(index, updateMask).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void updateIndexExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + Index index = + Index.newBuilder() + .setName( + IndexName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[INDEX]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .addAllDeployedIndexes(new ArrayList()) + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateIndexAsync(index, updateMask).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void getIndexTest() throws Exception { + Index expectedResponse = + Index.newBuilder() + .setName( + IndexName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[INDEX]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .addAllDeployedIndexes(new ArrayList()) + .build(); + mockService.addResponse(expectedResponse); + + IndexName name = IndexName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[INDEX]"); + + Index actualResponse = client.getIndex(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getIndexExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + IndexName name = IndexName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[INDEX]"); + client.getIndex(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getIndexTest2() throws Exception { + Index expectedResponse = + Index.newBuilder() + .setName( + IndexName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[INDEX]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .addAllDeployedIndexes(new ArrayList()) + .build(); + mockService.addResponse(expectedResponse); + + String name = + "projects/project-9254/locations/location-9254/corpora/corpor-9254/indexes/indexe-9254"; + + Index actualResponse = client.getIndex(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getIndexExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = + "projects/project-9254/locations/location-9254/corpora/corpor-9254/indexes/indexe-9254"; + client.getIndex(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listIndexesTest() throws Exception { + Index responsesElement = Index.newBuilder().build(); + ListIndexesResponse expectedResponse = + ListIndexesResponse.newBuilder() + .setNextPageToken("") + .addAllIndexes(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + CorpusName parent = CorpusName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]"); + + ListIndexesPagedResponse pagedListResponse = client.listIndexes(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getIndexesList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listIndexesExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + CorpusName parent = CorpusName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]"); + client.listIndexes(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listIndexesTest2() throws Exception { + Index responsesElement = Index.newBuilder().build(); + ListIndexesResponse expectedResponse = + ListIndexesResponse.newBuilder() + .setNextPageToken("") + .addAllIndexes(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "projects/project-7911/locations/location-7911/corpora/corpor-7911"; + + ListIndexesPagedResponse pagedListResponse = client.listIndexes(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getIndexesList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listIndexesExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-7911/locations/location-7911/corpora/corpor-7911"; + client.listIndexes(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteIndexTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteIndexTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + IndexName name = IndexName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[INDEX]"); + + client.deleteIndexAsync(name).get(); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void deleteIndexExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + IndexName name = IndexName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[INDEX]"); + client.deleteIndexAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void deleteIndexTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteIndexTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + String name = + "projects/project-9254/locations/location-9254/corpora/corpor-9254/indexes/indexe-9254"; + + client.deleteIndexAsync(name).get(); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void deleteIndexExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = + "projects/project-9254/locations/location-9254/corpora/corpor-9254/indexes/indexe-9254"; + client.deleteIndexAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void createCorpusTest() throws Exception { + Corpus expectedResponse = + Corpus.newBuilder() + .setName(CorpusName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setDefaultTtl(Duration.newBuilder().build()) + .setSearchCapabilitySetting(SearchCapabilitySetting.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createCorpusTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + String parent = "projects/project-5833/locations/location-5833"; + Corpus corpus = Corpus.newBuilder().build(); + + Corpus actualResponse = client.createCorpusAsync(parent, corpus).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createCorpusExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-5833/locations/location-5833"; + Corpus corpus = Corpus.newBuilder().build(); + client.createCorpusAsync(parent, corpus).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void getCorpusTest() throws Exception { + Corpus expectedResponse = + Corpus.newBuilder() + .setName(CorpusName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setDefaultTtl(Duration.newBuilder().build()) + .setSearchCapabilitySetting(SearchCapabilitySetting.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + CorpusName name = CorpusName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]"); + + Corpus actualResponse = client.getCorpus(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getCorpusExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + CorpusName name = CorpusName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]"); + client.getCorpus(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getCorpusTest2() throws Exception { + Corpus expectedResponse = + Corpus.newBuilder() + .setName(CorpusName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setDefaultTtl(Duration.newBuilder().build()) + .setSearchCapabilitySetting(SearchCapabilitySetting.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + String name = "projects/project-1702/locations/location-1702/corpora/corpor-1702"; + + Corpus actualResponse = client.getCorpus(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getCorpusExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "projects/project-1702/locations/location-1702/corpora/corpor-1702"; + client.getCorpus(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void updateCorpusTest() throws Exception { + Corpus expectedResponse = + Corpus.newBuilder() + .setName(CorpusName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setDefaultTtl(Duration.newBuilder().build()) + .setSearchCapabilitySetting(SearchCapabilitySetting.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + Corpus corpus = + Corpus.newBuilder() + .setName(CorpusName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setDefaultTtl(Duration.newBuilder().build()) + .setSearchCapabilitySetting(SearchCapabilitySetting.newBuilder().build()) + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + Corpus actualResponse = client.updateCorpus(corpus, updateMask); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void updateCorpusExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + Corpus corpus = + Corpus.newBuilder() + .setName(CorpusName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setDefaultTtl(Duration.newBuilder().build()) + .setSearchCapabilitySetting(SearchCapabilitySetting.newBuilder().build()) + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateCorpus(corpus, updateMask); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listCorporaTest() throws Exception { + Corpus responsesElement = Corpus.newBuilder().build(); + ListCorporaResponse expectedResponse = + ListCorporaResponse.newBuilder() + .setNextPageToken("") + .addAllCorpora(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "projects/project-5833/locations/location-5833"; + + ListCorporaPagedResponse pagedListResponse = client.listCorpora(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getCorporaList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listCorporaExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-5833/locations/location-5833"; + client.listCorpora(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteCorpusTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockService.addResponse(expectedResponse); + + CorpusName name = CorpusName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]"); + + client.deleteCorpus(name); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void deleteCorpusExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + CorpusName name = CorpusName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]"); + client.deleteCorpus(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteCorpusTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockService.addResponse(expectedResponse); + + String name = "projects/project-1702/locations/location-1702/corpora/corpor-1702"; + + client.deleteCorpus(name); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void deleteCorpusExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "projects/project-1702/locations/location-1702/corpora/corpor-1702"; + client.deleteCorpus(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void analyzeCorpusTest() throws Exception { + AnalyzeCorpusResponse expectedResponse = AnalyzeCorpusResponse.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("analyzeCorpusTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + AnalyzeCorpusRequest request = + AnalyzeCorpusRequest.newBuilder() + .setName(CorpusName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]").toString()) + .build(); + + AnalyzeCorpusResponse actualResponse = client.analyzeCorpusAsync(request).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void analyzeCorpusExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + AnalyzeCorpusRequest request = + AnalyzeCorpusRequest.newBuilder() + .setName(CorpusName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]").toString()) + .build(); + client.analyzeCorpusAsync(request).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void createDataSchemaTest() throws Exception { + DataSchema expectedResponse = + DataSchema.newBuilder() + .setName( + DataSchemaName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[DATA_SCHEMA]") + .toString()) + .setKey("key106079") + .setSchemaDetails(DataSchemaDetails.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + CorpusName parent = CorpusName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]"); + DataSchema dataSchema = DataSchema.newBuilder().build(); + + DataSchema actualResponse = client.createDataSchema(parent, dataSchema); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createDataSchemaExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + CorpusName parent = CorpusName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]"); + DataSchema dataSchema = DataSchema.newBuilder().build(); + client.createDataSchema(parent, dataSchema); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createDataSchemaTest2() throws Exception { + DataSchema expectedResponse = + DataSchema.newBuilder() + .setName( + DataSchemaName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[DATA_SCHEMA]") + .toString()) + .setKey("key106079") + .setSchemaDetails(DataSchemaDetails.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "projects/project-7911/locations/location-7911/corpora/corpor-7911"; + DataSchema dataSchema = DataSchema.newBuilder().build(); + + DataSchema actualResponse = client.createDataSchema(parent, dataSchema); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createDataSchemaExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-7911/locations/location-7911/corpora/corpor-7911"; + DataSchema dataSchema = DataSchema.newBuilder().build(); + client.createDataSchema(parent, dataSchema); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void updateDataSchemaTest() throws Exception { + DataSchema expectedResponse = + DataSchema.newBuilder() + .setName( + DataSchemaName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[DATA_SCHEMA]") + .toString()) + .setKey("key106079") + .setSchemaDetails(DataSchemaDetails.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + DataSchema dataSchema = + DataSchema.newBuilder() + .setName( + DataSchemaName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[DATA_SCHEMA]") + .toString()) + .setKey("key106079") + .setSchemaDetails(DataSchemaDetails.newBuilder().build()) + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + DataSchema actualResponse = client.updateDataSchema(dataSchema, updateMask); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void updateDataSchemaExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + DataSchema dataSchema = + DataSchema.newBuilder() + .setName( + DataSchemaName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[DATA_SCHEMA]") + .toString()) + .setKey("key106079") + .setSchemaDetails(DataSchemaDetails.newBuilder().build()) + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateDataSchema(dataSchema, updateMask); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getDataSchemaTest() throws Exception { + DataSchema expectedResponse = + DataSchema.newBuilder() + .setName( + DataSchemaName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[DATA_SCHEMA]") + .toString()) + .setKey("key106079") + .setSchemaDetails(DataSchemaDetails.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + DataSchemaName name = + DataSchemaName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[DATA_SCHEMA]"); + + DataSchema actualResponse = client.getDataSchema(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getDataSchemaExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + DataSchemaName name = + DataSchemaName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[DATA_SCHEMA]"); + client.getDataSchema(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getDataSchemaTest2() throws Exception { + DataSchema expectedResponse = + DataSchema.newBuilder() + .setName( + DataSchemaName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[DATA_SCHEMA]") + .toString()) + .setKey("key106079") + .setSchemaDetails(DataSchemaDetails.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + String name = + "projects/project-558/locations/location-558/corpora/corpor-558/dataSchemas/dataSchema-558"; + + DataSchema actualResponse = client.getDataSchema(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getDataSchemaExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = + "projects/project-558/locations/location-558/corpora/corpor-558/dataSchemas/dataSchema-558"; + client.getDataSchema(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteDataSchemaTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockService.addResponse(expectedResponse); + + DataSchemaName name = + DataSchemaName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[DATA_SCHEMA]"); + + client.deleteDataSchema(name); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void deleteDataSchemaExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + DataSchemaName name = + DataSchemaName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[DATA_SCHEMA]"); + client.deleteDataSchema(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteDataSchemaTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockService.addResponse(expectedResponse); + + String name = + "projects/project-558/locations/location-558/corpora/corpor-558/dataSchemas/dataSchema-558"; + + client.deleteDataSchema(name); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void deleteDataSchemaExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = + "projects/project-558/locations/location-558/corpora/corpor-558/dataSchemas/dataSchema-558"; + client.deleteDataSchema(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listDataSchemasTest() throws Exception { + DataSchema responsesElement = DataSchema.newBuilder().build(); + ListDataSchemasResponse expectedResponse = + ListDataSchemasResponse.newBuilder() + .setNextPageToken("") + .addAllDataSchemas(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + CorpusName parent = CorpusName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]"); + + ListDataSchemasPagedResponse pagedListResponse = client.listDataSchemas(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getDataSchemasList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listDataSchemasExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + CorpusName parent = CorpusName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]"); + client.listDataSchemas(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listDataSchemasTest2() throws Exception { + DataSchema responsesElement = DataSchema.newBuilder().build(); + ListDataSchemasResponse expectedResponse = + ListDataSchemasResponse.newBuilder() + .setNextPageToken("") + .addAllDataSchemas(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "projects/project-7911/locations/location-7911/corpora/corpor-7911"; + + ListDataSchemasPagedResponse pagedListResponse = client.listDataSchemas(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getDataSchemasList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listDataSchemasExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-7911/locations/location-7911/corpora/corpor-7911"; + client.listDataSchemas(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createAnnotationTest() throws Exception { + Annotation expectedResponse = + Annotation.newBuilder() + .setName( + AnnotationName.of( + "[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[ASSET]", "[ANNOTATION]") + .toString()) + .setUserSpecifiedAnnotation(UserSpecifiedAnnotation.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + AssetName parent = AssetName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[ASSET]"); + Annotation annotation = Annotation.newBuilder().build(); + String annotationId = "annotationId251782314"; + + Annotation actualResponse = client.createAnnotation(parent, annotation, annotationId); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createAnnotationExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + AssetName parent = AssetName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[ASSET]"); + Annotation annotation = Annotation.newBuilder().build(); + String annotationId = "annotationId251782314"; + client.createAnnotation(parent, annotation, annotationId); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createAnnotationTest2() throws Exception { + Annotation expectedResponse = + Annotation.newBuilder() + .setName( + AnnotationName.of( + "[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[ASSET]", "[ANNOTATION]") + .toString()) + .setUserSpecifiedAnnotation(UserSpecifiedAnnotation.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + String parent = + "projects/project-3476/locations/location-3476/corpora/corpor-3476/assets/asset-3476"; + Annotation annotation = Annotation.newBuilder().build(); + String annotationId = "annotationId251782314"; + + Annotation actualResponse = client.createAnnotation(parent, annotation, annotationId); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createAnnotationExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = + "projects/project-3476/locations/location-3476/corpora/corpor-3476/assets/asset-3476"; + Annotation annotation = Annotation.newBuilder().build(); + String annotationId = "annotationId251782314"; + client.createAnnotation(parent, annotation, annotationId); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getAnnotationTest() throws Exception { + Annotation expectedResponse = + Annotation.newBuilder() + .setName( + AnnotationName.of( + "[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[ASSET]", "[ANNOTATION]") + .toString()) + .setUserSpecifiedAnnotation(UserSpecifiedAnnotation.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + AnnotationName name = + AnnotationName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[ASSET]", "[ANNOTATION]"); + + Annotation actualResponse = client.getAnnotation(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getAnnotationExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + AnnotationName name = + AnnotationName.of( + "[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[ASSET]", "[ANNOTATION]"); + client.getAnnotation(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getAnnotationTest2() throws Exception { + Annotation expectedResponse = + Annotation.newBuilder() + .setName( + AnnotationName.of( + "[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[ASSET]", "[ANNOTATION]") + .toString()) + .setUserSpecifiedAnnotation(UserSpecifiedAnnotation.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + String name = + "projects/project-2515/locations/location-2515/corpora/corpor-2515/assets/asset-2515/annotations/annotation-2515"; + + Annotation actualResponse = client.getAnnotation(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getAnnotationExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = + "projects/project-2515/locations/location-2515/corpora/corpor-2515/assets/asset-2515/annotations/annotation-2515"; + client.getAnnotation(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listAnnotationsTest() throws Exception { + Annotation responsesElement = Annotation.newBuilder().build(); + ListAnnotationsResponse expectedResponse = + ListAnnotationsResponse.newBuilder() + .setNextPageToken("") + .addAllAnnotations(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + AssetName parent = AssetName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[ASSET]"); + + ListAnnotationsPagedResponse pagedListResponse = client.listAnnotations(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getAnnotationsList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listAnnotationsExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + AssetName parent = AssetName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[ASSET]"); + client.listAnnotations(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listAnnotationsTest2() throws Exception { + Annotation responsesElement = Annotation.newBuilder().build(); + ListAnnotationsResponse expectedResponse = + ListAnnotationsResponse.newBuilder() + .setNextPageToken("") + .addAllAnnotations(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + String parent = + "projects/project-3476/locations/location-3476/corpora/corpor-3476/assets/asset-3476"; + + ListAnnotationsPagedResponse pagedListResponse = client.listAnnotations(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getAnnotationsList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listAnnotationsExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = + "projects/project-3476/locations/location-3476/corpora/corpor-3476/assets/asset-3476"; + client.listAnnotations(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void updateAnnotationTest() throws Exception { + Annotation expectedResponse = + Annotation.newBuilder() + .setName( + AnnotationName.of( + "[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[ASSET]", "[ANNOTATION]") + .toString()) + .setUserSpecifiedAnnotation(UserSpecifiedAnnotation.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + Annotation annotation = + Annotation.newBuilder() + .setName( + AnnotationName.of( + "[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[ASSET]", "[ANNOTATION]") + .toString()) + .setUserSpecifiedAnnotation(UserSpecifiedAnnotation.newBuilder().build()) + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + Annotation actualResponse = client.updateAnnotation(annotation, updateMask); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void updateAnnotationExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + Annotation annotation = + Annotation.newBuilder() + .setName( + AnnotationName.of( + "[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[ASSET]", "[ANNOTATION]") + .toString()) + .setUserSpecifiedAnnotation(UserSpecifiedAnnotation.newBuilder().build()) + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateAnnotation(annotation, updateMask); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteAnnotationTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockService.addResponse(expectedResponse); + + AnnotationName name = + AnnotationName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[ASSET]", "[ANNOTATION]"); + + client.deleteAnnotation(name); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void deleteAnnotationExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + AnnotationName name = + AnnotationName.of( + "[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[ASSET]", "[ANNOTATION]"); + client.deleteAnnotation(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteAnnotationTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockService.addResponse(expectedResponse); + + String name = + "projects/project-2515/locations/location-2515/corpora/corpor-2515/assets/asset-2515/annotations/annotation-2515"; + + client.deleteAnnotation(name); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void deleteAnnotationExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = + "projects/project-2515/locations/location-2515/corpora/corpor-2515/assets/asset-2515/annotations/annotation-2515"; + client.deleteAnnotation(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void ingestAssetUnsupportedMethodTest() throws Exception { + // The ingestAsset() method is not supported in REST transport. + // This empty test is generated for technical reasons. + } + + @Test + public void clipAssetTest() throws Exception { + ClipAssetResponse expectedResponse = + ClipAssetResponse.newBuilder() + .addAllTimeIndexedUris(new ArrayList()) + .build(); + mockService.addResponse(expectedResponse); + + ClipAssetRequest request = + ClipAssetRequest.newBuilder() + .setName( + AssetName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[ASSET]").toString()) + .setTemporalPartition(Partition.TemporalPartition.newBuilder().build()) + .build(); + + ClipAssetResponse actualResponse = client.clipAsset(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void clipAssetExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ClipAssetRequest request = + ClipAssetRequest.newBuilder() + .setName( + AssetName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[ASSET]").toString()) + .setTemporalPartition(Partition.TemporalPartition.newBuilder().build()) + .build(); + client.clipAsset(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void generateHlsUriTest() throws Exception { + GenerateHlsUriResponse expectedResponse = + GenerateHlsUriResponse.newBuilder() + .setUri("uri116076") + .addAllTemporalPartitions(new ArrayList()) + .build(); + mockService.addResponse(expectedResponse); + + GenerateHlsUriRequest request = + GenerateHlsUriRequest.newBuilder() + .setName( + AssetName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[ASSET]").toString()) + .addAllTemporalPartitions(new ArrayList()) + .setLiveViewEnabled(true) + .build(); + + GenerateHlsUriResponse actualResponse = client.generateHlsUri(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void generateHlsUriExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + GenerateHlsUriRequest request = + GenerateHlsUriRequest.newBuilder() + .setName( + AssetName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[ASSET]").toString()) + .addAllTemporalPartitions(new ArrayList()) + .setLiveViewEnabled(true) + .build(); + client.generateHlsUri(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void importAssetsTest() throws Exception { + ImportAssetsResponse expectedResponse = ImportAssetsResponse.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("importAssetsTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + ImportAssetsRequest request = + ImportAssetsRequest.newBuilder() + .setParent(CorpusName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]").toString()) + .build(); + + ImportAssetsResponse actualResponse = client.importAssetsAsync(request).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void importAssetsExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ImportAssetsRequest request = + ImportAssetsRequest.newBuilder() + .setParent(CorpusName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]").toString()) + .build(); + client.importAssetsAsync(request).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void createSearchConfigTest() throws Exception { + SearchConfig expectedResponse = + SearchConfig.newBuilder() + .setName( + SearchConfigName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[SEARCH_CONFIG]") + .toString()) + .setFacetProperty(FacetProperty.newBuilder().build()) + .setSearchCriteriaProperty(SearchCriteriaProperty.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + CorpusName parent = CorpusName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]"); + SearchConfig searchConfig = SearchConfig.newBuilder().build(); + String searchConfigId = "searchConfigId1576297925"; + + SearchConfig actualResponse = client.createSearchConfig(parent, searchConfig, searchConfigId); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createSearchConfigExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + CorpusName parent = CorpusName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]"); + SearchConfig searchConfig = SearchConfig.newBuilder().build(); + String searchConfigId = "searchConfigId1576297925"; + client.createSearchConfig(parent, searchConfig, searchConfigId); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createSearchConfigTest2() throws Exception { + SearchConfig expectedResponse = + SearchConfig.newBuilder() + .setName( + SearchConfigName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[SEARCH_CONFIG]") + .toString()) + .setFacetProperty(FacetProperty.newBuilder().build()) + .setSearchCriteriaProperty(SearchCriteriaProperty.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "projects/project-7911/locations/location-7911/corpora/corpor-7911"; + SearchConfig searchConfig = SearchConfig.newBuilder().build(); + String searchConfigId = "searchConfigId1576297925"; + + SearchConfig actualResponse = client.createSearchConfig(parent, searchConfig, searchConfigId); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createSearchConfigExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-7911/locations/location-7911/corpora/corpor-7911"; + SearchConfig searchConfig = SearchConfig.newBuilder().build(); + String searchConfigId = "searchConfigId1576297925"; + client.createSearchConfig(parent, searchConfig, searchConfigId); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void updateSearchConfigTest() throws Exception { + SearchConfig expectedResponse = + SearchConfig.newBuilder() + .setName( + SearchConfigName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[SEARCH_CONFIG]") + .toString()) + .setFacetProperty(FacetProperty.newBuilder().build()) + .setSearchCriteriaProperty(SearchCriteriaProperty.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + SearchConfig searchConfig = + SearchConfig.newBuilder() + .setName( + SearchConfigName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[SEARCH_CONFIG]") + .toString()) + .setFacetProperty(FacetProperty.newBuilder().build()) + .setSearchCriteriaProperty(SearchCriteriaProperty.newBuilder().build()) + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + SearchConfig actualResponse = client.updateSearchConfig(searchConfig, updateMask); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void updateSearchConfigExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + SearchConfig searchConfig = + SearchConfig.newBuilder() + .setName( + SearchConfigName.of( + "[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[SEARCH_CONFIG]") + .toString()) + .setFacetProperty(FacetProperty.newBuilder().build()) + .setSearchCriteriaProperty(SearchCriteriaProperty.newBuilder().build()) + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateSearchConfig(searchConfig, updateMask); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getSearchConfigTest() throws Exception { + SearchConfig expectedResponse = + SearchConfig.newBuilder() + .setName( + SearchConfigName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[SEARCH_CONFIG]") + .toString()) + .setFacetProperty(FacetProperty.newBuilder().build()) + .setSearchCriteriaProperty(SearchCriteriaProperty.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + SearchConfigName name = + SearchConfigName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[SEARCH_CONFIG]"); + + SearchConfig actualResponse = client.getSearchConfig(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getSearchConfigExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + SearchConfigName name = + SearchConfigName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[SEARCH_CONFIG]"); + client.getSearchConfig(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getSearchConfigTest2() throws Exception { + SearchConfig expectedResponse = + SearchConfig.newBuilder() + .setName( + SearchConfigName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[SEARCH_CONFIG]") + .toString()) + .setFacetProperty(FacetProperty.newBuilder().build()) + .setSearchCriteriaProperty(SearchCriteriaProperty.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + String name = + "projects/project-4415/locations/location-4415/corpora/corpor-4415/searchConfigs/searchConfig-4415"; + + SearchConfig actualResponse = client.getSearchConfig(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getSearchConfigExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = + "projects/project-4415/locations/location-4415/corpora/corpor-4415/searchConfigs/searchConfig-4415"; + client.getSearchConfig(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteSearchConfigTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockService.addResponse(expectedResponse); + + SearchConfigName name = + SearchConfigName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[SEARCH_CONFIG]"); + + client.deleteSearchConfig(name); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void deleteSearchConfigExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + SearchConfigName name = + SearchConfigName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[SEARCH_CONFIG]"); + client.deleteSearchConfig(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteSearchConfigTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockService.addResponse(expectedResponse); + + String name = + "projects/project-4415/locations/location-4415/corpora/corpor-4415/searchConfigs/searchConfig-4415"; + + client.deleteSearchConfig(name); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void deleteSearchConfigExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = + "projects/project-4415/locations/location-4415/corpora/corpor-4415/searchConfigs/searchConfig-4415"; + client.deleteSearchConfig(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listSearchConfigsTest() throws Exception { + SearchConfig responsesElement = SearchConfig.newBuilder().build(); + ListSearchConfigsResponse expectedResponse = + ListSearchConfigsResponse.newBuilder() + .setNextPageToken("") + .addAllSearchConfigs(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + CorpusName parent = CorpusName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]"); + + ListSearchConfigsPagedResponse pagedListResponse = client.listSearchConfigs(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getSearchConfigsList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listSearchConfigsExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + CorpusName parent = CorpusName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]"); + client.listSearchConfigs(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listSearchConfigsTest2() throws Exception { + SearchConfig responsesElement = SearchConfig.newBuilder().build(); + ListSearchConfigsResponse expectedResponse = + ListSearchConfigsResponse.newBuilder() + .setNextPageToken("") + .addAllSearchConfigs(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "projects/project-7911/locations/location-7911/corpora/corpor-7911"; + + ListSearchConfigsPagedResponse pagedListResponse = client.listSearchConfigs(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getSearchConfigsList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listSearchConfigsExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-7911/locations/location-7911/corpora/corpor-7911"; + client.listSearchConfigs(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createSearchHypernymTest() throws Exception { + SearchHypernym expectedResponse = + SearchHypernym.newBuilder() + .setName( + SearchHypernymName.of( + "[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[SEARCH_HYPERNYM]") + .toString()) + .setHypernym("hypernym-114309610") + .addAllHyponyms(new ArrayList()) + .build(); + mockService.addResponse(expectedResponse); + + CorpusName parent = CorpusName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]"); + SearchHypernym searchHypernym = SearchHypernym.newBuilder().build(); + String searchHypernymId = "searchHypernymId-314707559"; + + SearchHypernym actualResponse = + client.createSearchHypernym(parent, searchHypernym, searchHypernymId); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createSearchHypernymExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + CorpusName parent = CorpusName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]"); + SearchHypernym searchHypernym = SearchHypernym.newBuilder().build(); + String searchHypernymId = "searchHypernymId-314707559"; + client.createSearchHypernym(parent, searchHypernym, searchHypernymId); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createSearchHypernymTest2() throws Exception { + SearchHypernym expectedResponse = + SearchHypernym.newBuilder() + .setName( + SearchHypernymName.of( + "[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[SEARCH_HYPERNYM]") + .toString()) + .setHypernym("hypernym-114309610") + .addAllHyponyms(new ArrayList()) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "projects/project-7911/locations/location-7911/corpora/corpor-7911"; + SearchHypernym searchHypernym = SearchHypernym.newBuilder().build(); + String searchHypernymId = "searchHypernymId-314707559"; + + SearchHypernym actualResponse = + client.createSearchHypernym(parent, searchHypernym, searchHypernymId); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createSearchHypernymExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-7911/locations/location-7911/corpora/corpor-7911"; + SearchHypernym searchHypernym = SearchHypernym.newBuilder().build(); + String searchHypernymId = "searchHypernymId-314707559"; + client.createSearchHypernym(parent, searchHypernym, searchHypernymId); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void updateSearchHypernymTest() throws Exception { + SearchHypernym expectedResponse = + SearchHypernym.newBuilder() + .setName( + SearchHypernymName.of( + "[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[SEARCH_HYPERNYM]") + .toString()) + .setHypernym("hypernym-114309610") + .addAllHyponyms(new ArrayList()) + .build(); + mockService.addResponse(expectedResponse); + + SearchHypernym searchHypernym = + SearchHypernym.newBuilder() + .setName( + SearchHypernymName.of( + "[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[SEARCH_HYPERNYM]") + .toString()) + .setHypernym("hypernym-114309610") + .addAllHyponyms(new ArrayList()) + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + SearchHypernym actualResponse = client.updateSearchHypernym(searchHypernym, updateMask); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void updateSearchHypernymExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + SearchHypernym searchHypernym = + SearchHypernym.newBuilder() + .setName( + SearchHypernymName.of( + "[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[SEARCH_HYPERNYM]") + .toString()) + .setHypernym("hypernym-114309610") + .addAllHyponyms(new ArrayList()) + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateSearchHypernym(searchHypernym, updateMask); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getSearchHypernymTest() throws Exception { + SearchHypernym expectedResponse = + SearchHypernym.newBuilder() + .setName( + SearchHypernymName.of( + "[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[SEARCH_HYPERNYM]") + .toString()) + .setHypernym("hypernym-114309610") + .addAllHyponyms(new ArrayList()) + .build(); + mockService.addResponse(expectedResponse); + + SearchHypernymName name = + SearchHypernymName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[SEARCH_HYPERNYM]"); + + SearchHypernym actualResponse = client.getSearchHypernym(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getSearchHypernymExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + SearchHypernymName name = + SearchHypernymName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[SEARCH_HYPERNYM]"); + client.getSearchHypernym(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getSearchHypernymTest2() throws Exception { + SearchHypernym expectedResponse = + SearchHypernym.newBuilder() + .setName( + SearchHypernymName.of( + "[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[SEARCH_HYPERNYM]") + .toString()) + .setHypernym("hypernym-114309610") + .addAllHyponyms(new ArrayList()) + .build(); + mockService.addResponse(expectedResponse); + + String name = + "projects/project-3909/locations/location-3909/corpora/corpor-3909/searchHypernyms/searchHypernym-3909"; + + SearchHypernym actualResponse = client.getSearchHypernym(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getSearchHypernymExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = + "projects/project-3909/locations/location-3909/corpora/corpor-3909/searchHypernyms/searchHypernym-3909"; + client.getSearchHypernym(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteSearchHypernymTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockService.addResponse(expectedResponse); + + SearchHypernymName name = + SearchHypernymName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[SEARCH_HYPERNYM]"); + + client.deleteSearchHypernym(name); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void deleteSearchHypernymExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + SearchHypernymName name = + SearchHypernymName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[SEARCH_HYPERNYM]"); + client.deleteSearchHypernym(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteSearchHypernymTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockService.addResponse(expectedResponse); + + String name = + "projects/project-3909/locations/location-3909/corpora/corpor-3909/searchHypernyms/searchHypernym-3909"; + + client.deleteSearchHypernym(name); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void deleteSearchHypernymExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = + "projects/project-3909/locations/location-3909/corpora/corpor-3909/searchHypernyms/searchHypernym-3909"; + client.deleteSearchHypernym(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listSearchHypernymsTest() throws Exception { + SearchHypernym responsesElement = SearchHypernym.newBuilder().build(); + ListSearchHypernymsResponse expectedResponse = + ListSearchHypernymsResponse.newBuilder() + .setNextPageToken("") + .addAllSearchHypernyms(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + CorpusName parent = CorpusName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]"); + + ListSearchHypernymsPagedResponse pagedListResponse = client.listSearchHypernyms(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getSearchHypernymsList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listSearchHypernymsExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + CorpusName parent = CorpusName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]"); + client.listSearchHypernyms(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listSearchHypernymsTest2() throws Exception { + SearchHypernym responsesElement = SearchHypernym.newBuilder().build(); + ListSearchHypernymsResponse expectedResponse = + ListSearchHypernymsResponse.newBuilder() + .setNextPageToken("") + .addAllSearchHypernyms(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "projects/project-7911/locations/location-7911/corpora/corpor-7911"; + + ListSearchHypernymsPagedResponse pagedListResponse = client.listSearchHypernyms(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getSearchHypernymsList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listSearchHypernymsExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-7911/locations/location-7911/corpora/corpor-7911"; + client.listSearchHypernyms(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void searchAssetsTest() throws Exception { + SearchResultItem responsesElement = SearchResultItem.newBuilder().build(); + SearchAssetsResponse expectedResponse = + SearchAssetsResponse.newBuilder() + .setNextPageToken("") + .addAllSearchResultItems(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + SearchAssetsRequest request = + SearchAssetsRequest.newBuilder() + .setCorpus(CorpusName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setContentTimeRanges(DateTimeRangeArray.newBuilder().build()) + .addAllCriteria(new ArrayList()) + .addAllFacetSelections(new ArrayList()) + .addAllResultAnnotationKeys(new ArrayList()) + .setSearchQuery("searchQuery-552137728") + .build(); + + SearchAssetsPagedResponse pagedListResponse = client.searchAssets(request); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getSearchResultItemsList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void searchAssetsExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + SearchAssetsRequest request = + SearchAssetsRequest.newBuilder() + .setCorpus(CorpusName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setContentTimeRanges(DateTimeRangeArray.newBuilder().build()) + .addAllCriteria(new ArrayList()) + .addAllFacetSelections(new ArrayList()) + .addAllResultAnnotationKeys(new ArrayList()) + .setSearchQuery("searchQuery-552137728") + .build(); + client.searchAssets(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void searchIndexEndpointTest() throws Exception { + SearchResultItem responsesElement = SearchResultItem.newBuilder().build(); + SearchIndexEndpointResponse expectedResponse = + SearchIndexEndpointResponse.newBuilder() + .setNextPageToken("") + .addAllSearchResultItems(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + SearchIndexEndpointRequest request = + SearchIndexEndpointRequest.newBuilder() + .setIndexEndpoint( + IndexEndpointName.of("[PROJECT]", "[LOCATION]", "[INDEX_ENDPOINT]").toString()) + .addAllCriteria(new ArrayList()) + .addAllExclusionCriteria(new ArrayList()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + + SearchIndexEndpointPagedResponse pagedListResponse = client.searchIndexEndpoint(request); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getSearchResultItemsList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void searchIndexEndpointExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + SearchIndexEndpointRequest request = + SearchIndexEndpointRequest.newBuilder() + .setIndexEndpoint( + IndexEndpointName.of("[PROJECT]", "[LOCATION]", "[INDEX_ENDPOINT]").toString()) + .addAllCriteria(new ArrayList()) + .addAllExclusionCriteria(new ArrayList()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + client.searchIndexEndpoint(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createIndexEndpointTest() throws Exception { + IndexEndpoint expectedResponse = + IndexEndpoint.newBuilder() + .setName(IndexEndpointName.of("[PROJECT]", "[LOCATION]", "[INDEX_ENDPOINT]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setDeployedIndex(DeployedIndex.newBuilder().build()) + .putAllLabels(new HashMap()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createIndexEndpointTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + IndexEndpoint indexEndpoint = IndexEndpoint.newBuilder().build(); + String indexEndpointId = "indexEndpointId-250889214"; + + IndexEndpoint actualResponse = + client.createIndexEndpointAsync(parent, indexEndpoint, indexEndpointId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createIndexEndpointExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + IndexEndpoint indexEndpoint = IndexEndpoint.newBuilder().build(); + String indexEndpointId = "indexEndpointId-250889214"; + client.createIndexEndpointAsync(parent, indexEndpoint, indexEndpointId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void createIndexEndpointTest2() throws Exception { + IndexEndpoint expectedResponse = + IndexEndpoint.newBuilder() + .setName(IndexEndpointName.of("[PROJECT]", "[LOCATION]", "[INDEX_ENDPOINT]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setDeployedIndex(DeployedIndex.newBuilder().build()) + .putAllLabels(new HashMap()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createIndexEndpointTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + String parent = "projects/project-5833/locations/location-5833"; + IndexEndpoint indexEndpoint = IndexEndpoint.newBuilder().build(); + String indexEndpointId = "indexEndpointId-250889214"; + + IndexEndpoint actualResponse = + client.createIndexEndpointAsync(parent, indexEndpoint, indexEndpointId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createIndexEndpointExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-5833/locations/location-5833"; + IndexEndpoint indexEndpoint = IndexEndpoint.newBuilder().build(); + String indexEndpointId = "indexEndpointId-250889214"; + client.createIndexEndpointAsync(parent, indexEndpoint, indexEndpointId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void getIndexEndpointTest() throws Exception { + IndexEndpoint expectedResponse = + IndexEndpoint.newBuilder() + .setName(IndexEndpointName.of("[PROJECT]", "[LOCATION]", "[INDEX_ENDPOINT]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setDeployedIndex(DeployedIndex.newBuilder().build()) + .putAllLabels(new HashMap()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + IndexEndpointName name = IndexEndpointName.of("[PROJECT]", "[LOCATION]", "[INDEX_ENDPOINT]"); + + IndexEndpoint actualResponse = client.getIndexEndpoint(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getIndexEndpointExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + IndexEndpointName name = IndexEndpointName.of("[PROJECT]", "[LOCATION]", "[INDEX_ENDPOINT]"); + client.getIndexEndpoint(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getIndexEndpointTest2() throws Exception { + IndexEndpoint expectedResponse = + IndexEndpoint.newBuilder() + .setName(IndexEndpointName.of("[PROJECT]", "[LOCATION]", "[INDEX_ENDPOINT]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setDeployedIndex(DeployedIndex.newBuilder().build()) + .putAllLabels(new HashMap()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + String name = "projects/project-1372/locations/location-1372/indexEndpoints/indexEndpoint-1372"; + + IndexEndpoint actualResponse = client.getIndexEndpoint(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getIndexEndpointExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = + "projects/project-1372/locations/location-1372/indexEndpoints/indexEndpoint-1372"; + client.getIndexEndpoint(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listIndexEndpointsTest() throws Exception { + IndexEndpoint responsesElement = IndexEndpoint.newBuilder().build(); + ListIndexEndpointsResponse expectedResponse = + ListIndexEndpointsResponse.newBuilder() + .setNextPageToken("") + .addAllIndexEndpoints(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + ListIndexEndpointsPagedResponse pagedListResponse = client.listIndexEndpoints(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getIndexEndpointsList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listIndexEndpointsExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + client.listIndexEndpoints(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listIndexEndpointsTest2() throws Exception { + IndexEndpoint responsesElement = IndexEndpoint.newBuilder().build(); + ListIndexEndpointsResponse expectedResponse = + ListIndexEndpointsResponse.newBuilder() + .setNextPageToken("") + .addAllIndexEndpoints(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "projects/project-5833/locations/location-5833"; + + ListIndexEndpointsPagedResponse pagedListResponse = client.listIndexEndpoints(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getIndexEndpointsList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listIndexEndpointsExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-5833/locations/location-5833"; + client.listIndexEndpoints(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void updateIndexEndpointTest() throws Exception { + IndexEndpoint expectedResponse = + IndexEndpoint.newBuilder() + .setName(IndexEndpointName.of("[PROJECT]", "[LOCATION]", "[INDEX_ENDPOINT]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setDeployedIndex(DeployedIndex.newBuilder().build()) + .putAllLabels(new HashMap()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("updateIndexEndpointTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + IndexEndpoint indexEndpoint = + IndexEndpoint.newBuilder() + .setName(IndexEndpointName.of("[PROJECT]", "[LOCATION]", "[INDEX_ENDPOINT]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setDeployedIndex(DeployedIndex.newBuilder().build()) + .putAllLabels(new HashMap()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + IndexEndpoint actualResponse = client.updateIndexEndpointAsync(indexEndpoint, updateMask).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void updateIndexEndpointExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + IndexEndpoint indexEndpoint = + IndexEndpoint.newBuilder() + .setName( + IndexEndpointName.of("[PROJECT]", "[LOCATION]", "[INDEX_ENDPOINT]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setDeployedIndex(DeployedIndex.newBuilder().build()) + .putAllLabels(new HashMap()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateIndexEndpointAsync(indexEndpoint, updateMask).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void deleteIndexEndpointTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteIndexEndpointTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + IndexEndpointName name = IndexEndpointName.of("[PROJECT]", "[LOCATION]", "[INDEX_ENDPOINT]"); + + client.deleteIndexEndpointAsync(name).get(); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void deleteIndexEndpointExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + IndexEndpointName name = IndexEndpointName.of("[PROJECT]", "[LOCATION]", "[INDEX_ENDPOINT]"); + client.deleteIndexEndpointAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void deleteIndexEndpointTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteIndexEndpointTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + String name = "projects/project-1372/locations/location-1372/indexEndpoints/indexEndpoint-1372"; + + client.deleteIndexEndpointAsync(name).get(); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void deleteIndexEndpointExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = + "projects/project-1372/locations/location-1372/indexEndpoints/indexEndpoint-1372"; + client.deleteIndexEndpointAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void deployIndexTest() throws Exception { + DeployIndexResponse expectedResponse = DeployIndexResponse.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deployIndexTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + DeployIndexRequest request = + DeployIndexRequest.newBuilder() + .setIndexEndpoint( + IndexEndpointName.of("[PROJECT]", "[LOCATION]", "[INDEX_ENDPOINT]").toString()) + .setDeployedIndex(DeployedIndex.newBuilder().build()) + .build(); + + DeployIndexResponse actualResponse = client.deployIndexAsync(request).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void deployIndexExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + DeployIndexRequest request = + DeployIndexRequest.newBuilder() + .setIndexEndpoint( + IndexEndpointName.of("[PROJECT]", "[LOCATION]", "[INDEX_ENDPOINT]").toString()) + .setDeployedIndex(DeployedIndex.newBuilder().build()) + .build(); + client.deployIndexAsync(request).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void undeployIndexTest() throws Exception { + UndeployIndexResponse expectedResponse = UndeployIndexResponse.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("undeployIndexTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + UndeployIndexRequest request = + UndeployIndexRequest.newBuilder() + .setIndexEndpoint( + IndexEndpointName.of("[PROJECT]", "[LOCATION]", "[INDEX_ENDPOINT]").toString()) + .build(); + + UndeployIndexResponse actualResponse = client.undeployIndexAsync(request).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void undeployIndexExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + UndeployIndexRequest request = + UndeployIndexRequest.newBuilder() + .setIndexEndpoint( + IndexEndpointName.of("[PROJECT]", "[LOCATION]", "[INDEX_ENDPOINT]").toString()) + .build(); + client.undeployIndexAsync(request).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void createCollectionTest() throws Exception { + Collection expectedResponse = + Collection.newBuilder() + .setName( + CollectionName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[COLLECTION]") + .toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createCollectionTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + CorpusName parent = CorpusName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]"); + Collection collection = Collection.newBuilder().build(); + String collectionId = "collectionId1636075609"; + + Collection actualResponse = + client.createCollectionAsync(parent, collection, collectionId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createCollectionExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + CorpusName parent = CorpusName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]"); + Collection collection = Collection.newBuilder().build(); + String collectionId = "collectionId1636075609"; + client.createCollectionAsync(parent, collection, collectionId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void createCollectionTest2() throws Exception { + Collection expectedResponse = + Collection.newBuilder() + .setName( + CollectionName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[COLLECTION]") + .toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createCollectionTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + String parent = "projects/project-7911/locations/location-7911/corpora/corpor-7911"; + Collection collection = Collection.newBuilder().build(); + String collectionId = "collectionId1636075609"; + + Collection actualResponse = + client.createCollectionAsync(parent, collection, collectionId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createCollectionExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-7911/locations/location-7911/corpora/corpor-7911"; + Collection collection = Collection.newBuilder().build(); + String collectionId = "collectionId1636075609"; + client.createCollectionAsync(parent, collection, collectionId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void deleteCollectionTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteCollectionTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + CollectionName name = + CollectionName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[COLLECTION]"); + + client.deleteCollectionAsync(name).get(); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void deleteCollectionExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + CollectionName name = + CollectionName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[COLLECTION]"); + client.deleteCollectionAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void deleteCollectionTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteCollectionTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + String name = + "projects/project-3989/locations/location-3989/corpora/corpor-3989/collections/collection-3989"; + + client.deleteCollectionAsync(name).get(); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void deleteCollectionExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = + "projects/project-3989/locations/location-3989/corpora/corpor-3989/collections/collection-3989"; + client.deleteCollectionAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void getCollectionTest() throws Exception { + Collection expectedResponse = + Collection.newBuilder() + .setName( + CollectionName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[COLLECTION]") + .toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .build(); + mockService.addResponse(expectedResponse); + + CollectionName name = + CollectionName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[COLLECTION]"); + + Collection actualResponse = client.getCollection(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getCollectionExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + CollectionName name = + CollectionName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[COLLECTION]"); + client.getCollection(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getCollectionTest2() throws Exception { + Collection expectedResponse = + Collection.newBuilder() + .setName( + CollectionName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[COLLECTION]") + .toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .build(); + mockService.addResponse(expectedResponse); + + String name = + "projects/project-3989/locations/location-3989/corpora/corpor-3989/collections/collection-3989"; + + Collection actualResponse = client.getCollection(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getCollectionExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = + "projects/project-3989/locations/location-3989/corpora/corpor-3989/collections/collection-3989"; + client.getCollection(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void updateCollectionTest() throws Exception { + Collection expectedResponse = + Collection.newBuilder() + .setName( + CollectionName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[COLLECTION]") + .toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .build(); + mockService.addResponse(expectedResponse); + + Collection collection = + Collection.newBuilder() + .setName( + CollectionName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[COLLECTION]") + .toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + Collection actualResponse = client.updateCollection(collection, updateMask); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void updateCollectionExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + Collection collection = + Collection.newBuilder() + .setName( + CollectionName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[COLLECTION]") + .toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateCollection(collection, updateMask); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listCollectionsTest() throws Exception { + Collection responsesElement = Collection.newBuilder().build(); + ListCollectionsResponse expectedResponse = + ListCollectionsResponse.newBuilder() + .setNextPageToken("") + .addAllCollections(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + CorpusName parent = CorpusName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]"); + + ListCollectionsPagedResponse pagedListResponse = client.listCollections(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getCollectionsList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listCollectionsExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + CorpusName parent = CorpusName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]"); + client.listCollections(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listCollectionsTest2() throws Exception { + Collection responsesElement = Collection.newBuilder().build(); + ListCollectionsResponse expectedResponse = + ListCollectionsResponse.newBuilder() + .setNextPageToken("") + .addAllCollections(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "projects/project-7911/locations/location-7911/corpora/corpor-7911"; + + ListCollectionsPagedResponse pagedListResponse = client.listCollections(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getCollectionsList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listCollectionsExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-7911/locations/location-7911/corpora/corpor-7911"; + client.listCollections(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void addCollectionItemTest() throws Exception { + AddCollectionItemResponse expectedResponse = + AddCollectionItemResponse.newBuilder().setItem(CollectionItem.newBuilder().build()).build(); + mockService.addResponse(expectedResponse); + + CollectionItem item = + CollectionItem.newBuilder() + .setCollection( + CollectionName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[COLLECTION]") + .toString()) + .setItemResource("itemResource287367233") + .build(); + + AddCollectionItemResponse actualResponse = client.addCollectionItem(item); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void addCollectionItemExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + CollectionItem item = + CollectionItem.newBuilder() + .setCollection( + CollectionName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[COLLECTION]") + .toString()) + .setItemResource("itemResource287367233") + .build(); + client.addCollectionItem(item); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void removeCollectionItemTest() throws Exception { + RemoveCollectionItemResponse expectedResponse = + RemoveCollectionItemResponse.newBuilder() + .setItem(CollectionItem.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + CollectionItem item = + CollectionItem.newBuilder() + .setCollection( + CollectionName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[COLLECTION]") + .toString()) + .setItemResource("itemResource287367233") + .build(); + + RemoveCollectionItemResponse actualResponse = client.removeCollectionItem(item); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void removeCollectionItemExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + CollectionItem item = + CollectionItem.newBuilder() + .setCollection( + CollectionName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[COLLECTION]") + .toString()) + .setItemResource("itemResource287367233") + .build(); + client.removeCollectionItem(item); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void viewCollectionItemsTest() throws Exception { + CollectionItem responsesElement = CollectionItem.newBuilder().build(); + ViewCollectionItemsResponse expectedResponse = + ViewCollectionItemsResponse.newBuilder() + .setNextPageToken("") + .addAllItems(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + CollectionName collection = + CollectionName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[COLLECTION]"); + + ViewCollectionItemsPagedResponse pagedListResponse = client.viewCollectionItems(collection); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getItemsList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void viewCollectionItemsExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + CollectionName collection = + CollectionName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[COLLECTION]"); + client.viewCollectionItems(collection); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void viewCollectionItemsTest2() throws Exception { + CollectionItem responsesElement = CollectionItem.newBuilder().build(); + ViewCollectionItemsResponse expectedResponse = + ViewCollectionItemsResponse.newBuilder() + .setNextPageToken("") + .addAllItems(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + String collection = + "projects/project-5278/locations/location-5278/corpora/corpor-5278/collections/collection-5278"; + + ViewCollectionItemsPagedResponse pagedListResponse = client.viewCollectionItems(collection); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getItemsList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void viewCollectionItemsExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String collection = + "projects/project-5278/locations/location-5278/corpora/corpor-5278/collections/collection-5278"; + client.viewCollectionItems(collection); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } +} diff --git a/java-visionai/google-cloud-visionai/src/test/java/com/google/cloud/visionai/v1/WarehouseClientTest.java b/java-visionai/google-cloud-visionai/src/test/java/com/google/cloud/visionai/v1/WarehouseClientTest.java new file mode 100644 index 000000000000..805c12825837 --- /dev/null +++ b/java-visionai/google-cloud-visionai/src/test/java/com/google/cloud/visionai/v1/WarehouseClientTest.java @@ -0,0 +1,4639 @@ +/* + * Copyright 2024 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.visionai.v1; + +import static com.google.cloud.visionai.v1.WarehouseClient.ListAnnotationsPagedResponse; +import static com.google.cloud.visionai.v1.WarehouseClient.ListAssetsPagedResponse; +import static com.google.cloud.visionai.v1.WarehouseClient.ListCollectionsPagedResponse; +import static com.google.cloud.visionai.v1.WarehouseClient.ListCorporaPagedResponse; +import static com.google.cloud.visionai.v1.WarehouseClient.ListDataSchemasPagedResponse; +import static com.google.cloud.visionai.v1.WarehouseClient.ListIndexEndpointsPagedResponse; +import static com.google.cloud.visionai.v1.WarehouseClient.ListIndexesPagedResponse; +import static com.google.cloud.visionai.v1.WarehouseClient.ListSearchConfigsPagedResponse; +import static com.google.cloud.visionai.v1.WarehouseClient.ListSearchHypernymsPagedResponse; +import static com.google.cloud.visionai.v1.WarehouseClient.SearchAssetsPagedResponse; +import static com.google.cloud.visionai.v1.WarehouseClient.SearchIndexEndpointPagedResponse; +import static com.google.cloud.visionai.v1.WarehouseClient.ViewCollectionItemsPagedResponse; +import static com.google.cloud.visionai.v1.WarehouseClient.ViewIndexedAssetsPagedResponse; + +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.grpc.testing.MockStreamObserver; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +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 com.google.common.collect.Lists; +import com.google.longrunning.Operation; +import com.google.protobuf.AbstractMessage; +import com.google.protobuf.Any; +import com.google.protobuf.Duration; +import com.google.protobuf.Empty; +import com.google.protobuf.FieldMask; +import com.google.protobuf.Timestamp; +import io.grpc.StatusRuntimeException; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.UUID; +import java.util.concurrent.ExecutionException; +import javax.annotation.Generated; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +@Generated("by gapic-generator-java") +public class WarehouseClientTest { + private static MockIAMPolicy mockIAMPolicy; + private static MockLocations mockLocations; + private static MockServiceHelper mockServiceHelper; + private static MockWarehouse mockWarehouse; + private LocalChannelProvider channelProvider; + private WarehouseClient client; + + @BeforeClass + public static void startStaticServer() { + mockWarehouse = new MockWarehouse(); + mockLocations = new MockLocations(); + mockIAMPolicy = new MockIAMPolicy(); + mockServiceHelper = + new MockServiceHelper( + UUID.randomUUID().toString(), + Arrays.asList(mockWarehouse, mockLocations, mockIAMPolicy)); + mockServiceHelper.start(); + } + + @AfterClass + public static void stopServer() { + mockServiceHelper.stop(); + } + + @Before + public void setUp() throws IOException { + mockServiceHelper.reset(); + channelProvider = mockServiceHelper.createChannelProvider(); + WarehouseSettings settings = + WarehouseSettings.newBuilder() + .setTransportChannelProvider(channelProvider) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = WarehouseClient.create(settings); + } + + @After + public void tearDown() throws Exception { + client.close(); + } + + @Test + public void createAssetTest() throws Exception { + Asset expectedResponse = + Asset.newBuilder() + .setName( + AssetName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[ASSET]").toString()) + .setTtl(Duration.newBuilder().build()) + .setAssetGcsSource(AssetSource.AssetGcsSource.newBuilder().build()) + .build(); + mockWarehouse.addResponse(expectedResponse); + + CorpusName parent = CorpusName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]"); + Asset asset = Asset.newBuilder().build(); + String assetId = "assetId-704776149"; + + Asset actualResponse = client.createAsset(parent, asset, assetId); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockWarehouse.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateAssetRequest actualRequest = ((CreateAssetRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(asset, actualRequest.getAsset()); + Assert.assertEquals(assetId, actualRequest.getAssetId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createAssetExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockWarehouse.addException(exception); + + try { + CorpusName parent = CorpusName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]"); + Asset asset = Asset.newBuilder().build(); + String assetId = "assetId-704776149"; + client.createAsset(parent, asset, assetId); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createAssetTest2() throws Exception { + Asset expectedResponse = + Asset.newBuilder() + .setName( + AssetName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[ASSET]").toString()) + .setTtl(Duration.newBuilder().build()) + .setAssetGcsSource(AssetSource.AssetGcsSource.newBuilder().build()) + .build(); + mockWarehouse.addResponse(expectedResponse); + + String parent = "parent-995424086"; + Asset asset = Asset.newBuilder().build(); + String assetId = "assetId-704776149"; + + Asset actualResponse = client.createAsset(parent, asset, assetId); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockWarehouse.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateAssetRequest actualRequest = ((CreateAssetRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(asset, actualRequest.getAsset()); + Assert.assertEquals(assetId, actualRequest.getAssetId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createAssetExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockWarehouse.addException(exception); + + try { + String parent = "parent-995424086"; + Asset asset = Asset.newBuilder().build(); + String assetId = "assetId-704776149"; + client.createAsset(parent, asset, assetId); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void updateAssetTest() throws Exception { + Asset expectedResponse = + Asset.newBuilder() + .setName( + AssetName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[ASSET]").toString()) + .setTtl(Duration.newBuilder().build()) + .setAssetGcsSource(AssetSource.AssetGcsSource.newBuilder().build()) + .build(); + mockWarehouse.addResponse(expectedResponse); + + Asset asset = Asset.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + Asset actualResponse = client.updateAsset(asset, updateMask); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockWarehouse.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpdateAssetRequest actualRequest = ((UpdateAssetRequest) actualRequests.get(0)); + + Assert.assertEquals(asset, actualRequest.getAsset()); + Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void updateAssetExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockWarehouse.addException(exception); + + try { + Asset asset = Asset.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateAsset(asset, updateMask); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getAssetTest() throws Exception { + Asset expectedResponse = + Asset.newBuilder() + .setName( + AssetName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[ASSET]").toString()) + .setTtl(Duration.newBuilder().build()) + .setAssetGcsSource(AssetSource.AssetGcsSource.newBuilder().build()) + .build(); + mockWarehouse.addResponse(expectedResponse); + + AssetName name = AssetName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[ASSET]"); + + Asset actualResponse = client.getAsset(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockWarehouse.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetAssetRequest actualRequest = ((GetAssetRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getAssetExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockWarehouse.addException(exception); + + try { + AssetName name = AssetName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[ASSET]"); + client.getAsset(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getAssetTest2() throws Exception { + Asset expectedResponse = + Asset.newBuilder() + .setName( + AssetName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[ASSET]").toString()) + .setTtl(Duration.newBuilder().build()) + .setAssetGcsSource(AssetSource.AssetGcsSource.newBuilder().build()) + .build(); + mockWarehouse.addResponse(expectedResponse); + + String name = "name3373707"; + + Asset actualResponse = client.getAsset(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockWarehouse.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetAssetRequest actualRequest = ((GetAssetRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getAssetExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockWarehouse.addException(exception); + + try { + String name = "name3373707"; + client.getAsset(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listAssetsTest() throws Exception { + Asset responsesElement = Asset.newBuilder().build(); + ListAssetsResponse expectedResponse = + ListAssetsResponse.newBuilder() + .setNextPageToken("") + .addAllAssets(Arrays.asList(responsesElement)) + .build(); + mockWarehouse.addResponse(expectedResponse); + + CorpusName parent = CorpusName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]"); + + ListAssetsPagedResponse pagedListResponse = client.listAssets(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getAssetsList().get(0), resources.get(0)); + + List actualRequests = mockWarehouse.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListAssetsRequest actualRequest = ((ListAssetsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listAssetsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockWarehouse.addException(exception); + + try { + CorpusName parent = CorpusName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]"); + client.listAssets(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listAssetsTest2() throws Exception { + Asset responsesElement = Asset.newBuilder().build(); + ListAssetsResponse expectedResponse = + ListAssetsResponse.newBuilder() + .setNextPageToken("") + .addAllAssets(Arrays.asList(responsesElement)) + .build(); + mockWarehouse.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListAssetsPagedResponse pagedListResponse = client.listAssets(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getAssetsList().get(0), resources.get(0)); + + List actualRequests = mockWarehouse.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListAssetsRequest actualRequest = ((ListAssetsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listAssetsExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockWarehouse.addException(exception); + + try { + String parent = "parent-995424086"; + client.listAssets(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteAssetTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteAssetTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockWarehouse.addResponse(resultOperation); + + AssetName name = AssetName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[ASSET]"); + + client.deleteAssetAsync(name).get(); + + List actualRequests = mockWarehouse.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteAssetRequest actualRequest = ((DeleteAssetRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteAssetExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockWarehouse.addException(exception); + + try { + AssetName name = AssetName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[ASSET]"); + client.deleteAssetAsync(name).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()); + } + } + + @Test + public void deleteAssetTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteAssetTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockWarehouse.addResponse(resultOperation); + + String name = "name3373707"; + + client.deleteAssetAsync(name).get(); + + List actualRequests = mockWarehouse.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteAssetRequest actualRequest = ((DeleteAssetRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteAssetExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockWarehouse.addException(exception); + + try { + String name = "name3373707"; + client.deleteAssetAsync(name).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()); + } + } + + @Test + public void uploadAssetTest() throws Exception { + UploadAssetResponse expectedResponse = UploadAssetResponse.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("uploadAssetTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockWarehouse.addResponse(resultOperation); + + UploadAssetRequest request = + UploadAssetRequest.newBuilder() + .setName( + AssetName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[ASSET]").toString()) + .setAssetSource(AssetSource.newBuilder().build()) + .build(); + + UploadAssetResponse actualResponse = client.uploadAssetAsync(request).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockWarehouse.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UploadAssetRequest actualRequest = ((UploadAssetRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getName(), actualRequest.getName()); + Assert.assertEquals(request.getAssetSource(), actualRequest.getAssetSource()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void uploadAssetExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockWarehouse.addException(exception); + + try { + UploadAssetRequest request = + UploadAssetRequest.newBuilder() + .setName( + AssetName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[ASSET]").toString()) + .setAssetSource(AssetSource.newBuilder().build()) + .build(); + client.uploadAssetAsync(request).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()); + } + } + + @Test + public void generateRetrievalUrlTest() throws Exception { + GenerateRetrievalUrlResponse expectedResponse = + GenerateRetrievalUrlResponse.newBuilder().setSignedUri("signedUri1076770992").build(); + mockWarehouse.addResponse(expectedResponse); + + GenerateRetrievalUrlRequest request = + GenerateRetrievalUrlRequest.newBuilder() + .setName( + AssetName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[ASSET]").toString()) + .build(); + + GenerateRetrievalUrlResponse actualResponse = client.generateRetrievalUrl(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockWarehouse.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GenerateRetrievalUrlRequest actualRequest = + ((GenerateRetrievalUrlRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getName(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void generateRetrievalUrlExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockWarehouse.addException(exception); + + try { + GenerateRetrievalUrlRequest request = + GenerateRetrievalUrlRequest.newBuilder() + .setName( + AssetName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[ASSET]").toString()) + .build(); + client.generateRetrievalUrl(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void analyzeAssetTest() throws Exception { + AnalyzeAssetResponse expectedResponse = AnalyzeAssetResponse.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("analyzeAssetTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockWarehouse.addResponse(resultOperation); + + AnalyzeAssetRequest request = + AnalyzeAssetRequest.newBuilder() + .setName( + AssetName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[ASSET]").toString()) + .build(); + + AnalyzeAssetResponse actualResponse = client.analyzeAssetAsync(request).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockWarehouse.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + AnalyzeAssetRequest actualRequest = ((AnalyzeAssetRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getName(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void analyzeAssetExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockWarehouse.addException(exception); + + try { + AnalyzeAssetRequest request = + AnalyzeAssetRequest.newBuilder() + .setName( + AssetName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[ASSET]").toString()) + .build(); + client.analyzeAssetAsync(request).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()); + } + } + + @Test + public void indexAssetTest() throws Exception { + IndexAssetResponse expectedResponse = IndexAssetResponse.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("indexAssetTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockWarehouse.addResponse(resultOperation); + + IndexAssetRequest request = + IndexAssetRequest.newBuilder() + .setName( + AssetName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[ASSET]").toString()) + .setIndex( + IndexName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[INDEX]").toString()) + .build(); + + IndexAssetResponse actualResponse = client.indexAssetAsync(request).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockWarehouse.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + IndexAssetRequest actualRequest = ((IndexAssetRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getName(), actualRequest.getName()); + Assert.assertEquals(request.getIndex(), actualRequest.getIndex()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void indexAssetExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockWarehouse.addException(exception); + + try { + IndexAssetRequest request = + IndexAssetRequest.newBuilder() + .setName( + AssetName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[ASSET]").toString()) + .setIndex( + IndexName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[INDEX]").toString()) + .build(); + client.indexAssetAsync(request).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()); + } + } + + @Test + public void removeIndexAssetTest() throws Exception { + RemoveIndexAssetResponse expectedResponse = RemoveIndexAssetResponse.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("removeIndexAssetTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockWarehouse.addResponse(resultOperation); + + RemoveIndexAssetRequest request = + RemoveIndexAssetRequest.newBuilder() + .setName( + AssetName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[ASSET]").toString()) + .setIndex( + IndexName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[INDEX]").toString()) + .build(); + + RemoveIndexAssetResponse actualResponse = client.removeIndexAssetAsync(request).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockWarehouse.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + RemoveIndexAssetRequest actualRequest = ((RemoveIndexAssetRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getName(), actualRequest.getName()); + Assert.assertEquals(request.getIndex(), actualRequest.getIndex()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void removeIndexAssetExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockWarehouse.addException(exception); + + try { + RemoveIndexAssetRequest request = + RemoveIndexAssetRequest.newBuilder() + .setName( + AssetName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[ASSET]").toString()) + .setIndex( + IndexName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[INDEX]").toString()) + .build(); + client.removeIndexAssetAsync(request).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()); + } + } + + @Test + public void viewIndexedAssetsTest() throws Exception { + IndexedAsset responsesElement = IndexedAsset.newBuilder().build(); + ViewIndexedAssetsResponse expectedResponse = + ViewIndexedAssetsResponse.newBuilder() + .setNextPageToken("") + .addAllIndexedAssets(Arrays.asList(responsesElement)) + .build(); + mockWarehouse.addResponse(expectedResponse); + + IndexName index = IndexName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[INDEX]"); + + ViewIndexedAssetsPagedResponse pagedListResponse = client.viewIndexedAssets(index); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getIndexedAssetsList().get(0), resources.get(0)); + + List actualRequests = mockWarehouse.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ViewIndexedAssetsRequest actualRequest = ((ViewIndexedAssetsRequest) actualRequests.get(0)); + + Assert.assertEquals(index.toString(), actualRequest.getIndex()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void viewIndexedAssetsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockWarehouse.addException(exception); + + try { + IndexName index = IndexName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[INDEX]"); + client.viewIndexedAssets(index); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void viewIndexedAssetsTest2() throws Exception { + IndexedAsset responsesElement = IndexedAsset.newBuilder().build(); + ViewIndexedAssetsResponse expectedResponse = + ViewIndexedAssetsResponse.newBuilder() + .setNextPageToken("") + .addAllIndexedAssets(Arrays.asList(responsesElement)) + .build(); + mockWarehouse.addResponse(expectedResponse); + + String index = "index100346066"; + + ViewIndexedAssetsPagedResponse pagedListResponse = client.viewIndexedAssets(index); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getIndexedAssetsList().get(0), resources.get(0)); + + List actualRequests = mockWarehouse.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ViewIndexedAssetsRequest actualRequest = ((ViewIndexedAssetsRequest) actualRequests.get(0)); + + Assert.assertEquals(index, actualRequest.getIndex()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void viewIndexedAssetsExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockWarehouse.addException(exception); + + try { + String index = "index100346066"; + client.viewIndexedAssets(index); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createIndexTest() throws Exception { + Index expectedResponse = + Index.newBuilder() + .setName( + IndexName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[INDEX]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .addAllDeployedIndexes(new ArrayList()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createIndexTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockWarehouse.addResponse(resultOperation); + + CorpusName parent = CorpusName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]"); + Index index = Index.newBuilder().build(); + String indexId = "indexId1943291277"; + + Index actualResponse = client.createIndexAsync(parent, index, indexId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockWarehouse.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateIndexRequest actualRequest = ((CreateIndexRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(index, actualRequest.getIndex()); + Assert.assertEquals(indexId, actualRequest.getIndexId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createIndexExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockWarehouse.addException(exception); + + try { + CorpusName parent = CorpusName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]"); + Index index = Index.newBuilder().build(); + String indexId = "indexId1943291277"; + client.createIndexAsync(parent, index, indexId).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()); + } + } + + @Test + public void createIndexTest2() throws Exception { + Index expectedResponse = + Index.newBuilder() + .setName( + IndexName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[INDEX]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .addAllDeployedIndexes(new ArrayList()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createIndexTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockWarehouse.addResponse(resultOperation); + + String parent = "parent-995424086"; + Index index = Index.newBuilder().build(); + String indexId = "indexId1943291277"; + + Index actualResponse = client.createIndexAsync(parent, index, indexId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockWarehouse.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateIndexRequest actualRequest = ((CreateIndexRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(index, actualRequest.getIndex()); + Assert.assertEquals(indexId, actualRequest.getIndexId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createIndexExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockWarehouse.addException(exception); + + try { + String parent = "parent-995424086"; + Index index = Index.newBuilder().build(); + String indexId = "indexId1943291277"; + client.createIndexAsync(parent, index, indexId).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()); + } + } + + @Test + public void updateIndexTest() throws Exception { + Index expectedResponse = + Index.newBuilder() + .setName( + IndexName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[INDEX]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .addAllDeployedIndexes(new ArrayList()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("updateIndexTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockWarehouse.addResponse(resultOperation); + + Index index = Index.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + Index actualResponse = client.updateIndexAsync(index, updateMask).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockWarehouse.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpdateIndexRequest actualRequest = ((UpdateIndexRequest) actualRequests.get(0)); + + Assert.assertEquals(index, actualRequest.getIndex()); + Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void updateIndexExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockWarehouse.addException(exception); + + try { + Index index = Index.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateIndexAsync(index, updateMask).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()); + } + } + + @Test + public void getIndexTest() throws Exception { + Index expectedResponse = + Index.newBuilder() + .setName( + IndexName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[INDEX]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .addAllDeployedIndexes(new ArrayList()) + .build(); + mockWarehouse.addResponse(expectedResponse); + + IndexName name = IndexName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[INDEX]"); + + Index actualResponse = client.getIndex(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockWarehouse.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetIndexRequest actualRequest = ((GetIndexRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getIndexExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockWarehouse.addException(exception); + + try { + IndexName name = IndexName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[INDEX]"); + client.getIndex(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getIndexTest2() throws Exception { + Index expectedResponse = + Index.newBuilder() + .setName( + IndexName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[INDEX]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .addAllDeployedIndexes(new ArrayList()) + .build(); + mockWarehouse.addResponse(expectedResponse); + + String name = "name3373707"; + + Index actualResponse = client.getIndex(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockWarehouse.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetIndexRequest actualRequest = ((GetIndexRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getIndexExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockWarehouse.addException(exception); + + try { + String name = "name3373707"; + client.getIndex(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listIndexesTest() throws Exception { + Index responsesElement = Index.newBuilder().build(); + ListIndexesResponse expectedResponse = + ListIndexesResponse.newBuilder() + .setNextPageToken("") + .addAllIndexes(Arrays.asList(responsesElement)) + .build(); + mockWarehouse.addResponse(expectedResponse); + + CorpusName parent = CorpusName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]"); + + ListIndexesPagedResponse pagedListResponse = client.listIndexes(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getIndexesList().get(0), resources.get(0)); + + List actualRequests = mockWarehouse.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListIndexesRequest actualRequest = ((ListIndexesRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listIndexesExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockWarehouse.addException(exception); + + try { + CorpusName parent = CorpusName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]"); + client.listIndexes(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listIndexesTest2() throws Exception { + Index responsesElement = Index.newBuilder().build(); + ListIndexesResponse expectedResponse = + ListIndexesResponse.newBuilder() + .setNextPageToken("") + .addAllIndexes(Arrays.asList(responsesElement)) + .build(); + mockWarehouse.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListIndexesPagedResponse pagedListResponse = client.listIndexes(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getIndexesList().get(0), resources.get(0)); + + List actualRequests = mockWarehouse.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListIndexesRequest actualRequest = ((ListIndexesRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listIndexesExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockWarehouse.addException(exception); + + try { + String parent = "parent-995424086"; + client.listIndexes(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteIndexTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteIndexTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockWarehouse.addResponse(resultOperation); + + IndexName name = IndexName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[INDEX]"); + + client.deleteIndexAsync(name).get(); + + List actualRequests = mockWarehouse.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteIndexRequest actualRequest = ((DeleteIndexRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteIndexExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockWarehouse.addException(exception); + + try { + IndexName name = IndexName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[INDEX]"); + client.deleteIndexAsync(name).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()); + } + } + + @Test + public void deleteIndexTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteIndexTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockWarehouse.addResponse(resultOperation); + + String name = "name3373707"; + + client.deleteIndexAsync(name).get(); + + List actualRequests = mockWarehouse.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteIndexRequest actualRequest = ((DeleteIndexRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteIndexExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockWarehouse.addException(exception); + + try { + String name = "name3373707"; + client.deleteIndexAsync(name).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()); + } + } + + @Test + public void createCorpusTest() throws Exception { + Corpus expectedResponse = + Corpus.newBuilder() + .setName(CorpusName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setDefaultTtl(Duration.newBuilder().build()) + .setSearchCapabilitySetting(SearchCapabilitySetting.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createCorpusTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockWarehouse.addResponse(resultOperation); + + String parent = "parent-995424086"; + Corpus corpus = Corpus.newBuilder().build(); + + Corpus actualResponse = client.createCorpusAsync(parent, corpus).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockWarehouse.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateCorpusRequest actualRequest = ((CreateCorpusRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(corpus, actualRequest.getCorpus()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createCorpusExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockWarehouse.addException(exception); + + try { + String parent = "parent-995424086"; + Corpus corpus = Corpus.newBuilder().build(); + client.createCorpusAsync(parent, corpus).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()); + } + } + + @Test + public void getCorpusTest() throws Exception { + Corpus expectedResponse = + Corpus.newBuilder() + .setName(CorpusName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setDefaultTtl(Duration.newBuilder().build()) + .setSearchCapabilitySetting(SearchCapabilitySetting.newBuilder().build()) + .build(); + mockWarehouse.addResponse(expectedResponse); + + CorpusName name = CorpusName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]"); + + Corpus actualResponse = client.getCorpus(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockWarehouse.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetCorpusRequest actualRequest = ((GetCorpusRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getCorpusExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockWarehouse.addException(exception); + + try { + CorpusName name = CorpusName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]"); + client.getCorpus(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getCorpusTest2() throws Exception { + Corpus expectedResponse = + Corpus.newBuilder() + .setName(CorpusName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setDefaultTtl(Duration.newBuilder().build()) + .setSearchCapabilitySetting(SearchCapabilitySetting.newBuilder().build()) + .build(); + mockWarehouse.addResponse(expectedResponse); + + String name = "name3373707"; + + Corpus actualResponse = client.getCorpus(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockWarehouse.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetCorpusRequest actualRequest = ((GetCorpusRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getCorpusExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockWarehouse.addException(exception); + + try { + String name = "name3373707"; + client.getCorpus(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void updateCorpusTest() throws Exception { + Corpus expectedResponse = + Corpus.newBuilder() + .setName(CorpusName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setDefaultTtl(Duration.newBuilder().build()) + .setSearchCapabilitySetting(SearchCapabilitySetting.newBuilder().build()) + .build(); + mockWarehouse.addResponse(expectedResponse); + + Corpus corpus = Corpus.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + Corpus actualResponse = client.updateCorpus(corpus, updateMask); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockWarehouse.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpdateCorpusRequest actualRequest = ((UpdateCorpusRequest) actualRequests.get(0)); + + Assert.assertEquals(corpus, actualRequest.getCorpus()); + Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void updateCorpusExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockWarehouse.addException(exception); + + try { + Corpus corpus = Corpus.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateCorpus(corpus, updateMask); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listCorporaTest() throws Exception { + Corpus responsesElement = Corpus.newBuilder().build(); + ListCorporaResponse expectedResponse = + ListCorporaResponse.newBuilder() + .setNextPageToken("") + .addAllCorpora(Arrays.asList(responsesElement)) + .build(); + mockWarehouse.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListCorporaPagedResponse pagedListResponse = client.listCorpora(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getCorporaList().get(0), resources.get(0)); + + List actualRequests = mockWarehouse.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListCorporaRequest actualRequest = ((ListCorporaRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listCorporaExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockWarehouse.addException(exception); + + try { + String parent = "parent-995424086"; + client.listCorpora(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteCorpusTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockWarehouse.addResponse(expectedResponse); + + CorpusName name = CorpusName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]"); + + client.deleteCorpus(name); + + List actualRequests = mockWarehouse.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteCorpusRequest actualRequest = ((DeleteCorpusRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteCorpusExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockWarehouse.addException(exception); + + try { + CorpusName name = CorpusName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]"); + client.deleteCorpus(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteCorpusTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockWarehouse.addResponse(expectedResponse); + + String name = "name3373707"; + + client.deleteCorpus(name); + + List actualRequests = mockWarehouse.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteCorpusRequest actualRequest = ((DeleteCorpusRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteCorpusExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockWarehouse.addException(exception); + + try { + String name = "name3373707"; + client.deleteCorpus(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void analyzeCorpusTest() throws Exception { + AnalyzeCorpusResponse expectedResponse = AnalyzeCorpusResponse.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("analyzeCorpusTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockWarehouse.addResponse(resultOperation); + + AnalyzeCorpusRequest request = + AnalyzeCorpusRequest.newBuilder() + .setName(CorpusName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]").toString()) + .build(); + + AnalyzeCorpusResponse actualResponse = client.analyzeCorpusAsync(request).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockWarehouse.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + AnalyzeCorpusRequest actualRequest = ((AnalyzeCorpusRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getName(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void analyzeCorpusExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockWarehouse.addException(exception); + + try { + AnalyzeCorpusRequest request = + AnalyzeCorpusRequest.newBuilder() + .setName(CorpusName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]").toString()) + .build(); + client.analyzeCorpusAsync(request).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()); + } + } + + @Test + public void createDataSchemaTest() throws Exception { + DataSchema expectedResponse = + DataSchema.newBuilder() + .setName( + DataSchemaName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[DATA_SCHEMA]") + .toString()) + .setKey("key106079") + .setSchemaDetails(DataSchemaDetails.newBuilder().build()) + .build(); + mockWarehouse.addResponse(expectedResponse); + + CorpusName parent = CorpusName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]"); + DataSchema dataSchema = DataSchema.newBuilder().build(); + + DataSchema actualResponse = client.createDataSchema(parent, dataSchema); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockWarehouse.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateDataSchemaRequest actualRequest = ((CreateDataSchemaRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(dataSchema, actualRequest.getDataSchema()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createDataSchemaExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockWarehouse.addException(exception); + + try { + CorpusName parent = CorpusName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]"); + DataSchema dataSchema = DataSchema.newBuilder().build(); + client.createDataSchema(parent, dataSchema); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createDataSchemaTest2() throws Exception { + DataSchema expectedResponse = + DataSchema.newBuilder() + .setName( + DataSchemaName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[DATA_SCHEMA]") + .toString()) + .setKey("key106079") + .setSchemaDetails(DataSchemaDetails.newBuilder().build()) + .build(); + mockWarehouse.addResponse(expectedResponse); + + String parent = "parent-995424086"; + DataSchema dataSchema = DataSchema.newBuilder().build(); + + DataSchema actualResponse = client.createDataSchema(parent, dataSchema); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockWarehouse.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateDataSchemaRequest actualRequest = ((CreateDataSchemaRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(dataSchema, actualRequest.getDataSchema()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createDataSchemaExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockWarehouse.addException(exception); + + try { + String parent = "parent-995424086"; + DataSchema dataSchema = DataSchema.newBuilder().build(); + client.createDataSchema(parent, dataSchema); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void updateDataSchemaTest() throws Exception { + DataSchema expectedResponse = + DataSchema.newBuilder() + .setName( + DataSchemaName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[DATA_SCHEMA]") + .toString()) + .setKey("key106079") + .setSchemaDetails(DataSchemaDetails.newBuilder().build()) + .build(); + mockWarehouse.addResponse(expectedResponse); + + DataSchema dataSchema = DataSchema.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + DataSchema actualResponse = client.updateDataSchema(dataSchema, updateMask); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockWarehouse.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpdateDataSchemaRequest actualRequest = ((UpdateDataSchemaRequest) actualRequests.get(0)); + + Assert.assertEquals(dataSchema, actualRequest.getDataSchema()); + Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void updateDataSchemaExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockWarehouse.addException(exception); + + try { + DataSchema dataSchema = DataSchema.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateDataSchema(dataSchema, updateMask); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getDataSchemaTest() throws Exception { + DataSchema expectedResponse = + DataSchema.newBuilder() + .setName( + DataSchemaName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[DATA_SCHEMA]") + .toString()) + .setKey("key106079") + .setSchemaDetails(DataSchemaDetails.newBuilder().build()) + .build(); + mockWarehouse.addResponse(expectedResponse); + + DataSchemaName name = + DataSchemaName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[DATA_SCHEMA]"); + + DataSchema actualResponse = client.getDataSchema(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockWarehouse.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetDataSchemaRequest actualRequest = ((GetDataSchemaRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getDataSchemaExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockWarehouse.addException(exception); + + try { + DataSchemaName name = + DataSchemaName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[DATA_SCHEMA]"); + client.getDataSchema(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getDataSchemaTest2() throws Exception { + DataSchema expectedResponse = + DataSchema.newBuilder() + .setName( + DataSchemaName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[DATA_SCHEMA]") + .toString()) + .setKey("key106079") + .setSchemaDetails(DataSchemaDetails.newBuilder().build()) + .build(); + mockWarehouse.addResponse(expectedResponse); + + String name = "name3373707"; + + DataSchema actualResponse = client.getDataSchema(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockWarehouse.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetDataSchemaRequest actualRequest = ((GetDataSchemaRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getDataSchemaExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockWarehouse.addException(exception); + + try { + String name = "name3373707"; + client.getDataSchema(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteDataSchemaTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockWarehouse.addResponse(expectedResponse); + + DataSchemaName name = + DataSchemaName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[DATA_SCHEMA]"); + + client.deleteDataSchema(name); + + List actualRequests = mockWarehouse.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteDataSchemaRequest actualRequest = ((DeleteDataSchemaRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteDataSchemaExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockWarehouse.addException(exception); + + try { + DataSchemaName name = + DataSchemaName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[DATA_SCHEMA]"); + client.deleteDataSchema(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteDataSchemaTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockWarehouse.addResponse(expectedResponse); + + String name = "name3373707"; + + client.deleteDataSchema(name); + + List actualRequests = mockWarehouse.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteDataSchemaRequest actualRequest = ((DeleteDataSchemaRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteDataSchemaExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockWarehouse.addException(exception); + + try { + String name = "name3373707"; + client.deleteDataSchema(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listDataSchemasTest() throws Exception { + DataSchema responsesElement = DataSchema.newBuilder().build(); + ListDataSchemasResponse expectedResponse = + ListDataSchemasResponse.newBuilder() + .setNextPageToken("") + .addAllDataSchemas(Arrays.asList(responsesElement)) + .build(); + mockWarehouse.addResponse(expectedResponse); + + CorpusName parent = CorpusName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]"); + + ListDataSchemasPagedResponse pagedListResponse = client.listDataSchemas(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getDataSchemasList().get(0), resources.get(0)); + + List actualRequests = mockWarehouse.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListDataSchemasRequest actualRequest = ((ListDataSchemasRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listDataSchemasExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockWarehouse.addException(exception); + + try { + CorpusName parent = CorpusName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]"); + client.listDataSchemas(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listDataSchemasTest2() throws Exception { + DataSchema responsesElement = DataSchema.newBuilder().build(); + ListDataSchemasResponse expectedResponse = + ListDataSchemasResponse.newBuilder() + .setNextPageToken("") + .addAllDataSchemas(Arrays.asList(responsesElement)) + .build(); + mockWarehouse.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListDataSchemasPagedResponse pagedListResponse = client.listDataSchemas(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getDataSchemasList().get(0), resources.get(0)); + + List actualRequests = mockWarehouse.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListDataSchemasRequest actualRequest = ((ListDataSchemasRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listDataSchemasExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockWarehouse.addException(exception); + + try { + String parent = "parent-995424086"; + client.listDataSchemas(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createAnnotationTest() throws Exception { + Annotation expectedResponse = + Annotation.newBuilder() + .setName( + AnnotationName.of( + "[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[ASSET]", "[ANNOTATION]") + .toString()) + .setUserSpecifiedAnnotation(UserSpecifiedAnnotation.newBuilder().build()) + .build(); + mockWarehouse.addResponse(expectedResponse); + + AssetName parent = AssetName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[ASSET]"); + Annotation annotation = Annotation.newBuilder().build(); + String annotationId = "annotationId251782314"; + + Annotation actualResponse = client.createAnnotation(parent, annotation, annotationId); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockWarehouse.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateAnnotationRequest actualRequest = ((CreateAnnotationRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(annotation, actualRequest.getAnnotation()); + Assert.assertEquals(annotationId, actualRequest.getAnnotationId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createAnnotationExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockWarehouse.addException(exception); + + try { + AssetName parent = AssetName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[ASSET]"); + Annotation annotation = Annotation.newBuilder().build(); + String annotationId = "annotationId251782314"; + client.createAnnotation(parent, annotation, annotationId); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createAnnotationTest2() throws Exception { + Annotation expectedResponse = + Annotation.newBuilder() + .setName( + AnnotationName.of( + "[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[ASSET]", "[ANNOTATION]") + .toString()) + .setUserSpecifiedAnnotation(UserSpecifiedAnnotation.newBuilder().build()) + .build(); + mockWarehouse.addResponse(expectedResponse); + + String parent = "parent-995424086"; + Annotation annotation = Annotation.newBuilder().build(); + String annotationId = "annotationId251782314"; + + Annotation actualResponse = client.createAnnotation(parent, annotation, annotationId); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockWarehouse.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateAnnotationRequest actualRequest = ((CreateAnnotationRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(annotation, actualRequest.getAnnotation()); + Assert.assertEquals(annotationId, actualRequest.getAnnotationId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createAnnotationExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockWarehouse.addException(exception); + + try { + String parent = "parent-995424086"; + Annotation annotation = Annotation.newBuilder().build(); + String annotationId = "annotationId251782314"; + client.createAnnotation(parent, annotation, annotationId); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getAnnotationTest() throws Exception { + Annotation expectedResponse = + Annotation.newBuilder() + .setName( + AnnotationName.of( + "[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[ASSET]", "[ANNOTATION]") + .toString()) + .setUserSpecifiedAnnotation(UserSpecifiedAnnotation.newBuilder().build()) + .build(); + mockWarehouse.addResponse(expectedResponse); + + AnnotationName name = + AnnotationName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[ASSET]", "[ANNOTATION]"); + + Annotation actualResponse = client.getAnnotation(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockWarehouse.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetAnnotationRequest actualRequest = ((GetAnnotationRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getAnnotationExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockWarehouse.addException(exception); + + try { + AnnotationName name = + AnnotationName.of( + "[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[ASSET]", "[ANNOTATION]"); + client.getAnnotation(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getAnnotationTest2() throws Exception { + Annotation expectedResponse = + Annotation.newBuilder() + .setName( + AnnotationName.of( + "[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[ASSET]", "[ANNOTATION]") + .toString()) + .setUserSpecifiedAnnotation(UserSpecifiedAnnotation.newBuilder().build()) + .build(); + mockWarehouse.addResponse(expectedResponse); + + String name = "name3373707"; + + Annotation actualResponse = client.getAnnotation(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockWarehouse.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetAnnotationRequest actualRequest = ((GetAnnotationRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getAnnotationExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockWarehouse.addException(exception); + + try { + String name = "name3373707"; + client.getAnnotation(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listAnnotationsTest() throws Exception { + Annotation responsesElement = Annotation.newBuilder().build(); + ListAnnotationsResponse expectedResponse = + ListAnnotationsResponse.newBuilder() + .setNextPageToken("") + .addAllAnnotations(Arrays.asList(responsesElement)) + .build(); + mockWarehouse.addResponse(expectedResponse); + + AssetName parent = AssetName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[ASSET]"); + + ListAnnotationsPagedResponse pagedListResponse = client.listAnnotations(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getAnnotationsList().get(0), resources.get(0)); + + List actualRequests = mockWarehouse.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListAnnotationsRequest actualRequest = ((ListAnnotationsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listAnnotationsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockWarehouse.addException(exception); + + try { + AssetName parent = AssetName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[ASSET]"); + client.listAnnotations(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listAnnotationsTest2() throws Exception { + Annotation responsesElement = Annotation.newBuilder().build(); + ListAnnotationsResponse expectedResponse = + ListAnnotationsResponse.newBuilder() + .setNextPageToken("") + .addAllAnnotations(Arrays.asList(responsesElement)) + .build(); + mockWarehouse.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListAnnotationsPagedResponse pagedListResponse = client.listAnnotations(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getAnnotationsList().get(0), resources.get(0)); + + List actualRequests = mockWarehouse.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListAnnotationsRequest actualRequest = ((ListAnnotationsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listAnnotationsExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockWarehouse.addException(exception); + + try { + String parent = "parent-995424086"; + client.listAnnotations(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void updateAnnotationTest() throws Exception { + Annotation expectedResponse = + Annotation.newBuilder() + .setName( + AnnotationName.of( + "[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[ASSET]", "[ANNOTATION]") + .toString()) + .setUserSpecifiedAnnotation(UserSpecifiedAnnotation.newBuilder().build()) + .build(); + mockWarehouse.addResponse(expectedResponse); + + Annotation annotation = Annotation.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + Annotation actualResponse = client.updateAnnotation(annotation, updateMask); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockWarehouse.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpdateAnnotationRequest actualRequest = ((UpdateAnnotationRequest) actualRequests.get(0)); + + Assert.assertEquals(annotation, actualRequest.getAnnotation()); + Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void updateAnnotationExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockWarehouse.addException(exception); + + try { + Annotation annotation = Annotation.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateAnnotation(annotation, updateMask); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteAnnotationTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockWarehouse.addResponse(expectedResponse); + + AnnotationName name = + AnnotationName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[ASSET]", "[ANNOTATION]"); + + client.deleteAnnotation(name); + + List actualRequests = mockWarehouse.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteAnnotationRequest actualRequest = ((DeleteAnnotationRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteAnnotationExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockWarehouse.addException(exception); + + try { + AnnotationName name = + AnnotationName.of( + "[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[ASSET]", "[ANNOTATION]"); + client.deleteAnnotation(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteAnnotationTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockWarehouse.addResponse(expectedResponse); + + String name = "name3373707"; + + client.deleteAnnotation(name); + + List actualRequests = mockWarehouse.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteAnnotationRequest actualRequest = ((DeleteAnnotationRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteAnnotationExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockWarehouse.addException(exception); + + try { + String name = "name3373707"; + client.deleteAnnotation(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void ingestAssetTest() throws Exception { + IngestAssetResponse expectedResponse = + IngestAssetResponse.newBuilder() + .setSuccessfullyIngestedPartition(Partition.TemporalPartition.newBuilder().build()) + .build(); + mockWarehouse.addResponse(expectedResponse); + IngestAssetRequest request = IngestAssetRequest.newBuilder().build(); + + MockStreamObserver responseObserver = new MockStreamObserver<>(); + + BidiStreamingCallable callable = + client.ingestAssetCallable(); + 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 + public void ingestAssetExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockWarehouse.addException(exception); + IngestAssetRequest request = IngestAssetRequest.newBuilder().build(); + + MockStreamObserver responseObserver = new MockStreamObserver<>(); + + BidiStreamingCallable callable = + client.ingestAssetCallable(); + 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()); + } + } + + @Test + public void clipAssetTest() throws Exception { + ClipAssetResponse expectedResponse = + ClipAssetResponse.newBuilder() + .addAllTimeIndexedUris(new ArrayList()) + .build(); + mockWarehouse.addResponse(expectedResponse); + + ClipAssetRequest request = + ClipAssetRequest.newBuilder() + .setName( + AssetName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[ASSET]").toString()) + .setTemporalPartition(Partition.TemporalPartition.newBuilder().build()) + .build(); + + ClipAssetResponse actualResponse = client.clipAsset(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockWarehouse.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ClipAssetRequest actualRequest = ((ClipAssetRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getName(), actualRequest.getName()); + Assert.assertEquals(request.getTemporalPartition(), actualRequest.getTemporalPartition()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void clipAssetExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockWarehouse.addException(exception); + + try { + ClipAssetRequest request = + ClipAssetRequest.newBuilder() + .setName( + AssetName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[ASSET]").toString()) + .setTemporalPartition(Partition.TemporalPartition.newBuilder().build()) + .build(); + client.clipAsset(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void generateHlsUriTest() throws Exception { + GenerateHlsUriResponse expectedResponse = + GenerateHlsUriResponse.newBuilder() + .setUri("uri116076") + .addAllTemporalPartitions(new ArrayList()) + .build(); + mockWarehouse.addResponse(expectedResponse); + + GenerateHlsUriRequest request = + GenerateHlsUriRequest.newBuilder() + .setName( + AssetName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[ASSET]").toString()) + .addAllTemporalPartitions(new ArrayList()) + .setLiveViewEnabled(true) + .build(); + + GenerateHlsUriResponse actualResponse = client.generateHlsUri(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockWarehouse.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GenerateHlsUriRequest actualRequest = ((GenerateHlsUriRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getName(), actualRequest.getName()); + Assert.assertEquals( + request.getTemporalPartitionsList(), actualRequest.getTemporalPartitionsList()); + Assert.assertEquals(request.getLiveViewEnabled(), actualRequest.getLiveViewEnabled()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void generateHlsUriExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockWarehouse.addException(exception); + + try { + GenerateHlsUriRequest request = + GenerateHlsUriRequest.newBuilder() + .setName( + AssetName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[ASSET]").toString()) + .addAllTemporalPartitions(new ArrayList()) + .setLiveViewEnabled(true) + .build(); + client.generateHlsUri(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void importAssetsTest() throws Exception { + ImportAssetsResponse expectedResponse = ImportAssetsResponse.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("importAssetsTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockWarehouse.addResponse(resultOperation); + + ImportAssetsRequest request = + ImportAssetsRequest.newBuilder() + .setParent(CorpusName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]").toString()) + .build(); + + ImportAssetsResponse actualResponse = client.importAssetsAsync(request).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockWarehouse.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ImportAssetsRequest actualRequest = ((ImportAssetsRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getAssetsGcsUri(), actualRequest.getAssetsGcsUri()); + Assert.assertEquals(request.getParent(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void importAssetsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockWarehouse.addException(exception); + + try { + ImportAssetsRequest request = + ImportAssetsRequest.newBuilder() + .setParent(CorpusName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]").toString()) + .build(); + client.importAssetsAsync(request).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()); + } + } + + @Test + public void createSearchConfigTest() throws Exception { + SearchConfig expectedResponse = + SearchConfig.newBuilder() + .setName( + SearchConfigName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[SEARCH_CONFIG]") + .toString()) + .setFacetProperty(FacetProperty.newBuilder().build()) + .setSearchCriteriaProperty(SearchCriteriaProperty.newBuilder().build()) + .build(); + mockWarehouse.addResponse(expectedResponse); + + CorpusName parent = CorpusName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]"); + SearchConfig searchConfig = SearchConfig.newBuilder().build(); + String searchConfigId = "searchConfigId1576297925"; + + SearchConfig actualResponse = client.createSearchConfig(parent, searchConfig, searchConfigId); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockWarehouse.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateSearchConfigRequest actualRequest = ((CreateSearchConfigRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(searchConfig, actualRequest.getSearchConfig()); + Assert.assertEquals(searchConfigId, actualRequest.getSearchConfigId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createSearchConfigExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockWarehouse.addException(exception); + + try { + CorpusName parent = CorpusName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]"); + SearchConfig searchConfig = SearchConfig.newBuilder().build(); + String searchConfigId = "searchConfigId1576297925"; + client.createSearchConfig(parent, searchConfig, searchConfigId); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createSearchConfigTest2() throws Exception { + SearchConfig expectedResponse = + SearchConfig.newBuilder() + .setName( + SearchConfigName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[SEARCH_CONFIG]") + .toString()) + .setFacetProperty(FacetProperty.newBuilder().build()) + .setSearchCriteriaProperty(SearchCriteriaProperty.newBuilder().build()) + .build(); + mockWarehouse.addResponse(expectedResponse); + + String parent = "parent-995424086"; + SearchConfig searchConfig = SearchConfig.newBuilder().build(); + String searchConfigId = "searchConfigId1576297925"; + + SearchConfig actualResponse = client.createSearchConfig(parent, searchConfig, searchConfigId); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockWarehouse.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateSearchConfigRequest actualRequest = ((CreateSearchConfigRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(searchConfig, actualRequest.getSearchConfig()); + Assert.assertEquals(searchConfigId, actualRequest.getSearchConfigId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createSearchConfigExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockWarehouse.addException(exception); + + try { + String parent = "parent-995424086"; + SearchConfig searchConfig = SearchConfig.newBuilder().build(); + String searchConfigId = "searchConfigId1576297925"; + client.createSearchConfig(parent, searchConfig, searchConfigId); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void updateSearchConfigTest() throws Exception { + SearchConfig expectedResponse = + SearchConfig.newBuilder() + .setName( + SearchConfigName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[SEARCH_CONFIG]") + .toString()) + .setFacetProperty(FacetProperty.newBuilder().build()) + .setSearchCriteriaProperty(SearchCriteriaProperty.newBuilder().build()) + .build(); + mockWarehouse.addResponse(expectedResponse); + + SearchConfig searchConfig = SearchConfig.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + SearchConfig actualResponse = client.updateSearchConfig(searchConfig, updateMask); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockWarehouse.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpdateSearchConfigRequest actualRequest = ((UpdateSearchConfigRequest) actualRequests.get(0)); + + Assert.assertEquals(searchConfig, actualRequest.getSearchConfig()); + Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void updateSearchConfigExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockWarehouse.addException(exception); + + try { + SearchConfig searchConfig = SearchConfig.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateSearchConfig(searchConfig, updateMask); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getSearchConfigTest() throws Exception { + SearchConfig expectedResponse = + SearchConfig.newBuilder() + .setName( + SearchConfigName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[SEARCH_CONFIG]") + .toString()) + .setFacetProperty(FacetProperty.newBuilder().build()) + .setSearchCriteriaProperty(SearchCriteriaProperty.newBuilder().build()) + .build(); + mockWarehouse.addResponse(expectedResponse); + + SearchConfigName name = + SearchConfigName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[SEARCH_CONFIG]"); + + SearchConfig actualResponse = client.getSearchConfig(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockWarehouse.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetSearchConfigRequest actualRequest = ((GetSearchConfigRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getSearchConfigExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockWarehouse.addException(exception); + + try { + SearchConfigName name = + SearchConfigName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[SEARCH_CONFIG]"); + client.getSearchConfig(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getSearchConfigTest2() throws Exception { + SearchConfig expectedResponse = + SearchConfig.newBuilder() + .setName( + SearchConfigName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[SEARCH_CONFIG]") + .toString()) + .setFacetProperty(FacetProperty.newBuilder().build()) + .setSearchCriteriaProperty(SearchCriteriaProperty.newBuilder().build()) + .build(); + mockWarehouse.addResponse(expectedResponse); + + String name = "name3373707"; + + SearchConfig actualResponse = client.getSearchConfig(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockWarehouse.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetSearchConfigRequest actualRequest = ((GetSearchConfigRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getSearchConfigExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockWarehouse.addException(exception); + + try { + String name = "name3373707"; + client.getSearchConfig(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteSearchConfigTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockWarehouse.addResponse(expectedResponse); + + SearchConfigName name = + SearchConfigName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[SEARCH_CONFIG]"); + + client.deleteSearchConfig(name); + + List actualRequests = mockWarehouse.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteSearchConfigRequest actualRequest = ((DeleteSearchConfigRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteSearchConfigExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockWarehouse.addException(exception); + + try { + SearchConfigName name = + SearchConfigName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[SEARCH_CONFIG]"); + client.deleteSearchConfig(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteSearchConfigTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockWarehouse.addResponse(expectedResponse); + + String name = "name3373707"; + + client.deleteSearchConfig(name); + + List actualRequests = mockWarehouse.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteSearchConfigRequest actualRequest = ((DeleteSearchConfigRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteSearchConfigExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockWarehouse.addException(exception); + + try { + String name = "name3373707"; + client.deleteSearchConfig(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listSearchConfigsTest() throws Exception { + SearchConfig responsesElement = SearchConfig.newBuilder().build(); + ListSearchConfigsResponse expectedResponse = + ListSearchConfigsResponse.newBuilder() + .setNextPageToken("") + .addAllSearchConfigs(Arrays.asList(responsesElement)) + .build(); + mockWarehouse.addResponse(expectedResponse); + + CorpusName parent = CorpusName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]"); + + ListSearchConfigsPagedResponse pagedListResponse = client.listSearchConfigs(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getSearchConfigsList().get(0), resources.get(0)); + + List actualRequests = mockWarehouse.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListSearchConfigsRequest actualRequest = ((ListSearchConfigsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listSearchConfigsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockWarehouse.addException(exception); + + try { + CorpusName parent = CorpusName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]"); + client.listSearchConfigs(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listSearchConfigsTest2() throws Exception { + SearchConfig responsesElement = SearchConfig.newBuilder().build(); + ListSearchConfigsResponse expectedResponse = + ListSearchConfigsResponse.newBuilder() + .setNextPageToken("") + .addAllSearchConfigs(Arrays.asList(responsesElement)) + .build(); + mockWarehouse.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListSearchConfigsPagedResponse pagedListResponse = client.listSearchConfigs(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getSearchConfigsList().get(0), resources.get(0)); + + List actualRequests = mockWarehouse.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListSearchConfigsRequest actualRequest = ((ListSearchConfigsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listSearchConfigsExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockWarehouse.addException(exception); + + try { + String parent = "parent-995424086"; + client.listSearchConfigs(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createSearchHypernymTest() throws Exception { + SearchHypernym expectedResponse = + SearchHypernym.newBuilder() + .setName( + SearchHypernymName.of( + "[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[SEARCH_HYPERNYM]") + .toString()) + .setHypernym("hypernym-114309610") + .addAllHyponyms(new ArrayList()) + .build(); + mockWarehouse.addResponse(expectedResponse); + + CorpusName parent = CorpusName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]"); + SearchHypernym searchHypernym = SearchHypernym.newBuilder().build(); + String searchHypernymId = "searchHypernymId-314707559"; + + SearchHypernym actualResponse = + client.createSearchHypernym(parent, searchHypernym, searchHypernymId); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockWarehouse.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateSearchHypernymRequest actualRequest = + ((CreateSearchHypernymRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(searchHypernym, actualRequest.getSearchHypernym()); + Assert.assertEquals(searchHypernymId, actualRequest.getSearchHypernymId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createSearchHypernymExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockWarehouse.addException(exception); + + try { + CorpusName parent = CorpusName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]"); + SearchHypernym searchHypernym = SearchHypernym.newBuilder().build(); + String searchHypernymId = "searchHypernymId-314707559"; + client.createSearchHypernym(parent, searchHypernym, searchHypernymId); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createSearchHypernymTest2() throws Exception { + SearchHypernym expectedResponse = + SearchHypernym.newBuilder() + .setName( + SearchHypernymName.of( + "[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[SEARCH_HYPERNYM]") + .toString()) + .setHypernym("hypernym-114309610") + .addAllHyponyms(new ArrayList()) + .build(); + mockWarehouse.addResponse(expectedResponse); + + String parent = "parent-995424086"; + SearchHypernym searchHypernym = SearchHypernym.newBuilder().build(); + String searchHypernymId = "searchHypernymId-314707559"; + + SearchHypernym actualResponse = + client.createSearchHypernym(parent, searchHypernym, searchHypernymId); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockWarehouse.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateSearchHypernymRequest actualRequest = + ((CreateSearchHypernymRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(searchHypernym, actualRequest.getSearchHypernym()); + Assert.assertEquals(searchHypernymId, actualRequest.getSearchHypernymId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createSearchHypernymExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockWarehouse.addException(exception); + + try { + String parent = "parent-995424086"; + SearchHypernym searchHypernym = SearchHypernym.newBuilder().build(); + String searchHypernymId = "searchHypernymId-314707559"; + client.createSearchHypernym(parent, searchHypernym, searchHypernymId); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void updateSearchHypernymTest() throws Exception { + SearchHypernym expectedResponse = + SearchHypernym.newBuilder() + .setName( + SearchHypernymName.of( + "[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[SEARCH_HYPERNYM]") + .toString()) + .setHypernym("hypernym-114309610") + .addAllHyponyms(new ArrayList()) + .build(); + mockWarehouse.addResponse(expectedResponse); + + SearchHypernym searchHypernym = SearchHypernym.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + SearchHypernym actualResponse = client.updateSearchHypernym(searchHypernym, updateMask); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockWarehouse.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpdateSearchHypernymRequest actualRequest = + ((UpdateSearchHypernymRequest) actualRequests.get(0)); + + Assert.assertEquals(searchHypernym, actualRequest.getSearchHypernym()); + Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void updateSearchHypernymExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockWarehouse.addException(exception); + + try { + SearchHypernym searchHypernym = SearchHypernym.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateSearchHypernym(searchHypernym, updateMask); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getSearchHypernymTest() throws Exception { + SearchHypernym expectedResponse = + SearchHypernym.newBuilder() + .setName( + SearchHypernymName.of( + "[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[SEARCH_HYPERNYM]") + .toString()) + .setHypernym("hypernym-114309610") + .addAllHyponyms(new ArrayList()) + .build(); + mockWarehouse.addResponse(expectedResponse); + + SearchHypernymName name = + SearchHypernymName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[SEARCH_HYPERNYM]"); + + SearchHypernym actualResponse = client.getSearchHypernym(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockWarehouse.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetSearchHypernymRequest actualRequest = ((GetSearchHypernymRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getSearchHypernymExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockWarehouse.addException(exception); + + try { + SearchHypernymName name = + SearchHypernymName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[SEARCH_HYPERNYM]"); + client.getSearchHypernym(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getSearchHypernymTest2() throws Exception { + SearchHypernym expectedResponse = + SearchHypernym.newBuilder() + .setName( + SearchHypernymName.of( + "[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[SEARCH_HYPERNYM]") + .toString()) + .setHypernym("hypernym-114309610") + .addAllHyponyms(new ArrayList()) + .build(); + mockWarehouse.addResponse(expectedResponse); + + String name = "name3373707"; + + SearchHypernym actualResponse = client.getSearchHypernym(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockWarehouse.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetSearchHypernymRequest actualRequest = ((GetSearchHypernymRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getSearchHypernymExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockWarehouse.addException(exception); + + try { + String name = "name3373707"; + client.getSearchHypernym(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteSearchHypernymTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockWarehouse.addResponse(expectedResponse); + + SearchHypernymName name = + SearchHypernymName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[SEARCH_HYPERNYM]"); + + client.deleteSearchHypernym(name); + + List actualRequests = mockWarehouse.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteSearchHypernymRequest actualRequest = + ((DeleteSearchHypernymRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteSearchHypernymExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockWarehouse.addException(exception); + + try { + SearchHypernymName name = + SearchHypernymName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[SEARCH_HYPERNYM]"); + client.deleteSearchHypernym(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteSearchHypernymTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockWarehouse.addResponse(expectedResponse); + + String name = "name3373707"; + + client.deleteSearchHypernym(name); + + List actualRequests = mockWarehouse.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteSearchHypernymRequest actualRequest = + ((DeleteSearchHypernymRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteSearchHypernymExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockWarehouse.addException(exception); + + try { + String name = "name3373707"; + client.deleteSearchHypernym(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listSearchHypernymsTest() throws Exception { + SearchHypernym responsesElement = SearchHypernym.newBuilder().build(); + ListSearchHypernymsResponse expectedResponse = + ListSearchHypernymsResponse.newBuilder() + .setNextPageToken("") + .addAllSearchHypernyms(Arrays.asList(responsesElement)) + .build(); + mockWarehouse.addResponse(expectedResponse); + + CorpusName parent = CorpusName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]"); + + ListSearchHypernymsPagedResponse pagedListResponse = client.listSearchHypernyms(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getSearchHypernymsList().get(0), resources.get(0)); + + List actualRequests = mockWarehouse.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListSearchHypernymsRequest actualRequest = ((ListSearchHypernymsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listSearchHypernymsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockWarehouse.addException(exception); + + try { + CorpusName parent = CorpusName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]"); + client.listSearchHypernyms(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listSearchHypernymsTest2() throws Exception { + SearchHypernym responsesElement = SearchHypernym.newBuilder().build(); + ListSearchHypernymsResponse expectedResponse = + ListSearchHypernymsResponse.newBuilder() + .setNextPageToken("") + .addAllSearchHypernyms(Arrays.asList(responsesElement)) + .build(); + mockWarehouse.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListSearchHypernymsPagedResponse pagedListResponse = client.listSearchHypernyms(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getSearchHypernymsList().get(0), resources.get(0)); + + List actualRequests = mockWarehouse.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListSearchHypernymsRequest actualRequest = ((ListSearchHypernymsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listSearchHypernymsExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockWarehouse.addException(exception); + + try { + String parent = "parent-995424086"; + client.listSearchHypernyms(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void searchAssetsTest() throws Exception { + SearchResultItem responsesElement = SearchResultItem.newBuilder().build(); + SearchAssetsResponse expectedResponse = + SearchAssetsResponse.newBuilder() + .setNextPageToken("") + .addAllSearchResultItems(Arrays.asList(responsesElement)) + .build(); + mockWarehouse.addResponse(expectedResponse); + + SearchAssetsRequest request = + SearchAssetsRequest.newBuilder() + .setCorpus(CorpusName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setContentTimeRanges(DateTimeRangeArray.newBuilder().build()) + .addAllCriteria(new ArrayList()) + .addAllFacetSelections(new ArrayList()) + .addAllResultAnnotationKeys(new ArrayList()) + .setSearchQuery("searchQuery-552137728") + .build(); + + SearchAssetsPagedResponse pagedListResponse = client.searchAssets(request); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getSearchResultItemsList().get(0), resources.get(0)); + + List actualRequests = mockWarehouse.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + SearchAssetsRequest actualRequest = ((SearchAssetsRequest) actualRequests.get(0)); + + Assert.assertEquals( + request.getSchemaKeySortingStrategy(), actualRequest.getSchemaKeySortingStrategy()); + Assert.assertEquals(request.getCorpus(), actualRequest.getCorpus()); + Assert.assertEquals(request.getPageSize(), actualRequest.getPageSize()); + Assert.assertEquals(request.getPageToken(), actualRequest.getPageToken()); + Assert.assertEquals(request.getContentTimeRanges(), actualRequest.getContentTimeRanges()); + Assert.assertEquals(request.getCriteriaList(), actualRequest.getCriteriaList()); + Assert.assertEquals(request.getFacetSelectionsList(), actualRequest.getFacetSelectionsList()); + Assert.assertEquals( + request.getResultAnnotationKeysList(), actualRequest.getResultAnnotationKeysList()); + Assert.assertEquals(request.getSearchQuery(), actualRequest.getSearchQuery()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void searchAssetsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockWarehouse.addException(exception); + + try { + SearchAssetsRequest request = + SearchAssetsRequest.newBuilder() + .setCorpus(CorpusName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setContentTimeRanges(DateTimeRangeArray.newBuilder().build()) + .addAllCriteria(new ArrayList()) + .addAllFacetSelections(new ArrayList()) + .addAllResultAnnotationKeys(new ArrayList()) + .setSearchQuery("searchQuery-552137728") + .build(); + client.searchAssets(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void searchIndexEndpointTest() throws Exception { + SearchResultItem responsesElement = SearchResultItem.newBuilder().build(); + SearchIndexEndpointResponse expectedResponse = + SearchIndexEndpointResponse.newBuilder() + .setNextPageToken("") + .addAllSearchResultItems(Arrays.asList(responsesElement)) + .build(); + mockWarehouse.addResponse(expectedResponse); + + SearchIndexEndpointRequest request = + SearchIndexEndpointRequest.newBuilder() + .setIndexEndpoint( + IndexEndpointName.of("[PROJECT]", "[LOCATION]", "[INDEX_ENDPOINT]").toString()) + .addAllCriteria(new ArrayList()) + .addAllExclusionCriteria(new ArrayList()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + + SearchIndexEndpointPagedResponse pagedListResponse = client.searchIndexEndpoint(request); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getSearchResultItemsList().get(0), resources.get(0)); + + List actualRequests = mockWarehouse.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + SearchIndexEndpointRequest actualRequest = ((SearchIndexEndpointRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getImageQuery(), actualRequest.getImageQuery()); + Assert.assertEquals(request.getTextQuery(), actualRequest.getTextQuery()); + Assert.assertEquals(request.getIndexEndpoint(), actualRequest.getIndexEndpoint()); + Assert.assertEquals(request.getCriteriaList(), actualRequest.getCriteriaList()); + Assert.assertEquals( + request.getExclusionCriteriaList(), actualRequest.getExclusionCriteriaList()); + Assert.assertEquals(request.getPageSize(), actualRequest.getPageSize()); + Assert.assertEquals(request.getPageToken(), actualRequest.getPageToken()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void searchIndexEndpointExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockWarehouse.addException(exception); + + try { + SearchIndexEndpointRequest request = + SearchIndexEndpointRequest.newBuilder() + .setIndexEndpoint( + IndexEndpointName.of("[PROJECT]", "[LOCATION]", "[INDEX_ENDPOINT]").toString()) + .addAllCriteria(new ArrayList()) + .addAllExclusionCriteria(new ArrayList()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + client.searchIndexEndpoint(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createIndexEndpointTest() throws Exception { + IndexEndpoint expectedResponse = + IndexEndpoint.newBuilder() + .setName(IndexEndpointName.of("[PROJECT]", "[LOCATION]", "[INDEX_ENDPOINT]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setDeployedIndex(DeployedIndex.newBuilder().build()) + .putAllLabels(new HashMap()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createIndexEndpointTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockWarehouse.addResponse(resultOperation); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + IndexEndpoint indexEndpoint = IndexEndpoint.newBuilder().build(); + String indexEndpointId = "indexEndpointId-250889214"; + + IndexEndpoint actualResponse = + client.createIndexEndpointAsync(parent, indexEndpoint, indexEndpointId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockWarehouse.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateIndexEndpointRequest actualRequest = ((CreateIndexEndpointRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(indexEndpoint, actualRequest.getIndexEndpoint()); + Assert.assertEquals(indexEndpointId, actualRequest.getIndexEndpointId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createIndexEndpointExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockWarehouse.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + IndexEndpoint indexEndpoint = IndexEndpoint.newBuilder().build(); + String indexEndpointId = "indexEndpointId-250889214"; + client.createIndexEndpointAsync(parent, indexEndpoint, indexEndpointId).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()); + } + } + + @Test + public void createIndexEndpointTest2() throws Exception { + IndexEndpoint expectedResponse = + IndexEndpoint.newBuilder() + .setName(IndexEndpointName.of("[PROJECT]", "[LOCATION]", "[INDEX_ENDPOINT]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setDeployedIndex(DeployedIndex.newBuilder().build()) + .putAllLabels(new HashMap()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createIndexEndpointTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockWarehouse.addResponse(resultOperation); + + String parent = "parent-995424086"; + IndexEndpoint indexEndpoint = IndexEndpoint.newBuilder().build(); + String indexEndpointId = "indexEndpointId-250889214"; + + IndexEndpoint actualResponse = + client.createIndexEndpointAsync(parent, indexEndpoint, indexEndpointId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockWarehouse.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateIndexEndpointRequest actualRequest = ((CreateIndexEndpointRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(indexEndpoint, actualRequest.getIndexEndpoint()); + Assert.assertEquals(indexEndpointId, actualRequest.getIndexEndpointId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createIndexEndpointExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockWarehouse.addException(exception); + + try { + String parent = "parent-995424086"; + IndexEndpoint indexEndpoint = IndexEndpoint.newBuilder().build(); + String indexEndpointId = "indexEndpointId-250889214"; + client.createIndexEndpointAsync(parent, indexEndpoint, indexEndpointId).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()); + } + } + + @Test + public void getIndexEndpointTest() throws Exception { + IndexEndpoint expectedResponse = + IndexEndpoint.newBuilder() + .setName(IndexEndpointName.of("[PROJECT]", "[LOCATION]", "[INDEX_ENDPOINT]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setDeployedIndex(DeployedIndex.newBuilder().build()) + .putAllLabels(new HashMap()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + mockWarehouse.addResponse(expectedResponse); + + IndexEndpointName name = IndexEndpointName.of("[PROJECT]", "[LOCATION]", "[INDEX_ENDPOINT]"); + + IndexEndpoint actualResponse = client.getIndexEndpoint(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockWarehouse.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetIndexEndpointRequest actualRequest = ((GetIndexEndpointRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getIndexEndpointExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockWarehouse.addException(exception); + + try { + IndexEndpointName name = IndexEndpointName.of("[PROJECT]", "[LOCATION]", "[INDEX_ENDPOINT]"); + client.getIndexEndpoint(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getIndexEndpointTest2() throws Exception { + IndexEndpoint expectedResponse = + IndexEndpoint.newBuilder() + .setName(IndexEndpointName.of("[PROJECT]", "[LOCATION]", "[INDEX_ENDPOINT]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setDeployedIndex(DeployedIndex.newBuilder().build()) + .putAllLabels(new HashMap()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + mockWarehouse.addResponse(expectedResponse); + + String name = "name3373707"; + + IndexEndpoint actualResponse = client.getIndexEndpoint(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockWarehouse.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetIndexEndpointRequest actualRequest = ((GetIndexEndpointRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getIndexEndpointExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockWarehouse.addException(exception); + + try { + String name = "name3373707"; + client.getIndexEndpoint(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listIndexEndpointsTest() throws Exception { + IndexEndpoint responsesElement = IndexEndpoint.newBuilder().build(); + ListIndexEndpointsResponse expectedResponse = + ListIndexEndpointsResponse.newBuilder() + .setNextPageToken("") + .addAllIndexEndpoints(Arrays.asList(responsesElement)) + .build(); + mockWarehouse.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + ListIndexEndpointsPagedResponse pagedListResponse = client.listIndexEndpoints(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getIndexEndpointsList().get(0), resources.get(0)); + + List actualRequests = mockWarehouse.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListIndexEndpointsRequest actualRequest = ((ListIndexEndpointsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listIndexEndpointsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockWarehouse.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + client.listIndexEndpoints(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listIndexEndpointsTest2() throws Exception { + IndexEndpoint responsesElement = IndexEndpoint.newBuilder().build(); + ListIndexEndpointsResponse expectedResponse = + ListIndexEndpointsResponse.newBuilder() + .setNextPageToken("") + .addAllIndexEndpoints(Arrays.asList(responsesElement)) + .build(); + mockWarehouse.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListIndexEndpointsPagedResponse pagedListResponse = client.listIndexEndpoints(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getIndexEndpointsList().get(0), resources.get(0)); + + List actualRequests = mockWarehouse.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListIndexEndpointsRequest actualRequest = ((ListIndexEndpointsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listIndexEndpointsExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockWarehouse.addException(exception); + + try { + String parent = "parent-995424086"; + client.listIndexEndpoints(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void updateIndexEndpointTest() throws Exception { + IndexEndpoint expectedResponse = + IndexEndpoint.newBuilder() + .setName(IndexEndpointName.of("[PROJECT]", "[LOCATION]", "[INDEX_ENDPOINT]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setDeployedIndex(DeployedIndex.newBuilder().build()) + .putAllLabels(new HashMap()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("updateIndexEndpointTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockWarehouse.addResponse(resultOperation); + + IndexEndpoint indexEndpoint = IndexEndpoint.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + IndexEndpoint actualResponse = client.updateIndexEndpointAsync(indexEndpoint, updateMask).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockWarehouse.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpdateIndexEndpointRequest actualRequest = ((UpdateIndexEndpointRequest) actualRequests.get(0)); + + Assert.assertEquals(indexEndpoint, actualRequest.getIndexEndpoint()); + Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void updateIndexEndpointExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockWarehouse.addException(exception); + + try { + IndexEndpoint indexEndpoint = IndexEndpoint.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateIndexEndpointAsync(indexEndpoint, updateMask).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()); + } + } + + @Test + public void deleteIndexEndpointTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteIndexEndpointTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockWarehouse.addResponse(resultOperation); + + IndexEndpointName name = IndexEndpointName.of("[PROJECT]", "[LOCATION]", "[INDEX_ENDPOINT]"); + + client.deleteIndexEndpointAsync(name).get(); + + List actualRequests = mockWarehouse.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteIndexEndpointRequest actualRequest = ((DeleteIndexEndpointRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteIndexEndpointExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockWarehouse.addException(exception); + + try { + IndexEndpointName name = IndexEndpointName.of("[PROJECT]", "[LOCATION]", "[INDEX_ENDPOINT]"); + client.deleteIndexEndpointAsync(name).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()); + } + } + + @Test + public void deleteIndexEndpointTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteIndexEndpointTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockWarehouse.addResponse(resultOperation); + + String name = "name3373707"; + + client.deleteIndexEndpointAsync(name).get(); + + List actualRequests = mockWarehouse.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteIndexEndpointRequest actualRequest = ((DeleteIndexEndpointRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteIndexEndpointExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockWarehouse.addException(exception); + + try { + String name = "name3373707"; + client.deleteIndexEndpointAsync(name).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()); + } + } + + @Test + public void deployIndexTest() throws Exception { + DeployIndexResponse expectedResponse = DeployIndexResponse.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deployIndexTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockWarehouse.addResponse(resultOperation); + + DeployIndexRequest request = + DeployIndexRequest.newBuilder() + .setIndexEndpoint( + IndexEndpointName.of("[PROJECT]", "[LOCATION]", "[INDEX_ENDPOINT]").toString()) + .setDeployedIndex(DeployedIndex.newBuilder().build()) + .build(); + + DeployIndexResponse actualResponse = client.deployIndexAsync(request).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockWarehouse.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeployIndexRequest actualRequest = ((DeployIndexRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getIndexEndpoint(), actualRequest.getIndexEndpoint()); + Assert.assertEquals(request.getDeployedIndex(), actualRequest.getDeployedIndex()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deployIndexExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockWarehouse.addException(exception); + + try { + DeployIndexRequest request = + DeployIndexRequest.newBuilder() + .setIndexEndpoint( + IndexEndpointName.of("[PROJECT]", "[LOCATION]", "[INDEX_ENDPOINT]").toString()) + .setDeployedIndex(DeployedIndex.newBuilder().build()) + .build(); + client.deployIndexAsync(request).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()); + } + } + + @Test + public void undeployIndexTest() throws Exception { + UndeployIndexResponse expectedResponse = UndeployIndexResponse.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("undeployIndexTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockWarehouse.addResponse(resultOperation); + + UndeployIndexRequest request = + UndeployIndexRequest.newBuilder() + .setIndexEndpoint( + IndexEndpointName.of("[PROJECT]", "[LOCATION]", "[INDEX_ENDPOINT]").toString()) + .build(); + + UndeployIndexResponse actualResponse = client.undeployIndexAsync(request).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockWarehouse.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UndeployIndexRequest actualRequest = ((UndeployIndexRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getIndexEndpoint(), actualRequest.getIndexEndpoint()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void undeployIndexExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockWarehouse.addException(exception); + + try { + UndeployIndexRequest request = + UndeployIndexRequest.newBuilder() + .setIndexEndpoint( + IndexEndpointName.of("[PROJECT]", "[LOCATION]", "[INDEX_ENDPOINT]").toString()) + .build(); + client.undeployIndexAsync(request).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()); + } + } + + @Test + public void createCollectionTest() throws Exception { + Collection expectedResponse = + Collection.newBuilder() + .setName( + CollectionName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[COLLECTION]") + .toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createCollectionTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockWarehouse.addResponse(resultOperation); + + CorpusName parent = CorpusName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]"); + Collection collection = Collection.newBuilder().build(); + String collectionId = "collectionId1636075609"; + + Collection actualResponse = + client.createCollectionAsync(parent, collection, collectionId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockWarehouse.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateCollectionRequest actualRequest = ((CreateCollectionRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(collection, actualRequest.getCollection()); + Assert.assertEquals(collectionId, actualRequest.getCollectionId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createCollectionExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockWarehouse.addException(exception); + + try { + CorpusName parent = CorpusName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]"); + Collection collection = Collection.newBuilder().build(); + String collectionId = "collectionId1636075609"; + client.createCollectionAsync(parent, collection, collectionId).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()); + } + } + + @Test + public void createCollectionTest2() throws Exception { + Collection expectedResponse = + Collection.newBuilder() + .setName( + CollectionName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[COLLECTION]") + .toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createCollectionTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockWarehouse.addResponse(resultOperation); + + String parent = "parent-995424086"; + Collection collection = Collection.newBuilder().build(); + String collectionId = "collectionId1636075609"; + + Collection actualResponse = + client.createCollectionAsync(parent, collection, collectionId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockWarehouse.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateCollectionRequest actualRequest = ((CreateCollectionRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(collection, actualRequest.getCollection()); + Assert.assertEquals(collectionId, actualRequest.getCollectionId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createCollectionExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockWarehouse.addException(exception); + + try { + String parent = "parent-995424086"; + Collection collection = Collection.newBuilder().build(); + String collectionId = "collectionId1636075609"; + client.createCollectionAsync(parent, collection, collectionId).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()); + } + } + + @Test + public void deleteCollectionTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteCollectionTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockWarehouse.addResponse(resultOperation); + + CollectionName name = + CollectionName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[COLLECTION]"); + + client.deleteCollectionAsync(name).get(); + + List actualRequests = mockWarehouse.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteCollectionRequest actualRequest = ((DeleteCollectionRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteCollectionExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockWarehouse.addException(exception); + + try { + CollectionName name = + CollectionName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[COLLECTION]"); + client.deleteCollectionAsync(name).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()); + } + } + + @Test + public void deleteCollectionTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteCollectionTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockWarehouse.addResponse(resultOperation); + + String name = "name3373707"; + + client.deleteCollectionAsync(name).get(); + + List actualRequests = mockWarehouse.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteCollectionRequest actualRequest = ((DeleteCollectionRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteCollectionExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockWarehouse.addException(exception); + + try { + String name = "name3373707"; + client.deleteCollectionAsync(name).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()); + } + } + + @Test + public void getCollectionTest() throws Exception { + Collection expectedResponse = + Collection.newBuilder() + .setName( + CollectionName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[COLLECTION]") + .toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .build(); + mockWarehouse.addResponse(expectedResponse); + + CollectionName name = + CollectionName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[COLLECTION]"); + + Collection actualResponse = client.getCollection(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockWarehouse.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetCollectionRequest actualRequest = ((GetCollectionRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getCollectionExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockWarehouse.addException(exception); + + try { + CollectionName name = + CollectionName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[COLLECTION]"); + client.getCollection(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getCollectionTest2() throws Exception { + Collection expectedResponse = + Collection.newBuilder() + .setName( + CollectionName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[COLLECTION]") + .toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .build(); + mockWarehouse.addResponse(expectedResponse); + + String name = "name3373707"; + + Collection actualResponse = client.getCollection(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockWarehouse.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetCollectionRequest actualRequest = ((GetCollectionRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getCollectionExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockWarehouse.addException(exception); + + try { + String name = "name3373707"; + client.getCollection(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void updateCollectionTest() throws Exception { + Collection expectedResponse = + Collection.newBuilder() + .setName( + CollectionName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[COLLECTION]") + .toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .build(); + mockWarehouse.addResponse(expectedResponse); + + Collection collection = Collection.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + Collection actualResponse = client.updateCollection(collection, updateMask); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockWarehouse.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpdateCollectionRequest actualRequest = ((UpdateCollectionRequest) actualRequests.get(0)); + + Assert.assertEquals(collection, actualRequest.getCollection()); + Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void updateCollectionExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockWarehouse.addException(exception); + + try { + Collection collection = Collection.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateCollection(collection, updateMask); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listCollectionsTest() throws Exception { + Collection responsesElement = Collection.newBuilder().build(); + ListCollectionsResponse expectedResponse = + ListCollectionsResponse.newBuilder() + .setNextPageToken("") + .addAllCollections(Arrays.asList(responsesElement)) + .build(); + mockWarehouse.addResponse(expectedResponse); + + CorpusName parent = CorpusName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]"); + + ListCollectionsPagedResponse pagedListResponse = client.listCollections(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getCollectionsList().get(0), resources.get(0)); + + List actualRequests = mockWarehouse.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListCollectionsRequest actualRequest = ((ListCollectionsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listCollectionsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockWarehouse.addException(exception); + + try { + CorpusName parent = CorpusName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]"); + client.listCollections(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listCollectionsTest2() throws Exception { + Collection responsesElement = Collection.newBuilder().build(); + ListCollectionsResponse expectedResponse = + ListCollectionsResponse.newBuilder() + .setNextPageToken("") + .addAllCollections(Arrays.asList(responsesElement)) + .build(); + mockWarehouse.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListCollectionsPagedResponse pagedListResponse = client.listCollections(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getCollectionsList().get(0), resources.get(0)); + + List actualRequests = mockWarehouse.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListCollectionsRequest actualRequest = ((ListCollectionsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listCollectionsExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockWarehouse.addException(exception); + + try { + String parent = "parent-995424086"; + client.listCollections(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void addCollectionItemTest() throws Exception { + AddCollectionItemResponse expectedResponse = + AddCollectionItemResponse.newBuilder().setItem(CollectionItem.newBuilder().build()).build(); + mockWarehouse.addResponse(expectedResponse); + + CollectionItem item = CollectionItem.newBuilder().build(); + + AddCollectionItemResponse actualResponse = client.addCollectionItem(item); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockWarehouse.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + AddCollectionItemRequest actualRequest = ((AddCollectionItemRequest) actualRequests.get(0)); + + Assert.assertEquals(item, actualRequest.getItem()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void addCollectionItemExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockWarehouse.addException(exception); + + try { + CollectionItem item = CollectionItem.newBuilder().build(); + client.addCollectionItem(item); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void removeCollectionItemTest() throws Exception { + RemoveCollectionItemResponse expectedResponse = + RemoveCollectionItemResponse.newBuilder() + .setItem(CollectionItem.newBuilder().build()) + .build(); + mockWarehouse.addResponse(expectedResponse); + + CollectionItem item = CollectionItem.newBuilder().build(); + + RemoveCollectionItemResponse actualResponse = client.removeCollectionItem(item); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockWarehouse.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + RemoveCollectionItemRequest actualRequest = + ((RemoveCollectionItemRequest) actualRequests.get(0)); + + Assert.assertEquals(item, actualRequest.getItem()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void removeCollectionItemExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockWarehouse.addException(exception); + + try { + CollectionItem item = CollectionItem.newBuilder().build(); + client.removeCollectionItem(item); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void viewCollectionItemsTest() throws Exception { + CollectionItem responsesElement = CollectionItem.newBuilder().build(); + ViewCollectionItemsResponse expectedResponse = + ViewCollectionItemsResponse.newBuilder() + .setNextPageToken("") + .addAllItems(Arrays.asList(responsesElement)) + .build(); + mockWarehouse.addResponse(expectedResponse); + + CollectionName collection = + CollectionName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[COLLECTION]"); + + ViewCollectionItemsPagedResponse pagedListResponse = client.viewCollectionItems(collection); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getItemsList().get(0), resources.get(0)); + + List actualRequests = mockWarehouse.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ViewCollectionItemsRequest actualRequest = ((ViewCollectionItemsRequest) actualRequests.get(0)); + + Assert.assertEquals(collection.toString(), actualRequest.getCollection()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void viewCollectionItemsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockWarehouse.addException(exception); + + try { + CollectionName collection = + CollectionName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]", "[COLLECTION]"); + client.viewCollectionItems(collection); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void viewCollectionItemsTest2() throws Exception { + CollectionItem responsesElement = CollectionItem.newBuilder().build(); + ViewCollectionItemsResponse expectedResponse = + ViewCollectionItemsResponse.newBuilder() + .setNextPageToken("") + .addAllItems(Arrays.asList(responsesElement)) + .build(); + mockWarehouse.addResponse(expectedResponse); + + String collection = "collection-1741312354"; + + ViewCollectionItemsPagedResponse pagedListResponse = client.viewCollectionItems(collection); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getItemsList().get(0), resources.get(0)); + + List actualRequests = mockWarehouse.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ViewCollectionItemsRequest actualRequest = ((ViewCollectionItemsRequest) actualRequests.get(0)); + + Assert.assertEquals(collection, actualRequest.getCollection()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void viewCollectionItemsExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockWarehouse.addException(exception); + + try { + String collection = "collection-1741312354"; + client.viewCollectionItems(collection); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } +} diff --git a/java-visionai/grpc-google-cloud-visionai-v1/pom.xml b/java-visionai/grpc-google-cloud-visionai-v1/pom.xml new file mode 100644 index 000000000000..52f8c16bb5c9 --- /dev/null +++ b/java-visionai/grpc-google-cloud-visionai-v1/pom.xml @@ -0,0 +1,45 @@ + + 4.0.0 + com.google.api.grpc + grpc-google-cloud-visionai-v1 + 0.0.1-SNAPSHOT + grpc-google-cloud-visionai-v1 + GRPC library for google-cloud-visionai + + com.google.cloud + google-cloud-visionai-parent + 0.0.1-SNAPSHOT + + + + io.grpc + grpc-api + + + io.grpc + grpc-stub + + + io.grpc + grpc-protobuf + + + com.google.protobuf + protobuf-java + + + com.google.api.grpc + proto-google-common-protos + + + com.google.api.grpc + proto-google-cloud-visionai-v1 + + + com.google.guava + guava + + + diff --git a/java-visionai/grpc-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/AppPlatformGrpc.java b/java-visionai/grpc-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/AppPlatformGrpc.java new file mode 100644 index 000000000000..69ed494c6628 --- /dev/null +++ b/java-visionai/grpc-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/AppPlatformGrpc.java @@ -0,0 +1,3327 @@ +/* + * Copyright 2024 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.visionai.v1; + +import static io.grpc.MethodDescriptor.generateFullMethodName; + +/** + * + * + *
+ * Service describing handlers for resources
+ * 
+ */ +@javax.annotation.Generated( + value = "by gRPC proto compiler", + comments = "Source: google/cloud/visionai/v1/platform.proto") +@io.grpc.stub.annotations.GrpcGenerated +public final class AppPlatformGrpc { + + private AppPlatformGrpc() {} + + public static final java.lang.String SERVICE_NAME = "google.cloud.visionai.v1.AppPlatform"; + + // Static method descriptors that strictly reflect the proto. + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.ListApplicationsRequest, + com.google.cloud.visionai.v1.ListApplicationsResponse> + getListApplicationsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListApplications", + requestType = com.google.cloud.visionai.v1.ListApplicationsRequest.class, + responseType = com.google.cloud.visionai.v1.ListApplicationsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.ListApplicationsRequest, + com.google.cloud.visionai.v1.ListApplicationsResponse> + getListApplicationsMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.ListApplicationsRequest, + com.google.cloud.visionai.v1.ListApplicationsResponse> + getListApplicationsMethod; + if ((getListApplicationsMethod = AppPlatformGrpc.getListApplicationsMethod) == null) { + synchronized (AppPlatformGrpc.class) { + if ((getListApplicationsMethod = AppPlatformGrpc.getListApplicationsMethod) == null) { + AppPlatformGrpc.getListApplicationsMethod = + getListApplicationsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListApplications")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.visionai.v1.ListApplicationsRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.visionai.v1.ListApplicationsResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new AppPlatformMethodDescriptorSupplier("ListApplications")) + .build(); + } + } + } + return getListApplicationsMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.GetApplicationRequest, + com.google.cloud.visionai.v1.Application> + getGetApplicationMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetApplication", + requestType = com.google.cloud.visionai.v1.GetApplicationRequest.class, + responseType = com.google.cloud.visionai.v1.Application.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.GetApplicationRequest, + com.google.cloud.visionai.v1.Application> + getGetApplicationMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.GetApplicationRequest, + com.google.cloud.visionai.v1.Application> + getGetApplicationMethod; + if ((getGetApplicationMethod = AppPlatformGrpc.getGetApplicationMethod) == null) { + synchronized (AppPlatformGrpc.class) { + if ((getGetApplicationMethod = AppPlatformGrpc.getGetApplicationMethod) == null) { + AppPlatformGrpc.getGetApplicationMethod = + getGetApplicationMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetApplication")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.visionai.v1.GetApplicationRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.visionai.v1.Application.getDefaultInstance())) + .setSchemaDescriptor( + new AppPlatformMethodDescriptorSupplier("GetApplication")) + .build(); + } + } + } + return getGetApplicationMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.CreateApplicationRequest, com.google.longrunning.Operation> + getCreateApplicationMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateApplication", + requestType = com.google.cloud.visionai.v1.CreateApplicationRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.CreateApplicationRequest, com.google.longrunning.Operation> + getCreateApplicationMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.CreateApplicationRequest, com.google.longrunning.Operation> + getCreateApplicationMethod; + if ((getCreateApplicationMethod = AppPlatformGrpc.getCreateApplicationMethod) == null) { + synchronized (AppPlatformGrpc.class) { + if ((getCreateApplicationMethod = AppPlatformGrpc.getCreateApplicationMethod) == null) { + AppPlatformGrpc.getCreateApplicationMethod = + getCreateApplicationMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateApplication")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.visionai.v1.CreateApplicationRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new AppPlatformMethodDescriptorSupplier("CreateApplication")) + .build(); + } + } + } + return getCreateApplicationMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.UpdateApplicationRequest, com.google.longrunning.Operation> + getUpdateApplicationMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdateApplication", + requestType = com.google.cloud.visionai.v1.UpdateApplicationRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.UpdateApplicationRequest, com.google.longrunning.Operation> + getUpdateApplicationMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.UpdateApplicationRequest, com.google.longrunning.Operation> + getUpdateApplicationMethod; + if ((getUpdateApplicationMethod = AppPlatformGrpc.getUpdateApplicationMethod) == null) { + synchronized (AppPlatformGrpc.class) { + if ((getUpdateApplicationMethod = AppPlatformGrpc.getUpdateApplicationMethod) == null) { + AppPlatformGrpc.getUpdateApplicationMethod = + getUpdateApplicationMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateApplication")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.visionai.v1.UpdateApplicationRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new AppPlatformMethodDescriptorSupplier("UpdateApplication")) + .build(); + } + } + } + return getUpdateApplicationMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.DeleteApplicationRequest, com.google.longrunning.Operation> + getDeleteApplicationMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteApplication", + requestType = com.google.cloud.visionai.v1.DeleteApplicationRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.DeleteApplicationRequest, com.google.longrunning.Operation> + getDeleteApplicationMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.DeleteApplicationRequest, com.google.longrunning.Operation> + getDeleteApplicationMethod; + if ((getDeleteApplicationMethod = AppPlatformGrpc.getDeleteApplicationMethod) == null) { + synchronized (AppPlatformGrpc.class) { + if ((getDeleteApplicationMethod = AppPlatformGrpc.getDeleteApplicationMethod) == null) { + AppPlatformGrpc.getDeleteApplicationMethod = + getDeleteApplicationMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteApplication")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.visionai.v1.DeleteApplicationRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new AppPlatformMethodDescriptorSupplier("DeleteApplication")) + .build(); + } + } + } + return getDeleteApplicationMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.DeployApplicationRequest, com.google.longrunning.Operation> + getDeployApplicationMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeployApplication", + requestType = com.google.cloud.visionai.v1.DeployApplicationRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.DeployApplicationRequest, com.google.longrunning.Operation> + getDeployApplicationMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.DeployApplicationRequest, com.google.longrunning.Operation> + getDeployApplicationMethod; + if ((getDeployApplicationMethod = AppPlatformGrpc.getDeployApplicationMethod) == null) { + synchronized (AppPlatformGrpc.class) { + if ((getDeployApplicationMethod = AppPlatformGrpc.getDeployApplicationMethod) == null) { + AppPlatformGrpc.getDeployApplicationMethod = + getDeployApplicationMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeployApplication")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.visionai.v1.DeployApplicationRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new AppPlatformMethodDescriptorSupplier("DeployApplication")) + .build(); + } + } + } + return getDeployApplicationMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.UndeployApplicationRequest, com.google.longrunning.Operation> + getUndeployApplicationMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UndeployApplication", + requestType = com.google.cloud.visionai.v1.UndeployApplicationRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.UndeployApplicationRequest, com.google.longrunning.Operation> + getUndeployApplicationMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.UndeployApplicationRequest, + com.google.longrunning.Operation> + getUndeployApplicationMethod; + if ((getUndeployApplicationMethod = AppPlatformGrpc.getUndeployApplicationMethod) == null) { + synchronized (AppPlatformGrpc.class) { + if ((getUndeployApplicationMethod = AppPlatformGrpc.getUndeployApplicationMethod) == null) { + AppPlatformGrpc.getUndeployApplicationMethod = + getUndeployApplicationMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "UndeployApplication")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.visionai.v1.UndeployApplicationRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new AppPlatformMethodDescriptorSupplier("UndeployApplication")) + .build(); + } + } + } + return getUndeployApplicationMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.AddApplicationStreamInputRequest, + com.google.longrunning.Operation> + getAddApplicationStreamInputMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "AddApplicationStreamInput", + requestType = com.google.cloud.visionai.v1.AddApplicationStreamInputRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.AddApplicationStreamInputRequest, + com.google.longrunning.Operation> + getAddApplicationStreamInputMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.AddApplicationStreamInputRequest, + com.google.longrunning.Operation> + getAddApplicationStreamInputMethod; + if ((getAddApplicationStreamInputMethod = AppPlatformGrpc.getAddApplicationStreamInputMethod) + == null) { + synchronized (AppPlatformGrpc.class) { + if ((getAddApplicationStreamInputMethod = + AppPlatformGrpc.getAddApplicationStreamInputMethod) + == null) { + AppPlatformGrpc.getAddApplicationStreamInputMethod = + getAddApplicationStreamInputMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "AddApplicationStreamInput")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.visionai.v1.AddApplicationStreamInputRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new AppPlatformMethodDescriptorSupplier("AddApplicationStreamInput")) + .build(); + } + } + } + return getAddApplicationStreamInputMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.RemoveApplicationStreamInputRequest, + com.google.longrunning.Operation> + getRemoveApplicationStreamInputMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "RemoveApplicationStreamInput", + requestType = com.google.cloud.visionai.v1.RemoveApplicationStreamInputRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.RemoveApplicationStreamInputRequest, + com.google.longrunning.Operation> + getRemoveApplicationStreamInputMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.RemoveApplicationStreamInputRequest, + com.google.longrunning.Operation> + getRemoveApplicationStreamInputMethod; + if ((getRemoveApplicationStreamInputMethod = + AppPlatformGrpc.getRemoveApplicationStreamInputMethod) + == null) { + synchronized (AppPlatformGrpc.class) { + if ((getRemoveApplicationStreamInputMethod = + AppPlatformGrpc.getRemoveApplicationStreamInputMethod) + == null) { + AppPlatformGrpc.getRemoveApplicationStreamInputMethod = + getRemoveApplicationStreamInputMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "RemoveApplicationStreamInput")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.visionai.v1.RemoveApplicationStreamInputRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new AppPlatformMethodDescriptorSupplier("RemoveApplicationStreamInput")) + .build(); + } + } + } + return getRemoveApplicationStreamInputMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.UpdateApplicationStreamInputRequest, + com.google.longrunning.Operation> + getUpdateApplicationStreamInputMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdateApplicationStreamInput", + requestType = com.google.cloud.visionai.v1.UpdateApplicationStreamInputRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.UpdateApplicationStreamInputRequest, + com.google.longrunning.Operation> + getUpdateApplicationStreamInputMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.UpdateApplicationStreamInputRequest, + com.google.longrunning.Operation> + getUpdateApplicationStreamInputMethod; + if ((getUpdateApplicationStreamInputMethod = + AppPlatformGrpc.getUpdateApplicationStreamInputMethod) + == null) { + synchronized (AppPlatformGrpc.class) { + if ((getUpdateApplicationStreamInputMethod = + AppPlatformGrpc.getUpdateApplicationStreamInputMethod) + == null) { + AppPlatformGrpc.getUpdateApplicationStreamInputMethod = + getUpdateApplicationStreamInputMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "UpdateApplicationStreamInput")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.visionai.v1.UpdateApplicationStreamInputRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new AppPlatformMethodDescriptorSupplier("UpdateApplicationStreamInput")) + .build(); + } + } + } + return getUpdateApplicationStreamInputMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.ListInstancesRequest, + com.google.cloud.visionai.v1.ListInstancesResponse> + getListInstancesMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListInstances", + requestType = com.google.cloud.visionai.v1.ListInstancesRequest.class, + responseType = com.google.cloud.visionai.v1.ListInstancesResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.ListInstancesRequest, + com.google.cloud.visionai.v1.ListInstancesResponse> + getListInstancesMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.ListInstancesRequest, + com.google.cloud.visionai.v1.ListInstancesResponse> + getListInstancesMethod; + if ((getListInstancesMethod = AppPlatformGrpc.getListInstancesMethod) == null) { + synchronized (AppPlatformGrpc.class) { + if ((getListInstancesMethod = AppPlatformGrpc.getListInstancesMethod) == null) { + AppPlatformGrpc.getListInstancesMethod = + getListInstancesMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListInstances")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.visionai.v1.ListInstancesRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.visionai.v1.ListInstancesResponse + .getDefaultInstance())) + .setSchemaDescriptor(new AppPlatformMethodDescriptorSupplier("ListInstances")) + .build(); + } + } + } + return getListInstancesMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.GetInstanceRequest, com.google.cloud.visionai.v1.Instance> + getGetInstanceMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetInstance", + requestType = com.google.cloud.visionai.v1.GetInstanceRequest.class, + responseType = com.google.cloud.visionai.v1.Instance.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.GetInstanceRequest, com.google.cloud.visionai.v1.Instance> + getGetInstanceMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.GetInstanceRequest, com.google.cloud.visionai.v1.Instance> + getGetInstanceMethod; + if ((getGetInstanceMethod = AppPlatformGrpc.getGetInstanceMethod) == null) { + synchronized (AppPlatformGrpc.class) { + if ((getGetInstanceMethod = AppPlatformGrpc.getGetInstanceMethod) == null) { + AppPlatformGrpc.getGetInstanceMethod = + getGetInstanceMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetInstance")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.visionai.v1.GetInstanceRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.visionai.v1.Instance.getDefaultInstance())) + .setSchemaDescriptor(new AppPlatformMethodDescriptorSupplier("GetInstance")) + .build(); + } + } + } + return getGetInstanceMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.CreateApplicationInstancesRequest, + com.google.longrunning.Operation> + getCreateApplicationInstancesMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateApplicationInstances", + requestType = com.google.cloud.visionai.v1.CreateApplicationInstancesRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.CreateApplicationInstancesRequest, + com.google.longrunning.Operation> + getCreateApplicationInstancesMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.CreateApplicationInstancesRequest, + com.google.longrunning.Operation> + getCreateApplicationInstancesMethod; + if ((getCreateApplicationInstancesMethod = AppPlatformGrpc.getCreateApplicationInstancesMethod) + == null) { + synchronized (AppPlatformGrpc.class) { + if ((getCreateApplicationInstancesMethod = + AppPlatformGrpc.getCreateApplicationInstancesMethod) + == null) { + AppPlatformGrpc.getCreateApplicationInstancesMethod = + getCreateApplicationInstancesMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "CreateApplicationInstances")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.visionai.v1.CreateApplicationInstancesRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new AppPlatformMethodDescriptorSupplier("CreateApplicationInstances")) + .build(); + } + } + } + return getCreateApplicationInstancesMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.DeleteApplicationInstancesRequest, + com.google.longrunning.Operation> + getDeleteApplicationInstancesMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteApplicationInstances", + requestType = com.google.cloud.visionai.v1.DeleteApplicationInstancesRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.DeleteApplicationInstancesRequest, + com.google.longrunning.Operation> + getDeleteApplicationInstancesMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.DeleteApplicationInstancesRequest, + com.google.longrunning.Operation> + getDeleteApplicationInstancesMethod; + if ((getDeleteApplicationInstancesMethod = AppPlatformGrpc.getDeleteApplicationInstancesMethod) + == null) { + synchronized (AppPlatformGrpc.class) { + if ((getDeleteApplicationInstancesMethod = + AppPlatformGrpc.getDeleteApplicationInstancesMethod) + == null) { + AppPlatformGrpc.getDeleteApplicationInstancesMethod = + getDeleteApplicationInstancesMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "DeleteApplicationInstances")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.visionai.v1.DeleteApplicationInstancesRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new AppPlatformMethodDescriptorSupplier("DeleteApplicationInstances")) + .build(); + } + } + } + return getDeleteApplicationInstancesMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.UpdateApplicationInstancesRequest, + com.google.longrunning.Operation> + getUpdateApplicationInstancesMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdateApplicationInstances", + requestType = com.google.cloud.visionai.v1.UpdateApplicationInstancesRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.UpdateApplicationInstancesRequest, + com.google.longrunning.Operation> + getUpdateApplicationInstancesMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.UpdateApplicationInstancesRequest, + com.google.longrunning.Operation> + getUpdateApplicationInstancesMethod; + if ((getUpdateApplicationInstancesMethod = AppPlatformGrpc.getUpdateApplicationInstancesMethod) + == null) { + synchronized (AppPlatformGrpc.class) { + if ((getUpdateApplicationInstancesMethod = + AppPlatformGrpc.getUpdateApplicationInstancesMethod) + == null) { + AppPlatformGrpc.getUpdateApplicationInstancesMethod = + getUpdateApplicationInstancesMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "UpdateApplicationInstances")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.visionai.v1.UpdateApplicationInstancesRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new AppPlatformMethodDescriptorSupplier("UpdateApplicationInstances")) + .build(); + } + } + } + return getUpdateApplicationInstancesMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.ListDraftsRequest, + com.google.cloud.visionai.v1.ListDraftsResponse> + getListDraftsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListDrafts", + requestType = com.google.cloud.visionai.v1.ListDraftsRequest.class, + responseType = com.google.cloud.visionai.v1.ListDraftsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.ListDraftsRequest, + com.google.cloud.visionai.v1.ListDraftsResponse> + getListDraftsMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.ListDraftsRequest, + com.google.cloud.visionai.v1.ListDraftsResponse> + getListDraftsMethod; + if ((getListDraftsMethod = AppPlatformGrpc.getListDraftsMethod) == null) { + synchronized (AppPlatformGrpc.class) { + if ((getListDraftsMethod = AppPlatformGrpc.getListDraftsMethod) == null) { + AppPlatformGrpc.getListDraftsMethod = + getListDraftsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListDrafts")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.visionai.v1.ListDraftsRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.visionai.v1.ListDraftsResponse.getDefaultInstance())) + .setSchemaDescriptor(new AppPlatformMethodDescriptorSupplier("ListDrafts")) + .build(); + } + } + } + return getListDraftsMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.GetDraftRequest, com.google.cloud.visionai.v1.Draft> + getGetDraftMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetDraft", + requestType = com.google.cloud.visionai.v1.GetDraftRequest.class, + responseType = com.google.cloud.visionai.v1.Draft.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.GetDraftRequest, com.google.cloud.visionai.v1.Draft> + getGetDraftMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.GetDraftRequest, com.google.cloud.visionai.v1.Draft> + getGetDraftMethod; + if ((getGetDraftMethod = AppPlatformGrpc.getGetDraftMethod) == null) { + synchronized (AppPlatformGrpc.class) { + if ((getGetDraftMethod = AppPlatformGrpc.getGetDraftMethod) == null) { + AppPlatformGrpc.getGetDraftMethod = + getGetDraftMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetDraft")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.visionai.v1.GetDraftRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.visionai.v1.Draft.getDefaultInstance())) + .setSchemaDescriptor(new AppPlatformMethodDescriptorSupplier("GetDraft")) + .build(); + } + } + } + return getGetDraftMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.CreateDraftRequest, com.google.longrunning.Operation> + getCreateDraftMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateDraft", + requestType = com.google.cloud.visionai.v1.CreateDraftRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.CreateDraftRequest, com.google.longrunning.Operation> + getCreateDraftMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.CreateDraftRequest, com.google.longrunning.Operation> + getCreateDraftMethod; + if ((getCreateDraftMethod = AppPlatformGrpc.getCreateDraftMethod) == null) { + synchronized (AppPlatformGrpc.class) { + if ((getCreateDraftMethod = AppPlatformGrpc.getCreateDraftMethod) == null) { + AppPlatformGrpc.getCreateDraftMethod = + getCreateDraftMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateDraft")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.visionai.v1.CreateDraftRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor(new AppPlatformMethodDescriptorSupplier("CreateDraft")) + .build(); + } + } + } + return getCreateDraftMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.UpdateDraftRequest, com.google.longrunning.Operation> + getUpdateDraftMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdateDraft", + requestType = com.google.cloud.visionai.v1.UpdateDraftRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.UpdateDraftRequest, com.google.longrunning.Operation> + getUpdateDraftMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.UpdateDraftRequest, com.google.longrunning.Operation> + getUpdateDraftMethod; + if ((getUpdateDraftMethod = AppPlatformGrpc.getUpdateDraftMethod) == null) { + synchronized (AppPlatformGrpc.class) { + if ((getUpdateDraftMethod = AppPlatformGrpc.getUpdateDraftMethod) == null) { + AppPlatformGrpc.getUpdateDraftMethod = + getUpdateDraftMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateDraft")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.visionai.v1.UpdateDraftRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor(new AppPlatformMethodDescriptorSupplier("UpdateDraft")) + .build(); + } + } + } + return getUpdateDraftMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.DeleteDraftRequest, com.google.longrunning.Operation> + getDeleteDraftMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteDraft", + requestType = com.google.cloud.visionai.v1.DeleteDraftRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.DeleteDraftRequest, com.google.longrunning.Operation> + getDeleteDraftMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.DeleteDraftRequest, com.google.longrunning.Operation> + getDeleteDraftMethod; + if ((getDeleteDraftMethod = AppPlatformGrpc.getDeleteDraftMethod) == null) { + synchronized (AppPlatformGrpc.class) { + if ((getDeleteDraftMethod = AppPlatformGrpc.getDeleteDraftMethod) == null) { + AppPlatformGrpc.getDeleteDraftMethod = + getDeleteDraftMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteDraft")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.visionai.v1.DeleteDraftRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor(new AppPlatformMethodDescriptorSupplier("DeleteDraft")) + .build(); + } + } + } + return getDeleteDraftMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.ListProcessorsRequest, + com.google.cloud.visionai.v1.ListProcessorsResponse> + getListProcessorsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListProcessors", + requestType = com.google.cloud.visionai.v1.ListProcessorsRequest.class, + responseType = com.google.cloud.visionai.v1.ListProcessorsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.ListProcessorsRequest, + com.google.cloud.visionai.v1.ListProcessorsResponse> + getListProcessorsMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.ListProcessorsRequest, + com.google.cloud.visionai.v1.ListProcessorsResponse> + getListProcessorsMethod; + if ((getListProcessorsMethod = AppPlatformGrpc.getListProcessorsMethod) == null) { + synchronized (AppPlatformGrpc.class) { + if ((getListProcessorsMethod = AppPlatformGrpc.getListProcessorsMethod) == null) { + AppPlatformGrpc.getListProcessorsMethod = + getListProcessorsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListProcessors")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.visionai.v1.ListProcessorsRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.visionai.v1.ListProcessorsResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new AppPlatformMethodDescriptorSupplier("ListProcessors")) + .build(); + } + } + } + return getListProcessorsMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.ListPrebuiltProcessorsRequest, + com.google.cloud.visionai.v1.ListPrebuiltProcessorsResponse> + getListPrebuiltProcessorsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListPrebuiltProcessors", + requestType = com.google.cloud.visionai.v1.ListPrebuiltProcessorsRequest.class, + responseType = com.google.cloud.visionai.v1.ListPrebuiltProcessorsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.ListPrebuiltProcessorsRequest, + com.google.cloud.visionai.v1.ListPrebuiltProcessorsResponse> + getListPrebuiltProcessorsMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.ListPrebuiltProcessorsRequest, + com.google.cloud.visionai.v1.ListPrebuiltProcessorsResponse> + getListPrebuiltProcessorsMethod; + if ((getListPrebuiltProcessorsMethod = AppPlatformGrpc.getListPrebuiltProcessorsMethod) + == null) { + synchronized (AppPlatformGrpc.class) { + if ((getListPrebuiltProcessorsMethod = AppPlatformGrpc.getListPrebuiltProcessorsMethod) + == null) { + AppPlatformGrpc.getListPrebuiltProcessorsMethod = + getListPrebuiltProcessorsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "ListPrebuiltProcessors")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.visionai.v1.ListPrebuiltProcessorsRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.visionai.v1.ListPrebuiltProcessorsResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new AppPlatformMethodDescriptorSupplier("ListPrebuiltProcessors")) + .build(); + } + } + } + return getListPrebuiltProcessorsMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.GetProcessorRequest, com.google.cloud.visionai.v1.Processor> + getGetProcessorMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetProcessor", + requestType = com.google.cloud.visionai.v1.GetProcessorRequest.class, + responseType = com.google.cloud.visionai.v1.Processor.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.GetProcessorRequest, com.google.cloud.visionai.v1.Processor> + getGetProcessorMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.GetProcessorRequest, + com.google.cloud.visionai.v1.Processor> + getGetProcessorMethod; + if ((getGetProcessorMethod = AppPlatformGrpc.getGetProcessorMethod) == null) { + synchronized (AppPlatformGrpc.class) { + if ((getGetProcessorMethod = AppPlatformGrpc.getGetProcessorMethod) == null) { + AppPlatformGrpc.getGetProcessorMethod = + getGetProcessorMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetProcessor")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.visionai.v1.GetProcessorRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.visionai.v1.Processor.getDefaultInstance())) + .setSchemaDescriptor(new AppPlatformMethodDescriptorSupplier("GetProcessor")) + .build(); + } + } + } + return getGetProcessorMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.CreateProcessorRequest, com.google.longrunning.Operation> + getCreateProcessorMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateProcessor", + requestType = com.google.cloud.visionai.v1.CreateProcessorRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.CreateProcessorRequest, com.google.longrunning.Operation> + getCreateProcessorMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.CreateProcessorRequest, com.google.longrunning.Operation> + getCreateProcessorMethod; + if ((getCreateProcessorMethod = AppPlatformGrpc.getCreateProcessorMethod) == null) { + synchronized (AppPlatformGrpc.class) { + if ((getCreateProcessorMethod = AppPlatformGrpc.getCreateProcessorMethod) == null) { + AppPlatformGrpc.getCreateProcessorMethod = + getCreateProcessorMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateProcessor")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.visionai.v1.CreateProcessorRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new AppPlatformMethodDescriptorSupplier("CreateProcessor")) + .build(); + } + } + } + return getCreateProcessorMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.UpdateProcessorRequest, com.google.longrunning.Operation> + getUpdateProcessorMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdateProcessor", + requestType = com.google.cloud.visionai.v1.UpdateProcessorRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.UpdateProcessorRequest, com.google.longrunning.Operation> + getUpdateProcessorMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.UpdateProcessorRequest, com.google.longrunning.Operation> + getUpdateProcessorMethod; + if ((getUpdateProcessorMethod = AppPlatformGrpc.getUpdateProcessorMethod) == null) { + synchronized (AppPlatformGrpc.class) { + if ((getUpdateProcessorMethod = AppPlatformGrpc.getUpdateProcessorMethod) == null) { + AppPlatformGrpc.getUpdateProcessorMethod = + getUpdateProcessorMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateProcessor")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.visionai.v1.UpdateProcessorRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new AppPlatformMethodDescriptorSupplier("UpdateProcessor")) + .build(); + } + } + } + return getUpdateProcessorMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.DeleteProcessorRequest, com.google.longrunning.Operation> + getDeleteProcessorMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteProcessor", + requestType = com.google.cloud.visionai.v1.DeleteProcessorRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.DeleteProcessorRequest, com.google.longrunning.Operation> + getDeleteProcessorMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.DeleteProcessorRequest, com.google.longrunning.Operation> + getDeleteProcessorMethod; + if ((getDeleteProcessorMethod = AppPlatformGrpc.getDeleteProcessorMethod) == null) { + synchronized (AppPlatformGrpc.class) { + if ((getDeleteProcessorMethod = AppPlatformGrpc.getDeleteProcessorMethod) == null) { + AppPlatformGrpc.getDeleteProcessorMethod = + getDeleteProcessorMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteProcessor")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.visionai.v1.DeleteProcessorRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new AppPlatformMethodDescriptorSupplier("DeleteProcessor")) + .build(); + } + } + } + return getDeleteProcessorMethod; + } + + /** Creates a new async stub that supports all call types for the service */ + public static AppPlatformStub newStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public AppPlatformStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new AppPlatformStub(channel, callOptions); + } + }; + return AppPlatformStub.newStub(factory, channel); + } + + /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service + */ + public static AppPlatformBlockingStub newBlockingStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public AppPlatformBlockingStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new AppPlatformBlockingStub(channel, callOptions); + } + }; + return AppPlatformBlockingStub.newStub(factory, channel); + } + + /** Creates a new ListenableFuture-style stub that supports unary calls on the service */ + public static AppPlatformFutureStub newFutureStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public AppPlatformFutureStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new AppPlatformFutureStub(channel, callOptions); + } + }; + return AppPlatformFutureStub.newStub(factory, channel); + } + + /** + * + * + *
+   * Service describing handlers for resources
+   * 
+ */ + public interface AsyncService { + + /** + * + * + *
+     * Lists Applications in a given project and location.
+     * 
+ */ + default void listApplications( + com.google.cloud.visionai.v1.ListApplicationsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListApplicationsMethod(), responseObserver); + } + + /** + * + * + *
+     * Gets details of a single Application.
+     * 
+ */ + default void getApplication( + com.google.cloud.visionai.v1.GetApplicationRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getGetApplicationMethod(), responseObserver); + } + + /** + * + * + *
+     * Creates a new Application in a given project and location.
+     * 
+ */ + default void createApplication( + com.google.cloud.visionai.v1.CreateApplicationRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getCreateApplicationMethod(), responseObserver); + } + + /** + * + * + *
+     * Updates the parameters of a single Application.
+     * 
+ */ + default void updateApplication( + com.google.cloud.visionai.v1.UpdateApplicationRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getUpdateApplicationMethod(), responseObserver); + } + + /** + * + * + *
+     * Deletes a single Application.
+     * 
+ */ + default void deleteApplication( + com.google.cloud.visionai.v1.DeleteApplicationRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getDeleteApplicationMethod(), responseObserver); + } + + /** + * + * + *
+     * Deploys a single Application.
+     * 
+ */ + default void deployApplication( + com.google.cloud.visionai.v1.DeployApplicationRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getDeployApplicationMethod(), responseObserver); + } + + /** + * + * + *
+     * Undeploys a single Application.
+     * 
+ */ + default void undeployApplication( + com.google.cloud.visionai.v1.UndeployApplicationRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getUndeployApplicationMethod(), responseObserver); + } + + /** + * + * + *
+     * Adds target stream input to the Application.
+     * If the Application is deployed, the corresponding new Application instance
+     * will be created. If the stream has already been in the Application, the RPC
+     * will fail.
+     * 
+ */ + default void addApplicationStreamInput( + com.google.cloud.visionai.v1.AddApplicationStreamInputRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getAddApplicationStreamInputMethod(), responseObserver); + } + + /** + * + * + *
+     * Remove target stream input to the Application, if the Application is
+     * deployed, the corresponding instance based will be deleted. If the stream
+     * is not in the Application, the RPC will fail.
+     * 
+ */ + default void removeApplicationStreamInput( + com.google.cloud.visionai.v1.RemoveApplicationStreamInputRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getRemoveApplicationStreamInputMethod(), responseObserver); + } + + /** + * + * + *
+     * Update target stream input to the Application, if the Application is
+     * deployed, the corresponding instance based will be deployed. For
+     * CreateOrUpdate behavior, set allow_missing to true.
+     * 
+ */ + default void updateApplicationStreamInput( + com.google.cloud.visionai.v1.UpdateApplicationStreamInputRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getUpdateApplicationStreamInputMethod(), responseObserver); + } + + /** + * + * + *
+     * Lists Instances in a given project and location.
+     * 
+ */ + default void listInstances( + com.google.cloud.visionai.v1.ListInstancesRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListInstancesMethod(), responseObserver); + } + + /** + * + * + *
+     * Gets details of a single Instance.
+     * 
+ */ + default void getInstance( + com.google.cloud.visionai.v1.GetInstanceRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getGetInstanceMethod(), responseObserver); + } + + /** + * + * + *
+     * Adds target stream input to the Application.
+     * If the Application is deployed, the corresponding new Application instance
+     * will be created. If the stream has already been in the Application, the RPC
+     * will fail.
+     * 
+ */ + default void createApplicationInstances( + com.google.cloud.visionai.v1.CreateApplicationInstancesRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getCreateApplicationInstancesMethod(), responseObserver); + } + + /** + * + * + *
+     * Remove target stream input to the Application, if the Application is
+     * deployed, the corresponding instance based will be deleted. If the stream
+     * is not in the Application, the RPC will fail.
+     * 
+ */ + default void deleteApplicationInstances( + com.google.cloud.visionai.v1.DeleteApplicationInstancesRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getDeleteApplicationInstancesMethod(), responseObserver); + } + + /** + * + * + *
+     * Adds target stream input to the Application.
+     * If the Application is deployed, the corresponding new Application instance
+     * will be created. If the stream has already been in the Application, the RPC
+     * will fail.
+     * 
+ */ + default void updateApplicationInstances( + com.google.cloud.visionai.v1.UpdateApplicationInstancesRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getUpdateApplicationInstancesMethod(), responseObserver); + } + + /** + * + * + *
+     * Lists Drafts in a given project and location.
+     * 
+ */ + default void listDrafts( + com.google.cloud.visionai.v1.ListDraftsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListDraftsMethod(), responseObserver); + } + + /** + * + * + *
+     * Gets details of a single Draft.
+     * 
+ */ + default void getDraft( + com.google.cloud.visionai.v1.GetDraftRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetDraftMethod(), responseObserver); + } + + /** + * + * + *
+     * Creates a new Draft in a given project and location.
+     * 
+ */ + default void createDraft( + com.google.cloud.visionai.v1.CreateDraftRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getCreateDraftMethod(), responseObserver); + } + + /** + * + * + *
+     * Updates the parameters of a single Draft.
+     * 
+ */ + default void updateDraft( + com.google.cloud.visionai.v1.UpdateDraftRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getUpdateDraftMethod(), responseObserver); + } + + /** + * + * + *
+     * Deletes a single Draft.
+     * 
+ */ + default void deleteDraft( + com.google.cloud.visionai.v1.DeleteDraftRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getDeleteDraftMethod(), responseObserver); + } + + /** + * + * + *
+     * Lists Processors in a given project and location.
+     * 
+ */ + default void listProcessors( + com.google.cloud.visionai.v1.ListProcessorsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListProcessorsMethod(), responseObserver); + } + + /** + * + * + *
+     * ListPrebuiltProcessors is a custom pass-through verb that Lists Prebuilt
+     * Processors.
+     * 
+ */ + default void listPrebuiltProcessors( + com.google.cloud.visionai.v1.ListPrebuiltProcessorsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListPrebuiltProcessorsMethod(), responseObserver); + } + + /** + * + * + *
+     * Gets details of a single Processor.
+     * 
+ */ + default void getProcessor( + com.google.cloud.visionai.v1.GetProcessorRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getGetProcessorMethod(), responseObserver); + } + + /** + * + * + *
+     * Creates a new Processor in a given project and location.
+     * 
+ */ + default void createProcessor( + com.google.cloud.visionai.v1.CreateProcessorRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getCreateProcessorMethod(), responseObserver); + } + + /** + * + * + *
+     * Updates the parameters of a single Processor.
+     * 
+ */ + default void updateProcessor( + com.google.cloud.visionai.v1.UpdateProcessorRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getUpdateProcessorMethod(), responseObserver); + } + + /** + * + * + *
+     * Deletes a single Processor.
+     * 
+ */ + default void deleteProcessor( + com.google.cloud.visionai.v1.DeleteProcessorRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getDeleteProcessorMethod(), responseObserver); + } + } + + /** + * Base class for the server implementation of the service AppPlatform. + * + *
+   * Service describing handlers for resources
+   * 
+ */ + public abstract static class AppPlatformImplBase + implements io.grpc.BindableService, AsyncService { + + @java.lang.Override + public final io.grpc.ServerServiceDefinition bindService() { + return AppPlatformGrpc.bindService(this); + } + } + + /** + * A stub to allow clients to do asynchronous rpc calls to service AppPlatform. + * + *
+   * Service describing handlers for resources
+   * 
+ */ + public static final class AppPlatformStub + extends io.grpc.stub.AbstractAsyncStub { + private AppPlatformStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected AppPlatformStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new AppPlatformStub(channel, callOptions); + } + + /** + * + * + *
+     * Lists Applications in a given project and location.
+     * 
+ */ + public void listApplications( + com.google.cloud.visionai.v1.ListApplicationsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListApplicationsMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Gets details of a single Application.
+     * 
+ */ + public void getApplication( + com.google.cloud.visionai.v1.GetApplicationRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetApplicationMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Creates a new Application in a given project and location.
+     * 
+ */ + public void createApplication( + com.google.cloud.visionai.v1.CreateApplicationRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreateApplicationMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Updates the parameters of a single Application.
+     * 
+ */ + public void updateApplication( + com.google.cloud.visionai.v1.UpdateApplicationRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUpdateApplicationMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Deletes a single Application.
+     * 
+ */ + public void deleteApplication( + com.google.cloud.visionai.v1.DeleteApplicationRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeleteApplicationMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Deploys a single Application.
+     * 
+ */ + public void deployApplication( + com.google.cloud.visionai.v1.DeployApplicationRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeployApplicationMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Undeploys a single Application.
+     * 
+ */ + public void undeployApplication( + com.google.cloud.visionai.v1.UndeployApplicationRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUndeployApplicationMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Adds target stream input to the Application.
+     * If the Application is deployed, the corresponding new Application instance
+     * will be created. If the stream has already been in the Application, the RPC
+     * will fail.
+     * 
+ */ + public void addApplicationStreamInput( + com.google.cloud.visionai.v1.AddApplicationStreamInputRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getAddApplicationStreamInputMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Remove target stream input to the Application, if the Application is
+     * deployed, the corresponding instance based will be deleted. If the stream
+     * is not in the Application, the RPC will fail.
+     * 
+ */ + public void removeApplicationStreamInput( + com.google.cloud.visionai.v1.RemoveApplicationStreamInputRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getRemoveApplicationStreamInputMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Update target stream input to the Application, if the Application is
+     * deployed, the corresponding instance based will be deployed. For
+     * CreateOrUpdate behavior, set allow_missing to true.
+     * 
+ */ + public void updateApplicationStreamInput( + com.google.cloud.visionai.v1.UpdateApplicationStreamInputRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUpdateApplicationStreamInputMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Lists Instances in a given project and location.
+     * 
+ */ + public void listInstances( + com.google.cloud.visionai.v1.ListInstancesRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListInstancesMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Gets details of a single Instance.
+     * 
+ */ + public void getInstance( + com.google.cloud.visionai.v1.GetInstanceRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetInstanceMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Adds target stream input to the Application.
+     * If the Application is deployed, the corresponding new Application instance
+     * will be created. If the stream has already been in the Application, the RPC
+     * will fail.
+     * 
+ */ + public void createApplicationInstances( + com.google.cloud.visionai.v1.CreateApplicationInstancesRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreateApplicationInstancesMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Remove target stream input to the Application, if the Application is
+     * deployed, the corresponding instance based will be deleted. If the stream
+     * is not in the Application, the RPC will fail.
+     * 
+ */ + public void deleteApplicationInstances( + com.google.cloud.visionai.v1.DeleteApplicationInstancesRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeleteApplicationInstancesMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Adds target stream input to the Application.
+     * If the Application is deployed, the corresponding new Application instance
+     * will be created. If the stream has already been in the Application, the RPC
+     * will fail.
+     * 
+ */ + public void updateApplicationInstances( + com.google.cloud.visionai.v1.UpdateApplicationInstancesRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUpdateApplicationInstancesMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Lists Drafts in a given project and location.
+     * 
+ */ + public void listDrafts( + com.google.cloud.visionai.v1.ListDraftsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListDraftsMethod(), getCallOptions()), request, responseObserver); + } + + /** + * + * + *
+     * Gets details of a single Draft.
+     * 
+ */ + public void getDraft( + com.google.cloud.visionai.v1.GetDraftRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetDraftMethod(), getCallOptions()), request, responseObserver); + } + + /** + * + * + *
+     * Creates a new Draft in a given project and location.
+     * 
+ */ + public void createDraft( + com.google.cloud.visionai.v1.CreateDraftRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreateDraftMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Updates the parameters of a single Draft.
+     * 
+ */ + public void updateDraft( + com.google.cloud.visionai.v1.UpdateDraftRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUpdateDraftMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Deletes a single Draft.
+     * 
+ */ + public void deleteDraft( + com.google.cloud.visionai.v1.DeleteDraftRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeleteDraftMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Lists Processors in a given project and location.
+     * 
+ */ + public void listProcessors( + com.google.cloud.visionai.v1.ListProcessorsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListProcessorsMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * ListPrebuiltProcessors is a custom pass-through verb that Lists Prebuilt
+     * Processors.
+     * 
+ */ + public void listPrebuiltProcessors( + com.google.cloud.visionai.v1.ListPrebuiltProcessorsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListPrebuiltProcessorsMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Gets details of a single Processor.
+     * 
+ */ + public void getProcessor( + com.google.cloud.visionai.v1.GetProcessorRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetProcessorMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Creates a new Processor in a given project and location.
+     * 
+ */ + public void createProcessor( + com.google.cloud.visionai.v1.CreateProcessorRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreateProcessorMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Updates the parameters of a single Processor.
+     * 
+ */ + public void updateProcessor( + com.google.cloud.visionai.v1.UpdateProcessorRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUpdateProcessorMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Deletes a single Processor.
+     * 
+ */ + public void deleteProcessor( + com.google.cloud.visionai.v1.DeleteProcessorRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeleteProcessorMethod(), getCallOptions()), + request, + responseObserver); + } + } + + /** + * A stub to allow clients to do synchronous rpc calls to service AppPlatform. + * + *
+   * Service describing handlers for resources
+   * 
+ */ + public static final class AppPlatformBlockingStub + extends io.grpc.stub.AbstractBlockingStub { + private AppPlatformBlockingStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected AppPlatformBlockingStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new AppPlatformBlockingStub(channel, callOptions); + } + + /** + * + * + *
+     * Lists Applications in a given project and location.
+     * 
+ */ + public com.google.cloud.visionai.v1.ListApplicationsResponse listApplications( + com.google.cloud.visionai.v1.ListApplicationsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListApplicationsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets details of a single Application.
+     * 
+ */ + public com.google.cloud.visionai.v1.Application getApplication( + com.google.cloud.visionai.v1.GetApplicationRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetApplicationMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Creates a new Application in a given project and location.
+     * 
+ */ + public com.google.longrunning.Operation createApplication( + com.google.cloud.visionai.v1.CreateApplicationRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreateApplicationMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Updates the parameters of a single Application.
+     * 
+ */ + public com.google.longrunning.Operation updateApplication( + com.google.cloud.visionai.v1.UpdateApplicationRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpdateApplicationMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Deletes a single Application.
+     * 
+ */ + public com.google.longrunning.Operation deleteApplication( + com.google.cloud.visionai.v1.DeleteApplicationRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeleteApplicationMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Deploys a single Application.
+     * 
+ */ + public com.google.longrunning.Operation deployApplication( + com.google.cloud.visionai.v1.DeployApplicationRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeployApplicationMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Undeploys a single Application.
+     * 
+ */ + public com.google.longrunning.Operation undeployApplication( + com.google.cloud.visionai.v1.UndeployApplicationRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUndeployApplicationMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Adds target stream input to the Application.
+     * If the Application is deployed, the corresponding new Application instance
+     * will be created. If the stream has already been in the Application, the RPC
+     * will fail.
+     * 
+ */ + public com.google.longrunning.Operation addApplicationStreamInput( + com.google.cloud.visionai.v1.AddApplicationStreamInputRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getAddApplicationStreamInputMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Remove target stream input to the Application, if the Application is
+     * deployed, the corresponding instance based will be deleted. If the stream
+     * is not in the Application, the RPC will fail.
+     * 
+ */ + public com.google.longrunning.Operation removeApplicationStreamInput( + com.google.cloud.visionai.v1.RemoveApplicationStreamInputRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getRemoveApplicationStreamInputMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Update target stream input to the Application, if the Application is
+     * deployed, the corresponding instance based will be deployed. For
+     * CreateOrUpdate behavior, set allow_missing to true.
+     * 
+ */ + public com.google.longrunning.Operation updateApplicationStreamInput( + com.google.cloud.visionai.v1.UpdateApplicationStreamInputRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpdateApplicationStreamInputMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lists Instances in a given project and location.
+     * 
+ */ + public com.google.cloud.visionai.v1.ListInstancesResponse listInstances( + com.google.cloud.visionai.v1.ListInstancesRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListInstancesMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets details of a single Instance.
+     * 
+ */ + public com.google.cloud.visionai.v1.Instance getInstance( + com.google.cloud.visionai.v1.GetInstanceRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetInstanceMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Adds target stream input to the Application.
+     * If the Application is deployed, the corresponding new Application instance
+     * will be created. If the stream has already been in the Application, the RPC
+     * will fail.
+     * 
+ */ + public com.google.longrunning.Operation createApplicationInstances( + com.google.cloud.visionai.v1.CreateApplicationInstancesRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreateApplicationInstancesMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Remove target stream input to the Application, if the Application is
+     * deployed, the corresponding instance based will be deleted. If the stream
+     * is not in the Application, the RPC will fail.
+     * 
+ */ + public com.google.longrunning.Operation deleteApplicationInstances( + com.google.cloud.visionai.v1.DeleteApplicationInstancesRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeleteApplicationInstancesMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Adds target stream input to the Application.
+     * If the Application is deployed, the corresponding new Application instance
+     * will be created. If the stream has already been in the Application, the RPC
+     * will fail.
+     * 
+ */ + public com.google.longrunning.Operation updateApplicationInstances( + com.google.cloud.visionai.v1.UpdateApplicationInstancesRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpdateApplicationInstancesMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lists Drafts in a given project and location.
+     * 
+ */ + public com.google.cloud.visionai.v1.ListDraftsResponse listDrafts( + com.google.cloud.visionai.v1.ListDraftsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListDraftsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets details of a single Draft.
+     * 
+ */ + public com.google.cloud.visionai.v1.Draft getDraft( + com.google.cloud.visionai.v1.GetDraftRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetDraftMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Creates a new Draft in a given project and location.
+     * 
+ */ + public com.google.longrunning.Operation createDraft( + com.google.cloud.visionai.v1.CreateDraftRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreateDraftMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Updates the parameters of a single Draft.
+     * 
+ */ + public com.google.longrunning.Operation updateDraft( + com.google.cloud.visionai.v1.UpdateDraftRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpdateDraftMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Deletes a single Draft.
+     * 
+ */ + public com.google.longrunning.Operation deleteDraft( + com.google.cloud.visionai.v1.DeleteDraftRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeleteDraftMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lists Processors in a given project and location.
+     * 
+ */ + public com.google.cloud.visionai.v1.ListProcessorsResponse listProcessors( + com.google.cloud.visionai.v1.ListProcessorsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListProcessorsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * ListPrebuiltProcessors is a custom pass-through verb that Lists Prebuilt
+     * Processors.
+     * 
+ */ + public com.google.cloud.visionai.v1.ListPrebuiltProcessorsResponse listPrebuiltProcessors( + com.google.cloud.visionai.v1.ListPrebuiltProcessorsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListPrebuiltProcessorsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets details of a single Processor.
+     * 
+ */ + public com.google.cloud.visionai.v1.Processor getProcessor( + com.google.cloud.visionai.v1.GetProcessorRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetProcessorMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Creates a new Processor in a given project and location.
+     * 
+ */ + public com.google.longrunning.Operation createProcessor( + com.google.cloud.visionai.v1.CreateProcessorRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreateProcessorMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Updates the parameters of a single Processor.
+     * 
+ */ + public com.google.longrunning.Operation updateProcessor( + com.google.cloud.visionai.v1.UpdateProcessorRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpdateProcessorMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Deletes a single Processor.
+     * 
+ */ + public com.google.longrunning.Operation deleteProcessor( + com.google.cloud.visionai.v1.DeleteProcessorRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeleteProcessorMethod(), getCallOptions(), request); + } + } + + /** + * A stub to allow clients to do ListenableFuture-style rpc calls to service AppPlatform. + * + *
+   * Service describing handlers for resources
+   * 
+ */ + public static final class AppPlatformFutureStub + extends io.grpc.stub.AbstractFutureStub { + private AppPlatformFutureStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected AppPlatformFutureStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new AppPlatformFutureStub(channel, callOptions); + } + + /** + * + * + *
+     * Lists Applications in a given project and location.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.visionai.v1.ListApplicationsResponse> + listApplications(com.google.cloud.visionai.v1.ListApplicationsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListApplicationsMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Gets details of a single Application.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.visionai.v1.Application> + getApplication(com.google.cloud.visionai.v1.GetApplicationRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetApplicationMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Creates a new Application in a given project and location.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + createApplication(com.google.cloud.visionai.v1.CreateApplicationRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreateApplicationMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Updates the parameters of a single Application.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + updateApplication(com.google.cloud.visionai.v1.UpdateApplicationRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUpdateApplicationMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Deletes a single Application.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + deleteApplication(com.google.cloud.visionai.v1.DeleteApplicationRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDeleteApplicationMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Deploys a single Application.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + deployApplication(com.google.cloud.visionai.v1.DeployApplicationRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDeployApplicationMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Undeploys a single Application.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + undeployApplication(com.google.cloud.visionai.v1.UndeployApplicationRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUndeployApplicationMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Adds target stream input to the Application.
+     * If the Application is deployed, the corresponding new Application instance
+     * will be created. If the stream has already been in the Application, the RPC
+     * will fail.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + addApplicationStreamInput( + com.google.cloud.visionai.v1.AddApplicationStreamInputRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getAddApplicationStreamInputMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Remove target stream input to the Application, if the Application is
+     * deployed, the corresponding instance based will be deleted. If the stream
+     * is not in the Application, the RPC will fail.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + removeApplicationStreamInput( + com.google.cloud.visionai.v1.RemoveApplicationStreamInputRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getRemoveApplicationStreamInputMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Update target stream input to the Application, if the Application is
+     * deployed, the corresponding instance based will be deployed. For
+     * CreateOrUpdate behavior, set allow_missing to true.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + updateApplicationStreamInput( + com.google.cloud.visionai.v1.UpdateApplicationStreamInputRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUpdateApplicationStreamInputMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Lists Instances in a given project and location.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.visionai.v1.ListInstancesResponse> + listInstances(com.google.cloud.visionai.v1.ListInstancesRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListInstancesMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Gets details of a single Instance.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + getInstance(com.google.cloud.visionai.v1.GetInstanceRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetInstanceMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Adds target stream input to the Application.
+     * If the Application is deployed, the corresponding new Application instance
+     * will be created. If the stream has already been in the Application, the RPC
+     * will fail.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + createApplicationInstances( + com.google.cloud.visionai.v1.CreateApplicationInstancesRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreateApplicationInstancesMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Remove target stream input to the Application, if the Application is
+     * deployed, the corresponding instance based will be deleted. If the stream
+     * is not in the Application, the RPC will fail.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + deleteApplicationInstances( + com.google.cloud.visionai.v1.DeleteApplicationInstancesRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDeleteApplicationInstancesMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Adds target stream input to the Application.
+     * If the Application is deployed, the corresponding new Application instance
+     * will be created. If the stream has already been in the Application, the RPC
+     * will fail.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + updateApplicationInstances( + com.google.cloud.visionai.v1.UpdateApplicationInstancesRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUpdateApplicationInstancesMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Lists Drafts in a given project and location.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.visionai.v1.ListDraftsResponse> + listDrafts(com.google.cloud.visionai.v1.ListDraftsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListDraftsMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Gets details of a single Draft.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + getDraft(com.google.cloud.visionai.v1.GetDraftRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetDraftMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Creates a new Draft in a given project and location.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + createDraft(com.google.cloud.visionai.v1.CreateDraftRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreateDraftMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Updates the parameters of a single Draft.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + updateDraft(com.google.cloud.visionai.v1.UpdateDraftRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUpdateDraftMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Deletes a single Draft.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + deleteDraft(com.google.cloud.visionai.v1.DeleteDraftRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDeleteDraftMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Lists Processors in a given project and location.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.visionai.v1.ListProcessorsResponse> + listProcessors(com.google.cloud.visionai.v1.ListProcessorsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListProcessorsMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * ListPrebuiltProcessors is a custom pass-through verb that Lists Prebuilt
+     * Processors.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.visionai.v1.ListPrebuiltProcessorsResponse> + listPrebuiltProcessors(com.google.cloud.visionai.v1.ListPrebuiltProcessorsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListPrebuiltProcessorsMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Gets details of a single Processor.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.visionai.v1.Processor> + getProcessor(com.google.cloud.visionai.v1.GetProcessorRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetProcessorMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Creates a new Processor in a given project and location.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + createProcessor(com.google.cloud.visionai.v1.CreateProcessorRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreateProcessorMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Updates the parameters of a single Processor.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + updateProcessor(com.google.cloud.visionai.v1.UpdateProcessorRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUpdateProcessorMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Deletes a single Processor.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + deleteProcessor(com.google.cloud.visionai.v1.DeleteProcessorRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDeleteProcessorMethod(), getCallOptions()), request); + } + } + + private static final int METHODID_LIST_APPLICATIONS = 0; + private static final int METHODID_GET_APPLICATION = 1; + private static final int METHODID_CREATE_APPLICATION = 2; + private static final int METHODID_UPDATE_APPLICATION = 3; + private static final int METHODID_DELETE_APPLICATION = 4; + private static final int METHODID_DEPLOY_APPLICATION = 5; + private static final int METHODID_UNDEPLOY_APPLICATION = 6; + private static final int METHODID_ADD_APPLICATION_STREAM_INPUT = 7; + private static final int METHODID_REMOVE_APPLICATION_STREAM_INPUT = 8; + private static final int METHODID_UPDATE_APPLICATION_STREAM_INPUT = 9; + private static final int METHODID_LIST_INSTANCES = 10; + private static final int METHODID_GET_INSTANCE = 11; + private static final int METHODID_CREATE_APPLICATION_INSTANCES = 12; + private static final int METHODID_DELETE_APPLICATION_INSTANCES = 13; + private static final int METHODID_UPDATE_APPLICATION_INSTANCES = 14; + private static final int METHODID_LIST_DRAFTS = 15; + private static final int METHODID_GET_DRAFT = 16; + private static final int METHODID_CREATE_DRAFT = 17; + private static final int METHODID_UPDATE_DRAFT = 18; + private static final int METHODID_DELETE_DRAFT = 19; + private static final int METHODID_LIST_PROCESSORS = 20; + private static final int METHODID_LIST_PREBUILT_PROCESSORS = 21; + private static final int METHODID_GET_PROCESSOR = 22; + private static final int METHODID_CREATE_PROCESSOR = 23; + private static final int METHODID_UPDATE_PROCESSOR = 24; + private static final int METHODID_DELETE_PROCESSOR = 25; + + 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 AsyncService serviceImpl; + private final int methodId; + + MethodHandlers(AsyncService 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_LIST_APPLICATIONS: + serviceImpl.listApplications( + (com.google.cloud.visionai.v1.ListApplicationsRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_GET_APPLICATION: + serviceImpl.getApplication( + (com.google.cloud.visionai.v1.GetApplicationRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_CREATE_APPLICATION: + serviceImpl.createApplication( + (com.google.cloud.visionai.v1.CreateApplicationRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_UPDATE_APPLICATION: + serviceImpl.updateApplication( + (com.google.cloud.visionai.v1.UpdateApplicationRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_DELETE_APPLICATION: + serviceImpl.deleteApplication( + (com.google.cloud.visionai.v1.DeleteApplicationRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_DEPLOY_APPLICATION: + serviceImpl.deployApplication( + (com.google.cloud.visionai.v1.DeployApplicationRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_UNDEPLOY_APPLICATION: + serviceImpl.undeployApplication( + (com.google.cloud.visionai.v1.UndeployApplicationRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_ADD_APPLICATION_STREAM_INPUT: + serviceImpl.addApplicationStreamInput( + (com.google.cloud.visionai.v1.AddApplicationStreamInputRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_REMOVE_APPLICATION_STREAM_INPUT: + serviceImpl.removeApplicationStreamInput( + (com.google.cloud.visionai.v1.RemoveApplicationStreamInputRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_UPDATE_APPLICATION_STREAM_INPUT: + serviceImpl.updateApplicationStreamInput( + (com.google.cloud.visionai.v1.UpdateApplicationStreamInputRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_LIST_INSTANCES: + serviceImpl.listInstances( + (com.google.cloud.visionai.v1.ListInstancesRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_GET_INSTANCE: + serviceImpl.getInstance( + (com.google.cloud.visionai.v1.GetInstanceRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_CREATE_APPLICATION_INSTANCES: + serviceImpl.createApplicationInstances( + (com.google.cloud.visionai.v1.CreateApplicationInstancesRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_DELETE_APPLICATION_INSTANCES: + serviceImpl.deleteApplicationInstances( + (com.google.cloud.visionai.v1.DeleteApplicationInstancesRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_UPDATE_APPLICATION_INSTANCES: + serviceImpl.updateApplicationInstances( + (com.google.cloud.visionai.v1.UpdateApplicationInstancesRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_LIST_DRAFTS: + serviceImpl.listDrafts( + (com.google.cloud.visionai.v1.ListDraftsRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_GET_DRAFT: + serviceImpl.getDraft( + (com.google.cloud.visionai.v1.GetDraftRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_CREATE_DRAFT: + serviceImpl.createDraft( + (com.google.cloud.visionai.v1.CreateDraftRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_UPDATE_DRAFT: + serviceImpl.updateDraft( + (com.google.cloud.visionai.v1.UpdateDraftRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_DELETE_DRAFT: + serviceImpl.deleteDraft( + (com.google.cloud.visionai.v1.DeleteDraftRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_LIST_PROCESSORS: + serviceImpl.listProcessors( + (com.google.cloud.visionai.v1.ListProcessorsRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_LIST_PREBUILT_PROCESSORS: + serviceImpl.listPrebuiltProcessors( + (com.google.cloud.visionai.v1.ListPrebuiltProcessorsRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.visionai.v1.ListPrebuiltProcessorsResponse>) + responseObserver); + break; + case METHODID_GET_PROCESSOR: + serviceImpl.getProcessor( + (com.google.cloud.visionai.v1.GetProcessorRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_CREATE_PROCESSOR: + serviceImpl.createProcessor( + (com.google.cloud.visionai.v1.CreateProcessorRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_UPDATE_PROCESSOR: + serviceImpl.updateProcessor( + (com.google.cloud.visionai.v1.UpdateProcessorRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_DELETE_PROCESSOR: + serviceImpl.deleteProcessor( + (com.google.cloud.visionai.v1.DeleteProcessorRequest) 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(); + } + } + } + + public static final io.grpc.ServerServiceDefinition bindService(AsyncService service) { + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) + .addMethod( + getListApplicationsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.visionai.v1.ListApplicationsRequest, + com.google.cloud.visionai.v1.ListApplicationsResponse>( + service, METHODID_LIST_APPLICATIONS))) + .addMethod( + getGetApplicationMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.visionai.v1.GetApplicationRequest, + com.google.cloud.visionai.v1.Application>(service, METHODID_GET_APPLICATION))) + .addMethod( + getCreateApplicationMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.visionai.v1.CreateApplicationRequest, + com.google.longrunning.Operation>(service, METHODID_CREATE_APPLICATION))) + .addMethod( + getUpdateApplicationMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.visionai.v1.UpdateApplicationRequest, + com.google.longrunning.Operation>(service, METHODID_UPDATE_APPLICATION))) + .addMethod( + getDeleteApplicationMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.visionai.v1.DeleteApplicationRequest, + com.google.longrunning.Operation>(service, METHODID_DELETE_APPLICATION))) + .addMethod( + getDeployApplicationMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.visionai.v1.DeployApplicationRequest, + com.google.longrunning.Operation>(service, METHODID_DEPLOY_APPLICATION))) + .addMethod( + getUndeployApplicationMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.visionai.v1.UndeployApplicationRequest, + com.google.longrunning.Operation>(service, METHODID_UNDEPLOY_APPLICATION))) + .addMethod( + getAddApplicationStreamInputMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.visionai.v1.AddApplicationStreamInputRequest, + com.google.longrunning.Operation>( + service, METHODID_ADD_APPLICATION_STREAM_INPUT))) + .addMethod( + getRemoveApplicationStreamInputMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.visionai.v1.RemoveApplicationStreamInputRequest, + com.google.longrunning.Operation>( + service, METHODID_REMOVE_APPLICATION_STREAM_INPUT))) + .addMethod( + getUpdateApplicationStreamInputMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.visionai.v1.UpdateApplicationStreamInputRequest, + com.google.longrunning.Operation>( + service, METHODID_UPDATE_APPLICATION_STREAM_INPUT))) + .addMethod( + getListInstancesMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.visionai.v1.ListInstancesRequest, + com.google.cloud.visionai.v1.ListInstancesResponse>( + service, METHODID_LIST_INSTANCES))) + .addMethod( + getGetInstanceMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.visionai.v1.GetInstanceRequest, + com.google.cloud.visionai.v1.Instance>(service, METHODID_GET_INSTANCE))) + .addMethod( + getCreateApplicationInstancesMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.visionai.v1.CreateApplicationInstancesRequest, + com.google.longrunning.Operation>( + service, METHODID_CREATE_APPLICATION_INSTANCES))) + .addMethod( + getDeleteApplicationInstancesMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.visionai.v1.DeleteApplicationInstancesRequest, + com.google.longrunning.Operation>( + service, METHODID_DELETE_APPLICATION_INSTANCES))) + .addMethod( + getUpdateApplicationInstancesMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.visionai.v1.UpdateApplicationInstancesRequest, + com.google.longrunning.Operation>( + service, METHODID_UPDATE_APPLICATION_INSTANCES))) + .addMethod( + getListDraftsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.visionai.v1.ListDraftsRequest, + com.google.cloud.visionai.v1.ListDraftsResponse>( + service, METHODID_LIST_DRAFTS))) + .addMethod( + getGetDraftMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.visionai.v1.GetDraftRequest, + com.google.cloud.visionai.v1.Draft>(service, METHODID_GET_DRAFT))) + .addMethod( + getCreateDraftMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.visionai.v1.CreateDraftRequest, + com.google.longrunning.Operation>(service, METHODID_CREATE_DRAFT))) + .addMethod( + getUpdateDraftMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.visionai.v1.UpdateDraftRequest, + com.google.longrunning.Operation>(service, METHODID_UPDATE_DRAFT))) + .addMethod( + getDeleteDraftMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.visionai.v1.DeleteDraftRequest, + com.google.longrunning.Operation>(service, METHODID_DELETE_DRAFT))) + .addMethod( + getListProcessorsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.visionai.v1.ListProcessorsRequest, + com.google.cloud.visionai.v1.ListProcessorsResponse>( + service, METHODID_LIST_PROCESSORS))) + .addMethod( + getListPrebuiltProcessorsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.visionai.v1.ListPrebuiltProcessorsRequest, + com.google.cloud.visionai.v1.ListPrebuiltProcessorsResponse>( + service, METHODID_LIST_PREBUILT_PROCESSORS))) + .addMethod( + getGetProcessorMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.visionai.v1.GetProcessorRequest, + com.google.cloud.visionai.v1.Processor>(service, METHODID_GET_PROCESSOR))) + .addMethod( + getCreateProcessorMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.visionai.v1.CreateProcessorRequest, + com.google.longrunning.Operation>(service, METHODID_CREATE_PROCESSOR))) + .addMethod( + getUpdateProcessorMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.visionai.v1.UpdateProcessorRequest, + com.google.longrunning.Operation>(service, METHODID_UPDATE_PROCESSOR))) + .addMethod( + getDeleteProcessorMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.visionai.v1.DeleteProcessorRequest, + com.google.longrunning.Operation>(service, METHODID_DELETE_PROCESSOR))) + .build(); + } + + private abstract static class AppPlatformBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoFileDescriptorSupplier, + io.grpc.protobuf.ProtoServiceDescriptorSupplier { + AppPlatformBaseDescriptorSupplier() {} + + @java.lang.Override + public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { + return com.google.cloud.visionai.v1.PlatformProto.getDescriptor(); + } + + @java.lang.Override + public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { + return getFileDescriptor().findServiceByName("AppPlatform"); + } + } + + private static final class AppPlatformFileDescriptorSupplier + extends AppPlatformBaseDescriptorSupplier { + AppPlatformFileDescriptorSupplier() {} + } + + private static final class AppPlatformMethodDescriptorSupplier + extends AppPlatformBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { + private final java.lang.String methodName; + + AppPlatformMethodDescriptorSupplier(java.lang.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 (AppPlatformGrpc.class) { + result = serviceDescriptor; + if (result == null) { + serviceDescriptor = + result = + io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) + .setSchemaDescriptor(new AppPlatformFileDescriptorSupplier()) + .addMethod(getListApplicationsMethod()) + .addMethod(getGetApplicationMethod()) + .addMethod(getCreateApplicationMethod()) + .addMethod(getUpdateApplicationMethod()) + .addMethod(getDeleteApplicationMethod()) + .addMethod(getDeployApplicationMethod()) + .addMethod(getUndeployApplicationMethod()) + .addMethod(getAddApplicationStreamInputMethod()) + .addMethod(getRemoveApplicationStreamInputMethod()) + .addMethod(getUpdateApplicationStreamInputMethod()) + .addMethod(getListInstancesMethod()) + .addMethod(getGetInstanceMethod()) + .addMethod(getCreateApplicationInstancesMethod()) + .addMethod(getDeleteApplicationInstancesMethod()) + .addMethod(getUpdateApplicationInstancesMethod()) + .addMethod(getListDraftsMethod()) + .addMethod(getGetDraftMethod()) + .addMethod(getCreateDraftMethod()) + .addMethod(getUpdateDraftMethod()) + .addMethod(getDeleteDraftMethod()) + .addMethod(getListProcessorsMethod()) + .addMethod(getListPrebuiltProcessorsMethod()) + .addMethod(getGetProcessorMethod()) + .addMethod(getCreateProcessorMethod()) + .addMethod(getUpdateProcessorMethod()) + .addMethod(getDeleteProcessorMethod()) + .build(); + } + } + } + return result; + } +} diff --git a/java-visionai/grpc-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/HealthCheckServiceGrpc.java b/java-visionai/grpc-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/HealthCheckServiceGrpc.java new file mode 100644 index 000000000000..8913f93bea64 --- /dev/null +++ b/java-visionai/grpc-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/HealthCheckServiceGrpc.java @@ -0,0 +1,385 @@ +/* + * Copyright 2024 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.visionai.v1; + +import static io.grpc.MethodDescriptor.generateFullMethodName; + +/** + * + * + *
+ * HealthCheckService provides an interface for Vertex AI Vision Cluster Health
+ * Check.
+ * 
+ */ +@javax.annotation.Generated( + value = "by gRPC proto compiler", + comments = "Source: google/cloud/visionai/v1/health_service.proto") +@io.grpc.stub.annotations.GrpcGenerated +public final class HealthCheckServiceGrpc { + + private HealthCheckServiceGrpc() {} + + public static final java.lang.String SERVICE_NAME = "google.cloud.visionai.v1.HealthCheckService"; + + // Static method descriptors that strictly reflect the proto. + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.HealthCheckRequest, + com.google.cloud.visionai.v1.HealthCheckResponse> + getHealthCheckMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "HealthCheck", + requestType = com.google.cloud.visionai.v1.HealthCheckRequest.class, + responseType = com.google.cloud.visionai.v1.HealthCheckResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.HealthCheckRequest, + com.google.cloud.visionai.v1.HealthCheckResponse> + getHealthCheckMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.HealthCheckRequest, + com.google.cloud.visionai.v1.HealthCheckResponse> + getHealthCheckMethod; + if ((getHealthCheckMethod = HealthCheckServiceGrpc.getHealthCheckMethod) == null) { + synchronized (HealthCheckServiceGrpc.class) { + if ((getHealthCheckMethod = HealthCheckServiceGrpc.getHealthCheckMethod) == null) { + HealthCheckServiceGrpc.getHealthCheckMethod = + getHealthCheckMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "HealthCheck")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.visionai.v1.HealthCheckRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.visionai.v1.HealthCheckResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new HealthCheckServiceMethodDescriptorSupplier("HealthCheck")) + .build(); + } + } + } + return getHealthCheckMethod; + } + + /** Creates a new async stub that supports all call types for the service */ + public static HealthCheckServiceStub newStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public HealthCheckServiceStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new HealthCheckServiceStub(channel, callOptions); + } + }; + return HealthCheckServiceStub.newStub(factory, channel); + } + + /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service + */ + public static HealthCheckServiceBlockingStub newBlockingStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public HealthCheckServiceBlockingStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new HealthCheckServiceBlockingStub(channel, callOptions); + } + }; + return HealthCheckServiceBlockingStub.newStub(factory, channel); + } + + /** Creates a new ListenableFuture-style stub that supports unary calls on the service */ + public static HealthCheckServiceFutureStub newFutureStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public HealthCheckServiceFutureStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new HealthCheckServiceFutureStub(channel, callOptions); + } + }; + return HealthCheckServiceFutureStub.newStub(factory, channel); + } + + /** + * + * + *
+   * HealthCheckService provides an interface for Vertex AI Vision Cluster Health
+   * Check.
+   * 
+ */ + public interface AsyncService { + + /** + * + * + *
+     * HealthCheck method checks the health status of the cluster.
+     * 
+ */ + default void healthCheck( + com.google.cloud.visionai.v1.HealthCheckRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getHealthCheckMethod(), responseObserver); + } + } + + /** + * Base class for the server implementation of the service HealthCheckService. + * + *
+   * HealthCheckService provides an interface for Vertex AI Vision Cluster Health
+   * Check.
+   * 
+ */ + public abstract static class HealthCheckServiceImplBase + implements io.grpc.BindableService, AsyncService { + + @java.lang.Override + public final io.grpc.ServerServiceDefinition bindService() { + return HealthCheckServiceGrpc.bindService(this); + } + } + + /** + * A stub to allow clients to do asynchronous rpc calls to service HealthCheckService. + * + *
+   * HealthCheckService provides an interface for Vertex AI Vision Cluster Health
+   * Check.
+   * 
+ */ + public static final class HealthCheckServiceStub + extends io.grpc.stub.AbstractAsyncStub { + private HealthCheckServiceStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected HealthCheckServiceStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new HealthCheckServiceStub(channel, callOptions); + } + + /** + * + * + *
+     * HealthCheck method checks the health status of the cluster.
+     * 
+ */ + public void healthCheck( + com.google.cloud.visionai.v1.HealthCheckRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getHealthCheckMethod(), getCallOptions()), + request, + responseObserver); + } + } + + /** + * A stub to allow clients to do synchronous rpc calls to service HealthCheckService. + * + *
+   * HealthCheckService provides an interface for Vertex AI Vision Cluster Health
+   * Check.
+   * 
+ */ + public static final class HealthCheckServiceBlockingStub + extends io.grpc.stub.AbstractBlockingStub { + private HealthCheckServiceBlockingStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected HealthCheckServiceBlockingStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new HealthCheckServiceBlockingStub(channel, callOptions); + } + + /** + * + * + *
+     * HealthCheck method checks the health status of the cluster.
+     * 
+ */ + public com.google.cloud.visionai.v1.HealthCheckResponse healthCheck( + com.google.cloud.visionai.v1.HealthCheckRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getHealthCheckMethod(), getCallOptions(), request); + } + } + + /** + * A stub to allow clients to do ListenableFuture-style rpc calls to service HealthCheckService. + * + *
+   * HealthCheckService provides an interface for Vertex AI Vision Cluster Health
+   * Check.
+   * 
+ */ + public static final class HealthCheckServiceFutureStub + extends io.grpc.stub.AbstractFutureStub { + private HealthCheckServiceFutureStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected HealthCheckServiceFutureStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new HealthCheckServiceFutureStub(channel, callOptions); + } + + /** + * + * + *
+     * HealthCheck method checks the health status of the cluster.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.visionai.v1.HealthCheckResponse> + healthCheck(com.google.cloud.visionai.v1.HealthCheckRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getHealthCheckMethod(), getCallOptions()), request); + } + } + + private static final int METHODID_HEALTH_CHECK = 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 AsyncService serviceImpl; + private final int methodId; + + MethodHandlers(AsyncService 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_HEALTH_CHECK: + serviceImpl.healthCheck( + (com.google.cloud.visionai.v1.HealthCheckRequest) 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(); + } + } + } + + public static final io.grpc.ServerServiceDefinition bindService(AsyncService service) { + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) + .addMethod( + getHealthCheckMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.visionai.v1.HealthCheckRequest, + com.google.cloud.visionai.v1.HealthCheckResponse>( + service, METHODID_HEALTH_CHECK))) + .build(); + } + + private abstract static class HealthCheckServiceBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoFileDescriptorSupplier, + io.grpc.protobuf.ProtoServiceDescriptorSupplier { + HealthCheckServiceBaseDescriptorSupplier() {} + + @java.lang.Override + public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { + return com.google.cloud.visionai.v1.HealthCheckServiceProto.getDescriptor(); + } + + @java.lang.Override + public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { + return getFileDescriptor().findServiceByName("HealthCheckService"); + } + } + + private static final class HealthCheckServiceFileDescriptorSupplier + extends HealthCheckServiceBaseDescriptorSupplier { + HealthCheckServiceFileDescriptorSupplier() {} + } + + private static final class HealthCheckServiceMethodDescriptorSupplier + extends HealthCheckServiceBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { + private final java.lang.String methodName; + + HealthCheckServiceMethodDescriptorSupplier(java.lang.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 (HealthCheckServiceGrpc.class) { + result = serviceDescriptor; + if (result == null) { + serviceDescriptor = + result = + io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) + .setSchemaDescriptor(new HealthCheckServiceFileDescriptorSupplier()) + .addMethod(getHealthCheckMethod()) + .build(); + } + } + } + return result; + } +} diff --git a/java-visionai/grpc-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/LiveVideoAnalyticsGrpc.java b/java-visionai/grpc-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/LiveVideoAnalyticsGrpc.java new file mode 100644 index 000000000000..66e7ed77fe14 --- /dev/null +++ b/java-visionai/grpc-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/LiveVideoAnalyticsGrpc.java @@ -0,0 +1,2334 @@ +/* + * Copyright 2024 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.visionai.v1; + +import static io.grpc.MethodDescriptor.generateFullMethodName; + +/** + * + * + *
+ * Service describing handlers for resources. The service enables clients to run
+ * Live Video Analytics (LVA) on the streaming inputs.
+ * 
+ */ +@javax.annotation.Generated( + value = "by gRPC proto compiler", + comments = "Source: google/cloud/visionai/v1/lva_service.proto") +@io.grpc.stub.annotations.GrpcGenerated +public final class LiveVideoAnalyticsGrpc { + + private LiveVideoAnalyticsGrpc() {} + + public static final java.lang.String SERVICE_NAME = "google.cloud.visionai.v1.LiveVideoAnalytics"; + + // Static method descriptors that strictly reflect the proto. + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.ListPublicOperatorsRequest, + com.google.cloud.visionai.v1.ListPublicOperatorsResponse> + getListPublicOperatorsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListPublicOperators", + requestType = com.google.cloud.visionai.v1.ListPublicOperatorsRequest.class, + responseType = com.google.cloud.visionai.v1.ListPublicOperatorsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.ListPublicOperatorsRequest, + com.google.cloud.visionai.v1.ListPublicOperatorsResponse> + getListPublicOperatorsMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.ListPublicOperatorsRequest, + com.google.cloud.visionai.v1.ListPublicOperatorsResponse> + getListPublicOperatorsMethod; + if ((getListPublicOperatorsMethod = LiveVideoAnalyticsGrpc.getListPublicOperatorsMethod) + == null) { + synchronized (LiveVideoAnalyticsGrpc.class) { + if ((getListPublicOperatorsMethod = LiveVideoAnalyticsGrpc.getListPublicOperatorsMethod) + == null) { + LiveVideoAnalyticsGrpc.getListPublicOperatorsMethod = + getListPublicOperatorsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "ListPublicOperators")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.visionai.v1.ListPublicOperatorsRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.visionai.v1.ListPublicOperatorsResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new LiveVideoAnalyticsMethodDescriptorSupplier("ListPublicOperators")) + .build(); + } + } + } + return getListPublicOperatorsMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.ResolveOperatorInfoRequest, + com.google.cloud.visionai.v1.ResolveOperatorInfoResponse> + getResolveOperatorInfoMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ResolveOperatorInfo", + requestType = com.google.cloud.visionai.v1.ResolveOperatorInfoRequest.class, + responseType = com.google.cloud.visionai.v1.ResolveOperatorInfoResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.ResolveOperatorInfoRequest, + com.google.cloud.visionai.v1.ResolveOperatorInfoResponse> + getResolveOperatorInfoMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.ResolveOperatorInfoRequest, + com.google.cloud.visionai.v1.ResolveOperatorInfoResponse> + getResolveOperatorInfoMethod; + if ((getResolveOperatorInfoMethod = LiveVideoAnalyticsGrpc.getResolveOperatorInfoMethod) + == null) { + synchronized (LiveVideoAnalyticsGrpc.class) { + if ((getResolveOperatorInfoMethod = LiveVideoAnalyticsGrpc.getResolveOperatorInfoMethod) + == null) { + LiveVideoAnalyticsGrpc.getResolveOperatorInfoMethod = + getResolveOperatorInfoMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "ResolveOperatorInfo")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.visionai.v1.ResolveOperatorInfoRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.visionai.v1.ResolveOperatorInfoResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new LiveVideoAnalyticsMethodDescriptorSupplier("ResolveOperatorInfo")) + .build(); + } + } + } + return getResolveOperatorInfoMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.ListOperatorsRequest, + com.google.cloud.visionai.v1.ListOperatorsResponse> + getListOperatorsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListOperators", + requestType = com.google.cloud.visionai.v1.ListOperatorsRequest.class, + responseType = com.google.cloud.visionai.v1.ListOperatorsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.ListOperatorsRequest, + com.google.cloud.visionai.v1.ListOperatorsResponse> + getListOperatorsMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.ListOperatorsRequest, + com.google.cloud.visionai.v1.ListOperatorsResponse> + getListOperatorsMethod; + if ((getListOperatorsMethod = LiveVideoAnalyticsGrpc.getListOperatorsMethod) == null) { + synchronized (LiveVideoAnalyticsGrpc.class) { + if ((getListOperatorsMethod = LiveVideoAnalyticsGrpc.getListOperatorsMethod) == null) { + LiveVideoAnalyticsGrpc.getListOperatorsMethod = + getListOperatorsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListOperators")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.visionai.v1.ListOperatorsRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.visionai.v1.ListOperatorsResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new LiveVideoAnalyticsMethodDescriptorSupplier("ListOperators")) + .build(); + } + } + } + return getListOperatorsMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.GetOperatorRequest, com.google.cloud.visionai.v1.Operator> + getGetOperatorMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetOperator", + requestType = com.google.cloud.visionai.v1.GetOperatorRequest.class, + responseType = com.google.cloud.visionai.v1.Operator.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.GetOperatorRequest, com.google.cloud.visionai.v1.Operator> + getGetOperatorMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.GetOperatorRequest, com.google.cloud.visionai.v1.Operator> + getGetOperatorMethod; + if ((getGetOperatorMethod = LiveVideoAnalyticsGrpc.getGetOperatorMethod) == null) { + synchronized (LiveVideoAnalyticsGrpc.class) { + if ((getGetOperatorMethod = LiveVideoAnalyticsGrpc.getGetOperatorMethod) == null) { + LiveVideoAnalyticsGrpc.getGetOperatorMethod = + getGetOperatorMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetOperator")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.visionai.v1.GetOperatorRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.visionai.v1.Operator.getDefaultInstance())) + .setSchemaDescriptor( + new LiveVideoAnalyticsMethodDescriptorSupplier("GetOperator")) + .build(); + } + } + } + return getGetOperatorMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.CreateOperatorRequest, com.google.longrunning.Operation> + getCreateOperatorMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateOperator", + requestType = com.google.cloud.visionai.v1.CreateOperatorRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.CreateOperatorRequest, com.google.longrunning.Operation> + getCreateOperatorMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.CreateOperatorRequest, com.google.longrunning.Operation> + getCreateOperatorMethod; + if ((getCreateOperatorMethod = LiveVideoAnalyticsGrpc.getCreateOperatorMethod) == null) { + synchronized (LiveVideoAnalyticsGrpc.class) { + if ((getCreateOperatorMethod = LiveVideoAnalyticsGrpc.getCreateOperatorMethod) == null) { + LiveVideoAnalyticsGrpc.getCreateOperatorMethod = + getCreateOperatorMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateOperator")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.visionai.v1.CreateOperatorRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new LiveVideoAnalyticsMethodDescriptorSupplier("CreateOperator")) + .build(); + } + } + } + return getCreateOperatorMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.UpdateOperatorRequest, com.google.longrunning.Operation> + getUpdateOperatorMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdateOperator", + requestType = com.google.cloud.visionai.v1.UpdateOperatorRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.UpdateOperatorRequest, com.google.longrunning.Operation> + getUpdateOperatorMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.UpdateOperatorRequest, com.google.longrunning.Operation> + getUpdateOperatorMethod; + if ((getUpdateOperatorMethod = LiveVideoAnalyticsGrpc.getUpdateOperatorMethod) == null) { + synchronized (LiveVideoAnalyticsGrpc.class) { + if ((getUpdateOperatorMethod = LiveVideoAnalyticsGrpc.getUpdateOperatorMethod) == null) { + LiveVideoAnalyticsGrpc.getUpdateOperatorMethod = + getUpdateOperatorMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateOperator")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.visionai.v1.UpdateOperatorRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new LiveVideoAnalyticsMethodDescriptorSupplier("UpdateOperator")) + .build(); + } + } + } + return getUpdateOperatorMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.DeleteOperatorRequest, com.google.longrunning.Operation> + getDeleteOperatorMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteOperator", + requestType = com.google.cloud.visionai.v1.DeleteOperatorRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.DeleteOperatorRequest, com.google.longrunning.Operation> + getDeleteOperatorMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.DeleteOperatorRequest, com.google.longrunning.Operation> + getDeleteOperatorMethod; + if ((getDeleteOperatorMethod = LiveVideoAnalyticsGrpc.getDeleteOperatorMethod) == null) { + synchronized (LiveVideoAnalyticsGrpc.class) { + if ((getDeleteOperatorMethod = LiveVideoAnalyticsGrpc.getDeleteOperatorMethod) == null) { + LiveVideoAnalyticsGrpc.getDeleteOperatorMethod = + getDeleteOperatorMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteOperator")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.visionai.v1.DeleteOperatorRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new LiveVideoAnalyticsMethodDescriptorSupplier("DeleteOperator")) + .build(); + } + } + } + return getDeleteOperatorMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.ListAnalysesRequest, + com.google.cloud.visionai.v1.ListAnalysesResponse> + getListAnalysesMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListAnalyses", + requestType = com.google.cloud.visionai.v1.ListAnalysesRequest.class, + responseType = com.google.cloud.visionai.v1.ListAnalysesResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.ListAnalysesRequest, + com.google.cloud.visionai.v1.ListAnalysesResponse> + getListAnalysesMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.ListAnalysesRequest, + com.google.cloud.visionai.v1.ListAnalysesResponse> + getListAnalysesMethod; + if ((getListAnalysesMethod = LiveVideoAnalyticsGrpc.getListAnalysesMethod) == null) { + synchronized (LiveVideoAnalyticsGrpc.class) { + if ((getListAnalysesMethod = LiveVideoAnalyticsGrpc.getListAnalysesMethod) == null) { + LiveVideoAnalyticsGrpc.getListAnalysesMethod = + getListAnalysesMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListAnalyses")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.visionai.v1.ListAnalysesRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.visionai.v1.ListAnalysesResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new LiveVideoAnalyticsMethodDescriptorSupplier("ListAnalyses")) + .build(); + } + } + } + return getListAnalysesMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.GetAnalysisRequest, com.google.cloud.visionai.v1.Analysis> + getGetAnalysisMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetAnalysis", + requestType = com.google.cloud.visionai.v1.GetAnalysisRequest.class, + responseType = com.google.cloud.visionai.v1.Analysis.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.GetAnalysisRequest, com.google.cloud.visionai.v1.Analysis> + getGetAnalysisMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.GetAnalysisRequest, com.google.cloud.visionai.v1.Analysis> + getGetAnalysisMethod; + if ((getGetAnalysisMethod = LiveVideoAnalyticsGrpc.getGetAnalysisMethod) == null) { + synchronized (LiveVideoAnalyticsGrpc.class) { + if ((getGetAnalysisMethod = LiveVideoAnalyticsGrpc.getGetAnalysisMethod) == null) { + LiveVideoAnalyticsGrpc.getGetAnalysisMethod = + getGetAnalysisMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetAnalysis")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.visionai.v1.GetAnalysisRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.visionai.v1.Analysis.getDefaultInstance())) + .setSchemaDescriptor( + new LiveVideoAnalyticsMethodDescriptorSupplier("GetAnalysis")) + .build(); + } + } + } + return getGetAnalysisMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.CreateAnalysisRequest, com.google.longrunning.Operation> + getCreateAnalysisMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateAnalysis", + requestType = com.google.cloud.visionai.v1.CreateAnalysisRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.CreateAnalysisRequest, com.google.longrunning.Operation> + getCreateAnalysisMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.CreateAnalysisRequest, com.google.longrunning.Operation> + getCreateAnalysisMethod; + if ((getCreateAnalysisMethod = LiveVideoAnalyticsGrpc.getCreateAnalysisMethod) == null) { + synchronized (LiveVideoAnalyticsGrpc.class) { + if ((getCreateAnalysisMethod = LiveVideoAnalyticsGrpc.getCreateAnalysisMethod) == null) { + LiveVideoAnalyticsGrpc.getCreateAnalysisMethod = + getCreateAnalysisMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateAnalysis")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.visionai.v1.CreateAnalysisRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new LiveVideoAnalyticsMethodDescriptorSupplier("CreateAnalysis")) + .build(); + } + } + } + return getCreateAnalysisMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.UpdateAnalysisRequest, com.google.longrunning.Operation> + getUpdateAnalysisMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdateAnalysis", + requestType = com.google.cloud.visionai.v1.UpdateAnalysisRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.UpdateAnalysisRequest, com.google.longrunning.Operation> + getUpdateAnalysisMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.UpdateAnalysisRequest, com.google.longrunning.Operation> + getUpdateAnalysisMethod; + if ((getUpdateAnalysisMethod = LiveVideoAnalyticsGrpc.getUpdateAnalysisMethod) == null) { + synchronized (LiveVideoAnalyticsGrpc.class) { + if ((getUpdateAnalysisMethod = LiveVideoAnalyticsGrpc.getUpdateAnalysisMethod) == null) { + LiveVideoAnalyticsGrpc.getUpdateAnalysisMethod = + getUpdateAnalysisMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateAnalysis")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.visionai.v1.UpdateAnalysisRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new LiveVideoAnalyticsMethodDescriptorSupplier("UpdateAnalysis")) + .build(); + } + } + } + return getUpdateAnalysisMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.DeleteAnalysisRequest, com.google.longrunning.Operation> + getDeleteAnalysisMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteAnalysis", + requestType = com.google.cloud.visionai.v1.DeleteAnalysisRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.DeleteAnalysisRequest, com.google.longrunning.Operation> + getDeleteAnalysisMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.DeleteAnalysisRequest, com.google.longrunning.Operation> + getDeleteAnalysisMethod; + if ((getDeleteAnalysisMethod = LiveVideoAnalyticsGrpc.getDeleteAnalysisMethod) == null) { + synchronized (LiveVideoAnalyticsGrpc.class) { + if ((getDeleteAnalysisMethod = LiveVideoAnalyticsGrpc.getDeleteAnalysisMethod) == null) { + LiveVideoAnalyticsGrpc.getDeleteAnalysisMethod = + getDeleteAnalysisMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteAnalysis")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.visionai.v1.DeleteAnalysisRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new LiveVideoAnalyticsMethodDescriptorSupplier("DeleteAnalysis")) + .build(); + } + } + } + return getDeleteAnalysisMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.ListProcessesRequest, + com.google.cloud.visionai.v1.ListProcessesResponse> + getListProcessesMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListProcesses", + requestType = com.google.cloud.visionai.v1.ListProcessesRequest.class, + responseType = com.google.cloud.visionai.v1.ListProcessesResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.ListProcessesRequest, + com.google.cloud.visionai.v1.ListProcessesResponse> + getListProcessesMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.ListProcessesRequest, + com.google.cloud.visionai.v1.ListProcessesResponse> + getListProcessesMethod; + if ((getListProcessesMethod = LiveVideoAnalyticsGrpc.getListProcessesMethod) == null) { + synchronized (LiveVideoAnalyticsGrpc.class) { + if ((getListProcessesMethod = LiveVideoAnalyticsGrpc.getListProcessesMethod) == null) { + LiveVideoAnalyticsGrpc.getListProcessesMethod = + getListProcessesMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListProcesses")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.visionai.v1.ListProcessesRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.visionai.v1.ListProcessesResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new LiveVideoAnalyticsMethodDescriptorSupplier("ListProcesses")) + .build(); + } + } + } + return getListProcessesMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.GetProcessRequest, com.google.cloud.visionai.v1.Process> + getGetProcessMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetProcess", + requestType = com.google.cloud.visionai.v1.GetProcessRequest.class, + responseType = com.google.cloud.visionai.v1.Process.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.GetProcessRequest, com.google.cloud.visionai.v1.Process> + getGetProcessMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.GetProcessRequest, com.google.cloud.visionai.v1.Process> + getGetProcessMethod; + if ((getGetProcessMethod = LiveVideoAnalyticsGrpc.getGetProcessMethod) == null) { + synchronized (LiveVideoAnalyticsGrpc.class) { + if ((getGetProcessMethod = LiveVideoAnalyticsGrpc.getGetProcessMethod) == null) { + LiveVideoAnalyticsGrpc.getGetProcessMethod = + getGetProcessMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetProcess")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.visionai.v1.GetProcessRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.visionai.v1.Process.getDefaultInstance())) + .setSchemaDescriptor( + new LiveVideoAnalyticsMethodDescriptorSupplier("GetProcess")) + .build(); + } + } + } + return getGetProcessMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.CreateProcessRequest, com.google.longrunning.Operation> + getCreateProcessMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateProcess", + requestType = com.google.cloud.visionai.v1.CreateProcessRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.CreateProcessRequest, com.google.longrunning.Operation> + getCreateProcessMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.CreateProcessRequest, com.google.longrunning.Operation> + getCreateProcessMethod; + if ((getCreateProcessMethod = LiveVideoAnalyticsGrpc.getCreateProcessMethod) == null) { + synchronized (LiveVideoAnalyticsGrpc.class) { + if ((getCreateProcessMethod = LiveVideoAnalyticsGrpc.getCreateProcessMethod) == null) { + LiveVideoAnalyticsGrpc.getCreateProcessMethod = + getCreateProcessMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateProcess")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.visionai.v1.CreateProcessRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new LiveVideoAnalyticsMethodDescriptorSupplier("CreateProcess")) + .build(); + } + } + } + return getCreateProcessMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.UpdateProcessRequest, com.google.longrunning.Operation> + getUpdateProcessMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdateProcess", + requestType = com.google.cloud.visionai.v1.UpdateProcessRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.UpdateProcessRequest, com.google.longrunning.Operation> + getUpdateProcessMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.UpdateProcessRequest, com.google.longrunning.Operation> + getUpdateProcessMethod; + if ((getUpdateProcessMethod = LiveVideoAnalyticsGrpc.getUpdateProcessMethod) == null) { + synchronized (LiveVideoAnalyticsGrpc.class) { + if ((getUpdateProcessMethod = LiveVideoAnalyticsGrpc.getUpdateProcessMethod) == null) { + LiveVideoAnalyticsGrpc.getUpdateProcessMethod = + getUpdateProcessMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateProcess")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.visionai.v1.UpdateProcessRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new LiveVideoAnalyticsMethodDescriptorSupplier("UpdateProcess")) + .build(); + } + } + } + return getUpdateProcessMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.DeleteProcessRequest, com.google.longrunning.Operation> + getDeleteProcessMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteProcess", + requestType = com.google.cloud.visionai.v1.DeleteProcessRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.DeleteProcessRequest, com.google.longrunning.Operation> + getDeleteProcessMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.DeleteProcessRequest, com.google.longrunning.Operation> + getDeleteProcessMethod; + if ((getDeleteProcessMethod = LiveVideoAnalyticsGrpc.getDeleteProcessMethod) == null) { + synchronized (LiveVideoAnalyticsGrpc.class) { + if ((getDeleteProcessMethod = LiveVideoAnalyticsGrpc.getDeleteProcessMethod) == null) { + LiveVideoAnalyticsGrpc.getDeleteProcessMethod = + getDeleteProcessMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteProcess")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.visionai.v1.DeleteProcessRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new LiveVideoAnalyticsMethodDescriptorSupplier("DeleteProcess")) + .build(); + } + } + } + return getDeleteProcessMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.BatchRunProcessRequest, com.google.longrunning.Operation> + getBatchRunProcessMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "BatchRunProcess", + requestType = com.google.cloud.visionai.v1.BatchRunProcessRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.BatchRunProcessRequest, com.google.longrunning.Operation> + getBatchRunProcessMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.BatchRunProcessRequest, com.google.longrunning.Operation> + getBatchRunProcessMethod; + if ((getBatchRunProcessMethod = LiveVideoAnalyticsGrpc.getBatchRunProcessMethod) == null) { + synchronized (LiveVideoAnalyticsGrpc.class) { + if ((getBatchRunProcessMethod = LiveVideoAnalyticsGrpc.getBatchRunProcessMethod) == null) { + LiveVideoAnalyticsGrpc.getBatchRunProcessMethod = + getBatchRunProcessMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "BatchRunProcess")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.visionai.v1.BatchRunProcessRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new LiveVideoAnalyticsMethodDescriptorSupplier("BatchRunProcess")) + .build(); + } + } + } + return getBatchRunProcessMethod; + } + + /** Creates a new async stub that supports all call types for the service */ + public static LiveVideoAnalyticsStub newStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public LiveVideoAnalyticsStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new LiveVideoAnalyticsStub(channel, callOptions); + } + }; + return LiveVideoAnalyticsStub.newStub(factory, channel); + } + + /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service + */ + public static LiveVideoAnalyticsBlockingStub newBlockingStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public LiveVideoAnalyticsBlockingStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new LiveVideoAnalyticsBlockingStub(channel, callOptions); + } + }; + return LiveVideoAnalyticsBlockingStub.newStub(factory, channel); + } + + /** Creates a new ListenableFuture-style stub that supports unary calls on the service */ + public static LiveVideoAnalyticsFutureStub newFutureStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public LiveVideoAnalyticsFutureStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new LiveVideoAnalyticsFutureStub(channel, callOptions); + } + }; + return LiveVideoAnalyticsFutureStub.newStub(factory, channel); + } + + /** + * + * + *
+   * Service describing handlers for resources. The service enables clients to run
+   * Live Video Analytics (LVA) on the streaming inputs.
+   * 
+ */ + public interface AsyncService { + + /** + * + * + *
+     * ListPublicOperators returns all the operators in public registry.
+     * 
+ */ + default void listPublicOperators( + com.google.cloud.visionai.v1.ListPublicOperatorsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListPublicOperatorsMethod(), responseObserver); + } + + /** + * + * + *
+     * ResolveOperatorInfo returns the operator information based on the request.
+     * 
+ */ + default void resolveOperatorInfo( + com.google.cloud.visionai.v1.ResolveOperatorInfoRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getResolveOperatorInfoMethod(), responseObserver); + } + + /** + * + * + *
+     * Lists Operators in a given project and location.
+     * 
+ */ + default void listOperators( + com.google.cloud.visionai.v1.ListOperatorsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListOperatorsMethod(), responseObserver); + } + + /** + * + * + *
+     * Gets details of a single Operator.
+     * 
+ */ + default void getOperator( + com.google.cloud.visionai.v1.GetOperatorRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getGetOperatorMethod(), responseObserver); + } + + /** + * + * + *
+     * Creates a new Operator in a given project and location.
+     * 
+ */ + default void createOperator( + com.google.cloud.visionai.v1.CreateOperatorRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getCreateOperatorMethod(), responseObserver); + } + + /** + * + * + *
+     * Updates the parameters of a single Operator.
+     * 
+ */ + default void updateOperator( + com.google.cloud.visionai.v1.UpdateOperatorRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getUpdateOperatorMethod(), responseObserver); + } + + /** + * + * + *
+     * Deletes a single Operator.
+     * 
+ */ + default void deleteOperator( + com.google.cloud.visionai.v1.DeleteOperatorRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getDeleteOperatorMethod(), responseObserver); + } + + /** + * + * + *
+     * Lists Analyses in a given project and location.
+     * 
+ */ + default void listAnalyses( + com.google.cloud.visionai.v1.ListAnalysesRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListAnalysesMethod(), responseObserver); + } + + /** + * + * + *
+     * Gets details of a single Analysis.
+     * 
+ */ + default void getAnalysis( + com.google.cloud.visionai.v1.GetAnalysisRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getGetAnalysisMethod(), responseObserver); + } + + /** + * + * + *
+     * Creates a new Analysis in a given project and location.
+     * 
+ */ + default void createAnalysis( + com.google.cloud.visionai.v1.CreateAnalysisRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getCreateAnalysisMethod(), responseObserver); + } + + /** + * + * + *
+     * Updates the parameters of a single Analysis.
+     * 
+ */ + default void updateAnalysis( + com.google.cloud.visionai.v1.UpdateAnalysisRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getUpdateAnalysisMethod(), responseObserver); + } + + /** + * + * + *
+     * Deletes a single Analysis.
+     * 
+ */ + default void deleteAnalysis( + com.google.cloud.visionai.v1.DeleteAnalysisRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getDeleteAnalysisMethod(), responseObserver); + } + + /** + * + * + *
+     * Lists Processes in a given project and location.
+     * 
+ */ + default void listProcesses( + com.google.cloud.visionai.v1.ListProcessesRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListProcessesMethod(), responseObserver); + } + + /** + * + * + *
+     * Gets details of a single Process.
+     * 
+ */ + default void getProcess( + com.google.cloud.visionai.v1.GetProcessRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetProcessMethod(), responseObserver); + } + + /** + * + * + *
+     * Creates a new Process in a given project and location.
+     * 
+ */ + default void createProcess( + com.google.cloud.visionai.v1.CreateProcessRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getCreateProcessMethod(), responseObserver); + } + + /** + * + * + *
+     * Updates the parameters of a single Process.
+     * 
+ */ + default void updateProcess( + com.google.cloud.visionai.v1.UpdateProcessRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getUpdateProcessMethod(), responseObserver); + } + + /** + * + * + *
+     * Deletes a single Process.
+     * 
+ */ + default void deleteProcess( + com.google.cloud.visionai.v1.DeleteProcessRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getDeleteProcessMethod(), responseObserver); + } + + /** + * + * + *
+     * Run all of the processes to "completion". Max time for each process is
+     * the LRO time limit.
+     * 
+ */ + default void batchRunProcess( + com.google.cloud.visionai.v1.BatchRunProcessRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getBatchRunProcessMethod(), responseObserver); + } + } + + /** + * Base class for the server implementation of the service LiveVideoAnalytics. + * + *
+   * Service describing handlers for resources. The service enables clients to run
+   * Live Video Analytics (LVA) on the streaming inputs.
+   * 
+ */ + public abstract static class LiveVideoAnalyticsImplBase + implements io.grpc.BindableService, AsyncService { + + @java.lang.Override + public final io.grpc.ServerServiceDefinition bindService() { + return LiveVideoAnalyticsGrpc.bindService(this); + } + } + + /** + * A stub to allow clients to do asynchronous rpc calls to service LiveVideoAnalytics. + * + *
+   * Service describing handlers for resources. The service enables clients to run
+   * Live Video Analytics (LVA) on the streaming inputs.
+   * 
+ */ + public static final class LiveVideoAnalyticsStub + extends io.grpc.stub.AbstractAsyncStub { + private LiveVideoAnalyticsStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected LiveVideoAnalyticsStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new LiveVideoAnalyticsStub(channel, callOptions); + } + + /** + * + * + *
+     * ListPublicOperators returns all the operators in public registry.
+     * 
+ */ + public void listPublicOperators( + com.google.cloud.visionai.v1.ListPublicOperatorsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListPublicOperatorsMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * ResolveOperatorInfo returns the operator information based on the request.
+     * 
+ */ + public void resolveOperatorInfo( + com.google.cloud.visionai.v1.ResolveOperatorInfoRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getResolveOperatorInfoMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Lists Operators in a given project and location.
+     * 
+ */ + public void listOperators( + com.google.cloud.visionai.v1.ListOperatorsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListOperatorsMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Gets details of a single Operator.
+     * 
+ */ + public void getOperator( + com.google.cloud.visionai.v1.GetOperatorRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetOperatorMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Creates a new Operator in a given project and location.
+     * 
+ */ + public void createOperator( + com.google.cloud.visionai.v1.CreateOperatorRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreateOperatorMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Updates the parameters of a single Operator.
+     * 
+ */ + public void updateOperator( + com.google.cloud.visionai.v1.UpdateOperatorRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUpdateOperatorMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Deletes a single Operator.
+     * 
+ */ + public void deleteOperator( + com.google.cloud.visionai.v1.DeleteOperatorRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeleteOperatorMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Lists Analyses in a given project and location.
+     * 
+ */ + public void listAnalyses( + com.google.cloud.visionai.v1.ListAnalysesRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListAnalysesMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Gets details of a single Analysis.
+     * 
+ */ + public void getAnalysis( + com.google.cloud.visionai.v1.GetAnalysisRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetAnalysisMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Creates a new Analysis in a given project and location.
+     * 
+ */ + public void createAnalysis( + com.google.cloud.visionai.v1.CreateAnalysisRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreateAnalysisMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Updates the parameters of a single Analysis.
+     * 
+ */ + public void updateAnalysis( + com.google.cloud.visionai.v1.UpdateAnalysisRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUpdateAnalysisMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Deletes a single Analysis.
+     * 
+ */ + public void deleteAnalysis( + com.google.cloud.visionai.v1.DeleteAnalysisRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeleteAnalysisMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Lists Processes in a given project and location.
+     * 
+ */ + public void listProcesses( + com.google.cloud.visionai.v1.ListProcessesRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListProcessesMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Gets details of a single Process.
+     * 
+ */ + public void getProcess( + com.google.cloud.visionai.v1.GetProcessRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetProcessMethod(), getCallOptions()), request, responseObserver); + } + + /** + * + * + *
+     * Creates a new Process in a given project and location.
+     * 
+ */ + public void createProcess( + com.google.cloud.visionai.v1.CreateProcessRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreateProcessMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Updates the parameters of a single Process.
+     * 
+ */ + public void updateProcess( + com.google.cloud.visionai.v1.UpdateProcessRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUpdateProcessMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Deletes a single Process.
+     * 
+ */ + public void deleteProcess( + com.google.cloud.visionai.v1.DeleteProcessRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeleteProcessMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Run all of the processes to "completion". Max time for each process is
+     * the LRO time limit.
+     * 
+ */ + public void batchRunProcess( + com.google.cloud.visionai.v1.BatchRunProcessRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getBatchRunProcessMethod(), getCallOptions()), + request, + responseObserver); + } + } + + /** + * A stub to allow clients to do synchronous rpc calls to service LiveVideoAnalytics. + * + *
+   * Service describing handlers for resources. The service enables clients to run
+   * Live Video Analytics (LVA) on the streaming inputs.
+   * 
+ */ + public static final class LiveVideoAnalyticsBlockingStub + extends io.grpc.stub.AbstractBlockingStub { + private LiveVideoAnalyticsBlockingStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected LiveVideoAnalyticsBlockingStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new LiveVideoAnalyticsBlockingStub(channel, callOptions); + } + + /** + * + * + *
+     * ListPublicOperators returns all the operators in public registry.
+     * 
+ */ + public com.google.cloud.visionai.v1.ListPublicOperatorsResponse listPublicOperators( + com.google.cloud.visionai.v1.ListPublicOperatorsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListPublicOperatorsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * ResolveOperatorInfo returns the operator information based on the request.
+     * 
+ */ + public com.google.cloud.visionai.v1.ResolveOperatorInfoResponse resolveOperatorInfo( + com.google.cloud.visionai.v1.ResolveOperatorInfoRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getResolveOperatorInfoMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lists Operators in a given project and location.
+     * 
+ */ + public com.google.cloud.visionai.v1.ListOperatorsResponse listOperators( + com.google.cloud.visionai.v1.ListOperatorsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListOperatorsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets details of a single Operator.
+     * 
+ */ + public com.google.cloud.visionai.v1.Operator getOperator( + com.google.cloud.visionai.v1.GetOperatorRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetOperatorMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Creates a new Operator in a given project and location.
+     * 
+ */ + public com.google.longrunning.Operation createOperator( + com.google.cloud.visionai.v1.CreateOperatorRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreateOperatorMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Updates the parameters of a single Operator.
+     * 
+ */ + public com.google.longrunning.Operation updateOperator( + com.google.cloud.visionai.v1.UpdateOperatorRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpdateOperatorMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Deletes a single Operator.
+     * 
+ */ + public com.google.longrunning.Operation deleteOperator( + com.google.cloud.visionai.v1.DeleteOperatorRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeleteOperatorMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lists Analyses in a given project and location.
+     * 
+ */ + public com.google.cloud.visionai.v1.ListAnalysesResponse listAnalyses( + com.google.cloud.visionai.v1.ListAnalysesRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListAnalysesMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets details of a single Analysis.
+     * 
+ */ + public com.google.cloud.visionai.v1.Analysis getAnalysis( + com.google.cloud.visionai.v1.GetAnalysisRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetAnalysisMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Creates a new Analysis in a given project and location.
+     * 
+ */ + public com.google.longrunning.Operation createAnalysis( + com.google.cloud.visionai.v1.CreateAnalysisRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreateAnalysisMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Updates the parameters of a single Analysis.
+     * 
+ */ + public com.google.longrunning.Operation updateAnalysis( + com.google.cloud.visionai.v1.UpdateAnalysisRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpdateAnalysisMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Deletes a single Analysis.
+     * 
+ */ + public com.google.longrunning.Operation deleteAnalysis( + com.google.cloud.visionai.v1.DeleteAnalysisRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeleteAnalysisMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lists Processes in a given project and location.
+     * 
+ */ + public com.google.cloud.visionai.v1.ListProcessesResponse listProcesses( + com.google.cloud.visionai.v1.ListProcessesRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListProcessesMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets details of a single Process.
+     * 
+ */ + public com.google.cloud.visionai.v1.Process getProcess( + com.google.cloud.visionai.v1.GetProcessRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetProcessMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Creates a new Process in a given project and location.
+     * 
+ */ + public com.google.longrunning.Operation createProcess( + com.google.cloud.visionai.v1.CreateProcessRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreateProcessMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Updates the parameters of a single Process.
+     * 
+ */ + public com.google.longrunning.Operation updateProcess( + com.google.cloud.visionai.v1.UpdateProcessRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpdateProcessMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Deletes a single Process.
+     * 
+ */ + public com.google.longrunning.Operation deleteProcess( + com.google.cloud.visionai.v1.DeleteProcessRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeleteProcessMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Run all of the processes to "completion". Max time for each process is
+     * the LRO time limit.
+     * 
+ */ + public com.google.longrunning.Operation batchRunProcess( + com.google.cloud.visionai.v1.BatchRunProcessRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getBatchRunProcessMethod(), getCallOptions(), request); + } + } + + /** + * A stub to allow clients to do ListenableFuture-style rpc calls to service LiveVideoAnalytics. + * + *
+   * Service describing handlers for resources. The service enables clients to run
+   * Live Video Analytics (LVA) on the streaming inputs.
+   * 
+ */ + public static final class LiveVideoAnalyticsFutureStub + extends io.grpc.stub.AbstractFutureStub { + private LiveVideoAnalyticsFutureStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected LiveVideoAnalyticsFutureStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new LiveVideoAnalyticsFutureStub(channel, callOptions); + } + + /** + * + * + *
+     * ListPublicOperators returns all the operators in public registry.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.visionai.v1.ListPublicOperatorsResponse> + listPublicOperators(com.google.cloud.visionai.v1.ListPublicOperatorsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListPublicOperatorsMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * ResolveOperatorInfo returns the operator information based on the request.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.visionai.v1.ResolveOperatorInfoResponse> + resolveOperatorInfo(com.google.cloud.visionai.v1.ResolveOperatorInfoRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getResolveOperatorInfoMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Lists Operators in a given project and location.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.visionai.v1.ListOperatorsResponse> + listOperators(com.google.cloud.visionai.v1.ListOperatorsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListOperatorsMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Gets details of a single Operator.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + getOperator(com.google.cloud.visionai.v1.GetOperatorRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetOperatorMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Creates a new Operator in a given project and location.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + createOperator(com.google.cloud.visionai.v1.CreateOperatorRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreateOperatorMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Updates the parameters of a single Operator.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + updateOperator(com.google.cloud.visionai.v1.UpdateOperatorRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUpdateOperatorMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Deletes a single Operator.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + deleteOperator(com.google.cloud.visionai.v1.DeleteOperatorRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDeleteOperatorMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Lists Analyses in a given project and location.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.visionai.v1.ListAnalysesResponse> + listAnalyses(com.google.cloud.visionai.v1.ListAnalysesRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListAnalysesMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Gets details of a single Analysis.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + getAnalysis(com.google.cloud.visionai.v1.GetAnalysisRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetAnalysisMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Creates a new Analysis in a given project and location.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + createAnalysis(com.google.cloud.visionai.v1.CreateAnalysisRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreateAnalysisMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Updates the parameters of a single Analysis.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + updateAnalysis(com.google.cloud.visionai.v1.UpdateAnalysisRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUpdateAnalysisMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Deletes a single Analysis.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + deleteAnalysis(com.google.cloud.visionai.v1.DeleteAnalysisRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDeleteAnalysisMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Lists Processes in a given project and location.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.visionai.v1.ListProcessesResponse> + listProcesses(com.google.cloud.visionai.v1.ListProcessesRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListProcessesMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Gets details of a single Process.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + getProcess(com.google.cloud.visionai.v1.GetProcessRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetProcessMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Creates a new Process in a given project and location.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + createProcess(com.google.cloud.visionai.v1.CreateProcessRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreateProcessMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Updates the parameters of a single Process.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + updateProcess(com.google.cloud.visionai.v1.UpdateProcessRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUpdateProcessMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Deletes a single Process.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + deleteProcess(com.google.cloud.visionai.v1.DeleteProcessRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDeleteProcessMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Run all of the processes to "completion". Max time for each process is
+     * the LRO time limit.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + batchRunProcess(com.google.cloud.visionai.v1.BatchRunProcessRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getBatchRunProcessMethod(), getCallOptions()), request); + } + } + + private static final int METHODID_LIST_PUBLIC_OPERATORS = 0; + private static final int METHODID_RESOLVE_OPERATOR_INFO = 1; + private static final int METHODID_LIST_OPERATORS = 2; + private static final int METHODID_GET_OPERATOR = 3; + private static final int METHODID_CREATE_OPERATOR = 4; + private static final int METHODID_UPDATE_OPERATOR = 5; + private static final int METHODID_DELETE_OPERATOR = 6; + private static final int METHODID_LIST_ANALYSES = 7; + private static final int METHODID_GET_ANALYSIS = 8; + private static final int METHODID_CREATE_ANALYSIS = 9; + private static final int METHODID_UPDATE_ANALYSIS = 10; + private static final int METHODID_DELETE_ANALYSIS = 11; + private static final int METHODID_LIST_PROCESSES = 12; + private static final int METHODID_GET_PROCESS = 13; + private static final int METHODID_CREATE_PROCESS = 14; + private static final int METHODID_UPDATE_PROCESS = 15; + private static final int METHODID_DELETE_PROCESS = 16; + private static final int METHODID_BATCH_RUN_PROCESS = 17; + + 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 AsyncService serviceImpl; + private final int methodId; + + MethodHandlers(AsyncService 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_LIST_PUBLIC_OPERATORS: + serviceImpl.listPublicOperators( + (com.google.cloud.visionai.v1.ListPublicOperatorsRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.visionai.v1.ListPublicOperatorsResponse>) + responseObserver); + break; + case METHODID_RESOLVE_OPERATOR_INFO: + serviceImpl.resolveOperatorInfo( + (com.google.cloud.visionai.v1.ResolveOperatorInfoRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.visionai.v1.ResolveOperatorInfoResponse>) + responseObserver); + break; + case METHODID_LIST_OPERATORS: + serviceImpl.listOperators( + (com.google.cloud.visionai.v1.ListOperatorsRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_GET_OPERATOR: + serviceImpl.getOperator( + (com.google.cloud.visionai.v1.GetOperatorRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_CREATE_OPERATOR: + serviceImpl.createOperator( + (com.google.cloud.visionai.v1.CreateOperatorRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_UPDATE_OPERATOR: + serviceImpl.updateOperator( + (com.google.cloud.visionai.v1.UpdateOperatorRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_DELETE_OPERATOR: + serviceImpl.deleteOperator( + (com.google.cloud.visionai.v1.DeleteOperatorRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_LIST_ANALYSES: + serviceImpl.listAnalyses( + (com.google.cloud.visionai.v1.ListAnalysesRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_GET_ANALYSIS: + serviceImpl.getAnalysis( + (com.google.cloud.visionai.v1.GetAnalysisRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_CREATE_ANALYSIS: + serviceImpl.createAnalysis( + (com.google.cloud.visionai.v1.CreateAnalysisRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_UPDATE_ANALYSIS: + serviceImpl.updateAnalysis( + (com.google.cloud.visionai.v1.UpdateAnalysisRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_DELETE_ANALYSIS: + serviceImpl.deleteAnalysis( + (com.google.cloud.visionai.v1.DeleteAnalysisRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_LIST_PROCESSES: + serviceImpl.listProcesses( + (com.google.cloud.visionai.v1.ListProcessesRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_GET_PROCESS: + serviceImpl.getProcess( + (com.google.cloud.visionai.v1.GetProcessRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_CREATE_PROCESS: + serviceImpl.createProcess( + (com.google.cloud.visionai.v1.CreateProcessRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_UPDATE_PROCESS: + serviceImpl.updateProcess( + (com.google.cloud.visionai.v1.UpdateProcessRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_DELETE_PROCESS: + serviceImpl.deleteProcess( + (com.google.cloud.visionai.v1.DeleteProcessRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_BATCH_RUN_PROCESS: + serviceImpl.batchRunProcess( + (com.google.cloud.visionai.v1.BatchRunProcessRequest) 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(); + } + } + } + + public static final io.grpc.ServerServiceDefinition bindService(AsyncService service) { + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) + .addMethod( + getListPublicOperatorsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.visionai.v1.ListPublicOperatorsRequest, + com.google.cloud.visionai.v1.ListPublicOperatorsResponse>( + service, METHODID_LIST_PUBLIC_OPERATORS))) + .addMethod( + getResolveOperatorInfoMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.visionai.v1.ResolveOperatorInfoRequest, + com.google.cloud.visionai.v1.ResolveOperatorInfoResponse>( + service, METHODID_RESOLVE_OPERATOR_INFO))) + .addMethod( + getListOperatorsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.visionai.v1.ListOperatorsRequest, + com.google.cloud.visionai.v1.ListOperatorsResponse>( + service, METHODID_LIST_OPERATORS))) + .addMethod( + getGetOperatorMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.visionai.v1.GetOperatorRequest, + com.google.cloud.visionai.v1.Operator>(service, METHODID_GET_OPERATOR))) + .addMethod( + getCreateOperatorMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.visionai.v1.CreateOperatorRequest, + com.google.longrunning.Operation>(service, METHODID_CREATE_OPERATOR))) + .addMethod( + getUpdateOperatorMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.visionai.v1.UpdateOperatorRequest, + com.google.longrunning.Operation>(service, METHODID_UPDATE_OPERATOR))) + .addMethod( + getDeleteOperatorMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.visionai.v1.DeleteOperatorRequest, + com.google.longrunning.Operation>(service, METHODID_DELETE_OPERATOR))) + .addMethod( + getListAnalysesMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.visionai.v1.ListAnalysesRequest, + com.google.cloud.visionai.v1.ListAnalysesResponse>( + service, METHODID_LIST_ANALYSES))) + .addMethod( + getGetAnalysisMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.visionai.v1.GetAnalysisRequest, + com.google.cloud.visionai.v1.Analysis>(service, METHODID_GET_ANALYSIS))) + .addMethod( + getCreateAnalysisMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.visionai.v1.CreateAnalysisRequest, + com.google.longrunning.Operation>(service, METHODID_CREATE_ANALYSIS))) + .addMethod( + getUpdateAnalysisMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.visionai.v1.UpdateAnalysisRequest, + com.google.longrunning.Operation>(service, METHODID_UPDATE_ANALYSIS))) + .addMethod( + getDeleteAnalysisMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.visionai.v1.DeleteAnalysisRequest, + com.google.longrunning.Operation>(service, METHODID_DELETE_ANALYSIS))) + .addMethod( + getListProcessesMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.visionai.v1.ListProcessesRequest, + com.google.cloud.visionai.v1.ListProcessesResponse>( + service, METHODID_LIST_PROCESSES))) + .addMethod( + getGetProcessMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.visionai.v1.GetProcessRequest, + com.google.cloud.visionai.v1.Process>(service, METHODID_GET_PROCESS))) + .addMethod( + getCreateProcessMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.visionai.v1.CreateProcessRequest, + com.google.longrunning.Operation>(service, METHODID_CREATE_PROCESS))) + .addMethod( + getUpdateProcessMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.visionai.v1.UpdateProcessRequest, + com.google.longrunning.Operation>(service, METHODID_UPDATE_PROCESS))) + .addMethod( + getDeleteProcessMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.visionai.v1.DeleteProcessRequest, + com.google.longrunning.Operation>(service, METHODID_DELETE_PROCESS))) + .addMethod( + getBatchRunProcessMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.visionai.v1.BatchRunProcessRequest, + com.google.longrunning.Operation>(service, METHODID_BATCH_RUN_PROCESS))) + .build(); + } + + private abstract static class LiveVideoAnalyticsBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoFileDescriptorSupplier, + io.grpc.protobuf.ProtoServiceDescriptorSupplier { + LiveVideoAnalyticsBaseDescriptorSupplier() {} + + @java.lang.Override + public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { + return com.google.cloud.visionai.v1.LvaServiceProto.getDescriptor(); + } + + @java.lang.Override + public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { + return getFileDescriptor().findServiceByName("LiveVideoAnalytics"); + } + } + + private static final class LiveVideoAnalyticsFileDescriptorSupplier + extends LiveVideoAnalyticsBaseDescriptorSupplier { + LiveVideoAnalyticsFileDescriptorSupplier() {} + } + + private static final class LiveVideoAnalyticsMethodDescriptorSupplier + extends LiveVideoAnalyticsBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { + private final java.lang.String methodName; + + LiveVideoAnalyticsMethodDescriptorSupplier(java.lang.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 (LiveVideoAnalyticsGrpc.class) { + result = serviceDescriptor; + if (result == null) { + serviceDescriptor = + result = + io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) + .setSchemaDescriptor(new LiveVideoAnalyticsFileDescriptorSupplier()) + .addMethod(getListPublicOperatorsMethod()) + .addMethod(getResolveOperatorInfoMethod()) + .addMethod(getListOperatorsMethod()) + .addMethod(getGetOperatorMethod()) + .addMethod(getCreateOperatorMethod()) + .addMethod(getUpdateOperatorMethod()) + .addMethod(getDeleteOperatorMethod()) + .addMethod(getListAnalysesMethod()) + .addMethod(getGetAnalysisMethod()) + .addMethod(getCreateAnalysisMethod()) + .addMethod(getUpdateAnalysisMethod()) + .addMethod(getDeleteAnalysisMethod()) + .addMethod(getListProcessesMethod()) + .addMethod(getGetProcessMethod()) + .addMethod(getCreateProcessMethod()) + .addMethod(getUpdateProcessMethod()) + .addMethod(getDeleteProcessMethod()) + .addMethod(getBatchRunProcessMethod()) + .build(); + } + } + } + return result; + } +} diff --git a/java-visionai/grpc-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/StreamingServiceGrpc.java b/java-visionai/grpc-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/StreamingServiceGrpc.java new file mode 100644 index 000000000000..3f6bdcf4b690 --- /dev/null +++ b/java-visionai/grpc-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/StreamingServiceGrpc.java @@ -0,0 +1,869 @@ +/* + * Copyright 2024 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.visionai.v1; + +import static io.grpc.MethodDescriptor.generateFullMethodName; + +/** + * + * + *
+ * Streaming service for receiving and sending packets.
+ * 
+ */ +@javax.annotation.Generated( + value = "by gRPC proto compiler", + comments = "Source: google/cloud/visionai/v1/streaming_service.proto") +@io.grpc.stub.annotations.GrpcGenerated +public final class StreamingServiceGrpc { + + private StreamingServiceGrpc() {} + + public static final java.lang.String SERVICE_NAME = "google.cloud.visionai.v1.StreamingService"; + + // Static method descriptors that strictly reflect the proto. + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.SendPacketsRequest, + com.google.cloud.visionai.v1.SendPacketsResponse> + getSendPacketsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "SendPackets", + requestType = com.google.cloud.visionai.v1.SendPacketsRequest.class, + responseType = com.google.cloud.visionai.v1.SendPacketsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.BIDI_STREAMING) + public static io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.SendPacketsRequest, + com.google.cloud.visionai.v1.SendPacketsResponse> + getSendPacketsMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.SendPacketsRequest, + com.google.cloud.visionai.v1.SendPacketsResponse> + getSendPacketsMethod; + if ((getSendPacketsMethod = StreamingServiceGrpc.getSendPacketsMethod) == null) { + synchronized (StreamingServiceGrpc.class) { + if ((getSendPacketsMethod = StreamingServiceGrpc.getSendPacketsMethod) == null) { + StreamingServiceGrpc.getSendPacketsMethod = + getSendPacketsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.BIDI_STREAMING) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "SendPackets")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.visionai.v1.SendPacketsRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.visionai.v1.SendPacketsResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new StreamingServiceMethodDescriptorSupplier("SendPackets")) + .build(); + } + } + } + return getSendPacketsMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.ReceivePacketsRequest, + com.google.cloud.visionai.v1.ReceivePacketsResponse> + getReceivePacketsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ReceivePackets", + requestType = com.google.cloud.visionai.v1.ReceivePacketsRequest.class, + responseType = com.google.cloud.visionai.v1.ReceivePacketsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.BIDI_STREAMING) + public static io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.ReceivePacketsRequest, + com.google.cloud.visionai.v1.ReceivePacketsResponse> + getReceivePacketsMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.ReceivePacketsRequest, + com.google.cloud.visionai.v1.ReceivePacketsResponse> + getReceivePacketsMethod; + if ((getReceivePacketsMethod = StreamingServiceGrpc.getReceivePacketsMethod) == null) { + synchronized (StreamingServiceGrpc.class) { + if ((getReceivePacketsMethod = StreamingServiceGrpc.getReceivePacketsMethod) == null) { + StreamingServiceGrpc.getReceivePacketsMethod = + getReceivePacketsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.BIDI_STREAMING) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ReceivePackets")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.visionai.v1.ReceivePacketsRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.visionai.v1.ReceivePacketsResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new StreamingServiceMethodDescriptorSupplier("ReceivePackets")) + .build(); + } + } + } + return getReceivePacketsMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.ReceiveEventsRequest, + com.google.cloud.visionai.v1.ReceiveEventsResponse> + getReceiveEventsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ReceiveEvents", + requestType = com.google.cloud.visionai.v1.ReceiveEventsRequest.class, + responseType = com.google.cloud.visionai.v1.ReceiveEventsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.BIDI_STREAMING) + public static io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.ReceiveEventsRequest, + com.google.cloud.visionai.v1.ReceiveEventsResponse> + getReceiveEventsMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.ReceiveEventsRequest, + com.google.cloud.visionai.v1.ReceiveEventsResponse> + getReceiveEventsMethod; + if ((getReceiveEventsMethod = StreamingServiceGrpc.getReceiveEventsMethod) == null) { + synchronized (StreamingServiceGrpc.class) { + if ((getReceiveEventsMethod = StreamingServiceGrpc.getReceiveEventsMethod) == null) { + StreamingServiceGrpc.getReceiveEventsMethod = + getReceiveEventsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.BIDI_STREAMING) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ReceiveEvents")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.visionai.v1.ReceiveEventsRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.visionai.v1.ReceiveEventsResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new StreamingServiceMethodDescriptorSupplier("ReceiveEvents")) + .build(); + } + } + } + return getReceiveEventsMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.AcquireLeaseRequest, com.google.cloud.visionai.v1.Lease> + getAcquireLeaseMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "AcquireLease", + requestType = com.google.cloud.visionai.v1.AcquireLeaseRequest.class, + responseType = com.google.cloud.visionai.v1.Lease.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.AcquireLeaseRequest, com.google.cloud.visionai.v1.Lease> + getAcquireLeaseMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.AcquireLeaseRequest, com.google.cloud.visionai.v1.Lease> + getAcquireLeaseMethod; + if ((getAcquireLeaseMethod = StreamingServiceGrpc.getAcquireLeaseMethod) == null) { + synchronized (StreamingServiceGrpc.class) { + if ((getAcquireLeaseMethod = StreamingServiceGrpc.getAcquireLeaseMethod) == null) { + StreamingServiceGrpc.getAcquireLeaseMethod = + getAcquireLeaseMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "AcquireLease")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.visionai.v1.AcquireLeaseRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.visionai.v1.Lease.getDefaultInstance())) + .setSchemaDescriptor( + new StreamingServiceMethodDescriptorSupplier("AcquireLease")) + .build(); + } + } + } + return getAcquireLeaseMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.RenewLeaseRequest, com.google.cloud.visionai.v1.Lease> + getRenewLeaseMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "RenewLease", + requestType = com.google.cloud.visionai.v1.RenewLeaseRequest.class, + responseType = com.google.cloud.visionai.v1.Lease.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.RenewLeaseRequest, com.google.cloud.visionai.v1.Lease> + getRenewLeaseMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.RenewLeaseRequest, com.google.cloud.visionai.v1.Lease> + getRenewLeaseMethod; + if ((getRenewLeaseMethod = StreamingServiceGrpc.getRenewLeaseMethod) == null) { + synchronized (StreamingServiceGrpc.class) { + if ((getRenewLeaseMethod = StreamingServiceGrpc.getRenewLeaseMethod) == null) { + StreamingServiceGrpc.getRenewLeaseMethod = + getRenewLeaseMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "RenewLease")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.visionai.v1.RenewLeaseRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.visionai.v1.Lease.getDefaultInstance())) + .setSchemaDescriptor( + new StreamingServiceMethodDescriptorSupplier("RenewLease")) + .build(); + } + } + } + return getRenewLeaseMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.ReleaseLeaseRequest, + com.google.cloud.visionai.v1.ReleaseLeaseResponse> + getReleaseLeaseMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ReleaseLease", + requestType = com.google.cloud.visionai.v1.ReleaseLeaseRequest.class, + responseType = com.google.cloud.visionai.v1.ReleaseLeaseResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.ReleaseLeaseRequest, + com.google.cloud.visionai.v1.ReleaseLeaseResponse> + getReleaseLeaseMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.ReleaseLeaseRequest, + com.google.cloud.visionai.v1.ReleaseLeaseResponse> + getReleaseLeaseMethod; + if ((getReleaseLeaseMethod = StreamingServiceGrpc.getReleaseLeaseMethod) == null) { + synchronized (StreamingServiceGrpc.class) { + if ((getReleaseLeaseMethod = StreamingServiceGrpc.getReleaseLeaseMethod) == null) { + StreamingServiceGrpc.getReleaseLeaseMethod = + getReleaseLeaseMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ReleaseLease")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.visionai.v1.ReleaseLeaseRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.visionai.v1.ReleaseLeaseResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new StreamingServiceMethodDescriptorSupplier("ReleaseLease")) + .build(); + } + } + } + return getReleaseLeaseMethod; + } + + /** Creates a new async stub that supports all call types for the service */ + public static StreamingServiceStub newStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public StreamingServiceStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new StreamingServiceStub(channel, callOptions); + } + }; + return StreamingServiceStub.newStub(factory, channel); + } + + /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service + */ + public static StreamingServiceBlockingStub newBlockingStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public StreamingServiceBlockingStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new StreamingServiceBlockingStub(channel, callOptions); + } + }; + return StreamingServiceBlockingStub.newStub(factory, channel); + } + + /** Creates a new ListenableFuture-style stub that supports unary calls on the service */ + public static StreamingServiceFutureStub newFutureStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public StreamingServiceFutureStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new StreamingServiceFutureStub(channel, callOptions); + } + }; + return StreamingServiceFutureStub.newStub(factory, channel); + } + + /** + * + * + *
+   * Streaming service for receiving and sending packets.
+   * 
+ */ + public interface AsyncService { + + /** + * + * + *
+     * Send packets to the series.
+     * 
+ */ + default io.grpc.stub.StreamObserver + sendPackets( + io.grpc.stub.StreamObserver + responseObserver) { + return io.grpc.stub.ServerCalls.asyncUnimplementedStreamingCall( + getSendPacketsMethod(), responseObserver); + } + + /** + * + * + *
+     * Receive packets from the series.
+     * 
+ */ + default io.grpc.stub.StreamObserver + receivePackets( + io.grpc.stub.StreamObserver + responseObserver) { + return io.grpc.stub.ServerCalls.asyncUnimplementedStreamingCall( + getReceivePacketsMethod(), responseObserver); + } + + /** + * + * + *
+     * Receive events given the stream name.
+     * 
+ */ + default io.grpc.stub.StreamObserver + receiveEvents( + io.grpc.stub.StreamObserver + responseObserver) { + return io.grpc.stub.ServerCalls.asyncUnimplementedStreamingCall( + getReceiveEventsMethod(), responseObserver); + } + + /** + * + * + *
+     * AcquireLease acquires a lease.
+     * 
+ */ + default void acquireLease( + com.google.cloud.visionai.v1.AcquireLeaseRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getAcquireLeaseMethod(), responseObserver); + } + + /** + * + * + *
+     * RenewLease renews a lease.
+     * 
+ */ + default void renewLease( + com.google.cloud.visionai.v1.RenewLeaseRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getRenewLeaseMethod(), responseObserver); + } + + /** + * + * + *
+     * RleaseLease releases a lease.
+     * 
+ */ + default void releaseLease( + com.google.cloud.visionai.v1.ReleaseLeaseRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getReleaseLeaseMethod(), responseObserver); + } + } + + /** + * Base class for the server implementation of the service StreamingService. + * + *
+   * Streaming service for receiving and sending packets.
+   * 
+ */ + public abstract static class StreamingServiceImplBase + implements io.grpc.BindableService, AsyncService { + + @java.lang.Override + public final io.grpc.ServerServiceDefinition bindService() { + return StreamingServiceGrpc.bindService(this); + } + } + + /** + * A stub to allow clients to do asynchronous rpc calls to service StreamingService. + * + *
+   * Streaming service for receiving and sending packets.
+   * 
+ */ + public static final class StreamingServiceStub + extends io.grpc.stub.AbstractAsyncStub { + private StreamingServiceStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected StreamingServiceStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new StreamingServiceStub(channel, callOptions); + } + + /** + * + * + *
+     * Send packets to the series.
+     * 
+ */ + public io.grpc.stub.StreamObserver sendPackets( + io.grpc.stub.StreamObserver + responseObserver) { + return io.grpc.stub.ClientCalls.asyncBidiStreamingCall( + getChannel().newCall(getSendPacketsMethod(), getCallOptions()), responseObserver); + } + + /** + * + * + *
+     * Receive packets from the series.
+     * 
+ */ + public io.grpc.stub.StreamObserver + receivePackets( + io.grpc.stub.StreamObserver + responseObserver) { + return io.grpc.stub.ClientCalls.asyncBidiStreamingCall( + getChannel().newCall(getReceivePacketsMethod(), getCallOptions()), responseObserver); + } + + /** + * + * + *
+     * Receive events given the stream name.
+     * 
+ */ + public io.grpc.stub.StreamObserver + receiveEvents( + io.grpc.stub.StreamObserver + responseObserver) { + return io.grpc.stub.ClientCalls.asyncBidiStreamingCall( + getChannel().newCall(getReceiveEventsMethod(), getCallOptions()), responseObserver); + } + + /** + * + * + *
+     * AcquireLease acquires a lease.
+     * 
+ */ + public void acquireLease( + com.google.cloud.visionai.v1.AcquireLeaseRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getAcquireLeaseMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * RenewLease renews a lease.
+     * 
+ */ + public void renewLease( + com.google.cloud.visionai.v1.RenewLeaseRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getRenewLeaseMethod(), getCallOptions()), request, responseObserver); + } + + /** + * + * + *
+     * RleaseLease releases a lease.
+     * 
+ */ + public void releaseLease( + com.google.cloud.visionai.v1.ReleaseLeaseRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getReleaseLeaseMethod(), getCallOptions()), + request, + responseObserver); + } + } + + /** + * A stub to allow clients to do synchronous rpc calls to service StreamingService. + * + *
+   * Streaming service for receiving and sending packets.
+   * 
+ */ + public static final class StreamingServiceBlockingStub + extends io.grpc.stub.AbstractBlockingStub { + private StreamingServiceBlockingStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected StreamingServiceBlockingStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new StreamingServiceBlockingStub(channel, callOptions); + } + + /** + * + * + *
+     * AcquireLease acquires a lease.
+     * 
+ */ + public com.google.cloud.visionai.v1.Lease acquireLease( + com.google.cloud.visionai.v1.AcquireLeaseRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getAcquireLeaseMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * RenewLease renews a lease.
+     * 
+ */ + public com.google.cloud.visionai.v1.Lease renewLease( + com.google.cloud.visionai.v1.RenewLeaseRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getRenewLeaseMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * RleaseLease releases a lease.
+     * 
+ */ + public com.google.cloud.visionai.v1.ReleaseLeaseResponse releaseLease( + com.google.cloud.visionai.v1.ReleaseLeaseRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getReleaseLeaseMethod(), getCallOptions(), request); + } + } + + /** + * A stub to allow clients to do ListenableFuture-style rpc calls to service StreamingService. + * + *
+   * Streaming service for receiving and sending packets.
+   * 
+ */ + public static final class StreamingServiceFutureStub + extends io.grpc.stub.AbstractFutureStub { + private StreamingServiceFutureStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected StreamingServiceFutureStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new StreamingServiceFutureStub(channel, callOptions); + } + + /** + * + * + *
+     * AcquireLease acquires a lease.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + acquireLease(com.google.cloud.visionai.v1.AcquireLeaseRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getAcquireLeaseMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * RenewLease renews a lease.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + renewLease(com.google.cloud.visionai.v1.RenewLeaseRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getRenewLeaseMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * RleaseLease releases a lease.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.visionai.v1.ReleaseLeaseResponse> + releaseLease(com.google.cloud.visionai.v1.ReleaseLeaseRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getReleaseLeaseMethod(), getCallOptions()), request); + } + } + + private static final int METHODID_ACQUIRE_LEASE = 0; + private static final int METHODID_RENEW_LEASE = 1; + private static final int METHODID_RELEASE_LEASE = 2; + private static final int METHODID_SEND_PACKETS = 3; + private static final int METHODID_RECEIVE_PACKETS = 4; + private static final int METHODID_RECEIVE_EVENTS = 5; + + 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 AsyncService serviceImpl; + private final int methodId; + + MethodHandlers(AsyncService 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_ACQUIRE_LEASE: + serviceImpl.acquireLease( + (com.google.cloud.visionai.v1.AcquireLeaseRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_RENEW_LEASE: + serviceImpl.renewLease( + (com.google.cloud.visionai.v1.RenewLeaseRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_RELEASE_LEASE: + serviceImpl.releaseLease( + (com.google.cloud.visionai.v1.ReleaseLeaseRequest) 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) { + case METHODID_SEND_PACKETS: + return (io.grpc.stub.StreamObserver) + serviceImpl.sendPackets( + (io.grpc.stub.StreamObserver) + responseObserver); + case METHODID_RECEIVE_PACKETS: + return (io.grpc.stub.StreamObserver) + serviceImpl.receivePackets( + (io.grpc.stub.StreamObserver) + responseObserver); + case METHODID_RECEIVE_EVENTS: + return (io.grpc.stub.StreamObserver) + serviceImpl.receiveEvents( + (io.grpc.stub.StreamObserver) + responseObserver); + default: + throw new AssertionError(); + } + } + } + + public static final io.grpc.ServerServiceDefinition bindService(AsyncService service) { + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) + .addMethod( + getSendPacketsMethod(), + io.grpc.stub.ServerCalls.asyncBidiStreamingCall( + new MethodHandlers< + com.google.cloud.visionai.v1.SendPacketsRequest, + com.google.cloud.visionai.v1.SendPacketsResponse>( + service, METHODID_SEND_PACKETS))) + .addMethod( + getReceivePacketsMethod(), + io.grpc.stub.ServerCalls.asyncBidiStreamingCall( + new MethodHandlers< + com.google.cloud.visionai.v1.ReceivePacketsRequest, + com.google.cloud.visionai.v1.ReceivePacketsResponse>( + service, METHODID_RECEIVE_PACKETS))) + .addMethod( + getReceiveEventsMethod(), + io.grpc.stub.ServerCalls.asyncBidiStreamingCall( + new MethodHandlers< + com.google.cloud.visionai.v1.ReceiveEventsRequest, + com.google.cloud.visionai.v1.ReceiveEventsResponse>( + service, METHODID_RECEIVE_EVENTS))) + .addMethod( + getAcquireLeaseMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.visionai.v1.AcquireLeaseRequest, + com.google.cloud.visionai.v1.Lease>(service, METHODID_ACQUIRE_LEASE))) + .addMethod( + getRenewLeaseMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.visionai.v1.RenewLeaseRequest, + com.google.cloud.visionai.v1.Lease>(service, METHODID_RENEW_LEASE))) + .addMethod( + getReleaseLeaseMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.visionai.v1.ReleaseLeaseRequest, + com.google.cloud.visionai.v1.ReleaseLeaseResponse>( + service, METHODID_RELEASE_LEASE))) + .build(); + } + + private abstract static class StreamingServiceBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoFileDescriptorSupplier, + io.grpc.protobuf.ProtoServiceDescriptorSupplier { + StreamingServiceBaseDescriptorSupplier() {} + + @java.lang.Override + public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { + return com.google.cloud.visionai.v1.StreamingServiceProto.getDescriptor(); + } + + @java.lang.Override + public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { + return getFileDescriptor().findServiceByName("StreamingService"); + } + } + + private static final class StreamingServiceFileDescriptorSupplier + extends StreamingServiceBaseDescriptorSupplier { + StreamingServiceFileDescriptorSupplier() {} + } + + private static final class StreamingServiceMethodDescriptorSupplier + extends StreamingServiceBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { + private final java.lang.String methodName; + + StreamingServiceMethodDescriptorSupplier(java.lang.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 (StreamingServiceGrpc.class) { + result = serviceDescriptor; + if (result == null) { + serviceDescriptor = + result = + io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) + .setSchemaDescriptor(new StreamingServiceFileDescriptorSupplier()) + .addMethod(getSendPacketsMethod()) + .addMethod(getReceivePacketsMethod()) + .addMethod(getReceiveEventsMethod()) + .addMethod(getAcquireLeaseMethod()) + .addMethod(getRenewLeaseMethod()) + .addMethod(getReleaseLeaseMethod()) + .build(); + } + } + } + return result; + } +} diff --git a/java-visionai/grpc-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/StreamsServiceGrpc.java b/java-visionai/grpc-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/StreamsServiceGrpc.java new file mode 100644 index 000000000000..06a3b1b1e932 --- /dev/null +++ b/java-visionai/grpc-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/StreamsServiceGrpc.java @@ -0,0 +1,2868 @@ +/* + * Copyright 2024 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.visionai.v1; + +import static io.grpc.MethodDescriptor.generateFullMethodName; + +/** + * + * + *
+ * Service describing handlers for resources.
+ * Vision API and Vision AI API are two independent APIs developed by the same
+ * team. Vision API is for people to annotate their image while Vision AI is an
+ * e2e solution for customer to build their own computer vision application.
+ * 
+ */ +@javax.annotation.Generated( + value = "by gRPC proto compiler", + comments = "Source: google/cloud/visionai/v1/streams_service.proto") +@io.grpc.stub.annotations.GrpcGenerated +public final class StreamsServiceGrpc { + + private StreamsServiceGrpc() {} + + public static final java.lang.String SERVICE_NAME = "google.cloud.visionai.v1.StreamsService"; + + // Static method descriptors that strictly reflect the proto. + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.ListClustersRequest, + com.google.cloud.visionai.v1.ListClustersResponse> + getListClustersMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListClusters", + requestType = com.google.cloud.visionai.v1.ListClustersRequest.class, + responseType = com.google.cloud.visionai.v1.ListClustersResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.ListClustersRequest, + com.google.cloud.visionai.v1.ListClustersResponse> + getListClustersMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.ListClustersRequest, + com.google.cloud.visionai.v1.ListClustersResponse> + getListClustersMethod; + if ((getListClustersMethod = StreamsServiceGrpc.getListClustersMethod) == null) { + synchronized (StreamsServiceGrpc.class) { + if ((getListClustersMethod = StreamsServiceGrpc.getListClustersMethod) == null) { + StreamsServiceGrpc.getListClustersMethod = + getListClustersMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListClusters")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.visionai.v1.ListClustersRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.visionai.v1.ListClustersResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new StreamsServiceMethodDescriptorSupplier("ListClusters")) + .build(); + } + } + } + return getListClustersMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.GetClusterRequest, com.google.cloud.visionai.v1.Cluster> + getGetClusterMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetCluster", + requestType = com.google.cloud.visionai.v1.GetClusterRequest.class, + responseType = com.google.cloud.visionai.v1.Cluster.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.GetClusterRequest, com.google.cloud.visionai.v1.Cluster> + getGetClusterMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.GetClusterRequest, com.google.cloud.visionai.v1.Cluster> + getGetClusterMethod; + if ((getGetClusterMethod = StreamsServiceGrpc.getGetClusterMethod) == null) { + synchronized (StreamsServiceGrpc.class) { + if ((getGetClusterMethod = StreamsServiceGrpc.getGetClusterMethod) == null) { + StreamsServiceGrpc.getGetClusterMethod = + getGetClusterMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetCluster")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.visionai.v1.GetClusterRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.visionai.v1.Cluster.getDefaultInstance())) + .setSchemaDescriptor(new StreamsServiceMethodDescriptorSupplier("GetCluster")) + .build(); + } + } + } + return getGetClusterMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.CreateClusterRequest, com.google.longrunning.Operation> + getCreateClusterMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateCluster", + requestType = com.google.cloud.visionai.v1.CreateClusterRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.CreateClusterRequest, com.google.longrunning.Operation> + getCreateClusterMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.CreateClusterRequest, com.google.longrunning.Operation> + getCreateClusterMethod; + if ((getCreateClusterMethod = StreamsServiceGrpc.getCreateClusterMethod) == null) { + synchronized (StreamsServiceGrpc.class) { + if ((getCreateClusterMethod = StreamsServiceGrpc.getCreateClusterMethod) == null) { + StreamsServiceGrpc.getCreateClusterMethod = + getCreateClusterMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateCluster")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.visionai.v1.CreateClusterRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new StreamsServiceMethodDescriptorSupplier("CreateCluster")) + .build(); + } + } + } + return getCreateClusterMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.UpdateClusterRequest, com.google.longrunning.Operation> + getUpdateClusterMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdateCluster", + requestType = com.google.cloud.visionai.v1.UpdateClusterRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.UpdateClusterRequest, com.google.longrunning.Operation> + getUpdateClusterMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.UpdateClusterRequest, com.google.longrunning.Operation> + getUpdateClusterMethod; + if ((getUpdateClusterMethod = StreamsServiceGrpc.getUpdateClusterMethod) == null) { + synchronized (StreamsServiceGrpc.class) { + if ((getUpdateClusterMethod = StreamsServiceGrpc.getUpdateClusterMethod) == null) { + StreamsServiceGrpc.getUpdateClusterMethod = + getUpdateClusterMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateCluster")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.visionai.v1.UpdateClusterRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new StreamsServiceMethodDescriptorSupplier("UpdateCluster")) + .build(); + } + } + } + return getUpdateClusterMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.DeleteClusterRequest, com.google.longrunning.Operation> + getDeleteClusterMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteCluster", + requestType = com.google.cloud.visionai.v1.DeleteClusterRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.DeleteClusterRequest, com.google.longrunning.Operation> + getDeleteClusterMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.DeleteClusterRequest, com.google.longrunning.Operation> + getDeleteClusterMethod; + if ((getDeleteClusterMethod = StreamsServiceGrpc.getDeleteClusterMethod) == null) { + synchronized (StreamsServiceGrpc.class) { + if ((getDeleteClusterMethod = StreamsServiceGrpc.getDeleteClusterMethod) == null) { + StreamsServiceGrpc.getDeleteClusterMethod = + getDeleteClusterMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteCluster")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.visionai.v1.DeleteClusterRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new StreamsServiceMethodDescriptorSupplier("DeleteCluster")) + .build(); + } + } + } + return getDeleteClusterMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.ListStreamsRequest, + com.google.cloud.visionai.v1.ListStreamsResponse> + getListStreamsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListStreams", + requestType = com.google.cloud.visionai.v1.ListStreamsRequest.class, + responseType = com.google.cloud.visionai.v1.ListStreamsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.ListStreamsRequest, + com.google.cloud.visionai.v1.ListStreamsResponse> + getListStreamsMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.ListStreamsRequest, + com.google.cloud.visionai.v1.ListStreamsResponse> + getListStreamsMethod; + if ((getListStreamsMethod = StreamsServiceGrpc.getListStreamsMethod) == null) { + synchronized (StreamsServiceGrpc.class) { + if ((getListStreamsMethod = StreamsServiceGrpc.getListStreamsMethod) == null) { + StreamsServiceGrpc.getListStreamsMethod = + getListStreamsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListStreams")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.visionai.v1.ListStreamsRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.visionai.v1.ListStreamsResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new StreamsServiceMethodDescriptorSupplier("ListStreams")) + .build(); + } + } + } + return getListStreamsMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.GetStreamRequest, com.google.cloud.visionai.v1.Stream> + getGetStreamMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetStream", + requestType = com.google.cloud.visionai.v1.GetStreamRequest.class, + responseType = com.google.cloud.visionai.v1.Stream.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.GetStreamRequest, com.google.cloud.visionai.v1.Stream> + getGetStreamMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.GetStreamRequest, com.google.cloud.visionai.v1.Stream> + getGetStreamMethod; + if ((getGetStreamMethod = StreamsServiceGrpc.getGetStreamMethod) == null) { + synchronized (StreamsServiceGrpc.class) { + if ((getGetStreamMethod = StreamsServiceGrpc.getGetStreamMethod) == null) { + StreamsServiceGrpc.getGetStreamMethod = + getGetStreamMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetStream")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.visionai.v1.GetStreamRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.visionai.v1.Stream.getDefaultInstance())) + .setSchemaDescriptor(new StreamsServiceMethodDescriptorSupplier("GetStream")) + .build(); + } + } + } + return getGetStreamMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.CreateStreamRequest, com.google.longrunning.Operation> + getCreateStreamMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateStream", + requestType = com.google.cloud.visionai.v1.CreateStreamRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.CreateStreamRequest, com.google.longrunning.Operation> + getCreateStreamMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.CreateStreamRequest, com.google.longrunning.Operation> + getCreateStreamMethod; + if ((getCreateStreamMethod = StreamsServiceGrpc.getCreateStreamMethod) == null) { + synchronized (StreamsServiceGrpc.class) { + if ((getCreateStreamMethod = StreamsServiceGrpc.getCreateStreamMethod) == null) { + StreamsServiceGrpc.getCreateStreamMethod = + getCreateStreamMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateStream")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.visionai.v1.CreateStreamRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new StreamsServiceMethodDescriptorSupplier("CreateStream")) + .build(); + } + } + } + return getCreateStreamMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.UpdateStreamRequest, com.google.longrunning.Operation> + getUpdateStreamMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdateStream", + requestType = com.google.cloud.visionai.v1.UpdateStreamRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.UpdateStreamRequest, com.google.longrunning.Operation> + getUpdateStreamMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.UpdateStreamRequest, com.google.longrunning.Operation> + getUpdateStreamMethod; + if ((getUpdateStreamMethod = StreamsServiceGrpc.getUpdateStreamMethod) == null) { + synchronized (StreamsServiceGrpc.class) { + if ((getUpdateStreamMethod = StreamsServiceGrpc.getUpdateStreamMethod) == null) { + StreamsServiceGrpc.getUpdateStreamMethod = + getUpdateStreamMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateStream")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.visionai.v1.UpdateStreamRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new StreamsServiceMethodDescriptorSupplier("UpdateStream")) + .build(); + } + } + } + return getUpdateStreamMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.DeleteStreamRequest, com.google.longrunning.Operation> + getDeleteStreamMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteStream", + requestType = com.google.cloud.visionai.v1.DeleteStreamRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.DeleteStreamRequest, com.google.longrunning.Operation> + getDeleteStreamMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.DeleteStreamRequest, com.google.longrunning.Operation> + getDeleteStreamMethod; + if ((getDeleteStreamMethod = StreamsServiceGrpc.getDeleteStreamMethod) == null) { + synchronized (StreamsServiceGrpc.class) { + if ((getDeleteStreamMethod = StreamsServiceGrpc.getDeleteStreamMethod) == null) { + StreamsServiceGrpc.getDeleteStreamMethod = + getDeleteStreamMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteStream")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.visionai.v1.DeleteStreamRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new StreamsServiceMethodDescriptorSupplier("DeleteStream")) + .build(); + } + } + } + return getDeleteStreamMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.GetStreamThumbnailRequest, com.google.longrunning.Operation> + getGetStreamThumbnailMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetStreamThumbnail", + requestType = com.google.cloud.visionai.v1.GetStreamThumbnailRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.GetStreamThumbnailRequest, com.google.longrunning.Operation> + getGetStreamThumbnailMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.GetStreamThumbnailRequest, + com.google.longrunning.Operation> + getGetStreamThumbnailMethod; + if ((getGetStreamThumbnailMethod = StreamsServiceGrpc.getGetStreamThumbnailMethod) == null) { + synchronized (StreamsServiceGrpc.class) { + if ((getGetStreamThumbnailMethod = StreamsServiceGrpc.getGetStreamThumbnailMethod) + == null) { + StreamsServiceGrpc.getGetStreamThumbnailMethod = + getGetStreamThumbnailMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetStreamThumbnail")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.visionai.v1.GetStreamThumbnailRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new StreamsServiceMethodDescriptorSupplier("GetStreamThumbnail")) + .build(); + } + } + } + return getGetStreamThumbnailMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.GenerateStreamHlsTokenRequest, + com.google.cloud.visionai.v1.GenerateStreamHlsTokenResponse> + getGenerateStreamHlsTokenMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GenerateStreamHlsToken", + requestType = com.google.cloud.visionai.v1.GenerateStreamHlsTokenRequest.class, + responseType = com.google.cloud.visionai.v1.GenerateStreamHlsTokenResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.GenerateStreamHlsTokenRequest, + com.google.cloud.visionai.v1.GenerateStreamHlsTokenResponse> + getGenerateStreamHlsTokenMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.GenerateStreamHlsTokenRequest, + com.google.cloud.visionai.v1.GenerateStreamHlsTokenResponse> + getGenerateStreamHlsTokenMethod; + if ((getGenerateStreamHlsTokenMethod = StreamsServiceGrpc.getGenerateStreamHlsTokenMethod) + == null) { + synchronized (StreamsServiceGrpc.class) { + if ((getGenerateStreamHlsTokenMethod = StreamsServiceGrpc.getGenerateStreamHlsTokenMethod) + == null) { + StreamsServiceGrpc.getGenerateStreamHlsTokenMethod = + getGenerateStreamHlsTokenMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "GenerateStreamHlsToken")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.visionai.v1.GenerateStreamHlsTokenRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.visionai.v1.GenerateStreamHlsTokenResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new StreamsServiceMethodDescriptorSupplier("GenerateStreamHlsToken")) + .build(); + } + } + } + return getGenerateStreamHlsTokenMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.ListEventsRequest, + com.google.cloud.visionai.v1.ListEventsResponse> + getListEventsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListEvents", + requestType = com.google.cloud.visionai.v1.ListEventsRequest.class, + responseType = com.google.cloud.visionai.v1.ListEventsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.ListEventsRequest, + com.google.cloud.visionai.v1.ListEventsResponse> + getListEventsMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.ListEventsRequest, + com.google.cloud.visionai.v1.ListEventsResponse> + getListEventsMethod; + if ((getListEventsMethod = StreamsServiceGrpc.getListEventsMethod) == null) { + synchronized (StreamsServiceGrpc.class) { + if ((getListEventsMethod = StreamsServiceGrpc.getListEventsMethod) == null) { + StreamsServiceGrpc.getListEventsMethod = + getListEventsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListEvents")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.visionai.v1.ListEventsRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.visionai.v1.ListEventsResponse.getDefaultInstance())) + .setSchemaDescriptor(new StreamsServiceMethodDescriptorSupplier("ListEvents")) + .build(); + } + } + } + return getListEventsMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.GetEventRequest, com.google.cloud.visionai.v1.Event> + getGetEventMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetEvent", + requestType = com.google.cloud.visionai.v1.GetEventRequest.class, + responseType = com.google.cloud.visionai.v1.Event.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.GetEventRequest, com.google.cloud.visionai.v1.Event> + getGetEventMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.GetEventRequest, com.google.cloud.visionai.v1.Event> + getGetEventMethod; + if ((getGetEventMethod = StreamsServiceGrpc.getGetEventMethod) == null) { + synchronized (StreamsServiceGrpc.class) { + if ((getGetEventMethod = StreamsServiceGrpc.getGetEventMethod) == null) { + StreamsServiceGrpc.getGetEventMethod = + getGetEventMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetEvent")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.visionai.v1.GetEventRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.visionai.v1.Event.getDefaultInstance())) + .setSchemaDescriptor(new StreamsServiceMethodDescriptorSupplier("GetEvent")) + .build(); + } + } + } + return getGetEventMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.CreateEventRequest, com.google.longrunning.Operation> + getCreateEventMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateEvent", + requestType = com.google.cloud.visionai.v1.CreateEventRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.CreateEventRequest, com.google.longrunning.Operation> + getCreateEventMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.CreateEventRequest, com.google.longrunning.Operation> + getCreateEventMethod; + if ((getCreateEventMethod = StreamsServiceGrpc.getCreateEventMethod) == null) { + synchronized (StreamsServiceGrpc.class) { + if ((getCreateEventMethod = StreamsServiceGrpc.getCreateEventMethod) == null) { + StreamsServiceGrpc.getCreateEventMethod = + getCreateEventMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateEvent")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.visionai.v1.CreateEventRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new StreamsServiceMethodDescriptorSupplier("CreateEvent")) + .build(); + } + } + } + return getCreateEventMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.UpdateEventRequest, com.google.longrunning.Operation> + getUpdateEventMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdateEvent", + requestType = com.google.cloud.visionai.v1.UpdateEventRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.UpdateEventRequest, com.google.longrunning.Operation> + getUpdateEventMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.UpdateEventRequest, com.google.longrunning.Operation> + getUpdateEventMethod; + if ((getUpdateEventMethod = StreamsServiceGrpc.getUpdateEventMethod) == null) { + synchronized (StreamsServiceGrpc.class) { + if ((getUpdateEventMethod = StreamsServiceGrpc.getUpdateEventMethod) == null) { + StreamsServiceGrpc.getUpdateEventMethod = + getUpdateEventMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateEvent")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.visionai.v1.UpdateEventRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new StreamsServiceMethodDescriptorSupplier("UpdateEvent")) + .build(); + } + } + } + return getUpdateEventMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.DeleteEventRequest, com.google.longrunning.Operation> + getDeleteEventMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteEvent", + requestType = com.google.cloud.visionai.v1.DeleteEventRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.DeleteEventRequest, com.google.longrunning.Operation> + getDeleteEventMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.DeleteEventRequest, com.google.longrunning.Operation> + getDeleteEventMethod; + if ((getDeleteEventMethod = StreamsServiceGrpc.getDeleteEventMethod) == null) { + synchronized (StreamsServiceGrpc.class) { + if ((getDeleteEventMethod = StreamsServiceGrpc.getDeleteEventMethod) == null) { + StreamsServiceGrpc.getDeleteEventMethod = + getDeleteEventMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteEvent")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.visionai.v1.DeleteEventRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new StreamsServiceMethodDescriptorSupplier("DeleteEvent")) + .build(); + } + } + } + return getDeleteEventMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.ListSeriesRequest, + com.google.cloud.visionai.v1.ListSeriesResponse> + getListSeriesMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListSeries", + requestType = com.google.cloud.visionai.v1.ListSeriesRequest.class, + responseType = com.google.cloud.visionai.v1.ListSeriesResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.ListSeriesRequest, + com.google.cloud.visionai.v1.ListSeriesResponse> + getListSeriesMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.ListSeriesRequest, + com.google.cloud.visionai.v1.ListSeriesResponse> + getListSeriesMethod; + if ((getListSeriesMethod = StreamsServiceGrpc.getListSeriesMethod) == null) { + synchronized (StreamsServiceGrpc.class) { + if ((getListSeriesMethod = StreamsServiceGrpc.getListSeriesMethod) == null) { + StreamsServiceGrpc.getListSeriesMethod = + getListSeriesMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListSeries")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.visionai.v1.ListSeriesRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.visionai.v1.ListSeriesResponse.getDefaultInstance())) + .setSchemaDescriptor(new StreamsServiceMethodDescriptorSupplier("ListSeries")) + .build(); + } + } + } + return getListSeriesMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.GetSeriesRequest, com.google.cloud.visionai.v1.Series> + getGetSeriesMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetSeries", + requestType = com.google.cloud.visionai.v1.GetSeriesRequest.class, + responseType = com.google.cloud.visionai.v1.Series.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.GetSeriesRequest, com.google.cloud.visionai.v1.Series> + getGetSeriesMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.GetSeriesRequest, com.google.cloud.visionai.v1.Series> + getGetSeriesMethod; + if ((getGetSeriesMethod = StreamsServiceGrpc.getGetSeriesMethod) == null) { + synchronized (StreamsServiceGrpc.class) { + if ((getGetSeriesMethod = StreamsServiceGrpc.getGetSeriesMethod) == null) { + StreamsServiceGrpc.getGetSeriesMethod = + getGetSeriesMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetSeries")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.visionai.v1.GetSeriesRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.visionai.v1.Series.getDefaultInstance())) + .setSchemaDescriptor(new StreamsServiceMethodDescriptorSupplier("GetSeries")) + .build(); + } + } + } + return getGetSeriesMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.CreateSeriesRequest, com.google.longrunning.Operation> + getCreateSeriesMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateSeries", + requestType = com.google.cloud.visionai.v1.CreateSeriesRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.CreateSeriesRequest, com.google.longrunning.Operation> + getCreateSeriesMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.CreateSeriesRequest, com.google.longrunning.Operation> + getCreateSeriesMethod; + if ((getCreateSeriesMethod = StreamsServiceGrpc.getCreateSeriesMethod) == null) { + synchronized (StreamsServiceGrpc.class) { + if ((getCreateSeriesMethod = StreamsServiceGrpc.getCreateSeriesMethod) == null) { + StreamsServiceGrpc.getCreateSeriesMethod = + getCreateSeriesMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateSeries")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.visionai.v1.CreateSeriesRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new StreamsServiceMethodDescriptorSupplier("CreateSeries")) + .build(); + } + } + } + return getCreateSeriesMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.UpdateSeriesRequest, com.google.longrunning.Operation> + getUpdateSeriesMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdateSeries", + requestType = com.google.cloud.visionai.v1.UpdateSeriesRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.UpdateSeriesRequest, com.google.longrunning.Operation> + getUpdateSeriesMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.UpdateSeriesRequest, com.google.longrunning.Operation> + getUpdateSeriesMethod; + if ((getUpdateSeriesMethod = StreamsServiceGrpc.getUpdateSeriesMethod) == null) { + synchronized (StreamsServiceGrpc.class) { + if ((getUpdateSeriesMethod = StreamsServiceGrpc.getUpdateSeriesMethod) == null) { + StreamsServiceGrpc.getUpdateSeriesMethod = + getUpdateSeriesMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateSeries")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.visionai.v1.UpdateSeriesRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new StreamsServiceMethodDescriptorSupplier("UpdateSeries")) + .build(); + } + } + } + return getUpdateSeriesMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.DeleteSeriesRequest, com.google.longrunning.Operation> + getDeleteSeriesMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteSeries", + requestType = com.google.cloud.visionai.v1.DeleteSeriesRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.DeleteSeriesRequest, com.google.longrunning.Operation> + getDeleteSeriesMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.DeleteSeriesRequest, com.google.longrunning.Operation> + getDeleteSeriesMethod; + if ((getDeleteSeriesMethod = StreamsServiceGrpc.getDeleteSeriesMethod) == null) { + synchronized (StreamsServiceGrpc.class) { + if ((getDeleteSeriesMethod = StreamsServiceGrpc.getDeleteSeriesMethod) == null) { + StreamsServiceGrpc.getDeleteSeriesMethod = + getDeleteSeriesMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteSeries")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.visionai.v1.DeleteSeriesRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new StreamsServiceMethodDescriptorSupplier("DeleteSeries")) + .build(); + } + } + } + return getDeleteSeriesMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.MaterializeChannelRequest, com.google.longrunning.Operation> + getMaterializeChannelMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "MaterializeChannel", + requestType = com.google.cloud.visionai.v1.MaterializeChannelRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.MaterializeChannelRequest, com.google.longrunning.Operation> + getMaterializeChannelMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.MaterializeChannelRequest, + com.google.longrunning.Operation> + getMaterializeChannelMethod; + if ((getMaterializeChannelMethod = StreamsServiceGrpc.getMaterializeChannelMethod) == null) { + synchronized (StreamsServiceGrpc.class) { + if ((getMaterializeChannelMethod = StreamsServiceGrpc.getMaterializeChannelMethod) + == null) { + StreamsServiceGrpc.getMaterializeChannelMethod = + getMaterializeChannelMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "MaterializeChannel")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.visionai.v1.MaterializeChannelRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new StreamsServiceMethodDescriptorSupplier("MaterializeChannel")) + .build(); + } + } + } + return getMaterializeChannelMethod; + } + + /** Creates a new async stub that supports all call types for the service */ + public static StreamsServiceStub newStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public StreamsServiceStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new StreamsServiceStub(channel, callOptions); + } + }; + return StreamsServiceStub.newStub(factory, channel); + } + + /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service + */ + public static StreamsServiceBlockingStub newBlockingStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public StreamsServiceBlockingStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new StreamsServiceBlockingStub(channel, callOptions); + } + }; + return StreamsServiceBlockingStub.newStub(factory, channel); + } + + /** Creates a new ListenableFuture-style stub that supports unary calls on the service */ + public static StreamsServiceFutureStub newFutureStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public StreamsServiceFutureStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new StreamsServiceFutureStub(channel, callOptions); + } + }; + return StreamsServiceFutureStub.newStub(factory, channel); + } + + /** + * + * + *
+   * Service describing handlers for resources.
+   * Vision API and Vision AI API are two independent APIs developed by the same
+   * team. Vision API is for people to annotate their image while Vision AI is an
+   * e2e solution for customer to build their own computer vision application.
+   * 
+ */ + public interface AsyncService { + + /** + * + * + *
+     * Lists Clusters in a given project and location.
+     * 
+ */ + default void listClusters( + com.google.cloud.visionai.v1.ListClustersRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListClustersMethod(), responseObserver); + } + + /** + * + * + *
+     * Gets details of a single Cluster.
+     * 
+ */ + default void getCluster( + com.google.cloud.visionai.v1.GetClusterRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetClusterMethod(), responseObserver); + } + + /** + * + * + *
+     * Creates a new Cluster in a given project and location.
+     * 
+ */ + default void createCluster( + com.google.cloud.visionai.v1.CreateClusterRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getCreateClusterMethod(), responseObserver); + } + + /** + * + * + *
+     * Updates the parameters of a single Cluster.
+     * 
+ */ + default void updateCluster( + com.google.cloud.visionai.v1.UpdateClusterRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getUpdateClusterMethod(), responseObserver); + } + + /** + * + * + *
+     * Deletes a single Cluster.
+     * 
+ */ + default void deleteCluster( + com.google.cloud.visionai.v1.DeleteClusterRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getDeleteClusterMethod(), responseObserver); + } + + /** + * + * + *
+     * Lists Streams in a given project and location.
+     * 
+ */ + default void listStreams( + com.google.cloud.visionai.v1.ListStreamsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListStreamsMethod(), responseObserver); + } + + /** + * + * + *
+     * Gets details of a single Stream.
+     * 
+ */ + default void getStream( + com.google.cloud.visionai.v1.GetStreamRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetStreamMethod(), responseObserver); + } + + /** + * + * + *
+     * Creates a new Stream in a given project and location.
+     * 
+ */ + default void createStream( + com.google.cloud.visionai.v1.CreateStreamRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getCreateStreamMethod(), responseObserver); + } + + /** + * + * + *
+     * Updates the parameters of a single Stream.
+     * 
+ */ + default void updateStream( + com.google.cloud.visionai.v1.UpdateStreamRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getUpdateStreamMethod(), responseObserver); + } + + /** + * + * + *
+     * Deletes a single Stream.
+     * 
+ */ + default void deleteStream( + com.google.cloud.visionai.v1.DeleteStreamRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getDeleteStreamMethod(), responseObserver); + } + + /** + * + * + *
+     * Gets the thumbnail (image snapshot) of a single Stream.
+     * 
+ */ + default void getStreamThumbnail( + com.google.cloud.visionai.v1.GetStreamThumbnailRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getGetStreamThumbnailMethod(), responseObserver); + } + + /** + * + * + *
+     * Generate the JWT auth token required to get the stream HLS contents.
+     * 
+ */ + default void generateStreamHlsToken( + com.google.cloud.visionai.v1.GenerateStreamHlsTokenRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getGenerateStreamHlsTokenMethod(), responseObserver); + } + + /** + * + * + *
+     * Lists Events in a given project and location.
+     * 
+ */ + default void listEvents( + com.google.cloud.visionai.v1.ListEventsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListEventsMethod(), responseObserver); + } + + /** + * + * + *
+     * Gets details of a single Event.
+     * 
+ */ + default void getEvent( + com.google.cloud.visionai.v1.GetEventRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetEventMethod(), responseObserver); + } + + /** + * + * + *
+     * Creates a new Event in a given project and location.
+     * 
+ */ + default void createEvent( + com.google.cloud.visionai.v1.CreateEventRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getCreateEventMethod(), responseObserver); + } + + /** + * + * + *
+     * Updates the parameters of a single Event.
+     * 
+ */ + default void updateEvent( + com.google.cloud.visionai.v1.UpdateEventRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getUpdateEventMethod(), responseObserver); + } + + /** + * + * + *
+     * Deletes a single Event.
+     * 
+ */ + default void deleteEvent( + com.google.cloud.visionai.v1.DeleteEventRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getDeleteEventMethod(), responseObserver); + } + + /** + * + * + *
+     * Lists Series in a given project and location.
+     * 
+ */ + default void listSeries( + com.google.cloud.visionai.v1.ListSeriesRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListSeriesMethod(), responseObserver); + } + + /** + * + * + *
+     * Gets details of a single Series.
+     * 
+ */ + default void getSeries( + com.google.cloud.visionai.v1.GetSeriesRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetSeriesMethod(), responseObserver); + } + + /** + * + * + *
+     * Creates a new Series in a given project and location.
+     * 
+ */ + default void createSeries( + com.google.cloud.visionai.v1.CreateSeriesRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getCreateSeriesMethod(), responseObserver); + } + + /** + * + * + *
+     * Updates the parameters of a single Event.
+     * 
+ */ + default void updateSeries( + com.google.cloud.visionai.v1.UpdateSeriesRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getUpdateSeriesMethod(), responseObserver); + } + + /** + * + * + *
+     * Deletes a single Series.
+     * 
+ */ + default void deleteSeries( + com.google.cloud.visionai.v1.DeleteSeriesRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getDeleteSeriesMethod(), responseObserver); + } + + /** + * + * + *
+     * Materialize a channel.
+     * 
+ */ + default void materializeChannel( + com.google.cloud.visionai.v1.MaterializeChannelRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getMaterializeChannelMethod(), responseObserver); + } + } + + /** + * Base class for the server implementation of the service StreamsService. + * + *
+   * Service describing handlers for resources.
+   * Vision API and Vision AI API are two independent APIs developed by the same
+   * team. Vision API is for people to annotate their image while Vision AI is an
+   * e2e solution for customer to build their own computer vision application.
+   * 
+ */ + public abstract static class StreamsServiceImplBase + implements io.grpc.BindableService, AsyncService { + + @java.lang.Override + public final io.grpc.ServerServiceDefinition bindService() { + return StreamsServiceGrpc.bindService(this); + } + } + + /** + * A stub to allow clients to do asynchronous rpc calls to service StreamsService. + * + *
+   * Service describing handlers for resources.
+   * Vision API and Vision AI API are two independent APIs developed by the same
+   * team. Vision API is for people to annotate their image while Vision AI is an
+   * e2e solution for customer to build their own computer vision application.
+   * 
+ */ + public static final class StreamsServiceStub + extends io.grpc.stub.AbstractAsyncStub { + private StreamsServiceStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected StreamsServiceStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new StreamsServiceStub(channel, callOptions); + } + + /** + * + * + *
+     * Lists Clusters in a given project and location.
+     * 
+ */ + public void listClusters( + com.google.cloud.visionai.v1.ListClustersRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListClustersMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Gets details of a single Cluster.
+     * 
+ */ + public void getCluster( + com.google.cloud.visionai.v1.GetClusterRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetClusterMethod(), getCallOptions()), request, responseObserver); + } + + /** + * + * + *
+     * Creates a new Cluster in a given project and location.
+     * 
+ */ + public void createCluster( + com.google.cloud.visionai.v1.CreateClusterRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreateClusterMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Updates the parameters of a single Cluster.
+     * 
+ */ + public void updateCluster( + com.google.cloud.visionai.v1.UpdateClusterRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUpdateClusterMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Deletes a single Cluster.
+     * 
+ */ + public void deleteCluster( + com.google.cloud.visionai.v1.DeleteClusterRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeleteClusterMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Lists Streams in a given project and location.
+     * 
+ */ + public void listStreams( + com.google.cloud.visionai.v1.ListStreamsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListStreamsMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Gets details of a single Stream.
+     * 
+ */ + public void getStream( + com.google.cloud.visionai.v1.GetStreamRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetStreamMethod(), getCallOptions()), request, responseObserver); + } + + /** + * + * + *
+     * Creates a new Stream in a given project and location.
+     * 
+ */ + public void createStream( + com.google.cloud.visionai.v1.CreateStreamRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreateStreamMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Updates the parameters of a single Stream.
+     * 
+ */ + public void updateStream( + com.google.cloud.visionai.v1.UpdateStreamRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUpdateStreamMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Deletes a single Stream.
+     * 
+ */ + public void deleteStream( + com.google.cloud.visionai.v1.DeleteStreamRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeleteStreamMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Gets the thumbnail (image snapshot) of a single Stream.
+     * 
+ */ + public void getStreamThumbnail( + com.google.cloud.visionai.v1.GetStreamThumbnailRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetStreamThumbnailMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Generate the JWT auth token required to get the stream HLS contents.
+     * 
+ */ + public void generateStreamHlsToken( + com.google.cloud.visionai.v1.GenerateStreamHlsTokenRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGenerateStreamHlsTokenMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Lists Events in a given project and location.
+     * 
+ */ + public void listEvents( + com.google.cloud.visionai.v1.ListEventsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListEventsMethod(), getCallOptions()), request, responseObserver); + } + + /** + * + * + *
+     * Gets details of a single Event.
+     * 
+ */ + public void getEvent( + com.google.cloud.visionai.v1.GetEventRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetEventMethod(), getCallOptions()), request, responseObserver); + } + + /** + * + * + *
+     * Creates a new Event in a given project and location.
+     * 
+ */ + public void createEvent( + com.google.cloud.visionai.v1.CreateEventRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreateEventMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Updates the parameters of a single Event.
+     * 
+ */ + public void updateEvent( + com.google.cloud.visionai.v1.UpdateEventRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUpdateEventMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Deletes a single Event.
+     * 
+ */ + public void deleteEvent( + com.google.cloud.visionai.v1.DeleteEventRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeleteEventMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Lists Series in a given project and location.
+     * 
+ */ + public void listSeries( + com.google.cloud.visionai.v1.ListSeriesRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListSeriesMethod(), getCallOptions()), request, responseObserver); + } + + /** + * + * + *
+     * Gets details of a single Series.
+     * 
+ */ + public void getSeries( + com.google.cloud.visionai.v1.GetSeriesRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetSeriesMethod(), getCallOptions()), request, responseObserver); + } + + /** + * + * + *
+     * Creates a new Series in a given project and location.
+     * 
+ */ + public void createSeries( + com.google.cloud.visionai.v1.CreateSeriesRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreateSeriesMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Updates the parameters of a single Event.
+     * 
+ */ + public void updateSeries( + com.google.cloud.visionai.v1.UpdateSeriesRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUpdateSeriesMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Deletes a single Series.
+     * 
+ */ + public void deleteSeries( + com.google.cloud.visionai.v1.DeleteSeriesRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeleteSeriesMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Materialize a channel.
+     * 
+ */ + public void materializeChannel( + com.google.cloud.visionai.v1.MaterializeChannelRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getMaterializeChannelMethod(), getCallOptions()), + request, + responseObserver); + } + } + + /** + * A stub to allow clients to do synchronous rpc calls to service StreamsService. + * + *
+   * Service describing handlers for resources.
+   * Vision API and Vision AI API are two independent APIs developed by the same
+   * team. Vision API is for people to annotate their image while Vision AI is an
+   * e2e solution for customer to build their own computer vision application.
+   * 
+ */ + public static final class StreamsServiceBlockingStub + extends io.grpc.stub.AbstractBlockingStub { + private StreamsServiceBlockingStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected StreamsServiceBlockingStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new StreamsServiceBlockingStub(channel, callOptions); + } + + /** + * + * + *
+     * Lists Clusters in a given project and location.
+     * 
+ */ + public com.google.cloud.visionai.v1.ListClustersResponse listClusters( + com.google.cloud.visionai.v1.ListClustersRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListClustersMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets details of a single Cluster.
+     * 
+ */ + public com.google.cloud.visionai.v1.Cluster getCluster( + com.google.cloud.visionai.v1.GetClusterRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetClusterMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Creates a new Cluster in a given project and location.
+     * 
+ */ + public com.google.longrunning.Operation createCluster( + com.google.cloud.visionai.v1.CreateClusterRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreateClusterMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Updates the parameters of a single Cluster.
+     * 
+ */ + public com.google.longrunning.Operation updateCluster( + com.google.cloud.visionai.v1.UpdateClusterRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpdateClusterMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Deletes a single Cluster.
+     * 
+ */ + public com.google.longrunning.Operation deleteCluster( + com.google.cloud.visionai.v1.DeleteClusterRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeleteClusterMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lists Streams in a given project and location.
+     * 
+ */ + public com.google.cloud.visionai.v1.ListStreamsResponse listStreams( + com.google.cloud.visionai.v1.ListStreamsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListStreamsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets details of a single Stream.
+     * 
+ */ + public com.google.cloud.visionai.v1.Stream getStream( + com.google.cloud.visionai.v1.GetStreamRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetStreamMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Creates a new Stream in a given project and location.
+     * 
+ */ + public com.google.longrunning.Operation createStream( + com.google.cloud.visionai.v1.CreateStreamRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreateStreamMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Updates the parameters of a single Stream.
+     * 
+ */ + public com.google.longrunning.Operation updateStream( + com.google.cloud.visionai.v1.UpdateStreamRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpdateStreamMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Deletes a single Stream.
+     * 
+ */ + public com.google.longrunning.Operation deleteStream( + com.google.cloud.visionai.v1.DeleteStreamRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeleteStreamMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets the thumbnail (image snapshot) of a single Stream.
+     * 
+ */ + public com.google.longrunning.Operation getStreamThumbnail( + com.google.cloud.visionai.v1.GetStreamThumbnailRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetStreamThumbnailMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Generate the JWT auth token required to get the stream HLS contents.
+     * 
+ */ + public com.google.cloud.visionai.v1.GenerateStreamHlsTokenResponse generateStreamHlsToken( + com.google.cloud.visionai.v1.GenerateStreamHlsTokenRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGenerateStreamHlsTokenMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lists Events in a given project and location.
+     * 
+ */ + public com.google.cloud.visionai.v1.ListEventsResponse listEvents( + com.google.cloud.visionai.v1.ListEventsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListEventsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets details of a single Event.
+     * 
+ */ + public com.google.cloud.visionai.v1.Event getEvent( + com.google.cloud.visionai.v1.GetEventRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetEventMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Creates a new Event in a given project and location.
+     * 
+ */ + public com.google.longrunning.Operation createEvent( + com.google.cloud.visionai.v1.CreateEventRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreateEventMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Updates the parameters of a single Event.
+     * 
+ */ + public com.google.longrunning.Operation updateEvent( + com.google.cloud.visionai.v1.UpdateEventRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpdateEventMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Deletes a single Event.
+     * 
+ */ + public com.google.longrunning.Operation deleteEvent( + com.google.cloud.visionai.v1.DeleteEventRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeleteEventMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lists Series in a given project and location.
+     * 
+ */ + public com.google.cloud.visionai.v1.ListSeriesResponse listSeries( + com.google.cloud.visionai.v1.ListSeriesRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListSeriesMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets details of a single Series.
+     * 
+ */ + public com.google.cloud.visionai.v1.Series getSeries( + com.google.cloud.visionai.v1.GetSeriesRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetSeriesMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Creates a new Series in a given project and location.
+     * 
+ */ + public com.google.longrunning.Operation createSeries( + com.google.cloud.visionai.v1.CreateSeriesRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreateSeriesMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Updates the parameters of a single Event.
+     * 
+ */ + public com.google.longrunning.Operation updateSeries( + com.google.cloud.visionai.v1.UpdateSeriesRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpdateSeriesMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Deletes a single Series.
+     * 
+ */ + public com.google.longrunning.Operation deleteSeries( + com.google.cloud.visionai.v1.DeleteSeriesRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeleteSeriesMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Materialize a channel.
+     * 
+ */ + public com.google.longrunning.Operation materializeChannel( + com.google.cloud.visionai.v1.MaterializeChannelRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getMaterializeChannelMethod(), getCallOptions(), request); + } + } + + /** + * A stub to allow clients to do ListenableFuture-style rpc calls to service StreamsService. + * + *
+   * Service describing handlers for resources.
+   * Vision API and Vision AI API are two independent APIs developed by the same
+   * team. Vision API is for people to annotate their image while Vision AI is an
+   * e2e solution for customer to build their own computer vision application.
+   * 
+ */ + public static final class StreamsServiceFutureStub + extends io.grpc.stub.AbstractFutureStub { + private StreamsServiceFutureStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected StreamsServiceFutureStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new StreamsServiceFutureStub(channel, callOptions); + } + + /** + * + * + *
+     * Lists Clusters in a given project and location.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.visionai.v1.ListClustersResponse> + listClusters(com.google.cloud.visionai.v1.ListClustersRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListClustersMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Gets details of a single Cluster.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + getCluster(com.google.cloud.visionai.v1.GetClusterRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetClusterMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Creates a new Cluster in a given project and location.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + createCluster(com.google.cloud.visionai.v1.CreateClusterRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreateClusterMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Updates the parameters of a single Cluster.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + updateCluster(com.google.cloud.visionai.v1.UpdateClusterRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUpdateClusterMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Deletes a single Cluster.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + deleteCluster(com.google.cloud.visionai.v1.DeleteClusterRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDeleteClusterMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Lists Streams in a given project and location.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.visionai.v1.ListStreamsResponse> + listStreams(com.google.cloud.visionai.v1.ListStreamsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListStreamsMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Gets details of a single Stream.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + getStream(com.google.cloud.visionai.v1.GetStreamRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetStreamMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Creates a new Stream in a given project and location.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + createStream(com.google.cloud.visionai.v1.CreateStreamRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreateStreamMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Updates the parameters of a single Stream.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + updateStream(com.google.cloud.visionai.v1.UpdateStreamRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUpdateStreamMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Deletes a single Stream.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + deleteStream(com.google.cloud.visionai.v1.DeleteStreamRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDeleteStreamMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Gets the thumbnail (image snapshot) of a single Stream.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + getStreamThumbnail(com.google.cloud.visionai.v1.GetStreamThumbnailRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetStreamThumbnailMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Generate the JWT auth token required to get the stream HLS contents.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.visionai.v1.GenerateStreamHlsTokenResponse> + generateStreamHlsToken(com.google.cloud.visionai.v1.GenerateStreamHlsTokenRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGenerateStreamHlsTokenMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Lists Events in a given project and location.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.visionai.v1.ListEventsResponse> + listEvents(com.google.cloud.visionai.v1.ListEventsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListEventsMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Gets details of a single Event.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + getEvent(com.google.cloud.visionai.v1.GetEventRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetEventMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Creates a new Event in a given project and location.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + createEvent(com.google.cloud.visionai.v1.CreateEventRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreateEventMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Updates the parameters of a single Event.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + updateEvent(com.google.cloud.visionai.v1.UpdateEventRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUpdateEventMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Deletes a single Event.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + deleteEvent(com.google.cloud.visionai.v1.DeleteEventRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDeleteEventMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Lists Series in a given project and location.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.visionai.v1.ListSeriesResponse> + listSeries(com.google.cloud.visionai.v1.ListSeriesRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListSeriesMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Gets details of a single Series.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + getSeries(com.google.cloud.visionai.v1.GetSeriesRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetSeriesMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Creates a new Series in a given project and location.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + createSeries(com.google.cloud.visionai.v1.CreateSeriesRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreateSeriesMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Updates the parameters of a single Event.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + updateSeries(com.google.cloud.visionai.v1.UpdateSeriesRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUpdateSeriesMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Deletes a single Series.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + deleteSeries(com.google.cloud.visionai.v1.DeleteSeriesRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDeleteSeriesMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Materialize a channel.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + materializeChannel(com.google.cloud.visionai.v1.MaterializeChannelRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getMaterializeChannelMethod(), getCallOptions()), request); + } + } + + private static final int METHODID_LIST_CLUSTERS = 0; + private static final int METHODID_GET_CLUSTER = 1; + private static final int METHODID_CREATE_CLUSTER = 2; + private static final int METHODID_UPDATE_CLUSTER = 3; + private static final int METHODID_DELETE_CLUSTER = 4; + private static final int METHODID_LIST_STREAMS = 5; + private static final int METHODID_GET_STREAM = 6; + private static final int METHODID_CREATE_STREAM = 7; + private static final int METHODID_UPDATE_STREAM = 8; + private static final int METHODID_DELETE_STREAM = 9; + private static final int METHODID_GET_STREAM_THUMBNAIL = 10; + private static final int METHODID_GENERATE_STREAM_HLS_TOKEN = 11; + private static final int METHODID_LIST_EVENTS = 12; + private static final int METHODID_GET_EVENT = 13; + private static final int METHODID_CREATE_EVENT = 14; + private static final int METHODID_UPDATE_EVENT = 15; + private static final int METHODID_DELETE_EVENT = 16; + private static final int METHODID_LIST_SERIES = 17; + private static final int METHODID_GET_SERIES = 18; + private static final int METHODID_CREATE_SERIES = 19; + private static final int METHODID_UPDATE_SERIES = 20; + private static final int METHODID_DELETE_SERIES = 21; + private static final int METHODID_MATERIALIZE_CHANNEL = 22; + + 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 AsyncService serviceImpl; + private final int methodId; + + MethodHandlers(AsyncService 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_LIST_CLUSTERS: + serviceImpl.listClusters( + (com.google.cloud.visionai.v1.ListClustersRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_GET_CLUSTER: + serviceImpl.getCluster( + (com.google.cloud.visionai.v1.GetClusterRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_CREATE_CLUSTER: + serviceImpl.createCluster( + (com.google.cloud.visionai.v1.CreateClusterRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_UPDATE_CLUSTER: + serviceImpl.updateCluster( + (com.google.cloud.visionai.v1.UpdateClusterRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_DELETE_CLUSTER: + serviceImpl.deleteCluster( + (com.google.cloud.visionai.v1.DeleteClusterRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_LIST_STREAMS: + serviceImpl.listStreams( + (com.google.cloud.visionai.v1.ListStreamsRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_GET_STREAM: + serviceImpl.getStream( + (com.google.cloud.visionai.v1.GetStreamRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_CREATE_STREAM: + serviceImpl.createStream( + (com.google.cloud.visionai.v1.CreateStreamRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_UPDATE_STREAM: + serviceImpl.updateStream( + (com.google.cloud.visionai.v1.UpdateStreamRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_DELETE_STREAM: + serviceImpl.deleteStream( + (com.google.cloud.visionai.v1.DeleteStreamRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_STREAM_THUMBNAIL: + serviceImpl.getStreamThumbnail( + (com.google.cloud.visionai.v1.GetStreamThumbnailRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GENERATE_STREAM_HLS_TOKEN: + serviceImpl.generateStreamHlsToken( + (com.google.cloud.visionai.v1.GenerateStreamHlsTokenRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.visionai.v1.GenerateStreamHlsTokenResponse>) + responseObserver); + break; + case METHODID_LIST_EVENTS: + serviceImpl.listEvents( + (com.google.cloud.visionai.v1.ListEventsRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_GET_EVENT: + serviceImpl.getEvent( + (com.google.cloud.visionai.v1.GetEventRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_CREATE_EVENT: + serviceImpl.createEvent( + (com.google.cloud.visionai.v1.CreateEventRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_UPDATE_EVENT: + serviceImpl.updateEvent( + (com.google.cloud.visionai.v1.UpdateEventRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_DELETE_EVENT: + serviceImpl.deleteEvent( + (com.google.cloud.visionai.v1.DeleteEventRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_LIST_SERIES: + serviceImpl.listSeries( + (com.google.cloud.visionai.v1.ListSeriesRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_GET_SERIES: + serviceImpl.getSeries( + (com.google.cloud.visionai.v1.GetSeriesRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_CREATE_SERIES: + serviceImpl.createSeries( + (com.google.cloud.visionai.v1.CreateSeriesRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_UPDATE_SERIES: + serviceImpl.updateSeries( + (com.google.cloud.visionai.v1.UpdateSeriesRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_DELETE_SERIES: + serviceImpl.deleteSeries( + (com.google.cloud.visionai.v1.DeleteSeriesRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_MATERIALIZE_CHANNEL: + serviceImpl.materializeChannel( + (com.google.cloud.visionai.v1.MaterializeChannelRequest) 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(); + } + } + } + + public static final io.grpc.ServerServiceDefinition bindService(AsyncService service) { + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) + .addMethod( + getListClustersMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.visionai.v1.ListClustersRequest, + com.google.cloud.visionai.v1.ListClustersResponse>( + service, METHODID_LIST_CLUSTERS))) + .addMethod( + getGetClusterMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.visionai.v1.GetClusterRequest, + com.google.cloud.visionai.v1.Cluster>(service, METHODID_GET_CLUSTER))) + .addMethod( + getCreateClusterMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.visionai.v1.CreateClusterRequest, + com.google.longrunning.Operation>(service, METHODID_CREATE_CLUSTER))) + .addMethod( + getUpdateClusterMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.visionai.v1.UpdateClusterRequest, + com.google.longrunning.Operation>(service, METHODID_UPDATE_CLUSTER))) + .addMethod( + getDeleteClusterMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.visionai.v1.DeleteClusterRequest, + com.google.longrunning.Operation>(service, METHODID_DELETE_CLUSTER))) + .addMethod( + getListStreamsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.visionai.v1.ListStreamsRequest, + com.google.cloud.visionai.v1.ListStreamsResponse>( + service, METHODID_LIST_STREAMS))) + .addMethod( + getGetStreamMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.visionai.v1.GetStreamRequest, + com.google.cloud.visionai.v1.Stream>(service, METHODID_GET_STREAM))) + .addMethod( + getCreateStreamMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.visionai.v1.CreateStreamRequest, + com.google.longrunning.Operation>(service, METHODID_CREATE_STREAM))) + .addMethod( + getUpdateStreamMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.visionai.v1.UpdateStreamRequest, + com.google.longrunning.Operation>(service, METHODID_UPDATE_STREAM))) + .addMethod( + getDeleteStreamMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.visionai.v1.DeleteStreamRequest, + com.google.longrunning.Operation>(service, METHODID_DELETE_STREAM))) + .addMethod( + getGetStreamThumbnailMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.visionai.v1.GetStreamThumbnailRequest, + com.google.longrunning.Operation>(service, METHODID_GET_STREAM_THUMBNAIL))) + .addMethod( + getGenerateStreamHlsTokenMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.visionai.v1.GenerateStreamHlsTokenRequest, + com.google.cloud.visionai.v1.GenerateStreamHlsTokenResponse>( + service, METHODID_GENERATE_STREAM_HLS_TOKEN))) + .addMethod( + getListEventsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.visionai.v1.ListEventsRequest, + com.google.cloud.visionai.v1.ListEventsResponse>( + service, METHODID_LIST_EVENTS))) + .addMethod( + getGetEventMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.visionai.v1.GetEventRequest, + com.google.cloud.visionai.v1.Event>(service, METHODID_GET_EVENT))) + .addMethod( + getCreateEventMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.visionai.v1.CreateEventRequest, + com.google.longrunning.Operation>(service, METHODID_CREATE_EVENT))) + .addMethod( + getUpdateEventMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.visionai.v1.UpdateEventRequest, + com.google.longrunning.Operation>(service, METHODID_UPDATE_EVENT))) + .addMethod( + getDeleteEventMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.visionai.v1.DeleteEventRequest, + com.google.longrunning.Operation>(service, METHODID_DELETE_EVENT))) + .addMethod( + getListSeriesMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.visionai.v1.ListSeriesRequest, + com.google.cloud.visionai.v1.ListSeriesResponse>( + service, METHODID_LIST_SERIES))) + .addMethod( + getGetSeriesMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.visionai.v1.GetSeriesRequest, + com.google.cloud.visionai.v1.Series>(service, METHODID_GET_SERIES))) + .addMethod( + getCreateSeriesMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.visionai.v1.CreateSeriesRequest, + com.google.longrunning.Operation>(service, METHODID_CREATE_SERIES))) + .addMethod( + getUpdateSeriesMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.visionai.v1.UpdateSeriesRequest, + com.google.longrunning.Operation>(service, METHODID_UPDATE_SERIES))) + .addMethod( + getDeleteSeriesMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.visionai.v1.DeleteSeriesRequest, + com.google.longrunning.Operation>(service, METHODID_DELETE_SERIES))) + .addMethod( + getMaterializeChannelMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.visionai.v1.MaterializeChannelRequest, + com.google.longrunning.Operation>(service, METHODID_MATERIALIZE_CHANNEL))) + .build(); + } + + private abstract static class StreamsServiceBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoFileDescriptorSupplier, + io.grpc.protobuf.ProtoServiceDescriptorSupplier { + StreamsServiceBaseDescriptorSupplier() {} + + @java.lang.Override + public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { + return com.google.cloud.visionai.v1.StreamsServiceProto.getDescriptor(); + } + + @java.lang.Override + public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { + return getFileDescriptor().findServiceByName("StreamsService"); + } + } + + private static final class StreamsServiceFileDescriptorSupplier + extends StreamsServiceBaseDescriptorSupplier { + StreamsServiceFileDescriptorSupplier() {} + } + + private static final class StreamsServiceMethodDescriptorSupplier + extends StreamsServiceBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { + private final java.lang.String methodName; + + StreamsServiceMethodDescriptorSupplier(java.lang.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 (StreamsServiceGrpc.class) { + result = serviceDescriptor; + if (result == null) { + serviceDescriptor = + result = + io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) + .setSchemaDescriptor(new StreamsServiceFileDescriptorSupplier()) + .addMethod(getListClustersMethod()) + .addMethod(getGetClusterMethod()) + .addMethod(getCreateClusterMethod()) + .addMethod(getUpdateClusterMethod()) + .addMethod(getDeleteClusterMethod()) + .addMethod(getListStreamsMethod()) + .addMethod(getGetStreamMethod()) + .addMethod(getCreateStreamMethod()) + .addMethod(getUpdateStreamMethod()) + .addMethod(getDeleteStreamMethod()) + .addMethod(getGetStreamThumbnailMethod()) + .addMethod(getGenerateStreamHlsTokenMethod()) + .addMethod(getListEventsMethod()) + .addMethod(getGetEventMethod()) + .addMethod(getCreateEventMethod()) + .addMethod(getUpdateEventMethod()) + .addMethod(getDeleteEventMethod()) + .addMethod(getListSeriesMethod()) + .addMethod(getGetSeriesMethod()) + .addMethod(getCreateSeriesMethod()) + .addMethod(getUpdateSeriesMethod()) + .addMethod(getDeleteSeriesMethod()) + .addMethod(getMaterializeChannelMethod()) + .build(); + } + } + } + return result; + } +} diff --git a/java-visionai/grpc-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/WarehouseGrpc.java b/java-visionai/grpc-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/WarehouseGrpc.java new file mode 100644 index 000000000000..6993d00833e5 --- /dev/null +++ b/java-visionai/grpc-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/WarehouseGrpc.java @@ -0,0 +1,7692 @@ +/* + * Copyright 2024 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.visionai.v1; + +import static io.grpc.MethodDescriptor.generateFullMethodName; + +/** + * + * + *
+ * Service that manages media content + metadata for streaming.
+ * 
+ */ +@javax.annotation.Generated( + value = "by gRPC proto compiler", + comments = "Source: google/cloud/visionai/v1/warehouse.proto") +@io.grpc.stub.annotations.GrpcGenerated +public final class WarehouseGrpc { + + private WarehouseGrpc() {} + + public static final java.lang.String SERVICE_NAME = "google.cloud.visionai.v1.Warehouse"; + + // Static method descriptors that strictly reflect the proto. + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.CreateAssetRequest, com.google.cloud.visionai.v1.Asset> + getCreateAssetMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateAsset", + requestType = com.google.cloud.visionai.v1.CreateAssetRequest.class, + responseType = com.google.cloud.visionai.v1.Asset.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.CreateAssetRequest, com.google.cloud.visionai.v1.Asset> + getCreateAssetMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.CreateAssetRequest, com.google.cloud.visionai.v1.Asset> + getCreateAssetMethod; + if ((getCreateAssetMethod = WarehouseGrpc.getCreateAssetMethod) == null) { + synchronized (WarehouseGrpc.class) { + if ((getCreateAssetMethod = WarehouseGrpc.getCreateAssetMethod) == null) { + WarehouseGrpc.getCreateAssetMethod = + getCreateAssetMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateAsset")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.visionai.v1.CreateAssetRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.visionai.v1.Asset.getDefaultInstance())) + .setSchemaDescriptor(new WarehouseMethodDescriptorSupplier("CreateAsset")) + .build(); + } + } + } + return getCreateAssetMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.UpdateAssetRequest, com.google.cloud.visionai.v1.Asset> + getUpdateAssetMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdateAsset", + requestType = com.google.cloud.visionai.v1.UpdateAssetRequest.class, + responseType = com.google.cloud.visionai.v1.Asset.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.UpdateAssetRequest, com.google.cloud.visionai.v1.Asset> + getUpdateAssetMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.UpdateAssetRequest, com.google.cloud.visionai.v1.Asset> + getUpdateAssetMethod; + if ((getUpdateAssetMethod = WarehouseGrpc.getUpdateAssetMethod) == null) { + synchronized (WarehouseGrpc.class) { + if ((getUpdateAssetMethod = WarehouseGrpc.getUpdateAssetMethod) == null) { + WarehouseGrpc.getUpdateAssetMethod = + getUpdateAssetMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateAsset")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.visionai.v1.UpdateAssetRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.visionai.v1.Asset.getDefaultInstance())) + .setSchemaDescriptor(new WarehouseMethodDescriptorSupplier("UpdateAsset")) + .build(); + } + } + } + return getUpdateAssetMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.GetAssetRequest, com.google.cloud.visionai.v1.Asset> + getGetAssetMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetAsset", + requestType = com.google.cloud.visionai.v1.GetAssetRequest.class, + responseType = com.google.cloud.visionai.v1.Asset.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.GetAssetRequest, com.google.cloud.visionai.v1.Asset> + getGetAssetMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.GetAssetRequest, com.google.cloud.visionai.v1.Asset> + getGetAssetMethod; + if ((getGetAssetMethod = WarehouseGrpc.getGetAssetMethod) == null) { + synchronized (WarehouseGrpc.class) { + if ((getGetAssetMethod = WarehouseGrpc.getGetAssetMethod) == null) { + WarehouseGrpc.getGetAssetMethod = + getGetAssetMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetAsset")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.visionai.v1.GetAssetRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.visionai.v1.Asset.getDefaultInstance())) + .setSchemaDescriptor(new WarehouseMethodDescriptorSupplier("GetAsset")) + .build(); + } + } + } + return getGetAssetMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.ListAssetsRequest, + com.google.cloud.visionai.v1.ListAssetsResponse> + getListAssetsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListAssets", + requestType = com.google.cloud.visionai.v1.ListAssetsRequest.class, + responseType = com.google.cloud.visionai.v1.ListAssetsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.ListAssetsRequest, + com.google.cloud.visionai.v1.ListAssetsResponse> + getListAssetsMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.ListAssetsRequest, + com.google.cloud.visionai.v1.ListAssetsResponse> + getListAssetsMethod; + if ((getListAssetsMethod = WarehouseGrpc.getListAssetsMethod) == null) { + synchronized (WarehouseGrpc.class) { + if ((getListAssetsMethod = WarehouseGrpc.getListAssetsMethod) == null) { + WarehouseGrpc.getListAssetsMethod = + getListAssetsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListAssets")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.visionai.v1.ListAssetsRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.visionai.v1.ListAssetsResponse.getDefaultInstance())) + .setSchemaDescriptor(new WarehouseMethodDescriptorSupplier("ListAssets")) + .build(); + } + } + } + return getListAssetsMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.DeleteAssetRequest, com.google.longrunning.Operation> + getDeleteAssetMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteAsset", + requestType = com.google.cloud.visionai.v1.DeleteAssetRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.DeleteAssetRequest, com.google.longrunning.Operation> + getDeleteAssetMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.DeleteAssetRequest, com.google.longrunning.Operation> + getDeleteAssetMethod; + if ((getDeleteAssetMethod = WarehouseGrpc.getDeleteAssetMethod) == null) { + synchronized (WarehouseGrpc.class) { + if ((getDeleteAssetMethod = WarehouseGrpc.getDeleteAssetMethod) == null) { + WarehouseGrpc.getDeleteAssetMethod = + getDeleteAssetMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteAsset")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.visionai.v1.DeleteAssetRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor(new WarehouseMethodDescriptorSupplier("DeleteAsset")) + .build(); + } + } + } + return getDeleteAssetMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.UploadAssetRequest, com.google.longrunning.Operation> + getUploadAssetMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UploadAsset", + requestType = com.google.cloud.visionai.v1.UploadAssetRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.UploadAssetRequest, com.google.longrunning.Operation> + getUploadAssetMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.UploadAssetRequest, com.google.longrunning.Operation> + getUploadAssetMethod; + if ((getUploadAssetMethod = WarehouseGrpc.getUploadAssetMethod) == null) { + synchronized (WarehouseGrpc.class) { + if ((getUploadAssetMethod = WarehouseGrpc.getUploadAssetMethod) == null) { + WarehouseGrpc.getUploadAssetMethod = + getUploadAssetMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UploadAsset")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.visionai.v1.UploadAssetRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor(new WarehouseMethodDescriptorSupplier("UploadAsset")) + .build(); + } + } + } + return getUploadAssetMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.GenerateRetrievalUrlRequest, + com.google.cloud.visionai.v1.GenerateRetrievalUrlResponse> + getGenerateRetrievalUrlMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GenerateRetrievalUrl", + requestType = com.google.cloud.visionai.v1.GenerateRetrievalUrlRequest.class, + responseType = com.google.cloud.visionai.v1.GenerateRetrievalUrlResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.GenerateRetrievalUrlRequest, + com.google.cloud.visionai.v1.GenerateRetrievalUrlResponse> + getGenerateRetrievalUrlMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.GenerateRetrievalUrlRequest, + com.google.cloud.visionai.v1.GenerateRetrievalUrlResponse> + getGenerateRetrievalUrlMethod; + if ((getGenerateRetrievalUrlMethod = WarehouseGrpc.getGenerateRetrievalUrlMethod) == null) { + synchronized (WarehouseGrpc.class) { + if ((getGenerateRetrievalUrlMethod = WarehouseGrpc.getGenerateRetrievalUrlMethod) == null) { + WarehouseGrpc.getGenerateRetrievalUrlMethod = + getGenerateRetrievalUrlMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "GenerateRetrievalUrl")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.visionai.v1.GenerateRetrievalUrlRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.visionai.v1.GenerateRetrievalUrlResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new WarehouseMethodDescriptorSupplier("GenerateRetrievalUrl")) + .build(); + } + } + } + return getGenerateRetrievalUrlMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.AnalyzeAssetRequest, com.google.longrunning.Operation> + getAnalyzeAssetMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "AnalyzeAsset", + requestType = com.google.cloud.visionai.v1.AnalyzeAssetRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.AnalyzeAssetRequest, com.google.longrunning.Operation> + getAnalyzeAssetMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.AnalyzeAssetRequest, com.google.longrunning.Operation> + getAnalyzeAssetMethod; + if ((getAnalyzeAssetMethod = WarehouseGrpc.getAnalyzeAssetMethod) == null) { + synchronized (WarehouseGrpc.class) { + if ((getAnalyzeAssetMethod = WarehouseGrpc.getAnalyzeAssetMethod) == null) { + WarehouseGrpc.getAnalyzeAssetMethod = + getAnalyzeAssetMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "AnalyzeAsset")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.visionai.v1.AnalyzeAssetRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor(new WarehouseMethodDescriptorSupplier("AnalyzeAsset")) + .build(); + } + } + } + return getAnalyzeAssetMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.IndexAssetRequest, com.google.longrunning.Operation> + getIndexAssetMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "IndexAsset", + requestType = com.google.cloud.visionai.v1.IndexAssetRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.IndexAssetRequest, com.google.longrunning.Operation> + getIndexAssetMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.IndexAssetRequest, com.google.longrunning.Operation> + getIndexAssetMethod; + if ((getIndexAssetMethod = WarehouseGrpc.getIndexAssetMethod) == null) { + synchronized (WarehouseGrpc.class) { + if ((getIndexAssetMethod = WarehouseGrpc.getIndexAssetMethod) == null) { + WarehouseGrpc.getIndexAssetMethod = + getIndexAssetMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "IndexAsset")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.visionai.v1.IndexAssetRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor(new WarehouseMethodDescriptorSupplier("IndexAsset")) + .build(); + } + } + } + return getIndexAssetMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.RemoveIndexAssetRequest, com.google.longrunning.Operation> + getRemoveIndexAssetMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "RemoveIndexAsset", + requestType = com.google.cloud.visionai.v1.RemoveIndexAssetRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.RemoveIndexAssetRequest, com.google.longrunning.Operation> + getRemoveIndexAssetMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.RemoveIndexAssetRequest, com.google.longrunning.Operation> + getRemoveIndexAssetMethod; + if ((getRemoveIndexAssetMethod = WarehouseGrpc.getRemoveIndexAssetMethod) == null) { + synchronized (WarehouseGrpc.class) { + if ((getRemoveIndexAssetMethod = WarehouseGrpc.getRemoveIndexAssetMethod) == null) { + WarehouseGrpc.getRemoveIndexAssetMethod = + getRemoveIndexAssetMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "RemoveIndexAsset")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.visionai.v1.RemoveIndexAssetRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new WarehouseMethodDescriptorSupplier("RemoveIndexAsset")) + .build(); + } + } + } + return getRemoveIndexAssetMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.ViewIndexedAssetsRequest, + com.google.cloud.visionai.v1.ViewIndexedAssetsResponse> + getViewIndexedAssetsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ViewIndexedAssets", + requestType = com.google.cloud.visionai.v1.ViewIndexedAssetsRequest.class, + responseType = com.google.cloud.visionai.v1.ViewIndexedAssetsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.ViewIndexedAssetsRequest, + com.google.cloud.visionai.v1.ViewIndexedAssetsResponse> + getViewIndexedAssetsMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.ViewIndexedAssetsRequest, + com.google.cloud.visionai.v1.ViewIndexedAssetsResponse> + getViewIndexedAssetsMethod; + if ((getViewIndexedAssetsMethod = WarehouseGrpc.getViewIndexedAssetsMethod) == null) { + synchronized (WarehouseGrpc.class) { + if ((getViewIndexedAssetsMethod = WarehouseGrpc.getViewIndexedAssetsMethod) == null) { + WarehouseGrpc.getViewIndexedAssetsMethod = + getViewIndexedAssetsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ViewIndexedAssets")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.visionai.v1.ViewIndexedAssetsRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.visionai.v1.ViewIndexedAssetsResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new WarehouseMethodDescriptorSupplier("ViewIndexedAssets")) + .build(); + } + } + } + return getViewIndexedAssetsMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.CreateIndexRequest, com.google.longrunning.Operation> + getCreateIndexMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateIndex", + requestType = com.google.cloud.visionai.v1.CreateIndexRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.CreateIndexRequest, com.google.longrunning.Operation> + getCreateIndexMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.CreateIndexRequest, com.google.longrunning.Operation> + getCreateIndexMethod; + if ((getCreateIndexMethod = WarehouseGrpc.getCreateIndexMethod) == null) { + synchronized (WarehouseGrpc.class) { + if ((getCreateIndexMethod = WarehouseGrpc.getCreateIndexMethod) == null) { + WarehouseGrpc.getCreateIndexMethod = + getCreateIndexMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateIndex")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.visionai.v1.CreateIndexRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor(new WarehouseMethodDescriptorSupplier("CreateIndex")) + .build(); + } + } + } + return getCreateIndexMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.UpdateIndexRequest, com.google.longrunning.Operation> + getUpdateIndexMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdateIndex", + requestType = com.google.cloud.visionai.v1.UpdateIndexRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.UpdateIndexRequest, com.google.longrunning.Operation> + getUpdateIndexMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.UpdateIndexRequest, com.google.longrunning.Operation> + getUpdateIndexMethod; + if ((getUpdateIndexMethod = WarehouseGrpc.getUpdateIndexMethod) == null) { + synchronized (WarehouseGrpc.class) { + if ((getUpdateIndexMethod = WarehouseGrpc.getUpdateIndexMethod) == null) { + WarehouseGrpc.getUpdateIndexMethod = + getUpdateIndexMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateIndex")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.visionai.v1.UpdateIndexRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor(new WarehouseMethodDescriptorSupplier("UpdateIndex")) + .build(); + } + } + } + return getUpdateIndexMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.GetIndexRequest, com.google.cloud.visionai.v1.Index> + getGetIndexMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetIndex", + requestType = com.google.cloud.visionai.v1.GetIndexRequest.class, + responseType = com.google.cloud.visionai.v1.Index.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.GetIndexRequest, com.google.cloud.visionai.v1.Index> + getGetIndexMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.GetIndexRequest, com.google.cloud.visionai.v1.Index> + getGetIndexMethod; + if ((getGetIndexMethod = WarehouseGrpc.getGetIndexMethod) == null) { + synchronized (WarehouseGrpc.class) { + if ((getGetIndexMethod = WarehouseGrpc.getGetIndexMethod) == null) { + WarehouseGrpc.getGetIndexMethod = + getGetIndexMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetIndex")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.visionai.v1.GetIndexRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.visionai.v1.Index.getDefaultInstance())) + .setSchemaDescriptor(new WarehouseMethodDescriptorSupplier("GetIndex")) + .build(); + } + } + } + return getGetIndexMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.ListIndexesRequest, + com.google.cloud.visionai.v1.ListIndexesResponse> + getListIndexesMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListIndexes", + requestType = com.google.cloud.visionai.v1.ListIndexesRequest.class, + responseType = com.google.cloud.visionai.v1.ListIndexesResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.ListIndexesRequest, + com.google.cloud.visionai.v1.ListIndexesResponse> + getListIndexesMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.ListIndexesRequest, + com.google.cloud.visionai.v1.ListIndexesResponse> + getListIndexesMethod; + if ((getListIndexesMethod = WarehouseGrpc.getListIndexesMethod) == null) { + synchronized (WarehouseGrpc.class) { + if ((getListIndexesMethod = WarehouseGrpc.getListIndexesMethod) == null) { + WarehouseGrpc.getListIndexesMethod = + getListIndexesMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListIndexes")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.visionai.v1.ListIndexesRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.visionai.v1.ListIndexesResponse + .getDefaultInstance())) + .setSchemaDescriptor(new WarehouseMethodDescriptorSupplier("ListIndexes")) + .build(); + } + } + } + return getListIndexesMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.DeleteIndexRequest, com.google.longrunning.Operation> + getDeleteIndexMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteIndex", + requestType = com.google.cloud.visionai.v1.DeleteIndexRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.DeleteIndexRequest, com.google.longrunning.Operation> + getDeleteIndexMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.DeleteIndexRequest, com.google.longrunning.Operation> + getDeleteIndexMethod; + if ((getDeleteIndexMethod = WarehouseGrpc.getDeleteIndexMethod) == null) { + synchronized (WarehouseGrpc.class) { + if ((getDeleteIndexMethod = WarehouseGrpc.getDeleteIndexMethod) == null) { + WarehouseGrpc.getDeleteIndexMethod = + getDeleteIndexMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteIndex")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.visionai.v1.DeleteIndexRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor(new WarehouseMethodDescriptorSupplier("DeleteIndex")) + .build(); + } + } + } + return getDeleteIndexMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.CreateCorpusRequest, com.google.longrunning.Operation> + getCreateCorpusMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateCorpus", + requestType = com.google.cloud.visionai.v1.CreateCorpusRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.CreateCorpusRequest, com.google.longrunning.Operation> + getCreateCorpusMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.CreateCorpusRequest, com.google.longrunning.Operation> + getCreateCorpusMethod; + if ((getCreateCorpusMethod = WarehouseGrpc.getCreateCorpusMethod) == null) { + synchronized (WarehouseGrpc.class) { + if ((getCreateCorpusMethod = WarehouseGrpc.getCreateCorpusMethod) == null) { + WarehouseGrpc.getCreateCorpusMethod = + getCreateCorpusMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateCorpus")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.visionai.v1.CreateCorpusRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor(new WarehouseMethodDescriptorSupplier("CreateCorpus")) + .build(); + } + } + } + return getCreateCorpusMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.GetCorpusRequest, com.google.cloud.visionai.v1.Corpus> + getGetCorpusMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetCorpus", + requestType = com.google.cloud.visionai.v1.GetCorpusRequest.class, + responseType = com.google.cloud.visionai.v1.Corpus.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.GetCorpusRequest, com.google.cloud.visionai.v1.Corpus> + getGetCorpusMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.GetCorpusRequest, com.google.cloud.visionai.v1.Corpus> + getGetCorpusMethod; + if ((getGetCorpusMethod = WarehouseGrpc.getGetCorpusMethod) == null) { + synchronized (WarehouseGrpc.class) { + if ((getGetCorpusMethod = WarehouseGrpc.getGetCorpusMethod) == null) { + WarehouseGrpc.getGetCorpusMethod = + getGetCorpusMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetCorpus")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.visionai.v1.GetCorpusRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.visionai.v1.Corpus.getDefaultInstance())) + .setSchemaDescriptor(new WarehouseMethodDescriptorSupplier("GetCorpus")) + .build(); + } + } + } + return getGetCorpusMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.UpdateCorpusRequest, com.google.cloud.visionai.v1.Corpus> + getUpdateCorpusMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdateCorpus", + requestType = com.google.cloud.visionai.v1.UpdateCorpusRequest.class, + responseType = com.google.cloud.visionai.v1.Corpus.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.UpdateCorpusRequest, com.google.cloud.visionai.v1.Corpus> + getUpdateCorpusMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.UpdateCorpusRequest, com.google.cloud.visionai.v1.Corpus> + getUpdateCorpusMethod; + if ((getUpdateCorpusMethod = WarehouseGrpc.getUpdateCorpusMethod) == null) { + synchronized (WarehouseGrpc.class) { + if ((getUpdateCorpusMethod = WarehouseGrpc.getUpdateCorpusMethod) == null) { + WarehouseGrpc.getUpdateCorpusMethod = + getUpdateCorpusMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateCorpus")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.visionai.v1.UpdateCorpusRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.visionai.v1.Corpus.getDefaultInstance())) + .setSchemaDescriptor(new WarehouseMethodDescriptorSupplier("UpdateCorpus")) + .build(); + } + } + } + return getUpdateCorpusMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.ListCorporaRequest, + com.google.cloud.visionai.v1.ListCorporaResponse> + getListCorporaMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListCorpora", + requestType = com.google.cloud.visionai.v1.ListCorporaRequest.class, + responseType = com.google.cloud.visionai.v1.ListCorporaResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.ListCorporaRequest, + com.google.cloud.visionai.v1.ListCorporaResponse> + getListCorporaMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.ListCorporaRequest, + com.google.cloud.visionai.v1.ListCorporaResponse> + getListCorporaMethod; + if ((getListCorporaMethod = WarehouseGrpc.getListCorporaMethod) == null) { + synchronized (WarehouseGrpc.class) { + if ((getListCorporaMethod = WarehouseGrpc.getListCorporaMethod) == null) { + WarehouseGrpc.getListCorporaMethod = + getListCorporaMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListCorpora")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.visionai.v1.ListCorporaRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.visionai.v1.ListCorporaResponse + .getDefaultInstance())) + .setSchemaDescriptor(new WarehouseMethodDescriptorSupplier("ListCorpora")) + .build(); + } + } + } + return getListCorporaMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.DeleteCorpusRequest, com.google.protobuf.Empty> + getDeleteCorpusMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteCorpus", + requestType = com.google.cloud.visionai.v1.DeleteCorpusRequest.class, + responseType = com.google.protobuf.Empty.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.DeleteCorpusRequest, com.google.protobuf.Empty> + getDeleteCorpusMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.DeleteCorpusRequest, com.google.protobuf.Empty> + getDeleteCorpusMethod; + if ((getDeleteCorpusMethod = WarehouseGrpc.getDeleteCorpusMethod) == null) { + synchronized (WarehouseGrpc.class) { + if ((getDeleteCorpusMethod = WarehouseGrpc.getDeleteCorpusMethod) == null) { + WarehouseGrpc.getDeleteCorpusMethod = + getDeleteCorpusMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteCorpus")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.visionai.v1.DeleteCorpusRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.protobuf.Empty.getDefaultInstance())) + .setSchemaDescriptor(new WarehouseMethodDescriptorSupplier("DeleteCorpus")) + .build(); + } + } + } + return getDeleteCorpusMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.AnalyzeCorpusRequest, com.google.longrunning.Operation> + getAnalyzeCorpusMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "AnalyzeCorpus", + requestType = com.google.cloud.visionai.v1.AnalyzeCorpusRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.AnalyzeCorpusRequest, com.google.longrunning.Operation> + getAnalyzeCorpusMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.AnalyzeCorpusRequest, com.google.longrunning.Operation> + getAnalyzeCorpusMethod; + if ((getAnalyzeCorpusMethod = WarehouseGrpc.getAnalyzeCorpusMethod) == null) { + synchronized (WarehouseGrpc.class) { + if ((getAnalyzeCorpusMethod = WarehouseGrpc.getAnalyzeCorpusMethod) == null) { + WarehouseGrpc.getAnalyzeCorpusMethod = + getAnalyzeCorpusMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "AnalyzeCorpus")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.visionai.v1.AnalyzeCorpusRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor(new WarehouseMethodDescriptorSupplier("AnalyzeCorpus")) + .build(); + } + } + } + return getAnalyzeCorpusMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.CreateDataSchemaRequest, + com.google.cloud.visionai.v1.DataSchema> + getCreateDataSchemaMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateDataSchema", + requestType = com.google.cloud.visionai.v1.CreateDataSchemaRequest.class, + responseType = com.google.cloud.visionai.v1.DataSchema.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.CreateDataSchemaRequest, + com.google.cloud.visionai.v1.DataSchema> + getCreateDataSchemaMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.CreateDataSchemaRequest, + com.google.cloud.visionai.v1.DataSchema> + getCreateDataSchemaMethod; + if ((getCreateDataSchemaMethod = WarehouseGrpc.getCreateDataSchemaMethod) == null) { + synchronized (WarehouseGrpc.class) { + if ((getCreateDataSchemaMethod = WarehouseGrpc.getCreateDataSchemaMethod) == null) { + WarehouseGrpc.getCreateDataSchemaMethod = + getCreateDataSchemaMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateDataSchema")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.visionai.v1.CreateDataSchemaRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.visionai.v1.DataSchema.getDefaultInstance())) + .setSchemaDescriptor( + new WarehouseMethodDescriptorSupplier("CreateDataSchema")) + .build(); + } + } + } + return getCreateDataSchemaMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.UpdateDataSchemaRequest, + com.google.cloud.visionai.v1.DataSchema> + getUpdateDataSchemaMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdateDataSchema", + requestType = com.google.cloud.visionai.v1.UpdateDataSchemaRequest.class, + responseType = com.google.cloud.visionai.v1.DataSchema.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.UpdateDataSchemaRequest, + com.google.cloud.visionai.v1.DataSchema> + getUpdateDataSchemaMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.UpdateDataSchemaRequest, + com.google.cloud.visionai.v1.DataSchema> + getUpdateDataSchemaMethod; + if ((getUpdateDataSchemaMethod = WarehouseGrpc.getUpdateDataSchemaMethod) == null) { + synchronized (WarehouseGrpc.class) { + if ((getUpdateDataSchemaMethod = WarehouseGrpc.getUpdateDataSchemaMethod) == null) { + WarehouseGrpc.getUpdateDataSchemaMethod = + getUpdateDataSchemaMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateDataSchema")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.visionai.v1.UpdateDataSchemaRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.visionai.v1.DataSchema.getDefaultInstance())) + .setSchemaDescriptor( + new WarehouseMethodDescriptorSupplier("UpdateDataSchema")) + .build(); + } + } + } + return getUpdateDataSchemaMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.GetDataSchemaRequest, + com.google.cloud.visionai.v1.DataSchema> + getGetDataSchemaMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetDataSchema", + requestType = com.google.cloud.visionai.v1.GetDataSchemaRequest.class, + responseType = com.google.cloud.visionai.v1.DataSchema.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.GetDataSchemaRequest, + com.google.cloud.visionai.v1.DataSchema> + getGetDataSchemaMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.GetDataSchemaRequest, + com.google.cloud.visionai.v1.DataSchema> + getGetDataSchemaMethod; + if ((getGetDataSchemaMethod = WarehouseGrpc.getGetDataSchemaMethod) == null) { + synchronized (WarehouseGrpc.class) { + if ((getGetDataSchemaMethod = WarehouseGrpc.getGetDataSchemaMethod) == null) { + WarehouseGrpc.getGetDataSchemaMethod = + getGetDataSchemaMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetDataSchema")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.visionai.v1.GetDataSchemaRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.visionai.v1.DataSchema.getDefaultInstance())) + .setSchemaDescriptor(new WarehouseMethodDescriptorSupplier("GetDataSchema")) + .build(); + } + } + } + return getGetDataSchemaMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.DeleteDataSchemaRequest, com.google.protobuf.Empty> + getDeleteDataSchemaMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteDataSchema", + requestType = com.google.cloud.visionai.v1.DeleteDataSchemaRequest.class, + responseType = com.google.protobuf.Empty.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.DeleteDataSchemaRequest, com.google.protobuf.Empty> + getDeleteDataSchemaMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.DeleteDataSchemaRequest, com.google.protobuf.Empty> + getDeleteDataSchemaMethod; + if ((getDeleteDataSchemaMethod = WarehouseGrpc.getDeleteDataSchemaMethod) == null) { + synchronized (WarehouseGrpc.class) { + if ((getDeleteDataSchemaMethod = WarehouseGrpc.getDeleteDataSchemaMethod) == null) { + WarehouseGrpc.getDeleteDataSchemaMethod = + getDeleteDataSchemaMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteDataSchema")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.visionai.v1.DeleteDataSchemaRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.protobuf.Empty.getDefaultInstance())) + .setSchemaDescriptor( + new WarehouseMethodDescriptorSupplier("DeleteDataSchema")) + .build(); + } + } + } + return getDeleteDataSchemaMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.ListDataSchemasRequest, + com.google.cloud.visionai.v1.ListDataSchemasResponse> + getListDataSchemasMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListDataSchemas", + requestType = com.google.cloud.visionai.v1.ListDataSchemasRequest.class, + responseType = com.google.cloud.visionai.v1.ListDataSchemasResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.ListDataSchemasRequest, + com.google.cloud.visionai.v1.ListDataSchemasResponse> + getListDataSchemasMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.ListDataSchemasRequest, + com.google.cloud.visionai.v1.ListDataSchemasResponse> + getListDataSchemasMethod; + if ((getListDataSchemasMethod = WarehouseGrpc.getListDataSchemasMethod) == null) { + synchronized (WarehouseGrpc.class) { + if ((getListDataSchemasMethod = WarehouseGrpc.getListDataSchemasMethod) == null) { + WarehouseGrpc.getListDataSchemasMethod = + getListDataSchemasMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListDataSchemas")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.visionai.v1.ListDataSchemasRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.visionai.v1.ListDataSchemasResponse + .getDefaultInstance())) + .setSchemaDescriptor(new WarehouseMethodDescriptorSupplier("ListDataSchemas")) + .build(); + } + } + } + return getListDataSchemasMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.CreateAnnotationRequest, + com.google.cloud.visionai.v1.Annotation> + getCreateAnnotationMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateAnnotation", + requestType = com.google.cloud.visionai.v1.CreateAnnotationRequest.class, + responseType = com.google.cloud.visionai.v1.Annotation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.CreateAnnotationRequest, + com.google.cloud.visionai.v1.Annotation> + getCreateAnnotationMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.CreateAnnotationRequest, + com.google.cloud.visionai.v1.Annotation> + getCreateAnnotationMethod; + if ((getCreateAnnotationMethod = WarehouseGrpc.getCreateAnnotationMethod) == null) { + synchronized (WarehouseGrpc.class) { + if ((getCreateAnnotationMethod = WarehouseGrpc.getCreateAnnotationMethod) == null) { + WarehouseGrpc.getCreateAnnotationMethod = + getCreateAnnotationMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateAnnotation")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.visionai.v1.CreateAnnotationRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.visionai.v1.Annotation.getDefaultInstance())) + .setSchemaDescriptor( + new WarehouseMethodDescriptorSupplier("CreateAnnotation")) + .build(); + } + } + } + return getCreateAnnotationMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.GetAnnotationRequest, + com.google.cloud.visionai.v1.Annotation> + getGetAnnotationMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetAnnotation", + requestType = com.google.cloud.visionai.v1.GetAnnotationRequest.class, + responseType = com.google.cloud.visionai.v1.Annotation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.GetAnnotationRequest, + com.google.cloud.visionai.v1.Annotation> + getGetAnnotationMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.GetAnnotationRequest, + com.google.cloud.visionai.v1.Annotation> + getGetAnnotationMethod; + if ((getGetAnnotationMethod = WarehouseGrpc.getGetAnnotationMethod) == null) { + synchronized (WarehouseGrpc.class) { + if ((getGetAnnotationMethod = WarehouseGrpc.getGetAnnotationMethod) == null) { + WarehouseGrpc.getGetAnnotationMethod = + getGetAnnotationMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetAnnotation")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.visionai.v1.GetAnnotationRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.visionai.v1.Annotation.getDefaultInstance())) + .setSchemaDescriptor(new WarehouseMethodDescriptorSupplier("GetAnnotation")) + .build(); + } + } + } + return getGetAnnotationMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.ListAnnotationsRequest, + com.google.cloud.visionai.v1.ListAnnotationsResponse> + getListAnnotationsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListAnnotations", + requestType = com.google.cloud.visionai.v1.ListAnnotationsRequest.class, + responseType = com.google.cloud.visionai.v1.ListAnnotationsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.ListAnnotationsRequest, + com.google.cloud.visionai.v1.ListAnnotationsResponse> + getListAnnotationsMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.ListAnnotationsRequest, + com.google.cloud.visionai.v1.ListAnnotationsResponse> + getListAnnotationsMethod; + if ((getListAnnotationsMethod = WarehouseGrpc.getListAnnotationsMethod) == null) { + synchronized (WarehouseGrpc.class) { + if ((getListAnnotationsMethod = WarehouseGrpc.getListAnnotationsMethod) == null) { + WarehouseGrpc.getListAnnotationsMethod = + getListAnnotationsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListAnnotations")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.visionai.v1.ListAnnotationsRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.visionai.v1.ListAnnotationsResponse + .getDefaultInstance())) + .setSchemaDescriptor(new WarehouseMethodDescriptorSupplier("ListAnnotations")) + .build(); + } + } + } + return getListAnnotationsMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.UpdateAnnotationRequest, + com.google.cloud.visionai.v1.Annotation> + getUpdateAnnotationMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdateAnnotation", + requestType = com.google.cloud.visionai.v1.UpdateAnnotationRequest.class, + responseType = com.google.cloud.visionai.v1.Annotation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.UpdateAnnotationRequest, + com.google.cloud.visionai.v1.Annotation> + getUpdateAnnotationMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.UpdateAnnotationRequest, + com.google.cloud.visionai.v1.Annotation> + getUpdateAnnotationMethod; + if ((getUpdateAnnotationMethod = WarehouseGrpc.getUpdateAnnotationMethod) == null) { + synchronized (WarehouseGrpc.class) { + if ((getUpdateAnnotationMethod = WarehouseGrpc.getUpdateAnnotationMethod) == null) { + WarehouseGrpc.getUpdateAnnotationMethod = + getUpdateAnnotationMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateAnnotation")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.visionai.v1.UpdateAnnotationRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.visionai.v1.Annotation.getDefaultInstance())) + .setSchemaDescriptor( + new WarehouseMethodDescriptorSupplier("UpdateAnnotation")) + .build(); + } + } + } + return getUpdateAnnotationMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.DeleteAnnotationRequest, com.google.protobuf.Empty> + getDeleteAnnotationMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteAnnotation", + requestType = com.google.cloud.visionai.v1.DeleteAnnotationRequest.class, + responseType = com.google.protobuf.Empty.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.DeleteAnnotationRequest, com.google.protobuf.Empty> + getDeleteAnnotationMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.DeleteAnnotationRequest, com.google.protobuf.Empty> + getDeleteAnnotationMethod; + if ((getDeleteAnnotationMethod = WarehouseGrpc.getDeleteAnnotationMethod) == null) { + synchronized (WarehouseGrpc.class) { + if ((getDeleteAnnotationMethod = WarehouseGrpc.getDeleteAnnotationMethod) == null) { + WarehouseGrpc.getDeleteAnnotationMethod = + getDeleteAnnotationMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteAnnotation")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.visionai.v1.DeleteAnnotationRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.protobuf.Empty.getDefaultInstance())) + .setSchemaDescriptor( + new WarehouseMethodDescriptorSupplier("DeleteAnnotation")) + .build(); + } + } + } + return getDeleteAnnotationMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.IngestAssetRequest, + com.google.cloud.visionai.v1.IngestAssetResponse> + getIngestAssetMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "IngestAsset", + requestType = com.google.cloud.visionai.v1.IngestAssetRequest.class, + responseType = com.google.cloud.visionai.v1.IngestAssetResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.BIDI_STREAMING) + public static io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.IngestAssetRequest, + com.google.cloud.visionai.v1.IngestAssetResponse> + getIngestAssetMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.IngestAssetRequest, + com.google.cloud.visionai.v1.IngestAssetResponse> + getIngestAssetMethod; + if ((getIngestAssetMethod = WarehouseGrpc.getIngestAssetMethod) == null) { + synchronized (WarehouseGrpc.class) { + if ((getIngestAssetMethod = WarehouseGrpc.getIngestAssetMethod) == null) { + WarehouseGrpc.getIngestAssetMethod = + getIngestAssetMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.BIDI_STREAMING) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "IngestAsset")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.visionai.v1.IngestAssetRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.visionai.v1.IngestAssetResponse + .getDefaultInstance())) + .setSchemaDescriptor(new WarehouseMethodDescriptorSupplier("IngestAsset")) + .build(); + } + } + } + return getIngestAssetMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.ClipAssetRequest, + com.google.cloud.visionai.v1.ClipAssetResponse> + getClipAssetMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ClipAsset", + requestType = com.google.cloud.visionai.v1.ClipAssetRequest.class, + responseType = com.google.cloud.visionai.v1.ClipAssetResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.ClipAssetRequest, + com.google.cloud.visionai.v1.ClipAssetResponse> + getClipAssetMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.ClipAssetRequest, + com.google.cloud.visionai.v1.ClipAssetResponse> + getClipAssetMethod; + if ((getClipAssetMethod = WarehouseGrpc.getClipAssetMethod) == null) { + synchronized (WarehouseGrpc.class) { + if ((getClipAssetMethod = WarehouseGrpc.getClipAssetMethod) == null) { + WarehouseGrpc.getClipAssetMethod = + getClipAssetMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ClipAsset")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.visionai.v1.ClipAssetRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.visionai.v1.ClipAssetResponse.getDefaultInstance())) + .setSchemaDescriptor(new WarehouseMethodDescriptorSupplier("ClipAsset")) + .build(); + } + } + } + return getClipAssetMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.GenerateHlsUriRequest, + com.google.cloud.visionai.v1.GenerateHlsUriResponse> + getGenerateHlsUriMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GenerateHlsUri", + requestType = com.google.cloud.visionai.v1.GenerateHlsUriRequest.class, + responseType = com.google.cloud.visionai.v1.GenerateHlsUriResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.GenerateHlsUriRequest, + com.google.cloud.visionai.v1.GenerateHlsUriResponse> + getGenerateHlsUriMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.GenerateHlsUriRequest, + com.google.cloud.visionai.v1.GenerateHlsUriResponse> + getGenerateHlsUriMethod; + if ((getGenerateHlsUriMethod = WarehouseGrpc.getGenerateHlsUriMethod) == null) { + synchronized (WarehouseGrpc.class) { + if ((getGenerateHlsUriMethod = WarehouseGrpc.getGenerateHlsUriMethod) == null) { + WarehouseGrpc.getGenerateHlsUriMethod = + getGenerateHlsUriMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GenerateHlsUri")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.visionai.v1.GenerateHlsUriRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.visionai.v1.GenerateHlsUriResponse + .getDefaultInstance())) + .setSchemaDescriptor(new WarehouseMethodDescriptorSupplier("GenerateHlsUri")) + .build(); + } + } + } + return getGenerateHlsUriMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.ImportAssetsRequest, com.google.longrunning.Operation> + getImportAssetsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ImportAssets", + requestType = com.google.cloud.visionai.v1.ImportAssetsRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.ImportAssetsRequest, com.google.longrunning.Operation> + getImportAssetsMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.ImportAssetsRequest, com.google.longrunning.Operation> + getImportAssetsMethod; + if ((getImportAssetsMethod = WarehouseGrpc.getImportAssetsMethod) == null) { + synchronized (WarehouseGrpc.class) { + if ((getImportAssetsMethod = WarehouseGrpc.getImportAssetsMethod) == null) { + WarehouseGrpc.getImportAssetsMethod = + getImportAssetsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ImportAssets")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.visionai.v1.ImportAssetsRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor(new WarehouseMethodDescriptorSupplier("ImportAssets")) + .build(); + } + } + } + return getImportAssetsMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.CreateSearchConfigRequest, + com.google.cloud.visionai.v1.SearchConfig> + getCreateSearchConfigMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateSearchConfig", + requestType = com.google.cloud.visionai.v1.CreateSearchConfigRequest.class, + responseType = com.google.cloud.visionai.v1.SearchConfig.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.CreateSearchConfigRequest, + com.google.cloud.visionai.v1.SearchConfig> + getCreateSearchConfigMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.CreateSearchConfigRequest, + com.google.cloud.visionai.v1.SearchConfig> + getCreateSearchConfigMethod; + if ((getCreateSearchConfigMethod = WarehouseGrpc.getCreateSearchConfigMethod) == null) { + synchronized (WarehouseGrpc.class) { + if ((getCreateSearchConfigMethod = WarehouseGrpc.getCreateSearchConfigMethod) == null) { + WarehouseGrpc.getCreateSearchConfigMethod = + getCreateSearchConfigMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateSearchConfig")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.visionai.v1.CreateSearchConfigRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.visionai.v1.SearchConfig.getDefaultInstance())) + .setSchemaDescriptor( + new WarehouseMethodDescriptorSupplier("CreateSearchConfig")) + .build(); + } + } + } + return getCreateSearchConfigMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.UpdateSearchConfigRequest, + com.google.cloud.visionai.v1.SearchConfig> + getUpdateSearchConfigMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdateSearchConfig", + requestType = com.google.cloud.visionai.v1.UpdateSearchConfigRequest.class, + responseType = com.google.cloud.visionai.v1.SearchConfig.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.UpdateSearchConfigRequest, + com.google.cloud.visionai.v1.SearchConfig> + getUpdateSearchConfigMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.UpdateSearchConfigRequest, + com.google.cloud.visionai.v1.SearchConfig> + getUpdateSearchConfigMethod; + if ((getUpdateSearchConfigMethod = WarehouseGrpc.getUpdateSearchConfigMethod) == null) { + synchronized (WarehouseGrpc.class) { + if ((getUpdateSearchConfigMethod = WarehouseGrpc.getUpdateSearchConfigMethod) == null) { + WarehouseGrpc.getUpdateSearchConfigMethod = + getUpdateSearchConfigMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateSearchConfig")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.visionai.v1.UpdateSearchConfigRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.visionai.v1.SearchConfig.getDefaultInstance())) + .setSchemaDescriptor( + new WarehouseMethodDescriptorSupplier("UpdateSearchConfig")) + .build(); + } + } + } + return getUpdateSearchConfigMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.GetSearchConfigRequest, + com.google.cloud.visionai.v1.SearchConfig> + getGetSearchConfigMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetSearchConfig", + requestType = com.google.cloud.visionai.v1.GetSearchConfigRequest.class, + responseType = com.google.cloud.visionai.v1.SearchConfig.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.GetSearchConfigRequest, + com.google.cloud.visionai.v1.SearchConfig> + getGetSearchConfigMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.GetSearchConfigRequest, + com.google.cloud.visionai.v1.SearchConfig> + getGetSearchConfigMethod; + if ((getGetSearchConfigMethod = WarehouseGrpc.getGetSearchConfigMethod) == null) { + synchronized (WarehouseGrpc.class) { + if ((getGetSearchConfigMethod = WarehouseGrpc.getGetSearchConfigMethod) == null) { + WarehouseGrpc.getGetSearchConfigMethod = + getGetSearchConfigMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetSearchConfig")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.visionai.v1.GetSearchConfigRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.visionai.v1.SearchConfig.getDefaultInstance())) + .setSchemaDescriptor(new WarehouseMethodDescriptorSupplier("GetSearchConfig")) + .build(); + } + } + } + return getGetSearchConfigMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.DeleteSearchConfigRequest, com.google.protobuf.Empty> + getDeleteSearchConfigMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteSearchConfig", + requestType = com.google.cloud.visionai.v1.DeleteSearchConfigRequest.class, + responseType = com.google.protobuf.Empty.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.DeleteSearchConfigRequest, com.google.protobuf.Empty> + getDeleteSearchConfigMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.DeleteSearchConfigRequest, com.google.protobuf.Empty> + getDeleteSearchConfigMethod; + if ((getDeleteSearchConfigMethod = WarehouseGrpc.getDeleteSearchConfigMethod) == null) { + synchronized (WarehouseGrpc.class) { + if ((getDeleteSearchConfigMethod = WarehouseGrpc.getDeleteSearchConfigMethod) == null) { + WarehouseGrpc.getDeleteSearchConfigMethod = + getDeleteSearchConfigMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteSearchConfig")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.visionai.v1.DeleteSearchConfigRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.protobuf.Empty.getDefaultInstance())) + .setSchemaDescriptor( + new WarehouseMethodDescriptorSupplier("DeleteSearchConfig")) + .build(); + } + } + } + return getDeleteSearchConfigMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.ListSearchConfigsRequest, + com.google.cloud.visionai.v1.ListSearchConfigsResponse> + getListSearchConfigsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListSearchConfigs", + requestType = com.google.cloud.visionai.v1.ListSearchConfigsRequest.class, + responseType = com.google.cloud.visionai.v1.ListSearchConfigsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.ListSearchConfigsRequest, + com.google.cloud.visionai.v1.ListSearchConfigsResponse> + getListSearchConfigsMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.ListSearchConfigsRequest, + com.google.cloud.visionai.v1.ListSearchConfigsResponse> + getListSearchConfigsMethod; + if ((getListSearchConfigsMethod = WarehouseGrpc.getListSearchConfigsMethod) == null) { + synchronized (WarehouseGrpc.class) { + if ((getListSearchConfigsMethod = WarehouseGrpc.getListSearchConfigsMethod) == null) { + WarehouseGrpc.getListSearchConfigsMethod = + getListSearchConfigsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListSearchConfigs")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.visionai.v1.ListSearchConfigsRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.visionai.v1.ListSearchConfigsResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new WarehouseMethodDescriptorSupplier("ListSearchConfigs")) + .build(); + } + } + } + return getListSearchConfigsMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.CreateSearchHypernymRequest, + com.google.cloud.visionai.v1.SearchHypernym> + getCreateSearchHypernymMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateSearchHypernym", + requestType = com.google.cloud.visionai.v1.CreateSearchHypernymRequest.class, + responseType = com.google.cloud.visionai.v1.SearchHypernym.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.CreateSearchHypernymRequest, + com.google.cloud.visionai.v1.SearchHypernym> + getCreateSearchHypernymMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.CreateSearchHypernymRequest, + com.google.cloud.visionai.v1.SearchHypernym> + getCreateSearchHypernymMethod; + if ((getCreateSearchHypernymMethod = WarehouseGrpc.getCreateSearchHypernymMethod) == null) { + synchronized (WarehouseGrpc.class) { + if ((getCreateSearchHypernymMethod = WarehouseGrpc.getCreateSearchHypernymMethod) == null) { + WarehouseGrpc.getCreateSearchHypernymMethod = + getCreateSearchHypernymMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "CreateSearchHypernym")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.visionai.v1.CreateSearchHypernymRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.visionai.v1.SearchHypernym.getDefaultInstance())) + .setSchemaDescriptor( + new WarehouseMethodDescriptorSupplier("CreateSearchHypernym")) + .build(); + } + } + } + return getCreateSearchHypernymMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.UpdateSearchHypernymRequest, + com.google.cloud.visionai.v1.SearchHypernym> + getUpdateSearchHypernymMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdateSearchHypernym", + requestType = com.google.cloud.visionai.v1.UpdateSearchHypernymRequest.class, + responseType = com.google.cloud.visionai.v1.SearchHypernym.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.UpdateSearchHypernymRequest, + com.google.cloud.visionai.v1.SearchHypernym> + getUpdateSearchHypernymMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.UpdateSearchHypernymRequest, + com.google.cloud.visionai.v1.SearchHypernym> + getUpdateSearchHypernymMethod; + if ((getUpdateSearchHypernymMethod = WarehouseGrpc.getUpdateSearchHypernymMethod) == null) { + synchronized (WarehouseGrpc.class) { + if ((getUpdateSearchHypernymMethod = WarehouseGrpc.getUpdateSearchHypernymMethod) == null) { + WarehouseGrpc.getUpdateSearchHypernymMethod = + getUpdateSearchHypernymMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "UpdateSearchHypernym")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.visionai.v1.UpdateSearchHypernymRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.visionai.v1.SearchHypernym.getDefaultInstance())) + .setSchemaDescriptor( + new WarehouseMethodDescriptorSupplier("UpdateSearchHypernym")) + .build(); + } + } + } + return getUpdateSearchHypernymMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.GetSearchHypernymRequest, + com.google.cloud.visionai.v1.SearchHypernym> + getGetSearchHypernymMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetSearchHypernym", + requestType = com.google.cloud.visionai.v1.GetSearchHypernymRequest.class, + responseType = com.google.cloud.visionai.v1.SearchHypernym.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.GetSearchHypernymRequest, + com.google.cloud.visionai.v1.SearchHypernym> + getGetSearchHypernymMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.GetSearchHypernymRequest, + com.google.cloud.visionai.v1.SearchHypernym> + getGetSearchHypernymMethod; + if ((getGetSearchHypernymMethod = WarehouseGrpc.getGetSearchHypernymMethod) == null) { + synchronized (WarehouseGrpc.class) { + if ((getGetSearchHypernymMethod = WarehouseGrpc.getGetSearchHypernymMethod) == null) { + WarehouseGrpc.getGetSearchHypernymMethod = + getGetSearchHypernymMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetSearchHypernym")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.visionai.v1.GetSearchHypernymRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.visionai.v1.SearchHypernym.getDefaultInstance())) + .setSchemaDescriptor( + new WarehouseMethodDescriptorSupplier("GetSearchHypernym")) + .build(); + } + } + } + return getGetSearchHypernymMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.DeleteSearchHypernymRequest, com.google.protobuf.Empty> + getDeleteSearchHypernymMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteSearchHypernym", + requestType = com.google.cloud.visionai.v1.DeleteSearchHypernymRequest.class, + responseType = com.google.protobuf.Empty.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.DeleteSearchHypernymRequest, com.google.protobuf.Empty> + getDeleteSearchHypernymMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.DeleteSearchHypernymRequest, com.google.protobuf.Empty> + getDeleteSearchHypernymMethod; + if ((getDeleteSearchHypernymMethod = WarehouseGrpc.getDeleteSearchHypernymMethod) == null) { + synchronized (WarehouseGrpc.class) { + if ((getDeleteSearchHypernymMethod = WarehouseGrpc.getDeleteSearchHypernymMethod) == null) { + WarehouseGrpc.getDeleteSearchHypernymMethod = + getDeleteSearchHypernymMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "DeleteSearchHypernym")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.visionai.v1.DeleteSearchHypernymRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.protobuf.Empty.getDefaultInstance())) + .setSchemaDescriptor( + new WarehouseMethodDescriptorSupplier("DeleteSearchHypernym")) + .build(); + } + } + } + return getDeleteSearchHypernymMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.ListSearchHypernymsRequest, + com.google.cloud.visionai.v1.ListSearchHypernymsResponse> + getListSearchHypernymsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListSearchHypernyms", + requestType = com.google.cloud.visionai.v1.ListSearchHypernymsRequest.class, + responseType = com.google.cloud.visionai.v1.ListSearchHypernymsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.ListSearchHypernymsRequest, + com.google.cloud.visionai.v1.ListSearchHypernymsResponse> + getListSearchHypernymsMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.ListSearchHypernymsRequest, + com.google.cloud.visionai.v1.ListSearchHypernymsResponse> + getListSearchHypernymsMethod; + if ((getListSearchHypernymsMethod = WarehouseGrpc.getListSearchHypernymsMethod) == null) { + synchronized (WarehouseGrpc.class) { + if ((getListSearchHypernymsMethod = WarehouseGrpc.getListSearchHypernymsMethod) == null) { + WarehouseGrpc.getListSearchHypernymsMethod = + getListSearchHypernymsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "ListSearchHypernyms")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.visionai.v1.ListSearchHypernymsRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.visionai.v1.ListSearchHypernymsResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new WarehouseMethodDescriptorSupplier("ListSearchHypernyms")) + .build(); + } + } + } + return getListSearchHypernymsMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.SearchAssetsRequest, + com.google.cloud.visionai.v1.SearchAssetsResponse> + getSearchAssetsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "SearchAssets", + requestType = com.google.cloud.visionai.v1.SearchAssetsRequest.class, + responseType = com.google.cloud.visionai.v1.SearchAssetsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.SearchAssetsRequest, + com.google.cloud.visionai.v1.SearchAssetsResponse> + getSearchAssetsMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.SearchAssetsRequest, + com.google.cloud.visionai.v1.SearchAssetsResponse> + getSearchAssetsMethod; + if ((getSearchAssetsMethod = WarehouseGrpc.getSearchAssetsMethod) == null) { + synchronized (WarehouseGrpc.class) { + if ((getSearchAssetsMethod = WarehouseGrpc.getSearchAssetsMethod) == null) { + WarehouseGrpc.getSearchAssetsMethod = + getSearchAssetsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "SearchAssets")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.visionai.v1.SearchAssetsRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.visionai.v1.SearchAssetsResponse + .getDefaultInstance())) + .setSchemaDescriptor(new WarehouseMethodDescriptorSupplier("SearchAssets")) + .build(); + } + } + } + return getSearchAssetsMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.SearchIndexEndpointRequest, + com.google.cloud.visionai.v1.SearchIndexEndpointResponse> + getSearchIndexEndpointMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "SearchIndexEndpoint", + requestType = com.google.cloud.visionai.v1.SearchIndexEndpointRequest.class, + responseType = com.google.cloud.visionai.v1.SearchIndexEndpointResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.SearchIndexEndpointRequest, + com.google.cloud.visionai.v1.SearchIndexEndpointResponse> + getSearchIndexEndpointMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.SearchIndexEndpointRequest, + com.google.cloud.visionai.v1.SearchIndexEndpointResponse> + getSearchIndexEndpointMethod; + if ((getSearchIndexEndpointMethod = WarehouseGrpc.getSearchIndexEndpointMethod) == null) { + synchronized (WarehouseGrpc.class) { + if ((getSearchIndexEndpointMethod = WarehouseGrpc.getSearchIndexEndpointMethod) == null) { + WarehouseGrpc.getSearchIndexEndpointMethod = + getSearchIndexEndpointMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "SearchIndexEndpoint")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.visionai.v1.SearchIndexEndpointRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.visionai.v1.SearchIndexEndpointResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new WarehouseMethodDescriptorSupplier("SearchIndexEndpoint")) + .build(); + } + } + } + return getSearchIndexEndpointMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.CreateIndexEndpointRequest, com.google.longrunning.Operation> + getCreateIndexEndpointMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateIndexEndpoint", + requestType = com.google.cloud.visionai.v1.CreateIndexEndpointRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.CreateIndexEndpointRequest, com.google.longrunning.Operation> + getCreateIndexEndpointMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.CreateIndexEndpointRequest, + com.google.longrunning.Operation> + getCreateIndexEndpointMethod; + if ((getCreateIndexEndpointMethod = WarehouseGrpc.getCreateIndexEndpointMethod) == null) { + synchronized (WarehouseGrpc.class) { + if ((getCreateIndexEndpointMethod = WarehouseGrpc.getCreateIndexEndpointMethod) == null) { + WarehouseGrpc.getCreateIndexEndpointMethod = + getCreateIndexEndpointMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "CreateIndexEndpoint")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.visionai.v1.CreateIndexEndpointRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new WarehouseMethodDescriptorSupplier("CreateIndexEndpoint")) + .build(); + } + } + } + return getCreateIndexEndpointMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.GetIndexEndpointRequest, + com.google.cloud.visionai.v1.IndexEndpoint> + getGetIndexEndpointMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetIndexEndpoint", + requestType = com.google.cloud.visionai.v1.GetIndexEndpointRequest.class, + responseType = com.google.cloud.visionai.v1.IndexEndpoint.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.GetIndexEndpointRequest, + com.google.cloud.visionai.v1.IndexEndpoint> + getGetIndexEndpointMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.GetIndexEndpointRequest, + com.google.cloud.visionai.v1.IndexEndpoint> + getGetIndexEndpointMethod; + if ((getGetIndexEndpointMethod = WarehouseGrpc.getGetIndexEndpointMethod) == null) { + synchronized (WarehouseGrpc.class) { + if ((getGetIndexEndpointMethod = WarehouseGrpc.getGetIndexEndpointMethod) == null) { + WarehouseGrpc.getGetIndexEndpointMethod = + getGetIndexEndpointMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetIndexEndpoint")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.visionai.v1.GetIndexEndpointRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.visionai.v1.IndexEndpoint.getDefaultInstance())) + .setSchemaDescriptor( + new WarehouseMethodDescriptorSupplier("GetIndexEndpoint")) + .build(); + } + } + } + return getGetIndexEndpointMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.ListIndexEndpointsRequest, + com.google.cloud.visionai.v1.ListIndexEndpointsResponse> + getListIndexEndpointsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListIndexEndpoints", + requestType = com.google.cloud.visionai.v1.ListIndexEndpointsRequest.class, + responseType = com.google.cloud.visionai.v1.ListIndexEndpointsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.ListIndexEndpointsRequest, + com.google.cloud.visionai.v1.ListIndexEndpointsResponse> + getListIndexEndpointsMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.ListIndexEndpointsRequest, + com.google.cloud.visionai.v1.ListIndexEndpointsResponse> + getListIndexEndpointsMethod; + if ((getListIndexEndpointsMethod = WarehouseGrpc.getListIndexEndpointsMethod) == null) { + synchronized (WarehouseGrpc.class) { + if ((getListIndexEndpointsMethod = WarehouseGrpc.getListIndexEndpointsMethod) == null) { + WarehouseGrpc.getListIndexEndpointsMethod = + getListIndexEndpointsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListIndexEndpoints")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.visionai.v1.ListIndexEndpointsRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.visionai.v1.ListIndexEndpointsResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new WarehouseMethodDescriptorSupplier("ListIndexEndpoints")) + .build(); + } + } + } + return getListIndexEndpointsMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.UpdateIndexEndpointRequest, com.google.longrunning.Operation> + getUpdateIndexEndpointMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdateIndexEndpoint", + requestType = com.google.cloud.visionai.v1.UpdateIndexEndpointRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.UpdateIndexEndpointRequest, com.google.longrunning.Operation> + getUpdateIndexEndpointMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.UpdateIndexEndpointRequest, + com.google.longrunning.Operation> + getUpdateIndexEndpointMethod; + if ((getUpdateIndexEndpointMethod = WarehouseGrpc.getUpdateIndexEndpointMethod) == null) { + synchronized (WarehouseGrpc.class) { + if ((getUpdateIndexEndpointMethod = WarehouseGrpc.getUpdateIndexEndpointMethod) == null) { + WarehouseGrpc.getUpdateIndexEndpointMethod = + getUpdateIndexEndpointMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "UpdateIndexEndpoint")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.visionai.v1.UpdateIndexEndpointRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new WarehouseMethodDescriptorSupplier("UpdateIndexEndpoint")) + .build(); + } + } + } + return getUpdateIndexEndpointMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.DeleteIndexEndpointRequest, com.google.longrunning.Operation> + getDeleteIndexEndpointMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteIndexEndpoint", + requestType = com.google.cloud.visionai.v1.DeleteIndexEndpointRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.DeleteIndexEndpointRequest, com.google.longrunning.Operation> + getDeleteIndexEndpointMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.DeleteIndexEndpointRequest, + com.google.longrunning.Operation> + getDeleteIndexEndpointMethod; + if ((getDeleteIndexEndpointMethod = WarehouseGrpc.getDeleteIndexEndpointMethod) == null) { + synchronized (WarehouseGrpc.class) { + if ((getDeleteIndexEndpointMethod = WarehouseGrpc.getDeleteIndexEndpointMethod) == null) { + WarehouseGrpc.getDeleteIndexEndpointMethod = + getDeleteIndexEndpointMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "DeleteIndexEndpoint")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.visionai.v1.DeleteIndexEndpointRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new WarehouseMethodDescriptorSupplier("DeleteIndexEndpoint")) + .build(); + } + } + } + return getDeleteIndexEndpointMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.DeployIndexRequest, com.google.longrunning.Operation> + getDeployIndexMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeployIndex", + requestType = com.google.cloud.visionai.v1.DeployIndexRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.DeployIndexRequest, com.google.longrunning.Operation> + getDeployIndexMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.DeployIndexRequest, com.google.longrunning.Operation> + getDeployIndexMethod; + if ((getDeployIndexMethod = WarehouseGrpc.getDeployIndexMethod) == null) { + synchronized (WarehouseGrpc.class) { + if ((getDeployIndexMethod = WarehouseGrpc.getDeployIndexMethod) == null) { + WarehouseGrpc.getDeployIndexMethod = + getDeployIndexMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeployIndex")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.visionai.v1.DeployIndexRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor(new WarehouseMethodDescriptorSupplier("DeployIndex")) + .build(); + } + } + } + return getDeployIndexMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.UndeployIndexRequest, com.google.longrunning.Operation> + getUndeployIndexMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UndeployIndex", + requestType = com.google.cloud.visionai.v1.UndeployIndexRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.UndeployIndexRequest, com.google.longrunning.Operation> + getUndeployIndexMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.UndeployIndexRequest, com.google.longrunning.Operation> + getUndeployIndexMethod; + if ((getUndeployIndexMethod = WarehouseGrpc.getUndeployIndexMethod) == null) { + synchronized (WarehouseGrpc.class) { + if ((getUndeployIndexMethod = WarehouseGrpc.getUndeployIndexMethod) == null) { + WarehouseGrpc.getUndeployIndexMethod = + getUndeployIndexMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UndeployIndex")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.visionai.v1.UndeployIndexRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor(new WarehouseMethodDescriptorSupplier("UndeployIndex")) + .build(); + } + } + } + return getUndeployIndexMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.CreateCollectionRequest, com.google.longrunning.Operation> + getCreateCollectionMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateCollection", + requestType = com.google.cloud.visionai.v1.CreateCollectionRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.CreateCollectionRequest, com.google.longrunning.Operation> + getCreateCollectionMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.CreateCollectionRequest, com.google.longrunning.Operation> + getCreateCollectionMethod; + if ((getCreateCollectionMethod = WarehouseGrpc.getCreateCollectionMethod) == null) { + synchronized (WarehouseGrpc.class) { + if ((getCreateCollectionMethod = WarehouseGrpc.getCreateCollectionMethod) == null) { + WarehouseGrpc.getCreateCollectionMethod = + getCreateCollectionMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateCollection")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.visionai.v1.CreateCollectionRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new WarehouseMethodDescriptorSupplier("CreateCollection")) + .build(); + } + } + } + return getCreateCollectionMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.DeleteCollectionRequest, com.google.longrunning.Operation> + getDeleteCollectionMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteCollection", + requestType = com.google.cloud.visionai.v1.DeleteCollectionRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.DeleteCollectionRequest, com.google.longrunning.Operation> + getDeleteCollectionMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.DeleteCollectionRequest, com.google.longrunning.Operation> + getDeleteCollectionMethod; + if ((getDeleteCollectionMethod = WarehouseGrpc.getDeleteCollectionMethod) == null) { + synchronized (WarehouseGrpc.class) { + if ((getDeleteCollectionMethod = WarehouseGrpc.getDeleteCollectionMethod) == null) { + WarehouseGrpc.getDeleteCollectionMethod = + getDeleteCollectionMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteCollection")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.visionai.v1.DeleteCollectionRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new WarehouseMethodDescriptorSupplier("DeleteCollection")) + .build(); + } + } + } + return getDeleteCollectionMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.GetCollectionRequest, + com.google.cloud.visionai.v1.Collection> + getGetCollectionMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetCollection", + requestType = com.google.cloud.visionai.v1.GetCollectionRequest.class, + responseType = com.google.cloud.visionai.v1.Collection.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.GetCollectionRequest, + com.google.cloud.visionai.v1.Collection> + getGetCollectionMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.GetCollectionRequest, + com.google.cloud.visionai.v1.Collection> + getGetCollectionMethod; + if ((getGetCollectionMethod = WarehouseGrpc.getGetCollectionMethod) == null) { + synchronized (WarehouseGrpc.class) { + if ((getGetCollectionMethod = WarehouseGrpc.getGetCollectionMethod) == null) { + WarehouseGrpc.getGetCollectionMethod = + getGetCollectionMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetCollection")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.visionai.v1.GetCollectionRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.visionai.v1.Collection.getDefaultInstance())) + .setSchemaDescriptor(new WarehouseMethodDescriptorSupplier("GetCollection")) + .build(); + } + } + } + return getGetCollectionMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.UpdateCollectionRequest, + com.google.cloud.visionai.v1.Collection> + getUpdateCollectionMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdateCollection", + requestType = com.google.cloud.visionai.v1.UpdateCollectionRequest.class, + responseType = com.google.cloud.visionai.v1.Collection.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.UpdateCollectionRequest, + com.google.cloud.visionai.v1.Collection> + getUpdateCollectionMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.UpdateCollectionRequest, + com.google.cloud.visionai.v1.Collection> + getUpdateCollectionMethod; + if ((getUpdateCollectionMethod = WarehouseGrpc.getUpdateCollectionMethod) == null) { + synchronized (WarehouseGrpc.class) { + if ((getUpdateCollectionMethod = WarehouseGrpc.getUpdateCollectionMethod) == null) { + WarehouseGrpc.getUpdateCollectionMethod = + getUpdateCollectionMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateCollection")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.visionai.v1.UpdateCollectionRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.visionai.v1.Collection.getDefaultInstance())) + .setSchemaDescriptor( + new WarehouseMethodDescriptorSupplier("UpdateCollection")) + .build(); + } + } + } + return getUpdateCollectionMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.ListCollectionsRequest, + com.google.cloud.visionai.v1.ListCollectionsResponse> + getListCollectionsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListCollections", + requestType = com.google.cloud.visionai.v1.ListCollectionsRequest.class, + responseType = com.google.cloud.visionai.v1.ListCollectionsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.ListCollectionsRequest, + com.google.cloud.visionai.v1.ListCollectionsResponse> + getListCollectionsMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.ListCollectionsRequest, + com.google.cloud.visionai.v1.ListCollectionsResponse> + getListCollectionsMethod; + if ((getListCollectionsMethod = WarehouseGrpc.getListCollectionsMethod) == null) { + synchronized (WarehouseGrpc.class) { + if ((getListCollectionsMethod = WarehouseGrpc.getListCollectionsMethod) == null) { + WarehouseGrpc.getListCollectionsMethod = + getListCollectionsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListCollections")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.visionai.v1.ListCollectionsRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.visionai.v1.ListCollectionsResponse + .getDefaultInstance())) + .setSchemaDescriptor(new WarehouseMethodDescriptorSupplier("ListCollections")) + .build(); + } + } + } + return getListCollectionsMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.AddCollectionItemRequest, + com.google.cloud.visionai.v1.AddCollectionItemResponse> + getAddCollectionItemMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "AddCollectionItem", + requestType = com.google.cloud.visionai.v1.AddCollectionItemRequest.class, + responseType = com.google.cloud.visionai.v1.AddCollectionItemResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.AddCollectionItemRequest, + com.google.cloud.visionai.v1.AddCollectionItemResponse> + getAddCollectionItemMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.AddCollectionItemRequest, + com.google.cloud.visionai.v1.AddCollectionItemResponse> + getAddCollectionItemMethod; + if ((getAddCollectionItemMethod = WarehouseGrpc.getAddCollectionItemMethod) == null) { + synchronized (WarehouseGrpc.class) { + if ((getAddCollectionItemMethod = WarehouseGrpc.getAddCollectionItemMethod) == null) { + WarehouseGrpc.getAddCollectionItemMethod = + getAddCollectionItemMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "AddCollectionItem")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.visionai.v1.AddCollectionItemRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.visionai.v1.AddCollectionItemResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new WarehouseMethodDescriptorSupplier("AddCollectionItem")) + .build(); + } + } + } + return getAddCollectionItemMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.RemoveCollectionItemRequest, + com.google.cloud.visionai.v1.RemoveCollectionItemResponse> + getRemoveCollectionItemMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "RemoveCollectionItem", + requestType = com.google.cloud.visionai.v1.RemoveCollectionItemRequest.class, + responseType = com.google.cloud.visionai.v1.RemoveCollectionItemResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.RemoveCollectionItemRequest, + com.google.cloud.visionai.v1.RemoveCollectionItemResponse> + getRemoveCollectionItemMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.RemoveCollectionItemRequest, + com.google.cloud.visionai.v1.RemoveCollectionItemResponse> + getRemoveCollectionItemMethod; + if ((getRemoveCollectionItemMethod = WarehouseGrpc.getRemoveCollectionItemMethod) == null) { + synchronized (WarehouseGrpc.class) { + if ((getRemoveCollectionItemMethod = WarehouseGrpc.getRemoveCollectionItemMethod) == null) { + WarehouseGrpc.getRemoveCollectionItemMethod = + getRemoveCollectionItemMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "RemoveCollectionItem")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.visionai.v1.RemoveCollectionItemRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.visionai.v1.RemoveCollectionItemResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new WarehouseMethodDescriptorSupplier("RemoveCollectionItem")) + .build(); + } + } + } + return getRemoveCollectionItemMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.ViewCollectionItemsRequest, + com.google.cloud.visionai.v1.ViewCollectionItemsResponse> + getViewCollectionItemsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ViewCollectionItems", + requestType = com.google.cloud.visionai.v1.ViewCollectionItemsRequest.class, + responseType = com.google.cloud.visionai.v1.ViewCollectionItemsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.ViewCollectionItemsRequest, + com.google.cloud.visionai.v1.ViewCollectionItemsResponse> + getViewCollectionItemsMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.visionai.v1.ViewCollectionItemsRequest, + com.google.cloud.visionai.v1.ViewCollectionItemsResponse> + getViewCollectionItemsMethod; + if ((getViewCollectionItemsMethod = WarehouseGrpc.getViewCollectionItemsMethod) == null) { + synchronized (WarehouseGrpc.class) { + if ((getViewCollectionItemsMethod = WarehouseGrpc.getViewCollectionItemsMethod) == null) { + WarehouseGrpc.getViewCollectionItemsMethod = + getViewCollectionItemsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "ViewCollectionItems")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.visionai.v1.ViewCollectionItemsRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.visionai.v1.ViewCollectionItemsResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new WarehouseMethodDescriptorSupplier("ViewCollectionItems")) + .build(); + } + } + } + return getViewCollectionItemsMethod; + } + + /** Creates a new async stub that supports all call types for the service */ + public static WarehouseStub newStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public WarehouseStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new WarehouseStub(channel, callOptions); + } + }; + return WarehouseStub.newStub(factory, channel); + } + + /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service + */ + public static WarehouseBlockingStub newBlockingStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public WarehouseBlockingStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new WarehouseBlockingStub(channel, callOptions); + } + }; + return WarehouseBlockingStub.newStub(factory, channel); + } + + /** Creates a new ListenableFuture-style stub that supports unary calls on the service */ + public static WarehouseFutureStub newFutureStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public WarehouseFutureStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new WarehouseFutureStub(channel, callOptions); + } + }; + return WarehouseFutureStub.newStub(factory, channel); + } + + /** + * + * + *
+   * Service that manages media content + metadata for streaming.
+   * 
+ */ + public interface AsyncService { + + /** + * + * + *
+     * Creates an asset inside corpus.
+     * 
+ */ + default void createAsset( + com.google.cloud.visionai.v1.CreateAssetRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getCreateAssetMethod(), responseObserver); + } + + /** + * + * + *
+     * Updates an asset inside corpus.
+     * 
+ */ + default void updateAsset( + com.google.cloud.visionai.v1.UpdateAssetRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getUpdateAssetMethod(), responseObserver); + } + + /** + * + * + *
+     * Reads an asset inside corpus.
+     * 
+ */ + default void getAsset( + com.google.cloud.visionai.v1.GetAssetRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetAssetMethod(), responseObserver); + } + + /** + * + * + *
+     * Lists an list of assets inside corpus.
+     * 
+ */ + default void listAssets( + com.google.cloud.visionai.v1.ListAssetsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListAssetsMethod(), responseObserver); + } + + /** + * + * + *
+     * Deletes asset inside corpus.
+     * 
+ */ + default void deleteAsset( + com.google.cloud.visionai.v1.DeleteAssetRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getDeleteAssetMethod(), responseObserver); + } + + /** + * + * + *
+     * Upload asset by specifing the asset Cloud Storage uri.
+     * For video warehouse, it requires users who call this API have read access
+     * to the cloud storage file. Once it is uploaded, it can be retrieved by
+     * GenerateRetrievalUrl API which by default, only can retrieve cloud storage
+     * files from the same project of the warehouse. To allow retrieval cloud
+     * storage files that are in a separate project, it requires to find the
+     * vision ai service account (Go to IAM, check checkbox to show "Include
+     * Google-provided role grants", search for "Cloud Vision AI Service Agent")
+     * and grant the read access of the cloud storage files to that service
+     * account.
+     * 
+ */ + default void uploadAsset( + com.google.cloud.visionai.v1.UploadAssetRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getUploadAssetMethod(), responseObserver); + } + + /** + * + * + *
+     * Generates a signed url for downloading the asset.
+     * For video warehouse, please see comment of UploadAsset about how to allow
+     * retrieval of cloud storage files in a different project.
+     * 
+ */ + default void generateRetrievalUrl( + com.google.cloud.visionai.v1.GenerateRetrievalUrlRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getGenerateRetrievalUrlMethod(), responseObserver); + } + + /** + * + * + *
+     * Analyze asset to power search capability.
+     * 
+ */ + default void analyzeAsset( + com.google.cloud.visionai.v1.AnalyzeAssetRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getAnalyzeAssetMethod(), responseObserver); + } + + /** + * + * + *
+     * Index one asset for search.
+     * Supported corpus type: Corpus.Type.VIDEO_ON_DEMAND
+     * 
+ */ + default void indexAsset( + com.google.cloud.visionai.v1.IndexAssetRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getIndexAssetMethod(), responseObserver); + } + + /** + * + * + *
+     * Remove one asset's index data for search.
+     * Supported corpus type: Corpus.Type.VIDEO_ON_DEMAND
+     * 
+ */ + default void removeIndexAsset( + com.google.cloud.visionai.v1.RemoveIndexAssetRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getRemoveIndexAssetMethod(), responseObserver); + } + + /** + * + * + *
+     * Lists assets inside an index.
+     * 
+ */ + default void viewIndexedAssets( + com.google.cloud.visionai.v1.ViewIndexedAssetsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getViewIndexedAssetsMethod(), responseObserver); + } + + /** + * + * + *
+     * Creates an Index under the corpus.
+     * 
+ */ + default void createIndex( + com.google.cloud.visionai.v1.CreateIndexRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getCreateIndexMethod(), responseObserver); + } + + /** + * + * + *
+     * Updates an Index under the corpus.
+     * Users can perform a metadata-only update or trigger a full index rebuild
+     * with different update_mask values.
+     * 
+ */ + default void updateIndex( + com.google.cloud.visionai.v1.UpdateIndexRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getUpdateIndexMethod(), responseObserver); + } + + /** + * + * + *
+     * Gets the details of a single Index under a Corpus.
+     * 
+ */ + default void getIndex( + com.google.cloud.visionai.v1.GetIndexRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetIndexMethod(), responseObserver); + } + + /** + * + * + *
+     * List all Indexes in a given Corpus.
+     * 
+ */ + default void listIndexes( + com.google.cloud.visionai.v1.ListIndexesRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListIndexesMethod(), responseObserver); + } + + /** + * + * + *
+     * Delete a single Index. In order to delete an index, the caller must
+     * make sure that it is not deployed to any index endpoint.
+     * 
+ */ + default void deleteIndex( + com.google.cloud.visionai.v1.DeleteIndexRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getDeleteIndexMethod(), responseObserver); + } + + /** + * + * + *
+     * Creates a corpus inside a project.
+     * 
+ */ + default void createCorpus( + com.google.cloud.visionai.v1.CreateCorpusRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getCreateCorpusMethod(), responseObserver); + } + + /** + * + * + *
+     * Gets corpus details inside a project.
+     * 
+ */ + default void getCorpus( + com.google.cloud.visionai.v1.GetCorpusRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetCorpusMethod(), responseObserver); + } + + /** + * + * + *
+     * Updates a corpus in a project.
+     * 
+ */ + default void updateCorpus( + com.google.cloud.visionai.v1.UpdateCorpusRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getUpdateCorpusMethod(), responseObserver); + } + + /** + * + * + *
+     * Lists all corpora in a project.
+     * 
+ */ + default void listCorpora( + com.google.cloud.visionai.v1.ListCorporaRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListCorporaMethod(), responseObserver); + } + + /** + * + * + *
+     * Deletes a corpus only if its empty.
+     * Returns empty response.
+     * 
+ */ + default void deleteCorpus( + com.google.cloud.visionai.v1.DeleteCorpusRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getDeleteCorpusMethod(), responseObserver); + } + + /** + * + * + *
+     * Analyzes a corpus.
+     * 
+ */ + default void analyzeCorpus( + com.google.cloud.visionai.v1.AnalyzeCorpusRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getAnalyzeCorpusMethod(), responseObserver); + } + + /** + * + * + *
+     * Creates data schema inside corpus.
+     * 
+ */ + default void createDataSchema( + com.google.cloud.visionai.v1.CreateDataSchemaRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getCreateDataSchemaMethod(), responseObserver); + } + + /** + * + * + *
+     * Updates data schema inside corpus.
+     * 
+ */ + default void updateDataSchema( + com.google.cloud.visionai.v1.UpdateDataSchemaRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getUpdateDataSchemaMethod(), responseObserver); + } + + /** + * + * + *
+     * Gets data schema inside corpus.
+     * 
+ */ + default void getDataSchema( + com.google.cloud.visionai.v1.GetDataSchemaRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getGetDataSchemaMethod(), responseObserver); + } + + /** + * + * + *
+     * Deletes data schema inside corpus.
+     * 
+ */ + default void deleteDataSchema( + com.google.cloud.visionai.v1.DeleteDataSchemaRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getDeleteDataSchemaMethod(), responseObserver); + } + + /** + * + * + *
+     * Lists a list of data schemas inside corpus.
+     * 
+ */ + default void listDataSchemas( + com.google.cloud.visionai.v1.ListDataSchemasRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListDataSchemasMethod(), responseObserver); + } + + /** + * + * + *
+     * Creates annotation inside asset.
+     * 
+ */ + default void createAnnotation( + com.google.cloud.visionai.v1.CreateAnnotationRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getCreateAnnotationMethod(), responseObserver); + } + + /** + * + * + *
+     * Reads annotation inside asset.
+     * 
+ */ + default void getAnnotation( + com.google.cloud.visionai.v1.GetAnnotationRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getGetAnnotationMethod(), responseObserver); + } + + /** + * + * + *
+     * Lists a list of annotations inside asset.
+     * 
+ */ + default void listAnnotations( + com.google.cloud.visionai.v1.ListAnnotationsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListAnnotationsMethod(), responseObserver); + } + + /** + * + * + *
+     * Updates annotation inside asset.
+     * 
+ */ + default void updateAnnotation( + com.google.cloud.visionai.v1.UpdateAnnotationRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getUpdateAnnotationMethod(), responseObserver); + } + + /** + * + * + *
+     * Deletes annotation inside asset.
+     * 
+ */ + default void deleteAnnotation( + com.google.cloud.visionai.v1.DeleteAnnotationRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getDeleteAnnotationMethod(), responseObserver); + } + + /** + * + * + *
+     * Ingests data for the asset. It is not allowed to ingest a data chunk which
+     * is already expired according to TTL.
+     * This method is only available via the gRPC API (not HTTP since
+     * bi-directional streaming is not supported via HTTP).
+     * 
+ */ + default io.grpc.stub.StreamObserver + ingestAsset( + io.grpc.stub.StreamObserver + responseObserver) { + return io.grpc.stub.ServerCalls.asyncUnimplementedStreamingCall( + getIngestAssetMethod(), responseObserver); + } + + /** + * + * + *
+     * Generates clips for downloading. The api takes in a time range, and
+     * generates a clip of the first content available after start_time and
+     * before end_time, which may overflow beyond these bounds.
+     * Returned clips are truncated if the total size of the clips are larger
+     * than 100MB.
+     * 
+ */ + default void clipAsset( + com.google.cloud.visionai.v1.ClipAssetRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getClipAssetMethod(), responseObserver); + } + + /** + * + * + *
+     * Generates a uri for an HLS manifest. The api takes in a collection of time
+     * ranges, and generates a URI for an HLS manifest that covers all the
+     * requested time ranges.
+     * 
+ */ + default void generateHlsUri( + com.google.cloud.visionai.v1.GenerateHlsUriRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getGenerateHlsUriMethod(), responseObserver); + } + + /** + * + * + *
+     * Imports assets (images plus annotations) from a meta file on cloud storage.
+     * Each row in the meta file is corresponding to an image (specified by a
+     * cloud storage uri) and its annotations.
+     * 
+ */ + default void importAssets( + com.google.cloud.visionai.v1.ImportAssetsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getImportAssetsMethod(), responseObserver); + } + + /** + * + * + *
+     * Creates a search configuration inside a corpus.
+     * Please follow the rules below to create a valid CreateSearchConfigRequest.
+     * --- General Rules ---
+     * 1. Request.search_config_id must not be associated with an existing
+     *    SearchConfig.
+     * 2. Request must contain at least one non-empty search_criteria_property or
+     *    facet_property.
+     * 3. mapped_fields must not be empty, and must map to existing UGA keys.
+     * 4. All mapped_fields must be of the same type.
+     * 5. All mapped_fields must share the same granularity.
+     * 6. All mapped_fields must share the same semantic SearchConfig match
+     *    options.
+     * For property-specific rules, please reference the comments for
+     * FacetProperty and SearchCriteriaProperty.
+     * 
+ */ + default void createSearchConfig( + com.google.cloud.visionai.v1.CreateSearchConfigRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getCreateSearchConfigMethod(), responseObserver); + } + + /** + * + * + *
+     * Updates a search configuration inside a corpus.
+     * Please follow the rules below to create a valid UpdateSearchConfigRequest.
+     * --- General Rules ---
+     * 1. Request.search_configuration.name must already exist.
+     * 2. Request must contain at least one non-empty search_criteria_property or
+     * facet_property.
+     * 3. mapped_fields must not be empty, and must map to existing UGA keys.
+     * 4. All mapped_fields must be of the same type.
+     * 5. All mapped_fields must share the same granularity.
+     * 6. All mapped_fields must share the same semantic SearchConfig match
+     *    options.
+     * For property-specific rules, please reference the comments for
+     * FacetProperty and SearchCriteriaProperty.
+     * 
+ */ + default void updateSearchConfig( + com.google.cloud.visionai.v1.UpdateSearchConfigRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getUpdateSearchConfigMethod(), responseObserver); + } + + /** + * + * + *
+     * Gets a search configuration inside a corpus.
+     * 
+ */ + default void getSearchConfig( + com.google.cloud.visionai.v1.GetSearchConfigRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getGetSearchConfigMethod(), responseObserver); + } + + /** + * + * + *
+     * Deletes a search configuration inside a corpus.
+     * For a DeleteSearchConfigRequest to be valid,
+     * Request.search_configuration.name must already exist.
+     * 
+ */ + default void deleteSearchConfig( + com.google.cloud.visionai.v1.DeleteSearchConfigRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getDeleteSearchConfigMethod(), responseObserver); + } + + /** + * + * + *
+     * Lists all search configurations inside a corpus.
+     * 
+ */ + default void listSearchConfigs( + com.google.cloud.visionai.v1.ListSearchConfigsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListSearchConfigsMethod(), responseObserver); + } + + /** + * + * + *
+     * Creates a SearchHypernym inside a corpus.
+     * 
+ */ + default void createSearchHypernym( + com.google.cloud.visionai.v1.CreateSearchHypernymRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getCreateSearchHypernymMethod(), responseObserver); + } + + /** + * + * + *
+     * Updates a SearchHypernym inside a corpus.
+     * 
+ */ + default void updateSearchHypernym( + com.google.cloud.visionai.v1.UpdateSearchHypernymRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getUpdateSearchHypernymMethod(), responseObserver); + } + + /** + * + * + *
+     * Gets a SearchHypernym inside a corpus.
+     * 
+ */ + default void getSearchHypernym( + com.google.cloud.visionai.v1.GetSearchHypernymRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getGetSearchHypernymMethod(), responseObserver); + } + + /** + * + * + *
+     * Deletes a SearchHypernym inside a corpus.
+     * 
+ */ + default void deleteSearchHypernym( + com.google.cloud.visionai.v1.DeleteSearchHypernymRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getDeleteSearchHypernymMethod(), responseObserver); + } + + /** + * + * + *
+     * Lists SearchHypernyms inside a corpus.
+     * 
+ */ + default void listSearchHypernyms( + com.google.cloud.visionai.v1.ListSearchHypernymsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListSearchHypernymsMethod(), responseObserver); + } + + /** + * + * + *
+     * Search media asset.
+     * 
+ */ + default void searchAssets( + com.google.cloud.visionai.v1.SearchAssetsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getSearchAssetsMethod(), responseObserver); + } + + /** + * + * + *
+     * Search a deployed index endpoint (IMAGE corpus type only).
+     * 
+ */ + default void searchIndexEndpoint( + com.google.cloud.visionai.v1.SearchIndexEndpointRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getSearchIndexEndpointMethod(), responseObserver); + } + + /** + * + * + *
+     * Creates an IndexEndpoint.
+     * 
+ */ + default void createIndexEndpoint( + com.google.cloud.visionai.v1.CreateIndexEndpointRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getCreateIndexEndpointMethod(), responseObserver); + } + + /** + * + * + *
+     * Gets an IndexEndpoint.
+     * 
+ */ + default void getIndexEndpoint( + com.google.cloud.visionai.v1.GetIndexEndpointRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getGetIndexEndpointMethod(), responseObserver); + } + + /** + * + * + *
+     * Lists all IndexEndpoints in a project.
+     * 
+ */ + default void listIndexEndpoints( + com.google.cloud.visionai.v1.ListIndexEndpointsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListIndexEndpointsMethod(), responseObserver); + } + + /** + * + * + *
+     * Updates an IndexEndpoint.
+     * 
+ */ + default void updateIndexEndpoint( + com.google.cloud.visionai.v1.UpdateIndexEndpointRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getUpdateIndexEndpointMethod(), responseObserver); + } + + /** + * + * + *
+     * Deletes an IndexEndpoint.
+     * 
+ */ + default void deleteIndexEndpoint( + com.google.cloud.visionai.v1.DeleteIndexEndpointRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getDeleteIndexEndpointMethod(), responseObserver); + } + + /** + * + * + *
+     * Deploys an Index to IndexEndpoint.
+     * 
+ */ + default void deployIndex( + com.google.cloud.visionai.v1.DeployIndexRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getDeployIndexMethod(), responseObserver); + } + + /** + * + * + *
+     * Undeploys an Index from IndexEndpoint.
+     * 
+ */ + default void undeployIndex( + com.google.cloud.visionai.v1.UndeployIndexRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getUndeployIndexMethod(), responseObserver); + } + + /** + * + * + *
+     * Creates a collection.
+     * 
+ */ + default void createCollection( + com.google.cloud.visionai.v1.CreateCollectionRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getCreateCollectionMethod(), responseObserver); + } + + /** + * + * + *
+     * Deletes a collection.
+     * 
+ */ + default void deleteCollection( + com.google.cloud.visionai.v1.DeleteCollectionRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getDeleteCollectionMethod(), responseObserver); + } + + /** + * + * + *
+     * Gets a collection.
+     * 
+ */ + default void getCollection( + com.google.cloud.visionai.v1.GetCollectionRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getGetCollectionMethod(), responseObserver); + } + + /** + * + * + *
+     * Updates a collection.
+     * 
+ */ + default void updateCollection( + com.google.cloud.visionai.v1.UpdateCollectionRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getUpdateCollectionMethod(), responseObserver); + } + + /** + * + * + *
+     * Lists collections inside a corpus.
+     * 
+ */ + default void listCollections( + com.google.cloud.visionai.v1.ListCollectionsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListCollectionsMethod(), responseObserver); + } + + /** + * + * + *
+     * Adds an item into a Collection.
+     * 
+ */ + default void addCollectionItem( + com.google.cloud.visionai.v1.AddCollectionItemRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getAddCollectionItemMethod(), responseObserver); + } + + /** + * + * + *
+     * Removes an item from a collection.
+     * 
+ */ + default void removeCollectionItem( + com.google.cloud.visionai.v1.RemoveCollectionItemRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getRemoveCollectionItemMethod(), responseObserver); + } + + /** + * + * + *
+     * View items inside a collection.
+     * 
+ */ + default void viewCollectionItems( + com.google.cloud.visionai.v1.ViewCollectionItemsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getViewCollectionItemsMethod(), responseObserver); + } + } + + /** + * Base class for the server implementation of the service Warehouse. + * + *
+   * Service that manages media content + metadata for streaming.
+   * 
+ */ + public abstract static class WarehouseImplBase implements io.grpc.BindableService, AsyncService { + + @java.lang.Override + public final io.grpc.ServerServiceDefinition bindService() { + return WarehouseGrpc.bindService(this); + } + } + + /** + * A stub to allow clients to do asynchronous rpc calls to service Warehouse. + * + *
+   * Service that manages media content + metadata for streaming.
+   * 
+ */ + public static final class WarehouseStub extends io.grpc.stub.AbstractAsyncStub { + private WarehouseStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected WarehouseStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new WarehouseStub(channel, callOptions); + } + + /** + * + * + *
+     * Creates an asset inside corpus.
+     * 
+ */ + public void createAsset( + com.google.cloud.visionai.v1.CreateAssetRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreateAssetMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Updates an asset inside corpus.
+     * 
+ */ + public void updateAsset( + com.google.cloud.visionai.v1.UpdateAssetRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUpdateAssetMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Reads an asset inside corpus.
+     * 
+ */ + public void getAsset( + com.google.cloud.visionai.v1.GetAssetRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetAssetMethod(), getCallOptions()), request, responseObserver); + } + + /** + * + * + *
+     * Lists an list of assets inside corpus.
+     * 
+ */ + public void listAssets( + com.google.cloud.visionai.v1.ListAssetsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListAssetsMethod(), getCallOptions()), request, responseObserver); + } + + /** + * + * + *
+     * Deletes asset inside corpus.
+     * 
+ */ + public void deleteAsset( + com.google.cloud.visionai.v1.DeleteAssetRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeleteAssetMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Upload asset by specifing the asset Cloud Storage uri.
+     * For video warehouse, it requires users who call this API have read access
+     * to the cloud storage file. Once it is uploaded, it can be retrieved by
+     * GenerateRetrievalUrl API which by default, only can retrieve cloud storage
+     * files from the same project of the warehouse. To allow retrieval cloud
+     * storage files that are in a separate project, it requires to find the
+     * vision ai service account (Go to IAM, check checkbox to show "Include
+     * Google-provided role grants", search for "Cloud Vision AI Service Agent")
+     * and grant the read access of the cloud storage files to that service
+     * account.
+     * 
+ */ + public void uploadAsset( + com.google.cloud.visionai.v1.UploadAssetRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUploadAssetMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Generates a signed url for downloading the asset.
+     * For video warehouse, please see comment of UploadAsset about how to allow
+     * retrieval of cloud storage files in a different project.
+     * 
+ */ + public void generateRetrievalUrl( + com.google.cloud.visionai.v1.GenerateRetrievalUrlRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGenerateRetrievalUrlMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Analyze asset to power search capability.
+     * 
+ */ + public void analyzeAsset( + com.google.cloud.visionai.v1.AnalyzeAssetRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getAnalyzeAssetMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Index one asset for search.
+     * Supported corpus type: Corpus.Type.VIDEO_ON_DEMAND
+     * 
+ */ + public void indexAsset( + com.google.cloud.visionai.v1.IndexAssetRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getIndexAssetMethod(), getCallOptions()), request, responseObserver); + } + + /** + * + * + *
+     * Remove one asset's index data for search.
+     * Supported corpus type: Corpus.Type.VIDEO_ON_DEMAND
+     * 
+ */ + public void removeIndexAsset( + com.google.cloud.visionai.v1.RemoveIndexAssetRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getRemoveIndexAssetMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Lists assets inside an index.
+     * 
+ */ + public void viewIndexedAssets( + com.google.cloud.visionai.v1.ViewIndexedAssetsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getViewIndexedAssetsMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Creates an Index under the corpus.
+     * 
+ */ + public void createIndex( + com.google.cloud.visionai.v1.CreateIndexRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreateIndexMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Updates an Index under the corpus.
+     * Users can perform a metadata-only update or trigger a full index rebuild
+     * with different update_mask values.
+     * 
+ */ + public void updateIndex( + com.google.cloud.visionai.v1.UpdateIndexRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUpdateIndexMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Gets the details of a single Index under a Corpus.
+     * 
+ */ + public void getIndex( + com.google.cloud.visionai.v1.GetIndexRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetIndexMethod(), getCallOptions()), request, responseObserver); + } + + /** + * + * + *
+     * List all Indexes in a given Corpus.
+     * 
+ */ + public void listIndexes( + com.google.cloud.visionai.v1.ListIndexesRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListIndexesMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Delete a single Index. In order to delete an index, the caller must
+     * make sure that it is not deployed to any index endpoint.
+     * 
+ */ + public void deleteIndex( + com.google.cloud.visionai.v1.DeleteIndexRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeleteIndexMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Creates a corpus inside a project.
+     * 
+ */ + public void createCorpus( + com.google.cloud.visionai.v1.CreateCorpusRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreateCorpusMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Gets corpus details inside a project.
+     * 
+ */ + public void getCorpus( + com.google.cloud.visionai.v1.GetCorpusRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetCorpusMethod(), getCallOptions()), request, responseObserver); + } + + /** + * + * + *
+     * Updates a corpus in a project.
+     * 
+ */ + public void updateCorpus( + com.google.cloud.visionai.v1.UpdateCorpusRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUpdateCorpusMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Lists all corpora in a project.
+     * 
+ */ + public void listCorpora( + com.google.cloud.visionai.v1.ListCorporaRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListCorporaMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Deletes a corpus only if its empty.
+     * Returns empty response.
+     * 
+ */ + public void deleteCorpus( + com.google.cloud.visionai.v1.DeleteCorpusRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeleteCorpusMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Analyzes a corpus.
+     * 
+ */ + public void analyzeCorpus( + com.google.cloud.visionai.v1.AnalyzeCorpusRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getAnalyzeCorpusMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Creates data schema inside corpus.
+     * 
+ */ + public void createDataSchema( + com.google.cloud.visionai.v1.CreateDataSchemaRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreateDataSchemaMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Updates data schema inside corpus.
+     * 
+ */ + public void updateDataSchema( + com.google.cloud.visionai.v1.UpdateDataSchemaRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUpdateDataSchemaMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Gets data schema inside corpus.
+     * 
+ */ + public void getDataSchema( + com.google.cloud.visionai.v1.GetDataSchemaRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetDataSchemaMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Deletes data schema inside corpus.
+     * 
+ */ + public void deleteDataSchema( + com.google.cloud.visionai.v1.DeleteDataSchemaRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeleteDataSchemaMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Lists a list of data schemas inside corpus.
+     * 
+ */ + public void listDataSchemas( + com.google.cloud.visionai.v1.ListDataSchemasRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListDataSchemasMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Creates annotation inside asset.
+     * 
+ */ + public void createAnnotation( + com.google.cloud.visionai.v1.CreateAnnotationRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreateAnnotationMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Reads annotation inside asset.
+     * 
+ */ + public void getAnnotation( + com.google.cloud.visionai.v1.GetAnnotationRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetAnnotationMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Lists a list of annotations inside asset.
+     * 
+ */ + public void listAnnotations( + com.google.cloud.visionai.v1.ListAnnotationsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListAnnotationsMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Updates annotation inside asset.
+     * 
+ */ + public void updateAnnotation( + com.google.cloud.visionai.v1.UpdateAnnotationRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUpdateAnnotationMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Deletes annotation inside asset.
+     * 
+ */ + public void deleteAnnotation( + com.google.cloud.visionai.v1.DeleteAnnotationRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeleteAnnotationMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Ingests data for the asset. It is not allowed to ingest a data chunk which
+     * is already expired according to TTL.
+     * This method is only available via the gRPC API (not HTTP since
+     * bi-directional streaming is not supported via HTTP).
+     * 
+ */ + public io.grpc.stub.StreamObserver ingestAsset( + io.grpc.stub.StreamObserver + responseObserver) { + return io.grpc.stub.ClientCalls.asyncBidiStreamingCall( + getChannel().newCall(getIngestAssetMethod(), getCallOptions()), responseObserver); + } + + /** + * + * + *
+     * Generates clips for downloading. The api takes in a time range, and
+     * generates a clip of the first content available after start_time and
+     * before end_time, which may overflow beyond these bounds.
+     * Returned clips are truncated if the total size of the clips are larger
+     * than 100MB.
+     * 
+ */ + public void clipAsset( + com.google.cloud.visionai.v1.ClipAssetRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getClipAssetMethod(), getCallOptions()), request, responseObserver); + } + + /** + * + * + *
+     * Generates a uri for an HLS manifest. The api takes in a collection of time
+     * ranges, and generates a URI for an HLS manifest that covers all the
+     * requested time ranges.
+     * 
+ */ + public void generateHlsUri( + com.google.cloud.visionai.v1.GenerateHlsUriRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGenerateHlsUriMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Imports assets (images plus annotations) from a meta file on cloud storage.
+     * Each row in the meta file is corresponding to an image (specified by a
+     * cloud storage uri) and its annotations.
+     * 
+ */ + public void importAssets( + com.google.cloud.visionai.v1.ImportAssetsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getImportAssetsMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Creates a search configuration inside a corpus.
+     * Please follow the rules below to create a valid CreateSearchConfigRequest.
+     * --- General Rules ---
+     * 1. Request.search_config_id must not be associated with an existing
+     *    SearchConfig.
+     * 2. Request must contain at least one non-empty search_criteria_property or
+     *    facet_property.
+     * 3. mapped_fields must not be empty, and must map to existing UGA keys.
+     * 4. All mapped_fields must be of the same type.
+     * 5. All mapped_fields must share the same granularity.
+     * 6. All mapped_fields must share the same semantic SearchConfig match
+     *    options.
+     * For property-specific rules, please reference the comments for
+     * FacetProperty and SearchCriteriaProperty.
+     * 
+ */ + public void createSearchConfig( + com.google.cloud.visionai.v1.CreateSearchConfigRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreateSearchConfigMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Updates a search configuration inside a corpus.
+     * Please follow the rules below to create a valid UpdateSearchConfigRequest.
+     * --- General Rules ---
+     * 1. Request.search_configuration.name must already exist.
+     * 2. Request must contain at least one non-empty search_criteria_property or
+     * facet_property.
+     * 3. mapped_fields must not be empty, and must map to existing UGA keys.
+     * 4. All mapped_fields must be of the same type.
+     * 5. All mapped_fields must share the same granularity.
+     * 6. All mapped_fields must share the same semantic SearchConfig match
+     *    options.
+     * For property-specific rules, please reference the comments for
+     * FacetProperty and SearchCriteriaProperty.
+     * 
+ */ + public void updateSearchConfig( + com.google.cloud.visionai.v1.UpdateSearchConfigRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUpdateSearchConfigMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Gets a search configuration inside a corpus.
+     * 
+ */ + public void getSearchConfig( + com.google.cloud.visionai.v1.GetSearchConfigRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetSearchConfigMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Deletes a search configuration inside a corpus.
+     * For a DeleteSearchConfigRequest to be valid,
+     * Request.search_configuration.name must already exist.
+     * 
+ */ + public void deleteSearchConfig( + com.google.cloud.visionai.v1.DeleteSearchConfigRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeleteSearchConfigMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Lists all search configurations inside a corpus.
+     * 
+ */ + public void listSearchConfigs( + com.google.cloud.visionai.v1.ListSearchConfigsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListSearchConfigsMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Creates a SearchHypernym inside a corpus.
+     * 
+ */ + public void createSearchHypernym( + com.google.cloud.visionai.v1.CreateSearchHypernymRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreateSearchHypernymMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Updates a SearchHypernym inside a corpus.
+     * 
+ */ + public void updateSearchHypernym( + com.google.cloud.visionai.v1.UpdateSearchHypernymRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUpdateSearchHypernymMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Gets a SearchHypernym inside a corpus.
+     * 
+ */ + public void getSearchHypernym( + com.google.cloud.visionai.v1.GetSearchHypernymRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetSearchHypernymMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Deletes a SearchHypernym inside a corpus.
+     * 
+ */ + public void deleteSearchHypernym( + com.google.cloud.visionai.v1.DeleteSearchHypernymRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeleteSearchHypernymMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Lists SearchHypernyms inside a corpus.
+     * 
+ */ + public void listSearchHypernyms( + com.google.cloud.visionai.v1.ListSearchHypernymsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListSearchHypernymsMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Search media asset.
+     * 
+ */ + public void searchAssets( + com.google.cloud.visionai.v1.SearchAssetsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getSearchAssetsMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Search a deployed index endpoint (IMAGE corpus type only).
+     * 
+ */ + public void searchIndexEndpoint( + com.google.cloud.visionai.v1.SearchIndexEndpointRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getSearchIndexEndpointMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Creates an IndexEndpoint.
+     * 
+ */ + public void createIndexEndpoint( + com.google.cloud.visionai.v1.CreateIndexEndpointRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreateIndexEndpointMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Gets an IndexEndpoint.
+     * 
+ */ + public void getIndexEndpoint( + com.google.cloud.visionai.v1.GetIndexEndpointRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetIndexEndpointMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Lists all IndexEndpoints in a project.
+     * 
+ */ + public void listIndexEndpoints( + com.google.cloud.visionai.v1.ListIndexEndpointsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListIndexEndpointsMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Updates an IndexEndpoint.
+     * 
+ */ + public void updateIndexEndpoint( + com.google.cloud.visionai.v1.UpdateIndexEndpointRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUpdateIndexEndpointMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Deletes an IndexEndpoint.
+     * 
+ */ + public void deleteIndexEndpoint( + com.google.cloud.visionai.v1.DeleteIndexEndpointRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeleteIndexEndpointMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Deploys an Index to IndexEndpoint.
+     * 
+ */ + public void deployIndex( + com.google.cloud.visionai.v1.DeployIndexRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeployIndexMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Undeploys an Index from IndexEndpoint.
+     * 
+ */ + public void undeployIndex( + com.google.cloud.visionai.v1.UndeployIndexRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUndeployIndexMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Creates a collection.
+     * 
+ */ + public void createCollection( + com.google.cloud.visionai.v1.CreateCollectionRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreateCollectionMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Deletes a collection.
+     * 
+ */ + public void deleteCollection( + com.google.cloud.visionai.v1.DeleteCollectionRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeleteCollectionMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Gets a collection.
+     * 
+ */ + public void getCollection( + com.google.cloud.visionai.v1.GetCollectionRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetCollectionMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Updates a collection.
+     * 
+ */ + public void updateCollection( + com.google.cloud.visionai.v1.UpdateCollectionRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUpdateCollectionMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Lists collections inside a corpus.
+     * 
+ */ + public void listCollections( + com.google.cloud.visionai.v1.ListCollectionsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListCollectionsMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Adds an item into a Collection.
+     * 
+ */ + public void addCollectionItem( + com.google.cloud.visionai.v1.AddCollectionItemRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getAddCollectionItemMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Removes an item from a collection.
+     * 
+ */ + public void removeCollectionItem( + com.google.cloud.visionai.v1.RemoveCollectionItemRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getRemoveCollectionItemMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * View items inside a collection.
+     * 
+ */ + public void viewCollectionItems( + com.google.cloud.visionai.v1.ViewCollectionItemsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getViewCollectionItemsMethod(), getCallOptions()), + request, + responseObserver); + } + } + + /** + * A stub to allow clients to do synchronous rpc calls to service Warehouse. + * + *
+   * Service that manages media content + metadata for streaming.
+   * 
+ */ + public static final class WarehouseBlockingStub + extends io.grpc.stub.AbstractBlockingStub { + private WarehouseBlockingStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected WarehouseBlockingStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new WarehouseBlockingStub(channel, callOptions); + } + + /** + * + * + *
+     * Creates an asset inside corpus.
+     * 
+ */ + public com.google.cloud.visionai.v1.Asset createAsset( + com.google.cloud.visionai.v1.CreateAssetRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreateAssetMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Updates an asset inside corpus.
+     * 
+ */ + public com.google.cloud.visionai.v1.Asset updateAsset( + com.google.cloud.visionai.v1.UpdateAssetRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpdateAssetMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Reads an asset inside corpus.
+     * 
+ */ + public com.google.cloud.visionai.v1.Asset getAsset( + com.google.cloud.visionai.v1.GetAssetRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetAssetMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lists an list of assets inside corpus.
+     * 
+ */ + public com.google.cloud.visionai.v1.ListAssetsResponse listAssets( + com.google.cloud.visionai.v1.ListAssetsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListAssetsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Deletes asset inside corpus.
+     * 
+ */ + public com.google.longrunning.Operation deleteAsset( + com.google.cloud.visionai.v1.DeleteAssetRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeleteAssetMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Upload asset by specifing the asset Cloud Storage uri.
+     * For video warehouse, it requires users who call this API have read access
+     * to the cloud storage file. Once it is uploaded, it can be retrieved by
+     * GenerateRetrievalUrl API which by default, only can retrieve cloud storage
+     * files from the same project of the warehouse. To allow retrieval cloud
+     * storage files that are in a separate project, it requires to find the
+     * vision ai service account (Go to IAM, check checkbox to show "Include
+     * Google-provided role grants", search for "Cloud Vision AI Service Agent")
+     * and grant the read access of the cloud storage files to that service
+     * account.
+     * 
+ */ + public com.google.longrunning.Operation uploadAsset( + com.google.cloud.visionai.v1.UploadAssetRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUploadAssetMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Generates a signed url for downloading the asset.
+     * For video warehouse, please see comment of UploadAsset about how to allow
+     * retrieval of cloud storage files in a different project.
+     * 
+ */ + public com.google.cloud.visionai.v1.GenerateRetrievalUrlResponse generateRetrievalUrl( + com.google.cloud.visionai.v1.GenerateRetrievalUrlRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGenerateRetrievalUrlMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Analyze asset to power search capability.
+     * 
+ */ + public com.google.longrunning.Operation analyzeAsset( + com.google.cloud.visionai.v1.AnalyzeAssetRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getAnalyzeAssetMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Index one asset for search.
+     * Supported corpus type: Corpus.Type.VIDEO_ON_DEMAND
+     * 
+ */ + public com.google.longrunning.Operation indexAsset( + com.google.cloud.visionai.v1.IndexAssetRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getIndexAssetMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Remove one asset's index data for search.
+     * Supported corpus type: Corpus.Type.VIDEO_ON_DEMAND
+     * 
+ */ + public com.google.longrunning.Operation removeIndexAsset( + com.google.cloud.visionai.v1.RemoveIndexAssetRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getRemoveIndexAssetMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lists assets inside an index.
+     * 
+ */ + public com.google.cloud.visionai.v1.ViewIndexedAssetsResponse viewIndexedAssets( + com.google.cloud.visionai.v1.ViewIndexedAssetsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getViewIndexedAssetsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Creates an Index under the corpus.
+     * 
+ */ + public com.google.longrunning.Operation createIndex( + com.google.cloud.visionai.v1.CreateIndexRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreateIndexMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Updates an Index under the corpus.
+     * Users can perform a metadata-only update or trigger a full index rebuild
+     * with different update_mask values.
+     * 
+ */ + public com.google.longrunning.Operation updateIndex( + com.google.cloud.visionai.v1.UpdateIndexRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpdateIndexMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets the details of a single Index under a Corpus.
+     * 
+ */ + public com.google.cloud.visionai.v1.Index getIndex( + com.google.cloud.visionai.v1.GetIndexRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetIndexMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * List all Indexes in a given Corpus.
+     * 
+ */ + public com.google.cloud.visionai.v1.ListIndexesResponse listIndexes( + com.google.cloud.visionai.v1.ListIndexesRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListIndexesMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Delete a single Index. In order to delete an index, the caller must
+     * make sure that it is not deployed to any index endpoint.
+     * 
+ */ + public com.google.longrunning.Operation deleteIndex( + com.google.cloud.visionai.v1.DeleteIndexRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeleteIndexMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Creates a corpus inside a project.
+     * 
+ */ + public com.google.longrunning.Operation createCorpus( + com.google.cloud.visionai.v1.CreateCorpusRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreateCorpusMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets corpus details inside a project.
+     * 
+ */ + public com.google.cloud.visionai.v1.Corpus getCorpus( + com.google.cloud.visionai.v1.GetCorpusRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetCorpusMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Updates a corpus in a project.
+     * 
+ */ + public com.google.cloud.visionai.v1.Corpus updateCorpus( + com.google.cloud.visionai.v1.UpdateCorpusRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpdateCorpusMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lists all corpora in a project.
+     * 
+ */ + public com.google.cloud.visionai.v1.ListCorporaResponse listCorpora( + com.google.cloud.visionai.v1.ListCorporaRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListCorporaMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Deletes a corpus only if its empty.
+     * Returns empty response.
+     * 
+ */ + public com.google.protobuf.Empty deleteCorpus( + com.google.cloud.visionai.v1.DeleteCorpusRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeleteCorpusMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Analyzes a corpus.
+     * 
+ */ + public com.google.longrunning.Operation analyzeCorpus( + com.google.cloud.visionai.v1.AnalyzeCorpusRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getAnalyzeCorpusMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Creates data schema inside corpus.
+     * 
+ */ + public com.google.cloud.visionai.v1.DataSchema createDataSchema( + com.google.cloud.visionai.v1.CreateDataSchemaRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreateDataSchemaMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Updates data schema inside corpus.
+     * 
+ */ + public com.google.cloud.visionai.v1.DataSchema updateDataSchema( + com.google.cloud.visionai.v1.UpdateDataSchemaRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpdateDataSchemaMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets data schema inside corpus.
+     * 
+ */ + public com.google.cloud.visionai.v1.DataSchema getDataSchema( + com.google.cloud.visionai.v1.GetDataSchemaRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetDataSchemaMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Deletes data schema inside corpus.
+     * 
+ */ + public com.google.protobuf.Empty deleteDataSchema( + com.google.cloud.visionai.v1.DeleteDataSchemaRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeleteDataSchemaMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lists a list of data schemas inside corpus.
+     * 
+ */ + public com.google.cloud.visionai.v1.ListDataSchemasResponse listDataSchemas( + com.google.cloud.visionai.v1.ListDataSchemasRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListDataSchemasMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Creates annotation inside asset.
+     * 
+ */ + public com.google.cloud.visionai.v1.Annotation createAnnotation( + com.google.cloud.visionai.v1.CreateAnnotationRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreateAnnotationMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Reads annotation inside asset.
+     * 
+ */ + public com.google.cloud.visionai.v1.Annotation getAnnotation( + com.google.cloud.visionai.v1.GetAnnotationRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetAnnotationMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lists a list of annotations inside asset.
+     * 
+ */ + public com.google.cloud.visionai.v1.ListAnnotationsResponse listAnnotations( + com.google.cloud.visionai.v1.ListAnnotationsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListAnnotationsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Updates annotation inside asset.
+     * 
+ */ + public com.google.cloud.visionai.v1.Annotation updateAnnotation( + com.google.cloud.visionai.v1.UpdateAnnotationRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpdateAnnotationMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Deletes annotation inside asset.
+     * 
+ */ + public com.google.protobuf.Empty deleteAnnotation( + com.google.cloud.visionai.v1.DeleteAnnotationRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeleteAnnotationMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Generates clips for downloading. The api takes in a time range, and
+     * generates a clip of the first content available after start_time and
+     * before end_time, which may overflow beyond these bounds.
+     * Returned clips are truncated if the total size of the clips are larger
+     * than 100MB.
+     * 
+ */ + public com.google.cloud.visionai.v1.ClipAssetResponse clipAsset( + com.google.cloud.visionai.v1.ClipAssetRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getClipAssetMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Generates a uri for an HLS manifest. The api takes in a collection of time
+     * ranges, and generates a URI for an HLS manifest that covers all the
+     * requested time ranges.
+     * 
+ */ + public com.google.cloud.visionai.v1.GenerateHlsUriResponse generateHlsUri( + com.google.cloud.visionai.v1.GenerateHlsUriRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGenerateHlsUriMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Imports assets (images plus annotations) from a meta file on cloud storage.
+     * Each row in the meta file is corresponding to an image (specified by a
+     * cloud storage uri) and its annotations.
+     * 
+ */ + public com.google.longrunning.Operation importAssets( + com.google.cloud.visionai.v1.ImportAssetsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getImportAssetsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Creates a search configuration inside a corpus.
+     * Please follow the rules below to create a valid CreateSearchConfigRequest.
+     * --- General Rules ---
+     * 1. Request.search_config_id must not be associated with an existing
+     *    SearchConfig.
+     * 2. Request must contain at least one non-empty search_criteria_property or
+     *    facet_property.
+     * 3. mapped_fields must not be empty, and must map to existing UGA keys.
+     * 4. All mapped_fields must be of the same type.
+     * 5. All mapped_fields must share the same granularity.
+     * 6. All mapped_fields must share the same semantic SearchConfig match
+     *    options.
+     * For property-specific rules, please reference the comments for
+     * FacetProperty and SearchCriteriaProperty.
+     * 
+ */ + public com.google.cloud.visionai.v1.SearchConfig createSearchConfig( + com.google.cloud.visionai.v1.CreateSearchConfigRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreateSearchConfigMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Updates a search configuration inside a corpus.
+     * Please follow the rules below to create a valid UpdateSearchConfigRequest.
+     * --- General Rules ---
+     * 1. Request.search_configuration.name must already exist.
+     * 2. Request must contain at least one non-empty search_criteria_property or
+     * facet_property.
+     * 3. mapped_fields must not be empty, and must map to existing UGA keys.
+     * 4. All mapped_fields must be of the same type.
+     * 5. All mapped_fields must share the same granularity.
+     * 6. All mapped_fields must share the same semantic SearchConfig match
+     *    options.
+     * For property-specific rules, please reference the comments for
+     * FacetProperty and SearchCriteriaProperty.
+     * 
+ */ + public com.google.cloud.visionai.v1.SearchConfig updateSearchConfig( + com.google.cloud.visionai.v1.UpdateSearchConfigRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpdateSearchConfigMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets a search configuration inside a corpus.
+     * 
+ */ + public com.google.cloud.visionai.v1.SearchConfig getSearchConfig( + com.google.cloud.visionai.v1.GetSearchConfigRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetSearchConfigMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Deletes a search configuration inside a corpus.
+     * For a DeleteSearchConfigRequest to be valid,
+     * Request.search_configuration.name must already exist.
+     * 
+ */ + public com.google.protobuf.Empty deleteSearchConfig( + com.google.cloud.visionai.v1.DeleteSearchConfigRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeleteSearchConfigMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lists all search configurations inside a corpus.
+     * 
+ */ + public com.google.cloud.visionai.v1.ListSearchConfigsResponse listSearchConfigs( + com.google.cloud.visionai.v1.ListSearchConfigsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListSearchConfigsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Creates a SearchHypernym inside a corpus.
+     * 
+ */ + public com.google.cloud.visionai.v1.SearchHypernym createSearchHypernym( + com.google.cloud.visionai.v1.CreateSearchHypernymRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreateSearchHypernymMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Updates a SearchHypernym inside a corpus.
+     * 
+ */ + public com.google.cloud.visionai.v1.SearchHypernym updateSearchHypernym( + com.google.cloud.visionai.v1.UpdateSearchHypernymRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpdateSearchHypernymMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets a SearchHypernym inside a corpus.
+     * 
+ */ + public com.google.cloud.visionai.v1.SearchHypernym getSearchHypernym( + com.google.cloud.visionai.v1.GetSearchHypernymRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetSearchHypernymMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Deletes a SearchHypernym inside a corpus.
+     * 
+ */ + public com.google.protobuf.Empty deleteSearchHypernym( + com.google.cloud.visionai.v1.DeleteSearchHypernymRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeleteSearchHypernymMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lists SearchHypernyms inside a corpus.
+     * 
+ */ + public com.google.cloud.visionai.v1.ListSearchHypernymsResponse listSearchHypernyms( + com.google.cloud.visionai.v1.ListSearchHypernymsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListSearchHypernymsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Search media asset.
+     * 
+ */ + public com.google.cloud.visionai.v1.SearchAssetsResponse searchAssets( + com.google.cloud.visionai.v1.SearchAssetsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getSearchAssetsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Search a deployed index endpoint (IMAGE corpus type only).
+     * 
+ */ + public com.google.cloud.visionai.v1.SearchIndexEndpointResponse searchIndexEndpoint( + com.google.cloud.visionai.v1.SearchIndexEndpointRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getSearchIndexEndpointMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Creates an IndexEndpoint.
+     * 
+ */ + public com.google.longrunning.Operation createIndexEndpoint( + com.google.cloud.visionai.v1.CreateIndexEndpointRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreateIndexEndpointMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets an IndexEndpoint.
+     * 
+ */ + public com.google.cloud.visionai.v1.IndexEndpoint getIndexEndpoint( + com.google.cloud.visionai.v1.GetIndexEndpointRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetIndexEndpointMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lists all IndexEndpoints in a project.
+     * 
+ */ + public com.google.cloud.visionai.v1.ListIndexEndpointsResponse listIndexEndpoints( + com.google.cloud.visionai.v1.ListIndexEndpointsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListIndexEndpointsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Updates an IndexEndpoint.
+     * 
+ */ + public com.google.longrunning.Operation updateIndexEndpoint( + com.google.cloud.visionai.v1.UpdateIndexEndpointRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpdateIndexEndpointMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Deletes an IndexEndpoint.
+     * 
+ */ + public com.google.longrunning.Operation deleteIndexEndpoint( + com.google.cloud.visionai.v1.DeleteIndexEndpointRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeleteIndexEndpointMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Deploys an Index to IndexEndpoint.
+     * 
+ */ + public com.google.longrunning.Operation deployIndex( + com.google.cloud.visionai.v1.DeployIndexRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeployIndexMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Undeploys an Index from IndexEndpoint.
+     * 
+ */ + public com.google.longrunning.Operation undeployIndex( + com.google.cloud.visionai.v1.UndeployIndexRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUndeployIndexMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Creates a collection.
+     * 
+ */ + public com.google.longrunning.Operation createCollection( + com.google.cloud.visionai.v1.CreateCollectionRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreateCollectionMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Deletes a collection.
+     * 
+ */ + public com.google.longrunning.Operation deleteCollection( + com.google.cloud.visionai.v1.DeleteCollectionRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeleteCollectionMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets a collection.
+     * 
+ */ + public com.google.cloud.visionai.v1.Collection getCollection( + com.google.cloud.visionai.v1.GetCollectionRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetCollectionMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Updates a collection.
+     * 
+ */ + public com.google.cloud.visionai.v1.Collection updateCollection( + com.google.cloud.visionai.v1.UpdateCollectionRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpdateCollectionMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lists collections inside a corpus.
+     * 
+ */ + public com.google.cloud.visionai.v1.ListCollectionsResponse listCollections( + com.google.cloud.visionai.v1.ListCollectionsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListCollectionsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Adds an item into a Collection.
+     * 
+ */ + public com.google.cloud.visionai.v1.AddCollectionItemResponse addCollectionItem( + com.google.cloud.visionai.v1.AddCollectionItemRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getAddCollectionItemMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Removes an item from a collection.
+     * 
+ */ + public com.google.cloud.visionai.v1.RemoveCollectionItemResponse removeCollectionItem( + com.google.cloud.visionai.v1.RemoveCollectionItemRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getRemoveCollectionItemMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * View items inside a collection.
+     * 
+ */ + public com.google.cloud.visionai.v1.ViewCollectionItemsResponse viewCollectionItems( + com.google.cloud.visionai.v1.ViewCollectionItemsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getViewCollectionItemsMethod(), getCallOptions(), request); + } + } + + /** + * A stub to allow clients to do ListenableFuture-style rpc calls to service Warehouse. + * + *
+   * Service that manages media content + metadata for streaming.
+   * 
+ */ + public static final class WarehouseFutureStub + extends io.grpc.stub.AbstractFutureStub { + private WarehouseFutureStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected WarehouseFutureStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new WarehouseFutureStub(channel, callOptions); + } + + /** + * + * + *
+     * Creates an asset inside corpus.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + createAsset(com.google.cloud.visionai.v1.CreateAssetRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreateAssetMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Updates an asset inside corpus.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + updateAsset(com.google.cloud.visionai.v1.UpdateAssetRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUpdateAssetMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Reads an asset inside corpus.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + getAsset(com.google.cloud.visionai.v1.GetAssetRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetAssetMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Lists an list of assets inside corpus.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.visionai.v1.ListAssetsResponse> + listAssets(com.google.cloud.visionai.v1.ListAssetsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListAssetsMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Deletes asset inside corpus.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + deleteAsset(com.google.cloud.visionai.v1.DeleteAssetRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDeleteAssetMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Upload asset by specifing the asset Cloud Storage uri.
+     * For video warehouse, it requires users who call this API have read access
+     * to the cloud storage file. Once it is uploaded, it can be retrieved by
+     * GenerateRetrievalUrl API which by default, only can retrieve cloud storage
+     * files from the same project of the warehouse. To allow retrieval cloud
+     * storage files that are in a separate project, it requires to find the
+     * vision ai service account (Go to IAM, check checkbox to show "Include
+     * Google-provided role grants", search for "Cloud Vision AI Service Agent")
+     * and grant the read access of the cloud storage files to that service
+     * account.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + uploadAsset(com.google.cloud.visionai.v1.UploadAssetRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUploadAssetMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Generates a signed url for downloading the asset.
+     * For video warehouse, please see comment of UploadAsset about how to allow
+     * retrieval of cloud storage files in a different project.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.visionai.v1.GenerateRetrievalUrlResponse> + generateRetrievalUrl(com.google.cloud.visionai.v1.GenerateRetrievalUrlRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGenerateRetrievalUrlMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Analyze asset to power search capability.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + analyzeAsset(com.google.cloud.visionai.v1.AnalyzeAssetRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getAnalyzeAssetMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Index one asset for search.
+     * Supported corpus type: Corpus.Type.VIDEO_ON_DEMAND
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + indexAsset(com.google.cloud.visionai.v1.IndexAssetRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getIndexAssetMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Remove one asset's index data for search.
+     * Supported corpus type: Corpus.Type.VIDEO_ON_DEMAND
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + removeIndexAsset(com.google.cloud.visionai.v1.RemoveIndexAssetRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getRemoveIndexAssetMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Lists assets inside an index.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.visionai.v1.ViewIndexedAssetsResponse> + viewIndexedAssets(com.google.cloud.visionai.v1.ViewIndexedAssetsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getViewIndexedAssetsMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Creates an Index under the corpus.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + createIndex(com.google.cloud.visionai.v1.CreateIndexRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreateIndexMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Updates an Index under the corpus.
+     * Users can perform a metadata-only update or trigger a full index rebuild
+     * with different update_mask values.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + updateIndex(com.google.cloud.visionai.v1.UpdateIndexRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUpdateIndexMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Gets the details of a single Index under a Corpus.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + getIndex(com.google.cloud.visionai.v1.GetIndexRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetIndexMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * List all Indexes in a given Corpus.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.visionai.v1.ListIndexesResponse> + listIndexes(com.google.cloud.visionai.v1.ListIndexesRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListIndexesMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Delete a single Index. In order to delete an index, the caller must
+     * make sure that it is not deployed to any index endpoint.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + deleteIndex(com.google.cloud.visionai.v1.DeleteIndexRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDeleteIndexMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Creates a corpus inside a project.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + createCorpus(com.google.cloud.visionai.v1.CreateCorpusRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreateCorpusMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Gets corpus details inside a project.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + getCorpus(com.google.cloud.visionai.v1.GetCorpusRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetCorpusMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Updates a corpus in a project.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + updateCorpus(com.google.cloud.visionai.v1.UpdateCorpusRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUpdateCorpusMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Lists all corpora in a project.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.visionai.v1.ListCorporaResponse> + listCorpora(com.google.cloud.visionai.v1.ListCorporaRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListCorporaMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Deletes a corpus only if its empty.
+     * Returns empty response.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + deleteCorpus(com.google.cloud.visionai.v1.DeleteCorpusRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDeleteCorpusMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Analyzes a corpus.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + analyzeCorpus(com.google.cloud.visionai.v1.AnalyzeCorpusRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getAnalyzeCorpusMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Creates data schema inside corpus.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.visionai.v1.DataSchema> + createDataSchema(com.google.cloud.visionai.v1.CreateDataSchemaRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreateDataSchemaMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Updates data schema inside corpus.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.visionai.v1.DataSchema> + updateDataSchema(com.google.cloud.visionai.v1.UpdateDataSchemaRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUpdateDataSchemaMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Gets data schema inside corpus.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.visionai.v1.DataSchema> + getDataSchema(com.google.cloud.visionai.v1.GetDataSchemaRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetDataSchemaMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Deletes data schema inside corpus.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + deleteDataSchema(com.google.cloud.visionai.v1.DeleteDataSchemaRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDeleteDataSchemaMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Lists a list of data schemas inside corpus.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.visionai.v1.ListDataSchemasResponse> + listDataSchemas(com.google.cloud.visionai.v1.ListDataSchemasRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListDataSchemasMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Creates annotation inside asset.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.visionai.v1.Annotation> + createAnnotation(com.google.cloud.visionai.v1.CreateAnnotationRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreateAnnotationMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Reads annotation inside asset.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.visionai.v1.Annotation> + getAnnotation(com.google.cloud.visionai.v1.GetAnnotationRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetAnnotationMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Lists a list of annotations inside asset.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.visionai.v1.ListAnnotationsResponse> + listAnnotations(com.google.cloud.visionai.v1.ListAnnotationsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListAnnotationsMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Updates annotation inside asset.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.visionai.v1.Annotation> + updateAnnotation(com.google.cloud.visionai.v1.UpdateAnnotationRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUpdateAnnotationMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Deletes annotation inside asset.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + deleteAnnotation(com.google.cloud.visionai.v1.DeleteAnnotationRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDeleteAnnotationMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Generates clips for downloading. The api takes in a time range, and
+     * generates a clip of the first content available after start_time and
+     * before end_time, which may overflow beyond these bounds.
+     * Returned clips are truncated if the total size of the clips are larger
+     * than 100MB.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.visionai.v1.ClipAssetResponse> + clipAsset(com.google.cloud.visionai.v1.ClipAssetRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getClipAssetMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Generates a uri for an HLS manifest. The api takes in a collection of time
+     * ranges, and generates a URI for an HLS manifest that covers all the
+     * requested time ranges.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.visionai.v1.GenerateHlsUriResponse> + generateHlsUri(com.google.cloud.visionai.v1.GenerateHlsUriRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGenerateHlsUriMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Imports assets (images plus annotations) from a meta file on cloud storage.
+     * Each row in the meta file is corresponding to an image (specified by a
+     * cloud storage uri) and its annotations.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + importAssets(com.google.cloud.visionai.v1.ImportAssetsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getImportAssetsMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Creates a search configuration inside a corpus.
+     * Please follow the rules below to create a valid CreateSearchConfigRequest.
+     * --- General Rules ---
+     * 1. Request.search_config_id must not be associated with an existing
+     *    SearchConfig.
+     * 2. Request must contain at least one non-empty search_criteria_property or
+     *    facet_property.
+     * 3. mapped_fields must not be empty, and must map to existing UGA keys.
+     * 4. All mapped_fields must be of the same type.
+     * 5. All mapped_fields must share the same granularity.
+     * 6. All mapped_fields must share the same semantic SearchConfig match
+     *    options.
+     * For property-specific rules, please reference the comments for
+     * FacetProperty and SearchCriteriaProperty.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.visionai.v1.SearchConfig> + createSearchConfig(com.google.cloud.visionai.v1.CreateSearchConfigRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreateSearchConfigMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Updates a search configuration inside a corpus.
+     * Please follow the rules below to create a valid UpdateSearchConfigRequest.
+     * --- General Rules ---
+     * 1. Request.search_configuration.name must already exist.
+     * 2. Request must contain at least one non-empty search_criteria_property or
+     * facet_property.
+     * 3. mapped_fields must not be empty, and must map to existing UGA keys.
+     * 4. All mapped_fields must be of the same type.
+     * 5. All mapped_fields must share the same granularity.
+     * 6. All mapped_fields must share the same semantic SearchConfig match
+     *    options.
+     * For property-specific rules, please reference the comments for
+     * FacetProperty and SearchCriteriaProperty.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.visionai.v1.SearchConfig> + updateSearchConfig(com.google.cloud.visionai.v1.UpdateSearchConfigRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUpdateSearchConfigMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Gets a search configuration inside a corpus.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.visionai.v1.SearchConfig> + getSearchConfig(com.google.cloud.visionai.v1.GetSearchConfigRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetSearchConfigMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Deletes a search configuration inside a corpus.
+     * For a DeleteSearchConfigRequest to be valid,
+     * Request.search_configuration.name must already exist.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + deleteSearchConfig(com.google.cloud.visionai.v1.DeleteSearchConfigRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDeleteSearchConfigMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Lists all search configurations inside a corpus.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.visionai.v1.ListSearchConfigsResponse> + listSearchConfigs(com.google.cloud.visionai.v1.ListSearchConfigsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListSearchConfigsMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Creates a SearchHypernym inside a corpus.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.visionai.v1.SearchHypernym> + createSearchHypernym(com.google.cloud.visionai.v1.CreateSearchHypernymRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreateSearchHypernymMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Updates a SearchHypernym inside a corpus.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.visionai.v1.SearchHypernym> + updateSearchHypernym(com.google.cloud.visionai.v1.UpdateSearchHypernymRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUpdateSearchHypernymMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Gets a SearchHypernym inside a corpus.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.visionai.v1.SearchHypernym> + getSearchHypernym(com.google.cloud.visionai.v1.GetSearchHypernymRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetSearchHypernymMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Deletes a SearchHypernym inside a corpus.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + deleteSearchHypernym(com.google.cloud.visionai.v1.DeleteSearchHypernymRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDeleteSearchHypernymMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Lists SearchHypernyms inside a corpus.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.visionai.v1.ListSearchHypernymsResponse> + listSearchHypernyms(com.google.cloud.visionai.v1.ListSearchHypernymsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListSearchHypernymsMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Search media asset.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.visionai.v1.SearchAssetsResponse> + searchAssets(com.google.cloud.visionai.v1.SearchAssetsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getSearchAssetsMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Search a deployed index endpoint (IMAGE corpus type only).
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.visionai.v1.SearchIndexEndpointResponse> + searchIndexEndpoint(com.google.cloud.visionai.v1.SearchIndexEndpointRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getSearchIndexEndpointMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Creates an IndexEndpoint.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + createIndexEndpoint(com.google.cloud.visionai.v1.CreateIndexEndpointRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreateIndexEndpointMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Gets an IndexEndpoint.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.visionai.v1.IndexEndpoint> + getIndexEndpoint(com.google.cloud.visionai.v1.GetIndexEndpointRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetIndexEndpointMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Lists all IndexEndpoints in a project.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.visionai.v1.ListIndexEndpointsResponse> + listIndexEndpoints(com.google.cloud.visionai.v1.ListIndexEndpointsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListIndexEndpointsMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Updates an IndexEndpoint.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + updateIndexEndpoint(com.google.cloud.visionai.v1.UpdateIndexEndpointRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUpdateIndexEndpointMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Deletes an IndexEndpoint.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + deleteIndexEndpoint(com.google.cloud.visionai.v1.DeleteIndexEndpointRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDeleteIndexEndpointMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Deploys an Index to IndexEndpoint.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + deployIndex(com.google.cloud.visionai.v1.DeployIndexRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDeployIndexMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Undeploys an Index from IndexEndpoint.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + undeployIndex(com.google.cloud.visionai.v1.UndeployIndexRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUndeployIndexMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Creates a collection.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + createCollection(com.google.cloud.visionai.v1.CreateCollectionRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreateCollectionMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Deletes a collection.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + deleteCollection(com.google.cloud.visionai.v1.DeleteCollectionRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDeleteCollectionMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Gets a collection.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.visionai.v1.Collection> + getCollection(com.google.cloud.visionai.v1.GetCollectionRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetCollectionMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Updates a collection.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.visionai.v1.Collection> + updateCollection(com.google.cloud.visionai.v1.UpdateCollectionRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUpdateCollectionMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Lists collections inside a corpus.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.visionai.v1.ListCollectionsResponse> + listCollections(com.google.cloud.visionai.v1.ListCollectionsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListCollectionsMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Adds an item into a Collection.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.visionai.v1.AddCollectionItemResponse> + addCollectionItem(com.google.cloud.visionai.v1.AddCollectionItemRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getAddCollectionItemMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Removes an item from a collection.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.visionai.v1.RemoveCollectionItemResponse> + removeCollectionItem(com.google.cloud.visionai.v1.RemoveCollectionItemRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getRemoveCollectionItemMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * View items inside a collection.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.visionai.v1.ViewCollectionItemsResponse> + viewCollectionItems(com.google.cloud.visionai.v1.ViewCollectionItemsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getViewCollectionItemsMethod(), getCallOptions()), request); + } + } + + private static final int METHODID_CREATE_ASSET = 0; + private static final int METHODID_UPDATE_ASSET = 1; + private static final int METHODID_GET_ASSET = 2; + private static final int METHODID_LIST_ASSETS = 3; + private static final int METHODID_DELETE_ASSET = 4; + private static final int METHODID_UPLOAD_ASSET = 5; + private static final int METHODID_GENERATE_RETRIEVAL_URL = 6; + private static final int METHODID_ANALYZE_ASSET = 7; + private static final int METHODID_INDEX_ASSET = 8; + private static final int METHODID_REMOVE_INDEX_ASSET = 9; + private static final int METHODID_VIEW_INDEXED_ASSETS = 10; + private static final int METHODID_CREATE_INDEX = 11; + private static final int METHODID_UPDATE_INDEX = 12; + private static final int METHODID_GET_INDEX = 13; + private static final int METHODID_LIST_INDEXES = 14; + private static final int METHODID_DELETE_INDEX = 15; + private static final int METHODID_CREATE_CORPUS = 16; + private static final int METHODID_GET_CORPUS = 17; + private static final int METHODID_UPDATE_CORPUS = 18; + private static final int METHODID_LIST_CORPORA = 19; + private static final int METHODID_DELETE_CORPUS = 20; + private static final int METHODID_ANALYZE_CORPUS = 21; + private static final int METHODID_CREATE_DATA_SCHEMA = 22; + private static final int METHODID_UPDATE_DATA_SCHEMA = 23; + private static final int METHODID_GET_DATA_SCHEMA = 24; + private static final int METHODID_DELETE_DATA_SCHEMA = 25; + private static final int METHODID_LIST_DATA_SCHEMAS = 26; + private static final int METHODID_CREATE_ANNOTATION = 27; + private static final int METHODID_GET_ANNOTATION = 28; + private static final int METHODID_LIST_ANNOTATIONS = 29; + private static final int METHODID_UPDATE_ANNOTATION = 30; + private static final int METHODID_DELETE_ANNOTATION = 31; + private static final int METHODID_CLIP_ASSET = 32; + private static final int METHODID_GENERATE_HLS_URI = 33; + private static final int METHODID_IMPORT_ASSETS = 34; + private static final int METHODID_CREATE_SEARCH_CONFIG = 35; + private static final int METHODID_UPDATE_SEARCH_CONFIG = 36; + private static final int METHODID_GET_SEARCH_CONFIG = 37; + private static final int METHODID_DELETE_SEARCH_CONFIG = 38; + private static final int METHODID_LIST_SEARCH_CONFIGS = 39; + private static final int METHODID_CREATE_SEARCH_HYPERNYM = 40; + private static final int METHODID_UPDATE_SEARCH_HYPERNYM = 41; + private static final int METHODID_GET_SEARCH_HYPERNYM = 42; + private static final int METHODID_DELETE_SEARCH_HYPERNYM = 43; + private static final int METHODID_LIST_SEARCH_HYPERNYMS = 44; + private static final int METHODID_SEARCH_ASSETS = 45; + private static final int METHODID_SEARCH_INDEX_ENDPOINT = 46; + private static final int METHODID_CREATE_INDEX_ENDPOINT = 47; + private static final int METHODID_GET_INDEX_ENDPOINT = 48; + private static final int METHODID_LIST_INDEX_ENDPOINTS = 49; + private static final int METHODID_UPDATE_INDEX_ENDPOINT = 50; + private static final int METHODID_DELETE_INDEX_ENDPOINT = 51; + private static final int METHODID_DEPLOY_INDEX = 52; + private static final int METHODID_UNDEPLOY_INDEX = 53; + private static final int METHODID_CREATE_COLLECTION = 54; + private static final int METHODID_DELETE_COLLECTION = 55; + private static final int METHODID_GET_COLLECTION = 56; + private static final int METHODID_UPDATE_COLLECTION = 57; + private static final int METHODID_LIST_COLLECTIONS = 58; + private static final int METHODID_ADD_COLLECTION_ITEM = 59; + private static final int METHODID_REMOVE_COLLECTION_ITEM = 60; + private static final int METHODID_VIEW_COLLECTION_ITEMS = 61; + private static final int METHODID_INGEST_ASSET = 62; + + 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 AsyncService serviceImpl; + private final int methodId; + + MethodHandlers(AsyncService 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_CREATE_ASSET: + serviceImpl.createAsset( + (com.google.cloud.visionai.v1.CreateAssetRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_UPDATE_ASSET: + serviceImpl.updateAsset( + (com.google.cloud.visionai.v1.UpdateAssetRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_ASSET: + serviceImpl.getAsset( + (com.google.cloud.visionai.v1.GetAssetRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_LIST_ASSETS: + serviceImpl.listAssets( + (com.google.cloud.visionai.v1.ListAssetsRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_DELETE_ASSET: + serviceImpl.deleteAsset( + (com.google.cloud.visionai.v1.DeleteAssetRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_UPLOAD_ASSET: + serviceImpl.uploadAsset( + (com.google.cloud.visionai.v1.UploadAssetRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GENERATE_RETRIEVAL_URL: + serviceImpl.generateRetrievalUrl( + (com.google.cloud.visionai.v1.GenerateRetrievalUrlRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.visionai.v1.GenerateRetrievalUrlResponse>) + responseObserver); + break; + case METHODID_ANALYZE_ASSET: + serviceImpl.analyzeAsset( + (com.google.cloud.visionai.v1.AnalyzeAssetRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_INDEX_ASSET: + serviceImpl.indexAsset( + (com.google.cloud.visionai.v1.IndexAssetRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_REMOVE_INDEX_ASSET: + serviceImpl.removeIndexAsset( + (com.google.cloud.visionai.v1.RemoveIndexAssetRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_VIEW_INDEXED_ASSETS: + serviceImpl.viewIndexedAssets( + (com.google.cloud.visionai.v1.ViewIndexedAssetsRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_CREATE_INDEX: + serviceImpl.createIndex( + (com.google.cloud.visionai.v1.CreateIndexRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_UPDATE_INDEX: + serviceImpl.updateIndex( + (com.google.cloud.visionai.v1.UpdateIndexRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_INDEX: + serviceImpl.getIndex( + (com.google.cloud.visionai.v1.GetIndexRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_LIST_INDEXES: + serviceImpl.listIndexes( + (com.google.cloud.visionai.v1.ListIndexesRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_DELETE_INDEX: + serviceImpl.deleteIndex( + (com.google.cloud.visionai.v1.DeleteIndexRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_CREATE_CORPUS: + serviceImpl.createCorpus( + (com.google.cloud.visionai.v1.CreateCorpusRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_CORPUS: + serviceImpl.getCorpus( + (com.google.cloud.visionai.v1.GetCorpusRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_UPDATE_CORPUS: + serviceImpl.updateCorpus( + (com.google.cloud.visionai.v1.UpdateCorpusRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_LIST_CORPORA: + serviceImpl.listCorpora( + (com.google.cloud.visionai.v1.ListCorporaRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_DELETE_CORPUS: + serviceImpl.deleteCorpus( + (com.google.cloud.visionai.v1.DeleteCorpusRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_ANALYZE_CORPUS: + serviceImpl.analyzeCorpus( + (com.google.cloud.visionai.v1.AnalyzeCorpusRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_CREATE_DATA_SCHEMA: + serviceImpl.createDataSchema( + (com.google.cloud.visionai.v1.CreateDataSchemaRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_UPDATE_DATA_SCHEMA: + serviceImpl.updateDataSchema( + (com.google.cloud.visionai.v1.UpdateDataSchemaRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_GET_DATA_SCHEMA: + serviceImpl.getDataSchema( + (com.google.cloud.visionai.v1.GetDataSchemaRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_DELETE_DATA_SCHEMA: + serviceImpl.deleteDataSchema( + (com.google.cloud.visionai.v1.DeleteDataSchemaRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_LIST_DATA_SCHEMAS: + serviceImpl.listDataSchemas( + (com.google.cloud.visionai.v1.ListDataSchemasRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_CREATE_ANNOTATION: + serviceImpl.createAnnotation( + (com.google.cloud.visionai.v1.CreateAnnotationRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_GET_ANNOTATION: + serviceImpl.getAnnotation( + (com.google.cloud.visionai.v1.GetAnnotationRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_LIST_ANNOTATIONS: + serviceImpl.listAnnotations( + (com.google.cloud.visionai.v1.ListAnnotationsRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_UPDATE_ANNOTATION: + serviceImpl.updateAnnotation( + (com.google.cloud.visionai.v1.UpdateAnnotationRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_DELETE_ANNOTATION: + serviceImpl.deleteAnnotation( + (com.google.cloud.visionai.v1.DeleteAnnotationRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_CLIP_ASSET: + serviceImpl.clipAsset( + (com.google.cloud.visionai.v1.ClipAssetRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_GENERATE_HLS_URI: + serviceImpl.generateHlsUri( + (com.google.cloud.visionai.v1.GenerateHlsUriRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_IMPORT_ASSETS: + serviceImpl.importAssets( + (com.google.cloud.visionai.v1.ImportAssetsRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_CREATE_SEARCH_CONFIG: + serviceImpl.createSearchConfig( + (com.google.cloud.visionai.v1.CreateSearchConfigRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_UPDATE_SEARCH_CONFIG: + serviceImpl.updateSearchConfig( + (com.google.cloud.visionai.v1.UpdateSearchConfigRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_GET_SEARCH_CONFIG: + serviceImpl.getSearchConfig( + (com.google.cloud.visionai.v1.GetSearchConfigRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_DELETE_SEARCH_CONFIG: + serviceImpl.deleteSearchConfig( + (com.google.cloud.visionai.v1.DeleteSearchConfigRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_LIST_SEARCH_CONFIGS: + serviceImpl.listSearchConfigs( + (com.google.cloud.visionai.v1.ListSearchConfigsRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_CREATE_SEARCH_HYPERNYM: + serviceImpl.createSearchHypernym( + (com.google.cloud.visionai.v1.CreateSearchHypernymRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_UPDATE_SEARCH_HYPERNYM: + serviceImpl.updateSearchHypernym( + (com.google.cloud.visionai.v1.UpdateSearchHypernymRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_GET_SEARCH_HYPERNYM: + serviceImpl.getSearchHypernym( + (com.google.cloud.visionai.v1.GetSearchHypernymRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_DELETE_SEARCH_HYPERNYM: + serviceImpl.deleteSearchHypernym( + (com.google.cloud.visionai.v1.DeleteSearchHypernymRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_LIST_SEARCH_HYPERNYMS: + serviceImpl.listSearchHypernyms( + (com.google.cloud.visionai.v1.ListSearchHypernymsRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.visionai.v1.ListSearchHypernymsResponse>) + responseObserver); + break; + case METHODID_SEARCH_ASSETS: + serviceImpl.searchAssets( + (com.google.cloud.visionai.v1.SearchAssetsRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_SEARCH_INDEX_ENDPOINT: + serviceImpl.searchIndexEndpoint( + (com.google.cloud.visionai.v1.SearchIndexEndpointRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.visionai.v1.SearchIndexEndpointResponse>) + responseObserver); + break; + case METHODID_CREATE_INDEX_ENDPOINT: + serviceImpl.createIndexEndpoint( + (com.google.cloud.visionai.v1.CreateIndexEndpointRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_INDEX_ENDPOINT: + serviceImpl.getIndexEndpoint( + (com.google.cloud.visionai.v1.GetIndexEndpointRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_LIST_INDEX_ENDPOINTS: + serviceImpl.listIndexEndpoints( + (com.google.cloud.visionai.v1.ListIndexEndpointsRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_UPDATE_INDEX_ENDPOINT: + serviceImpl.updateIndexEndpoint( + (com.google.cloud.visionai.v1.UpdateIndexEndpointRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_DELETE_INDEX_ENDPOINT: + serviceImpl.deleteIndexEndpoint( + (com.google.cloud.visionai.v1.DeleteIndexEndpointRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_DEPLOY_INDEX: + serviceImpl.deployIndex( + (com.google.cloud.visionai.v1.DeployIndexRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_UNDEPLOY_INDEX: + serviceImpl.undeployIndex( + (com.google.cloud.visionai.v1.UndeployIndexRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_CREATE_COLLECTION: + serviceImpl.createCollection( + (com.google.cloud.visionai.v1.CreateCollectionRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_DELETE_COLLECTION: + serviceImpl.deleteCollection( + (com.google.cloud.visionai.v1.DeleteCollectionRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_COLLECTION: + serviceImpl.getCollection( + (com.google.cloud.visionai.v1.GetCollectionRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_UPDATE_COLLECTION: + serviceImpl.updateCollection( + (com.google.cloud.visionai.v1.UpdateCollectionRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_LIST_COLLECTIONS: + serviceImpl.listCollections( + (com.google.cloud.visionai.v1.ListCollectionsRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_ADD_COLLECTION_ITEM: + serviceImpl.addCollectionItem( + (com.google.cloud.visionai.v1.AddCollectionItemRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_REMOVE_COLLECTION_ITEM: + serviceImpl.removeCollectionItem( + (com.google.cloud.visionai.v1.RemoveCollectionItemRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.visionai.v1.RemoveCollectionItemResponse>) + responseObserver); + break; + case METHODID_VIEW_COLLECTION_ITEMS: + serviceImpl.viewCollectionItems( + (com.google.cloud.visionai.v1.ViewCollectionItemsRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.visionai.v1.ViewCollectionItemsResponse>) + 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) { + case METHODID_INGEST_ASSET: + return (io.grpc.stub.StreamObserver) + serviceImpl.ingestAsset( + (io.grpc.stub.StreamObserver) + responseObserver); + default: + throw new AssertionError(); + } + } + } + + public static final io.grpc.ServerServiceDefinition bindService(AsyncService service) { + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) + .addMethod( + getCreateAssetMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.visionai.v1.CreateAssetRequest, + com.google.cloud.visionai.v1.Asset>(service, METHODID_CREATE_ASSET))) + .addMethod( + getUpdateAssetMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.visionai.v1.UpdateAssetRequest, + com.google.cloud.visionai.v1.Asset>(service, METHODID_UPDATE_ASSET))) + .addMethod( + getGetAssetMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.visionai.v1.GetAssetRequest, + com.google.cloud.visionai.v1.Asset>(service, METHODID_GET_ASSET))) + .addMethod( + getListAssetsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.visionai.v1.ListAssetsRequest, + com.google.cloud.visionai.v1.ListAssetsResponse>( + service, METHODID_LIST_ASSETS))) + .addMethod( + getDeleteAssetMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.visionai.v1.DeleteAssetRequest, + com.google.longrunning.Operation>(service, METHODID_DELETE_ASSET))) + .addMethod( + getUploadAssetMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.visionai.v1.UploadAssetRequest, + com.google.longrunning.Operation>(service, METHODID_UPLOAD_ASSET))) + .addMethod( + getGenerateRetrievalUrlMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.visionai.v1.GenerateRetrievalUrlRequest, + com.google.cloud.visionai.v1.GenerateRetrievalUrlResponse>( + service, METHODID_GENERATE_RETRIEVAL_URL))) + .addMethod( + getAnalyzeAssetMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.visionai.v1.AnalyzeAssetRequest, + com.google.longrunning.Operation>(service, METHODID_ANALYZE_ASSET))) + .addMethod( + getIndexAssetMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.visionai.v1.IndexAssetRequest, + com.google.longrunning.Operation>(service, METHODID_INDEX_ASSET))) + .addMethod( + getRemoveIndexAssetMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.visionai.v1.RemoveIndexAssetRequest, + com.google.longrunning.Operation>(service, METHODID_REMOVE_INDEX_ASSET))) + .addMethod( + getViewIndexedAssetsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.visionai.v1.ViewIndexedAssetsRequest, + com.google.cloud.visionai.v1.ViewIndexedAssetsResponse>( + service, METHODID_VIEW_INDEXED_ASSETS))) + .addMethod( + getCreateIndexMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.visionai.v1.CreateIndexRequest, + com.google.longrunning.Operation>(service, METHODID_CREATE_INDEX))) + .addMethod( + getUpdateIndexMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.visionai.v1.UpdateIndexRequest, + com.google.longrunning.Operation>(service, METHODID_UPDATE_INDEX))) + .addMethod( + getGetIndexMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.visionai.v1.GetIndexRequest, + com.google.cloud.visionai.v1.Index>(service, METHODID_GET_INDEX))) + .addMethod( + getListIndexesMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.visionai.v1.ListIndexesRequest, + com.google.cloud.visionai.v1.ListIndexesResponse>( + service, METHODID_LIST_INDEXES))) + .addMethod( + getDeleteIndexMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.visionai.v1.DeleteIndexRequest, + com.google.longrunning.Operation>(service, METHODID_DELETE_INDEX))) + .addMethod( + getCreateCorpusMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.visionai.v1.CreateCorpusRequest, + com.google.longrunning.Operation>(service, METHODID_CREATE_CORPUS))) + .addMethod( + getGetCorpusMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.visionai.v1.GetCorpusRequest, + com.google.cloud.visionai.v1.Corpus>(service, METHODID_GET_CORPUS))) + .addMethod( + getUpdateCorpusMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.visionai.v1.UpdateCorpusRequest, + com.google.cloud.visionai.v1.Corpus>(service, METHODID_UPDATE_CORPUS))) + .addMethod( + getListCorporaMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.visionai.v1.ListCorporaRequest, + com.google.cloud.visionai.v1.ListCorporaResponse>( + service, METHODID_LIST_CORPORA))) + .addMethod( + getDeleteCorpusMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.visionai.v1.DeleteCorpusRequest, com.google.protobuf.Empty>( + service, METHODID_DELETE_CORPUS))) + .addMethod( + getAnalyzeCorpusMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.visionai.v1.AnalyzeCorpusRequest, + com.google.longrunning.Operation>(service, METHODID_ANALYZE_CORPUS))) + .addMethod( + getCreateDataSchemaMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.visionai.v1.CreateDataSchemaRequest, + com.google.cloud.visionai.v1.DataSchema>(service, METHODID_CREATE_DATA_SCHEMA))) + .addMethod( + getUpdateDataSchemaMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.visionai.v1.UpdateDataSchemaRequest, + com.google.cloud.visionai.v1.DataSchema>(service, METHODID_UPDATE_DATA_SCHEMA))) + .addMethod( + getGetDataSchemaMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.visionai.v1.GetDataSchemaRequest, + com.google.cloud.visionai.v1.DataSchema>(service, METHODID_GET_DATA_SCHEMA))) + .addMethod( + getDeleteDataSchemaMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.visionai.v1.DeleteDataSchemaRequest, + com.google.protobuf.Empty>(service, METHODID_DELETE_DATA_SCHEMA))) + .addMethod( + getListDataSchemasMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.visionai.v1.ListDataSchemasRequest, + com.google.cloud.visionai.v1.ListDataSchemasResponse>( + service, METHODID_LIST_DATA_SCHEMAS))) + .addMethod( + getCreateAnnotationMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.visionai.v1.CreateAnnotationRequest, + com.google.cloud.visionai.v1.Annotation>(service, METHODID_CREATE_ANNOTATION))) + .addMethod( + getGetAnnotationMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.visionai.v1.GetAnnotationRequest, + com.google.cloud.visionai.v1.Annotation>(service, METHODID_GET_ANNOTATION))) + .addMethod( + getListAnnotationsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.visionai.v1.ListAnnotationsRequest, + com.google.cloud.visionai.v1.ListAnnotationsResponse>( + service, METHODID_LIST_ANNOTATIONS))) + .addMethod( + getUpdateAnnotationMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.visionai.v1.UpdateAnnotationRequest, + com.google.cloud.visionai.v1.Annotation>(service, METHODID_UPDATE_ANNOTATION))) + .addMethod( + getDeleteAnnotationMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.visionai.v1.DeleteAnnotationRequest, + com.google.protobuf.Empty>(service, METHODID_DELETE_ANNOTATION))) + .addMethod( + getIngestAssetMethod(), + io.grpc.stub.ServerCalls.asyncBidiStreamingCall( + new MethodHandlers< + com.google.cloud.visionai.v1.IngestAssetRequest, + com.google.cloud.visionai.v1.IngestAssetResponse>( + service, METHODID_INGEST_ASSET))) + .addMethod( + getClipAssetMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.visionai.v1.ClipAssetRequest, + com.google.cloud.visionai.v1.ClipAssetResponse>(service, METHODID_CLIP_ASSET))) + .addMethod( + getGenerateHlsUriMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.visionai.v1.GenerateHlsUriRequest, + com.google.cloud.visionai.v1.GenerateHlsUriResponse>( + service, METHODID_GENERATE_HLS_URI))) + .addMethod( + getImportAssetsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.visionai.v1.ImportAssetsRequest, + com.google.longrunning.Operation>(service, METHODID_IMPORT_ASSETS))) + .addMethod( + getCreateSearchConfigMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.visionai.v1.CreateSearchConfigRequest, + com.google.cloud.visionai.v1.SearchConfig>( + service, METHODID_CREATE_SEARCH_CONFIG))) + .addMethod( + getUpdateSearchConfigMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.visionai.v1.UpdateSearchConfigRequest, + com.google.cloud.visionai.v1.SearchConfig>( + service, METHODID_UPDATE_SEARCH_CONFIG))) + .addMethod( + getGetSearchConfigMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.visionai.v1.GetSearchConfigRequest, + com.google.cloud.visionai.v1.SearchConfig>( + service, METHODID_GET_SEARCH_CONFIG))) + .addMethod( + getDeleteSearchConfigMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.visionai.v1.DeleteSearchConfigRequest, + com.google.protobuf.Empty>(service, METHODID_DELETE_SEARCH_CONFIG))) + .addMethod( + getListSearchConfigsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.visionai.v1.ListSearchConfigsRequest, + com.google.cloud.visionai.v1.ListSearchConfigsResponse>( + service, METHODID_LIST_SEARCH_CONFIGS))) + .addMethod( + getCreateSearchHypernymMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.visionai.v1.CreateSearchHypernymRequest, + com.google.cloud.visionai.v1.SearchHypernym>( + service, METHODID_CREATE_SEARCH_HYPERNYM))) + .addMethod( + getUpdateSearchHypernymMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.visionai.v1.UpdateSearchHypernymRequest, + com.google.cloud.visionai.v1.SearchHypernym>( + service, METHODID_UPDATE_SEARCH_HYPERNYM))) + .addMethod( + getGetSearchHypernymMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.visionai.v1.GetSearchHypernymRequest, + com.google.cloud.visionai.v1.SearchHypernym>( + service, METHODID_GET_SEARCH_HYPERNYM))) + .addMethod( + getDeleteSearchHypernymMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.visionai.v1.DeleteSearchHypernymRequest, + com.google.protobuf.Empty>(service, METHODID_DELETE_SEARCH_HYPERNYM))) + .addMethod( + getListSearchHypernymsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.visionai.v1.ListSearchHypernymsRequest, + com.google.cloud.visionai.v1.ListSearchHypernymsResponse>( + service, METHODID_LIST_SEARCH_HYPERNYMS))) + .addMethod( + getSearchAssetsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.visionai.v1.SearchAssetsRequest, + com.google.cloud.visionai.v1.SearchAssetsResponse>( + service, METHODID_SEARCH_ASSETS))) + .addMethod( + getSearchIndexEndpointMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.visionai.v1.SearchIndexEndpointRequest, + com.google.cloud.visionai.v1.SearchIndexEndpointResponse>( + service, METHODID_SEARCH_INDEX_ENDPOINT))) + .addMethod( + getCreateIndexEndpointMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.visionai.v1.CreateIndexEndpointRequest, + com.google.longrunning.Operation>(service, METHODID_CREATE_INDEX_ENDPOINT))) + .addMethod( + getGetIndexEndpointMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.visionai.v1.GetIndexEndpointRequest, + com.google.cloud.visionai.v1.IndexEndpoint>( + service, METHODID_GET_INDEX_ENDPOINT))) + .addMethod( + getListIndexEndpointsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.visionai.v1.ListIndexEndpointsRequest, + com.google.cloud.visionai.v1.ListIndexEndpointsResponse>( + service, METHODID_LIST_INDEX_ENDPOINTS))) + .addMethod( + getUpdateIndexEndpointMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.visionai.v1.UpdateIndexEndpointRequest, + com.google.longrunning.Operation>(service, METHODID_UPDATE_INDEX_ENDPOINT))) + .addMethod( + getDeleteIndexEndpointMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.visionai.v1.DeleteIndexEndpointRequest, + com.google.longrunning.Operation>(service, METHODID_DELETE_INDEX_ENDPOINT))) + .addMethod( + getDeployIndexMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.visionai.v1.DeployIndexRequest, + com.google.longrunning.Operation>(service, METHODID_DEPLOY_INDEX))) + .addMethod( + getUndeployIndexMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.visionai.v1.UndeployIndexRequest, + com.google.longrunning.Operation>(service, METHODID_UNDEPLOY_INDEX))) + .addMethod( + getCreateCollectionMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.visionai.v1.CreateCollectionRequest, + com.google.longrunning.Operation>(service, METHODID_CREATE_COLLECTION))) + .addMethod( + getDeleteCollectionMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.visionai.v1.DeleteCollectionRequest, + com.google.longrunning.Operation>(service, METHODID_DELETE_COLLECTION))) + .addMethod( + getGetCollectionMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.visionai.v1.GetCollectionRequest, + com.google.cloud.visionai.v1.Collection>(service, METHODID_GET_COLLECTION))) + .addMethod( + getUpdateCollectionMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.visionai.v1.UpdateCollectionRequest, + com.google.cloud.visionai.v1.Collection>(service, METHODID_UPDATE_COLLECTION))) + .addMethod( + getListCollectionsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.visionai.v1.ListCollectionsRequest, + com.google.cloud.visionai.v1.ListCollectionsResponse>( + service, METHODID_LIST_COLLECTIONS))) + .addMethod( + getAddCollectionItemMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.visionai.v1.AddCollectionItemRequest, + com.google.cloud.visionai.v1.AddCollectionItemResponse>( + service, METHODID_ADD_COLLECTION_ITEM))) + .addMethod( + getRemoveCollectionItemMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.visionai.v1.RemoveCollectionItemRequest, + com.google.cloud.visionai.v1.RemoveCollectionItemResponse>( + service, METHODID_REMOVE_COLLECTION_ITEM))) + .addMethod( + getViewCollectionItemsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.visionai.v1.ViewCollectionItemsRequest, + com.google.cloud.visionai.v1.ViewCollectionItemsResponse>( + service, METHODID_VIEW_COLLECTION_ITEMS))) + .build(); + } + + private abstract static class WarehouseBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoFileDescriptorSupplier, + io.grpc.protobuf.ProtoServiceDescriptorSupplier { + WarehouseBaseDescriptorSupplier() {} + + @java.lang.Override + public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto.getDescriptor(); + } + + @java.lang.Override + public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { + return getFileDescriptor().findServiceByName("Warehouse"); + } + } + + private static final class WarehouseFileDescriptorSupplier + extends WarehouseBaseDescriptorSupplier { + WarehouseFileDescriptorSupplier() {} + } + + private static final class WarehouseMethodDescriptorSupplier + extends WarehouseBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { + private final java.lang.String methodName; + + WarehouseMethodDescriptorSupplier(java.lang.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 (WarehouseGrpc.class) { + result = serviceDescriptor; + if (result == null) { + serviceDescriptor = + result = + io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) + .setSchemaDescriptor(new WarehouseFileDescriptorSupplier()) + .addMethod(getCreateAssetMethod()) + .addMethod(getUpdateAssetMethod()) + .addMethod(getGetAssetMethod()) + .addMethod(getListAssetsMethod()) + .addMethod(getDeleteAssetMethod()) + .addMethod(getUploadAssetMethod()) + .addMethod(getGenerateRetrievalUrlMethod()) + .addMethod(getAnalyzeAssetMethod()) + .addMethod(getIndexAssetMethod()) + .addMethod(getRemoveIndexAssetMethod()) + .addMethod(getViewIndexedAssetsMethod()) + .addMethod(getCreateIndexMethod()) + .addMethod(getUpdateIndexMethod()) + .addMethod(getGetIndexMethod()) + .addMethod(getListIndexesMethod()) + .addMethod(getDeleteIndexMethod()) + .addMethod(getCreateCorpusMethod()) + .addMethod(getGetCorpusMethod()) + .addMethod(getUpdateCorpusMethod()) + .addMethod(getListCorporaMethod()) + .addMethod(getDeleteCorpusMethod()) + .addMethod(getAnalyzeCorpusMethod()) + .addMethod(getCreateDataSchemaMethod()) + .addMethod(getUpdateDataSchemaMethod()) + .addMethod(getGetDataSchemaMethod()) + .addMethod(getDeleteDataSchemaMethod()) + .addMethod(getListDataSchemasMethod()) + .addMethod(getCreateAnnotationMethod()) + .addMethod(getGetAnnotationMethod()) + .addMethod(getListAnnotationsMethod()) + .addMethod(getUpdateAnnotationMethod()) + .addMethod(getDeleteAnnotationMethod()) + .addMethod(getIngestAssetMethod()) + .addMethod(getClipAssetMethod()) + .addMethod(getGenerateHlsUriMethod()) + .addMethod(getImportAssetsMethod()) + .addMethod(getCreateSearchConfigMethod()) + .addMethod(getUpdateSearchConfigMethod()) + .addMethod(getGetSearchConfigMethod()) + .addMethod(getDeleteSearchConfigMethod()) + .addMethod(getListSearchConfigsMethod()) + .addMethod(getCreateSearchHypernymMethod()) + .addMethod(getUpdateSearchHypernymMethod()) + .addMethod(getGetSearchHypernymMethod()) + .addMethod(getDeleteSearchHypernymMethod()) + .addMethod(getListSearchHypernymsMethod()) + .addMethod(getSearchAssetsMethod()) + .addMethod(getSearchIndexEndpointMethod()) + .addMethod(getCreateIndexEndpointMethod()) + .addMethod(getGetIndexEndpointMethod()) + .addMethod(getListIndexEndpointsMethod()) + .addMethod(getUpdateIndexEndpointMethod()) + .addMethod(getDeleteIndexEndpointMethod()) + .addMethod(getDeployIndexMethod()) + .addMethod(getUndeployIndexMethod()) + .addMethod(getCreateCollectionMethod()) + .addMethod(getDeleteCollectionMethod()) + .addMethod(getGetCollectionMethod()) + .addMethod(getUpdateCollectionMethod()) + .addMethod(getListCollectionsMethod()) + .addMethod(getAddCollectionItemMethod()) + .addMethod(getRemoveCollectionItemMethod()) + .addMethod(getViewCollectionItemsMethod()) + .build(); + } + } + } + return result; + } +} diff --git a/java-visionai/owlbot.py b/java-visionai/owlbot.py new file mode 100644 index 000000000000..2ba11e6bba67 --- /dev/null +++ b/java-visionai/owlbot.py @@ -0,0 +1,36 @@ +# Copyright 2024 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. + +import synthtool as s +from synthtool.languages import java + + +for library in s.get_staging_dirs(): + # put any special-case replacements here + s.move(library) + +s.remove_staging_dirs() +java.common_templates(monorepo=True, excludes=[ + ".github/*", + ".kokoro/*", + "samples/*", + "CODE_OF_CONDUCT.md", + "CONTRIBUTING.md", + "LICENSE", + "SECURITY.md", + "java.header", + "license-checks.xml", + "renovate.json", + ".gitignore" +]) \ No newline at end of file diff --git a/java-visionai/pom.xml b/java-visionai/pom.xml new file mode 100644 index 000000000000..6badaf053e2d --- /dev/null +++ b/java-visionai/pom.xml @@ -0,0 +1,55 @@ + + + 4.0.0 + com.google.cloud + google-cloud-visionai-parent + pom + 0.0.1-SNAPSHOT + Google Vision AI API Parent + + Java idiomatic client for Google Cloud Platform services. + + + + com.google.cloud + google-cloud-jar-parent + 1.38.0-SNAPSHOT + ../google-cloud-jar-parent/pom.xml + + + + UTF-8 + UTF-8 + github + google-cloud-visionai-parent + + + + + + com.google.cloud + google-cloud-visionai + 0.0.1-SNAPSHOT + + + com.google.api.grpc + grpc-google-cloud-visionai-v1 + 0.0.1-SNAPSHOT + + + com.google.api.grpc + proto-google-cloud-visionai-v1 + 0.0.1-SNAPSHOT + + + + + + + google-cloud-visionai + grpc-google-cloud-visionai-v1 + proto-google-cloud-visionai-v1 + google-cloud-visionai-bom + + + diff --git a/java-visionai/proto-google-cloud-visionai-v1/clirr-ignored-differences.xml b/java-visionai/proto-google-cloud-visionai-v1/clirr-ignored-differences.xml new file mode 100644 index 000000000000..dfdde7330818 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/clirr-ignored-differences.xml @@ -0,0 +1,19 @@ + + + + + 7012 + com/google/cloud/visionai/v1/*OrBuilder + * get*(*) + + + 7012 + com/google/cloud/visionai/v1/*OrBuilder + boolean contains*(*) + + + 7012 + com/google/cloud/visionai/v1/*OrBuilder + boolean has*(*) + + diff --git a/java-visionai/proto-google-cloud-visionai-v1/pom.xml b/java-visionai/proto-google-cloud-visionai-v1/pom.xml new file mode 100644 index 000000000000..17da11b91c6a --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/pom.xml @@ -0,0 +1,37 @@ + + 4.0.0 + com.google.api.grpc + proto-google-cloud-visionai-v1 + 0.0.1-SNAPSHOT + proto-google-cloud-visionai-v1 + Proto library for google-cloud-visionai + + com.google.cloud + google-cloud-visionai-parent + 0.0.1-SNAPSHOT + + + + com.google.protobuf + protobuf-java + + + com.google.api.grpc + proto-google-common-protos + + + com.google.api.grpc + proto-google-iam-v1 + + + com.google.api + api-common + + + com.google.guava + guava + + + diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/AIEnabledDevicesInputConfig.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/AIEnabledDevicesInputConfig.java new file mode 100644 index 000000000000..1704bed48cf2 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/AIEnabledDevicesInputConfig.java @@ -0,0 +1,433 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/platform.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * Message describing AI-enabled Devices Input Config.
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.AIEnabledDevicesInputConfig} + */ +public final class AIEnabledDevicesInputConfig extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.AIEnabledDevicesInputConfig) + AIEnabledDevicesInputConfigOrBuilder { + private static final long serialVersionUID = 0L; + // Use AIEnabledDevicesInputConfig.newBuilder() to construct. + private AIEnabledDevicesInputConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private AIEnabledDevicesInputConfig() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new AIEnabledDevicesInputConfig(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_AIEnabledDevicesInputConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_AIEnabledDevicesInputConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.AIEnabledDevicesInputConfig.class, + com.google.cloud.visionai.v1.AIEnabledDevicesInputConfig.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 { + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += getUnknownFields().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.visionai.v1.AIEnabledDevicesInputConfig)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.AIEnabledDevicesInputConfig other = + (com.google.cloud.visionai.v1.AIEnabledDevicesInputConfig) obj; + + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.AIEnabledDevicesInputConfig parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.AIEnabledDevicesInputConfig 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.visionai.v1.AIEnabledDevicesInputConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.AIEnabledDevicesInputConfig 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.visionai.v1.AIEnabledDevicesInputConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.AIEnabledDevicesInputConfig parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.AIEnabledDevicesInputConfig parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.AIEnabledDevicesInputConfig 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.visionai.v1.AIEnabledDevicesInputConfig parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.AIEnabledDevicesInputConfig 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.visionai.v1.AIEnabledDevicesInputConfig parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.AIEnabledDevicesInputConfig 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.visionai.v1.AIEnabledDevicesInputConfig 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; + } + /** + * + * + *
+   * Message describing AI-enabled Devices Input Config.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.AIEnabledDevicesInputConfig} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.AIEnabledDevicesInputConfig) + com.google.cloud.visionai.v1.AIEnabledDevicesInputConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_AIEnabledDevicesInputConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_AIEnabledDevicesInputConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.AIEnabledDevicesInputConfig.class, + com.google.cloud.visionai.v1.AIEnabledDevicesInputConfig.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.AIEnabledDevicesInputConfig.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_AIEnabledDevicesInputConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.AIEnabledDevicesInputConfig getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.AIEnabledDevicesInputConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.AIEnabledDevicesInputConfig build() { + com.google.cloud.visionai.v1.AIEnabledDevicesInputConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.AIEnabledDevicesInputConfig buildPartial() { + com.google.cloud.visionai.v1.AIEnabledDevicesInputConfig result = + new com.google.cloud.visionai.v1.AIEnabledDevicesInputConfig(this); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.AIEnabledDevicesInputConfig) { + return mergeFrom((com.google.cloud.visionai.v1.AIEnabledDevicesInputConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.AIEnabledDevicesInputConfig other) { + if (other == com.google.cloud.visionai.v1.AIEnabledDevicesInputConfig.getDefaultInstance()) + return this; + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.AIEnabledDevicesInputConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.AIEnabledDevicesInputConfig) + private static final com.google.cloud.visionai.v1.AIEnabledDevicesInputConfig DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.AIEnabledDevicesInputConfig(); + } + + public static com.google.cloud.visionai.v1.AIEnabledDevicesInputConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AIEnabledDevicesInputConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.AIEnabledDevicesInputConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/AIEnabledDevicesInputConfigOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/AIEnabledDevicesInputConfigOrBuilder.java new file mode 100644 index 000000000000..0c09daa00546 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/AIEnabledDevicesInputConfigOrBuilder.java @@ -0,0 +1,25 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/platform.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface AIEnabledDevicesInputConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.AIEnabledDevicesInputConfig) + com.google.protobuf.MessageOrBuilder {} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/AcceleratorType.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/AcceleratorType.java new file mode 100644 index 000000000000..7f2408626448 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/AcceleratorType.java @@ -0,0 +1,309 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/platform.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * Represents a hardware accelerator type.
+ * 
+ * + * Protobuf enum {@code google.cloud.visionai.v1.AcceleratorType} + */ +public enum AcceleratorType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+   * Unspecified accelerator type, which means no accelerator.
+   * 
+ * + * ACCELERATOR_TYPE_UNSPECIFIED = 0; + */ + ACCELERATOR_TYPE_UNSPECIFIED(0), + /** + * + * + *
+   * Nvidia Tesla K80 GPU.
+   * 
+ * + * NVIDIA_TESLA_K80 = 1; + */ + NVIDIA_TESLA_K80(1), + /** + * + * + *
+   * Nvidia Tesla P100 GPU.
+   * 
+ * + * NVIDIA_TESLA_P100 = 2; + */ + NVIDIA_TESLA_P100(2), + /** + * + * + *
+   * Nvidia Tesla V100 GPU.
+   * 
+ * + * NVIDIA_TESLA_V100 = 3; + */ + NVIDIA_TESLA_V100(3), + /** + * + * + *
+   * Nvidia Tesla P4 GPU.
+   * 
+ * + * NVIDIA_TESLA_P4 = 4; + */ + NVIDIA_TESLA_P4(4), + /** + * + * + *
+   * Nvidia Tesla T4 GPU.
+   * 
+ * + * NVIDIA_TESLA_T4 = 5; + */ + NVIDIA_TESLA_T4(5), + /** + * + * + *
+   * Nvidia Tesla A100 GPU.
+   * 
+ * + * NVIDIA_TESLA_A100 = 8; + */ + NVIDIA_TESLA_A100(8), + /** + * + * + *
+   * TPU v2.
+   * 
+ * + * TPU_V2 = 6; + */ + TPU_V2(6), + /** + * + * + *
+   * TPU v3.
+   * 
+ * + * TPU_V3 = 7; + */ + TPU_V3(7), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+   * Unspecified accelerator type, which means no accelerator.
+   * 
+ * + * ACCELERATOR_TYPE_UNSPECIFIED = 0; + */ + public static final int ACCELERATOR_TYPE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+   * Nvidia Tesla K80 GPU.
+   * 
+ * + * NVIDIA_TESLA_K80 = 1; + */ + public static final int NVIDIA_TESLA_K80_VALUE = 1; + /** + * + * + *
+   * Nvidia Tesla P100 GPU.
+   * 
+ * + * NVIDIA_TESLA_P100 = 2; + */ + public static final int NVIDIA_TESLA_P100_VALUE = 2; + /** + * + * + *
+   * Nvidia Tesla V100 GPU.
+   * 
+ * + * NVIDIA_TESLA_V100 = 3; + */ + public static final int NVIDIA_TESLA_V100_VALUE = 3; + /** + * + * + *
+   * Nvidia Tesla P4 GPU.
+   * 
+ * + * NVIDIA_TESLA_P4 = 4; + */ + public static final int NVIDIA_TESLA_P4_VALUE = 4; + /** + * + * + *
+   * Nvidia Tesla T4 GPU.
+   * 
+ * + * NVIDIA_TESLA_T4 = 5; + */ + public static final int NVIDIA_TESLA_T4_VALUE = 5; + /** + * + * + *
+   * Nvidia Tesla A100 GPU.
+   * 
+ * + * NVIDIA_TESLA_A100 = 8; + */ + public static final int NVIDIA_TESLA_A100_VALUE = 8; + /** + * + * + *
+   * TPU v2.
+   * 
+ * + * TPU_V2 = 6; + */ + public static final int TPU_V2_VALUE = 6; + /** + * + * + *
+   * TPU v3.
+   * 
+ * + * TPU_V3 = 7; + */ + public static final int TPU_V3_VALUE = 7; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static AcceleratorType valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static AcceleratorType forNumber(int value) { + switch (value) { + case 0: + return ACCELERATOR_TYPE_UNSPECIFIED; + case 1: + return NVIDIA_TESLA_K80; + case 2: + return NVIDIA_TESLA_P100; + case 3: + return NVIDIA_TESLA_V100; + case 4: + return NVIDIA_TESLA_P4; + case 5: + return NVIDIA_TESLA_T4; + case 8: + return NVIDIA_TESLA_A100; + case 6: + return TPU_V2; + case 7: + return TPU_V3; + 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 AcceleratorType findValueByNumber(int number) { + return AcceleratorType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + 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.visionai.v1.PlatformProto.getDescriptor().getEnumTypes().get(1); + } + + private static final AcceleratorType[] VALUES = values(); + + public static AcceleratorType 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 AcceleratorType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.visionai.v1.AcceleratorType) +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/AcquireLeaseRequest.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/AcquireLeaseRequest.java new file mode 100644 index 000000000000..bdbc7f5a39cc --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/AcquireLeaseRequest.java @@ -0,0 +1,1226 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/streaming_service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * Request message for acquiring a lease.
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.AcquireLeaseRequest} + */ +public final class AcquireLeaseRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.AcquireLeaseRequest) + AcquireLeaseRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use AcquireLeaseRequest.newBuilder() to construct. + private AcquireLeaseRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private AcquireLeaseRequest() { + series_ = ""; + owner_ = ""; + leaseType_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new AcquireLeaseRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.StreamingServiceProto + .internal_static_google_cloud_visionai_v1_AcquireLeaseRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.StreamingServiceProto + .internal_static_google_cloud_visionai_v1_AcquireLeaseRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.AcquireLeaseRequest.class, + com.google.cloud.visionai.v1.AcquireLeaseRequest.Builder.class); + } + + private int bitField0_; + public static final int SERIES_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object series_ = ""; + /** + * + * + *
+   * The series name.
+   * 
+ * + * string series = 1; + * + * @return The series. + */ + @java.lang.Override + public java.lang.String getSeries() { + java.lang.Object ref = series_; + 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(); + series_ = s; + return s; + } + } + /** + * + * + *
+   * The series name.
+   * 
+ * + * string series = 1; + * + * @return The bytes for series. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSeriesBytes() { + java.lang.Object ref = series_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + series_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int OWNER_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object owner_ = ""; + /** + * + * + *
+   * The owner name.
+   * 
+ * + * string owner = 2; + * + * @return The owner. + */ + @java.lang.Override + public java.lang.String getOwner() { + java.lang.Object ref = owner_; + 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(); + owner_ = s; + return s; + } + } + /** + * + * + *
+   * The owner name.
+   * 
+ * + * string owner = 2; + * + * @return The bytes for owner. + */ + @java.lang.Override + public com.google.protobuf.ByteString getOwnerBytes() { + java.lang.Object ref = owner_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + owner_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TERM_FIELD_NUMBER = 3; + private com.google.protobuf.Duration term_; + /** + * + * + *
+   * The lease term.
+   * 
+ * + * .google.protobuf.Duration term = 3; + * + * @return Whether the term field is set. + */ + @java.lang.Override + public boolean hasTerm() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * The lease term.
+   * 
+ * + * .google.protobuf.Duration term = 3; + * + * @return The term. + */ + @java.lang.Override + public com.google.protobuf.Duration getTerm() { + return term_ == null ? com.google.protobuf.Duration.getDefaultInstance() : term_; + } + /** + * + * + *
+   * The lease term.
+   * 
+ * + * .google.protobuf.Duration term = 3; + */ + @java.lang.Override + public com.google.protobuf.DurationOrBuilder getTermOrBuilder() { + return term_ == null ? com.google.protobuf.Duration.getDefaultInstance() : term_; + } + + public static final int LEASE_TYPE_FIELD_NUMBER = 4; + private int leaseType_ = 0; + /** + * + * + *
+   * The lease type.
+   * 
+ * + * .google.cloud.visionai.v1.LeaseType lease_type = 4; + * + * @return The enum numeric value on the wire for leaseType. + */ + @java.lang.Override + public int getLeaseTypeValue() { + return leaseType_; + } + /** + * + * + *
+   * The lease type.
+   * 
+ * + * .google.cloud.visionai.v1.LeaseType lease_type = 4; + * + * @return The leaseType. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.LeaseType getLeaseType() { + com.google.cloud.visionai.v1.LeaseType result = + com.google.cloud.visionai.v1.LeaseType.forNumber(leaseType_); + return result == null ? com.google.cloud.visionai.v1.LeaseType.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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(series_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, series_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(owner_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, owner_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(3, getTerm()); + } + if (leaseType_ != com.google.cloud.visionai.v1.LeaseType.LEASE_TYPE_UNSPECIFIED.getNumber()) { + output.writeEnum(4, leaseType_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(series_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, series_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(owner_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, owner_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getTerm()); + } + if (leaseType_ != com.google.cloud.visionai.v1.LeaseType.LEASE_TYPE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(4, leaseType_); + } + size += getUnknownFields().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.visionai.v1.AcquireLeaseRequest)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.AcquireLeaseRequest other = + (com.google.cloud.visionai.v1.AcquireLeaseRequest) obj; + + if (!getSeries().equals(other.getSeries())) return false; + if (!getOwner().equals(other.getOwner())) return false; + if (hasTerm() != other.hasTerm()) return false; + if (hasTerm()) { + if (!getTerm().equals(other.getTerm())) return false; + } + if (leaseType_ != other.leaseType_) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + SERIES_FIELD_NUMBER; + hash = (53 * hash) + getSeries().hashCode(); + hash = (37 * hash) + OWNER_FIELD_NUMBER; + hash = (53 * hash) + getOwner().hashCode(); + if (hasTerm()) { + hash = (37 * hash) + TERM_FIELD_NUMBER; + hash = (53 * hash) + getTerm().hashCode(); + } + hash = (37 * hash) + LEASE_TYPE_FIELD_NUMBER; + hash = (53 * hash) + leaseType_; + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.AcquireLeaseRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.AcquireLeaseRequest 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.visionai.v1.AcquireLeaseRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.AcquireLeaseRequest 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.visionai.v1.AcquireLeaseRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.AcquireLeaseRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.AcquireLeaseRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.AcquireLeaseRequest 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.visionai.v1.AcquireLeaseRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.AcquireLeaseRequest 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.visionai.v1.AcquireLeaseRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.AcquireLeaseRequest 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.visionai.v1.AcquireLeaseRequest 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; + } + /** + * + * + *
+   * Request message for acquiring a lease.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.AcquireLeaseRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.AcquireLeaseRequest) + com.google.cloud.visionai.v1.AcquireLeaseRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.StreamingServiceProto + .internal_static_google_cloud_visionai_v1_AcquireLeaseRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.StreamingServiceProto + .internal_static_google_cloud_visionai_v1_AcquireLeaseRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.AcquireLeaseRequest.class, + com.google.cloud.visionai.v1.AcquireLeaseRequest.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.AcquireLeaseRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getTermFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + series_ = ""; + owner_ = ""; + term_ = null; + if (termBuilder_ != null) { + termBuilder_.dispose(); + termBuilder_ = null; + } + leaseType_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.StreamingServiceProto + .internal_static_google_cloud_visionai_v1_AcquireLeaseRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.AcquireLeaseRequest getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.AcquireLeaseRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.AcquireLeaseRequest build() { + com.google.cloud.visionai.v1.AcquireLeaseRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.AcquireLeaseRequest buildPartial() { + com.google.cloud.visionai.v1.AcquireLeaseRequest result = + new com.google.cloud.visionai.v1.AcquireLeaseRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.visionai.v1.AcquireLeaseRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.series_ = series_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.owner_ = owner_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.term_ = termBuilder_ == null ? term_ : termBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.leaseType_ = leaseType_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.AcquireLeaseRequest) { + return mergeFrom((com.google.cloud.visionai.v1.AcquireLeaseRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.AcquireLeaseRequest other) { + if (other == com.google.cloud.visionai.v1.AcquireLeaseRequest.getDefaultInstance()) + return this; + if (!other.getSeries().isEmpty()) { + series_ = other.series_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getOwner().isEmpty()) { + owner_ = other.owner_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.hasTerm()) { + mergeTerm(other.getTerm()); + } + if (other.leaseType_ != 0) { + setLeaseTypeValue(other.getLeaseTypeValue()); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + series_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + owner_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage(getTermFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 32: + { + leaseType_ = input.readEnum(); + bitField0_ |= 0x00000008; + break; + } // case 32 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object series_ = ""; + /** + * + * + *
+     * The series name.
+     * 
+ * + * string series = 1; + * + * @return The series. + */ + public java.lang.String getSeries() { + java.lang.Object ref = series_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + series_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The series name.
+     * 
+ * + * string series = 1; + * + * @return The bytes for series. + */ + public com.google.protobuf.ByteString getSeriesBytes() { + java.lang.Object ref = series_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + series_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The series name.
+     * 
+ * + * string series = 1; + * + * @param value The series to set. + * @return This builder for chaining. + */ + public Builder setSeries(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + series_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The series name.
+     * 
+ * + * string series = 1; + * + * @return This builder for chaining. + */ + public Builder clearSeries() { + series_ = getDefaultInstance().getSeries(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * The series name.
+     * 
+ * + * string series = 1; + * + * @param value The bytes for series to set. + * @return This builder for chaining. + */ + public Builder setSeriesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + series_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object owner_ = ""; + /** + * + * + *
+     * The owner name.
+     * 
+ * + * string owner = 2; + * + * @return The owner. + */ + public java.lang.String getOwner() { + java.lang.Object ref = owner_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + owner_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The owner name.
+     * 
+ * + * string owner = 2; + * + * @return The bytes for owner. + */ + public com.google.protobuf.ByteString getOwnerBytes() { + java.lang.Object ref = owner_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + owner_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The owner name.
+     * 
+ * + * string owner = 2; + * + * @param value The owner to set. + * @return This builder for chaining. + */ + public Builder setOwner(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + owner_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * The owner name.
+     * 
+ * + * string owner = 2; + * + * @return This builder for chaining. + */ + public Builder clearOwner() { + owner_ = getDefaultInstance().getOwner(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * The owner name.
+     * 
+ * + * string owner = 2; + * + * @param value The bytes for owner to set. + * @return This builder for chaining. + */ + public Builder setOwnerBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + owner_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.protobuf.Duration term_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + termBuilder_; + /** + * + * + *
+     * The lease term.
+     * 
+ * + * .google.protobuf.Duration term = 3; + * + * @return Whether the term field is set. + */ + public boolean hasTerm() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+     * The lease term.
+     * 
+ * + * .google.protobuf.Duration term = 3; + * + * @return The term. + */ + public com.google.protobuf.Duration getTerm() { + if (termBuilder_ == null) { + return term_ == null ? com.google.protobuf.Duration.getDefaultInstance() : term_; + } else { + return termBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The lease term.
+     * 
+ * + * .google.protobuf.Duration term = 3; + */ + public Builder setTerm(com.google.protobuf.Duration value) { + if (termBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + term_ = value; + } else { + termBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * The lease term.
+     * 
+ * + * .google.protobuf.Duration term = 3; + */ + public Builder setTerm(com.google.protobuf.Duration.Builder builderForValue) { + if (termBuilder_ == null) { + term_ = builderForValue.build(); + } else { + termBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * The lease term.
+     * 
+ * + * .google.protobuf.Duration term = 3; + */ + public Builder mergeTerm(com.google.protobuf.Duration value) { + if (termBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && term_ != null + && term_ != com.google.protobuf.Duration.getDefaultInstance()) { + getTermBuilder().mergeFrom(value); + } else { + term_ = value; + } + } else { + termBuilder_.mergeFrom(value); + } + if (term_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + /** + * + * + *
+     * The lease term.
+     * 
+ * + * .google.protobuf.Duration term = 3; + */ + public Builder clearTerm() { + bitField0_ = (bitField0_ & ~0x00000004); + term_ = null; + if (termBuilder_ != null) { + termBuilder_.dispose(); + termBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * The lease term.
+     * 
+ * + * .google.protobuf.Duration term = 3; + */ + public com.google.protobuf.Duration.Builder getTermBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getTermFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The lease term.
+     * 
+ * + * .google.protobuf.Duration term = 3; + */ + public com.google.protobuf.DurationOrBuilder getTermOrBuilder() { + if (termBuilder_ != null) { + return termBuilder_.getMessageOrBuilder(); + } else { + return term_ == null ? com.google.protobuf.Duration.getDefaultInstance() : term_; + } + } + /** + * + * + *
+     * The lease term.
+     * 
+ * + * .google.protobuf.Duration term = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + getTermFieldBuilder() { + if (termBuilder_ == null) { + termBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder>( + getTerm(), getParentForChildren(), isClean()); + term_ = null; + } + return termBuilder_; + } + + private int leaseType_ = 0; + /** + * + * + *
+     * The lease type.
+     * 
+ * + * .google.cloud.visionai.v1.LeaseType lease_type = 4; + * + * @return The enum numeric value on the wire for leaseType. + */ + @java.lang.Override + public int getLeaseTypeValue() { + return leaseType_; + } + /** + * + * + *
+     * The lease type.
+     * 
+ * + * .google.cloud.visionai.v1.LeaseType lease_type = 4; + * + * @param value The enum numeric value on the wire for leaseType to set. + * @return This builder for chaining. + */ + public Builder setLeaseTypeValue(int value) { + leaseType_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * The lease type.
+     * 
+ * + * .google.cloud.visionai.v1.LeaseType lease_type = 4; + * + * @return The leaseType. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.LeaseType getLeaseType() { + com.google.cloud.visionai.v1.LeaseType result = + com.google.cloud.visionai.v1.LeaseType.forNumber(leaseType_); + return result == null ? com.google.cloud.visionai.v1.LeaseType.UNRECOGNIZED : result; + } + /** + * + * + *
+     * The lease type.
+     * 
+ * + * .google.cloud.visionai.v1.LeaseType lease_type = 4; + * + * @param value The leaseType to set. + * @return This builder for chaining. + */ + public Builder setLeaseType(com.google.cloud.visionai.v1.LeaseType value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000008; + leaseType_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * The lease type.
+     * 
+ * + * .google.cloud.visionai.v1.LeaseType lease_type = 4; + * + * @return This builder for chaining. + */ + public Builder clearLeaseType() { + bitField0_ = (bitField0_ & ~0x00000008); + leaseType_ = 0; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.AcquireLeaseRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.AcquireLeaseRequest) + private static final com.google.cloud.visionai.v1.AcquireLeaseRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.AcquireLeaseRequest(); + } + + public static com.google.cloud.visionai.v1.AcquireLeaseRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AcquireLeaseRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.AcquireLeaseRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/AcquireLeaseRequestOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/AcquireLeaseRequestOrBuilder.java new file mode 100644 index 000000000000..b02dfbd9bb8e --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/AcquireLeaseRequestOrBuilder.java @@ -0,0 +1,136 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/streaming_service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface AcquireLeaseRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.AcquireLeaseRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The series name.
+   * 
+ * + * string series = 1; + * + * @return The series. + */ + java.lang.String getSeries(); + /** + * + * + *
+   * The series name.
+   * 
+ * + * string series = 1; + * + * @return The bytes for series. + */ + com.google.protobuf.ByteString getSeriesBytes(); + + /** + * + * + *
+   * The owner name.
+   * 
+ * + * string owner = 2; + * + * @return The owner. + */ + java.lang.String getOwner(); + /** + * + * + *
+   * The owner name.
+   * 
+ * + * string owner = 2; + * + * @return The bytes for owner. + */ + com.google.protobuf.ByteString getOwnerBytes(); + + /** + * + * + *
+   * The lease term.
+   * 
+ * + * .google.protobuf.Duration term = 3; + * + * @return Whether the term field is set. + */ + boolean hasTerm(); + /** + * + * + *
+   * The lease term.
+   * 
+ * + * .google.protobuf.Duration term = 3; + * + * @return The term. + */ + com.google.protobuf.Duration getTerm(); + /** + * + * + *
+   * The lease term.
+   * 
+ * + * .google.protobuf.Duration term = 3; + */ + com.google.protobuf.DurationOrBuilder getTermOrBuilder(); + + /** + * + * + *
+   * The lease type.
+   * 
+ * + * .google.cloud.visionai.v1.LeaseType lease_type = 4; + * + * @return The enum numeric value on the wire for leaseType. + */ + int getLeaseTypeValue(); + /** + * + * + *
+   * The lease type.
+   * 
+ * + * .google.cloud.visionai.v1.LeaseType lease_type = 4; + * + * @return The leaseType. + */ + com.google.cloud.visionai.v1.LeaseType getLeaseType(); +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/AddApplicationStreamInputRequest.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/AddApplicationStreamInputRequest.java new file mode 100644 index 000000000000..8bf5cef6b7b0 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/AddApplicationStreamInputRequest.java @@ -0,0 +1,1506 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/platform.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * Message for adding stream input to an Application.
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.AddApplicationStreamInputRequest} + */ +public final class AddApplicationStreamInputRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.AddApplicationStreamInputRequest) + AddApplicationStreamInputRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use AddApplicationStreamInputRequest.newBuilder() to construct. + private AddApplicationStreamInputRequest( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private AddApplicationStreamInputRequest() { + name_ = ""; + applicationStreamInputs_ = java.util.Collections.emptyList(); + requestId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new AddApplicationStreamInputRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_AddApplicationStreamInputRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_AddApplicationStreamInputRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.AddApplicationStreamInputRequest.class, + com.google.cloud.visionai.v1.AddApplicationStreamInputRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Required. the name of the application to retrieve.
+   * Format:
+   * "projects/{project}/locations/{location}/applications/{application}"
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + 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(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. the name of the application to retrieve.
+   * Format:
+   * "projects/{project}/locations/{location}/applications/{application}"
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int APPLICATION_STREAM_INPUTS_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private java.util.List + applicationStreamInputs_; + /** + * + * + *
+   * The stream inputs to add, the stream resource name is the key of each
+   * StreamInput, and it must be unique within each application.
+   * 
+ * + * repeated .google.cloud.visionai.v1.ApplicationStreamInput application_stream_inputs = 2; + * + */ + @java.lang.Override + public java.util.List + getApplicationStreamInputsList() { + return applicationStreamInputs_; + } + /** + * + * + *
+   * The stream inputs to add, the stream resource name is the key of each
+   * StreamInput, and it must be unique within each application.
+   * 
+ * + * repeated .google.cloud.visionai.v1.ApplicationStreamInput application_stream_inputs = 2; + * + */ + @java.lang.Override + public java.util.List + getApplicationStreamInputsOrBuilderList() { + return applicationStreamInputs_; + } + /** + * + * + *
+   * The stream inputs to add, the stream resource name is the key of each
+   * StreamInput, and it must be unique within each application.
+   * 
+ * + * repeated .google.cloud.visionai.v1.ApplicationStreamInput application_stream_inputs = 2; + * + */ + @java.lang.Override + public int getApplicationStreamInputsCount() { + return applicationStreamInputs_.size(); + } + /** + * + * + *
+   * The stream inputs to add, the stream resource name is the key of each
+   * StreamInput, and it must be unique within each application.
+   * 
+ * + * repeated .google.cloud.visionai.v1.ApplicationStreamInput application_stream_inputs = 2; + * + */ + @java.lang.Override + public com.google.cloud.visionai.v1.ApplicationStreamInput getApplicationStreamInputs(int index) { + return applicationStreamInputs_.get(index); + } + /** + * + * + *
+   * The stream inputs to add, the stream resource name is the key of each
+   * StreamInput, and it must be unique within each application.
+   * 
+ * + * repeated .google.cloud.visionai.v1.ApplicationStreamInput application_stream_inputs = 2; + * + */ + @java.lang.Override + public com.google.cloud.visionai.v1.ApplicationStreamInputOrBuilder + getApplicationStreamInputsOrBuilder(int index) { + return applicationStreamInputs_.get(index); + } + + public static final int REQUEST_ID_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object requestId_ = ""; + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and
+   * the request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + @java.lang.Override + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + 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(); + requestId_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and
+   * the request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + for (int i = 0; i < applicationStreamInputs_.size(); i++) { + output.writeMessage(2, applicationStreamInputs_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, requestId_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + for (int i = 0; i < applicationStreamInputs_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 2, applicationStreamInputs_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, requestId_); + } + size += getUnknownFields().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.visionai.v1.AddApplicationStreamInputRequest)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.AddApplicationStreamInputRequest other = + (com.google.cloud.visionai.v1.AddApplicationStreamInputRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getApplicationStreamInputsList().equals(other.getApplicationStreamInputsList())) + return false; + if (!getRequestId().equals(other.getRequestId())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + if (getApplicationStreamInputsCount() > 0) { + hash = (37 * hash) + APPLICATION_STREAM_INPUTS_FIELD_NUMBER; + hash = (53 * hash) + getApplicationStreamInputsList().hashCode(); + } + hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; + hash = (53 * hash) + getRequestId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.AddApplicationStreamInputRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.AddApplicationStreamInputRequest 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.visionai.v1.AddApplicationStreamInputRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.AddApplicationStreamInputRequest 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.visionai.v1.AddApplicationStreamInputRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.AddApplicationStreamInputRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.AddApplicationStreamInputRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.AddApplicationStreamInputRequest 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.visionai.v1.AddApplicationStreamInputRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.AddApplicationStreamInputRequest 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.visionai.v1.AddApplicationStreamInputRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.AddApplicationStreamInputRequest 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.visionai.v1.AddApplicationStreamInputRequest 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; + } + /** + * + * + *
+   * Message for adding stream input to an Application.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.AddApplicationStreamInputRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.AddApplicationStreamInputRequest) + com.google.cloud.visionai.v1.AddApplicationStreamInputRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_AddApplicationStreamInputRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_AddApplicationStreamInputRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.AddApplicationStreamInputRequest.class, + com.google.cloud.visionai.v1.AddApplicationStreamInputRequest.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.AddApplicationStreamInputRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + if (applicationStreamInputsBuilder_ == null) { + applicationStreamInputs_ = java.util.Collections.emptyList(); + } else { + applicationStreamInputs_ = null; + applicationStreamInputsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + requestId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_AddApplicationStreamInputRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.AddApplicationStreamInputRequest + getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.AddApplicationStreamInputRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.AddApplicationStreamInputRequest build() { + com.google.cloud.visionai.v1.AddApplicationStreamInputRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.AddApplicationStreamInputRequest buildPartial() { + com.google.cloud.visionai.v1.AddApplicationStreamInputRequest result = + new com.google.cloud.visionai.v1.AddApplicationStreamInputRequest(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.visionai.v1.AddApplicationStreamInputRequest result) { + if (applicationStreamInputsBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + applicationStreamInputs_ = + java.util.Collections.unmodifiableList(applicationStreamInputs_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.applicationStreamInputs_ = applicationStreamInputs_; + } else { + result.applicationStreamInputs_ = applicationStreamInputsBuilder_.build(); + } + } + + private void buildPartial0( + com.google.cloud.visionai.v1.AddApplicationStreamInputRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.requestId_ = requestId_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.AddApplicationStreamInputRequest) { + return mergeFrom((com.google.cloud.visionai.v1.AddApplicationStreamInputRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.AddApplicationStreamInputRequest other) { + if (other + == com.google.cloud.visionai.v1.AddApplicationStreamInputRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (applicationStreamInputsBuilder_ == null) { + if (!other.applicationStreamInputs_.isEmpty()) { + if (applicationStreamInputs_.isEmpty()) { + applicationStreamInputs_ = other.applicationStreamInputs_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureApplicationStreamInputsIsMutable(); + applicationStreamInputs_.addAll(other.applicationStreamInputs_); + } + onChanged(); + } + } else { + if (!other.applicationStreamInputs_.isEmpty()) { + if (applicationStreamInputsBuilder_.isEmpty()) { + applicationStreamInputsBuilder_.dispose(); + applicationStreamInputsBuilder_ = null; + applicationStreamInputs_ = other.applicationStreamInputs_; + bitField0_ = (bitField0_ & ~0x00000002); + applicationStreamInputsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getApplicationStreamInputsFieldBuilder() + : null; + } else { + applicationStreamInputsBuilder_.addAllMessages(other.applicationStreamInputs_); + } + } + } + if (!other.getRequestId().isEmpty()) { + requestId_ = other.requestId_; + bitField0_ |= 0x00000004; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + com.google.cloud.visionai.v1.ApplicationStreamInput m = + input.readMessage( + com.google.cloud.visionai.v1.ApplicationStreamInput.parser(), + extensionRegistry); + if (applicationStreamInputsBuilder_ == null) { + ensureApplicationStreamInputsIsMutable(); + applicationStreamInputs_.add(m); + } else { + applicationStreamInputsBuilder_.addMessage(m); + } + break; + } // case 18 + case 26: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. the name of the application to retrieve.
+     * Format:
+     * "projects/{project}/locations/{location}/applications/{application}"
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. the name of the application to retrieve.
+     * Format:
+     * "projects/{project}/locations/{location}/applications/{application}"
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. the name of the application to retrieve.
+     * Format:
+     * "projects/{project}/locations/{location}/applications/{application}"
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. the name of the application to retrieve.
+     * Format:
+     * "projects/{project}/locations/{location}/applications/{application}"
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. the name of the application to retrieve.
+     * Format:
+     * "projects/{project}/locations/{location}/applications/{application}"
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.util.List + applicationStreamInputs_ = java.util.Collections.emptyList(); + + private void ensureApplicationStreamInputsIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + applicationStreamInputs_ = + new java.util.ArrayList( + applicationStreamInputs_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.visionai.v1.ApplicationStreamInput, + com.google.cloud.visionai.v1.ApplicationStreamInput.Builder, + com.google.cloud.visionai.v1.ApplicationStreamInputOrBuilder> + applicationStreamInputsBuilder_; + + /** + * + * + *
+     * The stream inputs to add, the stream resource name is the key of each
+     * StreamInput, and it must be unique within each application.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.ApplicationStreamInput application_stream_inputs = 2; + * + */ + public java.util.List + getApplicationStreamInputsList() { + if (applicationStreamInputsBuilder_ == null) { + return java.util.Collections.unmodifiableList(applicationStreamInputs_); + } else { + return applicationStreamInputsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * The stream inputs to add, the stream resource name is the key of each
+     * StreamInput, and it must be unique within each application.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.ApplicationStreamInput application_stream_inputs = 2; + * + */ + public int getApplicationStreamInputsCount() { + if (applicationStreamInputsBuilder_ == null) { + return applicationStreamInputs_.size(); + } else { + return applicationStreamInputsBuilder_.getCount(); + } + } + /** + * + * + *
+     * The stream inputs to add, the stream resource name is the key of each
+     * StreamInput, and it must be unique within each application.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.ApplicationStreamInput application_stream_inputs = 2; + * + */ + public com.google.cloud.visionai.v1.ApplicationStreamInput getApplicationStreamInputs( + int index) { + if (applicationStreamInputsBuilder_ == null) { + return applicationStreamInputs_.get(index); + } else { + return applicationStreamInputsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * The stream inputs to add, the stream resource name is the key of each
+     * StreamInput, and it must be unique within each application.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.ApplicationStreamInput application_stream_inputs = 2; + * + */ + public Builder setApplicationStreamInputs( + int index, com.google.cloud.visionai.v1.ApplicationStreamInput value) { + if (applicationStreamInputsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureApplicationStreamInputsIsMutable(); + applicationStreamInputs_.set(index, value); + onChanged(); + } else { + applicationStreamInputsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The stream inputs to add, the stream resource name is the key of each
+     * StreamInput, and it must be unique within each application.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.ApplicationStreamInput application_stream_inputs = 2; + * + */ + public Builder setApplicationStreamInputs( + int index, com.google.cloud.visionai.v1.ApplicationStreamInput.Builder builderForValue) { + if (applicationStreamInputsBuilder_ == null) { + ensureApplicationStreamInputsIsMutable(); + applicationStreamInputs_.set(index, builderForValue.build()); + onChanged(); + } else { + applicationStreamInputsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The stream inputs to add, the stream resource name is the key of each
+     * StreamInput, and it must be unique within each application.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.ApplicationStreamInput application_stream_inputs = 2; + * + */ + public Builder addApplicationStreamInputs( + com.google.cloud.visionai.v1.ApplicationStreamInput value) { + if (applicationStreamInputsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureApplicationStreamInputsIsMutable(); + applicationStreamInputs_.add(value); + onChanged(); + } else { + applicationStreamInputsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * The stream inputs to add, the stream resource name is the key of each
+     * StreamInput, and it must be unique within each application.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.ApplicationStreamInput application_stream_inputs = 2; + * + */ + public Builder addApplicationStreamInputs( + int index, com.google.cloud.visionai.v1.ApplicationStreamInput value) { + if (applicationStreamInputsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureApplicationStreamInputsIsMutable(); + applicationStreamInputs_.add(index, value); + onChanged(); + } else { + applicationStreamInputsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The stream inputs to add, the stream resource name is the key of each
+     * StreamInput, and it must be unique within each application.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.ApplicationStreamInput application_stream_inputs = 2; + * + */ + public Builder addApplicationStreamInputs( + com.google.cloud.visionai.v1.ApplicationStreamInput.Builder builderForValue) { + if (applicationStreamInputsBuilder_ == null) { + ensureApplicationStreamInputsIsMutable(); + applicationStreamInputs_.add(builderForValue.build()); + onChanged(); + } else { + applicationStreamInputsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The stream inputs to add, the stream resource name is the key of each
+     * StreamInput, and it must be unique within each application.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.ApplicationStreamInput application_stream_inputs = 2; + * + */ + public Builder addApplicationStreamInputs( + int index, com.google.cloud.visionai.v1.ApplicationStreamInput.Builder builderForValue) { + if (applicationStreamInputsBuilder_ == null) { + ensureApplicationStreamInputsIsMutable(); + applicationStreamInputs_.add(index, builderForValue.build()); + onChanged(); + } else { + applicationStreamInputsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The stream inputs to add, the stream resource name is the key of each
+     * StreamInput, and it must be unique within each application.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.ApplicationStreamInput application_stream_inputs = 2; + * + */ + public Builder addAllApplicationStreamInputs( + java.lang.Iterable values) { + if (applicationStreamInputsBuilder_ == null) { + ensureApplicationStreamInputsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, applicationStreamInputs_); + onChanged(); + } else { + applicationStreamInputsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * The stream inputs to add, the stream resource name is the key of each
+     * StreamInput, and it must be unique within each application.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.ApplicationStreamInput application_stream_inputs = 2; + * + */ + public Builder clearApplicationStreamInputs() { + if (applicationStreamInputsBuilder_ == null) { + applicationStreamInputs_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + applicationStreamInputsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The stream inputs to add, the stream resource name is the key of each
+     * StreamInput, and it must be unique within each application.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.ApplicationStreamInput application_stream_inputs = 2; + * + */ + public Builder removeApplicationStreamInputs(int index) { + if (applicationStreamInputsBuilder_ == null) { + ensureApplicationStreamInputsIsMutable(); + applicationStreamInputs_.remove(index); + onChanged(); + } else { + applicationStreamInputsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * The stream inputs to add, the stream resource name is the key of each
+     * StreamInput, and it must be unique within each application.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.ApplicationStreamInput application_stream_inputs = 2; + * + */ + public com.google.cloud.visionai.v1.ApplicationStreamInput.Builder + getApplicationStreamInputsBuilder(int index) { + return getApplicationStreamInputsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * The stream inputs to add, the stream resource name is the key of each
+     * StreamInput, and it must be unique within each application.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.ApplicationStreamInput application_stream_inputs = 2; + * + */ + public com.google.cloud.visionai.v1.ApplicationStreamInputOrBuilder + getApplicationStreamInputsOrBuilder(int index) { + if (applicationStreamInputsBuilder_ == null) { + return applicationStreamInputs_.get(index); + } else { + return applicationStreamInputsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * The stream inputs to add, the stream resource name is the key of each
+     * StreamInput, and it must be unique within each application.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.ApplicationStreamInput application_stream_inputs = 2; + * + */ + public java.util.List + getApplicationStreamInputsOrBuilderList() { + if (applicationStreamInputsBuilder_ != null) { + return applicationStreamInputsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(applicationStreamInputs_); + } + } + /** + * + * + *
+     * The stream inputs to add, the stream resource name is the key of each
+     * StreamInput, and it must be unique within each application.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.ApplicationStreamInput application_stream_inputs = 2; + * + */ + public com.google.cloud.visionai.v1.ApplicationStreamInput.Builder + addApplicationStreamInputsBuilder() { + return getApplicationStreamInputsFieldBuilder() + .addBuilder(com.google.cloud.visionai.v1.ApplicationStreamInput.getDefaultInstance()); + } + /** + * + * + *
+     * The stream inputs to add, the stream resource name is the key of each
+     * StreamInput, and it must be unique within each application.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.ApplicationStreamInput application_stream_inputs = 2; + * + */ + public com.google.cloud.visionai.v1.ApplicationStreamInput.Builder + addApplicationStreamInputsBuilder(int index) { + return getApplicationStreamInputsFieldBuilder() + .addBuilder( + index, com.google.cloud.visionai.v1.ApplicationStreamInput.getDefaultInstance()); + } + /** + * + * + *
+     * The stream inputs to add, the stream resource name is the key of each
+     * StreamInput, and it must be unique within each application.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.ApplicationStreamInput application_stream_inputs = 2; + * + */ + public java.util.List + getApplicationStreamInputsBuilderList() { + return getApplicationStreamInputsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.visionai.v1.ApplicationStreamInput, + com.google.cloud.visionai.v1.ApplicationStreamInput.Builder, + com.google.cloud.visionai.v1.ApplicationStreamInputOrBuilder> + getApplicationStreamInputsFieldBuilder() { + if (applicationStreamInputsBuilder_ == null) { + applicationStreamInputsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.visionai.v1.ApplicationStreamInput, + com.google.cloud.visionai.v1.ApplicationStreamInput.Builder, + com.google.cloud.visionai.v1.ApplicationStreamInputOrBuilder>( + applicationStreamInputs_, + ((bitField0_ & 0x00000002) != 0), + getParentForChildren(), + isClean()); + applicationStreamInputs_ = null; + } + return applicationStreamInputsBuilder_; + } + + private java.lang.Object requestId_ = ""; + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + requestId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearRequestId() { + requestId_ = getDefaultInstance().getRequestId(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + requestId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.AddApplicationStreamInputRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.AddApplicationStreamInputRequest) + private static final com.google.cloud.visionai.v1.AddApplicationStreamInputRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.AddApplicationStreamInputRequest(); + } + + public static com.google.cloud.visionai.v1.AddApplicationStreamInputRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AddApplicationStreamInputRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.AddApplicationStreamInputRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/AddApplicationStreamInputRequestOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/AddApplicationStreamInputRequestOrBuilder.java new file mode 100644 index 000000000000..b8af2f3eb26f --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/AddApplicationStreamInputRequestOrBuilder.java @@ -0,0 +1,172 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/platform.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface AddApplicationStreamInputRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.AddApplicationStreamInputRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. the name of the application to retrieve.
+   * Format:
+   * "projects/{project}/locations/{location}/applications/{application}"
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. the name of the application to retrieve.
+   * Format:
+   * "projects/{project}/locations/{location}/applications/{application}"
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * The stream inputs to add, the stream resource name is the key of each
+   * StreamInput, and it must be unique within each application.
+   * 
+ * + * repeated .google.cloud.visionai.v1.ApplicationStreamInput application_stream_inputs = 2; + * + */ + java.util.List + getApplicationStreamInputsList(); + /** + * + * + *
+   * The stream inputs to add, the stream resource name is the key of each
+   * StreamInput, and it must be unique within each application.
+   * 
+ * + * repeated .google.cloud.visionai.v1.ApplicationStreamInput application_stream_inputs = 2; + * + */ + com.google.cloud.visionai.v1.ApplicationStreamInput getApplicationStreamInputs(int index); + /** + * + * + *
+   * The stream inputs to add, the stream resource name is the key of each
+   * StreamInput, and it must be unique within each application.
+   * 
+ * + * repeated .google.cloud.visionai.v1.ApplicationStreamInput application_stream_inputs = 2; + * + */ + int getApplicationStreamInputsCount(); + /** + * + * + *
+   * The stream inputs to add, the stream resource name is the key of each
+   * StreamInput, and it must be unique within each application.
+   * 
+ * + * repeated .google.cloud.visionai.v1.ApplicationStreamInput application_stream_inputs = 2; + * + */ + java.util.List + getApplicationStreamInputsOrBuilderList(); + /** + * + * + *
+   * The stream inputs to add, the stream resource name is the key of each
+   * StreamInput, and it must be unique within each application.
+   * 
+ * + * repeated .google.cloud.visionai.v1.ApplicationStreamInput application_stream_inputs = 2; + * + */ + com.google.cloud.visionai.v1.ApplicationStreamInputOrBuilder getApplicationStreamInputsOrBuilder( + int index); + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and
+   * the request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + java.lang.String getRequestId(); + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and
+   * the request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + com.google.protobuf.ByteString getRequestIdBytes(); +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/AddApplicationStreamInputResponse.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/AddApplicationStreamInputResponse.java new file mode 100644 index 000000000000..794903a9c78c --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/AddApplicationStreamInputResponse.java @@ -0,0 +1,439 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/platform.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * Message for AddApplicationStreamInput Response.
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.AddApplicationStreamInputResponse} + */ +public final class AddApplicationStreamInputResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.AddApplicationStreamInputResponse) + AddApplicationStreamInputResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use AddApplicationStreamInputResponse.newBuilder() to construct. + private AddApplicationStreamInputResponse( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private AddApplicationStreamInputResponse() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new AddApplicationStreamInputResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_AddApplicationStreamInputResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_AddApplicationStreamInputResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.AddApplicationStreamInputResponse.class, + com.google.cloud.visionai.v1.AddApplicationStreamInputResponse.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 { + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += getUnknownFields().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.visionai.v1.AddApplicationStreamInputResponse)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.AddApplicationStreamInputResponse other = + (com.google.cloud.visionai.v1.AddApplicationStreamInputResponse) obj; + + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.AddApplicationStreamInputResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.AddApplicationStreamInputResponse 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.visionai.v1.AddApplicationStreamInputResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.AddApplicationStreamInputResponse 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.visionai.v1.AddApplicationStreamInputResponse parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.AddApplicationStreamInputResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.AddApplicationStreamInputResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.AddApplicationStreamInputResponse 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.visionai.v1.AddApplicationStreamInputResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.AddApplicationStreamInputResponse 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.visionai.v1.AddApplicationStreamInputResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.AddApplicationStreamInputResponse 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.visionai.v1.AddApplicationStreamInputResponse 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; + } + /** + * + * + *
+   * Message for AddApplicationStreamInput Response.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.AddApplicationStreamInputResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.AddApplicationStreamInputResponse) + com.google.cloud.visionai.v1.AddApplicationStreamInputResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_AddApplicationStreamInputResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_AddApplicationStreamInputResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.AddApplicationStreamInputResponse.class, + com.google.cloud.visionai.v1.AddApplicationStreamInputResponse.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.AddApplicationStreamInputResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_AddApplicationStreamInputResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.AddApplicationStreamInputResponse + getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.AddApplicationStreamInputResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.AddApplicationStreamInputResponse build() { + com.google.cloud.visionai.v1.AddApplicationStreamInputResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.AddApplicationStreamInputResponse buildPartial() { + com.google.cloud.visionai.v1.AddApplicationStreamInputResponse result = + new com.google.cloud.visionai.v1.AddApplicationStreamInputResponse(this); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.AddApplicationStreamInputResponse) { + return mergeFrom((com.google.cloud.visionai.v1.AddApplicationStreamInputResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.AddApplicationStreamInputResponse other) { + if (other + == com.google.cloud.visionai.v1.AddApplicationStreamInputResponse.getDefaultInstance()) + return this; + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.AddApplicationStreamInputResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.AddApplicationStreamInputResponse) + private static final com.google.cloud.visionai.v1.AddApplicationStreamInputResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.AddApplicationStreamInputResponse(); + } + + public static com.google.cloud.visionai.v1.AddApplicationStreamInputResponse + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AddApplicationStreamInputResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.AddApplicationStreamInputResponse + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/AddApplicationStreamInputResponseOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/AddApplicationStreamInputResponseOrBuilder.java new file mode 100644 index 000000000000..9f570d8bcba0 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/AddApplicationStreamInputResponseOrBuilder.java @@ -0,0 +1,25 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/platform.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface AddApplicationStreamInputResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.AddApplicationStreamInputResponse) + com.google.protobuf.MessageOrBuilder {} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/AddCollectionItemRequest.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/AddCollectionItemRequest.java new file mode 100644 index 000000000000..d9c900b51c8b --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/AddCollectionItemRequest.java @@ -0,0 +1,742 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/warehouse.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * Request message for AddCollectionItem.
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.AddCollectionItemRequest} + */ +public final class AddCollectionItemRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.AddCollectionItemRequest) + AddCollectionItemRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use AddCollectionItemRequest.newBuilder() to construct. + private AddCollectionItemRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private AddCollectionItemRequest() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new AddCollectionItemRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_AddCollectionItemRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_AddCollectionItemRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.AddCollectionItemRequest.class, + com.google.cloud.visionai.v1.AddCollectionItemRequest.Builder.class); + } + + private int bitField0_; + public static final int ITEM_FIELD_NUMBER = 1; + private com.google.cloud.visionai.v1.CollectionItem item_; + /** + * + * + *
+   * Required. The item to be added.
+   * 
+ * + * + * .google.cloud.visionai.v1.CollectionItem item = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the item field is set. + */ + @java.lang.Override + public boolean hasItem() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * Required. The item to be added.
+   * 
+ * + * + * .google.cloud.visionai.v1.CollectionItem item = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The item. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.CollectionItem getItem() { + return item_ == null ? com.google.cloud.visionai.v1.CollectionItem.getDefaultInstance() : item_; + } + /** + * + * + *
+   * Required. The item to be added.
+   * 
+ * + * + * .google.cloud.visionai.v1.CollectionItem item = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.visionai.v1.CollectionItemOrBuilder getItemOrBuilder() { + return item_ == null ? com.google.cloud.visionai.v1.CollectionItem.getDefaultInstance() : item_; + } + + 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 (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getItem()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getItem()); + } + size += getUnknownFields().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.visionai.v1.AddCollectionItemRequest)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.AddCollectionItemRequest other = + (com.google.cloud.visionai.v1.AddCollectionItemRequest) obj; + + if (hasItem() != other.hasItem()) return false; + if (hasItem()) { + if (!getItem().equals(other.getItem())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasItem()) { + hash = (37 * hash) + ITEM_FIELD_NUMBER; + hash = (53 * hash) + getItem().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.AddCollectionItemRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.AddCollectionItemRequest 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.visionai.v1.AddCollectionItemRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.AddCollectionItemRequest 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.visionai.v1.AddCollectionItemRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.AddCollectionItemRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.AddCollectionItemRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.AddCollectionItemRequest 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.visionai.v1.AddCollectionItemRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.AddCollectionItemRequest 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.visionai.v1.AddCollectionItemRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.AddCollectionItemRequest 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.visionai.v1.AddCollectionItemRequest 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; + } + /** + * + * + *
+   * Request message for AddCollectionItem.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.AddCollectionItemRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.AddCollectionItemRequest) + com.google.cloud.visionai.v1.AddCollectionItemRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_AddCollectionItemRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_AddCollectionItemRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.AddCollectionItemRequest.class, + com.google.cloud.visionai.v1.AddCollectionItemRequest.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.AddCollectionItemRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getItemFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + item_ = null; + if (itemBuilder_ != null) { + itemBuilder_.dispose(); + itemBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_AddCollectionItemRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.AddCollectionItemRequest getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.AddCollectionItemRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.AddCollectionItemRequest build() { + com.google.cloud.visionai.v1.AddCollectionItemRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.AddCollectionItemRequest buildPartial() { + com.google.cloud.visionai.v1.AddCollectionItemRequest result = + new com.google.cloud.visionai.v1.AddCollectionItemRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.visionai.v1.AddCollectionItemRequest result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.item_ = itemBuilder_ == null ? item_ : itemBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.AddCollectionItemRequest) { + return mergeFrom((com.google.cloud.visionai.v1.AddCollectionItemRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.AddCollectionItemRequest other) { + if (other == com.google.cloud.visionai.v1.AddCollectionItemRequest.getDefaultInstance()) + return this; + if (other.hasItem()) { + mergeItem(other.getItem()); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getItemFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.cloud.visionai.v1.CollectionItem item_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.CollectionItem, + com.google.cloud.visionai.v1.CollectionItem.Builder, + com.google.cloud.visionai.v1.CollectionItemOrBuilder> + itemBuilder_; + /** + * + * + *
+     * Required. The item to be added.
+     * 
+ * + * + * .google.cloud.visionai.v1.CollectionItem item = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the item field is set. + */ + public boolean hasItem() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * Required. The item to be added.
+     * 
+ * + * + * .google.cloud.visionai.v1.CollectionItem item = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The item. + */ + public com.google.cloud.visionai.v1.CollectionItem getItem() { + if (itemBuilder_ == null) { + return item_ == null + ? com.google.cloud.visionai.v1.CollectionItem.getDefaultInstance() + : item_; + } else { + return itemBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The item to be added.
+     * 
+ * + * + * .google.cloud.visionai.v1.CollectionItem item = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setItem(com.google.cloud.visionai.v1.CollectionItem value) { + if (itemBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + item_ = value; + } else { + itemBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The item to be added.
+     * 
+ * + * + * .google.cloud.visionai.v1.CollectionItem item = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setItem(com.google.cloud.visionai.v1.CollectionItem.Builder builderForValue) { + if (itemBuilder_ == null) { + item_ = builderForValue.build(); + } else { + itemBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The item to be added.
+     * 
+ * + * + * .google.cloud.visionai.v1.CollectionItem item = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeItem(com.google.cloud.visionai.v1.CollectionItem value) { + if (itemBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && item_ != null + && item_ != com.google.cloud.visionai.v1.CollectionItem.getDefaultInstance()) { + getItemBuilder().mergeFrom(value); + } else { + item_ = value; + } + } else { + itemBuilder_.mergeFrom(value); + } + if (item_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Required. The item to be added.
+     * 
+ * + * + * .google.cloud.visionai.v1.CollectionItem item = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearItem() { + bitField0_ = (bitField0_ & ~0x00000001); + item_ = null; + if (itemBuilder_ != null) { + itemBuilder_.dispose(); + itemBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The item to be added.
+     * 
+ * + * + * .google.cloud.visionai.v1.CollectionItem item = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.visionai.v1.CollectionItem.Builder getItemBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getItemFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The item to be added.
+     * 
+ * + * + * .google.cloud.visionai.v1.CollectionItem item = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.visionai.v1.CollectionItemOrBuilder getItemOrBuilder() { + if (itemBuilder_ != null) { + return itemBuilder_.getMessageOrBuilder(); + } else { + return item_ == null + ? com.google.cloud.visionai.v1.CollectionItem.getDefaultInstance() + : item_; + } + } + /** + * + * + *
+     * Required. The item to be added.
+     * 
+ * + * + * .google.cloud.visionai.v1.CollectionItem item = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.CollectionItem, + com.google.cloud.visionai.v1.CollectionItem.Builder, + com.google.cloud.visionai.v1.CollectionItemOrBuilder> + getItemFieldBuilder() { + if (itemBuilder_ == null) { + itemBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.CollectionItem, + com.google.cloud.visionai.v1.CollectionItem.Builder, + com.google.cloud.visionai.v1.CollectionItemOrBuilder>( + getItem(), getParentForChildren(), isClean()); + item_ = null; + } + return itemBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.AddCollectionItemRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.AddCollectionItemRequest) + private static final com.google.cloud.visionai.v1.AddCollectionItemRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.AddCollectionItemRequest(); + } + + public static com.google.cloud.visionai.v1.AddCollectionItemRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AddCollectionItemRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.AddCollectionItemRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/AddCollectionItemRequestOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/AddCollectionItemRequestOrBuilder.java new file mode 100644 index 000000000000..8d87e51014fd --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/AddCollectionItemRequestOrBuilder.java @@ -0,0 +1,67 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/warehouse.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface AddCollectionItemRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.AddCollectionItemRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The item to be added.
+   * 
+ * + * + * .google.cloud.visionai.v1.CollectionItem item = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the item field is set. + */ + boolean hasItem(); + /** + * + * + *
+   * Required. The item to be added.
+   * 
+ * + * + * .google.cloud.visionai.v1.CollectionItem item = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The item. + */ + com.google.cloud.visionai.v1.CollectionItem getItem(); + /** + * + * + *
+   * Required. The item to be added.
+   * 
+ * + * + * .google.cloud.visionai.v1.CollectionItem item = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.visionai.v1.CollectionItemOrBuilder getItemOrBuilder(); +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/AddCollectionItemResponse.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/AddCollectionItemResponse.java new file mode 100644 index 000000000000..66a6bccad2fc --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/AddCollectionItemResponse.java @@ -0,0 +1,718 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/warehouse.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * Response message for AddCollectionItem.
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.AddCollectionItemResponse} + */ +public final class AddCollectionItemResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.AddCollectionItemResponse) + AddCollectionItemResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use AddCollectionItemResponse.newBuilder() to construct. + private AddCollectionItemResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private AddCollectionItemResponse() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new AddCollectionItemResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_AddCollectionItemResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_AddCollectionItemResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.AddCollectionItemResponse.class, + com.google.cloud.visionai.v1.AddCollectionItemResponse.Builder.class); + } + + private int bitField0_; + public static final int ITEM_FIELD_NUMBER = 1; + private com.google.cloud.visionai.v1.CollectionItem item_; + /** + * + * + *
+   * The item that has already been added.
+   * 
+ * + * .google.cloud.visionai.v1.CollectionItem item = 1; + * + * @return Whether the item field is set. + */ + @java.lang.Override + public boolean hasItem() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * The item that has already been added.
+   * 
+ * + * .google.cloud.visionai.v1.CollectionItem item = 1; + * + * @return The item. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.CollectionItem getItem() { + return item_ == null ? com.google.cloud.visionai.v1.CollectionItem.getDefaultInstance() : item_; + } + /** + * + * + *
+   * The item that has already been added.
+   * 
+ * + * .google.cloud.visionai.v1.CollectionItem item = 1; + */ + @java.lang.Override + public com.google.cloud.visionai.v1.CollectionItemOrBuilder getItemOrBuilder() { + return item_ == null ? com.google.cloud.visionai.v1.CollectionItem.getDefaultInstance() : item_; + } + + 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 (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getItem()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getItem()); + } + size += getUnknownFields().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.visionai.v1.AddCollectionItemResponse)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.AddCollectionItemResponse other = + (com.google.cloud.visionai.v1.AddCollectionItemResponse) obj; + + if (hasItem() != other.hasItem()) return false; + if (hasItem()) { + if (!getItem().equals(other.getItem())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasItem()) { + hash = (37 * hash) + ITEM_FIELD_NUMBER; + hash = (53 * hash) + getItem().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.AddCollectionItemResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.AddCollectionItemResponse 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.visionai.v1.AddCollectionItemResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.AddCollectionItemResponse 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.visionai.v1.AddCollectionItemResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.AddCollectionItemResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.AddCollectionItemResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.AddCollectionItemResponse 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.visionai.v1.AddCollectionItemResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.AddCollectionItemResponse 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.visionai.v1.AddCollectionItemResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.AddCollectionItemResponse 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.visionai.v1.AddCollectionItemResponse 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; + } + /** + * + * + *
+   * Response message for AddCollectionItem.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.AddCollectionItemResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.AddCollectionItemResponse) + com.google.cloud.visionai.v1.AddCollectionItemResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_AddCollectionItemResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_AddCollectionItemResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.AddCollectionItemResponse.class, + com.google.cloud.visionai.v1.AddCollectionItemResponse.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.AddCollectionItemResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getItemFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + item_ = null; + if (itemBuilder_ != null) { + itemBuilder_.dispose(); + itemBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_AddCollectionItemResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.AddCollectionItemResponse getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.AddCollectionItemResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.AddCollectionItemResponse build() { + com.google.cloud.visionai.v1.AddCollectionItemResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.AddCollectionItemResponse buildPartial() { + com.google.cloud.visionai.v1.AddCollectionItemResponse result = + new com.google.cloud.visionai.v1.AddCollectionItemResponse(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.visionai.v1.AddCollectionItemResponse result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.item_ = itemBuilder_ == null ? item_ : itemBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.AddCollectionItemResponse) { + return mergeFrom((com.google.cloud.visionai.v1.AddCollectionItemResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.AddCollectionItemResponse other) { + if (other == com.google.cloud.visionai.v1.AddCollectionItemResponse.getDefaultInstance()) + return this; + if (other.hasItem()) { + mergeItem(other.getItem()); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getItemFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.cloud.visionai.v1.CollectionItem item_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.CollectionItem, + com.google.cloud.visionai.v1.CollectionItem.Builder, + com.google.cloud.visionai.v1.CollectionItemOrBuilder> + itemBuilder_; + /** + * + * + *
+     * The item that has already been added.
+     * 
+ * + * .google.cloud.visionai.v1.CollectionItem item = 1; + * + * @return Whether the item field is set. + */ + public boolean hasItem() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * The item that has already been added.
+     * 
+ * + * .google.cloud.visionai.v1.CollectionItem item = 1; + * + * @return The item. + */ + public com.google.cloud.visionai.v1.CollectionItem getItem() { + if (itemBuilder_ == null) { + return item_ == null + ? com.google.cloud.visionai.v1.CollectionItem.getDefaultInstance() + : item_; + } else { + return itemBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The item that has already been added.
+     * 
+ * + * .google.cloud.visionai.v1.CollectionItem item = 1; + */ + public Builder setItem(com.google.cloud.visionai.v1.CollectionItem value) { + if (itemBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + item_ = value; + } else { + itemBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The item that has already been added.
+     * 
+ * + * .google.cloud.visionai.v1.CollectionItem item = 1; + */ + public Builder setItem(com.google.cloud.visionai.v1.CollectionItem.Builder builderForValue) { + if (itemBuilder_ == null) { + item_ = builderForValue.build(); + } else { + itemBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The item that has already been added.
+     * 
+ * + * .google.cloud.visionai.v1.CollectionItem item = 1; + */ + public Builder mergeItem(com.google.cloud.visionai.v1.CollectionItem value) { + if (itemBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && item_ != null + && item_ != com.google.cloud.visionai.v1.CollectionItem.getDefaultInstance()) { + getItemBuilder().mergeFrom(value); + } else { + item_ = value; + } + } else { + itemBuilder_.mergeFrom(value); + } + if (item_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + /** + * + * + *
+     * The item that has already been added.
+     * 
+ * + * .google.cloud.visionai.v1.CollectionItem item = 1; + */ + public Builder clearItem() { + bitField0_ = (bitField0_ & ~0x00000001); + item_ = null; + if (itemBuilder_ != null) { + itemBuilder_.dispose(); + itemBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * The item that has already been added.
+     * 
+ * + * .google.cloud.visionai.v1.CollectionItem item = 1; + */ + public com.google.cloud.visionai.v1.CollectionItem.Builder getItemBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getItemFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The item that has already been added.
+     * 
+ * + * .google.cloud.visionai.v1.CollectionItem item = 1; + */ + public com.google.cloud.visionai.v1.CollectionItemOrBuilder getItemOrBuilder() { + if (itemBuilder_ != null) { + return itemBuilder_.getMessageOrBuilder(); + } else { + return item_ == null + ? com.google.cloud.visionai.v1.CollectionItem.getDefaultInstance() + : item_; + } + } + /** + * + * + *
+     * The item that has already been added.
+     * 
+ * + * .google.cloud.visionai.v1.CollectionItem item = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.CollectionItem, + com.google.cloud.visionai.v1.CollectionItem.Builder, + com.google.cloud.visionai.v1.CollectionItemOrBuilder> + getItemFieldBuilder() { + if (itemBuilder_ == null) { + itemBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.CollectionItem, + com.google.cloud.visionai.v1.CollectionItem.Builder, + com.google.cloud.visionai.v1.CollectionItemOrBuilder>( + getItem(), getParentForChildren(), isClean()); + item_ = null; + } + return itemBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.AddCollectionItemResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.AddCollectionItemResponse) + private static final com.google.cloud.visionai.v1.AddCollectionItemResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.AddCollectionItemResponse(); + } + + public static com.google.cloud.visionai.v1.AddCollectionItemResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AddCollectionItemResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.AddCollectionItemResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/AddCollectionItemResponseOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/AddCollectionItemResponseOrBuilder.java new file mode 100644 index 000000000000..6d3f7360ebae --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/AddCollectionItemResponseOrBuilder.java @@ -0,0 +1,61 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/warehouse.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface AddCollectionItemResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.AddCollectionItemResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The item that has already been added.
+   * 
+ * + * .google.cloud.visionai.v1.CollectionItem item = 1; + * + * @return Whether the item field is set. + */ + boolean hasItem(); + /** + * + * + *
+   * The item that has already been added.
+   * 
+ * + * .google.cloud.visionai.v1.CollectionItem item = 1; + * + * @return The item. + */ + com.google.cloud.visionai.v1.CollectionItem getItem(); + /** + * + * + *
+   * The item that has already been added.
+   * 
+ * + * .google.cloud.visionai.v1.CollectionItem item = 1; + */ + com.google.cloud.visionai.v1.CollectionItemOrBuilder getItemOrBuilder(); +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/Analysis.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/Analysis.java new file mode 100644 index 000000000000..d56d4fc25fd6 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/Analysis.java @@ -0,0 +1,2630 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/lva_resources.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * Message describing the Analysis object.
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.Analysis} + */ +public final class Analysis extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.Analysis) + AnalysisOrBuilder { + private static final long serialVersionUID = 0L; + // Use Analysis.newBuilder() to construct. + private Analysis(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Analysis() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Analysis(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.LvaResourcesProto + .internal_static_google_cloud_visionai_v1_Analysis_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 4: + return internalGetLabels(); + case 6: + return internalGetInputStreamsMapping(); + case 7: + return internalGetOutputStreamsMapping(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.LvaResourcesProto + .internal_static_google_cloud_visionai_v1_Analysis_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.Analysis.class, + com.google.cloud.visionai.v1.Analysis.Builder.class); + } + + private int bitField0_; + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * The name of resource.
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + 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(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * The name of resource.
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CREATE_TIME_FIELD_NUMBER = 2; + private com.google.protobuf.Timestamp createTime_; + /** + * + * + *
+   * Output only. The create timestamp.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * Output only. The create timestamp.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + /** + * + * + *
+   * Output only. The create timestamp.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + + public static final int UPDATE_TIME_FIELD_NUMBER = 3; + private com.google.protobuf.Timestamp updateTime_; + /** + * + * + *
+   * Output only. The update timestamp.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + @java.lang.Override + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+   * Output only. The update timestamp.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getUpdateTime() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + /** + * + * + *
+   * Output only. The update timestamp.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + + public static final int LABELS_FIELD_NUMBER = 4; + + private static final class LabelsDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.cloud.visionai.v1.LvaResourcesProto + .internal_static_google_cloud_visionai_v1_Analysis_LabelsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + + @SuppressWarnings("serial") + private com.google.protobuf.MapField labels_; + + private com.google.protobuf.MapField internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + /** + * + * + *
+   * Labels as key value pairs.
+   * 
+ * + * map<string, string> labels = 4; + */ + @java.lang.Override + public boolean containsLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetLabels().getMap().containsKey(key); + } + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + /** + * + * + *
+   * Labels as key value pairs.
+   * 
+ * + * map<string, string> labels = 4; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + * + * + *
+   * Labels as key value pairs.
+   * 
+ * + * map<string, string> labels = 4; + */ + @java.lang.Override + public /* nullable */ java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+   * Labels as key value pairs.
+   * 
+ * + * map<string, string> labels = 4; + */ + @java.lang.Override + public java.lang.String getLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int ANALYSIS_DEFINITION_FIELD_NUMBER = 5; + private com.google.cloud.visionai.v1.AnalysisDefinition analysisDefinition_; + /** + * + * + *
+   * The definition of the analysis.
+   * 
+ * + * .google.cloud.visionai.v1.AnalysisDefinition analysis_definition = 5; + * + * @return Whether the analysisDefinition field is set. + */ + @java.lang.Override + public boolean hasAnalysisDefinition() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+   * The definition of the analysis.
+   * 
+ * + * .google.cloud.visionai.v1.AnalysisDefinition analysis_definition = 5; + * + * @return The analysisDefinition. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.AnalysisDefinition getAnalysisDefinition() { + return analysisDefinition_ == null + ? com.google.cloud.visionai.v1.AnalysisDefinition.getDefaultInstance() + : analysisDefinition_; + } + /** + * + * + *
+   * The definition of the analysis.
+   * 
+ * + * .google.cloud.visionai.v1.AnalysisDefinition analysis_definition = 5; + */ + @java.lang.Override + public com.google.cloud.visionai.v1.AnalysisDefinitionOrBuilder getAnalysisDefinitionOrBuilder() { + return analysisDefinition_ == null + ? com.google.cloud.visionai.v1.AnalysisDefinition.getDefaultInstance() + : analysisDefinition_; + } + + public static final int INPUT_STREAMS_MAPPING_FIELD_NUMBER = 6; + + private static final class InputStreamsMappingDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.cloud.visionai.v1.LvaResourcesProto + .internal_static_google_cloud_visionai_v1_Analysis_InputStreamsMappingEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + + @SuppressWarnings("serial") + private com.google.protobuf.MapField inputStreamsMapping_; + + private com.google.protobuf.MapField + internalGetInputStreamsMapping() { + if (inputStreamsMapping_ == null) { + return com.google.protobuf.MapField.emptyMapField( + InputStreamsMappingDefaultEntryHolder.defaultEntry); + } + return inputStreamsMapping_; + } + + public int getInputStreamsMappingCount() { + return internalGetInputStreamsMapping().getMap().size(); + } + /** + * + * + *
+   * Map from the input parameter in the definition to the real stream.
+   * E.g., suppose you had a stream source operator named "input-0" and you try
+   * to receive from the real stream "stream-0". You can add the following
+   * mapping: [input-0: stream-0].
+   * 
+ * + * map<string, string> input_streams_mapping = 6; + */ + @java.lang.Override + public boolean containsInputStreamsMapping(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetInputStreamsMapping().getMap().containsKey(key); + } + /** Use {@link #getInputStreamsMappingMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getInputStreamsMapping() { + return getInputStreamsMappingMap(); + } + /** + * + * + *
+   * Map from the input parameter in the definition to the real stream.
+   * E.g., suppose you had a stream source operator named "input-0" and you try
+   * to receive from the real stream "stream-0". You can add the following
+   * mapping: [input-0: stream-0].
+   * 
+ * + * map<string, string> input_streams_mapping = 6; + */ + @java.lang.Override + public java.util.Map getInputStreamsMappingMap() { + return internalGetInputStreamsMapping().getMap(); + } + /** + * + * + *
+   * Map from the input parameter in the definition to the real stream.
+   * E.g., suppose you had a stream source operator named "input-0" and you try
+   * to receive from the real stream "stream-0". You can add the following
+   * mapping: [input-0: stream-0].
+   * 
+ * + * map<string, string> input_streams_mapping = 6; + */ + @java.lang.Override + public /* nullable */ java.lang.String getInputStreamsMappingOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = + internalGetInputStreamsMapping().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+   * Map from the input parameter in the definition to the real stream.
+   * E.g., suppose you had a stream source operator named "input-0" and you try
+   * to receive from the real stream "stream-0". You can add the following
+   * mapping: [input-0: stream-0].
+   * 
+ * + * map<string, string> input_streams_mapping = 6; + */ + @java.lang.Override + public java.lang.String getInputStreamsMappingOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = + internalGetInputStreamsMapping().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int OUTPUT_STREAMS_MAPPING_FIELD_NUMBER = 7; + + private static final class OutputStreamsMappingDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.cloud.visionai.v1.LvaResourcesProto + .internal_static_google_cloud_visionai_v1_Analysis_OutputStreamsMappingEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + + @SuppressWarnings("serial") + private com.google.protobuf.MapField outputStreamsMapping_; + + private com.google.protobuf.MapField + internalGetOutputStreamsMapping() { + if (outputStreamsMapping_ == null) { + return com.google.protobuf.MapField.emptyMapField( + OutputStreamsMappingDefaultEntryHolder.defaultEntry); + } + return outputStreamsMapping_; + } + + public int getOutputStreamsMappingCount() { + return internalGetOutputStreamsMapping().getMap().size(); + } + /** + * + * + *
+   * Map from the output parameter in the definition to the real stream.
+   * E.g., suppose you had a stream sink operator named "output-0" and you try
+   * to send to the real stream "stream-0". You can add the following
+   * mapping: [output-0: stream-0].
+   * 
+ * + * map<string, string> output_streams_mapping = 7; + */ + @java.lang.Override + public boolean containsOutputStreamsMapping(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetOutputStreamsMapping().getMap().containsKey(key); + } + /** Use {@link #getOutputStreamsMappingMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getOutputStreamsMapping() { + return getOutputStreamsMappingMap(); + } + /** + * + * + *
+   * Map from the output parameter in the definition to the real stream.
+   * E.g., suppose you had a stream sink operator named "output-0" and you try
+   * to send to the real stream "stream-0". You can add the following
+   * mapping: [output-0: stream-0].
+   * 
+ * + * map<string, string> output_streams_mapping = 7; + */ + @java.lang.Override + public java.util.Map getOutputStreamsMappingMap() { + return internalGetOutputStreamsMapping().getMap(); + } + /** + * + * + *
+   * Map from the output parameter in the definition to the real stream.
+   * E.g., suppose you had a stream sink operator named "output-0" and you try
+   * to send to the real stream "stream-0". You can add the following
+   * mapping: [output-0: stream-0].
+   * 
+ * + * map<string, string> output_streams_mapping = 7; + */ + @java.lang.Override + public /* nullable */ java.lang.String getOutputStreamsMappingOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = + internalGetOutputStreamsMapping().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+   * Map from the output parameter in the definition to the real stream.
+   * E.g., suppose you had a stream sink operator named "output-0" and you try
+   * to send to the real stream "stream-0". You can add the following
+   * mapping: [output-0: stream-0].
+   * 
+ * + * map<string, string> output_streams_mapping = 7; + */ + @java.lang.Override + public java.lang.String getOutputStreamsMappingOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = + internalGetOutputStreamsMapping().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int DISABLE_EVENT_WATCH_FIELD_NUMBER = 8; + private boolean disableEventWatch_ = false; + /** + * + * + *
+   * Boolean flag to indicate whether you would like to disable the ability
+   * to automatically start a Process when new event happening in the input
+   * Stream. If you would like to start a Process manually, the field needs
+   * to be set to true.
+   * 
+ * + * bool disable_event_watch = 8; + * + * @return The disableEventWatch. + */ + @java.lang.Override + public boolean getDisableEventWatch() { + return disableEventWatch_; + } + + 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getCreateTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(3, getUpdateTime()); + } + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 4); + if (((bitField0_ & 0x00000004) != 0)) { + output.writeMessage(5, getAnalysisDefinition()); + } + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, + internalGetInputStreamsMapping(), + InputStreamsMappingDefaultEntryHolder.defaultEntry, + 6); + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, + internalGetOutputStreamsMapping(), + OutputStreamsMappingDefaultEntryHolder.defaultEntry, + 7); + if (disableEventWatch_ != false) { + output.writeBool(8, disableEventWatch_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getCreateTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getUpdateTime()); + } + for (java.util.Map.Entry entry : + internalGetLabels().getMap().entrySet()) { + com.google.protobuf.MapEntry labels__ = + LabelsDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, labels__); + } + if (((bitField0_ & 0x00000004) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getAnalysisDefinition()); + } + for (java.util.Map.Entry entry : + internalGetInputStreamsMapping().getMap().entrySet()) { + com.google.protobuf.MapEntry inputStreamsMapping__ = + InputStreamsMappingDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, inputStreamsMapping__); + } + for (java.util.Map.Entry entry : + internalGetOutputStreamsMapping().getMap().entrySet()) { + com.google.protobuf.MapEntry outputStreamsMapping__ = + OutputStreamsMappingDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, outputStreamsMapping__); + } + if (disableEventWatch_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(8, disableEventWatch_); + } + size += getUnknownFields().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.visionai.v1.Analysis)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.Analysis other = (com.google.cloud.visionai.v1.Analysis) obj; + + if (!getName().equals(other.getName())) return false; + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime().equals(other.getCreateTime())) return false; + } + if (hasUpdateTime() != other.hasUpdateTime()) return false; + if (hasUpdateTime()) { + if (!getUpdateTime().equals(other.getUpdateTime())) return false; + } + if (!internalGetLabels().equals(other.internalGetLabels())) return false; + if (hasAnalysisDefinition() != other.hasAnalysisDefinition()) return false; + if (hasAnalysisDefinition()) { + if (!getAnalysisDefinition().equals(other.getAnalysisDefinition())) return false; + } + if (!internalGetInputStreamsMapping().equals(other.internalGetInputStreamsMapping())) + return false; + if (!internalGetOutputStreamsMapping().equals(other.internalGetOutputStreamsMapping())) + return false; + if (getDisableEventWatch() != other.getDisableEventWatch()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasUpdateTime()) { + hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getUpdateTime().hashCode(); + } + if (!internalGetLabels().getMap().isEmpty()) { + hash = (37 * hash) + LABELS_FIELD_NUMBER; + hash = (53 * hash) + internalGetLabels().hashCode(); + } + if (hasAnalysisDefinition()) { + hash = (37 * hash) + ANALYSIS_DEFINITION_FIELD_NUMBER; + hash = (53 * hash) + getAnalysisDefinition().hashCode(); + } + if (!internalGetInputStreamsMapping().getMap().isEmpty()) { + hash = (37 * hash) + INPUT_STREAMS_MAPPING_FIELD_NUMBER; + hash = (53 * hash) + internalGetInputStreamsMapping().hashCode(); + } + if (!internalGetOutputStreamsMapping().getMap().isEmpty()) { + hash = (37 * hash) + OUTPUT_STREAMS_MAPPING_FIELD_NUMBER; + hash = (53 * hash) + internalGetOutputStreamsMapping().hashCode(); + } + hash = (37 * hash) + DISABLE_EVENT_WATCH_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getDisableEventWatch()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.Analysis parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.Analysis 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.visionai.v1.Analysis parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.Analysis 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.visionai.v1.Analysis parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.Analysis parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.Analysis parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.Analysis 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.visionai.v1.Analysis parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.Analysis 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.visionai.v1.Analysis parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.Analysis 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.visionai.v1.Analysis 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; + } + /** + * + * + *
+   * Message describing the Analysis object.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.Analysis} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.Analysis) + com.google.cloud.visionai.v1.AnalysisOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.LvaResourcesProto + .internal_static_google_cloud_visionai_v1_Analysis_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 4: + return internalGetLabels(); + case 6: + return internalGetInputStreamsMapping(); + case 7: + return internalGetOutputStreamsMapping(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( + int number) { + switch (number) { + case 4: + return internalGetMutableLabels(); + case 6: + return internalGetMutableInputStreamsMapping(); + case 7: + return internalGetMutableOutputStreamsMapping(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.LvaResourcesProto + .internal_static_google_cloud_visionai_v1_Analysis_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.Analysis.class, + com.google.cloud.visionai.v1.Analysis.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.Analysis.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getCreateTimeFieldBuilder(); + getUpdateTimeFieldBuilder(); + getAnalysisDefinitionFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + internalGetMutableLabels().clear(); + analysisDefinition_ = null; + if (analysisDefinitionBuilder_ != null) { + analysisDefinitionBuilder_.dispose(); + analysisDefinitionBuilder_ = null; + } + internalGetMutableInputStreamsMapping().clear(); + internalGetMutableOutputStreamsMapping().clear(); + disableEventWatch_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.LvaResourcesProto + .internal_static_google_cloud_visionai_v1_Analysis_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.Analysis getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.Analysis.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.Analysis build() { + com.google.cloud.visionai.v1.Analysis result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.Analysis buildPartial() { + com.google.cloud.visionai.v1.Analysis result = + new com.google.cloud.visionai.v1.Analysis(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.visionai.v1.Analysis result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.updateTime_ = updateTimeBuilder_ == null ? updateTime_ : updateTimeBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.labels_ = internalGetLabels(); + result.labels_.makeImmutable(); + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.analysisDefinition_ = + analysisDefinitionBuilder_ == null + ? analysisDefinition_ + : analysisDefinitionBuilder_.build(); + to_bitField0_ |= 0x00000004; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.inputStreamsMapping_ = internalGetInputStreamsMapping(); + result.inputStreamsMapping_.makeImmutable(); + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.outputStreamsMapping_ = internalGetOutputStreamsMapping(); + result.outputStreamsMapping_.makeImmutable(); + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.disableEventWatch_ = disableEventWatch_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.Analysis) { + return mergeFrom((com.google.cloud.visionai.v1.Analysis) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.Analysis other) { + if (other == com.google.cloud.visionai.v1.Analysis.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + internalGetMutableLabels().mergeFrom(other.internalGetLabels()); + bitField0_ |= 0x00000008; + if (other.hasAnalysisDefinition()) { + mergeAnalysisDefinition(other.getAnalysisDefinition()); + } + internalGetMutableInputStreamsMapping().mergeFrom(other.internalGetInputStreamsMapping()); + bitField0_ |= 0x00000020; + internalGetMutableOutputStreamsMapping().mergeFrom(other.internalGetOutputStreamsMapping()); + bitField0_ |= 0x00000040; + if (other.getDisableEventWatch() != false) { + setDisableEventWatch(other.getDisableEventWatch()); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage(getUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + com.google.protobuf.MapEntry labels__ = + input.readMessage( + LabelsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableLabels() + .getMutableMap() + .put(labels__.getKey(), labels__.getValue()); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + input.readMessage( + getAnalysisDefinitionFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 50: + { + com.google.protobuf.MapEntry + inputStreamsMapping__ = + input.readMessage( + InputStreamsMappingDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableInputStreamsMapping() + .getMutableMap() + .put(inputStreamsMapping__.getKey(), inputStreamsMapping__.getValue()); + bitField0_ |= 0x00000020; + break; + } // case 50 + case 58: + { + com.google.protobuf.MapEntry + outputStreamsMapping__ = + input.readMessage( + OutputStreamsMappingDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableOutputStreamsMapping() + .getMutableMap() + .put(outputStreamsMapping__.getKey(), outputStreamsMapping__.getValue()); + bitField0_ |= 0x00000040; + break; + } // case 58 + case 64: + { + disableEventWatch_ = input.readBool(); + bitField0_ |= 0x00000080; + break; + } // case 64 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * The name of resource.
+     * 
+ * + * string name = 1; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The name of resource.
+     * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The name of resource.
+     * 
+ * + * string name = 1; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The name of resource.
+     * 
+ * + * string name = 1; + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * The name of resource.
+     * 
+ * + * string name = 1; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + createTimeBuilder_; + /** + * + * + *
+     * Output only. The create timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * Output only. The create timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. The create timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + } else { + createTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The create timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The create timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && createTime_ != null + && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getCreateTimeBuilder().mergeFrom(value); + } else { + createTime_ = value; + } + } else { + createTimeBuilder_.mergeFrom(value); + } + if (createTime_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Output only. The create timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearCreateTime() { + bitField0_ = (bitField0_ & ~0x00000002); + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The create timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. The create timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } + } + /** + * + * + *
+     * Output only. The create timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), getParentForChildren(), isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private com.google.protobuf.Timestamp updateTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + updateTimeBuilder_; + /** + * + * + *
+     * Output only. The update timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+     * Output only. The update timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + public com.google.protobuf.Timestamp getUpdateTime() { + if (updateTimeBuilder_ == null) { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } else { + return updateTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. The update timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateTime_ = value; + } else { + updateTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The update timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (updateTimeBuilder_ == null) { + updateTime_ = builderForValue.build(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The update timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && updateTime_ != null + && updateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getUpdateTimeBuilder().mergeFrom(value); + } else { + updateTime_ = value; + } + } else { + updateTimeBuilder_.mergeFrom(value); + } + if (updateTime_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Output only. The update timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearUpdateTime() { + bitField0_ = (bitField0_ & ~0x00000004); + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The update timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getUpdateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. The update timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + if (updateTimeBuilder_ != null) { + return updateTimeBuilder_.getMessageOrBuilder(); + } else { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } + } + /** + * + * + *
+     * Output only. The update timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + 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_; + } + + private com.google.protobuf.MapField labels_; + + private com.google.protobuf.MapField internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + + private com.google.protobuf.MapField + internalGetMutableLabels() { + if (labels_ == null) { + labels_ = com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry); + } + if (!labels_.isMutable()) { + labels_ = labels_.copy(); + } + bitField0_ |= 0x00000008; + onChanged(); + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + /** + * + * + *
+     * Labels as key value pairs.
+     * 
+ * + * map<string, string> labels = 4; + */ + @java.lang.Override + public boolean containsLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetLabels().getMap().containsKey(key); + } + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + /** + * + * + *
+     * Labels as key value pairs.
+     * 
+ * + * map<string, string> labels = 4; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + * + * + *
+     * Labels as key value pairs.
+     * 
+ * + * map<string, string> labels = 4; + */ + @java.lang.Override + public /* nullable */ java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+     * Labels as key value pairs.
+     * 
+ * + * map<string, string> labels = 4; + */ + @java.lang.Override + public java.lang.String getLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearLabels() { + bitField0_ = (bitField0_ & ~0x00000008); + internalGetMutableLabels().getMutableMap().clear(); + return this; + } + /** + * + * + *
+     * Labels as key value pairs.
+     * 
+ * + * map<string, string> labels = 4; + */ + public Builder removeLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + internalGetMutableLabels().getMutableMap().remove(key); + return this; + } + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableLabels() { + bitField0_ |= 0x00000008; + return internalGetMutableLabels().getMutableMap(); + } + /** + * + * + *
+     * Labels as key value pairs.
+     * 
+ * + * map<string, string> labels = 4; + */ + public Builder putLabels(java.lang.String key, java.lang.String value) { + if (key == null) { + throw new NullPointerException("map key"); + } + if (value == null) { + throw new NullPointerException("map value"); + } + internalGetMutableLabels().getMutableMap().put(key, value); + bitField0_ |= 0x00000008; + return this; + } + /** + * + * + *
+     * Labels as key value pairs.
+     * 
+ * + * map<string, string> labels = 4; + */ + public Builder putAllLabels(java.util.Map values) { + internalGetMutableLabels().getMutableMap().putAll(values); + bitField0_ |= 0x00000008; + return this; + } + + private com.google.cloud.visionai.v1.AnalysisDefinition analysisDefinition_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.AnalysisDefinition, + com.google.cloud.visionai.v1.AnalysisDefinition.Builder, + com.google.cloud.visionai.v1.AnalysisDefinitionOrBuilder> + analysisDefinitionBuilder_; + /** + * + * + *
+     * The definition of the analysis.
+     * 
+ * + * .google.cloud.visionai.v1.AnalysisDefinition analysis_definition = 5; + * + * @return Whether the analysisDefinition field is set. + */ + public boolean hasAnalysisDefinition() { + return ((bitField0_ & 0x00000010) != 0); + } + /** + * + * + *
+     * The definition of the analysis.
+     * 
+ * + * .google.cloud.visionai.v1.AnalysisDefinition analysis_definition = 5; + * + * @return The analysisDefinition. + */ + public com.google.cloud.visionai.v1.AnalysisDefinition getAnalysisDefinition() { + if (analysisDefinitionBuilder_ == null) { + return analysisDefinition_ == null + ? com.google.cloud.visionai.v1.AnalysisDefinition.getDefaultInstance() + : analysisDefinition_; + } else { + return analysisDefinitionBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The definition of the analysis.
+     * 
+ * + * .google.cloud.visionai.v1.AnalysisDefinition analysis_definition = 5; + */ + public Builder setAnalysisDefinition(com.google.cloud.visionai.v1.AnalysisDefinition value) { + if (analysisDefinitionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + analysisDefinition_ = value; + } else { + analysisDefinitionBuilder_.setMessage(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * The definition of the analysis.
+     * 
+ * + * .google.cloud.visionai.v1.AnalysisDefinition analysis_definition = 5; + */ + public Builder setAnalysisDefinition( + com.google.cloud.visionai.v1.AnalysisDefinition.Builder builderForValue) { + if (analysisDefinitionBuilder_ == null) { + analysisDefinition_ = builderForValue.build(); + } else { + analysisDefinitionBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * The definition of the analysis.
+     * 
+ * + * .google.cloud.visionai.v1.AnalysisDefinition analysis_definition = 5; + */ + public Builder mergeAnalysisDefinition(com.google.cloud.visionai.v1.AnalysisDefinition value) { + if (analysisDefinitionBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0) + && analysisDefinition_ != null + && analysisDefinition_ + != com.google.cloud.visionai.v1.AnalysisDefinition.getDefaultInstance()) { + getAnalysisDefinitionBuilder().mergeFrom(value); + } else { + analysisDefinition_ = value; + } + } else { + analysisDefinitionBuilder_.mergeFrom(value); + } + if (analysisDefinition_ != null) { + bitField0_ |= 0x00000010; + onChanged(); + } + return this; + } + /** + * + * + *
+     * The definition of the analysis.
+     * 
+ * + * .google.cloud.visionai.v1.AnalysisDefinition analysis_definition = 5; + */ + public Builder clearAnalysisDefinition() { + bitField0_ = (bitField0_ & ~0x00000010); + analysisDefinition_ = null; + if (analysisDefinitionBuilder_ != null) { + analysisDefinitionBuilder_.dispose(); + analysisDefinitionBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * The definition of the analysis.
+     * 
+ * + * .google.cloud.visionai.v1.AnalysisDefinition analysis_definition = 5; + */ + public com.google.cloud.visionai.v1.AnalysisDefinition.Builder getAnalysisDefinitionBuilder() { + bitField0_ |= 0x00000010; + onChanged(); + return getAnalysisDefinitionFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The definition of the analysis.
+     * 
+ * + * .google.cloud.visionai.v1.AnalysisDefinition analysis_definition = 5; + */ + public com.google.cloud.visionai.v1.AnalysisDefinitionOrBuilder + getAnalysisDefinitionOrBuilder() { + if (analysisDefinitionBuilder_ != null) { + return analysisDefinitionBuilder_.getMessageOrBuilder(); + } else { + return analysisDefinition_ == null + ? com.google.cloud.visionai.v1.AnalysisDefinition.getDefaultInstance() + : analysisDefinition_; + } + } + /** + * + * + *
+     * The definition of the analysis.
+     * 
+ * + * .google.cloud.visionai.v1.AnalysisDefinition analysis_definition = 5; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.AnalysisDefinition, + com.google.cloud.visionai.v1.AnalysisDefinition.Builder, + com.google.cloud.visionai.v1.AnalysisDefinitionOrBuilder> + getAnalysisDefinitionFieldBuilder() { + if (analysisDefinitionBuilder_ == null) { + analysisDefinitionBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.AnalysisDefinition, + com.google.cloud.visionai.v1.AnalysisDefinition.Builder, + com.google.cloud.visionai.v1.AnalysisDefinitionOrBuilder>( + getAnalysisDefinition(), getParentForChildren(), isClean()); + analysisDefinition_ = null; + } + return analysisDefinitionBuilder_; + } + + private com.google.protobuf.MapField inputStreamsMapping_; + + private com.google.protobuf.MapField + internalGetInputStreamsMapping() { + if (inputStreamsMapping_ == null) { + return com.google.protobuf.MapField.emptyMapField( + InputStreamsMappingDefaultEntryHolder.defaultEntry); + } + return inputStreamsMapping_; + } + + private com.google.protobuf.MapField + internalGetMutableInputStreamsMapping() { + if (inputStreamsMapping_ == null) { + inputStreamsMapping_ = + com.google.protobuf.MapField.newMapField( + InputStreamsMappingDefaultEntryHolder.defaultEntry); + } + if (!inputStreamsMapping_.isMutable()) { + inputStreamsMapping_ = inputStreamsMapping_.copy(); + } + bitField0_ |= 0x00000020; + onChanged(); + return inputStreamsMapping_; + } + + public int getInputStreamsMappingCount() { + return internalGetInputStreamsMapping().getMap().size(); + } + /** + * + * + *
+     * Map from the input parameter in the definition to the real stream.
+     * E.g., suppose you had a stream source operator named "input-0" and you try
+     * to receive from the real stream "stream-0". You can add the following
+     * mapping: [input-0: stream-0].
+     * 
+ * + * map<string, string> input_streams_mapping = 6; + */ + @java.lang.Override + public boolean containsInputStreamsMapping(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetInputStreamsMapping().getMap().containsKey(key); + } + /** Use {@link #getInputStreamsMappingMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getInputStreamsMapping() { + return getInputStreamsMappingMap(); + } + /** + * + * + *
+     * Map from the input parameter in the definition to the real stream.
+     * E.g., suppose you had a stream source operator named "input-0" and you try
+     * to receive from the real stream "stream-0". You can add the following
+     * mapping: [input-0: stream-0].
+     * 
+ * + * map<string, string> input_streams_mapping = 6; + */ + @java.lang.Override + public java.util.Map getInputStreamsMappingMap() { + return internalGetInputStreamsMapping().getMap(); + } + /** + * + * + *
+     * Map from the input parameter in the definition to the real stream.
+     * E.g., suppose you had a stream source operator named "input-0" and you try
+     * to receive from the real stream "stream-0". You can add the following
+     * mapping: [input-0: stream-0].
+     * 
+ * + * map<string, string> input_streams_mapping = 6; + */ + @java.lang.Override + public /* nullable */ java.lang.String getInputStreamsMappingOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = + internalGetInputStreamsMapping().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+     * Map from the input parameter in the definition to the real stream.
+     * E.g., suppose you had a stream source operator named "input-0" and you try
+     * to receive from the real stream "stream-0". You can add the following
+     * mapping: [input-0: stream-0].
+     * 
+ * + * map<string, string> input_streams_mapping = 6; + */ + @java.lang.Override + public java.lang.String getInputStreamsMappingOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = + internalGetInputStreamsMapping().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearInputStreamsMapping() { + bitField0_ = (bitField0_ & ~0x00000020); + internalGetMutableInputStreamsMapping().getMutableMap().clear(); + return this; + } + /** + * + * + *
+     * Map from the input parameter in the definition to the real stream.
+     * E.g., suppose you had a stream source operator named "input-0" and you try
+     * to receive from the real stream "stream-0". You can add the following
+     * mapping: [input-0: stream-0].
+     * 
+ * + * map<string, string> input_streams_mapping = 6; + */ + public Builder removeInputStreamsMapping(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + internalGetMutableInputStreamsMapping().getMutableMap().remove(key); + return this; + } + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableInputStreamsMapping() { + bitField0_ |= 0x00000020; + return internalGetMutableInputStreamsMapping().getMutableMap(); + } + /** + * + * + *
+     * Map from the input parameter in the definition to the real stream.
+     * E.g., suppose you had a stream source operator named "input-0" and you try
+     * to receive from the real stream "stream-0". You can add the following
+     * mapping: [input-0: stream-0].
+     * 
+ * + * map<string, string> input_streams_mapping = 6; + */ + public Builder putInputStreamsMapping(java.lang.String key, java.lang.String value) { + if (key == null) { + throw new NullPointerException("map key"); + } + if (value == null) { + throw new NullPointerException("map value"); + } + internalGetMutableInputStreamsMapping().getMutableMap().put(key, value); + bitField0_ |= 0x00000020; + return this; + } + /** + * + * + *
+     * Map from the input parameter in the definition to the real stream.
+     * E.g., suppose you had a stream source operator named "input-0" and you try
+     * to receive from the real stream "stream-0". You can add the following
+     * mapping: [input-0: stream-0].
+     * 
+ * + * map<string, string> input_streams_mapping = 6; + */ + public Builder putAllInputStreamsMapping( + java.util.Map values) { + internalGetMutableInputStreamsMapping().getMutableMap().putAll(values); + bitField0_ |= 0x00000020; + return this; + } + + private com.google.protobuf.MapField outputStreamsMapping_; + + private com.google.protobuf.MapField + internalGetOutputStreamsMapping() { + if (outputStreamsMapping_ == null) { + return com.google.protobuf.MapField.emptyMapField( + OutputStreamsMappingDefaultEntryHolder.defaultEntry); + } + return outputStreamsMapping_; + } + + private com.google.protobuf.MapField + internalGetMutableOutputStreamsMapping() { + if (outputStreamsMapping_ == null) { + outputStreamsMapping_ = + com.google.protobuf.MapField.newMapField( + OutputStreamsMappingDefaultEntryHolder.defaultEntry); + } + if (!outputStreamsMapping_.isMutable()) { + outputStreamsMapping_ = outputStreamsMapping_.copy(); + } + bitField0_ |= 0x00000040; + onChanged(); + return outputStreamsMapping_; + } + + public int getOutputStreamsMappingCount() { + return internalGetOutputStreamsMapping().getMap().size(); + } + /** + * + * + *
+     * Map from the output parameter in the definition to the real stream.
+     * E.g., suppose you had a stream sink operator named "output-0" and you try
+     * to send to the real stream "stream-0". You can add the following
+     * mapping: [output-0: stream-0].
+     * 
+ * + * map<string, string> output_streams_mapping = 7; + */ + @java.lang.Override + public boolean containsOutputStreamsMapping(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetOutputStreamsMapping().getMap().containsKey(key); + } + /** Use {@link #getOutputStreamsMappingMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getOutputStreamsMapping() { + return getOutputStreamsMappingMap(); + } + /** + * + * + *
+     * Map from the output parameter in the definition to the real stream.
+     * E.g., suppose you had a stream sink operator named "output-0" and you try
+     * to send to the real stream "stream-0". You can add the following
+     * mapping: [output-0: stream-0].
+     * 
+ * + * map<string, string> output_streams_mapping = 7; + */ + @java.lang.Override + public java.util.Map getOutputStreamsMappingMap() { + return internalGetOutputStreamsMapping().getMap(); + } + /** + * + * + *
+     * Map from the output parameter in the definition to the real stream.
+     * E.g., suppose you had a stream sink operator named "output-0" and you try
+     * to send to the real stream "stream-0". You can add the following
+     * mapping: [output-0: stream-0].
+     * 
+ * + * map<string, string> output_streams_mapping = 7; + */ + @java.lang.Override + public /* nullable */ java.lang.String getOutputStreamsMappingOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = + internalGetOutputStreamsMapping().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+     * Map from the output parameter in the definition to the real stream.
+     * E.g., suppose you had a stream sink operator named "output-0" and you try
+     * to send to the real stream "stream-0". You can add the following
+     * mapping: [output-0: stream-0].
+     * 
+ * + * map<string, string> output_streams_mapping = 7; + */ + @java.lang.Override + public java.lang.String getOutputStreamsMappingOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = + internalGetOutputStreamsMapping().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearOutputStreamsMapping() { + bitField0_ = (bitField0_ & ~0x00000040); + internalGetMutableOutputStreamsMapping().getMutableMap().clear(); + return this; + } + /** + * + * + *
+     * Map from the output parameter in the definition to the real stream.
+     * E.g., suppose you had a stream sink operator named "output-0" and you try
+     * to send to the real stream "stream-0". You can add the following
+     * mapping: [output-0: stream-0].
+     * 
+ * + * map<string, string> output_streams_mapping = 7; + */ + public Builder removeOutputStreamsMapping(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + internalGetMutableOutputStreamsMapping().getMutableMap().remove(key); + return this; + } + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableOutputStreamsMapping() { + bitField0_ |= 0x00000040; + return internalGetMutableOutputStreamsMapping().getMutableMap(); + } + /** + * + * + *
+     * Map from the output parameter in the definition to the real stream.
+     * E.g., suppose you had a stream sink operator named "output-0" and you try
+     * to send to the real stream "stream-0". You can add the following
+     * mapping: [output-0: stream-0].
+     * 
+ * + * map<string, string> output_streams_mapping = 7; + */ + public Builder putOutputStreamsMapping(java.lang.String key, java.lang.String value) { + if (key == null) { + throw new NullPointerException("map key"); + } + if (value == null) { + throw new NullPointerException("map value"); + } + internalGetMutableOutputStreamsMapping().getMutableMap().put(key, value); + bitField0_ |= 0x00000040; + return this; + } + /** + * + * + *
+     * Map from the output parameter in the definition to the real stream.
+     * E.g., suppose you had a stream sink operator named "output-0" and you try
+     * to send to the real stream "stream-0". You can add the following
+     * mapping: [output-0: stream-0].
+     * 
+ * + * map<string, string> output_streams_mapping = 7; + */ + public Builder putAllOutputStreamsMapping( + java.util.Map values) { + internalGetMutableOutputStreamsMapping().getMutableMap().putAll(values); + bitField0_ |= 0x00000040; + return this; + } + + private boolean disableEventWatch_; + /** + * + * + *
+     * Boolean flag to indicate whether you would like to disable the ability
+     * to automatically start a Process when new event happening in the input
+     * Stream. If you would like to start a Process manually, the field needs
+     * to be set to true.
+     * 
+ * + * bool disable_event_watch = 8; + * + * @return The disableEventWatch. + */ + @java.lang.Override + public boolean getDisableEventWatch() { + return disableEventWatch_; + } + /** + * + * + *
+     * Boolean flag to indicate whether you would like to disable the ability
+     * to automatically start a Process when new event happening in the input
+     * Stream. If you would like to start a Process manually, the field needs
+     * to be set to true.
+     * 
+ * + * bool disable_event_watch = 8; + * + * @param value The disableEventWatch to set. + * @return This builder for chaining. + */ + public Builder setDisableEventWatch(boolean value) { + + disableEventWatch_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * + * + *
+     * Boolean flag to indicate whether you would like to disable the ability
+     * to automatically start a Process when new event happening in the input
+     * Stream. If you would like to start a Process manually, the field needs
+     * to be set to true.
+     * 
+ * + * bool disable_event_watch = 8; + * + * @return This builder for chaining. + */ + public Builder clearDisableEventWatch() { + bitField0_ = (bitField0_ & ~0x00000080); + disableEventWatch_ = false; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.Analysis) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.Analysis) + private static final com.google.cloud.visionai.v1.Analysis DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.Analysis(); + } + + public static com.google.cloud.visionai.v1.Analysis getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Analysis parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.Analysis getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/AnalysisDefinition.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/AnalysisDefinition.java new file mode 100644 index 000000000000..e52ed02350bf --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/AnalysisDefinition.java @@ -0,0 +1,954 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/lva.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * Defines a full analysis.
+ *
+ * This is a description of the overall live analytics pipeline.
+ * You may think of this as an edge list representation of a multigraph.
+ *
+ * This may be directly authored by a human in protobuf textformat, or it may be
+ * generated by a programming API (perhaps Python or JavaScript depending on
+ * context).
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.AnalysisDefinition} + */ +public final class AnalysisDefinition extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.AnalysisDefinition) + AnalysisDefinitionOrBuilder { + private static final long serialVersionUID = 0L; + // Use AnalysisDefinition.newBuilder() to construct. + private AnalysisDefinition(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private AnalysisDefinition() { + analyzers_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new AnalysisDefinition(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.LvaProto + .internal_static_google_cloud_visionai_v1_AnalysisDefinition_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.LvaProto + .internal_static_google_cloud_visionai_v1_AnalysisDefinition_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.AnalysisDefinition.class, + com.google.cloud.visionai.v1.AnalysisDefinition.Builder.class); + } + + public static final int ANALYZERS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List analyzers_; + /** + * + * + *
+   * Analyzer definitions.
+   * 
+ * + * repeated .google.cloud.visionai.v1.AnalyzerDefinition analyzers = 1; + */ + @java.lang.Override + public java.util.List getAnalyzersList() { + return analyzers_; + } + /** + * + * + *
+   * Analyzer definitions.
+   * 
+ * + * repeated .google.cloud.visionai.v1.AnalyzerDefinition analyzers = 1; + */ + @java.lang.Override + public java.util.List + getAnalyzersOrBuilderList() { + return analyzers_; + } + /** + * + * + *
+   * Analyzer definitions.
+   * 
+ * + * repeated .google.cloud.visionai.v1.AnalyzerDefinition analyzers = 1; + */ + @java.lang.Override + public int getAnalyzersCount() { + return analyzers_.size(); + } + /** + * + * + *
+   * Analyzer definitions.
+   * 
+ * + * repeated .google.cloud.visionai.v1.AnalyzerDefinition analyzers = 1; + */ + @java.lang.Override + public com.google.cloud.visionai.v1.AnalyzerDefinition getAnalyzers(int index) { + return analyzers_.get(index); + } + /** + * + * + *
+   * Analyzer definitions.
+   * 
+ * + * repeated .google.cloud.visionai.v1.AnalyzerDefinition analyzers = 1; + */ + @java.lang.Override + public com.google.cloud.visionai.v1.AnalyzerDefinitionOrBuilder getAnalyzersOrBuilder(int index) { + return analyzers_.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 < analyzers_.size(); i++) { + output.writeMessage(1, analyzers_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < analyzers_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, analyzers_.get(i)); + } + size += getUnknownFields().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.visionai.v1.AnalysisDefinition)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.AnalysisDefinition other = + (com.google.cloud.visionai.v1.AnalysisDefinition) obj; + + if (!getAnalyzersList().equals(other.getAnalyzersList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getAnalyzersCount() > 0) { + hash = (37 * hash) + ANALYZERS_FIELD_NUMBER; + hash = (53 * hash) + getAnalyzersList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.AnalysisDefinition parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.AnalysisDefinition 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.visionai.v1.AnalysisDefinition parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.AnalysisDefinition 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.visionai.v1.AnalysisDefinition parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.AnalysisDefinition parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.AnalysisDefinition parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.AnalysisDefinition 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.visionai.v1.AnalysisDefinition parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.AnalysisDefinition 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.visionai.v1.AnalysisDefinition parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.AnalysisDefinition 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.visionai.v1.AnalysisDefinition 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; + } + /** + * + * + *
+   * Defines a full analysis.
+   *
+   * This is a description of the overall live analytics pipeline.
+   * You may think of this as an edge list representation of a multigraph.
+   *
+   * This may be directly authored by a human in protobuf textformat, or it may be
+   * generated by a programming API (perhaps Python or JavaScript depending on
+   * context).
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.AnalysisDefinition} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.AnalysisDefinition) + com.google.cloud.visionai.v1.AnalysisDefinitionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.LvaProto + .internal_static_google_cloud_visionai_v1_AnalysisDefinition_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.LvaProto + .internal_static_google_cloud_visionai_v1_AnalysisDefinition_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.AnalysisDefinition.class, + com.google.cloud.visionai.v1.AnalysisDefinition.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.AnalysisDefinition.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (analyzersBuilder_ == null) { + analyzers_ = java.util.Collections.emptyList(); + } else { + analyzers_ = null; + analyzersBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.LvaProto + .internal_static_google_cloud_visionai_v1_AnalysisDefinition_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.AnalysisDefinition getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.AnalysisDefinition.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.AnalysisDefinition build() { + com.google.cloud.visionai.v1.AnalysisDefinition result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.AnalysisDefinition buildPartial() { + com.google.cloud.visionai.v1.AnalysisDefinition result = + new com.google.cloud.visionai.v1.AnalysisDefinition(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.visionai.v1.AnalysisDefinition result) { + if (analyzersBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + analyzers_ = java.util.Collections.unmodifiableList(analyzers_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.analyzers_ = analyzers_; + } else { + result.analyzers_ = analyzersBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.visionai.v1.AnalysisDefinition result) { + int from_bitField0_ = bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.AnalysisDefinition) { + return mergeFrom((com.google.cloud.visionai.v1.AnalysisDefinition) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.AnalysisDefinition other) { + if (other == com.google.cloud.visionai.v1.AnalysisDefinition.getDefaultInstance()) + return this; + if (analyzersBuilder_ == null) { + if (!other.analyzers_.isEmpty()) { + if (analyzers_.isEmpty()) { + analyzers_ = other.analyzers_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureAnalyzersIsMutable(); + analyzers_.addAll(other.analyzers_); + } + onChanged(); + } + } else { + if (!other.analyzers_.isEmpty()) { + if (analyzersBuilder_.isEmpty()) { + analyzersBuilder_.dispose(); + analyzersBuilder_ = null; + analyzers_ = other.analyzers_; + bitField0_ = (bitField0_ & ~0x00000001); + analyzersBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getAnalyzersFieldBuilder() + : null; + } else { + analyzersBuilder_.addAllMessages(other.analyzers_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.visionai.v1.AnalyzerDefinition m = + input.readMessage( + com.google.cloud.visionai.v1.AnalyzerDefinition.parser(), + extensionRegistry); + if (analyzersBuilder_ == null) { + ensureAnalyzersIsMutable(); + analyzers_.add(m); + } else { + analyzersBuilder_.addMessage(m); + } + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List analyzers_ = + java.util.Collections.emptyList(); + + private void ensureAnalyzersIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + analyzers_ = + new java.util.ArrayList(analyzers_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.visionai.v1.AnalyzerDefinition, + com.google.cloud.visionai.v1.AnalyzerDefinition.Builder, + com.google.cloud.visionai.v1.AnalyzerDefinitionOrBuilder> + analyzersBuilder_; + + /** + * + * + *
+     * Analyzer definitions.
+     * 
+ * + * repeated .google.cloud.visionai.v1.AnalyzerDefinition analyzers = 1; + */ + public java.util.List getAnalyzersList() { + if (analyzersBuilder_ == null) { + return java.util.Collections.unmodifiableList(analyzers_); + } else { + return analyzersBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Analyzer definitions.
+     * 
+ * + * repeated .google.cloud.visionai.v1.AnalyzerDefinition analyzers = 1; + */ + public int getAnalyzersCount() { + if (analyzersBuilder_ == null) { + return analyzers_.size(); + } else { + return analyzersBuilder_.getCount(); + } + } + /** + * + * + *
+     * Analyzer definitions.
+     * 
+ * + * repeated .google.cloud.visionai.v1.AnalyzerDefinition analyzers = 1; + */ + public com.google.cloud.visionai.v1.AnalyzerDefinition getAnalyzers(int index) { + if (analyzersBuilder_ == null) { + return analyzers_.get(index); + } else { + return analyzersBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Analyzer definitions.
+     * 
+ * + * repeated .google.cloud.visionai.v1.AnalyzerDefinition analyzers = 1; + */ + public Builder setAnalyzers(int index, com.google.cloud.visionai.v1.AnalyzerDefinition value) { + if (analyzersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAnalyzersIsMutable(); + analyzers_.set(index, value); + onChanged(); + } else { + analyzersBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Analyzer definitions.
+     * 
+ * + * repeated .google.cloud.visionai.v1.AnalyzerDefinition analyzers = 1; + */ + public Builder setAnalyzers( + int index, com.google.cloud.visionai.v1.AnalyzerDefinition.Builder builderForValue) { + if (analyzersBuilder_ == null) { + ensureAnalyzersIsMutable(); + analyzers_.set(index, builderForValue.build()); + onChanged(); + } else { + analyzersBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Analyzer definitions.
+     * 
+ * + * repeated .google.cloud.visionai.v1.AnalyzerDefinition analyzers = 1; + */ + public Builder addAnalyzers(com.google.cloud.visionai.v1.AnalyzerDefinition value) { + if (analyzersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAnalyzersIsMutable(); + analyzers_.add(value); + onChanged(); + } else { + analyzersBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Analyzer definitions.
+     * 
+ * + * repeated .google.cloud.visionai.v1.AnalyzerDefinition analyzers = 1; + */ + public Builder addAnalyzers(int index, com.google.cloud.visionai.v1.AnalyzerDefinition value) { + if (analyzersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAnalyzersIsMutable(); + analyzers_.add(index, value); + onChanged(); + } else { + analyzersBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Analyzer definitions.
+     * 
+ * + * repeated .google.cloud.visionai.v1.AnalyzerDefinition analyzers = 1; + */ + public Builder addAnalyzers( + com.google.cloud.visionai.v1.AnalyzerDefinition.Builder builderForValue) { + if (analyzersBuilder_ == null) { + ensureAnalyzersIsMutable(); + analyzers_.add(builderForValue.build()); + onChanged(); + } else { + analyzersBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Analyzer definitions.
+     * 
+ * + * repeated .google.cloud.visionai.v1.AnalyzerDefinition analyzers = 1; + */ + public Builder addAnalyzers( + int index, com.google.cloud.visionai.v1.AnalyzerDefinition.Builder builderForValue) { + if (analyzersBuilder_ == null) { + ensureAnalyzersIsMutable(); + analyzers_.add(index, builderForValue.build()); + onChanged(); + } else { + analyzersBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Analyzer definitions.
+     * 
+ * + * repeated .google.cloud.visionai.v1.AnalyzerDefinition analyzers = 1; + */ + public Builder addAllAnalyzers( + java.lang.Iterable values) { + if (analyzersBuilder_ == null) { + ensureAnalyzersIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, analyzers_); + onChanged(); + } else { + analyzersBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Analyzer definitions.
+     * 
+ * + * repeated .google.cloud.visionai.v1.AnalyzerDefinition analyzers = 1; + */ + public Builder clearAnalyzers() { + if (analyzersBuilder_ == null) { + analyzers_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + analyzersBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Analyzer definitions.
+     * 
+ * + * repeated .google.cloud.visionai.v1.AnalyzerDefinition analyzers = 1; + */ + public Builder removeAnalyzers(int index) { + if (analyzersBuilder_ == null) { + ensureAnalyzersIsMutable(); + analyzers_.remove(index); + onChanged(); + } else { + analyzersBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Analyzer definitions.
+     * 
+ * + * repeated .google.cloud.visionai.v1.AnalyzerDefinition analyzers = 1; + */ + public com.google.cloud.visionai.v1.AnalyzerDefinition.Builder getAnalyzersBuilder(int index) { + return getAnalyzersFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Analyzer definitions.
+     * 
+ * + * repeated .google.cloud.visionai.v1.AnalyzerDefinition analyzers = 1; + */ + public com.google.cloud.visionai.v1.AnalyzerDefinitionOrBuilder getAnalyzersOrBuilder( + int index) { + if (analyzersBuilder_ == null) { + return analyzers_.get(index); + } else { + return analyzersBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Analyzer definitions.
+     * 
+ * + * repeated .google.cloud.visionai.v1.AnalyzerDefinition analyzers = 1; + */ + public java.util.List + getAnalyzersOrBuilderList() { + if (analyzersBuilder_ != null) { + return analyzersBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(analyzers_); + } + } + /** + * + * + *
+     * Analyzer definitions.
+     * 
+ * + * repeated .google.cloud.visionai.v1.AnalyzerDefinition analyzers = 1; + */ + public com.google.cloud.visionai.v1.AnalyzerDefinition.Builder addAnalyzersBuilder() { + return getAnalyzersFieldBuilder() + .addBuilder(com.google.cloud.visionai.v1.AnalyzerDefinition.getDefaultInstance()); + } + /** + * + * + *
+     * Analyzer definitions.
+     * 
+ * + * repeated .google.cloud.visionai.v1.AnalyzerDefinition analyzers = 1; + */ + public com.google.cloud.visionai.v1.AnalyzerDefinition.Builder addAnalyzersBuilder(int index) { + return getAnalyzersFieldBuilder() + .addBuilder(index, com.google.cloud.visionai.v1.AnalyzerDefinition.getDefaultInstance()); + } + /** + * + * + *
+     * Analyzer definitions.
+     * 
+ * + * repeated .google.cloud.visionai.v1.AnalyzerDefinition analyzers = 1; + */ + public java.util.List + getAnalyzersBuilderList() { + return getAnalyzersFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.visionai.v1.AnalyzerDefinition, + com.google.cloud.visionai.v1.AnalyzerDefinition.Builder, + com.google.cloud.visionai.v1.AnalyzerDefinitionOrBuilder> + getAnalyzersFieldBuilder() { + if (analyzersBuilder_ == null) { + analyzersBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.visionai.v1.AnalyzerDefinition, + com.google.cloud.visionai.v1.AnalyzerDefinition.Builder, + com.google.cloud.visionai.v1.AnalyzerDefinitionOrBuilder>( + analyzers_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + analyzers_ = null; + } + return analyzersBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.AnalysisDefinition) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.AnalysisDefinition) + private static final com.google.cloud.visionai.v1.AnalysisDefinition DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.AnalysisDefinition(); + } + + public static com.google.cloud.visionai.v1.AnalysisDefinition getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AnalysisDefinition parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.AnalysisDefinition getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/AnalysisDefinitionOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/AnalysisDefinitionOrBuilder.java new file mode 100644 index 000000000000..a88e955b9fce --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/AnalysisDefinitionOrBuilder.java @@ -0,0 +1,78 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/lva.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface AnalysisDefinitionOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.AnalysisDefinition) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Analyzer definitions.
+   * 
+ * + * repeated .google.cloud.visionai.v1.AnalyzerDefinition analyzers = 1; + */ + java.util.List getAnalyzersList(); + /** + * + * + *
+   * Analyzer definitions.
+   * 
+ * + * repeated .google.cloud.visionai.v1.AnalyzerDefinition analyzers = 1; + */ + com.google.cloud.visionai.v1.AnalyzerDefinition getAnalyzers(int index); + /** + * + * + *
+   * Analyzer definitions.
+   * 
+ * + * repeated .google.cloud.visionai.v1.AnalyzerDefinition analyzers = 1; + */ + int getAnalyzersCount(); + /** + * + * + *
+   * Analyzer definitions.
+   * 
+ * + * repeated .google.cloud.visionai.v1.AnalyzerDefinition analyzers = 1; + */ + java.util.List + getAnalyzersOrBuilderList(); + /** + * + * + *
+   * Analyzer definitions.
+   * 
+ * + * repeated .google.cloud.visionai.v1.AnalyzerDefinition analyzers = 1; + */ + com.google.cloud.visionai.v1.AnalyzerDefinitionOrBuilder getAnalyzersOrBuilder(int index); +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/AnalysisName.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/AnalysisName.java new file mode 100644 index 000000000000..c2053696ffdf --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/AnalysisName.java @@ -0,0 +1,257 @@ +/* + * Copyright 2024 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.visionai.v1; + +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") +public class AnalysisName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION_CLUSTER_ANALYSIS = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/clusters/{cluster}/analyses/{analysis}"); + private volatile Map fieldValuesMap; + private final String project; + private final String location; + private final String cluster; + private final String analysis; + + @Deprecated + protected AnalysisName() { + project = null; + location = null; + cluster = null; + analysis = null; + } + + private AnalysisName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + cluster = Preconditions.checkNotNull(builder.getCluster()); + analysis = Preconditions.checkNotNull(builder.getAnalysis()); + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getCluster() { + return cluster; + } + + public String getAnalysis() { + return analysis; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static AnalysisName of(String project, String location, String cluster, String analysis) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setCluster(cluster) + .setAnalysis(analysis) + .build(); + } + + public static String format(String project, String location, String cluster, String analysis) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setCluster(cluster) + .setAnalysis(analysis) + .build() + .toString(); + } + + public static AnalysisName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION_CLUSTER_ANALYSIS.validatedMatch( + formattedString, "AnalysisName.parse: formattedString not in valid format"); + return of( + matchMap.get("project"), + matchMap.get("location"), + matchMap.get("cluster"), + matchMap.get("analysis")); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List values) { + List list = new ArrayList<>(values.size()); + for (AnalysisName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION_CLUSTER_ANALYSIS.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (project != null) { + fieldMapBuilder.put("project", project); + } + if (location != null) { + fieldMapBuilder.put("location", location); + } + if (cluster != null) { + fieldMapBuilder.put("cluster", cluster); + } + if (analysis != null) { + fieldMapBuilder.put("analysis", analysis); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION_CLUSTER_ANALYSIS.instantiate( + "project", project, "location", location, "cluster", cluster, "analysis", analysis); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null && getClass() == o.getClass()) { + AnalysisName that = ((AnalysisName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location) + && Objects.equals(this.cluster, that.cluster) + && Objects.equals(this.analysis, that.analysis); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(project); + h *= 1000003; + h ^= Objects.hashCode(location); + h *= 1000003; + h ^= Objects.hashCode(cluster); + h *= 1000003; + h ^= Objects.hashCode(analysis); + return h; + } + + /** Builder for projects/{project}/locations/{location}/clusters/{cluster}/analyses/{analysis}. */ + public static class Builder { + private String project; + private String location; + private String cluster; + private String analysis; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getCluster() { + return cluster; + } + + public String getAnalysis() { + return analysis; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setCluster(String cluster) { + this.cluster = cluster; + return this; + } + + public Builder setAnalysis(String analysis) { + this.analysis = analysis; + return this; + } + + private Builder(AnalysisName analysisName) { + this.project = analysisName.project; + this.location = analysisName.location; + this.cluster = analysisName.cluster; + this.analysis = analysisName.analysis; + } + + public AnalysisName build() { + return new AnalysisName(this); + } + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/AnalysisOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/AnalysisOrBuilder.java new file mode 100644 index 000000000000..b38f7ff260c8 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/AnalysisOrBuilder.java @@ -0,0 +1,382 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/lva_resources.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface AnalysisOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.Analysis) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The name of resource.
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * The name of resource.
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Output only. The create timestamp.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + /** + * + * + *
+   * Output only. The create timestamp.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + * + * + *
+   * Output only. The create timestamp.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. The update timestamp.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + /** + * + * + *
+   * Output only. The update timestamp.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + /** + * + * + *
+   * Output only. The update timestamp.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); + + /** + * + * + *
+   * Labels as key value pairs.
+   * 
+ * + * map<string, string> labels = 4; + */ + int getLabelsCount(); + /** + * + * + *
+   * Labels as key value pairs.
+   * 
+ * + * map<string, string> labels = 4; + */ + boolean containsLabels(java.lang.String key); + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Deprecated + java.util.Map getLabels(); + /** + * + * + *
+   * Labels as key value pairs.
+   * 
+ * + * map<string, string> labels = 4; + */ + java.util.Map getLabelsMap(); + /** + * + * + *
+   * Labels as key value pairs.
+   * 
+ * + * map<string, string> labels = 4; + */ + /* nullable */ + java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue); + /** + * + * + *
+   * Labels as key value pairs.
+   * 
+ * + * map<string, string> labels = 4; + */ + java.lang.String getLabelsOrThrow(java.lang.String key); + + /** + * + * + *
+   * The definition of the analysis.
+   * 
+ * + * .google.cloud.visionai.v1.AnalysisDefinition analysis_definition = 5; + * + * @return Whether the analysisDefinition field is set. + */ + boolean hasAnalysisDefinition(); + /** + * + * + *
+   * The definition of the analysis.
+   * 
+ * + * .google.cloud.visionai.v1.AnalysisDefinition analysis_definition = 5; + * + * @return The analysisDefinition. + */ + com.google.cloud.visionai.v1.AnalysisDefinition getAnalysisDefinition(); + /** + * + * + *
+   * The definition of the analysis.
+   * 
+ * + * .google.cloud.visionai.v1.AnalysisDefinition analysis_definition = 5; + */ + com.google.cloud.visionai.v1.AnalysisDefinitionOrBuilder getAnalysisDefinitionOrBuilder(); + + /** + * + * + *
+   * Map from the input parameter in the definition to the real stream.
+   * E.g., suppose you had a stream source operator named "input-0" and you try
+   * to receive from the real stream "stream-0". You can add the following
+   * mapping: [input-0: stream-0].
+   * 
+ * + * map<string, string> input_streams_mapping = 6; + */ + int getInputStreamsMappingCount(); + /** + * + * + *
+   * Map from the input parameter in the definition to the real stream.
+   * E.g., suppose you had a stream source operator named "input-0" and you try
+   * to receive from the real stream "stream-0". You can add the following
+   * mapping: [input-0: stream-0].
+   * 
+ * + * map<string, string> input_streams_mapping = 6; + */ + boolean containsInputStreamsMapping(java.lang.String key); + /** Use {@link #getInputStreamsMappingMap()} instead. */ + @java.lang.Deprecated + java.util.Map getInputStreamsMapping(); + /** + * + * + *
+   * Map from the input parameter in the definition to the real stream.
+   * E.g., suppose you had a stream source operator named "input-0" and you try
+   * to receive from the real stream "stream-0". You can add the following
+   * mapping: [input-0: stream-0].
+   * 
+ * + * map<string, string> input_streams_mapping = 6; + */ + java.util.Map getInputStreamsMappingMap(); + /** + * + * + *
+   * Map from the input parameter in the definition to the real stream.
+   * E.g., suppose you had a stream source operator named "input-0" and you try
+   * to receive from the real stream "stream-0". You can add the following
+   * mapping: [input-0: stream-0].
+   * 
+ * + * map<string, string> input_streams_mapping = 6; + */ + /* nullable */ + java.lang.String getInputStreamsMappingOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue); + /** + * + * + *
+   * Map from the input parameter in the definition to the real stream.
+   * E.g., suppose you had a stream source operator named "input-0" and you try
+   * to receive from the real stream "stream-0". You can add the following
+   * mapping: [input-0: stream-0].
+   * 
+ * + * map<string, string> input_streams_mapping = 6; + */ + java.lang.String getInputStreamsMappingOrThrow(java.lang.String key); + + /** + * + * + *
+   * Map from the output parameter in the definition to the real stream.
+   * E.g., suppose you had a stream sink operator named "output-0" and you try
+   * to send to the real stream "stream-0". You can add the following
+   * mapping: [output-0: stream-0].
+   * 
+ * + * map<string, string> output_streams_mapping = 7; + */ + int getOutputStreamsMappingCount(); + /** + * + * + *
+   * Map from the output parameter in the definition to the real stream.
+   * E.g., suppose you had a stream sink operator named "output-0" and you try
+   * to send to the real stream "stream-0". You can add the following
+   * mapping: [output-0: stream-0].
+   * 
+ * + * map<string, string> output_streams_mapping = 7; + */ + boolean containsOutputStreamsMapping(java.lang.String key); + /** Use {@link #getOutputStreamsMappingMap()} instead. */ + @java.lang.Deprecated + java.util.Map getOutputStreamsMapping(); + /** + * + * + *
+   * Map from the output parameter in the definition to the real stream.
+   * E.g., suppose you had a stream sink operator named "output-0" and you try
+   * to send to the real stream "stream-0". You can add the following
+   * mapping: [output-0: stream-0].
+   * 
+ * + * map<string, string> output_streams_mapping = 7; + */ + java.util.Map getOutputStreamsMappingMap(); + /** + * + * + *
+   * Map from the output parameter in the definition to the real stream.
+   * E.g., suppose you had a stream sink operator named "output-0" and you try
+   * to send to the real stream "stream-0". You can add the following
+   * mapping: [output-0: stream-0].
+   * 
+ * + * map<string, string> output_streams_mapping = 7; + */ + /* nullable */ + java.lang.String getOutputStreamsMappingOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue); + /** + * + * + *
+   * Map from the output parameter in the definition to the real stream.
+   * E.g., suppose you had a stream sink operator named "output-0" and you try
+   * to send to the real stream "stream-0". You can add the following
+   * mapping: [output-0: stream-0].
+   * 
+ * + * map<string, string> output_streams_mapping = 7; + */ + java.lang.String getOutputStreamsMappingOrThrow(java.lang.String key); + + /** + * + * + *
+   * Boolean flag to indicate whether you would like to disable the ability
+   * to automatically start a Process when new event happening in the input
+   * Stream. If you would like to start a Process manually, the field needs
+   * to be set to true.
+   * 
+ * + * bool disable_event_watch = 8; + * + * @return The disableEventWatch. + */ + boolean getDisableEventWatch(); +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/AnalyzeAssetMetadata.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/AnalyzeAssetMetadata.java new file mode 100644 index 000000000000..fe4e307a4fd0 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/AnalyzeAssetMetadata.java @@ -0,0 +1,2780 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/warehouse.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * Metadata for AnalyzeAsset.
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.AnalyzeAssetMetadata} + */ +public final class AnalyzeAssetMetadata extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.AnalyzeAssetMetadata) + AnalyzeAssetMetadataOrBuilder { + private static final long serialVersionUID = 0L; + // Use AnalyzeAssetMetadata.newBuilder() to construct. + private AnalyzeAssetMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private AnalyzeAssetMetadata() { + analysisStatus_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new AnalyzeAssetMetadata(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_AnalyzeAssetMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_AnalyzeAssetMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.AnalyzeAssetMetadata.class, + com.google.cloud.visionai.v1.AnalyzeAssetMetadata.Builder.class); + } + + public interface AnalysisStatusOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.AnalyzeAssetMetadata.AnalysisStatus) + com.google.protobuf.MessageOrBuilder { + + /** + * .google.cloud.visionai.v1.AnalyzeAssetMetadata.AnalysisStatus.State state = 2; + * + * @return The enum numeric value on the wire for state. + */ + int getStateValue(); + /** + * .google.cloud.visionai.v1.AnalyzeAssetMetadata.AnalysisStatus.State state = 2; + * + * @return The state. + */ + com.google.cloud.visionai.v1.AnalyzeAssetMetadata.AnalysisStatus.State getState(); + + /** + * string status_message = 3; + * + * @return The statusMessage. + */ + java.lang.String getStatusMessage(); + /** + * string status_message = 3; + * + * @return The bytes for statusMessage. + */ + com.google.protobuf.ByteString getStatusMessageBytes(); + + /** + * + * + *
+     * The search capability requested.
+     * 
+ * + * .google.cloud.visionai.v1.SearchCapability search_capability = 4; + * + * @return Whether the searchCapability field is set. + */ + boolean hasSearchCapability(); + /** + * + * + *
+     * The search capability requested.
+     * 
+ * + * .google.cloud.visionai.v1.SearchCapability search_capability = 4; + * + * @return The searchCapability. + */ + com.google.cloud.visionai.v1.SearchCapability getSearchCapability(); + /** + * + * + *
+     * The search capability requested.
+     * 
+ * + * .google.cloud.visionai.v1.SearchCapability search_capability = 4; + */ + com.google.cloud.visionai.v1.SearchCapabilityOrBuilder getSearchCapabilityOrBuilder(); + } + /** + * + * + *
+   * The status of analysis on each search capability.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.AnalyzeAssetMetadata.AnalysisStatus} + */ + public static final class AnalysisStatus extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.AnalyzeAssetMetadata.AnalysisStatus) + AnalysisStatusOrBuilder { + private static final long serialVersionUID = 0L; + // Use AnalysisStatus.newBuilder() to construct. + private AnalysisStatus(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private AnalysisStatus() { + state_ = 0; + statusMessage_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new AnalysisStatus(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_AnalyzeAssetMetadata_AnalysisStatus_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_AnalyzeAssetMetadata_AnalysisStatus_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.AnalyzeAssetMetadata.AnalysisStatus.class, + com.google.cloud.visionai.v1.AnalyzeAssetMetadata.AnalysisStatus.Builder.class); + } + + /** + * + * + *
+     * The state of the search capability.
+     * 
+ * + * Protobuf enum {@code google.cloud.visionai.v1.AnalyzeAssetMetadata.AnalysisStatus.State} + */ + public enum State implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+       * The default process state should never happen.
+       * 
+ * + * STATE_UNSPECIFIED = 0; + */ + STATE_UNSPECIFIED(0), + /** + * + * + *
+       * The feature is in progress.
+       * 
+ * + * IN_PROGRESS = 1; + */ + IN_PROGRESS(1), + /** + * + * + *
+       * The process is successfully done.
+       * 
+ * + * SUCCEEDED = 2; + */ + SUCCEEDED(2), + /** + * + * + *
+       * The process failed.
+       * 
+ * + * FAILED = 3; + */ + FAILED(3), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+       * The default process state should never happen.
+       * 
+ * + * STATE_UNSPECIFIED = 0; + */ + public static final int STATE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+       * The feature is in progress.
+       * 
+ * + * IN_PROGRESS = 1; + */ + public static final int IN_PROGRESS_VALUE = 1; + /** + * + * + *
+       * The process is successfully done.
+       * 
+ * + * SUCCEEDED = 2; + */ + public static final int SUCCEEDED_VALUE = 2; + /** + * + * + *
+       * The process failed.
+       * 
+ * + * FAILED = 3; + */ + public static final int FAILED_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; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static State valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static State forNumber(int value) { + switch (value) { + case 0: + return STATE_UNSPECIFIED; + case 1: + return IN_PROGRESS; + case 2: + return SUCCEEDED; + case 3: + return FAILED; + 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 State findValueByNumber(int number) { + return State.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + 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.visionai.v1.AnalyzeAssetMetadata.AnalysisStatus.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final State[] VALUES = values(); + + public static State 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 State(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.visionai.v1.AnalyzeAssetMetadata.AnalysisStatus.State) + } + + private int bitField0_; + public static final int STATE_FIELD_NUMBER = 2; + private int state_ = 0; + /** + * .google.cloud.visionai.v1.AnalyzeAssetMetadata.AnalysisStatus.State state = 2; + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + /** + * .google.cloud.visionai.v1.AnalyzeAssetMetadata.AnalysisStatus.State state = 2; + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.AnalyzeAssetMetadata.AnalysisStatus.State getState() { + com.google.cloud.visionai.v1.AnalyzeAssetMetadata.AnalysisStatus.State result = + com.google.cloud.visionai.v1.AnalyzeAssetMetadata.AnalysisStatus.State.forNumber(state_); + return result == null + ? com.google.cloud.visionai.v1.AnalyzeAssetMetadata.AnalysisStatus.State.UNRECOGNIZED + : result; + } + + public static final int STATUS_MESSAGE_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object statusMessage_ = ""; + /** + * string status_message = 3; + * + * @return The statusMessage. + */ + @java.lang.Override + public java.lang.String getStatusMessage() { + java.lang.Object ref = statusMessage_; + 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(); + statusMessage_ = s; + return s; + } + } + /** + * string status_message = 3; + * + * @return The bytes for statusMessage. + */ + @java.lang.Override + public com.google.protobuf.ByteString getStatusMessageBytes() { + java.lang.Object ref = statusMessage_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + statusMessage_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SEARCH_CAPABILITY_FIELD_NUMBER = 4; + private com.google.cloud.visionai.v1.SearchCapability searchCapability_; + /** + * + * + *
+     * The search capability requested.
+     * 
+ * + * .google.cloud.visionai.v1.SearchCapability search_capability = 4; + * + * @return Whether the searchCapability field is set. + */ + @java.lang.Override + public boolean hasSearchCapability() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * The search capability requested.
+     * 
+ * + * .google.cloud.visionai.v1.SearchCapability search_capability = 4; + * + * @return The searchCapability. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.SearchCapability getSearchCapability() { + return searchCapability_ == null + ? com.google.cloud.visionai.v1.SearchCapability.getDefaultInstance() + : searchCapability_; + } + /** + * + * + *
+     * The search capability requested.
+     * 
+ * + * .google.cloud.visionai.v1.SearchCapability search_capability = 4; + */ + @java.lang.Override + public com.google.cloud.visionai.v1.SearchCapabilityOrBuilder getSearchCapabilityOrBuilder() { + return searchCapability_ == null + ? com.google.cloud.visionai.v1.SearchCapability.getDefaultInstance() + : searchCapability_; + } + + 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 (state_ + != com.google.cloud.visionai.v1.AnalyzeAssetMetadata.AnalysisStatus.State + .STATE_UNSPECIFIED + .getNumber()) { + output.writeEnum(2, state_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(statusMessage_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, statusMessage_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(4, getSearchCapability()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (state_ + != com.google.cloud.visionai.v1.AnalyzeAssetMetadata.AnalysisStatus.State + .STATE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, state_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(statusMessage_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, statusMessage_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getSearchCapability()); + } + size += getUnknownFields().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.visionai.v1.AnalyzeAssetMetadata.AnalysisStatus)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.AnalyzeAssetMetadata.AnalysisStatus other = + (com.google.cloud.visionai.v1.AnalyzeAssetMetadata.AnalysisStatus) obj; + + if (state_ != other.state_) return false; + if (!getStatusMessage().equals(other.getStatusMessage())) return false; + if (hasSearchCapability() != other.hasSearchCapability()) return false; + if (hasSearchCapability()) { + if (!getSearchCapability().equals(other.getSearchCapability())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + STATE_FIELD_NUMBER; + hash = (53 * hash) + state_; + hash = (37 * hash) + STATUS_MESSAGE_FIELD_NUMBER; + hash = (53 * hash) + getStatusMessage().hashCode(); + if (hasSearchCapability()) { + hash = (37 * hash) + SEARCH_CAPABILITY_FIELD_NUMBER; + hash = (53 * hash) + getSearchCapability().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.AnalyzeAssetMetadata.AnalysisStatus parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.AnalyzeAssetMetadata.AnalysisStatus 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.visionai.v1.AnalyzeAssetMetadata.AnalysisStatus parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.AnalyzeAssetMetadata.AnalysisStatus 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.visionai.v1.AnalyzeAssetMetadata.AnalysisStatus parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.AnalyzeAssetMetadata.AnalysisStatus parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.AnalyzeAssetMetadata.AnalysisStatus parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.AnalyzeAssetMetadata.AnalysisStatus 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.visionai.v1.AnalyzeAssetMetadata.AnalysisStatus + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.AnalyzeAssetMetadata.AnalysisStatus + 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.visionai.v1.AnalyzeAssetMetadata.AnalysisStatus parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.AnalyzeAssetMetadata.AnalysisStatus 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.visionai.v1.AnalyzeAssetMetadata.AnalysisStatus 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 status of analysis on each search capability.
+     * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.AnalyzeAssetMetadata.AnalysisStatus} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.AnalyzeAssetMetadata.AnalysisStatus) + com.google.cloud.visionai.v1.AnalyzeAssetMetadata.AnalysisStatusOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_AnalyzeAssetMetadata_AnalysisStatus_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_AnalyzeAssetMetadata_AnalysisStatus_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.AnalyzeAssetMetadata.AnalysisStatus.class, + com.google.cloud.visionai.v1.AnalyzeAssetMetadata.AnalysisStatus.Builder.class); + } + + // Construct using + // com.google.cloud.visionai.v1.AnalyzeAssetMetadata.AnalysisStatus.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getSearchCapabilityFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + state_ = 0; + statusMessage_ = ""; + searchCapability_ = null; + if (searchCapabilityBuilder_ != null) { + searchCapabilityBuilder_.dispose(); + searchCapabilityBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_AnalyzeAssetMetadata_AnalysisStatus_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.AnalyzeAssetMetadata.AnalysisStatus + getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.AnalyzeAssetMetadata.AnalysisStatus + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.AnalyzeAssetMetadata.AnalysisStatus build() { + com.google.cloud.visionai.v1.AnalyzeAssetMetadata.AnalysisStatus result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.AnalyzeAssetMetadata.AnalysisStatus buildPartial() { + com.google.cloud.visionai.v1.AnalyzeAssetMetadata.AnalysisStatus result = + new com.google.cloud.visionai.v1.AnalyzeAssetMetadata.AnalysisStatus(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.visionai.v1.AnalyzeAssetMetadata.AnalysisStatus result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.state_ = state_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.statusMessage_ = statusMessage_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.searchCapability_ = + searchCapabilityBuilder_ == null + ? searchCapability_ + : searchCapabilityBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.AnalyzeAssetMetadata.AnalysisStatus) { + return mergeFrom( + (com.google.cloud.visionai.v1.AnalyzeAssetMetadata.AnalysisStatus) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.visionai.v1.AnalyzeAssetMetadata.AnalysisStatus other) { + if (other + == com.google.cloud.visionai.v1.AnalyzeAssetMetadata.AnalysisStatus + .getDefaultInstance()) return this; + if (other.state_ != 0) { + setStateValue(other.getStateValue()); + } + if (!other.getStatusMessage().isEmpty()) { + statusMessage_ = other.statusMessage_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.hasSearchCapability()) { + mergeSearchCapability(other.getSearchCapability()); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 16: + { + state_ = input.readEnum(); + bitField0_ |= 0x00000001; + break; + } // case 16 + case 26: + { + statusMessage_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 26 + case 34: + { + input.readMessage( + getSearchCapabilityFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 34 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private int state_ = 0; + /** + * .google.cloud.visionai.v1.AnalyzeAssetMetadata.AnalysisStatus.State state = 2; + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + /** + * .google.cloud.visionai.v1.AnalyzeAssetMetadata.AnalysisStatus.State state = 2; + * + * @param value The enum numeric value on the wire for state to set. + * @return This builder for chaining. + */ + public Builder setStateValue(int value) { + state_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .google.cloud.visionai.v1.AnalyzeAssetMetadata.AnalysisStatus.State state = 2; + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.AnalyzeAssetMetadata.AnalysisStatus.State getState() { + com.google.cloud.visionai.v1.AnalyzeAssetMetadata.AnalysisStatus.State result = + com.google.cloud.visionai.v1.AnalyzeAssetMetadata.AnalysisStatus.State.forNumber( + state_); + return result == null + ? com.google.cloud.visionai.v1.AnalyzeAssetMetadata.AnalysisStatus.State.UNRECOGNIZED + : result; + } + /** + * .google.cloud.visionai.v1.AnalyzeAssetMetadata.AnalysisStatus.State state = 2; + * + * @param value The state to set. + * @return This builder for chaining. + */ + public Builder setState( + com.google.cloud.visionai.v1.AnalyzeAssetMetadata.AnalysisStatus.State value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + state_ = value.getNumber(); + onChanged(); + return this; + } + /** + * .google.cloud.visionai.v1.AnalyzeAssetMetadata.AnalysisStatus.State state = 2; + * + * @return This builder for chaining. + */ + public Builder clearState() { + bitField0_ = (bitField0_ & ~0x00000001); + state_ = 0; + onChanged(); + return this; + } + + private java.lang.Object statusMessage_ = ""; + /** + * string status_message = 3; + * + * @return The statusMessage. + */ + public java.lang.String getStatusMessage() { + java.lang.Object ref = statusMessage_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + statusMessage_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string status_message = 3; + * + * @return The bytes for statusMessage. + */ + public com.google.protobuf.ByteString getStatusMessageBytes() { + java.lang.Object ref = statusMessage_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + statusMessage_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string status_message = 3; + * + * @param value The statusMessage to set. + * @return This builder for chaining. + */ + public Builder setStatusMessage(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + statusMessage_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * string status_message = 3; + * + * @return This builder for chaining. + */ + public Builder clearStatusMessage() { + statusMessage_ = getDefaultInstance().getStatusMessage(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * string status_message = 3; + * + * @param value The bytes for statusMessage to set. + * @return This builder for chaining. + */ + public Builder setStatusMessageBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + statusMessage_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.cloud.visionai.v1.SearchCapability searchCapability_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.SearchCapability, + com.google.cloud.visionai.v1.SearchCapability.Builder, + com.google.cloud.visionai.v1.SearchCapabilityOrBuilder> + searchCapabilityBuilder_; + /** + * + * + *
+       * The search capability requested.
+       * 
+ * + * .google.cloud.visionai.v1.SearchCapability search_capability = 4; + * + * @return Whether the searchCapability field is set. + */ + public boolean hasSearchCapability() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+       * The search capability requested.
+       * 
+ * + * .google.cloud.visionai.v1.SearchCapability search_capability = 4; + * + * @return The searchCapability. + */ + public com.google.cloud.visionai.v1.SearchCapability getSearchCapability() { + if (searchCapabilityBuilder_ == null) { + return searchCapability_ == null + ? com.google.cloud.visionai.v1.SearchCapability.getDefaultInstance() + : searchCapability_; + } else { + return searchCapabilityBuilder_.getMessage(); + } + } + /** + * + * + *
+       * The search capability requested.
+       * 
+ * + * .google.cloud.visionai.v1.SearchCapability search_capability = 4; + */ + public Builder setSearchCapability(com.google.cloud.visionai.v1.SearchCapability value) { + if (searchCapabilityBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + searchCapability_ = value; + } else { + searchCapabilityBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+       * The search capability requested.
+       * 
+ * + * .google.cloud.visionai.v1.SearchCapability search_capability = 4; + */ + public Builder setSearchCapability( + com.google.cloud.visionai.v1.SearchCapability.Builder builderForValue) { + if (searchCapabilityBuilder_ == null) { + searchCapability_ = builderForValue.build(); + } else { + searchCapabilityBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+       * The search capability requested.
+       * 
+ * + * .google.cloud.visionai.v1.SearchCapability search_capability = 4; + */ + public Builder mergeSearchCapability(com.google.cloud.visionai.v1.SearchCapability value) { + if (searchCapabilityBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && searchCapability_ != null + && searchCapability_ + != com.google.cloud.visionai.v1.SearchCapability.getDefaultInstance()) { + getSearchCapabilityBuilder().mergeFrom(value); + } else { + searchCapability_ = value; + } + } else { + searchCapabilityBuilder_.mergeFrom(value); + } + if (searchCapability_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + /** + * + * + *
+       * The search capability requested.
+       * 
+ * + * .google.cloud.visionai.v1.SearchCapability search_capability = 4; + */ + public Builder clearSearchCapability() { + bitField0_ = (bitField0_ & ~0x00000004); + searchCapability_ = null; + if (searchCapabilityBuilder_ != null) { + searchCapabilityBuilder_.dispose(); + searchCapabilityBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+       * The search capability requested.
+       * 
+ * + * .google.cloud.visionai.v1.SearchCapability search_capability = 4; + */ + public com.google.cloud.visionai.v1.SearchCapability.Builder getSearchCapabilityBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getSearchCapabilityFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * The search capability requested.
+       * 
+ * + * .google.cloud.visionai.v1.SearchCapability search_capability = 4; + */ + public com.google.cloud.visionai.v1.SearchCapabilityOrBuilder getSearchCapabilityOrBuilder() { + if (searchCapabilityBuilder_ != null) { + return searchCapabilityBuilder_.getMessageOrBuilder(); + } else { + return searchCapability_ == null + ? com.google.cloud.visionai.v1.SearchCapability.getDefaultInstance() + : searchCapability_; + } + } + /** + * + * + *
+       * The search capability requested.
+       * 
+ * + * .google.cloud.visionai.v1.SearchCapability search_capability = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.SearchCapability, + com.google.cloud.visionai.v1.SearchCapability.Builder, + com.google.cloud.visionai.v1.SearchCapabilityOrBuilder> + getSearchCapabilityFieldBuilder() { + if (searchCapabilityBuilder_ == null) { + searchCapabilityBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.SearchCapability, + com.google.cloud.visionai.v1.SearchCapability.Builder, + com.google.cloud.visionai.v1.SearchCapabilityOrBuilder>( + getSearchCapability(), getParentForChildren(), isClean()); + searchCapability_ = null; + } + return searchCapabilityBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.AnalyzeAssetMetadata.AnalysisStatus) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.AnalyzeAssetMetadata.AnalysisStatus) + private static final com.google.cloud.visionai.v1.AnalyzeAssetMetadata.AnalysisStatus + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.AnalyzeAssetMetadata.AnalysisStatus(); + } + + public static com.google.cloud.visionai.v1.AnalyzeAssetMetadata.AnalysisStatus + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AnalysisStatus parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.AnalyzeAssetMetadata.AnalysisStatus + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int bitField0_; + public static final int ANALYSIS_STATUS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List + analysisStatus_; + /** + * + * + *
+   * The status of analysis on all search capabilities.
+   * 
+ * + * + * repeated .google.cloud.visionai.v1.AnalyzeAssetMetadata.AnalysisStatus analysis_status = 1; + * + */ + @java.lang.Override + public java.util.List + getAnalysisStatusList() { + return analysisStatus_; + } + /** + * + * + *
+   * The status of analysis on all search capabilities.
+   * 
+ * + * + * repeated .google.cloud.visionai.v1.AnalyzeAssetMetadata.AnalysisStatus analysis_status = 1; + * + */ + @java.lang.Override + public java.util.List< + ? extends com.google.cloud.visionai.v1.AnalyzeAssetMetadata.AnalysisStatusOrBuilder> + getAnalysisStatusOrBuilderList() { + return analysisStatus_; + } + /** + * + * + *
+   * The status of analysis on all search capabilities.
+   * 
+ * + * + * repeated .google.cloud.visionai.v1.AnalyzeAssetMetadata.AnalysisStatus analysis_status = 1; + * + */ + @java.lang.Override + public int getAnalysisStatusCount() { + return analysisStatus_.size(); + } + /** + * + * + *
+   * The status of analysis on all search capabilities.
+   * 
+ * + * + * repeated .google.cloud.visionai.v1.AnalyzeAssetMetadata.AnalysisStatus analysis_status = 1; + * + */ + @java.lang.Override + public com.google.cloud.visionai.v1.AnalyzeAssetMetadata.AnalysisStatus getAnalysisStatus( + int index) { + return analysisStatus_.get(index); + } + /** + * + * + *
+   * The status of analysis on all search capabilities.
+   * 
+ * + * + * repeated .google.cloud.visionai.v1.AnalyzeAssetMetadata.AnalysisStatus analysis_status = 1; + * + */ + @java.lang.Override + public com.google.cloud.visionai.v1.AnalyzeAssetMetadata.AnalysisStatusOrBuilder + getAnalysisStatusOrBuilder(int index) { + return analysisStatus_.get(index); + } + + public static final int START_TIME_FIELD_NUMBER = 2; + private com.google.protobuf.Timestamp startTime_; + /** + * + * + *
+   * The start time of the operation.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 2; + * + * @return Whether the startTime field is set. + */ + @java.lang.Override + public boolean hasStartTime() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * The start time of the operation.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 2; + * + * @return The startTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getStartTime() { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } + /** + * + * + *
+   * The start time of the operation.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 2; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } + + public static final int UPDATE_TIME_FIELD_NUMBER = 3; + private com.google.protobuf.Timestamp updateTime_; + /** + * + * + *
+   * The update time of the operation.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3; + * + * @return Whether the updateTime field is set. + */ + @java.lang.Override + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+   * The update time of the operation.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3; + * + * @return The updateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getUpdateTime() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + /** + * + * + *
+   * The update time of the operation.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + + 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 < analysisStatus_.size(); i++) { + output.writeMessage(1, analysisStatus_.get(i)); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getStartTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(3, getUpdateTime()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < analysisStatus_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, analysisStatus_.get(i)); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getStartTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getUpdateTime()); + } + size += getUnknownFields().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.visionai.v1.AnalyzeAssetMetadata)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.AnalyzeAssetMetadata other = + (com.google.cloud.visionai.v1.AnalyzeAssetMetadata) obj; + + if (!getAnalysisStatusList().equals(other.getAnalysisStatusList())) return false; + if (hasStartTime() != other.hasStartTime()) return false; + if (hasStartTime()) { + if (!getStartTime().equals(other.getStartTime())) return false; + } + if (hasUpdateTime() != other.hasUpdateTime()) return false; + if (hasUpdateTime()) { + if (!getUpdateTime().equals(other.getUpdateTime())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getAnalysisStatusCount() > 0) { + hash = (37 * hash) + ANALYSIS_STATUS_FIELD_NUMBER; + hash = (53 * hash) + getAnalysisStatusList().hashCode(); + } + 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) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.AnalyzeAssetMetadata parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.AnalyzeAssetMetadata 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.visionai.v1.AnalyzeAssetMetadata parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.AnalyzeAssetMetadata 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.visionai.v1.AnalyzeAssetMetadata parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.AnalyzeAssetMetadata parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.AnalyzeAssetMetadata parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.AnalyzeAssetMetadata 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.visionai.v1.AnalyzeAssetMetadata parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.AnalyzeAssetMetadata 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.visionai.v1.AnalyzeAssetMetadata parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.AnalyzeAssetMetadata 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.visionai.v1.AnalyzeAssetMetadata 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; + } + /** + * + * + *
+   * Metadata for AnalyzeAsset.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.AnalyzeAssetMetadata} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.AnalyzeAssetMetadata) + com.google.cloud.visionai.v1.AnalyzeAssetMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_AnalyzeAssetMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_AnalyzeAssetMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.AnalyzeAssetMetadata.class, + com.google.cloud.visionai.v1.AnalyzeAssetMetadata.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.AnalyzeAssetMetadata.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getAnalysisStatusFieldBuilder(); + getStartTimeFieldBuilder(); + getUpdateTimeFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (analysisStatusBuilder_ == null) { + analysisStatus_ = java.util.Collections.emptyList(); + } else { + analysisStatus_ = null; + analysisStatusBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + startTime_ = null; + if (startTimeBuilder_ != null) { + startTimeBuilder_.dispose(); + startTimeBuilder_ = null; + } + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_AnalyzeAssetMetadata_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.AnalyzeAssetMetadata getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.AnalyzeAssetMetadata.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.AnalyzeAssetMetadata build() { + com.google.cloud.visionai.v1.AnalyzeAssetMetadata result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.AnalyzeAssetMetadata buildPartial() { + com.google.cloud.visionai.v1.AnalyzeAssetMetadata result = + new com.google.cloud.visionai.v1.AnalyzeAssetMetadata(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.visionai.v1.AnalyzeAssetMetadata result) { + if (analysisStatusBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + analysisStatus_ = java.util.Collections.unmodifiableList(analysisStatus_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.analysisStatus_ = analysisStatus_; + } else { + result.analysisStatus_ = analysisStatusBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.visionai.v1.AnalyzeAssetMetadata result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.startTime_ = startTimeBuilder_ == null ? startTime_ : startTimeBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.updateTime_ = updateTimeBuilder_ == null ? updateTime_ : updateTimeBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.AnalyzeAssetMetadata) { + return mergeFrom((com.google.cloud.visionai.v1.AnalyzeAssetMetadata) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.AnalyzeAssetMetadata other) { + if (other == com.google.cloud.visionai.v1.AnalyzeAssetMetadata.getDefaultInstance()) + return this; + if (analysisStatusBuilder_ == null) { + if (!other.analysisStatus_.isEmpty()) { + if (analysisStatus_.isEmpty()) { + analysisStatus_ = other.analysisStatus_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureAnalysisStatusIsMutable(); + analysisStatus_.addAll(other.analysisStatus_); + } + onChanged(); + } + } else { + if (!other.analysisStatus_.isEmpty()) { + if (analysisStatusBuilder_.isEmpty()) { + analysisStatusBuilder_.dispose(); + analysisStatusBuilder_ = null; + analysisStatus_ = other.analysisStatus_; + bitField0_ = (bitField0_ & ~0x00000001); + analysisStatusBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getAnalysisStatusFieldBuilder() + : null; + } else { + analysisStatusBuilder_.addAllMessages(other.analysisStatus_); + } + } + } + if (other.hasStartTime()) { + mergeStartTime(other.getStartTime()); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.visionai.v1.AnalyzeAssetMetadata.AnalysisStatus m = + input.readMessage( + com.google.cloud.visionai.v1.AnalyzeAssetMetadata.AnalysisStatus.parser(), + extensionRegistry); + if (analysisStatusBuilder_ == null) { + ensureAnalysisStatusIsMutable(); + analysisStatus_.add(m); + } else { + analysisStatusBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + input.readMessage(getStartTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage(getUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List + analysisStatus_ = java.util.Collections.emptyList(); + + private void ensureAnalysisStatusIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + analysisStatus_ = + new java.util.ArrayList< + com.google.cloud.visionai.v1.AnalyzeAssetMetadata.AnalysisStatus>(analysisStatus_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.visionai.v1.AnalyzeAssetMetadata.AnalysisStatus, + com.google.cloud.visionai.v1.AnalyzeAssetMetadata.AnalysisStatus.Builder, + com.google.cloud.visionai.v1.AnalyzeAssetMetadata.AnalysisStatusOrBuilder> + analysisStatusBuilder_; + + /** + * + * + *
+     * The status of analysis on all search capabilities.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.AnalyzeAssetMetadata.AnalysisStatus analysis_status = 1; + * + */ + public java.util.List + getAnalysisStatusList() { + if (analysisStatusBuilder_ == null) { + return java.util.Collections.unmodifiableList(analysisStatus_); + } else { + return analysisStatusBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * The status of analysis on all search capabilities.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.AnalyzeAssetMetadata.AnalysisStatus analysis_status = 1; + * + */ + public int getAnalysisStatusCount() { + if (analysisStatusBuilder_ == null) { + return analysisStatus_.size(); + } else { + return analysisStatusBuilder_.getCount(); + } + } + /** + * + * + *
+     * The status of analysis on all search capabilities.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.AnalyzeAssetMetadata.AnalysisStatus analysis_status = 1; + * + */ + public com.google.cloud.visionai.v1.AnalyzeAssetMetadata.AnalysisStatus getAnalysisStatus( + int index) { + if (analysisStatusBuilder_ == null) { + return analysisStatus_.get(index); + } else { + return analysisStatusBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * The status of analysis on all search capabilities.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.AnalyzeAssetMetadata.AnalysisStatus analysis_status = 1; + * + */ + public Builder setAnalysisStatus( + int index, com.google.cloud.visionai.v1.AnalyzeAssetMetadata.AnalysisStatus value) { + if (analysisStatusBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAnalysisStatusIsMutable(); + analysisStatus_.set(index, value); + onChanged(); + } else { + analysisStatusBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The status of analysis on all search capabilities.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.AnalyzeAssetMetadata.AnalysisStatus analysis_status = 1; + * + */ + public Builder setAnalysisStatus( + int index, + com.google.cloud.visionai.v1.AnalyzeAssetMetadata.AnalysisStatus.Builder builderForValue) { + if (analysisStatusBuilder_ == null) { + ensureAnalysisStatusIsMutable(); + analysisStatus_.set(index, builderForValue.build()); + onChanged(); + } else { + analysisStatusBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The status of analysis on all search capabilities.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.AnalyzeAssetMetadata.AnalysisStatus analysis_status = 1; + * + */ + public Builder addAnalysisStatus( + com.google.cloud.visionai.v1.AnalyzeAssetMetadata.AnalysisStatus value) { + if (analysisStatusBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAnalysisStatusIsMutable(); + analysisStatus_.add(value); + onChanged(); + } else { + analysisStatusBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * The status of analysis on all search capabilities.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.AnalyzeAssetMetadata.AnalysisStatus analysis_status = 1; + * + */ + public Builder addAnalysisStatus( + int index, com.google.cloud.visionai.v1.AnalyzeAssetMetadata.AnalysisStatus value) { + if (analysisStatusBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAnalysisStatusIsMutable(); + analysisStatus_.add(index, value); + onChanged(); + } else { + analysisStatusBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The status of analysis on all search capabilities.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.AnalyzeAssetMetadata.AnalysisStatus analysis_status = 1; + * + */ + public Builder addAnalysisStatus( + com.google.cloud.visionai.v1.AnalyzeAssetMetadata.AnalysisStatus.Builder builderForValue) { + if (analysisStatusBuilder_ == null) { + ensureAnalysisStatusIsMutable(); + analysisStatus_.add(builderForValue.build()); + onChanged(); + } else { + analysisStatusBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The status of analysis on all search capabilities.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.AnalyzeAssetMetadata.AnalysisStatus analysis_status = 1; + * + */ + public Builder addAnalysisStatus( + int index, + com.google.cloud.visionai.v1.AnalyzeAssetMetadata.AnalysisStatus.Builder builderForValue) { + if (analysisStatusBuilder_ == null) { + ensureAnalysisStatusIsMutable(); + analysisStatus_.add(index, builderForValue.build()); + onChanged(); + } else { + analysisStatusBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The status of analysis on all search capabilities.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.AnalyzeAssetMetadata.AnalysisStatus analysis_status = 1; + * + */ + public Builder addAllAnalysisStatus( + java.lang.Iterable< + ? extends com.google.cloud.visionai.v1.AnalyzeAssetMetadata.AnalysisStatus> + values) { + if (analysisStatusBuilder_ == null) { + ensureAnalysisStatusIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, analysisStatus_); + onChanged(); + } else { + analysisStatusBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * The status of analysis on all search capabilities.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.AnalyzeAssetMetadata.AnalysisStatus analysis_status = 1; + * + */ + public Builder clearAnalysisStatus() { + if (analysisStatusBuilder_ == null) { + analysisStatus_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + analysisStatusBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The status of analysis on all search capabilities.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.AnalyzeAssetMetadata.AnalysisStatus analysis_status = 1; + * + */ + public Builder removeAnalysisStatus(int index) { + if (analysisStatusBuilder_ == null) { + ensureAnalysisStatusIsMutable(); + analysisStatus_.remove(index); + onChanged(); + } else { + analysisStatusBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * The status of analysis on all search capabilities.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.AnalyzeAssetMetadata.AnalysisStatus analysis_status = 1; + * + */ + public com.google.cloud.visionai.v1.AnalyzeAssetMetadata.AnalysisStatus.Builder + getAnalysisStatusBuilder(int index) { + return getAnalysisStatusFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * The status of analysis on all search capabilities.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.AnalyzeAssetMetadata.AnalysisStatus analysis_status = 1; + * + */ + public com.google.cloud.visionai.v1.AnalyzeAssetMetadata.AnalysisStatusOrBuilder + getAnalysisStatusOrBuilder(int index) { + if (analysisStatusBuilder_ == null) { + return analysisStatus_.get(index); + } else { + return analysisStatusBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * The status of analysis on all search capabilities.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.AnalyzeAssetMetadata.AnalysisStatus analysis_status = 1; + * + */ + public java.util.List< + ? extends com.google.cloud.visionai.v1.AnalyzeAssetMetadata.AnalysisStatusOrBuilder> + getAnalysisStatusOrBuilderList() { + if (analysisStatusBuilder_ != null) { + return analysisStatusBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(analysisStatus_); + } + } + /** + * + * + *
+     * The status of analysis on all search capabilities.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.AnalyzeAssetMetadata.AnalysisStatus analysis_status = 1; + * + */ + public com.google.cloud.visionai.v1.AnalyzeAssetMetadata.AnalysisStatus.Builder + addAnalysisStatusBuilder() { + return getAnalysisStatusFieldBuilder() + .addBuilder( + com.google.cloud.visionai.v1.AnalyzeAssetMetadata.AnalysisStatus + .getDefaultInstance()); + } + /** + * + * + *
+     * The status of analysis on all search capabilities.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.AnalyzeAssetMetadata.AnalysisStatus analysis_status = 1; + * + */ + public com.google.cloud.visionai.v1.AnalyzeAssetMetadata.AnalysisStatus.Builder + addAnalysisStatusBuilder(int index) { + return getAnalysisStatusFieldBuilder() + .addBuilder( + index, + com.google.cloud.visionai.v1.AnalyzeAssetMetadata.AnalysisStatus + .getDefaultInstance()); + } + /** + * + * + *
+     * The status of analysis on all search capabilities.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.AnalyzeAssetMetadata.AnalysisStatus analysis_status = 1; + * + */ + public java.util.List + getAnalysisStatusBuilderList() { + return getAnalysisStatusFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.visionai.v1.AnalyzeAssetMetadata.AnalysisStatus, + com.google.cloud.visionai.v1.AnalyzeAssetMetadata.AnalysisStatus.Builder, + com.google.cloud.visionai.v1.AnalyzeAssetMetadata.AnalysisStatusOrBuilder> + getAnalysisStatusFieldBuilder() { + if (analysisStatusBuilder_ == null) { + analysisStatusBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.visionai.v1.AnalyzeAssetMetadata.AnalysisStatus, + com.google.cloud.visionai.v1.AnalyzeAssetMetadata.AnalysisStatus.Builder, + com.google.cloud.visionai.v1.AnalyzeAssetMetadata.AnalysisStatusOrBuilder>( + analysisStatus_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + analysisStatus_ = null; + } + return analysisStatusBuilder_; + } + + private com.google.protobuf.Timestamp startTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + startTimeBuilder_; + /** + * + * + *
+     * The start time of the operation.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 2; + * + * @return Whether the startTime field is set. + */ + public boolean hasStartTime() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * The start time of the operation.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 2; + * + * @return The startTime. + */ + public com.google.protobuf.Timestamp getStartTime() { + if (startTimeBuilder_ == null) { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } else { + return startTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The start time of the operation.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 2; + */ + public Builder setStartTime(com.google.protobuf.Timestamp value) { + if (startTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + startTime_ = value; + } else { + startTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * The start time of the operation.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 2; + */ + public Builder setStartTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (startTimeBuilder_ == null) { + startTime_ = builderForValue.build(); + } else { + startTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * The start time of the operation.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 2; + */ + public Builder mergeStartTime(com.google.protobuf.Timestamp value) { + if (startTimeBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && startTime_ != null + && startTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getStartTimeBuilder().mergeFrom(value); + } else { + startTime_ = value; + } + } else { + startTimeBuilder_.mergeFrom(value); + } + if (startTime_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + /** + * + * + *
+     * The start time of the operation.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 2; + */ + public Builder clearStartTime() { + bitField0_ = (bitField0_ & ~0x00000002); + startTime_ = null; + if (startTimeBuilder_ != null) { + startTimeBuilder_.dispose(); + startTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * The start time of the operation.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 2; + */ + public com.google.protobuf.Timestamp.Builder getStartTimeBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getStartTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The start time of the operation.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 2; + */ + public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { + if (startTimeBuilder_ != null) { + return startTimeBuilder_.getMessageOrBuilder(); + } else { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } + } + /** + * + * + *
+     * The start time of the operation.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 2; + */ + 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_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + updateTimeBuilder_; + /** + * + * + *
+     * The update time of the operation.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 3; + * + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+     * The update time of the operation.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 3; + * + * @return The updateTime. + */ + public com.google.protobuf.Timestamp getUpdateTime() { + if (updateTimeBuilder_ == null) { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } else { + return updateTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The update time of the operation.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 3; + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateTime_ = value; + } else { + updateTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * The update time of the operation.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 3; + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (updateTimeBuilder_ == null) { + updateTime_ = builderForValue.build(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * The update time of the operation.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 3; + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && updateTime_ != null + && updateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getUpdateTimeBuilder().mergeFrom(value); + } else { + updateTime_ = value; + } + } else { + updateTimeBuilder_.mergeFrom(value); + } + if (updateTime_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + /** + * + * + *
+     * The update time of the operation.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 3; + */ + public Builder clearUpdateTime() { + bitField0_ = (bitField0_ & ~0x00000004); + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * The update time of the operation.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 3; + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getUpdateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The update time of the operation.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 3; + */ + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + if (updateTimeBuilder_ != null) { + return updateTimeBuilder_.getMessageOrBuilder(); + } else { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } + } + /** + * + * + *
+     * The update time of the operation.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 3; + */ + 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.setUnknownFields(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.visionai.v1.AnalyzeAssetMetadata) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.AnalyzeAssetMetadata) + private static final com.google.cloud.visionai.v1.AnalyzeAssetMetadata DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.AnalyzeAssetMetadata(); + } + + public static com.google.cloud.visionai.v1.AnalyzeAssetMetadata getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AnalyzeAssetMetadata parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.AnalyzeAssetMetadata getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/AnalyzeAssetMetadataOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/AnalyzeAssetMetadataOrBuilder.java new file mode 100644 index 000000000000..6dac571068a9 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/AnalyzeAssetMetadataOrBuilder.java @@ -0,0 +1,161 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/warehouse.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface AnalyzeAssetMetadataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.AnalyzeAssetMetadata) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The status of analysis on all search capabilities.
+   * 
+ * + * + * repeated .google.cloud.visionai.v1.AnalyzeAssetMetadata.AnalysisStatus analysis_status = 1; + * + */ + java.util.List + getAnalysisStatusList(); + /** + * + * + *
+   * The status of analysis on all search capabilities.
+   * 
+ * + * + * repeated .google.cloud.visionai.v1.AnalyzeAssetMetadata.AnalysisStatus analysis_status = 1; + * + */ + com.google.cloud.visionai.v1.AnalyzeAssetMetadata.AnalysisStatus getAnalysisStatus(int index); + /** + * + * + *
+   * The status of analysis on all search capabilities.
+   * 
+ * + * + * repeated .google.cloud.visionai.v1.AnalyzeAssetMetadata.AnalysisStatus analysis_status = 1; + * + */ + int getAnalysisStatusCount(); + /** + * + * + *
+   * The status of analysis on all search capabilities.
+   * 
+ * + * + * repeated .google.cloud.visionai.v1.AnalyzeAssetMetadata.AnalysisStatus analysis_status = 1; + * + */ + java.util.List< + ? extends com.google.cloud.visionai.v1.AnalyzeAssetMetadata.AnalysisStatusOrBuilder> + getAnalysisStatusOrBuilderList(); + /** + * + * + *
+   * The status of analysis on all search capabilities.
+   * 
+ * + * + * repeated .google.cloud.visionai.v1.AnalyzeAssetMetadata.AnalysisStatus analysis_status = 1; + * + */ + com.google.cloud.visionai.v1.AnalyzeAssetMetadata.AnalysisStatusOrBuilder + getAnalysisStatusOrBuilder(int index); + + /** + * + * + *
+   * The start time of the operation.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 2; + * + * @return Whether the startTime field is set. + */ + boolean hasStartTime(); + /** + * + * + *
+   * The start time of the operation.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 2; + * + * @return The startTime. + */ + com.google.protobuf.Timestamp getStartTime(); + /** + * + * + *
+   * The start time of the operation.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 2; + */ + com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder(); + + /** + * + * + *
+   * The update time of the operation.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3; + * + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + /** + * + * + *
+   * The update time of the operation.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3; + * + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + /** + * + * + *
+   * The update time of the operation.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3; + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/AnalyzeAssetRequest.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/AnalyzeAssetRequest.java new file mode 100644 index 000000000000..abb8885546e1 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/AnalyzeAssetRequest.java @@ -0,0 +1,653 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/warehouse.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * Request message for AnalyzeAsset.
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.AnalyzeAssetRequest} + */ +public final class AnalyzeAssetRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.AnalyzeAssetRequest) + AnalyzeAssetRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use AnalyzeAssetRequest.newBuilder() to construct. + private AnalyzeAssetRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private AnalyzeAssetRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new AnalyzeAssetRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_AnalyzeAssetRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_AnalyzeAssetRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.AnalyzeAssetRequest.class, + com.google.cloud.visionai.v1.AnalyzeAssetRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Required. The resource name of the asset to analyze.
+   * Format:
+   * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/assets/{asset_id}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + 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(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The resource name of the asset to analyze.
+   * Format:
+   * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/assets/{asset_id}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += getUnknownFields().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.visionai.v1.AnalyzeAssetRequest)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.AnalyzeAssetRequest other = + (com.google.cloud.visionai.v1.AnalyzeAssetRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.AnalyzeAssetRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.AnalyzeAssetRequest 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.visionai.v1.AnalyzeAssetRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.AnalyzeAssetRequest 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.visionai.v1.AnalyzeAssetRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.AnalyzeAssetRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.AnalyzeAssetRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.AnalyzeAssetRequest 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.visionai.v1.AnalyzeAssetRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.AnalyzeAssetRequest 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.visionai.v1.AnalyzeAssetRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.AnalyzeAssetRequest 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.visionai.v1.AnalyzeAssetRequest 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; + } + /** + * + * + *
+   * Request message for AnalyzeAsset.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.AnalyzeAssetRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.AnalyzeAssetRequest) + com.google.cloud.visionai.v1.AnalyzeAssetRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_AnalyzeAssetRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_AnalyzeAssetRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.AnalyzeAssetRequest.class, + com.google.cloud.visionai.v1.AnalyzeAssetRequest.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.AnalyzeAssetRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_AnalyzeAssetRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.AnalyzeAssetRequest getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.AnalyzeAssetRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.AnalyzeAssetRequest build() { + com.google.cloud.visionai.v1.AnalyzeAssetRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.AnalyzeAssetRequest buildPartial() { + com.google.cloud.visionai.v1.AnalyzeAssetRequest result = + new com.google.cloud.visionai.v1.AnalyzeAssetRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.visionai.v1.AnalyzeAssetRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.AnalyzeAssetRequest) { + return mergeFrom((com.google.cloud.visionai.v1.AnalyzeAssetRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.AnalyzeAssetRequest other) { + if (other == com.google.cloud.visionai.v1.AnalyzeAssetRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. The resource name of the asset to analyze.
+     * Format:
+     * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/assets/{asset_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The resource name of the asset to analyze.
+     * Format:
+     * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/assets/{asset_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The resource name of the asset to analyze.
+     * Format:
+     * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/assets/{asset_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the asset to analyze.
+     * Format:
+     * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/assets/{asset_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the asset to analyze.
+     * Format:
+     * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/assets/{asset_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.AnalyzeAssetRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.AnalyzeAssetRequest) + private static final com.google.cloud.visionai.v1.AnalyzeAssetRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.AnalyzeAssetRequest(); + } + + public static com.google.cloud.visionai.v1.AnalyzeAssetRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AnalyzeAssetRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.AnalyzeAssetRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/AnalyzeAssetRequestOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/AnalyzeAssetRequestOrBuilder.java new file mode 100644 index 000000000000..e45e7d6f9736 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/AnalyzeAssetRequestOrBuilder.java @@ -0,0 +1,59 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/warehouse.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface AnalyzeAssetRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.AnalyzeAssetRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The resource name of the asset to analyze.
+   * Format:
+   * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/assets/{asset_id}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The resource name of the asset to analyze.
+   * Format:
+   * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/assets/{asset_id}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/AnalyzeAssetResponse.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/AnalyzeAssetResponse.java new file mode 100644 index 000000000000..483ff8229348 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/AnalyzeAssetResponse.java @@ -0,0 +1,432 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/warehouse.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * Response message for AnalyzeAsset.
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.AnalyzeAssetResponse} + */ +public final class AnalyzeAssetResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.AnalyzeAssetResponse) + AnalyzeAssetResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use AnalyzeAssetResponse.newBuilder() to construct. + private AnalyzeAssetResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private AnalyzeAssetResponse() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new AnalyzeAssetResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_AnalyzeAssetResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_AnalyzeAssetResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.AnalyzeAssetResponse.class, + com.google.cloud.visionai.v1.AnalyzeAssetResponse.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 { + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += getUnknownFields().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.visionai.v1.AnalyzeAssetResponse)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.AnalyzeAssetResponse other = + (com.google.cloud.visionai.v1.AnalyzeAssetResponse) obj; + + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.AnalyzeAssetResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.AnalyzeAssetResponse 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.visionai.v1.AnalyzeAssetResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.AnalyzeAssetResponse 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.visionai.v1.AnalyzeAssetResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.AnalyzeAssetResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.AnalyzeAssetResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.AnalyzeAssetResponse 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.visionai.v1.AnalyzeAssetResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.AnalyzeAssetResponse 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.visionai.v1.AnalyzeAssetResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.AnalyzeAssetResponse 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.visionai.v1.AnalyzeAssetResponse 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; + } + /** + * + * + *
+   * Response message for AnalyzeAsset.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.AnalyzeAssetResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.AnalyzeAssetResponse) + com.google.cloud.visionai.v1.AnalyzeAssetResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_AnalyzeAssetResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_AnalyzeAssetResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.AnalyzeAssetResponse.class, + com.google.cloud.visionai.v1.AnalyzeAssetResponse.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.AnalyzeAssetResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_AnalyzeAssetResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.AnalyzeAssetResponse getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.AnalyzeAssetResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.AnalyzeAssetResponse build() { + com.google.cloud.visionai.v1.AnalyzeAssetResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.AnalyzeAssetResponse buildPartial() { + com.google.cloud.visionai.v1.AnalyzeAssetResponse result = + new com.google.cloud.visionai.v1.AnalyzeAssetResponse(this); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.AnalyzeAssetResponse) { + return mergeFrom((com.google.cloud.visionai.v1.AnalyzeAssetResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.AnalyzeAssetResponse other) { + if (other == com.google.cloud.visionai.v1.AnalyzeAssetResponse.getDefaultInstance()) + return this; + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.AnalyzeAssetResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.AnalyzeAssetResponse) + private static final com.google.cloud.visionai.v1.AnalyzeAssetResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.AnalyzeAssetResponse(); + } + + public static com.google.cloud.visionai.v1.AnalyzeAssetResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AnalyzeAssetResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.AnalyzeAssetResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/AnalyzeAssetResponseOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/AnalyzeAssetResponseOrBuilder.java new file mode 100644 index 000000000000..0205b6dd2a11 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/AnalyzeAssetResponseOrBuilder.java @@ -0,0 +1,25 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/warehouse.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface AnalyzeAssetResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.AnalyzeAssetResponse) + com.google.protobuf.MessageOrBuilder {} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/AnalyzeCorpusMetadata.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/AnalyzeCorpusMetadata.java new file mode 100644 index 000000000000..8e5fa644ad13 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/AnalyzeCorpusMetadata.java @@ -0,0 +1,722 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/warehouse.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * The metadata message for AnalyzeCorpus LRO.
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.AnalyzeCorpusMetadata} + */ +public final class AnalyzeCorpusMetadata extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.AnalyzeCorpusMetadata) + AnalyzeCorpusMetadataOrBuilder { + private static final long serialVersionUID = 0L; + // Use AnalyzeCorpusMetadata.newBuilder() to construct. + private AnalyzeCorpusMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private AnalyzeCorpusMetadata() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new AnalyzeCorpusMetadata(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_AnalyzeCorpusMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_AnalyzeCorpusMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.AnalyzeCorpusMetadata.class, + com.google.cloud.visionai.v1.AnalyzeCorpusMetadata.Builder.class); + } + + private int bitField0_; + public static final int METADATA_FIELD_NUMBER = 1; + private com.google.cloud.visionai.v1.OperationMetadata metadata_; + /** + * + * + *
+   * The metadata of the operation.
+   * 
+ * + * .google.cloud.visionai.v1.OperationMetadata metadata = 1; + * + * @return Whether the metadata field is set. + */ + @java.lang.Override + public boolean hasMetadata() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * The metadata of the operation.
+   * 
+ * + * .google.cloud.visionai.v1.OperationMetadata metadata = 1; + * + * @return The metadata. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.OperationMetadata getMetadata() { + return metadata_ == null + ? com.google.cloud.visionai.v1.OperationMetadata.getDefaultInstance() + : metadata_; + } + /** + * + * + *
+   * The metadata of the operation.
+   * 
+ * + * .google.cloud.visionai.v1.OperationMetadata metadata = 1; + */ + @java.lang.Override + public com.google.cloud.visionai.v1.OperationMetadataOrBuilder getMetadataOrBuilder() { + return metadata_ == null + ? com.google.cloud.visionai.v1.OperationMetadata.getDefaultInstance() + : metadata_; + } + + 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 (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getMetadata()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getMetadata()); + } + size += getUnknownFields().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.visionai.v1.AnalyzeCorpusMetadata)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.AnalyzeCorpusMetadata other = + (com.google.cloud.visionai.v1.AnalyzeCorpusMetadata) obj; + + if (hasMetadata() != other.hasMetadata()) return false; + if (hasMetadata()) { + if (!getMetadata().equals(other.getMetadata())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasMetadata()) { + hash = (37 * hash) + METADATA_FIELD_NUMBER; + hash = (53 * hash) + getMetadata().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.AnalyzeCorpusMetadata parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.AnalyzeCorpusMetadata 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.visionai.v1.AnalyzeCorpusMetadata parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.AnalyzeCorpusMetadata 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.visionai.v1.AnalyzeCorpusMetadata parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.AnalyzeCorpusMetadata parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.AnalyzeCorpusMetadata parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.AnalyzeCorpusMetadata 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.visionai.v1.AnalyzeCorpusMetadata parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.AnalyzeCorpusMetadata 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.visionai.v1.AnalyzeCorpusMetadata parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.AnalyzeCorpusMetadata 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.visionai.v1.AnalyzeCorpusMetadata 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 metadata message for AnalyzeCorpus LRO.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.AnalyzeCorpusMetadata} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.AnalyzeCorpusMetadata) + com.google.cloud.visionai.v1.AnalyzeCorpusMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_AnalyzeCorpusMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_AnalyzeCorpusMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.AnalyzeCorpusMetadata.class, + com.google.cloud.visionai.v1.AnalyzeCorpusMetadata.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.AnalyzeCorpusMetadata.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getMetadataFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + metadata_ = null; + if (metadataBuilder_ != null) { + metadataBuilder_.dispose(); + metadataBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_AnalyzeCorpusMetadata_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.AnalyzeCorpusMetadata getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.AnalyzeCorpusMetadata.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.AnalyzeCorpusMetadata build() { + com.google.cloud.visionai.v1.AnalyzeCorpusMetadata result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.AnalyzeCorpusMetadata buildPartial() { + com.google.cloud.visionai.v1.AnalyzeCorpusMetadata result = + new com.google.cloud.visionai.v1.AnalyzeCorpusMetadata(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.visionai.v1.AnalyzeCorpusMetadata result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.metadata_ = metadataBuilder_ == null ? metadata_ : metadataBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.AnalyzeCorpusMetadata) { + return mergeFrom((com.google.cloud.visionai.v1.AnalyzeCorpusMetadata) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.AnalyzeCorpusMetadata other) { + if (other == com.google.cloud.visionai.v1.AnalyzeCorpusMetadata.getDefaultInstance()) + return this; + if (other.hasMetadata()) { + mergeMetadata(other.getMetadata()); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getMetadataFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.cloud.visionai.v1.OperationMetadata metadata_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.OperationMetadata, + com.google.cloud.visionai.v1.OperationMetadata.Builder, + com.google.cloud.visionai.v1.OperationMetadataOrBuilder> + metadataBuilder_; + /** + * + * + *
+     * The metadata of the operation.
+     * 
+ * + * .google.cloud.visionai.v1.OperationMetadata metadata = 1; + * + * @return Whether the metadata field is set. + */ + public boolean hasMetadata() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * The metadata of the operation.
+     * 
+ * + * .google.cloud.visionai.v1.OperationMetadata metadata = 1; + * + * @return The metadata. + */ + public com.google.cloud.visionai.v1.OperationMetadata getMetadata() { + if (metadataBuilder_ == null) { + return metadata_ == null + ? com.google.cloud.visionai.v1.OperationMetadata.getDefaultInstance() + : metadata_; + } else { + return metadataBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The metadata of the operation.
+     * 
+ * + * .google.cloud.visionai.v1.OperationMetadata metadata = 1; + */ + public Builder setMetadata(com.google.cloud.visionai.v1.OperationMetadata value) { + if (metadataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + metadata_ = value; + } else { + metadataBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The metadata of the operation.
+     * 
+ * + * .google.cloud.visionai.v1.OperationMetadata metadata = 1; + */ + public Builder setMetadata( + com.google.cloud.visionai.v1.OperationMetadata.Builder builderForValue) { + if (metadataBuilder_ == null) { + metadata_ = builderForValue.build(); + } else { + metadataBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The metadata of the operation.
+     * 
+ * + * .google.cloud.visionai.v1.OperationMetadata metadata = 1; + */ + public Builder mergeMetadata(com.google.cloud.visionai.v1.OperationMetadata value) { + if (metadataBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && metadata_ != null + && metadata_ != com.google.cloud.visionai.v1.OperationMetadata.getDefaultInstance()) { + getMetadataBuilder().mergeFrom(value); + } else { + metadata_ = value; + } + } else { + metadataBuilder_.mergeFrom(value); + } + if (metadata_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + /** + * + * + *
+     * The metadata of the operation.
+     * 
+ * + * .google.cloud.visionai.v1.OperationMetadata metadata = 1; + */ + public Builder clearMetadata() { + bitField0_ = (bitField0_ & ~0x00000001); + metadata_ = null; + if (metadataBuilder_ != null) { + metadataBuilder_.dispose(); + metadataBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * The metadata of the operation.
+     * 
+ * + * .google.cloud.visionai.v1.OperationMetadata metadata = 1; + */ + public com.google.cloud.visionai.v1.OperationMetadata.Builder getMetadataBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getMetadataFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The metadata of the operation.
+     * 
+ * + * .google.cloud.visionai.v1.OperationMetadata metadata = 1; + */ + public com.google.cloud.visionai.v1.OperationMetadataOrBuilder getMetadataOrBuilder() { + if (metadataBuilder_ != null) { + return metadataBuilder_.getMessageOrBuilder(); + } else { + return metadata_ == null + ? com.google.cloud.visionai.v1.OperationMetadata.getDefaultInstance() + : metadata_; + } + } + /** + * + * + *
+     * The metadata of the operation.
+     * 
+ * + * .google.cloud.visionai.v1.OperationMetadata metadata = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.OperationMetadata, + com.google.cloud.visionai.v1.OperationMetadata.Builder, + com.google.cloud.visionai.v1.OperationMetadataOrBuilder> + getMetadataFieldBuilder() { + if (metadataBuilder_ == null) { + metadataBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.OperationMetadata, + com.google.cloud.visionai.v1.OperationMetadata.Builder, + com.google.cloud.visionai.v1.OperationMetadataOrBuilder>( + getMetadata(), getParentForChildren(), isClean()); + metadata_ = null; + } + return metadataBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.AnalyzeCorpusMetadata) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.AnalyzeCorpusMetadata) + private static final com.google.cloud.visionai.v1.AnalyzeCorpusMetadata DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.AnalyzeCorpusMetadata(); + } + + public static com.google.cloud.visionai.v1.AnalyzeCorpusMetadata getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AnalyzeCorpusMetadata parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.AnalyzeCorpusMetadata getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/AnalyzeCorpusMetadataOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/AnalyzeCorpusMetadataOrBuilder.java new file mode 100644 index 000000000000..15e1b369796c --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/AnalyzeCorpusMetadataOrBuilder.java @@ -0,0 +1,61 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/warehouse.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface AnalyzeCorpusMetadataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.AnalyzeCorpusMetadata) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The metadata of the operation.
+   * 
+ * + * .google.cloud.visionai.v1.OperationMetadata metadata = 1; + * + * @return Whether the metadata field is set. + */ + boolean hasMetadata(); + /** + * + * + *
+   * The metadata of the operation.
+   * 
+ * + * .google.cloud.visionai.v1.OperationMetadata metadata = 1; + * + * @return The metadata. + */ + com.google.cloud.visionai.v1.OperationMetadata getMetadata(); + /** + * + * + *
+   * The metadata of the operation.
+   * 
+ * + * .google.cloud.visionai.v1.OperationMetadata metadata = 1; + */ + com.google.cloud.visionai.v1.OperationMetadataOrBuilder getMetadataOrBuilder(); +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/AnalyzeCorpusRequest.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/AnalyzeCorpusRequest.java new file mode 100644 index 000000000000..9ac3d6589727 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/AnalyzeCorpusRequest.java @@ -0,0 +1,653 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/warehouse.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * Request message for AnalyzeCorpus.
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.AnalyzeCorpusRequest} + */ +public final class AnalyzeCorpusRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.AnalyzeCorpusRequest) + AnalyzeCorpusRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use AnalyzeCorpusRequest.newBuilder() to construct. + private AnalyzeCorpusRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private AnalyzeCorpusRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new AnalyzeCorpusRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_AnalyzeCorpusRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_AnalyzeCorpusRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.AnalyzeCorpusRequest.class, + com.google.cloud.visionai.v1.AnalyzeCorpusRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Required. The parent corpus resource where the assets will be analyzed.
+   * Format:
+   * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + 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(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The parent corpus resource where the assets will be analyzed.
+   * Format:
+   * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += getUnknownFields().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.visionai.v1.AnalyzeCorpusRequest)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.AnalyzeCorpusRequest other = + (com.google.cloud.visionai.v1.AnalyzeCorpusRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.AnalyzeCorpusRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.AnalyzeCorpusRequest 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.visionai.v1.AnalyzeCorpusRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.AnalyzeCorpusRequest 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.visionai.v1.AnalyzeCorpusRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.AnalyzeCorpusRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.AnalyzeCorpusRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.AnalyzeCorpusRequest 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.visionai.v1.AnalyzeCorpusRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.AnalyzeCorpusRequest 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.visionai.v1.AnalyzeCorpusRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.AnalyzeCorpusRequest 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.visionai.v1.AnalyzeCorpusRequest 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; + } + /** + * + * + *
+   * Request message for AnalyzeCorpus.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.AnalyzeCorpusRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.AnalyzeCorpusRequest) + com.google.cloud.visionai.v1.AnalyzeCorpusRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_AnalyzeCorpusRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_AnalyzeCorpusRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.AnalyzeCorpusRequest.class, + com.google.cloud.visionai.v1.AnalyzeCorpusRequest.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.AnalyzeCorpusRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_AnalyzeCorpusRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.AnalyzeCorpusRequest getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.AnalyzeCorpusRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.AnalyzeCorpusRequest build() { + com.google.cloud.visionai.v1.AnalyzeCorpusRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.AnalyzeCorpusRequest buildPartial() { + com.google.cloud.visionai.v1.AnalyzeCorpusRequest result = + new com.google.cloud.visionai.v1.AnalyzeCorpusRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.visionai.v1.AnalyzeCorpusRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.AnalyzeCorpusRequest) { + return mergeFrom((com.google.cloud.visionai.v1.AnalyzeCorpusRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.AnalyzeCorpusRequest other) { + if (other == com.google.cloud.visionai.v1.AnalyzeCorpusRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. The parent corpus resource where the assets will be analyzed.
+     * Format:
+     * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The parent corpus resource where the assets will be analyzed.
+     * Format:
+     * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The parent corpus resource where the assets will be analyzed.
+     * Format:
+     * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The parent corpus resource where the assets will be analyzed.
+     * Format:
+     * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The parent corpus resource where the assets will be analyzed.
+     * Format:
+     * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.AnalyzeCorpusRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.AnalyzeCorpusRequest) + private static final com.google.cloud.visionai.v1.AnalyzeCorpusRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.AnalyzeCorpusRequest(); + } + + public static com.google.cloud.visionai.v1.AnalyzeCorpusRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AnalyzeCorpusRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.AnalyzeCorpusRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/AnalyzeCorpusRequestOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/AnalyzeCorpusRequestOrBuilder.java new file mode 100644 index 000000000000..3f89e6dcf8d3 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/AnalyzeCorpusRequestOrBuilder.java @@ -0,0 +1,59 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/warehouse.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface AnalyzeCorpusRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.AnalyzeCorpusRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The parent corpus resource where the assets will be analyzed.
+   * Format:
+   * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The parent corpus resource where the assets will be analyzed.
+   * Format:
+   * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/AnalyzeCorpusResponse.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/AnalyzeCorpusResponse.java new file mode 100644 index 000000000000..2be033ae1845 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/AnalyzeCorpusResponse.java @@ -0,0 +1,432 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/warehouse.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * The response message for AnalyzeCorpus LRO.
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.AnalyzeCorpusResponse} + */ +public final class AnalyzeCorpusResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.AnalyzeCorpusResponse) + AnalyzeCorpusResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use AnalyzeCorpusResponse.newBuilder() to construct. + private AnalyzeCorpusResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private AnalyzeCorpusResponse() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new AnalyzeCorpusResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_AnalyzeCorpusResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_AnalyzeCorpusResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.AnalyzeCorpusResponse.class, + com.google.cloud.visionai.v1.AnalyzeCorpusResponse.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 { + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += getUnknownFields().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.visionai.v1.AnalyzeCorpusResponse)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.AnalyzeCorpusResponse other = + (com.google.cloud.visionai.v1.AnalyzeCorpusResponse) obj; + + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.AnalyzeCorpusResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.AnalyzeCorpusResponse 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.visionai.v1.AnalyzeCorpusResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.AnalyzeCorpusResponse 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.visionai.v1.AnalyzeCorpusResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.AnalyzeCorpusResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.AnalyzeCorpusResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.AnalyzeCorpusResponse 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.visionai.v1.AnalyzeCorpusResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.AnalyzeCorpusResponse 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.visionai.v1.AnalyzeCorpusResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.AnalyzeCorpusResponse 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.visionai.v1.AnalyzeCorpusResponse 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 response message for AnalyzeCorpus LRO.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.AnalyzeCorpusResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.AnalyzeCorpusResponse) + com.google.cloud.visionai.v1.AnalyzeCorpusResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_AnalyzeCorpusResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_AnalyzeCorpusResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.AnalyzeCorpusResponse.class, + com.google.cloud.visionai.v1.AnalyzeCorpusResponse.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.AnalyzeCorpusResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_AnalyzeCorpusResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.AnalyzeCorpusResponse getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.AnalyzeCorpusResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.AnalyzeCorpusResponse build() { + com.google.cloud.visionai.v1.AnalyzeCorpusResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.AnalyzeCorpusResponse buildPartial() { + com.google.cloud.visionai.v1.AnalyzeCorpusResponse result = + new com.google.cloud.visionai.v1.AnalyzeCorpusResponse(this); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.AnalyzeCorpusResponse) { + return mergeFrom((com.google.cloud.visionai.v1.AnalyzeCorpusResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.AnalyzeCorpusResponse other) { + if (other == com.google.cloud.visionai.v1.AnalyzeCorpusResponse.getDefaultInstance()) + return this; + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.AnalyzeCorpusResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.AnalyzeCorpusResponse) + private static final com.google.cloud.visionai.v1.AnalyzeCorpusResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.AnalyzeCorpusResponse(); + } + + public static com.google.cloud.visionai.v1.AnalyzeCorpusResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AnalyzeCorpusResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.AnalyzeCorpusResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/AnalyzeCorpusResponseOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/AnalyzeCorpusResponseOrBuilder.java new file mode 100644 index 000000000000..c882028893ee --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/AnalyzeCorpusResponseOrBuilder.java @@ -0,0 +1,25 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/warehouse.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface AnalyzeCorpusResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.AnalyzeCorpusResponse) + com.google.protobuf.MessageOrBuilder {} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/AnalyzerDefinition.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/AnalyzerDefinition.java new file mode 100644 index 000000000000..21a7eb1debbd --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/AnalyzerDefinition.java @@ -0,0 +1,4775 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/lva.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * Defines an Analyzer.
+ *
+ * An analyzer processes data from its input streams using the logic defined in
+ * the Operator that it represents. Of course, it produces data for the output
+ * streams declared in the Operator.
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.AnalyzerDefinition} + */ +public final class AnalyzerDefinition extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.AnalyzerDefinition) + AnalyzerDefinitionOrBuilder { + private static final long serialVersionUID = 0L; + // Use AnalyzerDefinition.newBuilder() to construct. + private AnalyzerDefinition(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private AnalyzerDefinition() { + analyzer_ = ""; + operator_ = ""; + inputs_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new AnalyzerDefinition(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.LvaProto + .internal_static_google_cloud_visionai_v1_AnalyzerDefinition_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 4: + return internalGetAttrs(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.LvaProto + .internal_static_google_cloud_visionai_v1_AnalyzerDefinition_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.AnalyzerDefinition.class, + com.google.cloud.visionai.v1.AnalyzerDefinition.Builder.class); + } + + public interface StreamInputOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.AnalyzerDefinition.StreamInput) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * The name of the stream input (as discussed above).
+     * 
+ * + * string input = 1; + * + * @return The input. + */ + java.lang.String getInput(); + /** + * + * + *
+     * The name of the stream input (as discussed above).
+     * 
+ * + * string input = 1; + * + * @return The bytes for input. + */ + com.google.protobuf.ByteString getInputBytes(); + } + /** + * + * + *
+   * The inputs to this analyzer.
+   *
+   * We accept input name references of the following form:
+   * <analyzer-name>:<output-argument-name>
+   *
+   * Example:
+   *
+   * Suppose you had an operator named "SomeOp" that has 2 output
+   * arguments, the first of which is named "foo" and the second of which is
+   * named "bar", and an operator named "MyOp" that accepts 2 inputs.
+   *
+   * Also suppose that there is an analyzer named "some-analyzer" that is
+   * running "SomeOp" and another analyzer named "my-analyzer" running "MyOp".
+   *
+   * To indicate that "my-analyzer" is to consume "some-analyzer"'s "foo"
+   * output as its first input and "some-analyzer"'s "bar" output as its
+   * second input, you can set this field to the following:
+   * input = ["some-analyzer:foo", "some-analyzer:bar"]
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.AnalyzerDefinition.StreamInput} + */ + public static final class StreamInput extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.AnalyzerDefinition.StreamInput) + StreamInputOrBuilder { + private static final long serialVersionUID = 0L; + // Use StreamInput.newBuilder() to construct. + private StreamInput(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private StreamInput() { + input_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new StreamInput(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.LvaProto + .internal_static_google_cloud_visionai_v1_AnalyzerDefinition_StreamInput_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.LvaProto + .internal_static_google_cloud_visionai_v1_AnalyzerDefinition_StreamInput_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.AnalyzerDefinition.StreamInput.class, + com.google.cloud.visionai.v1.AnalyzerDefinition.StreamInput.Builder.class); + } + + public static final int INPUT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object input_ = ""; + /** + * + * + *
+     * The name of the stream input (as discussed above).
+     * 
+ * + * string input = 1; + * + * @return The input. + */ + @java.lang.Override + public java.lang.String getInput() { + java.lang.Object ref = input_; + 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(); + input_ = s; + return s; + } + } + /** + * + * + *
+     * The name of the stream input (as discussed above).
+     * 
+ * + * string input = 1; + * + * @return The bytes for input. + */ + @java.lang.Override + public com.google.protobuf.ByteString getInputBytes() { + java.lang.Object ref = input_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + input_ = 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(input_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, input_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(input_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, input_); + } + size += getUnknownFields().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.visionai.v1.AnalyzerDefinition.StreamInput)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.AnalyzerDefinition.StreamInput other = + (com.google.cloud.visionai.v1.AnalyzerDefinition.StreamInput) obj; + + if (!getInput().equals(other.getInput())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + INPUT_FIELD_NUMBER; + hash = (53 * hash) + getInput().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.AnalyzerDefinition.StreamInput parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.AnalyzerDefinition.StreamInput 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.visionai.v1.AnalyzerDefinition.StreamInput parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.AnalyzerDefinition.StreamInput 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.visionai.v1.AnalyzerDefinition.StreamInput parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.AnalyzerDefinition.StreamInput parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.AnalyzerDefinition.StreamInput parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.AnalyzerDefinition.StreamInput 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.visionai.v1.AnalyzerDefinition.StreamInput parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.AnalyzerDefinition.StreamInput 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.visionai.v1.AnalyzerDefinition.StreamInput parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.AnalyzerDefinition.StreamInput 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.visionai.v1.AnalyzerDefinition.StreamInput 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 inputs to this analyzer.
+     *
+     * We accept input name references of the following form:
+     * <analyzer-name>:<output-argument-name>
+     *
+     * Example:
+     *
+     * Suppose you had an operator named "SomeOp" that has 2 output
+     * arguments, the first of which is named "foo" and the second of which is
+     * named "bar", and an operator named "MyOp" that accepts 2 inputs.
+     *
+     * Also suppose that there is an analyzer named "some-analyzer" that is
+     * running "SomeOp" and another analyzer named "my-analyzer" running "MyOp".
+     *
+     * To indicate that "my-analyzer" is to consume "some-analyzer"'s "foo"
+     * output as its first input and "some-analyzer"'s "bar" output as its
+     * second input, you can set this field to the following:
+     * input = ["some-analyzer:foo", "some-analyzer:bar"]
+     * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.AnalyzerDefinition.StreamInput} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.AnalyzerDefinition.StreamInput) + com.google.cloud.visionai.v1.AnalyzerDefinition.StreamInputOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.LvaProto + .internal_static_google_cloud_visionai_v1_AnalyzerDefinition_StreamInput_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.LvaProto + .internal_static_google_cloud_visionai_v1_AnalyzerDefinition_StreamInput_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.AnalyzerDefinition.StreamInput.class, + com.google.cloud.visionai.v1.AnalyzerDefinition.StreamInput.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.AnalyzerDefinition.StreamInput.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + input_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.LvaProto + .internal_static_google_cloud_visionai_v1_AnalyzerDefinition_StreamInput_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.AnalyzerDefinition.StreamInput + getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.AnalyzerDefinition.StreamInput.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.AnalyzerDefinition.StreamInput build() { + com.google.cloud.visionai.v1.AnalyzerDefinition.StreamInput result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.AnalyzerDefinition.StreamInput buildPartial() { + com.google.cloud.visionai.v1.AnalyzerDefinition.StreamInput result = + new com.google.cloud.visionai.v1.AnalyzerDefinition.StreamInput(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.visionai.v1.AnalyzerDefinition.StreamInput result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.input_ = input_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.AnalyzerDefinition.StreamInput) { + return mergeFrom((com.google.cloud.visionai.v1.AnalyzerDefinition.StreamInput) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.AnalyzerDefinition.StreamInput other) { + if (other + == com.google.cloud.visionai.v1.AnalyzerDefinition.StreamInput.getDefaultInstance()) + return this; + if (!other.getInput().isEmpty()) { + input_ = other.input_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object input_ = ""; + /** + * + * + *
+       * The name of the stream input (as discussed above).
+       * 
+ * + * string input = 1; + * + * @return The input. + */ + public java.lang.String getInput() { + java.lang.Object ref = input_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + input_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * The name of the stream input (as discussed above).
+       * 
+ * + * string input = 1; + * + * @return The bytes for input. + */ + public com.google.protobuf.ByteString getInputBytes() { + java.lang.Object ref = input_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + input_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * The name of the stream input (as discussed above).
+       * 
+ * + * string input = 1; + * + * @param value The input to set. + * @return This builder for chaining. + */ + public Builder setInput(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + input_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * The name of the stream input (as discussed above).
+       * 
+ * + * string input = 1; + * + * @return This builder for chaining. + */ + public Builder clearInput() { + input_ = getDefaultInstance().getInput(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+       * The name of the stream input (as discussed above).
+       * 
+ * + * string input = 1; + * + * @param value The bytes for input to set. + * @return This builder for chaining. + */ + public Builder setInputBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + input_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.AnalyzerDefinition.StreamInput) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.AnalyzerDefinition.StreamInput) + private static final com.google.cloud.visionai.v1.AnalyzerDefinition.StreamInput + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.AnalyzerDefinition.StreamInput(); + } + + public static com.google.cloud.visionai.v1.AnalyzerDefinition.StreamInput getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public StreamInput parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.AnalyzerDefinition.StreamInput getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface DebugOptionsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.AnalyzerDefinition.DebugOptions) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Environment variables.
+     * 
+ * + * map<string, string> environment_variables = 1; + */ + int getEnvironmentVariablesCount(); + /** + * + * + *
+     * Environment variables.
+     * 
+ * + * map<string, string> environment_variables = 1; + */ + boolean containsEnvironmentVariables(java.lang.String key); + /** Use {@link #getEnvironmentVariablesMap()} instead. */ + @java.lang.Deprecated + java.util.Map getEnvironmentVariables(); + /** + * + * + *
+     * Environment variables.
+     * 
+ * + * map<string, string> environment_variables = 1; + */ + java.util.Map getEnvironmentVariablesMap(); + /** + * + * + *
+     * Environment variables.
+     * 
+ * + * map<string, string> environment_variables = 1; + */ + /* nullable */ + java.lang.String getEnvironmentVariablesOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue); + /** + * + * + *
+     * Environment variables.
+     * 
+ * + * map<string, string> environment_variables = 1; + */ + java.lang.String getEnvironmentVariablesOrThrow(java.lang.String key); + } + /** + * + * + *
+   * Options available for debugging purposes only.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.AnalyzerDefinition.DebugOptions} + */ + public static final class DebugOptions extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.AnalyzerDefinition.DebugOptions) + DebugOptionsOrBuilder { + private static final long serialVersionUID = 0L; + // Use DebugOptions.newBuilder() to construct. + private DebugOptions(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DebugOptions() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DebugOptions(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.LvaProto + .internal_static_google_cloud_visionai_v1_AnalyzerDefinition_DebugOptions_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 1: + return internalGetEnvironmentVariables(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.LvaProto + .internal_static_google_cloud_visionai_v1_AnalyzerDefinition_DebugOptions_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.AnalyzerDefinition.DebugOptions.class, + com.google.cloud.visionai.v1.AnalyzerDefinition.DebugOptions.Builder.class); + } + + public static final int ENVIRONMENT_VARIABLES_FIELD_NUMBER = 1; + + private static final class EnvironmentVariablesDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.cloud.visionai.v1.LvaProto + .internal_static_google_cloud_visionai_v1_AnalyzerDefinition_DebugOptions_EnvironmentVariablesEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + + @SuppressWarnings("serial") + private com.google.protobuf.MapField environmentVariables_; + + private com.google.protobuf.MapField + internalGetEnvironmentVariables() { + if (environmentVariables_ == null) { + return com.google.protobuf.MapField.emptyMapField( + EnvironmentVariablesDefaultEntryHolder.defaultEntry); + } + return environmentVariables_; + } + + public int getEnvironmentVariablesCount() { + return internalGetEnvironmentVariables().getMap().size(); + } + /** + * + * + *
+     * Environment variables.
+     * 
+ * + * map<string, string> environment_variables = 1; + */ + @java.lang.Override + public boolean containsEnvironmentVariables(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetEnvironmentVariables().getMap().containsKey(key); + } + /** Use {@link #getEnvironmentVariablesMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getEnvironmentVariables() { + return getEnvironmentVariablesMap(); + } + /** + * + * + *
+     * Environment variables.
+     * 
+ * + * map<string, string> environment_variables = 1; + */ + @java.lang.Override + public java.util.Map getEnvironmentVariablesMap() { + return internalGetEnvironmentVariables().getMap(); + } + /** + * + * + *
+     * Environment variables.
+     * 
+ * + * map<string, string> environment_variables = 1; + */ + @java.lang.Override + public /* nullable */ java.lang.String getEnvironmentVariablesOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = + internalGetEnvironmentVariables().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+     * Environment variables.
+     * 
+ * + * map<string, string> environment_variables = 1; + */ + @java.lang.Override + public java.lang.String getEnvironmentVariablesOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = + internalGetEnvironmentVariables().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + 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 { + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, + internalGetEnvironmentVariables(), + EnvironmentVariablesDefaultEntryHolder.defaultEntry, + 1); + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (java.util.Map.Entry entry : + internalGetEnvironmentVariables().getMap().entrySet()) { + com.google.protobuf.MapEntry environmentVariables__ = + EnvironmentVariablesDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, environmentVariables__); + } + size += getUnknownFields().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.visionai.v1.AnalyzerDefinition.DebugOptions)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.AnalyzerDefinition.DebugOptions other = + (com.google.cloud.visionai.v1.AnalyzerDefinition.DebugOptions) obj; + + if (!internalGetEnvironmentVariables().equals(other.internalGetEnvironmentVariables())) + return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (!internalGetEnvironmentVariables().getMap().isEmpty()) { + hash = (37 * hash) + ENVIRONMENT_VARIABLES_FIELD_NUMBER; + hash = (53 * hash) + internalGetEnvironmentVariables().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.AnalyzerDefinition.DebugOptions parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.AnalyzerDefinition.DebugOptions 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.visionai.v1.AnalyzerDefinition.DebugOptions parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.AnalyzerDefinition.DebugOptions 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.visionai.v1.AnalyzerDefinition.DebugOptions parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.AnalyzerDefinition.DebugOptions parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.AnalyzerDefinition.DebugOptions parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.AnalyzerDefinition.DebugOptions 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.visionai.v1.AnalyzerDefinition.DebugOptions parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.AnalyzerDefinition.DebugOptions 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.visionai.v1.AnalyzerDefinition.DebugOptions parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.AnalyzerDefinition.DebugOptions 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.visionai.v1.AnalyzerDefinition.DebugOptions 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; + } + /** + * + * + *
+     * Options available for debugging purposes only.
+     * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.AnalyzerDefinition.DebugOptions} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.AnalyzerDefinition.DebugOptions) + com.google.cloud.visionai.v1.AnalyzerDefinition.DebugOptionsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.LvaProto + .internal_static_google_cloud_visionai_v1_AnalyzerDefinition_DebugOptions_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 1: + return internalGetEnvironmentVariables(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( + int number) { + switch (number) { + case 1: + return internalGetMutableEnvironmentVariables(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.LvaProto + .internal_static_google_cloud_visionai_v1_AnalyzerDefinition_DebugOptions_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.AnalyzerDefinition.DebugOptions.class, + com.google.cloud.visionai.v1.AnalyzerDefinition.DebugOptions.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.AnalyzerDefinition.DebugOptions.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + internalGetMutableEnvironmentVariables().clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.LvaProto + .internal_static_google_cloud_visionai_v1_AnalyzerDefinition_DebugOptions_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.AnalyzerDefinition.DebugOptions + getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.AnalyzerDefinition.DebugOptions.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.AnalyzerDefinition.DebugOptions build() { + com.google.cloud.visionai.v1.AnalyzerDefinition.DebugOptions result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.AnalyzerDefinition.DebugOptions buildPartial() { + com.google.cloud.visionai.v1.AnalyzerDefinition.DebugOptions result = + new com.google.cloud.visionai.v1.AnalyzerDefinition.DebugOptions(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.visionai.v1.AnalyzerDefinition.DebugOptions result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.environmentVariables_ = internalGetEnvironmentVariables(); + result.environmentVariables_.makeImmutable(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.AnalyzerDefinition.DebugOptions) { + return mergeFrom((com.google.cloud.visionai.v1.AnalyzerDefinition.DebugOptions) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.AnalyzerDefinition.DebugOptions other) { + if (other + == com.google.cloud.visionai.v1.AnalyzerDefinition.DebugOptions.getDefaultInstance()) + return this; + internalGetMutableEnvironmentVariables().mergeFrom(other.internalGetEnvironmentVariables()); + bitField0_ |= 0x00000001; + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.protobuf.MapEntry + environmentVariables__ = + input.readMessage( + EnvironmentVariablesDefaultEntryHolder.defaultEntry + .getParserForType(), + extensionRegistry); + internalGetMutableEnvironmentVariables() + .getMutableMap() + .put(environmentVariables__.getKey(), environmentVariables__.getValue()); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.protobuf.MapField + environmentVariables_; + + private com.google.protobuf.MapField + internalGetEnvironmentVariables() { + if (environmentVariables_ == null) { + return com.google.protobuf.MapField.emptyMapField( + EnvironmentVariablesDefaultEntryHolder.defaultEntry); + } + return environmentVariables_; + } + + private com.google.protobuf.MapField + internalGetMutableEnvironmentVariables() { + if (environmentVariables_ == null) { + environmentVariables_ = + com.google.protobuf.MapField.newMapField( + EnvironmentVariablesDefaultEntryHolder.defaultEntry); + } + if (!environmentVariables_.isMutable()) { + environmentVariables_ = environmentVariables_.copy(); + } + bitField0_ |= 0x00000001; + onChanged(); + return environmentVariables_; + } + + public int getEnvironmentVariablesCount() { + return internalGetEnvironmentVariables().getMap().size(); + } + /** + * + * + *
+       * Environment variables.
+       * 
+ * + * map<string, string> environment_variables = 1; + */ + @java.lang.Override + public boolean containsEnvironmentVariables(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetEnvironmentVariables().getMap().containsKey(key); + } + /** Use {@link #getEnvironmentVariablesMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getEnvironmentVariables() { + return getEnvironmentVariablesMap(); + } + /** + * + * + *
+       * Environment variables.
+       * 
+ * + * map<string, string> environment_variables = 1; + */ + @java.lang.Override + public java.util.Map getEnvironmentVariablesMap() { + return internalGetEnvironmentVariables().getMap(); + } + /** + * + * + *
+       * Environment variables.
+       * 
+ * + * map<string, string> environment_variables = 1; + */ + @java.lang.Override + public /* nullable */ java.lang.String getEnvironmentVariablesOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = + internalGetEnvironmentVariables().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+       * Environment variables.
+       * 
+ * + * map<string, string> environment_variables = 1; + */ + @java.lang.Override + public java.lang.String getEnvironmentVariablesOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = + internalGetEnvironmentVariables().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearEnvironmentVariables() { + bitField0_ = (bitField0_ & ~0x00000001); + internalGetMutableEnvironmentVariables().getMutableMap().clear(); + return this; + } + /** + * + * + *
+       * Environment variables.
+       * 
+ * + * map<string, string> environment_variables = 1; + */ + public Builder removeEnvironmentVariables(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + internalGetMutableEnvironmentVariables().getMutableMap().remove(key); + return this; + } + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableEnvironmentVariables() { + bitField0_ |= 0x00000001; + return internalGetMutableEnvironmentVariables().getMutableMap(); + } + /** + * + * + *
+       * Environment variables.
+       * 
+ * + * map<string, string> environment_variables = 1; + */ + public Builder putEnvironmentVariables(java.lang.String key, java.lang.String value) { + if (key == null) { + throw new NullPointerException("map key"); + } + if (value == null) { + throw new NullPointerException("map value"); + } + internalGetMutableEnvironmentVariables().getMutableMap().put(key, value); + bitField0_ |= 0x00000001; + return this; + } + /** + * + * + *
+       * Environment variables.
+       * 
+ * + * map<string, string> environment_variables = 1; + */ + public Builder putAllEnvironmentVariables( + java.util.Map values) { + internalGetMutableEnvironmentVariables().getMutableMap().putAll(values); + bitField0_ |= 0x00000001; + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.AnalyzerDefinition.DebugOptions) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.AnalyzerDefinition.DebugOptions) + private static final com.google.cloud.visionai.v1.AnalyzerDefinition.DebugOptions + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.AnalyzerDefinition.DebugOptions(); + } + + public static com.google.cloud.visionai.v1.AnalyzerDefinition.DebugOptions + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DebugOptions parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.AnalyzerDefinition.DebugOptions + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface OperatorOptionOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.AnalyzerDefinition.OperatorOption) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Tag of the operator.
+     * 
+ * + * string tag = 1; + * + * @return The tag. + */ + java.lang.String getTag(); + /** + * + * + *
+     * Tag of the operator.
+     * 
+ * + * string tag = 1; + * + * @return The bytes for tag. + */ + com.google.protobuf.ByteString getTagBytes(); + + /** + * + * + *
+     * Registry of the operator. e.g. public, dev.
+     * 
+ * + * string registry = 2; + * + * @return The registry. + */ + java.lang.String getRegistry(); + /** + * + * + *
+     * Registry of the operator. e.g. public, dev.
+     * 
+ * + * string registry = 2; + * + * @return The bytes for registry. + */ + com.google.protobuf.ByteString getRegistryBytes(); + } + /** + * + * + *
+   * Option related to the operator.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.AnalyzerDefinition.OperatorOption} + */ + public static final class OperatorOption extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.AnalyzerDefinition.OperatorOption) + OperatorOptionOrBuilder { + private static final long serialVersionUID = 0L; + // Use OperatorOption.newBuilder() to construct. + private OperatorOption(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private OperatorOption() { + tag_ = ""; + registry_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new OperatorOption(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.LvaProto + .internal_static_google_cloud_visionai_v1_AnalyzerDefinition_OperatorOption_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.LvaProto + .internal_static_google_cloud_visionai_v1_AnalyzerDefinition_OperatorOption_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.AnalyzerDefinition.OperatorOption.class, + com.google.cloud.visionai.v1.AnalyzerDefinition.OperatorOption.Builder.class); + } + + public static final int TAG_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object tag_ = ""; + /** + * + * + *
+     * Tag of the operator.
+     * 
+ * + * string tag = 1; + * + * @return The tag. + */ + @java.lang.Override + public java.lang.String getTag() { + java.lang.Object ref = tag_; + 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(); + tag_ = s; + return s; + } + } + /** + * + * + *
+     * Tag of the operator.
+     * 
+ * + * string tag = 1; + * + * @return The bytes for tag. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTagBytes() { + java.lang.Object ref = tag_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + tag_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int REGISTRY_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object registry_ = ""; + /** + * + * + *
+     * Registry of the operator. e.g. public, dev.
+     * 
+ * + * string registry = 2; + * + * @return The registry. + */ + @java.lang.Override + public java.lang.String getRegistry() { + java.lang.Object ref = registry_; + 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(); + registry_ = s; + return s; + } + } + /** + * + * + *
+     * Registry of the operator. e.g. public, dev.
+     * 
+ * + * string registry = 2; + * + * @return The bytes for registry. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRegistryBytes() { + java.lang.Object ref = registry_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + registry_ = 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(tag_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, tag_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(registry_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, registry_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(tag_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, tag_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(registry_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, registry_); + } + size += getUnknownFields().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.visionai.v1.AnalyzerDefinition.OperatorOption)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.AnalyzerDefinition.OperatorOption other = + (com.google.cloud.visionai.v1.AnalyzerDefinition.OperatorOption) obj; + + if (!getTag().equals(other.getTag())) return false; + if (!getRegistry().equals(other.getRegistry())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + TAG_FIELD_NUMBER; + hash = (53 * hash) + getTag().hashCode(); + hash = (37 * hash) + REGISTRY_FIELD_NUMBER; + hash = (53 * hash) + getRegistry().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.AnalyzerDefinition.OperatorOption parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.AnalyzerDefinition.OperatorOption 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.visionai.v1.AnalyzerDefinition.OperatorOption parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.AnalyzerDefinition.OperatorOption 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.visionai.v1.AnalyzerDefinition.OperatorOption parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.AnalyzerDefinition.OperatorOption parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.AnalyzerDefinition.OperatorOption parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.AnalyzerDefinition.OperatorOption 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.visionai.v1.AnalyzerDefinition.OperatorOption parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.AnalyzerDefinition.OperatorOption 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.visionai.v1.AnalyzerDefinition.OperatorOption parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.AnalyzerDefinition.OperatorOption 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.visionai.v1.AnalyzerDefinition.OperatorOption 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; + } + /** + * + * + *
+     * Option related to the operator.
+     * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.AnalyzerDefinition.OperatorOption} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.AnalyzerDefinition.OperatorOption) + com.google.cloud.visionai.v1.AnalyzerDefinition.OperatorOptionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.LvaProto + .internal_static_google_cloud_visionai_v1_AnalyzerDefinition_OperatorOption_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.LvaProto + .internal_static_google_cloud_visionai_v1_AnalyzerDefinition_OperatorOption_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.AnalyzerDefinition.OperatorOption.class, + com.google.cloud.visionai.v1.AnalyzerDefinition.OperatorOption.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.AnalyzerDefinition.OperatorOption.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + tag_ = ""; + registry_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.LvaProto + .internal_static_google_cloud_visionai_v1_AnalyzerDefinition_OperatorOption_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.AnalyzerDefinition.OperatorOption + getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.AnalyzerDefinition.OperatorOption.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.AnalyzerDefinition.OperatorOption build() { + com.google.cloud.visionai.v1.AnalyzerDefinition.OperatorOption result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.AnalyzerDefinition.OperatorOption buildPartial() { + com.google.cloud.visionai.v1.AnalyzerDefinition.OperatorOption result = + new com.google.cloud.visionai.v1.AnalyzerDefinition.OperatorOption(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.visionai.v1.AnalyzerDefinition.OperatorOption result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.tag_ = tag_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.registry_ = registry_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.AnalyzerDefinition.OperatorOption) { + return mergeFrom((com.google.cloud.visionai.v1.AnalyzerDefinition.OperatorOption) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.visionai.v1.AnalyzerDefinition.OperatorOption other) { + if (other + == com.google.cloud.visionai.v1.AnalyzerDefinition.OperatorOption.getDefaultInstance()) + return this; + if (!other.getTag().isEmpty()) { + tag_ = other.tag_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getRegistry().isEmpty()) { + registry_ = other.registry_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + tag_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + registry_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object tag_ = ""; + /** + * + * + *
+       * Tag of the operator.
+       * 
+ * + * string tag = 1; + * + * @return The tag. + */ + public java.lang.String getTag() { + java.lang.Object ref = tag_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + tag_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * Tag of the operator.
+       * 
+ * + * string tag = 1; + * + * @return The bytes for tag. + */ + public com.google.protobuf.ByteString getTagBytes() { + java.lang.Object ref = tag_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + tag_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * Tag of the operator.
+       * 
+ * + * string tag = 1; + * + * @param value The tag to set. + * @return This builder for chaining. + */ + public Builder setTag(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + tag_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * Tag of the operator.
+       * 
+ * + * string tag = 1; + * + * @return This builder for chaining. + */ + public Builder clearTag() { + tag_ = getDefaultInstance().getTag(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+       * Tag of the operator.
+       * 
+ * + * string tag = 1; + * + * @param value The bytes for tag to set. + * @return This builder for chaining. + */ + public Builder setTagBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + tag_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object registry_ = ""; + /** + * + * + *
+       * Registry of the operator. e.g. public, dev.
+       * 
+ * + * string registry = 2; + * + * @return The registry. + */ + public java.lang.String getRegistry() { + java.lang.Object ref = registry_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + registry_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * Registry of the operator. e.g. public, dev.
+       * 
+ * + * string registry = 2; + * + * @return The bytes for registry. + */ + public com.google.protobuf.ByteString getRegistryBytes() { + java.lang.Object ref = registry_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + registry_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * Registry of the operator. e.g. public, dev.
+       * 
+ * + * string registry = 2; + * + * @param value The registry to set. + * @return This builder for chaining. + */ + public Builder setRegistry(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + registry_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * Registry of the operator. e.g. public, dev.
+       * 
+ * + * string registry = 2; + * + * @return This builder for chaining. + */ + public Builder clearRegistry() { + registry_ = getDefaultInstance().getRegistry(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+       * Registry of the operator. e.g. public, dev.
+       * 
+ * + * string registry = 2; + * + * @param value The bytes for registry to set. + * @return This builder for chaining. + */ + public Builder setRegistryBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + registry_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.AnalyzerDefinition.OperatorOption) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.AnalyzerDefinition.OperatorOption) + private static final com.google.cloud.visionai.v1.AnalyzerDefinition.OperatorOption + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.AnalyzerDefinition.OperatorOption(); + } + + public static com.google.cloud.visionai.v1.AnalyzerDefinition.OperatorOption + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public OperatorOption parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.AnalyzerDefinition.OperatorOption + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int bitField0_; + public static final int ANALYZER_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object analyzer_ = ""; + /** + * + * + *
+   * The name of this analyzer.
+   *
+   * Tentatively [a-z][a-z0-9]*(_[a-z0-9]+)*.
+   * 
+ * + * string analyzer = 1; + * + * @return The analyzer. + */ + @java.lang.Override + public java.lang.String getAnalyzer() { + java.lang.Object ref = analyzer_; + 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(); + analyzer_ = s; + return s; + } + } + /** + * + * + *
+   * The name of this analyzer.
+   *
+   * Tentatively [a-z][a-z0-9]*(_[a-z0-9]+)*.
+   * 
+ * + * string analyzer = 1; + * + * @return The bytes for analyzer. + */ + @java.lang.Override + public com.google.protobuf.ByteString getAnalyzerBytes() { + java.lang.Object ref = analyzer_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + analyzer_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int OPERATOR_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object operator_ = ""; + /** + * + * + *
+   * The name of the operator that this analyzer runs.
+   *
+   * Must match the name of a supported operator.
+   * 
+ * + * string operator = 2; + * + * @return The operator. + */ + @java.lang.Override + public java.lang.String getOperator() { + java.lang.Object ref = operator_; + 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(); + operator_ = s; + return s; + } + } + /** + * + * + *
+   * The name of the operator that this analyzer runs.
+   *
+   * Must match the name of a supported operator.
+   * 
+ * + * string operator = 2; + * + * @return The bytes for operator. + */ + @java.lang.Override + public com.google.protobuf.ByteString getOperatorBytes() { + java.lang.Object ref = operator_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + operator_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int INPUTS_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private java.util.List inputs_; + /** + * + * + *
+   * Input streams.
+   * 
+ * + * repeated .google.cloud.visionai.v1.AnalyzerDefinition.StreamInput inputs = 3; + */ + @java.lang.Override + public java.util.List + getInputsList() { + return inputs_; + } + /** + * + * + *
+   * Input streams.
+   * 
+ * + * repeated .google.cloud.visionai.v1.AnalyzerDefinition.StreamInput inputs = 3; + */ + @java.lang.Override + public java.util.List< + ? extends com.google.cloud.visionai.v1.AnalyzerDefinition.StreamInputOrBuilder> + getInputsOrBuilderList() { + return inputs_; + } + /** + * + * + *
+   * Input streams.
+   * 
+ * + * repeated .google.cloud.visionai.v1.AnalyzerDefinition.StreamInput inputs = 3; + */ + @java.lang.Override + public int getInputsCount() { + return inputs_.size(); + } + /** + * + * + *
+   * Input streams.
+   * 
+ * + * repeated .google.cloud.visionai.v1.AnalyzerDefinition.StreamInput inputs = 3; + */ + @java.lang.Override + public com.google.cloud.visionai.v1.AnalyzerDefinition.StreamInput getInputs(int index) { + return inputs_.get(index); + } + /** + * + * + *
+   * Input streams.
+   * 
+ * + * repeated .google.cloud.visionai.v1.AnalyzerDefinition.StreamInput inputs = 3; + */ + @java.lang.Override + public com.google.cloud.visionai.v1.AnalyzerDefinition.StreamInputOrBuilder getInputsOrBuilder( + int index) { + return inputs_.get(index); + } + + public static final int ATTRS_FIELD_NUMBER = 4; + + private static final class AttrsDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.String, com.google.cloud.visionai.v1.AttributeValue> + defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + com.google.cloud.visionai.v1.LvaProto + .internal_static_google_cloud_visionai_v1_AnalyzerDefinition_AttrsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.MESSAGE, + com.google.cloud.visionai.v1.AttributeValue.getDefaultInstance()); + } + + @SuppressWarnings("serial") + private com.google.protobuf.MapField< + java.lang.String, com.google.cloud.visionai.v1.AttributeValue> + attrs_; + + private com.google.protobuf.MapField< + java.lang.String, com.google.cloud.visionai.v1.AttributeValue> + internalGetAttrs() { + if (attrs_ == null) { + return com.google.protobuf.MapField.emptyMapField(AttrsDefaultEntryHolder.defaultEntry); + } + return attrs_; + } + + public int getAttrsCount() { + return internalGetAttrs().getMap().size(); + } + /** + * + * + *
+   * The attribute values that this analyzer applies to the operator.
+   *
+   * Supply a mapping between the attribute names and the actual value you wish
+   * to apply. If an attribute name is omitted, then it will take a
+   * preconfigured default value.
+   * 
+ * + * map<string, .google.cloud.visionai.v1.AttributeValue> attrs = 4; + */ + @java.lang.Override + public boolean containsAttrs(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetAttrs().getMap().containsKey(key); + } + /** Use {@link #getAttrsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getAttrs() { + return getAttrsMap(); + } + /** + * + * + *
+   * The attribute values that this analyzer applies to the operator.
+   *
+   * Supply a mapping between the attribute names and the actual value you wish
+   * to apply. If an attribute name is omitted, then it will take a
+   * preconfigured default value.
+   * 
+ * + * map<string, .google.cloud.visionai.v1.AttributeValue> attrs = 4; + */ + @java.lang.Override + public java.util.Map + getAttrsMap() { + return internalGetAttrs().getMap(); + } + /** + * + * + *
+   * The attribute values that this analyzer applies to the operator.
+   *
+   * Supply a mapping between the attribute names and the actual value you wish
+   * to apply. If an attribute name is omitted, then it will take a
+   * preconfigured default value.
+   * 
+ * + * map<string, .google.cloud.visionai.v1.AttributeValue> attrs = 4; + */ + @java.lang.Override + public /* nullable */ com.google.cloud.visionai.v1.AttributeValue getAttrsOrDefault( + java.lang.String key, + /* nullable */ + com.google.cloud.visionai.v1.AttributeValue defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = + internalGetAttrs().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+   * The attribute values that this analyzer applies to the operator.
+   *
+   * Supply a mapping between the attribute names and the actual value you wish
+   * to apply. If an attribute name is omitted, then it will take a
+   * preconfigured default value.
+   * 
+ * + * map<string, .google.cloud.visionai.v1.AttributeValue> attrs = 4; + */ + @java.lang.Override + public com.google.cloud.visionai.v1.AttributeValue getAttrsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = + internalGetAttrs().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int DEBUG_OPTIONS_FIELD_NUMBER = 5; + private com.google.cloud.visionai.v1.AnalyzerDefinition.DebugOptions debugOptions_; + /** + * + * + *
+   * Debug options.
+   * 
+ * + * .google.cloud.visionai.v1.AnalyzerDefinition.DebugOptions debug_options = 5; + * + * @return Whether the debugOptions field is set. + */ + @java.lang.Override + public boolean hasDebugOptions() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * Debug options.
+   * 
+ * + * .google.cloud.visionai.v1.AnalyzerDefinition.DebugOptions debug_options = 5; + * + * @return The debugOptions. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.AnalyzerDefinition.DebugOptions getDebugOptions() { + return debugOptions_ == null + ? com.google.cloud.visionai.v1.AnalyzerDefinition.DebugOptions.getDefaultInstance() + : debugOptions_; + } + /** + * + * + *
+   * Debug options.
+   * 
+ * + * .google.cloud.visionai.v1.AnalyzerDefinition.DebugOptions debug_options = 5; + */ + @java.lang.Override + public com.google.cloud.visionai.v1.AnalyzerDefinition.DebugOptionsOrBuilder + getDebugOptionsOrBuilder() { + return debugOptions_ == null + ? com.google.cloud.visionai.v1.AnalyzerDefinition.DebugOptions.getDefaultInstance() + : debugOptions_; + } + + public static final int OPERATOR_OPTION_FIELD_NUMBER = 6; + private com.google.cloud.visionai.v1.AnalyzerDefinition.OperatorOption operatorOption_; + /** + * + * + *
+   * Operator option.
+   * 
+ * + * .google.cloud.visionai.v1.AnalyzerDefinition.OperatorOption operator_option = 6; + * + * @return Whether the operatorOption field is set. + */ + @java.lang.Override + public boolean hasOperatorOption() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+   * Operator option.
+   * 
+ * + * .google.cloud.visionai.v1.AnalyzerDefinition.OperatorOption operator_option = 6; + * + * @return The operatorOption. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.AnalyzerDefinition.OperatorOption getOperatorOption() { + return operatorOption_ == null + ? com.google.cloud.visionai.v1.AnalyzerDefinition.OperatorOption.getDefaultInstance() + : operatorOption_; + } + /** + * + * + *
+   * Operator option.
+   * 
+ * + * .google.cloud.visionai.v1.AnalyzerDefinition.OperatorOption operator_option = 6; + */ + @java.lang.Override + public com.google.cloud.visionai.v1.AnalyzerDefinition.OperatorOptionOrBuilder + getOperatorOptionOrBuilder() { + return operatorOption_ == null + ? com.google.cloud.visionai.v1.AnalyzerDefinition.OperatorOption.getDefaultInstance() + : operatorOption_; + } + + 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(analyzer_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, analyzer_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(operator_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, operator_); + } + for (int i = 0; i < inputs_.size(); i++) { + output.writeMessage(3, inputs_.get(i)); + } + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, internalGetAttrs(), AttrsDefaultEntryHolder.defaultEntry, 4); + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(5, getDebugOptions()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(6, getOperatorOption()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(analyzer_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, analyzer_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(operator_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, operator_); + } + for (int i = 0; i < inputs_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, inputs_.get(i)); + } + for (java.util.Map.Entry entry : + internalGetAttrs().getMap().entrySet()) { + com.google.protobuf.MapEntry + attrs__ = + AttrsDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, attrs__); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getDebugOptions()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getOperatorOption()); + } + size += getUnknownFields().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.visionai.v1.AnalyzerDefinition)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.AnalyzerDefinition other = + (com.google.cloud.visionai.v1.AnalyzerDefinition) obj; + + if (!getAnalyzer().equals(other.getAnalyzer())) return false; + if (!getOperator().equals(other.getOperator())) return false; + if (!getInputsList().equals(other.getInputsList())) return false; + if (!internalGetAttrs().equals(other.internalGetAttrs())) return false; + if (hasDebugOptions() != other.hasDebugOptions()) return false; + if (hasDebugOptions()) { + if (!getDebugOptions().equals(other.getDebugOptions())) return false; + } + if (hasOperatorOption() != other.hasOperatorOption()) return false; + if (hasOperatorOption()) { + if (!getOperatorOption().equals(other.getOperatorOption())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ANALYZER_FIELD_NUMBER; + hash = (53 * hash) + getAnalyzer().hashCode(); + hash = (37 * hash) + OPERATOR_FIELD_NUMBER; + hash = (53 * hash) + getOperator().hashCode(); + if (getInputsCount() > 0) { + hash = (37 * hash) + INPUTS_FIELD_NUMBER; + hash = (53 * hash) + getInputsList().hashCode(); + } + if (!internalGetAttrs().getMap().isEmpty()) { + hash = (37 * hash) + ATTRS_FIELD_NUMBER; + hash = (53 * hash) + internalGetAttrs().hashCode(); + } + if (hasDebugOptions()) { + hash = (37 * hash) + DEBUG_OPTIONS_FIELD_NUMBER; + hash = (53 * hash) + getDebugOptions().hashCode(); + } + if (hasOperatorOption()) { + hash = (37 * hash) + OPERATOR_OPTION_FIELD_NUMBER; + hash = (53 * hash) + getOperatorOption().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.AnalyzerDefinition parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.AnalyzerDefinition 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.visionai.v1.AnalyzerDefinition parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.AnalyzerDefinition 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.visionai.v1.AnalyzerDefinition parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.AnalyzerDefinition parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.AnalyzerDefinition parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.AnalyzerDefinition 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.visionai.v1.AnalyzerDefinition parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.AnalyzerDefinition 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.visionai.v1.AnalyzerDefinition parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.AnalyzerDefinition 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.visionai.v1.AnalyzerDefinition 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; + } + /** + * + * + *
+   * Defines an Analyzer.
+   *
+   * An analyzer processes data from its input streams using the logic defined in
+   * the Operator that it represents. Of course, it produces data for the output
+   * streams declared in the Operator.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.AnalyzerDefinition} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.AnalyzerDefinition) + com.google.cloud.visionai.v1.AnalyzerDefinitionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.LvaProto + .internal_static_google_cloud_visionai_v1_AnalyzerDefinition_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 4: + return internalGetAttrs(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( + int number) { + switch (number) { + case 4: + return internalGetMutableAttrs(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.LvaProto + .internal_static_google_cloud_visionai_v1_AnalyzerDefinition_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.AnalyzerDefinition.class, + com.google.cloud.visionai.v1.AnalyzerDefinition.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.AnalyzerDefinition.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getInputsFieldBuilder(); + getDebugOptionsFieldBuilder(); + getOperatorOptionFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + analyzer_ = ""; + operator_ = ""; + if (inputsBuilder_ == null) { + inputs_ = java.util.Collections.emptyList(); + } else { + inputs_ = null; + inputsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000004); + internalGetMutableAttrs().clear(); + debugOptions_ = null; + if (debugOptionsBuilder_ != null) { + debugOptionsBuilder_.dispose(); + debugOptionsBuilder_ = null; + } + operatorOption_ = null; + if (operatorOptionBuilder_ != null) { + operatorOptionBuilder_.dispose(); + operatorOptionBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.LvaProto + .internal_static_google_cloud_visionai_v1_AnalyzerDefinition_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.AnalyzerDefinition getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.AnalyzerDefinition.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.AnalyzerDefinition build() { + com.google.cloud.visionai.v1.AnalyzerDefinition result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.AnalyzerDefinition buildPartial() { + com.google.cloud.visionai.v1.AnalyzerDefinition result = + new com.google.cloud.visionai.v1.AnalyzerDefinition(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.visionai.v1.AnalyzerDefinition result) { + if (inputsBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0)) { + inputs_ = java.util.Collections.unmodifiableList(inputs_); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.inputs_ = inputs_; + } else { + result.inputs_ = inputsBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.visionai.v1.AnalyzerDefinition result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.analyzer_ = analyzer_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.operator_ = operator_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.attrs_ = internalGetAttrs().build(AttrsDefaultEntryHolder.defaultEntry); + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000010) != 0)) { + result.debugOptions_ = + debugOptionsBuilder_ == null ? debugOptions_ : debugOptionsBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.operatorOption_ = + operatorOptionBuilder_ == null ? operatorOption_ : operatorOptionBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.AnalyzerDefinition) { + return mergeFrom((com.google.cloud.visionai.v1.AnalyzerDefinition) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.AnalyzerDefinition other) { + if (other == com.google.cloud.visionai.v1.AnalyzerDefinition.getDefaultInstance()) + return this; + if (!other.getAnalyzer().isEmpty()) { + analyzer_ = other.analyzer_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getOperator().isEmpty()) { + operator_ = other.operator_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (inputsBuilder_ == null) { + if (!other.inputs_.isEmpty()) { + if (inputs_.isEmpty()) { + inputs_ = other.inputs_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureInputsIsMutable(); + inputs_.addAll(other.inputs_); + } + onChanged(); + } + } else { + if (!other.inputs_.isEmpty()) { + if (inputsBuilder_.isEmpty()) { + inputsBuilder_.dispose(); + inputsBuilder_ = null; + inputs_ = other.inputs_; + bitField0_ = (bitField0_ & ~0x00000004); + inputsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getInputsFieldBuilder() + : null; + } else { + inputsBuilder_.addAllMessages(other.inputs_); + } + } + } + internalGetMutableAttrs().mergeFrom(other.internalGetAttrs()); + bitField0_ |= 0x00000008; + if (other.hasDebugOptions()) { + mergeDebugOptions(other.getDebugOptions()); + } + if (other.hasOperatorOption()) { + mergeOperatorOption(other.getOperatorOption()); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + analyzer_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + operator_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + com.google.cloud.visionai.v1.AnalyzerDefinition.StreamInput m = + input.readMessage( + com.google.cloud.visionai.v1.AnalyzerDefinition.StreamInput.parser(), + extensionRegistry); + if (inputsBuilder_ == null) { + ensureInputsIsMutable(); + inputs_.add(m); + } else { + inputsBuilder_.addMessage(m); + } + break; + } // case 26 + case 34: + { + com.google.protobuf.MapEntry< + java.lang.String, com.google.cloud.visionai.v1.AttributeValue> + attrs__ = + input.readMessage( + AttrsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableAttrs() + .ensureBuilderMap() + .put(attrs__.getKey(), attrs__.getValue()); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + input.readMessage(getDebugOptionsFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 50: + { + input.readMessage(getOperatorOptionFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000020; + break; + } // case 50 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object analyzer_ = ""; + /** + * + * + *
+     * The name of this analyzer.
+     *
+     * Tentatively [a-z][a-z0-9]*(_[a-z0-9]+)*.
+     * 
+ * + * string analyzer = 1; + * + * @return The analyzer. + */ + public java.lang.String getAnalyzer() { + java.lang.Object ref = analyzer_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + analyzer_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The name of this analyzer.
+     *
+     * Tentatively [a-z][a-z0-9]*(_[a-z0-9]+)*.
+     * 
+ * + * string analyzer = 1; + * + * @return The bytes for analyzer. + */ + public com.google.protobuf.ByteString getAnalyzerBytes() { + java.lang.Object ref = analyzer_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + analyzer_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The name of this analyzer.
+     *
+     * Tentatively [a-z][a-z0-9]*(_[a-z0-9]+)*.
+     * 
+ * + * string analyzer = 1; + * + * @param value The analyzer to set. + * @return This builder for chaining. + */ + public Builder setAnalyzer(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + analyzer_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The name of this analyzer.
+     *
+     * Tentatively [a-z][a-z0-9]*(_[a-z0-9]+)*.
+     * 
+ * + * string analyzer = 1; + * + * @return This builder for chaining. + */ + public Builder clearAnalyzer() { + analyzer_ = getDefaultInstance().getAnalyzer(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * The name of this analyzer.
+     *
+     * Tentatively [a-z][a-z0-9]*(_[a-z0-9]+)*.
+     * 
+ * + * string analyzer = 1; + * + * @param value The bytes for analyzer to set. + * @return This builder for chaining. + */ + public Builder setAnalyzerBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + analyzer_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object operator_ = ""; + /** + * + * + *
+     * The name of the operator that this analyzer runs.
+     *
+     * Must match the name of a supported operator.
+     * 
+ * + * string operator = 2; + * + * @return The operator. + */ + public java.lang.String getOperator() { + java.lang.Object ref = operator_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + operator_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The name of the operator that this analyzer runs.
+     *
+     * Must match the name of a supported operator.
+     * 
+ * + * string operator = 2; + * + * @return The bytes for operator. + */ + public com.google.protobuf.ByteString getOperatorBytes() { + java.lang.Object ref = operator_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + operator_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The name of the operator that this analyzer runs.
+     *
+     * Must match the name of a supported operator.
+     * 
+ * + * string operator = 2; + * + * @param value The operator to set. + * @return This builder for chaining. + */ + public Builder setOperator(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + operator_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * The name of the operator that this analyzer runs.
+     *
+     * Must match the name of a supported operator.
+     * 
+ * + * string operator = 2; + * + * @return This builder for chaining. + */ + public Builder clearOperator() { + operator_ = getDefaultInstance().getOperator(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * The name of the operator that this analyzer runs.
+     *
+     * Must match the name of a supported operator.
+     * 
+ * + * string operator = 2; + * + * @param value The bytes for operator to set. + * @return This builder for chaining. + */ + public Builder setOperatorBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + operator_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.util.List inputs_ = + java.util.Collections.emptyList(); + + private void ensureInputsIsMutable() { + if (!((bitField0_ & 0x00000004) != 0)) { + inputs_ = + new java.util.ArrayList( + inputs_); + bitField0_ |= 0x00000004; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.visionai.v1.AnalyzerDefinition.StreamInput, + com.google.cloud.visionai.v1.AnalyzerDefinition.StreamInput.Builder, + com.google.cloud.visionai.v1.AnalyzerDefinition.StreamInputOrBuilder> + inputsBuilder_; + + /** + * + * + *
+     * Input streams.
+     * 
+ * + * repeated .google.cloud.visionai.v1.AnalyzerDefinition.StreamInput inputs = 3; + */ + public java.util.List + getInputsList() { + if (inputsBuilder_ == null) { + return java.util.Collections.unmodifiableList(inputs_); + } else { + return inputsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Input streams.
+     * 
+ * + * repeated .google.cloud.visionai.v1.AnalyzerDefinition.StreamInput inputs = 3; + */ + public int getInputsCount() { + if (inputsBuilder_ == null) { + return inputs_.size(); + } else { + return inputsBuilder_.getCount(); + } + } + /** + * + * + *
+     * Input streams.
+     * 
+ * + * repeated .google.cloud.visionai.v1.AnalyzerDefinition.StreamInput inputs = 3; + */ + public com.google.cloud.visionai.v1.AnalyzerDefinition.StreamInput getInputs(int index) { + if (inputsBuilder_ == null) { + return inputs_.get(index); + } else { + return inputsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Input streams.
+     * 
+ * + * repeated .google.cloud.visionai.v1.AnalyzerDefinition.StreamInput inputs = 3; + */ + public Builder setInputs( + int index, com.google.cloud.visionai.v1.AnalyzerDefinition.StreamInput value) { + if (inputsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureInputsIsMutable(); + inputs_.set(index, value); + onChanged(); + } else { + inputsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Input streams.
+     * 
+ * + * repeated .google.cloud.visionai.v1.AnalyzerDefinition.StreamInput inputs = 3; + */ + public Builder setInputs( + int index, + com.google.cloud.visionai.v1.AnalyzerDefinition.StreamInput.Builder builderForValue) { + if (inputsBuilder_ == null) { + ensureInputsIsMutable(); + inputs_.set(index, builderForValue.build()); + onChanged(); + } else { + inputsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Input streams.
+     * 
+ * + * repeated .google.cloud.visionai.v1.AnalyzerDefinition.StreamInput inputs = 3; + */ + public Builder addInputs(com.google.cloud.visionai.v1.AnalyzerDefinition.StreamInput value) { + if (inputsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureInputsIsMutable(); + inputs_.add(value); + onChanged(); + } else { + inputsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Input streams.
+     * 
+ * + * repeated .google.cloud.visionai.v1.AnalyzerDefinition.StreamInput inputs = 3; + */ + public Builder addInputs( + int index, com.google.cloud.visionai.v1.AnalyzerDefinition.StreamInput value) { + if (inputsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureInputsIsMutable(); + inputs_.add(index, value); + onChanged(); + } else { + inputsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Input streams.
+     * 
+ * + * repeated .google.cloud.visionai.v1.AnalyzerDefinition.StreamInput inputs = 3; + */ + public Builder addInputs( + com.google.cloud.visionai.v1.AnalyzerDefinition.StreamInput.Builder builderForValue) { + if (inputsBuilder_ == null) { + ensureInputsIsMutable(); + inputs_.add(builderForValue.build()); + onChanged(); + } else { + inputsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Input streams.
+     * 
+ * + * repeated .google.cloud.visionai.v1.AnalyzerDefinition.StreamInput inputs = 3; + */ + public Builder addInputs( + int index, + com.google.cloud.visionai.v1.AnalyzerDefinition.StreamInput.Builder builderForValue) { + if (inputsBuilder_ == null) { + ensureInputsIsMutable(); + inputs_.add(index, builderForValue.build()); + onChanged(); + } else { + inputsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Input streams.
+     * 
+ * + * repeated .google.cloud.visionai.v1.AnalyzerDefinition.StreamInput inputs = 3; + */ + public Builder addAllInputs( + java.lang.Iterable + values) { + if (inputsBuilder_ == null) { + ensureInputsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, inputs_); + onChanged(); + } else { + inputsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Input streams.
+     * 
+ * + * repeated .google.cloud.visionai.v1.AnalyzerDefinition.StreamInput inputs = 3; + */ + public Builder clearInputs() { + if (inputsBuilder_ == null) { + inputs_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + } else { + inputsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Input streams.
+     * 
+ * + * repeated .google.cloud.visionai.v1.AnalyzerDefinition.StreamInput inputs = 3; + */ + public Builder removeInputs(int index) { + if (inputsBuilder_ == null) { + ensureInputsIsMutable(); + inputs_.remove(index); + onChanged(); + } else { + inputsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Input streams.
+     * 
+ * + * repeated .google.cloud.visionai.v1.AnalyzerDefinition.StreamInput inputs = 3; + */ + public com.google.cloud.visionai.v1.AnalyzerDefinition.StreamInput.Builder getInputsBuilder( + int index) { + return getInputsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Input streams.
+     * 
+ * + * repeated .google.cloud.visionai.v1.AnalyzerDefinition.StreamInput inputs = 3; + */ + public com.google.cloud.visionai.v1.AnalyzerDefinition.StreamInputOrBuilder getInputsOrBuilder( + int index) { + if (inputsBuilder_ == null) { + return inputs_.get(index); + } else { + return inputsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Input streams.
+     * 
+ * + * repeated .google.cloud.visionai.v1.AnalyzerDefinition.StreamInput inputs = 3; + */ + public java.util.List< + ? extends com.google.cloud.visionai.v1.AnalyzerDefinition.StreamInputOrBuilder> + getInputsOrBuilderList() { + if (inputsBuilder_ != null) { + return inputsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(inputs_); + } + } + /** + * + * + *
+     * Input streams.
+     * 
+ * + * repeated .google.cloud.visionai.v1.AnalyzerDefinition.StreamInput inputs = 3; + */ + public com.google.cloud.visionai.v1.AnalyzerDefinition.StreamInput.Builder addInputsBuilder() { + return getInputsFieldBuilder() + .addBuilder( + com.google.cloud.visionai.v1.AnalyzerDefinition.StreamInput.getDefaultInstance()); + } + /** + * + * + *
+     * Input streams.
+     * 
+ * + * repeated .google.cloud.visionai.v1.AnalyzerDefinition.StreamInput inputs = 3; + */ + public com.google.cloud.visionai.v1.AnalyzerDefinition.StreamInput.Builder addInputsBuilder( + int index) { + return getInputsFieldBuilder() + .addBuilder( + index, + com.google.cloud.visionai.v1.AnalyzerDefinition.StreamInput.getDefaultInstance()); + } + /** + * + * + *
+     * Input streams.
+     * 
+ * + * repeated .google.cloud.visionai.v1.AnalyzerDefinition.StreamInput inputs = 3; + */ + public java.util.List + getInputsBuilderList() { + return getInputsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.visionai.v1.AnalyzerDefinition.StreamInput, + com.google.cloud.visionai.v1.AnalyzerDefinition.StreamInput.Builder, + com.google.cloud.visionai.v1.AnalyzerDefinition.StreamInputOrBuilder> + getInputsFieldBuilder() { + if (inputsBuilder_ == null) { + inputsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.visionai.v1.AnalyzerDefinition.StreamInput, + com.google.cloud.visionai.v1.AnalyzerDefinition.StreamInput.Builder, + com.google.cloud.visionai.v1.AnalyzerDefinition.StreamInputOrBuilder>( + inputs_, ((bitField0_ & 0x00000004) != 0), getParentForChildren(), isClean()); + inputs_ = null; + } + return inputsBuilder_; + } + + private static final class AttrsConverter + implements com.google.protobuf.MapFieldBuilder.Converter< + java.lang.String, + com.google.cloud.visionai.v1.AttributeValueOrBuilder, + com.google.cloud.visionai.v1.AttributeValue> { + @java.lang.Override + public com.google.cloud.visionai.v1.AttributeValue build( + com.google.cloud.visionai.v1.AttributeValueOrBuilder val) { + if (val instanceof com.google.cloud.visionai.v1.AttributeValue) { + return (com.google.cloud.visionai.v1.AttributeValue) val; + } + return ((com.google.cloud.visionai.v1.AttributeValue.Builder) val).build(); + } + + @java.lang.Override + public com.google.protobuf.MapEntry< + java.lang.String, com.google.cloud.visionai.v1.AttributeValue> + defaultEntry() { + return AttrsDefaultEntryHolder.defaultEntry; + } + }; + + private static final AttrsConverter attrsConverter = new AttrsConverter(); + + private com.google.protobuf.MapFieldBuilder< + java.lang.String, + com.google.cloud.visionai.v1.AttributeValueOrBuilder, + com.google.cloud.visionai.v1.AttributeValue, + com.google.cloud.visionai.v1.AttributeValue.Builder> + attrs_; + + private com.google.protobuf.MapFieldBuilder< + java.lang.String, + com.google.cloud.visionai.v1.AttributeValueOrBuilder, + com.google.cloud.visionai.v1.AttributeValue, + com.google.cloud.visionai.v1.AttributeValue.Builder> + internalGetAttrs() { + if (attrs_ == null) { + return new com.google.protobuf.MapFieldBuilder<>(attrsConverter); + } + return attrs_; + } + + private com.google.protobuf.MapFieldBuilder< + java.lang.String, + com.google.cloud.visionai.v1.AttributeValueOrBuilder, + com.google.cloud.visionai.v1.AttributeValue, + com.google.cloud.visionai.v1.AttributeValue.Builder> + internalGetMutableAttrs() { + if (attrs_ == null) { + attrs_ = new com.google.protobuf.MapFieldBuilder<>(attrsConverter); + } + bitField0_ |= 0x00000008; + onChanged(); + return attrs_; + } + + public int getAttrsCount() { + return internalGetAttrs().ensureBuilderMap().size(); + } + /** + * + * + *
+     * The attribute values that this analyzer applies to the operator.
+     *
+     * Supply a mapping between the attribute names and the actual value you wish
+     * to apply. If an attribute name is omitted, then it will take a
+     * preconfigured default value.
+     * 
+ * + * map<string, .google.cloud.visionai.v1.AttributeValue> attrs = 4; + */ + @java.lang.Override + public boolean containsAttrs(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetAttrs().ensureBuilderMap().containsKey(key); + } + /** Use {@link #getAttrsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getAttrs() { + return getAttrsMap(); + } + /** + * + * + *
+     * The attribute values that this analyzer applies to the operator.
+     *
+     * Supply a mapping between the attribute names and the actual value you wish
+     * to apply. If an attribute name is omitted, then it will take a
+     * preconfigured default value.
+     * 
+ * + * map<string, .google.cloud.visionai.v1.AttributeValue> attrs = 4; + */ + @java.lang.Override + public java.util.Map + getAttrsMap() { + return internalGetAttrs().getImmutableMap(); + } + /** + * + * + *
+     * The attribute values that this analyzer applies to the operator.
+     *
+     * Supply a mapping between the attribute names and the actual value you wish
+     * to apply. If an attribute name is omitted, then it will take a
+     * preconfigured default value.
+     * 
+ * + * map<string, .google.cloud.visionai.v1.AttributeValue> attrs = 4; + */ + @java.lang.Override + public /* nullable */ com.google.cloud.visionai.v1.AttributeValue getAttrsOrDefault( + java.lang.String key, + /* nullable */ + com.google.cloud.visionai.v1.AttributeValue defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = + internalGetMutableAttrs().ensureBuilderMap(); + return map.containsKey(key) ? attrsConverter.build(map.get(key)) : defaultValue; + } + /** + * + * + *
+     * The attribute values that this analyzer applies to the operator.
+     *
+     * Supply a mapping between the attribute names and the actual value you wish
+     * to apply. If an attribute name is omitted, then it will take a
+     * preconfigured default value.
+     * 
+ * + * map<string, .google.cloud.visionai.v1.AttributeValue> attrs = 4; + */ + @java.lang.Override + public com.google.cloud.visionai.v1.AttributeValue getAttrsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = + internalGetMutableAttrs().ensureBuilderMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return attrsConverter.build(map.get(key)); + } + + public Builder clearAttrs() { + bitField0_ = (bitField0_ & ~0x00000008); + internalGetMutableAttrs().clear(); + return this; + } + /** + * + * + *
+     * The attribute values that this analyzer applies to the operator.
+     *
+     * Supply a mapping between the attribute names and the actual value you wish
+     * to apply. If an attribute name is omitted, then it will take a
+     * preconfigured default value.
+     * 
+ * + * map<string, .google.cloud.visionai.v1.AttributeValue> attrs = 4; + */ + public Builder removeAttrs(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + internalGetMutableAttrs().ensureBuilderMap().remove(key); + return this; + } + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map + getMutableAttrs() { + bitField0_ |= 0x00000008; + return internalGetMutableAttrs().ensureMessageMap(); + } + /** + * + * + *
+     * The attribute values that this analyzer applies to the operator.
+     *
+     * Supply a mapping between the attribute names and the actual value you wish
+     * to apply. If an attribute name is omitted, then it will take a
+     * preconfigured default value.
+     * 
+ * + * map<string, .google.cloud.visionai.v1.AttributeValue> attrs = 4; + */ + public Builder putAttrs( + java.lang.String key, com.google.cloud.visionai.v1.AttributeValue value) { + if (key == null) { + throw new NullPointerException("map key"); + } + if (value == null) { + throw new NullPointerException("map value"); + } + internalGetMutableAttrs().ensureBuilderMap().put(key, value); + bitField0_ |= 0x00000008; + return this; + } + /** + * + * + *
+     * The attribute values that this analyzer applies to the operator.
+     *
+     * Supply a mapping between the attribute names and the actual value you wish
+     * to apply. If an attribute name is omitted, then it will take a
+     * preconfigured default value.
+     * 
+ * + * map<string, .google.cloud.visionai.v1.AttributeValue> attrs = 4; + */ + public Builder putAllAttrs( + java.util.Map values) { + for (java.util.Map.Entry e : + values.entrySet()) { + if (e.getKey() == null || e.getValue() == null) { + throw new NullPointerException(); + } + } + internalGetMutableAttrs().ensureBuilderMap().putAll(values); + bitField0_ |= 0x00000008; + return this; + } + /** + * + * + *
+     * The attribute values that this analyzer applies to the operator.
+     *
+     * Supply a mapping between the attribute names and the actual value you wish
+     * to apply. If an attribute name is omitted, then it will take a
+     * preconfigured default value.
+     * 
+ * + * map<string, .google.cloud.visionai.v1.AttributeValue> attrs = 4; + */ + public com.google.cloud.visionai.v1.AttributeValue.Builder putAttrsBuilderIfAbsent( + java.lang.String key) { + java.util.Map + builderMap = internalGetMutableAttrs().ensureBuilderMap(); + com.google.cloud.visionai.v1.AttributeValueOrBuilder entry = builderMap.get(key); + if (entry == null) { + entry = com.google.cloud.visionai.v1.AttributeValue.newBuilder(); + builderMap.put(key, entry); + } + if (entry instanceof com.google.cloud.visionai.v1.AttributeValue) { + entry = ((com.google.cloud.visionai.v1.AttributeValue) entry).toBuilder(); + builderMap.put(key, entry); + } + return (com.google.cloud.visionai.v1.AttributeValue.Builder) entry; + } + + private com.google.cloud.visionai.v1.AnalyzerDefinition.DebugOptions debugOptions_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.AnalyzerDefinition.DebugOptions, + com.google.cloud.visionai.v1.AnalyzerDefinition.DebugOptions.Builder, + com.google.cloud.visionai.v1.AnalyzerDefinition.DebugOptionsOrBuilder> + debugOptionsBuilder_; + /** + * + * + *
+     * Debug options.
+     * 
+ * + * .google.cloud.visionai.v1.AnalyzerDefinition.DebugOptions debug_options = 5; + * + * @return Whether the debugOptions field is set. + */ + public boolean hasDebugOptions() { + return ((bitField0_ & 0x00000010) != 0); + } + /** + * + * + *
+     * Debug options.
+     * 
+ * + * .google.cloud.visionai.v1.AnalyzerDefinition.DebugOptions debug_options = 5; + * + * @return The debugOptions. + */ + public com.google.cloud.visionai.v1.AnalyzerDefinition.DebugOptions getDebugOptions() { + if (debugOptionsBuilder_ == null) { + return debugOptions_ == null + ? com.google.cloud.visionai.v1.AnalyzerDefinition.DebugOptions.getDefaultInstance() + : debugOptions_; + } else { + return debugOptionsBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Debug options.
+     * 
+ * + * .google.cloud.visionai.v1.AnalyzerDefinition.DebugOptions debug_options = 5; + */ + public Builder setDebugOptions( + com.google.cloud.visionai.v1.AnalyzerDefinition.DebugOptions value) { + if (debugOptionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + debugOptions_ = value; + } else { + debugOptionsBuilder_.setMessage(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Debug options.
+     * 
+ * + * .google.cloud.visionai.v1.AnalyzerDefinition.DebugOptions debug_options = 5; + */ + public Builder setDebugOptions( + com.google.cloud.visionai.v1.AnalyzerDefinition.DebugOptions.Builder builderForValue) { + if (debugOptionsBuilder_ == null) { + debugOptions_ = builderForValue.build(); + } else { + debugOptionsBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Debug options.
+     * 
+ * + * .google.cloud.visionai.v1.AnalyzerDefinition.DebugOptions debug_options = 5; + */ + public Builder mergeDebugOptions( + com.google.cloud.visionai.v1.AnalyzerDefinition.DebugOptions value) { + if (debugOptionsBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0) + && debugOptions_ != null + && debugOptions_ + != com.google.cloud.visionai.v1.AnalyzerDefinition.DebugOptions + .getDefaultInstance()) { + getDebugOptionsBuilder().mergeFrom(value); + } else { + debugOptions_ = value; + } + } else { + debugOptionsBuilder_.mergeFrom(value); + } + if (debugOptions_ != null) { + bitField0_ |= 0x00000010; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Debug options.
+     * 
+ * + * .google.cloud.visionai.v1.AnalyzerDefinition.DebugOptions debug_options = 5; + */ + public Builder clearDebugOptions() { + bitField0_ = (bitField0_ & ~0x00000010); + debugOptions_ = null; + if (debugOptionsBuilder_ != null) { + debugOptionsBuilder_.dispose(); + debugOptionsBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Debug options.
+     * 
+ * + * .google.cloud.visionai.v1.AnalyzerDefinition.DebugOptions debug_options = 5; + */ + public com.google.cloud.visionai.v1.AnalyzerDefinition.DebugOptions.Builder + getDebugOptionsBuilder() { + bitField0_ |= 0x00000010; + onChanged(); + return getDebugOptionsFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Debug options.
+     * 
+ * + * .google.cloud.visionai.v1.AnalyzerDefinition.DebugOptions debug_options = 5; + */ + public com.google.cloud.visionai.v1.AnalyzerDefinition.DebugOptionsOrBuilder + getDebugOptionsOrBuilder() { + if (debugOptionsBuilder_ != null) { + return debugOptionsBuilder_.getMessageOrBuilder(); + } else { + return debugOptions_ == null + ? com.google.cloud.visionai.v1.AnalyzerDefinition.DebugOptions.getDefaultInstance() + : debugOptions_; + } + } + /** + * + * + *
+     * Debug options.
+     * 
+ * + * .google.cloud.visionai.v1.AnalyzerDefinition.DebugOptions debug_options = 5; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.AnalyzerDefinition.DebugOptions, + com.google.cloud.visionai.v1.AnalyzerDefinition.DebugOptions.Builder, + com.google.cloud.visionai.v1.AnalyzerDefinition.DebugOptionsOrBuilder> + getDebugOptionsFieldBuilder() { + if (debugOptionsBuilder_ == null) { + debugOptionsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.AnalyzerDefinition.DebugOptions, + com.google.cloud.visionai.v1.AnalyzerDefinition.DebugOptions.Builder, + com.google.cloud.visionai.v1.AnalyzerDefinition.DebugOptionsOrBuilder>( + getDebugOptions(), getParentForChildren(), isClean()); + debugOptions_ = null; + } + return debugOptionsBuilder_; + } + + private com.google.cloud.visionai.v1.AnalyzerDefinition.OperatorOption operatorOption_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.AnalyzerDefinition.OperatorOption, + com.google.cloud.visionai.v1.AnalyzerDefinition.OperatorOption.Builder, + com.google.cloud.visionai.v1.AnalyzerDefinition.OperatorOptionOrBuilder> + operatorOptionBuilder_; + /** + * + * + *
+     * Operator option.
+     * 
+ * + * .google.cloud.visionai.v1.AnalyzerDefinition.OperatorOption operator_option = 6; + * + * @return Whether the operatorOption field is set. + */ + public boolean hasOperatorOption() { + return ((bitField0_ & 0x00000020) != 0); + } + /** + * + * + *
+     * Operator option.
+     * 
+ * + * .google.cloud.visionai.v1.AnalyzerDefinition.OperatorOption operator_option = 6; + * + * @return The operatorOption. + */ + public com.google.cloud.visionai.v1.AnalyzerDefinition.OperatorOption getOperatorOption() { + if (operatorOptionBuilder_ == null) { + return operatorOption_ == null + ? com.google.cloud.visionai.v1.AnalyzerDefinition.OperatorOption.getDefaultInstance() + : operatorOption_; + } else { + return operatorOptionBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Operator option.
+     * 
+ * + * .google.cloud.visionai.v1.AnalyzerDefinition.OperatorOption operator_option = 6; + */ + public Builder setOperatorOption( + com.google.cloud.visionai.v1.AnalyzerDefinition.OperatorOption value) { + if (operatorOptionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + operatorOption_ = value; + } else { + operatorOptionBuilder_.setMessage(value); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * Operator option.
+     * 
+ * + * .google.cloud.visionai.v1.AnalyzerDefinition.OperatorOption operator_option = 6; + */ + public Builder setOperatorOption( + com.google.cloud.visionai.v1.AnalyzerDefinition.OperatorOption.Builder builderForValue) { + if (operatorOptionBuilder_ == null) { + operatorOption_ = builderForValue.build(); + } else { + operatorOptionBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * Operator option.
+     * 
+ * + * .google.cloud.visionai.v1.AnalyzerDefinition.OperatorOption operator_option = 6; + */ + public Builder mergeOperatorOption( + com.google.cloud.visionai.v1.AnalyzerDefinition.OperatorOption value) { + if (operatorOptionBuilder_ == null) { + if (((bitField0_ & 0x00000020) != 0) + && operatorOption_ != null + && operatorOption_ + != com.google.cloud.visionai.v1.AnalyzerDefinition.OperatorOption + .getDefaultInstance()) { + getOperatorOptionBuilder().mergeFrom(value); + } else { + operatorOption_ = value; + } + } else { + operatorOptionBuilder_.mergeFrom(value); + } + if (operatorOption_ != null) { + bitField0_ |= 0x00000020; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Operator option.
+     * 
+ * + * .google.cloud.visionai.v1.AnalyzerDefinition.OperatorOption operator_option = 6; + */ + public Builder clearOperatorOption() { + bitField0_ = (bitField0_ & ~0x00000020); + operatorOption_ = null; + if (operatorOptionBuilder_ != null) { + operatorOptionBuilder_.dispose(); + operatorOptionBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Operator option.
+     * 
+ * + * .google.cloud.visionai.v1.AnalyzerDefinition.OperatorOption operator_option = 6; + */ + public com.google.cloud.visionai.v1.AnalyzerDefinition.OperatorOption.Builder + getOperatorOptionBuilder() { + bitField0_ |= 0x00000020; + onChanged(); + return getOperatorOptionFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Operator option.
+     * 
+ * + * .google.cloud.visionai.v1.AnalyzerDefinition.OperatorOption operator_option = 6; + */ + public com.google.cloud.visionai.v1.AnalyzerDefinition.OperatorOptionOrBuilder + getOperatorOptionOrBuilder() { + if (operatorOptionBuilder_ != null) { + return operatorOptionBuilder_.getMessageOrBuilder(); + } else { + return operatorOption_ == null + ? com.google.cloud.visionai.v1.AnalyzerDefinition.OperatorOption.getDefaultInstance() + : operatorOption_; + } + } + /** + * + * + *
+     * Operator option.
+     * 
+ * + * .google.cloud.visionai.v1.AnalyzerDefinition.OperatorOption operator_option = 6; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.AnalyzerDefinition.OperatorOption, + com.google.cloud.visionai.v1.AnalyzerDefinition.OperatorOption.Builder, + com.google.cloud.visionai.v1.AnalyzerDefinition.OperatorOptionOrBuilder> + getOperatorOptionFieldBuilder() { + if (operatorOptionBuilder_ == null) { + operatorOptionBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.AnalyzerDefinition.OperatorOption, + com.google.cloud.visionai.v1.AnalyzerDefinition.OperatorOption.Builder, + com.google.cloud.visionai.v1.AnalyzerDefinition.OperatorOptionOrBuilder>( + getOperatorOption(), getParentForChildren(), isClean()); + operatorOption_ = null; + } + return operatorOptionBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.AnalyzerDefinition) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.AnalyzerDefinition) + private static final com.google.cloud.visionai.v1.AnalyzerDefinition DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.AnalyzerDefinition(); + } + + public static com.google.cloud.visionai.v1.AnalyzerDefinition getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AnalyzerDefinition parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.AnalyzerDefinition getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/AnalyzerDefinitionOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/AnalyzerDefinitionOrBuilder.java new file mode 100644 index 000000000000..1314978f2af8 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/AnalyzerDefinitionOrBuilder.java @@ -0,0 +1,286 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/lva.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface AnalyzerDefinitionOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.AnalyzerDefinition) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The name of this analyzer.
+   *
+   * Tentatively [a-z][a-z0-9]*(_[a-z0-9]+)*.
+   * 
+ * + * string analyzer = 1; + * + * @return The analyzer. + */ + java.lang.String getAnalyzer(); + /** + * + * + *
+   * The name of this analyzer.
+   *
+   * Tentatively [a-z][a-z0-9]*(_[a-z0-9]+)*.
+   * 
+ * + * string analyzer = 1; + * + * @return The bytes for analyzer. + */ + com.google.protobuf.ByteString getAnalyzerBytes(); + + /** + * + * + *
+   * The name of the operator that this analyzer runs.
+   *
+   * Must match the name of a supported operator.
+   * 
+ * + * string operator = 2; + * + * @return The operator. + */ + java.lang.String getOperator(); + /** + * + * + *
+   * The name of the operator that this analyzer runs.
+   *
+   * Must match the name of a supported operator.
+   * 
+ * + * string operator = 2; + * + * @return The bytes for operator. + */ + com.google.protobuf.ByteString getOperatorBytes(); + + /** + * + * + *
+   * Input streams.
+   * 
+ * + * repeated .google.cloud.visionai.v1.AnalyzerDefinition.StreamInput inputs = 3; + */ + java.util.List getInputsList(); + /** + * + * + *
+   * Input streams.
+   * 
+ * + * repeated .google.cloud.visionai.v1.AnalyzerDefinition.StreamInput inputs = 3; + */ + com.google.cloud.visionai.v1.AnalyzerDefinition.StreamInput getInputs(int index); + /** + * + * + *
+   * Input streams.
+   * 
+ * + * repeated .google.cloud.visionai.v1.AnalyzerDefinition.StreamInput inputs = 3; + */ + int getInputsCount(); + /** + * + * + *
+   * Input streams.
+   * 
+ * + * repeated .google.cloud.visionai.v1.AnalyzerDefinition.StreamInput inputs = 3; + */ + java.util.List + getInputsOrBuilderList(); + /** + * + * + *
+   * Input streams.
+   * 
+ * + * repeated .google.cloud.visionai.v1.AnalyzerDefinition.StreamInput inputs = 3; + */ + com.google.cloud.visionai.v1.AnalyzerDefinition.StreamInputOrBuilder getInputsOrBuilder( + int index); + + /** + * + * + *
+   * The attribute values that this analyzer applies to the operator.
+   *
+   * Supply a mapping between the attribute names and the actual value you wish
+   * to apply. If an attribute name is omitted, then it will take a
+   * preconfigured default value.
+   * 
+ * + * map<string, .google.cloud.visionai.v1.AttributeValue> attrs = 4; + */ + int getAttrsCount(); + /** + * + * + *
+   * The attribute values that this analyzer applies to the operator.
+   *
+   * Supply a mapping between the attribute names and the actual value you wish
+   * to apply. If an attribute name is omitted, then it will take a
+   * preconfigured default value.
+   * 
+ * + * map<string, .google.cloud.visionai.v1.AttributeValue> attrs = 4; + */ + boolean containsAttrs(java.lang.String key); + /** Use {@link #getAttrsMap()} instead. */ + @java.lang.Deprecated + java.util.Map getAttrs(); + /** + * + * + *
+   * The attribute values that this analyzer applies to the operator.
+   *
+   * Supply a mapping between the attribute names and the actual value you wish
+   * to apply. If an attribute name is omitted, then it will take a
+   * preconfigured default value.
+   * 
+ * + * map<string, .google.cloud.visionai.v1.AttributeValue> attrs = 4; + */ + java.util.Map getAttrsMap(); + /** + * + * + *
+   * The attribute values that this analyzer applies to the operator.
+   *
+   * Supply a mapping between the attribute names and the actual value you wish
+   * to apply. If an attribute name is omitted, then it will take a
+   * preconfigured default value.
+   * 
+ * + * map<string, .google.cloud.visionai.v1.AttributeValue> attrs = 4; + */ + /* nullable */ + com.google.cloud.visionai.v1.AttributeValue getAttrsOrDefault( + java.lang.String key, + /* nullable */ + com.google.cloud.visionai.v1.AttributeValue defaultValue); + /** + * + * + *
+   * The attribute values that this analyzer applies to the operator.
+   *
+   * Supply a mapping between the attribute names and the actual value you wish
+   * to apply. If an attribute name is omitted, then it will take a
+   * preconfigured default value.
+   * 
+ * + * map<string, .google.cloud.visionai.v1.AttributeValue> attrs = 4; + */ + com.google.cloud.visionai.v1.AttributeValue getAttrsOrThrow(java.lang.String key); + + /** + * + * + *
+   * Debug options.
+   * 
+ * + * .google.cloud.visionai.v1.AnalyzerDefinition.DebugOptions debug_options = 5; + * + * @return Whether the debugOptions field is set. + */ + boolean hasDebugOptions(); + /** + * + * + *
+   * Debug options.
+   * 
+ * + * .google.cloud.visionai.v1.AnalyzerDefinition.DebugOptions debug_options = 5; + * + * @return The debugOptions. + */ + com.google.cloud.visionai.v1.AnalyzerDefinition.DebugOptions getDebugOptions(); + /** + * + * + *
+   * Debug options.
+   * 
+ * + * .google.cloud.visionai.v1.AnalyzerDefinition.DebugOptions debug_options = 5; + */ + com.google.cloud.visionai.v1.AnalyzerDefinition.DebugOptionsOrBuilder getDebugOptionsOrBuilder(); + + /** + * + * + *
+   * Operator option.
+   * 
+ * + * .google.cloud.visionai.v1.AnalyzerDefinition.OperatorOption operator_option = 6; + * + * @return Whether the operatorOption field is set. + */ + boolean hasOperatorOption(); + /** + * + * + *
+   * Operator option.
+   * 
+ * + * .google.cloud.visionai.v1.AnalyzerDefinition.OperatorOption operator_option = 6; + * + * @return The operatorOption. + */ + com.google.cloud.visionai.v1.AnalyzerDefinition.OperatorOption getOperatorOption(); + /** + * + * + *
+   * Operator option.
+   * 
+ * + * .google.cloud.visionai.v1.AnalyzerDefinition.OperatorOption operator_option = 6; + */ + com.google.cloud.visionai.v1.AnalyzerDefinition.OperatorOptionOrBuilder + getOperatorOptionOrBuilder(); +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/Annotation.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/Annotation.java new file mode 100644 index 000000000000..8737a8ce27aa --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/Annotation.java @@ -0,0 +1,930 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/warehouse.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * An annotation is a resource in asset. It represents a key-value mapping of
+ * content in asset.
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.Annotation} + */ +public final class Annotation extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.Annotation) + AnnotationOrBuilder { + private static final long serialVersionUID = 0L; + // Use Annotation.newBuilder() to construct. + private Annotation(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Annotation() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Annotation(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_Annotation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_Annotation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.Annotation.class, + com.google.cloud.visionai.v1.Annotation.Builder.class); + } + + private int bitField0_; + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Resource name of the annotation.
+   * Format:
+   * `projects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset}/annotations/{annotation}`
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + 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(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Resource name of the annotation.
+   * Format:
+   * `projects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset}/annotations/{annotation}`
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int USER_SPECIFIED_ANNOTATION_FIELD_NUMBER = 2; + private com.google.cloud.visionai.v1.UserSpecifiedAnnotation userSpecifiedAnnotation_; + /** + * + * + *
+   * User provided annotation.
+   * 
+ * + * .google.cloud.visionai.v1.UserSpecifiedAnnotation user_specified_annotation = 2; + * + * @return Whether the userSpecifiedAnnotation field is set. + */ + @java.lang.Override + public boolean hasUserSpecifiedAnnotation() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * User provided annotation.
+   * 
+ * + * .google.cloud.visionai.v1.UserSpecifiedAnnotation user_specified_annotation = 2; + * + * @return The userSpecifiedAnnotation. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.UserSpecifiedAnnotation getUserSpecifiedAnnotation() { + return userSpecifiedAnnotation_ == null + ? com.google.cloud.visionai.v1.UserSpecifiedAnnotation.getDefaultInstance() + : userSpecifiedAnnotation_; + } + /** + * + * + *
+   * User provided annotation.
+   * 
+ * + * .google.cloud.visionai.v1.UserSpecifiedAnnotation user_specified_annotation = 2; + */ + @java.lang.Override + public com.google.cloud.visionai.v1.UserSpecifiedAnnotationOrBuilder + getUserSpecifiedAnnotationOrBuilder() { + return userSpecifiedAnnotation_ == null + ? com.google.cloud.visionai.v1.UserSpecifiedAnnotation.getDefaultInstance() + : userSpecifiedAnnotation_; + } + + 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getUserSpecifiedAnnotation()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(2, getUserSpecifiedAnnotation()); + } + size += getUnknownFields().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.visionai.v1.Annotation)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.Annotation other = (com.google.cloud.visionai.v1.Annotation) obj; + + if (!getName().equals(other.getName())) return false; + if (hasUserSpecifiedAnnotation() != other.hasUserSpecifiedAnnotation()) return false; + if (hasUserSpecifiedAnnotation()) { + if (!getUserSpecifiedAnnotation().equals(other.getUserSpecifiedAnnotation())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + if (hasUserSpecifiedAnnotation()) { + hash = (37 * hash) + USER_SPECIFIED_ANNOTATION_FIELD_NUMBER; + hash = (53 * hash) + getUserSpecifiedAnnotation().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.Annotation parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.Annotation 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.visionai.v1.Annotation parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.Annotation 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.visionai.v1.Annotation parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.Annotation parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.Annotation parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.Annotation 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.visionai.v1.Annotation parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.Annotation 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.visionai.v1.Annotation parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.Annotation 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.visionai.v1.Annotation 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; + } + /** + * + * + *
+   * An annotation is a resource in asset. It represents a key-value mapping of
+   * content in asset.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.Annotation} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.Annotation) + com.google.cloud.visionai.v1.AnnotationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_Annotation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_Annotation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.Annotation.class, + com.google.cloud.visionai.v1.Annotation.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.Annotation.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getUserSpecifiedAnnotationFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + userSpecifiedAnnotation_ = null; + if (userSpecifiedAnnotationBuilder_ != null) { + userSpecifiedAnnotationBuilder_.dispose(); + userSpecifiedAnnotationBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_Annotation_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.Annotation getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.Annotation.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.Annotation build() { + com.google.cloud.visionai.v1.Annotation result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.Annotation buildPartial() { + com.google.cloud.visionai.v1.Annotation result = + new com.google.cloud.visionai.v1.Annotation(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.visionai.v1.Annotation result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.userSpecifiedAnnotation_ = + userSpecifiedAnnotationBuilder_ == null + ? userSpecifiedAnnotation_ + : userSpecifiedAnnotationBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.Annotation) { + return mergeFrom((com.google.cloud.visionai.v1.Annotation) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.Annotation other) { + if (other == com.google.cloud.visionai.v1.Annotation.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasUserSpecifiedAnnotation()) { + mergeUserSpecifiedAnnotation(other.getUserSpecifiedAnnotation()); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage( + getUserSpecifiedAnnotationFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Resource name of the annotation.
+     * Format:
+     * `projects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset}/annotations/{annotation}`
+     * 
+ * + * string name = 1; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Resource name of the annotation.
+     * Format:
+     * `projects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset}/annotations/{annotation}`
+     * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Resource name of the annotation.
+     * Format:
+     * `projects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset}/annotations/{annotation}`
+     * 
+ * + * string name = 1; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Resource name of the annotation.
+     * Format:
+     * `projects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset}/annotations/{annotation}`
+     * 
+ * + * string name = 1; + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Resource name of the annotation.
+     * Format:
+     * `projects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset}/annotations/{annotation}`
+     * 
+ * + * string name = 1; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.cloud.visionai.v1.UserSpecifiedAnnotation userSpecifiedAnnotation_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.UserSpecifiedAnnotation, + com.google.cloud.visionai.v1.UserSpecifiedAnnotation.Builder, + com.google.cloud.visionai.v1.UserSpecifiedAnnotationOrBuilder> + userSpecifiedAnnotationBuilder_; + /** + * + * + *
+     * User provided annotation.
+     * 
+ * + * .google.cloud.visionai.v1.UserSpecifiedAnnotation user_specified_annotation = 2; + * + * @return Whether the userSpecifiedAnnotation field is set. + */ + public boolean hasUserSpecifiedAnnotation() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * User provided annotation.
+     * 
+ * + * .google.cloud.visionai.v1.UserSpecifiedAnnotation user_specified_annotation = 2; + * + * @return The userSpecifiedAnnotation. + */ + public com.google.cloud.visionai.v1.UserSpecifiedAnnotation getUserSpecifiedAnnotation() { + if (userSpecifiedAnnotationBuilder_ == null) { + return userSpecifiedAnnotation_ == null + ? com.google.cloud.visionai.v1.UserSpecifiedAnnotation.getDefaultInstance() + : userSpecifiedAnnotation_; + } else { + return userSpecifiedAnnotationBuilder_.getMessage(); + } + } + /** + * + * + *
+     * User provided annotation.
+     * 
+ * + * .google.cloud.visionai.v1.UserSpecifiedAnnotation user_specified_annotation = 2; + */ + public Builder setUserSpecifiedAnnotation( + com.google.cloud.visionai.v1.UserSpecifiedAnnotation value) { + if (userSpecifiedAnnotationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + userSpecifiedAnnotation_ = value; + } else { + userSpecifiedAnnotationBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * User provided annotation.
+     * 
+ * + * .google.cloud.visionai.v1.UserSpecifiedAnnotation user_specified_annotation = 2; + */ + public Builder setUserSpecifiedAnnotation( + com.google.cloud.visionai.v1.UserSpecifiedAnnotation.Builder builderForValue) { + if (userSpecifiedAnnotationBuilder_ == null) { + userSpecifiedAnnotation_ = builderForValue.build(); + } else { + userSpecifiedAnnotationBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * User provided annotation.
+     * 
+ * + * .google.cloud.visionai.v1.UserSpecifiedAnnotation user_specified_annotation = 2; + */ + public Builder mergeUserSpecifiedAnnotation( + com.google.cloud.visionai.v1.UserSpecifiedAnnotation value) { + if (userSpecifiedAnnotationBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && userSpecifiedAnnotation_ != null + && userSpecifiedAnnotation_ + != com.google.cloud.visionai.v1.UserSpecifiedAnnotation.getDefaultInstance()) { + getUserSpecifiedAnnotationBuilder().mergeFrom(value); + } else { + userSpecifiedAnnotation_ = value; + } + } else { + userSpecifiedAnnotationBuilder_.mergeFrom(value); + } + if (userSpecifiedAnnotation_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + /** + * + * + *
+     * User provided annotation.
+     * 
+ * + * .google.cloud.visionai.v1.UserSpecifiedAnnotation user_specified_annotation = 2; + */ + public Builder clearUserSpecifiedAnnotation() { + bitField0_ = (bitField0_ & ~0x00000002); + userSpecifiedAnnotation_ = null; + if (userSpecifiedAnnotationBuilder_ != null) { + userSpecifiedAnnotationBuilder_.dispose(); + userSpecifiedAnnotationBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * User provided annotation.
+     * 
+ * + * .google.cloud.visionai.v1.UserSpecifiedAnnotation user_specified_annotation = 2; + */ + public com.google.cloud.visionai.v1.UserSpecifiedAnnotation.Builder + getUserSpecifiedAnnotationBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getUserSpecifiedAnnotationFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * User provided annotation.
+     * 
+ * + * .google.cloud.visionai.v1.UserSpecifiedAnnotation user_specified_annotation = 2; + */ + public com.google.cloud.visionai.v1.UserSpecifiedAnnotationOrBuilder + getUserSpecifiedAnnotationOrBuilder() { + if (userSpecifiedAnnotationBuilder_ != null) { + return userSpecifiedAnnotationBuilder_.getMessageOrBuilder(); + } else { + return userSpecifiedAnnotation_ == null + ? com.google.cloud.visionai.v1.UserSpecifiedAnnotation.getDefaultInstance() + : userSpecifiedAnnotation_; + } + } + /** + * + * + *
+     * User provided annotation.
+     * 
+ * + * .google.cloud.visionai.v1.UserSpecifiedAnnotation user_specified_annotation = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.UserSpecifiedAnnotation, + com.google.cloud.visionai.v1.UserSpecifiedAnnotation.Builder, + com.google.cloud.visionai.v1.UserSpecifiedAnnotationOrBuilder> + getUserSpecifiedAnnotationFieldBuilder() { + if (userSpecifiedAnnotationBuilder_ == null) { + userSpecifiedAnnotationBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.UserSpecifiedAnnotation, + com.google.cloud.visionai.v1.UserSpecifiedAnnotation.Builder, + com.google.cloud.visionai.v1.UserSpecifiedAnnotationOrBuilder>( + getUserSpecifiedAnnotation(), getParentForChildren(), isClean()); + userSpecifiedAnnotation_ = null; + } + return userSpecifiedAnnotationBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.Annotation) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.Annotation) + private static final com.google.cloud.visionai.v1.Annotation DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.Annotation(); + } + + public static com.google.cloud.visionai.v1.Annotation getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Annotation parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.Annotation getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/AnnotationCustomizedStruct.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/AnnotationCustomizedStruct.java new file mode 100644 index 000000000000..c139bb7e71af --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/AnnotationCustomizedStruct.java @@ -0,0 +1,863 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/warehouse.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * Customized struct represnation in annotation.
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.AnnotationCustomizedStruct} + */ +public final class AnnotationCustomizedStruct extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.AnnotationCustomizedStruct) + AnnotationCustomizedStructOrBuilder { + private static final long serialVersionUID = 0L; + // Use AnnotationCustomizedStruct.newBuilder() to construct. + private AnnotationCustomizedStruct(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private AnnotationCustomizedStruct() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new AnnotationCustomizedStruct(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_AnnotationCustomizedStruct_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 2: + return internalGetElements(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_AnnotationCustomizedStruct_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.AnnotationCustomizedStruct.class, + com.google.cloud.visionai.v1.AnnotationCustomizedStruct.Builder.class); + } + + public static final int ELEMENTS_FIELD_NUMBER = 2; + + private static final class ElementsDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.String, com.google.cloud.visionai.v1.AnnotationValue> + defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_AnnotationCustomizedStruct_ElementsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.MESSAGE, + com.google.cloud.visionai.v1.AnnotationValue.getDefaultInstance()); + } + + @SuppressWarnings("serial") + private com.google.protobuf.MapField< + java.lang.String, com.google.cloud.visionai.v1.AnnotationValue> + elements_; + + private com.google.protobuf.MapField< + java.lang.String, com.google.cloud.visionai.v1.AnnotationValue> + internalGetElements() { + if (elements_ == null) { + return com.google.protobuf.MapField.emptyMapField(ElementsDefaultEntryHolder.defaultEntry); + } + return elements_; + } + + public int getElementsCount() { + return internalGetElements().getMap().size(); + } + /** + * + * + *
+   * A map from elements' keys to element's annotation value.
+   * 
+ * + * map<string, .google.cloud.visionai.v1.AnnotationValue> elements = 2; + */ + @java.lang.Override + public boolean containsElements(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetElements().getMap().containsKey(key); + } + /** Use {@link #getElementsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map + getElements() { + return getElementsMap(); + } + /** + * + * + *
+   * A map from elements' keys to element's annotation value.
+   * 
+ * + * map<string, .google.cloud.visionai.v1.AnnotationValue> elements = 2; + */ + @java.lang.Override + public java.util.Map + getElementsMap() { + return internalGetElements().getMap(); + } + /** + * + * + *
+   * A map from elements' keys to element's annotation value.
+   * 
+ * + * map<string, .google.cloud.visionai.v1.AnnotationValue> elements = 2; + */ + @java.lang.Override + public /* nullable */ com.google.cloud.visionai.v1.AnnotationValue getElementsOrDefault( + java.lang.String key, + /* nullable */ + com.google.cloud.visionai.v1.AnnotationValue defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = + internalGetElements().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+   * A map from elements' keys to element's annotation value.
+   * 
+ * + * map<string, .google.cloud.visionai.v1.AnnotationValue> elements = 2; + */ + @java.lang.Override + public com.google.cloud.visionai.v1.AnnotationValue getElementsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = + internalGetElements().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + 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 { + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, internalGetElements(), ElementsDefaultEntryHolder.defaultEntry, 2); + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (java.util.Map.Entry entry : + internalGetElements().getMap().entrySet()) { + com.google.protobuf.MapEntry + elements__ = + ElementsDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, elements__); + } + size += getUnknownFields().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.visionai.v1.AnnotationCustomizedStruct)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.AnnotationCustomizedStruct other = + (com.google.cloud.visionai.v1.AnnotationCustomizedStruct) obj; + + if (!internalGetElements().equals(other.internalGetElements())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (!internalGetElements().getMap().isEmpty()) { + hash = (37 * hash) + ELEMENTS_FIELD_NUMBER; + hash = (53 * hash) + internalGetElements().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.AnnotationCustomizedStruct parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.AnnotationCustomizedStruct 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.visionai.v1.AnnotationCustomizedStruct parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.AnnotationCustomizedStruct 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.visionai.v1.AnnotationCustomizedStruct parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.AnnotationCustomizedStruct parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.AnnotationCustomizedStruct parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.AnnotationCustomizedStruct 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.visionai.v1.AnnotationCustomizedStruct parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.AnnotationCustomizedStruct 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.visionai.v1.AnnotationCustomizedStruct parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.AnnotationCustomizedStruct 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.visionai.v1.AnnotationCustomizedStruct 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; + } + /** + * + * + *
+   * Customized struct represnation in annotation.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.AnnotationCustomizedStruct} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.AnnotationCustomizedStruct) + com.google.cloud.visionai.v1.AnnotationCustomizedStructOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_AnnotationCustomizedStruct_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 2: + return internalGetElements(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( + int number) { + switch (number) { + case 2: + return internalGetMutableElements(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_AnnotationCustomizedStruct_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.AnnotationCustomizedStruct.class, + com.google.cloud.visionai.v1.AnnotationCustomizedStruct.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.AnnotationCustomizedStruct.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + internalGetMutableElements().clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_AnnotationCustomizedStruct_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.AnnotationCustomizedStruct getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.AnnotationCustomizedStruct.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.AnnotationCustomizedStruct build() { + com.google.cloud.visionai.v1.AnnotationCustomizedStruct result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.AnnotationCustomizedStruct buildPartial() { + com.google.cloud.visionai.v1.AnnotationCustomizedStruct result = + new com.google.cloud.visionai.v1.AnnotationCustomizedStruct(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.visionai.v1.AnnotationCustomizedStruct result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.elements_ = internalGetElements().build(ElementsDefaultEntryHolder.defaultEntry); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.AnnotationCustomizedStruct) { + return mergeFrom((com.google.cloud.visionai.v1.AnnotationCustomizedStruct) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.AnnotationCustomizedStruct other) { + if (other == com.google.cloud.visionai.v1.AnnotationCustomizedStruct.getDefaultInstance()) + return this; + internalGetMutableElements().mergeFrom(other.internalGetElements()); + bitField0_ |= 0x00000001; + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 18: + { + com.google.protobuf.MapEntry< + java.lang.String, com.google.cloud.visionai.v1.AnnotationValue> + elements__ = + input.readMessage( + ElementsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableElements() + .ensureBuilderMap() + .put(elements__.getKey(), elements__.getValue()); + bitField0_ |= 0x00000001; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private static final class ElementsConverter + implements com.google.protobuf.MapFieldBuilder.Converter< + java.lang.String, + com.google.cloud.visionai.v1.AnnotationValueOrBuilder, + com.google.cloud.visionai.v1.AnnotationValue> { + @java.lang.Override + public com.google.cloud.visionai.v1.AnnotationValue build( + com.google.cloud.visionai.v1.AnnotationValueOrBuilder val) { + if (val instanceof com.google.cloud.visionai.v1.AnnotationValue) { + return (com.google.cloud.visionai.v1.AnnotationValue) val; + } + return ((com.google.cloud.visionai.v1.AnnotationValue.Builder) val).build(); + } + + @java.lang.Override + public com.google.protobuf.MapEntry< + java.lang.String, com.google.cloud.visionai.v1.AnnotationValue> + defaultEntry() { + return ElementsDefaultEntryHolder.defaultEntry; + } + }; + + private static final ElementsConverter elementsConverter = new ElementsConverter(); + + private com.google.protobuf.MapFieldBuilder< + java.lang.String, + com.google.cloud.visionai.v1.AnnotationValueOrBuilder, + com.google.cloud.visionai.v1.AnnotationValue, + com.google.cloud.visionai.v1.AnnotationValue.Builder> + elements_; + + private com.google.protobuf.MapFieldBuilder< + java.lang.String, + com.google.cloud.visionai.v1.AnnotationValueOrBuilder, + com.google.cloud.visionai.v1.AnnotationValue, + com.google.cloud.visionai.v1.AnnotationValue.Builder> + internalGetElements() { + if (elements_ == null) { + return new com.google.protobuf.MapFieldBuilder<>(elementsConverter); + } + return elements_; + } + + private com.google.protobuf.MapFieldBuilder< + java.lang.String, + com.google.cloud.visionai.v1.AnnotationValueOrBuilder, + com.google.cloud.visionai.v1.AnnotationValue, + com.google.cloud.visionai.v1.AnnotationValue.Builder> + internalGetMutableElements() { + if (elements_ == null) { + elements_ = new com.google.protobuf.MapFieldBuilder<>(elementsConverter); + } + bitField0_ |= 0x00000001; + onChanged(); + return elements_; + } + + public int getElementsCount() { + return internalGetElements().ensureBuilderMap().size(); + } + /** + * + * + *
+     * A map from elements' keys to element's annotation value.
+     * 
+ * + * map<string, .google.cloud.visionai.v1.AnnotationValue> elements = 2; + */ + @java.lang.Override + public boolean containsElements(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetElements().ensureBuilderMap().containsKey(key); + } + /** Use {@link #getElementsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map + getElements() { + return getElementsMap(); + } + /** + * + * + *
+     * A map from elements' keys to element's annotation value.
+     * 
+ * + * map<string, .google.cloud.visionai.v1.AnnotationValue> elements = 2; + */ + @java.lang.Override + public java.util.Map + getElementsMap() { + return internalGetElements().getImmutableMap(); + } + /** + * + * + *
+     * A map from elements' keys to element's annotation value.
+     * 
+ * + * map<string, .google.cloud.visionai.v1.AnnotationValue> elements = 2; + */ + @java.lang.Override + public /* nullable */ com.google.cloud.visionai.v1.AnnotationValue getElementsOrDefault( + java.lang.String key, + /* nullable */ + com.google.cloud.visionai.v1.AnnotationValue defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = + internalGetMutableElements().ensureBuilderMap(); + return map.containsKey(key) ? elementsConverter.build(map.get(key)) : defaultValue; + } + /** + * + * + *
+     * A map from elements' keys to element's annotation value.
+     * 
+ * + * map<string, .google.cloud.visionai.v1.AnnotationValue> elements = 2; + */ + @java.lang.Override + public com.google.cloud.visionai.v1.AnnotationValue getElementsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = + internalGetMutableElements().ensureBuilderMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return elementsConverter.build(map.get(key)); + } + + public Builder clearElements() { + bitField0_ = (bitField0_ & ~0x00000001); + internalGetMutableElements().clear(); + return this; + } + /** + * + * + *
+     * A map from elements' keys to element's annotation value.
+     * 
+ * + * map<string, .google.cloud.visionai.v1.AnnotationValue> elements = 2; + */ + public Builder removeElements(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + internalGetMutableElements().ensureBuilderMap().remove(key); + return this; + } + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map + getMutableElements() { + bitField0_ |= 0x00000001; + return internalGetMutableElements().ensureMessageMap(); + } + /** + * + * + *
+     * A map from elements' keys to element's annotation value.
+     * 
+ * + * map<string, .google.cloud.visionai.v1.AnnotationValue> elements = 2; + */ + public Builder putElements( + java.lang.String key, com.google.cloud.visionai.v1.AnnotationValue value) { + if (key == null) { + throw new NullPointerException("map key"); + } + if (value == null) { + throw new NullPointerException("map value"); + } + internalGetMutableElements().ensureBuilderMap().put(key, value); + bitField0_ |= 0x00000001; + return this; + } + /** + * + * + *
+     * A map from elements' keys to element's annotation value.
+     * 
+ * + * map<string, .google.cloud.visionai.v1.AnnotationValue> elements = 2; + */ + public Builder putAllElements( + java.util.Map values) { + for (java.util.Map.Entry e : + values.entrySet()) { + if (e.getKey() == null || e.getValue() == null) { + throw new NullPointerException(); + } + } + internalGetMutableElements().ensureBuilderMap().putAll(values); + bitField0_ |= 0x00000001; + return this; + } + /** + * + * + *
+     * A map from elements' keys to element's annotation value.
+     * 
+ * + * map<string, .google.cloud.visionai.v1.AnnotationValue> elements = 2; + */ + public com.google.cloud.visionai.v1.AnnotationValue.Builder putElementsBuilderIfAbsent( + java.lang.String key) { + java.util.Map + builderMap = internalGetMutableElements().ensureBuilderMap(); + com.google.cloud.visionai.v1.AnnotationValueOrBuilder entry = builderMap.get(key); + if (entry == null) { + entry = com.google.cloud.visionai.v1.AnnotationValue.newBuilder(); + builderMap.put(key, entry); + } + if (entry instanceof com.google.cloud.visionai.v1.AnnotationValue) { + entry = ((com.google.cloud.visionai.v1.AnnotationValue) entry).toBuilder(); + builderMap.put(key, entry); + } + return (com.google.cloud.visionai.v1.AnnotationValue.Builder) entry; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.AnnotationCustomizedStruct) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.AnnotationCustomizedStruct) + private static final com.google.cloud.visionai.v1.AnnotationCustomizedStruct DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.AnnotationCustomizedStruct(); + } + + public static com.google.cloud.visionai.v1.AnnotationCustomizedStruct getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AnnotationCustomizedStruct parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.AnnotationCustomizedStruct getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/AnnotationCustomizedStructOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/AnnotationCustomizedStructOrBuilder.java new file mode 100644 index 000000000000..96d1fc619219 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/AnnotationCustomizedStructOrBuilder.java @@ -0,0 +1,84 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/warehouse.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface AnnotationCustomizedStructOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.AnnotationCustomizedStruct) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * A map from elements' keys to element's annotation value.
+   * 
+ * + * map<string, .google.cloud.visionai.v1.AnnotationValue> elements = 2; + */ + int getElementsCount(); + /** + * + * + *
+   * A map from elements' keys to element's annotation value.
+   * 
+ * + * map<string, .google.cloud.visionai.v1.AnnotationValue> elements = 2; + */ + boolean containsElements(java.lang.String key); + /** Use {@link #getElementsMap()} instead. */ + @java.lang.Deprecated + java.util.Map getElements(); + /** + * + * + *
+   * A map from elements' keys to element's annotation value.
+   * 
+ * + * map<string, .google.cloud.visionai.v1.AnnotationValue> elements = 2; + */ + java.util.Map getElementsMap(); + /** + * + * + *
+   * A map from elements' keys to element's annotation value.
+   * 
+ * + * map<string, .google.cloud.visionai.v1.AnnotationValue> elements = 2; + */ + /* nullable */ + com.google.cloud.visionai.v1.AnnotationValue getElementsOrDefault( + java.lang.String key, + /* nullable */ + com.google.cloud.visionai.v1.AnnotationValue defaultValue); + /** + * + * + *
+   * A map from elements' keys to element's annotation value.
+   * 
+ * + * map<string, .google.cloud.visionai.v1.AnnotationValue> elements = 2; + */ + com.google.cloud.visionai.v1.AnnotationValue getElementsOrThrow(java.lang.String key); +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/AnnotationList.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/AnnotationList.java new file mode 100644 index 000000000000..790c03706855 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/AnnotationList.java @@ -0,0 +1,934 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/warehouse.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * List representation in annotation.
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.AnnotationList} + */ +public final class AnnotationList extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.AnnotationList) + AnnotationListOrBuilder { + private static final long serialVersionUID = 0L; + // Use AnnotationList.newBuilder() to construct. + private AnnotationList(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private AnnotationList() { + values_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new AnnotationList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_AnnotationList_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_AnnotationList_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.AnnotationList.class, + com.google.cloud.visionai.v1.AnnotationList.Builder.class); + } + + public static final int VALUES_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List values_; + /** + * + * + *
+   * The values of `LIST` data type annotation.
+   * 
+ * + * repeated .google.cloud.visionai.v1.AnnotationValue values = 1; + */ + @java.lang.Override + public java.util.List getValuesList() { + return values_; + } + /** + * + * + *
+   * The values of `LIST` data type annotation.
+   * 
+ * + * repeated .google.cloud.visionai.v1.AnnotationValue values = 1; + */ + @java.lang.Override + public java.util.List + getValuesOrBuilderList() { + return values_; + } + /** + * + * + *
+   * The values of `LIST` data type annotation.
+   * 
+ * + * repeated .google.cloud.visionai.v1.AnnotationValue values = 1; + */ + @java.lang.Override + public int getValuesCount() { + return values_.size(); + } + /** + * + * + *
+   * The values of `LIST` data type annotation.
+   * 
+ * + * repeated .google.cloud.visionai.v1.AnnotationValue values = 1; + */ + @java.lang.Override + public com.google.cloud.visionai.v1.AnnotationValue getValues(int index) { + return values_.get(index); + } + /** + * + * + *
+   * The values of `LIST` data type annotation.
+   * 
+ * + * repeated .google.cloud.visionai.v1.AnnotationValue values = 1; + */ + @java.lang.Override + public com.google.cloud.visionai.v1.AnnotationValueOrBuilder getValuesOrBuilder(int index) { + return values_.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 < values_.size(); i++) { + output.writeMessage(1, values_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < values_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, values_.get(i)); + } + size += getUnknownFields().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.visionai.v1.AnnotationList)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.AnnotationList other = + (com.google.cloud.visionai.v1.AnnotationList) obj; + + if (!getValuesList().equals(other.getValuesList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getValuesCount() > 0) { + hash = (37 * hash) + VALUES_FIELD_NUMBER; + hash = (53 * hash) + getValuesList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.AnnotationList parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.AnnotationList 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.visionai.v1.AnnotationList parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.AnnotationList 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.visionai.v1.AnnotationList parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.AnnotationList parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.AnnotationList parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.AnnotationList 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.visionai.v1.AnnotationList parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.AnnotationList 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.visionai.v1.AnnotationList parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.AnnotationList 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.visionai.v1.AnnotationList 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; + } + /** + * + * + *
+   * List representation in annotation.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.AnnotationList} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.AnnotationList) + com.google.cloud.visionai.v1.AnnotationListOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_AnnotationList_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_AnnotationList_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.AnnotationList.class, + com.google.cloud.visionai.v1.AnnotationList.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.AnnotationList.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (valuesBuilder_ == null) { + values_ = java.util.Collections.emptyList(); + } else { + values_ = null; + valuesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_AnnotationList_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.AnnotationList getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.AnnotationList.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.AnnotationList build() { + com.google.cloud.visionai.v1.AnnotationList result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.AnnotationList buildPartial() { + com.google.cloud.visionai.v1.AnnotationList result = + new com.google.cloud.visionai.v1.AnnotationList(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.google.cloud.visionai.v1.AnnotationList result) { + if (valuesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + values_ = java.util.Collections.unmodifiableList(values_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.values_ = values_; + } else { + result.values_ = valuesBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.visionai.v1.AnnotationList result) { + int from_bitField0_ = bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.AnnotationList) { + return mergeFrom((com.google.cloud.visionai.v1.AnnotationList) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.AnnotationList other) { + if (other == com.google.cloud.visionai.v1.AnnotationList.getDefaultInstance()) return this; + if (valuesBuilder_ == null) { + if (!other.values_.isEmpty()) { + if (values_.isEmpty()) { + values_ = other.values_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureValuesIsMutable(); + values_.addAll(other.values_); + } + onChanged(); + } + } else { + if (!other.values_.isEmpty()) { + if (valuesBuilder_.isEmpty()) { + valuesBuilder_.dispose(); + valuesBuilder_ = null; + values_ = other.values_; + bitField0_ = (bitField0_ & ~0x00000001); + valuesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getValuesFieldBuilder() + : null; + } else { + valuesBuilder_.addAllMessages(other.values_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.visionai.v1.AnnotationValue m = + input.readMessage( + com.google.cloud.visionai.v1.AnnotationValue.parser(), extensionRegistry); + if (valuesBuilder_ == null) { + ensureValuesIsMutable(); + values_.add(m); + } else { + valuesBuilder_.addMessage(m); + } + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List values_ = + java.util.Collections.emptyList(); + + private void ensureValuesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + values_ = new java.util.ArrayList(values_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.visionai.v1.AnnotationValue, + com.google.cloud.visionai.v1.AnnotationValue.Builder, + com.google.cloud.visionai.v1.AnnotationValueOrBuilder> + valuesBuilder_; + + /** + * + * + *
+     * The values of `LIST` data type annotation.
+     * 
+ * + * repeated .google.cloud.visionai.v1.AnnotationValue values = 1; + */ + public java.util.List getValuesList() { + if (valuesBuilder_ == null) { + return java.util.Collections.unmodifiableList(values_); + } else { + return valuesBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * The values of `LIST` data type annotation.
+     * 
+ * + * repeated .google.cloud.visionai.v1.AnnotationValue values = 1; + */ + public int getValuesCount() { + if (valuesBuilder_ == null) { + return values_.size(); + } else { + return valuesBuilder_.getCount(); + } + } + /** + * + * + *
+     * The values of `LIST` data type annotation.
+     * 
+ * + * repeated .google.cloud.visionai.v1.AnnotationValue values = 1; + */ + public com.google.cloud.visionai.v1.AnnotationValue getValues(int index) { + if (valuesBuilder_ == null) { + return values_.get(index); + } else { + return valuesBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * The values of `LIST` data type annotation.
+     * 
+ * + * repeated .google.cloud.visionai.v1.AnnotationValue values = 1; + */ + public Builder setValues(int index, com.google.cloud.visionai.v1.AnnotationValue value) { + if (valuesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureValuesIsMutable(); + values_.set(index, value); + onChanged(); + } else { + valuesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The values of `LIST` data type annotation.
+     * 
+ * + * repeated .google.cloud.visionai.v1.AnnotationValue values = 1; + */ + public Builder setValues( + int index, com.google.cloud.visionai.v1.AnnotationValue.Builder builderForValue) { + if (valuesBuilder_ == null) { + ensureValuesIsMutable(); + values_.set(index, builderForValue.build()); + onChanged(); + } else { + valuesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The values of `LIST` data type annotation.
+     * 
+ * + * repeated .google.cloud.visionai.v1.AnnotationValue values = 1; + */ + public Builder addValues(com.google.cloud.visionai.v1.AnnotationValue value) { + if (valuesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureValuesIsMutable(); + values_.add(value); + onChanged(); + } else { + valuesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * The values of `LIST` data type annotation.
+     * 
+ * + * repeated .google.cloud.visionai.v1.AnnotationValue values = 1; + */ + public Builder addValues(int index, com.google.cloud.visionai.v1.AnnotationValue value) { + if (valuesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureValuesIsMutable(); + values_.add(index, value); + onChanged(); + } else { + valuesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The values of `LIST` data type annotation.
+     * 
+ * + * repeated .google.cloud.visionai.v1.AnnotationValue values = 1; + */ + public Builder addValues(com.google.cloud.visionai.v1.AnnotationValue.Builder builderForValue) { + if (valuesBuilder_ == null) { + ensureValuesIsMutable(); + values_.add(builderForValue.build()); + onChanged(); + } else { + valuesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The values of `LIST` data type annotation.
+     * 
+ * + * repeated .google.cloud.visionai.v1.AnnotationValue values = 1; + */ + public Builder addValues( + int index, com.google.cloud.visionai.v1.AnnotationValue.Builder builderForValue) { + if (valuesBuilder_ == null) { + ensureValuesIsMutable(); + values_.add(index, builderForValue.build()); + onChanged(); + } else { + valuesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The values of `LIST` data type annotation.
+     * 
+ * + * repeated .google.cloud.visionai.v1.AnnotationValue values = 1; + */ + public Builder addAllValues( + java.lang.Iterable values) { + if (valuesBuilder_ == null) { + ensureValuesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, values_); + onChanged(); + } else { + valuesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * The values of `LIST` data type annotation.
+     * 
+ * + * repeated .google.cloud.visionai.v1.AnnotationValue values = 1; + */ + public Builder clearValues() { + if (valuesBuilder_ == null) { + values_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + valuesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The values of `LIST` data type annotation.
+     * 
+ * + * repeated .google.cloud.visionai.v1.AnnotationValue values = 1; + */ + public Builder removeValues(int index) { + if (valuesBuilder_ == null) { + ensureValuesIsMutable(); + values_.remove(index); + onChanged(); + } else { + valuesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * The values of `LIST` data type annotation.
+     * 
+ * + * repeated .google.cloud.visionai.v1.AnnotationValue values = 1; + */ + public com.google.cloud.visionai.v1.AnnotationValue.Builder getValuesBuilder(int index) { + return getValuesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * The values of `LIST` data type annotation.
+     * 
+ * + * repeated .google.cloud.visionai.v1.AnnotationValue values = 1; + */ + public com.google.cloud.visionai.v1.AnnotationValueOrBuilder getValuesOrBuilder(int index) { + if (valuesBuilder_ == null) { + return values_.get(index); + } else { + return valuesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * The values of `LIST` data type annotation.
+     * 
+ * + * repeated .google.cloud.visionai.v1.AnnotationValue values = 1; + */ + public java.util.List + getValuesOrBuilderList() { + if (valuesBuilder_ != null) { + return valuesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(values_); + } + } + /** + * + * + *
+     * The values of `LIST` data type annotation.
+     * 
+ * + * repeated .google.cloud.visionai.v1.AnnotationValue values = 1; + */ + public com.google.cloud.visionai.v1.AnnotationValue.Builder addValuesBuilder() { + return getValuesFieldBuilder() + .addBuilder(com.google.cloud.visionai.v1.AnnotationValue.getDefaultInstance()); + } + /** + * + * + *
+     * The values of `LIST` data type annotation.
+     * 
+ * + * repeated .google.cloud.visionai.v1.AnnotationValue values = 1; + */ + public com.google.cloud.visionai.v1.AnnotationValue.Builder addValuesBuilder(int index) { + return getValuesFieldBuilder() + .addBuilder(index, com.google.cloud.visionai.v1.AnnotationValue.getDefaultInstance()); + } + /** + * + * + *
+     * The values of `LIST` data type annotation.
+     * 
+ * + * repeated .google.cloud.visionai.v1.AnnotationValue values = 1; + */ + public java.util.List + getValuesBuilderList() { + return getValuesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.visionai.v1.AnnotationValue, + com.google.cloud.visionai.v1.AnnotationValue.Builder, + com.google.cloud.visionai.v1.AnnotationValueOrBuilder> + getValuesFieldBuilder() { + if (valuesBuilder_ == null) { + valuesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.visionai.v1.AnnotationValue, + com.google.cloud.visionai.v1.AnnotationValue.Builder, + com.google.cloud.visionai.v1.AnnotationValueOrBuilder>( + values_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + values_ = null; + } + return valuesBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.AnnotationList) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.AnnotationList) + private static final com.google.cloud.visionai.v1.AnnotationList DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.AnnotationList(); + } + + public static com.google.cloud.visionai.v1.AnnotationList getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AnnotationList parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.AnnotationList getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/AnnotationListOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/AnnotationListOrBuilder.java new file mode 100644 index 000000000000..b94583f62318 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/AnnotationListOrBuilder.java @@ -0,0 +1,78 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/warehouse.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface AnnotationListOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.AnnotationList) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The values of `LIST` data type annotation.
+   * 
+ * + * repeated .google.cloud.visionai.v1.AnnotationValue values = 1; + */ + java.util.List getValuesList(); + /** + * + * + *
+   * The values of `LIST` data type annotation.
+   * 
+ * + * repeated .google.cloud.visionai.v1.AnnotationValue values = 1; + */ + com.google.cloud.visionai.v1.AnnotationValue getValues(int index); + /** + * + * + *
+   * The values of `LIST` data type annotation.
+   * 
+ * + * repeated .google.cloud.visionai.v1.AnnotationValue values = 1; + */ + int getValuesCount(); + /** + * + * + *
+   * The values of `LIST` data type annotation.
+   * 
+ * + * repeated .google.cloud.visionai.v1.AnnotationValue values = 1; + */ + java.util.List + getValuesOrBuilderList(); + /** + * + * + *
+   * The values of `LIST` data type annotation.
+   * 
+ * + * repeated .google.cloud.visionai.v1.AnnotationValue values = 1; + */ + com.google.cloud.visionai.v1.AnnotationValueOrBuilder getValuesOrBuilder(int index); +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/AnnotationMatchingResult.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/AnnotationMatchingResult.java new file mode 100644 index 000000000000..74ed58041507 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/AnnotationMatchingResult.java @@ -0,0 +1,1516 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/warehouse.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * Stores the criteria-annotation matching results for each search result item.
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.AnnotationMatchingResult} + */ +public final class AnnotationMatchingResult extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.AnnotationMatchingResult) + AnnotationMatchingResultOrBuilder { + private static final long serialVersionUID = 0L; + // Use AnnotationMatchingResult.newBuilder() to construct. + private AnnotationMatchingResult(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private AnnotationMatchingResult() { + matchedAnnotations_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new AnnotationMatchingResult(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_AnnotationMatchingResult_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_AnnotationMatchingResult_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.AnnotationMatchingResult.class, + com.google.cloud.visionai.v1.AnnotationMatchingResult.Builder.class); + } + + private int bitField0_; + public static final int CRITERIA_FIELD_NUMBER = 1; + private com.google.cloud.visionai.v1.Criteria criteria_; + /** + * + * + *
+   * The criteria used for matching. It can be an input search criteria or a
+   * criteria converted from a facet selection.
+   * 
+ * + * .google.cloud.visionai.v1.Criteria criteria = 1; + * + * @return Whether the criteria field is set. + */ + @java.lang.Override + public boolean hasCriteria() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * The criteria used for matching. It can be an input search criteria or a
+   * criteria converted from a facet selection.
+   * 
+ * + * .google.cloud.visionai.v1.Criteria criteria = 1; + * + * @return The criteria. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.Criteria getCriteria() { + return criteria_ == null + ? com.google.cloud.visionai.v1.Criteria.getDefaultInstance() + : criteria_; + } + /** + * + * + *
+   * The criteria used for matching. It can be an input search criteria or a
+   * criteria converted from a facet selection.
+   * 
+ * + * .google.cloud.visionai.v1.Criteria criteria = 1; + */ + @java.lang.Override + public com.google.cloud.visionai.v1.CriteriaOrBuilder getCriteriaOrBuilder() { + return criteria_ == null + ? com.google.cloud.visionai.v1.Criteria.getDefaultInstance() + : criteria_; + } + + public static final int MATCHED_ANNOTATIONS_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private java.util.List matchedAnnotations_; + /** + * + * + *
+   * Matched annotations for the criteria.
+   * 
+ * + * repeated .google.cloud.visionai.v1.Annotation matched_annotations = 2; + */ + @java.lang.Override + public java.util.List getMatchedAnnotationsList() { + return matchedAnnotations_; + } + /** + * + * + *
+   * Matched annotations for the criteria.
+   * 
+ * + * repeated .google.cloud.visionai.v1.Annotation matched_annotations = 2; + */ + @java.lang.Override + public java.util.List + getMatchedAnnotationsOrBuilderList() { + return matchedAnnotations_; + } + /** + * + * + *
+   * Matched annotations for the criteria.
+   * 
+ * + * repeated .google.cloud.visionai.v1.Annotation matched_annotations = 2; + */ + @java.lang.Override + public int getMatchedAnnotationsCount() { + return matchedAnnotations_.size(); + } + /** + * + * + *
+   * Matched annotations for the criteria.
+   * 
+ * + * repeated .google.cloud.visionai.v1.Annotation matched_annotations = 2; + */ + @java.lang.Override + public com.google.cloud.visionai.v1.Annotation getMatchedAnnotations(int index) { + return matchedAnnotations_.get(index); + } + /** + * + * + *
+   * Matched annotations for the criteria.
+   * 
+ * + * repeated .google.cloud.visionai.v1.Annotation matched_annotations = 2; + */ + @java.lang.Override + public com.google.cloud.visionai.v1.AnnotationOrBuilder getMatchedAnnotationsOrBuilder( + int index) { + return matchedAnnotations_.get(index); + } + + public static final int STATUS_FIELD_NUMBER = 3; + private com.google.rpc.Status status_; + /** + * + * + *
+   * Status of the match result. Possible values:
+   * FAILED_PRECONDITION - the criteria is not eligible for match.
+   * OK - matching is performed.
+   * 
+ * + * .google.rpc.Status status = 3; + * + * @return Whether the status field is set. + */ + @java.lang.Override + public boolean hasStatus() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+   * Status of the match result. Possible values:
+   * FAILED_PRECONDITION - the criteria is not eligible for match.
+   * OK - matching is performed.
+   * 
+ * + * .google.rpc.Status status = 3; + * + * @return The status. + */ + @java.lang.Override + public com.google.rpc.Status getStatus() { + return status_ == null ? com.google.rpc.Status.getDefaultInstance() : status_; + } + /** + * + * + *
+   * Status of the match result. Possible values:
+   * FAILED_PRECONDITION - the criteria is not eligible for match.
+   * OK - matching is performed.
+   * 
+ * + * .google.rpc.Status status = 3; + */ + @java.lang.Override + public com.google.rpc.StatusOrBuilder getStatusOrBuilder() { + return status_ == null ? com.google.rpc.Status.getDefaultInstance() : status_; + } + + 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 (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getCriteria()); + } + for (int i = 0; i < matchedAnnotations_.size(); i++) { + output.writeMessage(2, matchedAnnotations_.get(i)); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(3, getStatus()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getCriteria()); + } + for (int i = 0; i < matchedAnnotations_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(2, matchedAnnotations_.get(i)); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getStatus()); + } + size += getUnknownFields().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.visionai.v1.AnnotationMatchingResult)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.AnnotationMatchingResult other = + (com.google.cloud.visionai.v1.AnnotationMatchingResult) obj; + + if (hasCriteria() != other.hasCriteria()) return false; + if (hasCriteria()) { + if (!getCriteria().equals(other.getCriteria())) return false; + } + if (!getMatchedAnnotationsList().equals(other.getMatchedAnnotationsList())) return false; + if (hasStatus() != other.hasStatus()) return false; + if (hasStatus()) { + if (!getStatus().equals(other.getStatus())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasCriteria()) { + hash = (37 * hash) + CRITERIA_FIELD_NUMBER; + hash = (53 * hash) + getCriteria().hashCode(); + } + if (getMatchedAnnotationsCount() > 0) { + hash = (37 * hash) + MATCHED_ANNOTATIONS_FIELD_NUMBER; + hash = (53 * hash) + getMatchedAnnotationsList().hashCode(); + } + if (hasStatus()) { + hash = (37 * hash) + STATUS_FIELD_NUMBER; + hash = (53 * hash) + getStatus().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.AnnotationMatchingResult parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.AnnotationMatchingResult 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.visionai.v1.AnnotationMatchingResult parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.AnnotationMatchingResult 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.visionai.v1.AnnotationMatchingResult parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.AnnotationMatchingResult parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.AnnotationMatchingResult parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.AnnotationMatchingResult 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.visionai.v1.AnnotationMatchingResult parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.AnnotationMatchingResult 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.visionai.v1.AnnotationMatchingResult parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.AnnotationMatchingResult 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.visionai.v1.AnnotationMatchingResult 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; + } + /** + * + * + *
+   * Stores the criteria-annotation matching results for each search result item.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.AnnotationMatchingResult} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.AnnotationMatchingResult) + com.google.cloud.visionai.v1.AnnotationMatchingResultOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_AnnotationMatchingResult_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_AnnotationMatchingResult_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.AnnotationMatchingResult.class, + com.google.cloud.visionai.v1.AnnotationMatchingResult.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.AnnotationMatchingResult.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getCriteriaFieldBuilder(); + getMatchedAnnotationsFieldBuilder(); + getStatusFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + criteria_ = null; + if (criteriaBuilder_ != null) { + criteriaBuilder_.dispose(); + criteriaBuilder_ = null; + } + if (matchedAnnotationsBuilder_ == null) { + matchedAnnotations_ = java.util.Collections.emptyList(); + } else { + matchedAnnotations_ = null; + matchedAnnotationsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + status_ = null; + if (statusBuilder_ != null) { + statusBuilder_.dispose(); + statusBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_AnnotationMatchingResult_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.AnnotationMatchingResult getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.AnnotationMatchingResult.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.AnnotationMatchingResult build() { + com.google.cloud.visionai.v1.AnnotationMatchingResult result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.AnnotationMatchingResult buildPartial() { + com.google.cloud.visionai.v1.AnnotationMatchingResult result = + new com.google.cloud.visionai.v1.AnnotationMatchingResult(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.visionai.v1.AnnotationMatchingResult result) { + if (matchedAnnotationsBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + matchedAnnotations_ = java.util.Collections.unmodifiableList(matchedAnnotations_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.matchedAnnotations_ = matchedAnnotations_; + } else { + result.matchedAnnotations_ = matchedAnnotationsBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.visionai.v1.AnnotationMatchingResult result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.criteria_ = criteriaBuilder_ == null ? criteria_ : criteriaBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.status_ = statusBuilder_ == null ? status_ : statusBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.AnnotationMatchingResult) { + return mergeFrom((com.google.cloud.visionai.v1.AnnotationMatchingResult) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.AnnotationMatchingResult other) { + if (other == com.google.cloud.visionai.v1.AnnotationMatchingResult.getDefaultInstance()) + return this; + if (other.hasCriteria()) { + mergeCriteria(other.getCriteria()); + } + if (matchedAnnotationsBuilder_ == null) { + if (!other.matchedAnnotations_.isEmpty()) { + if (matchedAnnotations_.isEmpty()) { + matchedAnnotations_ = other.matchedAnnotations_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureMatchedAnnotationsIsMutable(); + matchedAnnotations_.addAll(other.matchedAnnotations_); + } + onChanged(); + } + } else { + if (!other.matchedAnnotations_.isEmpty()) { + if (matchedAnnotationsBuilder_.isEmpty()) { + matchedAnnotationsBuilder_.dispose(); + matchedAnnotationsBuilder_ = null; + matchedAnnotations_ = other.matchedAnnotations_; + bitField0_ = (bitField0_ & ~0x00000002); + matchedAnnotationsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getMatchedAnnotationsFieldBuilder() + : null; + } else { + matchedAnnotationsBuilder_.addAllMessages(other.matchedAnnotations_); + } + } + } + if (other.hasStatus()) { + mergeStatus(other.getStatus()); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getCriteriaFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + com.google.cloud.visionai.v1.Annotation m = + input.readMessage( + com.google.cloud.visionai.v1.Annotation.parser(), extensionRegistry); + if (matchedAnnotationsBuilder_ == null) { + ensureMatchedAnnotationsIsMutable(); + matchedAnnotations_.add(m); + } else { + matchedAnnotationsBuilder_.addMessage(m); + } + break; + } // case 18 + case 26: + { + input.readMessage(getStatusFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.cloud.visionai.v1.Criteria criteria_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.Criteria, + com.google.cloud.visionai.v1.Criteria.Builder, + com.google.cloud.visionai.v1.CriteriaOrBuilder> + criteriaBuilder_; + /** + * + * + *
+     * The criteria used for matching. It can be an input search criteria or a
+     * criteria converted from a facet selection.
+     * 
+ * + * .google.cloud.visionai.v1.Criteria criteria = 1; + * + * @return Whether the criteria field is set. + */ + public boolean hasCriteria() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * The criteria used for matching. It can be an input search criteria or a
+     * criteria converted from a facet selection.
+     * 
+ * + * .google.cloud.visionai.v1.Criteria criteria = 1; + * + * @return The criteria. + */ + public com.google.cloud.visionai.v1.Criteria getCriteria() { + if (criteriaBuilder_ == null) { + return criteria_ == null + ? com.google.cloud.visionai.v1.Criteria.getDefaultInstance() + : criteria_; + } else { + return criteriaBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The criteria used for matching. It can be an input search criteria or a
+     * criteria converted from a facet selection.
+     * 
+ * + * .google.cloud.visionai.v1.Criteria criteria = 1; + */ + public Builder setCriteria(com.google.cloud.visionai.v1.Criteria value) { + if (criteriaBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + criteria_ = value; + } else { + criteriaBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The criteria used for matching. It can be an input search criteria or a
+     * criteria converted from a facet selection.
+     * 
+ * + * .google.cloud.visionai.v1.Criteria criteria = 1; + */ + public Builder setCriteria(com.google.cloud.visionai.v1.Criteria.Builder builderForValue) { + if (criteriaBuilder_ == null) { + criteria_ = builderForValue.build(); + } else { + criteriaBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The criteria used for matching. It can be an input search criteria or a
+     * criteria converted from a facet selection.
+     * 
+ * + * .google.cloud.visionai.v1.Criteria criteria = 1; + */ + public Builder mergeCriteria(com.google.cloud.visionai.v1.Criteria value) { + if (criteriaBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && criteria_ != null + && criteria_ != com.google.cloud.visionai.v1.Criteria.getDefaultInstance()) { + getCriteriaBuilder().mergeFrom(value); + } else { + criteria_ = value; + } + } else { + criteriaBuilder_.mergeFrom(value); + } + if (criteria_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + /** + * + * + *
+     * The criteria used for matching. It can be an input search criteria or a
+     * criteria converted from a facet selection.
+     * 
+ * + * .google.cloud.visionai.v1.Criteria criteria = 1; + */ + public Builder clearCriteria() { + bitField0_ = (bitField0_ & ~0x00000001); + criteria_ = null; + if (criteriaBuilder_ != null) { + criteriaBuilder_.dispose(); + criteriaBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * The criteria used for matching. It can be an input search criteria or a
+     * criteria converted from a facet selection.
+     * 
+ * + * .google.cloud.visionai.v1.Criteria criteria = 1; + */ + public com.google.cloud.visionai.v1.Criteria.Builder getCriteriaBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getCriteriaFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The criteria used for matching. It can be an input search criteria or a
+     * criteria converted from a facet selection.
+     * 
+ * + * .google.cloud.visionai.v1.Criteria criteria = 1; + */ + public com.google.cloud.visionai.v1.CriteriaOrBuilder getCriteriaOrBuilder() { + if (criteriaBuilder_ != null) { + return criteriaBuilder_.getMessageOrBuilder(); + } else { + return criteria_ == null + ? com.google.cloud.visionai.v1.Criteria.getDefaultInstance() + : criteria_; + } + } + /** + * + * + *
+     * The criteria used for matching. It can be an input search criteria or a
+     * criteria converted from a facet selection.
+     * 
+ * + * .google.cloud.visionai.v1.Criteria criteria = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.Criteria, + com.google.cloud.visionai.v1.Criteria.Builder, + com.google.cloud.visionai.v1.CriteriaOrBuilder> + getCriteriaFieldBuilder() { + if (criteriaBuilder_ == null) { + criteriaBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.Criteria, + com.google.cloud.visionai.v1.Criteria.Builder, + com.google.cloud.visionai.v1.CriteriaOrBuilder>( + getCriteria(), getParentForChildren(), isClean()); + criteria_ = null; + } + return criteriaBuilder_; + } + + private java.util.List matchedAnnotations_ = + java.util.Collections.emptyList(); + + private void ensureMatchedAnnotationsIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + matchedAnnotations_ = + new java.util.ArrayList(matchedAnnotations_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.visionai.v1.Annotation, + com.google.cloud.visionai.v1.Annotation.Builder, + com.google.cloud.visionai.v1.AnnotationOrBuilder> + matchedAnnotationsBuilder_; + + /** + * + * + *
+     * Matched annotations for the criteria.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Annotation matched_annotations = 2; + */ + public java.util.List getMatchedAnnotationsList() { + if (matchedAnnotationsBuilder_ == null) { + return java.util.Collections.unmodifiableList(matchedAnnotations_); + } else { + return matchedAnnotationsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Matched annotations for the criteria.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Annotation matched_annotations = 2; + */ + public int getMatchedAnnotationsCount() { + if (matchedAnnotationsBuilder_ == null) { + return matchedAnnotations_.size(); + } else { + return matchedAnnotationsBuilder_.getCount(); + } + } + /** + * + * + *
+     * Matched annotations for the criteria.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Annotation matched_annotations = 2; + */ + public com.google.cloud.visionai.v1.Annotation getMatchedAnnotations(int index) { + if (matchedAnnotationsBuilder_ == null) { + return matchedAnnotations_.get(index); + } else { + return matchedAnnotationsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Matched annotations for the criteria.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Annotation matched_annotations = 2; + */ + public Builder setMatchedAnnotations(int index, com.google.cloud.visionai.v1.Annotation value) { + if (matchedAnnotationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMatchedAnnotationsIsMutable(); + matchedAnnotations_.set(index, value); + onChanged(); + } else { + matchedAnnotationsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Matched annotations for the criteria.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Annotation matched_annotations = 2; + */ + public Builder setMatchedAnnotations( + int index, com.google.cloud.visionai.v1.Annotation.Builder builderForValue) { + if (matchedAnnotationsBuilder_ == null) { + ensureMatchedAnnotationsIsMutable(); + matchedAnnotations_.set(index, builderForValue.build()); + onChanged(); + } else { + matchedAnnotationsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Matched annotations for the criteria.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Annotation matched_annotations = 2; + */ + public Builder addMatchedAnnotations(com.google.cloud.visionai.v1.Annotation value) { + if (matchedAnnotationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMatchedAnnotationsIsMutable(); + matchedAnnotations_.add(value); + onChanged(); + } else { + matchedAnnotationsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Matched annotations for the criteria.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Annotation matched_annotations = 2; + */ + public Builder addMatchedAnnotations(int index, com.google.cloud.visionai.v1.Annotation value) { + if (matchedAnnotationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMatchedAnnotationsIsMutable(); + matchedAnnotations_.add(index, value); + onChanged(); + } else { + matchedAnnotationsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Matched annotations for the criteria.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Annotation matched_annotations = 2; + */ + public Builder addMatchedAnnotations( + com.google.cloud.visionai.v1.Annotation.Builder builderForValue) { + if (matchedAnnotationsBuilder_ == null) { + ensureMatchedAnnotationsIsMutable(); + matchedAnnotations_.add(builderForValue.build()); + onChanged(); + } else { + matchedAnnotationsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Matched annotations for the criteria.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Annotation matched_annotations = 2; + */ + public Builder addMatchedAnnotations( + int index, com.google.cloud.visionai.v1.Annotation.Builder builderForValue) { + if (matchedAnnotationsBuilder_ == null) { + ensureMatchedAnnotationsIsMutable(); + matchedAnnotations_.add(index, builderForValue.build()); + onChanged(); + } else { + matchedAnnotationsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Matched annotations for the criteria.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Annotation matched_annotations = 2; + */ + public Builder addAllMatchedAnnotations( + java.lang.Iterable values) { + if (matchedAnnotationsBuilder_ == null) { + ensureMatchedAnnotationsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, matchedAnnotations_); + onChanged(); + } else { + matchedAnnotationsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Matched annotations for the criteria.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Annotation matched_annotations = 2; + */ + public Builder clearMatchedAnnotations() { + if (matchedAnnotationsBuilder_ == null) { + matchedAnnotations_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + matchedAnnotationsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Matched annotations for the criteria.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Annotation matched_annotations = 2; + */ + public Builder removeMatchedAnnotations(int index) { + if (matchedAnnotationsBuilder_ == null) { + ensureMatchedAnnotationsIsMutable(); + matchedAnnotations_.remove(index); + onChanged(); + } else { + matchedAnnotationsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Matched annotations for the criteria.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Annotation matched_annotations = 2; + */ + public com.google.cloud.visionai.v1.Annotation.Builder getMatchedAnnotationsBuilder(int index) { + return getMatchedAnnotationsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Matched annotations for the criteria.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Annotation matched_annotations = 2; + */ + public com.google.cloud.visionai.v1.AnnotationOrBuilder getMatchedAnnotationsOrBuilder( + int index) { + if (matchedAnnotationsBuilder_ == null) { + return matchedAnnotations_.get(index); + } else { + return matchedAnnotationsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Matched annotations for the criteria.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Annotation matched_annotations = 2; + */ + public java.util.List + getMatchedAnnotationsOrBuilderList() { + if (matchedAnnotationsBuilder_ != null) { + return matchedAnnotationsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(matchedAnnotations_); + } + } + /** + * + * + *
+     * Matched annotations for the criteria.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Annotation matched_annotations = 2; + */ + public com.google.cloud.visionai.v1.Annotation.Builder addMatchedAnnotationsBuilder() { + return getMatchedAnnotationsFieldBuilder() + .addBuilder(com.google.cloud.visionai.v1.Annotation.getDefaultInstance()); + } + /** + * + * + *
+     * Matched annotations for the criteria.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Annotation matched_annotations = 2; + */ + public com.google.cloud.visionai.v1.Annotation.Builder addMatchedAnnotationsBuilder(int index) { + return getMatchedAnnotationsFieldBuilder() + .addBuilder(index, com.google.cloud.visionai.v1.Annotation.getDefaultInstance()); + } + /** + * + * + *
+     * Matched annotations for the criteria.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Annotation matched_annotations = 2; + */ + public java.util.List + getMatchedAnnotationsBuilderList() { + return getMatchedAnnotationsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.visionai.v1.Annotation, + com.google.cloud.visionai.v1.Annotation.Builder, + com.google.cloud.visionai.v1.AnnotationOrBuilder> + getMatchedAnnotationsFieldBuilder() { + if (matchedAnnotationsBuilder_ == null) { + matchedAnnotationsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.visionai.v1.Annotation, + com.google.cloud.visionai.v1.Annotation.Builder, + com.google.cloud.visionai.v1.AnnotationOrBuilder>( + matchedAnnotations_, + ((bitField0_ & 0x00000002) != 0), + getParentForChildren(), + isClean()); + matchedAnnotations_ = null; + } + return matchedAnnotationsBuilder_; + } + + private com.google.rpc.Status status_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> + statusBuilder_; + /** + * + * + *
+     * Status of the match result. Possible values:
+     * FAILED_PRECONDITION - the criteria is not eligible for match.
+     * OK - matching is performed.
+     * 
+ * + * .google.rpc.Status status = 3; + * + * @return Whether the status field is set. + */ + public boolean hasStatus() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+     * Status of the match result. Possible values:
+     * FAILED_PRECONDITION - the criteria is not eligible for match.
+     * OK - matching is performed.
+     * 
+ * + * .google.rpc.Status status = 3; + * + * @return The status. + */ + public com.google.rpc.Status getStatus() { + if (statusBuilder_ == null) { + return status_ == null ? com.google.rpc.Status.getDefaultInstance() : status_; + } else { + return statusBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Status of the match result. Possible values:
+     * FAILED_PRECONDITION - the criteria is not eligible for match.
+     * OK - matching is performed.
+     * 
+ * + * .google.rpc.Status status = 3; + */ + public Builder setStatus(com.google.rpc.Status value) { + if (statusBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + status_ = value; + } else { + statusBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Status of the match result. Possible values:
+     * FAILED_PRECONDITION - the criteria is not eligible for match.
+     * OK - matching is performed.
+     * 
+ * + * .google.rpc.Status status = 3; + */ + public Builder setStatus(com.google.rpc.Status.Builder builderForValue) { + if (statusBuilder_ == null) { + status_ = builderForValue.build(); + } else { + statusBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Status of the match result. Possible values:
+     * FAILED_PRECONDITION - the criteria is not eligible for match.
+     * OK - matching is performed.
+     * 
+ * + * .google.rpc.Status status = 3; + */ + public Builder mergeStatus(com.google.rpc.Status value) { + if (statusBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && status_ != null + && status_ != com.google.rpc.Status.getDefaultInstance()) { + getStatusBuilder().mergeFrom(value); + } else { + status_ = value; + } + } else { + statusBuilder_.mergeFrom(value); + } + if (status_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Status of the match result. Possible values:
+     * FAILED_PRECONDITION - the criteria is not eligible for match.
+     * OK - matching is performed.
+     * 
+ * + * .google.rpc.Status status = 3; + */ + public Builder clearStatus() { + bitField0_ = (bitField0_ & ~0x00000004); + status_ = null; + if (statusBuilder_ != null) { + statusBuilder_.dispose(); + statusBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Status of the match result. Possible values:
+     * FAILED_PRECONDITION - the criteria is not eligible for match.
+     * OK - matching is performed.
+     * 
+ * + * .google.rpc.Status status = 3; + */ + public com.google.rpc.Status.Builder getStatusBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getStatusFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Status of the match result. Possible values:
+     * FAILED_PRECONDITION - the criteria is not eligible for match.
+     * OK - matching is performed.
+     * 
+ * + * .google.rpc.Status status = 3; + */ + public com.google.rpc.StatusOrBuilder getStatusOrBuilder() { + if (statusBuilder_ != null) { + return statusBuilder_.getMessageOrBuilder(); + } else { + return status_ == null ? com.google.rpc.Status.getDefaultInstance() : status_; + } + } + /** + * + * + *
+     * Status of the match result. Possible values:
+     * FAILED_PRECONDITION - the criteria is not eligible for match.
+     * OK - matching is performed.
+     * 
+ * + * .google.rpc.Status status = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> + getStatusFieldBuilder() { + if (statusBuilder_ == null) { + statusBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.rpc.Status, + com.google.rpc.Status.Builder, + com.google.rpc.StatusOrBuilder>(getStatus(), getParentForChildren(), isClean()); + status_ = null; + } + return statusBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.AnnotationMatchingResult) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.AnnotationMatchingResult) + private static final com.google.cloud.visionai.v1.AnnotationMatchingResult DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.AnnotationMatchingResult(); + } + + public static com.google.cloud.visionai.v1.AnnotationMatchingResult getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AnnotationMatchingResult parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.AnnotationMatchingResult getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/AnnotationMatchingResultOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/AnnotationMatchingResultOrBuilder.java new file mode 100644 index 000000000000..c8043b486b4b --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/AnnotationMatchingResultOrBuilder.java @@ -0,0 +1,157 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/warehouse.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface AnnotationMatchingResultOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.AnnotationMatchingResult) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The criteria used for matching. It can be an input search criteria or a
+   * criteria converted from a facet selection.
+   * 
+ * + * .google.cloud.visionai.v1.Criteria criteria = 1; + * + * @return Whether the criteria field is set. + */ + boolean hasCriteria(); + /** + * + * + *
+   * The criteria used for matching. It can be an input search criteria or a
+   * criteria converted from a facet selection.
+   * 
+ * + * .google.cloud.visionai.v1.Criteria criteria = 1; + * + * @return The criteria. + */ + com.google.cloud.visionai.v1.Criteria getCriteria(); + /** + * + * + *
+   * The criteria used for matching. It can be an input search criteria or a
+   * criteria converted from a facet selection.
+   * 
+ * + * .google.cloud.visionai.v1.Criteria criteria = 1; + */ + com.google.cloud.visionai.v1.CriteriaOrBuilder getCriteriaOrBuilder(); + + /** + * + * + *
+   * Matched annotations for the criteria.
+   * 
+ * + * repeated .google.cloud.visionai.v1.Annotation matched_annotations = 2; + */ + java.util.List getMatchedAnnotationsList(); + /** + * + * + *
+   * Matched annotations for the criteria.
+   * 
+ * + * repeated .google.cloud.visionai.v1.Annotation matched_annotations = 2; + */ + com.google.cloud.visionai.v1.Annotation getMatchedAnnotations(int index); + /** + * + * + *
+   * Matched annotations for the criteria.
+   * 
+ * + * repeated .google.cloud.visionai.v1.Annotation matched_annotations = 2; + */ + int getMatchedAnnotationsCount(); + /** + * + * + *
+   * Matched annotations for the criteria.
+   * 
+ * + * repeated .google.cloud.visionai.v1.Annotation matched_annotations = 2; + */ + java.util.List + getMatchedAnnotationsOrBuilderList(); + /** + * + * + *
+   * Matched annotations for the criteria.
+   * 
+ * + * repeated .google.cloud.visionai.v1.Annotation matched_annotations = 2; + */ + com.google.cloud.visionai.v1.AnnotationOrBuilder getMatchedAnnotationsOrBuilder(int index); + + /** + * + * + *
+   * Status of the match result. Possible values:
+   * FAILED_PRECONDITION - the criteria is not eligible for match.
+   * OK - matching is performed.
+   * 
+ * + * .google.rpc.Status status = 3; + * + * @return Whether the status field is set. + */ + boolean hasStatus(); + /** + * + * + *
+   * Status of the match result. Possible values:
+   * FAILED_PRECONDITION - the criteria is not eligible for match.
+   * OK - matching is performed.
+   * 
+ * + * .google.rpc.Status status = 3; + * + * @return The status. + */ + com.google.rpc.Status getStatus(); + /** + * + * + *
+   * Status of the match result. Possible values:
+   * FAILED_PRECONDITION - the criteria is not eligible for match.
+   * OK - matching is performed.
+   * 
+ * + * .google.rpc.Status status = 3; + */ + com.google.rpc.StatusOrBuilder getStatusOrBuilder(); +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/AnnotationName.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/AnnotationName.java new file mode 100644 index 000000000000..becd2e586145 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/AnnotationName.java @@ -0,0 +1,298 @@ +/* + * Copyright 2024 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.visionai.v1; + +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") +public class AnnotationName implements ResourceName { + private static final PathTemplate PROJECT_NUMBER_LOCATION_CORPUS_ASSET_ANNOTATION = + PathTemplate.createWithoutUrlEncoding( + "projects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset}/annotations/{annotation}"); + private volatile Map fieldValuesMap; + private final String projectNumber; + private final String location; + private final String corpus; + private final String asset; + private final String annotation; + + @Deprecated + protected AnnotationName() { + projectNumber = null; + location = null; + corpus = null; + asset = null; + annotation = null; + } + + private AnnotationName(Builder builder) { + projectNumber = Preconditions.checkNotNull(builder.getProjectNumber()); + location = Preconditions.checkNotNull(builder.getLocation()); + corpus = Preconditions.checkNotNull(builder.getCorpus()); + asset = Preconditions.checkNotNull(builder.getAsset()); + annotation = Preconditions.checkNotNull(builder.getAnnotation()); + } + + public String getProjectNumber() { + return projectNumber; + } + + public String getLocation() { + return location; + } + + public String getCorpus() { + return corpus; + } + + public String getAsset() { + return asset; + } + + public String getAnnotation() { + return annotation; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static AnnotationName of( + String projectNumber, String location, String corpus, String asset, String annotation) { + return newBuilder() + .setProjectNumber(projectNumber) + .setLocation(location) + .setCorpus(corpus) + .setAsset(asset) + .setAnnotation(annotation) + .build(); + } + + public static String format( + String projectNumber, String location, String corpus, String asset, String annotation) { + return newBuilder() + .setProjectNumber(projectNumber) + .setLocation(location) + .setCorpus(corpus) + .setAsset(asset) + .setAnnotation(annotation) + .build() + .toString(); + } + + public static AnnotationName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_NUMBER_LOCATION_CORPUS_ASSET_ANNOTATION.validatedMatch( + formattedString, "AnnotationName.parse: formattedString not in valid format"); + return of( + matchMap.get("project_number"), + matchMap.get("location"), + matchMap.get("corpus"), + matchMap.get("asset"), + matchMap.get("annotation")); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List values) { + List list = new ArrayList<>(values.size()); + for (AnnotationName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_NUMBER_LOCATION_CORPUS_ASSET_ANNOTATION.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (projectNumber != null) { + fieldMapBuilder.put("project_number", projectNumber); + } + if (location != null) { + fieldMapBuilder.put("location", location); + } + if (corpus != null) { + fieldMapBuilder.put("corpus", corpus); + } + if (asset != null) { + fieldMapBuilder.put("asset", asset); + } + if (annotation != null) { + fieldMapBuilder.put("annotation", annotation); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_NUMBER_LOCATION_CORPUS_ASSET_ANNOTATION.instantiate( + "project_number", + projectNumber, + "location", + location, + "corpus", + corpus, + "asset", + asset, + "annotation", + annotation); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null && getClass() == o.getClass()) { + AnnotationName that = ((AnnotationName) o); + return Objects.equals(this.projectNumber, that.projectNumber) + && Objects.equals(this.location, that.location) + && Objects.equals(this.corpus, that.corpus) + && Objects.equals(this.asset, that.asset) + && Objects.equals(this.annotation, that.annotation); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(projectNumber); + h *= 1000003; + h ^= Objects.hashCode(location); + h *= 1000003; + h ^= Objects.hashCode(corpus); + h *= 1000003; + h ^= Objects.hashCode(asset); + h *= 1000003; + h ^= Objects.hashCode(annotation); + return h; + } + + /** + * Builder for + * projects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset}/annotations/{annotation}. + */ + public static class Builder { + private String projectNumber; + private String location; + private String corpus; + private String asset; + private String annotation; + + protected Builder() {} + + public String getProjectNumber() { + return projectNumber; + } + + public String getLocation() { + return location; + } + + public String getCorpus() { + return corpus; + } + + public String getAsset() { + return asset; + } + + public String getAnnotation() { + return annotation; + } + + public Builder setProjectNumber(String projectNumber) { + this.projectNumber = projectNumber; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setCorpus(String corpus) { + this.corpus = corpus; + return this; + } + + public Builder setAsset(String asset) { + this.asset = asset; + return this; + } + + public Builder setAnnotation(String annotation) { + this.annotation = annotation; + return this; + } + + private Builder(AnnotationName annotationName) { + this.projectNumber = annotationName.projectNumber; + this.location = annotationName.location; + this.corpus = annotationName.corpus; + this.asset = annotationName.asset; + this.annotation = annotationName.annotation; + } + + public AnnotationName build() { + return new AnnotationName(this); + } + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/AnnotationOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/AnnotationOrBuilder.java new file mode 100644 index 000000000000..cbe7b4d9444d --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/AnnotationOrBuilder.java @@ -0,0 +1,91 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/warehouse.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface AnnotationOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.Annotation) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Resource name of the annotation.
+   * Format:
+   * `projects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset}/annotations/{annotation}`
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Resource name of the annotation.
+   * Format:
+   * `projects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset}/annotations/{annotation}`
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * User provided annotation.
+   * 
+ * + * .google.cloud.visionai.v1.UserSpecifiedAnnotation user_specified_annotation = 2; + * + * @return Whether the userSpecifiedAnnotation field is set. + */ + boolean hasUserSpecifiedAnnotation(); + /** + * + * + *
+   * User provided annotation.
+   * 
+ * + * .google.cloud.visionai.v1.UserSpecifiedAnnotation user_specified_annotation = 2; + * + * @return The userSpecifiedAnnotation. + */ + com.google.cloud.visionai.v1.UserSpecifiedAnnotation getUserSpecifiedAnnotation(); + /** + * + * + *
+   * User provided annotation.
+   * 
+ * + * .google.cloud.visionai.v1.UserSpecifiedAnnotation user_specified_annotation = 2; + */ + com.google.cloud.visionai.v1.UserSpecifiedAnnotationOrBuilder + getUserSpecifiedAnnotationOrBuilder(); +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/AnnotationValue.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/AnnotationValue.java new file mode 100644 index 000000000000..be8ac2506812 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/AnnotationValue.java @@ -0,0 +1,2888 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/warehouse.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * Value of annotation, including all types available in data schema.
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.AnnotationValue} + */ +public final class AnnotationValue extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.AnnotationValue) + AnnotationValueOrBuilder { + private static final long serialVersionUID = 0L; + // Use AnnotationValue.newBuilder() to construct. + private AnnotationValue(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private AnnotationValue() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new AnnotationValue(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_AnnotationValue_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_AnnotationValue_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.AnnotationValue.class, + com.google.cloud.visionai.v1.AnnotationValue.Builder.class); + } + + private int valueCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object value_; + + public enum ValueCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + INT_VALUE(1), + FLOAT_VALUE(2), + STR_VALUE(3), + DATETIME_VALUE(5), + GEO_COORDINATE(7), + PROTO_ANY_VALUE(8), + BOOL_VALUE(9), + CUSTOMIZED_STRUCT_DATA_VALUE(10), + LIST_VALUE(11), + CUSTOMIZED_STRUCT_VALUE(6), + VALUE_NOT_SET(0); + private final int value; + + private ValueCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static ValueCase valueOf(int value) { + return forNumber(value); + } + + public static ValueCase forNumber(int value) { + switch (value) { + case 1: + return INT_VALUE; + case 2: + return FLOAT_VALUE; + case 3: + return STR_VALUE; + case 5: + return DATETIME_VALUE; + case 7: + return GEO_COORDINATE; + case 8: + return PROTO_ANY_VALUE; + case 9: + return BOOL_VALUE; + case 10: + return CUSTOMIZED_STRUCT_DATA_VALUE; + case 11: + return LIST_VALUE; + case 6: + return CUSTOMIZED_STRUCT_VALUE; + case 0: + return VALUE_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public ValueCase getValueCase() { + return ValueCase.forNumber(valueCase_); + } + + public static final int INT_VALUE_FIELD_NUMBER = 1; + /** + * + * + *
+   * Value of int type annotation.
+   * 
+ * + * int64 int_value = 1; + * + * @return Whether the intValue field is set. + */ + @java.lang.Override + public boolean hasIntValue() { + return valueCase_ == 1; + } + /** + * + * + *
+   * Value of int type annotation.
+   * 
+ * + * int64 int_value = 1; + * + * @return The intValue. + */ + @java.lang.Override + public long getIntValue() { + if (valueCase_ == 1) { + return (java.lang.Long) value_; + } + return 0L; + } + + public static final int FLOAT_VALUE_FIELD_NUMBER = 2; + /** + * + * + *
+   * Value of float type annotation.
+   * 
+ * + * float float_value = 2; + * + * @return Whether the floatValue field is set. + */ + @java.lang.Override + public boolean hasFloatValue() { + return valueCase_ == 2; + } + /** + * + * + *
+   * Value of float type annotation.
+   * 
+ * + * float float_value = 2; + * + * @return The floatValue. + */ + @java.lang.Override + public float getFloatValue() { + if (valueCase_ == 2) { + return (java.lang.Float) value_; + } + return 0F; + } + + public static final int STR_VALUE_FIELD_NUMBER = 3; + /** + * + * + *
+   * Value of string type annotation.
+   * 
+ * + * string str_value = 3; + * + * @return Whether the strValue field is set. + */ + public boolean hasStrValue() { + return valueCase_ == 3; + } + /** + * + * + *
+   * Value of string type annotation.
+   * 
+ * + * string str_value = 3; + * + * @return The strValue. + */ + public java.lang.String getStrValue() { + java.lang.Object ref = ""; + if (valueCase_ == 3) { + ref = value_; + } + 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(); + if (valueCase_ == 3) { + value_ = s; + } + return s; + } + } + /** + * + * + *
+   * Value of string type annotation.
+   * 
+ * + * string str_value = 3; + * + * @return The bytes for strValue. + */ + public com.google.protobuf.ByteString getStrValueBytes() { + java.lang.Object ref = ""; + if (valueCase_ == 3) { + ref = value_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (valueCase_ == 3) { + value_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DATETIME_VALUE_FIELD_NUMBER = 5; + /** + * + * + *
+   * Value of date time type annotation.
+   * 
+ * + * string datetime_value = 5; + * + * @return Whether the datetimeValue field is set. + */ + public boolean hasDatetimeValue() { + return valueCase_ == 5; + } + /** + * + * + *
+   * Value of date time type annotation.
+   * 
+ * + * string datetime_value = 5; + * + * @return The datetimeValue. + */ + public java.lang.String getDatetimeValue() { + java.lang.Object ref = ""; + if (valueCase_ == 5) { + ref = value_; + } + 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(); + if (valueCase_ == 5) { + value_ = s; + } + return s; + } + } + /** + * + * + *
+   * Value of date time type annotation.
+   * 
+ * + * string datetime_value = 5; + * + * @return The bytes for datetimeValue. + */ + public com.google.protobuf.ByteString getDatetimeValueBytes() { + java.lang.Object ref = ""; + if (valueCase_ == 5) { + ref = value_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (valueCase_ == 5) { + value_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int GEO_COORDINATE_FIELD_NUMBER = 7; + /** + * + * + *
+   * Value of geo coordinate type annotation.
+   * 
+ * + * .google.cloud.visionai.v1.GeoCoordinate geo_coordinate = 7; + * + * @return Whether the geoCoordinate field is set. + */ + @java.lang.Override + public boolean hasGeoCoordinate() { + return valueCase_ == 7; + } + /** + * + * + *
+   * Value of geo coordinate type annotation.
+   * 
+ * + * .google.cloud.visionai.v1.GeoCoordinate geo_coordinate = 7; + * + * @return The geoCoordinate. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.GeoCoordinate getGeoCoordinate() { + if (valueCase_ == 7) { + return (com.google.cloud.visionai.v1.GeoCoordinate) value_; + } + return com.google.cloud.visionai.v1.GeoCoordinate.getDefaultInstance(); + } + /** + * + * + *
+   * Value of geo coordinate type annotation.
+   * 
+ * + * .google.cloud.visionai.v1.GeoCoordinate geo_coordinate = 7; + */ + @java.lang.Override + public com.google.cloud.visionai.v1.GeoCoordinateOrBuilder getGeoCoordinateOrBuilder() { + if (valueCase_ == 7) { + return (com.google.cloud.visionai.v1.GeoCoordinate) value_; + } + return com.google.cloud.visionai.v1.GeoCoordinate.getDefaultInstance(); + } + + public static final int PROTO_ANY_VALUE_FIELD_NUMBER = 8; + /** + * + * + *
+   * Value of any proto value.
+   * 
+ * + * .google.protobuf.Any proto_any_value = 8; + * + * @return Whether the protoAnyValue field is set. + */ + @java.lang.Override + public boolean hasProtoAnyValue() { + return valueCase_ == 8; + } + /** + * + * + *
+   * Value of any proto value.
+   * 
+ * + * .google.protobuf.Any proto_any_value = 8; + * + * @return The protoAnyValue. + */ + @java.lang.Override + public com.google.protobuf.Any getProtoAnyValue() { + if (valueCase_ == 8) { + return (com.google.protobuf.Any) value_; + } + return com.google.protobuf.Any.getDefaultInstance(); + } + /** + * + * + *
+   * Value of any proto value.
+   * 
+ * + * .google.protobuf.Any proto_any_value = 8; + */ + @java.lang.Override + public com.google.protobuf.AnyOrBuilder getProtoAnyValueOrBuilder() { + if (valueCase_ == 8) { + return (com.google.protobuf.Any) value_; + } + return com.google.protobuf.Any.getDefaultInstance(); + } + + public static final int BOOL_VALUE_FIELD_NUMBER = 9; + /** + * + * + *
+   * Value of boolean type annotation.
+   * 
+ * + * bool bool_value = 9; + * + * @return Whether the boolValue field is set. + */ + @java.lang.Override + public boolean hasBoolValue() { + return valueCase_ == 9; + } + /** + * + * + *
+   * Value of boolean type annotation.
+   * 
+ * + * bool bool_value = 9; + * + * @return The boolValue. + */ + @java.lang.Override + public boolean getBoolValue() { + if (valueCase_ == 9) { + return (java.lang.Boolean) value_; + } + return false; + } + + public static final int CUSTOMIZED_STRUCT_DATA_VALUE_FIELD_NUMBER = 10; + /** + * + * + *
+   * Value of customized struct annotation. This field does not have effects.
+   * Use customized_struct_value instead for customized struct annotation.
+   * 
+ * + * .google.protobuf.Struct customized_struct_data_value = 10; + * + * @return Whether the customizedStructDataValue field is set. + */ + @java.lang.Override + public boolean hasCustomizedStructDataValue() { + return valueCase_ == 10; + } + /** + * + * + *
+   * Value of customized struct annotation. This field does not have effects.
+   * Use customized_struct_value instead for customized struct annotation.
+   * 
+ * + * .google.protobuf.Struct customized_struct_data_value = 10; + * + * @return The customizedStructDataValue. + */ + @java.lang.Override + public com.google.protobuf.Struct getCustomizedStructDataValue() { + if (valueCase_ == 10) { + return (com.google.protobuf.Struct) value_; + } + return com.google.protobuf.Struct.getDefaultInstance(); + } + /** + * + * + *
+   * Value of customized struct annotation. This field does not have effects.
+   * Use customized_struct_value instead for customized struct annotation.
+   * 
+ * + * .google.protobuf.Struct customized_struct_data_value = 10; + */ + @java.lang.Override + public com.google.protobuf.StructOrBuilder getCustomizedStructDataValueOrBuilder() { + if (valueCase_ == 10) { + return (com.google.protobuf.Struct) value_; + } + return com.google.protobuf.Struct.getDefaultInstance(); + } + + public static final int LIST_VALUE_FIELD_NUMBER = 11; + /** + * + * + *
+   * Value of list type annotation.
+   * 
+ * + * .google.cloud.visionai.v1.AnnotationList list_value = 11; + * + * @return Whether the listValue field is set. + */ + @java.lang.Override + public boolean hasListValue() { + return valueCase_ == 11; + } + /** + * + * + *
+   * Value of list type annotation.
+   * 
+ * + * .google.cloud.visionai.v1.AnnotationList list_value = 11; + * + * @return The listValue. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.AnnotationList getListValue() { + if (valueCase_ == 11) { + return (com.google.cloud.visionai.v1.AnnotationList) value_; + } + return com.google.cloud.visionai.v1.AnnotationList.getDefaultInstance(); + } + /** + * + * + *
+   * Value of list type annotation.
+   * 
+ * + * .google.cloud.visionai.v1.AnnotationList list_value = 11; + */ + @java.lang.Override + public com.google.cloud.visionai.v1.AnnotationListOrBuilder getListValueOrBuilder() { + if (valueCase_ == 11) { + return (com.google.cloud.visionai.v1.AnnotationList) value_; + } + return com.google.cloud.visionai.v1.AnnotationList.getDefaultInstance(); + } + + public static final int CUSTOMIZED_STRUCT_VALUE_FIELD_NUMBER = 6; + /** + * + * + *
+   * Value of custom struct type annotation.
+   * 
+ * + * .google.cloud.visionai.v1.AnnotationCustomizedStruct customized_struct_value = 6; + * + * @return Whether the customizedStructValue field is set. + */ + @java.lang.Override + public boolean hasCustomizedStructValue() { + return valueCase_ == 6; + } + /** + * + * + *
+   * Value of custom struct type annotation.
+   * 
+ * + * .google.cloud.visionai.v1.AnnotationCustomizedStruct customized_struct_value = 6; + * + * @return The customizedStructValue. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.AnnotationCustomizedStruct getCustomizedStructValue() { + if (valueCase_ == 6) { + return (com.google.cloud.visionai.v1.AnnotationCustomizedStruct) value_; + } + return com.google.cloud.visionai.v1.AnnotationCustomizedStruct.getDefaultInstance(); + } + /** + * + * + *
+   * Value of custom struct type annotation.
+   * 
+ * + * .google.cloud.visionai.v1.AnnotationCustomizedStruct customized_struct_value = 6; + */ + @java.lang.Override + public com.google.cloud.visionai.v1.AnnotationCustomizedStructOrBuilder + getCustomizedStructValueOrBuilder() { + if (valueCase_ == 6) { + return (com.google.cloud.visionai.v1.AnnotationCustomizedStruct) value_; + } + return com.google.cloud.visionai.v1.AnnotationCustomizedStruct.getDefaultInstance(); + } + + 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 (valueCase_ == 1) { + output.writeInt64(1, (long) ((java.lang.Long) value_)); + } + if (valueCase_ == 2) { + output.writeFloat(2, (float) ((java.lang.Float) value_)); + } + if (valueCase_ == 3) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, value_); + } + if (valueCase_ == 5) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, value_); + } + if (valueCase_ == 6) { + output.writeMessage(6, (com.google.cloud.visionai.v1.AnnotationCustomizedStruct) value_); + } + if (valueCase_ == 7) { + output.writeMessage(7, (com.google.cloud.visionai.v1.GeoCoordinate) value_); + } + if (valueCase_ == 8) { + output.writeMessage(8, (com.google.protobuf.Any) value_); + } + if (valueCase_ == 9) { + output.writeBool(9, (boolean) ((java.lang.Boolean) value_)); + } + if (valueCase_ == 10) { + output.writeMessage(10, (com.google.protobuf.Struct) value_); + } + if (valueCase_ == 11) { + output.writeMessage(11, (com.google.cloud.visionai.v1.AnnotationList) value_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (valueCase_ == 1) { + size += + com.google.protobuf.CodedOutputStream.computeInt64Size( + 1, (long) ((java.lang.Long) value_)); + } + if (valueCase_ == 2) { + size += + com.google.protobuf.CodedOutputStream.computeFloatSize( + 2, (float) ((java.lang.Float) value_)); + } + if (valueCase_ == 3) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, value_); + } + if (valueCase_ == 5) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, value_); + } + if (valueCase_ == 6) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 6, (com.google.cloud.visionai.v1.AnnotationCustomizedStruct) value_); + } + if (valueCase_ == 7) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 7, (com.google.cloud.visionai.v1.GeoCoordinate) value_); + } + if (valueCase_ == 8) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 8, (com.google.protobuf.Any) value_); + } + if (valueCase_ == 9) { + size += + com.google.protobuf.CodedOutputStream.computeBoolSize( + 9, (boolean) ((java.lang.Boolean) value_)); + } + if (valueCase_ == 10) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 10, (com.google.protobuf.Struct) value_); + } + if (valueCase_ == 11) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 11, (com.google.cloud.visionai.v1.AnnotationList) value_); + } + size += getUnknownFields().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.visionai.v1.AnnotationValue)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.AnnotationValue other = + (com.google.cloud.visionai.v1.AnnotationValue) obj; + + if (!getValueCase().equals(other.getValueCase())) return false; + switch (valueCase_) { + case 1: + if (getIntValue() != other.getIntValue()) return false; + break; + case 2: + if (java.lang.Float.floatToIntBits(getFloatValue()) + != java.lang.Float.floatToIntBits(other.getFloatValue())) return false; + break; + case 3: + if (!getStrValue().equals(other.getStrValue())) return false; + break; + case 5: + if (!getDatetimeValue().equals(other.getDatetimeValue())) return false; + break; + case 7: + if (!getGeoCoordinate().equals(other.getGeoCoordinate())) return false; + break; + case 8: + if (!getProtoAnyValue().equals(other.getProtoAnyValue())) return false; + break; + case 9: + if (getBoolValue() != other.getBoolValue()) return false; + break; + case 10: + if (!getCustomizedStructDataValue().equals(other.getCustomizedStructDataValue())) + return false; + break; + case 11: + if (!getListValue().equals(other.getListValue())) return false; + break; + case 6: + if (!getCustomizedStructValue().equals(other.getCustomizedStructValue())) return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + switch (valueCase_) { + case 1: + hash = (37 * hash) + INT_VALUE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getIntValue()); + break; + case 2: + hash = (37 * hash) + FLOAT_VALUE_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits(getFloatValue()); + break; + case 3: + hash = (37 * hash) + STR_VALUE_FIELD_NUMBER; + hash = (53 * hash) + getStrValue().hashCode(); + break; + case 5: + hash = (37 * hash) + DATETIME_VALUE_FIELD_NUMBER; + hash = (53 * hash) + getDatetimeValue().hashCode(); + break; + case 7: + hash = (37 * hash) + GEO_COORDINATE_FIELD_NUMBER; + hash = (53 * hash) + getGeoCoordinate().hashCode(); + break; + case 8: + hash = (37 * hash) + PROTO_ANY_VALUE_FIELD_NUMBER; + hash = (53 * hash) + getProtoAnyValue().hashCode(); + break; + case 9: + hash = (37 * hash) + BOOL_VALUE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getBoolValue()); + break; + case 10: + hash = (37 * hash) + CUSTOMIZED_STRUCT_DATA_VALUE_FIELD_NUMBER; + hash = (53 * hash) + getCustomizedStructDataValue().hashCode(); + break; + case 11: + hash = (37 * hash) + LIST_VALUE_FIELD_NUMBER; + hash = (53 * hash) + getListValue().hashCode(); + break; + case 6: + hash = (37 * hash) + CUSTOMIZED_STRUCT_VALUE_FIELD_NUMBER; + hash = (53 * hash) + getCustomizedStructValue().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.AnnotationValue parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.AnnotationValue 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.visionai.v1.AnnotationValue parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.AnnotationValue 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.visionai.v1.AnnotationValue parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.AnnotationValue parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.AnnotationValue parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.AnnotationValue 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.visionai.v1.AnnotationValue parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.AnnotationValue 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.visionai.v1.AnnotationValue parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.AnnotationValue 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.visionai.v1.AnnotationValue 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; + } + /** + * + * + *
+   * Value of annotation, including all types available in data schema.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.AnnotationValue} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.AnnotationValue) + com.google.cloud.visionai.v1.AnnotationValueOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_AnnotationValue_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_AnnotationValue_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.AnnotationValue.class, + com.google.cloud.visionai.v1.AnnotationValue.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.AnnotationValue.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (geoCoordinateBuilder_ != null) { + geoCoordinateBuilder_.clear(); + } + if (protoAnyValueBuilder_ != null) { + protoAnyValueBuilder_.clear(); + } + if (customizedStructDataValueBuilder_ != null) { + customizedStructDataValueBuilder_.clear(); + } + if (listValueBuilder_ != null) { + listValueBuilder_.clear(); + } + if (customizedStructValueBuilder_ != null) { + customizedStructValueBuilder_.clear(); + } + valueCase_ = 0; + value_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_AnnotationValue_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.AnnotationValue getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.AnnotationValue.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.AnnotationValue build() { + com.google.cloud.visionai.v1.AnnotationValue result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.AnnotationValue buildPartial() { + com.google.cloud.visionai.v1.AnnotationValue result = + new com.google.cloud.visionai.v1.AnnotationValue(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.visionai.v1.AnnotationValue result) { + int from_bitField0_ = bitField0_; + } + + private void buildPartialOneofs(com.google.cloud.visionai.v1.AnnotationValue result) { + result.valueCase_ = valueCase_; + result.value_ = this.value_; + if (valueCase_ == 7 && geoCoordinateBuilder_ != null) { + result.value_ = geoCoordinateBuilder_.build(); + } + if (valueCase_ == 8 && protoAnyValueBuilder_ != null) { + result.value_ = protoAnyValueBuilder_.build(); + } + if (valueCase_ == 10 && customizedStructDataValueBuilder_ != null) { + result.value_ = customizedStructDataValueBuilder_.build(); + } + if (valueCase_ == 11 && listValueBuilder_ != null) { + result.value_ = listValueBuilder_.build(); + } + if (valueCase_ == 6 && customizedStructValueBuilder_ != null) { + result.value_ = customizedStructValueBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.AnnotationValue) { + return mergeFrom((com.google.cloud.visionai.v1.AnnotationValue) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.AnnotationValue other) { + if (other == com.google.cloud.visionai.v1.AnnotationValue.getDefaultInstance()) return this; + switch (other.getValueCase()) { + case INT_VALUE: + { + setIntValue(other.getIntValue()); + break; + } + case FLOAT_VALUE: + { + setFloatValue(other.getFloatValue()); + break; + } + case STR_VALUE: + { + valueCase_ = 3; + value_ = other.value_; + onChanged(); + break; + } + case DATETIME_VALUE: + { + valueCase_ = 5; + value_ = other.value_; + onChanged(); + break; + } + case GEO_COORDINATE: + { + mergeGeoCoordinate(other.getGeoCoordinate()); + break; + } + case PROTO_ANY_VALUE: + { + mergeProtoAnyValue(other.getProtoAnyValue()); + break; + } + case BOOL_VALUE: + { + setBoolValue(other.getBoolValue()); + break; + } + case CUSTOMIZED_STRUCT_DATA_VALUE: + { + mergeCustomizedStructDataValue(other.getCustomizedStructDataValue()); + break; + } + case LIST_VALUE: + { + mergeListValue(other.getListValue()); + break; + } + case CUSTOMIZED_STRUCT_VALUE: + { + mergeCustomizedStructValue(other.getCustomizedStructValue()); + break; + } + case VALUE_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + value_ = input.readInt64(); + valueCase_ = 1; + break; + } // case 8 + case 21: + { + value_ = input.readFloat(); + valueCase_ = 2; + break; + } // case 21 + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + valueCase_ = 3; + value_ = s; + break; + } // case 26 + case 42: + { + java.lang.String s = input.readStringRequireUtf8(); + valueCase_ = 5; + value_ = s; + break; + } // case 42 + case 50: + { + input.readMessage( + getCustomizedStructValueFieldBuilder().getBuilder(), extensionRegistry); + valueCase_ = 6; + break; + } // case 50 + case 58: + { + input.readMessage(getGeoCoordinateFieldBuilder().getBuilder(), extensionRegistry); + valueCase_ = 7; + break; + } // case 58 + case 66: + { + input.readMessage(getProtoAnyValueFieldBuilder().getBuilder(), extensionRegistry); + valueCase_ = 8; + break; + } // case 66 + case 72: + { + value_ = input.readBool(); + valueCase_ = 9; + break; + } // case 72 + case 82: + { + input.readMessage( + getCustomizedStructDataValueFieldBuilder().getBuilder(), extensionRegistry); + valueCase_ = 10; + break; + } // case 82 + case 90: + { + input.readMessage(getListValueFieldBuilder().getBuilder(), extensionRegistry); + valueCase_ = 11; + break; + } // case 90 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int valueCase_ = 0; + private java.lang.Object value_; + + public ValueCase getValueCase() { + return ValueCase.forNumber(valueCase_); + } + + public Builder clearValue() { + valueCase_ = 0; + value_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + /** + * + * + *
+     * Value of int type annotation.
+     * 
+ * + * int64 int_value = 1; + * + * @return Whether the intValue field is set. + */ + public boolean hasIntValue() { + return valueCase_ == 1; + } + /** + * + * + *
+     * Value of int type annotation.
+     * 
+ * + * int64 int_value = 1; + * + * @return The intValue. + */ + public long getIntValue() { + if (valueCase_ == 1) { + return (java.lang.Long) value_; + } + return 0L; + } + /** + * + * + *
+     * Value of int type annotation.
+     * 
+ * + * int64 int_value = 1; + * + * @param value The intValue to set. + * @return This builder for chaining. + */ + public Builder setIntValue(long value) { + + valueCase_ = 1; + value_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Value of int type annotation.
+     * 
+ * + * int64 int_value = 1; + * + * @return This builder for chaining. + */ + public Builder clearIntValue() { + if (valueCase_ == 1) { + valueCase_ = 0; + value_ = null; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Value of float type annotation.
+     * 
+ * + * float float_value = 2; + * + * @return Whether the floatValue field is set. + */ + public boolean hasFloatValue() { + return valueCase_ == 2; + } + /** + * + * + *
+     * Value of float type annotation.
+     * 
+ * + * float float_value = 2; + * + * @return The floatValue. + */ + public float getFloatValue() { + if (valueCase_ == 2) { + return (java.lang.Float) value_; + } + return 0F; + } + /** + * + * + *
+     * Value of float type annotation.
+     * 
+ * + * float float_value = 2; + * + * @param value The floatValue to set. + * @return This builder for chaining. + */ + public Builder setFloatValue(float value) { + + valueCase_ = 2; + value_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Value of float type annotation.
+     * 
+ * + * float float_value = 2; + * + * @return This builder for chaining. + */ + public Builder clearFloatValue() { + if (valueCase_ == 2) { + valueCase_ = 0; + value_ = null; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Value of string type annotation.
+     * 
+ * + * string str_value = 3; + * + * @return Whether the strValue field is set. + */ + @java.lang.Override + public boolean hasStrValue() { + return valueCase_ == 3; + } + /** + * + * + *
+     * Value of string type annotation.
+     * 
+ * + * string str_value = 3; + * + * @return The strValue. + */ + @java.lang.Override + public java.lang.String getStrValue() { + java.lang.Object ref = ""; + if (valueCase_ == 3) { + ref = value_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (valueCase_ == 3) { + value_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Value of string type annotation.
+     * 
+ * + * string str_value = 3; + * + * @return The bytes for strValue. + */ + @java.lang.Override + public com.google.protobuf.ByteString getStrValueBytes() { + java.lang.Object ref = ""; + if (valueCase_ == 3) { + ref = value_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (valueCase_ == 3) { + value_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Value of string type annotation.
+     * 
+ * + * string str_value = 3; + * + * @param value The strValue to set. + * @return This builder for chaining. + */ + public Builder setStrValue(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + valueCase_ = 3; + value_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Value of string type annotation.
+     * 
+ * + * string str_value = 3; + * + * @return This builder for chaining. + */ + public Builder clearStrValue() { + if (valueCase_ == 3) { + valueCase_ = 0; + value_ = null; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Value of string type annotation.
+     * 
+ * + * string str_value = 3; + * + * @param value The bytes for strValue to set. + * @return This builder for chaining. + */ + public Builder setStrValueBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + valueCase_ = 3; + value_ = value; + onChanged(); + return this; + } + + /** + * + * + *
+     * Value of date time type annotation.
+     * 
+ * + * string datetime_value = 5; + * + * @return Whether the datetimeValue field is set. + */ + @java.lang.Override + public boolean hasDatetimeValue() { + return valueCase_ == 5; + } + /** + * + * + *
+     * Value of date time type annotation.
+     * 
+ * + * string datetime_value = 5; + * + * @return The datetimeValue. + */ + @java.lang.Override + public java.lang.String getDatetimeValue() { + java.lang.Object ref = ""; + if (valueCase_ == 5) { + ref = value_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (valueCase_ == 5) { + value_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Value of date time type annotation.
+     * 
+ * + * string datetime_value = 5; + * + * @return The bytes for datetimeValue. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDatetimeValueBytes() { + java.lang.Object ref = ""; + if (valueCase_ == 5) { + ref = value_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (valueCase_ == 5) { + value_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Value of date time type annotation.
+     * 
+ * + * string datetime_value = 5; + * + * @param value The datetimeValue to set. + * @return This builder for chaining. + */ + public Builder setDatetimeValue(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + valueCase_ = 5; + value_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Value of date time type annotation.
+     * 
+ * + * string datetime_value = 5; + * + * @return This builder for chaining. + */ + public Builder clearDatetimeValue() { + if (valueCase_ == 5) { + valueCase_ = 0; + value_ = null; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Value of date time type annotation.
+     * 
+ * + * string datetime_value = 5; + * + * @param value The bytes for datetimeValue to set. + * @return This builder for chaining. + */ + public Builder setDatetimeValueBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + valueCase_ = 5; + value_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.GeoCoordinate, + com.google.cloud.visionai.v1.GeoCoordinate.Builder, + com.google.cloud.visionai.v1.GeoCoordinateOrBuilder> + geoCoordinateBuilder_; + /** + * + * + *
+     * Value of geo coordinate type annotation.
+     * 
+ * + * .google.cloud.visionai.v1.GeoCoordinate geo_coordinate = 7; + * + * @return Whether the geoCoordinate field is set. + */ + @java.lang.Override + public boolean hasGeoCoordinate() { + return valueCase_ == 7; + } + /** + * + * + *
+     * Value of geo coordinate type annotation.
+     * 
+ * + * .google.cloud.visionai.v1.GeoCoordinate geo_coordinate = 7; + * + * @return The geoCoordinate. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.GeoCoordinate getGeoCoordinate() { + if (geoCoordinateBuilder_ == null) { + if (valueCase_ == 7) { + return (com.google.cloud.visionai.v1.GeoCoordinate) value_; + } + return com.google.cloud.visionai.v1.GeoCoordinate.getDefaultInstance(); + } else { + if (valueCase_ == 7) { + return geoCoordinateBuilder_.getMessage(); + } + return com.google.cloud.visionai.v1.GeoCoordinate.getDefaultInstance(); + } + } + /** + * + * + *
+     * Value of geo coordinate type annotation.
+     * 
+ * + * .google.cloud.visionai.v1.GeoCoordinate geo_coordinate = 7; + */ + public Builder setGeoCoordinate(com.google.cloud.visionai.v1.GeoCoordinate value) { + if (geoCoordinateBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + value_ = value; + onChanged(); + } else { + geoCoordinateBuilder_.setMessage(value); + } + valueCase_ = 7; + return this; + } + /** + * + * + *
+     * Value of geo coordinate type annotation.
+     * 
+ * + * .google.cloud.visionai.v1.GeoCoordinate geo_coordinate = 7; + */ + public Builder setGeoCoordinate( + com.google.cloud.visionai.v1.GeoCoordinate.Builder builderForValue) { + if (geoCoordinateBuilder_ == null) { + value_ = builderForValue.build(); + onChanged(); + } else { + geoCoordinateBuilder_.setMessage(builderForValue.build()); + } + valueCase_ = 7; + return this; + } + /** + * + * + *
+     * Value of geo coordinate type annotation.
+     * 
+ * + * .google.cloud.visionai.v1.GeoCoordinate geo_coordinate = 7; + */ + public Builder mergeGeoCoordinate(com.google.cloud.visionai.v1.GeoCoordinate value) { + if (geoCoordinateBuilder_ == null) { + if (valueCase_ == 7 + && value_ != com.google.cloud.visionai.v1.GeoCoordinate.getDefaultInstance()) { + value_ = + com.google.cloud.visionai.v1.GeoCoordinate.newBuilder( + (com.google.cloud.visionai.v1.GeoCoordinate) value_) + .mergeFrom(value) + .buildPartial(); + } else { + value_ = value; + } + onChanged(); + } else { + if (valueCase_ == 7) { + geoCoordinateBuilder_.mergeFrom(value); + } else { + geoCoordinateBuilder_.setMessage(value); + } + } + valueCase_ = 7; + return this; + } + /** + * + * + *
+     * Value of geo coordinate type annotation.
+     * 
+ * + * .google.cloud.visionai.v1.GeoCoordinate geo_coordinate = 7; + */ + public Builder clearGeoCoordinate() { + if (geoCoordinateBuilder_ == null) { + if (valueCase_ == 7) { + valueCase_ = 0; + value_ = null; + onChanged(); + } + } else { + if (valueCase_ == 7) { + valueCase_ = 0; + value_ = null; + } + geoCoordinateBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Value of geo coordinate type annotation.
+     * 
+ * + * .google.cloud.visionai.v1.GeoCoordinate geo_coordinate = 7; + */ + public com.google.cloud.visionai.v1.GeoCoordinate.Builder getGeoCoordinateBuilder() { + return getGeoCoordinateFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Value of geo coordinate type annotation.
+     * 
+ * + * .google.cloud.visionai.v1.GeoCoordinate geo_coordinate = 7; + */ + @java.lang.Override + public com.google.cloud.visionai.v1.GeoCoordinateOrBuilder getGeoCoordinateOrBuilder() { + if ((valueCase_ == 7) && (geoCoordinateBuilder_ != null)) { + return geoCoordinateBuilder_.getMessageOrBuilder(); + } else { + if (valueCase_ == 7) { + return (com.google.cloud.visionai.v1.GeoCoordinate) value_; + } + return com.google.cloud.visionai.v1.GeoCoordinate.getDefaultInstance(); + } + } + /** + * + * + *
+     * Value of geo coordinate type annotation.
+     * 
+ * + * .google.cloud.visionai.v1.GeoCoordinate geo_coordinate = 7; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.GeoCoordinate, + com.google.cloud.visionai.v1.GeoCoordinate.Builder, + com.google.cloud.visionai.v1.GeoCoordinateOrBuilder> + getGeoCoordinateFieldBuilder() { + if (geoCoordinateBuilder_ == null) { + if (!(valueCase_ == 7)) { + value_ = com.google.cloud.visionai.v1.GeoCoordinate.getDefaultInstance(); + } + geoCoordinateBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.GeoCoordinate, + com.google.cloud.visionai.v1.GeoCoordinate.Builder, + com.google.cloud.visionai.v1.GeoCoordinateOrBuilder>( + (com.google.cloud.visionai.v1.GeoCoordinate) value_, + getParentForChildren(), + isClean()); + value_ = null; + } + valueCase_ = 7; + onChanged(); + return geoCoordinateBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Any, + com.google.protobuf.Any.Builder, + com.google.protobuf.AnyOrBuilder> + protoAnyValueBuilder_; + /** + * + * + *
+     * Value of any proto value.
+     * 
+ * + * .google.protobuf.Any proto_any_value = 8; + * + * @return Whether the protoAnyValue field is set. + */ + @java.lang.Override + public boolean hasProtoAnyValue() { + return valueCase_ == 8; + } + /** + * + * + *
+     * Value of any proto value.
+     * 
+ * + * .google.protobuf.Any proto_any_value = 8; + * + * @return The protoAnyValue. + */ + @java.lang.Override + public com.google.protobuf.Any getProtoAnyValue() { + if (protoAnyValueBuilder_ == null) { + if (valueCase_ == 8) { + return (com.google.protobuf.Any) value_; + } + return com.google.protobuf.Any.getDefaultInstance(); + } else { + if (valueCase_ == 8) { + return protoAnyValueBuilder_.getMessage(); + } + return com.google.protobuf.Any.getDefaultInstance(); + } + } + /** + * + * + *
+     * Value of any proto value.
+     * 
+ * + * .google.protobuf.Any proto_any_value = 8; + */ + public Builder setProtoAnyValue(com.google.protobuf.Any value) { + if (protoAnyValueBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + value_ = value; + onChanged(); + } else { + protoAnyValueBuilder_.setMessage(value); + } + valueCase_ = 8; + return this; + } + /** + * + * + *
+     * Value of any proto value.
+     * 
+ * + * .google.protobuf.Any proto_any_value = 8; + */ + public Builder setProtoAnyValue(com.google.protobuf.Any.Builder builderForValue) { + if (protoAnyValueBuilder_ == null) { + value_ = builderForValue.build(); + onChanged(); + } else { + protoAnyValueBuilder_.setMessage(builderForValue.build()); + } + valueCase_ = 8; + return this; + } + /** + * + * + *
+     * Value of any proto value.
+     * 
+ * + * .google.protobuf.Any proto_any_value = 8; + */ + public Builder mergeProtoAnyValue(com.google.protobuf.Any value) { + if (protoAnyValueBuilder_ == null) { + if (valueCase_ == 8 && value_ != com.google.protobuf.Any.getDefaultInstance()) { + value_ = + com.google.protobuf.Any.newBuilder((com.google.protobuf.Any) value_) + .mergeFrom(value) + .buildPartial(); + } else { + value_ = value; + } + onChanged(); + } else { + if (valueCase_ == 8) { + protoAnyValueBuilder_.mergeFrom(value); + } else { + protoAnyValueBuilder_.setMessage(value); + } + } + valueCase_ = 8; + return this; + } + /** + * + * + *
+     * Value of any proto value.
+     * 
+ * + * .google.protobuf.Any proto_any_value = 8; + */ + public Builder clearProtoAnyValue() { + if (protoAnyValueBuilder_ == null) { + if (valueCase_ == 8) { + valueCase_ = 0; + value_ = null; + onChanged(); + } + } else { + if (valueCase_ == 8) { + valueCase_ = 0; + value_ = null; + } + protoAnyValueBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Value of any proto value.
+     * 
+ * + * .google.protobuf.Any proto_any_value = 8; + */ + public com.google.protobuf.Any.Builder getProtoAnyValueBuilder() { + return getProtoAnyValueFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Value of any proto value.
+     * 
+ * + * .google.protobuf.Any proto_any_value = 8; + */ + @java.lang.Override + public com.google.protobuf.AnyOrBuilder getProtoAnyValueOrBuilder() { + if ((valueCase_ == 8) && (protoAnyValueBuilder_ != null)) { + return protoAnyValueBuilder_.getMessageOrBuilder(); + } else { + if (valueCase_ == 8) { + return (com.google.protobuf.Any) value_; + } + return com.google.protobuf.Any.getDefaultInstance(); + } + } + /** + * + * + *
+     * Value of any proto value.
+     * 
+ * + * .google.protobuf.Any proto_any_value = 8; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Any, + com.google.protobuf.Any.Builder, + com.google.protobuf.AnyOrBuilder> + getProtoAnyValueFieldBuilder() { + if (protoAnyValueBuilder_ == null) { + if (!(valueCase_ == 8)) { + value_ = com.google.protobuf.Any.getDefaultInstance(); + } + protoAnyValueBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Any, + com.google.protobuf.Any.Builder, + com.google.protobuf.AnyOrBuilder>( + (com.google.protobuf.Any) value_, getParentForChildren(), isClean()); + value_ = null; + } + valueCase_ = 8; + onChanged(); + return protoAnyValueBuilder_; + } + + /** + * + * + *
+     * Value of boolean type annotation.
+     * 
+ * + * bool bool_value = 9; + * + * @return Whether the boolValue field is set. + */ + public boolean hasBoolValue() { + return valueCase_ == 9; + } + /** + * + * + *
+     * Value of boolean type annotation.
+     * 
+ * + * bool bool_value = 9; + * + * @return The boolValue. + */ + public boolean getBoolValue() { + if (valueCase_ == 9) { + return (java.lang.Boolean) value_; + } + return false; + } + /** + * + * + *
+     * Value of boolean type annotation.
+     * 
+ * + * bool bool_value = 9; + * + * @param value The boolValue to set. + * @return This builder for chaining. + */ + public Builder setBoolValue(boolean value) { + + valueCase_ = 9; + value_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Value of boolean type annotation.
+     * 
+ * + * bool bool_value = 9; + * + * @return This builder for chaining. + */ + public Builder clearBoolValue() { + if (valueCase_ == 9) { + valueCase_ = 0; + value_ = null; + onChanged(); + } + return this; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Struct, + com.google.protobuf.Struct.Builder, + com.google.protobuf.StructOrBuilder> + customizedStructDataValueBuilder_; + /** + * + * + *
+     * Value of customized struct annotation. This field does not have effects.
+     * Use customized_struct_value instead for customized struct annotation.
+     * 
+ * + * .google.protobuf.Struct customized_struct_data_value = 10; + * + * @return Whether the customizedStructDataValue field is set. + */ + @java.lang.Override + public boolean hasCustomizedStructDataValue() { + return valueCase_ == 10; + } + /** + * + * + *
+     * Value of customized struct annotation. This field does not have effects.
+     * Use customized_struct_value instead for customized struct annotation.
+     * 
+ * + * .google.protobuf.Struct customized_struct_data_value = 10; + * + * @return The customizedStructDataValue. + */ + @java.lang.Override + public com.google.protobuf.Struct getCustomizedStructDataValue() { + if (customizedStructDataValueBuilder_ == null) { + if (valueCase_ == 10) { + return (com.google.protobuf.Struct) value_; + } + return com.google.protobuf.Struct.getDefaultInstance(); + } else { + if (valueCase_ == 10) { + return customizedStructDataValueBuilder_.getMessage(); + } + return com.google.protobuf.Struct.getDefaultInstance(); + } + } + /** + * + * + *
+     * Value of customized struct annotation. This field does not have effects.
+     * Use customized_struct_value instead for customized struct annotation.
+     * 
+ * + * .google.protobuf.Struct customized_struct_data_value = 10; + */ + public Builder setCustomizedStructDataValue(com.google.protobuf.Struct value) { + if (customizedStructDataValueBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + value_ = value; + onChanged(); + } else { + customizedStructDataValueBuilder_.setMessage(value); + } + valueCase_ = 10; + return this; + } + /** + * + * + *
+     * Value of customized struct annotation. This field does not have effects.
+     * Use customized_struct_value instead for customized struct annotation.
+     * 
+ * + * .google.protobuf.Struct customized_struct_data_value = 10; + */ + public Builder setCustomizedStructDataValue( + com.google.protobuf.Struct.Builder builderForValue) { + if (customizedStructDataValueBuilder_ == null) { + value_ = builderForValue.build(); + onChanged(); + } else { + customizedStructDataValueBuilder_.setMessage(builderForValue.build()); + } + valueCase_ = 10; + return this; + } + /** + * + * + *
+     * Value of customized struct annotation. This field does not have effects.
+     * Use customized_struct_value instead for customized struct annotation.
+     * 
+ * + * .google.protobuf.Struct customized_struct_data_value = 10; + */ + public Builder mergeCustomizedStructDataValue(com.google.protobuf.Struct value) { + if (customizedStructDataValueBuilder_ == null) { + if (valueCase_ == 10 && value_ != com.google.protobuf.Struct.getDefaultInstance()) { + value_ = + com.google.protobuf.Struct.newBuilder((com.google.protobuf.Struct) value_) + .mergeFrom(value) + .buildPartial(); + } else { + value_ = value; + } + onChanged(); + } else { + if (valueCase_ == 10) { + customizedStructDataValueBuilder_.mergeFrom(value); + } else { + customizedStructDataValueBuilder_.setMessage(value); + } + } + valueCase_ = 10; + return this; + } + /** + * + * + *
+     * Value of customized struct annotation. This field does not have effects.
+     * Use customized_struct_value instead for customized struct annotation.
+     * 
+ * + * .google.protobuf.Struct customized_struct_data_value = 10; + */ + public Builder clearCustomizedStructDataValue() { + if (customizedStructDataValueBuilder_ == null) { + if (valueCase_ == 10) { + valueCase_ = 0; + value_ = null; + onChanged(); + } + } else { + if (valueCase_ == 10) { + valueCase_ = 0; + value_ = null; + } + customizedStructDataValueBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Value of customized struct annotation. This field does not have effects.
+     * Use customized_struct_value instead for customized struct annotation.
+     * 
+ * + * .google.protobuf.Struct customized_struct_data_value = 10; + */ + public com.google.protobuf.Struct.Builder getCustomizedStructDataValueBuilder() { + return getCustomizedStructDataValueFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Value of customized struct annotation. This field does not have effects.
+     * Use customized_struct_value instead for customized struct annotation.
+     * 
+ * + * .google.protobuf.Struct customized_struct_data_value = 10; + */ + @java.lang.Override + public com.google.protobuf.StructOrBuilder getCustomizedStructDataValueOrBuilder() { + if ((valueCase_ == 10) && (customizedStructDataValueBuilder_ != null)) { + return customizedStructDataValueBuilder_.getMessageOrBuilder(); + } else { + if (valueCase_ == 10) { + return (com.google.protobuf.Struct) value_; + } + return com.google.protobuf.Struct.getDefaultInstance(); + } + } + /** + * + * + *
+     * Value of customized struct annotation. This field does not have effects.
+     * Use customized_struct_value instead for customized struct annotation.
+     * 
+ * + * .google.protobuf.Struct customized_struct_data_value = 10; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Struct, + com.google.protobuf.Struct.Builder, + com.google.protobuf.StructOrBuilder> + getCustomizedStructDataValueFieldBuilder() { + if (customizedStructDataValueBuilder_ == null) { + if (!(valueCase_ == 10)) { + value_ = com.google.protobuf.Struct.getDefaultInstance(); + } + customizedStructDataValueBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Struct, + com.google.protobuf.Struct.Builder, + com.google.protobuf.StructOrBuilder>( + (com.google.protobuf.Struct) value_, getParentForChildren(), isClean()); + value_ = null; + } + valueCase_ = 10; + onChanged(); + return customizedStructDataValueBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.AnnotationList, + com.google.cloud.visionai.v1.AnnotationList.Builder, + com.google.cloud.visionai.v1.AnnotationListOrBuilder> + listValueBuilder_; + /** + * + * + *
+     * Value of list type annotation.
+     * 
+ * + * .google.cloud.visionai.v1.AnnotationList list_value = 11; + * + * @return Whether the listValue field is set. + */ + @java.lang.Override + public boolean hasListValue() { + return valueCase_ == 11; + } + /** + * + * + *
+     * Value of list type annotation.
+     * 
+ * + * .google.cloud.visionai.v1.AnnotationList list_value = 11; + * + * @return The listValue. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.AnnotationList getListValue() { + if (listValueBuilder_ == null) { + if (valueCase_ == 11) { + return (com.google.cloud.visionai.v1.AnnotationList) value_; + } + return com.google.cloud.visionai.v1.AnnotationList.getDefaultInstance(); + } else { + if (valueCase_ == 11) { + return listValueBuilder_.getMessage(); + } + return com.google.cloud.visionai.v1.AnnotationList.getDefaultInstance(); + } + } + /** + * + * + *
+     * Value of list type annotation.
+     * 
+ * + * .google.cloud.visionai.v1.AnnotationList list_value = 11; + */ + public Builder setListValue(com.google.cloud.visionai.v1.AnnotationList value) { + if (listValueBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + value_ = value; + onChanged(); + } else { + listValueBuilder_.setMessage(value); + } + valueCase_ = 11; + return this; + } + /** + * + * + *
+     * Value of list type annotation.
+     * 
+ * + * .google.cloud.visionai.v1.AnnotationList list_value = 11; + */ + public Builder setListValue( + com.google.cloud.visionai.v1.AnnotationList.Builder builderForValue) { + if (listValueBuilder_ == null) { + value_ = builderForValue.build(); + onChanged(); + } else { + listValueBuilder_.setMessage(builderForValue.build()); + } + valueCase_ = 11; + return this; + } + /** + * + * + *
+     * Value of list type annotation.
+     * 
+ * + * .google.cloud.visionai.v1.AnnotationList list_value = 11; + */ + public Builder mergeListValue(com.google.cloud.visionai.v1.AnnotationList value) { + if (listValueBuilder_ == null) { + if (valueCase_ == 11 + && value_ != com.google.cloud.visionai.v1.AnnotationList.getDefaultInstance()) { + value_ = + com.google.cloud.visionai.v1.AnnotationList.newBuilder( + (com.google.cloud.visionai.v1.AnnotationList) value_) + .mergeFrom(value) + .buildPartial(); + } else { + value_ = value; + } + onChanged(); + } else { + if (valueCase_ == 11) { + listValueBuilder_.mergeFrom(value); + } else { + listValueBuilder_.setMessage(value); + } + } + valueCase_ = 11; + return this; + } + /** + * + * + *
+     * Value of list type annotation.
+     * 
+ * + * .google.cloud.visionai.v1.AnnotationList list_value = 11; + */ + public Builder clearListValue() { + if (listValueBuilder_ == null) { + if (valueCase_ == 11) { + valueCase_ = 0; + value_ = null; + onChanged(); + } + } else { + if (valueCase_ == 11) { + valueCase_ = 0; + value_ = null; + } + listValueBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Value of list type annotation.
+     * 
+ * + * .google.cloud.visionai.v1.AnnotationList list_value = 11; + */ + public com.google.cloud.visionai.v1.AnnotationList.Builder getListValueBuilder() { + return getListValueFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Value of list type annotation.
+     * 
+ * + * .google.cloud.visionai.v1.AnnotationList list_value = 11; + */ + @java.lang.Override + public com.google.cloud.visionai.v1.AnnotationListOrBuilder getListValueOrBuilder() { + if ((valueCase_ == 11) && (listValueBuilder_ != null)) { + return listValueBuilder_.getMessageOrBuilder(); + } else { + if (valueCase_ == 11) { + return (com.google.cloud.visionai.v1.AnnotationList) value_; + } + return com.google.cloud.visionai.v1.AnnotationList.getDefaultInstance(); + } + } + /** + * + * + *
+     * Value of list type annotation.
+     * 
+ * + * .google.cloud.visionai.v1.AnnotationList list_value = 11; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.AnnotationList, + com.google.cloud.visionai.v1.AnnotationList.Builder, + com.google.cloud.visionai.v1.AnnotationListOrBuilder> + getListValueFieldBuilder() { + if (listValueBuilder_ == null) { + if (!(valueCase_ == 11)) { + value_ = com.google.cloud.visionai.v1.AnnotationList.getDefaultInstance(); + } + listValueBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.AnnotationList, + com.google.cloud.visionai.v1.AnnotationList.Builder, + com.google.cloud.visionai.v1.AnnotationListOrBuilder>( + (com.google.cloud.visionai.v1.AnnotationList) value_, + getParentForChildren(), + isClean()); + value_ = null; + } + valueCase_ = 11; + onChanged(); + return listValueBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.AnnotationCustomizedStruct, + com.google.cloud.visionai.v1.AnnotationCustomizedStruct.Builder, + com.google.cloud.visionai.v1.AnnotationCustomizedStructOrBuilder> + customizedStructValueBuilder_; + /** + * + * + *
+     * Value of custom struct type annotation.
+     * 
+ * + * .google.cloud.visionai.v1.AnnotationCustomizedStruct customized_struct_value = 6; + * + * + * @return Whether the customizedStructValue field is set. + */ + @java.lang.Override + public boolean hasCustomizedStructValue() { + return valueCase_ == 6; + } + /** + * + * + *
+     * Value of custom struct type annotation.
+     * 
+ * + * .google.cloud.visionai.v1.AnnotationCustomizedStruct customized_struct_value = 6; + * + * + * @return The customizedStructValue. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.AnnotationCustomizedStruct getCustomizedStructValue() { + if (customizedStructValueBuilder_ == null) { + if (valueCase_ == 6) { + return (com.google.cloud.visionai.v1.AnnotationCustomizedStruct) value_; + } + return com.google.cloud.visionai.v1.AnnotationCustomizedStruct.getDefaultInstance(); + } else { + if (valueCase_ == 6) { + return customizedStructValueBuilder_.getMessage(); + } + return com.google.cloud.visionai.v1.AnnotationCustomizedStruct.getDefaultInstance(); + } + } + /** + * + * + *
+     * Value of custom struct type annotation.
+     * 
+ * + * .google.cloud.visionai.v1.AnnotationCustomizedStruct customized_struct_value = 6; + * + */ + public Builder setCustomizedStructValue( + com.google.cloud.visionai.v1.AnnotationCustomizedStruct value) { + if (customizedStructValueBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + value_ = value; + onChanged(); + } else { + customizedStructValueBuilder_.setMessage(value); + } + valueCase_ = 6; + return this; + } + /** + * + * + *
+     * Value of custom struct type annotation.
+     * 
+ * + * .google.cloud.visionai.v1.AnnotationCustomizedStruct customized_struct_value = 6; + * + */ + public Builder setCustomizedStructValue( + com.google.cloud.visionai.v1.AnnotationCustomizedStruct.Builder builderForValue) { + if (customizedStructValueBuilder_ == null) { + value_ = builderForValue.build(); + onChanged(); + } else { + customizedStructValueBuilder_.setMessage(builderForValue.build()); + } + valueCase_ = 6; + return this; + } + /** + * + * + *
+     * Value of custom struct type annotation.
+     * 
+ * + * .google.cloud.visionai.v1.AnnotationCustomizedStruct customized_struct_value = 6; + * + */ + public Builder mergeCustomizedStructValue( + com.google.cloud.visionai.v1.AnnotationCustomizedStruct value) { + if (customizedStructValueBuilder_ == null) { + if (valueCase_ == 6 + && value_ + != com.google.cloud.visionai.v1.AnnotationCustomizedStruct.getDefaultInstance()) { + value_ = + com.google.cloud.visionai.v1.AnnotationCustomizedStruct.newBuilder( + (com.google.cloud.visionai.v1.AnnotationCustomizedStruct) value_) + .mergeFrom(value) + .buildPartial(); + } else { + value_ = value; + } + onChanged(); + } else { + if (valueCase_ == 6) { + customizedStructValueBuilder_.mergeFrom(value); + } else { + customizedStructValueBuilder_.setMessage(value); + } + } + valueCase_ = 6; + return this; + } + /** + * + * + *
+     * Value of custom struct type annotation.
+     * 
+ * + * .google.cloud.visionai.v1.AnnotationCustomizedStruct customized_struct_value = 6; + * + */ + public Builder clearCustomizedStructValue() { + if (customizedStructValueBuilder_ == null) { + if (valueCase_ == 6) { + valueCase_ = 0; + value_ = null; + onChanged(); + } + } else { + if (valueCase_ == 6) { + valueCase_ = 0; + value_ = null; + } + customizedStructValueBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Value of custom struct type annotation.
+     * 
+ * + * .google.cloud.visionai.v1.AnnotationCustomizedStruct customized_struct_value = 6; + * + */ + public com.google.cloud.visionai.v1.AnnotationCustomizedStruct.Builder + getCustomizedStructValueBuilder() { + return getCustomizedStructValueFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Value of custom struct type annotation.
+     * 
+ * + * .google.cloud.visionai.v1.AnnotationCustomizedStruct customized_struct_value = 6; + * + */ + @java.lang.Override + public com.google.cloud.visionai.v1.AnnotationCustomizedStructOrBuilder + getCustomizedStructValueOrBuilder() { + if ((valueCase_ == 6) && (customizedStructValueBuilder_ != null)) { + return customizedStructValueBuilder_.getMessageOrBuilder(); + } else { + if (valueCase_ == 6) { + return (com.google.cloud.visionai.v1.AnnotationCustomizedStruct) value_; + } + return com.google.cloud.visionai.v1.AnnotationCustomizedStruct.getDefaultInstance(); + } + } + /** + * + * + *
+     * Value of custom struct type annotation.
+     * 
+ * + * .google.cloud.visionai.v1.AnnotationCustomizedStruct customized_struct_value = 6; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.AnnotationCustomizedStruct, + com.google.cloud.visionai.v1.AnnotationCustomizedStruct.Builder, + com.google.cloud.visionai.v1.AnnotationCustomizedStructOrBuilder> + getCustomizedStructValueFieldBuilder() { + if (customizedStructValueBuilder_ == null) { + if (!(valueCase_ == 6)) { + value_ = com.google.cloud.visionai.v1.AnnotationCustomizedStruct.getDefaultInstance(); + } + customizedStructValueBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.AnnotationCustomizedStruct, + com.google.cloud.visionai.v1.AnnotationCustomizedStruct.Builder, + com.google.cloud.visionai.v1.AnnotationCustomizedStructOrBuilder>( + (com.google.cloud.visionai.v1.AnnotationCustomizedStruct) value_, + getParentForChildren(), + isClean()); + value_ = null; + } + valueCase_ = 6; + onChanged(); + return customizedStructValueBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.AnnotationValue) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.AnnotationValue) + private static final com.google.cloud.visionai.v1.AnnotationValue DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.AnnotationValue(); + } + + public static com.google.cloud.visionai.v1.AnnotationValue getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AnnotationValue parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.AnnotationValue getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/AnnotationValueOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/AnnotationValueOrBuilder.java new file mode 100644 index 000000000000..eac420d68ba3 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/AnnotationValueOrBuilder.java @@ -0,0 +1,356 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/warehouse.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface AnnotationValueOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.AnnotationValue) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Value of int type annotation.
+   * 
+ * + * int64 int_value = 1; + * + * @return Whether the intValue field is set. + */ + boolean hasIntValue(); + /** + * + * + *
+   * Value of int type annotation.
+   * 
+ * + * int64 int_value = 1; + * + * @return The intValue. + */ + long getIntValue(); + + /** + * + * + *
+   * Value of float type annotation.
+   * 
+ * + * float float_value = 2; + * + * @return Whether the floatValue field is set. + */ + boolean hasFloatValue(); + /** + * + * + *
+   * Value of float type annotation.
+   * 
+ * + * float float_value = 2; + * + * @return The floatValue. + */ + float getFloatValue(); + + /** + * + * + *
+   * Value of string type annotation.
+   * 
+ * + * string str_value = 3; + * + * @return Whether the strValue field is set. + */ + boolean hasStrValue(); + /** + * + * + *
+   * Value of string type annotation.
+   * 
+ * + * string str_value = 3; + * + * @return The strValue. + */ + java.lang.String getStrValue(); + /** + * + * + *
+   * Value of string type annotation.
+   * 
+ * + * string str_value = 3; + * + * @return The bytes for strValue. + */ + com.google.protobuf.ByteString getStrValueBytes(); + + /** + * + * + *
+   * Value of date time type annotation.
+   * 
+ * + * string datetime_value = 5; + * + * @return Whether the datetimeValue field is set. + */ + boolean hasDatetimeValue(); + /** + * + * + *
+   * Value of date time type annotation.
+   * 
+ * + * string datetime_value = 5; + * + * @return The datetimeValue. + */ + java.lang.String getDatetimeValue(); + /** + * + * + *
+   * Value of date time type annotation.
+   * 
+ * + * string datetime_value = 5; + * + * @return The bytes for datetimeValue. + */ + com.google.protobuf.ByteString getDatetimeValueBytes(); + + /** + * + * + *
+   * Value of geo coordinate type annotation.
+   * 
+ * + * .google.cloud.visionai.v1.GeoCoordinate geo_coordinate = 7; + * + * @return Whether the geoCoordinate field is set. + */ + boolean hasGeoCoordinate(); + /** + * + * + *
+   * Value of geo coordinate type annotation.
+   * 
+ * + * .google.cloud.visionai.v1.GeoCoordinate geo_coordinate = 7; + * + * @return The geoCoordinate. + */ + com.google.cloud.visionai.v1.GeoCoordinate getGeoCoordinate(); + /** + * + * + *
+   * Value of geo coordinate type annotation.
+   * 
+ * + * .google.cloud.visionai.v1.GeoCoordinate geo_coordinate = 7; + */ + com.google.cloud.visionai.v1.GeoCoordinateOrBuilder getGeoCoordinateOrBuilder(); + + /** + * + * + *
+   * Value of any proto value.
+   * 
+ * + * .google.protobuf.Any proto_any_value = 8; + * + * @return Whether the protoAnyValue field is set. + */ + boolean hasProtoAnyValue(); + /** + * + * + *
+   * Value of any proto value.
+   * 
+ * + * .google.protobuf.Any proto_any_value = 8; + * + * @return The protoAnyValue. + */ + com.google.protobuf.Any getProtoAnyValue(); + /** + * + * + *
+   * Value of any proto value.
+   * 
+ * + * .google.protobuf.Any proto_any_value = 8; + */ + com.google.protobuf.AnyOrBuilder getProtoAnyValueOrBuilder(); + + /** + * + * + *
+   * Value of boolean type annotation.
+   * 
+ * + * bool bool_value = 9; + * + * @return Whether the boolValue field is set. + */ + boolean hasBoolValue(); + /** + * + * + *
+   * Value of boolean type annotation.
+   * 
+ * + * bool bool_value = 9; + * + * @return The boolValue. + */ + boolean getBoolValue(); + + /** + * + * + *
+   * Value of customized struct annotation. This field does not have effects.
+   * Use customized_struct_value instead for customized struct annotation.
+   * 
+ * + * .google.protobuf.Struct customized_struct_data_value = 10; + * + * @return Whether the customizedStructDataValue field is set. + */ + boolean hasCustomizedStructDataValue(); + /** + * + * + *
+   * Value of customized struct annotation. This field does not have effects.
+   * Use customized_struct_value instead for customized struct annotation.
+   * 
+ * + * .google.protobuf.Struct customized_struct_data_value = 10; + * + * @return The customizedStructDataValue. + */ + com.google.protobuf.Struct getCustomizedStructDataValue(); + /** + * + * + *
+   * Value of customized struct annotation. This field does not have effects.
+   * Use customized_struct_value instead for customized struct annotation.
+   * 
+ * + * .google.protobuf.Struct customized_struct_data_value = 10; + */ + com.google.protobuf.StructOrBuilder getCustomizedStructDataValueOrBuilder(); + + /** + * + * + *
+   * Value of list type annotation.
+   * 
+ * + * .google.cloud.visionai.v1.AnnotationList list_value = 11; + * + * @return Whether the listValue field is set. + */ + boolean hasListValue(); + /** + * + * + *
+   * Value of list type annotation.
+   * 
+ * + * .google.cloud.visionai.v1.AnnotationList list_value = 11; + * + * @return The listValue. + */ + com.google.cloud.visionai.v1.AnnotationList getListValue(); + /** + * + * + *
+   * Value of list type annotation.
+   * 
+ * + * .google.cloud.visionai.v1.AnnotationList list_value = 11; + */ + com.google.cloud.visionai.v1.AnnotationListOrBuilder getListValueOrBuilder(); + + /** + * + * + *
+   * Value of custom struct type annotation.
+   * 
+ * + * .google.cloud.visionai.v1.AnnotationCustomizedStruct customized_struct_value = 6; + * + * @return Whether the customizedStructValue field is set. + */ + boolean hasCustomizedStructValue(); + /** + * + * + *
+   * Value of custom struct type annotation.
+   * 
+ * + * .google.cloud.visionai.v1.AnnotationCustomizedStruct customized_struct_value = 6; + * + * @return The customizedStructValue. + */ + com.google.cloud.visionai.v1.AnnotationCustomizedStruct getCustomizedStructValue(); + /** + * + * + *
+   * Value of custom struct type annotation.
+   * 
+ * + * .google.cloud.visionai.v1.AnnotationCustomizedStruct customized_struct_value = 6; + */ + com.google.cloud.visionai.v1.AnnotationCustomizedStructOrBuilder + getCustomizedStructValueOrBuilder(); + + com.google.cloud.visionai.v1.AnnotationValue.ValueCase getValueCase(); +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/AnnotationsProto.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/AnnotationsProto.java new file mode 100644 index 000000000000..35cd7662dee8 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/AnnotationsProto.java @@ -0,0 +1,844 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/annotations.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public final class AnnotationsProto { + private AnnotationsProto() {} + + 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_visionai_v1_PersonalProtectiveEquipmentDetectionOutput_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_visionai_v1_PersonalProtectiveEquipmentDetectionOutput_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_visionai_v1_PersonalProtectiveEquipmentDetectionOutput_PersonEntity_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_visionai_v1_PersonalProtectiveEquipmentDetectionOutput_PersonEntity_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_visionai_v1_PersonalProtectiveEquipmentDetectionOutput_PPEEntity_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_visionai_v1_PersonalProtectiveEquipmentDetectionOutput_PPEEntity_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_visionai_v1_PersonalProtectiveEquipmentDetectionOutput_NormalizedBoundingBox_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_visionai_v1_PersonalProtectiveEquipmentDetectionOutput_NormalizedBoundingBox_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_visionai_v1_PersonalProtectiveEquipmentDetectionOutput_PersonIdentifiedBox_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_visionai_v1_PersonalProtectiveEquipmentDetectionOutput_PersonIdentifiedBox_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_visionai_v1_PersonalProtectiveEquipmentDetectionOutput_PPEIdentifiedBox_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_visionai_v1_PersonalProtectiveEquipmentDetectionOutput_PPEIdentifiedBox_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_visionai_v1_PersonalProtectiveEquipmentDetectionOutput_DetectedPerson_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_visionai_v1_PersonalProtectiveEquipmentDetectionOutput_DetectedPerson_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_visionai_v1_ObjectDetectionPredictionResult_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_visionai_v1_ObjectDetectionPredictionResult_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_visionai_v1_ObjectDetectionPredictionResult_Entity_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_visionai_v1_ObjectDetectionPredictionResult_Entity_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_visionai_v1_ObjectDetectionPredictionResult_IdentifiedBox_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_visionai_v1_ObjectDetectionPredictionResult_IdentifiedBox_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_visionai_v1_ObjectDetectionPredictionResult_IdentifiedBox_NormalizedBoundingBox_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_visionai_v1_ObjectDetectionPredictionResult_IdentifiedBox_NormalizedBoundingBox_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_visionai_v1_ImageObjectDetectionPredictionResult_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_visionai_v1_ImageObjectDetectionPredictionResult_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_visionai_v1_ClassificationPredictionResult_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_visionai_v1_ClassificationPredictionResult_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_visionai_v1_ImageSegmentationPredictionResult_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_visionai_v1_ImageSegmentationPredictionResult_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_visionai_v1_VideoActionRecognitionPredictionResult_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_visionai_v1_VideoActionRecognitionPredictionResult_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_visionai_v1_VideoActionRecognitionPredictionResult_IdentifiedAction_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_visionai_v1_VideoActionRecognitionPredictionResult_IdentifiedAction_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_visionai_v1_VideoObjectTrackingPredictionResult_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_visionai_v1_VideoObjectTrackingPredictionResult_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_visionai_v1_VideoObjectTrackingPredictionResult_BoundingBox_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_visionai_v1_VideoObjectTrackingPredictionResult_BoundingBox_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_visionai_v1_VideoObjectTrackingPredictionResult_DetectedObject_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_visionai_v1_VideoObjectTrackingPredictionResult_DetectedObject_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_visionai_v1_VideoClassificationPredictionResult_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_visionai_v1_VideoClassificationPredictionResult_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_visionai_v1_VideoClassificationPredictionResult_IdentifiedClassification_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_visionai_v1_VideoClassificationPredictionResult_IdentifiedClassification_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_visionai_v1_OccupancyCountingPredictionResult_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_visionai_v1_OccupancyCountingPredictionResult_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_visionai_v1_OccupancyCountingPredictionResult_Entity_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_visionai_v1_OccupancyCountingPredictionResult_Entity_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_visionai_v1_OccupancyCountingPredictionResult_IdentifiedBox_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_visionai_v1_OccupancyCountingPredictionResult_IdentifiedBox_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_visionai_v1_OccupancyCountingPredictionResult_IdentifiedBox_NormalizedBoundingBox_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_visionai_v1_OccupancyCountingPredictionResult_IdentifiedBox_NormalizedBoundingBox_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_visionai_v1_OccupancyCountingPredictionResult_Stats_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_visionai_v1_OccupancyCountingPredictionResult_Stats_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_visionai_v1_OccupancyCountingPredictionResult_Stats_ObjectCount_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_visionai_v1_OccupancyCountingPredictionResult_Stats_ObjectCount_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_visionai_v1_OccupancyCountingPredictionResult_Stats_AccumulatedObjectCount_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_visionai_v1_OccupancyCountingPredictionResult_Stats_AccumulatedObjectCount_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_visionai_v1_OccupancyCountingPredictionResult_Stats_CrossingLineCount_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_visionai_v1_OccupancyCountingPredictionResult_Stats_CrossingLineCount_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_visionai_v1_OccupancyCountingPredictionResult_Stats_ActiveZoneCount_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_visionai_v1_OccupancyCountingPredictionResult_Stats_ActiveZoneCount_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_visionai_v1_OccupancyCountingPredictionResult_TrackInfo_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_visionai_v1_OccupancyCountingPredictionResult_TrackInfo_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_visionai_v1_OccupancyCountingPredictionResult_DwellTimeInfo_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_visionai_v1_OccupancyCountingPredictionResult_DwellTimeInfo_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_visionai_v1_StreamAnnotation_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_visionai_v1_StreamAnnotation_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_visionai_v1_StreamAnnotations_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_visionai_v1_StreamAnnotations_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_visionai_v1_NormalizedPolygon_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_visionai_v1_NormalizedPolygon_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_visionai_v1_NormalizedPolyline_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_visionai_v1_NormalizedPolyline_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_visionai_v1_NormalizedVertex_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_visionai_v1_NormalizedVertex_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_visionai_v1_AppPlatformMetadata_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_visionai_v1_AppPlatformMetadata_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_visionai_v1_AppPlatformCloudFunctionRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_visionai_v1_AppPlatformCloudFunctionRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_visionai_v1_AppPlatformCloudFunctionRequest_StructedInputAnnotation_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_visionai_v1_AppPlatformCloudFunctionRequest_StructedInputAnnotation_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_visionai_v1_AppPlatformCloudFunctionResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_visionai_v1_AppPlatformCloudFunctionResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_visionai_v1_AppPlatformCloudFunctionResponse_StructedOutputAnnotation_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_visionai_v1_AppPlatformCloudFunctionResponse_StructedOutputAnnotation_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_visionai_v1_AppPlatformEventBody_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_visionai_v1_AppPlatformEventBody_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n*google/cloud/visionai/v1/annotations.p" + + "roto\022\030google.cloud.visionai.v1\032\034google/p" + + "rotobuf/struct.proto\032\037google/protobuf/ti" + + "mestamp.proto\"\225\r\n*PersonalProtectiveEqui" + + "pmentDetectionOutput\0220\n\014current_time\030\001 \001" + + "(\0132\032.google.protobuf.Timestamp\022m\n\020detect" + + "ed_persons\030\002 \003(\0132S.google.cloud.visionai" + + ".v1.PersonalProtectiveEquipmentDetection" + + "Output.DetectedPerson\032(\n\014PersonEntity\022\030\n" + + "\020person_entity_id\030\001 \001(\003\032z\n\tPPEEntity\022\024\n\014" + + "ppe_label_id\030\001 \001(\003\022\030\n\020ppe_label_string\030\002" + + " \001(\t\022&\n\036ppe_supercategory_label_string\030\003" + + " \001(\t\022\025\n\rppe_entity_id\030\004 \001(\003\032R\n\025Normalize" + + "dBoundingBox\022\014\n\004xmin\030\001 \001(\002\022\014\n\004ymin\030\002 \001(\002" + + "\022\r\n\005width\030\003 \001(\002\022\016\n\006height\030\004 \001(\002\032\246\002\n\023Pers" + + "onIdentifiedBox\022\016\n\006box_id\030\001 \001(\003\022{\n\027norma" + + "lized_bounding_box\030\002 \001(\0132Z.google.cloud." + + "visionai.v1.PersonalProtectiveEquipmentD" + + "etectionOutput.NormalizedBoundingBox\022\030\n\020" + + "confidence_score\030\003 \001(\002\022h\n\rperson_entity\030" + + "\004 \001(\0132Q.google.cloud.visionai.v1.Persona" + + "lProtectiveEquipmentDetectionOutput.Pers" + + "onEntity\032\235\002\n\020PPEIdentifiedBox\022\016\n\006box_id\030" + + "\001 \001(\003\022{\n\027normalized_bounding_box\030\002 \001(\0132Z" + + ".google.cloud.visionai.v1.PersonalProtec" + + "tiveEquipmentDetectionOutput.NormalizedB" + + "oundingBox\022\030\n\020confidence_score\030\003 \001(\002\022b\n\n" + + "ppe_entity\030\004 \001(\0132N.google.cloud.visionai" + + ".v1.PersonalProtectiveEquipmentDetection" + + "Output.PPEEntity\032\202\005\n\016DetectedPerson\022\021\n\tp" + + "erson_id\030\001 \001(\003\022\200\001\n\036detected_person_ident" + + "ified_box\030\002 \001(\0132X.google.cloud.visionai." + + "v1.PersonalProtectiveEquipmentDetectionO" + + "utput.PersonIdentifiedBox\022|\n\035detected_pp" + + "e_identified_boxes\030\003 \003(\0132U.google.cloud." + + "visionai.v1.PersonalProtectiveEquipmentD" + + "etectionOutput.PPEIdentifiedBox\022 \n\023face_" + + "coverage_score\030\004 \001(\002H\000\210\001\001\022 \n\023eyes_covera" + + "ge_score\030\005 \001(\002H\001\210\001\001\022 \n\023head_coverage_sco" + + "re\030\006 \001(\002H\002\210\001\001\022!\n\024hands_coverage_score\030\007 " + + "\001(\002H\003\210\001\001\022 \n\023body_coverage_score\030\010 \001(\002H\004\210" + + "\001\001\022 \n\023feet_coverage_score\030\t \001(\002H\005\210\001\001B\026\n\024" + + "_face_coverage_scoreB\026\n\024_eyes_coverage_s" + + "coreB\026\n\024_head_coverage_scoreB\027\n\025_hands_c" + + "overage_scoreB\026\n\024_body_coverage_scoreB\026\n" + + "\024_feet_coverage_score\"\312\004\n\037ObjectDetectio" + + "nPredictionResult\0220\n\014current_time\030\001 \001(\0132" + + "\032.google.protobuf.Timestamp\022a\n\020identifie" + + "d_boxes\030\002 \003(\0132G.google.cloud.visionai.v1" + + ".ObjectDetectionPredictionResult.Identif" + + "iedBox\0320\n\006Entity\022\020\n\010label_id\030\001 \001(\003\022\024\n\014la" + + "bel_string\030\002 \001(\t\032\337\002\n\rIdentifiedBox\022\016\n\006bo" + + "x_id\030\001 \001(\003\022~\n\027normalized_bounding_box\030\002 " + + "\001(\0132].google.cloud.visionai.v1.ObjectDet" + + "ectionPredictionResult.IdentifiedBox.Nor" + + "malizedBoundingBox\022\030\n\020confidence_score\030\003" + + " \001(\002\022P\n\006entity\030\004 \001(\0132@.google.cloud.visi" + + "onai.v1.ObjectDetectionPredictionResult." + + "Entity\032R\n\025NormalizedBoundingBox\022\014\n\004xmin\030" + + "\001 \001(\002\022\014\n\004ymin\030\002 \001(\002\022\r\n\005width\030\003 \001(\002\022\016\n\006he" + + "ight\030\004 \001(\002\"\213\001\n$ImageObjectDetectionPredi" + + "ctionResult\022\013\n\003ids\030\001 \003(\003\022\025\n\rdisplay_name" + + "s\030\002 \003(\t\022\023\n\013confidences\030\003 \003(\002\022*\n\006bboxes\030\004" + + " \003(\0132\032.google.protobuf.ListValue\"Y\n\036Clas" + + "sificationPredictionResult\022\013\n\003ids\030\001 \003(\003\022" + + "\025\n\rdisplay_names\030\002 \003(\t\022\023\n\013confidences\030\003 " + + "\003(\002\"S\n!ImageSegmentationPredictionResult" + + "\022\025\n\rcategory_mask\030\001 \001(\t\022\027\n\017confidence_ma" + + "sk\030\002 \001(\t\"\304\002\n&VideoActionRecognitionPredi" + + "ctionResult\0226\n\022segment_start_time\030\001 \001(\0132" + + "\032.google.protobuf.Timestamp\0224\n\020segment_e" + + "nd_time\030\002 \001(\0132\032.google.protobuf.Timestam" + + "p\022b\n\007actions\030\003 \003(\0132Q.google.cloud.vision" + + "ai.v1.VideoActionRecognitionPredictionRe" + + "sult.IdentifiedAction\032H\n\020IdentifiedActio" + + "n\022\n\n\002id\030\001 \001(\t\022\024\n\014display_name\030\002 \001(\t\022\022\n\nc" + + "onfidence\030\003 \001(\002\"\371\003\n#VideoObjectTrackingP" + + "redictionResult\0226\n\022segment_start_time\030\001 " + + "\001(\0132\032.google.protobuf.Timestamp\0224\n\020segme" + + "nt_end_time\030\002 \001(\0132\032.google.protobuf.Time" + + "stamp\022]\n\007objects\030\003 \003(\0132L.google.cloud.vi" + + "sionai.v1.VideoObjectTrackingPredictionR" + + "esult.DetectedObject\032I\n\013BoundingBox\022\r\n\005x" + + "_min\030\001 \001(\002\022\r\n\005x_max\030\002 \001(\002\022\r\n\005y_min\030\003 \001(\002" + + "\022\r\n\005y_max\030\004 \001(\002\032\271\001\n\016DetectedObject\022\n\n\002id" + + "\030\001 \001(\t\022\024\n\014display_name\030\002 \001(\t\022_\n\014bounding" + + "_box\030\003 \001(\0132I.google.cloud.visionai.v1.Vi" + + "deoObjectTrackingPredictionResult.Boundi" + + "ngBox\022\022\n\nconfidence\030\004 \001(\002\022\020\n\010track_id\030\005 " + + "\001(\003\"\326\002\n#VideoClassificationPredictionRes" + + "ult\0226\n\022segment_start_time\030\001 \001(\0132\032.google" + + ".protobuf.Timestamp\0224\n\020segment_end_time\030" + + "\002 \001(\0132\032.google.protobuf.Timestamp\022o\n\017cla" + + "ssifications\030\003 \003(\0132V.google.cloud.vision" + + "ai.v1.VideoClassificationPredictionResul" + + "t.IdentifiedClassification\032P\n\030Identified" + + "Classification\022\n\n\002id\030\001 \001(\t\022\024\n\014display_na" + + "me\030\002 \001(\t\022\022\n\nconfidence\030\003 \001(\002\"\353\023\n!Occupan" + + "cyCountingPredictionResult\0220\n\014current_ti" + + "me\030\001 \001(\0132\032.google.protobuf.Timestamp\022c\n\020" + + "identified_boxes\030\002 \003(\0132I.google.cloud.vi" + + "sionai.v1.OccupancyCountingPredictionRes" + + "ult.IdentifiedBox\022P\n\005stats\030\003 \001(\0132A.googl" + + "e.cloud.visionai.v1.OccupancyCountingPre" + + "dictionResult.Stats\022Y\n\ntrack_info\030\004 \003(\0132" + + "E.google.cloud.visionai.v1.OccupancyCoun" + + "tingPredictionResult.TrackInfo\022b\n\017dwell_" + + "time_info\030\005 \003(\0132I.google.cloud.visionai." + + "v1.OccupancyCountingPredictionResult.Dwe" + + "llTimeInfo\022\020\n\003pts\030\006 \001(\003H\000\210\001\001\0320\n\006Entity\022\020" + + "\n\010label_id\030\001 \001(\003\022\024\n\014label_string\030\002 \001(\t\032\353" + + "\002\n\rIdentifiedBox\022\016\n\006box_id\030\001 \001(\003\022\200\001\n\027nor" + + "malized_bounding_box\030\002 \001(\0132_.google.clou" + + "d.visionai.v1.OccupancyCountingPredictio" + + "nResult.IdentifiedBox.NormalizedBounding" + + "Box\022\r\n\005score\030\003 \001(\002\022R\n\006entity\030\004 \001(\0132B.goo" + + "gle.cloud.visionai.v1.OccupancyCountingP" + + "redictionResult.Entity\022\020\n\010track_id\030\005 \001(\003" + + "\032R\n\025NormalizedBoundingBox\022\014\n\004xmin\030\001 \001(\002\022" + + "\014\n\004ymin\030\002 \001(\002\022\r\n\005width\030\003 \001(\002\022\016\n\006height\030\004" + + " \001(\002\032\365\n\n\005Stats\022g\n\020full_frame_count\030\001 \003(\013" + + "2M.google.cloud.visionai.v1.OccupancyCou" + + "ntingPredictionResult.Stats.ObjectCount\022" + + "q\n\024crossing_line_counts\030\002 \003(\0132S.google.c" + + "loud.visionai.v1.OccupancyCountingPredic" + + "tionResult.Stats.CrossingLineCount\022m\n\022ac" + + "tive_zone_counts\030\003 \003(\0132Q.google.cloud.vi" + + "sionai.v1.OccupancyCountingPredictionRes" + + "ult.Stats.ActiveZoneCount\032p\n\013ObjectCount" + + "\022R\n\006entity\030\001 \001(\0132B.google.cloud.visionai" + + ".v1.OccupancyCountingPredictionResult.En" + + "tity\022\r\n\005count\030\002 \001(\005\032\255\001\n\026AccumulatedObjec" + + "tCount\022.\n\nstart_time\030\001 \001(\0132\032.google.prot" + + "obuf.Timestamp\022c\n\014object_count\030\002 \001(\0132M.g" + + "oogle.cloud.visionai.v1.OccupancyCountin" + + "gPredictionResult.Stats.ObjectCount\032\313\004\n\021" + + "CrossingLineCount\022>\n\nannotation\030\001 \001(\0132*." + + "google.cloud.visionai.v1.StreamAnnotatio" + + "n\022p\n\031positive_direction_counts\030\002 \003(\0132M.g" + + "oogle.cloud.visionai.v1.OccupancyCountin" + + "gPredictionResult.Stats.ObjectCount\022p\n\031n" + + "egative_direction_counts\030\003 \003(\0132M.google." + + "cloud.visionai.v1.OccupancyCountingPredi" + + "ctionResult.Stats.ObjectCount\022\207\001\n%accumu" + + "lated_positive_direction_counts\030\004 \003(\0132X." + + "google.cloud.visionai.v1.OccupancyCounti" + + "ngPredictionResult.Stats.AccumulatedObje" + + "ctCount\022\207\001\n%accumulated_negative_directi" + + "on_counts\030\005 \003(\0132X.google.cloud.visionai." + + "v1.OccupancyCountingPredictionResult.Sta" + + "ts.AccumulatedObjectCount\032\260\001\n\017ActiveZone" + + "Count\022>\n\nannotation\030\001 \001(\0132*.google.cloud" + + ".visionai.v1.StreamAnnotation\022]\n\006counts\030" + + "\002 \003(\0132M.google.cloud.visionai.v1.Occupan" + + "cyCountingPredictionResult.Stats.ObjectC" + + "ount\032M\n\tTrackInfo\022\020\n\010track_id\030\001 \001(\t\022.\n\ns" + + "tart_time\030\002 \001(\0132\032.google.protobuf.Timest" + + "amp\032\234\001\n\rDwellTimeInfo\022\020\n\010track_id\030\001 \001(\t\022" + + "\017\n\007zone_id\030\002 \001(\t\0224\n\020dwell_start_time\030\003 \001" + + "(\0132\032.google.protobuf.Timestamp\0222\n\016dwell_" + + "end_time\030\004 \001(\0132\032.google.protobuf.Timesta" + + "mpB\006\n\004_pts\"\252\002\n\020StreamAnnotation\022B\n\013activ" + + "e_zone\030\005 \001(\0132+.google.cloud.visionai.v1." + + "NormalizedPolygonH\000\022E\n\rcrossing_line\030\006 \001" + + "(\0132,.google.cloud.visionai.v1.Normalized" + + "PolylineH\000\022\n\n\002id\030\001 \001(\t\022\024\n\014display_name\030\002" + + " \001(\t\022\025\n\rsource_stream\030\003 \001(\t\022<\n\004type\030\004 \001(" + + "\0162..google.cloud.visionai.v1.StreamAnnot" + + "ationTypeB\024\n\022annotation_payload\"[\n\021Strea" + + "mAnnotations\022F\n\022stream_annotations\030\001 \003(\013" + + "2*.google.cloud.visionai.v1.StreamAnnota" + + "tion\"\\\n\021NormalizedPolygon\022G\n\023normalized_" + + "vertices\030\001 \003(\0132*.google.cloud.visionai.v" + + "1.NormalizedVertex\"]\n\022NormalizedPolyline" + + "\022G\n\023normalized_vertices\030\001 \003(\0132*.google.c" + + "loud.visionai.v1.NormalizedVertex\"(\n\020Nor" + + "malizedVertex\022\t\n\001x\030\001 \001(\002\022\t\n\001y\030\002 \001(\002\"`\n\023A" + + "ppPlatformMetadata\022\023\n\013application\030\001 \001(\t\022" + + "\023\n\013instance_id\030\002 \001(\t\022\014\n\004node\030\003 \001(\t\022\021\n\tpr" + + "ocessor\030\004 \001(\t\"\276\002\n\037AppPlatformCloudFuncti" + + "onRequest\022L\n\025app_platform_metadata\030\001 \001(\013" + + "2-.google.cloud.visionai.v1.AppPlatformM" + + "etadata\022f\n\013annotations\030\002 \003(\0132Q.google.cl" + + "oud.visionai.v1.AppPlatformCloudFunction" + + "Request.StructedInputAnnotation\032e\n\027Struc" + + "tedInputAnnotation\022\035\n\025ingestion_time_mic" + + "ros\030\001 \001(\003\022+\n\nannotation\030\002 \001(\0132\027.google.p" + + "rotobuf.Struct\"\265\002\n AppPlatformCloudFunct" + + "ionResponse\022h\n\013annotations\030\002 \003(\0132S.googl" + + "e.cloud.visionai.v1.AppPlatformCloudFunc" + + "tionResponse.StructedOutputAnnotation\022\036\n" + + "\026annotation_passthrough\030\003 \001(\010\022>\n\006events\030" + + "\004 \003(\0132..google.cloud.visionai.v1.AppPlat" + + "formEventBody\032G\n\030StructedOutputAnnotatio" + + "n\022+\n\nannotation\030\001 \001(\0132\027.google.protobuf." + + "Struct\"i\n\024AppPlatformEventBody\022\025\n\revent_" + + "message\030\001 \001(\t\022(\n\007payload\030\002 \001(\0132\027.google." + + "protobuf.Struct\022\020\n\010event_id\030\003 \001(\t*\220\001\n\024St" + + "reamAnnotationType\022&\n\"STREAM_ANNOTATION_" + + "TYPE_UNSPECIFIED\020\000\022&\n\"STREAM_ANNOTATION_" + + "TYPE_ACTIVE_ZONE\020\001\022(\n$STREAM_ANNOTATION_" + + "TYPE_CROSSING_LINE\020\002B\300\001\n\034com.google.clou" + + "d.visionai.v1B\020AnnotationsProtoP\001Z8cloud" + + ".google.com/go/visionai/apiv1/visionaipb" + + ";visionaipb\252\002\030Google.Cloud.VisionAI.V1\312\002" + + "\030Google\\Cloud\\VisionAI\\V1\352\002\033Google::Clou" + + "d::VisionAI::V1b\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.protobuf.StructProto.getDescriptor(), + com.google.protobuf.TimestampProto.getDescriptor(), + }); + internal_static_google_cloud_visionai_v1_PersonalProtectiveEquipmentDetectionOutput_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_visionai_v1_PersonalProtectiveEquipmentDetectionOutput_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_visionai_v1_PersonalProtectiveEquipmentDetectionOutput_descriptor, + new java.lang.String[] { + "CurrentTime", "DetectedPersons", + }); + internal_static_google_cloud_visionai_v1_PersonalProtectiveEquipmentDetectionOutput_PersonEntity_descriptor = + internal_static_google_cloud_visionai_v1_PersonalProtectiveEquipmentDetectionOutput_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_visionai_v1_PersonalProtectiveEquipmentDetectionOutput_PersonEntity_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_visionai_v1_PersonalProtectiveEquipmentDetectionOutput_PersonEntity_descriptor, + new java.lang.String[] { + "PersonEntityId", + }); + internal_static_google_cloud_visionai_v1_PersonalProtectiveEquipmentDetectionOutput_PPEEntity_descriptor = + internal_static_google_cloud_visionai_v1_PersonalProtectiveEquipmentDetectionOutput_descriptor + .getNestedTypes() + .get(1); + internal_static_google_cloud_visionai_v1_PersonalProtectiveEquipmentDetectionOutput_PPEEntity_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_visionai_v1_PersonalProtectiveEquipmentDetectionOutput_PPEEntity_descriptor, + new java.lang.String[] { + "PpeLabelId", "PpeLabelString", "PpeSupercategoryLabelString", "PpeEntityId", + }); + internal_static_google_cloud_visionai_v1_PersonalProtectiveEquipmentDetectionOutput_NormalizedBoundingBox_descriptor = + internal_static_google_cloud_visionai_v1_PersonalProtectiveEquipmentDetectionOutput_descriptor + .getNestedTypes() + .get(2); + internal_static_google_cloud_visionai_v1_PersonalProtectiveEquipmentDetectionOutput_NormalizedBoundingBox_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_visionai_v1_PersonalProtectiveEquipmentDetectionOutput_NormalizedBoundingBox_descriptor, + new java.lang.String[] { + "Xmin", "Ymin", "Width", "Height", + }); + internal_static_google_cloud_visionai_v1_PersonalProtectiveEquipmentDetectionOutput_PersonIdentifiedBox_descriptor = + internal_static_google_cloud_visionai_v1_PersonalProtectiveEquipmentDetectionOutput_descriptor + .getNestedTypes() + .get(3); + internal_static_google_cloud_visionai_v1_PersonalProtectiveEquipmentDetectionOutput_PersonIdentifiedBox_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_visionai_v1_PersonalProtectiveEquipmentDetectionOutput_PersonIdentifiedBox_descriptor, + new java.lang.String[] { + "BoxId", "NormalizedBoundingBox", "ConfidenceScore", "PersonEntity", + }); + internal_static_google_cloud_visionai_v1_PersonalProtectiveEquipmentDetectionOutput_PPEIdentifiedBox_descriptor = + internal_static_google_cloud_visionai_v1_PersonalProtectiveEquipmentDetectionOutput_descriptor + .getNestedTypes() + .get(4); + internal_static_google_cloud_visionai_v1_PersonalProtectiveEquipmentDetectionOutput_PPEIdentifiedBox_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_visionai_v1_PersonalProtectiveEquipmentDetectionOutput_PPEIdentifiedBox_descriptor, + new java.lang.String[] { + "BoxId", "NormalizedBoundingBox", "ConfidenceScore", "PpeEntity", + }); + internal_static_google_cloud_visionai_v1_PersonalProtectiveEquipmentDetectionOutput_DetectedPerson_descriptor = + internal_static_google_cloud_visionai_v1_PersonalProtectiveEquipmentDetectionOutput_descriptor + .getNestedTypes() + .get(5); + internal_static_google_cloud_visionai_v1_PersonalProtectiveEquipmentDetectionOutput_DetectedPerson_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_visionai_v1_PersonalProtectiveEquipmentDetectionOutput_DetectedPerson_descriptor, + new java.lang.String[] { + "PersonId", + "DetectedPersonIdentifiedBox", + "DetectedPpeIdentifiedBoxes", + "FaceCoverageScore", + "EyesCoverageScore", + "HeadCoverageScore", + "HandsCoverageScore", + "BodyCoverageScore", + "FeetCoverageScore", + }); + internal_static_google_cloud_visionai_v1_ObjectDetectionPredictionResult_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_cloud_visionai_v1_ObjectDetectionPredictionResult_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_visionai_v1_ObjectDetectionPredictionResult_descriptor, + new java.lang.String[] { + "CurrentTime", "IdentifiedBoxes", + }); + internal_static_google_cloud_visionai_v1_ObjectDetectionPredictionResult_Entity_descriptor = + internal_static_google_cloud_visionai_v1_ObjectDetectionPredictionResult_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_visionai_v1_ObjectDetectionPredictionResult_Entity_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_visionai_v1_ObjectDetectionPredictionResult_Entity_descriptor, + new java.lang.String[] { + "LabelId", "LabelString", + }); + internal_static_google_cloud_visionai_v1_ObjectDetectionPredictionResult_IdentifiedBox_descriptor = + internal_static_google_cloud_visionai_v1_ObjectDetectionPredictionResult_descriptor + .getNestedTypes() + .get(1); + internal_static_google_cloud_visionai_v1_ObjectDetectionPredictionResult_IdentifiedBox_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_visionai_v1_ObjectDetectionPredictionResult_IdentifiedBox_descriptor, + new java.lang.String[] { + "BoxId", "NormalizedBoundingBox", "ConfidenceScore", "Entity", + }); + internal_static_google_cloud_visionai_v1_ObjectDetectionPredictionResult_IdentifiedBox_NormalizedBoundingBox_descriptor = + internal_static_google_cloud_visionai_v1_ObjectDetectionPredictionResult_IdentifiedBox_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_visionai_v1_ObjectDetectionPredictionResult_IdentifiedBox_NormalizedBoundingBox_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_visionai_v1_ObjectDetectionPredictionResult_IdentifiedBox_NormalizedBoundingBox_descriptor, + new java.lang.String[] { + "Xmin", "Ymin", "Width", "Height", + }); + internal_static_google_cloud_visionai_v1_ImageObjectDetectionPredictionResult_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_google_cloud_visionai_v1_ImageObjectDetectionPredictionResult_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_visionai_v1_ImageObjectDetectionPredictionResult_descriptor, + new java.lang.String[] { + "Ids", "DisplayNames", "Confidences", "Bboxes", + }); + internal_static_google_cloud_visionai_v1_ClassificationPredictionResult_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_google_cloud_visionai_v1_ClassificationPredictionResult_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_visionai_v1_ClassificationPredictionResult_descriptor, + new java.lang.String[] { + "Ids", "DisplayNames", "Confidences", + }); + internal_static_google_cloud_visionai_v1_ImageSegmentationPredictionResult_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_google_cloud_visionai_v1_ImageSegmentationPredictionResult_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_visionai_v1_ImageSegmentationPredictionResult_descriptor, + new java.lang.String[] { + "CategoryMask", "ConfidenceMask", + }); + internal_static_google_cloud_visionai_v1_VideoActionRecognitionPredictionResult_descriptor = + getDescriptor().getMessageTypes().get(5); + internal_static_google_cloud_visionai_v1_VideoActionRecognitionPredictionResult_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_visionai_v1_VideoActionRecognitionPredictionResult_descriptor, + new java.lang.String[] { + "SegmentStartTime", "SegmentEndTime", "Actions", + }); + internal_static_google_cloud_visionai_v1_VideoActionRecognitionPredictionResult_IdentifiedAction_descriptor = + internal_static_google_cloud_visionai_v1_VideoActionRecognitionPredictionResult_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_visionai_v1_VideoActionRecognitionPredictionResult_IdentifiedAction_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_visionai_v1_VideoActionRecognitionPredictionResult_IdentifiedAction_descriptor, + new java.lang.String[] { + "Id", "DisplayName", "Confidence", + }); + internal_static_google_cloud_visionai_v1_VideoObjectTrackingPredictionResult_descriptor = + getDescriptor().getMessageTypes().get(6); + internal_static_google_cloud_visionai_v1_VideoObjectTrackingPredictionResult_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_visionai_v1_VideoObjectTrackingPredictionResult_descriptor, + new java.lang.String[] { + "SegmentStartTime", "SegmentEndTime", "Objects", + }); + internal_static_google_cloud_visionai_v1_VideoObjectTrackingPredictionResult_BoundingBox_descriptor = + internal_static_google_cloud_visionai_v1_VideoObjectTrackingPredictionResult_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_visionai_v1_VideoObjectTrackingPredictionResult_BoundingBox_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_visionai_v1_VideoObjectTrackingPredictionResult_BoundingBox_descriptor, + new java.lang.String[] { + "XMin", "XMax", "YMin", "YMax", + }); + internal_static_google_cloud_visionai_v1_VideoObjectTrackingPredictionResult_DetectedObject_descriptor = + internal_static_google_cloud_visionai_v1_VideoObjectTrackingPredictionResult_descriptor + .getNestedTypes() + .get(1); + internal_static_google_cloud_visionai_v1_VideoObjectTrackingPredictionResult_DetectedObject_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_visionai_v1_VideoObjectTrackingPredictionResult_DetectedObject_descriptor, + new java.lang.String[] { + "Id", "DisplayName", "BoundingBox", "Confidence", "TrackId", + }); + internal_static_google_cloud_visionai_v1_VideoClassificationPredictionResult_descriptor = + getDescriptor().getMessageTypes().get(7); + internal_static_google_cloud_visionai_v1_VideoClassificationPredictionResult_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_visionai_v1_VideoClassificationPredictionResult_descriptor, + new java.lang.String[] { + "SegmentStartTime", "SegmentEndTime", "Classifications", + }); + internal_static_google_cloud_visionai_v1_VideoClassificationPredictionResult_IdentifiedClassification_descriptor = + internal_static_google_cloud_visionai_v1_VideoClassificationPredictionResult_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_visionai_v1_VideoClassificationPredictionResult_IdentifiedClassification_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_visionai_v1_VideoClassificationPredictionResult_IdentifiedClassification_descriptor, + new java.lang.String[] { + "Id", "DisplayName", "Confidence", + }); + internal_static_google_cloud_visionai_v1_OccupancyCountingPredictionResult_descriptor = + getDescriptor().getMessageTypes().get(8); + internal_static_google_cloud_visionai_v1_OccupancyCountingPredictionResult_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_visionai_v1_OccupancyCountingPredictionResult_descriptor, + new java.lang.String[] { + "CurrentTime", "IdentifiedBoxes", "Stats", "TrackInfo", "DwellTimeInfo", "Pts", + }); + internal_static_google_cloud_visionai_v1_OccupancyCountingPredictionResult_Entity_descriptor = + internal_static_google_cloud_visionai_v1_OccupancyCountingPredictionResult_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_visionai_v1_OccupancyCountingPredictionResult_Entity_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_visionai_v1_OccupancyCountingPredictionResult_Entity_descriptor, + new java.lang.String[] { + "LabelId", "LabelString", + }); + internal_static_google_cloud_visionai_v1_OccupancyCountingPredictionResult_IdentifiedBox_descriptor = + internal_static_google_cloud_visionai_v1_OccupancyCountingPredictionResult_descriptor + .getNestedTypes() + .get(1); + internal_static_google_cloud_visionai_v1_OccupancyCountingPredictionResult_IdentifiedBox_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_visionai_v1_OccupancyCountingPredictionResult_IdentifiedBox_descriptor, + new java.lang.String[] { + "BoxId", "NormalizedBoundingBox", "Score", "Entity", "TrackId", + }); + internal_static_google_cloud_visionai_v1_OccupancyCountingPredictionResult_IdentifiedBox_NormalizedBoundingBox_descriptor = + internal_static_google_cloud_visionai_v1_OccupancyCountingPredictionResult_IdentifiedBox_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_visionai_v1_OccupancyCountingPredictionResult_IdentifiedBox_NormalizedBoundingBox_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_visionai_v1_OccupancyCountingPredictionResult_IdentifiedBox_NormalizedBoundingBox_descriptor, + new java.lang.String[] { + "Xmin", "Ymin", "Width", "Height", + }); + internal_static_google_cloud_visionai_v1_OccupancyCountingPredictionResult_Stats_descriptor = + internal_static_google_cloud_visionai_v1_OccupancyCountingPredictionResult_descriptor + .getNestedTypes() + .get(2); + internal_static_google_cloud_visionai_v1_OccupancyCountingPredictionResult_Stats_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_visionai_v1_OccupancyCountingPredictionResult_Stats_descriptor, + new java.lang.String[] { + "FullFrameCount", "CrossingLineCounts", "ActiveZoneCounts", + }); + internal_static_google_cloud_visionai_v1_OccupancyCountingPredictionResult_Stats_ObjectCount_descriptor = + internal_static_google_cloud_visionai_v1_OccupancyCountingPredictionResult_Stats_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_visionai_v1_OccupancyCountingPredictionResult_Stats_ObjectCount_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_visionai_v1_OccupancyCountingPredictionResult_Stats_ObjectCount_descriptor, + new java.lang.String[] { + "Entity", "Count", + }); + internal_static_google_cloud_visionai_v1_OccupancyCountingPredictionResult_Stats_AccumulatedObjectCount_descriptor = + internal_static_google_cloud_visionai_v1_OccupancyCountingPredictionResult_Stats_descriptor + .getNestedTypes() + .get(1); + internal_static_google_cloud_visionai_v1_OccupancyCountingPredictionResult_Stats_AccumulatedObjectCount_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_visionai_v1_OccupancyCountingPredictionResult_Stats_AccumulatedObjectCount_descriptor, + new java.lang.String[] { + "StartTime", "ObjectCount", + }); + internal_static_google_cloud_visionai_v1_OccupancyCountingPredictionResult_Stats_CrossingLineCount_descriptor = + internal_static_google_cloud_visionai_v1_OccupancyCountingPredictionResult_Stats_descriptor + .getNestedTypes() + .get(2); + internal_static_google_cloud_visionai_v1_OccupancyCountingPredictionResult_Stats_CrossingLineCount_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_visionai_v1_OccupancyCountingPredictionResult_Stats_CrossingLineCount_descriptor, + new java.lang.String[] { + "Annotation", + "PositiveDirectionCounts", + "NegativeDirectionCounts", + "AccumulatedPositiveDirectionCounts", + "AccumulatedNegativeDirectionCounts", + }); + internal_static_google_cloud_visionai_v1_OccupancyCountingPredictionResult_Stats_ActiveZoneCount_descriptor = + internal_static_google_cloud_visionai_v1_OccupancyCountingPredictionResult_Stats_descriptor + .getNestedTypes() + .get(3); + internal_static_google_cloud_visionai_v1_OccupancyCountingPredictionResult_Stats_ActiveZoneCount_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_visionai_v1_OccupancyCountingPredictionResult_Stats_ActiveZoneCount_descriptor, + new java.lang.String[] { + "Annotation", "Counts", + }); + internal_static_google_cloud_visionai_v1_OccupancyCountingPredictionResult_TrackInfo_descriptor = + internal_static_google_cloud_visionai_v1_OccupancyCountingPredictionResult_descriptor + .getNestedTypes() + .get(3); + internal_static_google_cloud_visionai_v1_OccupancyCountingPredictionResult_TrackInfo_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_visionai_v1_OccupancyCountingPredictionResult_TrackInfo_descriptor, + new java.lang.String[] { + "TrackId", "StartTime", + }); + internal_static_google_cloud_visionai_v1_OccupancyCountingPredictionResult_DwellTimeInfo_descriptor = + internal_static_google_cloud_visionai_v1_OccupancyCountingPredictionResult_descriptor + .getNestedTypes() + .get(4); + internal_static_google_cloud_visionai_v1_OccupancyCountingPredictionResult_DwellTimeInfo_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_visionai_v1_OccupancyCountingPredictionResult_DwellTimeInfo_descriptor, + new java.lang.String[] { + "TrackId", "ZoneId", "DwellStartTime", "DwellEndTime", + }); + internal_static_google_cloud_visionai_v1_StreamAnnotation_descriptor = + getDescriptor().getMessageTypes().get(9); + internal_static_google_cloud_visionai_v1_StreamAnnotation_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_visionai_v1_StreamAnnotation_descriptor, + new java.lang.String[] { + "ActiveZone", + "CrossingLine", + "Id", + "DisplayName", + "SourceStream", + "Type", + "AnnotationPayload", + }); + internal_static_google_cloud_visionai_v1_StreamAnnotations_descriptor = + getDescriptor().getMessageTypes().get(10); + internal_static_google_cloud_visionai_v1_StreamAnnotations_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_visionai_v1_StreamAnnotations_descriptor, + new java.lang.String[] { + "StreamAnnotations", + }); + internal_static_google_cloud_visionai_v1_NormalizedPolygon_descriptor = + getDescriptor().getMessageTypes().get(11); + internal_static_google_cloud_visionai_v1_NormalizedPolygon_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_visionai_v1_NormalizedPolygon_descriptor, + new java.lang.String[] { + "NormalizedVertices", + }); + internal_static_google_cloud_visionai_v1_NormalizedPolyline_descriptor = + getDescriptor().getMessageTypes().get(12); + internal_static_google_cloud_visionai_v1_NormalizedPolyline_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_visionai_v1_NormalizedPolyline_descriptor, + new java.lang.String[] { + "NormalizedVertices", + }); + internal_static_google_cloud_visionai_v1_NormalizedVertex_descriptor = + getDescriptor().getMessageTypes().get(13); + internal_static_google_cloud_visionai_v1_NormalizedVertex_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_visionai_v1_NormalizedVertex_descriptor, + new java.lang.String[] { + "X", "Y", + }); + internal_static_google_cloud_visionai_v1_AppPlatformMetadata_descriptor = + getDescriptor().getMessageTypes().get(14); + internal_static_google_cloud_visionai_v1_AppPlatformMetadata_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_visionai_v1_AppPlatformMetadata_descriptor, + new java.lang.String[] { + "Application", "InstanceId", "Node", "Processor", + }); + internal_static_google_cloud_visionai_v1_AppPlatformCloudFunctionRequest_descriptor = + getDescriptor().getMessageTypes().get(15); + internal_static_google_cloud_visionai_v1_AppPlatformCloudFunctionRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_visionai_v1_AppPlatformCloudFunctionRequest_descriptor, + new java.lang.String[] { + "AppPlatformMetadata", "Annotations", + }); + internal_static_google_cloud_visionai_v1_AppPlatformCloudFunctionRequest_StructedInputAnnotation_descriptor = + internal_static_google_cloud_visionai_v1_AppPlatformCloudFunctionRequest_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_visionai_v1_AppPlatformCloudFunctionRequest_StructedInputAnnotation_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_visionai_v1_AppPlatformCloudFunctionRequest_StructedInputAnnotation_descriptor, + new java.lang.String[] { + "IngestionTimeMicros", "Annotation", + }); + internal_static_google_cloud_visionai_v1_AppPlatformCloudFunctionResponse_descriptor = + getDescriptor().getMessageTypes().get(16); + internal_static_google_cloud_visionai_v1_AppPlatformCloudFunctionResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_visionai_v1_AppPlatformCloudFunctionResponse_descriptor, + new java.lang.String[] { + "Annotations", "AnnotationPassthrough", "Events", + }); + internal_static_google_cloud_visionai_v1_AppPlatformCloudFunctionResponse_StructedOutputAnnotation_descriptor = + internal_static_google_cloud_visionai_v1_AppPlatformCloudFunctionResponse_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_visionai_v1_AppPlatformCloudFunctionResponse_StructedOutputAnnotation_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_visionai_v1_AppPlatformCloudFunctionResponse_StructedOutputAnnotation_descriptor, + new java.lang.String[] { + "Annotation", + }); + internal_static_google_cloud_visionai_v1_AppPlatformEventBody_descriptor = + getDescriptor().getMessageTypes().get(17); + internal_static_google_cloud_visionai_v1_AppPlatformEventBody_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_visionai_v1_AppPlatformEventBody_descriptor, + new java.lang.String[] { + "EventMessage", "Payload", "EventId", + }); + com.google.protobuf.StructProto.getDescriptor(); + com.google.protobuf.TimestampProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/AppPlatformCloudFunctionRequest.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/AppPlatformCloudFunctionRequest.java new file mode 100644 index 000000000000..18291aeb9d4f --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/AppPlatformCloudFunctionRequest.java @@ -0,0 +1,2265 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/annotations.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * For any cloud function based customer processing logic, customer's cloud
+ * function is expected to receive AppPlatformCloudFunctionRequest as request
+ * and send back AppPlatformCloudFunctionResponse as response.
+ * Message of request from AppPlatform to Cloud Function.
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.AppPlatformCloudFunctionRequest} + */ +public final class AppPlatformCloudFunctionRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.AppPlatformCloudFunctionRequest) + AppPlatformCloudFunctionRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use AppPlatformCloudFunctionRequest.newBuilder() to construct. + private AppPlatformCloudFunctionRequest( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private AppPlatformCloudFunctionRequest() { + annotations_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new AppPlatformCloudFunctionRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.AnnotationsProto + .internal_static_google_cloud_visionai_v1_AppPlatformCloudFunctionRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.AnnotationsProto + .internal_static_google_cloud_visionai_v1_AppPlatformCloudFunctionRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.AppPlatformCloudFunctionRequest.class, + com.google.cloud.visionai.v1.AppPlatformCloudFunctionRequest.Builder.class); + } + + public interface StructedInputAnnotationOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.AppPlatformCloudFunctionRequest.StructedInputAnnotation) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * The ingestion time of the current annotation.
+     * 
+ * + * int64 ingestion_time_micros = 1; + * + * @return The ingestionTimeMicros. + */ + long getIngestionTimeMicros(); + + /** + * + * + *
+     * The struct format of the actual annotation.
+     * 
+ * + * .google.protobuf.Struct annotation = 2; + * + * @return Whether the annotation field is set. + */ + boolean hasAnnotation(); + /** + * + * + *
+     * The struct format of the actual annotation.
+     * 
+ * + * .google.protobuf.Struct annotation = 2; + * + * @return The annotation. + */ + com.google.protobuf.Struct getAnnotation(); + /** + * + * + *
+     * The struct format of the actual annotation.
+     * 
+ * + * .google.protobuf.Struct annotation = 2; + */ + com.google.protobuf.StructOrBuilder getAnnotationOrBuilder(); + } + /** + * + * + *
+   * A general annotation message that uses struct format to represent different
+   * concrete annotation protobufs.
+   * 
+ * + * Protobuf type {@code + * google.cloud.visionai.v1.AppPlatformCloudFunctionRequest.StructedInputAnnotation} + */ + public static final class StructedInputAnnotation extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.AppPlatformCloudFunctionRequest.StructedInputAnnotation) + StructedInputAnnotationOrBuilder { + private static final long serialVersionUID = 0L; + // Use StructedInputAnnotation.newBuilder() to construct. + private StructedInputAnnotation(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private StructedInputAnnotation() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new StructedInputAnnotation(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.AnnotationsProto + .internal_static_google_cloud_visionai_v1_AppPlatformCloudFunctionRequest_StructedInputAnnotation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.AnnotationsProto + .internal_static_google_cloud_visionai_v1_AppPlatformCloudFunctionRequest_StructedInputAnnotation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.AppPlatformCloudFunctionRequest.StructedInputAnnotation + .class, + com.google.cloud.visionai.v1.AppPlatformCloudFunctionRequest.StructedInputAnnotation + .Builder.class); + } + + private int bitField0_; + public static final int INGESTION_TIME_MICROS_FIELD_NUMBER = 1; + private long ingestionTimeMicros_ = 0L; + /** + * + * + *
+     * The ingestion time of the current annotation.
+     * 
+ * + * int64 ingestion_time_micros = 1; + * + * @return The ingestionTimeMicros. + */ + @java.lang.Override + public long getIngestionTimeMicros() { + return ingestionTimeMicros_; + } + + public static final int ANNOTATION_FIELD_NUMBER = 2; + private com.google.protobuf.Struct annotation_; + /** + * + * + *
+     * The struct format of the actual annotation.
+     * 
+ * + * .google.protobuf.Struct annotation = 2; + * + * @return Whether the annotation field is set. + */ + @java.lang.Override + public boolean hasAnnotation() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * The struct format of the actual annotation.
+     * 
+ * + * .google.protobuf.Struct annotation = 2; + * + * @return The annotation. + */ + @java.lang.Override + public com.google.protobuf.Struct getAnnotation() { + return annotation_ == null ? com.google.protobuf.Struct.getDefaultInstance() : annotation_; + } + /** + * + * + *
+     * The struct format of the actual annotation.
+     * 
+ * + * .google.protobuf.Struct annotation = 2; + */ + @java.lang.Override + public com.google.protobuf.StructOrBuilder getAnnotationOrBuilder() { + return annotation_ == null ? com.google.protobuf.Struct.getDefaultInstance() : annotation_; + } + + 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 (ingestionTimeMicros_ != 0L) { + output.writeInt64(1, ingestionTimeMicros_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getAnnotation()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (ingestionTimeMicros_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(1, ingestionTimeMicros_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getAnnotation()); + } + size += getUnknownFields().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.visionai.v1.AppPlatformCloudFunctionRequest.StructedInputAnnotation)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.AppPlatformCloudFunctionRequest.StructedInputAnnotation other = + (com.google.cloud.visionai.v1.AppPlatformCloudFunctionRequest.StructedInputAnnotation) + obj; + + if (getIngestionTimeMicros() != other.getIngestionTimeMicros()) return false; + if (hasAnnotation() != other.hasAnnotation()) return false; + if (hasAnnotation()) { + if (!getAnnotation().equals(other.getAnnotation())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + INGESTION_TIME_MICROS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getIngestionTimeMicros()); + if (hasAnnotation()) { + hash = (37 * hash) + ANNOTATION_FIELD_NUMBER; + hash = (53 * hash) + getAnnotation().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.AppPlatformCloudFunctionRequest + .StructedInputAnnotation + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.AppPlatformCloudFunctionRequest + .StructedInputAnnotation + 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.visionai.v1.AppPlatformCloudFunctionRequest + .StructedInputAnnotation + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.AppPlatformCloudFunctionRequest + .StructedInputAnnotation + 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.visionai.v1.AppPlatformCloudFunctionRequest + .StructedInputAnnotation + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.AppPlatformCloudFunctionRequest + .StructedInputAnnotation + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.AppPlatformCloudFunctionRequest + .StructedInputAnnotation + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.AppPlatformCloudFunctionRequest + .StructedInputAnnotation + 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.visionai.v1.AppPlatformCloudFunctionRequest + .StructedInputAnnotation + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.AppPlatformCloudFunctionRequest + .StructedInputAnnotation + 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.visionai.v1.AppPlatformCloudFunctionRequest + .StructedInputAnnotation + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.AppPlatformCloudFunctionRequest + .StructedInputAnnotation + 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.visionai.v1.AppPlatformCloudFunctionRequest.StructedInputAnnotation + 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 general annotation message that uses struct format to represent different
+     * concrete annotation protobufs.
+     * 
+ * + * Protobuf type {@code + * google.cloud.visionai.v1.AppPlatformCloudFunctionRequest.StructedInputAnnotation} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.AppPlatformCloudFunctionRequest.StructedInputAnnotation) + com.google.cloud.visionai.v1.AppPlatformCloudFunctionRequest + .StructedInputAnnotationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.AnnotationsProto + .internal_static_google_cloud_visionai_v1_AppPlatformCloudFunctionRequest_StructedInputAnnotation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.AnnotationsProto + .internal_static_google_cloud_visionai_v1_AppPlatformCloudFunctionRequest_StructedInputAnnotation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.AppPlatformCloudFunctionRequest.StructedInputAnnotation + .class, + com.google.cloud.visionai.v1.AppPlatformCloudFunctionRequest.StructedInputAnnotation + .Builder.class); + } + + // Construct using + // com.google.cloud.visionai.v1.AppPlatformCloudFunctionRequest.StructedInputAnnotation.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getAnnotationFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + ingestionTimeMicros_ = 0L; + annotation_ = null; + if (annotationBuilder_ != null) { + annotationBuilder_.dispose(); + annotationBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.AnnotationsProto + .internal_static_google_cloud_visionai_v1_AppPlatformCloudFunctionRequest_StructedInputAnnotation_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.AppPlatformCloudFunctionRequest.StructedInputAnnotation + getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.AppPlatformCloudFunctionRequest.StructedInputAnnotation + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.AppPlatformCloudFunctionRequest.StructedInputAnnotation + build() { + com.google.cloud.visionai.v1.AppPlatformCloudFunctionRequest.StructedInputAnnotation + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.AppPlatformCloudFunctionRequest.StructedInputAnnotation + buildPartial() { + com.google.cloud.visionai.v1.AppPlatformCloudFunctionRequest.StructedInputAnnotation + result = + new com.google.cloud.visionai.v1.AppPlatformCloudFunctionRequest + .StructedInputAnnotation(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.visionai.v1.AppPlatformCloudFunctionRequest.StructedInputAnnotation + result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.ingestionTimeMicros_ = ingestionTimeMicros_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.annotation_ = + annotationBuilder_ == null ? annotation_ : annotationBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.visionai.v1.AppPlatformCloudFunctionRequest.StructedInputAnnotation) { + return mergeFrom( + (com.google.cloud.visionai.v1.AppPlatformCloudFunctionRequest.StructedInputAnnotation) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.visionai.v1.AppPlatformCloudFunctionRequest.StructedInputAnnotation + other) { + if (other + == com.google.cloud.visionai.v1.AppPlatformCloudFunctionRequest.StructedInputAnnotation + .getDefaultInstance()) return this; + if (other.getIngestionTimeMicros() != 0L) { + setIngestionTimeMicros(other.getIngestionTimeMicros()); + } + if (other.hasAnnotation()) { + mergeAnnotation(other.getAnnotation()); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + ingestionTimeMicros_ = input.readInt64(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 18: + { + input.readMessage(getAnnotationFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private long ingestionTimeMicros_; + /** + * + * + *
+       * The ingestion time of the current annotation.
+       * 
+ * + * int64 ingestion_time_micros = 1; + * + * @return The ingestionTimeMicros. + */ + @java.lang.Override + public long getIngestionTimeMicros() { + return ingestionTimeMicros_; + } + /** + * + * + *
+       * The ingestion time of the current annotation.
+       * 
+ * + * int64 ingestion_time_micros = 1; + * + * @param value The ingestionTimeMicros to set. + * @return This builder for chaining. + */ + public Builder setIngestionTimeMicros(long value) { + + ingestionTimeMicros_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * The ingestion time of the current annotation.
+       * 
+ * + * int64 ingestion_time_micros = 1; + * + * @return This builder for chaining. + */ + public Builder clearIngestionTimeMicros() { + bitField0_ = (bitField0_ & ~0x00000001); + ingestionTimeMicros_ = 0L; + onChanged(); + return this; + } + + private com.google.protobuf.Struct annotation_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Struct, + com.google.protobuf.Struct.Builder, + com.google.protobuf.StructOrBuilder> + annotationBuilder_; + /** + * + * + *
+       * The struct format of the actual annotation.
+       * 
+ * + * .google.protobuf.Struct annotation = 2; + * + * @return Whether the annotation field is set. + */ + public boolean hasAnnotation() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+       * The struct format of the actual annotation.
+       * 
+ * + * .google.protobuf.Struct annotation = 2; + * + * @return The annotation. + */ + public com.google.protobuf.Struct getAnnotation() { + if (annotationBuilder_ == null) { + return annotation_ == null + ? com.google.protobuf.Struct.getDefaultInstance() + : annotation_; + } else { + return annotationBuilder_.getMessage(); + } + } + /** + * + * + *
+       * The struct format of the actual annotation.
+       * 
+ * + * .google.protobuf.Struct annotation = 2; + */ + public Builder setAnnotation(com.google.protobuf.Struct value) { + if (annotationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + annotation_ = value; + } else { + annotationBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * The struct format of the actual annotation.
+       * 
+ * + * .google.protobuf.Struct annotation = 2; + */ + public Builder setAnnotation(com.google.protobuf.Struct.Builder builderForValue) { + if (annotationBuilder_ == null) { + annotation_ = builderForValue.build(); + } else { + annotationBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * The struct format of the actual annotation.
+       * 
+ * + * .google.protobuf.Struct annotation = 2; + */ + public Builder mergeAnnotation(com.google.protobuf.Struct value) { + if (annotationBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && annotation_ != null + && annotation_ != com.google.protobuf.Struct.getDefaultInstance()) { + getAnnotationBuilder().mergeFrom(value); + } else { + annotation_ = value; + } + } else { + annotationBuilder_.mergeFrom(value); + } + if (annotation_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + /** + * + * + *
+       * The struct format of the actual annotation.
+       * 
+ * + * .google.protobuf.Struct annotation = 2; + */ + public Builder clearAnnotation() { + bitField0_ = (bitField0_ & ~0x00000002); + annotation_ = null; + if (annotationBuilder_ != null) { + annotationBuilder_.dispose(); + annotationBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+       * The struct format of the actual annotation.
+       * 
+ * + * .google.protobuf.Struct annotation = 2; + */ + public com.google.protobuf.Struct.Builder getAnnotationBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getAnnotationFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * The struct format of the actual annotation.
+       * 
+ * + * .google.protobuf.Struct annotation = 2; + */ + public com.google.protobuf.StructOrBuilder getAnnotationOrBuilder() { + if (annotationBuilder_ != null) { + return annotationBuilder_.getMessageOrBuilder(); + } else { + return annotation_ == null + ? com.google.protobuf.Struct.getDefaultInstance() + : annotation_; + } + } + /** + * + * + *
+       * The struct format of the actual annotation.
+       * 
+ * + * .google.protobuf.Struct annotation = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Struct, + com.google.protobuf.Struct.Builder, + com.google.protobuf.StructOrBuilder> + getAnnotationFieldBuilder() { + if (annotationBuilder_ == null) { + annotationBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Struct, + com.google.protobuf.Struct.Builder, + com.google.protobuf.StructOrBuilder>( + getAnnotation(), getParentForChildren(), isClean()); + annotation_ = null; + } + return annotationBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.AppPlatformCloudFunctionRequest.StructedInputAnnotation) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.AppPlatformCloudFunctionRequest.StructedInputAnnotation) + private static final com.google.cloud.visionai.v1.AppPlatformCloudFunctionRequest + .StructedInputAnnotation + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.visionai.v1.AppPlatformCloudFunctionRequest + .StructedInputAnnotation(); + } + + public static com.google.cloud.visionai.v1.AppPlatformCloudFunctionRequest + .StructedInputAnnotation + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public StructedInputAnnotation parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.AppPlatformCloudFunctionRequest.StructedInputAnnotation + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int bitField0_; + public static final int APP_PLATFORM_METADATA_FIELD_NUMBER = 1; + private com.google.cloud.visionai.v1.AppPlatformMetadata appPlatformMetadata_; + /** + * + * + *
+   * The metadata of the AppPlatform for customer to identify the source of the
+   * payload.
+   * 
+ * + * .google.cloud.visionai.v1.AppPlatformMetadata app_platform_metadata = 1; + * + * @return Whether the appPlatformMetadata field is set. + */ + @java.lang.Override + public boolean hasAppPlatformMetadata() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * The metadata of the AppPlatform for customer to identify the source of the
+   * payload.
+   * 
+ * + * .google.cloud.visionai.v1.AppPlatformMetadata app_platform_metadata = 1; + * + * @return The appPlatformMetadata. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.AppPlatformMetadata getAppPlatformMetadata() { + return appPlatformMetadata_ == null + ? com.google.cloud.visionai.v1.AppPlatformMetadata.getDefaultInstance() + : appPlatformMetadata_; + } + /** + * + * + *
+   * The metadata of the AppPlatform for customer to identify the source of the
+   * payload.
+   * 
+ * + * .google.cloud.visionai.v1.AppPlatformMetadata app_platform_metadata = 1; + */ + @java.lang.Override + public com.google.cloud.visionai.v1.AppPlatformMetadataOrBuilder + getAppPlatformMetadataOrBuilder() { + return appPlatformMetadata_ == null + ? com.google.cloud.visionai.v1.AppPlatformMetadata.getDefaultInstance() + : appPlatformMetadata_; + } + + public static final int ANNOTATIONS_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private java.util.List< + com.google.cloud.visionai.v1.AppPlatformCloudFunctionRequest.StructedInputAnnotation> + annotations_; + /** + * + * + *
+   * The actual annotations to be processed by the customized Cloud Function.
+   * 
+ * + * + * repeated .google.cloud.visionai.v1.AppPlatformCloudFunctionRequest.StructedInputAnnotation annotations = 2; + * + */ + @java.lang.Override + public java.util.List< + com.google.cloud.visionai.v1.AppPlatformCloudFunctionRequest.StructedInputAnnotation> + getAnnotationsList() { + return annotations_; + } + /** + * + * + *
+   * The actual annotations to be processed by the customized Cloud Function.
+   * 
+ * + * + * repeated .google.cloud.visionai.v1.AppPlatformCloudFunctionRequest.StructedInputAnnotation annotations = 2; + * + */ + @java.lang.Override + public java.util.List< + ? extends + com.google.cloud.visionai.v1.AppPlatformCloudFunctionRequest + .StructedInputAnnotationOrBuilder> + getAnnotationsOrBuilderList() { + return annotations_; + } + /** + * + * + *
+   * The actual annotations to be processed by the customized Cloud Function.
+   * 
+ * + * + * repeated .google.cloud.visionai.v1.AppPlatformCloudFunctionRequest.StructedInputAnnotation annotations = 2; + * + */ + @java.lang.Override + public int getAnnotationsCount() { + return annotations_.size(); + } + /** + * + * + *
+   * The actual annotations to be processed by the customized Cloud Function.
+   * 
+ * + * + * repeated .google.cloud.visionai.v1.AppPlatformCloudFunctionRequest.StructedInputAnnotation annotations = 2; + * + */ + @java.lang.Override + public com.google.cloud.visionai.v1.AppPlatformCloudFunctionRequest.StructedInputAnnotation + getAnnotations(int index) { + return annotations_.get(index); + } + /** + * + * + *
+   * The actual annotations to be processed by the customized Cloud Function.
+   * 
+ * + * + * repeated .google.cloud.visionai.v1.AppPlatformCloudFunctionRequest.StructedInputAnnotation annotations = 2; + * + */ + @java.lang.Override + public com.google.cloud.visionai.v1.AppPlatformCloudFunctionRequest + .StructedInputAnnotationOrBuilder + getAnnotationsOrBuilder(int index) { + return annotations_.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 (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getAppPlatformMetadata()); + } + for (int i = 0; i < annotations_.size(); i++) { + output.writeMessage(2, annotations_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getAppPlatformMetadata()); + } + for (int i = 0; i < annotations_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, annotations_.get(i)); + } + size += getUnknownFields().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.visionai.v1.AppPlatformCloudFunctionRequest)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.AppPlatformCloudFunctionRequest other = + (com.google.cloud.visionai.v1.AppPlatformCloudFunctionRequest) obj; + + if (hasAppPlatformMetadata() != other.hasAppPlatformMetadata()) return false; + if (hasAppPlatformMetadata()) { + if (!getAppPlatformMetadata().equals(other.getAppPlatformMetadata())) return false; + } + if (!getAnnotationsList().equals(other.getAnnotationsList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasAppPlatformMetadata()) { + hash = (37 * hash) + APP_PLATFORM_METADATA_FIELD_NUMBER; + hash = (53 * hash) + getAppPlatformMetadata().hashCode(); + } + if (getAnnotationsCount() > 0) { + hash = (37 * hash) + ANNOTATIONS_FIELD_NUMBER; + hash = (53 * hash) + getAnnotationsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.AppPlatformCloudFunctionRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.AppPlatformCloudFunctionRequest 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.visionai.v1.AppPlatformCloudFunctionRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.AppPlatformCloudFunctionRequest 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.visionai.v1.AppPlatformCloudFunctionRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.AppPlatformCloudFunctionRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.AppPlatformCloudFunctionRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.AppPlatformCloudFunctionRequest 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.visionai.v1.AppPlatformCloudFunctionRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.AppPlatformCloudFunctionRequest 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.visionai.v1.AppPlatformCloudFunctionRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.AppPlatformCloudFunctionRequest 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.visionai.v1.AppPlatformCloudFunctionRequest 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; + } + /** + * + * + *
+   * For any cloud function based customer processing logic, customer's cloud
+   * function is expected to receive AppPlatformCloudFunctionRequest as request
+   * and send back AppPlatformCloudFunctionResponse as response.
+   * Message of request from AppPlatform to Cloud Function.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.AppPlatformCloudFunctionRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.AppPlatformCloudFunctionRequest) + com.google.cloud.visionai.v1.AppPlatformCloudFunctionRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.AnnotationsProto + .internal_static_google_cloud_visionai_v1_AppPlatformCloudFunctionRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.AnnotationsProto + .internal_static_google_cloud_visionai_v1_AppPlatformCloudFunctionRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.AppPlatformCloudFunctionRequest.class, + com.google.cloud.visionai.v1.AppPlatformCloudFunctionRequest.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.AppPlatformCloudFunctionRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getAppPlatformMetadataFieldBuilder(); + getAnnotationsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + appPlatformMetadata_ = null; + if (appPlatformMetadataBuilder_ != null) { + appPlatformMetadataBuilder_.dispose(); + appPlatformMetadataBuilder_ = null; + } + if (annotationsBuilder_ == null) { + annotations_ = java.util.Collections.emptyList(); + } else { + annotations_ = null; + annotationsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.AnnotationsProto + .internal_static_google_cloud_visionai_v1_AppPlatformCloudFunctionRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.AppPlatformCloudFunctionRequest + getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.AppPlatformCloudFunctionRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.AppPlatformCloudFunctionRequest build() { + com.google.cloud.visionai.v1.AppPlatformCloudFunctionRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.AppPlatformCloudFunctionRequest buildPartial() { + com.google.cloud.visionai.v1.AppPlatformCloudFunctionRequest result = + new com.google.cloud.visionai.v1.AppPlatformCloudFunctionRequest(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.visionai.v1.AppPlatformCloudFunctionRequest result) { + if (annotationsBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + annotations_ = java.util.Collections.unmodifiableList(annotations_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.annotations_ = annotations_; + } else { + result.annotations_ = annotationsBuilder_.build(); + } + } + + private void buildPartial0( + com.google.cloud.visionai.v1.AppPlatformCloudFunctionRequest result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.appPlatformMetadata_ = + appPlatformMetadataBuilder_ == null + ? appPlatformMetadata_ + : appPlatformMetadataBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.AppPlatformCloudFunctionRequest) { + return mergeFrom((com.google.cloud.visionai.v1.AppPlatformCloudFunctionRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.AppPlatformCloudFunctionRequest other) { + if (other + == com.google.cloud.visionai.v1.AppPlatformCloudFunctionRequest.getDefaultInstance()) + return this; + if (other.hasAppPlatformMetadata()) { + mergeAppPlatformMetadata(other.getAppPlatformMetadata()); + } + if (annotationsBuilder_ == null) { + if (!other.annotations_.isEmpty()) { + if (annotations_.isEmpty()) { + annotations_ = other.annotations_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureAnnotationsIsMutable(); + annotations_.addAll(other.annotations_); + } + onChanged(); + } + } else { + if (!other.annotations_.isEmpty()) { + if (annotationsBuilder_.isEmpty()) { + annotationsBuilder_.dispose(); + annotationsBuilder_ = null; + annotations_ = other.annotations_; + bitField0_ = (bitField0_ & ~0x00000002); + annotationsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getAnnotationsFieldBuilder() + : null; + } else { + annotationsBuilder_.addAllMessages(other.annotations_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage( + getAppPlatformMetadataFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + com.google.cloud.visionai.v1.AppPlatformCloudFunctionRequest.StructedInputAnnotation + m = + input.readMessage( + com.google.cloud.visionai.v1.AppPlatformCloudFunctionRequest + .StructedInputAnnotation.parser(), + extensionRegistry); + if (annotationsBuilder_ == null) { + ensureAnnotationsIsMutable(); + annotations_.add(m); + } else { + annotationsBuilder_.addMessage(m); + } + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.cloud.visionai.v1.AppPlatformMetadata appPlatformMetadata_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.AppPlatformMetadata, + com.google.cloud.visionai.v1.AppPlatformMetadata.Builder, + com.google.cloud.visionai.v1.AppPlatformMetadataOrBuilder> + appPlatformMetadataBuilder_; + /** + * + * + *
+     * The metadata of the AppPlatform for customer to identify the source of the
+     * payload.
+     * 
+ * + * .google.cloud.visionai.v1.AppPlatformMetadata app_platform_metadata = 1; + * + * @return Whether the appPlatformMetadata field is set. + */ + public boolean hasAppPlatformMetadata() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * The metadata of the AppPlatform for customer to identify the source of the
+     * payload.
+     * 
+ * + * .google.cloud.visionai.v1.AppPlatformMetadata app_platform_metadata = 1; + * + * @return The appPlatformMetadata. + */ + public com.google.cloud.visionai.v1.AppPlatformMetadata getAppPlatformMetadata() { + if (appPlatformMetadataBuilder_ == null) { + return appPlatformMetadata_ == null + ? com.google.cloud.visionai.v1.AppPlatformMetadata.getDefaultInstance() + : appPlatformMetadata_; + } else { + return appPlatformMetadataBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The metadata of the AppPlatform for customer to identify the source of the
+     * payload.
+     * 
+ * + * .google.cloud.visionai.v1.AppPlatformMetadata app_platform_metadata = 1; + */ + public Builder setAppPlatformMetadata(com.google.cloud.visionai.v1.AppPlatformMetadata value) { + if (appPlatformMetadataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + appPlatformMetadata_ = value; + } else { + appPlatformMetadataBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The metadata of the AppPlatform for customer to identify the source of the
+     * payload.
+     * 
+ * + * .google.cloud.visionai.v1.AppPlatformMetadata app_platform_metadata = 1; + */ + public Builder setAppPlatformMetadata( + com.google.cloud.visionai.v1.AppPlatformMetadata.Builder builderForValue) { + if (appPlatformMetadataBuilder_ == null) { + appPlatformMetadata_ = builderForValue.build(); + } else { + appPlatformMetadataBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The metadata of the AppPlatform for customer to identify the source of the
+     * payload.
+     * 
+ * + * .google.cloud.visionai.v1.AppPlatformMetadata app_platform_metadata = 1; + */ + public Builder mergeAppPlatformMetadata( + com.google.cloud.visionai.v1.AppPlatformMetadata value) { + if (appPlatformMetadataBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && appPlatformMetadata_ != null + && appPlatformMetadata_ + != com.google.cloud.visionai.v1.AppPlatformMetadata.getDefaultInstance()) { + getAppPlatformMetadataBuilder().mergeFrom(value); + } else { + appPlatformMetadata_ = value; + } + } else { + appPlatformMetadataBuilder_.mergeFrom(value); + } + if (appPlatformMetadata_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + /** + * + * + *
+     * The metadata of the AppPlatform for customer to identify the source of the
+     * payload.
+     * 
+ * + * .google.cloud.visionai.v1.AppPlatformMetadata app_platform_metadata = 1; + */ + public Builder clearAppPlatformMetadata() { + bitField0_ = (bitField0_ & ~0x00000001); + appPlatformMetadata_ = null; + if (appPlatformMetadataBuilder_ != null) { + appPlatformMetadataBuilder_.dispose(); + appPlatformMetadataBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * The metadata of the AppPlatform for customer to identify the source of the
+     * payload.
+     * 
+ * + * .google.cloud.visionai.v1.AppPlatformMetadata app_platform_metadata = 1; + */ + public com.google.cloud.visionai.v1.AppPlatformMetadata.Builder + getAppPlatformMetadataBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getAppPlatformMetadataFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The metadata of the AppPlatform for customer to identify the source of the
+     * payload.
+     * 
+ * + * .google.cloud.visionai.v1.AppPlatformMetadata app_platform_metadata = 1; + */ + public com.google.cloud.visionai.v1.AppPlatformMetadataOrBuilder + getAppPlatformMetadataOrBuilder() { + if (appPlatformMetadataBuilder_ != null) { + return appPlatformMetadataBuilder_.getMessageOrBuilder(); + } else { + return appPlatformMetadata_ == null + ? com.google.cloud.visionai.v1.AppPlatformMetadata.getDefaultInstance() + : appPlatformMetadata_; + } + } + /** + * + * + *
+     * The metadata of the AppPlatform for customer to identify the source of the
+     * payload.
+     * 
+ * + * .google.cloud.visionai.v1.AppPlatformMetadata app_platform_metadata = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.AppPlatformMetadata, + com.google.cloud.visionai.v1.AppPlatformMetadata.Builder, + com.google.cloud.visionai.v1.AppPlatformMetadataOrBuilder> + getAppPlatformMetadataFieldBuilder() { + if (appPlatformMetadataBuilder_ == null) { + appPlatformMetadataBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.AppPlatformMetadata, + com.google.cloud.visionai.v1.AppPlatformMetadata.Builder, + com.google.cloud.visionai.v1.AppPlatformMetadataOrBuilder>( + getAppPlatformMetadata(), getParentForChildren(), isClean()); + appPlatformMetadata_ = null; + } + return appPlatformMetadataBuilder_; + } + + private java.util.List< + com.google.cloud.visionai.v1.AppPlatformCloudFunctionRequest.StructedInputAnnotation> + annotations_ = java.util.Collections.emptyList(); + + private void ensureAnnotationsIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + annotations_ = + new java.util.ArrayList< + com.google.cloud.visionai.v1.AppPlatformCloudFunctionRequest + .StructedInputAnnotation>(annotations_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.visionai.v1.AppPlatformCloudFunctionRequest.StructedInputAnnotation, + com.google.cloud.visionai.v1.AppPlatformCloudFunctionRequest.StructedInputAnnotation + .Builder, + com.google.cloud.visionai.v1.AppPlatformCloudFunctionRequest + .StructedInputAnnotationOrBuilder> + annotationsBuilder_; + + /** + * + * + *
+     * The actual annotations to be processed by the customized Cloud Function.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.AppPlatformCloudFunctionRequest.StructedInputAnnotation annotations = 2; + * + */ + public java.util.List< + com.google.cloud.visionai.v1.AppPlatformCloudFunctionRequest.StructedInputAnnotation> + getAnnotationsList() { + if (annotationsBuilder_ == null) { + return java.util.Collections.unmodifiableList(annotations_); + } else { + return annotationsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * The actual annotations to be processed by the customized Cloud Function.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.AppPlatformCloudFunctionRequest.StructedInputAnnotation annotations = 2; + * + */ + public int getAnnotationsCount() { + if (annotationsBuilder_ == null) { + return annotations_.size(); + } else { + return annotationsBuilder_.getCount(); + } + } + /** + * + * + *
+     * The actual annotations to be processed by the customized Cloud Function.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.AppPlatformCloudFunctionRequest.StructedInputAnnotation annotations = 2; + * + */ + public com.google.cloud.visionai.v1.AppPlatformCloudFunctionRequest.StructedInputAnnotation + getAnnotations(int index) { + if (annotationsBuilder_ == null) { + return annotations_.get(index); + } else { + return annotationsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * The actual annotations to be processed by the customized Cloud Function.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.AppPlatformCloudFunctionRequest.StructedInputAnnotation annotations = 2; + * + */ + public Builder setAnnotations( + int index, + com.google.cloud.visionai.v1.AppPlatformCloudFunctionRequest.StructedInputAnnotation + value) { + if (annotationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAnnotationsIsMutable(); + annotations_.set(index, value); + onChanged(); + } else { + annotationsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The actual annotations to be processed by the customized Cloud Function.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.AppPlatformCloudFunctionRequest.StructedInputAnnotation annotations = 2; + * + */ + public Builder setAnnotations( + int index, + com.google.cloud.visionai.v1.AppPlatformCloudFunctionRequest.StructedInputAnnotation.Builder + builderForValue) { + if (annotationsBuilder_ == null) { + ensureAnnotationsIsMutable(); + annotations_.set(index, builderForValue.build()); + onChanged(); + } else { + annotationsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The actual annotations to be processed by the customized Cloud Function.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.AppPlatformCloudFunctionRequest.StructedInputAnnotation annotations = 2; + * + */ + public Builder addAnnotations( + com.google.cloud.visionai.v1.AppPlatformCloudFunctionRequest.StructedInputAnnotation + value) { + if (annotationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAnnotationsIsMutable(); + annotations_.add(value); + onChanged(); + } else { + annotationsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * The actual annotations to be processed by the customized Cloud Function.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.AppPlatformCloudFunctionRequest.StructedInputAnnotation annotations = 2; + * + */ + public Builder addAnnotations( + int index, + com.google.cloud.visionai.v1.AppPlatformCloudFunctionRequest.StructedInputAnnotation + value) { + if (annotationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAnnotationsIsMutable(); + annotations_.add(index, value); + onChanged(); + } else { + annotationsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The actual annotations to be processed by the customized Cloud Function.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.AppPlatformCloudFunctionRequest.StructedInputAnnotation annotations = 2; + * + */ + public Builder addAnnotations( + com.google.cloud.visionai.v1.AppPlatformCloudFunctionRequest.StructedInputAnnotation.Builder + builderForValue) { + if (annotationsBuilder_ == null) { + ensureAnnotationsIsMutable(); + annotations_.add(builderForValue.build()); + onChanged(); + } else { + annotationsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The actual annotations to be processed by the customized Cloud Function.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.AppPlatformCloudFunctionRequest.StructedInputAnnotation annotations = 2; + * + */ + public Builder addAnnotations( + int index, + com.google.cloud.visionai.v1.AppPlatformCloudFunctionRequest.StructedInputAnnotation.Builder + builderForValue) { + if (annotationsBuilder_ == null) { + ensureAnnotationsIsMutable(); + annotations_.add(index, builderForValue.build()); + onChanged(); + } else { + annotationsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The actual annotations to be processed by the customized Cloud Function.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.AppPlatformCloudFunctionRequest.StructedInputAnnotation annotations = 2; + * + */ + public Builder addAllAnnotations( + java.lang.Iterable< + ? extends + com.google.cloud.visionai.v1.AppPlatformCloudFunctionRequest + .StructedInputAnnotation> + values) { + if (annotationsBuilder_ == null) { + ensureAnnotationsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, annotations_); + onChanged(); + } else { + annotationsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * The actual annotations to be processed by the customized Cloud Function.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.AppPlatformCloudFunctionRequest.StructedInputAnnotation annotations = 2; + * + */ + public Builder clearAnnotations() { + if (annotationsBuilder_ == null) { + annotations_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + annotationsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The actual annotations to be processed by the customized Cloud Function.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.AppPlatformCloudFunctionRequest.StructedInputAnnotation annotations = 2; + * + */ + public Builder removeAnnotations(int index) { + if (annotationsBuilder_ == null) { + ensureAnnotationsIsMutable(); + annotations_.remove(index); + onChanged(); + } else { + annotationsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * The actual annotations to be processed by the customized Cloud Function.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.AppPlatformCloudFunctionRequest.StructedInputAnnotation annotations = 2; + * + */ + public com.google.cloud.visionai.v1.AppPlatformCloudFunctionRequest.StructedInputAnnotation + .Builder + getAnnotationsBuilder(int index) { + return getAnnotationsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * The actual annotations to be processed by the customized Cloud Function.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.AppPlatformCloudFunctionRequest.StructedInputAnnotation annotations = 2; + * + */ + public com.google.cloud.visionai.v1.AppPlatformCloudFunctionRequest + .StructedInputAnnotationOrBuilder + getAnnotationsOrBuilder(int index) { + if (annotationsBuilder_ == null) { + return annotations_.get(index); + } else { + return annotationsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * The actual annotations to be processed by the customized Cloud Function.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.AppPlatformCloudFunctionRequest.StructedInputAnnotation annotations = 2; + * + */ + public java.util.List< + ? extends + com.google.cloud.visionai.v1.AppPlatformCloudFunctionRequest + .StructedInputAnnotationOrBuilder> + getAnnotationsOrBuilderList() { + if (annotationsBuilder_ != null) { + return annotationsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(annotations_); + } + } + /** + * + * + *
+     * The actual annotations to be processed by the customized Cloud Function.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.AppPlatformCloudFunctionRequest.StructedInputAnnotation annotations = 2; + * + */ + public com.google.cloud.visionai.v1.AppPlatformCloudFunctionRequest.StructedInputAnnotation + .Builder + addAnnotationsBuilder() { + return getAnnotationsFieldBuilder() + .addBuilder( + com.google.cloud.visionai.v1.AppPlatformCloudFunctionRequest.StructedInputAnnotation + .getDefaultInstance()); + } + /** + * + * + *
+     * The actual annotations to be processed by the customized Cloud Function.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.AppPlatformCloudFunctionRequest.StructedInputAnnotation annotations = 2; + * + */ + public com.google.cloud.visionai.v1.AppPlatformCloudFunctionRequest.StructedInputAnnotation + .Builder + addAnnotationsBuilder(int index) { + return getAnnotationsFieldBuilder() + .addBuilder( + index, + com.google.cloud.visionai.v1.AppPlatformCloudFunctionRequest.StructedInputAnnotation + .getDefaultInstance()); + } + /** + * + * + *
+     * The actual annotations to be processed by the customized Cloud Function.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.AppPlatformCloudFunctionRequest.StructedInputAnnotation annotations = 2; + * + */ + public java.util.List< + com.google.cloud.visionai.v1.AppPlatformCloudFunctionRequest.StructedInputAnnotation + .Builder> + getAnnotationsBuilderList() { + return getAnnotationsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.visionai.v1.AppPlatformCloudFunctionRequest.StructedInputAnnotation, + com.google.cloud.visionai.v1.AppPlatformCloudFunctionRequest.StructedInputAnnotation + .Builder, + com.google.cloud.visionai.v1.AppPlatformCloudFunctionRequest + .StructedInputAnnotationOrBuilder> + getAnnotationsFieldBuilder() { + if (annotationsBuilder_ == null) { + annotationsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.visionai.v1.AppPlatformCloudFunctionRequest + .StructedInputAnnotation, + com.google.cloud.visionai.v1.AppPlatformCloudFunctionRequest.StructedInputAnnotation + .Builder, + com.google.cloud.visionai.v1.AppPlatformCloudFunctionRequest + .StructedInputAnnotationOrBuilder>( + annotations_, ((bitField0_ & 0x00000002) != 0), getParentForChildren(), isClean()); + annotations_ = null; + } + return annotationsBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.AppPlatformCloudFunctionRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.AppPlatformCloudFunctionRequest) + private static final com.google.cloud.visionai.v1.AppPlatformCloudFunctionRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.AppPlatformCloudFunctionRequest(); + } + + public static com.google.cloud.visionai.v1.AppPlatformCloudFunctionRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AppPlatformCloudFunctionRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.AppPlatformCloudFunctionRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/AppPlatformCloudFunctionRequestOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/AppPlatformCloudFunctionRequestOrBuilder.java new file mode 100644 index 000000000000..31bfafbfa00a --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/AppPlatformCloudFunctionRequestOrBuilder.java @@ -0,0 +1,133 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/annotations.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface AppPlatformCloudFunctionRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.AppPlatformCloudFunctionRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The metadata of the AppPlatform for customer to identify the source of the
+   * payload.
+   * 
+ * + * .google.cloud.visionai.v1.AppPlatformMetadata app_platform_metadata = 1; + * + * @return Whether the appPlatformMetadata field is set. + */ + boolean hasAppPlatformMetadata(); + /** + * + * + *
+   * The metadata of the AppPlatform for customer to identify the source of the
+   * payload.
+   * 
+ * + * .google.cloud.visionai.v1.AppPlatformMetadata app_platform_metadata = 1; + * + * @return The appPlatformMetadata. + */ + com.google.cloud.visionai.v1.AppPlatformMetadata getAppPlatformMetadata(); + /** + * + * + *
+   * The metadata of the AppPlatform for customer to identify the source of the
+   * payload.
+   * 
+ * + * .google.cloud.visionai.v1.AppPlatformMetadata app_platform_metadata = 1; + */ + com.google.cloud.visionai.v1.AppPlatformMetadataOrBuilder getAppPlatformMetadataOrBuilder(); + + /** + * + * + *
+   * The actual annotations to be processed by the customized Cloud Function.
+   * 
+ * + * + * repeated .google.cloud.visionai.v1.AppPlatformCloudFunctionRequest.StructedInputAnnotation annotations = 2; + * + */ + java.util.List< + com.google.cloud.visionai.v1.AppPlatformCloudFunctionRequest.StructedInputAnnotation> + getAnnotationsList(); + /** + * + * + *
+   * The actual annotations to be processed by the customized Cloud Function.
+   * 
+ * + * + * repeated .google.cloud.visionai.v1.AppPlatformCloudFunctionRequest.StructedInputAnnotation annotations = 2; + * + */ + com.google.cloud.visionai.v1.AppPlatformCloudFunctionRequest.StructedInputAnnotation + getAnnotations(int index); + /** + * + * + *
+   * The actual annotations to be processed by the customized Cloud Function.
+   * 
+ * + * + * repeated .google.cloud.visionai.v1.AppPlatformCloudFunctionRequest.StructedInputAnnotation annotations = 2; + * + */ + int getAnnotationsCount(); + /** + * + * + *
+   * The actual annotations to be processed by the customized Cloud Function.
+   * 
+ * + * + * repeated .google.cloud.visionai.v1.AppPlatformCloudFunctionRequest.StructedInputAnnotation annotations = 2; + * + */ + java.util.List< + ? extends + com.google.cloud.visionai.v1.AppPlatformCloudFunctionRequest + .StructedInputAnnotationOrBuilder> + getAnnotationsOrBuilderList(); + /** + * + * + *
+   * The actual annotations to be processed by the customized Cloud Function.
+   * 
+ * + * + * repeated .google.cloud.visionai.v1.AppPlatformCloudFunctionRequest.StructedInputAnnotation annotations = 2; + * + */ + com.google.cloud.visionai.v1.AppPlatformCloudFunctionRequest.StructedInputAnnotationOrBuilder + getAnnotationsOrBuilder(int index); +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/AppPlatformCloudFunctionResponse.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/AppPlatformCloudFunctionResponse.java new file mode 100644 index 000000000000..91f2c9201069 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/AppPlatformCloudFunctionResponse.java @@ -0,0 +1,2539 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/annotations.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * Message of the response from customer's Cloud Function to AppPlatform.
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.AppPlatformCloudFunctionResponse} + */ +public final class AppPlatformCloudFunctionResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.AppPlatformCloudFunctionResponse) + AppPlatformCloudFunctionResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use AppPlatformCloudFunctionResponse.newBuilder() to construct. + private AppPlatformCloudFunctionResponse( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private AppPlatformCloudFunctionResponse() { + annotations_ = java.util.Collections.emptyList(); + events_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new AppPlatformCloudFunctionResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.AnnotationsProto + .internal_static_google_cloud_visionai_v1_AppPlatformCloudFunctionResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.AnnotationsProto + .internal_static_google_cloud_visionai_v1_AppPlatformCloudFunctionResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.AppPlatformCloudFunctionResponse.class, + com.google.cloud.visionai.v1.AppPlatformCloudFunctionResponse.Builder.class); + } + + public interface StructedOutputAnnotationOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.AppPlatformCloudFunctionResponse.StructedOutputAnnotation) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * The struct format of the actual annotation.
+     * 
+ * + * .google.protobuf.Struct annotation = 1; + * + * @return Whether the annotation field is set. + */ + boolean hasAnnotation(); + /** + * + * + *
+     * The struct format of the actual annotation.
+     * 
+ * + * .google.protobuf.Struct annotation = 1; + * + * @return The annotation. + */ + com.google.protobuf.Struct getAnnotation(); + /** + * + * + *
+     * The struct format of the actual annotation.
+     * 
+ * + * .google.protobuf.Struct annotation = 1; + */ + com.google.protobuf.StructOrBuilder getAnnotationOrBuilder(); + } + /** + * + * + *
+   * A general annotation message that uses struct format to represent different
+   * concrete annotation protobufs.
+   * 
+ * + * Protobuf type {@code + * google.cloud.visionai.v1.AppPlatformCloudFunctionResponse.StructedOutputAnnotation} + */ + public static final class StructedOutputAnnotation extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.AppPlatformCloudFunctionResponse.StructedOutputAnnotation) + StructedOutputAnnotationOrBuilder { + private static final long serialVersionUID = 0L; + // Use StructedOutputAnnotation.newBuilder() to construct. + private StructedOutputAnnotation(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private StructedOutputAnnotation() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new StructedOutputAnnotation(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.AnnotationsProto + .internal_static_google_cloud_visionai_v1_AppPlatformCloudFunctionResponse_StructedOutputAnnotation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.AnnotationsProto + .internal_static_google_cloud_visionai_v1_AppPlatformCloudFunctionResponse_StructedOutputAnnotation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.AppPlatformCloudFunctionResponse.StructedOutputAnnotation + .class, + com.google.cloud.visionai.v1.AppPlatformCloudFunctionResponse.StructedOutputAnnotation + .Builder.class); + } + + private int bitField0_; + public static final int ANNOTATION_FIELD_NUMBER = 1; + private com.google.protobuf.Struct annotation_; + /** + * + * + *
+     * The struct format of the actual annotation.
+     * 
+ * + * .google.protobuf.Struct annotation = 1; + * + * @return Whether the annotation field is set. + */ + @java.lang.Override + public boolean hasAnnotation() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * The struct format of the actual annotation.
+     * 
+ * + * .google.protobuf.Struct annotation = 1; + * + * @return The annotation. + */ + @java.lang.Override + public com.google.protobuf.Struct getAnnotation() { + return annotation_ == null ? com.google.protobuf.Struct.getDefaultInstance() : annotation_; + } + /** + * + * + *
+     * The struct format of the actual annotation.
+     * 
+ * + * .google.protobuf.Struct annotation = 1; + */ + @java.lang.Override + public com.google.protobuf.StructOrBuilder getAnnotationOrBuilder() { + return annotation_ == null ? com.google.protobuf.Struct.getDefaultInstance() : annotation_; + } + + 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 (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getAnnotation()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getAnnotation()); + } + size += getUnknownFields().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.visionai.v1.AppPlatformCloudFunctionResponse.StructedOutputAnnotation)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.AppPlatformCloudFunctionResponse.StructedOutputAnnotation other = + (com.google.cloud.visionai.v1.AppPlatformCloudFunctionResponse.StructedOutputAnnotation) + obj; + + if (hasAnnotation() != other.hasAnnotation()) return false; + if (hasAnnotation()) { + if (!getAnnotation().equals(other.getAnnotation())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasAnnotation()) { + hash = (37 * hash) + ANNOTATION_FIELD_NUMBER; + hash = (53 * hash) + getAnnotation().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.AppPlatformCloudFunctionResponse + .StructedOutputAnnotation + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.AppPlatformCloudFunctionResponse + .StructedOutputAnnotation + 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.visionai.v1.AppPlatformCloudFunctionResponse + .StructedOutputAnnotation + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.AppPlatformCloudFunctionResponse + .StructedOutputAnnotation + 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.visionai.v1.AppPlatformCloudFunctionResponse + .StructedOutputAnnotation + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.AppPlatformCloudFunctionResponse + .StructedOutputAnnotation + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.AppPlatformCloudFunctionResponse + .StructedOutputAnnotation + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.AppPlatformCloudFunctionResponse + .StructedOutputAnnotation + 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.visionai.v1.AppPlatformCloudFunctionResponse + .StructedOutputAnnotation + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.AppPlatformCloudFunctionResponse + .StructedOutputAnnotation + 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.visionai.v1.AppPlatformCloudFunctionResponse + .StructedOutputAnnotation + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.AppPlatformCloudFunctionResponse + .StructedOutputAnnotation + 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.visionai.v1.AppPlatformCloudFunctionResponse.StructedOutputAnnotation + 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 general annotation message that uses struct format to represent different
+     * concrete annotation protobufs.
+     * 
+ * + * Protobuf type {@code + * google.cloud.visionai.v1.AppPlatformCloudFunctionResponse.StructedOutputAnnotation} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.AppPlatformCloudFunctionResponse.StructedOutputAnnotation) + com.google.cloud.visionai.v1.AppPlatformCloudFunctionResponse + .StructedOutputAnnotationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.AnnotationsProto + .internal_static_google_cloud_visionai_v1_AppPlatformCloudFunctionResponse_StructedOutputAnnotation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.AnnotationsProto + .internal_static_google_cloud_visionai_v1_AppPlatformCloudFunctionResponse_StructedOutputAnnotation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.AppPlatformCloudFunctionResponse + .StructedOutputAnnotation.class, + com.google.cloud.visionai.v1.AppPlatformCloudFunctionResponse + .StructedOutputAnnotation.Builder.class); + } + + // Construct using + // com.google.cloud.visionai.v1.AppPlatformCloudFunctionResponse.StructedOutputAnnotation.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getAnnotationFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + annotation_ = null; + if (annotationBuilder_ != null) { + annotationBuilder_.dispose(); + annotationBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.AnnotationsProto + .internal_static_google_cloud_visionai_v1_AppPlatformCloudFunctionResponse_StructedOutputAnnotation_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.AppPlatformCloudFunctionResponse.StructedOutputAnnotation + getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.AppPlatformCloudFunctionResponse + .StructedOutputAnnotation.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.AppPlatformCloudFunctionResponse.StructedOutputAnnotation + build() { + com.google.cloud.visionai.v1.AppPlatformCloudFunctionResponse.StructedOutputAnnotation + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.AppPlatformCloudFunctionResponse.StructedOutputAnnotation + buildPartial() { + com.google.cloud.visionai.v1.AppPlatformCloudFunctionResponse.StructedOutputAnnotation + result = + new com.google.cloud.visionai.v1.AppPlatformCloudFunctionResponse + .StructedOutputAnnotation(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.visionai.v1.AppPlatformCloudFunctionResponse.StructedOutputAnnotation + result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.annotation_ = + annotationBuilder_ == null ? annotation_ : annotationBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.visionai.v1.AppPlatformCloudFunctionResponse + .StructedOutputAnnotation) { + return mergeFrom( + (com.google.cloud.visionai.v1.AppPlatformCloudFunctionResponse + .StructedOutputAnnotation) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.visionai.v1.AppPlatformCloudFunctionResponse.StructedOutputAnnotation + other) { + if (other + == com.google.cloud.visionai.v1.AppPlatformCloudFunctionResponse + .StructedOutputAnnotation.getDefaultInstance()) return this; + if (other.hasAnnotation()) { + mergeAnnotation(other.getAnnotation()); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getAnnotationFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.protobuf.Struct annotation_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Struct, + com.google.protobuf.Struct.Builder, + com.google.protobuf.StructOrBuilder> + annotationBuilder_; + /** + * + * + *
+       * The struct format of the actual annotation.
+       * 
+ * + * .google.protobuf.Struct annotation = 1; + * + * @return Whether the annotation field is set. + */ + public boolean hasAnnotation() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+       * The struct format of the actual annotation.
+       * 
+ * + * .google.protobuf.Struct annotation = 1; + * + * @return The annotation. + */ + public com.google.protobuf.Struct getAnnotation() { + if (annotationBuilder_ == null) { + return annotation_ == null + ? com.google.protobuf.Struct.getDefaultInstance() + : annotation_; + } else { + return annotationBuilder_.getMessage(); + } + } + /** + * + * + *
+       * The struct format of the actual annotation.
+       * 
+ * + * .google.protobuf.Struct annotation = 1; + */ + public Builder setAnnotation(com.google.protobuf.Struct value) { + if (annotationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + annotation_ = value; + } else { + annotationBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * The struct format of the actual annotation.
+       * 
+ * + * .google.protobuf.Struct annotation = 1; + */ + public Builder setAnnotation(com.google.protobuf.Struct.Builder builderForValue) { + if (annotationBuilder_ == null) { + annotation_ = builderForValue.build(); + } else { + annotationBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * The struct format of the actual annotation.
+       * 
+ * + * .google.protobuf.Struct annotation = 1; + */ + public Builder mergeAnnotation(com.google.protobuf.Struct value) { + if (annotationBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && annotation_ != null + && annotation_ != com.google.protobuf.Struct.getDefaultInstance()) { + getAnnotationBuilder().mergeFrom(value); + } else { + annotation_ = value; + } + } else { + annotationBuilder_.mergeFrom(value); + } + if (annotation_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + /** + * + * + *
+       * The struct format of the actual annotation.
+       * 
+ * + * .google.protobuf.Struct annotation = 1; + */ + public Builder clearAnnotation() { + bitField0_ = (bitField0_ & ~0x00000001); + annotation_ = null; + if (annotationBuilder_ != null) { + annotationBuilder_.dispose(); + annotationBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+       * The struct format of the actual annotation.
+       * 
+ * + * .google.protobuf.Struct annotation = 1; + */ + public com.google.protobuf.Struct.Builder getAnnotationBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getAnnotationFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * The struct format of the actual annotation.
+       * 
+ * + * .google.protobuf.Struct annotation = 1; + */ + public com.google.protobuf.StructOrBuilder getAnnotationOrBuilder() { + if (annotationBuilder_ != null) { + return annotationBuilder_.getMessageOrBuilder(); + } else { + return annotation_ == null + ? com.google.protobuf.Struct.getDefaultInstance() + : annotation_; + } + } + /** + * + * + *
+       * The struct format of the actual annotation.
+       * 
+ * + * .google.protobuf.Struct annotation = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Struct, + com.google.protobuf.Struct.Builder, + com.google.protobuf.StructOrBuilder> + getAnnotationFieldBuilder() { + if (annotationBuilder_ == null) { + annotationBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Struct, + com.google.protobuf.Struct.Builder, + com.google.protobuf.StructOrBuilder>( + getAnnotation(), getParentForChildren(), isClean()); + annotation_ = null; + } + return annotationBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.AppPlatformCloudFunctionResponse.StructedOutputAnnotation) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.AppPlatformCloudFunctionResponse.StructedOutputAnnotation) + private static final com.google.cloud.visionai.v1.AppPlatformCloudFunctionResponse + .StructedOutputAnnotation + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.visionai.v1.AppPlatformCloudFunctionResponse + .StructedOutputAnnotation(); + } + + public static com.google.cloud.visionai.v1.AppPlatformCloudFunctionResponse + .StructedOutputAnnotation + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public StructedOutputAnnotation parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.AppPlatformCloudFunctionResponse.StructedOutputAnnotation + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int ANNOTATIONS_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private java.util.List< + com.google.cloud.visionai.v1.AppPlatformCloudFunctionResponse.StructedOutputAnnotation> + annotations_; + /** + * + * + *
+   * The modified annotations that is returned back to AppPlatform.
+   * If the annotations fields are empty, then those annotations will be dropped
+   * by AppPlatform.
+   * 
+ * + * + * repeated .google.cloud.visionai.v1.AppPlatformCloudFunctionResponse.StructedOutputAnnotation annotations = 2; + * + */ + @java.lang.Override + public java.util.List< + com.google.cloud.visionai.v1.AppPlatformCloudFunctionResponse.StructedOutputAnnotation> + getAnnotationsList() { + return annotations_; + } + /** + * + * + *
+   * The modified annotations that is returned back to AppPlatform.
+   * If the annotations fields are empty, then those annotations will be dropped
+   * by AppPlatform.
+   * 
+ * + * + * repeated .google.cloud.visionai.v1.AppPlatformCloudFunctionResponse.StructedOutputAnnotation annotations = 2; + * + */ + @java.lang.Override + public java.util.List< + ? extends + com.google.cloud.visionai.v1.AppPlatformCloudFunctionResponse + .StructedOutputAnnotationOrBuilder> + getAnnotationsOrBuilderList() { + return annotations_; + } + /** + * + * + *
+   * The modified annotations that is returned back to AppPlatform.
+   * If the annotations fields are empty, then those annotations will be dropped
+   * by AppPlatform.
+   * 
+ * + * + * repeated .google.cloud.visionai.v1.AppPlatformCloudFunctionResponse.StructedOutputAnnotation annotations = 2; + * + */ + @java.lang.Override + public int getAnnotationsCount() { + return annotations_.size(); + } + /** + * + * + *
+   * The modified annotations that is returned back to AppPlatform.
+   * If the annotations fields are empty, then those annotations will be dropped
+   * by AppPlatform.
+   * 
+ * + * + * repeated .google.cloud.visionai.v1.AppPlatformCloudFunctionResponse.StructedOutputAnnotation annotations = 2; + * + */ + @java.lang.Override + public com.google.cloud.visionai.v1.AppPlatformCloudFunctionResponse.StructedOutputAnnotation + getAnnotations(int index) { + return annotations_.get(index); + } + /** + * + * + *
+   * The modified annotations that is returned back to AppPlatform.
+   * If the annotations fields are empty, then those annotations will be dropped
+   * by AppPlatform.
+   * 
+ * + * + * repeated .google.cloud.visionai.v1.AppPlatformCloudFunctionResponse.StructedOutputAnnotation annotations = 2; + * + */ + @java.lang.Override + public com.google.cloud.visionai.v1.AppPlatformCloudFunctionResponse + .StructedOutputAnnotationOrBuilder + getAnnotationsOrBuilder(int index) { + return annotations_.get(index); + } + + public static final int ANNOTATION_PASSTHROUGH_FIELD_NUMBER = 3; + private boolean annotationPassthrough_ = false; + /** + * + * + *
+   * If set to true, AppPlatform will use original annotations instead of
+   * dropping them, even if it is empty in the annotations filed.
+   * 
+ * + * bool annotation_passthrough = 3; + * + * @return The annotationPassthrough. + */ + @java.lang.Override + public boolean getAnnotationPassthrough() { + return annotationPassthrough_; + } + + public static final int EVENTS_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private java.util.List events_; + /** + * + * + *
+   * The event notifications that is returned back to AppPlatform. Typically it
+   * will then be configured to be consumed/forwared to a operator that handles
+   * events, such as Pub/Sub operator.
+   * 
+ * + * repeated .google.cloud.visionai.v1.AppPlatformEventBody events = 4; + */ + @java.lang.Override + public java.util.List getEventsList() { + return events_; + } + /** + * + * + *
+   * The event notifications that is returned back to AppPlatform. Typically it
+   * will then be configured to be consumed/forwared to a operator that handles
+   * events, such as Pub/Sub operator.
+   * 
+ * + * repeated .google.cloud.visionai.v1.AppPlatformEventBody events = 4; + */ + @java.lang.Override + public java.util.List + getEventsOrBuilderList() { + return events_; + } + /** + * + * + *
+   * The event notifications that is returned back to AppPlatform. Typically it
+   * will then be configured to be consumed/forwared to a operator that handles
+   * events, such as Pub/Sub operator.
+   * 
+ * + * repeated .google.cloud.visionai.v1.AppPlatformEventBody events = 4; + */ + @java.lang.Override + public int getEventsCount() { + return events_.size(); + } + /** + * + * + *
+   * The event notifications that is returned back to AppPlatform. Typically it
+   * will then be configured to be consumed/forwared to a operator that handles
+   * events, such as Pub/Sub operator.
+   * 
+ * + * repeated .google.cloud.visionai.v1.AppPlatformEventBody events = 4; + */ + @java.lang.Override + public com.google.cloud.visionai.v1.AppPlatformEventBody getEvents(int index) { + return events_.get(index); + } + /** + * + * + *
+   * The event notifications that is returned back to AppPlatform. Typically it
+   * will then be configured to be consumed/forwared to a operator that handles
+   * events, such as Pub/Sub operator.
+   * 
+ * + * repeated .google.cloud.visionai.v1.AppPlatformEventBody events = 4; + */ + @java.lang.Override + public com.google.cloud.visionai.v1.AppPlatformEventBodyOrBuilder getEventsOrBuilder(int index) { + return events_.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 < annotations_.size(); i++) { + output.writeMessage(2, annotations_.get(i)); + } + if (annotationPassthrough_ != false) { + output.writeBool(3, annotationPassthrough_); + } + for (int i = 0; i < events_.size(); i++) { + output.writeMessage(4, events_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < annotations_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, annotations_.get(i)); + } + if (annotationPassthrough_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(3, annotationPassthrough_); + } + for (int i = 0; i < events_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, events_.get(i)); + } + size += getUnknownFields().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.visionai.v1.AppPlatformCloudFunctionResponse)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.AppPlatformCloudFunctionResponse other = + (com.google.cloud.visionai.v1.AppPlatformCloudFunctionResponse) obj; + + if (!getAnnotationsList().equals(other.getAnnotationsList())) return false; + if (getAnnotationPassthrough() != other.getAnnotationPassthrough()) return false; + if (!getEventsList().equals(other.getEventsList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getAnnotationsCount() > 0) { + hash = (37 * hash) + ANNOTATIONS_FIELD_NUMBER; + hash = (53 * hash) + getAnnotationsList().hashCode(); + } + hash = (37 * hash) + ANNOTATION_PASSTHROUGH_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getAnnotationPassthrough()); + if (getEventsCount() > 0) { + hash = (37 * hash) + EVENTS_FIELD_NUMBER; + hash = (53 * hash) + getEventsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.AppPlatformCloudFunctionResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.AppPlatformCloudFunctionResponse 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.visionai.v1.AppPlatformCloudFunctionResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.AppPlatformCloudFunctionResponse 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.visionai.v1.AppPlatformCloudFunctionResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.AppPlatformCloudFunctionResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.AppPlatformCloudFunctionResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.AppPlatformCloudFunctionResponse 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.visionai.v1.AppPlatformCloudFunctionResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.AppPlatformCloudFunctionResponse 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.visionai.v1.AppPlatformCloudFunctionResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.AppPlatformCloudFunctionResponse 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.visionai.v1.AppPlatformCloudFunctionResponse 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; + } + /** + * + * + *
+   * Message of the response from customer's Cloud Function to AppPlatform.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.AppPlatformCloudFunctionResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.AppPlatformCloudFunctionResponse) + com.google.cloud.visionai.v1.AppPlatformCloudFunctionResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.AnnotationsProto + .internal_static_google_cloud_visionai_v1_AppPlatformCloudFunctionResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.AnnotationsProto + .internal_static_google_cloud_visionai_v1_AppPlatformCloudFunctionResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.AppPlatformCloudFunctionResponse.class, + com.google.cloud.visionai.v1.AppPlatformCloudFunctionResponse.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.AppPlatformCloudFunctionResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (annotationsBuilder_ == null) { + annotations_ = java.util.Collections.emptyList(); + } else { + annotations_ = null; + annotationsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + annotationPassthrough_ = false; + if (eventsBuilder_ == null) { + events_ = java.util.Collections.emptyList(); + } else { + events_ = null; + eventsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000004); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.AnnotationsProto + .internal_static_google_cloud_visionai_v1_AppPlatformCloudFunctionResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.AppPlatformCloudFunctionResponse + getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.AppPlatformCloudFunctionResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.AppPlatformCloudFunctionResponse build() { + com.google.cloud.visionai.v1.AppPlatformCloudFunctionResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.AppPlatformCloudFunctionResponse buildPartial() { + com.google.cloud.visionai.v1.AppPlatformCloudFunctionResponse result = + new com.google.cloud.visionai.v1.AppPlatformCloudFunctionResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.visionai.v1.AppPlatformCloudFunctionResponse result) { + if (annotationsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + annotations_ = java.util.Collections.unmodifiableList(annotations_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.annotations_ = annotations_; + } else { + result.annotations_ = annotationsBuilder_.build(); + } + if (eventsBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0)) { + events_ = java.util.Collections.unmodifiableList(events_); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.events_ = events_; + } else { + result.events_ = eventsBuilder_.build(); + } + } + + private void buildPartial0( + com.google.cloud.visionai.v1.AppPlatformCloudFunctionResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.annotationPassthrough_ = annotationPassthrough_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.AppPlatformCloudFunctionResponse) { + return mergeFrom((com.google.cloud.visionai.v1.AppPlatformCloudFunctionResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.AppPlatformCloudFunctionResponse other) { + if (other + == com.google.cloud.visionai.v1.AppPlatformCloudFunctionResponse.getDefaultInstance()) + return this; + if (annotationsBuilder_ == null) { + if (!other.annotations_.isEmpty()) { + if (annotations_.isEmpty()) { + annotations_ = other.annotations_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureAnnotationsIsMutable(); + annotations_.addAll(other.annotations_); + } + onChanged(); + } + } else { + if (!other.annotations_.isEmpty()) { + if (annotationsBuilder_.isEmpty()) { + annotationsBuilder_.dispose(); + annotationsBuilder_ = null; + annotations_ = other.annotations_; + bitField0_ = (bitField0_ & ~0x00000001); + annotationsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getAnnotationsFieldBuilder() + : null; + } else { + annotationsBuilder_.addAllMessages(other.annotations_); + } + } + } + if (other.getAnnotationPassthrough() != false) { + setAnnotationPassthrough(other.getAnnotationPassthrough()); + } + if (eventsBuilder_ == null) { + if (!other.events_.isEmpty()) { + if (events_.isEmpty()) { + events_ = other.events_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureEventsIsMutable(); + events_.addAll(other.events_); + } + onChanged(); + } + } else { + if (!other.events_.isEmpty()) { + if (eventsBuilder_.isEmpty()) { + eventsBuilder_.dispose(); + eventsBuilder_ = null; + events_ = other.events_; + bitField0_ = (bitField0_ & ~0x00000004); + eventsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getEventsFieldBuilder() + : null; + } else { + eventsBuilder_.addAllMessages(other.events_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 18: + { + com.google.cloud.visionai.v1.AppPlatformCloudFunctionResponse + .StructedOutputAnnotation + m = + input.readMessage( + com.google.cloud.visionai.v1.AppPlatformCloudFunctionResponse + .StructedOutputAnnotation.parser(), + extensionRegistry); + if (annotationsBuilder_ == null) { + ensureAnnotationsIsMutable(); + annotations_.add(m); + } else { + annotationsBuilder_.addMessage(m); + } + break; + } // case 18 + case 24: + { + annotationPassthrough_ = input.readBool(); + bitField0_ |= 0x00000002; + break; + } // case 24 + case 34: + { + com.google.cloud.visionai.v1.AppPlatformEventBody m = + input.readMessage( + com.google.cloud.visionai.v1.AppPlatformEventBody.parser(), + extensionRegistry); + if (eventsBuilder_ == null) { + ensureEventsIsMutable(); + events_.add(m); + } else { + eventsBuilder_.addMessage(m); + } + break; + } // case 34 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List< + com.google.cloud.visionai.v1.AppPlatformCloudFunctionResponse.StructedOutputAnnotation> + annotations_ = java.util.Collections.emptyList(); + + private void ensureAnnotationsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + annotations_ = + new java.util.ArrayList< + com.google.cloud.visionai.v1.AppPlatformCloudFunctionResponse + .StructedOutputAnnotation>(annotations_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.visionai.v1.AppPlatformCloudFunctionResponse.StructedOutputAnnotation, + com.google.cloud.visionai.v1.AppPlatformCloudFunctionResponse.StructedOutputAnnotation + .Builder, + com.google.cloud.visionai.v1.AppPlatformCloudFunctionResponse + .StructedOutputAnnotationOrBuilder> + annotationsBuilder_; + + /** + * + * + *
+     * The modified annotations that is returned back to AppPlatform.
+     * If the annotations fields are empty, then those annotations will be dropped
+     * by AppPlatform.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.AppPlatformCloudFunctionResponse.StructedOutputAnnotation annotations = 2; + * + */ + public java.util.List< + com.google.cloud.visionai.v1.AppPlatformCloudFunctionResponse.StructedOutputAnnotation> + getAnnotationsList() { + if (annotationsBuilder_ == null) { + return java.util.Collections.unmodifiableList(annotations_); + } else { + return annotationsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * The modified annotations that is returned back to AppPlatform.
+     * If the annotations fields are empty, then those annotations will be dropped
+     * by AppPlatform.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.AppPlatformCloudFunctionResponse.StructedOutputAnnotation annotations = 2; + * + */ + public int getAnnotationsCount() { + if (annotationsBuilder_ == null) { + return annotations_.size(); + } else { + return annotationsBuilder_.getCount(); + } + } + /** + * + * + *
+     * The modified annotations that is returned back to AppPlatform.
+     * If the annotations fields are empty, then those annotations will be dropped
+     * by AppPlatform.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.AppPlatformCloudFunctionResponse.StructedOutputAnnotation annotations = 2; + * + */ + public com.google.cloud.visionai.v1.AppPlatformCloudFunctionResponse.StructedOutputAnnotation + getAnnotations(int index) { + if (annotationsBuilder_ == null) { + return annotations_.get(index); + } else { + return annotationsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * The modified annotations that is returned back to AppPlatform.
+     * If the annotations fields are empty, then those annotations will be dropped
+     * by AppPlatform.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.AppPlatformCloudFunctionResponse.StructedOutputAnnotation annotations = 2; + * + */ + public Builder setAnnotations( + int index, + com.google.cloud.visionai.v1.AppPlatformCloudFunctionResponse.StructedOutputAnnotation + value) { + if (annotationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAnnotationsIsMutable(); + annotations_.set(index, value); + onChanged(); + } else { + annotationsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The modified annotations that is returned back to AppPlatform.
+     * If the annotations fields are empty, then those annotations will be dropped
+     * by AppPlatform.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.AppPlatformCloudFunctionResponse.StructedOutputAnnotation annotations = 2; + * + */ + public Builder setAnnotations( + int index, + com.google.cloud.visionai.v1.AppPlatformCloudFunctionResponse.StructedOutputAnnotation + .Builder + builderForValue) { + if (annotationsBuilder_ == null) { + ensureAnnotationsIsMutable(); + annotations_.set(index, builderForValue.build()); + onChanged(); + } else { + annotationsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The modified annotations that is returned back to AppPlatform.
+     * If the annotations fields are empty, then those annotations will be dropped
+     * by AppPlatform.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.AppPlatformCloudFunctionResponse.StructedOutputAnnotation annotations = 2; + * + */ + public Builder addAnnotations( + com.google.cloud.visionai.v1.AppPlatformCloudFunctionResponse.StructedOutputAnnotation + value) { + if (annotationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAnnotationsIsMutable(); + annotations_.add(value); + onChanged(); + } else { + annotationsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * The modified annotations that is returned back to AppPlatform.
+     * If the annotations fields are empty, then those annotations will be dropped
+     * by AppPlatform.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.AppPlatformCloudFunctionResponse.StructedOutputAnnotation annotations = 2; + * + */ + public Builder addAnnotations( + int index, + com.google.cloud.visionai.v1.AppPlatformCloudFunctionResponse.StructedOutputAnnotation + value) { + if (annotationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAnnotationsIsMutable(); + annotations_.add(index, value); + onChanged(); + } else { + annotationsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The modified annotations that is returned back to AppPlatform.
+     * If the annotations fields are empty, then those annotations will be dropped
+     * by AppPlatform.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.AppPlatformCloudFunctionResponse.StructedOutputAnnotation annotations = 2; + * + */ + public Builder addAnnotations( + com.google.cloud.visionai.v1.AppPlatformCloudFunctionResponse.StructedOutputAnnotation + .Builder + builderForValue) { + if (annotationsBuilder_ == null) { + ensureAnnotationsIsMutable(); + annotations_.add(builderForValue.build()); + onChanged(); + } else { + annotationsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The modified annotations that is returned back to AppPlatform.
+     * If the annotations fields are empty, then those annotations will be dropped
+     * by AppPlatform.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.AppPlatformCloudFunctionResponse.StructedOutputAnnotation annotations = 2; + * + */ + public Builder addAnnotations( + int index, + com.google.cloud.visionai.v1.AppPlatformCloudFunctionResponse.StructedOutputAnnotation + .Builder + builderForValue) { + if (annotationsBuilder_ == null) { + ensureAnnotationsIsMutable(); + annotations_.add(index, builderForValue.build()); + onChanged(); + } else { + annotationsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The modified annotations that is returned back to AppPlatform.
+     * If the annotations fields are empty, then those annotations will be dropped
+     * by AppPlatform.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.AppPlatformCloudFunctionResponse.StructedOutputAnnotation annotations = 2; + * + */ + public Builder addAllAnnotations( + java.lang.Iterable< + ? extends + com.google.cloud.visionai.v1.AppPlatformCloudFunctionResponse + .StructedOutputAnnotation> + values) { + if (annotationsBuilder_ == null) { + ensureAnnotationsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, annotations_); + onChanged(); + } else { + annotationsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * The modified annotations that is returned back to AppPlatform.
+     * If the annotations fields are empty, then those annotations will be dropped
+     * by AppPlatform.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.AppPlatformCloudFunctionResponse.StructedOutputAnnotation annotations = 2; + * + */ + public Builder clearAnnotations() { + if (annotationsBuilder_ == null) { + annotations_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + annotationsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The modified annotations that is returned back to AppPlatform.
+     * If the annotations fields are empty, then those annotations will be dropped
+     * by AppPlatform.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.AppPlatformCloudFunctionResponse.StructedOutputAnnotation annotations = 2; + * + */ + public Builder removeAnnotations(int index) { + if (annotationsBuilder_ == null) { + ensureAnnotationsIsMutable(); + annotations_.remove(index); + onChanged(); + } else { + annotationsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * The modified annotations that is returned back to AppPlatform.
+     * If the annotations fields are empty, then those annotations will be dropped
+     * by AppPlatform.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.AppPlatformCloudFunctionResponse.StructedOutputAnnotation annotations = 2; + * + */ + public com.google.cloud.visionai.v1.AppPlatformCloudFunctionResponse.StructedOutputAnnotation + .Builder + getAnnotationsBuilder(int index) { + return getAnnotationsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * The modified annotations that is returned back to AppPlatform.
+     * If the annotations fields are empty, then those annotations will be dropped
+     * by AppPlatform.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.AppPlatformCloudFunctionResponse.StructedOutputAnnotation annotations = 2; + * + */ + public com.google.cloud.visionai.v1.AppPlatformCloudFunctionResponse + .StructedOutputAnnotationOrBuilder + getAnnotationsOrBuilder(int index) { + if (annotationsBuilder_ == null) { + return annotations_.get(index); + } else { + return annotationsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * The modified annotations that is returned back to AppPlatform.
+     * If the annotations fields are empty, then those annotations will be dropped
+     * by AppPlatform.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.AppPlatformCloudFunctionResponse.StructedOutputAnnotation annotations = 2; + * + */ + public java.util.List< + ? extends + com.google.cloud.visionai.v1.AppPlatformCloudFunctionResponse + .StructedOutputAnnotationOrBuilder> + getAnnotationsOrBuilderList() { + if (annotationsBuilder_ != null) { + return annotationsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(annotations_); + } + } + /** + * + * + *
+     * The modified annotations that is returned back to AppPlatform.
+     * If the annotations fields are empty, then those annotations will be dropped
+     * by AppPlatform.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.AppPlatformCloudFunctionResponse.StructedOutputAnnotation annotations = 2; + * + */ + public com.google.cloud.visionai.v1.AppPlatformCloudFunctionResponse.StructedOutputAnnotation + .Builder + addAnnotationsBuilder() { + return getAnnotationsFieldBuilder() + .addBuilder( + com.google.cloud.visionai.v1.AppPlatformCloudFunctionResponse.StructedOutputAnnotation + .getDefaultInstance()); + } + /** + * + * + *
+     * The modified annotations that is returned back to AppPlatform.
+     * If the annotations fields are empty, then those annotations will be dropped
+     * by AppPlatform.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.AppPlatformCloudFunctionResponse.StructedOutputAnnotation annotations = 2; + * + */ + public com.google.cloud.visionai.v1.AppPlatformCloudFunctionResponse.StructedOutputAnnotation + .Builder + addAnnotationsBuilder(int index) { + return getAnnotationsFieldBuilder() + .addBuilder( + index, + com.google.cloud.visionai.v1.AppPlatformCloudFunctionResponse.StructedOutputAnnotation + .getDefaultInstance()); + } + /** + * + * + *
+     * The modified annotations that is returned back to AppPlatform.
+     * If the annotations fields are empty, then those annotations will be dropped
+     * by AppPlatform.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.AppPlatformCloudFunctionResponse.StructedOutputAnnotation annotations = 2; + * + */ + public java.util.List< + com.google.cloud.visionai.v1.AppPlatformCloudFunctionResponse.StructedOutputAnnotation + .Builder> + getAnnotationsBuilderList() { + return getAnnotationsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.visionai.v1.AppPlatformCloudFunctionResponse.StructedOutputAnnotation, + com.google.cloud.visionai.v1.AppPlatformCloudFunctionResponse.StructedOutputAnnotation + .Builder, + com.google.cloud.visionai.v1.AppPlatformCloudFunctionResponse + .StructedOutputAnnotationOrBuilder> + getAnnotationsFieldBuilder() { + if (annotationsBuilder_ == null) { + annotationsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.visionai.v1.AppPlatformCloudFunctionResponse + .StructedOutputAnnotation, + com.google.cloud.visionai.v1.AppPlatformCloudFunctionResponse + .StructedOutputAnnotation.Builder, + com.google.cloud.visionai.v1.AppPlatformCloudFunctionResponse + .StructedOutputAnnotationOrBuilder>( + annotations_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + annotations_ = null; + } + return annotationsBuilder_; + } + + private boolean annotationPassthrough_; + /** + * + * + *
+     * If set to true, AppPlatform will use original annotations instead of
+     * dropping them, even if it is empty in the annotations filed.
+     * 
+ * + * bool annotation_passthrough = 3; + * + * @return The annotationPassthrough. + */ + @java.lang.Override + public boolean getAnnotationPassthrough() { + return annotationPassthrough_; + } + /** + * + * + *
+     * If set to true, AppPlatform will use original annotations instead of
+     * dropping them, even if it is empty in the annotations filed.
+     * 
+ * + * bool annotation_passthrough = 3; + * + * @param value The annotationPassthrough to set. + * @return This builder for chaining. + */ + public Builder setAnnotationPassthrough(boolean value) { + + annotationPassthrough_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * If set to true, AppPlatform will use original annotations instead of
+     * dropping them, even if it is empty in the annotations filed.
+     * 
+ * + * bool annotation_passthrough = 3; + * + * @return This builder for chaining. + */ + public Builder clearAnnotationPassthrough() { + bitField0_ = (bitField0_ & ~0x00000002); + annotationPassthrough_ = false; + onChanged(); + return this; + } + + private java.util.List events_ = + java.util.Collections.emptyList(); + + private void ensureEventsIsMutable() { + if (!((bitField0_ & 0x00000004) != 0)) { + events_ = + new java.util.ArrayList(events_); + bitField0_ |= 0x00000004; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.visionai.v1.AppPlatformEventBody, + com.google.cloud.visionai.v1.AppPlatformEventBody.Builder, + com.google.cloud.visionai.v1.AppPlatformEventBodyOrBuilder> + eventsBuilder_; + + /** + * + * + *
+     * The event notifications that is returned back to AppPlatform. Typically it
+     * will then be configured to be consumed/forwared to a operator that handles
+     * events, such as Pub/Sub operator.
+     * 
+ * + * repeated .google.cloud.visionai.v1.AppPlatformEventBody events = 4; + */ + public java.util.List getEventsList() { + if (eventsBuilder_ == null) { + return java.util.Collections.unmodifiableList(events_); + } else { + return eventsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * The event notifications that is returned back to AppPlatform. Typically it
+     * will then be configured to be consumed/forwared to a operator that handles
+     * events, such as Pub/Sub operator.
+     * 
+ * + * repeated .google.cloud.visionai.v1.AppPlatformEventBody events = 4; + */ + public int getEventsCount() { + if (eventsBuilder_ == null) { + return events_.size(); + } else { + return eventsBuilder_.getCount(); + } + } + /** + * + * + *
+     * The event notifications that is returned back to AppPlatform. Typically it
+     * will then be configured to be consumed/forwared to a operator that handles
+     * events, such as Pub/Sub operator.
+     * 
+ * + * repeated .google.cloud.visionai.v1.AppPlatformEventBody events = 4; + */ + public com.google.cloud.visionai.v1.AppPlatformEventBody getEvents(int index) { + if (eventsBuilder_ == null) { + return events_.get(index); + } else { + return eventsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * The event notifications that is returned back to AppPlatform. Typically it
+     * will then be configured to be consumed/forwared to a operator that handles
+     * events, such as Pub/Sub operator.
+     * 
+ * + * repeated .google.cloud.visionai.v1.AppPlatformEventBody events = 4; + */ + public Builder setEvents(int index, com.google.cloud.visionai.v1.AppPlatformEventBody value) { + if (eventsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureEventsIsMutable(); + events_.set(index, value); + onChanged(); + } else { + eventsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The event notifications that is returned back to AppPlatform. Typically it
+     * will then be configured to be consumed/forwared to a operator that handles
+     * events, such as Pub/Sub operator.
+     * 
+ * + * repeated .google.cloud.visionai.v1.AppPlatformEventBody events = 4; + */ + public Builder setEvents( + int index, com.google.cloud.visionai.v1.AppPlatformEventBody.Builder builderForValue) { + if (eventsBuilder_ == null) { + ensureEventsIsMutable(); + events_.set(index, builderForValue.build()); + onChanged(); + } else { + eventsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The event notifications that is returned back to AppPlatform. Typically it
+     * will then be configured to be consumed/forwared to a operator that handles
+     * events, such as Pub/Sub operator.
+     * 
+ * + * repeated .google.cloud.visionai.v1.AppPlatformEventBody events = 4; + */ + public Builder addEvents(com.google.cloud.visionai.v1.AppPlatformEventBody value) { + if (eventsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureEventsIsMutable(); + events_.add(value); + onChanged(); + } else { + eventsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * The event notifications that is returned back to AppPlatform. Typically it
+     * will then be configured to be consumed/forwared to a operator that handles
+     * events, such as Pub/Sub operator.
+     * 
+ * + * repeated .google.cloud.visionai.v1.AppPlatformEventBody events = 4; + */ + public Builder addEvents(int index, com.google.cloud.visionai.v1.AppPlatformEventBody value) { + if (eventsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureEventsIsMutable(); + events_.add(index, value); + onChanged(); + } else { + eventsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The event notifications that is returned back to AppPlatform. Typically it
+     * will then be configured to be consumed/forwared to a operator that handles
+     * events, such as Pub/Sub operator.
+     * 
+ * + * repeated .google.cloud.visionai.v1.AppPlatformEventBody events = 4; + */ + public Builder addEvents( + com.google.cloud.visionai.v1.AppPlatformEventBody.Builder builderForValue) { + if (eventsBuilder_ == null) { + ensureEventsIsMutable(); + events_.add(builderForValue.build()); + onChanged(); + } else { + eventsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The event notifications that is returned back to AppPlatform. Typically it
+     * will then be configured to be consumed/forwared to a operator that handles
+     * events, such as Pub/Sub operator.
+     * 
+ * + * repeated .google.cloud.visionai.v1.AppPlatformEventBody events = 4; + */ + public Builder addEvents( + int index, com.google.cloud.visionai.v1.AppPlatformEventBody.Builder builderForValue) { + if (eventsBuilder_ == null) { + ensureEventsIsMutable(); + events_.add(index, builderForValue.build()); + onChanged(); + } else { + eventsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The event notifications that is returned back to AppPlatform. Typically it
+     * will then be configured to be consumed/forwared to a operator that handles
+     * events, such as Pub/Sub operator.
+     * 
+ * + * repeated .google.cloud.visionai.v1.AppPlatformEventBody events = 4; + */ + public Builder addAllEvents( + java.lang.Iterable values) { + if (eventsBuilder_ == null) { + ensureEventsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, events_); + onChanged(); + } else { + eventsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * The event notifications that is returned back to AppPlatform. Typically it
+     * will then be configured to be consumed/forwared to a operator that handles
+     * events, such as Pub/Sub operator.
+     * 
+ * + * repeated .google.cloud.visionai.v1.AppPlatformEventBody events = 4; + */ + public Builder clearEvents() { + if (eventsBuilder_ == null) { + events_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + } else { + eventsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The event notifications that is returned back to AppPlatform. Typically it
+     * will then be configured to be consumed/forwared to a operator that handles
+     * events, such as Pub/Sub operator.
+     * 
+ * + * repeated .google.cloud.visionai.v1.AppPlatformEventBody events = 4; + */ + public Builder removeEvents(int index) { + if (eventsBuilder_ == null) { + ensureEventsIsMutable(); + events_.remove(index); + onChanged(); + } else { + eventsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * The event notifications that is returned back to AppPlatform. Typically it
+     * will then be configured to be consumed/forwared to a operator that handles
+     * events, such as Pub/Sub operator.
+     * 
+ * + * repeated .google.cloud.visionai.v1.AppPlatformEventBody events = 4; + */ + public com.google.cloud.visionai.v1.AppPlatformEventBody.Builder getEventsBuilder(int index) { + return getEventsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * The event notifications that is returned back to AppPlatform. Typically it
+     * will then be configured to be consumed/forwared to a operator that handles
+     * events, such as Pub/Sub operator.
+     * 
+ * + * repeated .google.cloud.visionai.v1.AppPlatformEventBody events = 4; + */ + public com.google.cloud.visionai.v1.AppPlatformEventBodyOrBuilder getEventsOrBuilder( + int index) { + if (eventsBuilder_ == null) { + return events_.get(index); + } else { + return eventsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * The event notifications that is returned back to AppPlatform. Typically it
+     * will then be configured to be consumed/forwared to a operator that handles
+     * events, such as Pub/Sub operator.
+     * 
+ * + * repeated .google.cloud.visionai.v1.AppPlatformEventBody events = 4; + */ + public java.util.List + getEventsOrBuilderList() { + if (eventsBuilder_ != null) { + return eventsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(events_); + } + } + /** + * + * + *
+     * The event notifications that is returned back to AppPlatform. Typically it
+     * will then be configured to be consumed/forwared to a operator that handles
+     * events, such as Pub/Sub operator.
+     * 
+ * + * repeated .google.cloud.visionai.v1.AppPlatformEventBody events = 4; + */ + public com.google.cloud.visionai.v1.AppPlatformEventBody.Builder addEventsBuilder() { + return getEventsFieldBuilder() + .addBuilder(com.google.cloud.visionai.v1.AppPlatformEventBody.getDefaultInstance()); + } + /** + * + * + *
+     * The event notifications that is returned back to AppPlatform. Typically it
+     * will then be configured to be consumed/forwared to a operator that handles
+     * events, such as Pub/Sub operator.
+     * 
+ * + * repeated .google.cloud.visionai.v1.AppPlatformEventBody events = 4; + */ + public com.google.cloud.visionai.v1.AppPlatformEventBody.Builder addEventsBuilder(int index) { + return getEventsFieldBuilder() + .addBuilder( + index, com.google.cloud.visionai.v1.AppPlatformEventBody.getDefaultInstance()); + } + /** + * + * + *
+     * The event notifications that is returned back to AppPlatform. Typically it
+     * will then be configured to be consumed/forwared to a operator that handles
+     * events, such as Pub/Sub operator.
+     * 
+ * + * repeated .google.cloud.visionai.v1.AppPlatformEventBody events = 4; + */ + public java.util.List + getEventsBuilderList() { + return getEventsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.visionai.v1.AppPlatformEventBody, + com.google.cloud.visionai.v1.AppPlatformEventBody.Builder, + com.google.cloud.visionai.v1.AppPlatformEventBodyOrBuilder> + getEventsFieldBuilder() { + if (eventsBuilder_ == null) { + eventsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.visionai.v1.AppPlatformEventBody, + com.google.cloud.visionai.v1.AppPlatformEventBody.Builder, + com.google.cloud.visionai.v1.AppPlatformEventBodyOrBuilder>( + events_, ((bitField0_ & 0x00000004) != 0), getParentForChildren(), isClean()); + events_ = null; + } + return eventsBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.AppPlatformCloudFunctionResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.AppPlatformCloudFunctionResponse) + private static final com.google.cloud.visionai.v1.AppPlatformCloudFunctionResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.AppPlatformCloudFunctionResponse(); + } + + public static com.google.cloud.visionai.v1.AppPlatformCloudFunctionResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AppPlatformCloudFunctionResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.AppPlatformCloudFunctionResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/AppPlatformCloudFunctionResponseOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/AppPlatformCloudFunctionResponseOrBuilder.java new file mode 100644 index 000000000000..0f6e8d200d19 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/AppPlatformCloudFunctionResponseOrBuilder.java @@ -0,0 +1,181 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/annotations.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface AppPlatformCloudFunctionResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.AppPlatformCloudFunctionResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The modified annotations that is returned back to AppPlatform.
+   * If the annotations fields are empty, then those annotations will be dropped
+   * by AppPlatform.
+   * 
+ * + * + * repeated .google.cloud.visionai.v1.AppPlatformCloudFunctionResponse.StructedOutputAnnotation annotations = 2; + * + */ + java.util.List< + com.google.cloud.visionai.v1.AppPlatformCloudFunctionResponse.StructedOutputAnnotation> + getAnnotationsList(); + /** + * + * + *
+   * The modified annotations that is returned back to AppPlatform.
+   * If the annotations fields are empty, then those annotations will be dropped
+   * by AppPlatform.
+   * 
+ * + * + * repeated .google.cloud.visionai.v1.AppPlatformCloudFunctionResponse.StructedOutputAnnotation annotations = 2; + * + */ + com.google.cloud.visionai.v1.AppPlatformCloudFunctionResponse.StructedOutputAnnotation + getAnnotations(int index); + /** + * + * + *
+   * The modified annotations that is returned back to AppPlatform.
+   * If the annotations fields are empty, then those annotations will be dropped
+   * by AppPlatform.
+   * 
+ * + * + * repeated .google.cloud.visionai.v1.AppPlatformCloudFunctionResponse.StructedOutputAnnotation annotations = 2; + * + */ + int getAnnotationsCount(); + /** + * + * + *
+   * The modified annotations that is returned back to AppPlatform.
+   * If the annotations fields are empty, then those annotations will be dropped
+   * by AppPlatform.
+   * 
+ * + * + * repeated .google.cloud.visionai.v1.AppPlatformCloudFunctionResponse.StructedOutputAnnotation annotations = 2; + * + */ + java.util.List< + ? extends + com.google.cloud.visionai.v1.AppPlatformCloudFunctionResponse + .StructedOutputAnnotationOrBuilder> + getAnnotationsOrBuilderList(); + /** + * + * + *
+   * The modified annotations that is returned back to AppPlatform.
+   * If the annotations fields are empty, then those annotations will be dropped
+   * by AppPlatform.
+   * 
+ * + * + * repeated .google.cloud.visionai.v1.AppPlatformCloudFunctionResponse.StructedOutputAnnotation annotations = 2; + * + */ + com.google.cloud.visionai.v1.AppPlatformCloudFunctionResponse.StructedOutputAnnotationOrBuilder + getAnnotationsOrBuilder(int index); + + /** + * + * + *
+   * If set to true, AppPlatform will use original annotations instead of
+   * dropping them, even if it is empty in the annotations filed.
+   * 
+ * + * bool annotation_passthrough = 3; + * + * @return The annotationPassthrough. + */ + boolean getAnnotationPassthrough(); + + /** + * + * + *
+   * The event notifications that is returned back to AppPlatform. Typically it
+   * will then be configured to be consumed/forwared to a operator that handles
+   * events, such as Pub/Sub operator.
+   * 
+ * + * repeated .google.cloud.visionai.v1.AppPlatformEventBody events = 4; + */ + java.util.List getEventsList(); + /** + * + * + *
+   * The event notifications that is returned back to AppPlatform. Typically it
+   * will then be configured to be consumed/forwared to a operator that handles
+   * events, such as Pub/Sub operator.
+   * 
+ * + * repeated .google.cloud.visionai.v1.AppPlatformEventBody events = 4; + */ + com.google.cloud.visionai.v1.AppPlatformEventBody getEvents(int index); + /** + * + * + *
+   * The event notifications that is returned back to AppPlatform. Typically it
+   * will then be configured to be consumed/forwared to a operator that handles
+   * events, such as Pub/Sub operator.
+   * 
+ * + * repeated .google.cloud.visionai.v1.AppPlatformEventBody events = 4; + */ + int getEventsCount(); + /** + * + * + *
+   * The event notifications that is returned back to AppPlatform. Typically it
+   * will then be configured to be consumed/forwared to a operator that handles
+   * events, such as Pub/Sub operator.
+   * 
+ * + * repeated .google.cloud.visionai.v1.AppPlatformEventBody events = 4; + */ + java.util.List + getEventsOrBuilderList(); + /** + * + * + *
+   * The event notifications that is returned back to AppPlatform. Typically it
+   * will then be configured to be consumed/forwared to a operator that handles
+   * events, such as Pub/Sub operator.
+   * 
+ * + * repeated .google.cloud.visionai.v1.AppPlatformEventBody events = 4; + */ + com.google.cloud.visionai.v1.AppPlatformEventBodyOrBuilder getEventsOrBuilder(int index); +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/AppPlatformEventBody.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/AppPlatformEventBody.java new file mode 100644 index 000000000000..ea240f086bd8 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/AppPlatformEventBody.java @@ -0,0 +1,1118 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/annotations.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * Message of content of appPlatform event
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.AppPlatformEventBody} + */ +public final class AppPlatformEventBody extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.AppPlatformEventBody) + AppPlatformEventBodyOrBuilder { + private static final long serialVersionUID = 0L; + // Use AppPlatformEventBody.newBuilder() to construct. + private AppPlatformEventBody(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private AppPlatformEventBody() { + eventMessage_ = ""; + eventId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new AppPlatformEventBody(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.AnnotationsProto + .internal_static_google_cloud_visionai_v1_AppPlatformEventBody_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.AnnotationsProto + .internal_static_google_cloud_visionai_v1_AppPlatformEventBody_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.AppPlatformEventBody.class, + com.google.cloud.visionai.v1.AppPlatformEventBody.Builder.class); + } + + private int bitField0_; + public static final int EVENT_MESSAGE_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object eventMessage_ = ""; + /** + * + * + *
+   * Human readable string of the event like "There are more than 6 people in
+   * the scene". or "Shelf is empty!".
+   * 
+ * + * string event_message = 1; + * + * @return The eventMessage. + */ + @java.lang.Override + public java.lang.String getEventMessage() { + java.lang.Object ref = eventMessage_; + 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(); + eventMessage_ = s; + return s; + } + } + /** + * + * + *
+   * Human readable string of the event like "There are more than 6 people in
+   * the scene". or "Shelf is empty!".
+   * 
+ * + * string event_message = 1; + * + * @return The bytes for eventMessage. + */ + @java.lang.Override + public com.google.protobuf.ByteString getEventMessageBytes() { + java.lang.Object ref = eventMessage_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + eventMessage_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAYLOAD_FIELD_NUMBER = 2; + private com.google.protobuf.Struct payload_; + /** + * + * + *
+   * For the case of Pub/Sub, it will be stored in the message attributes.
+   * ​​pubsub.proto
+   * 
+ * + * .google.protobuf.Struct payload = 2; + * + * @return Whether the payload field is set. + */ + @java.lang.Override + public boolean hasPayload() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * For the case of Pub/Sub, it will be stored in the message attributes.
+   * ​​pubsub.proto
+   * 
+ * + * .google.protobuf.Struct payload = 2; + * + * @return The payload. + */ + @java.lang.Override + public com.google.protobuf.Struct getPayload() { + return payload_ == null ? com.google.protobuf.Struct.getDefaultInstance() : payload_; + } + /** + * + * + *
+   * For the case of Pub/Sub, it will be stored in the message attributes.
+   * ​​pubsub.proto
+   * 
+ * + * .google.protobuf.Struct payload = 2; + */ + @java.lang.Override + public com.google.protobuf.StructOrBuilder getPayloadOrBuilder() { + return payload_ == null ? com.google.protobuf.Struct.getDefaultInstance() : payload_; + } + + public static final int EVENT_ID_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object eventId_ = ""; + /** + * + * + *
+   * User defined Event Id, used to classify event, within a delivery interval,
+   * events from the same application instance with the same id will be
+   * de-duplicated & only first one will be sent out. Empty event_id will be
+   * treated as "".
+   * 
+ * + * string event_id = 3; + * + * @return The eventId. + */ + @java.lang.Override + public java.lang.String getEventId() { + java.lang.Object ref = eventId_; + 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(); + eventId_ = s; + return s; + } + } + /** + * + * + *
+   * User defined Event Id, used to classify event, within a delivery interval,
+   * events from the same application instance with the same id will be
+   * de-duplicated & only first one will be sent out. Empty event_id will be
+   * treated as "".
+   * 
+ * + * string event_id = 3; + * + * @return The bytes for eventId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getEventIdBytes() { + java.lang.Object ref = eventId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + eventId_ = 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(eventMessage_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, eventMessage_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getPayload()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(eventId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, eventId_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(eventMessage_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, eventMessage_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getPayload()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(eventId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, eventId_); + } + size += getUnknownFields().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.visionai.v1.AppPlatformEventBody)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.AppPlatformEventBody other = + (com.google.cloud.visionai.v1.AppPlatformEventBody) obj; + + if (!getEventMessage().equals(other.getEventMessage())) return false; + if (hasPayload() != other.hasPayload()) return false; + if (hasPayload()) { + if (!getPayload().equals(other.getPayload())) return false; + } + if (!getEventId().equals(other.getEventId())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + EVENT_MESSAGE_FIELD_NUMBER; + hash = (53 * hash) + getEventMessage().hashCode(); + if (hasPayload()) { + hash = (37 * hash) + PAYLOAD_FIELD_NUMBER; + hash = (53 * hash) + getPayload().hashCode(); + } + hash = (37 * hash) + EVENT_ID_FIELD_NUMBER; + hash = (53 * hash) + getEventId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.AppPlatformEventBody parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.AppPlatformEventBody 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.visionai.v1.AppPlatformEventBody parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.AppPlatformEventBody 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.visionai.v1.AppPlatformEventBody parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.AppPlatformEventBody parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.AppPlatformEventBody parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.AppPlatformEventBody 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.visionai.v1.AppPlatformEventBody parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.AppPlatformEventBody 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.visionai.v1.AppPlatformEventBody parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.AppPlatformEventBody 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.visionai.v1.AppPlatformEventBody 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; + } + /** + * + * + *
+   * Message of content of appPlatform event
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.AppPlatformEventBody} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.AppPlatformEventBody) + com.google.cloud.visionai.v1.AppPlatformEventBodyOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.AnnotationsProto + .internal_static_google_cloud_visionai_v1_AppPlatformEventBody_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.AnnotationsProto + .internal_static_google_cloud_visionai_v1_AppPlatformEventBody_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.AppPlatformEventBody.class, + com.google.cloud.visionai.v1.AppPlatformEventBody.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.AppPlatformEventBody.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getPayloadFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + eventMessage_ = ""; + payload_ = null; + if (payloadBuilder_ != null) { + payloadBuilder_.dispose(); + payloadBuilder_ = null; + } + eventId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.AnnotationsProto + .internal_static_google_cloud_visionai_v1_AppPlatformEventBody_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.AppPlatformEventBody getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.AppPlatformEventBody.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.AppPlatformEventBody build() { + com.google.cloud.visionai.v1.AppPlatformEventBody result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.AppPlatformEventBody buildPartial() { + com.google.cloud.visionai.v1.AppPlatformEventBody result = + new com.google.cloud.visionai.v1.AppPlatformEventBody(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.visionai.v1.AppPlatformEventBody result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.eventMessage_ = eventMessage_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.payload_ = payloadBuilder_ == null ? payload_ : payloadBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.eventId_ = eventId_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.AppPlatformEventBody) { + return mergeFrom((com.google.cloud.visionai.v1.AppPlatformEventBody) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.AppPlatformEventBody other) { + if (other == com.google.cloud.visionai.v1.AppPlatformEventBody.getDefaultInstance()) + return this; + if (!other.getEventMessage().isEmpty()) { + eventMessage_ = other.eventMessage_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasPayload()) { + mergePayload(other.getPayload()); + } + if (!other.getEventId().isEmpty()) { + eventId_ = other.eventId_; + bitField0_ |= 0x00000004; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + eventMessage_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage(getPayloadFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + eventId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object eventMessage_ = ""; + /** + * + * + *
+     * Human readable string of the event like "There are more than 6 people in
+     * the scene". or "Shelf is empty!".
+     * 
+ * + * string event_message = 1; + * + * @return The eventMessage. + */ + public java.lang.String getEventMessage() { + java.lang.Object ref = eventMessage_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + eventMessage_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Human readable string of the event like "There are more than 6 people in
+     * the scene". or "Shelf is empty!".
+     * 
+ * + * string event_message = 1; + * + * @return The bytes for eventMessage. + */ + public com.google.protobuf.ByteString getEventMessageBytes() { + java.lang.Object ref = eventMessage_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + eventMessage_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Human readable string of the event like "There are more than 6 people in
+     * the scene". or "Shelf is empty!".
+     * 
+ * + * string event_message = 1; + * + * @param value The eventMessage to set. + * @return This builder for chaining. + */ + public Builder setEventMessage(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + eventMessage_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Human readable string of the event like "There are more than 6 people in
+     * the scene". or "Shelf is empty!".
+     * 
+ * + * string event_message = 1; + * + * @return This builder for chaining. + */ + public Builder clearEventMessage() { + eventMessage_ = getDefaultInstance().getEventMessage(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Human readable string of the event like "There are more than 6 people in
+     * the scene". or "Shelf is empty!".
+     * 
+ * + * string event_message = 1; + * + * @param value The bytes for eventMessage to set. + * @return This builder for chaining. + */ + public Builder setEventMessageBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + eventMessage_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.protobuf.Struct payload_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Struct, + com.google.protobuf.Struct.Builder, + com.google.protobuf.StructOrBuilder> + payloadBuilder_; + /** + * + * + *
+     * For the case of Pub/Sub, it will be stored in the message attributes.
+     * ​​pubsub.proto
+     * 
+ * + * .google.protobuf.Struct payload = 2; + * + * @return Whether the payload field is set. + */ + public boolean hasPayload() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * For the case of Pub/Sub, it will be stored in the message attributes.
+     * ​​pubsub.proto
+     * 
+ * + * .google.protobuf.Struct payload = 2; + * + * @return The payload. + */ + public com.google.protobuf.Struct getPayload() { + if (payloadBuilder_ == null) { + return payload_ == null ? com.google.protobuf.Struct.getDefaultInstance() : payload_; + } else { + return payloadBuilder_.getMessage(); + } + } + /** + * + * + *
+     * For the case of Pub/Sub, it will be stored in the message attributes.
+     * ​​pubsub.proto
+     * 
+ * + * .google.protobuf.Struct payload = 2; + */ + public Builder setPayload(com.google.protobuf.Struct value) { + if (payloadBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + payload_ = value; + } else { + payloadBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * For the case of Pub/Sub, it will be stored in the message attributes.
+     * ​​pubsub.proto
+     * 
+ * + * .google.protobuf.Struct payload = 2; + */ + public Builder setPayload(com.google.protobuf.Struct.Builder builderForValue) { + if (payloadBuilder_ == null) { + payload_ = builderForValue.build(); + } else { + payloadBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * For the case of Pub/Sub, it will be stored in the message attributes.
+     * ​​pubsub.proto
+     * 
+ * + * .google.protobuf.Struct payload = 2; + */ + public Builder mergePayload(com.google.protobuf.Struct value) { + if (payloadBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && payload_ != null + && payload_ != com.google.protobuf.Struct.getDefaultInstance()) { + getPayloadBuilder().mergeFrom(value); + } else { + payload_ = value; + } + } else { + payloadBuilder_.mergeFrom(value); + } + if (payload_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + /** + * + * + *
+     * For the case of Pub/Sub, it will be stored in the message attributes.
+     * ​​pubsub.proto
+     * 
+ * + * .google.protobuf.Struct payload = 2; + */ + public Builder clearPayload() { + bitField0_ = (bitField0_ & ~0x00000002); + payload_ = null; + if (payloadBuilder_ != null) { + payloadBuilder_.dispose(); + payloadBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * For the case of Pub/Sub, it will be stored in the message attributes.
+     * ​​pubsub.proto
+     * 
+ * + * .google.protobuf.Struct payload = 2; + */ + public com.google.protobuf.Struct.Builder getPayloadBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getPayloadFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * For the case of Pub/Sub, it will be stored in the message attributes.
+     * ​​pubsub.proto
+     * 
+ * + * .google.protobuf.Struct payload = 2; + */ + public com.google.protobuf.StructOrBuilder getPayloadOrBuilder() { + if (payloadBuilder_ != null) { + return payloadBuilder_.getMessageOrBuilder(); + } else { + return payload_ == null ? com.google.protobuf.Struct.getDefaultInstance() : payload_; + } + } + /** + * + * + *
+     * For the case of Pub/Sub, it will be stored in the message attributes.
+     * ​​pubsub.proto
+     * 
+ * + * .google.protobuf.Struct payload = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Struct, + com.google.protobuf.Struct.Builder, + com.google.protobuf.StructOrBuilder> + getPayloadFieldBuilder() { + if (payloadBuilder_ == null) { + payloadBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Struct, + com.google.protobuf.Struct.Builder, + com.google.protobuf.StructOrBuilder>( + getPayload(), getParentForChildren(), isClean()); + payload_ = null; + } + return payloadBuilder_; + } + + private java.lang.Object eventId_ = ""; + /** + * + * + *
+     * User defined Event Id, used to classify event, within a delivery interval,
+     * events from the same application instance with the same id will be
+     * de-duplicated & only first one will be sent out. Empty event_id will be
+     * treated as "".
+     * 
+ * + * string event_id = 3; + * + * @return The eventId. + */ + public java.lang.String getEventId() { + java.lang.Object ref = eventId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + eventId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * User defined Event Id, used to classify event, within a delivery interval,
+     * events from the same application instance with the same id will be
+     * de-duplicated & only first one will be sent out. Empty event_id will be
+     * treated as "".
+     * 
+ * + * string event_id = 3; + * + * @return The bytes for eventId. + */ + public com.google.protobuf.ByteString getEventIdBytes() { + java.lang.Object ref = eventId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + eventId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * User defined Event Id, used to classify event, within a delivery interval,
+     * events from the same application instance with the same id will be
+     * de-duplicated & only first one will be sent out. Empty event_id will be
+     * treated as "".
+     * 
+ * + * string event_id = 3; + * + * @param value The eventId to set. + * @return This builder for chaining. + */ + public Builder setEventId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + eventId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * User defined Event Id, used to classify event, within a delivery interval,
+     * events from the same application instance with the same id will be
+     * de-duplicated & only first one will be sent out. Empty event_id will be
+     * treated as "".
+     * 
+ * + * string event_id = 3; + * + * @return This builder for chaining. + */ + public Builder clearEventId() { + eventId_ = getDefaultInstance().getEventId(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * User defined Event Id, used to classify event, within a delivery interval,
+     * events from the same application instance with the same id will be
+     * de-duplicated & only first one will be sent out. Empty event_id will be
+     * treated as "".
+     * 
+ * + * string event_id = 3; + * + * @param value The bytes for eventId to set. + * @return This builder for chaining. + */ + public Builder setEventIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + eventId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.AppPlatformEventBody) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.AppPlatformEventBody) + private static final com.google.cloud.visionai.v1.AppPlatformEventBody DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.AppPlatformEventBody(); + } + + public static com.google.cloud.visionai.v1.AppPlatformEventBody getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AppPlatformEventBody parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.AppPlatformEventBody getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/AppPlatformEventBodyOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/AppPlatformEventBodyOrBuilder.java new file mode 100644 index 000000000000..96a45a1b8b06 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/AppPlatformEventBodyOrBuilder.java @@ -0,0 +1,122 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/annotations.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface AppPlatformEventBodyOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.AppPlatformEventBody) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Human readable string of the event like "There are more than 6 people in
+   * the scene". or "Shelf is empty!".
+   * 
+ * + * string event_message = 1; + * + * @return The eventMessage. + */ + java.lang.String getEventMessage(); + /** + * + * + *
+   * Human readable string of the event like "There are more than 6 people in
+   * the scene". or "Shelf is empty!".
+   * 
+ * + * string event_message = 1; + * + * @return The bytes for eventMessage. + */ + com.google.protobuf.ByteString getEventMessageBytes(); + + /** + * + * + *
+   * For the case of Pub/Sub, it will be stored in the message attributes.
+   * ​​pubsub.proto
+   * 
+ * + * .google.protobuf.Struct payload = 2; + * + * @return Whether the payload field is set. + */ + boolean hasPayload(); + /** + * + * + *
+   * For the case of Pub/Sub, it will be stored in the message attributes.
+   * ​​pubsub.proto
+   * 
+ * + * .google.protobuf.Struct payload = 2; + * + * @return The payload. + */ + com.google.protobuf.Struct getPayload(); + /** + * + * + *
+   * For the case of Pub/Sub, it will be stored in the message attributes.
+   * ​​pubsub.proto
+   * 
+ * + * .google.protobuf.Struct payload = 2; + */ + com.google.protobuf.StructOrBuilder getPayloadOrBuilder(); + + /** + * + * + *
+   * User defined Event Id, used to classify event, within a delivery interval,
+   * events from the same application instance with the same id will be
+   * de-duplicated & only first one will be sent out. Empty event_id will be
+   * treated as "".
+   * 
+ * + * string event_id = 3; + * + * @return The eventId. + */ + java.lang.String getEventId(); + /** + * + * + *
+   * User defined Event Id, used to classify event, within a delivery interval,
+   * events from the same application instance with the same id will be
+   * de-duplicated & only first one will be sent out. Empty event_id will be
+   * treated as "".
+   * 
+ * + * string event_id = 3; + * + * @return The bytes for eventId. + */ + com.google.protobuf.ByteString getEventIdBytes(); +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/AppPlatformMetadata.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/AppPlatformMetadata.java new file mode 100644 index 000000000000..bbd09406466d --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/AppPlatformMetadata.java @@ -0,0 +1,1182 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/annotations.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * Message of essential metadata of App Platform.
+ * This message is usually attached to a certain processor output annotation for
+ * customer to identify the source of the data.
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.AppPlatformMetadata} + */ +public final class AppPlatformMetadata extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.AppPlatformMetadata) + AppPlatformMetadataOrBuilder { + private static final long serialVersionUID = 0L; + // Use AppPlatformMetadata.newBuilder() to construct. + private AppPlatformMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private AppPlatformMetadata() { + application_ = ""; + instanceId_ = ""; + node_ = ""; + processor_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new AppPlatformMetadata(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.AnnotationsProto + .internal_static_google_cloud_visionai_v1_AppPlatformMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.AnnotationsProto + .internal_static_google_cloud_visionai_v1_AppPlatformMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.AppPlatformMetadata.class, + com.google.cloud.visionai.v1.AppPlatformMetadata.Builder.class); + } + + public static final int APPLICATION_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object application_ = ""; + /** + * + * + *
+   * The application resource name.
+   * 
+ * + * string application = 1; + * + * @return The application. + */ + @java.lang.Override + public java.lang.String getApplication() { + java.lang.Object ref = application_; + 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(); + application_ = s; + return s; + } + } + /** + * + * + *
+   * The application resource name.
+   * 
+ * + * string application = 1; + * + * @return The bytes for application. + */ + @java.lang.Override + public com.google.protobuf.ByteString getApplicationBytes() { + java.lang.Object ref = application_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + application_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int INSTANCE_ID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object instanceId_ = ""; + /** + * + * + *
+   * The instance resource id. Instance is the nested resource of application
+   * under collection 'instances'.
+   * 
+ * + * string instance_id = 2; + * + * @return The instanceId. + */ + @java.lang.Override + public java.lang.String getInstanceId() { + java.lang.Object ref = instanceId_; + 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(); + instanceId_ = s; + return s; + } + } + /** + * + * + *
+   * The instance resource id. Instance is the nested resource of application
+   * under collection 'instances'.
+   * 
+ * + * string instance_id = 2; + * + * @return The bytes for instanceId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getInstanceIdBytes() { + java.lang.Object ref = instanceId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + instanceId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int NODE_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object node_ = ""; + /** + * + * + *
+   * The node name of the application graph.
+   * 
+ * + * string node = 3; + * + * @return The node. + */ + @java.lang.Override + public java.lang.String getNode() { + java.lang.Object ref = node_; + 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(); + node_ = s; + return s; + } + } + /** + * + * + *
+   * The node name of the application graph.
+   * 
+ * + * string node = 3; + * + * @return The bytes for node. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNodeBytes() { + java.lang.Object ref = node_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + node_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PROCESSOR_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object processor_ = ""; + /** + * + * + *
+   * The referred processor resource name of the application node.
+   * 
+ * + * string processor = 4; + * + * @return The processor. + */ + @java.lang.Override + public java.lang.String getProcessor() { + java.lang.Object ref = processor_; + 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(); + processor_ = s; + return s; + } + } + /** + * + * + *
+   * The referred processor resource name of the application node.
+   * 
+ * + * string processor = 4; + * + * @return The bytes for processor. + */ + @java.lang.Override + public com.google.protobuf.ByteString getProcessorBytes() { + java.lang.Object ref = processor_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + processor_ = 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(application_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, application_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(instanceId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, instanceId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(node_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, node_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(processor_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, processor_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(application_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, application_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(instanceId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, instanceId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(node_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, node_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(processor_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, processor_); + } + size += getUnknownFields().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.visionai.v1.AppPlatformMetadata)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.AppPlatformMetadata other = + (com.google.cloud.visionai.v1.AppPlatformMetadata) obj; + + if (!getApplication().equals(other.getApplication())) return false; + if (!getInstanceId().equals(other.getInstanceId())) return false; + if (!getNode().equals(other.getNode())) return false; + if (!getProcessor().equals(other.getProcessor())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + APPLICATION_FIELD_NUMBER; + hash = (53 * hash) + getApplication().hashCode(); + hash = (37 * hash) + INSTANCE_ID_FIELD_NUMBER; + hash = (53 * hash) + getInstanceId().hashCode(); + hash = (37 * hash) + NODE_FIELD_NUMBER; + hash = (53 * hash) + getNode().hashCode(); + hash = (37 * hash) + PROCESSOR_FIELD_NUMBER; + hash = (53 * hash) + getProcessor().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.AppPlatformMetadata parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.AppPlatformMetadata 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.visionai.v1.AppPlatformMetadata parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.AppPlatformMetadata 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.visionai.v1.AppPlatformMetadata parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.AppPlatformMetadata parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.AppPlatformMetadata parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.AppPlatformMetadata 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.visionai.v1.AppPlatformMetadata parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.AppPlatformMetadata 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.visionai.v1.AppPlatformMetadata parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.AppPlatformMetadata 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.visionai.v1.AppPlatformMetadata 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; + } + /** + * + * + *
+   * Message of essential metadata of App Platform.
+   * This message is usually attached to a certain processor output annotation for
+   * customer to identify the source of the data.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.AppPlatformMetadata} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.AppPlatformMetadata) + com.google.cloud.visionai.v1.AppPlatformMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.AnnotationsProto + .internal_static_google_cloud_visionai_v1_AppPlatformMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.AnnotationsProto + .internal_static_google_cloud_visionai_v1_AppPlatformMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.AppPlatformMetadata.class, + com.google.cloud.visionai.v1.AppPlatformMetadata.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.AppPlatformMetadata.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + application_ = ""; + instanceId_ = ""; + node_ = ""; + processor_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.AnnotationsProto + .internal_static_google_cloud_visionai_v1_AppPlatformMetadata_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.AppPlatformMetadata getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.AppPlatformMetadata.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.AppPlatformMetadata build() { + com.google.cloud.visionai.v1.AppPlatformMetadata result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.AppPlatformMetadata buildPartial() { + com.google.cloud.visionai.v1.AppPlatformMetadata result = + new com.google.cloud.visionai.v1.AppPlatformMetadata(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.visionai.v1.AppPlatformMetadata result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.application_ = application_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.instanceId_ = instanceId_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.node_ = node_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.processor_ = processor_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.AppPlatformMetadata) { + return mergeFrom((com.google.cloud.visionai.v1.AppPlatformMetadata) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.AppPlatformMetadata other) { + if (other == com.google.cloud.visionai.v1.AppPlatformMetadata.getDefaultInstance()) + return this; + if (!other.getApplication().isEmpty()) { + application_ = other.application_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getInstanceId().isEmpty()) { + instanceId_ = other.instanceId_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getNode().isEmpty()) { + node_ = other.node_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getProcessor().isEmpty()) { + processor_ = other.processor_; + bitField0_ |= 0x00000008; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + application_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + instanceId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + node_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + processor_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object application_ = ""; + /** + * + * + *
+     * The application resource name.
+     * 
+ * + * string application = 1; + * + * @return The application. + */ + public java.lang.String getApplication() { + java.lang.Object ref = application_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + application_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The application resource name.
+     * 
+ * + * string application = 1; + * + * @return The bytes for application. + */ + public com.google.protobuf.ByteString getApplicationBytes() { + java.lang.Object ref = application_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + application_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The application resource name.
+     * 
+ * + * string application = 1; + * + * @param value The application to set. + * @return This builder for chaining. + */ + public Builder setApplication(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + application_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The application resource name.
+     * 
+ * + * string application = 1; + * + * @return This builder for chaining. + */ + public Builder clearApplication() { + application_ = getDefaultInstance().getApplication(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * The application resource name.
+     * 
+ * + * string application = 1; + * + * @param value The bytes for application to set. + * @return This builder for chaining. + */ + public Builder setApplicationBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + application_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object instanceId_ = ""; + /** + * + * + *
+     * The instance resource id. Instance is the nested resource of application
+     * under collection 'instances'.
+     * 
+ * + * string instance_id = 2; + * + * @return The instanceId. + */ + public java.lang.String getInstanceId() { + java.lang.Object ref = instanceId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + instanceId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The instance resource id. Instance is the nested resource of application
+     * under collection 'instances'.
+     * 
+ * + * string instance_id = 2; + * + * @return The bytes for instanceId. + */ + public com.google.protobuf.ByteString getInstanceIdBytes() { + java.lang.Object ref = instanceId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + instanceId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The instance resource id. Instance is the nested resource of application
+     * under collection 'instances'.
+     * 
+ * + * string instance_id = 2; + * + * @param value The instanceId to set. + * @return This builder for chaining. + */ + public Builder setInstanceId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + instanceId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * The instance resource id. Instance is the nested resource of application
+     * under collection 'instances'.
+     * 
+ * + * string instance_id = 2; + * + * @return This builder for chaining. + */ + public Builder clearInstanceId() { + instanceId_ = getDefaultInstance().getInstanceId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * The instance resource id. Instance is the nested resource of application
+     * under collection 'instances'.
+     * 
+ * + * string instance_id = 2; + * + * @param value The bytes for instanceId to set. + * @return This builder for chaining. + */ + public Builder setInstanceIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + instanceId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object node_ = ""; + /** + * + * + *
+     * The node name of the application graph.
+     * 
+ * + * string node = 3; + * + * @return The node. + */ + public java.lang.String getNode() { + java.lang.Object ref = node_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + node_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The node name of the application graph.
+     * 
+ * + * string node = 3; + * + * @return The bytes for node. + */ + public com.google.protobuf.ByteString getNodeBytes() { + java.lang.Object ref = node_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + node_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The node name of the application graph.
+     * 
+ * + * string node = 3; + * + * @param value The node to set. + * @return This builder for chaining. + */ + public Builder setNode(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + node_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * The node name of the application graph.
+     * 
+ * + * string node = 3; + * + * @return This builder for chaining. + */ + public Builder clearNode() { + node_ = getDefaultInstance().getNode(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * The node name of the application graph.
+     * 
+ * + * string node = 3; + * + * @param value The bytes for node to set. + * @return This builder for chaining. + */ + public Builder setNodeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + node_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object processor_ = ""; + /** + * + * + *
+     * The referred processor resource name of the application node.
+     * 
+ * + * string processor = 4; + * + * @return The processor. + */ + public java.lang.String getProcessor() { + java.lang.Object ref = processor_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + processor_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The referred processor resource name of the application node.
+     * 
+ * + * string processor = 4; + * + * @return The bytes for processor. + */ + public com.google.protobuf.ByteString getProcessorBytes() { + java.lang.Object ref = processor_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + processor_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The referred processor resource name of the application node.
+     * 
+ * + * string processor = 4; + * + * @param value The processor to set. + * @return This builder for chaining. + */ + public Builder setProcessor(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + processor_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * The referred processor resource name of the application node.
+     * 
+ * + * string processor = 4; + * + * @return This builder for chaining. + */ + public Builder clearProcessor() { + processor_ = getDefaultInstance().getProcessor(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+     * The referred processor resource name of the application node.
+     * 
+ * + * string processor = 4; + * + * @param value The bytes for processor to set. + * @return This builder for chaining. + */ + public Builder setProcessorBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + processor_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.AppPlatformMetadata) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.AppPlatformMetadata) + private static final com.google.cloud.visionai.v1.AppPlatformMetadata DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.AppPlatformMetadata(); + } + + public static com.google.cloud.visionai.v1.AppPlatformMetadata getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AppPlatformMetadata parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.AppPlatformMetadata getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/AppPlatformMetadataOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/AppPlatformMetadataOrBuilder.java new file mode 100644 index 000000000000..59a7d9b9cfad --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/AppPlatformMetadataOrBuilder.java @@ -0,0 +1,128 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/annotations.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface AppPlatformMetadataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.AppPlatformMetadata) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The application resource name.
+   * 
+ * + * string application = 1; + * + * @return The application. + */ + java.lang.String getApplication(); + /** + * + * + *
+   * The application resource name.
+   * 
+ * + * string application = 1; + * + * @return The bytes for application. + */ + com.google.protobuf.ByteString getApplicationBytes(); + + /** + * + * + *
+   * The instance resource id. Instance is the nested resource of application
+   * under collection 'instances'.
+   * 
+ * + * string instance_id = 2; + * + * @return The instanceId. + */ + java.lang.String getInstanceId(); + /** + * + * + *
+   * The instance resource id. Instance is the nested resource of application
+   * under collection 'instances'.
+   * 
+ * + * string instance_id = 2; + * + * @return The bytes for instanceId. + */ + com.google.protobuf.ByteString getInstanceIdBytes(); + + /** + * + * + *
+   * The node name of the application graph.
+   * 
+ * + * string node = 3; + * + * @return The node. + */ + java.lang.String getNode(); + /** + * + * + *
+   * The node name of the application graph.
+   * 
+ * + * string node = 3; + * + * @return The bytes for node. + */ + com.google.protobuf.ByteString getNodeBytes(); + + /** + * + * + *
+   * The referred processor resource name of the application node.
+   * 
+ * + * string processor = 4; + * + * @return The processor. + */ + java.lang.String getProcessor(); + /** + * + * + *
+   * The referred processor resource name of the application node.
+   * 
+ * + * string processor = 4; + * + * @return The bytes for processor. + */ + com.google.protobuf.ByteString getProcessorBytes(); +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/Application.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/Application.java new file mode 100644 index 000000000000..0d30dda6ed25 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/Application.java @@ -0,0 +1,6846 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/platform.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * Message describing Application object
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.Application} + */ +public final class Application extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.Application) + ApplicationOrBuilder { + private static final long serialVersionUID = 0L; + // Use Application.newBuilder() to construct. + private Application(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Application() { + name_ = ""; + displayName_ = ""; + description_ = ""; + state_ = 0; + billingMode_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Application(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_Application_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 4: + return internalGetLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_Application_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.Application.class, + com.google.cloud.visionai.v1.Application.Builder.class); + } + + /** + * + * + *
+   * State of the Application
+   * 
+ * + * Protobuf enum {@code google.cloud.visionai.v1.Application.State} + */ + public enum State implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * The default value. This value is used if the state is omitted.
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + STATE_UNSPECIFIED(0), + /** + * + * + *
+     * State CREATED.
+     * 
+ * + * CREATED = 1; + */ + CREATED(1), + /** + * + * + *
+     * State DEPLOYING.
+     * 
+ * + * DEPLOYING = 2; + */ + DEPLOYING(2), + /** + * + * + *
+     * State DEPLOYED.
+     * 
+ * + * DEPLOYED = 3; + */ + DEPLOYED(3), + /** + * + * + *
+     * State UNDEPLOYING.
+     * 
+ * + * UNDEPLOYING = 4; + */ + UNDEPLOYING(4), + /** + * + * + *
+     * State DELETED.
+     * 
+ * + * DELETED = 5; + */ + DELETED(5), + /** + * + * + *
+     * State ERROR.
+     * 
+ * + * ERROR = 6; + */ + ERROR(6), + /** + * + * + *
+     * State CREATING.
+     * 
+ * + * CREATING = 7; + */ + CREATING(7), + /** + * + * + *
+     * State Updating.
+     * 
+ * + * UPDATING = 8; + */ + UPDATING(8), + /** + * + * + *
+     * State Deleting.
+     * 
+ * + * DELETING = 9; + */ + DELETING(9), + /** + * + * + *
+     * State Fixing.
+     * 
+ * + * FIXING = 10; + */ + FIXING(10), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * The default value. This value is used if the state is omitted.
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + public static final int STATE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * State CREATED.
+     * 
+ * + * CREATED = 1; + */ + public static final int CREATED_VALUE = 1; + /** + * + * + *
+     * State DEPLOYING.
+     * 
+ * + * DEPLOYING = 2; + */ + public static final int DEPLOYING_VALUE = 2; + /** + * + * + *
+     * State DEPLOYED.
+     * 
+ * + * DEPLOYED = 3; + */ + public static final int DEPLOYED_VALUE = 3; + /** + * + * + *
+     * State UNDEPLOYING.
+     * 
+ * + * UNDEPLOYING = 4; + */ + public static final int UNDEPLOYING_VALUE = 4; + /** + * + * + *
+     * State DELETED.
+     * 
+ * + * DELETED = 5; + */ + public static final int DELETED_VALUE = 5; + /** + * + * + *
+     * State ERROR.
+     * 
+ * + * ERROR = 6; + */ + public static final int ERROR_VALUE = 6; + /** + * + * + *
+     * State CREATING.
+     * 
+ * + * CREATING = 7; + */ + public static final int CREATING_VALUE = 7; + /** + * + * + *
+     * State Updating.
+     * 
+ * + * UPDATING = 8; + */ + public static final int UPDATING_VALUE = 8; + /** + * + * + *
+     * State Deleting.
+     * 
+ * + * DELETING = 9; + */ + public static final int DELETING_VALUE = 9; + /** + * + * + *
+     * State Fixing.
+     * 
+ * + * FIXING = 10; + */ + public static final int FIXING_VALUE = 10; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static State valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static State forNumber(int value) { + switch (value) { + case 0: + return STATE_UNSPECIFIED; + case 1: + return CREATED; + case 2: + return DEPLOYING; + case 3: + return DEPLOYED; + case 4: + return UNDEPLOYING; + case 5: + return DELETED; + case 6: + return ERROR; + case 7: + return CREATING; + case 8: + return UPDATING; + case 9: + return DELETING; + case 10: + return FIXING; + 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 State findValueByNumber(int number) { + return State.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + 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.visionai.v1.Application.getDescriptor().getEnumTypes().get(0); + } + + private static final State[] VALUES = values(); + + public static State 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 State(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.visionai.v1.Application.State) + } + + /** + * + * + *
+   * Billing mode of the Application
+   * 
+ * + * Protobuf enum {@code google.cloud.visionai.v1.Application.BillingMode} + */ + public enum BillingMode implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * The default value.
+     * 
+ * + * BILLING_MODE_UNSPECIFIED = 0; + */ + BILLING_MODE_UNSPECIFIED(0), + /** + * + * + *
+     * Pay as you go billing mode.
+     * 
+ * + * PAYG = 1; + */ + PAYG(1), + /** + * + * + *
+     * Monthly billing mode.
+     * 
+ * + * MONTHLY = 2; + */ + MONTHLY(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * The default value.
+     * 
+ * + * BILLING_MODE_UNSPECIFIED = 0; + */ + public static final int BILLING_MODE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * Pay as you go billing mode.
+     * 
+ * + * PAYG = 1; + */ + public static final int PAYG_VALUE = 1; + /** + * + * + *
+     * Monthly billing mode.
+     * 
+ * + * MONTHLY = 2; + */ + public static final int MONTHLY_VALUE = 2; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static BillingMode valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static BillingMode forNumber(int value) { + switch (value) { + case 0: + return BILLING_MODE_UNSPECIFIED; + case 1: + return PAYG; + case 2: + return MONTHLY; + 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 BillingMode findValueByNumber(int number) { + return BillingMode.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + 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.visionai.v1.Application.getDescriptor().getEnumTypes().get(1); + } + + private static final BillingMode[] VALUES = values(); + + public static BillingMode 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 BillingMode(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.visionai.v1.Application.BillingMode) + } + + public interface ApplicationRuntimeInfoOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.Application.ApplicationRuntimeInfo) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Timestamp when the engine be deployed
+     * 
+ * + * .google.protobuf.Timestamp deploy_time = 1; + * + * @return Whether the deployTime field is set. + */ + boolean hasDeployTime(); + /** + * + * + *
+     * Timestamp when the engine be deployed
+     * 
+ * + * .google.protobuf.Timestamp deploy_time = 1; + * + * @return The deployTime. + */ + com.google.protobuf.Timestamp getDeployTime(); + /** + * + * + *
+     * Timestamp when the engine be deployed
+     * 
+ * + * .google.protobuf.Timestamp deploy_time = 1; + */ + com.google.protobuf.TimestampOrBuilder getDeployTimeOrBuilder(); + + /** + * + * + *
+     * Globally created resources like warehouse dataschemas.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.Application.ApplicationRuntimeInfo.GlobalOutputResource global_output_resources = 3; + * + */ + java.util.List< + com.google.cloud.visionai.v1.Application.ApplicationRuntimeInfo.GlobalOutputResource> + getGlobalOutputResourcesList(); + /** + * + * + *
+     * Globally created resources like warehouse dataschemas.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.Application.ApplicationRuntimeInfo.GlobalOutputResource global_output_resources = 3; + * + */ + com.google.cloud.visionai.v1.Application.ApplicationRuntimeInfo.GlobalOutputResource + getGlobalOutputResources(int index); + /** + * + * + *
+     * Globally created resources like warehouse dataschemas.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.Application.ApplicationRuntimeInfo.GlobalOutputResource global_output_resources = 3; + * + */ + int getGlobalOutputResourcesCount(); + /** + * + * + *
+     * Globally created resources like warehouse dataschemas.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.Application.ApplicationRuntimeInfo.GlobalOutputResource global_output_resources = 3; + * + */ + java.util.List< + ? extends + com.google.cloud.visionai.v1.Application.ApplicationRuntimeInfo + .GlobalOutputResourceOrBuilder> + getGlobalOutputResourcesOrBuilderList(); + /** + * + * + *
+     * Globally created resources like warehouse dataschemas.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.Application.ApplicationRuntimeInfo.GlobalOutputResource global_output_resources = 3; + * + */ + com.google.cloud.visionai.v1.Application.ApplicationRuntimeInfo.GlobalOutputResourceOrBuilder + getGlobalOutputResourcesOrBuilder(int index); + + /** + * + * + *
+     * Monitoring-related configuration for this application.
+     * 
+ * + * + * .google.cloud.visionai.v1.Application.ApplicationRuntimeInfo.MonitoringConfig monitoring_config = 4; + * + * + * @return Whether the monitoringConfig field is set. + */ + boolean hasMonitoringConfig(); + /** + * + * + *
+     * Monitoring-related configuration for this application.
+     * 
+ * + * + * .google.cloud.visionai.v1.Application.ApplicationRuntimeInfo.MonitoringConfig monitoring_config = 4; + * + * + * @return The monitoringConfig. + */ + com.google.cloud.visionai.v1.Application.ApplicationRuntimeInfo.MonitoringConfig + getMonitoringConfig(); + /** + * + * + *
+     * Monitoring-related configuration for this application.
+     * 
+ * + * + * .google.cloud.visionai.v1.Application.ApplicationRuntimeInfo.MonitoringConfig monitoring_config = 4; + * + */ + com.google.cloud.visionai.v1.Application.ApplicationRuntimeInfo.MonitoringConfigOrBuilder + getMonitoringConfigOrBuilder(); + } + /** + * + * + *
+   * Message storing the runtime information of the application.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.Application.ApplicationRuntimeInfo} + */ + public static final class ApplicationRuntimeInfo extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.Application.ApplicationRuntimeInfo) + ApplicationRuntimeInfoOrBuilder { + private static final long serialVersionUID = 0L; + // Use ApplicationRuntimeInfo.newBuilder() to construct. + private ApplicationRuntimeInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ApplicationRuntimeInfo() { + globalOutputResources_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ApplicationRuntimeInfo(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_Application_ApplicationRuntimeInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_Application_ApplicationRuntimeInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.Application.ApplicationRuntimeInfo.class, + com.google.cloud.visionai.v1.Application.ApplicationRuntimeInfo.Builder.class); + } + + public interface GlobalOutputResourceOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.Application.ApplicationRuntimeInfo.GlobalOutputResource) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+       * The full resource name of the outputted resources.
+       * 
+ * + * string output_resource = 1; + * + * @return The outputResource. + */ + java.lang.String getOutputResource(); + /** + * + * + *
+       * The full resource name of the outputted resources.
+       * 
+ * + * string output_resource = 1; + * + * @return The bytes for outputResource. + */ + com.google.protobuf.ByteString getOutputResourceBytes(); + + /** + * + * + *
+       * The name of graph node who produces the output resource name.
+       * For example:
+       * output_resource:
+       * /projects/123/locations/us-central1/corpora/my-corpus/dataSchemas/my-schema
+       * producer_node: occupancy-count
+       * 
+ * + * string producer_node = 2; + * + * @return The producerNode. + */ + java.lang.String getProducerNode(); + /** + * + * + *
+       * The name of graph node who produces the output resource name.
+       * For example:
+       * output_resource:
+       * /projects/123/locations/us-central1/corpora/my-corpus/dataSchemas/my-schema
+       * producer_node: occupancy-count
+       * 
+ * + * string producer_node = 2; + * + * @return The bytes for producerNode. + */ + com.google.protobuf.ByteString getProducerNodeBytes(); + + /** + * + * + *
+       * The key of the output resource, it has to be unique within the same
+       * producer node. One producer node can output several output resources,
+       * the key can be used to match corresponding output resources.
+       * 
+ * + * string key = 3; + * + * @return The key. + */ + java.lang.String getKey(); + /** + * + * + *
+       * The key of the output resource, it has to be unique within the same
+       * producer node. One producer node can output several output resources,
+       * the key can be used to match corresponding output resources.
+       * 
+ * + * string key = 3; + * + * @return The bytes for key. + */ + com.google.protobuf.ByteString getKeyBytes(); + } + /** + * + * + *
+     * Message about output resources from application.
+     * 
+ * + * Protobuf type {@code + * google.cloud.visionai.v1.Application.ApplicationRuntimeInfo.GlobalOutputResource} + */ + public static final class GlobalOutputResource extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.Application.ApplicationRuntimeInfo.GlobalOutputResource) + GlobalOutputResourceOrBuilder { + private static final long serialVersionUID = 0L; + // Use GlobalOutputResource.newBuilder() to construct. + private GlobalOutputResource(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GlobalOutputResource() { + outputResource_ = ""; + producerNode_ = ""; + key_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GlobalOutputResource(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_Application_ApplicationRuntimeInfo_GlobalOutputResource_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_Application_ApplicationRuntimeInfo_GlobalOutputResource_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.Application.ApplicationRuntimeInfo.GlobalOutputResource + .class, + com.google.cloud.visionai.v1.Application.ApplicationRuntimeInfo.GlobalOutputResource + .Builder.class); + } + + public static final int OUTPUT_RESOURCE_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object outputResource_ = ""; + /** + * + * + *
+       * The full resource name of the outputted resources.
+       * 
+ * + * string output_resource = 1; + * + * @return The outputResource. + */ + @java.lang.Override + public java.lang.String getOutputResource() { + java.lang.Object ref = outputResource_; + 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(); + outputResource_ = s; + return s; + } + } + /** + * + * + *
+       * The full resource name of the outputted resources.
+       * 
+ * + * string output_resource = 1; + * + * @return The bytes for outputResource. + */ + @java.lang.Override + public com.google.protobuf.ByteString getOutputResourceBytes() { + java.lang.Object ref = outputResource_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + outputResource_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PRODUCER_NODE_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object producerNode_ = ""; + /** + * + * + *
+       * The name of graph node who produces the output resource name.
+       * For example:
+       * output_resource:
+       * /projects/123/locations/us-central1/corpora/my-corpus/dataSchemas/my-schema
+       * producer_node: occupancy-count
+       * 
+ * + * string producer_node = 2; + * + * @return The producerNode. + */ + @java.lang.Override + public java.lang.String getProducerNode() { + java.lang.Object ref = producerNode_; + 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(); + producerNode_ = s; + return s; + } + } + /** + * + * + *
+       * The name of graph node who produces the output resource name.
+       * For example:
+       * output_resource:
+       * /projects/123/locations/us-central1/corpora/my-corpus/dataSchemas/my-schema
+       * producer_node: occupancy-count
+       * 
+ * + * string producer_node = 2; + * + * @return The bytes for producerNode. + */ + @java.lang.Override + public com.google.protobuf.ByteString getProducerNodeBytes() { + java.lang.Object ref = producerNode_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + producerNode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int KEY_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object key_ = ""; + /** + * + * + *
+       * The key of the output resource, it has to be unique within the same
+       * producer node. One producer node can output several output resources,
+       * the key can be used to match corresponding output resources.
+       * 
+ * + * string key = 3; + * + * @return The key. + */ + @java.lang.Override + public java.lang.String getKey() { + java.lang.Object ref = key_; + 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(); + key_ = s; + return s; + } + } + /** + * + * + *
+       * The key of the output resource, it has to be unique within the same
+       * producer node. One producer node can output several output resources,
+       * the key can be used to match corresponding output resources.
+       * 
+ * + * string key = 3; + * + * @return The bytes for key. + */ + @java.lang.Override + public com.google.protobuf.ByteString getKeyBytes() { + java.lang.Object ref = key_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + key_ = 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(outputResource_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, outputResource_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(producerNode_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, producerNode_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(key_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, key_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(outputResource_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, outputResource_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(producerNode_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, producerNode_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(key_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, key_); + } + size += getUnknownFields().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.visionai.v1.Application.ApplicationRuntimeInfo.GlobalOutputResource)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.Application.ApplicationRuntimeInfo.GlobalOutputResource other = + (com.google.cloud.visionai.v1.Application.ApplicationRuntimeInfo.GlobalOutputResource) + obj; + + if (!getOutputResource().equals(other.getOutputResource())) return false; + if (!getProducerNode().equals(other.getProducerNode())) return false; + if (!getKey().equals(other.getKey())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + OUTPUT_RESOURCE_FIELD_NUMBER; + hash = (53 * hash) + getOutputResource().hashCode(); + hash = (37 * hash) + PRODUCER_NODE_FIELD_NUMBER; + hash = (53 * hash) + getProducerNode().hashCode(); + hash = (37 * hash) + KEY_FIELD_NUMBER; + hash = (53 * hash) + getKey().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.Application.ApplicationRuntimeInfo + .GlobalOutputResource + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.Application.ApplicationRuntimeInfo + .GlobalOutputResource + 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.visionai.v1.Application.ApplicationRuntimeInfo + .GlobalOutputResource + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.Application.ApplicationRuntimeInfo + .GlobalOutputResource + 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.visionai.v1.Application.ApplicationRuntimeInfo + .GlobalOutputResource + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.Application.ApplicationRuntimeInfo + .GlobalOutputResource + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.Application.ApplicationRuntimeInfo + .GlobalOutputResource + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.Application.ApplicationRuntimeInfo + .GlobalOutputResource + 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.visionai.v1.Application.ApplicationRuntimeInfo + .GlobalOutputResource + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.Application.ApplicationRuntimeInfo + .GlobalOutputResource + 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.visionai.v1.Application.ApplicationRuntimeInfo + .GlobalOutputResource + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.Application.ApplicationRuntimeInfo + .GlobalOutputResource + 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.visionai.v1.Application.ApplicationRuntimeInfo.GlobalOutputResource + 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; + } + /** + * + * + *
+       * Message about output resources from application.
+       * 
+ * + * Protobuf type {@code + * google.cloud.visionai.v1.Application.ApplicationRuntimeInfo.GlobalOutputResource} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.Application.ApplicationRuntimeInfo.GlobalOutputResource) + com.google.cloud.visionai.v1.Application.ApplicationRuntimeInfo + .GlobalOutputResourceOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_Application_ApplicationRuntimeInfo_GlobalOutputResource_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_Application_ApplicationRuntimeInfo_GlobalOutputResource_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.Application.ApplicationRuntimeInfo + .GlobalOutputResource.class, + com.google.cloud.visionai.v1.Application.ApplicationRuntimeInfo + .GlobalOutputResource.Builder.class); + } + + // Construct using + // com.google.cloud.visionai.v1.Application.ApplicationRuntimeInfo.GlobalOutputResource.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + outputResource_ = ""; + producerNode_ = ""; + key_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_Application_ApplicationRuntimeInfo_GlobalOutputResource_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.Application.ApplicationRuntimeInfo.GlobalOutputResource + getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.Application.ApplicationRuntimeInfo + .GlobalOutputResource.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.Application.ApplicationRuntimeInfo.GlobalOutputResource + build() { + com.google.cloud.visionai.v1.Application.ApplicationRuntimeInfo.GlobalOutputResource + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.Application.ApplicationRuntimeInfo.GlobalOutputResource + buildPartial() { + com.google.cloud.visionai.v1.Application.ApplicationRuntimeInfo.GlobalOutputResource + result = + new com.google.cloud.visionai.v1.Application.ApplicationRuntimeInfo + .GlobalOutputResource(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.visionai.v1.Application.ApplicationRuntimeInfo.GlobalOutputResource + result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.outputResource_ = outputResource_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.producerNode_ = producerNode_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.key_ = key_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.visionai.v1.Application.ApplicationRuntimeInfo + .GlobalOutputResource) { + return mergeFrom( + (com.google.cloud.visionai.v1.Application.ApplicationRuntimeInfo + .GlobalOutputResource) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.visionai.v1.Application.ApplicationRuntimeInfo.GlobalOutputResource + other) { + if (other + == com.google.cloud.visionai.v1.Application.ApplicationRuntimeInfo + .GlobalOutputResource.getDefaultInstance()) return this; + if (!other.getOutputResource().isEmpty()) { + outputResource_ = other.outputResource_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getProducerNode().isEmpty()) { + producerNode_ = other.producerNode_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getKey().isEmpty()) { + key_ = other.key_; + bitField0_ |= 0x00000004; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + outputResource_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + producerNode_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + key_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object outputResource_ = ""; + /** + * + * + *
+         * The full resource name of the outputted resources.
+         * 
+ * + * string output_resource = 1; + * + * @return The outputResource. + */ + public java.lang.String getOutputResource() { + java.lang.Object ref = outputResource_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + outputResource_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+         * The full resource name of the outputted resources.
+         * 
+ * + * string output_resource = 1; + * + * @return The bytes for outputResource. + */ + public com.google.protobuf.ByteString getOutputResourceBytes() { + java.lang.Object ref = outputResource_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + outputResource_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+         * The full resource name of the outputted resources.
+         * 
+ * + * string output_resource = 1; + * + * @param value The outputResource to set. + * @return This builder for chaining. + */ + public Builder setOutputResource(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + outputResource_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+         * The full resource name of the outputted resources.
+         * 
+ * + * string output_resource = 1; + * + * @return This builder for chaining. + */ + public Builder clearOutputResource() { + outputResource_ = getDefaultInstance().getOutputResource(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+         * The full resource name of the outputted resources.
+         * 
+ * + * string output_resource = 1; + * + * @param value The bytes for outputResource to set. + * @return This builder for chaining. + */ + public Builder setOutputResourceBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + outputResource_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object producerNode_ = ""; + /** + * + * + *
+         * The name of graph node who produces the output resource name.
+         * For example:
+         * output_resource:
+         * /projects/123/locations/us-central1/corpora/my-corpus/dataSchemas/my-schema
+         * producer_node: occupancy-count
+         * 
+ * + * string producer_node = 2; + * + * @return The producerNode. + */ + public java.lang.String getProducerNode() { + java.lang.Object ref = producerNode_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + producerNode_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+         * The name of graph node who produces the output resource name.
+         * For example:
+         * output_resource:
+         * /projects/123/locations/us-central1/corpora/my-corpus/dataSchemas/my-schema
+         * producer_node: occupancy-count
+         * 
+ * + * string producer_node = 2; + * + * @return The bytes for producerNode. + */ + public com.google.protobuf.ByteString getProducerNodeBytes() { + java.lang.Object ref = producerNode_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + producerNode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+         * The name of graph node who produces the output resource name.
+         * For example:
+         * output_resource:
+         * /projects/123/locations/us-central1/corpora/my-corpus/dataSchemas/my-schema
+         * producer_node: occupancy-count
+         * 
+ * + * string producer_node = 2; + * + * @param value The producerNode to set. + * @return This builder for chaining. + */ + public Builder setProducerNode(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + producerNode_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+         * The name of graph node who produces the output resource name.
+         * For example:
+         * output_resource:
+         * /projects/123/locations/us-central1/corpora/my-corpus/dataSchemas/my-schema
+         * producer_node: occupancy-count
+         * 
+ * + * string producer_node = 2; + * + * @return This builder for chaining. + */ + public Builder clearProducerNode() { + producerNode_ = getDefaultInstance().getProducerNode(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+         * The name of graph node who produces the output resource name.
+         * For example:
+         * output_resource:
+         * /projects/123/locations/us-central1/corpora/my-corpus/dataSchemas/my-schema
+         * producer_node: occupancy-count
+         * 
+ * + * string producer_node = 2; + * + * @param value The bytes for producerNode to set. + * @return This builder for chaining. + */ + public Builder setProducerNodeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + producerNode_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object key_ = ""; + /** + * + * + *
+         * The key of the output resource, it has to be unique within the same
+         * producer node. One producer node can output several output resources,
+         * the key can be used to match corresponding output resources.
+         * 
+ * + * string key = 3; + * + * @return The key. + */ + public java.lang.String getKey() { + java.lang.Object ref = key_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + key_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+         * The key of the output resource, it has to be unique within the same
+         * producer node. One producer node can output several output resources,
+         * the key can be used to match corresponding output resources.
+         * 
+ * + * string key = 3; + * + * @return The bytes for key. + */ + public com.google.protobuf.ByteString getKeyBytes() { + java.lang.Object ref = key_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + key_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+         * The key of the output resource, it has to be unique within the same
+         * producer node. One producer node can output several output resources,
+         * the key can be used to match corresponding output resources.
+         * 
+ * + * string key = 3; + * + * @param value The key to set. + * @return This builder for chaining. + */ + public Builder setKey(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + key_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+         * The key of the output resource, it has to be unique within the same
+         * producer node. One producer node can output several output resources,
+         * the key can be used to match corresponding output resources.
+         * 
+ * + * string key = 3; + * + * @return This builder for chaining. + */ + public Builder clearKey() { + key_ = getDefaultInstance().getKey(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+         * The key of the output resource, it has to be unique within the same
+         * producer node. One producer node can output several output resources,
+         * the key can be used to match corresponding output resources.
+         * 
+ * + * string key = 3; + * + * @param value The bytes for key to set. + * @return This builder for chaining. + */ + public Builder setKeyBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + key_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.Application.ApplicationRuntimeInfo.GlobalOutputResource) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.Application.ApplicationRuntimeInfo.GlobalOutputResource) + private static final com.google.cloud.visionai.v1.Application.ApplicationRuntimeInfo + .GlobalOutputResource + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.visionai.v1.Application.ApplicationRuntimeInfo + .GlobalOutputResource(); + } + + public static com.google.cloud.visionai.v1.Application.ApplicationRuntimeInfo + .GlobalOutputResource + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GlobalOutputResource parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.Application.ApplicationRuntimeInfo.GlobalOutputResource + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface MonitoringConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.Application.ApplicationRuntimeInfo.MonitoringConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+       * Whether this application has monitoring enabled.
+       * 
+ * + * bool enabled = 1; + * + * @return The enabled. + */ + boolean getEnabled(); + } + /** + * + * + *
+     * Monitoring-related configuration for an application.
+     * 
+ * + * Protobuf type {@code + * google.cloud.visionai.v1.Application.ApplicationRuntimeInfo.MonitoringConfig} + */ + public static final class MonitoringConfig extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.Application.ApplicationRuntimeInfo.MonitoringConfig) + MonitoringConfigOrBuilder { + private static final long serialVersionUID = 0L; + // Use MonitoringConfig.newBuilder() to construct. + private MonitoringConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private MonitoringConfig() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new MonitoringConfig(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_Application_ApplicationRuntimeInfo_MonitoringConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_Application_ApplicationRuntimeInfo_MonitoringConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.Application.ApplicationRuntimeInfo.MonitoringConfig + .class, + com.google.cloud.visionai.v1.Application.ApplicationRuntimeInfo.MonitoringConfig + .Builder.class); + } + + public static final int ENABLED_FIELD_NUMBER = 1; + private boolean enabled_ = false; + /** + * + * + *
+       * Whether this application has monitoring enabled.
+       * 
+ * + * bool enabled = 1; + * + * @return The enabled. + */ + @java.lang.Override + public boolean getEnabled() { + return enabled_; + } + + 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 (enabled_ != false) { + output.writeBool(1, enabled_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (enabled_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(1, enabled_); + } + size += getUnknownFields().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.visionai.v1.Application.ApplicationRuntimeInfo.MonitoringConfig)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.Application.ApplicationRuntimeInfo.MonitoringConfig other = + (com.google.cloud.visionai.v1.Application.ApplicationRuntimeInfo.MonitoringConfig) obj; + + if (getEnabled() != other.getEnabled()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ENABLED_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getEnabled()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.Application.ApplicationRuntimeInfo.MonitoringConfig + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.Application.ApplicationRuntimeInfo.MonitoringConfig + 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.visionai.v1.Application.ApplicationRuntimeInfo.MonitoringConfig + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.Application.ApplicationRuntimeInfo.MonitoringConfig + 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.visionai.v1.Application.ApplicationRuntimeInfo.MonitoringConfig + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.Application.ApplicationRuntimeInfo.MonitoringConfig + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.Application.ApplicationRuntimeInfo.MonitoringConfig + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.Application.ApplicationRuntimeInfo.MonitoringConfig + 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.visionai.v1.Application.ApplicationRuntimeInfo.MonitoringConfig + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.Application.ApplicationRuntimeInfo.MonitoringConfig + 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.visionai.v1.Application.ApplicationRuntimeInfo.MonitoringConfig + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.Application.ApplicationRuntimeInfo.MonitoringConfig + 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.visionai.v1.Application.ApplicationRuntimeInfo.MonitoringConfig + 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; + } + /** + * + * + *
+       * Monitoring-related configuration for an application.
+       * 
+ * + * Protobuf type {@code + * google.cloud.visionai.v1.Application.ApplicationRuntimeInfo.MonitoringConfig} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.Application.ApplicationRuntimeInfo.MonitoringConfig) + com.google.cloud.visionai.v1.Application.ApplicationRuntimeInfo + .MonitoringConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_Application_ApplicationRuntimeInfo_MonitoringConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_Application_ApplicationRuntimeInfo_MonitoringConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.Application.ApplicationRuntimeInfo.MonitoringConfig + .class, + com.google.cloud.visionai.v1.Application.ApplicationRuntimeInfo.MonitoringConfig + .Builder.class); + } + + // Construct using + // com.google.cloud.visionai.v1.Application.ApplicationRuntimeInfo.MonitoringConfig.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + enabled_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_Application_ApplicationRuntimeInfo_MonitoringConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.Application.ApplicationRuntimeInfo.MonitoringConfig + getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.Application.ApplicationRuntimeInfo.MonitoringConfig + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.Application.ApplicationRuntimeInfo.MonitoringConfig + build() { + com.google.cloud.visionai.v1.Application.ApplicationRuntimeInfo.MonitoringConfig result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.Application.ApplicationRuntimeInfo.MonitoringConfig + buildPartial() { + com.google.cloud.visionai.v1.Application.ApplicationRuntimeInfo.MonitoringConfig result = + new com.google.cloud.visionai.v1.Application.ApplicationRuntimeInfo.MonitoringConfig( + this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.visionai.v1.Application.ApplicationRuntimeInfo.MonitoringConfig + result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.enabled_ = enabled_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.visionai.v1.Application.ApplicationRuntimeInfo.MonitoringConfig) { + return mergeFrom( + (com.google.cloud.visionai.v1.Application.ApplicationRuntimeInfo.MonitoringConfig) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.visionai.v1.Application.ApplicationRuntimeInfo.MonitoringConfig + other) { + if (other + == com.google.cloud.visionai.v1.Application.ApplicationRuntimeInfo.MonitoringConfig + .getDefaultInstance()) return this; + if (other.getEnabled() != false) { + setEnabled(other.getEnabled()); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + enabled_ = input.readBool(); + bitField0_ |= 0x00000001; + break; + } // case 8 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private boolean enabled_; + /** + * + * + *
+         * Whether this application has monitoring enabled.
+         * 
+ * + * bool enabled = 1; + * + * @return The enabled. + */ + @java.lang.Override + public boolean getEnabled() { + return enabled_; + } + /** + * + * + *
+         * Whether this application has monitoring enabled.
+         * 
+ * + * bool enabled = 1; + * + * @param value The enabled to set. + * @return This builder for chaining. + */ + public Builder setEnabled(boolean value) { + + enabled_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+         * Whether this application has monitoring enabled.
+         * 
+ * + * bool enabled = 1; + * + * @return This builder for chaining. + */ + public Builder clearEnabled() { + bitField0_ = (bitField0_ & ~0x00000001); + enabled_ = false; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.Application.ApplicationRuntimeInfo.MonitoringConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.Application.ApplicationRuntimeInfo.MonitoringConfig) + private static final com.google.cloud.visionai.v1.Application.ApplicationRuntimeInfo + .MonitoringConfig + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.visionai.v1.Application.ApplicationRuntimeInfo.MonitoringConfig(); + } + + public static com.google.cloud.visionai.v1.Application.ApplicationRuntimeInfo.MonitoringConfig + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public MonitoringConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.Application.ApplicationRuntimeInfo.MonitoringConfig + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int bitField0_; + public static final int DEPLOY_TIME_FIELD_NUMBER = 1; + private com.google.protobuf.Timestamp deployTime_; + /** + * + * + *
+     * Timestamp when the engine be deployed
+     * 
+ * + * .google.protobuf.Timestamp deploy_time = 1; + * + * @return Whether the deployTime field is set. + */ + @java.lang.Override + public boolean hasDeployTime() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * Timestamp when the engine be deployed
+     * 
+ * + * .google.protobuf.Timestamp deploy_time = 1; + * + * @return The deployTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getDeployTime() { + return deployTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : deployTime_; + } + /** + * + * + *
+     * Timestamp when the engine be deployed
+     * 
+ * + * .google.protobuf.Timestamp deploy_time = 1; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getDeployTimeOrBuilder() { + return deployTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : deployTime_; + } + + public static final int GLOBAL_OUTPUT_RESOURCES_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private java.util.List< + com.google.cloud.visionai.v1.Application.ApplicationRuntimeInfo.GlobalOutputResource> + globalOutputResources_; + /** + * + * + *
+     * Globally created resources like warehouse dataschemas.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.Application.ApplicationRuntimeInfo.GlobalOutputResource global_output_resources = 3; + * + */ + @java.lang.Override + public java.util.List< + com.google.cloud.visionai.v1.Application.ApplicationRuntimeInfo.GlobalOutputResource> + getGlobalOutputResourcesList() { + return globalOutputResources_; + } + /** + * + * + *
+     * Globally created resources like warehouse dataschemas.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.Application.ApplicationRuntimeInfo.GlobalOutputResource global_output_resources = 3; + * + */ + @java.lang.Override + public java.util.List< + ? extends + com.google.cloud.visionai.v1.Application.ApplicationRuntimeInfo + .GlobalOutputResourceOrBuilder> + getGlobalOutputResourcesOrBuilderList() { + return globalOutputResources_; + } + /** + * + * + *
+     * Globally created resources like warehouse dataschemas.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.Application.ApplicationRuntimeInfo.GlobalOutputResource global_output_resources = 3; + * + */ + @java.lang.Override + public int getGlobalOutputResourcesCount() { + return globalOutputResources_.size(); + } + /** + * + * + *
+     * Globally created resources like warehouse dataschemas.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.Application.ApplicationRuntimeInfo.GlobalOutputResource global_output_resources = 3; + * + */ + @java.lang.Override + public com.google.cloud.visionai.v1.Application.ApplicationRuntimeInfo.GlobalOutputResource + getGlobalOutputResources(int index) { + return globalOutputResources_.get(index); + } + /** + * + * + *
+     * Globally created resources like warehouse dataschemas.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.Application.ApplicationRuntimeInfo.GlobalOutputResource global_output_resources = 3; + * + */ + @java.lang.Override + public com.google.cloud.visionai.v1.Application.ApplicationRuntimeInfo + .GlobalOutputResourceOrBuilder + getGlobalOutputResourcesOrBuilder(int index) { + return globalOutputResources_.get(index); + } + + public static final int MONITORING_CONFIG_FIELD_NUMBER = 4; + private com.google.cloud.visionai.v1.Application.ApplicationRuntimeInfo.MonitoringConfig + monitoringConfig_; + /** + * + * + *
+     * Monitoring-related configuration for this application.
+     * 
+ * + * + * .google.cloud.visionai.v1.Application.ApplicationRuntimeInfo.MonitoringConfig monitoring_config = 4; + * + * + * @return Whether the monitoringConfig field is set. + */ + @java.lang.Override + public boolean hasMonitoringConfig() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * Monitoring-related configuration for this application.
+     * 
+ * + * + * .google.cloud.visionai.v1.Application.ApplicationRuntimeInfo.MonitoringConfig monitoring_config = 4; + * + * + * @return The monitoringConfig. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.Application.ApplicationRuntimeInfo.MonitoringConfig + getMonitoringConfig() { + return monitoringConfig_ == null + ? com.google.cloud.visionai.v1.Application.ApplicationRuntimeInfo.MonitoringConfig + .getDefaultInstance() + : monitoringConfig_; + } + /** + * + * + *
+     * Monitoring-related configuration for this application.
+     * 
+ * + * + * .google.cloud.visionai.v1.Application.ApplicationRuntimeInfo.MonitoringConfig monitoring_config = 4; + * + */ + @java.lang.Override + public com.google.cloud.visionai.v1.Application.ApplicationRuntimeInfo.MonitoringConfigOrBuilder + getMonitoringConfigOrBuilder() { + return monitoringConfig_ == null + ? com.google.cloud.visionai.v1.Application.ApplicationRuntimeInfo.MonitoringConfig + .getDefaultInstance() + : monitoringConfig_; + } + + 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 (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getDeployTime()); + } + for (int i = 0; i < globalOutputResources_.size(); i++) { + output.writeMessage(3, globalOutputResources_.get(i)); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(4, getMonitoringConfig()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getDeployTime()); + } + for (int i = 0; i < globalOutputResources_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 3, globalOutputResources_.get(i)); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getMonitoringConfig()); + } + size += getUnknownFields().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.visionai.v1.Application.ApplicationRuntimeInfo)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.Application.ApplicationRuntimeInfo other = + (com.google.cloud.visionai.v1.Application.ApplicationRuntimeInfo) obj; + + if (hasDeployTime() != other.hasDeployTime()) return false; + if (hasDeployTime()) { + if (!getDeployTime().equals(other.getDeployTime())) return false; + } + if (!getGlobalOutputResourcesList().equals(other.getGlobalOutputResourcesList())) + return false; + if (hasMonitoringConfig() != other.hasMonitoringConfig()) return false; + if (hasMonitoringConfig()) { + if (!getMonitoringConfig().equals(other.getMonitoringConfig())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasDeployTime()) { + hash = (37 * hash) + DEPLOY_TIME_FIELD_NUMBER; + hash = (53 * hash) + getDeployTime().hashCode(); + } + if (getGlobalOutputResourcesCount() > 0) { + hash = (37 * hash) + GLOBAL_OUTPUT_RESOURCES_FIELD_NUMBER; + hash = (53 * hash) + getGlobalOutputResourcesList().hashCode(); + } + if (hasMonitoringConfig()) { + hash = (37 * hash) + MONITORING_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getMonitoringConfig().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.Application.ApplicationRuntimeInfo parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.Application.ApplicationRuntimeInfo 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.visionai.v1.Application.ApplicationRuntimeInfo parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.Application.ApplicationRuntimeInfo 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.visionai.v1.Application.ApplicationRuntimeInfo parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.Application.ApplicationRuntimeInfo parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.Application.ApplicationRuntimeInfo parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.Application.ApplicationRuntimeInfo 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.visionai.v1.Application.ApplicationRuntimeInfo + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.Application.ApplicationRuntimeInfo + 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.visionai.v1.Application.ApplicationRuntimeInfo parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.Application.ApplicationRuntimeInfo 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.visionai.v1.Application.ApplicationRuntimeInfo 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; + } + /** + * + * + *
+     * Message storing the runtime information of the application.
+     * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.Application.ApplicationRuntimeInfo} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.Application.ApplicationRuntimeInfo) + com.google.cloud.visionai.v1.Application.ApplicationRuntimeInfoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_Application_ApplicationRuntimeInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_Application_ApplicationRuntimeInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.Application.ApplicationRuntimeInfo.class, + com.google.cloud.visionai.v1.Application.ApplicationRuntimeInfo.Builder.class); + } + + // Construct using + // com.google.cloud.visionai.v1.Application.ApplicationRuntimeInfo.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getDeployTimeFieldBuilder(); + getGlobalOutputResourcesFieldBuilder(); + getMonitoringConfigFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + deployTime_ = null; + if (deployTimeBuilder_ != null) { + deployTimeBuilder_.dispose(); + deployTimeBuilder_ = null; + } + if (globalOutputResourcesBuilder_ == null) { + globalOutputResources_ = java.util.Collections.emptyList(); + } else { + globalOutputResources_ = null; + globalOutputResourcesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + monitoringConfig_ = null; + if (monitoringConfigBuilder_ != null) { + monitoringConfigBuilder_.dispose(); + monitoringConfigBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_Application_ApplicationRuntimeInfo_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.Application.ApplicationRuntimeInfo + getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.Application.ApplicationRuntimeInfo.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.Application.ApplicationRuntimeInfo build() { + com.google.cloud.visionai.v1.Application.ApplicationRuntimeInfo result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.Application.ApplicationRuntimeInfo buildPartial() { + com.google.cloud.visionai.v1.Application.ApplicationRuntimeInfo result = + new com.google.cloud.visionai.v1.Application.ApplicationRuntimeInfo(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.visionai.v1.Application.ApplicationRuntimeInfo result) { + if (globalOutputResourcesBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + globalOutputResources_ = java.util.Collections.unmodifiableList(globalOutputResources_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.globalOutputResources_ = globalOutputResources_; + } else { + result.globalOutputResources_ = globalOutputResourcesBuilder_.build(); + } + } + + private void buildPartial0( + com.google.cloud.visionai.v1.Application.ApplicationRuntimeInfo result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.deployTime_ = + deployTimeBuilder_ == null ? deployTime_ : deployTimeBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.monitoringConfig_ = + monitoringConfigBuilder_ == null + ? monitoringConfig_ + : monitoringConfigBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.Application.ApplicationRuntimeInfo) { + return mergeFrom((com.google.cloud.visionai.v1.Application.ApplicationRuntimeInfo) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.visionai.v1.Application.ApplicationRuntimeInfo other) { + if (other + == com.google.cloud.visionai.v1.Application.ApplicationRuntimeInfo.getDefaultInstance()) + return this; + if (other.hasDeployTime()) { + mergeDeployTime(other.getDeployTime()); + } + if (globalOutputResourcesBuilder_ == null) { + if (!other.globalOutputResources_.isEmpty()) { + if (globalOutputResources_.isEmpty()) { + globalOutputResources_ = other.globalOutputResources_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureGlobalOutputResourcesIsMutable(); + globalOutputResources_.addAll(other.globalOutputResources_); + } + onChanged(); + } + } else { + if (!other.globalOutputResources_.isEmpty()) { + if (globalOutputResourcesBuilder_.isEmpty()) { + globalOutputResourcesBuilder_.dispose(); + globalOutputResourcesBuilder_ = null; + globalOutputResources_ = other.globalOutputResources_; + bitField0_ = (bitField0_ & ~0x00000002); + globalOutputResourcesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getGlobalOutputResourcesFieldBuilder() + : null; + } else { + globalOutputResourcesBuilder_.addAllMessages(other.globalOutputResources_); + } + } + } + if (other.hasMonitoringConfig()) { + mergeMonitoringConfig(other.getMonitoringConfig()); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getDeployTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 26: + { + com.google.cloud.visionai.v1.Application.ApplicationRuntimeInfo + .GlobalOutputResource + m = + input.readMessage( + com.google.cloud.visionai.v1.Application.ApplicationRuntimeInfo + .GlobalOutputResource.parser(), + extensionRegistry); + if (globalOutputResourcesBuilder_ == null) { + ensureGlobalOutputResourcesIsMutable(); + globalOutputResources_.add(m); + } else { + globalOutputResourcesBuilder_.addMessage(m); + } + break; + } // case 26 + case 34: + { + input.readMessage( + getMonitoringConfigFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 34 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.protobuf.Timestamp deployTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + deployTimeBuilder_; + /** + * + * + *
+       * Timestamp when the engine be deployed
+       * 
+ * + * .google.protobuf.Timestamp deploy_time = 1; + * + * @return Whether the deployTime field is set. + */ + public boolean hasDeployTime() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+       * Timestamp when the engine be deployed
+       * 
+ * + * .google.protobuf.Timestamp deploy_time = 1; + * + * @return The deployTime. + */ + public com.google.protobuf.Timestamp getDeployTime() { + if (deployTimeBuilder_ == null) { + return deployTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : deployTime_; + } else { + return deployTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+       * Timestamp when the engine be deployed
+       * 
+ * + * .google.protobuf.Timestamp deploy_time = 1; + */ + public Builder setDeployTime(com.google.protobuf.Timestamp value) { + if (deployTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + deployTime_ = value; + } else { + deployTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * Timestamp when the engine be deployed
+       * 
+ * + * .google.protobuf.Timestamp deploy_time = 1; + */ + public Builder setDeployTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (deployTimeBuilder_ == null) { + deployTime_ = builderForValue.build(); + } else { + deployTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * Timestamp when the engine be deployed
+       * 
+ * + * .google.protobuf.Timestamp deploy_time = 1; + */ + public Builder mergeDeployTime(com.google.protobuf.Timestamp value) { + if (deployTimeBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && deployTime_ != null + && deployTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getDeployTimeBuilder().mergeFrom(value); + } else { + deployTime_ = value; + } + } else { + deployTimeBuilder_.mergeFrom(value); + } + if (deployTime_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + /** + * + * + *
+       * Timestamp when the engine be deployed
+       * 
+ * + * .google.protobuf.Timestamp deploy_time = 1; + */ + public Builder clearDeployTime() { + bitField0_ = (bitField0_ & ~0x00000001); + deployTime_ = null; + if (deployTimeBuilder_ != null) { + deployTimeBuilder_.dispose(); + deployTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+       * Timestamp when the engine be deployed
+       * 
+ * + * .google.protobuf.Timestamp deploy_time = 1; + */ + public com.google.protobuf.Timestamp.Builder getDeployTimeBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getDeployTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Timestamp when the engine be deployed
+       * 
+ * + * .google.protobuf.Timestamp deploy_time = 1; + */ + public com.google.protobuf.TimestampOrBuilder getDeployTimeOrBuilder() { + if (deployTimeBuilder_ != null) { + return deployTimeBuilder_.getMessageOrBuilder(); + } else { + return deployTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : deployTime_; + } + } + /** + * + * + *
+       * Timestamp when the engine be deployed
+       * 
+ * + * .google.protobuf.Timestamp deploy_time = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getDeployTimeFieldBuilder() { + if (deployTimeBuilder_ == null) { + deployTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getDeployTime(), getParentForChildren(), isClean()); + deployTime_ = null; + } + return deployTimeBuilder_; + } + + private java.util.List< + com.google.cloud.visionai.v1.Application.ApplicationRuntimeInfo.GlobalOutputResource> + globalOutputResources_ = java.util.Collections.emptyList(); + + private void ensureGlobalOutputResourcesIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + globalOutputResources_ = + new java.util.ArrayList< + com.google.cloud.visionai.v1.Application.ApplicationRuntimeInfo + .GlobalOutputResource>(globalOutputResources_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.visionai.v1.Application.ApplicationRuntimeInfo.GlobalOutputResource, + com.google.cloud.visionai.v1.Application.ApplicationRuntimeInfo.GlobalOutputResource + .Builder, + com.google.cloud.visionai.v1.Application.ApplicationRuntimeInfo + .GlobalOutputResourceOrBuilder> + globalOutputResourcesBuilder_; + + /** + * + * + *
+       * Globally created resources like warehouse dataschemas.
+       * 
+ * + * + * repeated .google.cloud.visionai.v1.Application.ApplicationRuntimeInfo.GlobalOutputResource global_output_resources = 3; + * + */ + public java.util.List< + com.google.cloud.visionai.v1.Application.ApplicationRuntimeInfo.GlobalOutputResource> + getGlobalOutputResourcesList() { + if (globalOutputResourcesBuilder_ == null) { + return java.util.Collections.unmodifiableList(globalOutputResources_); + } else { + return globalOutputResourcesBuilder_.getMessageList(); + } + } + /** + * + * + *
+       * Globally created resources like warehouse dataschemas.
+       * 
+ * + * + * repeated .google.cloud.visionai.v1.Application.ApplicationRuntimeInfo.GlobalOutputResource global_output_resources = 3; + * + */ + public int getGlobalOutputResourcesCount() { + if (globalOutputResourcesBuilder_ == null) { + return globalOutputResources_.size(); + } else { + return globalOutputResourcesBuilder_.getCount(); + } + } + /** + * + * + *
+       * Globally created resources like warehouse dataschemas.
+       * 
+ * + * + * repeated .google.cloud.visionai.v1.Application.ApplicationRuntimeInfo.GlobalOutputResource global_output_resources = 3; + * + */ + public com.google.cloud.visionai.v1.Application.ApplicationRuntimeInfo.GlobalOutputResource + getGlobalOutputResources(int index) { + if (globalOutputResourcesBuilder_ == null) { + return globalOutputResources_.get(index); + } else { + return globalOutputResourcesBuilder_.getMessage(index); + } + } + /** + * + * + *
+       * Globally created resources like warehouse dataschemas.
+       * 
+ * + * + * repeated .google.cloud.visionai.v1.Application.ApplicationRuntimeInfo.GlobalOutputResource global_output_resources = 3; + * + */ + public Builder setGlobalOutputResources( + int index, + com.google.cloud.visionai.v1.Application.ApplicationRuntimeInfo.GlobalOutputResource + value) { + if (globalOutputResourcesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureGlobalOutputResourcesIsMutable(); + globalOutputResources_.set(index, value); + onChanged(); + } else { + globalOutputResourcesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+       * Globally created resources like warehouse dataschemas.
+       * 
+ * + * + * repeated .google.cloud.visionai.v1.Application.ApplicationRuntimeInfo.GlobalOutputResource global_output_resources = 3; + * + */ + public Builder setGlobalOutputResources( + int index, + com.google.cloud.visionai.v1.Application.ApplicationRuntimeInfo.GlobalOutputResource + .Builder + builderForValue) { + if (globalOutputResourcesBuilder_ == null) { + ensureGlobalOutputResourcesIsMutable(); + globalOutputResources_.set(index, builderForValue.build()); + onChanged(); + } else { + globalOutputResourcesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Globally created resources like warehouse dataschemas.
+       * 
+ * + * + * repeated .google.cloud.visionai.v1.Application.ApplicationRuntimeInfo.GlobalOutputResource global_output_resources = 3; + * + */ + public Builder addGlobalOutputResources( + com.google.cloud.visionai.v1.Application.ApplicationRuntimeInfo.GlobalOutputResource + value) { + if (globalOutputResourcesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureGlobalOutputResourcesIsMutable(); + globalOutputResources_.add(value); + onChanged(); + } else { + globalOutputResourcesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+       * Globally created resources like warehouse dataschemas.
+       * 
+ * + * + * repeated .google.cloud.visionai.v1.Application.ApplicationRuntimeInfo.GlobalOutputResource global_output_resources = 3; + * + */ + public Builder addGlobalOutputResources( + int index, + com.google.cloud.visionai.v1.Application.ApplicationRuntimeInfo.GlobalOutputResource + value) { + if (globalOutputResourcesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureGlobalOutputResourcesIsMutable(); + globalOutputResources_.add(index, value); + onChanged(); + } else { + globalOutputResourcesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+       * Globally created resources like warehouse dataschemas.
+       * 
+ * + * + * repeated .google.cloud.visionai.v1.Application.ApplicationRuntimeInfo.GlobalOutputResource global_output_resources = 3; + * + */ + public Builder addGlobalOutputResources( + com.google.cloud.visionai.v1.Application.ApplicationRuntimeInfo.GlobalOutputResource + .Builder + builderForValue) { + if (globalOutputResourcesBuilder_ == null) { + ensureGlobalOutputResourcesIsMutable(); + globalOutputResources_.add(builderForValue.build()); + onChanged(); + } else { + globalOutputResourcesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Globally created resources like warehouse dataschemas.
+       * 
+ * + * + * repeated .google.cloud.visionai.v1.Application.ApplicationRuntimeInfo.GlobalOutputResource global_output_resources = 3; + * + */ + public Builder addGlobalOutputResources( + int index, + com.google.cloud.visionai.v1.Application.ApplicationRuntimeInfo.GlobalOutputResource + .Builder + builderForValue) { + if (globalOutputResourcesBuilder_ == null) { + ensureGlobalOutputResourcesIsMutable(); + globalOutputResources_.add(index, builderForValue.build()); + onChanged(); + } else { + globalOutputResourcesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Globally created resources like warehouse dataschemas.
+       * 
+ * + * + * repeated .google.cloud.visionai.v1.Application.ApplicationRuntimeInfo.GlobalOutputResource global_output_resources = 3; + * + */ + public Builder addAllGlobalOutputResources( + java.lang.Iterable< + ? extends + com.google.cloud.visionai.v1.Application.ApplicationRuntimeInfo + .GlobalOutputResource> + values) { + if (globalOutputResourcesBuilder_ == null) { + ensureGlobalOutputResourcesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, globalOutputResources_); + onChanged(); + } else { + globalOutputResourcesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+       * Globally created resources like warehouse dataschemas.
+       * 
+ * + * + * repeated .google.cloud.visionai.v1.Application.ApplicationRuntimeInfo.GlobalOutputResource global_output_resources = 3; + * + */ + public Builder clearGlobalOutputResources() { + if (globalOutputResourcesBuilder_ == null) { + globalOutputResources_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + globalOutputResourcesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+       * Globally created resources like warehouse dataschemas.
+       * 
+ * + * + * repeated .google.cloud.visionai.v1.Application.ApplicationRuntimeInfo.GlobalOutputResource global_output_resources = 3; + * + */ + public Builder removeGlobalOutputResources(int index) { + if (globalOutputResourcesBuilder_ == null) { + ensureGlobalOutputResourcesIsMutable(); + globalOutputResources_.remove(index); + onChanged(); + } else { + globalOutputResourcesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+       * Globally created resources like warehouse dataschemas.
+       * 
+ * + * + * repeated .google.cloud.visionai.v1.Application.ApplicationRuntimeInfo.GlobalOutputResource global_output_resources = 3; + * + */ + public com.google.cloud.visionai.v1.Application.ApplicationRuntimeInfo.GlobalOutputResource + .Builder + getGlobalOutputResourcesBuilder(int index) { + return getGlobalOutputResourcesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+       * Globally created resources like warehouse dataschemas.
+       * 
+ * + * + * repeated .google.cloud.visionai.v1.Application.ApplicationRuntimeInfo.GlobalOutputResource global_output_resources = 3; + * + */ + public com.google.cloud.visionai.v1.Application.ApplicationRuntimeInfo + .GlobalOutputResourceOrBuilder + getGlobalOutputResourcesOrBuilder(int index) { + if (globalOutputResourcesBuilder_ == null) { + return globalOutputResources_.get(index); + } else { + return globalOutputResourcesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+       * Globally created resources like warehouse dataschemas.
+       * 
+ * + * + * repeated .google.cloud.visionai.v1.Application.ApplicationRuntimeInfo.GlobalOutputResource global_output_resources = 3; + * + */ + public java.util.List< + ? extends + com.google.cloud.visionai.v1.Application.ApplicationRuntimeInfo + .GlobalOutputResourceOrBuilder> + getGlobalOutputResourcesOrBuilderList() { + if (globalOutputResourcesBuilder_ != null) { + return globalOutputResourcesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(globalOutputResources_); + } + } + /** + * + * + *
+       * Globally created resources like warehouse dataschemas.
+       * 
+ * + * + * repeated .google.cloud.visionai.v1.Application.ApplicationRuntimeInfo.GlobalOutputResource global_output_resources = 3; + * + */ + public com.google.cloud.visionai.v1.Application.ApplicationRuntimeInfo.GlobalOutputResource + .Builder + addGlobalOutputResourcesBuilder() { + return getGlobalOutputResourcesFieldBuilder() + .addBuilder( + com.google.cloud.visionai.v1.Application.ApplicationRuntimeInfo.GlobalOutputResource + .getDefaultInstance()); + } + /** + * + * + *
+       * Globally created resources like warehouse dataschemas.
+       * 
+ * + * + * repeated .google.cloud.visionai.v1.Application.ApplicationRuntimeInfo.GlobalOutputResource global_output_resources = 3; + * + */ + public com.google.cloud.visionai.v1.Application.ApplicationRuntimeInfo.GlobalOutputResource + .Builder + addGlobalOutputResourcesBuilder(int index) { + return getGlobalOutputResourcesFieldBuilder() + .addBuilder( + index, + com.google.cloud.visionai.v1.Application.ApplicationRuntimeInfo.GlobalOutputResource + .getDefaultInstance()); + } + /** + * + * + *
+       * Globally created resources like warehouse dataschemas.
+       * 
+ * + * + * repeated .google.cloud.visionai.v1.Application.ApplicationRuntimeInfo.GlobalOutputResource global_output_resources = 3; + * + */ + public java.util.List< + com.google.cloud.visionai.v1.Application.ApplicationRuntimeInfo.GlobalOutputResource + .Builder> + getGlobalOutputResourcesBuilderList() { + return getGlobalOutputResourcesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.visionai.v1.Application.ApplicationRuntimeInfo.GlobalOutputResource, + com.google.cloud.visionai.v1.Application.ApplicationRuntimeInfo.GlobalOutputResource + .Builder, + com.google.cloud.visionai.v1.Application.ApplicationRuntimeInfo + .GlobalOutputResourceOrBuilder> + getGlobalOutputResourcesFieldBuilder() { + if (globalOutputResourcesBuilder_ == null) { + globalOutputResourcesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.visionai.v1.Application.ApplicationRuntimeInfo + .GlobalOutputResource, + com.google.cloud.visionai.v1.Application.ApplicationRuntimeInfo + .GlobalOutputResource.Builder, + com.google.cloud.visionai.v1.Application.ApplicationRuntimeInfo + .GlobalOutputResourceOrBuilder>( + globalOutputResources_, + ((bitField0_ & 0x00000002) != 0), + getParentForChildren(), + isClean()); + globalOutputResources_ = null; + } + return globalOutputResourcesBuilder_; + } + + private com.google.cloud.visionai.v1.Application.ApplicationRuntimeInfo.MonitoringConfig + monitoringConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.Application.ApplicationRuntimeInfo.MonitoringConfig, + com.google.cloud.visionai.v1.Application.ApplicationRuntimeInfo.MonitoringConfig + .Builder, + com.google.cloud.visionai.v1.Application.ApplicationRuntimeInfo + .MonitoringConfigOrBuilder> + monitoringConfigBuilder_; + /** + * + * + *
+       * Monitoring-related configuration for this application.
+       * 
+ * + * + * .google.cloud.visionai.v1.Application.ApplicationRuntimeInfo.MonitoringConfig monitoring_config = 4; + * + * + * @return Whether the monitoringConfig field is set. + */ + public boolean hasMonitoringConfig() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+       * Monitoring-related configuration for this application.
+       * 
+ * + * + * .google.cloud.visionai.v1.Application.ApplicationRuntimeInfo.MonitoringConfig monitoring_config = 4; + * + * + * @return The monitoringConfig. + */ + public com.google.cloud.visionai.v1.Application.ApplicationRuntimeInfo.MonitoringConfig + getMonitoringConfig() { + if (monitoringConfigBuilder_ == null) { + return monitoringConfig_ == null + ? com.google.cloud.visionai.v1.Application.ApplicationRuntimeInfo.MonitoringConfig + .getDefaultInstance() + : monitoringConfig_; + } else { + return monitoringConfigBuilder_.getMessage(); + } + } + /** + * + * + *
+       * Monitoring-related configuration for this application.
+       * 
+ * + * + * .google.cloud.visionai.v1.Application.ApplicationRuntimeInfo.MonitoringConfig monitoring_config = 4; + * + */ + public Builder setMonitoringConfig( + com.google.cloud.visionai.v1.Application.ApplicationRuntimeInfo.MonitoringConfig value) { + if (monitoringConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + monitoringConfig_ = value; + } else { + monitoringConfigBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+       * Monitoring-related configuration for this application.
+       * 
+ * + * + * .google.cloud.visionai.v1.Application.ApplicationRuntimeInfo.MonitoringConfig monitoring_config = 4; + * + */ + public Builder setMonitoringConfig( + com.google.cloud.visionai.v1.Application.ApplicationRuntimeInfo.MonitoringConfig.Builder + builderForValue) { + if (monitoringConfigBuilder_ == null) { + monitoringConfig_ = builderForValue.build(); + } else { + monitoringConfigBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+       * Monitoring-related configuration for this application.
+       * 
+ * + * + * .google.cloud.visionai.v1.Application.ApplicationRuntimeInfo.MonitoringConfig monitoring_config = 4; + * + */ + public Builder mergeMonitoringConfig( + com.google.cloud.visionai.v1.Application.ApplicationRuntimeInfo.MonitoringConfig value) { + if (monitoringConfigBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && monitoringConfig_ != null + && monitoringConfig_ + != com.google.cloud.visionai.v1.Application.ApplicationRuntimeInfo + .MonitoringConfig.getDefaultInstance()) { + getMonitoringConfigBuilder().mergeFrom(value); + } else { + monitoringConfig_ = value; + } + } else { + monitoringConfigBuilder_.mergeFrom(value); + } + if (monitoringConfig_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + /** + * + * + *
+       * Monitoring-related configuration for this application.
+       * 
+ * + * + * .google.cloud.visionai.v1.Application.ApplicationRuntimeInfo.MonitoringConfig monitoring_config = 4; + * + */ + public Builder clearMonitoringConfig() { + bitField0_ = (bitField0_ & ~0x00000004); + monitoringConfig_ = null; + if (monitoringConfigBuilder_ != null) { + monitoringConfigBuilder_.dispose(); + monitoringConfigBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+       * Monitoring-related configuration for this application.
+       * 
+ * + * + * .google.cloud.visionai.v1.Application.ApplicationRuntimeInfo.MonitoringConfig monitoring_config = 4; + * + */ + public com.google.cloud.visionai.v1.Application.ApplicationRuntimeInfo.MonitoringConfig + .Builder + getMonitoringConfigBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getMonitoringConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Monitoring-related configuration for this application.
+       * 
+ * + * + * .google.cloud.visionai.v1.Application.ApplicationRuntimeInfo.MonitoringConfig monitoring_config = 4; + * + */ + public com.google.cloud.visionai.v1.Application.ApplicationRuntimeInfo + .MonitoringConfigOrBuilder + getMonitoringConfigOrBuilder() { + if (monitoringConfigBuilder_ != null) { + return monitoringConfigBuilder_.getMessageOrBuilder(); + } else { + return monitoringConfig_ == null + ? com.google.cloud.visionai.v1.Application.ApplicationRuntimeInfo.MonitoringConfig + .getDefaultInstance() + : monitoringConfig_; + } + } + /** + * + * + *
+       * Monitoring-related configuration for this application.
+       * 
+ * + * + * .google.cloud.visionai.v1.Application.ApplicationRuntimeInfo.MonitoringConfig monitoring_config = 4; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.Application.ApplicationRuntimeInfo.MonitoringConfig, + com.google.cloud.visionai.v1.Application.ApplicationRuntimeInfo.MonitoringConfig + .Builder, + com.google.cloud.visionai.v1.Application.ApplicationRuntimeInfo + .MonitoringConfigOrBuilder> + getMonitoringConfigFieldBuilder() { + if (monitoringConfigBuilder_ == null) { + monitoringConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.Application.ApplicationRuntimeInfo.MonitoringConfig, + com.google.cloud.visionai.v1.Application.ApplicationRuntimeInfo.MonitoringConfig + .Builder, + com.google.cloud.visionai.v1.Application.ApplicationRuntimeInfo + .MonitoringConfigOrBuilder>( + getMonitoringConfig(), getParentForChildren(), isClean()); + monitoringConfig_ = null; + } + return monitoringConfigBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.Application.ApplicationRuntimeInfo) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.Application.ApplicationRuntimeInfo) + private static final com.google.cloud.visionai.v1.Application.ApplicationRuntimeInfo + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.Application.ApplicationRuntimeInfo(); + } + + public static com.google.cloud.visionai.v1.Application.ApplicationRuntimeInfo + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ApplicationRuntimeInfo parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.Application.ApplicationRuntimeInfo + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int bitField0_; + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * name of resource
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + 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(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * name of resource
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CREATE_TIME_FIELD_NUMBER = 2; + private com.google.protobuf.Timestamp createTime_; + /** + * + * + *
+   * Output only. [Output only] Create timestamp
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * Output only. [Output only] Create timestamp
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + /** + * + * + *
+   * Output only. [Output only] Create timestamp
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + + public static final int UPDATE_TIME_FIELD_NUMBER = 3; + private com.google.protobuf.Timestamp updateTime_; + /** + * + * + *
+   * Output only. [Output only] Update timestamp
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + @java.lang.Override + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+   * Output only. [Output only] Update timestamp
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getUpdateTime() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + /** + * + * + *
+   * Output only. [Output only] Update timestamp
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + + public static final int LABELS_FIELD_NUMBER = 4; + + private static final class LabelsDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_Application_LabelsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + + @SuppressWarnings("serial") + private com.google.protobuf.MapField labels_; + + private com.google.protobuf.MapField internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + /** + * + * + *
+   * Labels as key value pairs
+   * 
+ * + * map<string, string> labels = 4; + */ + @java.lang.Override + public boolean containsLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetLabels().getMap().containsKey(key); + } + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + /** + * + * + *
+   * Labels as key value pairs
+   * 
+ * + * map<string, string> labels = 4; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + * + * + *
+   * Labels as key value pairs
+   * 
+ * + * map<string, string> labels = 4; + */ + @java.lang.Override + public /* nullable */ java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+   * Labels as key value pairs
+   * 
+ * + * map<string, string> labels = 4; + */ + @java.lang.Override + public java.lang.String getLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int DISPLAY_NAME_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object displayName_ = ""; + /** + * + * + *
+   * Required. A user friendly display name for the solution.
+   * 
+ * + * string display_name = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The displayName. + */ + @java.lang.Override + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + 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(); + displayName_ = s; + return s; + } + } + /** + * + * + *
+   * Required. A user friendly display name for the solution.
+   * 
+ * + * string display_name = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for displayName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DESCRIPTION_FIELD_NUMBER = 6; + + @SuppressWarnings("serial") + private volatile java.lang.Object description_ = ""; + /** + * + * + *
+   * A description for this application.
+   * 
+ * + * string description = 6; + * + * @return The description. + */ + @java.lang.Override + 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; + } + } + /** + * + * + *
+   * A description for this application.
+   * 
+ * + * string description = 6; + * + * @return The bytes for description. + */ + @java.lang.Override + 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 APPLICATION_CONFIGS_FIELD_NUMBER = 7; + private com.google.cloud.visionai.v1.ApplicationConfigs applicationConfigs_; + /** + * + * + *
+   * Application graph configuration.
+   * 
+ * + * .google.cloud.visionai.v1.ApplicationConfigs application_configs = 7; + * + * @return Whether the applicationConfigs field is set. + */ + @java.lang.Override + public boolean hasApplicationConfigs() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+   * Application graph configuration.
+   * 
+ * + * .google.cloud.visionai.v1.ApplicationConfigs application_configs = 7; + * + * @return The applicationConfigs. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.ApplicationConfigs getApplicationConfigs() { + return applicationConfigs_ == null + ? com.google.cloud.visionai.v1.ApplicationConfigs.getDefaultInstance() + : applicationConfigs_; + } + /** + * + * + *
+   * Application graph configuration.
+   * 
+ * + * .google.cloud.visionai.v1.ApplicationConfigs application_configs = 7; + */ + @java.lang.Override + public com.google.cloud.visionai.v1.ApplicationConfigsOrBuilder getApplicationConfigsOrBuilder() { + return applicationConfigs_ == null + ? com.google.cloud.visionai.v1.ApplicationConfigs.getDefaultInstance() + : applicationConfigs_; + } + + public static final int RUNTIME_INFO_FIELD_NUMBER = 8; + private com.google.cloud.visionai.v1.Application.ApplicationRuntimeInfo runtimeInfo_; + /** + * + * + *
+   * Output only. Application graph runtime info. Only exists when application
+   * state equals to DEPLOYED.
+   * 
+ * + * + * .google.cloud.visionai.v1.Application.ApplicationRuntimeInfo runtime_info = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the runtimeInfo field is set. + */ + @java.lang.Override + public boolean hasRuntimeInfo() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + * + * + *
+   * Output only. Application graph runtime info. Only exists when application
+   * state equals to DEPLOYED.
+   * 
+ * + * + * .google.cloud.visionai.v1.Application.ApplicationRuntimeInfo runtime_info = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The runtimeInfo. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.Application.ApplicationRuntimeInfo getRuntimeInfo() { + return runtimeInfo_ == null + ? com.google.cloud.visionai.v1.Application.ApplicationRuntimeInfo.getDefaultInstance() + : runtimeInfo_; + } + /** + * + * + *
+   * Output only. Application graph runtime info. Only exists when application
+   * state equals to DEPLOYED.
+   * 
+ * + * + * .google.cloud.visionai.v1.Application.ApplicationRuntimeInfo runtime_info = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.visionai.v1.Application.ApplicationRuntimeInfoOrBuilder + getRuntimeInfoOrBuilder() { + return runtimeInfo_ == null + ? com.google.cloud.visionai.v1.Application.ApplicationRuntimeInfo.getDefaultInstance() + : runtimeInfo_; + } + + public static final int STATE_FIELD_NUMBER = 9; + private int state_ = 0; + /** + * + * + *
+   * Output only. State of the application.
+   * 
+ * + * + * .google.cloud.visionai.v1.Application.State state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + /** + * + * + *
+   * Output only. State of the application.
+   * 
+ * + * + * .google.cloud.visionai.v1.Application.State state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.Application.State getState() { + com.google.cloud.visionai.v1.Application.State result = + com.google.cloud.visionai.v1.Application.State.forNumber(state_); + return result == null ? com.google.cloud.visionai.v1.Application.State.UNRECOGNIZED : result; + } + + public static final int BILLING_MODE_FIELD_NUMBER = 12; + private int billingMode_ = 0; + /** + * + * + *
+   * Billing mode of the application.
+   * 
+ * + * .google.cloud.visionai.v1.Application.BillingMode billing_mode = 12; + * + * @return The enum numeric value on the wire for billingMode. + */ + @java.lang.Override + public int getBillingModeValue() { + return billingMode_; + } + /** + * + * + *
+   * Billing mode of the application.
+   * 
+ * + * .google.cloud.visionai.v1.Application.BillingMode billing_mode = 12; + * + * @return The billingMode. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.Application.BillingMode getBillingMode() { + com.google.cloud.visionai.v1.Application.BillingMode result = + com.google.cloud.visionai.v1.Application.BillingMode.forNumber(billingMode_); + return result == null + ? com.google.cloud.visionai.v1.Application.BillingMode.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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getCreateTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(3, getUpdateTime()); + } + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 4); + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, displayName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, description_); + } + if (((bitField0_ & 0x00000004) != 0)) { + output.writeMessage(7, getApplicationConfigs()); + } + if (((bitField0_ & 0x00000008) != 0)) { + output.writeMessage(8, getRuntimeInfo()); + } + if (state_ != com.google.cloud.visionai.v1.Application.State.STATE_UNSPECIFIED.getNumber()) { + output.writeEnum(9, state_); + } + if (billingMode_ + != com.google.cloud.visionai.v1.Application.BillingMode.BILLING_MODE_UNSPECIFIED + .getNumber()) { + output.writeEnum(12, billingMode_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getCreateTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getUpdateTime()); + } + for (java.util.Map.Entry entry : + internalGetLabels().getMap().entrySet()) { + com.google.protobuf.MapEntry labels__ = + LabelsDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, labels__); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, displayName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, description_); + } + if (((bitField0_ & 0x00000004) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getApplicationConfigs()); + } + if (((bitField0_ & 0x00000008) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(8, getRuntimeInfo()); + } + if (state_ != com.google.cloud.visionai.v1.Application.State.STATE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(9, state_); + } + if (billingMode_ + != com.google.cloud.visionai.v1.Application.BillingMode.BILLING_MODE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(12, billingMode_); + } + size += getUnknownFields().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.visionai.v1.Application)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.Application other = (com.google.cloud.visionai.v1.Application) obj; + + if (!getName().equals(other.getName())) return false; + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime().equals(other.getCreateTime())) return false; + } + if (hasUpdateTime() != other.hasUpdateTime()) return false; + if (hasUpdateTime()) { + if (!getUpdateTime().equals(other.getUpdateTime())) return false; + } + if (!internalGetLabels().equals(other.internalGetLabels())) return false; + if (!getDisplayName().equals(other.getDisplayName())) return false; + if (!getDescription().equals(other.getDescription())) return false; + if (hasApplicationConfigs() != other.hasApplicationConfigs()) return false; + if (hasApplicationConfigs()) { + if (!getApplicationConfigs().equals(other.getApplicationConfigs())) return false; + } + if (hasRuntimeInfo() != other.hasRuntimeInfo()) return false; + if (hasRuntimeInfo()) { + if (!getRuntimeInfo().equals(other.getRuntimeInfo())) return false; + } + if (state_ != other.state_) return false; + if (billingMode_ != other.billingMode_) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasUpdateTime()) { + hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getUpdateTime().hashCode(); + } + if (!internalGetLabels().getMap().isEmpty()) { + hash = (37 * hash) + LABELS_FIELD_NUMBER; + hash = (53 * hash) + internalGetLabels().hashCode(); + } + hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDisplayName().hashCode(); + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + if (hasApplicationConfigs()) { + hash = (37 * hash) + APPLICATION_CONFIGS_FIELD_NUMBER; + hash = (53 * hash) + getApplicationConfigs().hashCode(); + } + if (hasRuntimeInfo()) { + hash = (37 * hash) + RUNTIME_INFO_FIELD_NUMBER; + hash = (53 * hash) + getRuntimeInfo().hashCode(); + } + hash = (37 * hash) + STATE_FIELD_NUMBER; + hash = (53 * hash) + state_; + hash = (37 * hash) + BILLING_MODE_FIELD_NUMBER; + hash = (53 * hash) + billingMode_; + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.Application parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.Application 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.visionai.v1.Application parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.Application 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.visionai.v1.Application parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.Application parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.Application parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.Application 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.visionai.v1.Application parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.Application 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.visionai.v1.Application parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.Application 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.visionai.v1.Application 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; + } + /** + * + * + *
+   * Message describing Application object
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.Application} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.Application) + com.google.cloud.visionai.v1.ApplicationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_Application_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 4: + return internalGetLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( + int number) { + switch (number) { + case 4: + return internalGetMutableLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_Application_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.Application.class, + com.google.cloud.visionai.v1.Application.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.Application.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getCreateTimeFieldBuilder(); + getUpdateTimeFieldBuilder(); + getApplicationConfigsFieldBuilder(); + getRuntimeInfoFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + internalGetMutableLabels().clear(); + displayName_ = ""; + description_ = ""; + applicationConfigs_ = null; + if (applicationConfigsBuilder_ != null) { + applicationConfigsBuilder_.dispose(); + applicationConfigsBuilder_ = null; + } + runtimeInfo_ = null; + if (runtimeInfoBuilder_ != null) { + runtimeInfoBuilder_.dispose(); + runtimeInfoBuilder_ = null; + } + state_ = 0; + billingMode_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_Application_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.Application getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.Application.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.Application build() { + com.google.cloud.visionai.v1.Application result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.Application buildPartial() { + com.google.cloud.visionai.v1.Application result = + new com.google.cloud.visionai.v1.Application(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.visionai.v1.Application result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.updateTime_ = updateTimeBuilder_ == null ? updateTime_ : updateTimeBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.labels_ = internalGetLabels(); + result.labels_.makeImmutable(); + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.displayName_ = displayName_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.description_ = description_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.applicationConfigs_ = + applicationConfigsBuilder_ == null + ? applicationConfigs_ + : applicationConfigsBuilder_.build(); + to_bitField0_ |= 0x00000004; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.runtimeInfo_ = + runtimeInfoBuilder_ == null ? runtimeInfo_ : runtimeInfoBuilder_.build(); + to_bitField0_ |= 0x00000008; + } + if (((from_bitField0_ & 0x00000100) != 0)) { + result.state_ = state_; + } + if (((from_bitField0_ & 0x00000200) != 0)) { + result.billingMode_ = billingMode_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.Application) { + return mergeFrom((com.google.cloud.visionai.v1.Application) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.Application other) { + if (other == com.google.cloud.visionai.v1.Application.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + internalGetMutableLabels().mergeFrom(other.internalGetLabels()); + bitField0_ |= 0x00000008; + if (!other.getDisplayName().isEmpty()) { + displayName_ = other.displayName_; + bitField0_ |= 0x00000010; + onChanged(); + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + bitField0_ |= 0x00000020; + onChanged(); + } + if (other.hasApplicationConfigs()) { + mergeApplicationConfigs(other.getApplicationConfigs()); + } + if (other.hasRuntimeInfo()) { + mergeRuntimeInfo(other.getRuntimeInfo()); + } + if (other.state_ != 0) { + setStateValue(other.getStateValue()); + } + if (other.billingMode_ != 0) { + setBillingModeValue(other.getBillingModeValue()); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage(getUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + com.google.protobuf.MapEntry labels__ = + input.readMessage( + LabelsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableLabels() + .getMutableMap() + .put(labels__.getKey(), labels__.getValue()); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + displayName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 50: + { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case 50 + case 58: + { + input.readMessage( + getApplicationConfigsFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000040; + break; + } // case 58 + case 66: + { + input.readMessage(getRuntimeInfoFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000080; + break; + } // case 66 + case 72: + { + state_ = input.readEnum(); + bitField0_ |= 0x00000100; + break; + } // case 72 + case 96: + { + billingMode_ = input.readEnum(); + bitField0_ |= 0x00000200; + break; + } // case 96 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * name of resource
+     * 
+ * + * string name = 1; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * name of resource
+     * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * name of resource
+     * 
+ * + * string name = 1; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * name of resource
+     * 
+ * + * string name = 1; + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * name of resource
+     * 
+ * + * string name = 1; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + createTimeBuilder_; + /** + * + * + *
+     * Output only. [Output only] Create timestamp
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * Output only. [Output only] Create timestamp
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. [Output only] Create timestamp
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + } else { + createTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. [Output only] Create timestamp
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. [Output only] Create timestamp
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && createTime_ != null + && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getCreateTimeBuilder().mergeFrom(value); + } else { + createTime_ = value; + } + } else { + createTimeBuilder_.mergeFrom(value); + } + if (createTime_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Output only. [Output only] Create timestamp
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearCreateTime() { + bitField0_ = (bitField0_ & ~0x00000002); + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. [Output only] Create timestamp
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. [Output only] Create timestamp
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } + } + /** + * + * + *
+     * Output only. [Output only] Create timestamp
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), getParentForChildren(), isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private com.google.protobuf.Timestamp updateTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + updateTimeBuilder_; + /** + * + * + *
+     * Output only. [Output only] Update timestamp
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+     * Output only. [Output only] Update timestamp
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + public com.google.protobuf.Timestamp getUpdateTime() { + if (updateTimeBuilder_ == null) { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } else { + return updateTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. [Output only] Update timestamp
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateTime_ = value; + } else { + updateTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. [Output only] Update timestamp
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (updateTimeBuilder_ == null) { + updateTime_ = builderForValue.build(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. [Output only] Update timestamp
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && updateTime_ != null + && updateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getUpdateTimeBuilder().mergeFrom(value); + } else { + updateTime_ = value; + } + } else { + updateTimeBuilder_.mergeFrom(value); + } + if (updateTime_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Output only. [Output only] Update timestamp
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearUpdateTime() { + bitField0_ = (bitField0_ & ~0x00000004); + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. [Output only] Update timestamp
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getUpdateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. [Output only] Update timestamp
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + if (updateTimeBuilder_ != null) { + return updateTimeBuilder_.getMessageOrBuilder(); + } else { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } + } + /** + * + * + *
+     * Output only. [Output only] Update timestamp
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + 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_; + } + + private com.google.protobuf.MapField labels_; + + private com.google.protobuf.MapField internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + + private com.google.protobuf.MapField + internalGetMutableLabels() { + if (labels_ == null) { + labels_ = com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry); + } + if (!labels_.isMutable()) { + labels_ = labels_.copy(); + } + bitField0_ |= 0x00000008; + onChanged(); + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + /** + * + * + *
+     * Labels as key value pairs
+     * 
+ * + * map<string, string> labels = 4; + */ + @java.lang.Override + public boolean containsLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetLabels().getMap().containsKey(key); + } + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + /** + * + * + *
+     * Labels as key value pairs
+     * 
+ * + * map<string, string> labels = 4; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + * + * + *
+     * Labels as key value pairs
+     * 
+ * + * map<string, string> labels = 4; + */ + @java.lang.Override + public /* nullable */ java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+     * Labels as key value pairs
+     * 
+ * + * map<string, string> labels = 4; + */ + @java.lang.Override + public java.lang.String getLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearLabels() { + bitField0_ = (bitField0_ & ~0x00000008); + internalGetMutableLabels().getMutableMap().clear(); + return this; + } + /** + * + * + *
+     * Labels as key value pairs
+     * 
+ * + * map<string, string> labels = 4; + */ + public Builder removeLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + internalGetMutableLabels().getMutableMap().remove(key); + return this; + } + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableLabels() { + bitField0_ |= 0x00000008; + return internalGetMutableLabels().getMutableMap(); + } + /** + * + * + *
+     * Labels as key value pairs
+     * 
+ * + * map<string, string> labels = 4; + */ + public Builder putLabels(java.lang.String key, java.lang.String value) { + if (key == null) { + throw new NullPointerException("map key"); + } + if (value == null) { + throw new NullPointerException("map value"); + } + internalGetMutableLabels().getMutableMap().put(key, value); + bitField0_ |= 0x00000008; + return this; + } + /** + * + * + *
+     * Labels as key value pairs
+     * 
+ * + * map<string, string> labels = 4; + */ + public Builder putAllLabels(java.util.Map values) { + internalGetMutableLabels().getMutableMap().putAll(values); + bitField0_ |= 0x00000008; + return this; + } + + private java.lang.Object displayName_ = ""; + /** + * + * + *
+     * Required. A user friendly display name for the solution.
+     * 
+ * + * string display_name = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The displayName. + */ + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. A user friendly display name for the solution.
+     * 
+ * + * string display_name = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for displayName. + */ + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. A user friendly display name for the solution.
+     * 
+ * + * string display_name = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + displayName_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. A user friendly display name for the solution.
+     * 
+ * + * string display_name = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearDisplayName() { + displayName_ = getDefaultInstance().getDisplayName(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. A user friendly display name for the solution.
+     * 
+ * + * string display_name = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + displayName_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + private java.lang.Object description_ = ""; + /** + * + * + *
+     * A description for this application.
+     * 
+ * + * string description = 6; + * + * @return The description. + */ + 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; + } + } + /** + * + * + *
+     * A description for this application.
+     * 
+ * + * string description = 6; + * + * @return The bytes for description. + */ + 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; + } + } + /** + * + * + *
+     * A description for this application.
+     * 
+ * + * string description = 6; + * + * @param value The description to set. + * @return This builder for chaining. + */ + public Builder setDescription(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + description_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * A description for this application.
+     * 
+ * + * string description = 6; + * + * @return This builder for chaining. + */ + public Builder clearDescription() { + description_ = getDefaultInstance().getDescription(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + return this; + } + /** + * + * + *
+     * A description for this application.
+     * 
+ * + * string description = 6; + * + * @param value The bytes for description to set. + * @return This builder for chaining. + */ + public Builder setDescriptionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + description_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + private com.google.cloud.visionai.v1.ApplicationConfigs applicationConfigs_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.ApplicationConfigs, + com.google.cloud.visionai.v1.ApplicationConfigs.Builder, + com.google.cloud.visionai.v1.ApplicationConfigsOrBuilder> + applicationConfigsBuilder_; + /** + * + * + *
+     * Application graph configuration.
+     * 
+ * + * .google.cloud.visionai.v1.ApplicationConfigs application_configs = 7; + * + * @return Whether the applicationConfigs field is set. + */ + public boolean hasApplicationConfigs() { + return ((bitField0_ & 0x00000040) != 0); + } + /** + * + * + *
+     * Application graph configuration.
+     * 
+ * + * .google.cloud.visionai.v1.ApplicationConfigs application_configs = 7; + * + * @return The applicationConfigs. + */ + public com.google.cloud.visionai.v1.ApplicationConfigs getApplicationConfigs() { + if (applicationConfigsBuilder_ == null) { + return applicationConfigs_ == null + ? com.google.cloud.visionai.v1.ApplicationConfigs.getDefaultInstance() + : applicationConfigs_; + } else { + return applicationConfigsBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Application graph configuration.
+     * 
+ * + * .google.cloud.visionai.v1.ApplicationConfigs application_configs = 7; + */ + public Builder setApplicationConfigs(com.google.cloud.visionai.v1.ApplicationConfigs value) { + if (applicationConfigsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + applicationConfigs_ = value; + } else { + applicationConfigsBuilder_.setMessage(value); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * + * + *
+     * Application graph configuration.
+     * 
+ * + * .google.cloud.visionai.v1.ApplicationConfigs application_configs = 7; + */ + public Builder setApplicationConfigs( + com.google.cloud.visionai.v1.ApplicationConfigs.Builder builderForValue) { + if (applicationConfigsBuilder_ == null) { + applicationConfigs_ = builderForValue.build(); + } else { + applicationConfigsBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * + * + *
+     * Application graph configuration.
+     * 
+ * + * .google.cloud.visionai.v1.ApplicationConfigs application_configs = 7; + */ + public Builder mergeApplicationConfigs(com.google.cloud.visionai.v1.ApplicationConfigs value) { + if (applicationConfigsBuilder_ == null) { + if (((bitField0_ & 0x00000040) != 0) + && applicationConfigs_ != null + && applicationConfigs_ + != com.google.cloud.visionai.v1.ApplicationConfigs.getDefaultInstance()) { + getApplicationConfigsBuilder().mergeFrom(value); + } else { + applicationConfigs_ = value; + } + } else { + applicationConfigsBuilder_.mergeFrom(value); + } + if (applicationConfigs_ != null) { + bitField0_ |= 0x00000040; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Application graph configuration.
+     * 
+ * + * .google.cloud.visionai.v1.ApplicationConfigs application_configs = 7; + */ + public Builder clearApplicationConfigs() { + bitField0_ = (bitField0_ & ~0x00000040); + applicationConfigs_ = null; + if (applicationConfigsBuilder_ != null) { + applicationConfigsBuilder_.dispose(); + applicationConfigsBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Application graph configuration.
+     * 
+ * + * .google.cloud.visionai.v1.ApplicationConfigs application_configs = 7; + */ + public com.google.cloud.visionai.v1.ApplicationConfigs.Builder getApplicationConfigsBuilder() { + bitField0_ |= 0x00000040; + onChanged(); + return getApplicationConfigsFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Application graph configuration.
+     * 
+ * + * .google.cloud.visionai.v1.ApplicationConfigs application_configs = 7; + */ + public com.google.cloud.visionai.v1.ApplicationConfigsOrBuilder + getApplicationConfigsOrBuilder() { + if (applicationConfigsBuilder_ != null) { + return applicationConfigsBuilder_.getMessageOrBuilder(); + } else { + return applicationConfigs_ == null + ? com.google.cloud.visionai.v1.ApplicationConfigs.getDefaultInstance() + : applicationConfigs_; + } + } + /** + * + * + *
+     * Application graph configuration.
+     * 
+ * + * .google.cloud.visionai.v1.ApplicationConfigs application_configs = 7; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.ApplicationConfigs, + com.google.cloud.visionai.v1.ApplicationConfigs.Builder, + com.google.cloud.visionai.v1.ApplicationConfigsOrBuilder> + getApplicationConfigsFieldBuilder() { + if (applicationConfigsBuilder_ == null) { + applicationConfigsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.ApplicationConfigs, + com.google.cloud.visionai.v1.ApplicationConfigs.Builder, + com.google.cloud.visionai.v1.ApplicationConfigsOrBuilder>( + getApplicationConfigs(), getParentForChildren(), isClean()); + applicationConfigs_ = null; + } + return applicationConfigsBuilder_; + } + + private com.google.cloud.visionai.v1.Application.ApplicationRuntimeInfo runtimeInfo_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.Application.ApplicationRuntimeInfo, + com.google.cloud.visionai.v1.Application.ApplicationRuntimeInfo.Builder, + com.google.cloud.visionai.v1.Application.ApplicationRuntimeInfoOrBuilder> + runtimeInfoBuilder_; + /** + * + * + *
+     * Output only. Application graph runtime info. Only exists when application
+     * state equals to DEPLOYED.
+     * 
+ * + * + * .google.cloud.visionai.v1.Application.ApplicationRuntimeInfo runtime_info = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the runtimeInfo field is set. + */ + public boolean hasRuntimeInfo() { + return ((bitField0_ & 0x00000080) != 0); + } + /** + * + * + *
+     * Output only. Application graph runtime info. Only exists when application
+     * state equals to DEPLOYED.
+     * 
+ * + * + * .google.cloud.visionai.v1.Application.ApplicationRuntimeInfo runtime_info = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The runtimeInfo. + */ + public com.google.cloud.visionai.v1.Application.ApplicationRuntimeInfo getRuntimeInfo() { + if (runtimeInfoBuilder_ == null) { + return runtimeInfo_ == null + ? com.google.cloud.visionai.v1.Application.ApplicationRuntimeInfo.getDefaultInstance() + : runtimeInfo_; + } else { + return runtimeInfoBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Application graph runtime info. Only exists when application
+     * state equals to DEPLOYED.
+     * 
+ * + * + * .google.cloud.visionai.v1.Application.ApplicationRuntimeInfo runtime_info = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setRuntimeInfo( + com.google.cloud.visionai.v1.Application.ApplicationRuntimeInfo value) { + if (runtimeInfoBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + runtimeInfo_ = value; + } else { + runtimeInfoBuilder_.setMessage(value); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Application graph runtime info. Only exists when application
+     * state equals to DEPLOYED.
+     * 
+ * + * + * .google.cloud.visionai.v1.Application.ApplicationRuntimeInfo runtime_info = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setRuntimeInfo( + com.google.cloud.visionai.v1.Application.ApplicationRuntimeInfo.Builder builderForValue) { + if (runtimeInfoBuilder_ == null) { + runtimeInfo_ = builderForValue.build(); + } else { + runtimeInfoBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Application graph runtime info. Only exists when application
+     * state equals to DEPLOYED.
+     * 
+ * + * + * .google.cloud.visionai.v1.Application.ApplicationRuntimeInfo runtime_info = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeRuntimeInfo( + com.google.cloud.visionai.v1.Application.ApplicationRuntimeInfo value) { + if (runtimeInfoBuilder_ == null) { + if (((bitField0_ & 0x00000080) != 0) + && runtimeInfo_ != null + && runtimeInfo_ + != com.google.cloud.visionai.v1.Application.ApplicationRuntimeInfo + .getDefaultInstance()) { + getRuntimeInfoBuilder().mergeFrom(value); + } else { + runtimeInfo_ = value; + } + } else { + runtimeInfoBuilder_.mergeFrom(value); + } + if (runtimeInfo_ != null) { + bitField0_ |= 0x00000080; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Output only. Application graph runtime info. Only exists when application
+     * state equals to DEPLOYED.
+     * 
+ * + * + * .google.cloud.visionai.v1.Application.ApplicationRuntimeInfo runtime_info = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearRuntimeInfo() { + bitField0_ = (bitField0_ & ~0x00000080); + runtimeInfo_ = null; + if (runtimeInfoBuilder_ != null) { + runtimeInfoBuilder_.dispose(); + runtimeInfoBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Application graph runtime info. Only exists when application
+     * state equals to DEPLOYED.
+     * 
+ * + * + * .google.cloud.visionai.v1.Application.ApplicationRuntimeInfo runtime_info = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.visionai.v1.Application.ApplicationRuntimeInfo.Builder + getRuntimeInfoBuilder() { + bitField0_ |= 0x00000080; + onChanged(); + return getRuntimeInfoFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Application graph runtime info. Only exists when application
+     * state equals to DEPLOYED.
+     * 
+ * + * + * .google.cloud.visionai.v1.Application.ApplicationRuntimeInfo runtime_info = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.visionai.v1.Application.ApplicationRuntimeInfoOrBuilder + getRuntimeInfoOrBuilder() { + if (runtimeInfoBuilder_ != null) { + return runtimeInfoBuilder_.getMessageOrBuilder(); + } else { + return runtimeInfo_ == null + ? com.google.cloud.visionai.v1.Application.ApplicationRuntimeInfo.getDefaultInstance() + : runtimeInfo_; + } + } + /** + * + * + *
+     * Output only. Application graph runtime info. Only exists when application
+     * state equals to DEPLOYED.
+     * 
+ * + * + * .google.cloud.visionai.v1.Application.ApplicationRuntimeInfo runtime_info = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.Application.ApplicationRuntimeInfo, + com.google.cloud.visionai.v1.Application.ApplicationRuntimeInfo.Builder, + com.google.cloud.visionai.v1.Application.ApplicationRuntimeInfoOrBuilder> + getRuntimeInfoFieldBuilder() { + if (runtimeInfoBuilder_ == null) { + runtimeInfoBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.Application.ApplicationRuntimeInfo, + com.google.cloud.visionai.v1.Application.ApplicationRuntimeInfo.Builder, + com.google.cloud.visionai.v1.Application.ApplicationRuntimeInfoOrBuilder>( + getRuntimeInfo(), getParentForChildren(), isClean()); + runtimeInfo_ = null; + } + return runtimeInfoBuilder_; + } + + private int state_ = 0; + /** + * + * + *
+     * Output only. State of the application.
+     * 
+ * + * + * .google.cloud.visionai.v1.Application.State state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + /** + * + * + *
+     * Output only. State of the application.
+     * 
+ * + * + * .google.cloud.visionai.v1.Application.State state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The enum numeric value on the wire for state to set. + * @return This builder for chaining. + */ + public Builder setStateValue(int value) { + state_ = value; + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. State of the application.
+     * 
+ * + * + * .google.cloud.visionai.v1.Application.State state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.Application.State getState() { + com.google.cloud.visionai.v1.Application.State result = + com.google.cloud.visionai.v1.Application.State.forNumber(state_); + return result == null ? com.google.cloud.visionai.v1.Application.State.UNRECOGNIZED : result; + } + /** + * + * + *
+     * Output only. State of the application.
+     * 
+ * + * + * .google.cloud.visionai.v1.Application.State state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The state to set. + * @return This builder for chaining. + */ + public Builder setState(com.google.cloud.visionai.v1.Application.State value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000100; + state_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. State of the application.
+     * 
+ * + * + * .google.cloud.visionai.v1.Application.State state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearState() { + bitField0_ = (bitField0_ & ~0x00000100); + state_ = 0; + onChanged(); + return this; + } + + private int billingMode_ = 0; + /** + * + * + *
+     * Billing mode of the application.
+     * 
+ * + * .google.cloud.visionai.v1.Application.BillingMode billing_mode = 12; + * + * @return The enum numeric value on the wire for billingMode. + */ + @java.lang.Override + public int getBillingModeValue() { + return billingMode_; + } + /** + * + * + *
+     * Billing mode of the application.
+     * 
+ * + * .google.cloud.visionai.v1.Application.BillingMode billing_mode = 12; + * + * @param value The enum numeric value on the wire for billingMode to set. + * @return This builder for chaining. + */ + public Builder setBillingModeValue(int value) { + billingMode_ = value; + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + /** + * + * + *
+     * Billing mode of the application.
+     * 
+ * + * .google.cloud.visionai.v1.Application.BillingMode billing_mode = 12; + * + * @return The billingMode. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.Application.BillingMode getBillingMode() { + com.google.cloud.visionai.v1.Application.BillingMode result = + com.google.cloud.visionai.v1.Application.BillingMode.forNumber(billingMode_); + return result == null + ? com.google.cloud.visionai.v1.Application.BillingMode.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Billing mode of the application.
+     * 
+ * + * .google.cloud.visionai.v1.Application.BillingMode billing_mode = 12; + * + * @param value The billingMode to set. + * @return This builder for chaining. + */ + public Builder setBillingMode(com.google.cloud.visionai.v1.Application.BillingMode value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000200; + billingMode_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Billing mode of the application.
+     * 
+ * + * .google.cloud.visionai.v1.Application.BillingMode billing_mode = 12; + * + * @return This builder for chaining. + */ + public Builder clearBillingMode() { + bitField0_ = (bitField0_ & ~0x00000200); + billingMode_ = 0; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.Application) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.Application) + private static final com.google.cloud.visionai.v1.Application DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.Application(); + } + + public static com.google.cloud.visionai.v1.Application getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Application parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.Application getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ApplicationConfigs.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ApplicationConfigs.java new file mode 100644 index 000000000000..5bf642b96b32 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ApplicationConfigs.java @@ -0,0 +1,2301 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/platform.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * Message storing the graph of the application.
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.ApplicationConfigs} + */ +public final class ApplicationConfigs extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.ApplicationConfigs) + ApplicationConfigsOrBuilder { + private static final long serialVersionUID = 0L; + // Use ApplicationConfigs.newBuilder() to construct. + private ApplicationConfigs(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ApplicationConfigs() { + nodes_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ApplicationConfigs(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_ApplicationConfigs_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_ApplicationConfigs_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.ApplicationConfigs.class, + com.google.cloud.visionai.v1.ApplicationConfigs.Builder.class); + } + + public interface EventDeliveryConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.ApplicationConfigs.EventDeliveryConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * The delivery channel for the event notification, only pub/sub topic is
+     * supported now.
+     * Example channel:
+     * [//pubsub.googleapis.com/projects/visionai-testing-stable/topics/test-topic]
+     * 
+ * + * string channel = 1; + * + * @return The channel. + */ + java.lang.String getChannel(); + /** + * + * + *
+     * The delivery channel for the event notification, only pub/sub topic is
+     * supported now.
+     * Example channel:
+     * [//pubsub.googleapis.com/projects/visionai-testing-stable/topics/test-topic]
+     * 
+ * + * string channel = 1; + * + * @return The bytes for channel. + */ + com.google.protobuf.ByteString getChannelBytes(); + + /** + * + * + *
+     * The expected delivery interval for the same event. The same event won't
+     * be notified multiple times during this internal event that it is
+     * happening multiple times during the period of time.The same event is
+     * identified by <event_id, app_platform_metadata>.
+     * 
+ * + * .google.protobuf.Duration minimal_delivery_interval = 2; + * + * @return Whether the minimalDeliveryInterval field is set. + */ + boolean hasMinimalDeliveryInterval(); + /** + * + * + *
+     * The expected delivery interval for the same event. The same event won't
+     * be notified multiple times during this internal event that it is
+     * happening multiple times during the period of time.The same event is
+     * identified by <event_id, app_platform_metadata>.
+     * 
+ * + * .google.protobuf.Duration minimal_delivery_interval = 2; + * + * @return The minimalDeliveryInterval. + */ + com.google.protobuf.Duration getMinimalDeliveryInterval(); + /** + * + * + *
+     * The expected delivery interval for the same event. The same event won't
+     * be notified multiple times during this internal event that it is
+     * happening multiple times during the period of time.The same event is
+     * identified by <event_id, app_platform_metadata>.
+     * 
+ * + * .google.protobuf.Duration minimal_delivery_interval = 2; + */ + com.google.protobuf.DurationOrBuilder getMinimalDeliveryIntervalOrBuilder(); + } + /** + * + * + *
+   * message storing the config for event delivery
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.ApplicationConfigs.EventDeliveryConfig} + */ + public static final class EventDeliveryConfig extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.ApplicationConfigs.EventDeliveryConfig) + EventDeliveryConfigOrBuilder { + private static final long serialVersionUID = 0L; + // Use EventDeliveryConfig.newBuilder() to construct. + private EventDeliveryConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private EventDeliveryConfig() { + channel_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new EventDeliveryConfig(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_ApplicationConfigs_EventDeliveryConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_ApplicationConfigs_EventDeliveryConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.ApplicationConfigs.EventDeliveryConfig.class, + com.google.cloud.visionai.v1.ApplicationConfigs.EventDeliveryConfig.Builder.class); + } + + private int bitField0_; + public static final int CHANNEL_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object channel_ = ""; + /** + * + * + *
+     * The delivery channel for the event notification, only pub/sub topic is
+     * supported now.
+     * Example channel:
+     * [//pubsub.googleapis.com/projects/visionai-testing-stable/topics/test-topic]
+     * 
+ * + * string channel = 1; + * + * @return The channel. + */ + @java.lang.Override + public java.lang.String getChannel() { + java.lang.Object ref = channel_; + 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(); + channel_ = s; + return s; + } + } + /** + * + * + *
+     * The delivery channel for the event notification, only pub/sub topic is
+     * supported now.
+     * Example channel:
+     * [//pubsub.googleapis.com/projects/visionai-testing-stable/topics/test-topic]
+     * 
+ * + * string channel = 1; + * + * @return The bytes for channel. + */ + @java.lang.Override + public com.google.protobuf.ByteString getChannelBytes() { + java.lang.Object ref = channel_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + channel_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int MINIMAL_DELIVERY_INTERVAL_FIELD_NUMBER = 2; + private com.google.protobuf.Duration minimalDeliveryInterval_; + /** + * + * + *
+     * The expected delivery interval for the same event. The same event won't
+     * be notified multiple times during this internal event that it is
+     * happening multiple times during the period of time.The same event is
+     * identified by <event_id, app_platform_metadata>.
+     * 
+ * + * .google.protobuf.Duration minimal_delivery_interval = 2; + * + * @return Whether the minimalDeliveryInterval field is set. + */ + @java.lang.Override + public boolean hasMinimalDeliveryInterval() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * The expected delivery interval for the same event. The same event won't
+     * be notified multiple times during this internal event that it is
+     * happening multiple times during the period of time.The same event is
+     * identified by <event_id, app_platform_metadata>.
+     * 
+ * + * .google.protobuf.Duration minimal_delivery_interval = 2; + * + * @return The minimalDeliveryInterval. + */ + @java.lang.Override + public com.google.protobuf.Duration getMinimalDeliveryInterval() { + return minimalDeliveryInterval_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : minimalDeliveryInterval_; + } + /** + * + * + *
+     * The expected delivery interval for the same event. The same event won't
+     * be notified multiple times during this internal event that it is
+     * happening multiple times during the period of time.The same event is
+     * identified by <event_id, app_platform_metadata>.
+     * 
+ * + * .google.protobuf.Duration minimal_delivery_interval = 2; + */ + @java.lang.Override + public com.google.protobuf.DurationOrBuilder getMinimalDeliveryIntervalOrBuilder() { + return minimalDeliveryInterval_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : minimalDeliveryInterval_; + } + + 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(channel_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, channel_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getMinimalDeliveryInterval()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(channel_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, channel_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 2, getMinimalDeliveryInterval()); + } + size += getUnknownFields().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.visionai.v1.ApplicationConfigs.EventDeliveryConfig)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.ApplicationConfigs.EventDeliveryConfig other = + (com.google.cloud.visionai.v1.ApplicationConfigs.EventDeliveryConfig) obj; + + if (!getChannel().equals(other.getChannel())) return false; + if (hasMinimalDeliveryInterval() != other.hasMinimalDeliveryInterval()) return false; + if (hasMinimalDeliveryInterval()) { + if (!getMinimalDeliveryInterval().equals(other.getMinimalDeliveryInterval())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + CHANNEL_FIELD_NUMBER; + hash = (53 * hash) + getChannel().hashCode(); + if (hasMinimalDeliveryInterval()) { + hash = (37 * hash) + MINIMAL_DELIVERY_INTERVAL_FIELD_NUMBER; + hash = (53 * hash) + getMinimalDeliveryInterval().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.ApplicationConfigs.EventDeliveryConfig parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ApplicationConfigs.EventDeliveryConfig 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.visionai.v1.ApplicationConfigs.EventDeliveryConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ApplicationConfigs.EventDeliveryConfig 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.visionai.v1.ApplicationConfigs.EventDeliveryConfig parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ApplicationConfigs.EventDeliveryConfig parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.ApplicationConfigs.EventDeliveryConfig parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ApplicationConfigs.EventDeliveryConfig 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.visionai.v1.ApplicationConfigs.EventDeliveryConfig + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ApplicationConfigs.EventDeliveryConfig + 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.visionai.v1.ApplicationConfigs.EventDeliveryConfig parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ApplicationConfigs.EventDeliveryConfig 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.visionai.v1.ApplicationConfigs.EventDeliveryConfig 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; + } + /** + * + * + *
+     * message storing the config for event delivery
+     * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.ApplicationConfigs.EventDeliveryConfig} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.ApplicationConfigs.EventDeliveryConfig) + com.google.cloud.visionai.v1.ApplicationConfigs.EventDeliveryConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_ApplicationConfigs_EventDeliveryConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_ApplicationConfigs_EventDeliveryConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.ApplicationConfigs.EventDeliveryConfig.class, + com.google.cloud.visionai.v1.ApplicationConfigs.EventDeliveryConfig.Builder.class); + } + + // Construct using + // com.google.cloud.visionai.v1.ApplicationConfigs.EventDeliveryConfig.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getMinimalDeliveryIntervalFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + channel_ = ""; + minimalDeliveryInterval_ = null; + if (minimalDeliveryIntervalBuilder_ != null) { + minimalDeliveryIntervalBuilder_.dispose(); + minimalDeliveryIntervalBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_ApplicationConfigs_EventDeliveryConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ApplicationConfigs.EventDeliveryConfig + getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.ApplicationConfigs.EventDeliveryConfig + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ApplicationConfigs.EventDeliveryConfig build() { + com.google.cloud.visionai.v1.ApplicationConfigs.EventDeliveryConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ApplicationConfigs.EventDeliveryConfig buildPartial() { + com.google.cloud.visionai.v1.ApplicationConfigs.EventDeliveryConfig result = + new com.google.cloud.visionai.v1.ApplicationConfigs.EventDeliveryConfig(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.visionai.v1.ApplicationConfigs.EventDeliveryConfig result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.channel_ = channel_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.minimalDeliveryInterval_ = + minimalDeliveryIntervalBuilder_ == null + ? minimalDeliveryInterval_ + : minimalDeliveryIntervalBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.ApplicationConfigs.EventDeliveryConfig) { + return mergeFrom( + (com.google.cloud.visionai.v1.ApplicationConfigs.EventDeliveryConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.visionai.v1.ApplicationConfigs.EventDeliveryConfig other) { + if (other + == com.google.cloud.visionai.v1.ApplicationConfigs.EventDeliveryConfig + .getDefaultInstance()) return this; + if (!other.getChannel().isEmpty()) { + channel_ = other.channel_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasMinimalDeliveryInterval()) { + mergeMinimalDeliveryInterval(other.getMinimalDeliveryInterval()); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + channel_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage( + getMinimalDeliveryIntervalFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object channel_ = ""; + /** + * + * + *
+       * The delivery channel for the event notification, only pub/sub topic is
+       * supported now.
+       * Example channel:
+       * [//pubsub.googleapis.com/projects/visionai-testing-stable/topics/test-topic]
+       * 
+ * + * string channel = 1; + * + * @return The channel. + */ + public java.lang.String getChannel() { + java.lang.Object ref = channel_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + channel_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * The delivery channel for the event notification, only pub/sub topic is
+       * supported now.
+       * Example channel:
+       * [//pubsub.googleapis.com/projects/visionai-testing-stable/topics/test-topic]
+       * 
+ * + * string channel = 1; + * + * @return The bytes for channel. + */ + public com.google.protobuf.ByteString getChannelBytes() { + java.lang.Object ref = channel_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + channel_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * The delivery channel for the event notification, only pub/sub topic is
+       * supported now.
+       * Example channel:
+       * [//pubsub.googleapis.com/projects/visionai-testing-stable/topics/test-topic]
+       * 
+ * + * string channel = 1; + * + * @param value The channel to set. + * @return This builder for chaining. + */ + public Builder setChannel(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + channel_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * The delivery channel for the event notification, only pub/sub topic is
+       * supported now.
+       * Example channel:
+       * [//pubsub.googleapis.com/projects/visionai-testing-stable/topics/test-topic]
+       * 
+ * + * string channel = 1; + * + * @return This builder for chaining. + */ + public Builder clearChannel() { + channel_ = getDefaultInstance().getChannel(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+       * The delivery channel for the event notification, only pub/sub topic is
+       * supported now.
+       * Example channel:
+       * [//pubsub.googleapis.com/projects/visionai-testing-stable/topics/test-topic]
+       * 
+ * + * string channel = 1; + * + * @param value The bytes for channel to set. + * @return This builder for chaining. + */ + public Builder setChannelBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + channel_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.protobuf.Duration minimalDeliveryInterval_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + minimalDeliveryIntervalBuilder_; + /** + * + * + *
+       * The expected delivery interval for the same event. The same event won't
+       * be notified multiple times during this internal event that it is
+       * happening multiple times during the period of time.The same event is
+       * identified by <event_id, app_platform_metadata>.
+       * 
+ * + * .google.protobuf.Duration minimal_delivery_interval = 2; + * + * @return Whether the minimalDeliveryInterval field is set. + */ + public boolean hasMinimalDeliveryInterval() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+       * The expected delivery interval for the same event. The same event won't
+       * be notified multiple times during this internal event that it is
+       * happening multiple times during the period of time.The same event is
+       * identified by <event_id, app_platform_metadata>.
+       * 
+ * + * .google.protobuf.Duration minimal_delivery_interval = 2; + * + * @return The minimalDeliveryInterval. + */ + public com.google.protobuf.Duration getMinimalDeliveryInterval() { + if (minimalDeliveryIntervalBuilder_ == null) { + return minimalDeliveryInterval_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : minimalDeliveryInterval_; + } else { + return minimalDeliveryIntervalBuilder_.getMessage(); + } + } + /** + * + * + *
+       * The expected delivery interval for the same event. The same event won't
+       * be notified multiple times during this internal event that it is
+       * happening multiple times during the period of time.The same event is
+       * identified by <event_id, app_platform_metadata>.
+       * 
+ * + * .google.protobuf.Duration minimal_delivery_interval = 2; + */ + public Builder setMinimalDeliveryInterval(com.google.protobuf.Duration value) { + if (minimalDeliveryIntervalBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + minimalDeliveryInterval_ = value; + } else { + minimalDeliveryIntervalBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * The expected delivery interval for the same event. The same event won't
+       * be notified multiple times during this internal event that it is
+       * happening multiple times during the period of time.The same event is
+       * identified by <event_id, app_platform_metadata>.
+       * 
+ * + * .google.protobuf.Duration minimal_delivery_interval = 2; + */ + public Builder setMinimalDeliveryInterval( + com.google.protobuf.Duration.Builder builderForValue) { + if (minimalDeliveryIntervalBuilder_ == null) { + minimalDeliveryInterval_ = builderForValue.build(); + } else { + minimalDeliveryIntervalBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * The expected delivery interval for the same event. The same event won't
+       * be notified multiple times during this internal event that it is
+       * happening multiple times during the period of time.The same event is
+       * identified by <event_id, app_platform_metadata>.
+       * 
+ * + * .google.protobuf.Duration minimal_delivery_interval = 2; + */ + public Builder mergeMinimalDeliveryInterval(com.google.protobuf.Duration value) { + if (minimalDeliveryIntervalBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && minimalDeliveryInterval_ != null + && minimalDeliveryInterval_ != com.google.protobuf.Duration.getDefaultInstance()) { + getMinimalDeliveryIntervalBuilder().mergeFrom(value); + } else { + minimalDeliveryInterval_ = value; + } + } else { + minimalDeliveryIntervalBuilder_.mergeFrom(value); + } + if (minimalDeliveryInterval_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + /** + * + * + *
+       * The expected delivery interval for the same event. The same event won't
+       * be notified multiple times during this internal event that it is
+       * happening multiple times during the period of time.The same event is
+       * identified by <event_id, app_platform_metadata>.
+       * 
+ * + * .google.protobuf.Duration minimal_delivery_interval = 2; + */ + public Builder clearMinimalDeliveryInterval() { + bitField0_ = (bitField0_ & ~0x00000002); + minimalDeliveryInterval_ = null; + if (minimalDeliveryIntervalBuilder_ != null) { + minimalDeliveryIntervalBuilder_.dispose(); + minimalDeliveryIntervalBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+       * The expected delivery interval for the same event. The same event won't
+       * be notified multiple times during this internal event that it is
+       * happening multiple times during the period of time.The same event is
+       * identified by <event_id, app_platform_metadata>.
+       * 
+ * + * .google.protobuf.Duration minimal_delivery_interval = 2; + */ + public com.google.protobuf.Duration.Builder getMinimalDeliveryIntervalBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getMinimalDeliveryIntervalFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * The expected delivery interval for the same event. The same event won't
+       * be notified multiple times during this internal event that it is
+       * happening multiple times during the period of time.The same event is
+       * identified by <event_id, app_platform_metadata>.
+       * 
+ * + * .google.protobuf.Duration minimal_delivery_interval = 2; + */ + public com.google.protobuf.DurationOrBuilder getMinimalDeliveryIntervalOrBuilder() { + if (minimalDeliveryIntervalBuilder_ != null) { + return minimalDeliveryIntervalBuilder_.getMessageOrBuilder(); + } else { + return minimalDeliveryInterval_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : minimalDeliveryInterval_; + } + } + /** + * + * + *
+       * The expected delivery interval for the same event. The same event won't
+       * be notified multiple times during this internal event that it is
+       * happening multiple times during the period of time.The same event is
+       * identified by <event_id, app_platform_metadata>.
+       * 
+ * + * .google.protobuf.Duration minimal_delivery_interval = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + getMinimalDeliveryIntervalFieldBuilder() { + if (minimalDeliveryIntervalBuilder_ == null) { + minimalDeliveryIntervalBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder>( + getMinimalDeliveryInterval(), getParentForChildren(), isClean()); + minimalDeliveryInterval_ = null; + } + return minimalDeliveryIntervalBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.ApplicationConfigs.EventDeliveryConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.ApplicationConfigs.EventDeliveryConfig) + private static final com.google.cloud.visionai.v1.ApplicationConfigs.EventDeliveryConfig + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.ApplicationConfigs.EventDeliveryConfig(); + } + + public static com.google.cloud.visionai.v1.ApplicationConfigs.EventDeliveryConfig + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public EventDeliveryConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.ApplicationConfigs.EventDeliveryConfig + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int bitField0_; + public static final int NODES_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List nodes_; + /** + * + * + *
+   * A list of nodes  in the application graph.
+   * 
+ * + * repeated .google.cloud.visionai.v1.Node nodes = 1; + */ + @java.lang.Override + public java.util.List getNodesList() { + return nodes_; + } + /** + * + * + *
+   * A list of nodes  in the application graph.
+   * 
+ * + * repeated .google.cloud.visionai.v1.Node nodes = 1; + */ + @java.lang.Override + public java.util.List + getNodesOrBuilderList() { + return nodes_; + } + /** + * + * + *
+   * A list of nodes  in the application graph.
+   * 
+ * + * repeated .google.cloud.visionai.v1.Node nodes = 1; + */ + @java.lang.Override + public int getNodesCount() { + return nodes_.size(); + } + /** + * + * + *
+   * A list of nodes  in the application graph.
+   * 
+ * + * repeated .google.cloud.visionai.v1.Node nodes = 1; + */ + @java.lang.Override + public com.google.cloud.visionai.v1.Node getNodes(int index) { + return nodes_.get(index); + } + /** + * + * + *
+   * A list of nodes  in the application graph.
+   * 
+ * + * repeated .google.cloud.visionai.v1.Node nodes = 1; + */ + @java.lang.Override + public com.google.cloud.visionai.v1.NodeOrBuilder getNodesOrBuilder(int index) { + return nodes_.get(index); + } + + public static final int EVENT_DELIVERY_CONFIG_FIELD_NUMBER = 3; + private com.google.cloud.visionai.v1.ApplicationConfigs.EventDeliveryConfig eventDeliveryConfig_; + /** + * + * + *
+   * Event-related configuration for this application.
+   * 
+ * + * + * .google.cloud.visionai.v1.ApplicationConfigs.EventDeliveryConfig event_delivery_config = 3; + * + * + * @return Whether the eventDeliveryConfig field is set. + */ + @java.lang.Override + public boolean hasEventDeliveryConfig() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * Event-related configuration for this application.
+   * 
+ * + * + * .google.cloud.visionai.v1.ApplicationConfigs.EventDeliveryConfig event_delivery_config = 3; + * + * + * @return The eventDeliveryConfig. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.ApplicationConfigs.EventDeliveryConfig + getEventDeliveryConfig() { + return eventDeliveryConfig_ == null + ? com.google.cloud.visionai.v1.ApplicationConfigs.EventDeliveryConfig.getDefaultInstance() + : eventDeliveryConfig_; + } + /** + * + * + *
+   * Event-related configuration for this application.
+   * 
+ * + * + * .google.cloud.visionai.v1.ApplicationConfigs.EventDeliveryConfig event_delivery_config = 3; + * + */ + @java.lang.Override + public com.google.cloud.visionai.v1.ApplicationConfigs.EventDeliveryConfigOrBuilder + getEventDeliveryConfigOrBuilder() { + return eventDeliveryConfig_ == null + ? com.google.cloud.visionai.v1.ApplicationConfigs.EventDeliveryConfig.getDefaultInstance() + : eventDeliveryConfig_; + } + + 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 < nodes_.size(); i++) { + output.writeMessage(1, nodes_.get(i)); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(3, getEventDeliveryConfig()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < nodes_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, nodes_.get(i)); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getEventDeliveryConfig()); + } + size += getUnknownFields().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.visionai.v1.ApplicationConfigs)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.ApplicationConfigs other = + (com.google.cloud.visionai.v1.ApplicationConfigs) obj; + + if (!getNodesList().equals(other.getNodesList())) return false; + if (hasEventDeliveryConfig() != other.hasEventDeliveryConfig()) return false; + if (hasEventDeliveryConfig()) { + if (!getEventDeliveryConfig().equals(other.getEventDeliveryConfig())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getNodesCount() > 0) { + hash = (37 * hash) + NODES_FIELD_NUMBER; + hash = (53 * hash) + getNodesList().hashCode(); + } + if (hasEventDeliveryConfig()) { + hash = (37 * hash) + EVENT_DELIVERY_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getEventDeliveryConfig().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.ApplicationConfigs parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ApplicationConfigs 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.visionai.v1.ApplicationConfigs parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ApplicationConfigs 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.visionai.v1.ApplicationConfigs parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ApplicationConfigs parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.ApplicationConfigs parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ApplicationConfigs 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.visionai.v1.ApplicationConfigs parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ApplicationConfigs 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.visionai.v1.ApplicationConfigs parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ApplicationConfigs 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.visionai.v1.ApplicationConfigs 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; + } + /** + * + * + *
+   * Message storing the graph of the application.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.ApplicationConfigs} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.ApplicationConfigs) + com.google.cloud.visionai.v1.ApplicationConfigsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_ApplicationConfigs_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_ApplicationConfigs_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.ApplicationConfigs.class, + com.google.cloud.visionai.v1.ApplicationConfigs.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.ApplicationConfigs.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getNodesFieldBuilder(); + getEventDeliveryConfigFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (nodesBuilder_ == null) { + nodes_ = java.util.Collections.emptyList(); + } else { + nodes_ = null; + nodesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + eventDeliveryConfig_ = null; + if (eventDeliveryConfigBuilder_ != null) { + eventDeliveryConfigBuilder_.dispose(); + eventDeliveryConfigBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_ApplicationConfigs_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ApplicationConfigs getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.ApplicationConfigs.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ApplicationConfigs build() { + com.google.cloud.visionai.v1.ApplicationConfigs result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ApplicationConfigs buildPartial() { + com.google.cloud.visionai.v1.ApplicationConfigs result = + new com.google.cloud.visionai.v1.ApplicationConfigs(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.visionai.v1.ApplicationConfigs result) { + if (nodesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + nodes_ = java.util.Collections.unmodifiableList(nodes_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.nodes_ = nodes_; + } else { + result.nodes_ = nodesBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.visionai.v1.ApplicationConfigs result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.eventDeliveryConfig_ = + eventDeliveryConfigBuilder_ == null + ? eventDeliveryConfig_ + : eventDeliveryConfigBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.ApplicationConfigs) { + return mergeFrom((com.google.cloud.visionai.v1.ApplicationConfigs) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.ApplicationConfigs other) { + if (other == com.google.cloud.visionai.v1.ApplicationConfigs.getDefaultInstance()) + return this; + if (nodesBuilder_ == null) { + if (!other.nodes_.isEmpty()) { + if (nodes_.isEmpty()) { + nodes_ = other.nodes_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureNodesIsMutable(); + nodes_.addAll(other.nodes_); + } + onChanged(); + } + } else { + if (!other.nodes_.isEmpty()) { + if (nodesBuilder_.isEmpty()) { + nodesBuilder_.dispose(); + nodesBuilder_ = null; + nodes_ = other.nodes_; + bitField0_ = (bitField0_ & ~0x00000001); + nodesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getNodesFieldBuilder() + : null; + } else { + nodesBuilder_.addAllMessages(other.nodes_); + } + } + } + if (other.hasEventDeliveryConfig()) { + mergeEventDeliveryConfig(other.getEventDeliveryConfig()); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.visionai.v1.Node m = + input.readMessage( + com.google.cloud.visionai.v1.Node.parser(), extensionRegistry); + if (nodesBuilder_ == null) { + ensureNodesIsMutable(); + nodes_.add(m); + } else { + nodesBuilder_.addMessage(m); + } + break; + } // case 10 + case 26: + { + input.readMessage( + getEventDeliveryConfigFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List nodes_ = + java.util.Collections.emptyList(); + + private void ensureNodesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + nodes_ = new java.util.ArrayList(nodes_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.visionai.v1.Node, + com.google.cloud.visionai.v1.Node.Builder, + com.google.cloud.visionai.v1.NodeOrBuilder> + nodesBuilder_; + + /** + * + * + *
+     * A list of nodes  in the application graph.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Node nodes = 1; + */ + public java.util.List getNodesList() { + if (nodesBuilder_ == null) { + return java.util.Collections.unmodifiableList(nodes_); + } else { + return nodesBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * A list of nodes  in the application graph.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Node nodes = 1; + */ + public int getNodesCount() { + if (nodesBuilder_ == null) { + return nodes_.size(); + } else { + return nodesBuilder_.getCount(); + } + } + /** + * + * + *
+     * A list of nodes  in the application graph.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Node nodes = 1; + */ + public com.google.cloud.visionai.v1.Node getNodes(int index) { + if (nodesBuilder_ == null) { + return nodes_.get(index); + } else { + return nodesBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * A list of nodes  in the application graph.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Node nodes = 1; + */ + public Builder setNodes(int index, com.google.cloud.visionai.v1.Node value) { + if (nodesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureNodesIsMutable(); + nodes_.set(index, value); + onChanged(); + } else { + nodesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * A list of nodes  in the application graph.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Node nodes = 1; + */ + public Builder setNodes(int index, com.google.cloud.visionai.v1.Node.Builder builderForValue) { + if (nodesBuilder_ == null) { + ensureNodesIsMutable(); + nodes_.set(index, builderForValue.build()); + onChanged(); + } else { + nodesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A list of nodes  in the application graph.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Node nodes = 1; + */ + public Builder addNodes(com.google.cloud.visionai.v1.Node value) { + if (nodesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureNodesIsMutable(); + nodes_.add(value); + onChanged(); + } else { + nodesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * A list of nodes  in the application graph.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Node nodes = 1; + */ + public Builder addNodes(int index, com.google.cloud.visionai.v1.Node value) { + if (nodesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureNodesIsMutable(); + nodes_.add(index, value); + onChanged(); + } else { + nodesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * A list of nodes  in the application graph.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Node nodes = 1; + */ + public Builder addNodes(com.google.cloud.visionai.v1.Node.Builder builderForValue) { + if (nodesBuilder_ == null) { + ensureNodesIsMutable(); + nodes_.add(builderForValue.build()); + onChanged(); + } else { + nodesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A list of nodes  in the application graph.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Node nodes = 1; + */ + public Builder addNodes(int index, com.google.cloud.visionai.v1.Node.Builder builderForValue) { + if (nodesBuilder_ == null) { + ensureNodesIsMutable(); + nodes_.add(index, builderForValue.build()); + onChanged(); + } else { + nodesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A list of nodes  in the application graph.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Node nodes = 1; + */ + public Builder addAllNodes( + java.lang.Iterable values) { + if (nodesBuilder_ == null) { + ensureNodesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, nodes_); + onChanged(); + } else { + nodesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * A list of nodes  in the application graph.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Node nodes = 1; + */ + public Builder clearNodes() { + if (nodesBuilder_ == null) { + nodes_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + nodesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * A list of nodes  in the application graph.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Node nodes = 1; + */ + public Builder removeNodes(int index) { + if (nodesBuilder_ == null) { + ensureNodesIsMutable(); + nodes_.remove(index); + onChanged(); + } else { + nodesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * A list of nodes  in the application graph.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Node nodes = 1; + */ + public com.google.cloud.visionai.v1.Node.Builder getNodesBuilder(int index) { + return getNodesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * A list of nodes  in the application graph.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Node nodes = 1; + */ + public com.google.cloud.visionai.v1.NodeOrBuilder getNodesOrBuilder(int index) { + if (nodesBuilder_ == null) { + return nodes_.get(index); + } else { + return nodesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * A list of nodes  in the application graph.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Node nodes = 1; + */ + public java.util.List + getNodesOrBuilderList() { + if (nodesBuilder_ != null) { + return nodesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(nodes_); + } + } + /** + * + * + *
+     * A list of nodes  in the application graph.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Node nodes = 1; + */ + public com.google.cloud.visionai.v1.Node.Builder addNodesBuilder() { + return getNodesFieldBuilder() + .addBuilder(com.google.cloud.visionai.v1.Node.getDefaultInstance()); + } + /** + * + * + *
+     * A list of nodes  in the application graph.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Node nodes = 1; + */ + public com.google.cloud.visionai.v1.Node.Builder addNodesBuilder(int index) { + return getNodesFieldBuilder() + .addBuilder(index, com.google.cloud.visionai.v1.Node.getDefaultInstance()); + } + /** + * + * + *
+     * A list of nodes  in the application graph.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Node nodes = 1; + */ + public java.util.List getNodesBuilderList() { + return getNodesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.visionai.v1.Node, + com.google.cloud.visionai.v1.Node.Builder, + com.google.cloud.visionai.v1.NodeOrBuilder> + getNodesFieldBuilder() { + if (nodesBuilder_ == null) { + nodesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.visionai.v1.Node, + com.google.cloud.visionai.v1.Node.Builder, + com.google.cloud.visionai.v1.NodeOrBuilder>( + nodes_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + nodes_ = null; + } + return nodesBuilder_; + } + + private com.google.cloud.visionai.v1.ApplicationConfigs.EventDeliveryConfig + eventDeliveryConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.ApplicationConfigs.EventDeliveryConfig, + com.google.cloud.visionai.v1.ApplicationConfigs.EventDeliveryConfig.Builder, + com.google.cloud.visionai.v1.ApplicationConfigs.EventDeliveryConfigOrBuilder> + eventDeliveryConfigBuilder_; + /** + * + * + *
+     * Event-related configuration for this application.
+     * 
+ * + * + * .google.cloud.visionai.v1.ApplicationConfigs.EventDeliveryConfig event_delivery_config = 3; + * + * + * @return Whether the eventDeliveryConfig field is set. + */ + public boolean hasEventDeliveryConfig() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * Event-related configuration for this application.
+     * 
+ * + * + * .google.cloud.visionai.v1.ApplicationConfigs.EventDeliveryConfig event_delivery_config = 3; + * + * + * @return The eventDeliveryConfig. + */ + public com.google.cloud.visionai.v1.ApplicationConfigs.EventDeliveryConfig + getEventDeliveryConfig() { + if (eventDeliveryConfigBuilder_ == null) { + return eventDeliveryConfig_ == null + ? com.google.cloud.visionai.v1.ApplicationConfigs.EventDeliveryConfig + .getDefaultInstance() + : eventDeliveryConfig_; + } else { + return eventDeliveryConfigBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Event-related configuration for this application.
+     * 
+ * + * + * .google.cloud.visionai.v1.ApplicationConfigs.EventDeliveryConfig event_delivery_config = 3; + * + */ + public Builder setEventDeliveryConfig( + com.google.cloud.visionai.v1.ApplicationConfigs.EventDeliveryConfig value) { + if (eventDeliveryConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + eventDeliveryConfig_ = value; + } else { + eventDeliveryConfigBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Event-related configuration for this application.
+     * 
+ * + * + * .google.cloud.visionai.v1.ApplicationConfigs.EventDeliveryConfig event_delivery_config = 3; + * + */ + public Builder setEventDeliveryConfig( + com.google.cloud.visionai.v1.ApplicationConfigs.EventDeliveryConfig.Builder + builderForValue) { + if (eventDeliveryConfigBuilder_ == null) { + eventDeliveryConfig_ = builderForValue.build(); + } else { + eventDeliveryConfigBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Event-related configuration for this application.
+     * 
+ * + * + * .google.cloud.visionai.v1.ApplicationConfigs.EventDeliveryConfig event_delivery_config = 3; + * + */ + public Builder mergeEventDeliveryConfig( + com.google.cloud.visionai.v1.ApplicationConfigs.EventDeliveryConfig value) { + if (eventDeliveryConfigBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && eventDeliveryConfig_ != null + && eventDeliveryConfig_ + != com.google.cloud.visionai.v1.ApplicationConfigs.EventDeliveryConfig + .getDefaultInstance()) { + getEventDeliveryConfigBuilder().mergeFrom(value); + } else { + eventDeliveryConfig_ = value; + } + } else { + eventDeliveryConfigBuilder_.mergeFrom(value); + } + if (eventDeliveryConfig_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Event-related configuration for this application.
+     * 
+ * + * + * .google.cloud.visionai.v1.ApplicationConfigs.EventDeliveryConfig event_delivery_config = 3; + * + */ + public Builder clearEventDeliveryConfig() { + bitField0_ = (bitField0_ & ~0x00000002); + eventDeliveryConfig_ = null; + if (eventDeliveryConfigBuilder_ != null) { + eventDeliveryConfigBuilder_.dispose(); + eventDeliveryConfigBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Event-related configuration for this application.
+     * 
+ * + * + * .google.cloud.visionai.v1.ApplicationConfigs.EventDeliveryConfig event_delivery_config = 3; + * + */ + public com.google.cloud.visionai.v1.ApplicationConfigs.EventDeliveryConfig.Builder + getEventDeliveryConfigBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getEventDeliveryConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Event-related configuration for this application.
+     * 
+ * + * + * .google.cloud.visionai.v1.ApplicationConfigs.EventDeliveryConfig event_delivery_config = 3; + * + */ + public com.google.cloud.visionai.v1.ApplicationConfigs.EventDeliveryConfigOrBuilder + getEventDeliveryConfigOrBuilder() { + if (eventDeliveryConfigBuilder_ != null) { + return eventDeliveryConfigBuilder_.getMessageOrBuilder(); + } else { + return eventDeliveryConfig_ == null + ? com.google.cloud.visionai.v1.ApplicationConfigs.EventDeliveryConfig + .getDefaultInstance() + : eventDeliveryConfig_; + } + } + /** + * + * + *
+     * Event-related configuration for this application.
+     * 
+ * + * + * .google.cloud.visionai.v1.ApplicationConfigs.EventDeliveryConfig event_delivery_config = 3; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.ApplicationConfigs.EventDeliveryConfig, + com.google.cloud.visionai.v1.ApplicationConfigs.EventDeliveryConfig.Builder, + com.google.cloud.visionai.v1.ApplicationConfigs.EventDeliveryConfigOrBuilder> + getEventDeliveryConfigFieldBuilder() { + if (eventDeliveryConfigBuilder_ == null) { + eventDeliveryConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.ApplicationConfigs.EventDeliveryConfig, + com.google.cloud.visionai.v1.ApplicationConfigs.EventDeliveryConfig.Builder, + com.google.cloud.visionai.v1.ApplicationConfigs.EventDeliveryConfigOrBuilder>( + getEventDeliveryConfig(), getParentForChildren(), isClean()); + eventDeliveryConfig_ = null; + } + return eventDeliveryConfigBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.ApplicationConfigs) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.ApplicationConfigs) + private static final com.google.cloud.visionai.v1.ApplicationConfigs DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.ApplicationConfigs(); + } + + public static com.google.cloud.visionai.v1.ApplicationConfigs getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ApplicationConfigs parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.ApplicationConfigs getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ApplicationConfigsOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ApplicationConfigsOrBuilder.java new file mode 100644 index 000000000000..4d13794d7bf7 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ApplicationConfigsOrBuilder.java @@ -0,0 +1,119 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/platform.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface ApplicationConfigsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.ApplicationConfigs) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * A list of nodes  in the application graph.
+   * 
+ * + * repeated .google.cloud.visionai.v1.Node nodes = 1; + */ + java.util.List getNodesList(); + /** + * + * + *
+   * A list of nodes  in the application graph.
+   * 
+ * + * repeated .google.cloud.visionai.v1.Node nodes = 1; + */ + com.google.cloud.visionai.v1.Node getNodes(int index); + /** + * + * + *
+   * A list of nodes  in the application graph.
+   * 
+ * + * repeated .google.cloud.visionai.v1.Node nodes = 1; + */ + int getNodesCount(); + /** + * + * + *
+   * A list of nodes  in the application graph.
+   * 
+ * + * repeated .google.cloud.visionai.v1.Node nodes = 1; + */ + java.util.List getNodesOrBuilderList(); + /** + * + * + *
+   * A list of nodes  in the application graph.
+   * 
+ * + * repeated .google.cloud.visionai.v1.Node nodes = 1; + */ + com.google.cloud.visionai.v1.NodeOrBuilder getNodesOrBuilder(int index); + + /** + * + * + *
+   * Event-related configuration for this application.
+   * 
+ * + * + * .google.cloud.visionai.v1.ApplicationConfigs.EventDeliveryConfig event_delivery_config = 3; + * + * + * @return Whether the eventDeliveryConfig field is set. + */ + boolean hasEventDeliveryConfig(); + /** + * + * + *
+   * Event-related configuration for this application.
+   * 
+ * + * + * .google.cloud.visionai.v1.ApplicationConfigs.EventDeliveryConfig event_delivery_config = 3; + * + * + * @return The eventDeliveryConfig. + */ + com.google.cloud.visionai.v1.ApplicationConfigs.EventDeliveryConfig getEventDeliveryConfig(); + /** + * + * + *
+   * Event-related configuration for this application.
+   * 
+ * + * + * .google.cloud.visionai.v1.ApplicationConfigs.EventDeliveryConfig event_delivery_config = 3; + * + */ + com.google.cloud.visionai.v1.ApplicationConfigs.EventDeliveryConfigOrBuilder + getEventDeliveryConfigOrBuilder(); +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ApplicationInstance.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ApplicationInstance.java new file mode 100644 index 000000000000..833a59b9ba13 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ApplicationInstance.java @@ -0,0 +1,928 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/platform.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * Message for creating a Instance.
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.ApplicationInstance} + */ +public final class ApplicationInstance extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.ApplicationInstance) + ApplicationInstanceOrBuilder { + private static final long serialVersionUID = 0L; + // Use ApplicationInstance.newBuilder() to construct. + private ApplicationInstance(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ApplicationInstance() { + instanceId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ApplicationInstance(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_ApplicationInstance_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_ApplicationInstance_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.ApplicationInstance.class, + com.google.cloud.visionai.v1.ApplicationInstance.Builder.class); + } + + private int bitField0_; + public static final int INSTANCE_ID_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object instanceId_ = ""; + /** + * + * + *
+   * Required. Id of the requesting object.
+   * 
+ * + * string instance_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The instanceId. + */ + @java.lang.Override + public java.lang.String getInstanceId() { + java.lang.Object ref = instanceId_; + 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(); + instanceId_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Id of the requesting object.
+   * 
+ * + * string instance_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for instanceId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getInstanceIdBytes() { + java.lang.Object ref = instanceId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + instanceId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int INSTANCE_FIELD_NUMBER = 2; + private com.google.cloud.visionai.v1.Instance instance_; + /** + * + * + *
+   * Required. The resource being created.
+   * 
+ * + * + * .google.cloud.visionai.v1.Instance instance = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the instance field is set. + */ + @java.lang.Override + public boolean hasInstance() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * Required. The resource being created.
+   * 
+ * + * + * .google.cloud.visionai.v1.Instance instance = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The instance. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.Instance getInstance() { + return instance_ == null + ? com.google.cloud.visionai.v1.Instance.getDefaultInstance() + : instance_; + } + /** + * + * + *
+   * Required. The resource being created.
+   * 
+ * + * + * .google.cloud.visionai.v1.Instance instance = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.visionai.v1.InstanceOrBuilder getInstanceOrBuilder() { + return instance_ == null + ? com.google.cloud.visionai.v1.Instance.getDefaultInstance() + : instance_; + } + + 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(instanceId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, instanceId_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getInstance()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(instanceId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, instanceId_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getInstance()); + } + size += getUnknownFields().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.visionai.v1.ApplicationInstance)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.ApplicationInstance other = + (com.google.cloud.visionai.v1.ApplicationInstance) obj; + + if (!getInstanceId().equals(other.getInstanceId())) return false; + if (hasInstance() != other.hasInstance()) return false; + if (hasInstance()) { + if (!getInstance().equals(other.getInstance())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + INSTANCE_ID_FIELD_NUMBER; + hash = (53 * hash) + getInstanceId().hashCode(); + if (hasInstance()) { + hash = (37 * hash) + INSTANCE_FIELD_NUMBER; + hash = (53 * hash) + getInstance().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.ApplicationInstance parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ApplicationInstance 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.visionai.v1.ApplicationInstance parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ApplicationInstance 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.visionai.v1.ApplicationInstance parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ApplicationInstance parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.ApplicationInstance parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ApplicationInstance 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.visionai.v1.ApplicationInstance parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ApplicationInstance 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.visionai.v1.ApplicationInstance parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ApplicationInstance 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.visionai.v1.ApplicationInstance 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; + } + /** + * + * + *
+   * Message for creating a Instance.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.ApplicationInstance} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.ApplicationInstance) + com.google.cloud.visionai.v1.ApplicationInstanceOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_ApplicationInstance_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_ApplicationInstance_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.ApplicationInstance.class, + com.google.cloud.visionai.v1.ApplicationInstance.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.ApplicationInstance.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getInstanceFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + instanceId_ = ""; + instance_ = null; + if (instanceBuilder_ != null) { + instanceBuilder_.dispose(); + instanceBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_ApplicationInstance_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ApplicationInstance getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.ApplicationInstance.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ApplicationInstance build() { + com.google.cloud.visionai.v1.ApplicationInstance result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ApplicationInstance buildPartial() { + com.google.cloud.visionai.v1.ApplicationInstance result = + new com.google.cloud.visionai.v1.ApplicationInstance(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.visionai.v1.ApplicationInstance result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.instanceId_ = instanceId_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.instance_ = instanceBuilder_ == null ? instance_ : instanceBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.ApplicationInstance) { + return mergeFrom((com.google.cloud.visionai.v1.ApplicationInstance) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.ApplicationInstance other) { + if (other == com.google.cloud.visionai.v1.ApplicationInstance.getDefaultInstance()) + return this; + if (!other.getInstanceId().isEmpty()) { + instanceId_ = other.instanceId_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasInstance()) { + mergeInstance(other.getInstance()); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + instanceId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage(getInstanceFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object instanceId_ = ""; + /** + * + * + *
+     * Required. Id of the requesting object.
+     * 
+ * + * string instance_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The instanceId. + */ + public java.lang.String getInstanceId() { + java.lang.Object ref = instanceId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + instanceId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Id of the requesting object.
+     * 
+ * + * string instance_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for instanceId. + */ + public com.google.protobuf.ByteString getInstanceIdBytes() { + java.lang.Object ref = instanceId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + instanceId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Id of the requesting object.
+     * 
+ * + * string instance_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The instanceId to set. + * @return This builder for chaining. + */ + public Builder setInstanceId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + instanceId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Id of the requesting object.
+     * 
+ * + * string instance_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearInstanceId() { + instanceId_ = getDefaultInstance().getInstanceId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Id of the requesting object.
+     * 
+ * + * string instance_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for instanceId to set. + * @return This builder for chaining. + */ + public Builder setInstanceIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + instanceId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.cloud.visionai.v1.Instance instance_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.Instance, + com.google.cloud.visionai.v1.Instance.Builder, + com.google.cloud.visionai.v1.InstanceOrBuilder> + instanceBuilder_; + /** + * + * + *
+     * Required. The resource being created.
+     * 
+ * + * + * .google.cloud.visionai.v1.Instance instance = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the instance field is set. + */ + public boolean hasInstance() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * Required. The resource being created.
+     * 
+ * + * + * .google.cloud.visionai.v1.Instance instance = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The instance. + */ + public com.google.cloud.visionai.v1.Instance getInstance() { + if (instanceBuilder_ == null) { + return instance_ == null + ? com.google.cloud.visionai.v1.Instance.getDefaultInstance() + : instance_; + } else { + return instanceBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The resource being created.
+     * 
+ * + * + * .google.cloud.visionai.v1.Instance instance = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setInstance(com.google.cloud.visionai.v1.Instance value) { + if (instanceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + instance_ = value; + } else { + instanceBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource being created.
+     * 
+ * + * + * .google.cloud.visionai.v1.Instance instance = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setInstance(com.google.cloud.visionai.v1.Instance.Builder builderForValue) { + if (instanceBuilder_ == null) { + instance_ = builderForValue.build(); + } else { + instanceBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource being created.
+     * 
+ * + * + * .google.cloud.visionai.v1.Instance instance = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeInstance(com.google.cloud.visionai.v1.Instance value) { + if (instanceBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && instance_ != null + && instance_ != com.google.cloud.visionai.v1.Instance.getDefaultInstance()) { + getInstanceBuilder().mergeFrom(value); + } else { + instance_ = value; + } + } else { + instanceBuilder_.mergeFrom(value); + } + if (instance_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Required. The resource being created.
+     * 
+ * + * + * .google.cloud.visionai.v1.Instance instance = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearInstance() { + bitField0_ = (bitField0_ & ~0x00000002); + instance_ = null; + if (instanceBuilder_ != null) { + instanceBuilder_.dispose(); + instanceBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource being created.
+     * 
+ * + * + * .google.cloud.visionai.v1.Instance instance = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.visionai.v1.Instance.Builder getInstanceBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getInstanceFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The resource being created.
+     * 
+ * + * + * .google.cloud.visionai.v1.Instance instance = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.visionai.v1.InstanceOrBuilder getInstanceOrBuilder() { + if (instanceBuilder_ != null) { + return instanceBuilder_.getMessageOrBuilder(); + } else { + return instance_ == null + ? com.google.cloud.visionai.v1.Instance.getDefaultInstance() + : instance_; + } + } + /** + * + * + *
+     * Required. The resource being created.
+     * 
+ * + * + * .google.cloud.visionai.v1.Instance instance = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.Instance, + com.google.cloud.visionai.v1.Instance.Builder, + com.google.cloud.visionai.v1.InstanceOrBuilder> + getInstanceFieldBuilder() { + if (instanceBuilder_ == null) { + instanceBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.Instance, + com.google.cloud.visionai.v1.Instance.Builder, + com.google.cloud.visionai.v1.InstanceOrBuilder>( + getInstance(), getParentForChildren(), isClean()); + instance_ = null; + } + return instanceBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.ApplicationInstance) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.ApplicationInstance) + private static final com.google.cloud.visionai.v1.ApplicationInstance DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.ApplicationInstance(); + } + + public static com.google.cloud.visionai.v1.ApplicationInstance getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ApplicationInstance parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.ApplicationInstance getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ApplicationInstanceOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ApplicationInstanceOrBuilder.java new file mode 100644 index 000000000000..83715ea670ca --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ApplicationInstanceOrBuilder.java @@ -0,0 +1,92 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/platform.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface ApplicationInstanceOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.ApplicationInstance) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Id of the requesting object.
+   * 
+ * + * string instance_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The instanceId. + */ + java.lang.String getInstanceId(); + /** + * + * + *
+   * Required. Id of the requesting object.
+   * 
+ * + * string instance_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for instanceId. + */ + com.google.protobuf.ByteString getInstanceIdBytes(); + + /** + * + * + *
+   * Required. The resource being created.
+   * 
+ * + * + * .google.cloud.visionai.v1.Instance instance = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the instance field is set. + */ + boolean hasInstance(); + /** + * + * + *
+   * Required. The resource being created.
+   * 
+ * + * + * .google.cloud.visionai.v1.Instance instance = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The instance. + */ + com.google.cloud.visionai.v1.Instance getInstance(); + /** + * + * + *
+   * Required. The resource being created.
+   * 
+ * + * + * .google.cloud.visionai.v1.Instance instance = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.visionai.v1.InstanceOrBuilder getInstanceOrBuilder(); +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ApplicationName.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ApplicationName.java new file mode 100644 index 000000000000..f6c3a6232e43 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ApplicationName.java @@ -0,0 +1,227 @@ +/* + * Copyright 2024 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.visionai.v1; + +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") +public class ApplicationName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION_APPLICATION = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/applications/{application}"); + private volatile Map fieldValuesMap; + private final String project; + private final String location; + private final String application; + + @Deprecated + protected ApplicationName() { + project = null; + location = null; + application = null; + } + + private ApplicationName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + application = Preconditions.checkNotNull(builder.getApplication()); + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getApplication() { + return application; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static ApplicationName of(String project, String location, String application) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setApplication(application) + .build(); + } + + public static String format(String project, String location, String application) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setApplication(application) + .build() + .toString(); + } + + public static ApplicationName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION_APPLICATION.validatedMatch( + formattedString, "ApplicationName.parse: formattedString not in valid format"); + return of(matchMap.get("project"), matchMap.get("location"), matchMap.get("application")); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List values) { + List list = new ArrayList<>(values.size()); + for (ApplicationName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION_APPLICATION.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (project != null) { + fieldMapBuilder.put("project", project); + } + if (location != null) { + fieldMapBuilder.put("location", location); + } + if (application != null) { + fieldMapBuilder.put("application", application); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION_APPLICATION.instantiate( + "project", project, "location", location, "application", application); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null && getClass() == o.getClass()) { + ApplicationName that = ((ApplicationName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location) + && Objects.equals(this.application, that.application); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(project); + h *= 1000003; + h ^= Objects.hashCode(location); + h *= 1000003; + h ^= Objects.hashCode(application); + return h; + } + + /** Builder for projects/{project}/locations/{location}/applications/{application}. */ + public static class Builder { + private String project; + private String location; + private String application; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getApplication() { + return application; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setApplication(String application) { + this.application = application; + return this; + } + + private Builder(ApplicationName applicationName) { + this.project = applicationName.project; + this.location = applicationName.location; + this.application = applicationName.application; + } + + public ApplicationName build() { + return new ApplicationName(this); + } + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ApplicationNodeAnnotation.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ApplicationNodeAnnotation.java new file mode 100644 index 000000000000..8da6192f99c8 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ApplicationNodeAnnotation.java @@ -0,0 +1,1124 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/platform.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * Message describing annotations specific to application node.
+ * This message is a duplication of StreamWithAnnotation.NodeAnnotation.
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.ApplicationNodeAnnotation} + */ +public final class ApplicationNodeAnnotation extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.ApplicationNodeAnnotation) + ApplicationNodeAnnotationOrBuilder { + private static final long serialVersionUID = 0L; + // Use ApplicationNodeAnnotation.newBuilder() to construct. + private ApplicationNodeAnnotation(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ApplicationNodeAnnotation() { + node_ = ""; + annotations_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ApplicationNodeAnnotation(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_ApplicationNodeAnnotation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_ApplicationNodeAnnotation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.ApplicationNodeAnnotation.class, + com.google.cloud.visionai.v1.ApplicationNodeAnnotation.Builder.class); + } + + public static final int NODE_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object node_ = ""; + /** + * + * + *
+   * The node name of the application graph.
+   * 
+ * + * string node = 1; + * + * @return The node. + */ + @java.lang.Override + public java.lang.String getNode() { + java.lang.Object ref = node_; + 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(); + node_ = s; + return s; + } + } + /** + * + * + *
+   * The node name of the application graph.
+   * 
+ * + * string node = 1; + * + * @return The bytes for node. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNodeBytes() { + java.lang.Object ref = node_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + node_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ANNOTATIONS_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private java.util.List annotations_; + /** + * + * + *
+   * The node specific stream annotations.
+   * 
+ * + * repeated .google.cloud.visionai.v1.StreamAnnotation annotations = 2; + */ + @java.lang.Override + public java.util.List getAnnotationsList() { + return annotations_; + } + /** + * + * + *
+   * The node specific stream annotations.
+   * 
+ * + * repeated .google.cloud.visionai.v1.StreamAnnotation annotations = 2; + */ + @java.lang.Override + public java.util.List + getAnnotationsOrBuilderList() { + return annotations_; + } + /** + * + * + *
+   * The node specific stream annotations.
+   * 
+ * + * repeated .google.cloud.visionai.v1.StreamAnnotation annotations = 2; + */ + @java.lang.Override + public int getAnnotationsCount() { + return annotations_.size(); + } + /** + * + * + *
+   * The node specific stream annotations.
+   * 
+ * + * repeated .google.cloud.visionai.v1.StreamAnnotation annotations = 2; + */ + @java.lang.Override + public com.google.cloud.visionai.v1.StreamAnnotation getAnnotations(int index) { + return annotations_.get(index); + } + /** + * + * + *
+   * The node specific stream annotations.
+   * 
+ * + * repeated .google.cloud.visionai.v1.StreamAnnotation annotations = 2; + */ + @java.lang.Override + public com.google.cloud.visionai.v1.StreamAnnotationOrBuilder getAnnotationsOrBuilder(int index) { + return annotations_.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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(node_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, node_); + } + for (int i = 0; i < annotations_.size(); i++) { + output.writeMessage(2, annotations_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(node_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, node_); + } + for (int i = 0; i < annotations_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, annotations_.get(i)); + } + size += getUnknownFields().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.visionai.v1.ApplicationNodeAnnotation)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.ApplicationNodeAnnotation other = + (com.google.cloud.visionai.v1.ApplicationNodeAnnotation) obj; + + if (!getNode().equals(other.getNode())) return false; + if (!getAnnotationsList().equals(other.getAnnotationsList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NODE_FIELD_NUMBER; + hash = (53 * hash) + getNode().hashCode(); + if (getAnnotationsCount() > 0) { + hash = (37 * hash) + ANNOTATIONS_FIELD_NUMBER; + hash = (53 * hash) + getAnnotationsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.ApplicationNodeAnnotation parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ApplicationNodeAnnotation 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.visionai.v1.ApplicationNodeAnnotation parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ApplicationNodeAnnotation 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.visionai.v1.ApplicationNodeAnnotation parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ApplicationNodeAnnotation parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.ApplicationNodeAnnotation parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ApplicationNodeAnnotation 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.visionai.v1.ApplicationNodeAnnotation parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ApplicationNodeAnnotation 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.visionai.v1.ApplicationNodeAnnotation parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ApplicationNodeAnnotation 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.visionai.v1.ApplicationNodeAnnotation 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; + } + /** + * + * + *
+   * Message describing annotations specific to application node.
+   * This message is a duplication of StreamWithAnnotation.NodeAnnotation.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.ApplicationNodeAnnotation} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.ApplicationNodeAnnotation) + com.google.cloud.visionai.v1.ApplicationNodeAnnotationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_ApplicationNodeAnnotation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_ApplicationNodeAnnotation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.ApplicationNodeAnnotation.class, + com.google.cloud.visionai.v1.ApplicationNodeAnnotation.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.ApplicationNodeAnnotation.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + node_ = ""; + if (annotationsBuilder_ == null) { + annotations_ = java.util.Collections.emptyList(); + } else { + annotations_ = null; + annotationsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_ApplicationNodeAnnotation_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ApplicationNodeAnnotation getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.ApplicationNodeAnnotation.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ApplicationNodeAnnotation build() { + com.google.cloud.visionai.v1.ApplicationNodeAnnotation result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ApplicationNodeAnnotation buildPartial() { + com.google.cloud.visionai.v1.ApplicationNodeAnnotation result = + new com.google.cloud.visionai.v1.ApplicationNodeAnnotation(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.visionai.v1.ApplicationNodeAnnotation result) { + if (annotationsBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + annotations_ = java.util.Collections.unmodifiableList(annotations_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.annotations_ = annotations_; + } else { + result.annotations_ = annotationsBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.visionai.v1.ApplicationNodeAnnotation result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.node_ = node_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.ApplicationNodeAnnotation) { + return mergeFrom((com.google.cloud.visionai.v1.ApplicationNodeAnnotation) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.ApplicationNodeAnnotation other) { + if (other == com.google.cloud.visionai.v1.ApplicationNodeAnnotation.getDefaultInstance()) + return this; + if (!other.getNode().isEmpty()) { + node_ = other.node_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (annotationsBuilder_ == null) { + if (!other.annotations_.isEmpty()) { + if (annotations_.isEmpty()) { + annotations_ = other.annotations_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureAnnotationsIsMutable(); + annotations_.addAll(other.annotations_); + } + onChanged(); + } + } else { + if (!other.annotations_.isEmpty()) { + if (annotationsBuilder_.isEmpty()) { + annotationsBuilder_.dispose(); + annotationsBuilder_ = null; + annotations_ = other.annotations_; + bitField0_ = (bitField0_ & ~0x00000002); + annotationsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getAnnotationsFieldBuilder() + : null; + } else { + annotationsBuilder_.addAllMessages(other.annotations_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + node_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + com.google.cloud.visionai.v1.StreamAnnotation m = + input.readMessage( + com.google.cloud.visionai.v1.StreamAnnotation.parser(), extensionRegistry); + if (annotationsBuilder_ == null) { + ensureAnnotationsIsMutable(); + annotations_.add(m); + } else { + annotationsBuilder_.addMessage(m); + } + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object node_ = ""; + /** + * + * + *
+     * The node name of the application graph.
+     * 
+ * + * string node = 1; + * + * @return The node. + */ + public java.lang.String getNode() { + java.lang.Object ref = node_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + node_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The node name of the application graph.
+     * 
+ * + * string node = 1; + * + * @return The bytes for node. + */ + public com.google.protobuf.ByteString getNodeBytes() { + java.lang.Object ref = node_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + node_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The node name of the application graph.
+     * 
+ * + * string node = 1; + * + * @param value The node to set. + * @return This builder for chaining. + */ + public Builder setNode(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + node_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The node name of the application graph.
+     * 
+ * + * string node = 1; + * + * @return This builder for chaining. + */ + public Builder clearNode() { + node_ = getDefaultInstance().getNode(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * The node name of the application graph.
+     * 
+ * + * string node = 1; + * + * @param value The bytes for node to set. + * @return This builder for chaining. + */ + public Builder setNodeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + node_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.util.List annotations_ = + java.util.Collections.emptyList(); + + private void ensureAnnotationsIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + annotations_ = + new java.util.ArrayList(annotations_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.visionai.v1.StreamAnnotation, + com.google.cloud.visionai.v1.StreamAnnotation.Builder, + com.google.cloud.visionai.v1.StreamAnnotationOrBuilder> + annotationsBuilder_; + + /** + * + * + *
+     * The node specific stream annotations.
+     * 
+ * + * repeated .google.cloud.visionai.v1.StreamAnnotation annotations = 2; + */ + public java.util.List getAnnotationsList() { + if (annotationsBuilder_ == null) { + return java.util.Collections.unmodifiableList(annotations_); + } else { + return annotationsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * The node specific stream annotations.
+     * 
+ * + * repeated .google.cloud.visionai.v1.StreamAnnotation annotations = 2; + */ + public int getAnnotationsCount() { + if (annotationsBuilder_ == null) { + return annotations_.size(); + } else { + return annotationsBuilder_.getCount(); + } + } + /** + * + * + *
+     * The node specific stream annotations.
+     * 
+ * + * repeated .google.cloud.visionai.v1.StreamAnnotation annotations = 2; + */ + public com.google.cloud.visionai.v1.StreamAnnotation getAnnotations(int index) { + if (annotationsBuilder_ == null) { + return annotations_.get(index); + } else { + return annotationsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * The node specific stream annotations.
+     * 
+ * + * repeated .google.cloud.visionai.v1.StreamAnnotation annotations = 2; + */ + public Builder setAnnotations(int index, com.google.cloud.visionai.v1.StreamAnnotation value) { + if (annotationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAnnotationsIsMutable(); + annotations_.set(index, value); + onChanged(); + } else { + annotationsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The node specific stream annotations.
+     * 
+ * + * repeated .google.cloud.visionai.v1.StreamAnnotation annotations = 2; + */ + public Builder setAnnotations( + int index, com.google.cloud.visionai.v1.StreamAnnotation.Builder builderForValue) { + if (annotationsBuilder_ == null) { + ensureAnnotationsIsMutable(); + annotations_.set(index, builderForValue.build()); + onChanged(); + } else { + annotationsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The node specific stream annotations.
+     * 
+ * + * repeated .google.cloud.visionai.v1.StreamAnnotation annotations = 2; + */ + public Builder addAnnotations(com.google.cloud.visionai.v1.StreamAnnotation value) { + if (annotationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAnnotationsIsMutable(); + annotations_.add(value); + onChanged(); + } else { + annotationsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * The node specific stream annotations.
+     * 
+ * + * repeated .google.cloud.visionai.v1.StreamAnnotation annotations = 2; + */ + public Builder addAnnotations(int index, com.google.cloud.visionai.v1.StreamAnnotation value) { + if (annotationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAnnotationsIsMutable(); + annotations_.add(index, value); + onChanged(); + } else { + annotationsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The node specific stream annotations.
+     * 
+ * + * repeated .google.cloud.visionai.v1.StreamAnnotation annotations = 2; + */ + public Builder addAnnotations( + com.google.cloud.visionai.v1.StreamAnnotation.Builder builderForValue) { + if (annotationsBuilder_ == null) { + ensureAnnotationsIsMutable(); + annotations_.add(builderForValue.build()); + onChanged(); + } else { + annotationsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The node specific stream annotations.
+     * 
+ * + * repeated .google.cloud.visionai.v1.StreamAnnotation annotations = 2; + */ + public Builder addAnnotations( + int index, com.google.cloud.visionai.v1.StreamAnnotation.Builder builderForValue) { + if (annotationsBuilder_ == null) { + ensureAnnotationsIsMutable(); + annotations_.add(index, builderForValue.build()); + onChanged(); + } else { + annotationsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The node specific stream annotations.
+     * 
+ * + * repeated .google.cloud.visionai.v1.StreamAnnotation annotations = 2; + */ + public Builder addAllAnnotations( + java.lang.Iterable values) { + if (annotationsBuilder_ == null) { + ensureAnnotationsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, annotations_); + onChanged(); + } else { + annotationsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * The node specific stream annotations.
+     * 
+ * + * repeated .google.cloud.visionai.v1.StreamAnnotation annotations = 2; + */ + public Builder clearAnnotations() { + if (annotationsBuilder_ == null) { + annotations_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + annotationsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The node specific stream annotations.
+     * 
+ * + * repeated .google.cloud.visionai.v1.StreamAnnotation annotations = 2; + */ + public Builder removeAnnotations(int index) { + if (annotationsBuilder_ == null) { + ensureAnnotationsIsMutable(); + annotations_.remove(index); + onChanged(); + } else { + annotationsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * The node specific stream annotations.
+     * 
+ * + * repeated .google.cloud.visionai.v1.StreamAnnotation annotations = 2; + */ + public com.google.cloud.visionai.v1.StreamAnnotation.Builder getAnnotationsBuilder(int index) { + return getAnnotationsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * The node specific stream annotations.
+     * 
+ * + * repeated .google.cloud.visionai.v1.StreamAnnotation annotations = 2; + */ + public com.google.cloud.visionai.v1.StreamAnnotationOrBuilder getAnnotationsOrBuilder( + int index) { + if (annotationsBuilder_ == null) { + return annotations_.get(index); + } else { + return annotationsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * The node specific stream annotations.
+     * 
+ * + * repeated .google.cloud.visionai.v1.StreamAnnotation annotations = 2; + */ + public java.util.List + getAnnotationsOrBuilderList() { + if (annotationsBuilder_ != null) { + return annotationsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(annotations_); + } + } + /** + * + * + *
+     * The node specific stream annotations.
+     * 
+ * + * repeated .google.cloud.visionai.v1.StreamAnnotation annotations = 2; + */ + public com.google.cloud.visionai.v1.StreamAnnotation.Builder addAnnotationsBuilder() { + return getAnnotationsFieldBuilder() + .addBuilder(com.google.cloud.visionai.v1.StreamAnnotation.getDefaultInstance()); + } + /** + * + * + *
+     * The node specific stream annotations.
+     * 
+ * + * repeated .google.cloud.visionai.v1.StreamAnnotation annotations = 2; + */ + public com.google.cloud.visionai.v1.StreamAnnotation.Builder addAnnotationsBuilder(int index) { + return getAnnotationsFieldBuilder() + .addBuilder(index, com.google.cloud.visionai.v1.StreamAnnotation.getDefaultInstance()); + } + /** + * + * + *
+     * The node specific stream annotations.
+     * 
+ * + * repeated .google.cloud.visionai.v1.StreamAnnotation annotations = 2; + */ + public java.util.List + getAnnotationsBuilderList() { + return getAnnotationsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.visionai.v1.StreamAnnotation, + com.google.cloud.visionai.v1.StreamAnnotation.Builder, + com.google.cloud.visionai.v1.StreamAnnotationOrBuilder> + getAnnotationsFieldBuilder() { + if (annotationsBuilder_ == null) { + annotationsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.visionai.v1.StreamAnnotation, + com.google.cloud.visionai.v1.StreamAnnotation.Builder, + com.google.cloud.visionai.v1.StreamAnnotationOrBuilder>( + annotations_, ((bitField0_ & 0x00000002) != 0), getParentForChildren(), isClean()); + annotations_ = null; + } + return annotationsBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.ApplicationNodeAnnotation) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.ApplicationNodeAnnotation) + private static final com.google.cloud.visionai.v1.ApplicationNodeAnnotation DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.ApplicationNodeAnnotation(); + } + + public static com.google.cloud.visionai.v1.ApplicationNodeAnnotation getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ApplicationNodeAnnotation parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.ApplicationNodeAnnotation getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ApplicationNodeAnnotationOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ApplicationNodeAnnotationOrBuilder.java new file mode 100644 index 000000000000..5e388785ddac --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ApplicationNodeAnnotationOrBuilder.java @@ -0,0 +1,103 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/platform.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface ApplicationNodeAnnotationOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.ApplicationNodeAnnotation) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The node name of the application graph.
+   * 
+ * + * string node = 1; + * + * @return The node. + */ + java.lang.String getNode(); + /** + * + * + *
+   * The node name of the application graph.
+   * 
+ * + * string node = 1; + * + * @return The bytes for node. + */ + com.google.protobuf.ByteString getNodeBytes(); + + /** + * + * + *
+   * The node specific stream annotations.
+   * 
+ * + * repeated .google.cloud.visionai.v1.StreamAnnotation annotations = 2; + */ + java.util.List getAnnotationsList(); + /** + * + * + *
+   * The node specific stream annotations.
+   * 
+ * + * repeated .google.cloud.visionai.v1.StreamAnnotation annotations = 2; + */ + com.google.cloud.visionai.v1.StreamAnnotation getAnnotations(int index); + /** + * + * + *
+   * The node specific stream annotations.
+   * 
+ * + * repeated .google.cloud.visionai.v1.StreamAnnotation annotations = 2; + */ + int getAnnotationsCount(); + /** + * + * + *
+   * The node specific stream annotations.
+   * 
+ * + * repeated .google.cloud.visionai.v1.StreamAnnotation annotations = 2; + */ + java.util.List + getAnnotationsOrBuilderList(); + /** + * + * + *
+   * The node specific stream annotations.
+   * 
+ * + * repeated .google.cloud.visionai.v1.StreamAnnotation annotations = 2; + */ + com.google.cloud.visionai.v1.StreamAnnotationOrBuilder getAnnotationsOrBuilder(int index); +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ApplicationOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ApplicationOrBuilder.java new file mode 100644 index 000000000000..4ef487bfc129 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ApplicationOrBuilder.java @@ -0,0 +1,369 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/platform.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface ApplicationOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.Application) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * name of resource
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * name of resource
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Output only. [Output only] Create timestamp
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + /** + * + * + *
+   * Output only. [Output only] Create timestamp
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + * + * + *
+   * Output only. [Output only] Create timestamp
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. [Output only] Update timestamp
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + /** + * + * + *
+   * Output only. [Output only] Update timestamp
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + /** + * + * + *
+   * Output only. [Output only] Update timestamp
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); + + /** + * + * + *
+   * Labels as key value pairs
+   * 
+ * + * map<string, string> labels = 4; + */ + int getLabelsCount(); + /** + * + * + *
+   * Labels as key value pairs
+   * 
+ * + * map<string, string> labels = 4; + */ + boolean containsLabels(java.lang.String key); + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Deprecated + java.util.Map getLabels(); + /** + * + * + *
+   * Labels as key value pairs
+   * 
+ * + * map<string, string> labels = 4; + */ + java.util.Map getLabelsMap(); + /** + * + * + *
+   * Labels as key value pairs
+   * 
+ * + * map<string, string> labels = 4; + */ + /* nullable */ + java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue); + /** + * + * + *
+   * Labels as key value pairs
+   * 
+ * + * map<string, string> labels = 4; + */ + java.lang.String getLabelsOrThrow(java.lang.String key); + + /** + * + * + *
+   * Required. A user friendly display name for the solution.
+   * 
+ * + * string display_name = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The displayName. + */ + java.lang.String getDisplayName(); + /** + * + * + *
+   * Required. A user friendly display name for the solution.
+   * 
+ * + * string display_name = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for displayName. + */ + com.google.protobuf.ByteString getDisplayNameBytes(); + + /** + * + * + *
+   * A description for this application.
+   * 
+ * + * string description = 6; + * + * @return The description. + */ + java.lang.String getDescription(); + /** + * + * + *
+   * A description for this application.
+   * 
+ * + * string description = 6; + * + * @return The bytes for description. + */ + com.google.protobuf.ByteString getDescriptionBytes(); + + /** + * + * + *
+   * Application graph configuration.
+   * 
+ * + * .google.cloud.visionai.v1.ApplicationConfigs application_configs = 7; + * + * @return Whether the applicationConfigs field is set. + */ + boolean hasApplicationConfigs(); + /** + * + * + *
+   * Application graph configuration.
+   * 
+ * + * .google.cloud.visionai.v1.ApplicationConfigs application_configs = 7; + * + * @return The applicationConfigs. + */ + com.google.cloud.visionai.v1.ApplicationConfigs getApplicationConfigs(); + /** + * + * + *
+   * Application graph configuration.
+   * 
+ * + * .google.cloud.visionai.v1.ApplicationConfigs application_configs = 7; + */ + com.google.cloud.visionai.v1.ApplicationConfigsOrBuilder getApplicationConfigsOrBuilder(); + + /** + * + * + *
+   * Output only. Application graph runtime info. Only exists when application
+   * state equals to DEPLOYED.
+   * 
+ * + * + * .google.cloud.visionai.v1.Application.ApplicationRuntimeInfo runtime_info = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the runtimeInfo field is set. + */ + boolean hasRuntimeInfo(); + /** + * + * + *
+   * Output only. Application graph runtime info. Only exists when application
+   * state equals to DEPLOYED.
+   * 
+ * + * + * .google.cloud.visionai.v1.Application.ApplicationRuntimeInfo runtime_info = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The runtimeInfo. + */ + com.google.cloud.visionai.v1.Application.ApplicationRuntimeInfo getRuntimeInfo(); + /** + * + * + *
+   * Output only. Application graph runtime info. Only exists when application
+   * state equals to DEPLOYED.
+   * 
+ * + * + * .google.cloud.visionai.v1.Application.ApplicationRuntimeInfo runtime_info = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.visionai.v1.Application.ApplicationRuntimeInfoOrBuilder + getRuntimeInfoOrBuilder(); + + /** + * + * + *
+   * Output only. State of the application.
+   * 
+ * + * + * .google.cloud.visionai.v1.Application.State state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + int getStateValue(); + /** + * + * + *
+   * Output only. State of the application.
+   * 
+ * + * + * .google.cloud.visionai.v1.Application.State state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + com.google.cloud.visionai.v1.Application.State getState(); + + /** + * + * + *
+   * Billing mode of the application.
+   * 
+ * + * .google.cloud.visionai.v1.Application.BillingMode billing_mode = 12; + * + * @return The enum numeric value on the wire for billingMode. + */ + int getBillingModeValue(); + /** + * + * + *
+   * Billing mode of the application.
+   * 
+ * + * .google.cloud.visionai.v1.Application.BillingMode billing_mode = 12; + * + * @return The billingMode. + */ + com.google.cloud.visionai.v1.Application.BillingMode getBillingMode(); +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ApplicationStreamInput.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ApplicationStreamInput.java new file mode 100644 index 000000000000..3efeaf142b8a --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ApplicationStreamInput.java @@ -0,0 +1,645 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/platform.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * Message about a single stream input config.
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.ApplicationStreamInput} + */ +public final class ApplicationStreamInput extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.ApplicationStreamInput) + ApplicationStreamInputOrBuilder { + private static final long serialVersionUID = 0L; + // Use ApplicationStreamInput.newBuilder() to construct. + private ApplicationStreamInput(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ApplicationStreamInput() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ApplicationStreamInput(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_ApplicationStreamInput_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_ApplicationStreamInput_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.ApplicationStreamInput.class, + com.google.cloud.visionai.v1.ApplicationStreamInput.Builder.class); + } + + private int bitField0_; + public static final int STREAM_WITH_ANNOTATION_FIELD_NUMBER = 1; + private com.google.cloud.visionai.v1.StreamWithAnnotation streamWithAnnotation_; + /** + * .google.cloud.visionai.v1.StreamWithAnnotation stream_with_annotation = 1; + * + * @return Whether the streamWithAnnotation field is set. + */ + @java.lang.Override + public boolean hasStreamWithAnnotation() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * .google.cloud.visionai.v1.StreamWithAnnotation stream_with_annotation = 1; + * + * @return The streamWithAnnotation. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.StreamWithAnnotation getStreamWithAnnotation() { + return streamWithAnnotation_ == null + ? com.google.cloud.visionai.v1.StreamWithAnnotation.getDefaultInstance() + : streamWithAnnotation_; + } + /** .google.cloud.visionai.v1.StreamWithAnnotation stream_with_annotation = 1; */ + @java.lang.Override + public com.google.cloud.visionai.v1.StreamWithAnnotationOrBuilder + getStreamWithAnnotationOrBuilder() { + return streamWithAnnotation_ == null + ? com.google.cloud.visionai.v1.StreamWithAnnotation.getDefaultInstance() + : streamWithAnnotation_; + } + + 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 (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getStreamWithAnnotation()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(1, getStreamWithAnnotation()); + } + size += getUnknownFields().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.visionai.v1.ApplicationStreamInput)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.ApplicationStreamInput other = + (com.google.cloud.visionai.v1.ApplicationStreamInput) obj; + + if (hasStreamWithAnnotation() != other.hasStreamWithAnnotation()) return false; + if (hasStreamWithAnnotation()) { + if (!getStreamWithAnnotation().equals(other.getStreamWithAnnotation())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasStreamWithAnnotation()) { + hash = (37 * hash) + STREAM_WITH_ANNOTATION_FIELD_NUMBER; + hash = (53 * hash) + getStreamWithAnnotation().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.ApplicationStreamInput parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ApplicationStreamInput 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.visionai.v1.ApplicationStreamInput parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ApplicationStreamInput 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.visionai.v1.ApplicationStreamInput parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ApplicationStreamInput parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.ApplicationStreamInput parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ApplicationStreamInput 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.visionai.v1.ApplicationStreamInput parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ApplicationStreamInput 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.visionai.v1.ApplicationStreamInput parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ApplicationStreamInput 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.visionai.v1.ApplicationStreamInput 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; + } + /** + * + * + *
+   * Message about a single stream input config.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.ApplicationStreamInput} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.ApplicationStreamInput) + com.google.cloud.visionai.v1.ApplicationStreamInputOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_ApplicationStreamInput_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_ApplicationStreamInput_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.ApplicationStreamInput.class, + com.google.cloud.visionai.v1.ApplicationStreamInput.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.ApplicationStreamInput.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getStreamWithAnnotationFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + streamWithAnnotation_ = null; + if (streamWithAnnotationBuilder_ != null) { + streamWithAnnotationBuilder_.dispose(); + streamWithAnnotationBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_ApplicationStreamInput_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ApplicationStreamInput getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.ApplicationStreamInput.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ApplicationStreamInput build() { + com.google.cloud.visionai.v1.ApplicationStreamInput result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ApplicationStreamInput buildPartial() { + com.google.cloud.visionai.v1.ApplicationStreamInput result = + new com.google.cloud.visionai.v1.ApplicationStreamInput(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.visionai.v1.ApplicationStreamInput result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.streamWithAnnotation_ = + streamWithAnnotationBuilder_ == null + ? streamWithAnnotation_ + : streamWithAnnotationBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.ApplicationStreamInput) { + return mergeFrom((com.google.cloud.visionai.v1.ApplicationStreamInput) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.ApplicationStreamInput other) { + if (other == com.google.cloud.visionai.v1.ApplicationStreamInput.getDefaultInstance()) + return this; + if (other.hasStreamWithAnnotation()) { + mergeStreamWithAnnotation(other.getStreamWithAnnotation()); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage( + getStreamWithAnnotationFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.cloud.visionai.v1.StreamWithAnnotation streamWithAnnotation_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.StreamWithAnnotation, + com.google.cloud.visionai.v1.StreamWithAnnotation.Builder, + com.google.cloud.visionai.v1.StreamWithAnnotationOrBuilder> + streamWithAnnotationBuilder_; + /** + * .google.cloud.visionai.v1.StreamWithAnnotation stream_with_annotation = 1; + * + * @return Whether the streamWithAnnotation field is set. + */ + public boolean hasStreamWithAnnotation() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * .google.cloud.visionai.v1.StreamWithAnnotation stream_with_annotation = 1; + * + * @return The streamWithAnnotation. + */ + public com.google.cloud.visionai.v1.StreamWithAnnotation getStreamWithAnnotation() { + if (streamWithAnnotationBuilder_ == null) { + return streamWithAnnotation_ == null + ? com.google.cloud.visionai.v1.StreamWithAnnotation.getDefaultInstance() + : streamWithAnnotation_; + } else { + return streamWithAnnotationBuilder_.getMessage(); + } + } + /** .google.cloud.visionai.v1.StreamWithAnnotation stream_with_annotation = 1; */ + public Builder setStreamWithAnnotation( + com.google.cloud.visionai.v1.StreamWithAnnotation value) { + if (streamWithAnnotationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + streamWithAnnotation_ = value; + } else { + streamWithAnnotationBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** .google.cloud.visionai.v1.StreamWithAnnotation stream_with_annotation = 1; */ + public Builder setStreamWithAnnotation( + com.google.cloud.visionai.v1.StreamWithAnnotation.Builder builderForValue) { + if (streamWithAnnotationBuilder_ == null) { + streamWithAnnotation_ = builderForValue.build(); + } else { + streamWithAnnotationBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** .google.cloud.visionai.v1.StreamWithAnnotation stream_with_annotation = 1; */ + public Builder mergeStreamWithAnnotation( + com.google.cloud.visionai.v1.StreamWithAnnotation value) { + if (streamWithAnnotationBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && streamWithAnnotation_ != null + && streamWithAnnotation_ + != com.google.cloud.visionai.v1.StreamWithAnnotation.getDefaultInstance()) { + getStreamWithAnnotationBuilder().mergeFrom(value); + } else { + streamWithAnnotation_ = value; + } + } else { + streamWithAnnotationBuilder_.mergeFrom(value); + } + if (streamWithAnnotation_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + /** .google.cloud.visionai.v1.StreamWithAnnotation stream_with_annotation = 1; */ + public Builder clearStreamWithAnnotation() { + bitField0_ = (bitField0_ & ~0x00000001); + streamWithAnnotation_ = null; + if (streamWithAnnotationBuilder_ != null) { + streamWithAnnotationBuilder_.dispose(); + streamWithAnnotationBuilder_ = null; + } + onChanged(); + return this; + } + /** .google.cloud.visionai.v1.StreamWithAnnotation stream_with_annotation = 1; */ + public com.google.cloud.visionai.v1.StreamWithAnnotation.Builder + getStreamWithAnnotationBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getStreamWithAnnotationFieldBuilder().getBuilder(); + } + /** .google.cloud.visionai.v1.StreamWithAnnotation stream_with_annotation = 1; */ + public com.google.cloud.visionai.v1.StreamWithAnnotationOrBuilder + getStreamWithAnnotationOrBuilder() { + if (streamWithAnnotationBuilder_ != null) { + return streamWithAnnotationBuilder_.getMessageOrBuilder(); + } else { + return streamWithAnnotation_ == null + ? com.google.cloud.visionai.v1.StreamWithAnnotation.getDefaultInstance() + : streamWithAnnotation_; + } + } + /** .google.cloud.visionai.v1.StreamWithAnnotation stream_with_annotation = 1; */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.StreamWithAnnotation, + com.google.cloud.visionai.v1.StreamWithAnnotation.Builder, + com.google.cloud.visionai.v1.StreamWithAnnotationOrBuilder> + getStreamWithAnnotationFieldBuilder() { + if (streamWithAnnotationBuilder_ == null) { + streamWithAnnotationBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.StreamWithAnnotation, + com.google.cloud.visionai.v1.StreamWithAnnotation.Builder, + com.google.cloud.visionai.v1.StreamWithAnnotationOrBuilder>( + getStreamWithAnnotation(), getParentForChildren(), isClean()); + streamWithAnnotation_ = null; + } + return streamWithAnnotationBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.ApplicationStreamInput) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.ApplicationStreamInput) + private static final com.google.cloud.visionai.v1.ApplicationStreamInput DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.ApplicationStreamInput(); + } + + public static com.google.cloud.visionai.v1.ApplicationStreamInput getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ApplicationStreamInput parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.ApplicationStreamInput getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ApplicationStreamInputOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ApplicationStreamInputOrBuilder.java new file mode 100644 index 000000000000..dac6ff04fc21 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ApplicationStreamInputOrBuilder.java @@ -0,0 +1,41 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/platform.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface ApplicationStreamInputOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.ApplicationStreamInput) + com.google.protobuf.MessageOrBuilder { + + /** + * .google.cloud.visionai.v1.StreamWithAnnotation stream_with_annotation = 1; + * + * @return Whether the streamWithAnnotation field is set. + */ + boolean hasStreamWithAnnotation(); + /** + * .google.cloud.visionai.v1.StreamWithAnnotation stream_with_annotation = 1; + * + * @return The streamWithAnnotation. + */ + com.google.cloud.visionai.v1.StreamWithAnnotation getStreamWithAnnotation(); + /** .google.cloud.visionai.v1.StreamWithAnnotation stream_with_annotation = 1; */ + com.google.cloud.visionai.v1.StreamWithAnnotationOrBuilder getStreamWithAnnotationOrBuilder(); +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/Asset.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/Asset.java new file mode 100644 index 000000000000..e8ce2a298e21 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/Asset.java @@ -0,0 +1,1247 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/warehouse.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * An asset is a resource in corpus. It represents a media object inside corpus,
+ * contains metadata and another resource annotation. Different feature could be
+ * applied to the asset to generate annotations. User could specified annotation
+ * related to the target asset.
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.Asset} + */ +public final class Asset extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.Asset) + AssetOrBuilder { + private static final long serialVersionUID = 0L; + // Use Asset.newBuilder() to construct. + private Asset(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Asset() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Asset(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_Asset_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_Asset_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.Asset.class, + com.google.cloud.visionai.v1.Asset.Builder.class); + } + + private int bitField0_; + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Resource name of the asset.
+   * Format:
+   * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/assets/{asset_id}`
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + 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(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Resource name of the asset.
+   * Format:
+   * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/assets/{asset_id}`
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TTL_FIELD_NUMBER = 2; + private com.google.protobuf.Duration ttl_; + /** + * + * + *
+   * The duration for which all media assets, associated metadata, and search
+   * documents can exist. If not set, then it will using the default ttl in the
+   * parent corpus resource.
+   * 
+ * + * .google.protobuf.Duration ttl = 2; + * + * @return Whether the ttl field is set. + */ + @java.lang.Override + public boolean hasTtl() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * The duration for which all media assets, associated metadata, and search
+   * documents can exist. If not set, then it will using the default ttl in the
+   * parent corpus resource.
+   * 
+ * + * .google.protobuf.Duration ttl = 2; + * + * @return The ttl. + */ + @java.lang.Override + public com.google.protobuf.Duration getTtl() { + return ttl_ == null ? com.google.protobuf.Duration.getDefaultInstance() : ttl_; + } + /** + * + * + *
+   * The duration for which all media assets, associated metadata, and search
+   * documents can exist. If not set, then it will using the default ttl in the
+   * parent corpus resource.
+   * 
+ * + * .google.protobuf.Duration ttl = 2; + */ + @java.lang.Override + public com.google.protobuf.DurationOrBuilder getTtlOrBuilder() { + return ttl_ == null ? com.google.protobuf.Duration.getDefaultInstance() : ttl_; + } + + public static final int ASSET_GCS_SOURCE_FIELD_NUMBER = 4; + private com.google.cloud.visionai.v1.AssetSource.AssetGcsSource assetGcsSource_; + /** + * + * + *
+   * Output only. The original cloud storage source uri that is associated with
+   * this asset.
+   * 
+ * + * + * .google.cloud.visionai.v1.AssetSource.AssetGcsSource asset_gcs_source = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the assetGcsSource field is set. + */ + @java.lang.Override + public boolean hasAssetGcsSource() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+   * Output only. The original cloud storage source uri that is associated with
+   * this asset.
+   * 
+ * + * + * .google.cloud.visionai.v1.AssetSource.AssetGcsSource asset_gcs_source = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The assetGcsSource. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.AssetSource.AssetGcsSource getAssetGcsSource() { + return assetGcsSource_ == null + ? com.google.cloud.visionai.v1.AssetSource.AssetGcsSource.getDefaultInstance() + : assetGcsSource_; + } + /** + * + * + *
+   * Output only. The original cloud storage source uri that is associated with
+   * this asset.
+   * 
+ * + * + * .google.cloud.visionai.v1.AssetSource.AssetGcsSource asset_gcs_source = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.visionai.v1.AssetSource.AssetGcsSourceOrBuilder + getAssetGcsSourceOrBuilder() { + return assetGcsSource_ == null + ? com.google.cloud.visionai.v1.AssetSource.AssetGcsSource.getDefaultInstance() + : assetGcsSource_; + } + + 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getTtl()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(4, getAssetGcsSource()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getTtl()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getAssetGcsSource()); + } + size += getUnknownFields().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.visionai.v1.Asset)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.Asset other = (com.google.cloud.visionai.v1.Asset) obj; + + if (!getName().equals(other.getName())) return false; + if (hasTtl() != other.hasTtl()) return false; + if (hasTtl()) { + if (!getTtl().equals(other.getTtl())) return false; + } + if (hasAssetGcsSource() != other.hasAssetGcsSource()) return false; + if (hasAssetGcsSource()) { + if (!getAssetGcsSource().equals(other.getAssetGcsSource())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + if (hasTtl()) { + hash = (37 * hash) + TTL_FIELD_NUMBER; + hash = (53 * hash) + getTtl().hashCode(); + } + if (hasAssetGcsSource()) { + hash = (37 * hash) + ASSET_GCS_SOURCE_FIELD_NUMBER; + hash = (53 * hash) + getAssetGcsSource().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.Asset parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.Asset 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.visionai.v1.Asset parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.Asset 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.visionai.v1.Asset parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.Asset parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.Asset parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.Asset 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.visionai.v1.Asset parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.Asset 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.visionai.v1.Asset parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.Asset 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.visionai.v1.Asset 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; + } + /** + * + * + *
+   * An asset is a resource in corpus. It represents a media object inside corpus,
+   * contains metadata and another resource annotation. Different feature could be
+   * applied to the asset to generate annotations. User could specified annotation
+   * related to the target asset.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.Asset} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.Asset) + com.google.cloud.visionai.v1.AssetOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_Asset_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_Asset_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.Asset.class, + com.google.cloud.visionai.v1.Asset.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.Asset.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getTtlFieldBuilder(); + getAssetGcsSourceFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + ttl_ = null; + if (ttlBuilder_ != null) { + ttlBuilder_.dispose(); + ttlBuilder_ = null; + } + assetGcsSource_ = null; + if (assetGcsSourceBuilder_ != null) { + assetGcsSourceBuilder_.dispose(); + assetGcsSourceBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_Asset_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.Asset getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.Asset.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.Asset build() { + com.google.cloud.visionai.v1.Asset result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.Asset buildPartial() { + com.google.cloud.visionai.v1.Asset result = new com.google.cloud.visionai.v1.Asset(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.visionai.v1.Asset result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.ttl_ = ttlBuilder_ == null ? ttl_ : ttlBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.assetGcsSource_ = + assetGcsSourceBuilder_ == null ? assetGcsSource_ : assetGcsSourceBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.Asset) { + return mergeFrom((com.google.cloud.visionai.v1.Asset) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.Asset other) { + if (other == com.google.cloud.visionai.v1.Asset.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasTtl()) { + mergeTtl(other.getTtl()); + } + if (other.hasAssetGcsSource()) { + mergeAssetGcsSource(other.getAssetGcsSource()); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage(getTtlFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 34: + { + input.readMessage(getAssetGcsSourceFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 34 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Resource name of the asset.
+     * Format:
+     * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/assets/{asset_id}`
+     * 
+ * + * string name = 1; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Resource name of the asset.
+     * Format:
+     * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/assets/{asset_id}`
+     * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Resource name of the asset.
+     * Format:
+     * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/assets/{asset_id}`
+     * 
+ * + * string name = 1; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Resource name of the asset.
+     * Format:
+     * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/assets/{asset_id}`
+     * 
+ * + * string name = 1; + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Resource name of the asset.
+     * Format:
+     * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/assets/{asset_id}`
+     * 
+ * + * string name = 1; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.protobuf.Duration ttl_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + ttlBuilder_; + /** + * + * + *
+     * The duration for which all media assets, associated metadata, and search
+     * documents can exist. If not set, then it will using the default ttl in the
+     * parent corpus resource.
+     * 
+ * + * .google.protobuf.Duration ttl = 2; + * + * @return Whether the ttl field is set. + */ + public boolean hasTtl() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * The duration for which all media assets, associated metadata, and search
+     * documents can exist. If not set, then it will using the default ttl in the
+     * parent corpus resource.
+     * 
+ * + * .google.protobuf.Duration ttl = 2; + * + * @return The ttl. + */ + public com.google.protobuf.Duration getTtl() { + if (ttlBuilder_ == null) { + return ttl_ == null ? com.google.protobuf.Duration.getDefaultInstance() : ttl_; + } else { + return ttlBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The duration for which all media assets, associated metadata, and search
+     * documents can exist. If not set, then it will using the default ttl in the
+     * parent corpus resource.
+     * 
+ * + * .google.protobuf.Duration ttl = 2; + */ + public Builder setTtl(com.google.protobuf.Duration value) { + if (ttlBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ttl_ = value; + } else { + ttlBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * The duration for which all media assets, associated metadata, and search
+     * documents can exist. If not set, then it will using the default ttl in the
+     * parent corpus resource.
+     * 
+ * + * .google.protobuf.Duration ttl = 2; + */ + public Builder setTtl(com.google.protobuf.Duration.Builder builderForValue) { + if (ttlBuilder_ == null) { + ttl_ = builderForValue.build(); + } else { + ttlBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * The duration for which all media assets, associated metadata, and search
+     * documents can exist. If not set, then it will using the default ttl in the
+     * parent corpus resource.
+     * 
+ * + * .google.protobuf.Duration ttl = 2; + */ + public Builder mergeTtl(com.google.protobuf.Duration value) { + if (ttlBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && ttl_ != null + && ttl_ != com.google.protobuf.Duration.getDefaultInstance()) { + getTtlBuilder().mergeFrom(value); + } else { + ttl_ = value; + } + } else { + ttlBuilder_.mergeFrom(value); + } + if (ttl_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + /** + * + * + *
+     * The duration for which all media assets, associated metadata, and search
+     * documents can exist. If not set, then it will using the default ttl in the
+     * parent corpus resource.
+     * 
+ * + * .google.protobuf.Duration ttl = 2; + */ + public Builder clearTtl() { + bitField0_ = (bitField0_ & ~0x00000002); + ttl_ = null; + if (ttlBuilder_ != null) { + ttlBuilder_.dispose(); + ttlBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * The duration for which all media assets, associated metadata, and search
+     * documents can exist. If not set, then it will using the default ttl in the
+     * parent corpus resource.
+     * 
+ * + * .google.protobuf.Duration ttl = 2; + */ + public com.google.protobuf.Duration.Builder getTtlBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getTtlFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The duration for which all media assets, associated metadata, and search
+     * documents can exist. If not set, then it will using the default ttl in the
+     * parent corpus resource.
+     * 
+ * + * .google.protobuf.Duration ttl = 2; + */ + public com.google.protobuf.DurationOrBuilder getTtlOrBuilder() { + if (ttlBuilder_ != null) { + return ttlBuilder_.getMessageOrBuilder(); + } else { + return ttl_ == null ? com.google.protobuf.Duration.getDefaultInstance() : ttl_; + } + } + /** + * + * + *
+     * The duration for which all media assets, associated metadata, and search
+     * documents can exist. If not set, then it will using the default ttl in the
+     * parent corpus resource.
+     * 
+ * + * .google.protobuf.Duration ttl = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + getTtlFieldBuilder() { + if (ttlBuilder_ == null) { + ttlBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder>(getTtl(), getParentForChildren(), isClean()); + ttl_ = null; + } + return ttlBuilder_; + } + + private com.google.cloud.visionai.v1.AssetSource.AssetGcsSource assetGcsSource_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.AssetSource.AssetGcsSource, + com.google.cloud.visionai.v1.AssetSource.AssetGcsSource.Builder, + com.google.cloud.visionai.v1.AssetSource.AssetGcsSourceOrBuilder> + assetGcsSourceBuilder_; + /** + * + * + *
+     * Output only. The original cloud storage source uri that is associated with
+     * this asset.
+     * 
+ * + * + * .google.cloud.visionai.v1.AssetSource.AssetGcsSource asset_gcs_source = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the assetGcsSource field is set. + */ + public boolean hasAssetGcsSource() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+     * Output only. The original cloud storage source uri that is associated with
+     * this asset.
+     * 
+ * + * + * .google.cloud.visionai.v1.AssetSource.AssetGcsSource asset_gcs_source = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The assetGcsSource. + */ + public com.google.cloud.visionai.v1.AssetSource.AssetGcsSource getAssetGcsSource() { + if (assetGcsSourceBuilder_ == null) { + return assetGcsSource_ == null + ? com.google.cloud.visionai.v1.AssetSource.AssetGcsSource.getDefaultInstance() + : assetGcsSource_; + } else { + return assetGcsSourceBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. The original cloud storage source uri that is associated with
+     * this asset.
+     * 
+ * + * + * .google.cloud.visionai.v1.AssetSource.AssetGcsSource asset_gcs_source = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setAssetGcsSource( + com.google.cloud.visionai.v1.AssetSource.AssetGcsSource value) { + if (assetGcsSourceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + assetGcsSource_ = value; + } else { + assetGcsSourceBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The original cloud storage source uri that is associated with
+     * this asset.
+     * 
+ * + * + * .google.cloud.visionai.v1.AssetSource.AssetGcsSource asset_gcs_source = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setAssetGcsSource( + com.google.cloud.visionai.v1.AssetSource.AssetGcsSource.Builder builderForValue) { + if (assetGcsSourceBuilder_ == null) { + assetGcsSource_ = builderForValue.build(); + } else { + assetGcsSourceBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The original cloud storage source uri that is associated with
+     * this asset.
+     * 
+ * + * + * .google.cloud.visionai.v1.AssetSource.AssetGcsSource asset_gcs_source = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeAssetGcsSource( + com.google.cloud.visionai.v1.AssetSource.AssetGcsSource value) { + if (assetGcsSourceBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && assetGcsSource_ != null + && assetGcsSource_ + != com.google.cloud.visionai.v1.AssetSource.AssetGcsSource.getDefaultInstance()) { + getAssetGcsSourceBuilder().mergeFrom(value); + } else { + assetGcsSource_ = value; + } + } else { + assetGcsSourceBuilder_.mergeFrom(value); + } + if (assetGcsSource_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Output only. The original cloud storage source uri that is associated with
+     * this asset.
+     * 
+ * + * + * .google.cloud.visionai.v1.AssetSource.AssetGcsSource asset_gcs_source = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearAssetGcsSource() { + bitField0_ = (bitField0_ & ~0x00000004); + assetGcsSource_ = null; + if (assetGcsSourceBuilder_ != null) { + assetGcsSourceBuilder_.dispose(); + assetGcsSourceBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The original cloud storage source uri that is associated with
+     * this asset.
+     * 
+ * + * + * .google.cloud.visionai.v1.AssetSource.AssetGcsSource asset_gcs_source = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.visionai.v1.AssetSource.AssetGcsSource.Builder + getAssetGcsSourceBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getAssetGcsSourceFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. The original cloud storage source uri that is associated with
+     * this asset.
+     * 
+ * + * + * .google.cloud.visionai.v1.AssetSource.AssetGcsSource asset_gcs_source = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.visionai.v1.AssetSource.AssetGcsSourceOrBuilder + getAssetGcsSourceOrBuilder() { + if (assetGcsSourceBuilder_ != null) { + return assetGcsSourceBuilder_.getMessageOrBuilder(); + } else { + return assetGcsSource_ == null + ? com.google.cloud.visionai.v1.AssetSource.AssetGcsSource.getDefaultInstance() + : assetGcsSource_; + } + } + /** + * + * + *
+     * Output only. The original cloud storage source uri that is associated with
+     * this asset.
+     * 
+ * + * + * .google.cloud.visionai.v1.AssetSource.AssetGcsSource asset_gcs_source = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.AssetSource.AssetGcsSource, + com.google.cloud.visionai.v1.AssetSource.AssetGcsSource.Builder, + com.google.cloud.visionai.v1.AssetSource.AssetGcsSourceOrBuilder> + getAssetGcsSourceFieldBuilder() { + if (assetGcsSourceBuilder_ == null) { + assetGcsSourceBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.AssetSource.AssetGcsSource, + com.google.cloud.visionai.v1.AssetSource.AssetGcsSource.Builder, + com.google.cloud.visionai.v1.AssetSource.AssetGcsSourceOrBuilder>( + getAssetGcsSource(), getParentForChildren(), isClean()); + assetGcsSource_ = null; + } + return assetGcsSourceBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.Asset) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.Asset) + private static final com.google.cloud.visionai.v1.Asset DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.Asset(); + } + + public static com.google.cloud.visionai.v1.Asset getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Asset parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.Asset getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/AssetName.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/AssetName.java new file mode 100644 index 000000000000..a801f97031d6 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/AssetName.java @@ -0,0 +1,257 @@ +/* + * Copyright 2024 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.visionai.v1; + +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") +public class AssetName implements ResourceName { + private static final PathTemplate PROJECT_NUMBER_LOCATION_CORPUS_ASSET = + PathTemplate.createWithoutUrlEncoding( + "projects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset}"); + private volatile Map fieldValuesMap; + private final String projectNumber; + private final String location; + private final String corpus; + private final String asset; + + @Deprecated + protected AssetName() { + projectNumber = null; + location = null; + corpus = null; + asset = null; + } + + private AssetName(Builder builder) { + projectNumber = Preconditions.checkNotNull(builder.getProjectNumber()); + location = Preconditions.checkNotNull(builder.getLocation()); + corpus = Preconditions.checkNotNull(builder.getCorpus()); + asset = Preconditions.checkNotNull(builder.getAsset()); + } + + public String getProjectNumber() { + return projectNumber; + } + + public String getLocation() { + return location; + } + + public String getCorpus() { + return corpus; + } + + public String getAsset() { + return asset; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static AssetName of(String projectNumber, String location, String corpus, String asset) { + return newBuilder() + .setProjectNumber(projectNumber) + .setLocation(location) + .setCorpus(corpus) + .setAsset(asset) + .build(); + } + + public static String format(String projectNumber, String location, String corpus, String asset) { + return newBuilder() + .setProjectNumber(projectNumber) + .setLocation(location) + .setCorpus(corpus) + .setAsset(asset) + .build() + .toString(); + } + + public static AssetName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_NUMBER_LOCATION_CORPUS_ASSET.validatedMatch( + formattedString, "AssetName.parse: formattedString not in valid format"); + return of( + matchMap.get("project_number"), + matchMap.get("location"), + matchMap.get("corpus"), + matchMap.get("asset")); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List values) { + List list = new ArrayList<>(values.size()); + for (AssetName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_NUMBER_LOCATION_CORPUS_ASSET.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (projectNumber != null) { + fieldMapBuilder.put("project_number", projectNumber); + } + if (location != null) { + fieldMapBuilder.put("location", location); + } + if (corpus != null) { + fieldMapBuilder.put("corpus", corpus); + } + if (asset != null) { + fieldMapBuilder.put("asset", asset); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_NUMBER_LOCATION_CORPUS_ASSET.instantiate( + "project_number", projectNumber, "location", location, "corpus", corpus, "asset", asset); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null && getClass() == o.getClass()) { + AssetName that = ((AssetName) o); + return Objects.equals(this.projectNumber, that.projectNumber) + && Objects.equals(this.location, that.location) + && Objects.equals(this.corpus, that.corpus) + && Objects.equals(this.asset, that.asset); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(projectNumber); + h *= 1000003; + h ^= Objects.hashCode(location); + h *= 1000003; + h ^= Objects.hashCode(corpus); + h *= 1000003; + h ^= Objects.hashCode(asset); + return h; + } + + /** Builder for projects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset}. */ + public static class Builder { + private String projectNumber; + private String location; + private String corpus; + private String asset; + + protected Builder() {} + + public String getProjectNumber() { + return projectNumber; + } + + public String getLocation() { + return location; + } + + public String getCorpus() { + return corpus; + } + + public String getAsset() { + return asset; + } + + public Builder setProjectNumber(String projectNumber) { + this.projectNumber = projectNumber; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setCorpus(String corpus) { + this.corpus = corpus; + return this; + } + + public Builder setAsset(String asset) { + this.asset = asset; + return this; + } + + private Builder(AssetName assetName) { + this.projectNumber = assetName.projectNumber; + this.location = assetName.location; + this.corpus = assetName.corpus; + this.asset = assetName.asset; + } + + public AssetName build() { + return new AssetName(this); + } + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/AssetOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/AssetOrBuilder.java new file mode 100644 index 000000000000..b3955d3014d1 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/AssetOrBuilder.java @@ -0,0 +1,140 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/warehouse.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface AssetOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.Asset) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Resource name of the asset.
+   * Format:
+   * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/assets/{asset_id}`
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Resource name of the asset.
+   * Format:
+   * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/assets/{asset_id}`
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * The duration for which all media assets, associated metadata, and search
+   * documents can exist. If not set, then it will using the default ttl in the
+   * parent corpus resource.
+   * 
+ * + * .google.protobuf.Duration ttl = 2; + * + * @return Whether the ttl field is set. + */ + boolean hasTtl(); + /** + * + * + *
+   * The duration for which all media assets, associated metadata, and search
+   * documents can exist. If not set, then it will using the default ttl in the
+   * parent corpus resource.
+   * 
+ * + * .google.protobuf.Duration ttl = 2; + * + * @return The ttl. + */ + com.google.protobuf.Duration getTtl(); + /** + * + * + *
+   * The duration for which all media assets, associated metadata, and search
+   * documents can exist. If not set, then it will using the default ttl in the
+   * parent corpus resource.
+   * 
+ * + * .google.protobuf.Duration ttl = 2; + */ + com.google.protobuf.DurationOrBuilder getTtlOrBuilder(); + + /** + * + * + *
+   * Output only. The original cloud storage source uri that is associated with
+   * this asset.
+   * 
+ * + * + * .google.cloud.visionai.v1.AssetSource.AssetGcsSource asset_gcs_source = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the assetGcsSource field is set. + */ + boolean hasAssetGcsSource(); + /** + * + * + *
+   * Output only. The original cloud storage source uri that is associated with
+   * this asset.
+   * 
+ * + * + * .google.cloud.visionai.v1.AssetSource.AssetGcsSource asset_gcs_source = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The assetGcsSource. + */ + com.google.cloud.visionai.v1.AssetSource.AssetGcsSource getAssetGcsSource(); + /** + * + * + *
+   * Output only. The original cloud storage source uri that is associated with
+   * this asset.
+   * 
+ * + * + * .google.cloud.visionai.v1.AssetSource.AssetGcsSource asset_gcs_source = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.visionai.v1.AssetSource.AssetGcsSourceOrBuilder getAssetGcsSourceOrBuilder(); +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/AssetSource.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/AssetSource.java new file mode 100644 index 000000000000..3a677a45d476 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/AssetSource.java @@ -0,0 +1,2283 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/warehouse.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * The source of the asset.
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.AssetSource} + */ +public final class AssetSource extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.AssetSource) + AssetSourceOrBuilder { + private static final long serialVersionUID = 0L; + // Use AssetSource.newBuilder() to construct. + private AssetSource(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private AssetSource() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new AssetSource(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_AssetSource_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_AssetSource_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.AssetSource.class, + com.google.cloud.visionai.v1.AssetSource.Builder.class); + } + + public interface AssetGcsSourceOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.AssetSource.AssetGcsSource) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Cloud storage uri.
+     * 
+ * + * string gcs_uri = 1; + * + * @return The gcsUri. + */ + java.lang.String getGcsUri(); + /** + * + * + *
+     * Cloud storage uri.
+     * 
+ * + * string gcs_uri = 1; + * + * @return The bytes for gcsUri. + */ + com.google.protobuf.ByteString getGcsUriBytes(); + } + /** + * + * + *
+   * The asset source is from Cloud Storage.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.AssetSource.AssetGcsSource} + */ + public static final class AssetGcsSource extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.AssetSource.AssetGcsSource) + AssetGcsSourceOrBuilder { + private static final long serialVersionUID = 0L; + // Use AssetGcsSource.newBuilder() to construct. + private AssetGcsSource(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private AssetGcsSource() { + gcsUri_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new AssetGcsSource(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_AssetSource_AssetGcsSource_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_AssetSource_AssetGcsSource_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.AssetSource.AssetGcsSource.class, + com.google.cloud.visionai.v1.AssetSource.AssetGcsSource.Builder.class); + } + + public static final int GCS_URI_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object gcsUri_ = ""; + /** + * + * + *
+     * Cloud storage uri.
+     * 
+ * + * string gcs_uri = 1; + * + * @return The gcsUri. + */ + @java.lang.Override + public java.lang.String getGcsUri() { + java.lang.Object ref = gcsUri_; + 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(); + gcsUri_ = s; + return s; + } + } + /** + * + * + *
+     * Cloud storage uri.
+     * 
+ * + * string gcs_uri = 1; + * + * @return The bytes for gcsUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getGcsUriBytes() { + java.lang.Object ref = gcsUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + gcsUri_ = 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(gcsUri_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, gcsUri_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(gcsUri_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, gcsUri_); + } + size += getUnknownFields().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.visionai.v1.AssetSource.AssetGcsSource)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.AssetSource.AssetGcsSource other = + (com.google.cloud.visionai.v1.AssetSource.AssetGcsSource) obj; + + if (!getGcsUri().equals(other.getGcsUri())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + GCS_URI_FIELD_NUMBER; + hash = (53 * hash) + getGcsUri().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.AssetSource.AssetGcsSource parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.AssetSource.AssetGcsSource 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.visionai.v1.AssetSource.AssetGcsSource parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.AssetSource.AssetGcsSource 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.visionai.v1.AssetSource.AssetGcsSource parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.AssetSource.AssetGcsSource parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.AssetSource.AssetGcsSource parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.AssetSource.AssetGcsSource 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.visionai.v1.AssetSource.AssetGcsSource parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.AssetSource.AssetGcsSource 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.visionai.v1.AssetSource.AssetGcsSource parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.AssetSource.AssetGcsSource 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.visionai.v1.AssetSource.AssetGcsSource 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 asset source is from Cloud Storage.
+     * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.AssetSource.AssetGcsSource} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.AssetSource.AssetGcsSource) + com.google.cloud.visionai.v1.AssetSource.AssetGcsSourceOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_AssetSource_AssetGcsSource_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_AssetSource_AssetGcsSource_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.AssetSource.AssetGcsSource.class, + com.google.cloud.visionai.v1.AssetSource.AssetGcsSource.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.AssetSource.AssetGcsSource.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + gcsUri_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_AssetSource_AssetGcsSource_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.AssetSource.AssetGcsSource getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.AssetSource.AssetGcsSource.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.AssetSource.AssetGcsSource build() { + com.google.cloud.visionai.v1.AssetSource.AssetGcsSource result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.AssetSource.AssetGcsSource buildPartial() { + com.google.cloud.visionai.v1.AssetSource.AssetGcsSource result = + new com.google.cloud.visionai.v1.AssetSource.AssetGcsSource(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.visionai.v1.AssetSource.AssetGcsSource result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.gcsUri_ = gcsUri_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.AssetSource.AssetGcsSource) { + return mergeFrom((com.google.cloud.visionai.v1.AssetSource.AssetGcsSource) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.AssetSource.AssetGcsSource other) { + if (other == com.google.cloud.visionai.v1.AssetSource.AssetGcsSource.getDefaultInstance()) + return this; + if (!other.getGcsUri().isEmpty()) { + gcsUri_ = other.gcsUri_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + gcsUri_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object gcsUri_ = ""; + /** + * + * + *
+       * Cloud storage uri.
+       * 
+ * + * string gcs_uri = 1; + * + * @return The gcsUri. + */ + public java.lang.String getGcsUri() { + java.lang.Object ref = gcsUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + gcsUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * Cloud storage uri.
+       * 
+ * + * string gcs_uri = 1; + * + * @return The bytes for gcsUri. + */ + public com.google.protobuf.ByteString getGcsUriBytes() { + java.lang.Object ref = gcsUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + gcsUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * Cloud storage uri.
+       * 
+ * + * string gcs_uri = 1; + * + * @param value The gcsUri to set. + * @return This builder for chaining. + */ + public Builder setGcsUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + gcsUri_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * Cloud storage uri.
+       * 
+ * + * string gcs_uri = 1; + * + * @return This builder for chaining. + */ + public Builder clearGcsUri() { + gcsUri_ = getDefaultInstance().getGcsUri(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+       * Cloud storage uri.
+       * 
+ * + * string gcs_uri = 1; + * + * @param value The bytes for gcsUri to set. + * @return This builder for chaining. + */ + public Builder setGcsUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + gcsUri_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.AssetSource.AssetGcsSource) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.AssetSource.AssetGcsSource) + private static final com.google.cloud.visionai.v1.AssetSource.AssetGcsSource DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.AssetSource.AssetGcsSource(); + } + + public static com.google.cloud.visionai.v1.AssetSource.AssetGcsSource getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AssetGcsSource parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.AssetSource.AssetGcsSource getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface AssetContentDataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.AssetSource.AssetContentData) + com.google.protobuf.MessageOrBuilder { + + /** + * bytes asset_content_data = 1; + * + * @return The assetContentData. + */ + com.google.protobuf.ByteString getAssetContentData(); + } + /** + * + * + *
+   * The content of the asset.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.AssetSource.AssetContentData} + */ + public static final class AssetContentData extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.AssetSource.AssetContentData) + AssetContentDataOrBuilder { + private static final long serialVersionUID = 0L; + // Use AssetContentData.newBuilder() to construct. + private AssetContentData(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private AssetContentData() { + assetContentData_ = com.google.protobuf.ByteString.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new AssetContentData(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_AssetSource_AssetContentData_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_AssetSource_AssetContentData_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.AssetSource.AssetContentData.class, + com.google.cloud.visionai.v1.AssetSource.AssetContentData.Builder.class); + } + + public static final int ASSET_CONTENT_DATA_FIELD_NUMBER = 1; + private com.google.protobuf.ByteString assetContentData_ = com.google.protobuf.ByteString.EMPTY; + /** + * bytes asset_content_data = 1; + * + * @return The assetContentData. + */ + @java.lang.Override + public com.google.protobuf.ByteString getAssetContentData() { + return assetContentData_; + } + + 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 (!assetContentData_.isEmpty()) { + output.writeBytes(1, assetContentData_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!assetContentData_.isEmpty()) { + size += com.google.protobuf.CodedOutputStream.computeBytesSize(1, assetContentData_); + } + size += getUnknownFields().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.visionai.v1.AssetSource.AssetContentData)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.AssetSource.AssetContentData other = + (com.google.cloud.visionai.v1.AssetSource.AssetContentData) obj; + + if (!getAssetContentData().equals(other.getAssetContentData())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ASSET_CONTENT_DATA_FIELD_NUMBER; + hash = (53 * hash) + getAssetContentData().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.AssetSource.AssetContentData parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.AssetSource.AssetContentData 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.visionai.v1.AssetSource.AssetContentData parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.AssetSource.AssetContentData 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.visionai.v1.AssetSource.AssetContentData parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.AssetSource.AssetContentData parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.AssetSource.AssetContentData parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.AssetSource.AssetContentData 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.visionai.v1.AssetSource.AssetContentData parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.AssetSource.AssetContentData 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.visionai.v1.AssetSource.AssetContentData parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.AssetSource.AssetContentData 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.visionai.v1.AssetSource.AssetContentData 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 content of the asset.
+     * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.AssetSource.AssetContentData} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.AssetSource.AssetContentData) + com.google.cloud.visionai.v1.AssetSource.AssetContentDataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_AssetSource_AssetContentData_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_AssetSource_AssetContentData_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.AssetSource.AssetContentData.class, + com.google.cloud.visionai.v1.AssetSource.AssetContentData.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.AssetSource.AssetContentData.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + assetContentData_ = com.google.protobuf.ByteString.EMPTY; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_AssetSource_AssetContentData_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.AssetSource.AssetContentData getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.AssetSource.AssetContentData.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.AssetSource.AssetContentData build() { + com.google.cloud.visionai.v1.AssetSource.AssetContentData result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.AssetSource.AssetContentData buildPartial() { + com.google.cloud.visionai.v1.AssetSource.AssetContentData result = + new com.google.cloud.visionai.v1.AssetSource.AssetContentData(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.visionai.v1.AssetSource.AssetContentData result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.assetContentData_ = assetContentData_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.AssetSource.AssetContentData) { + return mergeFrom((com.google.cloud.visionai.v1.AssetSource.AssetContentData) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.AssetSource.AssetContentData other) { + if (other == com.google.cloud.visionai.v1.AssetSource.AssetContentData.getDefaultInstance()) + return this; + if (other.getAssetContentData() != com.google.protobuf.ByteString.EMPTY) { + setAssetContentData(other.getAssetContentData()); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + assetContentData_ = input.readBytes(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.protobuf.ByteString assetContentData_ = + com.google.protobuf.ByteString.EMPTY; + /** + * bytes asset_content_data = 1; + * + * @return The assetContentData. + */ + @java.lang.Override + public com.google.protobuf.ByteString getAssetContentData() { + return assetContentData_; + } + /** + * bytes asset_content_data = 1; + * + * @param value The assetContentData to set. + * @return This builder for chaining. + */ + public Builder setAssetContentData(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + assetContentData_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * bytes asset_content_data = 1; + * + * @return This builder for chaining. + */ + public Builder clearAssetContentData() { + bitField0_ = (bitField0_ & ~0x00000001); + assetContentData_ = getDefaultInstance().getAssetContentData(); + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.AssetSource.AssetContentData) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.AssetSource.AssetContentData) + private static final com.google.cloud.visionai.v1.AssetSource.AssetContentData DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.AssetSource.AssetContentData(); + } + + public static com.google.cloud.visionai.v1.AssetSource.AssetContentData getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AssetContentData parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.AssetSource.AssetContentData getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int sourceFormCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object sourceForm_; + + public enum SourceFormCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + ASSET_GCS_SOURCE(1), + ASSET_CONTENT_DATA(2), + SOURCEFORM_NOT_SET(0); + private final int value; + + private SourceFormCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static SourceFormCase valueOf(int value) { + return forNumber(value); + } + + public static SourceFormCase forNumber(int value) { + switch (value) { + case 1: + return ASSET_GCS_SOURCE; + case 2: + return ASSET_CONTENT_DATA; + case 0: + return SOURCEFORM_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public SourceFormCase getSourceFormCase() { + return SourceFormCase.forNumber(sourceFormCase_); + } + + public static final int ASSET_GCS_SOURCE_FIELD_NUMBER = 1; + /** + * + * + *
+   * The source of the asset is from Cloud Storage.
+   * 
+ * + * .google.cloud.visionai.v1.AssetSource.AssetGcsSource asset_gcs_source = 1; + * + * @return Whether the assetGcsSource field is set. + */ + @java.lang.Override + public boolean hasAssetGcsSource() { + return sourceFormCase_ == 1; + } + /** + * + * + *
+   * The source of the asset is from Cloud Storage.
+   * 
+ * + * .google.cloud.visionai.v1.AssetSource.AssetGcsSource asset_gcs_source = 1; + * + * @return The assetGcsSource. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.AssetSource.AssetGcsSource getAssetGcsSource() { + if (sourceFormCase_ == 1) { + return (com.google.cloud.visionai.v1.AssetSource.AssetGcsSource) sourceForm_; + } + return com.google.cloud.visionai.v1.AssetSource.AssetGcsSource.getDefaultInstance(); + } + /** + * + * + *
+   * The source of the asset is from Cloud Storage.
+   * 
+ * + * .google.cloud.visionai.v1.AssetSource.AssetGcsSource asset_gcs_source = 1; + */ + @java.lang.Override + public com.google.cloud.visionai.v1.AssetSource.AssetGcsSourceOrBuilder + getAssetGcsSourceOrBuilder() { + if (sourceFormCase_ == 1) { + return (com.google.cloud.visionai.v1.AssetSource.AssetGcsSource) sourceForm_; + } + return com.google.cloud.visionai.v1.AssetSource.AssetGcsSource.getDefaultInstance(); + } + + public static final int ASSET_CONTENT_DATA_FIELD_NUMBER = 2; + /** + * + * + *
+   * The source of the asset is from content bytes.
+   * 
+ * + * .google.cloud.visionai.v1.AssetSource.AssetContentData asset_content_data = 2; + * + * @return Whether the assetContentData field is set. + */ + @java.lang.Override + public boolean hasAssetContentData() { + return sourceFormCase_ == 2; + } + /** + * + * + *
+   * The source of the asset is from content bytes.
+   * 
+ * + * .google.cloud.visionai.v1.AssetSource.AssetContentData asset_content_data = 2; + * + * @return The assetContentData. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.AssetSource.AssetContentData getAssetContentData() { + if (sourceFormCase_ == 2) { + return (com.google.cloud.visionai.v1.AssetSource.AssetContentData) sourceForm_; + } + return com.google.cloud.visionai.v1.AssetSource.AssetContentData.getDefaultInstance(); + } + /** + * + * + *
+   * The source of the asset is from content bytes.
+   * 
+ * + * .google.cloud.visionai.v1.AssetSource.AssetContentData asset_content_data = 2; + */ + @java.lang.Override + public com.google.cloud.visionai.v1.AssetSource.AssetContentDataOrBuilder + getAssetContentDataOrBuilder() { + if (sourceFormCase_ == 2) { + return (com.google.cloud.visionai.v1.AssetSource.AssetContentData) sourceForm_; + } + return com.google.cloud.visionai.v1.AssetSource.AssetContentData.getDefaultInstance(); + } + + 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 (sourceFormCase_ == 1) { + output.writeMessage(1, (com.google.cloud.visionai.v1.AssetSource.AssetGcsSource) sourceForm_); + } + if (sourceFormCase_ == 2) { + output.writeMessage( + 2, (com.google.cloud.visionai.v1.AssetSource.AssetContentData) sourceForm_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (sourceFormCase_ == 1) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 1, (com.google.cloud.visionai.v1.AssetSource.AssetGcsSource) sourceForm_); + } + if (sourceFormCase_ == 2) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 2, (com.google.cloud.visionai.v1.AssetSource.AssetContentData) sourceForm_); + } + size += getUnknownFields().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.visionai.v1.AssetSource)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.AssetSource other = (com.google.cloud.visionai.v1.AssetSource) obj; + + if (!getSourceFormCase().equals(other.getSourceFormCase())) return false; + switch (sourceFormCase_) { + case 1: + if (!getAssetGcsSource().equals(other.getAssetGcsSource())) return false; + break; + case 2: + if (!getAssetContentData().equals(other.getAssetContentData())) return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + switch (sourceFormCase_) { + case 1: + hash = (37 * hash) + ASSET_GCS_SOURCE_FIELD_NUMBER; + hash = (53 * hash) + getAssetGcsSource().hashCode(); + break; + case 2: + hash = (37 * hash) + ASSET_CONTENT_DATA_FIELD_NUMBER; + hash = (53 * hash) + getAssetContentData().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.AssetSource parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.AssetSource 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.visionai.v1.AssetSource parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.AssetSource 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.visionai.v1.AssetSource parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.AssetSource parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.AssetSource parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.AssetSource 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.visionai.v1.AssetSource parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.AssetSource 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.visionai.v1.AssetSource parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.AssetSource 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.visionai.v1.AssetSource 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 source of the asset.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.AssetSource} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.AssetSource) + com.google.cloud.visionai.v1.AssetSourceOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_AssetSource_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_AssetSource_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.AssetSource.class, + com.google.cloud.visionai.v1.AssetSource.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.AssetSource.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (assetGcsSourceBuilder_ != null) { + assetGcsSourceBuilder_.clear(); + } + if (assetContentDataBuilder_ != null) { + assetContentDataBuilder_.clear(); + } + sourceFormCase_ = 0; + sourceForm_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_AssetSource_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.AssetSource getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.AssetSource.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.AssetSource build() { + com.google.cloud.visionai.v1.AssetSource result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.AssetSource buildPartial() { + com.google.cloud.visionai.v1.AssetSource result = + new com.google.cloud.visionai.v1.AssetSource(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.visionai.v1.AssetSource result) { + int from_bitField0_ = bitField0_; + } + + private void buildPartialOneofs(com.google.cloud.visionai.v1.AssetSource result) { + result.sourceFormCase_ = sourceFormCase_; + result.sourceForm_ = this.sourceForm_; + if (sourceFormCase_ == 1 && assetGcsSourceBuilder_ != null) { + result.sourceForm_ = assetGcsSourceBuilder_.build(); + } + if (sourceFormCase_ == 2 && assetContentDataBuilder_ != null) { + result.sourceForm_ = assetContentDataBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.AssetSource) { + return mergeFrom((com.google.cloud.visionai.v1.AssetSource) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.AssetSource other) { + if (other == com.google.cloud.visionai.v1.AssetSource.getDefaultInstance()) return this; + switch (other.getSourceFormCase()) { + case ASSET_GCS_SOURCE: + { + mergeAssetGcsSource(other.getAssetGcsSource()); + break; + } + case ASSET_CONTENT_DATA: + { + mergeAssetContentData(other.getAssetContentData()); + break; + } + case SOURCEFORM_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getAssetGcsSourceFieldBuilder().getBuilder(), extensionRegistry); + sourceFormCase_ = 1; + break; + } // case 10 + case 18: + { + input.readMessage( + getAssetContentDataFieldBuilder().getBuilder(), extensionRegistry); + sourceFormCase_ = 2; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int sourceFormCase_ = 0; + private java.lang.Object sourceForm_; + + public SourceFormCase getSourceFormCase() { + return SourceFormCase.forNumber(sourceFormCase_); + } + + public Builder clearSourceForm() { + sourceFormCase_ = 0; + sourceForm_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.AssetSource.AssetGcsSource, + com.google.cloud.visionai.v1.AssetSource.AssetGcsSource.Builder, + com.google.cloud.visionai.v1.AssetSource.AssetGcsSourceOrBuilder> + assetGcsSourceBuilder_; + /** + * + * + *
+     * The source of the asset is from Cloud Storage.
+     * 
+ * + * .google.cloud.visionai.v1.AssetSource.AssetGcsSource asset_gcs_source = 1; + * + * @return Whether the assetGcsSource field is set. + */ + @java.lang.Override + public boolean hasAssetGcsSource() { + return sourceFormCase_ == 1; + } + /** + * + * + *
+     * The source of the asset is from Cloud Storage.
+     * 
+ * + * .google.cloud.visionai.v1.AssetSource.AssetGcsSource asset_gcs_source = 1; + * + * @return The assetGcsSource. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.AssetSource.AssetGcsSource getAssetGcsSource() { + if (assetGcsSourceBuilder_ == null) { + if (sourceFormCase_ == 1) { + return (com.google.cloud.visionai.v1.AssetSource.AssetGcsSource) sourceForm_; + } + return com.google.cloud.visionai.v1.AssetSource.AssetGcsSource.getDefaultInstance(); + } else { + if (sourceFormCase_ == 1) { + return assetGcsSourceBuilder_.getMessage(); + } + return com.google.cloud.visionai.v1.AssetSource.AssetGcsSource.getDefaultInstance(); + } + } + /** + * + * + *
+     * The source of the asset is from Cloud Storage.
+     * 
+ * + * .google.cloud.visionai.v1.AssetSource.AssetGcsSource asset_gcs_source = 1; + */ + public Builder setAssetGcsSource( + com.google.cloud.visionai.v1.AssetSource.AssetGcsSource value) { + if (assetGcsSourceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + sourceForm_ = value; + onChanged(); + } else { + assetGcsSourceBuilder_.setMessage(value); + } + sourceFormCase_ = 1; + return this; + } + /** + * + * + *
+     * The source of the asset is from Cloud Storage.
+     * 
+ * + * .google.cloud.visionai.v1.AssetSource.AssetGcsSource asset_gcs_source = 1; + */ + public Builder setAssetGcsSource( + com.google.cloud.visionai.v1.AssetSource.AssetGcsSource.Builder builderForValue) { + if (assetGcsSourceBuilder_ == null) { + sourceForm_ = builderForValue.build(); + onChanged(); + } else { + assetGcsSourceBuilder_.setMessage(builderForValue.build()); + } + sourceFormCase_ = 1; + return this; + } + /** + * + * + *
+     * The source of the asset is from Cloud Storage.
+     * 
+ * + * .google.cloud.visionai.v1.AssetSource.AssetGcsSource asset_gcs_source = 1; + */ + public Builder mergeAssetGcsSource( + com.google.cloud.visionai.v1.AssetSource.AssetGcsSource value) { + if (assetGcsSourceBuilder_ == null) { + if (sourceFormCase_ == 1 + && sourceForm_ + != com.google.cloud.visionai.v1.AssetSource.AssetGcsSource.getDefaultInstance()) { + sourceForm_ = + com.google.cloud.visionai.v1.AssetSource.AssetGcsSource.newBuilder( + (com.google.cloud.visionai.v1.AssetSource.AssetGcsSource) sourceForm_) + .mergeFrom(value) + .buildPartial(); + } else { + sourceForm_ = value; + } + onChanged(); + } else { + if (sourceFormCase_ == 1) { + assetGcsSourceBuilder_.mergeFrom(value); + } else { + assetGcsSourceBuilder_.setMessage(value); + } + } + sourceFormCase_ = 1; + return this; + } + /** + * + * + *
+     * The source of the asset is from Cloud Storage.
+     * 
+ * + * .google.cloud.visionai.v1.AssetSource.AssetGcsSource asset_gcs_source = 1; + */ + public Builder clearAssetGcsSource() { + if (assetGcsSourceBuilder_ == null) { + if (sourceFormCase_ == 1) { + sourceFormCase_ = 0; + sourceForm_ = null; + onChanged(); + } + } else { + if (sourceFormCase_ == 1) { + sourceFormCase_ = 0; + sourceForm_ = null; + } + assetGcsSourceBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The source of the asset is from Cloud Storage.
+     * 
+ * + * .google.cloud.visionai.v1.AssetSource.AssetGcsSource asset_gcs_source = 1; + */ + public com.google.cloud.visionai.v1.AssetSource.AssetGcsSource.Builder + getAssetGcsSourceBuilder() { + return getAssetGcsSourceFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The source of the asset is from Cloud Storage.
+     * 
+ * + * .google.cloud.visionai.v1.AssetSource.AssetGcsSource asset_gcs_source = 1; + */ + @java.lang.Override + public com.google.cloud.visionai.v1.AssetSource.AssetGcsSourceOrBuilder + getAssetGcsSourceOrBuilder() { + if ((sourceFormCase_ == 1) && (assetGcsSourceBuilder_ != null)) { + return assetGcsSourceBuilder_.getMessageOrBuilder(); + } else { + if (sourceFormCase_ == 1) { + return (com.google.cloud.visionai.v1.AssetSource.AssetGcsSource) sourceForm_; + } + return com.google.cloud.visionai.v1.AssetSource.AssetGcsSource.getDefaultInstance(); + } + } + /** + * + * + *
+     * The source of the asset is from Cloud Storage.
+     * 
+ * + * .google.cloud.visionai.v1.AssetSource.AssetGcsSource asset_gcs_source = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.AssetSource.AssetGcsSource, + com.google.cloud.visionai.v1.AssetSource.AssetGcsSource.Builder, + com.google.cloud.visionai.v1.AssetSource.AssetGcsSourceOrBuilder> + getAssetGcsSourceFieldBuilder() { + if (assetGcsSourceBuilder_ == null) { + if (!(sourceFormCase_ == 1)) { + sourceForm_ = + com.google.cloud.visionai.v1.AssetSource.AssetGcsSource.getDefaultInstance(); + } + assetGcsSourceBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.AssetSource.AssetGcsSource, + com.google.cloud.visionai.v1.AssetSource.AssetGcsSource.Builder, + com.google.cloud.visionai.v1.AssetSource.AssetGcsSourceOrBuilder>( + (com.google.cloud.visionai.v1.AssetSource.AssetGcsSource) sourceForm_, + getParentForChildren(), + isClean()); + sourceForm_ = null; + } + sourceFormCase_ = 1; + onChanged(); + return assetGcsSourceBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.AssetSource.AssetContentData, + com.google.cloud.visionai.v1.AssetSource.AssetContentData.Builder, + com.google.cloud.visionai.v1.AssetSource.AssetContentDataOrBuilder> + assetContentDataBuilder_; + /** + * + * + *
+     * The source of the asset is from content bytes.
+     * 
+ * + * .google.cloud.visionai.v1.AssetSource.AssetContentData asset_content_data = 2; + * + * @return Whether the assetContentData field is set. + */ + @java.lang.Override + public boolean hasAssetContentData() { + return sourceFormCase_ == 2; + } + /** + * + * + *
+     * The source of the asset is from content bytes.
+     * 
+ * + * .google.cloud.visionai.v1.AssetSource.AssetContentData asset_content_data = 2; + * + * @return The assetContentData. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.AssetSource.AssetContentData getAssetContentData() { + if (assetContentDataBuilder_ == null) { + if (sourceFormCase_ == 2) { + return (com.google.cloud.visionai.v1.AssetSource.AssetContentData) sourceForm_; + } + return com.google.cloud.visionai.v1.AssetSource.AssetContentData.getDefaultInstance(); + } else { + if (sourceFormCase_ == 2) { + return assetContentDataBuilder_.getMessage(); + } + return com.google.cloud.visionai.v1.AssetSource.AssetContentData.getDefaultInstance(); + } + } + /** + * + * + *
+     * The source of the asset is from content bytes.
+     * 
+ * + * .google.cloud.visionai.v1.AssetSource.AssetContentData asset_content_data = 2; + */ + public Builder setAssetContentData( + com.google.cloud.visionai.v1.AssetSource.AssetContentData value) { + if (assetContentDataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + sourceForm_ = value; + onChanged(); + } else { + assetContentDataBuilder_.setMessage(value); + } + sourceFormCase_ = 2; + return this; + } + /** + * + * + *
+     * The source of the asset is from content bytes.
+     * 
+ * + * .google.cloud.visionai.v1.AssetSource.AssetContentData asset_content_data = 2; + */ + public Builder setAssetContentData( + com.google.cloud.visionai.v1.AssetSource.AssetContentData.Builder builderForValue) { + if (assetContentDataBuilder_ == null) { + sourceForm_ = builderForValue.build(); + onChanged(); + } else { + assetContentDataBuilder_.setMessage(builderForValue.build()); + } + sourceFormCase_ = 2; + return this; + } + /** + * + * + *
+     * The source of the asset is from content bytes.
+     * 
+ * + * .google.cloud.visionai.v1.AssetSource.AssetContentData asset_content_data = 2; + */ + public Builder mergeAssetContentData( + com.google.cloud.visionai.v1.AssetSource.AssetContentData value) { + if (assetContentDataBuilder_ == null) { + if (sourceFormCase_ == 2 + && sourceForm_ + != com.google.cloud.visionai.v1.AssetSource.AssetContentData.getDefaultInstance()) { + sourceForm_ = + com.google.cloud.visionai.v1.AssetSource.AssetContentData.newBuilder( + (com.google.cloud.visionai.v1.AssetSource.AssetContentData) sourceForm_) + .mergeFrom(value) + .buildPartial(); + } else { + sourceForm_ = value; + } + onChanged(); + } else { + if (sourceFormCase_ == 2) { + assetContentDataBuilder_.mergeFrom(value); + } else { + assetContentDataBuilder_.setMessage(value); + } + } + sourceFormCase_ = 2; + return this; + } + /** + * + * + *
+     * The source of the asset is from content bytes.
+     * 
+ * + * .google.cloud.visionai.v1.AssetSource.AssetContentData asset_content_data = 2; + */ + public Builder clearAssetContentData() { + if (assetContentDataBuilder_ == null) { + if (sourceFormCase_ == 2) { + sourceFormCase_ = 0; + sourceForm_ = null; + onChanged(); + } + } else { + if (sourceFormCase_ == 2) { + sourceFormCase_ = 0; + sourceForm_ = null; + } + assetContentDataBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The source of the asset is from content bytes.
+     * 
+ * + * .google.cloud.visionai.v1.AssetSource.AssetContentData asset_content_data = 2; + */ + public com.google.cloud.visionai.v1.AssetSource.AssetContentData.Builder + getAssetContentDataBuilder() { + return getAssetContentDataFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The source of the asset is from content bytes.
+     * 
+ * + * .google.cloud.visionai.v1.AssetSource.AssetContentData asset_content_data = 2; + */ + @java.lang.Override + public com.google.cloud.visionai.v1.AssetSource.AssetContentDataOrBuilder + getAssetContentDataOrBuilder() { + if ((sourceFormCase_ == 2) && (assetContentDataBuilder_ != null)) { + return assetContentDataBuilder_.getMessageOrBuilder(); + } else { + if (sourceFormCase_ == 2) { + return (com.google.cloud.visionai.v1.AssetSource.AssetContentData) sourceForm_; + } + return com.google.cloud.visionai.v1.AssetSource.AssetContentData.getDefaultInstance(); + } + } + /** + * + * + *
+     * The source of the asset is from content bytes.
+     * 
+ * + * .google.cloud.visionai.v1.AssetSource.AssetContentData asset_content_data = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.AssetSource.AssetContentData, + com.google.cloud.visionai.v1.AssetSource.AssetContentData.Builder, + com.google.cloud.visionai.v1.AssetSource.AssetContentDataOrBuilder> + getAssetContentDataFieldBuilder() { + if (assetContentDataBuilder_ == null) { + if (!(sourceFormCase_ == 2)) { + sourceForm_ = + com.google.cloud.visionai.v1.AssetSource.AssetContentData.getDefaultInstance(); + } + assetContentDataBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.AssetSource.AssetContentData, + com.google.cloud.visionai.v1.AssetSource.AssetContentData.Builder, + com.google.cloud.visionai.v1.AssetSource.AssetContentDataOrBuilder>( + (com.google.cloud.visionai.v1.AssetSource.AssetContentData) sourceForm_, + getParentForChildren(), + isClean()); + sourceForm_ = null; + } + sourceFormCase_ = 2; + onChanged(); + return assetContentDataBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.AssetSource) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.AssetSource) + private static final com.google.cloud.visionai.v1.AssetSource DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.AssetSource(); + } + + public static com.google.cloud.visionai.v1.AssetSource getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AssetSource parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.AssetSource getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/AssetSourceOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/AssetSourceOrBuilder.java new file mode 100644 index 000000000000..5ff55bdc2443 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/AssetSourceOrBuilder.java @@ -0,0 +1,98 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/warehouse.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface AssetSourceOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.AssetSource) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The source of the asset is from Cloud Storage.
+   * 
+ * + * .google.cloud.visionai.v1.AssetSource.AssetGcsSource asset_gcs_source = 1; + * + * @return Whether the assetGcsSource field is set. + */ + boolean hasAssetGcsSource(); + /** + * + * + *
+   * The source of the asset is from Cloud Storage.
+   * 
+ * + * .google.cloud.visionai.v1.AssetSource.AssetGcsSource asset_gcs_source = 1; + * + * @return The assetGcsSource. + */ + com.google.cloud.visionai.v1.AssetSource.AssetGcsSource getAssetGcsSource(); + /** + * + * + *
+   * The source of the asset is from Cloud Storage.
+   * 
+ * + * .google.cloud.visionai.v1.AssetSource.AssetGcsSource asset_gcs_source = 1; + */ + com.google.cloud.visionai.v1.AssetSource.AssetGcsSourceOrBuilder getAssetGcsSourceOrBuilder(); + + /** + * + * + *
+   * The source of the asset is from content bytes.
+   * 
+ * + * .google.cloud.visionai.v1.AssetSource.AssetContentData asset_content_data = 2; + * + * @return Whether the assetContentData field is set. + */ + boolean hasAssetContentData(); + /** + * + * + *
+   * The source of the asset is from content bytes.
+   * 
+ * + * .google.cloud.visionai.v1.AssetSource.AssetContentData asset_content_data = 2; + * + * @return The assetContentData. + */ + com.google.cloud.visionai.v1.AssetSource.AssetContentData getAssetContentData(); + /** + * + * + *
+   * The source of the asset is from content bytes.
+   * 
+ * + * .google.cloud.visionai.v1.AssetSource.AssetContentData asset_content_data = 2; + */ + com.google.cloud.visionai.v1.AssetSource.AssetContentDataOrBuilder getAssetContentDataOrBuilder(); + + com.google.cloud.visionai.v1.AssetSource.SourceFormCase getSourceFormCase(); +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/AttributeValue.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/AttributeValue.java new file mode 100644 index 000000000000..aaa384dd2899 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/AttributeValue.java @@ -0,0 +1,1060 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/lva.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * Represents an actual value of an operator attribute.
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.AttributeValue} + */ +public final class AttributeValue extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.AttributeValue) + AttributeValueOrBuilder { + private static final long serialVersionUID = 0L; + // Use AttributeValue.newBuilder() to construct. + private AttributeValue(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private AttributeValue() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new AttributeValue(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.LvaProto + .internal_static_google_cloud_visionai_v1_AttributeValue_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.LvaProto + .internal_static_google_cloud_visionai_v1_AttributeValue_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.AttributeValue.class, + com.google.cloud.visionai.v1.AttributeValue.Builder.class); + } + + private int valueCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object value_; + + public enum ValueCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + I(1), + F(2), + B(3), + S(4), + VALUE_NOT_SET(0); + private final int value; + + private ValueCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static ValueCase valueOf(int value) { + return forNumber(value); + } + + public static ValueCase forNumber(int value) { + switch (value) { + case 1: + return I; + case 2: + return F; + case 3: + return B; + case 4: + return S; + case 0: + return VALUE_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public ValueCase getValueCase() { + return ValueCase.forNumber(valueCase_); + } + + public static final int I_FIELD_NUMBER = 1; + /** + * + * + *
+   * int.
+   * 
+ * + * int64 i = 1; + * + * @return Whether the i field is set. + */ + @java.lang.Override + public boolean hasI() { + return valueCase_ == 1; + } + /** + * + * + *
+   * int.
+   * 
+ * + * int64 i = 1; + * + * @return The i. + */ + @java.lang.Override + public long getI() { + if (valueCase_ == 1) { + return (java.lang.Long) value_; + } + return 0L; + } + + public static final int F_FIELD_NUMBER = 2; + /** + * + * + *
+   * float.
+   * 
+ * + * float f = 2; + * + * @return Whether the f field is set. + */ + @java.lang.Override + public boolean hasF() { + return valueCase_ == 2; + } + /** + * + * + *
+   * float.
+   * 
+ * + * float f = 2; + * + * @return The f. + */ + @java.lang.Override + public float getF() { + if (valueCase_ == 2) { + return (java.lang.Float) value_; + } + return 0F; + } + + public static final int B_FIELD_NUMBER = 3; + /** + * + * + *
+   * bool.
+   * 
+ * + * bool b = 3; + * + * @return Whether the b field is set. + */ + @java.lang.Override + public boolean hasB() { + return valueCase_ == 3; + } + /** + * + * + *
+   * bool.
+   * 
+ * + * bool b = 3; + * + * @return The b. + */ + @java.lang.Override + public boolean getB() { + if (valueCase_ == 3) { + return (java.lang.Boolean) value_; + } + return false; + } + + public static final int S_FIELD_NUMBER = 4; + /** + * + * + *
+   * string.
+   * 
+ * + * bytes s = 4; + * + * @return Whether the s field is set. + */ + @java.lang.Override + public boolean hasS() { + return valueCase_ == 4; + } + /** + * + * + *
+   * string.
+   * 
+ * + * bytes s = 4; + * + * @return The s. + */ + @java.lang.Override + public com.google.protobuf.ByteString getS() { + if (valueCase_ == 4) { + return (com.google.protobuf.ByteString) value_; + } + 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 (valueCase_ == 1) { + output.writeInt64(1, (long) ((java.lang.Long) value_)); + } + if (valueCase_ == 2) { + output.writeFloat(2, (float) ((java.lang.Float) value_)); + } + if (valueCase_ == 3) { + output.writeBool(3, (boolean) ((java.lang.Boolean) value_)); + } + if (valueCase_ == 4) { + output.writeBytes(4, (com.google.protobuf.ByteString) value_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (valueCase_ == 1) { + size += + com.google.protobuf.CodedOutputStream.computeInt64Size( + 1, (long) ((java.lang.Long) value_)); + } + if (valueCase_ == 2) { + size += + com.google.protobuf.CodedOutputStream.computeFloatSize( + 2, (float) ((java.lang.Float) value_)); + } + if (valueCase_ == 3) { + size += + com.google.protobuf.CodedOutputStream.computeBoolSize( + 3, (boolean) ((java.lang.Boolean) value_)); + } + if (valueCase_ == 4) { + size += + com.google.protobuf.CodedOutputStream.computeBytesSize( + 4, (com.google.protobuf.ByteString) value_); + } + size += getUnknownFields().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.visionai.v1.AttributeValue)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.AttributeValue other = + (com.google.cloud.visionai.v1.AttributeValue) obj; + + if (!getValueCase().equals(other.getValueCase())) return false; + switch (valueCase_) { + case 1: + if (getI() != other.getI()) return false; + break; + case 2: + if (java.lang.Float.floatToIntBits(getF()) != java.lang.Float.floatToIntBits(other.getF())) + return false; + break; + case 3: + if (getB() != other.getB()) return false; + break; + case 4: + if (!getS().equals(other.getS())) return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + switch (valueCase_) { + case 1: + hash = (37 * hash) + I_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getI()); + break; + case 2: + hash = (37 * hash) + F_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits(getF()); + break; + case 3: + hash = (37 * hash) + B_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getB()); + break; + case 4: + hash = (37 * hash) + S_FIELD_NUMBER; + hash = (53 * hash) + getS().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.AttributeValue parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.AttributeValue 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.visionai.v1.AttributeValue parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.AttributeValue 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.visionai.v1.AttributeValue parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.AttributeValue parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.AttributeValue parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.AttributeValue 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.visionai.v1.AttributeValue parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.AttributeValue 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.visionai.v1.AttributeValue parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.AttributeValue 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.visionai.v1.AttributeValue 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; + } + /** + * + * + *
+   * Represents an actual value of an operator attribute.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.AttributeValue} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.AttributeValue) + com.google.cloud.visionai.v1.AttributeValueOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.LvaProto + .internal_static_google_cloud_visionai_v1_AttributeValue_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.LvaProto + .internal_static_google_cloud_visionai_v1_AttributeValue_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.AttributeValue.class, + com.google.cloud.visionai.v1.AttributeValue.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.AttributeValue.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + valueCase_ = 0; + value_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.LvaProto + .internal_static_google_cloud_visionai_v1_AttributeValue_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.AttributeValue getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.AttributeValue.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.AttributeValue build() { + com.google.cloud.visionai.v1.AttributeValue result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.AttributeValue buildPartial() { + com.google.cloud.visionai.v1.AttributeValue result = + new com.google.cloud.visionai.v1.AttributeValue(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.visionai.v1.AttributeValue result) { + int from_bitField0_ = bitField0_; + } + + private void buildPartialOneofs(com.google.cloud.visionai.v1.AttributeValue result) { + result.valueCase_ = valueCase_; + result.value_ = this.value_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.AttributeValue) { + return mergeFrom((com.google.cloud.visionai.v1.AttributeValue) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.AttributeValue other) { + if (other == com.google.cloud.visionai.v1.AttributeValue.getDefaultInstance()) return this; + switch (other.getValueCase()) { + case I: + { + setI(other.getI()); + break; + } + case F: + { + setF(other.getF()); + break; + } + case B: + { + setB(other.getB()); + break; + } + case S: + { + setS(other.getS()); + break; + } + case VALUE_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + value_ = input.readInt64(); + valueCase_ = 1; + break; + } // case 8 + case 21: + { + value_ = input.readFloat(); + valueCase_ = 2; + break; + } // case 21 + case 24: + { + value_ = input.readBool(); + valueCase_ = 3; + break; + } // case 24 + case 34: + { + value_ = input.readBytes(); + valueCase_ = 4; + break; + } // case 34 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int valueCase_ = 0; + private java.lang.Object value_; + + public ValueCase getValueCase() { + return ValueCase.forNumber(valueCase_); + } + + public Builder clearValue() { + valueCase_ = 0; + value_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + /** + * + * + *
+     * int.
+     * 
+ * + * int64 i = 1; + * + * @return Whether the i field is set. + */ + public boolean hasI() { + return valueCase_ == 1; + } + /** + * + * + *
+     * int.
+     * 
+ * + * int64 i = 1; + * + * @return The i. + */ + public long getI() { + if (valueCase_ == 1) { + return (java.lang.Long) value_; + } + return 0L; + } + /** + * + * + *
+     * int.
+     * 
+ * + * int64 i = 1; + * + * @param value The i to set. + * @return This builder for chaining. + */ + public Builder setI(long value) { + + valueCase_ = 1; + value_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * int.
+     * 
+ * + * int64 i = 1; + * + * @return This builder for chaining. + */ + public Builder clearI() { + if (valueCase_ == 1) { + valueCase_ = 0; + value_ = null; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * float.
+     * 
+ * + * float f = 2; + * + * @return Whether the f field is set. + */ + public boolean hasF() { + return valueCase_ == 2; + } + /** + * + * + *
+     * float.
+     * 
+ * + * float f = 2; + * + * @return The f. + */ + public float getF() { + if (valueCase_ == 2) { + return (java.lang.Float) value_; + } + return 0F; + } + /** + * + * + *
+     * float.
+     * 
+ * + * float f = 2; + * + * @param value The f to set. + * @return This builder for chaining. + */ + public Builder setF(float value) { + + valueCase_ = 2; + value_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * float.
+     * 
+ * + * float f = 2; + * + * @return This builder for chaining. + */ + public Builder clearF() { + if (valueCase_ == 2) { + valueCase_ = 0; + value_ = null; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * bool.
+     * 
+ * + * bool b = 3; + * + * @return Whether the b field is set. + */ + public boolean hasB() { + return valueCase_ == 3; + } + /** + * + * + *
+     * bool.
+     * 
+ * + * bool b = 3; + * + * @return The b. + */ + public boolean getB() { + if (valueCase_ == 3) { + return (java.lang.Boolean) value_; + } + return false; + } + /** + * + * + *
+     * bool.
+     * 
+ * + * bool b = 3; + * + * @param value The b to set. + * @return This builder for chaining. + */ + public Builder setB(boolean value) { + + valueCase_ = 3; + value_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * bool.
+     * 
+ * + * bool b = 3; + * + * @return This builder for chaining. + */ + public Builder clearB() { + if (valueCase_ == 3) { + valueCase_ = 0; + value_ = null; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * string.
+     * 
+ * + * bytes s = 4; + * + * @return Whether the s field is set. + */ + public boolean hasS() { + return valueCase_ == 4; + } + /** + * + * + *
+     * string.
+     * 
+ * + * bytes s = 4; + * + * @return The s. + */ + public com.google.protobuf.ByteString getS() { + if (valueCase_ == 4) { + return (com.google.protobuf.ByteString) value_; + } + return com.google.protobuf.ByteString.EMPTY; + } + /** + * + * + *
+     * string.
+     * 
+ * + * bytes s = 4; + * + * @param value The s to set. + * @return This builder for chaining. + */ + public Builder setS(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + valueCase_ = 4; + value_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * string.
+     * 
+ * + * bytes s = 4; + * + * @return This builder for chaining. + */ + public Builder clearS() { + if (valueCase_ == 4) { + valueCase_ = 0; + value_ = null; + onChanged(); + } + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.AttributeValue) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.AttributeValue) + private static final com.google.cloud.visionai.v1.AttributeValue DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.AttributeValue(); + } + + public static com.google.cloud.visionai.v1.AttributeValue getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AttributeValue parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.AttributeValue getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/AttributeValueOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/AttributeValueOrBuilder.java new file mode 100644 index 000000000000..84215d6a8303 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/AttributeValueOrBuilder.java @@ -0,0 +1,128 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/lva.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface AttributeValueOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.AttributeValue) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * int.
+   * 
+ * + * int64 i = 1; + * + * @return Whether the i field is set. + */ + boolean hasI(); + /** + * + * + *
+   * int.
+   * 
+ * + * int64 i = 1; + * + * @return The i. + */ + long getI(); + + /** + * + * + *
+   * float.
+   * 
+ * + * float f = 2; + * + * @return Whether the f field is set. + */ + boolean hasF(); + /** + * + * + *
+   * float.
+   * 
+ * + * float f = 2; + * + * @return The f. + */ + float getF(); + + /** + * + * + *
+   * bool.
+   * 
+ * + * bool b = 3; + * + * @return Whether the b field is set. + */ + boolean hasB(); + /** + * + * + *
+   * bool.
+   * 
+ * + * bool b = 3; + * + * @return The b. + */ + boolean getB(); + + /** + * + * + *
+   * string.
+   * 
+ * + * bytes s = 4; + * + * @return Whether the s field is set. + */ + boolean hasS(); + /** + * + * + *
+   * string.
+   * 
+ * + * bytes s = 4; + * + * @return The s. + */ + com.google.protobuf.ByteString getS(); + + com.google.cloud.visionai.v1.AttributeValue.ValueCase getValueCase(); +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/AutoscalingMetricSpec.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/AutoscalingMetricSpec.java new file mode 100644 index 000000000000..c84da16614e2 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/AutoscalingMetricSpec.java @@ -0,0 +1,769 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/platform.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * The metric specification that defines the target resource utilization
+ * (CPU utilization, accelerator's duty cycle, and so on) for calculating the
+ * desired replica count.
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.AutoscalingMetricSpec} + */ +public final class AutoscalingMetricSpec extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.AutoscalingMetricSpec) + AutoscalingMetricSpecOrBuilder { + private static final long serialVersionUID = 0L; + // Use AutoscalingMetricSpec.newBuilder() to construct. + private AutoscalingMetricSpec(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private AutoscalingMetricSpec() { + metricName_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new AutoscalingMetricSpec(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_AutoscalingMetricSpec_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_AutoscalingMetricSpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.AutoscalingMetricSpec.class, + com.google.cloud.visionai.v1.AutoscalingMetricSpec.Builder.class); + } + + public static final int METRIC_NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object metricName_ = ""; + /** + * + * + *
+   * Required. The resource metric name.
+   * Supported metrics:
+   *
+   * * For Online Prediction:
+   * * `aiplatform.googleapis.com/prediction/online/accelerator/duty_cycle`
+   * * `aiplatform.googleapis.com/prediction/online/cpu/utilization`
+   * 
+ * + * string metric_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The metricName. + */ + @java.lang.Override + public java.lang.String getMetricName() { + java.lang.Object ref = metricName_; + 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(); + metricName_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The resource metric name.
+   * Supported metrics:
+   *
+   * * For Online Prediction:
+   * * `aiplatform.googleapis.com/prediction/online/accelerator/duty_cycle`
+   * * `aiplatform.googleapis.com/prediction/online/cpu/utilization`
+   * 
+ * + * string metric_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for metricName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getMetricNameBytes() { + java.lang.Object ref = metricName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + metricName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TARGET_FIELD_NUMBER = 2; + private int target_ = 0; + /** + * + * + *
+   * The target resource utilization in percentage (1% - 100%) for the given
+   * metric; once the real usage deviates from the target by a certain
+   * percentage, the machine replicas change. The default value is 60
+   * (representing 60%) if not provided.
+   * 
+ * + * int32 target = 2; + * + * @return The target. + */ + @java.lang.Override + public int getTarget() { + return target_; + } + + 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(metricName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, metricName_); + } + if (target_ != 0) { + output.writeInt32(2, target_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(metricName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, metricName_); + } + if (target_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, target_); + } + size += getUnknownFields().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.visionai.v1.AutoscalingMetricSpec)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.AutoscalingMetricSpec other = + (com.google.cloud.visionai.v1.AutoscalingMetricSpec) obj; + + if (!getMetricName().equals(other.getMetricName())) return false; + if (getTarget() != other.getTarget()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + METRIC_NAME_FIELD_NUMBER; + hash = (53 * hash) + getMetricName().hashCode(); + hash = (37 * hash) + TARGET_FIELD_NUMBER; + hash = (53 * hash) + getTarget(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.AutoscalingMetricSpec parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.AutoscalingMetricSpec 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.visionai.v1.AutoscalingMetricSpec parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.AutoscalingMetricSpec 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.visionai.v1.AutoscalingMetricSpec parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.AutoscalingMetricSpec parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.AutoscalingMetricSpec parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.AutoscalingMetricSpec 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.visionai.v1.AutoscalingMetricSpec parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.AutoscalingMetricSpec 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.visionai.v1.AutoscalingMetricSpec parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.AutoscalingMetricSpec 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.visionai.v1.AutoscalingMetricSpec 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 metric specification that defines the target resource utilization
+   * (CPU utilization, accelerator's duty cycle, and so on) for calculating the
+   * desired replica count.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.AutoscalingMetricSpec} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.AutoscalingMetricSpec) + com.google.cloud.visionai.v1.AutoscalingMetricSpecOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_AutoscalingMetricSpec_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_AutoscalingMetricSpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.AutoscalingMetricSpec.class, + com.google.cloud.visionai.v1.AutoscalingMetricSpec.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.AutoscalingMetricSpec.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + metricName_ = ""; + target_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_AutoscalingMetricSpec_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.AutoscalingMetricSpec getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.AutoscalingMetricSpec.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.AutoscalingMetricSpec build() { + com.google.cloud.visionai.v1.AutoscalingMetricSpec result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.AutoscalingMetricSpec buildPartial() { + com.google.cloud.visionai.v1.AutoscalingMetricSpec result = + new com.google.cloud.visionai.v1.AutoscalingMetricSpec(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.visionai.v1.AutoscalingMetricSpec result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.metricName_ = metricName_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.target_ = target_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.AutoscalingMetricSpec) { + return mergeFrom((com.google.cloud.visionai.v1.AutoscalingMetricSpec) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.AutoscalingMetricSpec other) { + if (other == com.google.cloud.visionai.v1.AutoscalingMetricSpec.getDefaultInstance()) + return this; + if (!other.getMetricName().isEmpty()) { + metricName_ = other.metricName_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getTarget() != 0) { + setTarget(other.getTarget()); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + metricName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + target_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object metricName_ = ""; + /** + * + * + *
+     * Required. The resource metric name.
+     * Supported metrics:
+     *
+     * * For Online Prediction:
+     * * `aiplatform.googleapis.com/prediction/online/accelerator/duty_cycle`
+     * * `aiplatform.googleapis.com/prediction/online/cpu/utilization`
+     * 
+ * + * string metric_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The metricName. + */ + public java.lang.String getMetricName() { + java.lang.Object ref = metricName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + metricName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The resource metric name.
+     * Supported metrics:
+     *
+     * * For Online Prediction:
+     * * `aiplatform.googleapis.com/prediction/online/accelerator/duty_cycle`
+     * * `aiplatform.googleapis.com/prediction/online/cpu/utilization`
+     * 
+ * + * string metric_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for metricName. + */ + public com.google.protobuf.ByteString getMetricNameBytes() { + java.lang.Object ref = metricName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + metricName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The resource metric name.
+     * Supported metrics:
+     *
+     * * For Online Prediction:
+     * * `aiplatform.googleapis.com/prediction/online/accelerator/duty_cycle`
+     * * `aiplatform.googleapis.com/prediction/online/cpu/utilization`
+     * 
+ * + * string metric_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The metricName to set. + * @return This builder for chaining. + */ + public Builder setMetricName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + metricName_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource metric name.
+     * Supported metrics:
+     *
+     * * For Online Prediction:
+     * * `aiplatform.googleapis.com/prediction/online/accelerator/duty_cycle`
+     * * `aiplatform.googleapis.com/prediction/online/cpu/utilization`
+     * 
+ * + * string metric_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearMetricName() { + metricName_ = getDefaultInstance().getMetricName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource metric name.
+     * Supported metrics:
+     *
+     * * For Online Prediction:
+     * * `aiplatform.googleapis.com/prediction/online/accelerator/duty_cycle`
+     * * `aiplatform.googleapis.com/prediction/online/cpu/utilization`
+     * 
+ * + * string metric_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for metricName to set. + * @return This builder for chaining. + */ + public Builder setMetricNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + metricName_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private int target_; + /** + * + * + *
+     * The target resource utilization in percentage (1% - 100%) for the given
+     * metric; once the real usage deviates from the target by a certain
+     * percentage, the machine replicas change. The default value is 60
+     * (representing 60%) if not provided.
+     * 
+ * + * int32 target = 2; + * + * @return The target. + */ + @java.lang.Override + public int getTarget() { + return target_; + } + /** + * + * + *
+     * The target resource utilization in percentage (1% - 100%) for the given
+     * metric; once the real usage deviates from the target by a certain
+     * percentage, the machine replicas change. The default value is 60
+     * (representing 60%) if not provided.
+     * 
+ * + * int32 target = 2; + * + * @param value The target to set. + * @return This builder for chaining. + */ + public Builder setTarget(int value) { + + target_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * The target resource utilization in percentage (1% - 100%) for the given
+     * metric; once the real usage deviates from the target by a certain
+     * percentage, the machine replicas change. The default value is 60
+     * (representing 60%) if not provided.
+     * 
+ * + * int32 target = 2; + * + * @return This builder for chaining. + */ + public Builder clearTarget() { + bitField0_ = (bitField0_ & ~0x00000002); + target_ = 0; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.AutoscalingMetricSpec) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.AutoscalingMetricSpec) + private static final com.google.cloud.visionai.v1.AutoscalingMetricSpec DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.AutoscalingMetricSpec(); + } + + public static com.google.cloud.visionai.v1.AutoscalingMetricSpec getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AutoscalingMetricSpec parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.AutoscalingMetricSpec getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/AutoscalingMetricSpecOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/AutoscalingMetricSpecOrBuilder.java new file mode 100644 index 000000000000..7bc6d3e83c4a --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/AutoscalingMetricSpecOrBuilder.java @@ -0,0 +1,77 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/platform.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface AutoscalingMetricSpecOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.AutoscalingMetricSpec) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The resource metric name.
+   * Supported metrics:
+   *
+   * * For Online Prediction:
+   * * `aiplatform.googleapis.com/prediction/online/accelerator/duty_cycle`
+   * * `aiplatform.googleapis.com/prediction/online/cpu/utilization`
+   * 
+ * + * string metric_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The metricName. + */ + java.lang.String getMetricName(); + /** + * + * + *
+   * Required. The resource metric name.
+   * Supported metrics:
+   *
+   * * For Online Prediction:
+   * * `aiplatform.googleapis.com/prediction/online/accelerator/duty_cycle`
+   * * `aiplatform.googleapis.com/prediction/online/cpu/utilization`
+   * 
+ * + * string metric_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for metricName. + */ + com.google.protobuf.ByteString getMetricNameBytes(); + + /** + * + * + *
+   * The target resource utilization in percentage (1% - 100%) for the given
+   * metric; once the real usage deviates from the target by a certain
+   * percentage, the machine replicas change. The default value is 60
+   * (representing 60%) if not provided.
+   * 
+ * + * int32 target = 2; + * + * @return The target. + */ + int getTarget(); +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/BatchRunProcessRequest.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/BatchRunProcessRequest.java new file mode 100644 index 000000000000..83ecbb80309f --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/BatchRunProcessRequest.java @@ -0,0 +1,2353 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/lva_service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * Request message for running the processes in a batch.
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.BatchRunProcessRequest} + */ +public final class BatchRunProcessRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.BatchRunProcessRequest) + BatchRunProcessRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use BatchRunProcessRequest.newBuilder() to construct. + private BatchRunProcessRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private BatchRunProcessRequest() { + parent_ = ""; + requests_ = java.util.Collections.emptyList(); + batchId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new BatchRunProcessRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.LvaServiceProto + .internal_static_google_cloud_visionai_v1_BatchRunProcessRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.LvaServiceProto + .internal_static_google_cloud_visionai_v1_BatchRunProcessRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.BatchRunProcessRequest.class, + com.google.cloud.visionai.v1.BatchRunProcessRequest.Builder.class); + } + + public interface BatchRunProcessOptionsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.BatchRunProcessRequest.BatchRunProcessOptions) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * The retry counts per process. Default: 3.
+     * 
+ * + * int32 retry_count = 1; + * + * @return The retryCount. + */ + int getRetryCount(); + + /** + * + * + *
+     * The batch size. Default: 5, maximum: 100.
+     * 
+ * + * int32 batch_size = 2; + * + * @return The batchSize. + */ + int getBatchSize(); + } + /** + * + * + *
+   * Options for batch processes.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.BatchRunProcessRequest.BatchRunProcessOptions} + */ + public static final class BatchRunProcessOptions extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.BatchRunProcessRequest.BatchRunProcessOptions) + BatchRunProcessOptionsOrBuilder { + private static final long serialVersionUID = 0L; + // Use BatchRunProcessOptions.newBuilder() to construct. + private BatchRunProcessOptions(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private BatchRunProcessOptions() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new BatchRunProcessOptions(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.LvaServiceProto + .internal_static_google_cloud_visionai_v1_BatchRunProcessRequest_BatchRunProcessOptions_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.LvaServiceProto + .internal_static_google_cloud_visionai_v1_BatchRunProcessRequest_BatchRunProcessOptions_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.BatchRunProcessRequest.BatchRunProcessOptions.class, + com.google.cloud.visionai.v1.BatchRunProcessRequest.BatchRunProcessOptions.Builder + .class); + } + + public static final int RETRY_COUNT_FIELD_NUMBER = 1; + private int retryCount_ = 0; + /** + * + * + *
+     * The retry counts per process. Default: 3.
+     * 
+ * + * int32 retry_count = 1; + * + * @return The retryCount. + */ + @java.lang.Override + public int getRetryCount() { + return retryCount_; + } + + public static final int BATCH_SIZE_FIELD_NUMBER = 2; + private int batchSize_ = 0; + /** + * + * + *
+     * The batch size. Default: 5, maximum: 100.
+     * 
+ * + * int32 batch_size = 2; + * + * @return The batchSize. + */ + @java.lang.Override + public int getBatchSize() { + return batchSize_; + } + + 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 (retryCount_ != 0) { + output.writeInt32(1, retryCount_); + } + if (batchSize_ != 0) { + output.writeInt32(2, batchSize_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (retryCount_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(1, retryCount_); + } + if (batchSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, batchSize_); + } + size += getUnknownFields().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.visionai.v1.BatchRunProcessRequest.BatchRunProcessOptions)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.BatchRunProcessRequest.BatchRunProcessOptions other = + (com.google.cloud.visionai.v1.BatchRunProcessRequest.BatchRunProcessOptions) obj; + + if (getRetryCount() != other.getRetryCount()) return false; + if (getBatchSize() != other.getBatchSize()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + RETRY_COUNT_FIELD_NUMBER; + hash = (53 * hash) + getRetryCount(); + hash = (37 * hash) + BATCH_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getBatchSize(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.BatchRunProcessRequest.BatchRunProcessOptions + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.BatchRunProcessRequest.BatchRunProcessOptions + 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.visionai.v1.BatchRunProcessRequest.BatchRunProcessOptions + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.BatchRunProcessRequest.BatchRunProcessOptions + 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.visionai.v1.BatchRunProcessRequest.BatchRunProcessOptions + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.BatchRunProcessRequest.BatchRunProcessOptions + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.BatchRunProcessRequest.BatchRunProcessOptions + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.BatchRunProcessRequest.BatchRunProcessOptions + 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.visionai.v1.BatchRunProcessRequest.BatchRunProcessOptions + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.BatchRunProcessRequest.BatchRunProcessOptions + 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.visionai.v1.BatchRunProcessRequest.BatchRunProcessOptions + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.BatchRunProcessRequest.BatchRunProcessOptions + 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.visionai.v1.BatchRunProcessRequest.BatchRunProcessOptions 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; + } + /** + * + * + *
+     * Options for batch processes.
+     * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.BatchRunProcessRequest.BatchRunProcessOptions} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.BatchRunProcessRequest.BatchRunProcessOptions) + com.google.cloud.visionai.v1.BatchRunProcessRequest.BatchRunProcessOptionsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.LvaServiceProto + .internal_static_google_cloud_visionai_v1_BatchRunProcessRequest_BatchRunProcessOptions_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.LvaServiceProto + .internal_static_google_cloud_visionai_v1_BatchRunProcessRequest_BatchRunProcessOptions_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.BatchRunProcessRequest.BatchRunProcessOptions.class, + com.google.cloud.visionai.v1.BatchRunProcessRequest.BatchRunProcessOptions.Builder + .class); + } + + // Construct using + // com.google.cloud.visionai.v1.BatchRunProcessRequest.BatchRunProcessOptions.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + retryCount_ = 0; + batchSize_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.LvaServiceProto + .internal_static_google_cloud_visionai_v1_BatchRunProcessRequest_BatchRunProcessOptions_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.BatchRunProcessRequest.BatchRunProcessOptions + getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.BatchRunProcessRequest.BatchRunProcessOptions + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.BatchRunProcessRequest.BatchRunProcessOptions build() { + com.google.cloud.visionai.v1.BatchRunProcessRequest.BatchRunProcessOptions result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.BatchRunProcessRequest.BatchRunProcessOptions + buildPartial() { + com.google.cloud.visionai.v1.BatchRunProcessRequest.BatchRunProcessOptions result = + new com.google.cloud.visionai.v1.BatchRunProcessRequest.BatchRunProcessOptions(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.visionai.v1.BatchRunProcessRequest.BatchRunProcessOptions result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.retryCount_ = retryCount_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.batchSize_ = batchSize_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof com.google.cloud.visionai.v1.BatchRunProcessRequest.BatchRunProcessOptions) { + return mergeFrom( + (com.google.cloud.visionai.v1.BatchRunProcessRequest.BatchRunProcessOptions) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.visionai.v1.BatchRunProcessRequest.BatchRunProcessOptions other) { + if (other + == com.google.cloud.visionai.v1.BatchRunProcessRequest.BatchRunProcessOptions + .getDefaultInstance()) return this; + if (other.getRetryCount() != 0) { + setRetryCount(other.getRetryCount()); + } + if (other.getBatchSize() != 0) { + setBatchSize(other.getBatchSize()); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + retryCount_ = input.readInt32(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 16: + { + batchSize_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private int retryCount_; + /** + * + * + *
+       * The retry counts per process. Default: 3.
+       * 
+ * + * int32 retry_count = 1; + * + * @return The retryCount. + */ + @java.lang.Override + public int getRetryCount() { + return retryCount_; + } + /** + * + * + *
+       * The retry counts per process. Default: 3.
+       * 
+ * + * int32 retry_count = 1; + * + * @param value The retryCount to set. + * @return This builder for chaining. + */ + public Builder setRetryCount(int value) { + + retryCount_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * The retry counts per process. Default: 3.
+       * 
+ * + * int32 retry_count = 1; + * + * @return This builder for chaining. + */ + public Builder clearRetryCount() { + bitField0_ = (bitField0_ & ~0x00000001); + retryCount_ = 0; + onChanged(); + return this; + } + + private int batchSize_; + /** + * + * + *
+       * The batch size. Default: 5, maximum: 100.
+       * 
+ * + * int32 batch_size = 2; + * + * @return The batchSize. + */ + @java.lang.Override + public int getBatchSize() { + return batchSize_; + } + /** + * + * + *
+       * The batch size. Default: 5, maximum: 100.
+       * 
+ * + * int32 batch_size = 2; + * + * @param value The batchSize to set. + * @return This builder for chaining. + */ + public Builder setBatchSize(int value) { + + batchSize_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * The batch size. Default: 5, maximum: 100.
+       * 
+ * + * int32 batch_size = 2; + * + * @return This builder for chaining. + */ + public Builder clearBatchSize() { + bitField0_ = (bitField0_ & ~0x00000002); + batchSize_ = 0; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.BatchRunProcessRequest.BatchRunProcessOptions) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.BatchRunProcessRequest.BatchRunProcessOptions) + private static final com.google.cloud.visionai.v1.BatchRunProcessRequest.BatchRunProcessOptions + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.visionai.v1.BatchRunProcessRequest.BatchRunProcessOptions(); + } + + public static com.google.cloud.visionai.v1.BatchRunProcessRequest.BatchRunProcessOptions + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BatchRunProcessOptions parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.BatchRunProcessRequest.BatchRunProcessOptions + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int bitField0_; + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + /** + * + * + *
+   * Required. The parent resource shared by all processes being created.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + 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(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The parent resource shared by all processes being created.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int REQUESTS_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private java.util.List requests_; + /** + * + * + *
+   * Required. The create process requests.
+   * 
+ * + * + * repeated .google.cloud.visionai.v1.CreateProcessRequest requests = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public java.util.List getRequestsList() { + return requests_; + } + /** + * + * + *
+   * Required. The create process requests.
+   * 
+ * + * + * repeated .google.cloud.visionai.v1.CreateProcessRequest requests = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public java.util.List + getRequestsOrBuilderList() { + return requests_; + } + /** + * + * + *
+   * Required. The create process requests.
+   * 
+ * + * + * repeated .google.cloud.visionai.v1.CreateProcessRequest requests = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public int getRequestsCount() { + return requests_.size(); + } + /** + * + * + *
+   * Required. The create process requests.
+   * 
+ * + * + * repeated .google.cloud.visionai.v1.CreateProcessRequest requests = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.visionai.v1.CreateProcessRequest getRequests(int index) { + return requests_.get(index); + } + /** + * + * + *
+   * Required. The create process requests.
+   * 
+ * + * + * repeated .google.cloud.visionai.v1.CreateProcessRequest requests = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.visionai.v1.CreateProcessRequestOrBuilder getRequestsOrBuilder( + int index) { + return requests_.get(index); + } + + public static final int OPTIONS_FIELD_NUMBER = 3; + private com.google.cloud.visionai.v1.BatchRunProcessRequest.BatchRunProcessOptions options_; + /** + * + * + *
+   * Optional. Options for batch processes.
+   * 
+ * + * + * .google.cloud.visionai.v1.BatchRunProcessRequest.BatchRunProcessOptions options = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the options field is set. + */ + @java.lang.Override + public boolean hasOptions() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * Optional. Options for batch processes.
+   * 
+ * + * + * .google.cloud.visionai.v1.BatchRunProcessRequest.BatchRunProcessOptions options = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The options. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.BatchRunProcessRequest.BatchRunProcessOptions getOptions() { + return options_ == null + ? com.google.cloud.visionai.v1.BatchRunProcessRequest.BatchRunProcessOptions + .getDefaultInstance() + : options_; + } + /** + * + * + *
+   * Optional. Options for batch processes.
+   * 
+ * + * + * .google.cloud.visionai.v1.BatchRunProcessRequest.BatchRunProcessOptions options = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.visionai.v1.BatchRunProcessRequest.BatchRunProcessOptionsOrBuilder + getOptionsOrBuilder() { + return options_ == null + ? com.google.cloud.visionai.v1.BatchRunProcessRequest.BatchRunProcessOptions + .getDefaultInstance() + : options_; + } + + public static final int BATCH_ID_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object batchId_ = ""; + /** + * + * + *
+   * Output only. The batch ID.
+   * 
+ * + * string batch_id = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The batchId. + */ + @java.lang.Override + public java.lang.String getBatchId() { + java.lang.Object ref = batchId_; + 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(); + batchId_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. The batch ID.
+   * 
+ * + * string batch_id = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for batchId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getBatchIdBytes() { + java.lang.Object ref = batchId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + batchId_ = 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + for (int i = 0; i < requests_.size(); i++) { + output.writeMessage(2, requests_.get(i)); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(3, getOptions()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(batchId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, batchId_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + for (int i = 0; i < requests_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, requests_.get(i)); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getOptions()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(batchId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, batchId_); + } + size += getUnknownFields().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.visionai.v1.BatchRunProcessRequest)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.BatchRunProcessRequest other = + (com.google.cloud.visionai.v1.BatchRunProcessRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (!getRequestsList().equals(other.getRequestsList())) return false; + if (hasOptions() != other.hasOptions()) return false; + if (hasOptions()) { + if (!getOptions().equals(other.getOptions())) return false; + } + if (!getBatchId().equals(other.getBatchId())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + if (getRequestsCount() > 0) { + hash = (37 * hash) + REQUESTS_FIELD_NUMBER; + hash = (53 * hash) + getRequestsList().hashCode(); + } + if (hasOptions()) { + hash = (37 * hash) + OPTIONS_FIELD_NUMBER; + hash = (53 * hash) + getOptions().hashCode(); + } + hash = (37 * hash) + BATCH_ID_FIELD_NUMBER; + hash = (53 * hash) + getBatchId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.BatchRunProcessRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.BatchRunProcessRequest 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.visionai.v1.BatchRunProcessRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.BatchRunProcessRequest 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.visionai.v1.BatchRunProcessRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.BatchRunProcessRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.BatchRunProcessRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.BatchRunProcessRequest 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.visionai.v1.BatchRunProcessRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.BatchRunProcessRequest 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.visionai.v1.BatchRunProcessRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.BatchRunProcessRequest 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.visionai.v1.BatchRunProcessRequest 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; + } + /** + * + * + *
+   * Request message for running the processes in a batch.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.BatchRunProcessRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.BatchRunProcessRequest) + com.google.cloud.visionai.v1.BatchRunProcessRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.LvaServiceProto + .internal_static_google_cloud_visionai_v1_BatchRunProcessRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.LvaServiceProto + .internal_static_google_cloud_visionai_v1_BatchRunProcessRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.BatchRunProcessRequest.class, + com.google.cloud.visionai.v1.BatchRunProcessRequest.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.BatchRunProcessRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getRequestsFieldBuilder(); + getOptionsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + if (requestsBuilder_ == null) { + requests_ = java.util.Collections.emptyList(); + } else { + requests_ = null; + requestsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + options_ = null; + if (optionsBuilder_ != null) { + optionsBuilder_.dispose(); + optionsBuilder_ = null; + } + batchId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.LvaServiceProto + .internal_static_google_cloud_visionai_v1_BatchRunProcessRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.BatchRunProcessRequest getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.BatchRunProcessRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.BatchRunProcessRequest build() { + com.google.cloud.visionai.v1.BatchRunProcessRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.BatchRunProcessRequest buildPartial() { + com.google.cloud.visionai.v1.BatchRunProcessRequest result = + new com.google.cloud.visionai.v1.BatchRunProcessRequest(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.visionai.v1.BatchRunProcessRequest result) { + if (requestsBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + requests_ = java.util.Collections.unmodifiableList(requests_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.requests_ = requests_; + } else { + result.requests_ = requestsBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.visionai.v1.BatchRunProcessRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.options_ = optionsBuilder_ == null ? options_ : optionsBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.batchId_ = batchId_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.BatchRunProcessRequest) { + return mergeFrom((com.google.cloud.visionai.v1.BatchRunProcessRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.BatchRunProcessRequest other) { + if (other == com.google.cloud.visionai.v1.BatchRunProcessRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (requestsBuilder_ == null) { + if (!other.requests_.isEmpty()) { + if (requests_.isEmpty()) { + requests_ = other.requests_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureRequestsIsMutable(); + requests_.addAll(other.requests_); + } + onChanged(); + } + } else { + if (!other.requests_.isEmpty()) { + if (requestsBuilder_.isEmpty()) { + requestsBuilder_.dispose(); + requestsBuilder_ = null; + requests_ = other.requests_; + bitField0_ = (bitField0_ & ~0x00000002); + requestsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getRequestsFieldBuilder() + : null; + } else { + requestsBuilder_.addAllMessages(other.requests_); + } + } + } + if (other.hasOptions()) { + mergeOptions(other.getOptions()); + } + if (!other.getBatchId().isEmpty()) { + batchId_ = other.batchId_; + bitField0_ |= 0x00000008; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + com.google.cloud.visionai.v1.CreateProcessRequest m = + input.readMessage( + com.google.cloud.visionai.v1.CreateProcessRequest.parser(), + extensionRegistry); + if (requestsBuilder_ == null) { + ensureRequestsIsMutable(); + requests_.add(m); + } else { + requestsBuilder_.addMessage(m); + } + break; + } // case 18 + case 26: + { + input.readMessage(getOptionsFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + batchId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The parent resource shared by all processes being created.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The parent resource shared by all processes being created.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The parent resource shared by all processes being created.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The parent resource shared by all processes being created.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The parent resource shared by all processes being created.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.util.List requests_ = + java.util.Collections.emptyList(); + + private void ensureRequestsIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + requests_ = + new java.util.ArrayList(requests_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.visionai.v1.CreateProcessRequest, + com.google.cloud.visionai.v1.CreateProcessRequest.Builder, + com.google.cloud.visionai.v1.CreateProcessRequestOrBuilder> + requestsBuilder_; + + /** + * + * + *
+     * Required. The create process requests.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.CreateProcessRequest requests = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.List getRequestsList() { + if (requestsBuilder_ == null) { + return java.util.Collections.unmodifiableList(requests_); + } else { + return requestsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Required. The create process requests.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.CreateProcessRequest requests = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public int getRequestsCount() { + if (requestsBuilder_ == null) { + return requests_.size(); + } else { + return requestsBuilder_.getCount(); + } + } + /** + * + * + *
+     * Required. The create process requests.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.CreateProcessRequest requests = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.visionai.v1.CreateProcessRequest getRequests(int index) { + if (requestsBuilder_ == null) { + return requests_.get(index); + } else { + return requestsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Required. The create process requests.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.CreateProcessRequest requests = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setRequests(int index, com.google.cloud.visionai.v1.CreateProcessRequest value) { + if (requestsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRequestsIsMutable(); + requests_.set(index, value); + onChanged(); + } else { + requestsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Required. The create process requests.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.CreateProcessRequest requests = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setRequests( + int index, com.google.cloud.visionai.v1.CreateProcessRequest.Builder builderForValue) { + if (requestsBuilder_ == null) { + ensureRequestsIsMutable(); + requests_.set(index, builderForValue.build()); + onChanged(); + } else { + requestsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Required. The create process requests.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.CreateProcessRequest requests = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addRequests(com.google.cloud.visionai.v1.CreateProcessRequest value) { + if (requestsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRequestsIsMutable(); + requests_.add(value); + onChanged(); + } else { + requestsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Required. The create process requests.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.CreateProcessRequest requests = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addRequests(int index, com.google.cloud.visionai.v1.CreateProcessRequest value) { + if (requestsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRequestsIsMutable(); + requests_.add(index, value); + onChanged(); + } else { + requestsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Required. The create process requests.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.CreateProcessRequest requests = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addRequests( + com.google.cloud.visionai.v1.CreateProcessRequest.Builder builderForValue) { + if (requestsBuilder_ == null) { + ensureRequestsIsMutable(); + requests_.add(builderForValue.build()); + onChanged(); + } else { + requestsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Required. The create process requests.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.CreateProcessRequest requests = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addRequests( + int index, com.google.cloud.visionai.v1.CreateProcessRequest.Builder builderForValue) { + if (requestsBuilder_ == null) { + ensureRequestsIsMutable(); + requests_.add(index, builderForValue.build()); + onChanged(); + } else { + requestsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Required. The create process requests.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.CreateProcessRequest requests = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addAllRequests( + java.lang.Iterable values) { + if (requestsBuilder_ == null) { + ensureRequestsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, requests_); + onChanged(); + } else { + requestsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Required. The create process requests.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.CreateProcessRequest requests = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearRequests() { + if (requestsBuilder_ == null) { + requests_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + requestsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Required. The create process requests.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.CreateProcessRequest requests = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder removeRequests(int index) { + if (requestsBuilder_ == null) { + ensureRequestsIsMutable(); + requests_.remove(index); + onChanged(); + } else { + requestsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Required. The create process requests.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.CreateProcessRequest requests = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.visionai.v1.CreateProcessRequest.Builder getRequestsBuilder(int index) { + return getRequestsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Required. The create process requests.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.CreateProcessRequest requests = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.visionai.v1.CreateProcessRequestOrBuilder getRequestsOrBuilder( + int index) { + if (requestsBuilder_ == null) { + return requests_.get(index); + } else { + return requestsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Required. The create process requests.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.CreateProcessRequest requests = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.List + getRequestsOrBuilderList() { + if (requestsBuilder_ != null) { + return requestsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(requests_); + } + } + /** + * + * + *
+     * Required. The create process requests.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.CreateProcessRequest requests = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.visionai.v1.CreateProcessRequest.Builder addRequestsBuilder() { + return getRequestsFieldBuilder() + .addBuilder(com.google.cloud.visionai.v1.CreateProcessRequest.getDefaultInstance()); + } + /** + * + * + *
+     * Required. The create process requests.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.CreateProcessRequest requests = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.visionai.v1.CreateProcessRequest.Builder addRequestsBuilder(int index) { + return getRequestsFieldBuilder() + .addBuilder( + index, com.google.cloud.visionai.v1.CreateProcessRequest.getDefaultInstance()); + } + /** + * + * + *
+     * Required. The create process requests.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.CreateProcessRequest requests = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.List + getRequestsBuilderList() { + return getRequestsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.visionai.v1.CreateProcessRequest, + com.google.cloud.visionai.v1.CreateProcessRequest.Builder, + com.google.cloud.visionai.v1.CreateProcessRequestOrBuilder> + getRequestsFieldBuilder() { + if (requestsBuilder_ == null) { + requestsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.visionai.v1.CreateProcessRequest, + com.google.cloud.visionai.v1.CreateProcessRequest.Builder, + com.google.cloud.visionai.v1.CreateProcessRequestOrBuilder>( + requests_, ((bitField0_ & 0x00000002) != 0), getParentForChildren(), isClean()); + requests_ = null; + } + return requestsBuilder_; + } + + private com.google.cloud.visionai.v1.BatchRunProcessRequest.BatchRunProcessOptions options_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.BatchRunProcessRequest.BatchRunProcessOptions, + com.google.cloud.visionai.v1.BatchRunProcessRequest.BatchRunProcessOptions.Builder, + com.google.cloud.visionai.v1.BatchRunProcessRequest.BatchRunProcessOptionsOrBuilder> + optionsBuilder_; + /** + * + * + *
+     * Optional. Options for batch processes.
+     * 
+ * + * + * .google.cloud.visionai.v1.BatchRunProcessRequest.BatchRunProcessOptions options = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the options field is set. + */ + public boolean hasOptions() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+     * Optional. Options for batch processes.
+     * 
+ * + * + * .google.cloud.visionai.v1.BatchRunProcessRequest.BatchRunProcessOptions options = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The options. + */ + public com.google.cloud.visionai.v1.BatchRunProcessRequest.BatchRunProcessOptions getOptions() { + if (optionsBuilder_ == null) { + return options_ == null + ? com.google.cloud.visionai.v1.BatchRunProcessRequest.BatchRunProcessOptions + .getDefaultInstance() + : options_; + } else { + return optionsBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Optional. Options for batch processes.
+     * 
+ * + * + * .google.cloud.visionai.v1.BatchRunProcessRequest.BatchRunProcessOptions options = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setOptions( + com.google.cloud.visionai.v1.BatchRunProcessRequest.BatchRunProcessOptions value) { + if (optionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + options_ = value; + } else { + optionsBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Options for batch processes.
+     * 
+ * + * + * .google.cloud.visionai.v1.BatchRunProcessRequest.BatchRunProcessOptions options = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setOptions( + com.google.cloud.visionai.v1.BatchRunProcessRequest.BatchRunProcessOptions.Builder + builderForValue) { + if (optionsBuilder_ == null) { + options_ = builderForValue.build(); + } else { + optionsBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Options for batch processes.
+     * 
+ * + * + * .google.cloud.visionai.v1.BatchRunProcessRequest.BatchRunProcessOptions options = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeOptions( + com.google.cloud.visionai.v1.BatchRunProcessRequest.BatchRunProcessOptions value) { + if (optionsBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && options_ != null + && options_ + != com.google.cloud.visionai.v1.BatchRunProcessRequest.BatchRunProcessOptions + .getDefaultInstance()) { + getOptionsBuilder().mergeFrom(value); + } else { + options_ = value; + } + } else { + optionsBuilder_.mergeFrom(value); + } + if (options_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Optional. Options for batch processes.
+     * 
+ * + * + * .google.cloud.visionai.v1.BatchRunProcessRequest.BatchRunProcessOptions options = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearOptions() { + bitField0_ = (bitField0_ & ~0x00000004); + options_ = null; + if (optionsBuilder_ != null) { + optionsBuilder_.dispose(); + optionsBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Options for batch processes.
+     * 
+ * + * + * .google.cloud.visionai.v1.BatchRunProcessRequest.BatchRunProcessOptions options = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.visionai.v1.BatchRunProcessRequest.BatchRunProcessOptions.Builder + getOptionsBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getOptionsFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Optional. Options for batch processes.
+     * 
+ * + * + * .google.cloud.visionai.v1.BatchRunProcessRequest.BatchRunProcessOptions options = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.visionai.v1.BatchRunProcessRequest.BatchRunProcessOptionsOrBuilder + getOptionsOrBuilder() { + if (optionsBuilder_ != null) { + return optionsBuilder_.getMessageOrBuilder(); + } else { + return options_ == null + ? com.google.cloud.visionai.v1.BatchRunProcessRequest.BatchRunProcessOptions + .getDefaultInstance() + : options_; + } + } + /** + * + * + *
+     * Optional. Options for batch processes.
+     * 
+ * + * + * .google.cloud.visionai.v1.BatchRunProcessRequest.BatchRunProcessOptions options = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.BatchRunProcessRequest.BatchRunProcessOptions, + com.google.cloud.visionai.v1.BatchRunProcessRequest.BatchRunProcessOptions.Builder, + com.google.cloud.visionai.v1.BatchRunProcessRequest.BatchRunProcessOptionsOrBuilder> + getOptionsFieldBuilder() { + if (optionsBuilder_ == null) { + optionsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.BatchRunProcessRequest.BatchRunProcessOptions, + com.google.cloud.visionai.v1.BatchRunProcessRequest.BatchRunProcessOptions.Builder, + com.google.cloud.visionai.v1.BatchRunProcessRequest + .BatchRunProcessOptionsOrBuilder>( + getOptions(), getParentForChildren(), isClean()); + options_ = null; + } + return optionsBuilder_; + } + + private java.lang.Object batchId_ = ""; + /** + * + * + *
+     * Output only. The batch ID.
+     * 
+ * + * string batch_id = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The batchId. + */ + public java.lang.String getBatchId() { + java.lang.Object ref = batchId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + batchId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. The batch ID.
+     * 
+ * + * string batch_id = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for batchId. + */ + public com.google.protobuf.ByteString getBatchIdBytes() { + java.lang.Object ref = batchId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + batchId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. The batch ID.
+     * 
+ * + * string batch_id = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The batchId to set. + * @return This builder for chaining. + */ + public Builder setBatchId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + batchId_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The batch ID.
+     * 
+ * + * string batch_id = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearBatchId() { + batchId_ = getDefaultInstance().getBatchId(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The batch ID.
+     * 
+ * + * string batch_id = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for batchId to set. + * @return This builder for chaining. + */ + public Builder setBatchIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + batchId_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.BatchRunProcessRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.BatchRunProcessRequest) + private static final com.google.cloud.visionai.v1.BatchRunProcessRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.BatchRunProcessRequest(); + } + + public static com.google.cloud.visionai.v1.BatchRunProcessRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BatchRunProcessRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.BatchRunProcessRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/BatchRunProcessRequestOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/BatchRunProcessRequestOrBuilder.java new file mode 100644 index 000000000000..cae623bba763 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/BatchRunProcessRequestOrBuilder.java @@ -0,0 +1,184 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/lva_service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface BatchRunProcessRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.BatchRunProcessRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The parent resource shared by all processes being created.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The parent resource shared by all processes being created.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Required. The create process requests.
+   * 
+ * + * + * repeated .google.cloud.visionai.v1.CreateProcessRequest requests = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + java.util.List getRequestsList(); + /** + * + * + *
+   * Required. The create process requests.
+   * 
+ * + * + * repeated .google.cloud.visionai.v1.CreateProcessRequest requests = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.visionai.v1.CreateProcessRequest getRequests(int index); + /** + * + * + *
+   * Required. The create process requests.
+   * 
+ * + * + * repeated .google.cloud.visionai.v1.CreateProcessRequest requests = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + int getRequestsCount(); + /** + * + * + *
+   * Required. The create process requests.
+   * 
+ * + * + * repeated .google.cloud.visionai.v1.CreateProcessRequest requests = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + java.util.List + getRequestsOrBuilderList(); + /** + * + * + *
+   * Required. The create process requests.
+   * 
+ * + * + * repeated .google.cloud.visionai.v1.CreateProcessRequest requests = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.visionai.v1.CreateProcessRequestOrBuilder getRequestsOrBuilder(int index); + + /** + * + * + *
+   * Optional. Options for batch processes.
+   * 
+ * + * + * .google.cloud.visionai.v1.BatchRunProcessRequest.BatchRunProcessOptions options = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the options field is set. + */ + boolean hasOptions(); + /** + * + * + *
+   * Optional. Options for batch processes.
+   * 
+ * + * + * .google.cloud.visionai.v1.BatchRunProcessRequest.BatchRunProcessOptions options = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The options. + */ + com.google.cloud.visionai.v1.BatchRunProcessRequest.BatchRunProcessOptions getOptions(); + /** + * + * + *
+   * Optional. Options for batch processes.
+   * 
+ * + * + * .google.cloud.visionai.v1.BatchRunProcessRequest.BatchRunProcessOptions options = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.visionai.v1.BatchRunProcessRequest.BatchRunProcessOptionsOrBuilder + getOptionsOrBuilder(); + + /** + * + * + *
+   * Output only. The batch ID.
+   * 
+ * + * string batch_id = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The batchId. + */ + java.lang.String getBatchId(); + /** + * + * + *
+   * Output only. The batch ID.
+   * 
+ * + * string batch_id = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for batchId. + */ + com.google.protobuf.ByteString getBatchIdBytes(); +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/BatchRunProcessResponse.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/BatchRunProcessResponse.java new file mode 100644 index 000000000000..23cd29d6d8d1 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/BatchRunProcessResponse.java @@ -0,0 +1,1117 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/lva_service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * Response message for running the processes in a batch.
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.BatchRunProcessResponse} + */ +public final class BatchRunProcessResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.BatchRunProcessResponse) + BatchRunProcessResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use BatchRunProcessResponse.newBuilder() to construct. + private BatchRunProcessResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private BatchRunProcessResponse() { + batchId_ = ""; + processes_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new BatchRunProcessResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.LvaServiceProto + .internal_static_google_cloud_visionai_v1_BatchRunProcessResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.LvaServiceProto + .internal_static_google_cloud_visionai_v1_BatchRunProcessResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.BatchRunProcessResponse.class, + com.google.cloud.visionai.v1.BatchRunProcessResponse.Builder.class); + } + + public static final int BATCH_ID_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object batchId_ = ""; + /** + * + * + *
+   * The batch ID.
+   * 
+ * + * string batch_id = 1; + * + * @return The batchId. + */ + @java.lang.Override + public java.lang.String getBatchId() { + java.lang.Object ref = batchId_; + 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(); + batchId_ = s; + return s; + } + } + /** + * + * + *
+   * The batch ID.
+   * 
+ * + * string batch_id = 1; + * + * @return The bytes for batchId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getBatchIdBytes() { + java.lang.Object ref = batchId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + batchId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PROCESSES_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private java.util.List processes_; + /** + * + * + *
+   * Processes created.
+   * 
+ * + * repeated .google.cloud.visionai.v1.Process processes = 2; + */ + @java.lang.Override + public java.util.List getProcessesList() { + return processes_; + } + /** + * + * + *
+   * Processes created.
+   * 
+ * + * repeated .google.cloud.visionai.v1.Process processes = 2; + */ + @java.lang.Override + public java.util.List + getProcessesOrBuilderList() { + return processes_; + } + /** + * + * + *
+   * Processes created.
+   * 
+ * + * repeated .google.cloud.visionai.v1.Process processes = 2; + */ + @java.lang.Override + public int getProcessesCount() { + return processes_.size(); + } + /** + * + * + *
+   * Processes created.
+   * 
+ * + * repeated .google.cloud.visionai.v1.Process processes = 2; + */ + @java.lang.Override + public com.google.cloud.visionai.v1.Process getProcesses(int index) { + return processes_.get(index); + } + /** + * + * + *
+   * Processes created.
+   * 
+ * + * repeated .google.cloud.visionai.v1.Process processes = 2; + */ + @java.lang.Override + public com.google.cloud.visionai.v1.ProcessOrBuilder getProcessesOrBuilder(int index) { + return processes_.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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(batchId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, batchId_); + } + for (int i = 0; i < processes_.size(); i++) { + output.writeMessage(2, processes_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(batchId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, batchId_); + } + for (int i = 0; i < processes_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, processes_.get(i)); + } + size += getUnknownFields().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.visionai.v1.BatchRunProcessResponse)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.BatchRunProcessResponse other = + (com.google.cloud.visionai.v1.BatchRunProcessResponse) obj; + + if (!getBatchId().equals(other.getBatchId())) return false; + if (!getProcessesList().equals(other.getProcessesList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + BATCH_ID_FIELD_NUMBER; + hash = (53 * hash) + getBatchId().hashCode(); + if (getProcessesCount() > 0) { + hash = (37 * hash) + PROCESSES_FIELD_NUMBER; + hash = (53 * hash) + getProcessesList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.BatchRunProcessResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.BatchRunProcessResponse 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.visionai.v1.BatchRunProcessResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.BatchRunProcessResponse 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.visionai.v1.BatchRunProcessResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.BatchRunProcessResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.BatchRunProcessResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.BatchRunProcessResponse 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.visionai.v1.BatchRunProcessResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.BatchRunProcessResponse 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.visionai.v1.BatchRunProcessResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.BatchRunProcessResponse 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.visionai.v1.BatchRunProcessResponse 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; + } + /** + * + * + *
+   * Response message for running the processes in a batch.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.BatchRunProcessResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.BatchRunProcessResponse) + com.google.cloud.visionai.v1.BatchRunProcessResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.LvaServiceProto + .internal_static_google_cloud_visionai_v1_BatchRunProcessResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.LvaServiceProto + .internal_static_google_cloud_visionai_v1_BatchRunProcessResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.BatchRunProcessResponse.class, + com.google.cloud.visionai.v1.BatchRunProcessResponse.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.BatchRunProcessResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + batchId_ = ""; + if (processesBuilder_ == null) { + processes_ = java.util.Collections.emptyList(); + } else { + processes_ = null; + processesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.LvaServiceProto + .internal_static_google_cloud_visionai_v1_BatchRunProcessResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.BatchRunProcessResponse getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.BatchRunProcessResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.BatchRunProcessResponse build() { + com.google.cloud.visionai.v1.BatchRunProcessResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.BatchRunProcessResponse buildPartial() { + com.google.cloud.visionai.v1.BatchRunProcessResponse result = + new com.google.cloud.visionai.v1.BatchRunProcessResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.visionai.v1.BatchRunProcessResponse result) { + if (processesBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + processes_ = java.util.Collections.unmodifiableList(processes_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.processes_ = processes_; + } else { + result.processes_ = processesBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.visionai.v1.BatchRunProcessResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.batchId_ = batchId_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.BatchRunProcessResponse) { + return mergeFrom((com.google.cloud.visionai.v1.BatchRunProcessResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.BatchRunProcessResponse other) { + if (other == com.google.cloud.visionai.v1.BatchRunProcessResponse.getDefaultInstance()) + return this; + if (!other.getBatchId().isEmpty()) { + batchId_ = other.batchId_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (processesBuilder_ == null) { + if (!other.processes_.isEmpty()) { + if (processes_.isEmpty()) { + processes_ = other.processes_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureProcessesIsMutable(); + processes_.addAll(other.processes_); + } + onChanged(); + } + } else { + if (!other.processes_.isEmpty()) { + if (processesBuilder_.isEmpty()) { + processesBuilder_.dispose(); + processesBuilder_ = null; + processes_ = other.processes_; + bitField0_ = (bitField0_ & ~0x00000002); + processesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getProcessesFieldBuilder() + : null; + } else { + processesBuilder_.addAllMessages(other.processes_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + batchId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + com.google.cloud.visionai.v1.Process m = + input.readMessage( + com.google.cloud.visionai.v1.Process.parser(), extensionRegistry); + if (processesBuilder_ == null) { + ensureProcessesIsMutable(); + processes_.add(m); + } else { + processesBuilder_.addMessage(m); + } + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object batchId_ = ""; + /** + * + * + *
+     * The batch ID.
+     * 
+ * + * string batch_id = 1; + * + * @return The batchId. + */ + public java.lang.String getBatchId() { + java.lang.Object ref = batchId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + batchId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The batch ID.
+     * 
+ * + * string batch_id = 1; + * + * @return The bytes for batchId. + */ + public com.google.protobuf.ByteString getBatchIdBytes() { + java.lang.Object ref = batchId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + batchId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The batch ID.
+     * 
+ * + * string batch_id = 1; + * + * @param value The batchId to set. + * @return This builder for chaining. + */ + public Builder setBatchId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + batchId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The batch ID.
+     * 
+ * + * string batch_id = 1; + * + * @return This builder for chaining. + */ + public Builder clearBatchId() { + batchId_ = getDefaultInstance().getBatchId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * The batch ID.
+     * 
+ * + * string batch_id = 1; + * + * @param value The bytes for batchId to set. + * @return This builder for chaining. + */ + public Builder setBatchIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + batchId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.util.List processes_ = + java.util.Collections.emptyList(); + + private void ensureProcessesIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + processes_ = new java.util.ArrayList(processes_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.visionai.v1.Process, + com.google.cloud.visionai.v1.Process.Builder, + com.google.cloud.visionai.v1.ProcessOrBuilder> + processesBuilder_; + + /** + * + * + *
+     * Processes created.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Process processes = 2; + */ + public java.util.List getProcessesList() { + if (processesBuilder_ == null) { + return java.util.Collections.unmodifiableList(processes_); + } else { + return processesBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Processes created.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Process processes = 2; + */ + public int getProcessesCount() { + if (processesBuilder_ == null) { + return processes_.size(); + } else { + return processesBuilder_.getCount(); + } + } + /** + * + * + *
+     * Processes created.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Process processes = 2; + */ + public com.google.cloud.visionai.v1.Process getProcesses(int index) { + if (processesBuilder_ == null) { + return processes_.get(index); + } else { + return processesBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Processes created.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Process processes = 2; + */ + public Builder setProcesses(int index, com.google.cloud.visionai.v1.Process value) { + if (processesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureProcessesIsMutable(); + processes_.set(index, value); + onChanged(); + } else { + processesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Processes created.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Process processes = 2; + */ + public Builder setProcesses( + int index, com.google.cloud.visionai.v1.Process.Builder builderForValue) { + if (processesBuilder_ == null) { + ensureProcessesIsMutable(); + processes_.set(index, builderForValue.build()); + onChanged(); + } else { + processesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Processes created.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Process processes = 2; + */ + public Builder addProcesses(com.google.cloud.visionai.v1.Process value) { + if (processesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureProcessesIsMutable(); + processes_.add(value); + onChanged(); + } else { + processesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Processes created.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Process processes = 2; + */ + public Builder addProcesses(int index, com.google.cloud.visionai.v1.Process value) { + if (processesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureProcessesIsMutable(); + processes_.add(index, value); + onChanged(); + } else { + processesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Processes created.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Process processes = 2; + */ + public Builder addProcesses(com.google.cloud.visionai.v1.Process.Builder builderForValue) { + if (processesBuilder_ == null) { + ensureProcessesIsMutable(); + processes_.add(builderForValue.build()); + onChanged(); + } else { + processesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Processes created.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Process processes = 2; + */ + public Builder addProcesses( + int index, com.google.cloud.visionai.v1.Process.Builder builderForValue) { + if (processesBuilder_ == null) { + ensureProcessesIsMutable(); + processes_.add(index, builderForValue.build()); + onChanged(); + } else { + processesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Processes created.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Process processes = 2; + */ + public Builder addAllProcesses( + java.lang.Iterable values) { + if (processesBuilder_ == null) { + ensureProcessesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, processes_); + onChanged(); + } else { + processesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Processes created.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Process processes = 2; + */ + public Builder clearProcesses() { + if (processesBuilder_ == null) { + processes_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + processesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Processes created.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Process processes = 2; + */ + public Builder removeProcesses(int index) { + if (processesBuilder_ == null) { + ensureProcessesIsMutable(); + processes_.remove(index); + onChanged(); + } else { + processesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Processes created.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Process processes = 2; + */ + public com.google.cloud.visionai.v1.Process.Builder getProcessesBuilder(int index) { + return getProcessesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Processes created.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Process processes = 2; + */ + public com.google.cloud.visionai.v1.ProcessOrBuilder getProcessesOrBuilder(int index) { + if (processesBuilder_ == null) { + return processes_.get(index); + } else { + return processesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Processes created.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Process processes = 2; + */ + public java.util.List + getProcessesOrBuilderList() { + if (processesBuilder_ != null) { + return processesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(processes_); + } + } + /** + * + * + *
+     * Processes created.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Process processes = 2; + */ + public com.google.cloud.visionai.v1.Process.Builder addProcessesBuilder() { + return getProcessesFieldBuilder() + .addBuilder(com.google.cloud.visionai.v1.Process.getDefaultInstance()); + } + /** + * + * + *
+     * Processes created.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Process processes = 2; + */ + public com.google.cloud.visionai.v1.Process.Builder addProcessesBuilder(int index) { + return getProcessesFieldBuilder() + .addBuilder(index, com.google.cloud.visionai.v1.Process.getDefaultInstance()); + } + /** + * + * + *
+     * Processes created.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Process processes = 2; + */ + public java.util.List getProcessesBuilderList() { + return getProcessesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.visionai.v1.Process, + com.google.cloud.visionai.v1.Process.Builder, + com.google.cloud.visionai.v1.ProcessOrBuilder> + getProcessesFieldBuilder() { + if (processesBuilder_ == null) { + processesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.visionai.v1.Process, + com.google.cloud.visionai.v1.Process.Builder, + com.google.cloud.visionai.v1.ProcessOrBuilder>( + processes_, ((bitField0_ & 0x00000002) != 0), getParentForChildren(), isClean()); + processes_ = null; + } + return processesBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.BatchRunProcessResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.BatchRunProcessResponse) + private static final com.google.cloud.visionai.v1.BatchRunProcessResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.BatchRunProcessResponse(); + } + + public static com.google.cloud.visionai.v1.BatchRunProcessResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BatchRunProcessResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.BatchRunProcessResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/BatchRunProcessResponseOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/BatchRunProcessResponseOrBuilder.java new file mode 100644 index 000000000000..5dab94f82ecc --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/BatchRunProcessResponseOrBuilder.java @@ -0,0 +1,103 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/lva_service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface BatchRunProcessResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.BatchRunProcessResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The batch ID.
+   * 
+ * + * string batch_id = 1; + * + * @return The batchId. + */ + java.lang.String getBatchId(); + /** + * + * + *
+   * The batch ID.
+   * 
+ * + * string batch_id = 1; + * + * @return The bytes for batchId. + */ + com.google.protobuf.ByteString getBatchIdBytes(); + + /** + * + * + *
+   * Processes created.
+   * 
+ * + * repeated .google.cloud.visionai.v1.Process processes = 2; + */ + java.util.List getProcessesList(); + /** + * + * + *
+   * Processes created.
+   * 
+ * + * repeated .google.cloud.visionai.v1.Process processes = 2; + */ + com.google.cloud.visionai.v1.Process getProcesses(int index); + /** + * + * + *
+   * Processes created.
+   * 
+ * + * repeated .google.cloud.visionai.v1.Process processes = 2; + */ + int getProcessesCount(); + /** + * + * + *
+   * Processes created.
+   * 
+ * + * repeated .google.cloud.visionai.v1.Process processes = 2; + */ + java.util.List + getProcessesOrBuilderList(); + /** + * + * + *
+   * Processes created.
+   * 
+ * + * repeated .google.cloud.visionai.v1.Process processes = 2; + */ + com.google.cloud.visionai.v1.ProcessOrBuilder getProcessesOrBuilder(int index); +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/BigQueryConfig.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/BigQueryConfig.java new file mode 100644 index 000000000000..d45acb2aeb39 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/BigQueryConfig.java @@ -0,0 +1,1461 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/platform.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * Message of configurations for BigQuery processor.
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.BigQueryConfig} + */ +public final class BigQueryConfig extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.BigQueryConfig) + BigQueryConfigOrBuilder { + private static final long serialVersionUID = 0L; + // Use BigQueryConfig.newBuilder() to construct. + private BigQueryConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private BigQueryConfig() { + table_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new BigQueryConfig(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_BigQueryConfig_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 2: + return internalGetCloudFunctionMapping(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_BigQueryConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.BigQueryConfig.class, + com.google.cloud.visionai.v1.BigQueryConfig.Builder.class); + } + + public static final int TABLE_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object table_ = ""; + /** + * + * + *
+   * BigQuery table resource for Vision AI Platform to ingest annotations to.
+   * 
+ * + * string table = 1; + * + * @return The table. + */ + @java.lang.Override + public java.lang.String getTable() { + java.lang.Object ref = table_; + 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(); + table_ = s; + return s; + } + } + /** + * + * + *
+   * BigQuery table resource for Vision AI Platform to ingest annotations to.
+   * 
+ * + * string table = 1; + * + * @return The bytes for table. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTableBytes() { + java.lang.Object ref = table_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + table_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CLOUD_FUNCTION_MAPPING_FIELD_NUMBER = 2; + + private static final class CloudFunctionMappingDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_BigQueryConfig_CloudFunctionMappingEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + + @SuppressWarnings("serial") + private com.google.protobuf.MapField cloudFunctionMapping_; + + private com.google.protobuf.MapField + internalGetCloudFunctionMapping() { + if (cloudFunctionMapping_ == null) { + return com.google.protobuf.MapField.emptyMapField( + CloudFunctionMappingDefaultEntryHolder.defaultEntry); + } + return cloudFunctionMapping_; + } + + public int getCloudFunctionMappingCount() { + return internalGetCloudFunctionMapping().getMap().size(); + } + /** + * + * + *
+   * Data Schema
+   * By default, Vision AI Application will try to write annotations to the
+   * target BigQuery table using the following schema:
+   *
+   * ingestion_time: TIMESTAMP, the ingestion time of the original data.
+   *
+   * application: STRING, name of the application which produces the annotation.
+   *
+   * instance: STRING, Id of the instance which produces the annotation.
+   *
+   * node: STRING, name of the application graph node which produces the
+   * annotation.
+   *
+   * annotation: STRING or JSON, the actual annotation protobuf will be
+   * converted to json string with bytes field as 64 encoded string. It can be
+   * written to both String or Json type column.
+   *
+   * To forward annotation data to an existing BigQuery table, customer needs to
+   * make sure the compatibility of the schema.
+   * The map maps application node name to its corresponding cloud function
+   * endpoint to transform the annotations directly to the
+   * google.cloud.bigquery.storage.v1.AppendRowsRequest (only avro_rows or
+   * proto_rows should be set). If configured, annotations produced by
+   * corresponding application node will sent to the Cloud Function at first
+   * before be forwarded to BigQuery.
+   *
+   * If the default table schema doesn't fit, customer is able to transform the
+   * annotation output from Vision AI Application to arbitrary BigQuery table
+   * schema with CloudFunction.
+   * * The cloud function will receive AppPlatformCloudFunctionRequest where
+   * the annotations field will be the json format of Vision AI annotation.
+   * * The cloud function should return AppPlatformCloudFunctionResponse with
+   * AppendRowsRequest stored in the annotations field.
+   * * To drop the annotation, simply clear the annotations field in the
+   * returned AppPlatformCloudFunctionResponse.
+   * 
+ * + * map<string, string> cloud_function_mapping = 2; + */ + @java.lang.Override + public boolean containsCloudFunctionMapping(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetCloudFunctionMapping().getMap().containsKey(key); + } + /** Use {@link #getCloudFunctionMappingMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getCloudFunctionMapping() { + return getCloudFunctionMappingMap(); + } + /** + * + * + *
+   * Data Schema
+   * By default, Vision AI Application will try to write annotations to the
+   * target BigQuery table using the following schema:
+   *
+   * ingestion_time: TIMESTAMP, the ingestion time of the original data.
+   *
+   * application: STRING, name of the application which produces the annotation.
+   *
+   * instance: STRING, Id of the instance which produces the annotation.
+   *
+   * node: STRING, name of the application graph node which produces the
+   * annotation.
+   *
+   * annotation: STRING or JSON, the actual annotation protobuf will be
+   * converted to json string with bytes field as 64 encoded string. It can be
+   * written to both String or Json type column.
+   *
+   * To forward annotation data to an existing BigQuery table, customer needs to
+   * make sure the compatibility of the schema.
+   * The map maps application node name to its corresponding cloud function
+   * endpoint to transform the annotations directly to the
+   * google.cloud.bigquery.storage.v1.AppendRowsRequest (only avro_rows or
+   * proto_rows should be set). If configured, annotations produced by
+   * corresponding application node will sent to the Cloud Function at first
+   * before be forwarded to BigQuery.
+   *
+   * If the default table schema doesn't fit, customer is able to transform the
+   * annotation output from Vision AI Application to arbitrary BigQuery table
+   * schema with CloudFunction.
+   * * The cloud function will receive AppPlatformCloudFunctionRequest where
+   * the annotations field will be the json format of Vision AI annotation.
+   * * The cloud function should return AppPlatformCloudFunctionResponse with
+   * AppendRowsRequest stored in the annotations field.
+   * * To drop the annotation, simply clear the annotations field in the
+   * returned AppPlatformCloudFunctionResponse.
+   * 
+ * + * map<string, string> cloud_function_mapping = 2; + */ + @java.lang.Override + public java.util.Map getCloudFunctionMappingMap() { + return internalGetCloudFunctionMapping().getMap(); + } + /** + * + * + *
+   * Data Schema
+   * By default, Vision AI Application will try to write annotations to the
+   * target BigQuery table using the following schema:
+   *
+   * ingestion_time: TIMESTAMP, the ingestion time of the original data.
+   *
+   * application: STRING, name of the application which produces the annotation.
+   *
+   * instance: STRING, Id of the instance which produces the annotation.
+   *
+   * node: STRING, name of the application graph node which produces the
+   * annotation.
+   *
+   * annotation: STRING or JSON, the actual annotation protobuf will be
+   * converted to json string with bytes field as 64 encoded string. It can be
+   * written to both String or Json type column.
+   *
+   * To forward annotation data to an existing BigQuery table, customer needs to
+   * make sure the compatibility of the schema.
+   * The map maps application node name to its corresponding cloud function
+   * endpoint to transform the annotations directly to the
+   * google.cloud.bigquery.storage.v1.AppendRowsRequest (only avro_rows or
+   * proto_rows should be set). If configured, annotations produced by
+   * corresponding application node will sent to the Cloud Function at first
+   * before be forwarded to BigQuery.
+   *
+   * If the default table schema doesn't fit, customer is able to transform the
+   * annotation output from Vision AI Application to arbitrary BigQuery table
+   * schema with CloudFunction.
+   * * The cloud function will receive AppPlatformCloudFunctionRequest where
+   * the annotations field will be the json format of Vision AI annotation.
+   * * The cloud function should return AppPlatformCloudFunctionResponse with
+   * AppendRowsRequest stored in the annotations field.
+   * * To drop the annotation, simply clear the annotations field in the
+   * returned AppPlatformCloudFunctionResponse.
+   * 
+ * + * map<string, string> cloud_function_mapping = 2; + */ + @java.lang.Override + public /* nullable */ java.lang.String getCloudFunctionMappingOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = + internalGetCloudFunctionMapping().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+   * Data Schema
+   * By default, Vision AI Application will try to write annotations to the
+   * target BigQuery table using the following schema:
+   *
+   * ingestion_time: TIMESTAMP, the ingestion time of the original data.
+   *
+   * application: STRING, name of the application which produces the annotation.
+   *
+   * instance: STRING, Id of the instance which produces the annotation.
+   *
+   * node: STRING, name of the application graph node which produces the
+   * annotation.
+   *
+   * annotation: STRING or JSON, the actual annotation protobuf will be
+   * converted to json string with bytes field as 64 encoded string. It can be
+   * written to both String or Json type column.
+   *
+   * To forward annotation data to an existing BigQuery table, customer needs to
+   * make sure the compatibility of the schema.
+   * The map maps application node name to its corresponding cloud function
+   * endpoint to transform the annotations directly to the
+   * google.cloud.bigquery.storage.v1.AppendRowsRequest (only avro_rows or
+   * proto_rows should be set). If configured, annotations produced by
+   * corresponding application node will sent to the Cloud Function at first
+   * before be forwarded to BigQuery.
+   *
+   * If the default table schema doesn't fit, customer is able to transform the
+   * annotation output from Vision AI Application to arbitrary BigQuery table
+   * schema with CloudFunction.
+   * * The cloud function will receive AppPlatformCloudFunctionRequest where
+   * the annotations field will be the json format of Vision AI annotation.
+   * * The cloud function should return AppPlatformCloudFunctionResponse with
+   * AppendRowsRequest stored in the annotations field.
+   * * To drop the annotation, simply clear the annotations field in the
+   * returned AppPlatformCloudFunctionResponse.
+   * 
+ * + * map<string, string> cloud_function_mapping = 2; + */ + @java.lang.Override + public java.lang.String getCloudFunctionMappingOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = + internalGetCloudFunctionMapping().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int CREATE_DEFAULT_TABLE_IF_NOT_EXISTS_FIELD_NUMBER = 3; + private boolean createDefaultTableIfNotExists_ = false; + /** + * + * + *
+   * If true, App Platform will create the BigQuery DataSet and the
+   * BigQuery Table with default schema if the specified table doesn't exist.
+   * This doesn't work if any cloud function customized schema is specified
+   * since the system doesn't know your desired schema.
+   * JSON column will be used in the default table created by App Platform.
+   * 
+ * + * bool create_default_table_if_not_exists = 3; + * + * @return The createDefaultTableIfNotExists. + */ + @java.lang.Override + public boolean getCreateDefaultTableIfNotExists() { + return createDefaultTableIfNotExists_; + } + + 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(table_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, table_); + } + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, + internalGetCloudFunctionMapping(), + CloudFunctionMappingDefaultEntryHolder.defaultEntry, + 2); + if (createDefaultTableIfNotExists_ != false) { + output.writeBool(3, createDefaultTableIfNotExists_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(table_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, table_); + } + for (java.util.Map.Entry entry : + internalGetCloudFunctionMapping().getMap().entrySet()) { + com.google.protobuf.MapEntry cloudFunctionMapping__ = + CloudFunctionMappingDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, cloudFunctionMapping__); + } + if (createDefaultTableIfNotExists_ != false) { + size += + com.google.protobuf.CodedOutputStream.computeBoolSize(3, createDefaultTableIfNotExists_); + } + size += getUnknownFields().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.visionai.v1.BigQueryConfig)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.BigQueryConfig other = + (com.google.cloud.visionai.v1.BigQueryConfig) obj; + + if (!getTable().equals(other.getTable())) return false; + if (!internalGetCloudFunctionMapping().equals(other.internalGetCloudFunctionMapping())) + return false; + if (getCreateDefaultTableIfNotExists() != other.getCreateDefaultTableIfNotExists()) + return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + TABLE_FIELD_NUMBER; + hash = (53 * hash) + getTable().hashCode(); + if (!internalGetCloudFunctionMapping().getMap().isEmpty()) { + hash = (37 * hash) + CLOUD_FUNCTION_MAPPING_FIELD_NUMBER; + hash = (53 * hash) + internalGetCloudFunctionMapping().hashCode(); + } + hash = (37 * hash) + CREATE_DEFAULT_TABLE_IF_NOT_EXISTS_FIELD_NUMBER; + hash = + (53 * hash) + com.google.protobuf.Internal.hashBoolean(getCreateDefaultTableIfNotExists()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.BigQueryConfig parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.BigQueryConfig 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.visionai.v1.BigQueryConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.BigQueryConfig 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.visionai.v1.BigQueryConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.BigQueryConfig parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.BigQueryConfig parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.BigQueryConfig 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.visionai.v1.BigQueryConfig parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.BigQueryConfig 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.visionai.v1.BigQueryConfig parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.BigQueryConfig 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.visionai.v1.BigQueryConfig 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; + } + /** + * + * + *
+   * Message of configurations for BigQuery processor.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.BigQueryConfig} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.BigQueryConfig) + com.google.cloud.visionai.v1.BigQueryConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_BigQueryConfig_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 2: + return internalGetCloudFunctionMapping(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( + int number) { + switch (number) { + case 2: + return internalGetMutableCloudFunctionMapping(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_BigQueryConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.BigQueryConfig.class, + com.google.cloud.visionai.v1.BigQueryConfig.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.BigQueryConfig.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + table_ = ""; + internalGetMutableCloudFunctionMapping().clear(); + createDefaultTableIfNotExists_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_BigQueryConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.BigQueryConfig getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.BigQueryConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.BigQueryConfig build() { + com.google.cloud.visionai.v1.BigQueryConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.BigQueryConfig buildPartial() { + com.google.cloud.visionai.v1.BigQueryConfig result = + new com.google.cloud.visionai.v1.BigQueryConfig(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.visionai.v1.BigQueryConfig result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.table_ = table_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.cloudFunctionMapping_ = internalGetCloudFunctionMapping(); + result.cloudFunctionMapping_.makeImmutable(); + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.createDefaultTableIfNotExists_ = createDefaultTableIfNotExists_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.BigQueryConfig) { + return mergeFrom((com.google.cloud.visionai.v1.BigQueryConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.BigQueryConfig other) { + if (other == com.google.cloud.visionai.v1.BigQueryConfig.getDefaultInstance()) return this; + if (!other.getTable().isEmpty()) { + table_ = other.table_; + bitField0_ |= 0x00000001; + onChanged(); + } + internalGetMutableCloudFunctionMapping().mergeFrom(other.internalGetCloudFunctionMapping()); + bitField0_ |= 0x00000002; + if (other.getCreateDefaultTableIfNotExists() != false) { + setCreateDefaultTableIfNotExists(other.getCreateDefaultTableIfNotExists()); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + table_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + com.google.protobuf.MapEntry + cloudFunctionMapping__ = + input.readMessage( + CloudFunctionMappingDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableCloudFunctionMapping() + .getMutableMap() + .put(cloudFunctionMapping__.getKey(), cloudFunctionMapping__.getValue()); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 24: + { + createDefaultTableIfNotExists_ = input.readBool(); + bitField0_ |= 0x00000004; + break; + } // case 24 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object table_ = ""; + /** + * + * + *
+     * BigQuery table resource for Vision AI Platform to ingest annotations to.
+     * 
+ * + * string table = 1; + * + * @return The table. + */ + public java.lang.String getTable() { + java.lang.Object ref = table_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + table_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * BigQuery table resource for Vision AI Platform to ingest annotations to.
+     * 
+ * + * string table = 1; + * + * @return The bytes for table. + */ + public com.google.protobuf.ByteString getTableBytes() { + java.lang.Object ref = table_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + table_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * BigQuery table resource for Vision AI Platform to ingest annotations to.
+     * 
+ * + * string table = 1; + * + * @param value The table to set. + * @return This builder for chaining. + */ + public Builder setTable(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + table_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * BigQuery table resource for Vision AI Platform to ingest annotations to.
+     * 
+ * + * string table = 1; + * + * @return This builder for chaining. + */ + public Builder clearTable() { + table_ = getDefaultInstance().getTable(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * BigQuery table resource for Vision AI Platform to ingest annotations to.
+     * 
+ * + * string table = 1; + * + * @param value The bytes for table to set. + * @return This builder for chaining. + */ + public Builder setTableBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + table_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.protobuf.MapField cloudFunctionMapping_; + + private com.google.protobuf.MapField + internalGetCloudFunctionMapping() { + if (cloudFunctionMapping_ == null) { + return com.google.protobuf.MapField.emptyMapField( + CloudFunctionMappingDefaultEntryHolder.defaultEntry); + } + return cloudFunctionMapping_; + } + + private com.google.protobuf.MapField + internalGetMutableCloudFunctionMapping() { + if (cloudFunctionMapping_ == null) { + cloudFunctionMapping_ = + com.google.protobuf.MapField.newMapField( + CloudFunctionMappingDefaultEntryHolder.defaultEntry); + } + if (!cloudFunctionMapping_.isMutable()) { + cloudFunctionMapping_ = cloudFunctionMapping_.copy(); + } + bitField0_ |= 0x00000002; + onChanged(); + return cloudFunctionMapping_; + } + + public int getCloudFunctionMappingCount() { + return internalGetCloudFunctionMapping().getMap().size(); + } + /** + * + * + *
+     * Data Schema
+     * By default, Vision AI Application will try to write annotations to the
+     * target BigQuery table using the following schema:
+     *
+     * ingestion_time: TIMESTAMP, the ingestion time of the original data.
+     *
+     * application: STRING, name of the application which produces the annotation.
+     *
+     * instance: STRING, Id of the instance which produces the annotation.
+     *
+     * node: STRING, name of the application graph node which produces the
+     * annotation.
+     *
+     * annotation: STRING or JSON, the actual annotation protobuf will be
+     * converted to json string with bytes field as 64 encoded string. It can be
+     * written to both String or Json type column.
+     *
+     * To forward annotation data to an existing BigQuery table, customer needs to
+     * make sure the compatibility of the schema.
+     * The map maps application node name to its corresponding cloud function
+     * endpoint to transform the annotations directly to the
+     * google.cloud.bigquery.storage.v1.AppendRowsRequest (only avro_rows or
+     * proto_rows should be set). If configured, annotations produced by
+     * corresponding application node will sent to the Cloud Function at first
+     * before be forwarded to BigQuery.
+     *
+     * If the default table schema doesn't fit, customer is able to transform the
+     * annotation output from Vision AI Application to arbitrary BigQuery table
+     * schema with CloudFunction.
+     * * The cloud function will receive AppPlatformCloudFunctionRequest where
+     * the annotations field will be the json format of Vision AI annotation.
+     * * The cloud function should return AppPlatformCloudFunctionResponse with
+     * AppendRowsRequest stored in the annotations field.
+     * * To drop the annotation, simply clear the annotations field in the
+     * returned AppPlatformCloudFunctionResponse.
+     * 
+ * + * map<string, string> cloud_function_mapping = 2; + */ + @java.lang.Override + public boolean containsCloudFunctionMapping(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetCloudFunctionMapping().getMap().containsKey(key); + } + /** Use {@link #getCloudFunctionMappingMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getCloudFunctionMapping() { + return getCloudFunctionMappingMap(); + } + /** + * + * + *
+     * Data Schema
+     * By default, Vision AI Application will try to write annotations to the
+     * target BigQuery table using the following schema:
+     *
+     * ingestion_time: TIMESTAMP, the ingestion time of the original data.
+     *
+     * application: STRING, name of the application which produces the annotation.
+     *
+     * instance: STRING, Id of the instance which produces the annotation.
+     *
+     * node: STRING, name of the application graph node which produces the
+     * annotation.
+     *
+     * annotation: STRING or JSON, the actual annotation protobuf will be
+     * converted to json string with bytes field as 64 encoded string. It can be
+     * written to both String or Json type column.
+     *
+     * To forward annotation data to an existing BigQuery table, customer needs to
+     * make sure the compatibility of the schema.
+     * The map maps application node name to its corresponding cloud function
+     * endpoint to transform the annotations directly to the
+     * google.cloud.bigquery.storage.v1.AppendRowsRequest (only avro_rows or
+     * proto_rows should be set). If configured, annotations produced by
+     * corresponding application node will sent to the Cloud Function at first
+     * before be forwarded to BigQuery.
+     *
+     * If the default table schema doesn't fit, customer is able to transform the
+     * annotation output from Vision AI Application to arbitrary BigQuery table
+     * schema with CloudFunction.
+     * * The cloud function will receive AppPlatformCloudFunctionRequest where
+     * the annotations field will be the json format of Vision AI annotation.
+     * * The cloud function should return AppPlatformCloudFunctionResponse with
+     * AppendRowsRequest stored in the annotations field.
+     * * To drop the annotation, simply clear the annotations field in the
+     * returned AppPlatformCloudFunctionResponse.
+     * 
+ * + * map<string, string> cloud_function_mapping = 2; + */ + @java.lang.Override + public java.util.Map getCloudFunctionMappingMap() { + return internalGetCloudFunctionMapping().getMap(); + } + /** + * + * + *
+     * Data Schema
+     * By default, Vision AI Application will try to write annotations to the
+     * target BigQuery table using the following schema:
+     *
+     * ingestion_time: TIMESTAMP, the ingestion time of the original data.
+     *
+     * application: STRING, name of the application which produces the annotation.
+     *
+     * instance: STRING, Id of the instance which produces the annotation.
+     *
+     * node: STRING, name of the application graph node which produces the
+     * annotation.
+     *
+     * annotation: STRING or JSON, the actual annotation protobuf will be
+     * converted to json string with bytes field as 64 encoded string. It can be
+     * written to both String or Json type column.
+     *
+     * To forward annotation data to an existing BigQuery table, customer needs to
+     * make sure the compatibility of the schema.
+     * The map maps application node name to its corresponding cloud function
+     * endpoint to transform the annotations directly to the
+     * google.cloud.bigquery.storage.v1.AppendRowsRequest (only avro_rows or
+     * proto_rows should be set). If configured, annotations produced by
+     * corresponding application node will sent to the Cloud Function at first
+     * before be forwarded to BigQuery.
+     *
+     * If the default table schema doesn't fit, customer is able to transform the
+     * annotation output from Vision AI Application to arbitrary BigQuery table
+     * schema with CloudFunction.
+     * * The cloud function will receive AppPlatformCloudFunctionRequest where
+     * the annotations field will be the json format of Vision AI annotation.
+     * * The cloud function should return AppPlatformCloudFunctionResponse with
+     * AppendRowsRequest stored in the annotations field.
+     * * To drop the annotation, simply clear the annotations field in the
+     * returned AppPlatformCloudFunctionResponse.
+     * 
+ * + * map<string, string> cloud_function_mapping = 2; + */ + @java.lang.Override + public /* nullable */ java.lang.String getCloudFunctionMappingOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = + internalGetCloudFunctionMapping().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+     * Data Schema
+     * By default, Vision AI Application will try to write annotations to the
+     * target BigQuery table using the following schema:
+     *
+     * ingestion_time: TIMESTAMP, the ingestion time of the original data.
+     *
+     * application: STRING, name of the application which produces the annotation.
+     *
+     * instance: STRING, Id of the instance which produces the annotation.
+     *
+     * node: STRING, name of the application graph node which produces the
+     * annotation.
+     *
+     * annotation: STRING or JSON, the actual annotation protobuf will be
+     * converted to json string with bytes field as 64 encoded string. It can be
+     * written to both String or Json type column.
+     *
+     * To forward annotation data to an existing BigQuery table, customer needs to
+     * make sure the compatibility of the schema.
+     * The map maps application node name to its corresponding cloud function
+     * endpoint to transform the annotations directly to the
+     * google.cloud.bigquery.storage.v1.AppendRowsRequest (only avro_rows or
+     * proto_rows should be set). If configured, annotations produced by
+     * corresponding application node will sent to the Cloud Function at first
+     * before be forwarded to BigQuery.
+     *
+     * If the default table schema doesn't fit, customer is able to transform the
+     * annotation output from Vision AI Application to arbitrary BigQuery table
+     * schema with CloudFunction.
+     * * The cloud function will receive AppPlatformCloudFunctionRequest where
+     * the annotations field will be the json format of Vision AI annotation.
+     * * The cloud function should return AppPlatformCloudFunctionResponse with
+     * AppendRowsRequest stored in the annotations field.
+     * * To drop the annotation, simply clear the annotations field in the
+     * returned AppPlatformCloudFunctionResponse.
+     * 
+ * + * map<string, string> cloud_function_mapping = 2; + */ + @java.lang.Override + public java.lang.String getCloudFunctionMappingOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = + internalGetCloudFunctionMapping().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearCloudFunctionMapping() { + bitField0_ = (bitField0_ & ~0x00000002); + internalGetMutableCloudFunctionMapping().getMutableMap().clear(); + return this; + } + /** + * + * + *
+     * Data Schema
+     * By default, Vision AI Application will try to write annotations to the
+     * target BigQuery table using the following schema:
+     *
+     * ingestion_time: TIMESTAMP, the ingestion time of the original data.
+     *
+     * application: STRING, name of the application which produces the annotation.
+     *
+     * instance: STRING, Id of the instance which produces the annotation.
+     *
+     * node: STRING, name of the application graph node which produces the
+     * annotation.
+     *
+     * annotation: STRING or JSON, the actual annotation protobuf will be
+     * converted to json string with bytes field as 64 encoded string. It can be
+     * written to both String or Json type column.
+     *
+     * To forward annotation data to an existing BigQuery table, customer needs to
+     * make sure the compatibility of the schema.
+     * The map maps application node name to its corresponding cloud function
+     * endpoint to transform the annotations directly to the
+     * google.cloud.bigquery.storage.v1.AppendRowsRequest (only avro_rows or
+     * proto_rows should be set). If configured, annotations produced by
+     * corresponding application node will sent to the Cloud Function at first
+     * before be forwarded to BigQuery.
+     *
+     * If the default table schema doesn't fit, customer is able to transform the
+     * annotation output from Vision AI Application to arbitrary BigQuery table
+     * schema with CloudFunction.
+     * * The cloud function will receive AppPlatformCloudFunctionRequest where
+     * the annotations field will be the json format of Vision AI annotation.
+     * * The cloud function should return AppPlatformCloudFunctionResponse with
+     * AppendRowsRequest stored in the annotations field.
+     * * To drop the annotation, simply clear the annotations field in the
+     * returned AppPlatformCloudFunctionResponse.
+     * 
+ * + * map<string, string> cloud_function_mapping = 2; + */ + public Builder removeCloudFunctionMapping(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + internalGetMutableCloudFunctionMapping().getMutableMap().remove(key); + return this; + } + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableCloudFunctionMapping() { + bitField0_ |= 0x00000002; + return internalGetMutableCloudFunctionMapping().getMutableMap(); + } + /** + * + * + *
+     * Data Schema
+     * By default, Vision AI Application will try to write annotations to the
+     * target BigQuery table using the following schema:
+     *
+     * ingestion_time: TIMESTAMP, the ingestion time of the original data.
+     *
+     * application: STRING, name of the application which produces the annotation.
+     *
+     * instance: STRING, Id of the instance which produces the annotation.
+     *
+     * node: STRING, name of the application graph node which produces the
+     * annotation.
+     *
+     * annotation: STRING or JSON, the actual annotation protobuf will be
+     * converted to json string with bytes field as 64 encoded string. It can be
+     * written to both String or Json type column.
+     *
+     * To forward annotation data to an existing BigQuery table, customer needs to
+     * make sure the compatibility of the schema.
+     * The map maps application node name to its corresponding cloud function
+     * endpoint to transform the annotations directly to the
+     * google.cloud.bigquery.storage.v1.AppendRowsRequest (only avro_rows or
+     * proto_rows should be set). If configured, annotations produced by
+     * corresponding application node will sent to the Cloud Function at first
+     * before be forwarded to BigQuery.
+     *
+     * If the default table schema doesn't fit, customer is able to transform the
+     * annotation output from Vision AI Application to arbitrary BigQuery table
+     * schema with CloudFunction.
+     * * The cloud function will receive AppPlatformCloudFunctionRequest where
+     * the annotations field will be the json format of Vision AI annotation.
+     * * The cloud function should return AppPlatformCloudFunctionResponse with
+     * AppendRowsRequest stored in the annotations field.
+     * * To drop the annotation, simply clear the annotations field in the
+     * returned AppPlatformCloudFunctionResponse.
+     * 
+ * + * map<string, string> cloud_function_mapping = 2; + */ + public Builder putCloudFunctionMapping(java.lang.String key, java.lang.String value) { + if (key == null) { + throw new NullPointerException("map key"); + } + if (value == null) { + throw new NullPointerException("map value"); + } + internalGetMutableCloudFunctionMapping().getMutableMap().put(key, value); + bitField0_ |= 0x00000002; + return this; + } + /** + * + * + *
+     * Data Schema
+     * By default, Vision AI Application will try to write annotations to the
+     * target BigQuery table using the following schema:
+     *
+     * ingestion_time: TIMESTAMP, the ingestion time of the original data.
+     *
+     * application: STRING, name of the application which produces the annotation.
+     *
+     * instance: STRING, Id of the instance which produces the annotation.
+     *
+     * node: STRING, name of the application graph node which produces the
+     * annotation.
+     *
+     * annotation: STRING or JSON, the actual annotation protobuf will be
+     * converted to json string with bytes field as 64 encoded string. It can be
+     * written to both String or Json type column.
+     *
+     * To forward annotation data to an existing BigQuery table, customer needs to
+     * make sure the compatibility of the schema.
+     * The map maps application node name to its corresponding cloud function
+     * endpoint to transform the annotations directly to the
+     * google.cloud.bigquery.storage.v1.AppendRowsRequest (only avro_rows or
+     * proto_rows should be set). If configured, annotations produced by
+     * corresponding application node will sent to the Cloud Function at first
+     * before be forwarded to BigQuery.
+     *
+     * If the default table schema doesn't fit, customer is able to transform the
+     * annotation output from Vision AI Application to arbitrary BigQuery table
+     * schema with CloudFunction.
+     * * The cloud function will receive AppPlatformCloudFunctionRequest where
+     * the annotations field will be the json format of Vision AI annotation.
+     * * The cloud function should return AppPlatformCloudFunctionResponse with
+     * AppendRowsRequest stored in the annotations field.
+     * * To drop the annotation, simply clear the annotations field in the
+     * returned AppPlatformCloudFunctionResponse.
+     * 
+ * + * map<string, string> cloud_function_mapping = 2; + */ + public Builder putAllCloudFunctionMapping( + java.util.Map values) { + internalGetMutableCloudFunctionMapping().getMutableMap().putAll(values); + bitField0_ |= 0x00000002; + return this; + } + + private boolean createDefaultTableIfNotExists_; + /** + * + * + *
+     * If true, App Platform will create the BigQuery DataSet and the
+     * BigQuery Table with default schema if the specified table doesn't exist.
+     * This doesn't work if any cloud function customized schema is specified
+     * since the system doesn't know your desired schema.
+     * JSON column will be used in the default table created by App Platform.
+     * 
+ * + * bool create_default_table_if_not_exists = 3; + * + * @return The createDefaultTableIfNotExists. + */ + @java.lang.Override + public boolean getCreateDefaultTableIfNotExists() { + return createDefaultTableIfNotExists_; + } + /** + * + * + *
+     * If true, App Platform will create the BigQuery DataSet and the
+     * BigQuery Table with default schema if the specified table doesn't exist.
+     * This doesn't work if any cloud function customized schema is specified
+     * since the system doesn't know your desired schema.
+     * JSON column will be used in the default table created by App Platform.
+     * 
+ * + * bool create_default_table_if_not_exists = 3; + * + * @param value The createDefaultTableIfNotExists to set. + * @return This builder for chaining. + */ + public Builder setCreateDefaultTableIfNotExists(boolean value) { + + createDefaultTableIfNotExists_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * If true, App Platform will create the BigQuery DataSet and the
+     * BigQuery Table with default schema if the specified table doesn't exist.
+     * This doesn't work if any cloud function customized schema is specified
+     * since the system doesn't know your desired schema.
+     * JSON column will be used in the default table created by App Platform.
+     * 
+ * + * bool create_default_table_if_not_exists = 3; + * + * @return This builder for chaining. + */ + public Builder clearCreateDefaultTableIfNotExists() { + bitField0_ = (bitField0_ & ~0x00000004); + createDefaultTableIfNotExists_ = false; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.BigQueryConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.BigQueryConfig) + private static final com.google.cloud.visionai.v1.BigQueryConfig DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.BigQueryConfig(); + } + + public static com.google.cloud.visionai.v1.BigQueryConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BigQueryConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.BigQueryConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/BigQueryConfigOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/BigQueryConfigOrBuilder.java new file mode 100644 index 000000000000..c0d8e213de9a --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/BigQueryConfigOrBuilder.java @@ -0,0 +1,296 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/platform.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface BigQueryConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.BigQueryConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * BigQuery table resource for Vision AI Platform to ingest annotations to.
+   * 
+ * + * string table = 1; + * + * @return The table. + */ + java.lang.String getTable(); + /** + * + * + *
+   * BigQuery table resource for Vision AI Platform to ingest annotations to.
+   * 
+ * + * string table = 1; + * + * @return The bytes for table. + */ + com.google.protobuf.ByteString getTableBytes(); + + /** + * + * + *
+   * Data Schema
+   * By default, Vision AI Application will try to write annotations to the
+   * target BigQuery table using the following schema:
+   *
+   * ingestion_time: TIMESTAMP, the ingestion time of the original data.
+   *
+   * application: STRING, name of the application which produces the annotation.
+   *
+   * instance: STRING, Id of the instance which produces the annotation.
+   *
+   * node: STRING, name of the application graph node which produces the
+   * annotation.
+   *
+   * annotation: STRING or JSON, the actual annotation protobuf will be
+   * converted to json string with bytes field as 64 encoded string. It can be
+   * written to both String or Json type column.
+   *
+   * To forward annotation data to an existing BigQuery table, customer needs to
+   * make sure the compatibility of the schema.
+   * The map maps application node name to its corresponding cloud function
+   * endpoint to transform the annotations directly to the
+   * google.cloud.bigquery.storage.v1.AppendRowsRequest (only avro_rows or
+   * proto_rows should be set). If configured, annotations produced by
+   * corresponding application node will sent to the Cloud Function at first
+   * before be forwarded to BigQuery.
+   *
+   * If the default table schema doesn't fit, customer is able to transform the
+   * annotation output from Vision AI Application to arbitrary BigQuery table
+   * schema with CloudFunction.
+   * * The cloud function will receive AppPlatformCloudFunctionRequest where
+   * the annotations field will be the json format of Vision AI annotation.
+   * * The cloud function should return AppPlatformCloudFunctionResponse with
+   * AppendRowsRequest stored in the annotations field.
+   * * To drop the annotation, simply clear the annotations field in the
+   * returned AppPlatformCloudFunctionResponse.
+   * 
+ * + * map<string, string> cloud_function_mapping = 2; + */ + int getCloudFunctionMappingCount(); + /** + * + * + *
+   * Data Schema
+   * By default, Vision AI Application will try to write annotations to the
+   * target BigQuery table using the following schema:
+   *
+   * ingestion_time: TIMESTAMP, the ingestion time of the original data.
+   *
+   * application: STRING, name of the application which produces the annotation.
+   *
+   * instance: STRING, Id of the instance which produces the annotation.
+   *
+   * node: STRING, name of the application graph node which produces the
+   * annotation.
+   *
+   * annotation: STRING or JSON, the actual annotation protobuf will be
+   * converted to json string with bytes field as 64 encoded string. It can be
+   * written to both String or Json type column.
+   *
+   * To forward annotation data to an existing BigQuery table, customer needs to
+   * make sure the compatibility of the schema.
+   * The map maps application node name to its corresponding cloud function
+   * endpoint to transform the annotations directly to the
+   * google.cloud.bigquery.storage.v1.AppendRowsRequest (only avro_rows or
+   * proto_rows should be set). If configured, annotations produced by
+   * corresponding application node will sent to the Cloud Function at first
+   * before be forwarded to BigQuery.
+   *
+   * If the default table schema doesn't fit, customer is able to transform the
+   * annotation output from Vision AI Application to arbitrary BigQuery table
+   * schema with CloudFunction.
+   * * The cloud function will receive AppPlatformCloudFunctionRequest where
+   * the annotations field will be the json format of Vision AI annotation.
+   * * The cloud function should return AppPlatformCloudFunctionResponse with
+   * AppendRowsRequest stored in the annotations field.
+   * * To drop the annotation, simply clear the annotations field in the
+   * returned AppPlatformCloudFunctionResponse.
+   * 
+ * + * map<string, string> cloud_function_mapping = 2; + */ + boolean containsCloudFunctionMapping(java.lang.String key); + /** Use {@link #getCloudFunctionMappingMap()} instead. */ + @java.lang.Deprecated + java.util.Map getCloudFunctionMapping(); + /** + * + * + *
+   * Data Schema
+   * By default, Vision AI Application will try to write annotations to the
+   * target BigQuery table using the following schema:
+   *
+   * ingestion_time: TIMESTAMP, the ingestion time of the original data.
+   *
+   * application: STRING, name of the application which produces the annotation.
+   *
+   * instance: STRING, Id of the instance which produces the annotation.
+   *
+   * node: STRING, name of the application graph node which produces the
+   * annotation.
+   *
+   * annotation: STRING or JSON, the actual annotation protobuf will be
+   * converted to json string with bytes field as 64 encoded string. It can be
+   * written to both String or Json type column.
+   *
+   * To forward annotation data to an existing BigQuery table, customer needs to
+   * make sure the compatibility of the schema.
+   * The map maps application node name to its corresponding cloud function
+   * endpoint to transform the annotations directly to the
+   * google.cloud.bigquery.storage.v1.AppendRowsRequest (only avro_rows or
+   * proto_rows should be set). If configured, annotations produced by
+   * corresponding application node will sent to the Cloud Function at first
+   * before be forwarded to BigQuery.
+   *
+   * If the default table schema doesn't fit, customer is able to transform the
+   * annotation output from Vision AI Application to arbitrary BigQuery table
+   * schema with CloudFunction.
+   * * The cloud function will receive AppPlatformCloudFunctionRequest where
+   * the annotations field will be the json format of Vision AI annotation.
+   * * The cloud function should return AppPlatformCloudFunctionResponse with
+   * AppendRowsRequest stored in the annotations field.
+   * * To drop the annotation, simply clear the annotations field in the
+   * returned AppPlatformCloudFunctionResponse.
+   * 
+ * + * map<string, string> cloud_function_mapping = 2; + */ + java.util.Map getCloudFunctionMappingMap(); + /** + * + * + *
+   * Data Schema
+   * By default, Vision AI Application will try to write annotations to the
+   * target BigQuery table using the following schema:
+   *
+   * ingestion_time: TIMESTAMP, the ingestion time of the original data.
+   *
+   * application: STRING, name of the application which produces the annotation.
+   *
+   * instance: STRING, Id of the instance which produces the annotation.
+   *
+   * node: STRING, name of the application graph node which produces the
+   * annotation.
+   *
+   * annotation: STRING or JSON, the actual annotation protobuf will be
+   * converted to json string with bytes field as 64 encoded string. It can be
+   * written to both String or Json type column.
+   *
+   * To forward annotation data to an existing BigQuery table, customer needs to
+   * make sure the compatibility of the schema.
+   * The map maps application node name to its corresponding cloud function
+   * endpoint to transform the annotations directly to the
+   * google.cloud.bigquery.storage.v1.AppendRowsRequest (only avro_rows or
+   * proto_rows should be set). If configured, annotations produced by
+   * corresponding application node will sent to the Cloud Function at first
+   * before be forwarded to BigQuery.
+   *
+   * If the default table schema doesn't fit, customer is able to transform the
+   * annotation output from Vision AI Application to arbitrary BigQuery table
+   * schema with CloudFunction.
+   * * The cloud function will receive AppPlatformCloudFunctionRequest where
+   * the annotations field will be the json format of Vision AI annotation.
+   * * The cloud function should return AppPlatformCloudFunctionResponse with
+   * AppendRowsRequest stored in the annotations field.
+   * * To drop the annotation, simply clear the annotations field in the
+   * returned AppPlatformCloudFunctionResponse.
+   * 
+ * + * map<string, string> cloud_function_mapping = 2; + */ + /* nullable */ + java.lang.String getCloudFunctionMappingOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue); + /** + * + * + *
+   * Data Schema
+   * By default, Vision AI Application will try to write annotations to the
+   * target BigQuery table using the following schema:
+   *
+   * ingestion_time: TIMESTAMP, the ingestion time of the original data.
+   *
+   * application: STRING, name of the application which produces the annotation.
+   *
+   * instance: STRING, Id of the instance which produces the annotation.
+   *
+   * node: STRING, name of the application graph node which produces the
+   * annotation.
+   *
+   * annotation: STRING or JSON, the actual annotation protobuf will be
+   * converted to json string with bytes field as 64 encoded string. It can be
+   * written to both String or Json type column.
+   *
+   * To forward annotation data to an existing BigQuery table, customer needs to
+   * make sure the compatibility of the schema.
+   * The map maps application node name to its corresponding cloud function
+   * endpoint to transform the annotations directly to the
+   * google.cloud.bigquery.storage.v1.AppendRowsRequest (only avro_rows or
+   * proto_rows should be set). If configured, annotations produced by
+   * corresponding application node will sent to the Cloud Function at first
+   * before be forwarded to BigQuery.
+   *
+   * If the default table schema doesn't fit, customer is able to transform the
+   * annotation output from Vision AI Application to arbitrary BigQuery table
+   * schema with CloudFunction.
+   * * The cloud function will receive AppPlatformCloudFunctionRequest where
+   * the annotations field will be the json format of Vision AI annotation.
+   * * The cloud function should return AppPlatformCloudFunctionResponse with
+   * AppendRowsRequest stored in the annotations field.
+   * * To drop the annotation, simply clear the annotations field in the
+   * returned AppPlatformCloudFunctionResponse.
+   * 
+ * + * map<string, string> cloud_function_mapping = 2; + */ + java.lang.String getCloudFunctionMappingOrThrow(java.lang.String key); + + /** + * + * + *
+   * If true, App Platform will create the BigQuery DataSet and the
+   * BigQuery Table with default schema if the specified table doesn't exist.
+   * This doesn't work if any cloud function customized schema is specified
+   * since the system doesn't know your desired schema.
+   * JSON column will be used in the default table created by App Platform.
+   * 
+ * + * bool create_default_table_if_not_exists = 3; + * + * @return The createDefaultTableIfNotExists. + */ + boolean getCreateDefaultTableIfNotExists(); +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/BoolValue.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/BoolValue.java new file mode 100644 index 000000000000..6b85f7cbcad0 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/BoolValue.java @@ -0,0 +1,493 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/warehouse.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** Protobuf type {@code google.cloud.visionai.v1.BoolValue} */ +public final class BoolValue extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.BoolValue) + BoolValueOrBuilder { + private static final long serialVersionUID = 0L; + // Use BoolValue.newBuilder() to construct. + private BoolValue(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private BoolValue() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new BoolValue(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_BoolValue_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_BoolValue_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.BoolValue.class, + com.google.cloud.visionai.v1.BoolValue.Builder.class); + } + + public static final int VALUE_FIELD_NUMBER = 1; + private boolean value_ = false; + /** + * bool value = 1; + * + * @return The value. + */ + @java.lang.Override + public boolean getValue() { + return value_; + } + + 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 (value_ != false) { + output.writeBool(1, value_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (value_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(1, value_); + } + size += getUnknownFields().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.visionai.v1.BoolValue)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.BoolValue other = (com.google.cloud.visionai.v1.BoolValue) obj; + + if (getValue() != other.getValue()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + VALUE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getValue()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.BoolValue parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.BoolValue 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.visionai.v1.BoolValue parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.BoolValue 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.visionai.v1.BoolValue parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.BoolValue parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.BoolValue parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.BoolValue 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.visionai.v1.BoolValue parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.BoolValue 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.visionai.v1.BoolValue parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.BoolValue 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.visionai.v1.BoolValue 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; + } + /** Protobuf type {@code google.cloud.visionai.v1.BoolValue} */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.BoolValue) + com.google.cloud.visionai.v1.BoolValueOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_BoolValue_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_BoolValue_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.BoolValue.class, + com.google.cloud.visionai.v1.BoolValue.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.BoolValue.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + value_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_BoolValue_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.BoolValue getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.BoolValue.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.BoolValue build() { + com.google.cloud.visionai.v1.BoolValue result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.BoolValue buildPartial() { + com.google.cloud.visionai.v1.BoolValue result = + new com.google.cloud.visionai.v1.BoolValue(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.visionai.v1.BoolValue result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.value_ = value_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.BoolValue) { + return mergeFrom((com.google.cloud.visionai.v1.BoolValue) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.BoolValue other) { + if (other == com.google.cloud.visionai.v1.BoolValue.getDefaultInstance()) return this; + if (other.getValue() != false) { + setValue(other.getValue()); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + value_ = input.readBool(); + bitField0_ |= 0x00000001; + break; + } // case 8 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private boolean value_; + /** + * bool value = 1; + * + * @return The value. + */ + @java.lang.Override + public boolean getValue() { + return value_; + } + /** + * bool value = 1; + * + * @param value The value to set. + * @return This builder for chaining. + */ + public Builder setValue(boolean value) { + + value_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * bool value = 1; + * + * @return This builder for chaining. + */ + public Builder clearValue() { + bitField0_ = (bitField0_ & ~0x00000001); + value_ = false; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.BoolValue) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.BoolValue) + private static final com.google.cloud.visionai.v1.BoolValue DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.BoolValue(); + } + + public static com.google.cloud.visionai.v1.BoolValue getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BoolValue parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.BoolValue getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/BoolValueOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/BoolValueOrBuilder.java new file mode 100644 index 000000000000..34bfca97d1c9 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/BoolValueOrBuilder.java @@ -0,0 +1,33 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/warehouse.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface BoolValueOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.BoolValue) + com.google.protobuf.MessageOrBuilder { + + /** + * bool value = 1; + * + * @return The value. + */ + boolean getValue(); +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/Channel.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/Channel.java new file mode 100644 index 000000000000..6183eb75ef0f --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/Channel.java @@ -0,0 +1,2240 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/streams_resources.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * Message describing the Channel object.
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.Channel} + */ +public final class Channel extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.Channel) + ChannelOrBuilder { + private static final long serialVersionUID = 0L; + // Use Channel.newBuilder() to construct. + private Channel(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Channel() { + name_ = ""; + stream_ = ""; + event_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Channel(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.StreamsResourcesProto + .internal_static_google_cloud_visionai_v1_Channel_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 4: + return internalGetLabels(); + case 5: + return internalGetAnnotations(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.StreamsResourcesProto + .internal_static_google_cloud_visionai_v1_Channel_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.Channel.class, + com.google.cloud.visionai.v1.Channel.Builder.class); + } + + private int bitField0_; + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Name of the resource.
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + 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(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Name of the resource.
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CREATE_TIME_FIELD_NUMBER = 2; + private com.google.protobuf.Timestamp createTime_; + /** + * + * + *
+   * Output only. The create timestamp.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * Output only. The create timestamp.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + /** + * + * + *
+   * Output only. The create timestamp.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + + public static final int UPDATE_TIME_FIELD_NUMBER = 3; + private com.google.protobuf.Timestamp updateTime_; + /** + * + * + *
+   * Output only. The update timestamp.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + @java.lang.Override + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+   * Output only. The update timestamp.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getUpdateTime() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + /** + * + * + *
+   * Output only. The update timestamp.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + + public static final int LABELS_FIELD_NUMBER = 4; + + private static final class LabelsDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.cloud.visionai.v1.StreamsResourcesProto + .internal_static_google_cloud_visionai_v1_Channel_LabelsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + + @SuppressWarnings("serial") + private com.google.protobuf.MapField labels_; + + private com.google.protobuf.MapField internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + /** + * + * + *
+   * Labels as key value pairs.
+   * 
+ * + * map<string, string> labels = 4; + */ + @java.lang.Override + public boolean containsLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetLabels().getMap().containsKey(key); + } + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + /** + * + * + *
+   * Labels as key value pairs.
+   * 
+ * + * map<string, string> labels = 4; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + * + * + *
+   * Labels as key value pairs.
+   * 
+ * + * map<string, string> labels = 4; + */ + @java.lang.Override + public /* nullable */ java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+   * Labels as key value pairs.
+   * 
+ * + * map<string, string> labels = 4; + */ + @java.lang.Override + public java.lang.String getLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int ANNOTATIONS_FIELD_NUMBER = 5; + + private static final class AnnotationsDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.cloud.visionai.v1.StreamsResourcesProto + .internal_static_google_cloud_visionai_v1_Channel_AnnotationsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + + @SuppressWarnings("serial") + private com.google.protobuf.MapField annotations_; + + private com.google.protobuf.MapField + internalGetAnnotations() { + if (annotations_ == null) { + return com.google.protobuf.MapField.emptyMapField(AnnotationsDefaultEntryHolder.defaultEntry); + } + return annotations_; + } + + public int getAnnotationsCount() { + return internalGetAnnotations().getMap().size(); + } + /** + * + * + *
+   * Annotations to allow clients to store small amounts of arbitrary data.
+   * 
+ * + * map<string, string> annotations = 5; + */ + @java.lang.Override + public boolean containsAnnotations(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetAnnotations().getMap().containsKey(key); + } + /** Use {@link #getAnnotationsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getAnnotations() { + return getAnnotationsMap(); + } + /** + * + * + *
+   * Annotations to allow clients to store small amounts of arbitrary data.
+   * 
+ * + * map<string, string> annotations = 5; + */ + @java.lang.Override + public java.util.Map getAnnotationsMap() { + return internalGetAnnotations().getMap(); + } + /** + * + * + *
+   * Annotations to allow clients to store small amounts of arbitrary data.
+   * 
+ * + * map<string, string> annotations = 5; + */ + @java.lang.Override + public /* nullable */ java.lang.String getAnnotationsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetAnnotations().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+   * Annotations to allow clients to store small amounts of arbitrary data.
+   * 
+ * + * map<string, string> annotations = 5; + */ + @java.lang.Override + public java.lang.String getAnnotationsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetAnnotations().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int STREAM_FIELD_NUMBER = 6; + + @SuppressWarnings("serial") + private volatile java.lang.Object stream_ = ""; + /** + * + * + *
+   * Required. Stream that is associated with this series.
+   * 
+ * + * + * string stream = 6 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The stream. + */ + @java.lang.Override + public java.lang.String getStream() { + java.lang.Object ref = stream_; + 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(); + stream_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Stream that is associated with this series.
+   * 
+ * + * + * string stream = 6 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for stream. + */ + @java.lang.Override + public com.google.protobuf.ByteString getStreamBytes() { + java.lang.Object ref = stream_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + stream_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int EVENT_FIELD_NUMBER = 7; + + @SuppressWarnings("serial") + private volatile java.lang.Object event_ = ""; + /** + * + * + *
+   * Required. Event that is associated with this series.
+   * 
+ * + * + * string event = 7 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The event. + */ + @java.lang.Override + public java.lang.String getEvent() { + java.lang.Object ref = event_; + 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(); + event_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Event that is associated with this series.
+   * 
+ * + * + * string event = 7 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for event. + */ + @java.lang.Override + public com.google.protobuf.ByteString getEventBytes() { + java.lang.Object ref = event_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + event_ = 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getCreateTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(3, getUpdateTime()); + } + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 4); + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, internalGetAnnotations(), AnnotationsDefaultEntryHolder.defaultEntry, 5); + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(stream_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, stream_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(event_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 7, event_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getCreateTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getUpdateTime()); + } + for (java.util.Map.Entry entry : + internalGetLabels().getMap().entrySet()) { + com.google.protobuf.MapEntry labels__ = + LabelsDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, labels__); + } + for (java.util.Map.Entry entry : + internalGetAnnotations().getMap().entrySet()) { + com.google.protobuf.MapEntry annotations__ = + AnnotationsDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, annotations__); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(stream_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, stream_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(event_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, event_); + } + size += getUnknownFields().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.visionai.v1.Channel)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.Channel other = (com.google.cloud.visionai.v1.Channel) obj; + + if (!getName().equals(other.getName())) return false; + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime().equals(other.getCreateTime())) return false; + } + if (hasUpdateTime() != other.hasUpdateTime()) return false; + if (hasUpdateTime()) { + if (!getUpdateTime().equals(other.getUpdateTime())) return false; + } + if (!internalGetLabels().equals(other.internalGetLabels())) return false; + if (!internalGetAnnotations().equals(other.internalGetAnnotations())) return false; + if (!getStream().equals(other.getStream())) return false; + if (!getEvent().equals(other.getEvent())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasUpdateTime()) { + hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getUpdateTime().hashCode(); + } + if (!internalGetLabels().getMap().isEmpty()) { + hash = (37 * hash) + LABELS_FIELD_NUMBER; + hash = (53 * hash) + internalGetLabels().hashCode(); + } + if (!internalGetAnnotations().getMap().isEmpty()) { + hash = (37 * hash) + ANNOTATIONS_FIELD_NUMBER; + hash = (53 * hash) + internalGetAnnotations().hashCode(); + } + hash = (37 * hash) + STREAM_FIELD_NUMBER; + hash = (53 * hash) + getStream().hashCode(); + hash = (37 * hash) + EVENT_FIELD_NUMBER; + hash = (53 * hash) + getEvent().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.Channel parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.Channel 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.visionai.v1.Channel parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.Channel 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.visionai.v1.Channel parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.Channel parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.Channel parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.Channel 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.visionai.v1.Channel parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.Channel 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.visionai.v1.Channel parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.Channel 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.visionai.v1.Channel 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; + } + /** + * + * + *
+   * Message describing the Channel object.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.Channel} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.Channel) + com.google.cloud.visionai.v1.ChannelOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.StreamsResourcesProto + .internal_static_google_cloud_visionai_v1_Channel_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 4: + return internalGetLabels(); + case 5: + return internalGetAnnotations(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( + int number) { + switch (number) { + case 4: + return internalGetMutableLabels(); + case 5: + return internalGetMutableAnnotations(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.StreamsResourcesProto + .internal_static_google_cloud_visionai_v1_Channel_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.Channel.class, + com.google.cloud.visionai.v1.Channel.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.Channel.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getCreateTimeFieldBuilder(); + getUpdateTimeFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + internalGetMutableLabels().clear(); + internalGetMutableAnnotations().clear(); + stream_ = ""; + event_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.StreamsResourcesProto + .internal_static_google_cloud_visionai_v1_Channel_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.Channel getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.Channel.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.Channel build() { + com.google.cloud.visionai.v1.Channel result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.Channel buildPartial() { + com.google.cloud.visionai.v1.Channel result = new com.google.cloud.visionai.v1.Channel(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.visionai.v1.Channel result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.updateTime_ = updateTimeBuilder_ == null ? updateTime_ : updateTimeBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.labels_ = internalGetLabels(); + result.labels_.makeImmutable(); + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.annotations_ = internalGetAnnotations(); + result.annotations_.makeImmutable(); + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.stream_ = stream_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.event_ = event_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.Channel) { + return mergeFrom((com.google.cloud.visionai.v1.Channel) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.Channel other) { + if (other == com.google.cloud.visionai.v1.Channel.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + internalGetMutableLabels().mergeFrom(other.internalGetLabels()); + bitField0_ |= 0x00000008; + internalGetMutableAnnotations().mergeFrom(other.internalGetAnnotations()); + bitField0_ |= 0x00000010; + if (!other.getStream().isEmpty()) { + stream_ = other.stream_; + bitField0_ |= 0x00000020; + onChanged(); + } + if (!other.getEvent().isEmpty()) { + event_ = other.event_; + bitField0_ |= 0x00000040; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage(getUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + com.google.protobuf.MapEntry labels__ = + input.readMessage( + LabelsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableLabels() + .getMutableMap() + .put(labels__.getKey(), labels__.getValue()); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + com.google.protobuf.MapEntry annotations__ = + input.readMessage( + AnnotationsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableAnnotations() + .getMutableMap() + .put(annotations__.getKey(), annotations__.getValue()); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 50: + { + stream_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case 50 + case 58: + { + event_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000040; + break; + } // case 58 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Name of the resource.
+     * 
+ * + * string name = 1; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Name of the resource.
+     * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Name of the resource.
+     * 
+ * + * string name = 1; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Name of the resource.
+     * 
+ * + * string name = 1; + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Name of the resource.
+     * 
+ * + * string name = 1; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + createTimeBuilder_; + /** + * + * + *
+     * Output only. The create timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * Output only. The create timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. The create timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + } else { + createTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The create timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The create timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && createTime_ != null + && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getCreateTimeBuilder().mergeFrom(value); + } else { + createTime_ = value; + } + } else { + createTimeBuilder_.mergeFrom(value); + } + if (createTime_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Output only. The create timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearCreateTime() { + bitField0_ = (bitField0_ & ~0x00000002); + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The create timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. The create timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } + } + /** + * + * + *
+     * Output only. The create timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), getParentForChildren(), isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private com.google.protobuf.Timestamp updateTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + updateTimeBuilder_; + /** + * + * + *
+     * Output only. The update timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+     * Output only. The update timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + public com.google.protobuf.Timestamp getUpdateTime() { + if (updateTimeBuilder_ == null) { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } else { + return updateTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. The update timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateTime_ = value; + } else { + updateTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The update timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (updateTimeBuilder_ == null) { + updateTime_ = builderForValue.build(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The update timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && updateTime_ != null + && updateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getUpdateTimeBuilder().mergeFrom(value); + } else { + updateTime_ = value; + } + } else { + updateTimeBuilder_.mergeFrom(value); + } + if (updateTime_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Output only. The update timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearUpdateTime() { + bitField0_ = (bitField0_ & ~0x00000004); + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The update timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getUpdateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. The update timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + if (updateTimeBuilder_ != null) { + return updateTimeBuilder_.getMessageOrBuilder(); + } else { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } + } + /** + * + * + *
+     * Output only. The update timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + 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_; + } + + private com.google.protobuf.MapField labels_; + + private com.google.protobuf.MapField internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + + private com.google.protobuf.MapField + internalGetMutableLabels() { + if (labels_ == null) { + labels_ = com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry); + } + if (!labels_.isMutable()) { + labels_ = labels_.copy(); + } + bitField0_ |= 0x00000008; + onChanged(); + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + /** + * + * + *
+     * Labels as key value pairs.
+     * 
+ * + * map<string, string> labels = 4; + */ + @java.lang.Override + public boolean containsLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetLabels().getMap().containsKey(key); + } + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + /** + * + * + *
+     * Labels as key value pairs.
+     * 
+ * + * map<string, string> labels = 4; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + * + * + *
+     * Labels as key value pairs.
+     * 
+ * + * map<string, string> labels = 4; + */ + @java.lang.Override + public /* nullable */ java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+     * Labels as key value pairs.
+     * 
+ * + * map<string, string> labels = 4; + */ + @java.lang.Override + public java.lang.String getLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearLabels() { + bitField0_ = (bitField0_ & ~0x00000008); + internalGetMutableLabels().getMutableMap().clear(); + return this; + } + /** + * + * + *
+     * Labels as key value pairs.
+     * 
+ * + * map<string, string> labels = 4; + */ + public Builder removeLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + internalGetMutableLabels().getMutableMap().remove(key); + return this; + } + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableLabels() { + bitField0_ |= 0x00000008; + return internalGetMutableLabels().getMutableMap(); + } + /** + * + * + *
+     * Labels as key value pairs.
+     * 
+ * + * map<string, string> labels = 4; + */ + public Builder putLabels(java.lang.String key, java.lang.String value) { + if (key == null) { + throw new NullPointerException("map key"); + } + if (value == null) { + throw new NullPointerException("map value"); + } + internalGetMutableLabels().getMutableMap().put(key, value); + bitField0_ |= 0x00000008; + return this; + } + /** + * + * + *
+     * Labels as key value pairs.
+     * 
+ * + * map<string, string> labels = 4; + */ + public Builder putAllLabels(java.util.Map values) { + internalGetMutableLabels().getMutableMap().putAll(values); + bitField0_ |= 0x00000008; + return this; + } + + private com.google.protobuf.MapField annotations_; + + private com.google.protobuf.MapField + internalGetAnnotations() { + if (annotations_ == null) { + return com.google.protobuf.MapField.emptyMapField( + AnnotationsDefaultEntryHolder.defaultEntry); + } + return annotations_; + } + + private com.google.protobuf.MapField + internalGetMutableAnnotations() { + if (annotations_ == null) { + annotations_ = + com.google.protobuf.MapField.newMapField(AnnotationsDefaultEntryHolder.defaultEntry); + } + if (!annotations_.isMutable()) { + annotations_ = annotations_.copy(); + } + bitField0_ |= 0x00000010; + onChanged(); + return annotations_; + } + + public int getAnnotationsCount() { + return internalGetAnnotations().getMap().size(); + } + /** + * + * + *
+     * Annotations to allow clients to store small amounts of arbitrary data.
+     * 
+ * + * map<string, string> annotations = 5; + */ + @java.lang.Override + public boolean containsAnnotations(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetAnnotations().getMap().containsKey(key); + } + /** Use {@link #getAnnotationsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getAnnotations() { + return getAnnotationsMap(); + } + /** + * + * + *
+     * Annotations to allow clients to store small amounts of arbitrary data.
+     * 
+ * + * map<string, string> annotations = 5; + */ + @java.lang.Override + public java.util.Map getAnnotationsMap() { + return internalGetAnnotations().getMap(); + } + /** + * + * + *
+     * Annotations to allow clients to store small amounts of arbitrary data.
+     * 
+ * + * map<string, string> annotations = 5; + */ + @java.lang.Override + public /* nullable */ java.lang.String getAnnotationsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetAnnotations().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+     * Annotations to allow clients to store small amounts of arbitrary data.
+     * 
+ * + * map<string, string> annotations = 5; + */ + @java.lang.Override + public java.lang.String getAnnotationsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetAnnotations().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearAnnotations() { + bitField0_ = (bitField0_ & ~0x00000010); + internalGetMutableAnnotations().getMutableMap().clear(); + return this; + } + /** + * + * + *
+     * Annotations to allow clients to store small amounts of arbitrary data.
+     * 
+ * + * map<string, string> annotations = 5; + */ + public Builder removeAnnotations(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + internalGetMutableAnnotations().getMutableMap().remove(key); + return this; + } + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableAnnotations() { + bitField0_ |= 0x00000010; + return internalGetMutableAnnotations().getMutableMap(); + } + /** + * + * + *
+     * Annotations to allow clients to store small amounts of arbitrary data.
+     * 
+ * + * map<string, string> annotations = 5; + */ + public Builder putAnnotations(java.lang.String key, java.lang.String value) { + if (key == null) { + throw new NullPointerException("map key"); + } + if (value == null) { + throw new NullPointerException("map value"); + } + internalGetMutableAnnotations().getMutableMap().put(key, value); + bitField0_ |= 0x00000010; + return this; + } + /** + * + * + *
+     * Annotations to allow clients to store small amounts of arbitrary data.
+     * 
+ * + * map<string, string> annotations = 5; + */ + public Builder putAllAnnotations(java.util.Map values) { + internalGetMutableAnnotations().getMutableMap().putAll(values); + bitField0_ |= 0x00000010; + return this; + } + + private java.lang.Object stream_ = ""; + /** + * + * + *
+     * Required. Stream that is associated with this series.
+     * 
+ * + * + * string stream = 6 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The stream. + */ + public java.lang.String getStream() { + java.lang.Object ref = stream_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + stream_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Stream that is associated with this series.
+     * 
+ * + * + * string stream = 6 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for stream. + */ + public com.google.protobuf.ByteString getStreamBytes() { + java.lang.Object ref = stream_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + stream_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Stream that is associated with this series.
+     * 
+ * + * + * string stream = 6 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The stream to set. + * @return This builder for chaining. + */ + public Builder setStream(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + stream_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Stream that is associated with this series.
+     * 
+ * + * + * string stream = 6 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearStream() { + stream_ = getDefaultInstance().getStream(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Stream that is associated with this series.
+     * 
+ * + * + * string stream = 6 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for stream to set. + * @return This builder for chaining. + */ + public Builder setStreamBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + stream_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + private java.lang.Object event_ = ""; + /** + * + * + *
+     * Required. Event that is associated with this series.
+     * 
+ * + * + * string event = 7 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The event. + */ + public java.lang.String getEvent() { + java.lang.Object ref = event_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + event_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Event that is associated with this series.
+     * 
+ * + * + * string event = 7 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for event. + */ + public com.google.protobuf.ByteString getEventBytes() { + java.lang.Object ref = event_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + event_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Event that is associated with this series.
+     * 
+ * + * + * string event = 7 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The event to set. + * @return This builder for chaining. + */ + public Builder setEvent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + event_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Event that is associated with this series.
+     * 
+ * + * + * string event = 7 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearEvent() { + event_ = getDefaultInstance().getEvent(); + bitField0_ = (bitField0_ & ~0x00000040); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Event that is associated with this series.
+     * 
+ * + * + * string event = 7 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for event to set. + * @return This builder for chaining. + */ + public Builder setEventBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + event_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.Channel) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.Channel) + private static final com.google.cloud.visionai.v1.Channel DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.Channel(); + } + + public static com.google.cloud.visionai.v1.Channel getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Channel parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.Channel getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ChannelOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ChannelOrBuilder.java new file mode 100644 index 000000000000..7f88bdb29702 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ChannelOrBuilder.java @@ -0,0 +1,301 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/streams_resources.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface ChannelOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.Channel) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Name of the resource.
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Name of the resource.
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Output only. The create timestamp.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + /** + * + * + *
+   * Output only. The create timestamp.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + * + * + *
+   * Output only. The create timestamp.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. The update timestamp.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + /** + * + * + *
+   * Output only. The update timestamp.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + /** + * + * + *
+   * Output only. The update timestamp.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); + + /** + * + * + *
+   * Labels as key value pairs.
+   * 
+ * + * map<string, string> labels = 4; + */ + int getLabelsCount(); + /** + * + * + *
+   * Labels as key value pairs.
+   * 
+ * + * map<string, string> labels = 4; + */ + boolean containsLabels(java.lang.String key); + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Deprecated + java.util.Map getLabels(); + /** + * + * + *
+   * Labels as key value pairs.
+   * 
+ * + * map<string, string> labels = 4; + */ + java.util.Map getLabelsMap(); + /** + * + * + *
+   * Labels as key value pairs.
+   * 
+ * + * map<string, string> labels = 4; + */ + /* nullable */ + java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue); + /** + * + * + *
+   * Labels as key value pairs.
+   * 
+ * + * map<string, string> labels = 4; + */ + java.lang.String getLabelsOrThrow(java.lang.String key); + + /** + * + * + *
+   * Annotations to allow clients to store small amounts of arbitrary data.
+   * 
+ * + * map<string, string> annotations = 5; + */ + int getAnnotationsCount(); + /** + * + * + *
+   * Annotations to allow clients to store small amounts of arbitrary data.
+   * 
+ * + * map<string, string> annotations = 5; + */ + boolean containsAnnotations(java.lang.String key); + /** Use {@link #getAnnotationsMap()} instead. */ + @java.lang.Deprecated + java.util.Map getAnnotations(); + /** + * + * + *
+   * Annotations to allow clients to store small amounts of arbitrary data.
+   * 
+ * + * map<string, string> annotations = 5; + */ + java.util.Map getAnnotationsMap(); + /** + * + * + *
+   * Annotations to allow clients to store small amounts of arbitrary data.
+   * 
+ * + * map<string, string> annotations = 5; + */ + /* nullable */ + java.lang.String getAnnotationsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue); + /** + * + * + *
+   * Annotations to allow clients to store small amounts of arbitrary data.
+   * 
+ * + * map<string, string> annotations = 5; + */ + java.lang.String getAnnotationsOrThrow(java.lang.String key); + + /** + * + * + *
+   * Required. Stream that is associated with this series.
+   * 
+ * + * + * string stream = 6 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The stream. + */ + java.lang.String getStream(); + /** + * + * + *
+   * Required. Stream that is associated with this series.
+   * 
+ * + * + * string stream = 6 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for stream. + */ + com.google.protobuf.ByteString getStreamBytes(); + + /** + * + * + *
+   * Required. Event that is associated with this series.
+   * 
+ * + * + * string event = 7 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The event. + */ + java.lang.String getEvent(); + /** + * + * + *
+   * Required. Event that is associated with this series.
+   * 
+ * + * + * string event = 7 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for event. + */ + com.google.protobuf.ByteString getEventBytes(); +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/CircleArea.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/CircleArea.java new file mode 100644 index 000000000000..378d0005b2d2 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/CircleArea.java @@ -0,0 +1,731 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/warehouse.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * Representation of a circle area.
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.CircleArea} + */ +public final class CircleArea extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.CircleArea) + CircleAreaOrBuilder { + private static final long serialVersionUID = 0L; + // Use CircleArea.newBuilder() to construct. + private CircleArea(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CircleArea() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CircleArea(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_CircleArea_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_CircleArea_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.CircleArea.class, + com.google.cloud.visionai.v1.CircleArea.Builder.class); + } + + public static final int LATITUDE_FIELD_NUMBER = 1; + private double latitude_ = 0D; + /** + * + * + *
+   * Latitude of circle area's center. Degrees [-90 .. 90]
+   * 
+ * + * double latitude = 1; + * + * @return The latitude. + */ + @java.lang.Override + public double getLatitude() { + return latitude_; + } + + public static final int LONGITUDE_FIELD_NUMBER = 2; + private double longitude_ = 0D; + /** + * + * + *
+   * Longitude of circle area's center. Degrees [-180 .. 180]
+   * 
+ * + * double longitude = 2; + * + * @return The longitude. + */ + @java.lang.Override + public double getLongitude() { + return longitude_; + } + + public static final int RADIUS_METER_FIELD_NUMBER = 3; + private double radiusMeter_ = 0D; + /** + * + * + *
+   * Radius of the circle area in meters.
+   * 
+ * + * double radius_meter = 3; + * + * @return The radiusMeter. + */ + @java.lang.Override + public double getRadiusMeter() { + return radiusMeter_; + } + + 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 (java.lang.Double.doubleToRawLongBits(latitude_) != 0) { + output.writeDouble(1, latitude_); + } + if (java.lang.Double.doubleToRawLongBits(longitude_) != 0) { + output.writeDouble(2, longitude_); + } + if (java.lang.Double.doubleToRawLongBits(radiusMeter_) != 0) { + output.writeDouble(3, radiusMeter_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (java.lang.Double.doubleToRawLongBits(latitude_) != 0) { + size += com.google.protobuf.CodedOutputStream.computeDoubleSize(1, latitude_); + } + if (java.lang.Double.doubleToRawLongBits(longitude_) != 0) { + size += com.google.protobuf.CodedOutputStream.computeDoubleSize(2, longitude_); + } + if (java.lang.Double.doubleToRawLongBits(radiusMeter_) != 0) { + size += com.google.protobuf.CodedOutputStream.computeDoubleSize(3, radiusMeter_); + } + size += getUnknownFields().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.visionai.v1.CircleArea)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.CircleArea other = (com.google.cloud.visionai.v1.CircleArea) obj; + + if (java.lang.Double.doubleToLongBits(getLatitude()) + != java.lang.Double.doubleToLongBits(other.getLatitude())) return false; + if (java.lang.Double.doubleToLongBits(getLongitude()) + != java.lang.Double.doubleToLongBits(other.getLongitude())) return false; + if (java.lang.Double.doubleToLongBits(getRadiusMeter()) + != java.lang.Double.doubleToLongBits(other.getRadiusMeter())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + LATITUDE_FIELD_NUMBER; + hash = + (53 * hash) + + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getLatitude())); + hash = (37 * hash) + LONGITUDE_FIELD_NUMBER; + hash = + (53 * hash) + + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getLongitude())); + hash = (37 * hash) + RADIUS_METER_FIELD_NUMBER; + hash = + (53 * hash) + + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getRadiusMeter())); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.CircleArea parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.CircleArea 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.visionai.v1.CircleArea parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.CircleArea 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.visionai.v1.CircleArea parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.CircleArea parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.CircleArea parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.CircleArea 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.visionai.v1.CircleArea parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.CircleArea 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.visionai.v1.CircleArea parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.CircleArea 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.visionai.v1.CircleArea 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; + } + /** + * + * + *
+   * Representation of a circle area.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.CircleArea} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.CircleArea) + com.google.cloud.visionai.v1.CircleAreaOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_CircleArea_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_CircleArea_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.CircleArea.class, + com.google.cloud.visionai.v1.CircleArea.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.CircleArea.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + latitude_ = 0D; + longitude_ = 0D; + radiusMeter_ = 0D; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_CircleArea_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.CircleArea getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.CircleArea.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.CircleArea build() { + com.google.cloud.visionai.v1.CircleArea result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.CircleArea buildPartial() { + com.google.cloud.visionai.v1.CircleArea result = + new com.google.cloud.visionai.v1.CircleArea(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.visionai.v1.CircleArea result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.latitude_ = latitude_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.longitude_ = longitude_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.radiusMeter_ = radiusMeter_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.CircleArea) { + return mergeFrom((com.google.cloud.visionai.v1.CircleArea) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.CircleArea other) { + if (other == com.google.cloud.visionai.v1.CircleArea.getDefaultInstance()) return this; + if (other.getLatitude() != 0D) { + setLatitude(other.getLatitude()); + } + if (other.getLongitude() != 0D) { + setLongitude(other.getLongitude()); + } + if (other.getRadiusMeter() != 0D) { + setRadiusMeter(other.getRadiusMeter()); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 9: + { + latitude_ = input.readDouble(); + bitField0_ |= 0x00000001; + break; + } // case 9 + case 17: + { + longitude_ = input.readDouble(); + bitField0_ |= 0x00000002; + break; + } // case 17 + case 25: + { + radiusMeter_ = input.readDouble(); + bitField0_ |= 0x00000004; + break; + } // case 25 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private double latitude_; + /** + * + * + *
+     * Latitude of circle area's center. Degrees [-90 .. 90]
+     * 
+ * + * double latitude = 1; + * + * @return The latitude. + */ + @java.lang.Override + public double getLatitude() { + return latitude_; + } + /** + * + * + *
+     * Latitude of circle area's center. Degrees [-90 .. 90]
+     * 
+ * + * double latitude = 1; + * + * @param value The latitude to set. + * @return This builder for chaining. + */ + public Builder setLatitude(double value) { + + latitude_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Latitude of circle area's center. Degrees [-90 .. 90]
+     * 
+ * + * double latitude = 1; + * + * @return This builder for chaining. + */ + public Builder clearLatitude() { + bitField0_ = (bitField0_ & ~0x00000001); + latitude_ = 0D; + onChanged(); + return this; + } + + private double longitude_; + /** + * + * + *
+     * Longitude of circle area's center. Degrees [-180 .. 180]
+     * 
+ * + * double longitude = 2; + * + * @return The longitude. + */ + @java.lang.Override + public double getLongitude() { + return longitude_; + } + /** + * + * + *
+     * Longitude of circle area's center. Degrees [-180 .. 180]
+     * 
+ * + * double longitude = 2; + * + * @param value The longitude to set. + * @return This builder for chaining. + */ + public Builder setLongitude(double value) { + + longitude_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Longitude of circle area's center. Degrees [-180 .. 180]
+     * 
+ * + * double longitude = 2; + * + * @return This builder for chaining. + */ + public Builder clearLongitude() { + bitField0_ = (bitField0_ & ~0x00000002); + longitude_ = 0D; + onChanged(); + return this; + } + + private double radiusMeter_; + /** + * + * + *
+     * Radius of the circle area in meters.
+     * 
+ * + * double radius_meter = 3; + * + * @return The radiusMeter. + */ + @java.lang.Override + public double getRadiusMeter() { + return radiusMeter_; + } + /** + * + * + *
+     * Radius of the circle area in meters.
+     * 
+ * + * double radius_meter = 3; + * + * @param value The radiusMeter to set. + * @return This builder for chaining. + */ + public Builder setRadiusMeter(double value) { + + radiusMeter_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Radius of the circle area in meters.
+     * 
+ * + * double radius_meter = 3; + * + * @return This builder for chaining. + */ + public Builder clearRadiusMeter() { + bitField0_ = (bitField0_ & ~0x00000004); + radiusMeter_ = 0D; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.CircleArea) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.CircleArea) + private static final com.google.cloud.visionai.v1.CircleArea DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.CircleArea(); + } + + public static com.google.cloud.visionai.v1.CircleArea getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CircleArea parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.CircleArea getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/CircleAreaOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/CircleAreaOrBuilder.java new file mode 100644 index 000000000000..4662af09c94c --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/CircleAreaOrBuilder.java @@ -0,0 +1,65 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/warehouse.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface CircleAreaOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.CircleArea) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Latitude of circle area's center. Degrees [-90 .. 90]
+   * 
+ * + * double latitude = 1; + * + * @return The latitude. + */ + double getLatitude(); + + /** + * + * + *
+   * Longitude of circle area's center. Degrees [-180 .. 180]
+   * 
+ * + * double longitude = 2; + * + * @return The longitude. + */ + double getLongitude(); + + /** + * + * + *
+   * Radius of the circle area in meters.
+   * 
+ * + * double radius_meter = 3; + * + * @return The radiusMeter. + */ + double getRadiusMeter(); +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ClassificationPredictionResult.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ClassificationPredictionResult.java new file mode 100644 index 000000000000..a71f8f6145b8 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ClassificationPredictionResult.java @@ -0,0 +1,1232 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/annotations.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * Prediction output format for Image and Text Classification.
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.ClassificationPredictionResult} + */ +public final class ClassificationPredictionResult extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.ClassificationPredictionResult) + ClassificationPredictionResultOrBuilder { + private static final long serialVersionUID = 0L; + // Use ClassificationPredictionResult.newBuilder() to construct. + private ClassificationPredictionResult( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ClassificationPredictionResult() { + ids_ = emptyLongList(); + displayNames_ = com.google.protobuf.LazyStringArrayList.emptyList(); + confidences_ = emptyFloatList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ClassificationPredictionResult(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.AnnotationsProto + .internal_static_google_cloud_visionai_v1_ClassificationPredictionResult_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.AnnotationsProto + .internal_static_google_cloud_visionai_v1_ClassificationPredictionResult_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.ClassificationPredictionResult.class, + com.google.cloud.visionai.v1.ClassificationPredictionResult.Builder.class); + } + + public static final int IDS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private com.google.protobuf.Internal.LongList ids_ = emptyLongList(); + /** + * + * + *
+   * The resource IDs of the AnnotationSpecs that had been identified.
+   * 
+ * + * repeated int64 ids = 1; + * + * @return A list containing the ids. + */ + @java.lang.Override + public java.util.List getIdsList() { + return ids_; + } + /** + * + * + *
+   * The resource IDs of the AnnotationSpecs that had been identified.
+   * 
+ * + * repeated int64 ids = 1; + * + * @return The count of ids. + */ + public int getIdsCount() { + return ids_.size(); + } + /** + * + * + *
+   * The resource IDs of the AnnotationSpecs that had been identified.
+   * 
+ * + * repeated int64 ids = 1; + * + * @param index The index of the element to return. + * @return The ids at the given index. + */ + public long getIds(int index) { + return ids_.getLong(index); + } + + private int idsMemoizedSerializedSize = -1; + + public static final int DISPLAY_NAMES_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList displayNames_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + * + * + *
+   * The display names of the AnnotationSpecs that had been identified, order
+   * matches the IDs.
+   * 
+ * + * repeated string display_names = 2; + * + * @return A list containing the displayNames. + */ + public com.google.protobuf.ProtocolStringList getDisplayNamesList() { + return displayNames_; + } + /** + * + * + *
+   * The display names of the AnnotationSpecs that had been identified, order
+   * matches the IDs.
+   * 
+ * + * repeated string display_names = 2; + * + * @return The count of displayNames. + */ + public int getDisplayNamesCount() { + return displayNames_.size(); + } + /** + * + * + *
+   * The display names of the AnnotationSpecs that had been identified, order
+   * matches the IDs.
+   * 
+ * + * repeated string display_names = 2; + * + * @param index The index of the element to return. + * @return The displayNames at the given index. + */ + public java.lang.String getDisplayNames(int index) { + return displayNames_.get(index); + } + /** + * + * + *
+   * The display names of the AnnotationSpecs that had been identified, order
+   * matches the IDs.
+   * 
+ * + * repeated string display_names = 2; + * + * @param index The index of the value to return. + * @return The bytes of the displayNames at the given index. + */ + public com.google.protobuf.ByteString getDisplayNamesBytes(int index) { + return displayNames_.getByteString(index); + } + + public static final int CONFIDENCES_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private com.google.protobuf.Internal.FloatList confidences_ = emptyFloatList(); + /** + * + * + *
+   * The Model's confidences in correctness of the predicted IDs, higher value
+   * means higher confidence. Order matches the Ids.
+   * 
+ * + * repeated float confidences = 3; + * + * @return A list containing the confidences. + */ + @java.lang.Override + public java.util.List getConfidencesList() { + return confidences_; + } + /** + * + * + *
+   * The Model's confidences in correctness of the predicted IDs, higher value
+   * means higher confidence. Order matches the Ids.
+   * 
+ * + * repeated float confidences = 3; + * + * @return The count of confidences. + */ + public int getConfidencesCount() { + return confidences_.size(); + } + /** + * + * + *
+   * The Model's confidences in correctness of the predicted IDs, higher value
+   * means higher confidence. Order matches the Ids.
+   * 
+ * + * repeated float confidences = 3; + * + * @param index The index of the element to return. + * @return The confidences at the given index. + */ + public float getConfidences(int index) { + return confidences_.getFloat(index); + } + + private int confidencesMemoizedSerializedSize = -1; + + 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 (getIdsList().size() > 0) { + output.writeUInt32NoTag(10); + output.writeUInt32NoTag(idsMemoizedSerializedSize); + } + for (int i = 0; i < ids_.size(); i++) { + output.writeInt64NoTag(ids_.getLong(i)); + } + for (int i = 0; i < displayNames_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, displayNames_.getRaw(i)); + } + if (getConfidencesList().size() > 0) { + output.writeUInt32NoTag(26); + output.writeUInt32NoTag(confidencesMemoizedSerializedSize); + } + for (int i = 0; i < confidences_.size(); i++) { + output.writeFloatNoTag(confidences_.getFloat(i)); + } + getUnknownFields().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 < ids_.size(); i++) { + dataSize += com.google.protobuf.CodedOutputStream.computeInt64SizeNoTag(ids_.getLong(i)); + } + size += dataSize; + if (!getIdsList().isEmpty()) { + size += 1; + size += com.google.protobuf.CodedOutputStream.computeInt32SizeNoTag(dataSize); + } + idsMemoizedSerializedSize = dataSize; + } + { + int dataSize = 0; + for (int i = 0; i < displayNames_.size(); i++) { + dataSize += computeStringSizeNoTag(displayNames_.getRaw(i)); + } + size += dataSize; + size += 1 * getDisplayNamesList().size(); + } + { + int dataSize = 0; + dataSize = 4 * getConfidencesList().size(); + size += dataSize; + if (!getConfidencesList().isEmpty()) { + size += 1; + size += com.google.protobuf.CodedOutputStream.computeInt32SizeNoTag(dataSize); + } + confidencesMemoizedSerializedSize = dataSize; + } + size += getUnknownFields().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.visionai.v1.ClassificationPredictionResult)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.ClassificationPredictionResult other = + (com.google.cloud.visionai.v1.ClassificationPredictionResult) obj; + + if (!getIdsList().equals(other.getIdsList())) return false; + if (!getDisplayNamesList().equals(other.getDisplayNamesList())) return false; + if (!getConfidencesList().equals(other.getConfidencesList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getIdsCount() > 0) { + hash = (37 * hash) + IDS_FIELD_NUMBER; + hash = (53 * hash) + getIdsList().hashCode(); + } + if (getDisplayNamesCount() > 0) { + hash = (37 * hash) + DISPLAY_NAMES_FIELD_NUMBER; + hash = (53 * hash) + getDisplayNamesList().hashCode(); + } + if (getConfidencesCount() > 0) { + hash = (37 * hash) + CONFIDENCES_FIELD_NUMBER; + hash = (53 * hash) + getConfidencesList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.ClassificationPredictionResult parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ClassificationPredictionResult 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.visionai.v1.ClassificationPredictionResult parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ClassificationPredictionResult 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.visionai.v1.ClassificationPredictionResult parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ClassificationPredictionResult parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.ClassificationPredictionResult parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ClassificationPredictionResult 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.visionai.v1.ClassificationPredictionResult parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ClassificationPredictionResult 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.visionai.v1.ClassificationPredictionResult parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ClassificationPredictionResult 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.visionai.v1.ClassificationPredictionResult 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; + } + /** + * + * + *
+   * Prediction output format for Image and Text Classification.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.ClassificationPredictionResult} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.ClassificationPredictionResult) + com.google.cloud.visionai.v1.ClassificationPredictionResultOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.AnnotationsProto + .internal_static_google_cloud_visionai_v1_ClassificationPredictionResult_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.AnnotationsProto + .internal_static_google_cloud_visionai_v1_ClassificationPredictionResult_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.ClassificationPredictionResult.class, + com.google.cloud.visionai.v1.ClassificationPredictionResult.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.ClassificationPredictionResult.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + ids_ = emptyLongList(); + displayNames_ = com.google.protobuf.LazyStringArrayList.emptyList(); + confidences_ = emptyFloatList(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.AnnotationsProto + .internal_static_google_cloud_visionai_v1_ClassificationPredictionResult_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ClassificationPredictionResult getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.ClassificationPredictionResult.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ClassificationPredictionResult build() { + com.google.cloud.visionai.v1.ClassificationPredictionResult result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ClassificationPredictionResult buildPartial() { + com.google.cloud.visionai.v1.ClassificationPredictionResult result = + new com.google.cloud.visionai.v1.ClassificationPredictionResult(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.visionai.v1.ClassificationPredictionResult result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + ids_.makeImmutable(); + result.ids_ = ids_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + displayNames_.makeImmutable(); + result.displayNames_ = displayNames_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + confidences_.makeImmutable(); + result.confidences_ = confidences_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.ClassificationPredictionResult) { + return mergeFrom((com.google.cloud.visionai.v1.ClassificationPredictionResult) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.ClassificationPredictionResult other) { + if (other == com.google.cloud.visionai.v1.ClassificationPredictionResult.getDefaultInstance()) + return this; + if (!other.ids_.isEmpty()) { + if (ids_.isEmpty()) { + ids_ = other.ids_; + ids_.makeImmutable(); + bitField0_ |= 0x00000001; + } else { + ensureIdsIsMutable(); + ids_.addAll(other.ids_); + } + onChanged(); + } + if (!other.displayNames_.isEmpty()) { + if (displayNames_.isEmpty()) { + displayNames_ = other.displayNames_; + bitField0_ |= 0x00000002; + } else { + ensureDisplayNamesIsMutable(); + displayNames_.addAll(other.displayNames_); + } + onChanged(); + } + if (!other.confidences_.isEmpty()) { + if (confidences_.isEmpty()) { + confidences_ = other.confidences_; + confidences_.makeImmutable(); + bitField0_ |= 0x00000004; + } else { + ensureConfidencesIsMutable(); + confidences_.addAll(other.confidences_); + } + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + long v = input.readInt64(); + ensureIdsIsMutable(); + ids_.addLong(v); + break; + } // case 8 + case 10: + { + int length = input.readRawVarint32(); + int limit = input.pushLimit(length); + ensureIdsIsMutable(); + while (input.getBytesUntilLimit() > 0) { + ids_.addLong(input.readInt64()); + } + input.popLimit(limit); + break; + } // case 10 + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureDisplayNamesIsMutable(); + displayNames_.add(s); + break; + } // case 18 + case 29: + { + float v = input.readFloat(); + ensureConfidencesIsMutable(); + confidences_.addFloat(v); + break; + } // case 29 + case 26: + { + int length = input.readRawVarint32(); + int limit = input.pushLimit(length); + int alloc = length > 4096 ? 4096 : length; + ensureConfidencesIsMutable(alloc / 4); + while (input.getBytesUntilLimit() > 0) { + confidences_.addFloat(input.readFloat()); + } + input.popLimit(limit); + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.protobuf.Internal.LongList ids_ = emptyLongList(); + + private void ensureIdsIsMutable() { + if (!ids_.isModifiable()) { + ids_ = makeMutableCopy(ids_); + } + bitField0_ |= 0x00000001; + } + /** + * + * + *
+     * The resource IDs of the AnnotationSpecs that had been identified.
+     * 
+ * + * repeated int64 ids = 1; + * + * @return A list containing the ids. + */ + public java.util.List getIdsList() { + ids_.makeImmutable(); + return ids_; + } + /** + * + * + *
+     * The resource IDs of the AnnotationSpecs that had been identified.
+     * 
+ * + * repeated int64 ids = 1; + * + * @return The count of ids. + */ + public int getIdsCount() { + return ids_.size(); + } + /** + * + * + *
+     * The resource IDs of the AnnotationSpecs that had been identified.
+     * 
+ * + * repeated int64 ids = 1; + * + * @param index The index of the element to return. + * @return The ids at the given index. + */ + public long getIds(int index) { + return ids_.getLong(index); + } + /** + * + * + *
+     * The resource IDs of the AnnotationSpecs that had been identified.
+     * 
+ * + * repeated int64 ids = 1; + * + * @param index The index to set the value at. + * @param value The ids to set. + * @return This builder for chaining. + */ + public Builder setIds(int index, long value) { + + ensureIdsIsMutable(); + ids_.setLong(index, value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The resource IDs of the AnnotationSpecs that had been identified.
+     * 
+ * + * repeated int64 ids = 1; + * + * @param value The ids to add. + * @return This builder for chaining. + */ + public Builder addIds(long value) { + + ensureIdsIsMutable(); + ids_.addLong(value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The resource IDs of the AnnotationSpecs that had been identified.
+     * 
+ * + * repeated int64 ids = 1; + * + * @param values The ids to add. + * @return This builder for chaining. + */ + public Builder addAllIds(java.lang.Iterable values) { + ensureIdsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, ids_); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The resource IDs of the AnnotationSpecs that had been identified.
+     * 
+ * + * repeated int64 ids = 1; + * + * @return This builder for chaining. + */ + public Builder clearIds() { + ids_ = emptyLongList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList displayNames_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureDisplayNamesIsMutable() { + if (!displayNames_.isModifiable()) { + displayNames_ = new com.google.protobuf.LazyStringArrayList(displayNames_); + } + bitField0_ |= 0x00000002; + } + /** + * + * + *
+     * The display names of the AnnotationSpecs that had been identified, order
+     * matches the IDs.
+     * 
+ * + * repeated string display_names = 2; + * + * @return A list containing the displayNames. + */ + public com.google.protobuf.ProtocolStringList getDisplayNamesList() { + displayNames_.makeImmutable(); + return displayNames_; + } + /** + * + * + *
+     * The display names of the AnnotationSpecs that had been identified, order
+     * matches the IDs.
+     * 
+ * + * repeated string display_names = 2; + * + * @return The count of displayNames. + */ + public int getDisplayNamesCount() { + return displayNames_.size(); + } + /** + * + * + *
+     * The display names of the AnnotationSpecs that had been identified, order
+     * matches the IDs.
+     * 
+ * + * repeated string display_names = 2; + * + * @param index The index of the element to return. + * @return The displayNames at the given index. + */ + public java.lang.String getDisplayNames(int index) { + return displayNames_.get(index); + } + /** + * + * + *
+     * The display names of the AnnotationSpecs that had been identified, order
+     * matches the IDs.
+     * 
+ * + * repeated string display_names = 2; + * + * @param index The index of the value to return. + * @return The bytes of the displayNames at the given index. + */ + public com.google.protobuf.ByteString getDisplayNamesBytes(int index) { + return displayNames_.getByteString(index); + } + /** + * + * + *
+     * The display names of the AnnotationSpecs that had been identified, order
+     * matches the IDs.
+     * 
+ * + * repeated string display_names = 2; + * + * @param index The index to set the value at. + * @param value The displayNames to set. + * @return This builder for chaining. + */ + public Builder setDisplayNames(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureDisplayNamesIsMutable(); + displayNames_.set(index, value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * The display names of the AnnotationSpecs that had been identified, order
+     * matches the IDs.
+     * 
+ * + * repeated string display_names = 2; + * + * @param value The displayNames to add. + * @return This builder for chaining. + */ + public Builder addDisplayNames(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureDisplayNamesIsMutable(); + displayNames_.add(value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * The display names of the AnnotationSpecs that had been identified, order
+     * matches the IDs.
+     * 
+ * + * repeated string display_names = 2; + * + * @param values The displayNames to add. + * @return This builder for chaining. + */ + public Builder addAllDisplayNames(java.lang.Iterable values) { + ensureDisplayNamesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, displayNames_); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * The display names of the AnnotationSpecs that had been identified, order
+     * matches the IDs.
+     * 
+ * + * repeated string display_names = 2; + * + * @return This builder for chaining. + */ + public Builder clearDisplayNames() { + displayNames_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + ; + onChanged(); + return this; + } + /** + * + * + *
+     * The display names of the AnnotationSpecs that had been identified, order
+     * matches the IDs.
+     * 
+ * + * repeated string display_names = 2; + * + * @param value The bytes of the displayNames to add. + * @return This builder for chaining. + */ + public Builder addDisplayNamesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureDisplayNamesIsMutable(); + displayNames_.add(value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.protobuf.Internal.FloatList confidences_ = emptyFloatList(); + + private void ensureConfidencesIsMutable() { + if (!confidences_.isModifiable()) { + confidences_ = makeMutableCopy(confidences_); + } + bitField0_ |= 0x00000004; + } + + private void ensureConfidencesIsMutable(int capacity) { + if (!confidences_.isModifiable()) { + confidences_ = makeMutableCopy(confidences_, capacity); + } + bitField0_ |= 0x00000004; + } + /** + * + * + *
+     * The Model's confidences in correctness of the predicted IDs, higher value
+     * means higher confidence. Order matches the Ids.
+     * 
+ * + * repeated float confidences = 3; + * + * @return A list containing the confidences. + */ + public java.util.List getConfidencesList() { + confidences_.makeImmutable(); + return confidences_; + } + /** + * + * + *
+     * The Model's confidences in correctness of the predicted IDs, higher value
+     * means higher confidence. Order matches the Ids.
+     * 
+ * + * repeated float confidences = 3; + * + * @return The count of confidences. + */ + public int getConfidencesCount() { + return confidences_.size(); + } + /** + * + * + *
+     * The Model's confidences in correctness of the predicted IDs, higher value
+     * means higher confidence. Order matches the Ids.
+     * 
+ * + * repeated float confidences = 3; + * + * @param index The index of the element to return. + * @return The confidences at the given index. + */ + public float getConfidences(int index) { + return confidences_.getFloat(index); + } + /** + * + * + *
+     * The Model's confidences in correctness of the predicted IDs, higher value
+     * means higher confidence. Order matches the Ids.
+     * 
+ * + * repeated float confidences = 3; + * + * @param index The index to set the value at. + * @param value The confidences to set. + * @return This builder for chaining. + */ + public Builder setConfidences(int index, float value) { + + ensureConfidencesIsMutable(); + confidences_.setFloat(index, value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * The Model's confidences in correctness of the predicted IDs, higher value
+     * means higher confidence. Order matches the Ids.
+     * 
+ * + * repeated float confidences = 3; + * + * @param value The confidences to add. + * @return This builder for chaining. + */ + public Builder addConfidences(float value) { + + ensureConfidencesIsMutable(); + confidences_.addFloat(value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * The Model's confidences in correctness of the predicted IDs, higher value
+     * means higher confidence. Order matches the Ids.
+     * 
+ * + * repeated float confidences = 3; + * + * @param values The confidences to add. + * @return This builder for chaining. + */ + public Builder addAllConfidences(java.lang.Iterable values) { + ensureConfidencesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, confidences_); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * The Model's confidences in correctness of the predicted IDs, higher value
+     * means higher confidence. Order matches the Ids.
+     * 
+ * + * repeated float confidences = 3; + * + * @return This builder for chaining. + */ + public Builder clearConfidences() { + confidences_ = emptyFloatList(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.ClassificationPredictionResult) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.ClassificationPredictionResult) + private static final com.google.cloud.visionai.v1.ClassificationPredictionResult DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.ClassificationPredictionResult(); + } + + public static com.google.cloud.visionai.v1.ClassificationPredictionResult getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ClassificationPredictionResult parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.ClassificationPredictionResult getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ClassificationPredictionResultOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ClassificationPredictionResultOrBuilder.java new file mode 100644 index 000000000000..9b7e21ed066a --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ClassificationPredictionResultOrBuilder.java @@ -0,0 +1,160 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/annotations.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface ClassificationPredictionResultOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.ClassificationPredictionResult) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The resource IDs of the AnnotationSpecs that had been identified.
+   * 
+ * + * repeated int64 ids = 1; + * + * @return A list containing the ids. + */ + java.util.List getIdsList(); + /** + * + * + *
+   * The resource IDs of the AnnotationSpecs that had been identified.
+   * 
+ * + * repeated int64 ids = 1; + * + * @return The count of ids. + */ + int getIdsCount(); + /** + * + * + *
+   * The resource IDs of the AnnotationSpecs that had been identified.
+   * 
+ * + * repeated int64 ids = 1; + * + * @param index The index of the element to return. + * @return The ids at the given index. + */ + long getIds(int index); + + /** + * + * + *
+   * The display names of the AnnotationSpecs that had been identified, order
+   * matches the IDs.
+   * 
+ * + * repeated string display_names = 2; + * + * @return A list containing the displayNames. + */ + java.util.List getDisplayNamesList(); + /** + * + * + *
+   * The display names of the AnnotationSpecs that had been identified, order
+   * matches the IDs.
+   * 
+ * + * repeated string display_names = 2; + * + * @return The count of displayNames. + */ + int getDisplayNamesCount(); + /** + * + * + *
+   * The display names of the AnnotationSpecs that had been identified, order
+   * matches the IDs.
+   * 
+ * + * repeated string display_names = 2; + * + * @param index The index of the element to return. + * @return The displayNames at the given index. + */ + java.lang.String getDisplayNames(int index); + /** + * + * + *
+   * The display names of the AnnotationSpecs that had been identified, order
+   * matches the IDs.
+   * 
+ * + * repeated string display_names = 2; + * + * @param index The index of the value to return. + * @return The bytes of the displayNames at the given index. + */ + com.google.protobuf.ByteString getDisplayNamesBytes(int index); + + /** + * + * + *
+   * The Model's confidences in correctness of the predicted IDs, higher value
+   * means higher confidence. Order matches the Ids.
+   * 
+ * + * repeated float confidences = 3; + * + * @return A list containing the confidences. + */ + java.util.List getConfidencesList(); + /** + * + * + *
+   * The Model's confidences in correctness of the predicted IDs, higher value
+   * means higher confidence. Order matches the Ids.
+   * 
+ * + * repeated float confidences = 3; + * + * @return The count of confidences. + */ + int getConfidencesCount(); + /** + * + * + *
+   * The Model's confidences in correctness of the predicted IDs, higher value
+   * means higher confidence. Order matches the Ids.
+   * 
+ * + * repeated float confidences = 3; + * + * @param index The index of the element to return. + * @return The confidences at the given index. + */ + float getConfidences(int index); +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ClipAssetRequest.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ClipAssetRequest.java new file mode 100644 index 000000000000..1898f38db15e --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ClipAssetRequest.java @@ -0,0 +1,966 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/warehouse.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * Request message for ClipAsset API.
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.ClipAssetRequest} + */ +public final class ClipAssetRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.ClipAssetRequest) + ClipAssetRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ClipAssetRequest.newBuilder() to construct. + private ClipAssetRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ClipAssetRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ClipAssetRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_ClipAssetRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_ClipAssetRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.ClipAssetRequest.class, + com.google.cloud.visionai.v1.ClipAssetRequest.Builder.class); + } + + private int bitField0_; + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Required. The resource name of the asset to request clips for.
+   * Format:
+   * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/assets/{asset_id}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + 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(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The resource name of the asset to request clips for.
+   * Format:
+   * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/assets/{asset_id}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TEMPORAL_PARTITION_FIELD_NUMBER = 2; + private com.google.cloud.visionai.v1.Partition.TemporalPartition temporalPartition_; + /** + * + * + *
+   * Required. The time range to request clips for.
+   * 
+ * + * + * .google.cloud.visionai.v1.Partition.TemporalPartition temporal_partition = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the temporalPartition field is set. + */ + @java.lang.Override + public boolean hasTemporalPartition() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * Required. The time range to request clips for.
+   * 
+ * + * + * .google.cloud.visionai.v1.Partition.TemporalPartition temporal_partition = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The temporalPartition. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.Partition.TemporalPartition getTemporalPartition() { + return temporalPartition_ == null + ? com.google.cloud.visionai.v1.Partition.TemporalPartition.getDefaultInstance() + : temporalPartition_; + } + /** + * + * + *
+   * Required. The time range to request clips for.
+   * 
+ * + * + * .google.cloud.visionai.v1.Partition.TemporalPartition temporal_partition = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.visionai.v1.Partition.TemporalPartitionOrBuilder + getTemporalPartitionOrBuilder() { + return temporalPartition_ == null + ? com.google.cloud.visionai.v1.Partition.TemporalPartition.getDefaultInstance() + : temporalPartition_; + } + + 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getTemporalPartition()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getTemporalPartition()); + } + size += getUnknownFields().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.visionai.v1.ClipAssetRequest)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.ClipAssetRequest other = + (com.google.cloud.visionai.v1.ClipAssetRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (hasTemporalPartition() != other.hasTemporalPartition()) return false; + if (hasTemporalPartition()) { + if (!getTemporalPartition().equals(other.getTemporalPartition())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + if (hasTemporalPartition()) { + hash = (37 * hash) + TEMPORAL_PARTITION_FIELD_NUMBER; + hash = (53 * hash) + getTemporalPartition().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.ClipAssetRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ClipAssetRequest 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.visionai.v1.ClipAssetRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ClipAssetRequest 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.visionai.v1.ClipAssetRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ClipAssetRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.ClipAssetRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ClipAssetRequest 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.visionai.v1.ClipAssetRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ClipAssetRequest 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.visionai.v1.ClipAssetRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ClipAssetRequest 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.visionai.v1.ClipAssetRequest 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; + } + /** + * + * + *
+   * Request message for ClipAsset API.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.ClipAssetRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.ClipAssetRequest) + com.google.cloud.visionai.v1.ClipAssetRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_ClipAssetRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_ClipAssetRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.ClipAssetRequest.class, + com.google.cloud.visionai.v1.ClipAssetRequest.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.ClipAssetRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getTemporalPartitionFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + temporalPartition_ = null; + if (temporalPartitionBuilder_ != null) { + temporalPartitionBuilder_.dispose(); + temporalPartitionBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_ClipAssetRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ClipAssetRequest getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.ClipAssetRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ClipAssetRequest build() { + com.google.cloud.visionai.v1.ClipAssetRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ClipAssetRequest buildPartial() { + com.google.cloud.visionai.v1.ClipAssetRequest result = + new com.google.cloud.visionai.v1.ClipAssetRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.visionai.v1.ClipAssetRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.temporalPartition_ = + temporalPartitionBuilder_ == null + ? temporalPartition_ + : temporalPartitionBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.ClipAssetRequest) { + return mergeFrom((com.google.cloud.visionai.v1.ClipAssetRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.ClipAssetRequest other) { + if (other == com.google.cloud.visionai.v1.ClipAssetRequest.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasTemporalPartition()) { + mergeTemporalPartition(other.getTemporalPartition()); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage( + getTemporalPartitionFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. The resource name of the asset to request clips for.
+     * Format:
+     * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/assets/{asset_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The resource name of the asset to request clips for.
+     * Format:
+     * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/assets/{asset_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The resource name of the asset to request clips for.
+     * Format:
+     * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/assets/{asset_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the asset to request clips for.
+     * Format:
+     * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/assets/{asset_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the asset to request clips for.
+     * Format:
+     * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/assets/{asset_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.cloud.visionai.v1.Partition.TemporalPartition temporalPartition_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.Partition.TemporalPartition, + com.google.cloud.visionai.v1.Partition.TemporalPartition.Builder, + com.google.cloud.visionai.v1.Partition.TemporalPartitionOrBuilder> + temporalPartitionBuilder_; + /** + * + * + *
+     * Required. The time range to request clips for.
+     * 
+ * + * + * .google.cloud.visionai.v1.Partition.TemporalPartition temporal_partition = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the temporalPartition field is set. + */ + public boolean hasTemporalPartition() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * Required. The time range to request clips for.
+     * 
+ * + * + * .google.cloud.visionai.v1.Partition.TemporalPartition temporal_partition = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The temporalPartition. + */ + public com.google.cloud.visionai.v1.Partition.TemporalPartition getTemporalPartition() { + if (temporalPartitionBuilder_ == null) { + return temporalPartition_ == null + ? com.google.cloud.visionai.v1.Partition.TemporalPartition.getDefaultInstance() + : temporalPartition_; + } else { + return temporalPartitionBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The time range to request clips for.
+     * 
+ * + * + * .google.cloud.visionai.v1.Partition.TemporalPartition temporal_partition = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setTemporalPartition( + com.google.cloud.visionai.v1.Partition.TemporalPartition value) { + if (temporalPartitionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + temporalPartition_ = value; + } else { + temporalPartitionBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The time range to request clips for.
+     * 
+ * + * + * .google.cloud.visionai.v1.Partition.TemporalPartition temporal_partition = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setTemporalPartition( + com.google.cloud.visionai.v1.Partition.TemporalPartition.Builder builderForValue) { + if (temporalPartitionBuilder_ == null) { + temporalPartition_ = builderForValue.build(); + } else { + temporalPartitionBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The time range to request clips for.
+     * 
+ * + * + * .google.cloud.visionai.v1.Partition.TemporalPartition temporal_partition = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeTemporalPartition( + com.google.cloud.visionai.v1.Partition.TemporalPartition value) { + if (temporalPartitionBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && temporalPartition_ != null + && temporalPartition_ + != com.google.cloud.visionai.v1.Partition.TemporalPartition.getDefaultInstance()) { + getTemporalPartitionBuilder().mergeFrom(value); + } else { + temporalPartition_ = value; + } + } else { + temporalPartitionBuilder_.mergeFrom(value); + } + if (temporalPartition_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Required. The time range to request clips for.
+     * 
+ * + * + * .google.cloud.visionai.v1.Partition.TemporalPartition temporal_partition = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearTemporalPartition() { + bitField0_ = (bitField0_ & ~0x00000002); + temporalPartition_ = null; + if (temporalPartitionBuilder_ != null) { + temporalPartitionBuilder_.dispose(); + temporalPartitionBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The time range to request clips for.
+     * 
+ * + * + * .google.cloud.visionai.v1.Partition.TemporalPartition temporal_partition = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.visionai.v1.Partition.TemporalPartition.Builder + getTemporalPartitionBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getTemporalPartitionFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The time range to request clips for.
+     * 
+ * + * + * .google.cloud.visionai.v1.Partition.TemporalPartition temporal_partition = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.visionai.v1.Partition.TemporalPartitionOrBuilder + getTemporalPartitionOrBuilder() { + if (temporalPartitionBuilder_ != null) { + return temporalPartitionBuilder_.getMessageOrBuilder(); + } else { + return temporalPartition_ == null + ? com.google.cloud.visionai.v1.Partition.TemporalPartition.getDefaultInstance() + : temporalPartition_; + } + } + /** + * + * + *
+     * Required. The time range to request clips for.
+     * 
+ * + * + * .google.cloud.visionai.v1.Partition.TemporalPartition temporal_partition = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.Partition.TemporalPartition, + com.google.cloud.visionai.v1.Partition.TemporalPartition.Builder, + com.google.cloud.visionai.v1.Partition.TemporalPartitionOrBuilder> + getTemporalPartitionFieldBuilder() { + if (temporalPartitionBuilder_ == null) { + temporalPartitionBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.Partition.TemporalPartition, + com.google.cloud.visionai.v1.Partition.TemporalPartition.Builder, + com.google.cloud.visionai.v1.Partition.TemporalPartitionOrBuilder>( + getTemporalPartition(), getParentForChildren(), isClean()); + temporalPartition_ = null; + } + return temporalPartitionBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.ClipAssetRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.ClipAssetRequest) + private static final com.google.cloud.visionai.v1.ClipAssetRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.ClipAssetRequest(); + } + + public static com.google.cloud.visionai.v1.ClipAssetRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ClipAssetRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.ClipAssetRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ClipAssetRequestOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ClipAssetRequestOrBuilder.java new file mode 100644 index 000000000000..37eff5faaedf --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ClipAssetRequestOrBuilder.java @@ -0,0 +1,100 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/warehouse.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface ClipAssetRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.ClipAssetRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The resource name of the asset to request clips for.
+   * Format:
+   * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/assets/{asset_id}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The resource name of the asset to request clips for.
+   * Format:
+   * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/assets/{asset_id}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Required. The time range to request clips for.
+   * 
+ * + * + * .google.cloud.visionai.v1.Partition.TemporalPartition temporal_partition = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the temporalPartition field is set. + */ + boolean hasTemporalPartition(); + /** + * + * + *
+   * Required. The time range to request clips for.
+   * 
+ * + * + * .google.cloud.visionai.v1.Partition.TemporalPartition temporal_partition = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The temporalPartition. + */ + com.google.cloud.visionai.v1.Partition.TemporalPartition getTemporalPartition(); + /** + * + * + *
+   * Required. The time range to request clips for.
+   * 
+ * + * + * .google.cloud.visionai.v1.Partition.TemporalPartition temporal_partition = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.visionai.v1.Partition.TemporalPartitionOrBuilder getTemporalPartitionOrBuilder(); +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ClipAssetResponse.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ClipAssetResponse.java new file mode 100644 index 000000000000..fbe6f6790d0a --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ClipAssetResponse.java @@ -0,0 +1,2007 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/warehouse.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * Response message for ClipAsset API.
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.ClipAssetResponse} + */ +public final class ClipAssetResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.ClipAssetResponse) + ClipAssetResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ClipAssetResponse.newBuilder() to construct. + private ClipAssetResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ClipAssetResponse() { + timeIndexedUris_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ClipAssetResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_ClipAssetResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_ClipAssetResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.ClipAssetResponse.class, + com.google.cloud.visionai.v1.ClipAssetResponse.Builder.class); + } + + public interface TimeIndexedUriOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.ClipAssetResponse.TimeIndexedUri) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Time range of the video that the uri is for.
+     * 
+ * + * .google.cloud.visionai.v1.Partition.TemporalPartition temporal_partition = 1; + * + * @return Whether the temporalPartition field is set. + */ + boolean hasTemporalPartition(); + /** + * + * + *
+     * Time range of the video that the uri is for.
+     * 
+ * + * .google.cloud.visionai.v1.Partition.TemporalPartition temporal_partition = 1; + * + * @return The temporalPartition. + */ + com.google.cloud.visionai.v1.Partition.TemporalPartition getTemporalPartition(); + /** + * + * + *
+     * Time range of the video that the uri is for.
+     * 
+ * + * .google.cloud.visionai.v1.Partition.TemporalPartition temporal_partition = 1; + */ + com.google.cloud.visionai.v1.Partition.TemporalPartitionOrBuilder + getTemporalPartitionOrBuilder(); + + /** + * + * + *
+     * Signed uri to download the video clip.
+     * 
+ * + * string uri = 2; + * + * @return The uri. + */ + java.lang.String getUri(); + /** + * + * + *
+     * Signed uri to download the video clip.
+     * 
+ * + * string uri = 2; + * + * @return The bytes for uri. + */ + com.google.protobuf.ByteString getUriBytes(); + } + /** + * + * + *
+   * Signed uri with corresponding time range.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.ClipAssetResponse.TimeIndexedUri} + */ + public static final class TimeIndexedUri extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.ClipAssetResponse.TimeIndexedUri) + TimeIndexedUriOrBuilder { + private static final long serialVersionUID = 0L; + // Use TimeIndexedUri.newBuilder() to construct. + private TimeIndexedUri(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private TimeIndexedUri() { + uri_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new TimeIndexedUri(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_ClipAssetResponse_TimeIndexedUri_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_ClipAssetResponse_TimeIndexedUri_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.ClipAssetResponse.TimeIndexedUri.class, + com.google.cloud.visionai.v1.ClipAssetResponse.TimeIndexedUri.Builder.class); + } + + private int bitField0_; + public static final int TEMPORAL_PARTITION_FIELD_NUMBER = 1; + private com.google.cloud.visionai.v1.Partition.TemporalPartition temporalPartition_; + /** + * + * + *
+     * Time range of the video that the uri is for.
+     * 
+ * + * .google.cloud.visionai.v1.Partition.TemporalPartition temporal_partition = 1; + * + * @return Whether the temporalPartition field is set. + */ + @java.lang.Override + public boolean hasTemporalPartition() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * Time range of the video that the uri is for.
+     * 
+ * + * .google.cloud.visionai.v1.Partition.TemporalPartition temporal_partition = 1; + * + * @return The temporalPartition. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.Partition.TemporalPartition getTemporalPartition() { + return temporalPartition_ == null + ? com.google.cloud.visionai.v1.Partition.TemporalPartition.getDefaultInstance() + : temporalPartition_; + } + /** + * + * + *
+     * Time range of the video that the uri is for.
+     * 
+ * + * .google.cloud.visionai.v1.Partition.TemporalPartition temporal_partition = 1; + */ + @java.lang.Override + public com.google.cloud.visionai.v1.Partition.TemporalPartitionOrBuilder + getTemporalPartitionOrBuilder() { + return temporalPartition_ == null + ? com.google.cloud.visionai.v1.Partition.TemporalPartition.getDefaultInstance() + : temporalPartition_; + } + + public static final int URI_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object uri_ = ""; + /** + * + * + *
+     * Signed uri to download the video clip.
+     * 
+ * + * string uri = 2; + * + * @return The uri. + */ + @java.lang.Override + public java.lang.String getUri() { + java.lang.Object ref = uri_; + 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(); + uri_ = s; + return s; + } + } + /** + * + * + *
+     * Signed uri to download the video clip.
+     * 
+ * + * string uri = 2; + * + * @return The bytes for uri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getUriBytes() { + java.lang.Object ref = uri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uri_ = 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 (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getTemporalPartition()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uri_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, uri_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getTemporalPartition()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uri_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, uri_); + } + size += getUnknownFields().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.visionai.v1.ClipAssetResponse.TimeIndexedUri)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.ClipAssetResponse.TimeIndexedUri other = + (com.google.cloud.visionai.v1.ClipAssetResponse.TimeIndexedUri) obj; + + if (hasTemporalPartition() != other.hasTemporalPartition()) return false; + if (hasTemporalPartition()) { + if (!getTemporalPartition().equals(other.getTemporalPartition())) return false; + } + if (!getUri().equals(other.getUri())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasTemporalPartition()) { + hash = (37 * hash) + TEMPORAL_PARTITION_FIELD_NUMBER; + hash = (53 * hash) + getTemporalPartition().hashCode(); + } + hash = (37 * hash) + URI_FIELD_NUMBER; + hash = (53 * hash) + getUri().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.ClipAssetResponse.TimeIndexedUri parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ClipAssetResponse.TimeIndexedUri 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.visionai.v1.ClipAssetResponse.TimeIndexedUri parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ClipAssetResponse.TimeIndexedUri 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.visionai.v1.ClipAssetResponse.TimeIndexedUri parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ClipAssetResponse.TimeIndexedUri parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.ClipAssetResponse.TimeIndexedUri parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ClipAssetResponse.TimeIndexedUri 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.visionai.v1.ClipAssetResponse.TimeIndexedUri parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ClipAssetResponse.TimeIndexedUri 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.visionai.v1.ClipAssetResponse.TimeIndexedUri parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ClipAssetResponse.TimeIndexedUri 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.visionai.v1.ClipAssetResponse.TimeIndexedUri 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; + } + /** + * + * + *
+     * Signed uri with corresponding time range.
+     * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.ClipAssetResponse.TimeIndexedUri} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.ClipAssetResponse.TimeIndexedUri) + com.google.cloud.visionai.v1.ClipAssetResponse.TimeIndexedUriOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_ClipAssetResponse_TimeIndexedUri_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_ClipAssetResponse_TimeIndexedUri_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.ClipAssetResponse.TimeIndexedUri.class, + com.google.cloud.visionai.v1.ClipAssetResponse.TimeIndexedUri.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.ClipAssetResponse.TimeIndexedUri.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getTemporalPartitionFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + temporalPartition_ = null; + if (temporalPartitionBuilder_ != null) { + temporalPartitionBuilder_.dispose(); + temporalPartitionBuilder_ = null; + } + uri_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_ClipAssetResponse_TimeIndexedUri_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ClipAssetResponse.TimeIndexedUri + getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.ClipAssetResponse.TimeIndexedUri.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ClipAssetResponse.TimeIndexedUri build() { + com.google.cloud.visionai.v1.ClipAssetResponse.TimeIndexedUri result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ClipAssetResponse.TimeIndexedUri buildPartial() { + com.google.cloud.visionai.v1.ClipAssetResponse.TimeIndexedUri result = + new com.google.cloud.visionai.v1.ClipAssetResponse.TimeIndexedUri(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.visionai.v1.ClipAssetResponse.TimeIndexedUri result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.temporalPartition_ = + temporalPartitionBuilder_ == null + ? temporalPartition_ + : temporalPartitionBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.uri_ = uri_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.ClipAssetResponse.TimeIndexedUri) { + return mergeFrom((com.google.cloud.visionai.v1.ClipAssetResponse.TimeIndexedUri) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.visionai.v1.ClipAssetResponse.TimeIndexedUri other) { + if (other + == com.google.cloud.visionai.v1.ClipAssetResponse.TimeIndexedUri.getDefaultInstance()) + return this; + if (other.hasTemporalPartition()) { + mergeTemporalPartition(other.getTemporalPartition()); + } + if (!other.getUri().isEmpty()) { + uri_ = other.uri_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage( + getTemporalPartitionFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + uri_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.cloud.visionai.v1.Partition.TemporalPartition temporalPartition_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.Partition.TemporalPartition, + com.google.cloud.visionai.v1.Partition.TemporalPartition.Builder, + com.google.cloud.visionai.v1.Partition.TemporalPartitionOrBuilder> + temporalPartitionBuilder_; + /** + * + * + *
+       * Time range of the video that the uri is for.
+       * 
+ * + * .google.cloud.visionai.v1.Partition.TemporalPartition temporal_partition = 1; + * + * @return Whether the temporalPartition field is set. + */ + public boolean hasTemporalPartition() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+       * Time range of the video that the uri is for.
+       * 
+ * + * .google.cloud.visionai.v1.Partition.TemporalPartition temporal_partition = 1; + * + * @return The temporalPartition. + */ + public com.google.cloud.visionai.v1.Partition.TemporalPartition getTemporalPartition() { + if (temporalPartitionBuilder_ == null) { + return temporalPartition_ == null + ? com.google.cloud.visionai.v1.Partition.TemporalPartition.getDefaultInstance() + : temporalPartition_; + } else { + return temporalPartitionBuilder_.getMessage(); + } + } + /** + * + * + *
+       * Time range of the video that the uri is for.
+       * 
+ * + * .google.cloud.visionai.v1.Partition.TemporalPartition temporal_partition = 1; + */ + public Builder setTemporalPartition( + com.google.cloud.visionai.v1.Partition.TemporalPartition value) { + if (temporalPartitionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + temporalPartition_ = value; + } else { + temporalPartitionBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * Time range of the video that the uri is for.
+       * 
+ * + * .google.cloud.visionai.v1.Partition.TemporalPartition temporal_partition = 1; + */ + public Builder setTemporalPartition( + com.google.cloud.visionai.v1.Partition.TemporalPartition.Builder builderForValue) { + if (temporalPartitionBuilder_ == null) { + temporalPartition_ = builderForValue.build(); + } else { + temporalPartitionBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * Time range of the video that the uri is for.
+       * 
+ * + * .google.cloud.visionai.v1.Partition.TemporalPartition temporal_partition = 1; + */ + public Builder mergeTemporalPartition( + com.google.cloud.visionai.v1.Partition.TemporalPartition value) { + if (temporalPartitionBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && temporalPartition_ != null + && temporalPartition_ + != com.google.cloud.visionai.v1.Partition.TemporalPartition + .getDefaultInstance()) { + getTemporalPartitionBuilder().mergeFrom(value); + } else { + temporalPartition_ = value; + } + } else { + temporalPartitionBuilder_.mergeFrom(value); + } + if (temporalPartition_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + /** + * + * + *
+       * Time range of the video that the uri is for.
+       * 
+ * + * .google.cloud.visionai.v1.Partition.TemporalPartition temporal_partition = 1; + */ + public Builder clearTemporalPartition() { + bitField0_ = (bitField0_ & ~0x00000001); + temporalPartition_ = null; + if (temporalPartitionBuilder_ != null) { + temporalPartitionBuilder_.dispose(); + temporalPartitionBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+       * Time range of the video that the uri is for.
+       * 
+ * + * .google.cloud.visionai.v1.Partition.TemporalPartition temporal_partition = 1; + */ + public com.google.cloud.visionai.v1.Partition.TemporalPartition.Builder + getTemporalPartitionBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getTemporalPartitionFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Time range of the video that the uri is for.
+       * 
+ * + * .google.cloud.visionai.v1.Partition.TemporalPartition temporal_partition = 1; + */ + public com.google.cloud.visionai.v1.Partition.TemporalPartitionOrBuilder + getTemporalPartitionOrBuilder() { + if (temporalPartitionBuilder_ != null) { + return temporalPartitionBuilder_.getMessageOrBuilder(); + } else { + return temporalPartition_ == null + ? com.google.cloud.visionai.v1.Partition.TemporalPartition.getDefaultInstance() + : temporalPartition_; + } + } + /** + * + * + *
+       * Time range of the video that the uri is for.
+       * 
+ * + * .google.cloud.visionai.v1.Partition.TemporalPartition temporal_partition = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.Partition.TemporalPartition, + com.google.cloud.visionai.v1.Partition.TemporalPartition.Builder, + com.google.cloud.visionai.v1.Partition.TemporalPartitionOrBuilder> + getTemporalPartitionFieldBuilder() { + if (temporalPartitionBuilder_ == null) { + temporalPartitionBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.Partition.TemporalPartition, + com.google.cloud.visionai.v1.Partition.TemporalPartition.Builder, + com.google.cloud.visionai.v1.Partition.TemporalPartitionOrBuilder>( + getTemporalPartition(), getParentForChildren(), isClean()); + temporalPartition_ = null; + } + return temporalPartitionBuilder_; + } + + private java.lang.Object uri_ = ""; + /** + * + * + *
+       * Signed uri to download the video clip.
+       * 
+ * + * string uri = 2; + * + * @return The uri. + */ + public java.lang.String getUri() { + java.lang.Object ref = uri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * Signed uri to download the video clip.
+       * 
+ * + * string uri = 2; + * + * @return The bytes for uri. + */ + public com.google.protobuf.ByteString getUriBytes() { + java.lang.Object ref = uri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * Signed uri to download the video clip.
+       * 
+ * + * string uri = 2; + * + * @param value The uri to set. + * @return This builder for chaining. + */ + public Builder setUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + uri_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * Signed uri to download the video clip.
+       * 
+ * + * string uri = 2; + * + * @return This builder for chaining. + */ + public Builder clearUri() { + uri_ = getDefaultInstance().getUri(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+       * Signed uri to download the video clip.
+       * 
+ * + * string uri = 2; + * + * @param value The bytes for uri to set. + * @return This builder for chaining. + */ + public Builder setUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + uri_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.ClipAssetResponse.TimeIndexedUri) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.ClipAssetResponse.TimeIndexedUri) + private static final com.google.cloud.visionai.v1.ClipAssetResponse.TimeIndexedUri + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.ClipAssetResponse.TimeIndexedUri(); + } + + public static com.google.cloud.visionai.v1.ClipAssetResponse.TimeIndexedUri + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public TimeIndexedUri parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.ClipAssetResponse.TimeIndexedUri + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int TIME_INDEXED_URIS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List + timeIndexedUris_; + /** + * + * + *
+   * A list of signed uris to download the video clips that cover the requested
+   * time range ordered by time.
+   * 
+ * + * + * repeated .google.cloud.visionai.v1.ClipAssetResponse.TimeIndexedUri time_indexed_uris = 1; + * + */ + @java.lang.Override + public java.util.List + getTimeIndexedUrisList() { + return timeIndexedUris_; + } + /** + * + * + *
+   * A list of signed uris to download the video clips that cover the requested
+   * time range ordered by time.
+   * 
+ * + * + * repeated .google.cloud.visionai.v1.ClipAssetResponse.TimeIndexedUri time_indexed_uris = 1; + * + */ + @java.lang.Override + public java.util.List< + ? extends com.google.cloud.visionai.v1.ClipAssetResponse.TimeIndexedUriOrBuilder> + getTimeIndexedUrisOrBuilderList() { + return timeIndexedUris_; + } + /** + * + * + *
+   * A list of signed uris to download the video clips that cover the requested
+   * time range ordered by time.
+   * 
+ * + * + * repeated .google.cloud.visionai.v1.ClipAssetResponse.TimeIndexedUri time_indexed_uris = 1; + * + */ + @java.lang.Override + public int getTimeIndexedUrisCount() { + return timeIndexedUris_.size(); + } + /** + * + * + *
+   * A list of signed uris to download the video clips that cover the requested
+   * time range ordered by time.
+   * 
+ * + * + * repeated .google.cloud.visionai.v1.ClipAssetResponse.TimeIndexedUri time_indexed_uris = 1; + * + */ + @java.lang.Override + public com.google.cloud.visionai.v1.ClipAssetResponse.TimeIndexedUri getTimeIndexedUris( + int index) { + return timeIndexedUris_.get(index); + } + /** + * + * + *
+   * A list of signed uris to download the video clips that cover the requested
+   * time range ordered by time.
+   * 
+ * + * + * repeated .google.cloud.visionai.v1.ClipAssetResponse.TimeIndexedUri time_indexed_uris = 1; + * + */ + @java.lang.Override + public com.google.cloud.visionai.v1.ClipAssetResponse.TimeIndexedUriOrBuilder + getTimeIndexedUrisOrBuilder(int index) { + return timeIndexedUris_.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 < timeIndexedUris_.size(); i++) { + output.writeMessage(1, timeIndexedUris_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < timeIndexedUris_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, timeIndexedUris_.get(i)); + } + size += getUnknownFields().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.visionai.v1.ClipAssetResponse)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.ClipAssetResponse other = + (com.google.cloud.visionai.v1.ClipAssetResponse) obj; + + if (!getTimeIndexedUrisList().equals(other.getTimeIndexedUrisList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getTimeIndexedUrisCount() > 0) { + hash = (37 * hash) + TIME_INDEXED_URIS_FIELD_NUMBER; + hash = (53 * hash) + getTimeIndexedUrisList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.ClipAssetResponse parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ClipAssetResponse 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.visionai.v1.ClipAssetResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ClipAssetResponse 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.visionai.v1.ClipAssetResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ClipAssetResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.ClipAssetResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ClipAssetResponse 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.visionai.v1.ClipAssetResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ClipAssetResponse 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.visionai.v1.ClipAssetResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ClipAssetResponse 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.visionai.v1.ClipAssetResponse 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; + } + /** + * + * + *
+   * Response message for ClipAsset API.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.ClipAssetResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.ClipAssetResponse) + com.google.cloud.visionai.v1.ClipAssetResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_ClipAssetResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_ClipAssetResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.ClipAssetResponse.class, + com.google.cloud.visionai.v1.ClipAssetResponse.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.ClipAssetResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (timeIndexedUrisBuilder_ == null) { + timeIndexedUris_ = java.util.Collections.emptyList(); + } else { + timeIndexedUris_ = null; + timeIndexedUrisBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_ClipAssetResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ClipAssetResponse getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.ClipAssetResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ClipAssetResponse build() { + com.google.cloud.visionai.v1.ClipAssetResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ClipAssetResponse buildPartial() { + com.google.cloud.visionai.v1.ClipAssetResponse result = + new com.google.cloud.visionai.v1.ClipAssetResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.google.cloud.visionai.v1.ClipAssetResponse result) { + if (timeIndexedUrisBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + timeIndexedUris_ = java.util.Collections.unmodifiableList(timeIndexedUris_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.timeIndexedUris_ = timeIndexedUris_; + } else { + result.timeIndexedUris_ = timeIndexedUrisBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.visionai.v1.ClipAssetResponse result) { + int from_bitField0_ = bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.ClipAssetResponse) { + return mergeFrom((com.google.cloud.visionai.v1.ClipAssetResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.ClipAssetResponse other) { + if (other == com.google.cloud.visionai.v1.ClipAssetResponse.getDefaultInstance()) return this; + if (timeIndexedUrisBuilder_ == null) { + if (!other.timeIndexedUris_.isEmpty()) { + if (timeIndexedUris_.isEmpty()) { + timeIndexedUris_ = other.timeIndexedUris_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureTimeIndexedUrisIsMutable(); + timeIndexedUris_.addAll(other.timeIndexedUris_); + } + onChanged(); + } + } else { + if (!other.timeIndexedUris_.isEmpty()) { + if (timeIndexedUrisBuilder_.isEmpty()) { + timeIndexedUrisBuilder_.dispose(); + timeIndexedUrisBuilder_ = null; + timeIndexedUris_ = other.timeIndexedUris_; + bitField0_ = (bitField0_ & ~0x00000001); + timeIndexedUrisBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getTimeIndexedUrisFieldBuilder() + : null; + } else { + timeIndexedUrisBuilder_.addAllMessages(other.timeIndexedUris_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.visionai.v1.ClipAssetResponse.TimeIndexedUri m = + input.readMessage( + com.google.cloud.visionai.v1.ClipAssetResponse.TimeIndexedUri.parser(), + extensionRegistry); + if (timeIndexedUrisBuilder_ == null) { + ensureTimeIndexedUrisIsMutable(); + timeIndexedUris_.add(m); + } else { + timeIndexedUrisBuilder_.addMessage(m); + } + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List + timeIndexedUris_ = java.util.Collections.emptyList(); + + private void ensureTimeIndexedUrisIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + timeIndexedUris_ = + new java.util.ArrayList( + timeIndexedUris_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.visionai.v1.ClipAssetResponse.TimeIndexedUri, + com.google.cloud.visionai.v1.ClipAssetResponse.TimeIndexedUri.Builder, + com.google.cloud.visionai.v1.ClipAssetResponse.TimeIndexedUriOrBuilder> + timeIndexedUrisBuilder_; + + /** + * + * + *
+     * A list of signed uris to download the video clips that cover the requested
+     * time range ordered by time.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.ClipAssetResponse.TimeIndexedUri time_indexed_uris = 1; + * + */ + public java.util.List + getTimeIndexedUrisList() { + if (timeIndexedUrisBuilder_ == null) { + return java.util.Collections.unmodifiableList(timeIndexedUris_); + } else { + return timeIndexedUrisBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * A list of signed uris to download the video clips that cover the requested
+     * time range ordered by time.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.ClipAssetResponse.TimeIndexedUri time_indexed_uris = 1; + * + */ + public int getTimeIndexedUrisCount() { + if (timeIndexedUrisBuilder_ == null) { + return timeIndexedUris_.size(); + } else { + return timeIndexedUrisBuilder_.getCount(); + } + } + /** + * + * + *
+     * A list of signed uris to download the video clips that cover the requested
+     * time range ordered by time.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.ClipAssetResponse.TimeIndexedUri time_indexed_uris = 1; + * + */ + public com.google.cloud.visionai.v1.ClipAssetResponse.TimeIndexedUri getTimeIndexedUris( + int index) { + if (timeIndexedUrisBuilder_ == null) { + return timeIndexedUris_.get(index); + } else { + return timeIndexedUrisBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * A list of signed uris to download the video clips that cover the requested
+     * time range ordered by time.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.ClipAssetResponse.TimeIndexedUri time_indexed_uris = 1; + * + */ + public Builder setTimeIndexedUris( + int index, com.google.cloud.visionai.v1.ClipAssetResponse.TimeIndexedUri value) { + if (timeIndexedUrisBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTimeIndexedUrisIsMutable(); + timeIndexedUris_.set(index, value); + onChanged(); + } else { + timeIndexedUrisBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * A list of signed uris to download the video clips that cover the requested
+     * time range ordered by time.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.ClipAssetResponse.TimeIndexedUri time_indexed_uris = 1; + * + */ + public Builder setTimeIndexedUris( + int index, + com.google.cloud.visionai.v1.ClipAssetResponse.TimeIndexedUri.Builder builderForValue) { + if (timeIndexedUrisBuilder_ == null) { + ensureTimeIndexedUrisIsMutable(); + timeIndexedUris_.set(index, builderForValue.build()); + onChanged(); + } else { + timeIndexedUrisBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A list of signed uris to download the video clips that cover the requested
+     * time range ordered by time.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.ClipAssetResponse.TimeIndexedUri time_indexed_uris = 1; + * + */ + public Builder addTimeIndexedUris( + com.google.cloud.visionai.v1.ClipAssetResponse.TimeIndexedUri value) { + if (timeIndexedUrisBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTimeIndexedUrisIsMutable(); + timeIndexedUris_.add(value); + onChanged(); + } else { + timeIndexedUrisBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * A list of signed uris to download the video clips that cover the requested
+     * time range ordered by time.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.ClipAssetResponse.TimeIndexedUri time_indexed_uris = 1; + * + */ + public Builder addTimeIndexedUris( + int index, com.google.cloud.visionai.v1.ClipAssetResponse.TimeIndexedUri value) { + if (timeIndexedUrisBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTimeIndexedUrisIsMutable(); + timeIndexedUris_.add(index, value); + onChanged(); + } else { + timeIndexedUrisBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * A list of signed uris to download the video clips that cover the requested
+     * time range ordered by time.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.ClipAssetResponse.TimeIndexedUri time_indexed_uris = 1; + * + */ + public Builder addTimeIndexedUris( + com.google.cloud.visionai.v1.ClipAssetResponse.TimeIndexedUri.Builder builderForValue) { + if (timeIndexedUrisBuilder_ == null) { + ensureTimeIndexedUrisIsMutable(); + timeIndexedUris_.add(builderForValue.build()); + onChanged(); + } else { + timeIndexedUrisBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A list of signed uris to download the video clips that cover the requested
+     * time range ordered by time.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.ClipAssetResponse.TimeIndexedUri time_indexed_uris = 1; + * + */ + public Builder addTimeIndexedUris( + int index, + com.google.cloud.visionai.v1.ClipAssetResponse.TimeIndexedUri.Builder builderForValue) { + if (timeIndexedUrisBuilder_ == null) { + ensureTimeIndexedUrisIsMutable(); + timeIndexedUris_.add(index, builderForValue.build()); + onChanged(); + } else { + timeIndexedUrisBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A list of signed uris to download the video clips that cover the requested
+     * time range ordered by time.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.ClipAssetResponse.TimeIndexedUri time_indexed_uris = 1; + * + */ + public Builder addAllTimeIndexedUris( + java.lang.Iterable + values) { + if (timeIndexedUrisBuilder_ == null) { + ensureTimeIndexedUrisIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, timeIndexedUris_); + onChanged(); + } else { + timeIndexedUrisBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * A list of signed uris to download the video clips that cover the requested
+     * time range ordered by time.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.ClipAssetResponse.TimeIndexedUri time_indexed_uris = 1; + * + */ + public Builder clearTimeIndexedUris() { + if (timeIndexedUrisBuilder_ == null) { + timeIndexedUris_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + timeIndexedUrisBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * A list of signed uris to download the video clips that cover the requested
+     * time range ordered by time.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.ClipAssetResponse.TimeIndexedUri time_indexed_uris = 1; + * + */ + public Builder removeTimeIndexedUris(int index) { + if (timeIndexedUrisBuilder_ == null) { + ensureTimeIndexedUrisIsMutable(); + timeIndexedUris_.remove(index); + onChanged(); + } else { + timeIndexedUrisBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * A list of signed uris to download the video clips that cover the requested
+     * time range ordered by time.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.ClipAssetResponse.TimeIndexedUri time_indexed_uris = 1; + * + */ + public com.google.cloud.visionai.v1.ClipAssetResponse.TimeIndexedUri.Builder + getTimeIndexedUrisBuilder(int index) { + return getTimeIndexedUrisFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * A list of signed uris to download the video clips that cover the requested
+     * time range ordered by time.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.ClipAssetResponse.TimeIndexedUri time_indexed_uris = 1; + * + */ + public com.google.cloud.visionai.v1.ClipAssetResponse.TimeIndexedUriOrBuilder + getTimeIndexedUrisOrBuilder(int index) { + if (timeIndexedUrisBuilder_ == null) { + return timeIndexedUris_.get(index); + } else { + return timeIndexedUrisBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * A list of signed uris to download the video clips that cover the requested
+     * time range ordered by time.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.ClipAssetResponse.TimeIndexedUri time_indexed_uris = 1; + * + */ + public java.util.List< + ? extends com.google.cloud.visionai.v1.ClipAssetResponse.TimeIndexedUriOrBuilder> + getTimeIndexedUrisOrBuilderList() { + if (timeIndexedUrisBuilder_ != null) { + return timeIndexedUrisBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(timeIndexedUris_); + } + } + /** + * + * + *
+     * A list of signed uris to download the video clips that cover the requested
+     * time range ordered by time.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.ClipAssetResponse.TimeIndexedUri time_indexed_uris = 1; + * + */ + public com.google.cloud.visionai.v1.ClipAssetResponse.TimeIndexedUri.Builder + addTimeIndexedUrisBuilder() { + return getTimeIndexedUrisFieldBuilder() + .addBuilder( + com.google.cloud.visionai.v1.ClipAssetResponse.TimeIndexedUri.getDefaultInstance()); + } + /** + * + * + *
+     * A list of signed uris to download the video clips that cover the requested
+     * time range ordered by time.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.ClipAssetResponse.TimeIndexedUri time_indexed_uris = 1; + * + */ + public com.google.cloud.visionai.v1.ClipAssetResponse.TimeIndexedUri.Builder + addTimeIndexedUrisBuilder(int index) { + return getTimeIndexedUrisFieldBuilder() + .addBuilder( + index, + com.google.cloud.visionai.v1.ClipAssetResponse.TimeIndexedUri.getDefaultInstance()); + } + /** + * + * + *
+     * A list of signed uris to download the video clips that cover the requested
+     * time range ordered by time.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.ClipAssetResponse.TimeIndexedUri time_indexed_uris = 1; + * + */ + public java.util.List + getTimeIndexedUrisBuilderList() { + return getTimeIndexedUrisFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.visionai.v1.ClipAssetResponse.TimeIndexedUri, + com.google.cloud.visionai.v1.ClipAssetResponse.TimeIndexedUri.Builder, + com.google.cloud.visionai.v1.ClipAssetResponse.TimeIndexedUriOrBuilder> + getTimeIndexedUrisFieldBuilder() { + if (timeIndexedUrisBuilder_ == null) { + timeIndexedUrisBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.visionai.v1.ClipAssetResponse.TimeIndexedUri, + com.google.cloud.visionai.v1.ClipAssetResponse.TimeIndexedUri.Builder, + com.google.cloud.visionai.v1.ClipAssetResponse.TimeIndexedUriOrBuilder>( + timeIndexedUris_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + timeIndexedUris_ = null; + } + return timeIndexedUrisBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.ClipAssetResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.ClipAssetResponse) + private static final com.google.cloud.visionai.v1.ClipAssetResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.ClipAssetResponse(); + } + + public static com.google.cloud.visionai.v1.ClipAssetResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ClipAssetResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.ClipAssetResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ClipAssetResponseOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ClipAssetResponseOrBuilder.java new file mode 100644 index 000000000000..6a19911e5818 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ClipAssetResponseOrBuilder.java @@ -0,0 +1,95 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/warehouse.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface ClipAssetResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.ClipAssetResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * A list of signed uris to download the video clips that cover the requested
+   * time range ordered by time.
+   * 
+ * + * + * repeated .google.cloud.visionai.v1.ClipAssetResponse.TimeIndexedUri time_indexed_uris = 1; + * + */ + java.util.List + getTimeIndexedUrisList(); + /** + * + * + *
+   * A list of signed uris to download the video clips that cover the requested
+   * time range ordered by time.
+   * 
+ * + * + * repeated .google.cloud.visionai.v1.ClipAssetResponse.TimeIndexedUri time_indexed_uris = 1; + * + */ + com.google.cloud.visionai.v1.ClipAssetResponse.TimeIndexedUri getTimeIndexedUris(int index); + /** + * + * + *
+   * A list of signed uris to download the video clips that cover the requested
+   * time range ordered by time.
+   * 
+ * + * + * repeated .google.cloud.visionai.v1.ClipAssetResponse.TimeIndexedUri time_indexed_uris = 1; + * + */ + int getTimeIndexedUrisCount(); + /** + * + * + *
+   * A list of signed uris to download the video clips that cover the requested
+   * time range ordered by time.
+   * 
+ * + * + * repeated .google.cloud.visionai.v1.ClipAssetResponse.TimeIndexedUri time_indexed_uris = 1; + * + */ + java.util.List + getTimeIndexedUrisOrBuilderList(); + /** + * + * + *
+   * A list of signed uris to download the video clips that cover the requested
+   * time range ordered by time.
+   * 
+ * + * + * repeated .google.cloud.visionai.v1.ClipAssetResponse.TimeIndexedUri time_indexed_uris = 1; + * + */ + com.google.cloud.visionai.v1.ClipAssetResponse.TimeIndexedUriOrBuilder + getTimeIndexedUrisOrBuilder(int index); +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/Cluster.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/Cluster.java new file mode 100644 index 000000000000..1a785ddde281 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/Cluster.java @@ -0,0 +1,2587 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/common.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * Message describing the Cluster object.
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.Cluster} + */ +public final class Cluster extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.Cluster) + ClusterOrBuilder { + private static final long serialVersionUID = 0L; + // Use Cluster.newBuilder() to construct. + private Cluster(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Cluster() { + name_ = ""; + dataplaneServiceEndpoint_ = ""; + state_ = 0; + pscTarget_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Cluster(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.CommonProto + .internal_static_google_cloud_visionai_v1_Cluster_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 4: + return internalGetLabels(); + case 5: + return internalGetAnnotations(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.CommonProto + .internal_static_google_cloud_visionai_v1_Cluster_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.Cluster.class, + com.google.cloud.visionai.v1.Cluster.Builder.class); + } + + /** + * + * + *
+   * The current state of the cluster.
+   * 
+ * + * Protobuf enum {@code google.cloud.visionai.v1.Cluster.State} + */ + public enum State implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Not set.
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + STATE_UNSPECIFIED(0), + /** + * + * + *
+     * The PROVISIONING state indicates the cluster is being created.
+     * 
+ * + * PROVISIONING = 1; + */ + PROVISIONING(1), + /** + * + * + *
+     * The RUNNING state indicates the cluster has been created and is fully
+     * usable.
+     * 
+ * + * RUNNING = 2; + */ + RUNNING(2), + /** + * + * + *
+     * The STOPPING state indicates the cluster is being deleted.
+     * 
+ * + * STOPPING = 3; + */ + STOPPING(3), + /** + * + * + *
+     * The ERROR state indicates the cluster is unusable. It will be
+     * automatically deleted.
+     * 
+ * + * ERROR = 4; + */ + ERROR(4), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Not set.
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + public static final int STATE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * The PROVISIONING state indicates the cluster is being created.
+     * 
+ * + * PROVISIONING = 1; + */ + public static final int PROVISIONING_VALUE = 1; + /** + * + * + *
+     * The RUNNING state indicates the cluster has been created and is fully
+     * usable.
+     * 
+ * + * RUNNING = 2; + */ + public static final int RUNNING_VALUE = 2; + /** + * + * + *
+     * The STOPPING state indicates the cluster is being deleted.
+     * 
+ * + * STOPPING = 3; + */ + public static final int STOPPING_VALUE = 3; + /** + * + * + *
+     * The ERROR state indicates the cluster is unusable. It will be
+     * automatically deleted.
+     * 
+ * + * ERROR = 4; + */ + public static final int ERROR_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; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static State valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static State forNumber(int value) { + switch (value) { + case 0: + return STATE_UNSPECIFIED; + case 1: + return PROVISIONING; + case 2: + return RUNNING; + case 3: + return STOPPING; + case 4: + return ERROR; + 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 State findValueByNumber(int number) { + return State.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + 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.visionai.v1.Cluster.getDescriptor().getEnumTypes().get(0); + } + + private static final State[] VALUES = values(); + + public static State 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 State(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.visionai.v1.Cluster.State) + } + + private int bitField0_; + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Output only. Name of the resource.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + 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(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. Name of the resource.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CREATE_TIME_FIELD_NUMBER = 2; + private com.google.protobuf.Timestamp createTime_; + /** + * + * + *
+   * Output only. The create timestamp.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * Output only. The create timestamp.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + /** + * + * + *
+   * Output only. The create timestamp.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + + public static final int UPDATE_TIME_FIELD_NUMBER = 3; + private com.google.protobuf.Timestamp updateTime_; + /** + * + * + *
+   * Output only. The update timestamp.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + @java.lang.Override + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+   * Output only. The update timestamp.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getUpdateTime() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + /** + * + * + *
+   * Output only. The update timestamp.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + + public static final int LABELS_FIELD_NUMBER = 4; + + private static final class LabelsDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.cloud.visionai.v1.CommonProto + .internal_static_google_cloud_visionai_v1_Cluster_LabelsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + + @SuppressWarnings("serial") + private com.google.protobuf.MapField labels_; + + private com.google.protobuf.MapField internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + /** + * + * + *
+   * Labels as key value pairs
+   * 
+ * + * map<string, string> labels = 4; + */ + @java.lang.Override + public boolean containsLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetLabels().getMap().containsKey(key); + } + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + /** + * + * + *
+   * Labels as key value pairs
+   * 
+ * + * map<string, string> labels = 4; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + * + * + *
+   * Labels as key value pairs
+   * 
+ * + * map<string, string> labels = 4; + */ + @java.lang.Override + public /* nullable */ java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+   * Labels as key value pairs
+   * 
+ * + * map<string, string> labels = 4; + */ + @java.lang.Override + public java.lang.String getLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int ANNOTATIONS_FIELD_NUMBER = 5; + + private static final class AnnotationsDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.cloud.visionai.v1.CommonProto + .internal_static_google_cloud_visionai_v1_Cluster_AnnotationsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + + @SuppressWarnings("serial") + private com.google.protobuf.MapField annotations_; + + private com.google.protobuf.MapField + internalGetAnnotations() { + if (annotations_ == null) { + return com.google.protobuf.MapField.emptyMapField(AnnotationsDefaultEntryHolder.defaultEntry); + } + return annotations_; + } + + public int getAnnotationsCount() { + return internalGetAnnotations().getMap().size(); + } + /** + * + * + *
+   * Annotations to allow clients to store small amounts of arbitrary data.
+   * 
+ * + * map<string, string> annotations = 5; + */ + @java.lang.Override + public boolean containsAnnotations(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetAnnotations().getMap().containsKey(key); + } + /** Use {@link #getAnnotationsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getAnnotations() { + return getAnnotationsMap(); + } + /** + * + * + *
+   * Annotations to allow clients to store small amounts of arbitrary data.
+   * 
+ * + * map<string, string> annotations = 5; + */ + @java.lang.Override + public java.util.Map getAnnotationsMap() { + return internalGetAnnotations().getMap(); + } + /** + * + * + *
+   * Annotations to allow clients to store small amounts of arbitrary data.
+   * 
+ * + * map<string, string> annotations = 5; + */ + @java.lang.Override + public /* nullable */ java.lang.String getAnnotationsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetAnnotations().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+   * Annotations to allow clients to store small amounts of arbitrary data.
+   * 
+ * + * map<string, string> annotations = 5; + */ + @java.lang.Override + public java.lang.String getAnnotationsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetAnnotations().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int DATAPLANE_SERVICE_ENDPOINT_FIELD_NUMBER = 6; + + @SuppressWarnings("serial") + private volatile java.lang.Object dataplaneServiceEndpoint_ = ""; + /** + * + * + *
+   * Output only. The DNS name of the data plane service
+   * 
+ * + * string dataplane_service_endpoint = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The dataplaneServiceEndpoint. + */ + @java.lang.Override + public java.lang.String getDataplaneServiceEndpoint() { + java.lang.Object ref = dataplaneServiceEndpoint_; + 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(); + dataplaneServiceEndpoint_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. The DNS name of the data plane service
+   * 
+ * + * string dataplane_service_endpoint = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The bytes for dataplaneServiceEndpoint. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDataplaneServiceEndpointBytes() { + java.lang.Object ref = dataplaneServiceEndpoint_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + dataplaneServiceEndpoint_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int STATE_FIELD_NUMBER = 7; + private int state_ = 0; + /** + * + * + *
+   * Output only. The current state of the cluster.
+   * 
+ * + * + * .google.cloud.visionai.v1.Cluster.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + /** + * + * + *
+   * Output only. The current state of the cluster.
+   * 
+ * + * + * .google.cloud.visionai.v1.Cluster.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.Cluster.State getState() { + com.google.cloud.visionai.v1.Cluster.State result = + com.google.cloud.visionai.v1.Cluster.State.forNumber(state_); + return result == null ? com.google.cloud.visionai.v1.Cluster.State.UNRECOGNIZED : result; + } + + public static final int PSC_TARGET_FIELD_NUMBER = 8; + + @SuppressWarnings("serial") + private volatile java.lang.Object pscTarget_ = ""; + /** + * + * + *
+   * Output only. The private service connection service target name.
+   * 
+ * + * string psc_target = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The pscTarget. + */ + @java.lang.Override + public java.lang.String getPscTarget() { + java.lang.Object ref = pscTarget_; + 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(); + pscTarget_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. The private service connection service target name.
+   * 
+ * + * string psc_target = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for pscTarget. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPscTargetBytes() { + java.lang.Object ref = pscTarget_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pscTarget_ = 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getCreateTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(3, getUpdateTime()); + } + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 4); + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, internalGetAnnotations(), AnnotationsDefaultEntryHolder.defaultEntry, 5); + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(dataplaneServiceEndpoint_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, dataplaneServiceEndpoint_); + } + if (state_ != com.google.cloud.visionai.v1.Cluster.State.STATE_UNSPECIFIED.getNumber()) { + output.writeEnum(7, state_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pscTarget_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 8, pscTarget_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getCreateTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getUpdateTime()); + } + for (java.util.Map.Entry entry : + internalGetLabels().getMap().entrySet()) { + com.google.protobuf.MapEntry labels__ = + LabelsDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, labels__); + } + for (java.util.Map.Entry entry : + internalGetAnnotations().getMap().entrySet()) { + com.google.protobuf.MapEntry annotations__ = + AnnotationsDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, annotations__); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(dataplaneServiceEndpoint_)) { + size += + com.google.protobuf.GeneratedMessageV3.computeStringSize(6, dataplaneServiceEndpoint_); + } + if (state_ != com.google.cloud.visionai.v1.Cluster.State.STATE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(7, state_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pscTarget_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, pscTarget_); + } + size += getUnknownFields().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.visionai.v1.Cluster)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.Cluster other = (com.google.cloud.visionai.v1.Cluster) obj; + + if (!getName().equals(other.getName())) return false; + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime().equals(other.getCreateTime())) return false; + } + if (hasUpdateTime() != other.hasUpdateTime()) return false; + if (hasUpdateTime()) { + if (!getUpdateTime().equals(other.getUpdateTime())) return false; + } + if (!internalGetLabels().equals(other.internalGetLabels())) return false; + if (!internalGetAnnotations().equals(other.internalGetAnnotations())) return false; + if (!getDataplaneServiceEndpoint().equals(other.getDataplaneServiceEndpoint())) return false; + if (state_ != other.state_) return false; + if (!getPscTarget().equals(other.getPscTarget())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasUpdateTime()) { + hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getUpdateTime().hashCode(); + } + if (!internalGetLabels().getMap().isEmpty()) { + hash = (37 * hash) + LABELS_FIELD_NUMBER; + hash = (53 * hash) + internalGetLabels().hashCode(); + } + if (!internalGetAnnotations().getMap().isEmpty()) { + hash = (37 * hash) + ANNOTATIONS_FIELD_NUMBER; + hash = (53 * hash) + internalGetAnnotations().hashCode(); + } + hash = (37 * hash) + DATAPLANE_SERVICE_ENDPOINT_FIELD_NUMBER; + hash = (53 * hash) + getDataplaneServiceEndpoint().hashCode(); + hash = (37 * hash) + STATE_FIELD_NUMBER; + hash = (53 * hash) + state_; + hash = (37 * hash) + PSC_TARGET_FIELD_NUMBER; + hash = (53 * hash) + getPscTarget().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.Cluster parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.Cluster 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.visionai.v1.Cluster parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.Cluster 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.visionai.v1.Cluster parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.Cluster parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.Cluster parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.Cluster 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.visionai.v1.Cluster parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.Cluster 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.visionai.v1.Cluster parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.Cluster 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.visionai.v1.Cluster 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; + } + /** + * + * + *
+   * Message describing the Cluster object.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.Cluster} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.Cluster) + com.google.cloud.visionai.v1.ClusterOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.CommonProto + .internal_static_google_cloud_visionai_v1_Cluster_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 4: + return internalGetLabels(); + case 5: + return internalGetAnnotations(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( + int number) { + switch (number) { + case 4: + return internalGetMutableLabels(); + case 5: + return internalGetMutableAnnotations(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.CommonProto + .internal_static_google_cloud_visionai_v1_Cluster_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.Cluster.class, + com.google.cloud.visionai.v1.Cluster.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.Cluster.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getCreateTimeFieldBuilder(); + getUpdateTimeFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + internalGetMutableLabels().clear(); + internalGetMutableAnnotations().clear(); + dataplaneServiceEndpoint_ = ""; + state_ = 0; + pscTarget_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.CommonProto + .internal_static_google_cloud_visionai_v1_Cluster_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.Cluster getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.Cluster.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.Cluster build() { + com.google.cloud.visionai.v1.Cluster result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.Cluster buildPartial() { + com.google.cloud.visionai.v1.Cluster result = new com.google.cloud.visionai.v1.Cluster(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.visionai.v1.Cluster result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.updateTime_ = updateTimeBuilder_ == null ? updateTime_ : updateTimeBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.labels_ = internalGetLabels(); + result.labels_.makeImmutable(); + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.annotations_ = internalGetAnnotations(); + result.annotations_.makeImmutable(); + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.dataplaneServiceEndpoint_ = dataplaneServiceEndpoint_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.state_ = state_; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.pscTarget_ = pscTarget_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.Cluster) { + return mergeFrom((com.google.cloud.visionai.v1.Cluster) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.Cluster other) { + if (other == com.google.cloud.visionai.v1.Cluster.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + internalGetMutableLabels().mergeFrom(other.internalGetLabels()); + bitField0_ |= 0x00000008; + internalGetMutableAnnotations().mergeFrom(other.internalGetAnnotations()); + bitField0_ |= 0x00000010; + if (!other.getDataplaneServiceEndpoint().isEmpty()) { + dataplaneServiceEndpoint_ = other.dataplaneServiceEndpoint_; + bitField0_ |= 0x00000020; + onChanged(); + } + if (other.state_ != 0) { + setStateValue(other.getStateValue()); + } + if (!other.getPscTarget().isEmpty()) { + pscTarget_ = other.pscTarget_; + bitField0_ |= 0x00000080; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage(getUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + com.google.protobuf.MapEntry labels__ = + input.readMessage( + LabelsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableLabels() + .getMutableMap() + .put(labels__.getKey(), labels__.getValue()); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + com.google.protobuf.MapEntry annotations__ = + input.readMessage( + AnnotationsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableAnnotations() + .getMutableMap() + .put(annotations__.getKey(), annotations__.getValue()); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 50: + { + dataplaneServiceEndpoint_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case 50 + case 56: + { + state_ = input.readEnum(); + bitField0_ |= 0x00000040; + break; + } // case 56 + case 66: + { + pscTarget_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000080; + break; + } // case 66 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Output only. Name of the resource.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. Name of the resource.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. Name of the resource.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Name of the resource.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Name of the resource.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + createTimeBuilder_; + /** + * + * + *
+     * Output only. The create timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * Output only. The create timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. The create timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + } else { + createTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The create timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The create timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && createTime_ != null + && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getCreateTimeBuilder().mergeFrom(value); + } else { + createTime_ = value; + } + } else { + createTimeBuilder_.mergeFrom(value); + } + if (createTime_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Output only. The create timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearCreateTime() { + bitField0_ = (bitField0_ & ~0x00000002); + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The create timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. The create timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } + } + /** + * + * + *
+     * Output only. The create timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), getParentForChildren(), isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private com.google.protobuf.Timestamp updateTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + updateTimeBuilder_; + /** + * + * + *
+     * Output only. The update timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+     * Output only. The update timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + public com.google.protobuf.Timestamp getUpdateTime() { + if (updateTimeBuilder_ == null) { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } else { + return updateTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. The update timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateTime_ = value; + } else { + updateTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The update timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (updateTimeBuilder_ == null) { + updateTime_ = builderForValue.build(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The update timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && updateTime_ != null + && updateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getUpdateTimeBuilder().mergeFrom(value); + } else { + updateTime_ = value; + } + } else { + updateTimeBuilder_.mergeFrom(value); + } + if (updateTime_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Output only. The update timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearUpdateTime() { + bitField0_ = (bitField0_ & ~0x00000004); + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The update timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getUpdateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. The update timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + if (updateTimeBuilder_ != null) { + return updateTimeBuilder_.getMessageOrBuilder(); + } else { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } + } + /** + * + * + *
+     * Output only. The update timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + 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_; + } + + private com.google.protobuf.MapField labels_; + + private com.google.protobuf.MapField internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + + private com.google.protobuf.MapField + internalGetMutableLabels() { + if (labels_ == null) { + labels_ = com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry); + } + if (!labels_.isMutable()) { + labels_ = labels_.copy(); + } + bitField0_ |= 0x00000008; + onChanged(); + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + /** + * + * + *
+     * Labels as key value pairs
+     * 
+ * + * map<string, string> labels = 4; + */ + @java.lang.Override + public boolean containsLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetLabels().getMap().containsKey(key); + } + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + /** + * + * + *
+     * Labels as key value pairs
+     * 
+ * + * map<string, string> labels = 4; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + * + * + *
+     * Labels as key value pairs
+     * 
+ * + * map<string, string> labels = 4; + */ + @java.lang.Override + public /* nullable */ java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+     * Labels as key value pairs
+     * 
+ * + * map<string, string> labels = 4; + */ + @java.lang.Override + public java.lang.String getLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearLabels() { + bitField0_ = (bitField0_ & ~0x00000008); + internalGetMutableLabels().getMutableMap().clear(); + return this; + } + /** + * + * + *
+     * Labels as key value pairs
+     * 
+ * + * map<string, string> labels = 4; + */ + public Builder removeLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + internalGetMutableLabels().getMutableMap().remove(key); + return this; + } + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableLabels() { + bitField0_ |= 0x00000008; + return internalGetMutableLabels().getMutableMap(); + } + /** + * + * + *
+     * Labels as key value pairs
+     * 
+ * + * map<string, string> labels = 4; + */ + public Builder putLabels(java.lang.String key, java.lang.String value) { + if (key == null) { + throw new NullPointerException("map key"); + } + if (value == null) { + throw new NullPointerException("map value"); + } + internalGetMutableLabels().getMutableMap().put(key, value); + bitField0_ |= 0x00000008; + return this; + } + /** + * + * + *
+     * Labels as key value pairs
+     * 
+ * + * map<string, string> labels = 4; + */ + public Builder putAllLabels(java.util.Map values) { + internalGetMutableLabels().getMutableMap().putAll(values); + bitField0_ |= 0x00000008; + return this; + } + + private com.google.protobuf.MapField annotations_; + + private com.google.protobuf.MapField + internalGetAnnotations() { + if (annotations_ == null) { + return com.google.protobuf.MapField.emptyMapField( + AnnotationsDefaultEntryHolder.defaultEntry); + } + return annotations_; + } + + private com.google.protobuf.MapField + internalGetMutableAnnotations() { + if (annotations_ == null) { + annotations_ = + com.google.protobuf.MapField.newMapField(AnnotationsDefaultEntryHolder.defaultEntry); + } + if (!annotations_.isMutable()) { + annotations_ = annotations_.copy(); + } + bitField0_ |= 0x00000010; + onChanged(); + return annotations_; + } + + public int getAnnotationsCount() { + return internalGetAnnotations().getMap().size(); + } + /** + * + * + *
+     * Annotations to allow clients to store small amounts of arbitrary data.
+     * 
+ * + * map<string, string> annotations = 5; + */ + @java.lang.Override + public boolean containsAnnotations(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetAnnotations().getMap().containsKey(key); + } + /** Use {@link #getAnnotationsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getAnnotations() { + return getAnnotationsMap(); + } + /** + * + * + *
+     * Annotations to allow clients to store small amounts of arbitrary data.
+     * 
+ * + * map<string, string> annotations = 5; + */ + @java.lang.Override + public java.util.Map getAnnotationsMap() { + return internalGetAnnotations().getMap(); + } + /** + * + * + *
+     * Annotations to allow clients to store small amounts of arbitrary data.
+     * 
+ * + * map<string, string> annotations = 5; + */ + @java.lang.Override + public /* nullable */ java.lang.String getAnnotationsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetAnnotations().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+     * Annotations to allow clients to store small amounts of arbitrary data.
+     * 
+ * + * map<string, string> annotations = 5; + */ + @java.lang.Override + public java.lang.String getAnnotationsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetAnnotations().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearAnnotations() { + bitField0_ = (bitField0_ & ~0x00000010); + internalGetMutableAnnotations().getMutableMap().clear(); + return this; + } + /** + * + * + *
+     * Annotations to allow clients to store small amounts of arbitrary data.
+     * 
+ * + * map<string, string> annotations = 5; + */ + public Builder removeAnnotations(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + internalGetMutableAnnotations().getMutableMap().remove(key); + return this; + } + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableAnnotations() { + bitField0_ |= 0x00000010; + return internalGetMutableAnnotations().getMutableMap(); + } + /** + * + * + *
+     * Annotations to allow clients to store small amounts of arbitrary data.
+     * 
+ * + * map<string, string> annotations = 5; + */ + public Builder putAnnotations(java.lang.String key, java.lang.String value) { + if (key == null) { + throw new NullPointerException("map key"); + } + if (value == null) { + throw new NullPointerException("map value"); + } + internalGetMutableAnnotations().getMutableMap().put(key, value); + bitField0_ |= 0x00000010; + return this; + } + /** + * + * + *
+     * Annotations to allow clients to store small amounts of arbitrary data.
+     * 
+ * + * map<string, string> annotations = 5; + */ + public Builder putAllAnnotations(java.util.Map values) { + internalGetMutableAnnotations().getMutableMap().putAll(values); + bitField0_ |= 0x00000010; + return this; + } + + private java.lang.Object dataplaneServiceEndpoint_ = ""; + /** + * + * + *
+     * Output only. The DNS name of the data plane service
+     * 
+ * + * string dataplane_service_endpoint = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The dataplaneServiceEndpoint. + */ + public java.lang.String getDataplaneServiceEndpoint() { + java.lang.Object ref = dataplaneServiceEndpoint_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + dataplaneServiceEndpoint_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. The DNS name of the data plane service
+     * 
+ * + * string dataplane_service_endpoint = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The bytes for dataplaneServiceEndpoint. + */ + public com.google.protobuf.ByteString getDataplaneServiceEndpointBytes() { + java.lang.Object ref = dataplaneServiceEndpoint_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + dataplaneServiceEndpoint_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. The DNS name of the data plane service
+     * 
+ * + * string dataplane_service_endpoint = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The dataplaneServiceEndpoint to set. + * @return This builder for chaining. + */ + public Builder setDataplaneServiceEndpoint(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + dataplaneServiceEndpoint_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The DNS name of the data plane service
+     * 
+ * + * string dataplane_service_endpoint = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearDataplaneServiceEndpoint() { + dataplaneServiceEndpoint_ = getDefaultInstance().getDataplaneServiceEndpoint(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The DNS name of the data plane service
+     * 
+ * + * string dataplane_service_endpoint = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The bytes for dataplaneServiceEndpoint to set. + * @return This builder for chaining. + */ + public Builder setDataplaneServiceEndpointBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + dataplaneServiceEndpoint_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + private int state_ = 0; + /** + * + * + *
+     * Output only. The current state of the cluster.
+     * 
+ * + * + * .google.cloud.visionai.v1.Cluster.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + /** + * + * + *
+     * Output only. The current state of the cluster.
+     * 
+ * + * + * .google.cloud.visionai.v1.Cluster.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The enum numeric value on the wire for state to set. + * @return This builder for chaining. + */ + public Builder setStateValue(int value) { + state_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The current state of the cluster.
+     * 
+ * + * + * .google.cloud.visionai.v1.Cluster.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.Cluster.State getState() { + com.google.cloud.visionai.v1.Cluster.State result = + com.google.cloud.visionai.v1.Cluster.State.forNumber(state_); + return result == null ? com.google.cloud.visionai.v1.Cluster.State.UNRECOGNIZED : result; + } + /** + * + * + *
+     * Output only. The current state of the cluster.
+     * 
+ * + * + * .google.cloud.visionai.v1.Cluster.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The state to set. + * @return This builder for chaining. + */ + public Builder setState(com.google.cloud.visionai.v1.Cluster.State value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000040; + state_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The current state of the cluster.
+     * 
+ * + * + * .google.cloud.visionai.v1.Cluster.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearState() { + bitField0_ = (bitField0_ & ~0x00000040); + state_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pscTarget_ = ""; + /** + * + * + *
+     * Output only. The private service connection service target name.
+     * 
+ * + * string psc_target = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The pscTarget. + */ + public java.lang.String getPscTarget() { + java.lang.Object ref = pscTarget_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pscTarget_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. The private service connection service target name.
+     * 
+ * + * string psc_target = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for pscTarget. + */ + public com.google.protobuf.ByteString getPscTargetBytes() { + java.lang.Object ref = pscTarget_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pscTarget_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. The private service connection service target name.
+     * 
+ * + * string psc_target = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The pscTarget to set. + * @return This builder for chaining. + */ + public Builder setPscTarget(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + pscTarget_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The private service connection service target name.
+     * 
+ * + * string psc_target = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearPscTarget() { + pscTarget_ = getDefaultInstance().getPscTarget(); + bitField0_ = (bitField0_ & ~0x00000080); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The private service connection service target name.
+     * 
+ * + * string psc_target = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for pscTarget to set. + * @return This builder for chaining. + */ + public Builder setPscTargetBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + pscTarget_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.Cluster) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.Cluster) + private static final com.google.cloud.visionai.v1.Cluster DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.Cluster(); + } + + public static com.google.cloud.visionai.v1.Cluster getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Cluster parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.Cluster getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ClusterInfo.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ClusterInfo.java new file mode 100644 index 000000000000..e9e3204345ea --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ClusterInfo.java @@ -0,0 +1,610 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/health_service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** Protobuf type {@code google.cloud.visionai.v1.ClusterInfo} */ +public final class ClusterInfo extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.ClusterInfo) + ClusterInfoOrBuilder { + private static final long serialVersionUID = 0L; + // Use ClusterInfo.newBuilder() to construct. + private ClusterInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ClusterInfo() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ClusterInfo(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.HealthCheckServiceProto + .internal_static_google_cloud_visionai_v1_ClusterInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.HealthCheckServiceProto + .internal_static_google_cloud_visionai_v1_ClusterInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.ClusterInfo.class, + com.google.cloud.visionai.v1.ClusterInfo.Builder.class); + } + + public static final int STREAMS_COUNT_FIELD_NUMBER = 1; + private int streamsCount_ = 0; + /** + * + * + *
+   * The number of active streams in the cluster.
+   * 
+ * + * int32 streams_count = 1; + * + * @return The streamsCount. + */ + @java.lang.Override + public int getStreamsCount() { + return streamsCount_; + } + + public static final int PROCESSES_COUNT_FIELD_NUMBER = 2; + private int processesCount_ = 0; + /** + * + * + *
+   * The number of active processes in the cluster.
+   * 
+ * + * int32 processes_count = 2; + * + * @return The processesCount. + */ + @java.lang.Override + public int getProcessesCount() { + return processesCount_; + } + + 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 (streamsCount_ != 0) { + output.writeInt32(1, streamsCount_); + } + if (processesCount_ != 0) { + output.writeInt32(2, processesCount_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (streamsCount_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(1, streamsCount_); + } + if (processesCount_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, processesCount_); + } + size += getUnknownFields().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.visionai.v1.ClusterInfo)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.ClusterInfo other = (com.google.cloud.visionai.v1.ClusterInfo) obj; + + if (getStreamsCount() != other.getStreamsCount()) return false; + if (getProcessesCount() != other.getProcessesCount()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + STREAMS_COUNT_FIELD_NUMBER; + hash = (53 * hash) + getStreamsCount(); + hash = (37 * hash) + PROCESSES_COUNT_FIELD_NUMBER; + hash = (53 * hash) + getProcessesCount(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.ClusterInfo parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ClusterInfo 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.visionai.v1.ClusterInfo parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ClusterInfo 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.visionai.v1.ClusterInfo parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ClusterInfo parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.ClusterInfo parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ClusterInfo 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.visionai.v1.ClusterInfo parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ClusterInfo 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.visionai.v1.ClusterInfo parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ClusterInfo 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.visionai.v1.ClusterInfo 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; + } + /** Protobuf type {@code google.cloud.visionai.v1.ClusterInfo} */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.ClusterInfo) + com.google.cloud.visionai.v1.ClusterInfoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.HealthCheckServiceProto + .internal_static_google_cloud_visionai_v1_ClusterInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.HealthCheckServiceProto + .internal_static_google_cloud_visionai_v1_ClusterInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.ClusterInfo.class, + com.google.cloud.visionai.v1.ClusterInfo.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.ClusterInfo.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + streamsCount_ = 0; + processesCount_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.HealthCheckServiceProto + .internal_static_google_cloud_visionai_v1_ClusterInfo_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ClusterInfo getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.ClusterInfo.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ClusterInfo build() { + com.google.cloud.visionai.v1.ClusterInfo result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ClusterInfo buildPartial() { + com.google.cloud.visionai.v1.ClusterInfo result = + new com.google.cloud.visionai.v1.ClusterInfo(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.visionai.v1.ClusterInfo result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.streamsCount_ = streamsCount_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.processesCount_ = processesCount_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.ClusterInfo) { + return mergeFrom((com.google.cloud.visionai.v1.ClusterInfo) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.ClusterInfo other) { + if (other == com.google.cloud.visionai.v1.ClusterInfo.getDefaultInstance()) return this; + if (other.getStreamsCount() != 0) { + setStreamsCount(other.getStreamsCount()); + } + if (other.getProcessesCount() != 0) { + setProcessesCount(other.getProcessesCount()); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + streamsCount_ = input.readInt32(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 16: + { + processesCount_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private int streamsCount_; + /** + * + * + *
+     * The number of active streams in the cluster.
+     * 
+ * + * int32 streams_count = 1; + * + * @return The streamsCount. + */ + @java.lang.Override + public int getStreamsCount() { + return streamsCount_; + } + /** + * + * + *
+     * The number of active streams in the cluster.
+     * 
+ * + * int32 streams_count = 1; + * + * @param value The streamsCount to set. + * @return This builder for chaining. + */ + public Builder setStreamsCount(int value) { + + streamsCount_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The number of active streams in the cluster.
+     * 
+ * + * int32 streams_count = 1; + * + * @return This builder for chaining. + */ + public Builder clearStreamsCount() { + bitField0_ = (bitField0_ & ~0x00000001); + streamsCount_ = 0; + onChanged(); + return this; + } + + private int processesCount_; + /** + * + * + *
+     * The number of active processes in the cluster.
+     * 
+ * + * int32 processes_count = 2; + * + * @return The processesCount. + */ + @java.lang.Override + public int getProcessesCount() { + return processesCount_; + } + /** + * + * + *
+     * The number of active processes in the cluster.
+     * 
+ * + * int32 processes_count = 2; + * + * @param value The processesCount to set. + * @return This builder for chaining. + */ + public Builder setProcessesCount(int value) { + + processesCount_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * The number of active processes in the cluster.
+     * 
+ * + * int32 processes_count = 2; + * + * @return This builder for chaining. + */ + public Builder clearProcessesCount() { + bitField0_ = (bitField0_ & ~0x00000002); + processesCount_ = 0; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.ClusterInfo) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.ClusterInfo) + private static final com.google.cloud.visionai.v1.ClusterInfo DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.ClusterInfo(); + } + + public static com.google.cloud.visionai.v1.ClusterInfo getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ClusterInfo parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.ClusterInfo getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ClusterInfoOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ClusterInfoOrBuilder.java new file mode 100644 index 000000000000..00aa1dad8a38 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ClusterInfoOrBuilder.java @@ -0,0 +1,52 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/health_service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface ClusterInfoOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.ClusterInfo) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The number of active streams in the cluster.
+   * 
+ * + * int32 streams_count = 1; + * + * @return The streamsCount. + */ + int getStreamsCount(); + + /** + * + * + *
+   * The number of active processes in the cluster.
+   * 
+ * + * int32 processes_count = 2; + * + * @return The processesCount. + */ + int getProcessesCount(); +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ClusterName.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ClusterName.java new file mode 100644 index 000000000000..771baeaf917c --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ClusterName.java @@ -0,0 +1,223 @@ +/* + * Copyright 2024 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.visionai.v1; + +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") +public class ClusterName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION_CLUSTER = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/clusters/{cluster}"); + private volatile Map fieldValuesMap; + private final String project; + private final String location; + private final String cluster; + + @Deprecated + protected ClusterName() { + project = null; + location = null; + cluster = null; + } + + private ClusterName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + cluster = Preconditions.checkNotNull(builder.getCluster()); + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getCluster() { + return cluster; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static ClusterName of(String project, String location, String cluster) { + return newBuilder().setProject(project).setLocation(location).setCluster(cluster).build(); + } + + public static String format(String project, String location, String cluster) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setCluster(cluster) + .build() + .toString(); + } + + public static ClusterName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION_CLUSTER.validatedMatch( + formattedString, "ClusterName.parse: formattedString not in valid format"); + return of(matchMap.get("project"), matchMap.get("location"), matchMap.get("cluster")); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List values) { + List list = new ArrayList<>(values.size()); + for (ClusterName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION_CLUSTER.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (project != null) { + fieldMapBuilder.put("project", project); + } + if (location != null) { + fieldMapBuilder.put("location", location); + } + if (cluster != null) { + fieldMapBuilder.put("cluster", cluster); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION_CLUSTER.instantiate( + "project", project, "location", location, "cluster", cluster); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null && getClass() == o.getClass()) { + ClusterName that = ((ClusterName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location) + && Objects.equals(this.cluster, that.cluster); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(project); + h *= 1000003; + h ^= Objects.hashCode(location); + h *= 1000003; + h ^= Objects.hashCode(cluster); + return h; + } + + /** Builder for projects/{project}/locations/{location}/clusters/{cluster}. */ + public static class Builder { + private String project; + private String location; + private String cluster; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getCluster() { + return cluster; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setCluster(String cluster) { + this.cluster = cluster; + return this; + } + + private Builder(ClusterName clusterName) { + this.project = clusterName.project; + this.location = clusterName.location; + this.cluster = clusterName.cluster; + } + + public ClusterName build() { + return new ClusterName(this); + } + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ClusterOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ClusterOrBuilder.java new file mode 100644 index 000000000000..00d607e4ce1f --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ClusterOrBuilder.java @@ -0,0 +1,324 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/common.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface ClusterOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.Cluster) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. Name of the resource.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Output only. Name of the resource.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Output only. The create timestamp.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + /** + * + * + *
+   * Output only. The create timestamp.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + * + * + *
+   * Output only. The create timestamp.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. The update timestamp.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + /** + * + * + *
+   * Output only. The update timestamp.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + /** + * + * + *
+   * Output only. The update timestamp.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); + + /** + * + * + *
+   * Labels as key value pairs
+   * 
+ * + * map<string, string> labels = 4; + */ + int getLabelsCount(); + /** + * + * + *
+   * Labels as key value pairs
+   * 
+ * + * map<string, string> labels = 4; + */ + boolean containsLabels(java.lang.String key); + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Deprecated + java.util.Map getLabels(); + /** + * + * + *
+   * Labels as key value pairs
+   * 
+ * + * map<string, string> labels = 4; + */ + java.util.Map getLabelsMap(); + /** + * + * + *
+   * Labels as key value pairs
+   * 
+ * + * map<string, string> labels = 4; + */ + /* nullable */ + java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue); + /** + * + * + *
+   * Labels as key value pairs
+   * 
+ * + * map<string, string> labels = 4; + */ + java.lang.String getLabelsOrThrow(java.lang.String key); + + /** + * + * + *
+   * Annotations to allow clients to store small amounts of arbitrary data.
+   * 
+ * + * map<string, string> annotations = 5; + */ + int getAnnotationsCount(); + /** + * + * + *
+   * Annotations to allow clients to store small amounts of arbitrary data.
+   * 
+ * + * map<string, string> annotations = 5; + */ + boolean containsAnnotations(java.lang.String key); + /** Use {@link #getAnnotationsMap()} instead. */ + @java.lang.Deprecated + java.util.Map getAnnotations(); + /** + * + * + *
+   * Annotations to allow clients to store small amounts of arbitrary data.
+   * 
+ * + * map<string, string> annotations = 5; + */ + java.util.Map getAnnotationsMap(); + /** + * + * + *
+   * Annotations to allow clients to store small amounts of arbitrary data.
+   * 
+ * + * map<string, string> annotations = 5; + */ + /* nullable */ + java.lang.String getAnnotationsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue); + /** + * + * + *
+   * Annotations to allow clients to store small amounts of arbitrary data.
+   * 
+ * + * map<string, string> annotations = 5; + */ + java.lang.String getAnnotationsOrThrow(java.lang.String key); + + /** + * + * + *
+   * Output only. The DNS name of the data plane service
+   * 
+ * + * string dataplane_service_endpoint = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The dataplaneServiceEndpoint. + */ + java.lang.String getDataplaneServiceEndpoint(); + /** + * + * + *
+   * Output only. The DNS name of the data plane service
+   * 
+ * + * string dataplane_service_endpoint = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The bytes for dataplaneServiceEndpoint. + */ + com.google.protobuf.ByteString getDataplaneServiceEndpointBytes(); + + /** + * + * + *
+   * Output only. The current state of the cluster.
+   * 
+ * + * + * .google.cloud.visionai.v1.Cluster.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + int getStateValue(); + /** + * + * + *
+   * Output only. The current state of the cluster.
+   * 
+ * + * + * .google.cloud.visionai.v1.Cluster.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + com.google.cloud.visionai.v1.Cluster.State getState(); + + /** + * + * + *
+   * Output only. The private service connection service target name.
+   * 
+ * + * string psc_target = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The pscTarget. + */ + java.lang.String getPscTarget(); + /** + * + * + *
+   * Output only. The private service connection service target name.
+   * 
+ * + * string psc_target = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for pscTarget. + */ + com.google.protobuf.ByteString getPscTargetBytes(); +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/Collection.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/Collection.java new file mode 100644 index 000000000000..acfb6ffcecc9 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/Collection.java @@ -0,0 +1,1010 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/warehouse.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * A collection is a resource in a corpus. It serves as a container of
+ * references to original resources.
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.Collection} + */ +public final class Collection extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.Collection) + CollectionOrBuilder { + private static final long serialVersionUID = 0L; + // Use Collection.newBuilder() to construct. + private Collection(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Collection() { + name_ = ""; + displayName_ = ""; + description_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Collection(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_Collection_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_Collection_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.Collection.class, + com.google.cloud.visionai.v1.Collection.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Output only. Resource name of the collection. Format:
+   * `projects/{project_number}/locations/{location}/corpora/{corpus}/collections/{collection}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + 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(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. Resource name of the collection. Format:
+   * `projects/{project_number}/locations/{location}/corpora/{corpus}/collections/{collection}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DISPLAY_NAME_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object displayName_ = ""; + /** + * + * + *
+   * Optional. The collection name for displaying.
+   * The name can be up to 256 characters long.
+   * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The displayName. + */ + @java.lang.Override + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + 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(); + displayName_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. The collection name for displaying.
+   * The name can be up to 256 characters long.
+   * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for displayName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DESCRIPTION_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object description_ = ""; + /** + * + * + *
+   * Optional. Description of the collection. Can be up to 25000 characters
+   * long.
+   * 
+ * + * string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The description. + */ + @java.lang.Override + 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; + } + } + /** + * + * + *
+   * Optional. Description of the collection. Can be up to 25000 characters
+   * long.
+   * 
+ * + * string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for description. + */ + @java.lang.Override + 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; + } + } + + 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, displayName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, description_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, displayName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, description_); + } + size += getUnknownFields().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.visionai.v1.Collection)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.Collection other = (com.google.cloud.visionai.v1.Collection) obj; + + if (!getName().equals(other.getName())) return false; + if (!getDisplayName().equals(other.getDisplayName())) return false; + if (!getDescription().equals(other.getDescription())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDisplayName().hashCode(); + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.Collection parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.Collection 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.visionai.v1.Collection parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.Collection 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.visionai.v1.Collection parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.Collection parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.Collection parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.Collection 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.visionai.v1.Collection parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.Collection 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.visionai.v1.Collection parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.Collection 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.visionai.v1.Collection 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 collection is a resource in a corpus. It serves as a container of
+   * references to original resources.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.Collection} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.Collection) + com.google.cloud.visionai.v1.CollectionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_Collection_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_Collection_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.Collection.class, + com.google.cloud.visionai.v1.Collection.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.Collection.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + displayName_ = ""; + description_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_Collection_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.Collection getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.Collection.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.Collection build() { + com.google.cloud.visionai.v1.Collection result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.Collection buildPartial() { + com.google.cloud.visionai.v1.Collection result = + new com.google.cloud.visionai.v1.Collection(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.visionai.v1.Collection result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.displayName_ = displayName_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.description_ = description_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.Collection) { + return mergeFrom((com.google.cloud.visionai.v1.Collection) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.Collection other) { + if (other == com.google.cloud.visionai.v1.Collection.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getDisplayName().isEmpty()) { + displayName_ = other.displayName_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + bitField0_ |= 0x00000004; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + displayName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Output only. Resource name of the collection. Format:
+     * `projects/{project_number}/locations/{location}/corpora/{corpus}/collections/{collection}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. Resource name of the collection. Format:
+     * `projects/{project_number}/locations/{location}/corpora/{corpus}/collections/{collection}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. Resource name of the collection. Format:
+     * `projects/{project_number}/locations/{location}/corpora/{corpus}/collections/{collection}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Resource name of the collection. Format:
+     * `projects/{project_number}/locations/{location}/corpora/{corpus}/collections/{collection}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Resource name of the collection. Format:
+     * `projects/{project_number}/locations/{location}/corpora/{corpus}/collections/{collection}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object displayName_ = ""; + /** + * + * + *
+     * Optional. The collection name for displaying.
+     * The name can be up to 256 characters long.
+     * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The displayName. + */ + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. The collection name for displaying.
+     * The name can be up to 256 characters long.
+     * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for displayName. + */ + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. The collection name for displaying.
+     * The name can be up to 256 characters long.
+     * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + displayName_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The collection name for displaying.
+     * The name can be up to 256 characters long.
+     * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearDisplayName() { + displayName_ = getDefaultInstance().getDisplayName(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The collection name for displaying.
+     * The name can be up to 256 characters long.
+     * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + displayName_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object description_ = ""; + /** + * + * + *
+     * Optional. Description of the collection. Can be up to 25000 characters
+     * long.
+     * 
+ * + * string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The description. + */ + 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; + } + } + /** + * + * + *
+     * Optional. Description of the collection. Can be up to 25000 characters
+     * long.
+     * 
+ * + * string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for description. + */ + 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; + } + } + /** + * + * + *
+     * Optional. Description of the collection. Can be up to 25000 characters
+     * long.
+     * 
+ * + * string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The description to set. + * @return This builder for chaining. + */ + public Builder setDescription(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + description_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Description of the collection. Can be up to 25000 characters
+     * long.
+     * 
+ * + * string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearDescription() { + description_ = getDefaultInstance().getDescription(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Description of the collection. Can be up to 25000 characters
+     * long.
+     * 
+ * + * string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for description to set. + * @return This builder for chaining. + */ + public Builder setDescriptionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + description_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.Collection) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.Collection) + private static final com.google.cloud.visionai.v1.Collection DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.Collection(); + } + + public static com.google.cloud.visionai.v1.Collection getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Collection parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.Collection getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/CollectionItem.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/CollectionItem.java new file mode 100644 index 000000000000..b3eece184f9b --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/CollectionItem.java @@ -0,0 +1,1142 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/warehouse.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * A CollectionItem is an item in a collection.
+ * Each item is a reference to the original resource in a collection.
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.CollectionItem} + */ +public final class CollectionItem extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.CollectionItem) + CollectionItemOrBuilder { + private static final long serialVersionUID = 0L; + // Use CollectionItem.newBuilder() to construct. + private CollectionItem(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CollectionItem() { + collection_ = ""; + type_ = 0; + itemResource_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CollectionItem(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_CollectionItem_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_CollectionItem_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.CollectionItem.class, + com.google.cloud.visionai.v1.CollectionItem.Builder.class); + } + + /** + * + * + *
+   * CollectionItem types.
+   * 
+ * + * Protobuf enum {@code google.cloud.visionai.v1.CollectionItem.Type} + */ + public enum Type implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * The default type of item should never happen.
+     * 
+ * + * TYPE_UNSPECIFIED = 0; + */ + TYPE_UNSPECIFIED(0), + /** + * + * + *
+     * Asset type item.
+     * 
+ * + * ASSET = 1; + */ + ASSET(1), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * The default type of item should never happen.
+     * 
+ * + * TYPE_UNSPECIFIED = 0; + */ + public static final int TYPE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * Asset type item.
+     * 
+ * + * ASSET = 1; + */ + public static final int ASSET_VALUE = 1; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static Type valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static Type forNumber(int value) { + switch (value) { + case 0: + return TYPE_UNSPECIFIED; + case 1: + return ASSET; + 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 Type findValueByNumber(int number) { + return Type.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + 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.visionai.v1.CollectionItem.getDescriptor().getEnumTypes().get(0); + } + + private static final Type[] VALUES = values(); + + public static Type 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 Type(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.visionai.v1.CollectionItem.Type) + } + + public static final int COLLECTION_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object collection_ = ""; + /** + * + * + *
+   * Required. The collection name that this item belongs to. Format:
+   * `projects/{project_number}/locations/{location}/corpora/{corpus}/collections/{collection}`
+   * 
+ * + * + * string collection = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The collection. + */ + @java.lang.Override + public java.lang.String getCollection() { + java.lang.Object ref = collection_; + 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(); + collection_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The collection name that this item belongs to. Format:
+   * `projects/{project_number}/locations/{location}/corpora/{corpus}/collections/{collection}`
+   * 
+ * + * + * string collection = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for collection. + */ + @java.lang.Override + public com.google.protobuf.ByteString getCollectionBytes() { + java.lang.Object ref = collection_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + collection_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TYPE_FIELD_NUMBER = 2; + private int type_ = 0; + /** + * + * + *
+   * Required. The type of item.
+   * 
+ * + * + * .google.cloud.visionai.v1.CollectionItem.Type type = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for type. + */ + @java.lang.Override + public int getTypeValue() { + return type_; + } + /** + * + * + *
+   * Required. The type of item.
+   * 
+ * + * + * .google.cloud.visionai.v1.CollectionItem.Type type = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The type. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.CollectionItem.Type getType() { + com.google.cloud.visionai.v1.CollectionItem.Type result = + com.google.cloud.visionai.v1.CollectionItem.Type.forNumber(type_); + return result == null ? com.google.cloud.visionai.v1.CollectionItem.Type.UNRECOGNIZED : result; + } + + public static final int ITEM_RESOURCE_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object itemResource_ = ""; + /** + * + * + *
+   * Required. The name of the CollectionItem. Its format depends on the `type`
+   * above. For ASSET:
+   * `projects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset}`
+   * 
+ * + * string item_resource = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The itemResource. + */ + @java.lang.Override + public java.lang.String getItemResource() { + java.lang.Object ref = itemResource_; + 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(); + itemResource_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The name of the CollectionItem. Its format depends on the `type`
+   * above. For ASSET:
+   * `projects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset}`
+   * 
+ * + * string item_resource = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for itemResource. + */ + @java.lang.Override + public com.google.protobuf.ByteString getItemResourceBytes() { + java.lang.Object ref = itemResource_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + itemResource_ = 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(collection_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, collection_); + } + if (type_ != com.google.cloud.visionai.v1.CollectionItem.Type.TYPE_UNSPECIFIED.getNumber()) { + output.writeEnum(2, type_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(itemResource_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, itemResource_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(collection_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, collection_); + } + if (type_ != com.google.cloud.visionai.v1.CollectionItem.Type.TYPE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, type_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(itemResource_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, itemResource_); + } + size += getUnknownFields().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.visionai.v1.CollectionItem)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.CollectionItem other = + (com.google.cloud.visionai.v1.CollectionItem) obj; + + if (!getCollection().equals(other.getCollection())) return false; + if (type_ != other.type_) return false; + if (!getItemResource().equals(other.getItemResource())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + COLLECTION_FIELD_NUMBER; + hash = (53 * hash) + getCollection().hashCode(); + hash = (37 * hash) + TYPE_FIELD_NUMBER; + hash = (53 * hash) + type_; + hash = (37 * hash) + ITEM_RESOURCE_FIELD_NUMBER; + hash = (53 * hash) + getItemResource().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.CollectionItem parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.CollectionItem 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.visionai.v1.CollectionItem parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.CollectionItem 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.visionai.v1.CollectionItem parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.CollectionItem parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.CollectionItem parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.CollectionItem 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.visionai.v1.CollectionItem parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.CollectionItem 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.visionai.v1.CollectionItem parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.CollectionItem 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.visionai.v1.CollectionItem 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 CollectionItem is an item in a collection.
+   * Each item is a reference to the original resource in a collection.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.CollectionItem} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.CollectionItem) + com.google.cloud.visionai.v1.CollectionItemOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_CollectionItem_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_CollectionItem_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.CollectionItem.class, + com.google.cloud.visionai.v1.CollectionItem.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.CollectionItem.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + collection_ = ""; + type_ = 0; + itemResource_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_CollectionItem_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.CollectionItem getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.CollectionItem.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.CollectionItem build() { + com.google.cloud.visionai.v1.CollectionItem result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.CollectionItem buildPartial() { + com.google.cloud.visionai.v1.CollectionItem result = + new com.google.cloud.visionai.v1.CollectionItem(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.visionai.v1.CollectionItem result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.collection_ = collection_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.type_ = type_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.itemResource_ = itemResource_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.CollectionItem) { + return mergeFrom((com.google.cloud.visionai.v1.CollectionItem) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.CollectionItem other) { + if (other == com.google.cloud.visionai.v1.CollectionItem.getDefaultInstance()) return this; + if (!other.getCollection().isEmpty()) { + collection_ = other.collection_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.type_ != 0) { + setTypeValue(other.getTypeValue()); + } + if (!other.getItemResource().isEmpty()) { + itemResource_ = other.itemResource_; + bitField0_ |= 0x00000004; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + collection_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + type_ = input.readEnum(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: + { + itemResource_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object collection_ = ""; + /** + * + * + *
+     * Required. The collection name that this item belongs to. Format:
+     * `projects/{project_number}/locations/{location}/corpora/{corpus}/collections/{collection}`
+     * 
+ * + * + * string collection = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The collection. + */ + public java.lang.String getCollection() { + java.lang.Object ref = collection_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + collection_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The collection name that this item belongs to. Format:
+     * `projects/{project_number}/locations/{location}/corpora/{corpus}/collections/{collection}`
+     * 
+ * + * + * string collection = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for collection. + */ + public com.google.protobuf.ByteString getCollectionBytes() { + java.lang.Object ref = collection_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + collection_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The collection name that this item belongs to. Format:
+     * `projects/{project_number}/locations/{location}/corpora/{corpus}/collections/{collection}`
+     * 
+ * + * + * string collection = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The collection to set. + * @return This builder for chaining. + */ + public Builder setCollection(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + collection_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The collection name that this item belongs to. Format:
+     * `projects/{project_number}/locations/{location}/corpora/{corpus}/collections/{collection}`
+     * 
+ * + * + * string collection = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearCollection() { + collection_ = getDefaultInstance().getCollection(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The collection name that this item belongs to. Format:
+     * `projects/{project_number}/locations/{location}/corpora/{corpus}/collections/{collection}`
+     * 
+ * + * + * string collection = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for collection to set. + * @return This builder for chaining. + */ + public Builder setCollectionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + collection_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private int type_ = 0; + /** + * + * + *
+     * Required. The type of item.
+     * 
+ * + * + * .google.cloud.visionai.v1.CollectionItem.Type type = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for type. + */ + @java.lang.Override + public int getTypeValue() { + return type_; + } + /** + * + * + *
+     * Required. The type of item.
+     * 
+ * + * + * .google.cloud.visionai.v1.CollectionItem.Type type = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The enum numeric value on the wire for type to set. + * @return This builder for chaining. + */ + public Builder setTypeValue(int value) { + type_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The type of item.
+     * 
+ * + * + * .google.cloud.visionai.v1.CollectionItem.Type type = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The type. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.CollectionItem.Type getType() { + com.google.cloud.visionai.v1.CollectionItem.Type result = + com.google.cloud.visionai.v1.CollectionItem.Type.forNumber(type_); + return result == null + ? com.google.cloud.visionai.v1.CollectionItem.Type.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Required. The type of item.
+     * 
+ * + * + * .google.cloud.visionai.v1.CollectionItem.Type type = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The type to set. + * @return This builder for chaining. + */ + public Builder setType(com.google.cloud.visionai.v1.CollectionItem.Type value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + type_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The type of item.
+     * 
+ * + * + * .google.cloud.visionai.v1.CollectionItem.Type type = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return This builder for chaining. + */ + public Builder clearType() { + bitField0_ = (bitField0_ & ~0x00000002); + type_ = 0; + onChanged(); + return this; + } + + private java.lang.Object itemResource_ = ""; + /** + * + * + *
+     * Required. The name of the CollectionItem. Its format depends on the `type`
+     * above. For ASSET:
+     * `projects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset}`
+     * 
+ * + * string item_resource = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The itemResource. + */ + public java.lang.String getItemResource() { + java.lang.Object ref = itemResource_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + itemResource_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The name of the CollectionItem. Its format depends on the `type`
+     * above. For ASSET:
+     * `projects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset}`
+     * 
+ * + * string item_resource = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for itemResource. + */ + public com.google.protobuf.ByteString getItemResourceBytes() { + java.lang.Object ref = itemResource_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + itemResource_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The name of the CollectionItem. Its format depends on the `type`
+     * above. For ASSET:
+     * `projects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset}`
+     * 
+ * + * string item_resource = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The itemResource to set. + * @return This builder for chaining. + */ + public Builder setItemResource(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + itemResource_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the CollectionItem. Its format depends on the `type`
+     * above. For ASSET:
+     * `projects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset}`
+     * 
+ * + * string item_resource = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearItemResource() { + itemResource_ = getDefaultInstance().getItemResource(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the CollectionItem. Its format depends on the `type`
+     * above. For ASSET:
+     * `projects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset}`
+     * 
+ * + * string item_resource = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for itemResource to set. + * @return This builder for chaining. + */ + public Builder setItemResourceBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + itemResource_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.CollectionItem) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.CollectionItem) + private static final com.google.cloud.visionai.v1.CollectionItem DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.CollectionItem(); + } + + public static com.google.cloud.visionai.v1.CollectionItem getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CollectionItem parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.CollectionItem getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/CollectionItemOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/CollectionItemOrBuilder.java new file mode 100644 index 000000000000..e3c3595fe1e2 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/CollectionItemOrBuilder.java @@ -0,0 +1,115 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/warehouse.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface CollectionItemOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.CollectionItem) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The collection name that this item belongs to. Format:
+   * `projects/{project_number}/locations/{location}/corpora/{corpus}/collections/{collection}`
+   * 
+ * + * + * string collection = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The collection. + */ + java.lang.String getCollection(); + /** + * + * + *
+   * Required. The collection name that this item belongs to. Format:
+   * `projects/{project_number}/locations/{location}/corpora/{corpus}/collections/{collection}`
+   * 
+ * + * + * string collection = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for collection. + */ + com.google.protobuf.ByteString getCollectionBytes(); + + /** + * + * + *
+   * Required. The type of item.
+   * 
+ * + * + * .google.cloud.visionai.v1.CollectionItem.Type type = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for type. + */ + int getTypeValue(); + /** + * + * + *
+   * Required. The type of item.
+   * 
+ * + * + * .google.cloud.visionai.v1.CollectionItem.Type type = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The type. + */ + com.google.cloud.visionai.v1.CollectionItem.Type getType(); + + /** + * + * + *
+   * Required. The name of the CollectionItem. Its format depends on the `type`
+   * above. For ASSET:
+   * `projects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset}`
+   * 
+ * + * string item_resource = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The itemResource. + */ + java.lang.String getItemResource(); + /** + * + * + *
+   * Required. The name of the CollectionItem. Its format depends on the `type`
+   * above. For ASSET:
+   * `projects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset}`
+   * 
+ * + * string item_resource = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for itemResource. + */ + com.google.protobuf.ByteString getItemResourceBytes(); +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/CollectionName.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/CollectionName.java new file mode 100644 index 000000000000..07b44aea3a1b --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/CollectionName.java @@ -0,0 +1,269 @@ +/* + * Copyright 2024 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.visionai.v1; + +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") +public class CollectionName implements ResourceName { + private static final PathTemplate PROJECT_NUMBER_LOCATION_CORPUS_COLLECTION = + PathTemplate.createWithoutUrlEncoding( + "projects/{project_number}/locations/{location}/corpora/{corpus}/collections/{collection}"); + private volatile Map fieldValuesMap; + private final String projectNumber; + private final String location; + private final String corpus; + private final String collection; + + @Deprecated + protected CollectionName() { + projectNumber = null; + location = null; + corpus = null; + collection = null; + } + + private CollectionName(Builder builder) { + projectNumber = Preconditions.checkNotNull(builder.getProjectNumber()); + location = Preconditions.checkNotNull(builder.getLocation()); + corpus = Preconditions.checkNotNull(builder.getCorpus()); + collection = Preconditions.checkNotNull(builder.getCollection()); + } + + public String getProjectNumber() { + return projectNumber; + } + + public String getLocation() { + return location; + } + + public String getCorpus() { + return corpus; + } + + public String getCollection() { + return collection; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static CollectionName of( + String projectNumber, String location, String corpus, String collection) { + return newBuilder() + .setProjectNumber(projectNumber) + .setLocation(location) + .setCorpus(corpus) + .setCollection(collection) + .build(); + } + + public static String format( + String projectNumber, String location, String corpus, String collection) { + return newBuilder() + .setProjectNumber(projectNumber) + .setLocation(location) + .setCorpus(corpus) + .setCollection(collection) + .build() + .toString(); + } + + public static CollectionName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_NUMBER_LOCATION_CORPUS_COLLECTION.validatedMatch( + formattedString, "CollectionName.parse: formattedString not in valid format"); + return of( + matchMap.get("project_number"), + matchMap.get("location"), + matchMap.get("corpus"), + matchMap.get("collection")); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List values) { + List list = new ArrayList<>(values.size()); + for (CollectionName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_NUMBER_LOCATION_CORPUS_COLLECTION.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (projectNumber != null) { + fieldMapBuilder.put("project_number", projectNumber); + } + if (location != null) { + fieldMapBuilder.put("location", location); + } + if (corpus != null) { + fieldMapBuilder.put("corpus", corpus); + } + if (collection != null) { + fieldMapBuilder.put("collection", collection); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_NUMBER_LOCATION_CORPUS_COLLECTION.instantiate( + "project_number", + projectNumber, + "location", + location, + "corpus", + corpus, + "collection", + collection); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null && getClass() == o.getClass()) { + CollectionName that = ((CollectionName) o); + return Objects.equals(this.projectNumber, that.projectNumber) + && Objects.equals(this.location, that.location) + && Objects.equals(this.corpus, that.corpus) + && Objects.equals(this.collection, that.collection); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(projectNumber); + h *= 1000003; + h ^= Objects.hashCode(location); + h *= 1000003; + h ^= Objects.hashCode(corpus); + h *= 1000003; + h ^= Objects.hashCode(collection); + return h; + } + + /** + * Builder for + * projects/{project_number}/locations/{location}/corpora/{corpus}/collections/{collection}. + */ + public static class Builder { + private String projectNumber; + private String location; + private String corpus; + private String collection; + + protected Builder() {} + + public String getProjectNumber() { + return projectNumber; + } + + public String getLocation() { + return location; + } + + public String getCorpus() { + return corpus; + } + + public String getCollection() { + return collection; + } + + public Builder setProjectNumber(String projectNumber) { + this.projectNumber = projectNumber; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setCorpus(String corpus) { + this.corpus = corpus; + return this; + } + + public Builder setCollection(String collection) { + this.collection = collection; + return this; + } + + private Builder(CollectionName collectionName) { + this.projectNumber = collectionName.projectNumber; + this.location = collectionName.location; + this.corpus = collectionName.corpus; + this.collection = collectionName.collection; + } + + public CollectionName build() { + return new CollectionName(this); + } + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/CollectionOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/CollectionOrBuilder.java new file mode 100644 index 000000000000..3a7e36045c1c --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/CollectionOrBuilder.java @@ -0,0 +1,107 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/warehouse.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface CollectionOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.Collection) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. Resource name of the collection. Format:
+   * `projects/{project_number}/locations/{location}/corpora/{corpus}/collections/{collection}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Output only. Resource name of the collection. Format:
+   * `projects/{project_number}/locations/{location}/corpora/{corpus}/collections/{collection}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Optional. The collection name for displaying.
+   * The name can be up to 256 characters long.
+   * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The displayName. + */ + java.lang.String getDisplayName(); + /** + * + * + *
+   * Optional. The collection name for displaying.
+   * The name can be up to 256 characters long.
+   * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for displayName. + */ + com.google.protobuf.ByteString getDisplayNameBytes(); + + /** + * + * + *
+   * Optional. Description of the collection. Can be up to 25000 characters
+   * long.
+   * 
+ * + * string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The description. + */ + java.lang.String getDescription(); + /** + * + * + *
+   * Optional. Description of the collection. Can be up to 25000 characters
+   * long.
+   * 
+ * + * string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for description. + */ + com.google.protobuf.ByteString getDescriptionBytes(); +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/CommitRequest.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/CommitRequest.java new file mode 100644 index 000000000000..b8af04672d62 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/CommitRequest.java @@ -0,0 +1,540 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/streaming_service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * The message for explicitly committing the read progress.
+ *
+ * This may only be used when `ReceivePacketsControlledMode` is set in the
+ * initial setup request.
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.CommitRequest} + */ +public final class CommitRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.CommitRequest) + CommitRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use CommitRequest.newBuilder() to construct. + private CommitRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CommitRequest() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CommitRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.StreamingServiceProto + .internal_static_google_cloud_visionai_v1_CommitRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.StreamingServiceProto + .internal_static_google_cloud_visionai_v1_CommitRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.CommitRequest.class, + com.google.cloud.visionai.v1.CommitRequest.Builder.class); + } + + public static final int OFFSET_FIELD_NUMBER = 1; + private long offset_ = 0L; + /** + * + * + *
+   * The offset to commit.
+   * 
+ * + * int64 offset = 1; + * + * @return The offset. + */ + @java.lang.Override + public long getOffset() { + return offset_; + } + + 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 (offset_ != 0L) { + output.writeInt64(1, offset_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (offset_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(1, offset_); + } + size += getUnknownFields().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.visionai.v1.CommitRequest)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.CommitRequest other = + (com.google.cloud.visionai.v1.CommitRequest) obj; + + if (getOffset() != other.getOffset()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + OFFSET_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getOffset()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.CommitRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.CommitRequest 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.visionai.v1.CommitRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.CommitRequest 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.visionai.v1.CommitRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.CommitRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.CommitRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.CommitRequest 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.visionai.v1.CommitRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.CommitRequest 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.visionai.v1.CommitRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.CommitRequest 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.visionai.v1.CommitRequest 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 message for explicitly committing the read progress.
+   *
+   * This may only be used when `ReceivePacketsControlledMode` is set in the
+   * initial setup request.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.CommitRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.CommitRequest) + com.google.cloud.visionai.v1.CommitRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.StreamingServiceProto + .internal_static_google_cloud_visionai_v1_CommitRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.StreamingServiceProto + .internal_static_google_cloud_visionai_v1_CommitRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.CommitRequest.class, + com.google.cloud.visionai.v1.CommitRequest.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.CommitRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + offset_ = 0L; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.StreamingServiceProto + .internal_static_google_cloud_visionai_v1_CommitRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.CommitRequest getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.CommitRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.CommitRequest build() { + com.google.cloud.visionai.v1.CommitRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.CommitRequest buildPartial() { + com.google.cloud.visionai.v1.CommitRequest result = + new com.google.cloud.visionai.v1.CommitRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.visionai.v1.CommitRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.offset_ = offset_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.CommitRequest) { + return mergeFrom((com.google.cloud.visionai.v1.CommitRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.CommitRequest other) { + if (other == com.google.cloud.visionai.v1.CommitRequest.getDefaultInstance()) return this; + if (other.getOffset() != 0L) { + setOffset(other.getOffset()); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + offset_ = input.readInt64(); + bitField0_ |= 0x00000001; + break; + } // case 8 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private long offset_; + /** + * + * + *
+     * The offset to commit.
+     * 
+ * + * int64 offset = 1; + * + * @return The offset. + */ + @java.lang.Override + public long getOffset() { + return offset_; + } + /** + * + * + *
+     * The offset to commit.
+     * 
+ * + * int64 offset = 1; + * + * @param value The offset to set. + * @return This builder for chaining. + */ + public Builder setOffset(long value) { + + offset_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The offset to commit.
+     * 
+ * + * int64 offset = 1; + * + * @return This builder for chaining. + */ + public Builder clearOffset() { + bitField0_ = (bitField0_ & ~0x00000001); + offset_ = 0L; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.CommitRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.CommitRequest) + private static final com.google.cloud.visionai.v1.CommitRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.CommitRequest(); + } + + public static com.google.cloud.visionai.v1.CommitRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CommitRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.CommitRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/CommitRequestOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/CommitRequestOrBuilder.java new file mode 100644 index 000000000000..3553c2a48d88 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/CommitRequestOrBuilder.java @@ -0,0 +1,39 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/streaming_service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface CommitRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.CommitRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The offset to commit.
+   * 
+ * + * int64 offset = 1; + * + * @return The offset. + */ + long getOffset(); +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/CommonProto.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/CommonProto.java new file mode 100644 index 000000000000..f301122ac614 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/CommonProto.java @@ -0,0 +1,168 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/common.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public final class CommonProto { + private CommonProto() {} + + 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_visionai_v1_Cluster_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_visionai_v1_Cluster_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_visionai_v1_Cluster_LabelsEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_visionai_v1_Cluster_LabelsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_visionai_v1_Cluster_AnnotationsEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_visionai_v1_Cluster_AnnotationsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_visionai_v1_OperationMetadata_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_visionai_v1_OperationMetadata_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_visionai_v1_GcsSource_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_visionai_v1_GcsSource_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n%google/cloud/visionai/v1/common.proto\022" + + "\030google.cloud.visionai.v1\032\037google/api/fi" + + "eld_behavior.proto\032\031google/api/resource." + + "proto\032\037google/protobuf/timestamp.proto\"\254" + + "\005\n\007Cluster\022\021\n\004name\030\001 \001(\tB\003\340A\003\0224\n\013create_" + + "time\030\002 \001(\0132\032.google.protobuf.TimestampB\003" + + "\340A\003\0224\n\013update_time\030\003 \001(\0132\032.google.protob" + + "uf.TimestampB\003\340A\003\022=\n\006labels\030\004 \003(\0132-.goog" + + "le.cloud.visionai.v1.Cluster.LabelsEntry" + + "\022G\n\013annotations\030\005 \003(\01322.google.cloud.vis" + + "ionai.v1.Cluster.AnnotationsEntry\022\'\n\032dat" + + "aplane_service_endpoint\030\006 \001(\tB\003\340A\003\022;\n\005st" + + "ate\030\007 \001(\0162\'.google.cloud.visionai.v1.Clu" + + "ster.StateB\003\340A\003\022\027\n\npsc_target\030\010 \001(\tB\003\340A\003" + + "\032-\n\013LabelsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 " + + "\001(\t:\0028\001\0322\n\020AnnotationsEntry\022\013\n\003key\030\001 \001(\t" + + "\022\r\n\005value\030\002 \001(\t:\0028\001\"V\n\005State\022\025\n\021STATE_UN" + + "SPECIFIED\020\000\022\020\n\014PROVISIONING\020\001\022\013\n\007RUNNING" + + "\020\002\022\014\n\010STOPPING\020\003\022\t\n\005ERROR\020\004:`\352A]\n\037vision" + + "ai.googleapis.com/Cluster\022:projects/{pro" + + "ject}/locations/{location}/clusters/{clu" + + "ster}\"\200\002\n\021OperationMetadata\0224\n\013create_ti" + + "me\030\001 \001(\0132\032.google.protobuf.TimestampB\003\340A" + + "\003\0221\n\010end_time\030\002 \001(\0132\032.google.protobuf.Ti" + + "mestampB\003\340A\003\022\023\n\006target\030\003 \001(\tB\003\340A\003\022\021\n\004ver" + + "b\030\004 \001(\tB\003\340A\003\022\033\n\016status_message\030\005 \001(\tB\003\340A" + + "\003\022#\n\026requested_cancellation\030\006 \001(\010B\003\340A\003\022\030" + + "\n\013api_version\030\007 \001(\tB\003\340A\003\"\036\n\tGcsSource\022\021\n" + + "\004uris\030\001 \003(\tB\003\340A\002B\273\001\n\034com.google.cloud.vi" + + "sionai.v1B\013CommonProtoP\001Z8cloud.google.c" + + "om/go/visionai/apiv1/visionaipb;visionai" + + "pb\252\002\030Google.Cloud.VisionAI.V1\312\002\030Google\\C" + + "loud\\VisionAI\\V1\352\002\033Google::Cloud::Vision" + + "AI::V1b\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.api.ResourceProto.getDescriptor(), + com.google.protobuf.TimestampProto.getDescriptor(), + }); + internal_static_google_cloud_visionai_v1_Cluster_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_visionai_v1_Cluster_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_visionai_v1_Cluster_descriptor, + new java.lang.String[] { + "Name", + "CreateTime", + "UpdateTime", + "Labels", + "Annotations", + "DataplaneServiceEndpoint", + "State", + "PscTarget", + }); + internal_static_google_cloud_visionai_v1_Cluster_LabelsEntry_descriptor = + internal_static_google_cloud_visionai_v1_Cluster_descriptor.getNestedTypes().get(0); + internal_static_google_cloud_visionai_v1_Cluster_LabelsEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_visionai_v1_Cluster_LabelsEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); + internal_static_google_cloud_visionai_v1_Cluster_AnnotationsEntry_descriptor = + internal_static_google_cloud_visionai_v1_Cluster_descriptor.getNestedTypes().get(1); + internal_static_google_cloud_visionai_v1_Cluster_AnnotationsEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_visionai_v1_Cluster_AnnotationsEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); + internal_static_google_cloud_visionai_v1_OperationMetadata_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_cloud_visionai_v1_OperationMetadata_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_visionai_v1_OperationMetadata_descriptor, + new java.lang.String[] { + "CreateTime", + "EndTime", + "Target", + "Verb", + "StatusMessage", + "RequestedCancellation", + "ApiVersion", + }); + internal_static_google_cloud_visionai_v1_GcsSource_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_google_cloud_visionai_v1_GcsSource_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_visionai_v1_GcsSource_descriptor, + new java.lang.String[] { + "Uris", + }); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + registry.add(com.google.api.ResourceProto.resource); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.api.ResourceProto.getDescriptor(); + com.google.protobuf.TimestampProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ControlledMode.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ControlledMode.java new file mode 100644 index 000000000000..35523a31a75f --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ControlledMode.java @@ -0,0 +1,1077 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/streaming_service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * The options for receiver under the controlled mode.
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.ControlledMode} + */ +public final class ControlledMode extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.ControlledMode) + ControlledModeOrBuilder { + private static final long serialVersionUID = 0L; + // Use ControlledMode.newBuilder() to construct. + private ControlledMode(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ControlledMode() { + fallbackStartingOffset_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ControlledMode(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.StreamingServiceProto + .internal_static_google_cloud_visionai_v1_ControlledMode_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.StreamingServiceProto + .internal_static_google_cloud_visionai_v1_ControlledMode_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.ControlledMode.class, + com.google.cloud.visionai.v1.ControlledMode.Builder.class); + } + + private int startingOffsetCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object startingOffset_; + + public enum StartingOffsetCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + STARTING_LOGICAL_OFFSET(1), + STARTINGOFFSET_NOT_SET(0); + private final int value; + + private StartingOffsetCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static StartingOffsetCase valueOf(int value) { + return forNumber(value); + } + + public static StartingOffsetCase forNumber(int value) { + switch (value) { + case 1: + return STARTING_LOGICAL_OFFSET; + case 0: + return STARTINGOFFSET_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public StartingOffsetCase getStartingOffsetCase() { + return StartingOffsetCase.forNumber(startingOffsetCase_); + } + + public static final int STARTING_LOGICAL_OFFSET_FIELD_NUMBER = 1; + /** + * + * + *
+   * This can be set to the following logical starting points:
+   *
+   * "begin": This will read from the earliest available message.
+   *
+   * "most-recent": This will read from the latest available message.
+   *
+   * "end": This will read only future messages.
+   *
+   * "stored": This will resume reads one past the last committed offset.
+   *           It is the only option that resumes progress; all others
+   *           jump unilaterally.
+   * 
+ * + * string starting_logical_offset = 1; + * + * @return Whether the startingLogicalOffset field is set. + */ + public boolean hasStartingLogicalOffset() { + return startingOffsetCase_ == 1; + } + /** + * + * + *
+   * This can be set to the following logical starting points:
+   *
+   * "begin": This will read from the earliest available message.
+   *
+   * "most-recent": This will read from the latest available message.
+   *
+   * "end": This will read only future messages.
+   *
+   * "stored": This will resume reads one past the last committed offset.
+   *           It is the only option that resumes progress; all others
+   *           jump unilaterally.
+   * 
+ * + * string starting_logical_offset = 1; + * + * @return The startingLogicalOffset. + */ + public java.lang.String getStartingLogicalOffset() { + java.lang.Object ref = ""; + if (startingOffsetCase_ == 1) { + ref = startingOffset_; + } + 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(); + if (startingOffsetCase_ == 1) { + startingOffset_ = s; + } + return s; + } + } + /** + * + * + *
+   * This can be set to the following logical starting points:
+   *
+   * "begin": This will read from the earliest available message.
+   *
+   * "most-recent": This will read from the latest available message.
+   *
+   * "end": This will read only future messages.
+   *
+   * "stored": This will resume reads one past the last committed offset.
+   *           It is the only option that resumes progress; all others
+   *           jump unilaterally.
+   * 
+ * + * string starting_logical_offset = 1; + * + * @return The bytes for startingLogicalOffset. + */ + public com.google.protobuf.ByteString getStartingLogicalOffsetBytes() { + java.lang.Object ref = ""; + if (startingOffsetCase_ == 1) { + ref = startingOffset_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (startingOffsetCase_ == 1) { + startingOffset_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FALLBACK_STARTING_OFFSET_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object fallbackStartingOffset_ = ""; + /** + * + * + *
+   * This is the logical starting point to fallback upon should the
+   * specified starting offset be unavailable.
+   *
+   * This can be one of the following values:
+   *
+   * "begin": This will read from the earliest available message.
+   *
+   * "end": This will read only future messages.
+   * 
+ * + * string fallback_starting_offset = 2; + * + * @return The fallbackStartingOffset. + */ + @java.lang.Override + public java.lang.String getFallbackStartingOffset() { + java.lang.Object ref = fallbackStartingOffset_; + 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(); + fallbackStartingOffset_ = s; + return s; + } + } + /** + * + * + *
+   * This is the logical starting point to fallback upon should the
+   * specified starting offset be unavailable.
+   *
+   * This can be one of the following values:
+   *
+   * "begin": This will read from the earliest available message.
+   *
+   * "end": This will read only future messages.
+   * 
+ * + * string fallback_starting_offset = 2; + * + * @return The bytes for fallbackStartingOffset. + */ + @java.lang.Override + public com.google.protobuf.ByteString getFallbackStartingOffsetBytes() { + java.lang.Object ref = fallbackStartingOffset_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + fallbackStartingOffset_ = 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 (startingOffsetCase_ == 1) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, startingOffset_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(fallbackStartingOffset_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, fallbackStartingOffset_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (startingOffsetCase_ == 1) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, startingOffset_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(fallbackStartingOffset_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, fallbackStartingOffset_); + } + size += getUnknownFields().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.visionai.v1.ControlledMode)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.ControlledMode other = + (com.google.cloud.visionai.v1.ControlledMode) obj; + + if (!getFallbackStartingOffset().equals(other.getFallbackStartingOffset())) return false; + if (!getStartingOffsetCase().equals(other.getStartingOffsetCase())) return false; + switch (startingOffsetCase_) { + case 1: + if (!getStartingLogicalOffset().equals(other.getStartingLogicalOffset())) return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + FALLBACK_STARTING_OFFSET_FIELD_NUMBER; + hash = (53 * hash) + getFallbackStartingOffset().hashCode(); + switch (startingOffsetCase_) { + case 1: + hash = (37 * hash) + STARTING_LOGICAL_OFFSET_FIELD_NUMBER; + hash = (53 * hash) + getStartingLogicalOffset().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.ControlledMode parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ControlledMode 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.visionai.v1.ControlledMode parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ControlledMode 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.visionai.v1.ControlledMode parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ControlledMode parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.ControlledMode parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ControlledMode 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.visionai.v1.ControlledMode parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ControlledMode 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.visionai.v1.ControlledMode parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ControlledMode 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.visionai.v1.ControlledMode 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 options for receiver under the controlled mode.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.ControlledMode} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.ControlledMode) + com.google.cloud.visionai.v1.ControlledModeOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.StreamingServiceProto + .internal_static_google_cloud_visionai_v1_ControlledMode_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.StreamingServiceProto + .internal_static_google_cloud_visionai_v1_ControlledMode_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.ControlledMode.class, + com.google.cloud.visionai.v1.ControlledMode.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.ControlledMode.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + fallbackStartingOffset_ = ""; + startingOffsetCase_ = 0; + startingOffset_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.StreamingServiceProto + .internal_static_google_cloud_visionai_v1_ControlledMode_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ControlledMode getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.ControlledMode.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ControlledMode build() { + com.google.cloud.visionai.v1.ControlledMode result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ControlledMode buildPartial() { + com.google.cloud.visionai.v1.ControlledMode result = + new com.google.cloud.visionai.v1.ControlledMode(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.visionai.v1.ControlledMode result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.fallbackStartingOffset_ = fallbackStartingOffset_; + } + } + + private void buildPartialOneofs(com.google.cloud.visionai.v1.ControlledMode result) { + result.startingOffsetCase_ = startingOffsetCase_; + result.startingOffset_ = this.startingOffset_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.ControlledMode) { + return mergeFrom((com.google.cloud.visionai.v1.ControlledMode) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.ControlledMode other) { + if (other == com.google.cloud.visionai.v1.ControlledMode.getDefaultInstance()) return this; + if (!other.getFallbackStartingOffset().isEmpty()) { + fallbackStartingOffset_ = other.fallbackStartingOffset_; + bitField0_ |= 0x00000002; + onChanged(); + } + switch (other.getStartingOffsetCase()) { + case STARTING_LOGICAL_OFFSET: + { + startingOffsetCase_ = 1; + startingOffset_ = other.startingOffset_; + onChanged(); + break; + } + case STARTINGOFFSET_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + 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(); + startingOffsetCase_ = 1; + startingOffset_ = s; + break; + } // case 10 + case 18: + { + fallbackStartingOffset_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int startingOffsetCase_ = 0; + private java.lang.Object startingOffset_; + + public StartingOffsetCase getStartingOffsetCase() { + return StartingOffsetCase.forNumber(startingOffsetCase_); + } + + public Builder clearStartingOffset() { + startingOffsetCase_ = 0; + startingOffset_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + /** + * + * + *
+     * This can be set to the following logical starting points:
+     *
+     * "begin": This will read from the earliest available message.
+     *
+     * "most-recent": This will read from the latest available message.
+     *
+     * "end": This will read only future messages.
+     *
+     * "stored": This will resume reads one past the last committed offset.
+     *           It is the only option that resumes progress; all others
+     *           jump unilaterally.
+     * 
+ * + * string starting_logical_offset = 1; + * + * @return Whether the startingLogicalOffset field is set. + */ + @java.lang.Override + public boolean hasStartingLogicalOffset() { + return startingOffsetCase_ == 1; + } + /** + * + * + *
+     * This can be set to the following logical starting points:
+     *
+     * "begin": This will read from the earliest available message.
+     *
+     * "most-recent": This will read from the latest available message.
+     *
+     * "end": This will read only future messages.
+     *
+     * "stored": This will resume reads one past the last committed offset.
+     *           It is the only option that resumes progress; all others
+     *           jump unilaterally.
+     * 
+ * + * string starting_logical_offset = 1; + * + * @return The startingLogicalOffset. + */ + @java.lang.Override + public java.lang.String getStartingLogicalOffset() { + java.lang.Object ref = ""; + if (startingOffsetCase_ == 1) { + ref = startingOffset_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (startingOffsetCase_ == 1) { + startingOffset_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * This can be set to the following logical starting points:
+     *
+     * "begin": This will read from the earliest available message.
+     *
+     * "most-recent": This will read from the latest available message.
+     *
+     * "end": This will read only future messages.
+     *
+     * "stored": This will resume reads one past the last committed offset.
+     *           It is the only option that resumes progress; all others
+     *           jump unilaterally.
+     * 
+ * + * string starting_logical_offset = 1; + * + * @return The bytes for startingLogicalOffset. + */ + @java.lang.Override + public com.google.protobuf.ByteString getStartingLogicalOffsetBytes() { + java.lang.Object ref = ""; + if (startingOffsetCase_ == 1) { + ref = startingOffset_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (startingOffsetCase_ == 1) { + startingOffset_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * This can be set to the following logical starting points:
+     *
+     * "begin": This will read from the earliest available message.
+     *
+     * "most-recent": This will read from the latest available message.
+     *
+     * "end": This will read only future messages.
+     *
+     * "stored": This will resume reads one past the last committed offset.
+     *           It is the only option that resumes progress; all others
+     *           jump unilaterally.
+     * 
+ * + * string starting_logical_offset = 1; + * + * @param value The startingLogicalOffset to set. + * @return This builder for chaining. + */ + public Builder setStartingLogicalOffset(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + startingOffsetCase_ = 1; + startingOffset_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * This can be set to the following logical starting points:
+     *
+     * "begin": This will read from the earliest available message.
+     *
+     * "most-recent": This will read from the latest available message.
+     *
+     * "end": This will read only future messages.
+     *
+     * "stored": This will resume reads one past the last committed offset.
+     *           It is the only option that resumes progress; all others
+     *           jump unilaterally.
+     * 
+ * + * string starting_logical_offset = 1; + * + * @return This builder for chaining. + */ + public Builder clearStartingLogicalOffset() { + if (startingOffsetCase_ == 1) { + startingOffsetCase_ = 0; + startingOffset_ = null; + onChanged(); + } + return this; + } + /** + * + * + *
+     * This can be set to the following logical starting points:
+     *
+     * "begin": This will read from the earliest available message.
+     *
+     * "most-recent": This will read from the latest available message.
+     *
+     * "end": This will read only future messages.
+     *
+     * "stored": This will resume reads one past the last committed offset.
+     *           It is the only option that resumes progress; all others
+     *           jump unilaterally.
+     * 
+ * + * string starting_logical_offset = 1; + * + * @param value The bytes for startingLogicalOffset to set. + * @return This builder for chaining. + */ + public Builder setStartingLogicalOffsetBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + startingOffsetCase_ = 1; + startingOffset_ = value; + onChanged(); + return this; + } + + private java.lang.Object fallbackStartingOffset_ = ""; + /** + * + * + *
+     * This is the logical starting point to fallback upon should the
+     * specified starting offset be unavailable.
+     *
+     * This can be one of the following values:
+     *
+     * "begin": This will read from the earliest available message.
+     *
+     * "end": This will read only future messages.
+     * 
+ * + * string fallback_starting_offset = 2; + * + * @return The fallbackStartingOffset. + */ + public java.lang.String getFallbackStartingOffset() { + java.lang.Object ref = fallbackStartingOffset_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + fallbackStartingOffset_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * This is the logical starting point to fallback upon should the
+     * specified starting offset be unavailable.
+     *
+     * This can be one of the following values:
+     *
+     * "begin": This will read from the earliest available message.
+     *
+     * "end": This will read only future messages.
+     * 
+ * + * string fallback_starting_offset = 2; + * + * @return The bytes for fallbackStartingOffset. + */ + public com.google.protobuf.ByteString getFallbackStartingOffsetBytes() { + java.lang.Object ref = fallbackStartingOffset_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + fallbackStartingOffset_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * This is the logical starting point to fallback upon should the
+     * specified starting offset be unavailable.
+     *
+     * This can be one of the following values:
+     *
+     * "begin": This will read from the earliest available message.
+     *
+     * "end": This will read only future messages.
+     * 
+ * + * string fallback_starting_offset = 2; + * + * @param value The fallbackStartingOffset to set. + * @return This builder for chaining. + */ + public Builder setFallbackStartingOffset(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + fallbackStartingOffset_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * This is the logical starting point to fallback upon should the
+     * specified starting offset be unavailable.
+     *
+     * This can be one of the following values:
+     *
+     * "begin": This will read from the earliest available message.
+     *
+     * "end": This will read only future messages.
+     * 
+ * + * string fallback_starting_offset = 2; + * + * @return This builder for chaining. + */ + public Builder clearFallbackStartingOffset() { + fallbackStartingOffset_ = getDefaultInstance().getFallbackStartingOffset(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * This is the logical starting point to fallback upon should the
+     * specified starting offset be unavailable.
+     *
+     * This can be one of the following values:
+     *
+     * "begin": This will read from the earliest available message.
+     *
+     * "end": This will read only future messages.
+     * 
+ * + * string fallback_starting_offset = 2; + * + * @param value The bytes for fallbackStartingOffset to set. + * @return This builder for chaining. + */ + public Builder setFallbackStartingOffsetBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + fallbackStartingOffset_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.ControlledMode) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.ControlledMode) + private static final com.google.cloud.visionai.v1.ControlledMode DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.ControlledMode(); + } + + public static com.google.cloud.visionai.v1.ControlledMode getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ControlledMode parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.ControlledMode getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ControlledModeOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ControlledModeOrBuilder.java new file mode 100644 index 000000000000..770648f92ff2 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ControlledModeOrBuilder.java @@ -0,0 +1,134 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/streaming_service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface ControlledModeOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.ControlledMode) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * This can be set to the following logical starting points:
+   *
+   * "begin": This will read from the earliest available message.
+   *
+   * "most-recent": This will read from the latest available message.
+   *
+   * "end": This will read only future messages.
+   *
+   * "stored": This will resume reads one past the last committed offset.
+   *           It is the only option that resumes progress; all others
+   *           jump unilaterally.
+   * 
+ * + * string starting_logical_offset = 1; + * + * @return Whether the startingLogicalOffset field is set. + */ + boolean hasStartingLogicalOffset(); + /** + * + * + *
+   * This can be set to the following logical starting points:
+   *
+   * "begin": This will read from the earliest available message.
+   *
+   * "most-recent": This will read from the latest available message.
+   *
+   * "end": This will read only future messages.
+   *
+   * "stored": This will resume reads one past the last committed offset.
+   *           It is the only option that resumes progress; all others
+   *           jump unilaterally.
+   * 
+ * + * string starting_logical_offset = 1; + * + * @return The startingLogicalOffset. + */ + java.lang.String getStartingLogicalOffset(); + /** + * + * + *
+   * This can be set to the following logical starting points:
+   *
+   * "begin": This will read from the earliest available message.
+   *
+   * "most-recent": This will read from the latest available message.
+   *
+   * "end": This will read only future messages.
+   *
+   * "stored": This will resume reads one past the last committed offset.
+   *           It is the only option that resumes progress; all others
+   *           jump unilaterally.
+   * 
+ * + * string starting_logical_offset = 1; + * + * @return The bytes for startingLogicalOffset. + */ + com.google.protobuf.ByteString getStartingLogicalOffsetBytes(); + + /** + * + * + *
+   * This is the logical starting point to fallback upon should the
+   * specified starting offset be unavailable.
+   *
+   * This can be one of the following values:
+   *
+   * "begin": This will read from the earliest available message.
+   *
+   * "end": This will read only future messages.
+   * 
+ * + * string fallback_starting_offset = 2; + * + * @return The fallbackStartingOffset. + */ + java.lang.String getFallbackStartingOffset(); + /** + * + * + *
+   * This is the logical starting point to fallback upon should the
+   * specified starting offset be unavailable.
+   *
+   * This can be one of the following values:
+   *
+   * "begin": This will read from the earliest available message.
+   *
+   * "end": This will read only future messages.
+   * 
+ * + * string fallback_starting_offset = 2; + * + * @return The bytes for fallbackStartingOffset. + */ + com.google.protobuf.ByteString getFallbackStartingOffsetBytes(); + + com.google.cloud.visionai.v1.ControlledMode.StartingOffsetCase getStartingOffsetCase(); +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/Corpus.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/Corpus.java new file mode 100644 index 000000000000..a8c053b93b74 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/Corpus.java @@ -0,0 +1,1954 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/warehouse.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * Corpus is a set of media contents for management.
+ * Within a corpus, media shares the same data schema. Search is also restricted
+ * within a single corpus.
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.Corpus} + */ +public final class Corpus extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.Corpus) + CorpusOrBuilder { + private static final long serialVersionUID = 0L; + // Use Corpus.newBuilder() to construct. + private Corpus(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Corpus() { + name_ = ""; + displayName_ = ""; + description_ = ""; + type_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Corpus(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_Corpus_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_Corpus_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.Corpus.class, + com.google.cloud.visionai.v1.Corpus.Builder.class); + } + + /** + * + * + *
+   * Type of the asset inside the corpus.
+   * 
+ * + * Protobuf enum {@code google.cloud.visionai.v1.Corpus.Type} + */ + public enum Type implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * The default type, not supposed to be used. If this default type is used,
+     * the corpus will be created as STREAM_VIDEO corpus.
+     * 
+ * + * TYPE_UNSPECIFIED = 0; + */ + TYPE_UNSPECIFIED(0), + /** + * + * + *
+     * Asset is a live streaming video.
+     * 
+ * + * STREAM_VIDEO = 1; + */ + STREAM_VIDEO(1), + /** + * + * + *
+     * Asset is an image.
+     * 
+ * + * IMAGE = 2; + */ + IMAGE(2), + /** + * + * + *
+     * Asset is a batch video.
+     * 
+ * + * VIDEO_ON_DEMAND = 3; + */ + VIDEO_ON_DEMAND(3), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * The default type, not supposed to be used. If this default type is used,
+     * the corpus will be created as STREAM_VIDEO corpus.
+     * 
+ * + * TYPE_UNSPECIFIED = 0; + */ + public static final int TYPE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * Asset is a live streaming video.
+     * 
+ * + * STREAM_VIDEO = 1; + */ + public static final int STREAM_VIDEO_VALUE = 1; + /** + * + * + *
+     * Asset is an image.
+     * 
+ * + * IMAGE = 2; + */ + public static final int IMAGE_VALUE = 2; + /** + * + * + *
+     * Asset is a batch video.
+     * 
+ * + * VIDEO_ON_DEMAND = 3; + */ + public static final int VIDEO_ON_DEMAND_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; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static Type valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static Type forNumber(int value) { + switch (value) { + case 0: + return TYPE_UNSPECIFIED; + case 1: + return STREAM_VIDEO; + case 2: + return IMAGE; + case 3: + return VIDEO_ON_DEMAND; + 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 Type findValueByNumber(int number) { + return Type.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + 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.visionai.v1.Corpus.getDescriptor().getEnumTypes().get(0); + } + + private static final Type[] VALUES = values(); + + public static Type 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 Type(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.visionai.v1.Corpus.Type) + } + + private int bitField0_; + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Resource name of the corpus.
+   * Format:
+   * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}`
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + 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(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Resource name of the corpus.
+   * Format:
+   * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}`
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DISPLAY_NAME_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object displayName_ = ""; + /** + * + * + *
+   * Required. The corpus name to shown in the UI. The name can be up to 32
+   * characters long.
+   * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The displayName. + */ + @java.lang.Override + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + 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(); + displayName_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The corpus name to shown in the UI. The name can be up to 32
+   * characters long.
+   * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for displayName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DESCRIPTION_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object description_ = ""; + /** + * + * + *
+   * Optional. Description of the corpus. Can be up to 25000 characters long.
+   * 
+ * + * string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The description. + */ + @java.lang.Override + 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; + } + } + /** + * + * + *
+   * Optional. Description of the corpus. Can be up to 25000 characters long.
+   * 
+ * + * string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for description. + */ + @java.lang.Override + 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 DEFAULT_TTL_FIELD_NUMBER = 5; + private com.google.protobuf.Duration defaultTtl_; + /** + * + * + *
+   * Optional. The default TTL value for all assets under the corpus without a
+   * asset level user-defined TTL. For STREAM_VIDEO type corpora, this is
+   * required and the maximum allowed
+   *   default_ttl is 10 years.
+   * 
+ * + * .google.protobuf.Duration default_ttl = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the defaultTtl field is set. + */ + @java.lang.Override + public boolean hasDefaultTtl() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * Optional. The default TTL value for all assets under the corpus without a
+   * asset level user-defined TTL. For STREAM_VIDEO type corpora, this is
+   * required and the maximum allowed
+   *   default_ttl is 10 years.
+   * 
+ * + * .google.protobuf.Duration default_ttl = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The defaultTtl. + */ + @java.lang.Override + public com.google.protobuf.Duration getDefaultTtl() { + return defaultTtl_ == null ? com.google.protobuf.Duration.getDefaultInstance() : defaultTtl_; + } + /** + * + * + *
+   * Optional. The default TTL value for all assets under the corpus without a
+   * asset level user-defined TTL. For STREAM_VIDEO type corpora, this is
+   * required and the maximum allowed
+   *   default_ttl is 10 years.
+   * 
+ * + * .google.protobuf.Duration default_ttl = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.protobuf.DurationOrBuilder getDefaultTtlOrBuilder() { + return defaultTtl_ == null ? com.google.protobuf.Duration.getDefaultInstance() : defaultTtl_; + } + + public static final int TYPE_FIELD_NUMBER = 7; + private int type_ = 0; + /** + * + * + *
+   * Optional. Type of the asset inside corpus.
+   * 
+ * + * .google.cloud.visionai.v1.Corpus.Type type = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for type. + */ + @java.lang.Override + public int getTypeValue() { + return type_; + } + /** + * + * + *
+   * Optional. Type of the asset inside corpus.
+   * 
+ * + * .google.cloud.visionai.v1.Corpus.Type type = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The type. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.Corpus.Type getType() { + com.google.cloud.visionai.v1.Corpus.Type result = + com.google.cloud.visionai.v1.Corpus.Type.forNumber(type_); + return result == null ? com.google.cloud.visionai.v1.Corpus.Type.UNRECOGNIZED : result; + } + + public static final int SEARCH_CAPABILITY_SETTING_FIELD_NUMBER = 8; + private com.google.cloud.visionai.v1.SearchCapabilitySetting searchCapabilitySetting_; + /** + * + * + *
+   * Default search capability setting on corpus level.
+   * 
+ * + * .google.cloud.visionai.v1.SearchCapabilitySetting search_capability_setting = 8; + * + * @return Whether the searchCapabilitySetting field is set. + */ + @java.lang.Override + public boolean hasSearchCapabilitySetting() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+   * Default search capability setting on corpus level.
+   * 
+ * + * .google.cloud.visionai.v1.SearchCapabilitySetting search_capability_setting = 8; + * + * @return The searchCapabilitySetting. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.SearchCapabilitySetting getSearchCapabilitySetting() { + return searchCapabilitySetting_ == null + ? com.google.cloud.visionai.v1.SearchCapabilitySetting.getDefaultInstance() + : searchCapabilitySetting_; + } + /** + * + * + *
+   * Default search capability setting on corpus level.
+   * 
+ * + * .google.cloud.visionai.v1.SearchCapabilitySetting search_capability_setting = 8; + */ + @java.lang.Override + public com.google.cloud.visionai.v1.SearchCapabilitySettingOrBuilder + getSearchCapabilitySettingOrBuilder() { + return searchCapabilitySetting_ == null + ? com.google.cloud.visionai.v1.SearchCapabilitySetting.getDefaultInstance() + : searchCapabilitySetting_; + } + + 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, displayName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, description_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(5, getDefaultTtl()); + } + if (type_ != com.google.cloud.visionai.v1.Corpus.Type.TYPE_UNSPECIFIED.getNumber()) { + output.writeEnum(7, type_); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(8, getSearchCapabilitySetting()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, displayName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, description_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getDefaultTtl()); + } + if (type_ != com.google.cloud.visionai.v1.Corpus.Type.TYPE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(7, type_); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(8, getSearchCapabilitySetting()); + } + size += getUnknownFields().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.visionai.v1.Corpus)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.Corpus other = (com.google.cloud.visionai.v1.Corpus) obj; + + if (!getName().equals(other.getName())) return false; + if (!getDisplayName().equals(other.getDisplayName())) return false; + if (!getDescription().equals(other.getDescription())) return false; + if (hasDefaultTtl() != other.hasDefaultTtl()) return false; + if (hasDefaultTtl()) { + if (!getDefaultTtl().equals(other.getDefaultTtl())) return false; + } + if (type_ != other.type_) return false; + if (hasSearchCapabilitySetting() != other.hasSearchCapabilitySetting()) return false; + if (hasSearchCapabilitySetting()) { + if (!getSearchCapabilitySetting().equals(other.getSearchCapabilitySetting())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDisplayName().hashCode(); + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + if (hasDefaultTtl()) { + hash = (37 * hash) + DEFAULT_TTL_FIELD_NUMBER; + hash = (53 * hash) + getDefaultTtl().hashCode(); + } + hash = (37 * hash) + TYPE_FIELD_NUMBER; + hash = (53 * hash) + type_; + if (hasSearchCapabilitySetting()) { + hash = (37 * hash) + SEARCH_CAPABILITY_SETTING_FIELD_NUMBER; + hash = (53 * hash) + getSearchCapabilitySetting().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.Corpus parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.Corpus 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.visionai.v1.Corpus parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.Corpus 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.visionai.v1.Corpus parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.Corpus parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.Corpus parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.Corpus 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.visionai.v1.Corpus parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.Corpus 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.visionai.v1.Corpus parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.Corpus 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.visionai.v1.Corpus 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; + } + /** + * + * + *
+   * Corpus is a set of media contents for management.
+   * Within a corpus, media shares the same data schema. Search is also restricted
+   * within a single corpus.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.Corpus} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.Corpus) + com.google.cloud.visionai.v1.CorpusOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_Corpus_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_Corpus_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.Corpus.class, + com.google.cloud.visionai.v1.Corpus.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.Corpus.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getDefaultTtlFieldBuilder(); + getSearchCapabilitySettingFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + displayName_ = ""; + description_ = ""; + defaultTtl_ = null; + if (defaultTtlBuilder_ != null) { + defaultTtlBuilder_.dispose(); + defaultTtlBuilder_ = null; + } + type_ = 0; + searchCapabilitySetting_ = null; + if (searchCapabilitySettingBuilder_ != null) { + searchCapabilitySettingBuilder_.dispose(); + searchCapabilitySettingBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_Corpus_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.Corpus getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.Corpus.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.Corpus build() { + com.google.cloud.visionai.v1.Corpus result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.Corpus buildPartial() { + com.google.cloud.visionai.v1.Corpus result = new com.google.cloud.visionai.v1.Corpus(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.visionai.v1.Corpus result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.displayName_ = displayName_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.description_ = description_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000008) != 0)) { + result.defaultTtl_ = defaultTtlBuilder_ == null ? defaultTtl_ : defaultTtlBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.type_ = type_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.searchCapabilitySetting_ = + searchCapabilitySettingBuilder_ == null + ? searchCapabilitySetting_ + : searchCapabilitySettingBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.Corpus) { + return mergeFrom((com.google.cloud.visionai.v1.Corpus) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.Corpus other) { + if (other == com.google.cloud.visionai.v1.Corpus.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getDisplayName().isEmpty()) { + displayName_ = other.displayName_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (other.hasDefaultTtl()) { + mergeDefaultTtl(other.getDefaultTtl()); + } + if (other.type_ != 0) { + setTypeValue(other.getTypeValue()); + } + if (other.hasSearchCapabilitySetting()) { + mergeSearchCapabilitySetting(other.getSearchCapabilitySetting()); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + displayName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 42: + { + input.readMessage(getDefaultTtlFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 42 + case 56: + { + type_ = input.readEnum(); + bitField0_ |= 0x00000010; + break; + } // case 56 + case 66: + { + input.readMessage( + getSearchCapabilitySettingFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000020; + break; + } // case 66 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Resource name of the corpus.
+     * Format:
+     * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}`
+     * 
+ * + * string name = 1; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Resource name of the corpus.
+     * Format:
+     * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}`
+     * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Resource name of the corpus.
+     * Format:
+     * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}`
+     * 
+ * + * string name = 1; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Resource name of the corpus.
+     * Format:
+     * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}`
+     * 
+ * + * string name = 1; + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Resource name of the corpus.
+     * Format:
+     * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}`
+     * 
+ * + * string name = 1; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object displayName_ = ""; + /** + * + * + *
+     * Required. The corpus name to shown in the UI. The name can be up to 32
+     * characters long.
+     * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The displayName. + */ + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The corpus name to shown in the UI. The name can be up to 32
+     * characters long.
+     * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for displayName. + */ + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The corpus name to shown in the UI. The name can be up to 32
+     * characters long.
+     * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + displayName_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The corpus name to shown in the UI. The name can be up to 32
+     * characters long.
+     * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearDisplayName() { + displayName_ = getDefaultInstance().getDisplayName(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The corpus name to shown in the UI. The name can be up to 32
+     * characters long.
+     * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + displayName_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object description_ = ""; + /** + * + * + *
+     * Optional. Description of the corpus. Can be up to 25000 characters long.
+     * 
+ * + * string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The description. + */ + 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; + } + } + /** + * + * + *
+     * Optional. Description of the corpus. Can be up to 25000 characters long.
+     * 
+ * + * string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for description. + */ + 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; + } + } + /** + * + * + *
+     * Optional. Description of the corpus. Can be up to 25000 characters long.
+     * 
+ * + * string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The description to set. + * @return This builder for chaining. + */ + public Builder setDescription(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + description_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Description of the corpus. Can be up to 25000 characters long.
+     * 
+ * + * string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearDescription() { + description_ = getDefaultInstance().getDescription(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Description of the corpus. Can be up to 25000 characters long.
+     * 
+ * + * string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for description to set. + * @return This builder for chaining. + */ + public Builder setDescriptionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + description_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private com.google.protobuf.Duration defaultTtl_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + defaultTtlBuilder_; + /** + * + * + *
+     * Optional. The default TTL value for all assets under the corpus without a
+     * asset level user-defined TTL. For STREAM_VIDEO type corpora, this is
+     * required and the maximum allowed
+     *   default_ttl is 10 years.
+     * 
+ * + * .google.protobuf.Duration default_ttl = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the defaultTtl field is set. + */ + public boolean hasDefaultTtl() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + * + * + *
+     * Optional. The default TTL value for all assets under the corpus without a
+     * asset level user-defined TTL. For STREAM_VIDEO type corpora, this is
+     * required and the maximum allowed
+     *   default_ttl is 10 years.
+     * 
+ * + * .google.protobuf.Duration default_ttl = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The defaultTtl. + */ + public com.google.protobuf.Duration getDefaultTtl() { + if (defaultTtlBuilder_ == null) { + return defaultTtl_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : defaultTtl_; + } else { + return defaultTtlBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Optional. The default TTL value for all assets under the corpus without a
+     * asset level user-defined TTL. For STREAM_VIDEO type corpora, this is
+     * required and the maximum allowed
+     *   default_ttl is 10 years.
+     * 
+ * + * .google.protobuf.Duration default_ttl = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setDefaultTtl(com.google.protobuf.Duration value) { + if (defaultTtlBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + defaultTtl_ = value; + } else { + defaultTtlBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The default TTL value for all assets under the corpus without a
+     * asset level user-defined TTL. For STREAM_VIDEO type corpora, this is
+     * required and the maximum allowed
+     *   default_ttl is 10 years.
+     * 
+ * + * .google.protobuf.Duration default_ttl = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setDefaultTtl(com.google.protobuf.Duration.Builder builderForValue) { + if (defaultTtlBuilder_ == null) { + defaultTtl_ = builderForValue.build(); + } else { + defaultTtlBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The default TTL value for all assets under the corpus without a
+     * asset level user-defined TTL. For STREAM_VIDEO type corpora, this is
+     * required and the maximum allowed
+     *   default_ttl is 10 years.
+     * 
+ * + * .google.protobuf.Duration default_ttl = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeDefaultTtl(com.google.protobuf.Duration value) { + if (defaultTtlBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) + && defaultTtl_ != null + && defaultTtl_ != com.google.protobuf.Duration.getDefaultInstance()) { + getDefaultTtlBuilder().mergeFrom(value); + } else { + defaultTtl_ = value; + } + } else { + defaultTtlBuilder_.mergeFrom(value); + } + if (defaultTtl_ != null) { + bitField0_ |= 0x00000008; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Optional. The default TTL value for all assets under the corpus without a
+     * asset level user-defined TTL. For STREAM_VIDEO type corpora, this is
+     * required and the maximum allowed
+     *   default_ttl is 10 years.
+     * 
+ * + * .google.protobuf.Duration default_ttl = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearDefaultTtl() { + bitField0_ = (bitField0_ & ~0x00000008); + defaultTtl_ = null; + if (defaultTtlBuilder_ != null) { + defaultTtlBuilder_.dispose(); + defaultTtlBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The default TTL value for all assets under the corpus without a
+     * asset level user-defined TTL. For STREAM_VIDEO type corpora, this is
+     * required and the maximum allowed
+     *   default_ttl is 10 years.
+     * 
+ * + * .google.protobuf.Duration default_ttl = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.Duration.Builder getDefaultTtlBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return getDefaultTtlFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Optional. The default TTL value for all assets under the corpus without a
+     * asset level user-defined TTL. For STREAM_VIDEO type corpora, this is
+     * required and the maximum allowed
+     *   default_ttl is 10 years.
+     * 
+ * + * .google.protobuf.Duration default_ttl = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.DurationOrBuilder getDefaultTtlOrBuilder() { + if (defaultTtlBuilder_ != null) { + return defaultTtlBuilder_.getMessageOrBuilder(); + } else { + return defaultTtl_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : defaultTtl_; + } + } + /** + * + * + *
+     * Optional. The default TTL value for all assets under the corpus without a
+     * asset level user-defined TTL. For STREAM_VIDEO type corpora, this is
+     * required and the maximum allowed
+     *   default_ttl is 10 years.
+     * 
+ * + * .google.protobuf.Duration default_ttl = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + getDefaultTtlFieldBuilder() { + if (defaultTtlBuilder_ == null) { + defaultTtlBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder>( + getDefaultTtl(), getParentForChildren(), isClean()); + defaultTtl_ = null; + } + return defaultTtlBuilder_; + } + + private int type_ = 0; + /** + * + * + *
+     * Optional. Type of the asset inside corpus.
+     * 
+ * + * + * .google.cloud.visionai.v1.Corpus.Type type = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for type. + */ + @java.lang.Override + public int getTypeValue() { + return type_; + } + /** + * + * + *
+     * Optional. Type of the asset inside corpus.
+     * 
+ * + * + * .google.cloud.visionai.v1.Corpus.Type type = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The enum numeric value on the wire for type to set. + * @return This builder for chaining. + */ + public Builder setTypeValue(int value) { + type_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Type of the asset inside corpus.
+     * 
+ * + * + * .google.cloud.visionai.v1.Corpus.Type type = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The type. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.Corpus.Type getType() { + com.google.cloud.visionai.v1.Corpus.Type result = + com.google.cloud.visionai.v1.Corpus.Type.forNumber(type_); + return result == null ? com.google.cloud.visionai.v1.Corpus.Type.UNRECOGNIZED : result; + } + /** + * + * + *
+     * Optional. Type of the asset inside corpus.
+     * 
+ * + * + * .google.cloud.visionai.v1.Corpus.Type type = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The type to set. + * @return This builder for chaining. + */ + public Builder setType(com.google.cloud.visionai.v1.Corpus.Type value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000010; + type_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Type of the asset inside corpus.
+     * 
+ * + * + * .google.cloud.visionai.v1.Corpus.Type type = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearType() { + bitField0_ = (bitField0_ & ~0x00000010); + type_ = 0; + onChanged(); + return this; + } + + private com.google.cloud.visionai.v1.SearchCapabilitySetting searchCapabilitySetting_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.SearchCapabilitySetting, + com.google.cloud.visionai.v1.SearchCapabilitySetting.Builder, + com.google.cloud.visionai.v1.SearchCapabilitySettingOrBuilder> + searchCapabilitySettingBuilder_; + /** + * + * + *
+     * Default search capability setting on corpus level.
+     * 
+ * + * .google.cloud.visionai.v1.SearchCapabilitySetting search_capability_setting = 8; + * + * @return Whether the searchCapabilitySetting field is set. + */ + public boolean hasSearchCapabilitySetting() { + return ((bitField0_ & 0x00000020) != 0); + } + /** + * + * + *
+     * Default search capability setting on corpus level.
+     * 
+ * + * .google.cloud.visionai.v1.SearchCapabilitySetting search_capability_setting = 8; + * + * @return The searchCapabilitySetting. + */ + public com.google.cloud.visionai.v1.SearchCapabilitySetting getSearchCapabilitySetting() { + if (searchCapabilitySettingBuilder_ == null) { + return searchCapabilitySetting_ == null + ? com.google.cloud.visionai.v1.SearchCapabilitySetting.getDefaultInstance() + : searchCapabilitySetting_; + } else { + return searchCapabilitySettingBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Default search capability setting on corpus level.
+     * 
+ * + * .google.cloud.visionai.v1.SearchCapabilitySetting search_capability_setting = 8; + */ + public Builder setSearchCapabilitySetting( + com.google.cloud.visionai.v1.SearchCapabilitySetting value) { + if (searchCapabilitySettingBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + searchCapabilitySetting_ = value; + } else { + searchCapabilitySettingBuilder_.setMessage(value); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * Default search capability setting on corpus level.
+     * 
+ * + * .google.cloud.visionai.v1.SearchCapabilitySetting search_capability_setting = 8; + */ + public Builder setSearchCapabilitySetting( + com.google.cloud.visionai.v1.SearchCapabilitySetting.Builder builderForValue) { + if (searchCapabilitySettingBuilder_ == null) { + searchCapabilitySetting_ = builderForValue.build(); + } else { + searchCapabilitySettingBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * Default search capability setting on corpus level.
+     * 
+ * + * .google.cloud.visionai.v1.SearchCapabilitySetting search_capability_setting = 8; + */ + public Builder mergeSearchCapabilitySetting( + com.google.cloud.visionai.v1.SearchCapabilitySetting value) { + if (searchCapabilitySettingBuilder_ == null) { + if (((bitField0_ & 0x00000020) != 0) + && searchCapabilitySetting_ != null + && searchCapabilitySetting_ + != com.google.cloud.visionai.v1.SearchCapabilitySetting.getDefaultInstance()) { + getSearchCapabilitySettingBuilder().mergeFrom(value); + } else { + searchCapabilitySetting_ = value; + } + } else { + searchCapabilitySettingBuilder_.mergeFrom(value); + } + if (searchCapabilitySetting_ != null) { + bitField0_ |= 0x00000020; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Default search capability setting on corpus level.
+     * 
+ * + * .google.cloud.visionai.v1.SearchCapabilitySetting search_capability_setting = 8; + */ + public Builder clearSearchCapabilitySetting() { + bitField0_ = (bitField0_ & ~0x00000020); + searchCapabilitySetting_ = null; + if (searchCapabilitySettingBuilder_ != null) { + searchCapabilitySettingBuilder_.dispose(); + searchCapabilitySettingBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Default search capability setting on corpus level.
+     * 
+ * + * .google.cloud.visionai.v1.SearchCapabilitySetting search_capability_setting = 8; + */ + public com.google.cloud.visionai.v1.SearchCapabilitySetting.Builder + getSearchCapabilitySettingBuilder() { + bitField0_ |= 0x00000020; + onChanged(); + return getSearchCapabilitySettingFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Default search capability setting on corpus level.
+     * 
+ * + * .google.cloud.visionai.v1.SearchCapabilitySetting search_capability_setting = 8; + */ + public com.google.cloud.visionai.v1.SearchCapabilitySettingOrBuilder + getSearchCapabilitySettingOrBuilder() { + if (searchCapabilitySettingBuilder_ != null) { + return searchCapabilitySettingBuilder_.getMessageOrBuilder(); + } else { + return searchCapabilitySetting_ == null + ? com.google.cloud.visionai.v1.SearchCapabilitySetting.getDefaultInstance() + : searchCapabilitySetting_; + } + } + /** + * + * + *
+     * Default search capability setting on corpus level.
+     * 
+ * + * .google.cloud.visionai.v1.SearchCapabilitySetting search_capability_setting = 8; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.SearchCapabilitySetting, + com.google.cloud.visionai.v1.SearchCapabilitySetting.Builder, + com.google.cloud.visionai.v1.SearchCapabilitySettingOrBuilder> + getSearchCapabilitySettingFieldBuilder() { + if (searchCapabilitySettingBuilder_ == null) { + searchCapabilitySettingBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.SearchCapabilitySetting, + com.google.cloud.visionai.v1.SearchCapabilitySetting.Builder, + com.google.cloud.visionai.v1.SearchCapabilitySettingOrBuilder>( + getSearchCapabilitySetting(), getParentForChildren(), isClean()); + searchCapabilitySetting_ = null; + } + return searchCapabilitySettingBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.Corpus) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.Corpus) + private static final com.google.cloud.visionai.v1.Corpus DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.Corpus(); + } + + public static com.google.cloud.visionai.v1.Corpus getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Corpus parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.Corpus getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/CorpusName.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/CorpusName.java new file mode 100644 index 000000000000..c18d52d311c3 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/CorpusName.java @@ -0,0 +1,227 @@ +/* + * Copyright 2024 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.visionai.v1; + +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") +public class CorpusName implements ResourceName { + private static final PathTemplate PROJECT_NUMBER_LOCATION_CORPUS = + PathTemplate.createWithoutUrlEncoding( + "projects/{project_number}/locations/{location}/corpora/{corpus}"); + private volatile Map fieldValuesMap; + private final String projectNumber; + private final String location; + private final String corpus; + + @Deprecated + protected CorpusName() { + projectNumber = null; + location = null; + corpus = null; + } + + private CorpusName(Builder builder) { + projectNumber = Preconditions.checkNotNull(builder.getProjectNumber()); + location = Preconditions.checkNotNull(builder.getLocation()); + corpus = Preconditions.checkNotNull(builder.getCorpus()); + } + + public String getProjectNumber() { + return projectNumber; + } + + public String getLocation() { + return location; + } + + public String getCorpus() { + return corpus; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static CorpusName of(String projectNumber, String location, String corpus) { + return newBuilder() + .setProjectNumber(projectNumber) + .setLocation(location) + .setCorpus(corpus) + .build(); + } + + public static String format(String projectNumber, String location, String corpus) { + return newBuilder() + .setProjectNumber(projectNumber) + .setLocation(location) + .setCorpus(corpus) + .build() + .toString(); + } + + public static CorpusName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_NUMBER_LOCATION_CORPUS.validatedMatch( + formattedString, "CorpusName.parse: formattedString not in valid format"); + return of(matchMap.get("project_number"), matchMap.get("location"), matchMap.get("corpus")); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List values) { + List list = new ArrayList<>(values.size()); + for (CorpusName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_NUMBER_LOCATION_CORPUS.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (projectNumber != null) { + fieldMapBuilder.put("project_number", projectNumber); + } + if (location != null) { + fieldMapBuilder.put("location", location); + } + if (corpus != null) { + fieldMapBuilder.put("corpus", corpus); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_NUMBER_LOCATION_CORPUS.instantiate( + "project_number", projectNumber, "location", location, "corpus", corpus); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null && getClass() == o.getClass()) { + CorpusName that = ((CorpusName) o); + return Objects.equals(this.projectNumber, that.projectNumber) + && Objects.equals(this.location, that.location) + && Objects.equals(this.corpus, that.corpus); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(projectNumber); + h *= 1000003; + h ^= Objects.hashCode(location); + h *= 1000003; + h ^= Objects.hashCode(corpus); + return h; + } + + /** Builder for projects/{project_number}/locations/{location}/corpora/{corpus}. */ + public static class Builder { + private String projectNumber; + private String location; + private String corpus; + + protected Builder() {} + + public String getProjectNumber() { + return projectNumber; + } + + public String getLocation() { + return location; + } + + public String getCorpus() { + return corpus; + } + + public Builder setProjectNumber(String projectNumber) { + this.projectNumber = projectNumber; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setCorpus(String corpus) { + this.corpus = corpus; + return this; + } + + private Builder(CorpusName corpusName) { + this.projectNumber = corpusName.projectNumber; + this.location = corpusName.location; + this.corpus = corpusName.corpus; + } + + public CorpusName build() { + return new CorpusName(this); + } + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/CorpusOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/CorpusOrBuilder.java new file mode 100644 index 000000000000..430f664f6c55 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/CorpusOrBuilder.java @@ -0,0 +1,217 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/warehouse.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface CorpusOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.Corpus) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Resource name of the corpus.
+   * Format:
+   * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}`
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Resource name of the corpus.
+   * Format:
+   * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}`
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Required. The corpus name to shown in the UI. The name can be up to 32
+   * characters long.
+   * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The displayName. + */ + java.lang.String getDisplayName(); + /** + * + * + *
+   * Required. The corpus name to shown in the UI. The name can be up to 32
+   * characters long.
+   * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for displayName. + */ + com.google.protobuf.ByteString getDisplayNameBytes(); + + /** + * + * + *
+   * Optional. Description of the corpus. Can be up to 25000 characters long.
+   * 
+ * + * string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The description. + */ + java.lang.String getDescription(); + /** + * + * + *
+   * Optional. Description of the corpus. Can be up to 25000 characters long.
+   * 
+ * + * string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for description. + */ + com.google.protobuf.ByteString getDescriptionBytes(); + + /** + * + * + *
+   * Optional. The default TTL value for all assets under the corpus without a
+   * asset level user-defined TTL. For STREAM_VIDEO type corpora, this is
+   * required and the maximum allowed
+   *   default_ttl is 10 years.
+   * 
+ * + * .google.protobuf.Duration default_ttl = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the defaultTtl field is set. + */ + boolean hasDefaultTtl(); + /** + * + * + *
+   * Optional. The default TTL value for all assets under the corpus without a
+   * asset level user-defined TTL. For STREAM_VIDEO type corpora, this is
+   * required and the maximum allowed
+   *   default_ttl is 10 years.
+   * 
+ * + * .google.protobuf.Duration default_ttl = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The defaultTtl. + */ + com.google.protobuf.Duration getDefaultTtl(); + /** + * + * + *
+   * Optional. The default TTL value for all assets under the corpus without a
+   * asset level user-defined TTL. For STREAM_VIDEO type corpora, this is
+   * required and the maximum allowed
+   *   default_ttl is 10 years.
+   * 
+ * + * .google.protobuf.Duration default_ttl = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.protobuf.DurationOrBuilder getDefaultTtlOrBuilder(); + + /** + * + * + *
+   * Optional. Type of the asset inside corpus.
+   * 
+ * + * .google.cloud.visionai.v1.Corpus.Type type = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for type. + */ + int getTypeValue(); + /** + * + * + *
+   * Optional. Type of the asset inside corpus.
+   * 
+ * + * .google.cloud.visionai.v1.Corpus.Type type = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The type. + */ + com.google.cloud.visionai.v1.Corpus.Type getType(); + + /** + * + * + *
+   * Default search capability setting on corpus level.
+   * 
+ * + * .google.cloud.visionai.v1.SearchCapabilitySetting search_capability_setting = 8; + * + * @return Whether the searchCapabilitySetting field is set. + */ + boolean hasSearchCapabilitySetting(); + /** + * + * + *
+   * Default search capability setting on corpus level.
+   * 
+ * + * .google.cloud.visionai.v1.SearchCapabilitySetting search_capability_setting = 8; + * + * @return The searchCapabilitySetting. + */ + com.google.cloud.visionai.v1.SearchCapabilitySetting getSearchCapabilitySetting(); + /** + * + * + *
+   * Default search capability setting on corpus level.
+   * 
+ * + * .google.cloud.visionai.v1.SearchCapabilitySetting search_capability_setting = 8; + */ + com.google.cloud.visionai.v1.SearchCapabilitySettingOrBuilder + getSearchCapabilitySettingOrBuilder(); +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/CreateAnalysisRequest.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/CreateAnalysisRequest.java new file mode 100644 index 000000000000..f1bd47f66751 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/CreateAnalysisRequest.java @@ -0,0 +1,1390 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/lva_service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * Message for creating an Analysis.
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.CreateAnalysisRequest} + */ +public final class CreateAnalysisRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.CreateAnalysisRequest) + CreateAnalysisRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use CreateAnalysisRequest.newBuilder() to construct. + private CreateAnalysisRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CreateAnalysisRequest() { + parent_ = ""; + analysisId_ = ""; + requestId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CreateAnalysisRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.LvaServiceProto + .internal_static_google_cloud_visionai_v1_CreateAnalysisRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.LvaServiceProto + .internal_static_google_cloud_visionai_v1_CreateAnalysisRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.CreateAnalysisRequest.class, + com.google.cloud.visionai.v1.CreateAnalysisRequest.Builder.class); + } + + private int bitField0_; + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + /** + * + * + *
+   * Required. Value for parent.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + 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(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Value for parent.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ANALYSIS_ID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object analysisId_ = ""; + /** + * + * + *
+   * Required. Id of the requesting object.
+   * 
+ * + * string analysis_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The analysisId. + */ + @java.lang.Override + public java.lang.String getAnalysisId() { + java.lang.Object ref = analysisId_; + 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(); + analysisId_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Id of the requesting object.
+   * 
+ * + * string analysis_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for analysisId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getAnalysisIdBytes() { + java.lang.Object ref = analysisId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + analysisId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ANALYSIS_FIELD_NUMBER = 3; + private com.google.cloud.visionai.v1.Analysis analysis_; + /** + * + * + *
+   * Required. The resource being created.
+   * 
+ * + * + * .google.cloud.visionai.v1.Analysis analysis = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the analysis field is set. + */ + @java.lang.Override + public boolean hasAnalysis() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * Required. The resource being created.
+   * 
+ * + * + * .google.cloud.visionai.v1.Analysis analysis = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The analysis. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.Analysis getAnalysis() { + return analysis_ == null + ? com.google.cloud.visionai.v1.Analysis.getDefaultInstance() + : analysis_; + } + /** + * + * + *
+   * Required. The resource being created.
+   * 
+ * + * + * .google.cloud.visionai.v1.Analysis analysis = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.visionai.v1.AnalysisOrBuilder getAnalysisOrBuilder() { + return analysis_ == null + ? com.google.cloud.visionai.v1.Analysis.getDefaultInstance() + : analysis_; + } + + public static final int REQUEST_ID_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object requestId_ = ""; + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request ID,
+   * the server can check if original operation with the same request ID was
+   * received, and if so, will ignore the second request. This prevents clients
+   * from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + @java.lang.Override + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + 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(); + requestId_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request ID,
+   * the server can check if original operation with the same request ID was
+   * received, and if so, will ignore the second request. This prevents clients
+   * from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(analysisId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, analysisId_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(3, getAnalysis()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, requestId_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(analysisId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, analysisId_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getAnalysis()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, requestId_); + } + size += getUnknownFields().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.visionai.v1.CreateAnalysisRequest)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.CreateAnalysisRequest other = + (com.google.cloud.visionai.v1.CreateAnalysisRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (!getAnalysisId().equals(other.getAnalysisId())) return false; + if (hasAnalysis() != other.hasAnalysis()) return false; + if (hasAnalysis()) { + if (!getAnalysis().equals(other.getAnalysis())) return false; + } + if (!getRequestId().equals(other.getRequestId())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + ANALYSIS_ID_FIELD_NUMBER; + hash = (53 * hash) + getAnalysisId().hashCode(); + if (hasAnalysis()) { + hash = (37 * hash) + ANALYSIS_FIELD_NUMBER; + hash = (53 * hash) + getAnalysis().hashCode(); + } + hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; + hash = (53 * hash) + getRequestId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.CreateAnalysisRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.CreateAnalysisRequest 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.visionai.v1.CreateAnalysisRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.CreateAnalysisRequest 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.visionai.v1.CreateAnalysisRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.CreateAnalysisRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.CreateAnalysisRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.CreateAnalysisRequest 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.visionai.v1.CreateAnalysisRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.CreateAnalysisRequest 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.visionai.v1.CreateAnalysisRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.CreateAnalysisRequest 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.visionai.v1.CreateAnalysisRequest 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; + } + /** + * + * + *
+   * Message for creating an Analysis.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.CreateAnalysisRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.CreateAnalysisRequest) + com.google.cloud.visionai.v1.CreateAnalysisRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.LvaServiceProto + .internal_static_google_cloud_visionai_v1_CreateAnalysisRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.LvaServiceProto + .internal_static_google_cloud_visionai_v1_CreateAnalysisRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.CreateAnalysisRequest.class, + com.google.cloud.visionai.v1.CreateAnalysisRequest.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.CreateAnalysisRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getAnalysisFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + analysisId_ = ""; + analysis_ = null; + if (analysisBuilder_ != null) { + analysisBuilder_.dispose(); + analysisBuilder_ = null; + } + requestId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.LvaServiceProto + .internal_static_google_cloud_visionai_v1_CreateAnalysisRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.CreateAnalysisRequest getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.CreateAnalysisRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.CreateAnalysisRequest build() { + com.google.cloud.visionai.v1.CreateAnalysisRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.CreateAnalysisRequest buildPartial() { + com.google.cloud.visionai.v1.CreateAnalysisRequest result = + new com.google.cloud.visionai.v1.CreateAnalysisRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.visionai.v1.CreateAnalysisRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.analysisId_ = analysisId_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.analysis_ = analysisBuilder_ == null ? analysis_ : analysisBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.requestId_ = requestId_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.CreateAnalysisRequest) { + return mergeFrom((com.google.cloud.visionai.v1.CreateAnalysisRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.CreateAnalysisRequest other) { + if (other == com.google.cloud.visionai.v1.CreateAnalysisRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getAnalysisId().isEmpty()) { + analysisId_ = other.analysisId_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.hasAnalysis()) { + mergeAnalysis(other.getAnalysis()); + } + if (!other.getRequestId().isEmpty()) { + requestId_ = other.requestId_; + bitField0_ |= 0x00000008; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + analysisId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage(getAnalysisFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. Value for parent.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Value for parent.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Value for parent.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Value for parent.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Value for parent.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object analysisId_ = ""; + /** + * + * + *
+     * Required. Id of the requesting object.
+     * 
+ * + * string analysis_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The analysisId. + */ + public java.lang.String getAnalysisId() { + java.lang.Object ref = analysisId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + analysisId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Id of the requesting object.
+     * 
+ * + * string analysis_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for analysisId. + */ + public com.google.protobuf.ByteString getAnalysisIdBytes() { + java.lang.Object ref = analysisId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + analysisId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Id of the requesting object.
+     * 
+ * + * string analysis_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The analysisId to set. + * @return This builder for chaining. + */ + public Builder setAnalysisId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + analysisId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Id of the requesting object.
+     * 
+ * + * string analysis_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearAnalysisId() { + analysisId_ = getDefaultInstance().getAnalysisId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Id of the requesting object.
+     * 
+ * + * string analysis_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for analysisId to set. + * @return This builder for chaining. + */ + public Builder setAnalysisIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + analysisId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.cloud.visionai.v1.Analysis analysis_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.Analysis, + com.google.cloud.visionai.v1.Analysis.Builder, + com.google.cloud.visionai.v1.AnalysisOrBuilder> + analysisBuilder_; + /** + * + * + *
+     * Required. The resource being created.
+     * 
+ * + * + * .google.cloud.visionai.v1.Analysis analysis = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the analysis field is set. + */ + public boolean hasAnalysis() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+     * Required. The resource being created.
+     * 
+ * + * + * .google.cloud.visionai.v1.Analysis analysis = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The analysis. + */ + public com.google.cloud.visionai.v1.Analysis getAnalysis() { + if (analysisBuilder_ == null) { + return analysis_ == null + ? com.google.cloud.visionai.v1.Analysis.getDefaultInstance() + : analysis_; + } else { + return analysisBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The resource being created.
+     * 
+ * + * + * .google.cloud.visionai.v1.Analysis analysis = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setAnalysis(com.google.cloud.visionai.v1.Analysis value) { + if (analysisBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + analysis_ = value; + } else { + analysisBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource being created.
+     * 
+ * + * + * .google.cloud.visionai.v1.Analysis analysis = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setAnalysis(com.google.cloud.visionai.v1.Analysis.Builder builderForValue) { + if (analysisBuilder_ == null) { + analysis_ = builderForValue.build(); + } else { + analysisBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource being created.
+     * 
+ * + * + * .google.cloud.visionai.v1.Analysis analysis = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeAnalysis(com.google.cloud.visionai.v1.Analysis value) { + if (analysisBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && analysis_ != null + && analysis_ != com.google.cloud.visionai.v1.Analysis.getDefaultInstance()) { + getAnalysisBuilder().mergeFrom(value); + } else { + analysis_ = value; + } + } else { + analysisBuilder_.mergeFrom(value); + } + if (analysis_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Required. The resource being created.
+     * 
+ * + * + * .google.cloud.visionai.v1.Analysis analysis = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearAnalysis() { + bitField0_ = (bitField0_ & ~0x00000004); + analysis_ = null; + if (analysisBuilder_ != null) { + analysisBuilder_.dispose(); + analysisBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource being created.
+     * 
+ * + * + * .google.cloud.visionai.v1.Analysis analysis = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.visionai.v1.Analysis.Builder getAnalysisBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getAnalysisFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The resource being created.
+     * 
+ * + * + * .google.cloud.visionai.v1.Analysis analysis = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.visionai.v1.AnalysisOrBuilder getAnalysisOrBuilder() { + if (analysisBuilder_ != null) { + return analysisBuilder_.getMessageOrBuilder(); + } else { + return analysis_ == null + ? com.google.cloud.visionai.v1.Analysis.getDefaultInstance() + : analysis_; + } + } + /** + * + * + *
+     * Required. The resource being created.
+     * 
+ * + * + * .google.cloud.visionai.v1.Analysis analysis = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.Analysis, + com.google.cloud.visionai.v1.Analysis.Builder, + com.google.cloud.visionai.v1.AnalysisOrBuilder> + getAnalysisFieldBuilder() { + if (analysisBuilder_ == null) { + analysisBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.Analysis, + com.google.cloud.visionai.v1.Analysis.Builder, + com.google.cloud.visionai.v1.AnalysisOrBuilder>( + getAnalysis(), getParentForChildren(), isClean()); + analysis_ = null; + } + return analysisBuilder_; + } + + private java.lang.Object requestId_ = ""; + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request ID,
+     * the server can check if original operation with the same request ID was
+     * received, and if so, will ignore the second request. This prevents clients
+     * from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request ID,
+     * the server can check if original operation with the same request ID was
+     * received, and if so, will ignore the second request. This prevents clients
+     * from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request ID,
+     * the server can check if original operation with the same request ID was
+     * received, and if so, will ignore the second request. This prevents clients
+     * from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + requestId_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request ID,
+     * the server can check if original operation with the same request ID was
+     * received, and if so, will ignore the second request. This prevents clients
+     * from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearRequestId() { + requestId_ = getDefaultInstance().getRequestId(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request ID,
+     * the server can check if original operation with the same request ID was
+     * received, and if so, will ignore the second request. This prevents clients
+     * from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + requestId_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.CreateAnalysisRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.CreateAnalysisRequest) + private static final com.google.cloud.visionai.v1.CreateAnalysisRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.CreateAnalysisRequest(); + } + + public static com.google.cloud.visionai.v1.CreateAnalysisRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateAnalysisRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.CreateAnalysisRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/CreateAnalysisRequestOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/CreateAnalysisRequestOrBuilder.java new file mode 100644 index 000000000000..ad7f37f9ddcb --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/CreateAnalysisRequestOrBuilder.java @@ -0,0 +1,170 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/lva_service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface CreateAnalysisRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.CreateAnalysisRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Value for parent.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. Value for parent.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Required. Id of the requesting object.
+   * 
+ * + * string analysis_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The analysisId. + */ + java.lang.String getAnalysisId(); + /** + * + * + *
+   * Required. Id of the requesting object.
+   * 
+ * + * string analysis_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for analysisId. + */ + com.google.protobuf.ByteString getAnalysisIdBytes(); + + /** + * + * + *
+   * Required. The resource being created.
+   * 
+ * + * + * .google.cloud.visionai.v1.Analysis analysis = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the analysis field is set. + */ + boolean hasAnalysis(); + /** + * + * + *
+   * Required. The resource being created.
+   * 
+ * + * + * .google.cloud.visionai.v1.Analysis analysis = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The analysis. + */ + com.google.cloud.visionai.v1.Analysis getAnalysis(); + /** + * + * + *
+   * Required. The resource being created.
+   * 
+ * + * + * .google.cloud.visionai.v1.Analysis analysis = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.visionai.v1.AnalysisOrBuilder getAnalysisOrBuilder(); + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request ID,
+   * the server can check if original operation with the same request ID was
+   * received, and if so, will ignore the second request. This prevents clients
+   * from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + java.lang.String getRequestId(); + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request ID,
+   * the server can check if original operation with the same request ID was
+   * received, and if so, will ignore the second request. This prevents clients
+   * from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + com.google.protobuf.ByteString getRequestIdBytes(); +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/CreateAnnotationRequest.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/CreateAnnotationRequest.java new file mode 100644 index 000000000000..4d710d5a89d7 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/CreateAnnotationRequest.java @@ -0,0 +1,1227 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/warehouse.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * Request message for CreateAnnotation.
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.CreateAnnotationRequest} + */ +public final class CreateAnnotationRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.CreateAnnotationRequest) + CreateAnnotationRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use CreateAnnotationRequest.newBuilder() to construct. + private CreateAnnotationRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CreateAnnotationRequest() { + parent_ = ""; + annotationId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CreateAnnotationRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_CreateAnnotationRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_CreateAnnotationRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.CreateAnnotationRequest.class, + com.google.cloud.visionai.v1.CreateAnnotationRequest.Builder.class); + } + + private int bitField0_; + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + /** + * + * + *
+   * Required. The parent resource where this annotation will be created.
+   * Format:
+   * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/assets/{asset_id}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + 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(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The parent resource where this annotation will be created.
+   * Format:
+   * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/assets/{asset_id}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ANNOTATION_FIELD_NUMBER = 2; + private com.google.cloud.visionai.v1.Annotation annotation_; + /** + * + * + *
+   * Required. The annotation to create.
+   * 
+ * + * + * .google.cloud.visionai.v1.Annotation annotation = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the annotation field is set. + */ + @java.lang.Override + public boolean hasAnnotation() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * Required. The annotation to create.
+   * 
+ * + * + * .google.cloud.visionai.v1.Annotation annotation = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The annotation. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.Annotation getAnnotation() { + return annotation_ == null + ? com.google.cloud.visionai.v1.Annotation.getDefaultInstance() + : annotation_; + } + /** + * + * + *
+   * Required. The annotation to create.
+   * 
+ * + * + * .google.cloud.visionai.v1.Annotation annotation = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.visionai.v1.AnnotationOrBuilder getAnnotationOrBuilder() { + return annotation_ == null + ? com.google.cloud.visionai.v1.Annotation.getDefaultInstance() + : annotation_; + } + + public static final int ANNOTATION_ID_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object annotationId_ = ""; + /** + * + * + *
+   * Optional. The ID to use for the annotation, which will become the final
+   * component of the annotation's resource name if user choose to specify.
+   * Otherwise, annotation id will be generated by system.
+   *
+   * This value should be up to 63 characters, and valid characters
+   * are /[a-z][0-9]-/. The first character must be a letter, the last could be
+   * a letter or a number.
+   * 
+ * + * optional string annotation_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the annotationId field is set. + */ + @java.lang.Override + public boolean hasAnnotationId() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+   * Optional. The ID to use for the annotation, which will become the final
+   * component of the annotation's resource name if user choose to specify.
+   * Otherwise, annotation id will be generated by system.
+   *
+   * This value should be up to 63 characters, and valid characters
+   * are /[a-z][0-9]-/. The first character must be a letter, the last could be
+   * a letter or a number.
+   * 
+ * + * optional string annotation_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The annotationId. + */ + @java.lang.Override + public java.lang.String getAnnotationId() { + java.lang.Object ref = annotationId_; + 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(); + annotationId_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. The ID to use for the annotation, which will become the final
+   * component of the annotation's resource name if user choose to specify.
+   * Otherwise, annotation id will be generated by system.
+   *
+   * This value should be up to 63 characters, and valid characters
+   * are /[a-z][0-9]-/. The first character must be a letter, the last could be
+   * a letter or a number.
+   * 
+ * + * optional string annotation_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for annotationId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getAnnotationIdBytes() { + java.lang.Object ref = annotationId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + annotationId_ = 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getAnnotation()); + } + if (((bitField0_ & 0x00000002) != 0)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, annotationId_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getAnnotation()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, annotationId_); + } + size += getUnknownFields().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.visionai.v1.CreateAnnotationRequest)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.CreateAnnotationRequest other = + (com.google.cloud.visionai.v1.CreateAnnotationRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (hasAnnotation() != other.hasAnnotation()) return false; + if (hasAnnotation()) { + if (!getAnnotation().equals(other.getAnnotation())) return false; + } + if (hasAnnotationId() != other.hasAnnotationId()) return false; + if (hasAnnotationId()) { + if (!getAnnotationId().equals(other.getAnnotationId())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + if (hasAnnotation()) { + hash = (37 * hash) + ANNOTATION_FIELD_NUMBER; + hash = (53 * hash) + getAnnotation().hashCode(); + } + if (hasAnnotationId()) { + hash = (37 * hash) + ANNOTATION_ID_FIELD_NUMBER; + hash = (53 * hash) + getAnnotationId().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.CreateAnnotationRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.CreateAnnotationRequest 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.visionai.v1.CreateAnnotationRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.CreateAnnotationRequest 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.visionai.v1.CreateAnnotationRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.CreateAnnotationRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.CreateAnnotationRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.CreateAnnotationRequest 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.visionai.v1.CreateAnnotationRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.CreateAnnotationRequest 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.visionai.v1.CreateAnnotationRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.CreateAnnotationRequest 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.visionai.v1.CreateAnnotationRequest 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; + } + /** + * + * + *
+   * Request message for CreateAnnotation.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.CreateAnnotationRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.CreateAnnotationRequest) + com.google.cloud.visionai.v1.CreateAnnotationRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_CreateAnnotationRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_CreateAnnotationRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.CreateAnnotationRequest.class, + com.google.cloud.visionai.v1.CreateAnnotationRequest.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.CreateAnnotationRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getAnnotationFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + annotation_ = null; + if (annotationBuilder_ != null) { + annotationBuilder_.dispose(); + annotationBuilder_ = null; + } + annotationId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_CreateAnnotationRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.CreateAnnotationRequest getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.CreateAnnotationRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.CreateAnnotationRequest build() { + com.google.cloud.visionai.v1.CreateAnnotationRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.CreateAnnotationRequest buildPartial() { + com.google.cloud.visionai.v1.CreateAnnotationRequest result = + new com.google.cloud.visionai.v1.CreateAnnotationRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.visionai.v1.CreateAnnotationRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.annotation_ = annotationBuilder_ == null ? annotation_ : annotationBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.annotationId_ = annotationId_; + to_bitField0_ |= 0x00000002; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.CreateAnnotationRequest) { + return mergeFrom((com.google.cloud.visionai.v1.CreateAnnotationRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.CreateAnnotationRequest other) { + if (other == com.google.cloud.visionai.v1.CreateAnnotationRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasAnnotation()) { + mergeAnnotation(other.getAnnotation()); + } + if (other.hasAnnotationId()) { + annotationId_ = other.annotationId_; + bitField0_ |= 0x00000004; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage(getAnnotationFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + annotationId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The parent resource where this annotation will be created.
+     * Format:
+     * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/assets/{asset_id}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The parent resource where this annotation will be created.
+     * Format:
+     * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/assets/{asset_id}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The parent resource where this annotation will be created.
+     * Format:
+     * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/assets/{asset_id}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The parent resource where this annotation will be created.
+     * Format:
+     * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/assets/{asset_id}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The parent resource where this annotation will be created.
+     * Format:
+     * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/assets/{asset_id}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.cloud.visionai.v1.Annotation annotation_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.Annotation, + com.google.cloud.visionai.v1.Annotation.Builder, + com.google.cloud.visionai.v1.AnnotationOrBuilder> + annotationBuilder_; + /** + * + * + *
+     * Required. The annotation to create.
+     * 
+ * + * + * .google.cloud.visionai.v1.Annotation annotation = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the annotation field is set. + */ + public boolean hasAnnotation() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * Required. The annotation to create.
+     * 
+ * + * + * .google.cloud.visionai.v1.Annotation annotation = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The annotation. + */ + public com.google.cloud.visionai.v1.Annotation getAnnotation() { + if (annotationBuilder_ == null) { + return annotation_ == null + ? com.google.cloud.visionai.v1.Annotation.getDefaultInstance() + : annotation_; + } else { + return annotationBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The annotation to create.
+     * 
+ * + * + * .google.cloud.visionai.v1.Annotation annotation = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setAnnotation(com.google.cloud.visionai.v1.Annotation value) { + if (annotationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + annotation_ = value; + } else { + annotationBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The annotation to create.
+     * 
+ * + * + * .google.cloud.visionai.v1.Annotation annotation = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setAnnotation(com.google.cloud.visionai.v1.Annotation.Builder builderForValue) { + if (annotationBuilder_ == null) { + annotation_ = builderForValue.build(); + } else { + annotationBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The annotation to create.
+     * 
+ * + * + * .google.cloud.visionai.v1.Annotation annotation = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeAnnotation(com.google.cloud.visionai.v1.Annotation value) { + if (annotationBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && annotation_ != null + && annotation_ != com.google.cloud.visionai.v1.Annotation.getDefaultInstance()) { + getAnnotationBuilder().mergeFrom(value); + } else { + annotation_ = value; + } + } else { + annotationBuilder_.mergeFrom(value); + } + if (annotation_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Required. The annotation to create.
+     * 
+ * + * + * .google.cloud.visionai.v1.Annotation annotation = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearAnnotation() { + bitField0_ = (bitField0_ & ~0x00000002); + annotation_ = null; + if (annotationBuilder_ != null) { + annotationBuilder_.dispose(); + annotationBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The annotation to create.
+     * 
+ * + * + * .google.cloud.visionai.v1.Annotation annotation = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.visionai.v1.Annotation.Builder getAnnotationBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getAnnotationFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The annotation to create.
+     * 
+ * + * + * .google.cloud.visionai.v1.Annotation annotation = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.visionai.v1.AnnotationOrBuilder getAnnotationOrBuilder() { + if (annotationBuilder_ != null) { + return annotationBuilder_.getMessageOrBuilder(); + } else { + return annotation_ == null + ? com.google.cloud.visionai.v1.Annotation.getDefaultInstance() + : annotation_; + } + } + /** + * + * + *
+     * Required. The annotation to create.
+     * 
+ * + * + * .google.cloud.visionai.v1.Annotation annotation = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.Annotation, + com.google.cloud.visionai.v1.Annotation.Builder, + com.google.cloud.visionai.v1.AnnotationOrBuilder> + getAnnotationFieldBuilder() { + if (annotationBuilder_ == null) { + annotationBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.Annotation, + com.google.cloud.visionai.v1.Annotation.Builder, + com.google.cloud.visionai.v1.AnnotationOrBuilder>( + getAnnotation(), getParentForChildren(), isClean()); + annotation_ = null; + } + return annotationBuilder_; + } + + private java.lang.Object annotationId_ = ""; + /** + * + * + *
+     * Optional. The ID to use for the annotation, which will become the final
+     * component of the annotation's resource name if user choose to specify.
+     * Otherwise, annotation id will be generated by system.
+     *
+     * This value should be up to 63 characters, and valid characters
+     * are /[a-z][0-9]-/. The first character must be a letter, the last could be
+     * a letter or a number.
+     * 
+ * + * optional string annotation_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the annotationId field is set. + */ + public boolean hasAnnotationId() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+     * Optional. The ID to use for the annotation, which will become the final
+     * component of the annotation's resource name if user choose to specify.
+     * Otherwise, annotation id will be generated by system.
+     *
+     * This value should be up to 63 characters, and valid characters
+     * are /[a-z][0-9]-/. The first character must be a letter, the last could be
+     * a letter or a number.
+     * 
+ * + * optional string annotation_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The annotationId. + */ + public java.lang.String getAnnotationId() { + java.lang.Object ref = annotationId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + annotationId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. The ID to use for the annotation, which will become the final
+     * component of the annotation's resource name if user choose to specify.
+     * Otherwise, annotation id will be generated by system.
+     *
+     * This value should be up to 63 characters, and valid characters
+     * are /[a-z][0-9]-/. The first character must be a letter, the last could be
+     * a letter or a number.
+     * 
+ * + * optional string annotation_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for annotationId. + */ + public com.google.protobuf.ByteString getAnnotationIdBytes() { + java.lang.Object ref = annotationId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + annotationId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. The ID to use for the annotation, which will become the final
+     * component of the annotation's resource name if user choose to specify.
+     * Otherwise, annotation id will be generated by system.
+     *
+     * This value should be up to 63 characters, and valid characters
+     * are /[a-z][0-9]-/. The first character must be a letter, the last could be
+     * a letter or a number.
+     * 
+ * + * optional string annotation_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The annotationId to set. + * @return This builder for chaining. + */ + public Builder setAnnotationId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + annotationId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The ID to use for the annotation, which will become the final
+     * component of the annotation's resource name if user choose to specify.
+     * Otherwise, annotation id will be generated by system.
+     *
+     * This value should be up to 63 characters, and valid characters
+     * are /[a-z][0-9]-/. The first character must be a letter, the last could be
+     * a letter or a number.
+     * 
+ * + * optional string annotation_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearAnnotationId() { + annotationId_ = getDefaultInstance().getAnnotationId(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The ID to use for the annotation, which will become the final
+     * component of the annotation's resource name if user choose to specify.
+     * Otherwise, annotation id will be generated by system.
+     *
+     * This value should be up to 63 characters, and valid characters
+     * are /[a-z][0-9]-/. The first character must be a letter, the last could be
+     * a letter or a number.
+     * 
+ * + * optional string annotation_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for annotationId to set. + * @return This builder for chaining. + */ + public Builder setAnnotationIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + annotationId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.CreateAnnotationRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.CreateAnnotationRequest) + private static final com.google.cloud.visionai.v1.CreateAnnotationRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.CreateAnnotationRequest(); + } + + public static com.google.cloud.visionai.v1.CreateAnnotationRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateAnnotationRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.CreateAnnotationRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/CreateAnnotationRequestOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/CreateAnnotationRequestOrBuilder.java new file mode 100644 index 000000000000..8ed71da49165 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/CreateAnnotationRequestOrBuilder.java @@ -0,0 +1,155 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/warehouse.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface CreateAnnotationRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.CreateAnnotationRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The parent resource where this annotation will be created.
+   * Format:
+   * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/assets/{asset_id}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The parent resource where this annotation will be created.
+   * Format:
+   * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/assets/{asset_id}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Required. The annotation to create.
+   * 
+ * + * + * .google.cloud.visionai.v1.Annotation annotation = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the annotation field is set. + */ + boolean hasAnnotation(); + /** + * + * + *
+   * Required. The annotation to create.
+   * 
+ * + * + * .google.cloud.visionai.v1.Annotation annotation = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The annotation. + */ + com.google.cloud.visionai.v1.Annotation getAnnotation(); + /** + * + * + *
+   * Required. The annotation to create.
+   * 
+ * + * + * .google.cloud.visionai.v1.Annotation annotation = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.visionai.v1.AnnotationOrBuilder getAnnotationOrBuilder(); + + /** + * + * + *
+   * Optional. The ID to use for the annotation, which will become the final
+   * component of the annotation's resource name if user choose to specify.
+   * Otherwise, annotation id will be generated by system.
+   *
+   * This value should be up to 63 characters, and valid characters
+   * are /[a-z][0-9]-/. The first character must be a letter, the last could be
+   * a letter or a number.
+   * 
+ * + * optional string annotation_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the annotationId field is set. + */ + boolean hasAnnotationId(); + /** + * + * + *
+   * Optional. The ID to use for the annotation, which will become the final
+   * component of the annotation's resource name if user choose to specify.
+   * Otherwise, annotation id will be generated by system.
+   *
+   * This value should be up to 63 characters, and valid characters
+   * are /[a-z][0-9]-/. The first character must be a letter, the last could be
+   * a letter or a number.
+   * 
+ * + * optional string annotation_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The annotationId. + */ + java.lang.String getAnnotationId(); + /** + * + * + *
+   * Optional. The ID to use for the annotation, which will become the final
+   * component of the annotation's resource name if user choose to specify.
+   * Otherwise, annotation id will be generated by system.
+   *
+   * This value should be up to 63 characters, and valid characters
+   * are /[a-z][0-9]-/. The first character must be a letter, the last could be
+   * a letter or a number.
+   * 
+ * + * optional string annotation_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for annotationId. + */ + com.google.protobuf.ByteString getAnnotationIdBytes(); +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/CreateApplicationInstancesRequest.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/CreateApplicationInstancesRequest.java new file mode 100644 index 000000000000..a112131aac57 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/CreateApplicationInstancesRequest.java @@ -0,0 +1,1483 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/platform.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * Message for adding stream input to an Application.
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.CreateApplicationInstancesRequest} + */ +public final class CreateApplicationInstancesRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.CreateApplicationInstancesRequest) + CreateApplicationInstancesRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use CreateApplicationInstancesRequest.newBuilder() to construct. + private CreateApplicationInstancesRequest( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CreateApplicationInstancesRequest() { + name_ = ""; + applicationInstances_ = java.util.Collections.emptyList(); + requestId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CreateApplicationInstancesRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_CreateApplicationInstancesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_CreateApplicationInstancesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.CreateApplicationInstancesRequest.class, + com.google.cloud.visionai.v1.CreateApplicationInstancesRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Required. the name of the application to retrieve.
+   * Format:
+   * "projects/{project}/locations/{location}/applications/{application}"
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + 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(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. the name of the application to retrieve.
+   * Format:
+   * "projects/{project}/locations/{location}/applications/{application}"
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int APPLICATION_INSTANCES_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private java.util.List applicationInstances_; + /** + * + * + *
+   * Required. The resources being created.
+   * 
+ * + * + * repeated .google.cloud.visionai.v1.ApplicationInstance application_instances = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public java.util.List + getApplicationInstancesList() { + return applicationInstances_; + } + /** + * + * + *
+   * Required. The resources being created.
+   * 
+ * + * + * repeated .google.cloud.visionai.v1.ApplicationInstance application_instances = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public java.util.List + getApplicationInstancesOrBuilderList() { + return applicationInstances_; + } + /** + * + * + *
+   * Required. The resources being created.
+   * 
+ * + * + * repeated .google.cloud.visionai.v1.ApplicationInstance application_instances = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public int getApplicationInstancesCount() { + return applicationInstances_.size(); + } + /** + * + * + *
+   * Required. The resources being created.
+   * 
+ * + * + * repeated .google.cloud.visionai.v1.ApplicationInstance application_instances = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.visionai.v1.ApplicationInstance getApplicationInstances(int index) { + return applicationInstances_.get(index); + } + /** + * + * + *
+   * Required. The resources being created.
+   * 
+ * + * + * repeated .google.cloud.visionai.v1.ApplicationInstance application_instances = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.visionai.v1.ApplicationInstanceOrBuilder getApplicationInstancesOrBuilder( + int index) { + return applicationInstances_.get(index); + } + + public static final int REQUEST_ID_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object requestId_ = ""; + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and
+   * the request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + @java.lang.Override + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + 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(); + requestId_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and
+   * the request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + for (int i = 0; i < applicationInstances_.size(); i++) { + output.writeMessage(2, applicationInstances_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, requestId_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + for (int i = 0; i < applicationInstances_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(2, applicationInstances_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, requestId_); + } + size += getUnknownFields().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.visionai.v1.CreateApplicationInstancesRequest)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.CreateApplicationInstancesRequest other = + (com.google.cloud.visionai.v1.CreateApplicationInstancesRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getApplicationInstancesList().equals(other.getApplicationInstancesList())) return false; + if (!getRequestId().equals(other.getRequestId())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + if (getApplicationInstancesCount() > 0) { + hash = (37 * hash) + APPLICATION_INSTANCES_FIELD_NUMBER; + hash = (53 * hash) + getApplicationInstancesList().hashCode(); + } + hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; + hash = (53 * hash) + getRequestId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.CreateApplicationInstancesRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.CreateApplicationInstancesRequest 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.visionai.v1.CreateApplicationInstancesRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.CreateApplicationInstancesRequest 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.visionai.v1.CreateApplicationInstancesRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.CreateApplicationInstancesRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.CreateApplicationInstancesRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.CreateApplicationInstancesRequest 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.visionai.v1.CreateApplicationInstancesRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.CreateApplicationInstancesRequest 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.visionai.v1.CreateApplicationInstancesRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.CreateApplicationInstancesRequest 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.visionai.v1.CreateApplicationInstancesRequest 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; + } + /** + * + * + *
+   * Message for adding stream input to an Application.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.CreateApplicationInstancesRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.CreateApplicationInstancesRequest) + com.google.cloud.visionai.v1.CreateApplicationInstancesRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_CreateApplicationInstancesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_CreateApplicationInstancesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.CreateApplicationInstancesRequest.class, + com.google.cloud.visionai.v1.CreateApplicationInstancesRequest.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.CreateApplicationInstancesRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + if (applicationInstancesBuilder_ == null) { + applicationInstances_ = java.util.Collections.emptyList(); + } else { + applicationInstances_ = null; + applicationInstancesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + requestId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_CreateApplicationInstancesRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.CreateApplicationInstancesRequest + getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.CreateApplicationInstancesRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.CreateApplicationInstancesRequest build() { + com.google.cloud.visionai.v1.CreateApplicationInstancesRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.CreateApplicationInstancesRequest buildPartial() { + com.google.cloud.visionai.v1.CreateApplicationInstancesRequest result = + new com.google.cloud.visionai.v1.CreateApplicationInstancesRequest(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.visionai.v1.CreateApplicationInstancesRequest result) { + if (applicationInstancesBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + applicationInstances_ = java.util.Collections.unmodifiableList(applicationInstances_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.applicationInstances_ = applicationInstances_; + } else { + result.applicationInstances_ = applicationInstancesBuilder_.build(); + } + } + + private void buildPartial0( + com.google.cloud.visionai.v1.CreateApplicationInstancesRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.requestId_ = requestId_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.CreateApplicationInstancesRequest) { + return mergeFrom((com.google.cloud.visionai.v1.CreateApplicationInstancesRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.CreateApplicationInstancesRequest other) { + if (other + == com.google.cloud.visionai.v1.CreateApplicationInstancesRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (applicationInstancesBuilder_ == null) { + if (!other.applicationInstances_.isEmpty()) { + if (applicationInstances_.isEmpty()) { + applicationInstances_ = other.applicationInstances_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureApplicationInstancesIsMutable(); + applicationInstances_.addAll(other.applicationInstances_); + } + onChanged(); + } + } else { + if (!other.applicationInstances_.isEmpty()) { + if (applicationInstancesBuilder_.isEmpty()) { + applicationInstancesBuilder_.dispose(); + applicationInstancesBuilder_ = null; + applicationInstances_ = other.applicationInstances_; + bitField0_ = (bitField0_ & ~0x00000002); + applicationInstancesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getApplicationInstancesFieldBuilder() + : null; + } else { + applicationInstancesBuilder_.addAllMessages(other.applicationInstances_); + } + } + } + if (!other.getRequestId().isEmpty()) { + requestId_ = other.requestId_; + bitField0_ |= 0x00000004; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + com.google.cloud.visionai.v1.ApplicationInstance m = + input.readMessage( + com.google.cloud.visionai.v1.ApplicationInstance.parser(), + extensionRegistry); + if (applicationInstancesBuilder_ == null) { + ensureApplicationInstancesIsMutable(); + applicationInstances_.add(m); + } else { + applicationInstancesBuilder_.addMessage(m); + } + break; + } // case 18 + case 34: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 34 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. the name of the application to retrieve.
+     * Format:
+     * "projects/{project}/locations/{location}/applications/{application}"
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. the name of the application to retrieve.
+     * Format:
+     * "projects/{project}/locations/{location}/applications/{application}"
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. the name of the application to retrieve.
+     * Format:
+     * "projects/{project}/locations/{location}/applications/{application}"
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. the name of the application to retrieve.
+     * Format:
+     * "projects/{project}/locations/{location}/applications/{application}"
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. the name of the application to retrieve.
+     * Format:
+     * "projects/{project}/locations/{location}/applications/{application}"
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.util.List applicationInstances_ = + java.util.Collections.emptyList(); + + private void ensureApplicationInstancesIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + applicationInstances_ = + new java.util.ArrayList( + applicationInstances_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.visionai.v1.ApplicationInstance, + com.google.cloud.visionai.v1.ApplicationInstance.Builder, + com.google.cloud.visionai.v1.ApplicationInstanceOrBuilder> + applicationInstancesBuilder_; + + /** + * + * + *
+     * Required. The resources being created.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.ApplicationInstance application_instances = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.List + getApplicationInstancesList() { + if (applicationInstancesBuilder_ == null) { + return java.util.Collections.unmodifiableList(applicationInstances_); + } else { + return applicationInstancesBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Required. The resources being created.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.ApplicationInstance application_instances = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public int getApplicationInstancesCount() { + if (applicationInstancesBuilder_ == null) { + return applicationInstances_.size(); + } else { + return applicationInstancesBuilder_.getCount(); + } + } + /** + * + * + *
+     * Required. The resources being created.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.ApplicationInstance application_instances = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.visionai.v1.ApplicationInstance getApplicationInstances(int index) { + if (applicationInstancesBuilder_ == null) { + return applicationInstances_.get(index); + } else { + return applicationInstancesBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Required. The resources being created.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.ApplicationInstance application_instances = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setApplicationInstances( + int index, com.google.cloud.visionai.v1.ApplicationInstance value) { + if (applicationInstancesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureApplicationInstancesIsMutable(); + applicationInstances_.set(index, value); + onChanged(); + } else { + applicationInstancesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Required. The resources being created.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.ApplicationInstance application_instances = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setApplicationInstances( + int index, com.google.cloud.visionai.v1.ApplicationInstance.Builder builderForValue) { + if (applicationInstancesBuilder_ == null) { + ensureApplicationInstancesIsMutable(); + applicationInstances_.set(index, builderForValue.build()); + onChanged(); + } else { + applicationInstancesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Required. The resources being created.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.ApplicationInstance application_instances = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addApplicationInstances(com.google.cloud.visionai.v1.ApplicationInstance value) { + if (applicationInstancesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureApplicationInstancesIsMutable(); + applicationInstances_.add(value); + onChanged(); + } else { + applicationInstancesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Required. The resources being created.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.ApplicationInstance application_instances = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addApplicationInstances( + int index, com.google.cloud.visionai.v1.ApplicationInstance value) { + if (applicationInstancesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureApplicationInstancesIsMutable(); + applicationInstances_.add(index, value); + onChanged(); + } else { + applicationInstancesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Required. The resources being created.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.ApplicationInstance application_instances = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addApplicationInstances( + com.google.cloud.visionai.v1.ApplicationInstance.Builder builderForValue) { + if (applicationInstancesBuilder_ == null) { + ensureApplicationInstancesIsMutable(); + applicationInstances_.add(builderForValue.build()); + onChanged(); + } else { + applicationInstancesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Required. The resources being created.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.ApplicationInstance application_instances = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addApplicationInstances( + int index, com.google.cloud.visionai.v1.ApplicationInstance.Builder builderForValue) { + if (applicationInstancesBuilder_ == null) { + ensureApplicationInstancesIsMutable(); + applicationInstances_.add(index, builderForValue.build()); + onChanged(); + } else { + applicationInstancesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Required. The resources being created.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.ApplicationInstance application_instances = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addAllApplicationInstances( + java.lang.Iterable values) { + if (applicationInstancesBuilder_ == null) { + ensureApplicationInstancesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, applicationInstances_); + onChanged(); + } else { + applicationInstancesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Required. The resources being created.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.ApplicationInstance application_instances = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearApplicationInstances() { + if (applicationInstancesBuilder_ == null) { + applicationInstances_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + applicationInstancesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Required. The resources being created.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.ApplicationInstance application_instances = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder removeApplicationInstances(int index) { + if (applicationInstancesBuilder_ == null) { + ensureApplicationInstancesIsMutable(); + applicationInstances_.remove(index); + onChanged(); + } else { + applicationInstancesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Required. The resources being created.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.ApplicationInstance application_instances = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.visionai.v1.ApplicationInstance.Builder getApplicationInstancesBuilder( + int index) { + return getApplicationInstancesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Required. The resources being created.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.ApplicationInstance application_instances = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.visionai.v1.ApplicationInstanceOrBuilder + getApplicationInstancesOrBuilder(int index) { + if (applicationInstancesBuilder_ == null) { + return applicationInstances_.get(index); + } else { + return applicationInstancesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Required. The resources being created.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.ApplicationInstance application_instances = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.List + getApplicationInstancesOrBuilderList() { + if (applicationInstancesBuilder_ != null) { + return applicationInstancesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(applicationInstances_); + } + } + /** + * + * + *
+     * Required. The resources being created.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.ApplicationInstance application_instances = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.visionai.v1.ApplicationInstance.Builder + addApplicationInstancesBuilder() { + return getApplicationInstancesFieldBuilder() + .addBuilder(com.google.cloud.visionai.v1.ApplicationInstance.getDefaultInstance()); + } + /** + * + * + *
+     * Required. The resources being created.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.ApplicationInstance application_instances = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.visionai.v1.ApplicationInstance.Builder addApplicationInstancesBuilder( + int index) { + return getApplicationInstancesFieldBuilder() + .addBuilder(index, com.google.cloud.visionai.v1.ApplicationInstance.getDefaultInstance()); + } + /** + * + * + *
+     * Required. The resources being created.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.ApplicationInstance application_instances = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.List + getApplicationInstancesBuilderList() { + return getApplicationInstancesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.visionai.v1.ApplicationInstance, + com.google.cloud.visionai.v1.ApplicationInstance.Builder, + com.google.cloud.visionai.v1.ApplicationInstanceOrBuilder> + getApplicationInstancesFieldBuilder() { + if (applicationInstancesBuilder_ == null) { + applicationInstancesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.visionai.v1.ApplicationInstance, + com.google.cloud.visionai.v1.ApplicationInstance.Builder, + com.google.cloud.visionai.v1.ApplicationInstanceOrBuilder>( + applicationInstances_, + ((bitField0_ & 0x00000002) != 0), + getParentForChildren(), + isClean()); + applicationInstances_ = null; + } + return applicationInstancesBuilder_; + } + + private java.lang.Object requestId_ = ""; + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + requestId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearRequestId() { + requestId_ = getDefaultInstance().getRequestId(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + requestId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.CreateApplicationInstancesRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.CreateApplicationInstancesRequest) + private static final com.google.cloud.visionai.v1.CreateApplicationInstancesRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.CreateApplicationInstancesRequest(); + } + + public static com.google.cloud.visionai.v1.CreateApplicationInstancesRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateApplicationInstancesRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.CreateApplicationInstancesRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/CreateApplicationInstancesRequestOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/CreateApplicationInstancesRequestOrBuilder.java new file mode 100644 index 000000000000..02cf45e9f688 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/CreateApplicationInstancesRequestOrBuilder.java @@ -0,0 +1,171 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/platform.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface CreateApplicationInstancesRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.CreateApplicationInstancesRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. the name of the application to retrieve.
+   * Format:
+   * "projects/{project}/locations/{location}/applications/{application}"
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. the name of the application to retrieve.
+   * Format:
+   * "projects/{project}/locations/{location}/applications/{application}"
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Required. The resources being created.
+   * 
+ * + * + * repeated .google.cloud.visionai.v1.ApplicationInstance application_instances = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + java.util.List getApplicationInstancesList(); + /** + * + * + *
+   * Required. The resources being created.
+   * 
+ * + * + * repeated .google.cloud.visionai.v1.ApplicationInstance application_instances = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.visionai.v1.ApplicationInstance getApplicationInstances(int index); + /** + * + * + *
+   * Required. The resources being created.
+   * 
+ * + * + * repeated .google.cloud.visionai.v1.ApplicationInstance application_instances = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + int getApplicationInstancesCount(); + /** + * + * + *
+   * Required. The resources being created.
+   * 
+ * + * + * repeated .google.cloud.visionai.v1.ApplicationInstance application_instances = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + java.util.List + getApplicationInstancesOrBuilderList(); + /** + * + * + *
+   * Required. The resources being created.
+   * 
+ * + * + * repeated .google.cloud.visionai.v1.ApplicationInstance application_instances = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.visionai.v1.ApplicationInstanceOrBuilder getApplicationInstancesOrBuilder( + int index); + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and
+   * the request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + java.lang.String getRequestId(); + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and
+   * the request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + com.google.protobuf.ByteString getRequestIdBytes(); +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/CreateApplicationInstancesResponse.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/CreateApplicationInstancesResponse.java new file mode 100644 index 000000000000..e976d504ba65 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/CreateApplicationInstancesResponse.java @@ -0,0 +1,440 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/platform.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * Message for CreateApplicationInstance Response.
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.CreateApplicationInstancesResponse} + */ +public final class CreateApplicationInstancesResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.CreateApplicationInstancesResponse) + CreateApplicationInstancesResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use CreateApplicationInstancesResponse.newBuilder() to construct. + private CreateApplicationInstancesResponse( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CreateApplicationInstancesResponse() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CreateApplicationInstancesResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_CreateApplicationInstancesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_CreateApplicationInstancesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.CreateApplicationInstancesResponse.class, + com.google.cloud.visionai.v1.CreateApplicationInstancesResponse.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 { + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += getUnknownFields().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.visionai.v1.CreateApplicationInstancesResponse)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.CreateApplicationInstancesResponse other = + (com.google.cloud.visionai.v1.CreateApplicationInstancesResponse) obj; + + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.CreateApplicationInstancesResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.CreateApplicationInstancesResponse 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.visionai.v1.CreateApplicationInstancesResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.CreateApplicationInstancesResponse 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.visionai.v1.CreateApplicationInstancesResponse parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.CreateApplicationInstancesResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.CreateApplicationInstancesResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.CreateApplicationInstancesResponse 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.visionai.v1.CreateApplicationInstancesResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.CreateApplicationInstancesResponse 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.visionai.v1.CreateApplicationInstancesResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.CreateApplicationInstancesResponse 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.visionai.v1.CreateApplicationInstancesResponse 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; + } + /** + * + * + *
+   * Message for CreateApplicationInstance Response.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.CreateApplicationInstancesResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.CreateApplicationInstancesResponse) + com.google.cloud.visionai.v1.CreateApplicationInstancesResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_CreateApplicationInstancesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_CreateApplicationInstancesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.CreateApplicationInstancesResponse.class, + com.google.cloud.visionai.v1.CreateApplicationInstancesResponse.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.CreateApplicationInstancesResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_CreateApplicationInstancesResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.CreateApplicationInstancesResponse + getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.CreateApplicationInstancesResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.CreateApplicationInstancesResponse build() { + com.google.cloud.visionai.v1.CreateApplicationInstancesResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.CreateApplicationInstancesResponse buildPartial() { + com.google.cloud.visionai.v1.CreateApplicationInstancesResponse result = + new com.google.cloud.visionai.v1.CreateApplicationInstancesResponse(this); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.CreateApplicationInstancesResponse) { + return mergeFrom((com.google.cloud.visionai.v1.CreateApplicationInstancesResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.visionai.v1.CreateApplicationInstancesResponse other) { + if (other + == com.google.cloud.visionai.v1.CreateApplicationInstancesResponse.getDefaultInstance()) + return this; + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.CreateApplicationInstancesResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.CreateApplicationInstancesResponse) + private static final com.google.cloud.visionai.v1.CreateApplicationInstancesResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.CreateApplicationInstancesResponse(); + } + + public static com.google.cloud.visionai.v1.CreateApplicationInstancesResponse + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateApplicationInstancesResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.CreateApplicationInstancesResponse + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/CreateApplicationInstancesResponseOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/CreateApplicationInstancesResponseOrBuilder.java new file mode 100644 index 000000000000..84d184ec3007 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/CreateApplicationInstancesResponseOrBuilder.java @@ -0,0 +1,25 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/platform.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface CreateApplicationInstancesResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.CreateApplicationInstancesResponse) + com.google.protobuf.MessageOrBuilder {} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/CreateApplicationRequest.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/CreateApplicationRequest.java new file mode 100644 index 000000000000..7ac290c9a586 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/CreateApplicationRequest.java @@ -0,0 +1,1393 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/platform.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * Message for creating a Application.
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.CreateApplicationRequest} + */ +public final class CreateApplicationRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.CreateApplicationRequest) + CreateApplicationRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use CreateApplicationRequest.newBuilder() to construct. + private CreateApplicationRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CreateApplicationRequest() { + parent_ = ""; + applicationId_ = ""; + requestId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CreateApplicationRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_CreateApplicationRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_CreateApplicationRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.CreateApplicationRequest.class, + com.google.cloud.visionai.v1.CreateApplicationRequest.Builder.class); + } + + private int bitField0_; + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + /** + * + * + *
+   * Required. Value for parent.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + 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(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Value for parent.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int APPLICATION_ID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object applicationId_ = ""; + /** + * + * + *
+   * Required. Id of the requesting object.
+   * 
+ * + * string application_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The applicationId. + */ + @java.lang.Override + public java.lang.String getApplicationId() { + java.lang.Object ref = applicationId_; + 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(); + applicationId_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Id of the requesting object.
+   * 
+ * + * string application_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for applicationId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getApplicationIdBytes() { + java.lang.Object ref = applicationId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + applicationId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int APPLICATION_FIELD_NUMBER = 3; + private com.google.cloud.visionai.v1.Application application_; + /** + * + * + *
+   * Required. The resource being created.
+   * 
+ * + * + * .google.cloud.visionai.v1.Application application = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the application field is set. + */ + @java.lang.Override + public boolean hasApplication() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * Required. The resource being created.
+   * 
+ * + * + * .google.cloud.visionai.v1.Application application = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The application. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.Application getApplication() { + return application_ == null + ? com.google.cloud.visionai.v1.Application.getDefaultInstance() + : application_; + } + /** + * + * + *
+   * Required. The resource being created.
+   * 
+ * + * + * .google.cloud.visionai.v1.Application application = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.visionai.v1.ApplicationOrBuilder getApplicationOrBuilder() { + return application_ == null + ? com.google.cloud.visionai.v1.Application.getDefaultInstance() + : application_; + } + + public static final int REQUEST_ID_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object requestId_ = ""; + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and
+   * the request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + @java.lang.Override + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + 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(); + requestId_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and
+   * the request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(applicationId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, applicationId_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(3, getApplication()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, requestId_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(applicationId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, applicationId_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getApplication()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, requestId_); + } + size += getUnknownFields().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.visionai.v1.CreateApplicationRequest)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.CreateApplicationRequest other = + (com.google.cloud.visionai.v1.CreateApplicationRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (!getApplicationId().equals(other.getApplicationId())) return false; + if (hasApplication() != other.hasApplication()) return false; + if (hasApplication()) { + if (!getApplication().equals(other.getApplication())) return false; + } + if (!getRequestId().equals(other.getRequestId())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + APPLICATION_ID_FIELD_NUMBER; + hash = (53 * hash) + getApplicationId().hashCode(); + if (hasApplication()) { + hash = (37 * hash) + APPLICATION_FIELD_NUMBER; + hash = (53 * hash) + getApplication().hashCode(); + } + hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; + hash = (53 * hash) + getRequestId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.CreateApplicationRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.CreateApplicationRequest 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.visionai.v1.CreateApplicationRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.CreateApplicationRequest 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.visionai.v1.CreateApplicationRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.CreateApplicationRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.CreateApplicationRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.CreateApplicationRequest 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.visionai.v1.CreateApplicationRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.CreateApplicationRequest 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.visionai.v1.CreateApplicationRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.CreateApplicationRequest 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.visionai.v1.CreateApplicationRequest 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; + } + /** + * + * + *
+   * Message for creating a Application.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.CreateApplicationRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.CreateApplicationRequest) + com.google.cloud.visionai.v1.CreateApplicationRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_CreateApplicationRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_CreateApplicationRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.CreateApplicationRequest.class, + com.google.cloud.visionai.v1.CreateApplicationRequest.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.CreateApplicationRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getApplicationFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + applicationId_ = ""; + application_ = null; + if (applicationBuilder_ != null) { + applicationBuilder_.dispose(); + applicationBuilder_ = null; + } + requestId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_CreateApplicationRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.CreateApplicationRequest getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.CreateApplicationRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.CreateApplicationRequest build() { + com.google.cloud.visionai.v1.CreateApplicationRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.CreateApplicationRequest buildPartial() { + com.google.cloud.visionai.v1.CreateApplicationRequest result = + new com.google.cloud.visionai.v1.CreateApplicationRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.visionai.v1.CreateApplicationRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.applicationId_ = applicationId_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.application_ = + applicationBuilder_ == null ? application_ : applicationBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.requestId_ = requestId_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.CreateApplicationRequest) { + return mergeFrom((com.google.cloud.visionai.v1.CreateApplicationRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.CreateApplicationRequest other) { + if (other == com.google.cloud.visionai.v1.CreateApplicationRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getApplicationId().isEmpty()) { + applicationId_ = other.applicationId_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.hasApplication()) { + mergeApplication(other.getApplication()); + } + if (!other.getRequestId().isEmpty()) { + requestId_ = other.requestId_; + bitField0_ |= 0x00000008; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + applicationId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage(getApplicationFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. Value for parent.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Value for parent.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Value for parent.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Value for parent.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Value for parent.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object applicationId_ = ""; + /** + * + * + *
+     * Required. Id of the requesting object.
+     * 
+ * + * string application_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The applicationId. + */ + public java.lang.String getApplicationId() { + java.lang.Object ref = applicationId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + applicationId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Id of the requesting object.
+     * 
+ * + * string application_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for applicationId. + */ + public com.google.protobuf.ByteString getApplicationIdBytes() { + java.lang.Object ref = applicationId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + applicationId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Id of the requesting object.
+     * 
+ * + * string application_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The applicationId to set. + * @return This builder for chaining. + */ + public Builder setApplicationId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + applicationId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Id of the requesting object.
+     * 
+ * + * string application_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearApplicationId() { + applicationId_ = getDefaultInstance().getApplicationId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Id of the requesting object.
+     * 
+ * + * string application_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for applicationId to set. + * @return This builder for chaining. + */ + public Builder setApplicationIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + applicationId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.cloud.visionai.v1.Application application_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.Application, + com.google.cloud.visionai.v1.Application.Builder, + com.google.cloud.visionai.v1.ApplicationOrBuilder> + applicationBuilder_; + /** + * + * + *
+     * Required. The resource being created.
+     * 
+ * + * + * .google.cloud.visionai.v1.Application application = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the application field is set. + */ + public boolean hasApplication() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+     * Required. The resource being created.
+     * 
+ * + * + * .google.cloud.visionai.v1.Application application = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The application. + */ + public com.google.cloud.visionai.v1.Application getApplication() { + if (applicationBuilder_ == null) { + return application_ == null + ? com.google.cloud.visionai.v1.Application.getDefaultInstance() + : application_; + } else { + return applicationBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The resource being created.
+     * 
+ * + * + * .google.cloud.visionai.v1.Application application = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setApplication(com.google.cloud.visionai.v1.Application value) { + if (applicationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + application_ = value; + } else { + applicationBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource being created.
+     * 
+ * + * + * .google.cloud.visionai.v1.Application application = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setApplication( + com.google.cloud.visionai.v1.Application.Builder builderForValue) { + if (applicationBuilder_ == null) { + application_ = builderForValue.build(); + } else { + applicationBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource being created.
+     * 
+ * + * + * .google.cloud.visionai.v1.Application application = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeApplication(com.google.cloud.visionai.v1.Application value) { + if (applicationBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && application_ != null + && application_ != com.google.cloud.visionai.v1.Application.getDefaultInstance()) { + getApplicationBuilder().mergeFrom(value); + } else { + application_ = value; + } + } else { + applicationBuilder_.mergeFrom(value); + } + if (application_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Required. The resource being created.
+     * 
+ * + * + * .google.cloud.visionai.v1.Application application = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearApplication() { + bitField0_ = (bitField0_ & ~0x00000004); + application_ = null; + if (applicationBuilder_ != null) { + applicationBuilder_.dispose(); + applicationBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource being created.
+     * 
+ * + * + * .google.cloud.visionai.v1.Application application = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.visionai.v1.Application.Builder getApplicationBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getApplicationFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The resource being created.
+     * 
+ * + * + * .google.cloud.visionai.v1.Application application = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.visionai.v1.ApplicationOrBuilder getApplicationOrBuilder() { + if (applicationBuilder_ != null) { + return applicationBuilder_.getMessageOrBuilder(); + } else { + return application_ == null + ? com.google.cloud.visionai.v1.Application.getDefaultInstance() + : application_; + } + } + /** + * + * + *
+     * Required. The resource being created.
+     * 
+ * + * + * .google.cloud.visionai.v1.Application application = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.Application, + com.google.cloud.visionai.v1.Application.Builder, + com.google.cloud.visionai.v1.ApplicationOrBuilder> + getApplicationFieldBuilder() { + if (applicationBuilder_ == null) { + applicationBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.Application, + com.google.cloud.visionai.v1.Application.Builder, + com.google.cloud.visionai.v1.ApplicationOrBuilder>( + getApplication(), getParentForChildren(), isClean()); + application_ = null; + } + return applicationBuilder_; + } + + private java.lang.Object requestId_ = ""; + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + requestId_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearRequestId() { + requestId_ = getDefaultInstance().getRequestId(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + requestId_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.CreateApplicationRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.CreateApplicationRequest) + private static final com.google.cloud.visionai.v1.CreateApplicationRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.CreateApplicationRequest(); + } + + public static com.google.cloud.visionai.v1.CreateApplicationRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateApplicationRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.CreateApplicationRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/CreateApplicationRequestOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/CreateApplicationRequestOrBuilder.java new file mode 100644 index 000000000000..fe1f8a1ff4b4 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/CreateApplicationRequestOrBuilder.java @@ -0,0 +1,170 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/platform.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface CreateApplicationRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.CreateApplicationRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Value for parent.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. Value for parent.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Required. Id of the requesting object.
+   * 
+ * + * string application_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The applicationId. + */ + java.lang.String getApplicationId(); + /** + * + * + *
+   * Required. Id of the requesting object.
+   * 
+ * + * string application_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for applicationId. + */ + com.google.protobuf.ByteString getApplicationIdBytes(); + + /** + * + * + *
+   * Required. The resource being created.
+   * 
+ * + * + * .google.cloud.visionai.v1.Application application = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the application field is set. + */ + boolean hasApplication(); + /** + * + * + *
+   * Required. The resource being created.
+   * 
+ * + * + * .google.cloud.visionai.v1.Application application = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The application. + */ + com.google.cloud.visionai.v1.Application getApplication(); + /** + * + * + *
+   * Required. The resource being created.
+   * 
+ * + * + * .google.cloud.visionai.v1.Application application = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.visionai.v1.ApplicationOrBuilder getApplicationOrBuilder(); + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and
+   * the request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + java.lang.String getRequestId(); + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and
+   * the request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + com.google.protobuf.ByteString getRequestIdBytes(); +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/CreateAssetRequest.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/CreateAssetRequest.java new file mode 100644 index 000000000000..b2ccb62915c1 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/CreateAssetRequest.java @@ -0,0 +1,1207 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/warehouse.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * Request message for CreateAssetRequest.
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.CreateAssetRequest} + */ +public final class CreateAssetRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.CreateAssetRequest) + CreateAssetRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use CreateAssetRequest.newBuilder() to construct. + private CreateAssetRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CreateAssetRequest() { + parent_ = ""; + assetId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CreateAssetRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_CreateAssetRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_CreateAssetRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.CreateAssetRequest.class, + com.google.cloud.visionai.v1.CreateAssetRequest.Builder.class); + } + + private int bitField0_; + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + /** + * + * + *
+   * Required. The parent resource where this asset will be created.
+   * Format:
+   * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + 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(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The parent resource where this asset will be created.
+   * Format:
+   * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ASSET_FIELD_NUMBER = 2; + private com.google.cloud.visionai.v1.Asset asset_; + /** + * + * + *
+   * Required. The asset to create.
+   * 
+ * + * .google.cloud.visionai.v1.Asset asset = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the asset field is set. + */ + @java.lang.Override + public boolean hasAsset() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * Required. The asset to create.
+   * 
+ * + * .google.cloud.visionai.v1.Asset asset = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The asset. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.Asset getAsset() { + return asset_ == null ? com.google.cloud.visionai.v1.Asset.getDefaultInstance() : asset_; + } + /** + * + * + *
+   * Required. The asset to create.
+   * 
+ * + * .google.cloud.visionai.v1.Asset asset = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.visionai.v1.AssetOrBuilder getAssetOrBuilder() { + return asset_ == null ? com.google.cloud.visionai.v1.Asset.getDefaultInstance() : asset_; + } + + public static final int ASSET_ID_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object assetId_ = ""; + /** + * + * + *
+   * Optional. The ID to use for the asset, which will become the final
+   * component of the asset's resource name if user choose to specify.
+   * Otherwise, asset id will be generated by system.
+   *
+   * This value should be up to 63 characters, and valid characters
+   * are /[a-z][0-9]-/. The first character must be a letter, the last could be
+   * a letter or a number.
+   * 
+ * + * optional string asset_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the assetId field is set. + */ + @java.lang.Override + public boolean hasAssetId() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+   * Optional. The ID to use for the asset, which will become the final
+   * component of the asset's resource name if user choose to specify.
+   * Otherwise, asset id will be generated by system.
+   *
+   * This value should be up to 63 characters, and valid characters
+   * are /[a-z][0-9]-/. The first character must be a letter, the last could be
+   * a letter or a number.
+   * 
+ * + * optional string asset_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The assetId. + */ + @java.lang.Override + public java.lang.String getAssetId() { + java.lang.Object ref = assetId_; + 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(); + assetId_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. The ID to use for the asset, which will become the final
+   * component of the asset's resource name if user choose to specify.
+   * Otherwise, asset id will be generated by system.
+   *
+   * This value should be up to 63 characters, and valid characters
+   * are /[a-z][0-9]-/. The first character must be a letter, the last could be
+   * a letter or a number.
+   * 
+ * + * optional string asset_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for assetId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getAssetIdBytes() { + java.lang.Object ref = assetId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + assetId_ = 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getAsset()); + } + if (((bitField0_ & 0x00000002) != 0)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, assetId_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getAsset()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, assetId_); + } + size += getUnknownFields().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.visionai.v1.CreateAssetRequest)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.CreateAssetRequest other = + (com.google.cloud.visionai.v1.CreateAssetRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (hasAsset() != other.hasAsset()) return false; + if (hasAsset()) { + if (!getAsset().equals(other.getAsset())) return false; + } + if (hasAssetId() != other.hasAssetId()) return false; + if (hasAssetId()) { + if (!getAssetId().equals(other.getAssetId())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + if (hasAsset()) { + hash = (37 * hash) + ASSET_FIELD_NUMBER; + hash = (53 * hash) + getAsset().hashCode(); + } + if (hasAssetId()) { + hash = (37 * hash) + ASSET_ID_FIELD_NUMBER; + hash = (53 * hash) + getAssetId().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.CreateAssetRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.CreateAssetRequest 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.visionai.v1.CreateAssetRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.CreateAssetRequest 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.visionai.v1.CreateAssetRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.CreateAssetRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.CreateAssetRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.CreateAssetRequest 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.visionai.v1.CreateAssetRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.CreateAssetRequest 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.visionai.v1.CreateAssetRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.CreateAssetRequest 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.visionai.v1.CreateAssetRequest 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; + } + /** + * + * + *
+   * Request message for CreateAssetRequest.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.CreateAssetRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.CreateAssetRequest) + com.google.cloud.visionai.v1.CreateAssetRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_CreateAssetRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_CreateAssetRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.CreateAssetRequest.class, + com.google.cloud.visionai.v1.CreateAssetRequest.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.CreateAssetRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getAssetFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + asset_ = null; + if (assetBuilder_ != null) { + assetBuilder_.dispose(); + assetBuilder_ = null; + } + assetId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_CreateAssetRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.CreateAssetRequest getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.CreateAssetRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.CreateAssetRequest build() { + com.google.cloud.visionai.v1.CreateAssetRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.CreateAssetRequest buildPartial() { + com.google.cloud.visionai.v1.CreateAssetRequest result = + new com.google.cloud.visionai.v1.CreateAssetRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.visionai.v1.CreateAssetRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.asset_ = assetBuilder_ == null ? asset_ : assetBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.assetId_ = assetId_; + to_bitField0_ |= 0x00000002; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.CreateAssetRequest) { + return mergeFrom((com.google.cloud.visionai.v1.CreateAssetRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.CreateAssetRequest other) { + if (other == com.google.cloud.visionai.v1.CreateAssetRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasAsset()) { + mergeAsset(other.getAsset()); + } + if (other.hasAssetId()) { + assetId_ = other.assetId_; + bitField0_ |= 0x00000004; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage(getAssetFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + assetId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The parent resource where this asset will be created.
+     * Format:
+     * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The parent resource where this asset will be created.
+     * Format:
+     * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The parent resource where this asset will be created.
+     * Format:
+     * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The parent resource where this asset will be created.
+     * Format:
+     * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The parent resource where this asset will be created.
+     * Format:
+     * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.cloud.visionai.v1.Asset asset_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.Asset, + com.google.cloud.visionai.v1.Asset.Builder, + com.google.cloud.visionai.v1.AssetOrBuilder> + assetBuilder_; + /** + * + * + *
+     * Required. The asset to create.
+     * 
+ * + * .google.cloud.visionai.v1.Asset asset = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the asset field is set. + */ + public boolean hasAsset() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * Required. The asset to create.
+     * 
+ * + * .google.cloud.visionai.v1.Asset asset = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The asset. + */ + public com.google.cloud.visionai.v1.Asset getAsset() { + if (assetBuilder_ == null) { + return asset_ == null ? com.google.cloud.visionai.v1.Asset.getDefaultInstance() : asset_; + } else { + return assetBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The asset to create.
+     * 
+ * + * .google.cloud.visionai.v1.Asset asset = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setAsset(com.google.cloud.visionai.v1.Asset value) { + if (assetBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + asset_ = value; + } else { + assetBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The asset to create.
+     * 
+ * + * .google.cloud.visionai.v1.Asset asset = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setAsset(com.google.cloud.visionai.v1.Asset.Builder builderForValue) { + if (assetBuilder_ == null) { + asset_ = builderForValue.build(); + } else { + assetBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The asset to create.
+     * 
+ * + * .google.cloud.visionai.v1.Asset asset = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeAsset(com.google.cloud.visionai.v1.Asset value) { + if (assetBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && asset_ != null + && asset_ != com.google.cloud.visionai.v1.Asset.getDefaultInstance()) { + getAssetBuilder().mergeFrom(value); + } else { + asset_ = value; + } + } else { + assetBuilder_.mergeFrom(value); + } + if (asset_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Required. The asset to create.
+     * 
+ * + * .google.cloud.visionai.v1.Asset asset = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearAsset() { + bitField0_ = (bitField0_ & ~0x00000002); + asset_ = null; + if (assetBuilder_ != null) { + assetBuilder_.dispose(); + assetBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The asset to create.
+     * 
+ * + * .google.cloud.visionai.v1.Asset asset = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.visionai.v1.Asset.Builder getAssetBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getAssetFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The asset to create.
+     * 
+ * + * .google.cloud.visionai.v1.Asset asset = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.visionai.v1.AssetOrBuilder getAssetOrBuilder() { + if (assetBuilder_ != null) { + return assetBuilder_.getMessageOrBuilder(); + } else { + return asset_ == null ? com.google.cloud.visionai.v1.Asset.getDefaultInstance() : asset_; + } + } + /** + * + * + *
+     * Required. The asset to create.
+     * 
+ * + * .google.cloud.visionai.v1.Asset asset = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.Asset, + com.google.cloud.visionai.v1.Asset.Builder, + com.google.cloud.visionai.v1.AssetOrBuilder> + getAssetFieldBuilder() { + if (assetBuilder_ == null) { + assetBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.Asset, + com.google.cloud.visionai.v1.Asset.Builder, + com.google.cloud.visionai.v1.AssetOrBuilder>( + getAsset(), getParentForChildren(), isClean()); + asset_ = null; + } + return assetBuilder_; + } + + private java.lang.Object assetId_ = ""; + /** + * + * + *
+     * Optional. The ID to use for the asset, which will become the final
+     * component of the asset's resource name if user choose to specify.
+     * Otherwise, asset id will be generated by system.
+     *
+     * This value should be up to 63 characters, and valid characters
+     * are /[a-z][0-9]-/. The first character must be a letter, the last could be
+     * a letter or a number.
+     * 
+ * + * optional string asset_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the assetId field is set. + */ + public boolean hasAssetId() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+     * Optional. The ID to use for the asset, which will become the final
+     * component of the asset's resource name if user choose to specify.
+     * Otherwise, asset id will be generated by system.
+     *
+     * This value should be up to 63 characters, and valid characters
+     * are /[a-z][0-9]-/. The first character must be a letter, the last could be
+     * a letter or a number.
+     * 
+ * + * optional string asset_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The assetId. + */ + public java.lang.String getAssetId() { + java.lang.Object ref = assetId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + assetId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. The ID to use for the asset, which will become the final
+     * component of the asset's resource name if user choose to specify.
+     * Otherwise, asset id will be generated by system.
+     *
+     * This value should be up to 63 characters, and valid characters
+     * are /[a-z][0-9]-/. The first character must be a letter, the last could be
+     * a letter or a number.
+     * 
+ * + * optional string asset_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for assetId. + */ + public com.google.protobuf.ByteString getAssetIdBytes() { + java.lang.Object ref = assetId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + assetId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. The ID to use for the asset, which will become the final
+     * component of the asset's resource name if user choose to specify.
+     * Otherwise, asset id will be generated by system.
+     *
+     * This value should be up to 63 characters, and valid characters
+     * are /[a-z][0-9]-/. The first character must be a letter, the last could be
+     * a letter or a number.
+     * 
+ * + * optional string asset_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The assetId to set. + * @return This builder for chaining. + */ + public Builder setAssetId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + assetId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The ID to use for the asset, which will become the final
+     * component of the asset's resource name if user choose to specify.
+     * Otherwise, asset id will be generated by system.
+     *
+     * This value should be up to 63 characters, and valid characters
+     * are /[a-z][0-9]-/. The first character must be a letter, the last could be
+     * a letter or a number.
+     * 
+ * + * optional string asset_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearAssetId() { + assetId_ = getDefaultInstance().getAssetId(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The ID to use for the asset, which will become the final
+     * component of the asset's resource name if user choose to specify.
+     * Otherwise, asset id will be generated by system.
+     *
+     * This value should be up to 63 characters, and valid characters
+     * are /[a-z][0-9]-/. The first character must be a letter, the last could be
+     * a letter or a number.
+     * 
+ * + * optional string asset_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for assetId to set. + * @return This builder for chaining. + */ + public Builder setAssetIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + assetId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.CreateAssetRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.CreateAssetRequest) + private static final com.google.cloud.visionai.v1.CreateAssetRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.CreateAssetRequest(); + } + + public static com.google.cloud.visionai.v1.CreateAssetRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateAssetRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.CreateAssetRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/CreateAssetRequestOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/CreateAssetRequestOrBuilder.java new file mode 100644 index 000000000000..76396c6c8913 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/CreateAssetRequestOrBuilder.java @@ -0,0 +1,152 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/warehouse.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface CreateAssetRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.CreateAssetRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The parent resource where this asset will be created.
+   * Format:
+   * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The parent resource where this asset will be created.
+   * Format:
+   * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Required. The asset to create.
+   * 
+ * + * .google.cloud.visionai.v1.Asset asset = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the asset field is set. + */ + boolean hasAsset(); + /** + * + * + *
+   * Required. The asset to create.
+   * 
+ * + * .google.cloud.visionai.v1.Asset asset = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The asset. + */ + com.google.cloud.visionai.v1.Asset getAsset(); + /** + * + * + *
+   * Required. The asset to create.
+   * 
+ * + * .google.cloud.visionai.v1.Asset asset = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.visionai.v1.AssetOrBuilder getAssetOrBuilder(); + + /** + * + * + *
+   * Optional. The ID to use for the asset, which will become the final
+   * component of the asset's resource name if user choose to specify.
+   * Otherwise, asset id will be generated by system.
+   *
+   * This value should be up to 63 characters, and valid characters
+   * are /[a-z][0-9]-/. The first character must be a letter, the last could be
+   * a letter or a number.
+   * 
+ * + * optional string asset_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the assetId field is set. + */ + boolean hasAssetId(); + /** + * + * + *
+   * Optional. The ID to use for the asset, which will become the final
+   * component of the asset's resource name if user choose to specify.
+   * Otherwise, asset id will be generated by system.
+   *
+   * This value should be up to 63 characters, and valid characters
+   * are /[a-z][0-9]-/. The first character must be a letter, the last could be
+   * a letter or a number.
+   * 
+ * + * optional string asset_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The assetId. + */ + java.lang.String getAssetId(); + /** + * + * + *
+   * Optional. The ID to use for the asset, which will become the final
+   * component of the asset's resource name if user choose to specify.
+   * Otherwise, asset id will be generated by system.
+   *
+   * This value should be up to 63 characters, and valid characters
+   * are /[a-z][0-9]-/. The first character must be a letter, the last could be
+   * a letter or a number.
+   * 
+ * + * optional string asset_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for assetId. + */ + com.google.protobuf.ByteString getAssetIdBytes(); +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/CreateClusterRequest.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/CreateClusterRequest.java new file mode 100644 index 000000000000..e29f91889a9f --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/CreateClusterRequest.java @@ -0,0 +1,1383 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/streams_service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * Message for creating a Cluster.
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.CreateClusterRequest} + */ +public final class CreateClusterRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.CreateClusterRequest) + CreateClusterRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use CreateClusterRequest.newBuilder() to construct. + private CreateClusterRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CreateClusterRequest() { + parent_ = ""; + clusterId_ = ""; + requestId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CreateClusterRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.StreamsServiceProto + .internal_static_google_cloud_visionai_v1_CreateClusterRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.StreamsServiceProto + .internal_static_google_cloud_visionai_v1_CreateClusterRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.CreateClusterRequest.class, + com.google.cloud.visionai.v1.CreateClusterRequest.Builder.class); + } + + private int bitField0_; + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + /** + * + * + *
+   * Required. Value for parent.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + 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(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Value for parent.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CLUSTER_ID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object clusterId_ = ""; + /** + * + * + *
+   * Required. Id of the requesting object.
+   * 
+ * + * string cluster_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The clusterId. + */ + @java.lang.Override + public java.lang.String getClusterId() { + java.lang.Object ref = clusterId_; + 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(); + clusterId_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Id of the requesting object.
+   * 
+ * + * string cluster_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for clusterId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getClusterIdBytes() { + java.lang.Object ref = clusterId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + clusterId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CLUSTER_FIELD_NUMBER = 3; + private com.google.cloud.visionai.v1.Cluster cluster_; + /** + * + * + *
+   * Required. The resource being created.
+   * 
+ * + * .google.cloud.visionai.v1.Cluster cluster = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the cluster field is set. + */ + @java.lang.Override + public boolean hasCluster() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * Required. The resource being created.
+   * 
+ * + * .google.cloud.visionai.v1.Cluster cluster = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The cluster. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.Cluster getCluster() { + return cluster_ == null ? com.google.cloud.visionai.v1.Cluster.getDefaultInstance() : cluster_; + } + /** + * + * + *
+   * Required. The resource being created.
+   * 
+ * + * .google.cloud.visionai.v1.Cluster cluster = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.visionai.v1.ClusterOrBuilder getClusterOrBuilder() { + return cluster_ == null ? com.google.cloud.visionai.v1.Cluster.getDefaultInstance() : cluster_; + } + + public static final int REQUEST_ID_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object requestId_ = ""; + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request ID,
+   * the server can check if original operation with the same request ID was
+   * received, and if so, will ignore the second request. This prevents clients
+   * from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + @java.lang.Override + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + 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(); + requestId_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request ID,
+   * the server can check if original operation with the same request ID was
+   * received, and if so, will ignore the second request. This prevents clients
+   * from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(clusterId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, clusterId_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(3, getCluster()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, requestId_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(clusterId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, clusterId_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getCluster()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, requestId_); + } + size += getUnknownFields().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.visionai.v1.CreateClusterRequest)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.CreateClusterRequest other = + (com.google.cloud.visionai.v1.CreateClusterRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (!getClusterId().equals(other.getClusterId())) return false; + if (hasCluster() != other.hasCluster()) return false; + if (hasCluster()) { + if (!getCluster().equals(other.getCluster())) return false; + } + if (!getRequestId().equals(other.getRequestId())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + CLUSTER_ID_FIELD_NUMBER; + hash = (53 * hash) + getClusterId().hashCode(); + if (hasCluster()) { + hash = (37 * hash) + CLUSTER_FIELD_NUMBER; + hash = (53 * hash) + getCluster().hashCode(); + } + hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; + hash = (53 * hash) + getRequestId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.CreateClusterRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.CreateClusterRequest 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.visionai.v1.CreateClusterRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.CreateClusterRequest 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.visionai.v1.CreateClusterRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.CreateClusterRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.CreateClusterRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.CreateClusterRequest 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.visionai.v1.CreateClusterRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.CreateClusterRequest 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.visionai.v1.CreateClusterRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.CreateClusterRequest 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.visionai.v1.CreateClusterRequest 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; + } + /** + * + * + *
+   * Message for creating a Cluster.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.CreateClusterRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.CreateClusterRequest) + com.google.cloud.visionai.v1.CreateClusterRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.StreamsServiceProto + .internal_static_google_cloud_visionai_v1_CreateClusterRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.StreamsServiceProto + .internal_static_google_cloud_visionai_v1_CreateClusterRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.CreateClusterRequest.class, + com.google.cloud.visionai.v1.CreateClusterRequest.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.CreateClusterRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getClusterFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + clusterId_ = ""; + cluster_ = null; + if (clusterBuilder_ != null) { + clusterBuilder_.dispose(); + clusterBuilder_ = null; + } + requestId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.StreamsServiceProto + .internal_static_google_cloud_visionai_v1_CreateClusterRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.CreateClusterRequest getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.CreateClusterRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.CreateClusterRequest build() { + com.google.cloud.visionai.v1.CreateClusterRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.CreateClusterRequest buildPartial() { + com.google.cloud.visionai.v1.CreateClusterRequest result = + new com.google.cloud.visionai.v1.CreateClusterRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.visionai.v1.CreateClusterRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.clusterId_ = clusterId_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.cluster_ = clusterBuilder_ == null ? cluster_ : clusterBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.requestId_ = requestId_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.CreateClusterRequest) { + return mergeFrom((com.google.cloud.visionai.v1.CreateClusterRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.CreateClusterRequest other) { + if (other == com.google.cloud.visionai.v1.CreateClusterRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getClusterId().isEmpty()) { + clusterId_ = other.clusterId_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.hasCluster()) { + mergeCluster(other.getCluster()); + } + if (!other.getRequestId().isEmpty()) { + requestId_ = other.requestId_; + bitField0_ |= 0x00000008; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + clusterId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage(getClusterFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. Value for parent.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Value for parent.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Value for parent.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Value for parent.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Value for parent.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object clusterId_ = ""; + /** + * + * + *
+     * Required. Id of the requesting object.
+     * 
+ * + * string cluster_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The clusterId. + */ + public java.lang.String getClusterId() { + java.lang.Object ref = clusterId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + clusterId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Id of the requesting object.
+     * 
+ * + * string cluster_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for clusterId. + */ + public com.google.protobuf.ByteString getClusterIdBytes() { + java.lang.Object ref = clusterId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + clusterId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Id of the requesting object.
+     * 
+ * + * string cluster_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The clusterId to set. + * @return This builder for chaining. + */ + public Builder setClusterId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + clusterId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Id of the requesting object.
+     * 
+ * + * string cluster_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearClusterId() { + clusterId_ = getDefaultInstance().getClusterId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Id of the requesting object.
+     * 
+ * + * string cluster_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for clusterId to set. + * @return This builder for chaining. + */ + public Builder setClusterIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + clusterId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.cloud.visionai.v1.Cluster cluster_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.Cluster, + com.google.cloud.visionai.v1.Cluster.Builder, + com.google.cloud.visionai.v1.ClusterOrBuilder> + clusterBuilder_; + /** + * + * + *
+     * Required. The resource being created.
+     * 
+ * + * + * .google.cloud.visionai.v1.Cluster cluster = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the cluster field is set. + */ + public boolean hasCluster() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+     * Required. The resource being created.
+     * 
+ * + * + * .google.cloud.visionai.v1.Cluster cluster = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The cluster. + */ + public com.google.cloud.visionai.v1.Cluster getCluster() { + if (clusterBuilder_ == null) { + return cluster_ == null + ? com.google.cloud.visionai.v1.Cluster.getDefaultInstance() + : cluster_; + } else { + return clusterBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The resource being created.
+     * 
+ * + * + * .google.cloud.visionai.v1.Cluster cluster = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setCluster(com.google.cloud.visionai.v1.Cluster value) { + if (clusterBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + cluster_ = value; + } else { + clusterBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource being created.
+     * 
+ * + * + * .google.cloud.visionai.v1.Cluster cluster = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setCluster(com.google.cloud.visionai.v1.Cluster.Builder builderForValue) { + if (clusterBuilder_ == null) { + cluster_ = builderForValue.build(); + } else { + clusterBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource being created.
+     * 
+ * + * + * .google.cloud.visionai.v1.Cluster cluster = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeCluster(com.google.cloud.visionai.v1.Cluster value) { + if (clusterBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && cluster_ != null + && cluster_ != com.google.cloud.visionai.v1.Cluster.getDefaultInstance()) { + getClusterBuilder().mergeFrom(value); + } else { + cluster_ = value; + } + } else { + clusterBuilder_.mergeFrom(value); + } + if (cluster_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Required. The resource being created.
+     * 
+ * + * + * .google.cloud.visionai.v1.Cluster cluster = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearCluster() { + bitField0_ = (bitField0_ & ~0x00000004); + cluster_ = null; + if (clusterBuilder_ != null) { + clusterBuilder_.dispose(); + clusterBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource being created.
+     * 
+ * + * + * .google.cloud.visionai.v1.Cluster cluster = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.visionai.v1.Cluster.Builder getClusterBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getClusterFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The resource being created.
+     * 
+ * + * + * .google.cloud.visionai.v1.Cluster cluster = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.visionai.v1.ClusterOrBuilder getClusterOrBuilder() { + if (clusterBuilder_ != null) { + return clusterBuilder_.getMessageOrBuilder(); + } else { + return cluster_ == null + ? com.google.cloud.visionai.v1.Cluster.getDefaultInstance() + : cluster_; + } + } + /** + * + * + *
+     * Required. The resource being created.
+     * 
+ * + * + * .google.cloud.visionai.v1.Cluster cluster = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.Cluster, + com.google.cloud.visionai.v1.Cluster.Builder, + com.google.cloud.visionai.v1.ClusterOrBuilder> + getClusterFieldBuilder() { + if (clusterBuilder_ == null) { + clusterBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.Cluster, + com.google.cloud.visionai.v1.Cluster.Builder, + com.google.cloud.visionai.v1.ClusterOrBuilder>( + getCluster(), getParentForChildren(), isClean()); + cluster_ = null; + } + return clusterBuilder_; + } + + private java.lang.Object requestId_ = ""; + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request ID,
+     * the server can check if original operation with the same request ID was
+     * received, and if so, will ignore the second request. This prevents clients
+     * from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request ID,
+     * the server can check if original operation with the same request ID was
+     * received, and if so, will ignore the second request. This prevents clients
+     * from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request ID,
+     * the server can check if original operation with the same request ID was
+     * received, and if so, will ignore the second request. This prevents clients
+     * from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + requestId_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request ID,
+     * the server can check if original operation with the same request ID was
+     * received, and if so, will ignore the second request. This prevents clients
+     * from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearRequestId() { + requestId_ = getDefaultInstance().getRequestId(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request ID,
+     * the server can check if original operation with the same request ID was
+     * received, and if so, will ignore the second request. This prevents clients
+     * from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + requestId_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.CreateClusterRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.CreateClusterRequest) + private static final com.google.cloud.visionai.v1.CreateClusterRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.CreateClusterRequest(); + } + + public static com.google.cloud.visionai.v1.CreateClusterRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateClusterRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.CreateClusterRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/CreateClusterRequestOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/CreateClusterRequestOrBuilder.java new file mode 100644 index 000000000000..bfd21f775800 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/CreateClusterRequestOrBuilder.java @@ -0,0 +1,167 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/streams_service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface CreateClusterRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.CreateClusterRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Value for parent.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. Value for parent.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Required. Id of the requesting object.
+   * 
+ * + * string cluster_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The clusterId. + */ + java.lang.String getClusterId(); + /** + * + * + *
+   * Required. Id of the requesting object.
+   * 
+ * + * string cluster_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for clusterId. + */ + com.google.protobuf.ByteString getClusterIdBytes(); + + /** + * + * + *
+   * Required. The resource being created.
+   * 
+ * + * .google.cloud.visionai.v1.Cluster cluster = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the cluster field is set. + */ + boolean hasCluster(); + /** + * + * + *
+   * Required. The resource being created.
+   * 
+ * + * .google.cloud.visionai.v1.Cluster cluster = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The cluster. + */ + com.google.cloud.visionai.v1.Cluster getCluster(); + /** + * + * + *
+   * Required. The resource being created.
+   * 
+ * + * .google.cloud.visionai.v1.Cluster cluster = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.visionai.v1.ClusterOrBuilder getClusterOrBuilder(); + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request ID,
+   * the server can check if original operation with the same request ID was
+   * received, and if so, will ignore the second request. This prevents clients
+   * from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + java.lang.String getRequestId(); + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request ID,
+   * the server can check if original operation with the same request ID was
+   * received, and if so, will ignore the second request. This prevents clients
+   * from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + com.google.protobuf.ByteString getRequestIdBytes(); +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/CreateCollectionMetadata.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/CreateCollectionMetadata.java new file mode 100644 index 000000000000..a6e815610619 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/CreateCollectionMetadata.java @@ -0,0 +1,728 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/warehouse.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * Metadata message for CreateCollectionRequest
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.CreateCollectionMetadata} + */ +public final class CreateCollectionMetadata extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.CreateCollectionMetadata) + CreateCollectionMetadataOrBuilder { + private static final long serialVersionUID = 0L; + // Use CreateCollectionMetadata.newBuilder() to construct. + private CreateCollectionMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CreateCollectionMetadata() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CreateCollectionMetadata(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_CreateCollectionMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_CreateCollectionMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.CreateCollectionMetadata.class, + com.google.cloud.visionai.v1.CreateCollectionMetadata.Builder.class); + } + + private int bitField0_; + public static final int OPERATION_METADATA_FIELD_NUMBER = 1; + private com.google.cloud.visionai.v1.OperationMetadata operationMetadata_; + /** + * + * + *
+   * Common metadata of the long-running operation.
+   * 
+ * + * .google.cloud.visionai.v1.OperationMetadata operation_metadata = 1; + * + * @return Whether the operationMetadata field is set. + */ + @java.lang.Override + public boolean hasOperationMetadata() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * Common metadata of the long-running operation.
+   * 
+ * + * .google.cloud.visionai.v1.OperationMetadata operation_metadata = 1; + * + * @return The operationMetadata. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.OperationMetadata getOperationMetadata() { + return operationMetadata_ == null + ? com.google.cloud.visionai.v1.OperationMetadata.getDefaultInstance() + : operationMetadata_; + } + /** + * + * + *
+   * Common metadata of the long-running operation.
+   * 
+ * + * .google.cloud.visionai.v1.OperationMetadata operation_metadata = 1; + */ + @java.lang.Override + public com.google.cloud.visionai.v1.OperationMetadataOrBuilder getOperationMetadataOrBuilder() { + return operationMetadata_ == null + ? com.google.cloud.visionai.v1.OperationMetadata.getDefaultInstance() + : operationMetadata_; + } + + 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 (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getOperationMetadata()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getOperationMetadata()); + } + size += getUnknownFields().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.visionai.v1.CreateCollectionMetadata)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.CreateCollectionMetadata other = + (com.google.cloud.visionai.v1.CreateCollectionMetadata) obj; + + if (hasOperationMetadata() != other.hasOperationMetadata()) return false; + if (hasOperationMetadata()) { + if (!getOperationMetadata().equals(other.getOperationMetadata())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasOperationMetadata()) { + hash = (37 * hash) + OPERATION_METADATA_FIELD_NUMBER; + hash = (53 * hash) + getOperationMetadata().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.CreateCollectionMetadata parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.CreateCollectionMetadata 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.visionai.v1.CreateCollectionMetadata parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.CreateCollectionMetadata 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.visionai.v1.CreateCollectionMetadata parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.CreateCollectionMetadata parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.CreateCollectionMetadata parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.CreateCollectionMetadata 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.visionai.v1.CreateCollectionMetadata parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.CreateCollectionMetadata 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.visionai.v1.CreateCollectionMetadata parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.CreateCollectionMetadata 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.visionai.v1.CreateCollectionMetadata 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; + } + /** + * + * + *
+   * Metadata message for CreateCollectionRequest
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.CreateCollectionMetadata} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.CreateCollectionMetadata) + com.google.cloud.visionai.v1.CreateCollectionMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_CreateCollectionMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_CreateCollectionMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.CreateCollectionMetadata.class, + com.google.cloud.visionai.v1.CreateCollectionMetadata.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.CreateCollectionMetadata.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getOperationMetadataFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + operationMetadata_ = null; + if (operationMetadataBuilder_ != null) { + operationMetadataBuilder_.dispose(); + operationMetadataBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_CreateCollectionMetadata_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.CreateCollectionMetadata getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.CreateCollectionMetadata.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.CreateCollectionMetadata build() { + com.google.cloud.visionai.v1.CreateCollectionMetadata result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.CreateCollectionMetadata buildPartial() { + com.google.cloud.visionai.v1.CreateCollectionMetadata result = + new com.google.cloud.visionai.v1.CreateCollectionMetadata(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.visionai.v1.CreateCollectionMetadata result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.operationMetadata_ = + operationMetadataBuilder_ == null + ? operationMetadata_ + : operationMetadataBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.CreateCollectionMetadata) { + return mergeFrom((com.google.cloud.visionai.v1.CreateCollectionMetadata) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.CreateCollectionMetadata other) { + if (other == com.google.cloud.visionai.v1.CreateCollectionMetadata.getDefaultInstance()) + return this; + if (other.hasOperationMetadata()) { + mergeOperationMetadata(other.getOperationMetadata()); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage( + getOperationMetadataFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.cloud.visionai.v1.OperationMetadata operationMetadata_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.OperationMetadata, + com.google.cloud.visionai.v1.OperationMetadata.Builder, + com.google.cloud.visionai.v1.OperationMetadataOrBuilder> + operationMetadataBuilder_; + /** + * + * + *
+     * Common metadata of the long-running operation.
+     * 
+ * + * .google.cloud.visionai.v1.OperationMetadata operation_metadata = 1; + * + * @return Whether the operationMetadata field is set. + */ + public boolean hasOperationMetadata() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * Common metadata of the long-running operation.
+     * 
+ * + * .google.cloud.visionai.v1.OperationMetadata operation_metadata = 1; + * + * @return The operationMetadata. + */ + public com.google.cloud.visionai.v1.OperationMetadata getOperationMetadata() { + if (operationMetadataBuilder_ == null) { + return operationMetadata_ == null + ? com.google.cloud.visionai.v1.OperationMetadata.getDefaultInstance() + : operationMetadata_; + } else { + return operationMetadataBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Common metadata of the long-running operation.
+     * 
+ * + * .google.cloud.visionai.v1.OperationMetadata operation_metadata = 1; + */ + public Builder setOperationMetadata(com.google.cloud.visionai.v1.OperationMetadata value) { + if (operationMetadataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + operationMetadata_ = value; + } else { + operationMetadataBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Common metadata of the long-running operation.
+     * 
+ * + * .google.cloud.visionai.v1.OperationMetadata operation_metadata = 1; + */ + public Builder setOperationMetadata( + com.google.cloud.visionai.v1.OperationMetadata.Builder builderForValue) { + if (operationMetadataBuilder_ == null) { + operationMetadata_ = builderForValue.build(); + } else { + operationMetadataBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Common metadata of the long-running operation.
+     * 
+ * + * .google.cloud.visionai.v1.OperationMetadata operation_metadata = 1; + */ + public Builder mergeOperationMetadata(com.google.cloud.visionai.v1.OperationMetadata value) { + if (operationMetadataBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && operationMetadata_ != null + && operationMetadata_ + != com.google.cloud.visionai.v1.OperationMetadata.getDefaultInstance()) { + getOperationMetadataBuilder().mergeFrom(value); + } else { + operationMetadata_ = value; + } + } else { + operationMetadataBuilder_.mergeFrom(value); + } + if (operationMetadata_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Common metadata of the long-running operation.
+     * 
+ * + * .google.cloud.visionai.v1.OperationMetadata operation_metadata = 1; + */ + public Builder clearOperationMetadata() { + bitField0_ = (bitField0_ & ~0x00000001); + operationMetadata_ = null; + if (operationMetadataBuilder_ != null) { + operationMetadataBuilder_.dispose(); + operationMetadataBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Common metadata of the long-running operation.
+     * 
+ * + * .google.cloud.visionai.v1.OperationMetadata operation_metadata = 1; + */ + public com.google.cloud.visionai.v1.OperationMetadata.Builder getOperationMetadataBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getOperationMetadataFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Common metadata of the long-running operation.
+     * 
+ * + * .google.cloud.visionai.v1.OperationMetadata operation_metadata = 1; + */ + public com.google.cloud.visionai.v1.OperationMetadataOrBuilder getOperationMetadataOrBuilder() { + if (operationMetadataBuilder_ != null) { + return operationMetadataBuilder_.getMessageOrBuilder(); + } else { + return operationMetadata_ == null + ? com.google.cloud.visionai.v1.OperationMetadata.getDefaultInstance() + : operationMetadata_; + } + } + /** + * + * + *
+     * Common metadata of the long-running operation.
+     * 
+ * + * .google.cloud.visionai.v1.OperationMetadata operation_metadata = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.OperationMetadata, + com.google.cloud.visionai.v1.OperationMetadata.Builder, + com.google.cloud.visionai.v1.OperationMetadataOrBuilder> + getOperationMetadataFieldBuilder() { + if (operationMetadataBuilder_ == null) { + operationMetadataBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.OperationMetadata, + com.google.cloud.visionai.v1.OperationMetadata.Builder, + com.google.cloud.visionai.v1.OperationMetadataOrBuilder>( + getOperationMetadata(), getParentForChildren(), isClean()); + operationMetadata_ = null; + } + return operationMetadataBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.CreateCollectionMetadata) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.CreateCollectionMetadata) + private static final com.google.cloud.visionai.v1.CreateCollectionMetadata DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.CreateCollectionMetadata(); + } + + public static com.google.cloud.visionai.v1.CreateCollectionMetadata getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateCollectionMetadata parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.CreateCollectionMetadata getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/CreateCollectionMetadataOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/CreateCollectionMetadataOrBuilder.java new file mode 100644 index 000000000000..2f2f5d5be96a --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/CreateCollectionMetadataOrBuilder.java @@ -0,0 +1,61 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/warehouse.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface CreateCollectionMetadataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.CreateCollectionMetadata) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Common metadata of the long-running operation.
+   * 
+ * + * .google.cloud.visionai.v1.OperationMetadata operation_metadata = 1; + * + * @return Whether the operationMetadata field is set. + */ + boolean hasOperationMetadata(); + /** + * + * + *
+   * Common metadata of the long-running operation.
+   * 
+ * + * .google.cloud.visionai.v1.OperationMetadata operation_metadata = 1; + * + * @return The operationMetadata. + */ + com.google.cloud.visionai.v1.OperationMetadata getOperationMetadata(); + /** + * + * + *
+   * Common metadata of the long-running operation.
+   * 
+ * + * .google.cloud.visionai.v1.OperationMetadata operation_metadata = 1; + */ + com.google.cloud.visionai.v1.OperationMetadataOrBuilder getOperationMetadataOrBuilder(); +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/CreateCollectionRequest.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/CreateCollectionRequest.java new file mode 100644 index 000000000000..012e1340d12e --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/CreateCollectionRequest.java @@ -0,0 +1,1220 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/warehouse.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * Request message for CreateCollection.
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.CreateCollectionRequest} + */ +public final class CreateCollectionRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.CreateCollectionRequest) + CreateCollectionRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use CreateCollectionRequest.newBuilder() to construct. + private CreateCollectionRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CreateCollectionRequest() { + parent_ = ""; + collectionId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CreateCollectionRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_CreateCollectionRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_CreateCollectionRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.CreateCollectionRequest.class, + com.google.cloud.visionai.v1.CreateCollectionRequest.Builder.class); + } + + private int bitField0_; + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + /** + * + * + *
+   * Required. The parent resource where this collection will be created.
+   * Format: `projects/{project_number}/locations/{location}/corpora/{corpus}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + 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(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The parent resource where this collection will be created.
+   * Format: `projects/{project_number}/locations/{location}/corpora/{corpus}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int COLLECTION_FIELD_NUMBER = 2; + private com.google.cloud.visionai.v1.Collection collection_; + /** + * + * + *
+   * Required. The collection resource to be created.
+   * 
+ * + * + * .google.cloud.visionai.v1.Collection collection = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the collection field is set. + */ + @java.lang.Override + public boolean hasCollection() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * Required. The collection resource to be created.
+   * 
+ * + * + * .google.cloud.visionai.v1.Collection collection = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The collection. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.Collection getCollection() { + return collection_ == null + ? com.google.cloud.visionai.v1.Collection.getDefaultInstance() + : collection_; + } + /** + * + * + *
+   * Required. The collection resource to be created.
+   * 
+ * + * + * .google.cloud.visionai.v1.Collection collection = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.visionai.v1.CollectionOrBuilder getCollectionOrBuilder() { + return collection_ == null + ? com.google.cloud.visionai.v1.Collection.getDefaultInstance() + : collection_; + } + + public static final int COLLECTION_ID_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object collectionId_ = ""; + /** + * + * + *
+   * Optional. The ID to use for the collection, which will become the final
+   * component of the resource name if user choose to specify. Otherwise,
+   * collection id will be generated by system.
+   *
+   * This value should be up to 55 characters, and valid characters
+   * are /[a-z][0-9]-/. The first character must be a letter, the last could be
+   * a letter or a number.
+   * 
+ * + * optional string collection_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the collectionId field is set. + */ + @java.lang.Override + public boolean hasCollectionId() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+   * Optional. The ID to use for the collection, which will become the final
+   * component of the resource name if user choose to specify. Otherwise,
+   * collection id will be generated by system.
+   *
+   * This value should be up to 55 characters, and valid characters
+   * are /[a-z][0-9]-/. The first character must be a letter, the last could be
+   * a letter or a number.
+   * 
+ * + * optional string collection_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The collectionId. + */ + @java.lang.Override + public java.lang.String getCollectionId() { + java.lang.Object ref = collectionId_; + 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(); + collectionId_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. The ID to use for the collection, which will become the final
+   * component of the resource name if user choose to specify. Otherwise,
+   * collection id will be generated by system.
+   *
+   * This value should be up to 55 characters, and valid characters
+   * are /[a-z][0-9]-/. The first character must be a letter, the last could be
+   * a letter or a number.
+   * 
+ * + * optional string collection_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for collectionId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getCollectionIdBytes() { + java.lang.Object ref = collectionId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + collectionId_ = 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getCollection()); + } + if (((bitField0_ & 0x00000002) != 0)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, collectionId_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getCollection()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, collectionId_); + } + size += getUnknownFields().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.visionai.v1.CreateCollectionRequest)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.CreateCollectionRequest other = + (com.google.cloud.visionai.v1.CreateCollectionRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (hasCollection() != other.hasCollection()) return false; + if (hasCollection()) { + if (!getCollection().equals(other.getCollection())) return false; + } + if (hasCollectionId() != other.hasCollectionId()) return false; + if (hasCollectionId()) { + if (!getCollectionId().equals(other.getCollectionId())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + if (hasCollection()) { + hash = (37 * hash) + COLLECTION_FIELD_NUMBER; + hash = (53 * hash) + getCollection().hashCode(); + } + if (hasCollectionId()) { + hash = (37 * hash) + COLLECTION_ID_FIELD_NUMBER; + hash = (53 * hash) + getCollectionId().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.CreateCollectionRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.CreateCollectionRequest 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.visionai.v1.CreateCollectionRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.CreateCollectionRequest 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.visionai.v1.CreateCollectionRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.CreateCollectionRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.CreateCollectionRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.CreateCollectionRequest 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.visionai.v1.CreateCollectionRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.CreateCollectionRequest 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.visionai.v1.CreateCollectionRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.CreateCollectionRequest 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.visionai.v1.CreateCollectionRequest 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; + } + /** + * + * + *
+   * Request message for CreateCollection.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.CreateCollectionRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.CreateCollectionRequest) + com.google.cloud.visionai.v1.CreateCollectionRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_CreateCollectionRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_CreateCollectionRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.CreateCollectionRequest.class, + com.google.cloud.visionai.v1.CreateCollectionRequest.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.CreateCollectionRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getCollectionFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + collection_ = null; + if (collectionBuilder_ != null) { + collectionBuilder_.dispose(); + collectionBuilder_ = null; + } + collectionId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_CreateCollectionRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.CreateCollectionRequest getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.CreateCollectionRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.CreateCollectionRequest build() { + com.google.cloud.visionai.v1.CreateCollectionRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.CreateCollectionRequest buildPartial() { + com.google.cloud.visionai.v1.CreateCollectionRequest result = + new com.google.cloud.visionai.v1.CreateCollectionRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.visionai.v1.CreateCollectionRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.collection_ = collectionBuilder_ == null ? collection_ : collectionBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.collectionId_ = collectionId_; + to_bitField0_ |= 0x00000002; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.CreateCollectionRequest) { + return mergeFrom((com.google.cloud.visionai.v1.CreateCollectionRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.CreateCollectionRequest other) { + if (other == com.google.cloud.visionai.v1.CreateCollectionRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasCollection()) { + mergeCollection(other.getCollection()); + } + if (other.hasCollectionId()) { + collectionId_ = other.collectionId_; + bitField0_ |= 0x00000004; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage(getCollectionFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + collectionId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The parent resource where this collection will be created.
+     * Format: `projects/{project_number}/locations/{location}/corpora/{corpus}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The parent resource where this collection will be created.
+     * Format: `projects/{project_number}/locations/{location}/corpora/{corpus}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The parent resource where this collection will be created.
+     * Format: `projects/{project_number}/locations/{location}/corpora/{corpus}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The parent resource where this collection will be created.
+     * Format: `projects/{project_number}/locations/{location}/corpora/{corpus}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The parent resource where this collection will be created.
+     * Format: `projects/{project_number}/locations/{location}/corpora/{corpus}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.cloud.visionai.v1.Collection collection_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.Collection, + com.google.cloud.visionai.v1.Collection.Builder, + com.google.cloud.visionai.v1.CollectionOrBuilder> + collectionBuilder_; + /** + * + * + *
+     * Required. The collection resource to be created.
+     * 
+ * + * + * .google.cloud.visionai.v1.Collection collection = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the collection field is set. + */ + public boolean hasCollection() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * Required. The collection resource to be created.
+     * 
+ * + * + * .google.cloud.visionai.v1.Collection collection = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The collection. + */ + public com.google.cloud.visionai.v1.Collection getCollection() { + if (collectionBuilder_ == null) { + return collection_ == null + ? com.google.cloud.visionai.v1.Collection.getDefaultInstance() + : collection_; + } else { + return collectionBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The collection resource to be created.
+     * 
+ * + * + * .google.cloud.visionai.v1.Collection collection = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setCollection(com.google.cloud.visionai.v1.Collection value) { + if (collectionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + collection_ = value; + } else { + collectionBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The collection resource to be created.
+     * 
+ * + * + * .google.cloud.visionai.v1.Collection collection = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setCollection(com.google.cloud.visionai.v1.Collection.Builder builderForValue) { + if (collectionBuilder_ == null) { + collection_ = builderForValue.build(); + } else { + collectionBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The collection resource to be created.
+     * 
+ * + * + * .google.cloud.visionai.v1.Collection collection = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeCollection(com.google.cloud.visionai.v1.Collection value) { + if (collectionBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && collection_ != null + && collection_ != com.google.cloud.visionai.v1.Collection.getDefaultInstance()) { + getCollectionBuilder().mergeFrom(value); + } else { + collection_ = value; + } + } else { + collectionBuilder_.mergeFrom(value); + } + if (collection_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Required. The collection resource to be created.
+     * 
+ * + * + * .google.cloud.visionai.v1.Collection collection = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearCollection() { + bitField0_ = (bitField0_ & ~0x00000002); + collection_ = null; + if (collectionBuilder_ != null) { + collectionBuilder_.dispose(); + collectionBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The collection resource to be created.
+     * 
+ * + * + * .google.cloud.visionai.v1.Collection collection = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.visionai.v1.Collection.Builder getCollectionBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getCollectionFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The collection resource to be created.
+     * 
+ * + * + * .google.cloud.visionai.v1.Collection collection = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.visionai.v1.CollectionOrBuilder getCollectionOrBuilder() { + if (collectionBuilder_ != null) { + return collectionBuilder_.getMessageOrBuilder(); + } else { + return collection_ == null + ? com.google.cloud.visionai.v1.Collection.getDefaultInstance() + : collection_; + } + } + /** + * + * + *
+     * Required. The collection resource to be created.
+     * 
+ * + * + * .google.cloud.visionai.v1.Collection collection = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.Collection, + com.google.cloud.visionai.v1.Collection.Builder, + com.google.cloud.visionai.v1.CollectionOrBuilder> + getCollectionFieldBuilder() { + if (collectionBuilder_ == null) { + collectionBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.Collection, + com.google.cloud.visionai.v1.Collection.Builder, + com.google.cloud.visionai.v1.CollectionOrBuilder>( + getCollection(), getParentForChildren(), isClean()); + collection_ = null; + } + return collectionBuilder_; + } + + private java.lang.Object collectionId_ = ""; + /** + * + * + *
+     * Optional. The ID to use for the collection, which will become the final
+     * component of the resource name if user choose to specify. Otherwise,
+     * collection id will be generated by system.
+     *
+     * This value should be up to 55 characters, and valid characters
+     * are /[a-z][0-9]-/. The first character must be a letter, the last could be
+     * a letter or a number.
+     * 
+ * + * optional string collection_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the collectionId field is set. + */ + public boolean hasCollectionId() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+     * Optional. The ID to use for the collection, which will become the final
+     * component of the resource name if user choose to specify. Otherwise,
+     * collection id will be generated by system.
+     *
+     * This value should be up to 55 characters, and valid characters
+     * are /[a-z][0-9]-/. The first character must be a letter, the last could be
+     * a letter or a number.
+     * 
+ * + * optional string collection_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The collectionId. + */ + public java.lang.String getCollectionId() { + java.lang.Object ref = collectionId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + collectionId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. The ID to use for the collection, which will become the final
+     * component of the resource name if user choose to specify. Otherwise,
+     * collection id will be generated by system.
+     *
+     * This value should be up to 55 characters, and valid characters
+     * are /[a-z][0-9]-/. The first character must be a letter, the last could be
+     * a letter or a number.
+     * 
+ * + * optional string collection_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for collectionId. + */ + public com.google.protobuf.ByteString getCollectionIdBytes() { + java.lang.Object ref = collectionId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + collectionId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. The ID to use for the collection, which will become the final
+     * component of the resource name if user choose to specify. Otherwise,
+     * collection id will be generated by system.
+     *
+     * This value should be up to 55 characters, and valid characters
+     * are /[a-z][0-9]-/. The first character must be a letter, the last could be
+     * a letter or a number.
+     * 
+ * + * optional string collection_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The collectionId to set. + * @return This builder for chaining. + */ + public Builder setCollectionId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + collectionId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The ID to use for the collection, which will become the final
+     * component of the resource name if user choose to specify. Otherwise,
+     * collection id will be generated by system.
+     *
+     * This value should be up to 55 characters, and valid characters
+     * are /[a-z][0-9]-/. The first character must be a letter, the last could be
+     * a letter or a number.
+     * 
+ * + * optional string collection_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearCollectionId() { + collectionId_ = getDefaultInstance().getCollectionId(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The ID to use for the collection, which will become the final
+     * component of the resource name if user choose to specify. Otherwise,
+     * collection id will be generated by system.
+     *
+     * This value should be up to 55 characters, and valid characters
+     * are /[a-z][0-9]-/. The first character must be a letter, the last could be
+     * a letter or a number.
+     * 
+ * + * optional string collection_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for collectionId to set. + * @return This builder for chaining. + */ + public Builder setCollectionIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + collectionId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.CreateCollectionRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.CreateCollectionRequest) + private static final com.google.cloud.visionai.v1.CreateCollectionRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.CreateCollectionRequest(); + } + + public static com.google.cloud.visionai.v1.CreateCollectionRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateCollectionRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.CreateCollectionRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/CreateCollectionRequestOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/CreateCollectionRequestOrBuilder.java new file mode 100644 index 000000000000..e7dc7b1f11fd --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/CreateCollectionRequestOrBuilder.java @@ -0,0 +1,153 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/warehouse.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface CreateCollectionRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.CreateCollectionRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The parent resource where this collection will be created.
+   * Format: `projects/{project_number}/locations/{location}/corpora/{corpus}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The parent resource where this collection will be created.
+   * Format: `projects/{project_number}/locations/{location}/corpora/{corpus}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Required. The collection resource to be created.
+   * 
+ * + * + * .google.cloud.visionai.v1.Collection collection = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the collection field is set. + */ + boolean hasCollection(); + /** + * + * + *
+   * Required. The collection resource to be created.
+   * 
+ * + * + * .google.cloud.visionai.v1.Collection collection = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The collection. + */ + com.google.cloud.visionai.v1.Collection getCollection(); + /** + * + * + *
+   * Required. The collection resource to be created.
+   * 
+ * + * + * .google.cloud.visionai.v1.Collection collection = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.visionai.v1.CollectionOrBuilder getCollectionOrBuilder(); + + /** + * + * + *
+   * Optional. The ID to use for the collection, which will become the final
+   * component of the resource name if user choose to specify. Otherwise,
+   * collection id will be generated by system.
+   *
+   * This value should be up to 55 characters, and valid characters
+   * are /[a-z][0-9]-/. The first character must be a letter, the last could be
+   * a letter or a number.
+   * 
+ * + * optional string collection_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the collectionId field is set. + */ + boolean hasCollectionId(); + /** + * + * + *
+   * Optional. The ID to use for the collection, which will become the final
+   * component of the resource name if user choose to specify. Otherwise,
+   * collection id will be generated by system.
+   *
+   * This value should be up to 55 characters, and valid characters
+   * are /[a-z][0-9]-/. The first character must be a letter, the last could be
+   * a letter or a number.
+   * 
+ * + * optional string collection_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The collectionId. + */ + java.lang.String getCollectionId(); + /** + * + * + *
+   * Optional. The ID to use for the collection, which will become the final
+   * component of the resource name if user choose to specify. Otherwise,
+   * collection id will be generated by system.
+   *
+   * This value should be up to 55 characters, and valid characters
+   * are /[a-z][0-9]-/. The first character must be a letter, the last could be
+   * a letter or a number.
+   * 
+ * + * optional string collection_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for collectionId. + */ + com.google.protobuf.ByteString getCollectionIdBytes(); +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/CreateCorpusMetadata.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/CreateCorpusMetadata.java new file mode 100644 index 000000000000..7203cb4b4c81 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/CreateCorpusMetadata.java @@ -0,0 +1,981 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/warehouse.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * Metadata for CreateCorpus API.
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.CreateCorpusMetadata} + */ +public final class CreateCorpusMetadata extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.CreateCorpusMetadata) + CreateCorpusMetadataOrBuilder { + private static final long serialVersionUID = 0L; + // Use CreateCorpusMetadata.newBuilder() to construct. + private CreateCorpusMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CreateCorpusMetadata() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CreateCorpusMetadata(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_CreateCorpusMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_CreateCorpusMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.CreateCorpusMetadata.class, + com.google.cloud.visionai.v1.CreateCorpusMetadata.Builder.class); + } + + private int bitField0_; + public static final int CREATE_TIME_FIELD_NUMBER = 2; + private com.google.protobuf.Timestamp createTime_; + /** + * + * + *
+   * The create time of the create corpus operation.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2; + * + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * The create time of the create corpus operation.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2; + * + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + /** + * + * + *
+   * The create time of the create corpus operation.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + + public static final int UPDATE_TIME_FIELD_NUMBER = 3; + private com.google.protobuf.Timestamp updateTime_; + /** + * + * + *
+   * The update time of the create corpus operation.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3; + * + * @return Whether the updateTime field is set. + */ + @java.lang.Override + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+   * The update time of the create corpus operation.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3; + * + * @return The updateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getUpdateTime() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + /** + * + * + *
+   * The update time of the create corpus operation.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + + 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 (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getCreateTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(3, getUpdateTime()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getCreateTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getUpdateTime()); + } + size += getUnknownFields().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.visionai.v1.CreateCorpusMetadata)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.CreateCorpusMetadata other = + (com.google.cloud.visionai.v1.CreateCorpusMetadata) obj; + + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime().equals(other.getCreateTime())) return false; + } + if (hasUpdateTime() != other.hasUpdateTime()) return false; + if (hasUpdateTime()) { + if (!getUpdateTime().equals(other.getUpdateTime())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasUpdateTime()) { + hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getUpdateTime().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.CreateCorpusMetadata parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.CreateCorpusMetadata 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.visionai.v1.CreateCorpusMetadata parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.CreateCorpusMetadata 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.visionai.v1.CreateCorpusMetadata parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.CreateCorpusMetadata parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.CreateCorpusMetadata parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.CreateCorpusMetadata 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.visionai.v1.CreateCorpusMetadata parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.CreateCorpusMetadata 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.visionai.v1.CreateCorpusMetadata parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.CreateCorpusMetadata 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.visionai.v1.CreateCorpusMetadata 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; + } + /** + * + * + *
+   * Metadata for CreateCorpus API.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.CreateCorpusMetadata} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.CreateCorpusMetadata) + com.google.cloud.visionai.v1.CreateCorpusMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_CreateCorpusMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_CreateCorpusMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.CreateCorpusMetadata.class, + com.google.cloud.visionai.v1.CreateCorpusMetadata.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.CreateCorpusMetadata.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getCreateTimeFieldBuilder(); + getUpdateTimeFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_CreateCorpusMetadata_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.CreateCorpusMetadata getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.CreateCorpusMetadata.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.CreateCorpusMetadata build() { + com.google.cloud.visionai.v1.CreateCorpusMetadata result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.CreateCorpusMetadata buildPartial() { + com.google.cloud.visionai.v1.CreateCorpusMetadata result = + new com.google.cloud.visionai.v1.CreateCorpusMetadata(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.visionai.v1.CreateCorpusMetadata result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.updateTime_ = updateTimeBuilder_ == null ? updateTime_ : updateTimeBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.CreateCorpusMetadata) { + return mergeFrom((com.google.cloud.visionai.v1.CreateCorpusMetadata) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.CreateCorpusMetadata other) { + if (other == com.google.cloud.visionai.v1.CreateCorpusMetadata.getDefaultInstance()) + return this; + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 18: + { + input.readMessage(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 18 + case 26: + { + input.readMessage(getUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + createTimeBuilder_; + /** + * + * + *
+     * The create time of the create corpus operation.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 2; + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * The create time of the create corpus operation.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 2; + * + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The create time of the create corpus operation.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 2; + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + } else { + createTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The create time of the create corpus operation.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 2; + */ + public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The create time of the create corpus operation.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 2; + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && createTime_ != null + && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getCreateTimeBuilder().mergeFrom(value); + } else { + createTime_ = value; + } + } else { + createTimeBuilder_.mergeFrom(value); + } + if (createTime_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + /** + * + * + *
+     * The create time of the create corpus operation.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 2; + */ + public Builder clearCreateTime() { + bitField0_ = (bitField0_ & ~0x00000001); + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * The create time of the create corpus operation.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 2; + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The create time of the create corpus operation.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 2; + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } + } + /** + * + * + *
+     * The create time of the create corpus operation.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), getParentForChildren(), isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private com.google.protobuf.Timestamp updateTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + updateTimeBuilder_; + /** + * + * + *
+     * The update time of the create corpus operation.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 3; + * + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * The update time of the create corpus operation.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 3; + * + * @return The updateTime. + */ + public com.google.protobuf.Timestamp getUpdateTime() { + if (updateTimeBuilder_ == null) { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } else { + return updateTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The update time of the create corpus operation.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 3; + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateTime_ = value; + } else { + updateTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * The update time of the create corpus operation.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 3; + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (updateTimeBuilder_ == null) { + updateTime_ = builderForValue.build(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * The update time of the create corpus operation.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 3; + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && updateTime_ != null + && updateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getUpdateTimeBuilder().mergeFrom(value); + } else { + updateTime_ = value; + } + } else { + updateTimeBuilder_.mergeFrom(value); + } + if (updateTime_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + /** + * + * + *
+     * The update time of the create corpus operation.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 3; + */ + public Builder clearUpdateTime() { + bitField0_ = (bitField0_ & ~0x00000002); + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * The update time of the create corpus operation.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 3; + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getUpdateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The update time of the create corpus operation.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 3; + */ + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + if (updateTimeBuilder_ != null) { + return updateTimeBuilder_.getMessageOrBuilder(); + } else { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } + } + /** + * + * + *
+     * The update time of the create corpus operation.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 3; + */ + 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.setUnknownFields(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.visionai.v1.CreateCorpusMetadata) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.CreateCorpusMetadata) + private static final com.google.cloud.visionai.v1.CreateCorpusMetadata DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.CreateCorpusMetadata(); + } + + public static com.google.cloud.visionai.v1.CreateCorpusMetadata getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateCorpusMetadata parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.CreateCorpusMetadata getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/CreateCorpusMetadataOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/CreateCorpusMetadataOrBuilder.java new file mode 100644 index 000000000000..18e33fb648de --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/CreateCorpusMetadataOrBuilder.java @@ -0,0 +1,96 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/warehouse.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface CreateCorpusMetadataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.CreateCorpusMetadata) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The create time of the create corpus operation.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2; + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + /** + * + * + *
+   * The create time of the create corpus operation.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2; + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + * + * + *
+   * The create time of the create corpus operation.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2; + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * The update time of the create corpus operation.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3; + * + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + /** + * + * + *
+   * The update time of the create corpus operation.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3; + * + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + /** + * + * + *
+   * The update time of the create corpus operation.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3; + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/CreateCorpusRequest.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/CreateCorpusRequest.java new file mode 100644 index 000000000000..bb5477b5baa4 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/CreateCorpusRequest.java @@ -0,0 +1,908 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/warehouse.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * Request message of CreateCorpus API.
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.CreateCorpusRequest} + */ +public final class CreateCorpusRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.CreateCorpusRequest) + CreateCorpusRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use CreateCorpusRequest.newBuilder() to construct. + private CreateCorpusRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CreateCorpusRequest() { + parent_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CreateCorpusRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_CreateCorpusRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_CreateCorpusRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.CreateCorpusRequest.class, + com.google.cloud.visionai.v1.CreateCorpusRequest.Builder.class); + } + + private int bitField0_; + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + /** + * + * + *
+   * Required. Form: `projects/{project_number}/locations/{location_id}`
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + 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(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Form: `projects/{project_number}/locations/{location_id}`
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CORPUS_FIELD_NUMBER = 2; + private com.google.cloud.visionai.v1.Corpus corpus_; + /** + * + * + *
+   * Required. The corpus to be created.
+   * 
+ * + * .google.cloud.visionai.v1.Corpus corpus = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the corpus field is set. + */ + @java.lang.Override + public boolean hasCorpus() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * Required. The corpus to be created.
+   * 
+ * + * .google.cloud.visionai.v1.Corpus corpus = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The corpus. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.Corpus getCorpus() { + return corpus_ == null ? com.google.cloud.visionai.v1.Corpus.getDefaultInstance() : corpus_; + } + /** + * + * + *
+   * Required. The corpus to be created.
+   * 
+ * + * .google.cloud.visionai.v1.Corpus corpus = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.visionai.v1.CorpusOrBuilder getCorpusOrBuilder() { + return corpus_ == null ? com.google.cloud.visionai.v1.Corpus.getDefaultInstance() : corpus_; + } + + 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getCorpus()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getCorpus()); + } + size += getUnknownFields().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.visionai.v1.CreateCorpusRequest)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.CreateCorpusRequest other = + (com.google.cloud.visionai.v1.CreateCorpusRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (hasCorpus() != other.hasCorpus()) return false; + if (hasCorpus()) { + if (!getCorpus().equals(other.getCorpus())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + if (hasCorpus()) { + hash = (37 * hash) + CORPUS_FIELD_NUMBER; + hash = (53 * hash) + getCorpus().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.CreateCorpusRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.CreateCorpusRequest 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.visionai.v1.CreateCorpusRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.CreateCorpusRequest 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.visionai.v1.CreateCorpusRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.CreateCorpusRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.CreateCorpusRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.CreateCorpusRequest 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.visionai.v1.CreateCorpusRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.CreateCorpusRequest 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.visionai.v1.CreateCorpusRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.CreateCorpusRequest 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.visionai.v1.CreateCorpusRequest 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; + } + /** + * + * + *
+   * Request message of CreateCorpus API.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.CreateCorpusRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.CreateCorpusRequest) + com.google.cloud.visionai.v1.CreateCorpusRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_CreateCorpusRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_CreateCorpusRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.CreateCorpusRequest.class, + com.google.cloud.visionai.v1.CreateCorpusRequest.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.CreateCorpusRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getCorpusFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + corpus_ = null; + if (corpusBuilder_ != null) { + corpusBuilder_.dispose(); + corpusBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_CreateCorpusRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.CreateCorpusRequest getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.CreateCorpusRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.CreateCorpusRequest build() { + com.google.cloud.visionai.v1.CreateCorpusRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.CreateCorpusRequest buildPartial() { + com.google.cloud.visionai.v1.CreateCorpusRequest result = + new com.google.cloud.visionai.v1.CreateCorpusRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.visionai.v1.CreateCorpusRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.corpus_ = corpusBuilder_ == null ? corpus_ : corpusBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.CreateCorpusRequest) { + return mergeFrom((com.google.cloud.visionai.v1.CreateCorpusRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.CreateCorpusRequest other) { + if (other == com.google.cloud.visionai.v1.CreateCorpusRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasCorpus()) { + mergeCorpus(other.getCorpus()); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage(getCorpusFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. Form: `projects/{project_number}/locations/{location_id}`
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Form: `projects/{project_number}/locations/{location_id}`
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Form: `projects/{project_number}/locations/{location_id}`
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Form: `projects/{project_number}/locations/{location_id}`
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Form: `projects/{project_number}/locations/{location_id}`
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.cloud.visionai.v1.Corpus corpus_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.Corpus, + com.google.cloud.visionai.v1.Corpus.Builder, + com.google.cloud.visionai.v1.CorpusOrBuilder> + corpusBuilder_; + /** + * + * + *
+     * Required. The corpus to be created.
+     * 
+ * + * .google.cloud.visionai.v1.Corpus corpus = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the corpus field is set. + */ + public boolean hasCorpus() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * Required. The corpus to be created.
+     * 
+ * + * .google.cloud.visionai.v1.Corpus corpus = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The corpus. + */ + public com.google.cloud.visionai.v1.Corpus getCorpus() { + if (corpusBuilder_ == null) { + return corpus_ == null ? com.google.cloud.visionai.v1.Corpus.getDefaultInstance() : corpus_; + } else { + return corpusBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The corpus to be created.
+     * 
+ * + * .google.cloud.visionai.v1.Corpus corpus = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setCorpus(com.google.cloud.visionai.v1.Corpus value) { + if (corpusBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + corpus_ = value; + } else { + corpusBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The corpus to be created.
+     * 
+ * + * .google.cloud.visionai.v1.Corpus corpus = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setCorpus(com.google.cloud.visionai.v1.Corpus.Builder builderForValue) { + if (corpusBuilder_ == null) { + corpus_ = builderForValue.build(); + } else { + corpusBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The corpus to be created.
+     * 
+ * + * .google.cloud.visionai.v1.Corpus corpus = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeCorpus(com.google.cloud.visionai.v1.Corpus value) { + if (corpusBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && corpus_ != null + && corpus_ != com.google.cloud.visionai.v1.Corpus.getDefaultInstance()) { + getCorpusBuilder().mergeFrom(value); + } else { + corpus_ = value; + } + } else { + corpusBuilder_.mergeFrom(value); + } + if (corpus_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Required. The corpus to be created.
+     * 
+ * + * .google.cloud.visionai.v1.Corpus corpus = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearCorpus() { + bitField0_ = (bitField0_ & ~0x00000002); + corpus_ = null; + if (corpusBuilder_ != null) { + corpusBuilder_.dispose(); + corpusBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The corpus to be created.
+     * 
+ * + * .google.cloud.visionai.v1.Corpus corpus = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.visionai.v1.Corpus.Builder getCorpusBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getCorpusFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The corpus to be created.
+     * 
+ * + * .google.cloud.visionai.v1.Corpus corpus = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.visionai.v1.CorpusOrBuilder getCorpusOrBuilder() { + if (corpusBuilder_ != null) { + return corpusBuilder_.getMessageOrBuilder(); + } else { + return corpus_ == null ? com.google.cloud.visionai.v1.Corpus.getDefaultInstance() : corpus_; + } + } + /** + * + * + *
+     * Required. The corpus to be created.
+     * 
+ * + * .google.cloud.visionai.v1.Corpus corpus = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.Corpus, + com.google.cloud.visionai.v1.Corpus.Builder, + com.google.cloud.visionai.v1.CorpusOrBuilder> + getCorpusFieldBuilder() { + if (corpusBuilder_ == null) { + corpusBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.Corpus, + com.google.cloud.visionai.v1.Corpus.Builder, + com.google.cloud.visionai.v1.CorpusOrBuilder>( + getCorpus(), getParentForChildren(), isClean()); + corpus_ = null; + } + return corpusBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.CreateCorpusRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.CreateCorpusRequest) + private static final com.google.cloud.visionai.v1.CreateCorpusRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.CreateCorpusRequest(); + } + + public static com.google.cloud.visionai.v1.CreateCorpusRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateCorpusRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.CreateCorpusRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/CreateCorpusRequestOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/CreateCorpusRequestOrBuilder.java new file mode 100644 index 000000000000..bb22d85271cd --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/CreateCorpusRequestOrBuilder.java @@ -0,0 +1,89 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/warehouse.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface CreateCorpusRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.CreateCorpusRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Form: `projects/{project_number}/locations/{location_id}`
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. Form: `projects/{project_number}/locations/{location_id}`
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Required. The corpus to be created.
+   * 
+ * + * .google.cloud.visionai.v1.Corpus corpus = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the corpus field is set. + */ + boolean hasCorpus(); + /** + * + * + *
+   * Required. The corpus to be created.
+   * 
+ * + * .google.cloud.visionai.v1.Corpus corpus = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The corpus. + */ + com.google.cloud.visionai.v1.Corpus getCorpus(); + /** + * + * + *
+   * Required. The corpus to be created.
+   * 
+ * + * .google.cloud.visionai.v1.Corpus corpus = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.visionai.v1.CorpusOrBuilder getCorpusOrBuilder(); +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/CreateDataSchemaRequest.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/CreateDataSchemaRequest.java new file mode 100644 index 000000000000..2c4195528241 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/CreateDataSchemaRequest.java @@ -0,0 +1,956 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/warehouse.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * Request message for CreateDataSchema.
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.CreateDataSchemaRequest} + */ +public final class CreateDataSchemaRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.CreateDataSchemaRequest) + CreateDataSchemaRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use CreateDataSchemaRequest.newBuilder() to construct. + private CreateDataSchemaRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CreateDataSchemaRequest() { + parent_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CreateDataSchemaRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_CreateDataSchemaRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_CreateDataSchemaRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.CreateDataSchemaRequest.class, + com.google.cloud.visionai.v1.CreateDataSchemaRequest.Builder.class); + } + + private int bitField0_; + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + /** + * + * + *
+   * Required. The parent resource where this data schema will be created.
+   * Format:
+   * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + 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(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The parent resource where this data schema will be created.
+   * Format:
+   * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DATA_SCHEMA_FIELD_NUMBER = 2; + private com.google.cloud.visionai.v1.DataSchema dataSchema_; + /** + * + * + *
+   * Required. The data schema to create.
+   * 
+ * + * + * .google.cloud.visionai.v1.DataSchema data_schema = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the dataSchema field is set. + */ + @java.lang.Override + public boolean hasDataSchema() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * Required. The data schema to create.
+   * 
+ * + * + * .google.cloud.visionai.v1.DataSchema data_schema = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The dataSchema. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.DataSchema getDataSchema() { + return dataSchema_ == null + ? com.google.cloud.visionai.v1.DataSchema.getDefaultInstance() + : dataSchema_; + } + /** + * + * + *
+   * Required. The data schema to create.
+   * 
+ * + * + * .google.cloud.visionai.v1.DataSchema data_schema = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.visionai.v1.DataSchemaOrBuilder getDataSchemaOrBuilder() { + return dataSchema_ == null + ? com.google.cloud.visionai.v1.DataSchema.getDefaultInstance() + : dataSchema_; + } + + 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getDataSchema()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getDataSchema()); + } + size += getUnknownFields().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.visionai.v1.CreateDataSchemaRequest)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.CreateDataSchemaRequest other = + (com.google.cloud.visionai.v1.CreateDataSchemaRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (hasDataSchema() != other.hasDataSchema()) return false; + if (hasDataSchema()) { + if (!getDataSchema().equals(other.getDataSchema())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + if (hasDataSchema()) { + hash = (37 * hash) + DATA_SCHEMA_FIELD_NUMBER; + hash = (53 * hash) + getDataSchema().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.CreateDataSchemaRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.CreateDataSchemaRequest 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.visionai.v1.CreateDataSchemaRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.CreateDataSchemaRequest 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.visionai.v1.CreateDataSchemaRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.CreateDataSchemaRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.CreateDataSchemaRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.CreateDataSchemaRequest 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.visionai.v1.CreateDataSchemaRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.CreateDataSchemaRequest 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.visionai.v1.CreateDataSchemaRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.CreateDataSchemaRequest 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.visionai.v1.CreateDataSchemaRequest 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; + } + /** + * + * + *
+   * Request message for CreateDataSchema.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.CreateDataSchemaRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.CreateDataSchemaRequest) + com.google.cloud.visionai.v1.CreateDataSchemaRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_CreateDataSchemaRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_CreateDataSchemaRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.CreateDataSchemaRequest.class, + com.google.cloud.visionai.v1.CreateDataSchemaRequest.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.CreateDataSchemaRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getDataSchemaFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + dataSchema_ = null; + if (dataSchemaBuilder_ != null) { + dataSchemaBuilder_.dispose(); + dataSchemaBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_CreateDataSchemaRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.CreateDataSchemaRequest getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.CreateDataSchemaRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.CreateDataSchemaRequest build() { + com.google.cloud.visionai.v1.CreateDataSchemaRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.CreateDataSchemaRequest buildPartial() { + com.google.cloud.visionai.v1.CreateDataSchemaRequest result = + new com.google.cloud.visionai.v1.CreateDataSchemaRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.visionai.v1.CreateDataSchemaRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.dataSchema_ = dataSchemaBuilder_ == null ? dataSchema_ : dataSchemaBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.CreateDataSchemaRequest) { + return mergeFrom((com.google.cloud.visionai.v1.CreateDataSchemaRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.CreateDataSchemaRequest other) { + if (other == com.google.cloud.visionai.v1.CreateDataSchemaRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasDataSchema()) { + mergeDataSchema(other.getDataSchema()); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage(getDataSchemaFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The parent resource where this data schema will be created.
+     * Format:
+     * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The parent resource where this data schema will be created.
+     * Format:
+     * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The parent resource where this data schema will be created.
+     * Format:
+     * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The parent resource where this data schema will be created.
+     * Format:
+     * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The parent resource where this data schema will be created.
+     * Format:
+     * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.cloud.visionai.v1.DataSchema dataSchema_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.DataSchema, + com.google.cloud.visionai.v1.DataSchema.Builder, + com.google.cloud.visionai.v1.DataSchemaOrBuilder> + dataSchemaBuilder_; + /** + * + * + *
+     * Required. The data schema to create.
+     * 
+ * + * + * .google.cloud.visionai.v1.DataSchema data_schema = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the dataSchema field is set. + */ + public boolean hasDataSchema() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * Required. The data schema to create.
+     * 
+ * + * + * .google.cloud.visionai.v1.DataSchema data_schema = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The dataSchema. + */ + public com.google.cloud.visionai.v1.DataSchema getDataSchema() { + if (dataSchemaBuilder_ == null) { + return dataSchema_ == null + ? com.google.cloud.visionai.v1.DataSchema.getDefaultInstance() + : dataSchema_; + } else { + return dataSchemaBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The data schema to create.
+     * 
+ * + * + * .google.cloud.visionai.v1.DataSchema data_schema = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setDataSchema(com.google.cloud.visionai.v1.DataSchema value) { + if (dataSchemaBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + dataSchema_ = value; + } else { + dataSchemaBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The data schema to create.
+     * 
+ * + * + * .google.cloud.visionai.v1.DataSchema data_schema = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setDataSchema(com.google.cloud.visionai.v1.DataSchema.Builder builderForValue) { + if (dataSchemaBuilder_ == null) { + dataSchema_ = builderForValue.build(); + } else { + dataSchemaBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The data schema to create.
+     * 
+ * + * + * .google.cloud.visionai.v1.DataSchema data_schema = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeDataSchema(com.google.cloud.visionai.v1.DataSchema value) { + if (dataSchemaBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && dataSchema_ != null + && dataSchema_ != com.google.cloud.visionai.v1.DataSchema.getDefaultInstance()) { + getDataSchemaBuilder().mergeFrom(value); + } else { + dataSchema_ = value; + } + } else { + dataSchemaBuilder_.mergeFrom(value); + } + if (dataSchema_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Required. The data schema to create.
+     * 
+ * + * + * .google.cloud.visionai.v1.DataSchema data_schema = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearDataSchema() { + bitField0_ = (bitField0_ & ~0x00000002); + dataSchema_ = null; + if (dataSchemaBuilder_ != null) { + dataSchemaBuilder_.dispose(); + dataSchemaBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The data schema to create.
+     * 
+ * + * + * .google.cloud.visionai.v1.DataSchema data_schema = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.visionai.v1.DataSchema.Builder getDataSchemaBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getDataSchemaFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The data schema to create.
+     * 
+ * + * + * .google.cloud.visionai.v1.DataSchema data_schema = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.visionai.v1.DataSchemaOrBuilder getDataSchemaOrBuilder() { + if (dataSchemaBuilder_ != null) { + return dataSchemaBuilder_.getMessageOrBuilder(); + } else { + return dataSchema_ == null + ? com.google.cloud.visionai.v1.DataSchema.getDefaultInstance() + : dataSchema_; + } + } + /** + * + * + *
+     * Required. The data schema to create.
+     * 
+ * + * + * .google.cloud.visionai.v1.DataSchema data_schema = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.DataSchema, + com.google.cloud.visionai.v1.DataSchema.Builder, + com.google.cloud.visionai.v1.DataSchemaOrBuilder> + getDataSchemaFieldBuilder() { + if (dataSchemaBuilder_ == null) { + dataSchemaBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.DataSchema, + com.google.cloud.visionai.v1.DataSchema.Builder, + com.google.cloud.visionai.v1.DataSchemaOrBuilder>( + getDataSchema(), getParentForChildren(), isClean()); + dataSchema_ = null; + } + return dataSchemaBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.CreateDataSchemaRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.CreateDataSchemaRequest) + private static final com.google.cloud.visionai.v1.CreateDataSchemaRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.CreateDataSchemaRequest(); + } + + public static com.google.cloud.visionai.v1.CreateDataSchemaRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateDataSchemaRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.CreateDataSchemaRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/CreateDataSchemaRequestOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/CreateDataSchemaRequestOrBuilder.java new file mode 100644 index 000000000000..a363478c54d6 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/CreateDataSchemaRequestOrBuilder.java @@ -0,0 +1,100 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/warehouse.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface CreateDataSchemaRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.CreateDataSchemaRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The parent resource where this data schema will be created.
+   * Format:
+   * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The parent resource where this data schema will be created.
+   * Format:
+   * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Required. The data schema to create.
+   * 
+ * + * + * .google.cloud.visionai.v1.DataSchema data_schema = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the dataSchema field is set. + */ + boolean hasDataSchema(); + /** + * + * + *
+   * Required. The data schema to create.
+   * 
+ * + * + * .google.cloud.visionai.v1.DataSchema data_schema = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The dataSchema. + */ + com.google.cloud.visionai.v1.DataSchema getDataSchema(); + /** + * + * + *
+   * Required. The data schema to create.
+   * 
+ * + * + * .google.cloud.visionai.v1.DataSchema data_schema = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.visionai.v1.DataSchemaOrBuilder getDataSchemaOrBuilder(); +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/CreateDraftRequest.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/CreateDraftRequest.java new file mode 100644 index 000000000000..6653ab9b3313 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/CreateDraftRequest.java @@ -0,0 +1,1370 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/platform.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * Message for creating a Draft.
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.CreateDraftRequest} + */ +public final class CreateDraftRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.CreateDraftRequest) + CreateDraftRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use CreateDraftRequest.newBuilder() to construct. + private CreateDraftRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CreateDraftRequest() { + parent_ = ""; + draftId_ = ""; + requestId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CreateDraftRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_CreateDraftRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_CreateDraftRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.CreateDraftRequest.class, + com.google.cloud.visionai.v1.CreateDraftRequest.Builder.class); + } + + private int bitField0_; + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + /** + * + * + *
+   * Required. Value for parent.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + 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(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Value for parent.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DRAFT_ID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object draftId_ = ""; + /** + * + * + *
+   * Required. Id of the requesting object.
+   * 
+ * + * string draft_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The draftId. + */ + @java.lang.Override + public java.lang.String getDraftId() { + java.lang.Object ref = draftId_; + 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(); + draftId_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Id of the requesting object.
+   * 
+ * + * string draft_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for draftId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDraftIdBytes() { + java.lang.Object ref = draftId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + draftId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DRAFT_FIELD_NUMBER = 3; + private com.google.cloud.visionai.v1.Draft draft_; + /** + * + * + *
+   * Required. The resource being created.
+   * 
+ * + * .google.cloud.visionai.v1.Draft draft = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the draft field is set. + */ + @java.lang.Override + public boolean hasDraft() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * Required. The resource being created.
+   * 
+ * + * .google.cloud.visionai.v1.Draft draft = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The draft. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.Draft getDraft() { + return draft_ == null ? com.google.cloud.visionai.v1.Draft.getDefaultInstance() : draft_; + } + /** + * + * + *
+   * Required. The resource being created.
+   * 
+ * + * .google.cloud.visionai.v1.Draft draft = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.visionai.v1.DraftOrBuilder getDraftOrBuilder() { + return draft_ == null ? com.google.cloud.visionai.v1.Draft.getDefaultInstance() : draft_; + } + + public static final int REQUEST_ID_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object requestId_ = ""; + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and
+   * the request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + @java.lang.Override + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + 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(); + requestId_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and
+   * the request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(draftId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, draftId_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(3, getDraft()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, requestId_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(draftId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, draftId_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getDraft()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, requestId_); + } + size += getUnknownFields().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.visionai.v1.CreateDraftRequest)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.CreateDraftRequest other = + (com.google.cloud.visionai.v1.CreateDraftRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (!getDraftId().equals(other.getDraftId())) return false; + if (hasDraft() != other.hasDraft()) return false; + if (hasDraft()) { + if (!getDraft().equals(other.getDraft())) return false; + } + if (!getRequestId().equals(other.getRequestId())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + DRAFT_ID_FIELD_NUMBER; + hash = (53 * hash) + getDraftId().hashCode(); + if (hasDraft()) { + hash = (37 * hash) + DRAFT_FIELD_NUMBER; + hash = (53 * hash) + getDraft().hashCode(); + } + hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; + hash = (53 * hash) + getRequestId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.CreateDraftRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.CreateDraftRequest 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.visionai.v1.CreateDraftRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.CreateDraftRequest 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.visionai.v1.CreateDraftRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.CreateDraftRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.CreateDraftRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.CreateDraftRequest 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.visionai.v1.CreateDraftRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.CreateDraftRequest 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.visionai.v1.CreateDraftRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.CreateDraftRequest 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.visionai.v1.CreateDraftRequest 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; + } + /** + * + * + *
+   * Message for creating a Draft.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.CreateDraftRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.CreateDraftRequest) + com.google.cloud.visionai.v1.CreateDraftRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_CreateDraftRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_CreateDraftRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.CreateDraftRequest.class, + com.google.cloud.visionai.v1.CreateDraftRequest.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.CreateDraftRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getDraftFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + draftId_ = ""; + draft_ = null; + if (draftBuilder_ != null) { + draftBuilder_.dispose(); + draftBuilder_ = null; + } + requestId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_CreateDraftRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.CreateDraftRequest getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.CreateDraftRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.CreateDraftRequest build() { + com.google.cloud.visionai.v1.CreateDraftRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.CreateDraftRequest buildPartial() { + com.google.cloud.visionai.v1.CreateDraftRequest result = + new com.google.cloud.visionai.v1.CreateDraftRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.visionai.v1.CreateDraftRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.draftId_ = draftId_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.draft_ = draftBuilder_ == null ? draft_ : draftBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.requestId_ = requestId_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.CreateDraftRequest) { + return mergeFrom((com.google.cloud.visionai.v1.CreateDraftRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.CreateDraftRequest other) { + if (other == com.google.cloud.visionai.v1.CreateDraftRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getDraftId().isEmpty()) { + draftId_ = other.draftId_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.hasDraft()) { + mergeDraft(other.getDraft()); + } + if (!other.getRequestId().isEmpty()) { + requestId_ = other.requestId_; + bitField0_ |= 0x00000008; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + draftId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage(getDraftFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. Value for parent.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Value for parent.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Value for parent.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Value for parent.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Value for parent.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object draftId_ = ""; + /** + * + * + *
+     * Required. Id of the requesting object.
+     * 
+ * + * string draft_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The draftId. + */ + public java.lang.String getDraftId() { + java.lang.Object ref = draftId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + draftId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Id of the requesting object.
+     * 
+ * + * string draft_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for draftId. + */ + public com.google.protobuf.ByteString getDraftIdBytes() { + java.lang.Object ref = draftId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + draftId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Id of the requesting object.
+     * 
+ * + * string draft_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The draftId to set. + * @return This builder for chaining. + */ + public Builder setDraftId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + draftId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Id of the requesting object.
+     * 
+ * + * string draft_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearDraftId() { + draftId_ = getDefaultInstance().getDraftId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Id of the requesting object.
+     * 
+ * + * string draft_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for draftId to set. + * @return This builder for chaining. + */ + public Builder setDraftIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + draftId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.cloud.visionai.v1.Draft draft_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.Draft, + com.google.cloud.visionai.v1.Draft.Builder, + com.google.cloud.visionai.v1.DraftOrBuilder> + draftBuilder_; + /** + * + * + *
+     * Required. The resource being created.
+     * 
+ * + * .google.cloud.visionai.v1.Draft draft = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the draft field is set. + */ + public boolean hasDraft() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+     * Required. The resource being created.
+     * 
+ * + * .google.cloud.visionai.v1.Draft draft = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The draft. + */ + public com.google.cloud.visionai.v1.Draft getDraft() { + if (draftBuilder_ == null) { + return draft_ == null ? com.google.cloud.visionai.v1.Draft.getDefaultInstance() : draft_; + } else { + return draftBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The resource being created.
+     * 
+ * + * .google.cloud.visionai.v1.Draft draft = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setDraft(com.google.cloud.visionai.v1.Draft value) { + if (draftBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + draft_ = value; + } else { + draftBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource being created.
+     * 
+ * + * .google.cloud.visionai.v1.Draft draft = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setDraft(com.google.cloud.visionai.v1.Draft.Builder builderForValue) { + if (draftBuilder_ == null) { + draft_ = builderForValue.build(); + } else { + draftBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource being created.
+     * 
+ * + * .google.cloud.visionai.v1.Draft draft = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeDraft(com.google.cloud.visionai.v1.Draft value) { + if (draftBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && draft_ != null + && draft_ != com.google.cloud.visionai.v1.Draft.getDefaultInstance()) { + getDraftBuilder().mergeFrom(value); + } else { + draft_ = value; + } + } else { + draftBuilder_.mergeFrom(value); + } + if (draft_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Required. The resource being created.
+     * 
+ * + * .google.cloud.visionai.v1.Draft draft = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearDraft() { + bitField0_ = (bitField0_ & ~0x00000004); + draft_ = null; + if (draftBuilder_ != null) { + draftBuilder_.dispose(); + draftBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource being created.
+     * 
+ * + * .google.cloud.visionai.v1.Draft draft = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.visionai.v1.Draft.Builder getDraftBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getDraftFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The resource being created.
+     * 
+ * + * .google.cloud.visionai.v1.Draft draft = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.visionai.v1.DraftOrBuilder getDraftOrBuilder() { + if (draftBuilder_ != null) { + return draftBuilder_.getMessageOrBuilder(); + } else { + return draft_ == null ? com.google.cloud.visionai.v1.Draft.getDefaultInstance() : draft_; + } + } + /** + * + * + *
+     * Required. The resource being created.
+     * 
+ * + * .google.cloud.visionai.v1.Draft draft = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.Draft, + com.google.cloud.visionai.v1.Draft.Builder, + com.google.cloud.visionai.v1.DraftOrBuilder> + getDraftFieldBuilder() { + if (draftBuilder_ == null) { + draftBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.Draft, + com.google.cloud.visionai.v1.Draft.Builder, + com.google.cloud.visionai.v1.DraftOrBuilder>( + getDraft(), getParentForChildren(), isClean()); + draft_ = null; + } + return draftBuilder_; + } + + private java.lang.Object requestId_ = ""; + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + requestId_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearRequestId() { + requestId_ = getDefaultInstance().getRequestId(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + requestId_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.CreateDraftRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.CreateDraftRequest) + private static final com.google.cloud.visionai.v1.CreateDraftRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.CreateDraftRequest(); + } + + public static com.google.cloud.visionai.v1.CreateDraftRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateDraftRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.CreateDraftRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/CreateDraftRequestOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/CreateDraftRequestOrBuilder.java new file mode 100644 index 000000000000..8cfd595dfe31 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/CreateDraftRequestOrBuilder.java @@ -0,0 +1,167 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/platform.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface CreateDraftRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.CreateDraftRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Value for parent.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. Value for parent.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Required. Id of the requesting object.
+   * 
+ * + * string draft_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The draftId. + */ + java.lang.String getDraftId(); + /** + * + * + *
+   * Required. Id of the requesting object.
+   * 
+ * + * string draft_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for draftId. + */ + com.google.protobuf.ByteString getDraftIdBytes(); + + /** + * + * + *
+   * Required. The resource being created.
+   * 
+ * + * .google.cloud.visionai.v1.Draft draft = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the draft field is set. + */ + boolean hasDraft(); + /** + * + * + *
+   * Required. The resource being created.
+   * 
+ * + * .google.cloud.visionai.v1.Draft draft = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The draft. + */ + com.google.cloud.visionai.v1.Draft getDraft(); + /** + * + * + *
+   * Required. The resource being created.
+   * 
+ * + * .google.cloud.visionai.v1.Draft draft = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.visionai.v1.DraftOrBuilder getDraftOrBuilder(); + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and
+   * the request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + java.lang.String getRequestId(); + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and
+   * the request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + com.google.protobuf.ByteString getRequestIdBytes(); +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/CreateEventRequest.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/CreateEventRequest.java new file mode 100644 index 000000000000..3d1e3ef73f34 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/CreateEventRequest.java @@ -0,0 +1,1370 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/streams_service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * Message for creating a Event.
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.CreateEventRequest} + */ +public final class CreateEventRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.CreateEventRequest) + CreateEventRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use CreateEventRequest.newBuilder() to construct. + private CreateEventRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CreateEventRequest() { + parent_ = ""; + eventId_ = ""; + requestId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CreateEventRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.StreamsServiceProto + .internal_static_google_cloud_visionai_v1_CreateEventRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.StreamsServiceProto + .internal_static_google_cloud_visionai_v1_CreateEventRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.CreateEventRequest.class, + com.google.cloud.visionai.v1.CreateEventRequest.Builder.class); + } + + private int bitField0_; + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + /** + * + * + *
+   * Required. Value for parent.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + 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(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Value for parent.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int EVENT_ID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object eventId_ = ""; + /** + * + * + *
+   * Required. Id of the requesting object.
+   * 
+ * + * string event_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The eventId. + */ + @java.lang.Override + public java.lang.String getEventId() { + java.lang.Object ref = eventId_; + 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(); + eventId_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Id of the requesting object.
+   * 
+ * + * string event_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for eventId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getEventIdBytes() { + java.lang.Object ref = eventId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + eventId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int EVENT_FIELD_NUMBER = 3; + private com.google.cloud.visionai.v1.Event event_; + /** + * + * + *
+   * Required. The resource being created.
+   * 
+ * + * .google.cloud.visionai.v1.Event event = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the event field is set. + */ + @java.lang.Override + public boolean hasEvent() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * Required. The resource being created.
+   * 
+ * + * .google.cloud.visionai.v1.Event event = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The event. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.Event getEvent() { + return event_ == null ? com.google.cloud.visionai.v1.Event.getDefaultInstance() : event_; + } + /** + * + * + *
+   * Required. The resource being created.
+   * 
+ * + * .google.cloud.visionai.v1.Event event = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.visionai.v1.EventOrBuilder getEventOrBuilder() { + return event_ == null ? com.google.cloud.visionai.v1.Event.getDefaultInstance() : event_; + } + + public static final int REQUEST_ID_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object requestId_ = ""; + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request ID,
+   * the server can check if original operation with the same request ID was
+   * received, and if so, will ignore the second request. This prevents clients
+   * from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + @java.lang.Override + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + 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(); + requestId_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request ID,
+   * the server can check if original operation with the same request ID was
+   * received, and if so, will ignore the second request. This prevents clients
+   * from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(eventId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, eventId_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(3, getEvent()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, requestId_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(eventId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, eventId_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getEvent()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, requestId_); + } + size += getUnknownFields().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.visionai.v1.CreateEventRequest)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.CreateEventRequest other = + (com.google.cloud.visionai.v1.CreateEventRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (!getEventId().equals(other.getEventId())) return false; + if (hasEvent() != other.hasEvent()) return false; + if (hasEvent()) { + if (!getEvent().equals(other.getEvent())) return false; + } + if (!getRequestId().equals(other.getRequestId())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + EVENT_ID_FIELD_NUMBER; + hash = (53 * hash) + getEventId().hashCode(); + if (hasEvent()) { + hash = (37 * hash) + EVENT_FIELD_NUMBER; + hash = (53 * hash) + getEvent().hashCode(); + } + hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; + hash = (53 * hash) + getRequestId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.CreateEventRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.CreateEventRequest 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.visionai.v1.CreateEventRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.CreateEventRequest 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.visionai.v1.CreateEventRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.CreateEventRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.CreateEventRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.CreateEventRequest 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.visionai.v1.CreateEventRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.CreateEventRequest 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.visionai.v1.CreateEventRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.CreateEventRequest 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.visionai.v1.CreateEventRequest 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; + } + /** + * + * + *
+   * Message for creating a Event.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.CreateEventRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.CreateEventRequest) + com.google.cloud.visionai.v1.CreateEventRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.StreamsServiceProto + .internal_static_google_cloud_visionai_v1_CreateEventRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.StreamsServiceProto + .internal_static_google_cloud_visionai_v1_CreateEventRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.CreateEventRequest.class, + com.google.cloud.visionai.v1.CreateEventRequest.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.CreateEventRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getEventFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + eventId_ = ""; + event_ = null; + if (eventBuilder_ != null) { + eventBuilder_.dispose(); + eventBuilder_ = null; + } + requestId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.StreamsServiceProto + .internal_static_google_cloud_visionai_v1_CreateEventRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.CreateEventRequest getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.CreateEventRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.CreateEventRequest build() { + com.google.cloud.visionai.v1.CreateEventRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.CreateEventRequest buildPartial() { + com.google.cloud.visionai.v1.CreateEventRequest result = + new com.google.cloud.visionai.v1.CreateEventRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.visionai.v1.CreateEventRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.eventId_ = eventId_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.event_ = eventBuilder_ == null ? event_ : eventBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.requestId_ = requestId_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.CreateEventRequest) { + return mergeFrom((com.google.cloud.visionai.v1.CreateEventRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.CreateEventRequest other) { + if (other == com.google.cloud.visionai.v1.CreateEventRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getEventId().isEmpty()) { + eventId_ = other.eventId_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.hasEvent()) { + mergeEvent(other.getEvent()); + } + if (!other.getRequestId().isEmpty()) { + requestId_ = other.requestId_; + bitField0_ |= 0x00000008; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + eventId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage(getEventFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. Value for parent.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Value for parent.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Value for parent.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Value for parent.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Value for parent.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object eventId_ = ""; + /** + * + * + *
+     * Required. Id of the requesting object.
+     * 
+ * + * string event_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The eventId. + */ + public java.lang.String getEventId() { + java.lang.Object ref = eventId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + eventId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Id of the requesting object.
+     * 
+ * + * string event_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for eventId. + */ + public com.google.protobuf.ByteString getEventIdBytes() { + java.lang.Object ref = eventId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + eventId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Id of the requesting object.
+     * 
+ * + * string event_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The eventId to set. + * @return This builder for chaining. + */ + public Builder setEventId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + eventId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Id of the requesting object.
+     * 
+ * + * string event_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearEventId() { + eventId_ = getDefaultInstance().getEventId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Id of the requesting object.
+     * 
+ * + * string event_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for eventId to set. + * @return This builder for chaining. + */ + public Builder setEventIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + eventId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.cloud.visionai.v1.Event event_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.Event, + com.google.cloud.visionai.v1.Event.Builder, + com.google.cloud.visionai.v1.EventOrBuilder> + eventBuilder_; + /** + * + * + *
+     * Required. The resource being created.
+     * 
+ * + * .google.cloud.visionai.v1.Event event = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the event field is set. + */ + public boolean hasEvent() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+     * Required. The resource being created.
+     * 
+ * + * .google.cloud.visionai.v1.Event event = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The event. + */ + public com.google.cloud.visionai.v1.Event getEvent() { + if (eventBuilder_ == null) { + return event_ == null ? com.google.cloud.visionai.v1.Event.getDefaultInstance() : event_; + } else { + return eventBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The resource being created.
+     * 
+ * + * .google.cloud.visionai.v1.Event event = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setEvent(com.google.cloud.visionai.v1.Event value) { + if (eventBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + event_ = value; + } else { + eventBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource being created.
+     * 
+ * + * .google.cloud.visionai.v1.Event event = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setEvent(com.google.cloud.visionai.v1.Event.Builder builderForValue) { + if (eventBuilder_ == null) { + event_ = builderForValue.build(); + } else { + eventBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource being created.
+     * 
+ * + * .google.cloud.visionai.v1.Event event = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeEvent(com.google.cloud.visionai.v1.Event value) { + if (eventBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && event_ != null + && event_ != com.google.cloud.visionai.v1.Event.getDefaultInstance()) { + getEventBuilder().mergeFrom(value); + } else { + event_ = value; + } + } else { + eventBuilder_.mergeFrom(value); + } + if (event_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Required. The resource being created.
+     * 
+ * + * .google.cloud.visionai.v1.Event event = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearEvent() { + bitField0_ = (bitField0_ & ~0x00000004); + event_ = null; + if (eventBuilder_ != null) { + eventBuilder_.dispose(); + eventBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource being created.
+     * 
+ * + * .google.cloud.visionai.v1.Event event = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.visionai.v1.Event.Builder getEventBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getEventFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The resource being created.
+     * 
+ * + * .google.cloud.visionai.v1.Event event = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.visionai.v1.EventOrBuilder getEventOrBuilder() { + if (eventBuilder_ != null) { + return eventBuilder_.getMessageOrBuilder(); + } else { + return event_ == null ? com.google.cloud.visionai.v1.Event.getDefaultInstance() : event_; + } + } + /** + * + * + *
+     * Required. The resource being created.
+     * 
+ * + * .google.cloud.visionai.v1.Event event = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.Event, + com.google.cloud.visionai.v1.Event.Builder, + com.google.cloud.visionai.v1.EventOrBuilder> + getEventFieldBuilder() { + if (eventBuilder_ == null) { + eventBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.Event, + com.google.cloud.visionai.v1.Event.Builder, + com.google.cloud.visionai.v1.EventOrBuilder>( + getEvent(), getParentForChildren(), isClean()); + event_ = null; + } + return eventBuilder_; + } + + private java.lang.Object requestId_ = ""; + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request ID,
+     * the server can check if original operation with the same request ID was
+     * received, and if so, will ignore the second request. This prevents clients
+     * from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request ID,
+     * the server can check if original operation with the same request ID was
+     * received, and if so, will ignore the second request. This prevents clients
+     * from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request ID,
+     * the server can check if original operation with the same request ID was
+     * received, and if so, will ignore the second request. This prevents clients
+     * from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + requestId_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request ID,
+     * the server can check if original operation with the same request ID was
+     * received, and if so, will ignore the second request. This prevents clients
+     * from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearRequestId() { + requestId_ = getDefaultInstance().getRequestId(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request ID,
+     * the server can check if original operation with the same request ID was
+     * received, and if so, will ignore the second request. This prevents clients
+     * from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + requestId_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.CreateEventRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.CreateEventRequest) + private static final com.google.cloud.visionai.v1.CreateEventRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.CreateEventRequest(); + } + + public static com.google.cloud.visionai.v1.CreateEventRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateEventRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.CreateEventRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/CreateEventRequestOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/CreateEventRequestOrBuilder.java new file mode 100644 index 000000000000..460aefd47ce5 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/CreateEventRequestOrBuilder.java @@ -0,0 +1,167 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/streams_service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface CreateEventRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.CreateEventRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Value for parent.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. Value for parent.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Required. Id of the requesting object.
+   * 
+ * + * string event_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The eventId. + */ + java.lang.String getEventId(); + /** + * + * + *
+   * Required. Id of the requesting object.
+   * 
+ * + * string event_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for eventId. + */ + com.google.protobuf.ByteString getEventIdBytes(); + + /** + * + * + *
+   * Required. The resource being created.
+   * 
+ * + * .google.cloud.visionai.v1.Event event = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the event field is set. + */ + boolean hasEvent(); + /** + * + * + *
+   * Required. The resource being created.
+   * 
+ * + * .google.cloud.visionai.v1.Event event = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The event. + */ + com.google.cloud.visionai.v1.Event getEvent(); + /** + * + * + *
+   * Required. The resource being created.
+   * 
+ * + * .google.cloud.visionai.v1.Event event = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.visionai.v1.EventOrBuilder getEventOrBuilder(); + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request ID,
+   * the server can check if original operation with the same request ID was
+   * received, and if so, will ignore the second request. This prevents clients
+   * from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + java.lang.String getRequestId(); + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request ID,
+   * the server can check if original operation with the same request ID was
+   * received, and if so, will ignore the second request. This prevents clients
+   * from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + com.google.protobuf.ByteString getRequestIdBytes(); +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/CreateIndexEndpointMetadata.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/CreateIndexEndpointMetadata.java new file mode 100644 index 000000000000..529b11373fe4 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/CreateIndexEndpointMetadata.java @@ -0,0 +1,728 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/warehouse.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * Metadata message for CreateIndexEndpoint.
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.CreateIndexEndpointMetadata} + */ +public final class CreateIndexEndpointMetadata extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.CreateIndexEndpointMetadata) + CreateIndexEndpointMetadataOrBuilder { + private static final long serialVersionUID = 0L; + // Use CreateIndexEndpointMetadata.newBuilder() to construct. + private CreateIndexEndpointMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CreateIndexEndpointMetadata() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CreateIndexEndpointMetadata(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_CreateIndexEndpointMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_CreateIndexEndpointMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.CreateIndexEndpointMetadata.class, + com.google.cloud.visionai.v1.CreateIndexEndpointMetadata.Builder.class); + } + + private int bitField0_; + public static final int OPERATION_METADATA_FIELD_NUMBER = 1; + private com.google.cloud.visionai.v1.OperationMetadata operationMetadata_; + /** + * + * + *
+   * Common metadata of the long-running operation.
+   * 
+ * + * .google.cloud.visionai.v1.OperationMetadata operation_metadata = 1; + * + * @return Whether the operationMetadata field is set. + */ + @java.lang.Override + public boolean hasOperationMetadata() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * Common metadata of the long-running operation.
+   * 
+ * + * .google.cloud.visionai.v1.OperationMetadata operation_metadata = 1; + * + * @return The operationMetadata. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.OperationMetadata getOperationMetadata() { + return operationMetadata_ == null + ? com.google.cloud.visionai.v1.OperationMetadata.getDefaultInstance() + : operationMetadata_; + } + /** + * + * + *
+   * Common metadata of the long-running operation.
+   * 
+ * + * .google.cloud.visionai.v1.OperationMetadata operation_metadata = 1; + */ + @java.lang.Override + public com.google.cloud.visionai.v1.OperationMetadataOrBuilder getOperationMetadataOrBuilder() { + return operationMetadata_ == null + ? com.google.cloud.visionai.v1.OperationMetadata.getDefaultInstance() + : operationMetadata_; + } + + 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 (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getOperationMetadata()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getOperationMetadata()); + } + size += getUnknownFields().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.visionai.v1.CreateIndexEndpointMetadata)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.CreateIndexEndpointMetadata other = + (com.google.cloud.visionai.v1.CreateIndexEndpointMetadata) obj; + + if (hasOperationMetadata() != other.hasOperationMetadata()) return false; + if (hasOperationMetadata()) { + if (!getOperationMetadata().equals(other.getOperationMetadata())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasOperationMetadata()) { + hash = (37 * hash) + OPERATION_METADATA_FIELD_NUMBER; + hash = (53 * hash) + getOperationMetadata().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.CreateIndexEndpointMetadata parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.CreateIndexEndpointMetadata 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.visionai.v1.CreateIndexEndpointMetadata parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.CreateIndexEndpointMetadata 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.visionai.v1.CreateIndexEndpointMetadata parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.CreateIndexEndpointMetadata parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.CreateIndexEndpointMetadata parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.CreateIndexEndpointMetadata 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.visionai.v1.CreateIndexEndpointMetadata parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.CreateIndexEndpointMetadata 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.visionai.v1.CreateIndexEndpointMetadata parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.CreateIndexEndpointMetadata 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.visionai.v1.CreateIndexEndpointMetadata 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; + } + /** + * + * + *
+   * Metadata message for CreateIndexEndpoint.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.CreateIndexEndpointMetadata} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.CreateIndexEndpointMetadata) + com.google.cloud.visionai.v1.CreateIndexEndpointMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_CreateIndexEndpointMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_CreateIndexEndpointMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.CreateIndexEndpointMetadata.class, + com.google.cloud.visionai.v1.CreateIndexEndpointMetadata.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.CreateIndexEndpointMetadata.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getOperationMetadataFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + operationMetadata_ = null; + if (operationMetadataBuilder_ != null) { + operationMetadataBuilder_.dispose(); + operationMetadataBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_CreateIndexEndpointMetadata_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.CreateIndexEndpointMetadata getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.CreateIndexEndpointMetadata.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.CreateIndexEndpointMetadata build() { + com.google.cloud.visionai.v1.CreateIndexEndpointMetadata result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.CreateIndexEndpointMetadata buildPartial() { + com.google.cloud.visionai.v1.CreateIndexEndpointMetadata result = + new com.google.cloud.visionai.v1.CreateIndexEndpointMetadata(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.visionai.v1.CreateIndexEndpointMetadata result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.operationMetadata_ = + operationMetadataBuilder_ == null + ? operationMetadata_ + : operationMetadataBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.CreateIndexEndpointMetadata) { + return mergeFrom((com.google.cloud.visionai.v1.CreateIndexEndpointMetadata) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.CreateIndexEndpointMetadata other) { + if (other == com.google.cloud.visionai.v1.CreateIndexEndpointMetadata.getDefaultInstance()) + return this; + if (other.hasOperationMetadata()) { + mergeOperationMetadata(other.getOperationMetadata()); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage( + getOperationMetadataFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.cloud.visionai.v1.OperationMetadata operationMetadata_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.OperationMetadata, + com.google.cloud.visionai.v1.OperationMetadata.Builder, + com.google.cloud.visionai.v1.OperationMetadataOrBuilder> + operationMetadataBuilder_; + /** + * + * + *
+     * Common metadata of the long-running operation.
+     * 
+ * + * .google.cloud.visionai.v1.OperationMetadata operation_metadata = 1; + * + * @return Whether the operationMetadata field is set. + */ + public boolean hasOperationMetadata() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * Common metadata of the long-running operation.
+     * 
+ * + * .google.cloud.visionai.v1.OperationMetadata operation_metadata = 1; + * + * @return The operationMetadata. + */ + public com.google.cloud.visionai.v1.OperationMetadata getOperationMetadata() { + if (operationMetadataBuilder_ == null) { + return operationMetadata_ == null + ? com.google.cloud.visionai.v1.OperationMetadata.getDefaultInstance() + : operationMetadata_; + } else { + return operationMetadataBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Common metadata of the long-running operation.
+     * 
+ * + * .google.cloud.visionai.v1.OperationMetadata operation_metadata = 1; + */ + public Builder setOperationMetadata(com.google.cloud.visionai.v1.OperationMetadata value) { + if (operationMetadataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + operationMetadata_ = value; + } else { + operationMetadataBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Common metadata of the long-running operation.
+     * 
+ * + * .google.cloud.visionai.v1.OperationMetadata operation_metadata = 1; + */ + public Builder setOperationMetadata( + com.google.cloud.visionai.v1.OperationMetadata.Builder builderForValue) { + if (operationMetadataBuilder_ == null) { + operationMetadata_ = builderForValue.build(); + } else { + operationMetadataBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Common metadata of the long-running operation.
+     * 
+ * + * .google.cloud.visionai.v1.OperationMetadata operation_metadata = 1; + */ + public Builder mergeOperationMetadata(com.google.cloud.visionai.v1.OperationMetadata value) { + if (operationMetadataBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && operationMetadata_ != null + && operationMetadata_ + != com.google.cloud.visionai.v1.OperationMetadata.getDefaultInstance()) { + getOperationMetadataBuilder().mergeFrom(value); + } else { + operationMetadata_ = value; + } + } else { + operationMetadataBuilder_.mergeFrom(value); + } + if (operationMetadata_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Common metadata of the long-running operation.
+     * 
+ * + * .google.cloud.visionai.v1.OperationMetadata operation_metadata = 1; + */ + public Builder clearOperationMetadata() { + bitField0_ = (bitField0_ & ~0x00000001); + operationMetadata_ = null; + if (operationMetadataBuilder_ != null) { + operationMetadataBuilder_.dispose(); + operationMetadataBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Common metadata of the long-running operation.
+     * 
+ * + * .google.cloud.visionai.v1.OperationMetadata operation_metadata = 1; + */ + public com.google.cloud.visionai.v1.OperationMetadata.Builder getOperationMetadataBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getOperationMetadataFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Common metadata of the long-running operation.
+     * 
+ * + * .google.cloud.visionai.v1.OperationMetadata operation_metadata = 1; + */ + public com.google.cloud.visionai.v1.OperationMetadataOrBuilder getOperationMetadataOrBuilder() { + if (operationMetadataBuilder_ != null) { + return operationMetadataBuilder_.getMessageOrBuilder(); + } else { + return operationMetadata_ == null + ? com.google.cloud.visionai.v1.OperationMetadata.getDefaultInstance() + : operationMetadata_; + } + } + /** + * + * + *
+     * Common metadata of the long-running operation.
+     * 
+ * + * .google.cloud.visionai.v1.OperationMetadata operation_metadata = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.OperationMetadata, + com.google.cloud.visionai.v1.OperationMetadata.Builder, + com.google.cloud.visionai.v1.OperationMetadataOrBuilder> + getOperationMetadataFieldBuilder() { + if (operationMetadataBuilder_ == null) { + operationMetadataBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.OperationMetadata, + com.google.cloud.visionai.v1.OperationMetadata.Builder, + com.google.cloud.visionai.v1.OperationMetadataOrBuilder>( + getOperationMetadata(), getParentForChildren(), isClean()); + operationMetadata_ = null; + } + return operationMetadataBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.CreateIndexEndpointMetadata) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.CreateIndexEndpointMetadata) + private static final com.google.cloud.visionai.v1.CreateIndexEndpointMetadata DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.CreateIndexEndpointMetadata(); + } + + public static com.google.cloud.visionai.v1.CreateIndexEndpointMetadata getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateIndexEndpointMetadata parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.CreateIndexEndpointMetadata getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/CreateIndexEndpointMetadataOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/CreateIndexEndpointMetadataOrBuilder.java new file mode 100644 index 000000000000..b45d58102ce6 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/CreateIndexEndpointMetadataOrBuilder.java @@ -0,0 +1,61 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/warehouse.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface CreateIndexEndpointMetadataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.CreateIndexEndpointMetadata) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Common metadata of the long-running operation.
+   * 
+ * + * .google.cloud.visionai.v1.OperationMetadata operation_metadata = 1; + * + * @return Whether the operationMetadata field is set. + */ + boolean hasOperationMetadata(); + /** + * + * + *
+   * Common metadata of the long-running operation.
+   * 
+ * + * .google.cloud.visionai.v1.OperationMetadata operation_metadata = 1; + * + * @return The operationMetadata. + */ + com.google.cloud.visionai.v1.OperationMetadata getOperationMetadata(); + /** + * + * + *
+   * Common metadata of the long-running operation.
+   * 
+ * + * .google.cloud.visionai.v1.OperationMetadata operation_metadata = 1; + */ + com.google.cloud.visionai.v1.OperationMetadataOrBuilder getOperationMetadataOrBuilder(); +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/CreateIndexEndpointRequest.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/CreateIndexEndpointRequest.java new file mode 100644 index 000000000000..5059133fece4 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/CreateIndexEndpointRequest.java @@ -0,0 +1,1169 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/warehouse.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * Request message for CreateIndexEndpoint.
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.CreateIndexEndpointRequest} + */ +public final class CreateIndexEndpointRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.CreateIndexEndpointRequest) + CreateIndexEndpointRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use CreateIndexEndpointRequest.newBuilder() to construct. + private CreateIndexEndpointRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CreateIndexEndpointRequest() { + parent_ = ""; + indexEndpointId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CreateIndexEndpointRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_CreateIndexEndpointRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_CreateIndexEndpointRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.CreateIndexEndpointRequest.class, + com.google.cloud.visionai.v1.CreateIndexEndpointRequest.Builder.class); + } + + private int bitField0_; + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + /** + * + * + *
+   * Required. Format: `projects/{project}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + 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(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Format: `projects/{project}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int INDEX_ENDPOINT_ID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object indexEndpointId_ = ""; + /** + * + * + *
+   * Optional. The ID to use for the IndexEndpoint, which will become the final
+   * component of the IndexEndpoint's resource name if the user specifies it.
+   * Otherwise, IndexEndpoint id will be autogenerated.
+   *
+   * This value should be up to 63 characters, and valid characters
+   * are a-z, 0-9 and dash (-). The first character must be a letter, the last
+   * must be a letter or a number.
+   * 
+ * + * string index_endpoint_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The indexEndpointId. + */ + @java.lang.Override + public java.lang.String getIndexEndpointId() { + java.lang.Object ref = indexEndpointId_; + 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(); + indexEndpointId_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. The ID to use for the IndexEndpoint, which will become the final
+   * component of the IndexEndpoint's resource name if the user specifies it.
+   * Otherwise, IndexEndpoint id will be autogenerated.
+   *
+   * This value should be up to 63 characters, and valid characters
+   * are a-z, 0-9 and dash (-). The first character must be a letter, the last
+   * must be a letter or a number.
+   * 
+ * + * string index_endpoint_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for indexEndpointId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getIndexEndpointIdBytes() { + java.lang.Object ref = indexEndpointId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + indexEndpointId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int INDEX_ENDPOINT_FIELD_NUMBER = 3; + private com.google.cloud.visionai.v1.IndexEndpoint indexEndpoint_; + /** + * + * + *
+   * Required. The resource being created.
+   * 
+ * + * + * .google.cloud.visionai.v1.IndexEndpoint index_endpoint = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the indexEndpoint field is set. + */ + @java.lang.Override + public boolean hasIndexEndpoint() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * Required. The resource being created.
+   * 
+ * + * + * .google.cloud.visionai.v1.IndexEndpoint index_endpoint = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The indexEndpoint. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.IndexEndpoint getIndexEndpoint() { + return indexEndpoint_ == null + ? com.google.cloud.visionai.v1.IndexEndpoint.getDefaultInstance() + : indexEndpoint_; + } + /** + * + * + *
+   * Required. The resource being created.
+   * 
+ * + * + * .google.cloud.visionai.v1.IndexEndpoint index_endpoint = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.visionai.v1.IndexEndpointOrBuilder getIndexEndpointOrBuilder() { + return indexEndpoint_ == null + ? com.google.cloud.visionai.v1.IndexEndpoint.getDefaultInstance() + : indexEndpoint_; + } + + 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(indexEndpointId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, indexEndpointId_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(3, getIndexEndpoint()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(indexEndpointId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, indexEndpointId_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getIndexEndpoint()); + } + size += getUnknownFields().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.visionai.v1.CreateIndexEndpointRequest)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.CreateIndexEndpointRequest other = + (com.google.cloud.visionai.v1.CreateIndexEndpointRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (!getIndexEndpointId().equals(other.getIndexEndpointId())) return false; + if (hasIndexEndpoint() != other.hasIndexEndpoint()) return false; + if (hasIndexEndpoint()) { + if (!getIndexEndpoint().equals(other.getIndexEndpoint())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + INDEX_ENDPOINT_ID_FIELD_NUMBER; + hash = (53 * hash) + getIndexEndpointId().hashCode(); + if (hasIndexEndpoint()) { + hash = (37 * hash) + INDEX_ENDPOINT_FIELD_NUMBER; + hash = (53 * hash) + getIndexEndpoint().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.CreateIndexEndpointRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.CreateIndexEndpointRequest 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.visionai.v1.CreateIndexEndpointRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.CreateIndexEndpointRequest 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.visionai.v1.CreateIndexEndpointRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.CreateIndexEndpointRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.CreateIndexEndpointRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.CreateIndexEndpointRequest 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.visionai.v1.CreateIndexEndpointRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.CreateIndexEndpointRequest 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.visionai.v1.CreateIndexEndpointRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.CreateIndexEndpointRequest 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.visionai.v1.CreateIndexEndpointRequest 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; + } + /** + * + * + *
+   * Request message for CreateIndexEndpoint.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.CreateIndexEndpointRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.CreateIndexEndpointRequest) + com.google.cloud.visionai.v1.CreateIndexEndpointRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_CreateIndexEndpointRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_CreateIndexEndpointRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.CreateIndexEndpointRequest.class, + com.google.cloud.visionai.v1.CreateIndexEndpointRequest.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.CreateIndexEndpointRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getIndexEndpointFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + indexEndpointId_ = ""; + indexEndpoint_ = null; + if (indexEndpointBuilder_ != null) { + indexEndpointBuilder_.dispose(); + indexEndpointBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_CreateIndexEndpointRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.CreateIndexEndpointRequest getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.CreateIndexEndpointRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.CreateIndexEndpointRequest build() { + com.google.cloud.visionai.v1.CreateIndexEndpointRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.CreateIndexEndpointRequest buildPartial() { + com.google.cloud.visionai.v1.CreateIndexEndpointRequest result = + new com.google.cloud.visionai.v1.CreateIndexEndpointRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.visionai.v1.CreateIndexEndpointRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.indexEndpointId_ = indexEndpointId_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.indexEndpoint_ = + indexEndpointBuilder_ == null ? indexEndpoint_ : indexEndpointBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.CreateIndexEndpointRequest) { + return mergeFrom((com.google.cloud.visionai.v1.CreateIndexEndpointRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.CreateIndexEndpointRequest other) { + if (other == com.google.cloud.visionai.v1.CreateIndexEndpointRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getIndexEndpointId().isEmpty()) { + indexEndpointId_ = other.indexEndpointId_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.hasIndexEndpoint()) { + mergeIndexEndpoint(other.getIndexEndpoint()); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + indexEndpointId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage(getIndexEndpointFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. Format: `projects/{project}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Format: `projects/{project}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Format: `projects/{project}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Format: `projects/{project}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Format: `projects/{project}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object indexEndpointId_ = ""; + /** + * + * + *
+     * Optional. The ID to use for the IndexEndpoint, which will become the final
+     * component of the IndexEndpoint's resource name if the user specifies it.
+     * Otherwise, IndexEndpoint id will be autogenerated.
+     *
+     * This value should be up to 63 characters, and valid characters
+     * are a-z, 0-9 and dash (-). The first character must be a letter, the last
+     * must be a letter or a number.
+     * 
+ * + * string index_endpoint_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The indexEndpointId. + */ + public java.lang.String getIndexEndpointId() { + java.lang.Object ref = indexEndpointId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + indexEndpointId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. The ID to use for the IndexEndpoint, which will become the final
+     * component of the IndexEndpoint's resource name if the user specifies it.
+     * Otherwise, IndexEndpoint id will be autogenerated.
+     *
+     * This value should be up to 63 characters, and valid characters
+     * are a-z, 0-9 and dash (-). The first character must be a letter, the last
+     * must be a letter or a number.
+     * 
+ * + * string index_endpoint_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for indexEndpointId. + */ + public com.google.protobuf.ByteString getIndexEndpointIdBytes() { + java.lang.Object ref = indexEndpointId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + indexEndpointId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. The ID to use for the IndexEndpoint, which will become the final
+     * component of the IndexEndpoint's resource name if the user specifies it.
+     * Otherwise, IndexEndpoint id will be autogenerated.
+     *
+     * This value should be up to 63 characters, and valid characters
+     * are a-z, 0-9 and dash (-). The first character must be a letter, the last
+     * must be a letter or a number.
+     * 
+ * + * string index_endpoint_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The indexEndpointId to set. + * @return This builder for chaining. + */ + public Builder setIndexEndpointId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + indexEndpointId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The ID to use for the IndexEndpoint, which will become the final
+     * component of the IndexEndpoint's resource name if the user specifies it.
+     * Otherwise, IndexEndpoint id will be autogenerated.
+     *
+     * This value should be up to 63 characters, and valid characters
+     * are a-z, 0-9 and dash (-). The first character must be a letter, the last
+     * must be a letter or a number.
+     * 
+ * + * string index_endpoint_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearIndexEndpointId() { + indexEndpointId_ = getDefaultInstance().getIndexEndpointId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The ID to use for the IndexEndpoint, which will become the final
+     * component of the IndexEndpoint's resource name if the user specifies it.
+     * Otherwise, IndexEndpoint id will be autogenerated.
+     *
+     * This value should be up to 63 characters, and valid characters
+     * are a-z, 0-9 and dash (-). The first character must be a letter, the last
+     * must be a letter or a number.
+     * 
+ * + * string index_endpoint_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for indexEndpointId to set. + * @return This builder for chaining. + */ + public Builder setIndexEndpointIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + indexEndpointId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.cloud.visionai.v1.IndexEndpoint indexEndpoint_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.IndexEndpoint, + com.google.cloud.visionai.v1.IndexEndpoint.Builder, + com.google.cloud.visionai.v1.IndexEndpointOrBuilder> + indexEndpointBuilder_; + /** + * + * + *
+     * Required. The resource being created.
+     * 
+ * + * + * .google.cloud.visionai.v1.IndexEndpoint index_endpoint = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the indexEndpoint field is set. + */ + public boolean hasIndexEndpoint() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+     * Required. The resource being created.
+     * 
+ * + * + * .google.cloud.visionai.v1.IndexEndpoint index_endpoint = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The indexEndpoint. + */ + public com.google.cloud.visionai.v1.IndexEndpoint getIndexEndpoint() { + if (indexEndpointBuilder_ == null) { + return indexEndpoint_ == null + ? com.google.cloud.visionai.v1.IndexEndpoint.getDefaultInstance() + : indexEndpoint_; + } else { + return indexEndpointBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The resource being created.
+     * 
+ * + * + * .google.cloud.visionai.v1.IndexEndpoint index_endpoint = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setIndexEndpoint(com.google.cloud.visionai.v1.IndexEndpoint value) { + if (indexEndpointBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + indexEndpoint_ = value; + } else { + indexEndpointBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource being created.
+     * 
+ * + * + * .google.cloud.visionai.v1.IndexEndpoint index_endpoint = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setIndexEndpoint( + com.google.cloud.visionai.v1.IndexEndpoint.Builder builderForValue) { + if (indexEndpointBuilder_ == null) { + indexEndpoint_ = builderForValue.build(); + } else { + indexEndpointBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource being created.
+     * 
+ * + * + * .google.cloud.visionai.v1.IndexEndpoint index_endpoint = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeIndexEndpoint(com.google.cloud.visionai.v1.IndexEndpoint value) { + if (indexEndpointBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && indexEndpoint_ != null + && indexEndpoint_ != com.google.cloud.visionai.v1.IndexEndpoint.getDefaultInstance()) { + getIndexEndpointBuilder().mergeFrom(value); + } else { + indexEndpoint_ = value; + } + } else { + indexEndpointBuilder_.mergeFrom(value); + } + if (indexEndpoint_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Required. The resource being created.
+     * 
+ * + * + * .google.cloud.visionai.v1.IndexEndpoint index_endpoint = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearIndexEndpoint() { + bitField0_ = (bitField0_ & ~0x00000004); + indexEndpoint_ = null; + if (indexEndpointBuilder_ != null) { + indexEndpointBuilder_.dispose(); + indexEndpointBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource being created.
+     * 
+ * + * + * .google.cloud.visionai.v1.IndexEndpoint index_endpoint = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.visionai.v1.IndexEndpoint.Builder getIndexEndpointBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getIndexEndpointFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The resource being created.
+     * 
+ * + * + * .google.cloud.visionai.v1.IndexEndpoint index_endpoint = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.visionai.v1.IndexEndpointOrBuilder getIndexEndpointOrBuilder() { + if (indexEndpointBuilder_ != null) { + return indexEndpointBuilder_.getMessageOrBuilder(); + } else { + return indexEndpoint_ == null + ? com.google.cloud.visionai.v1.IndexEndpoint.getDefaultInstance() + : indexEndpoint_; + } + } + /** + * + * + *
+     * Required. The resource being created.
+     * 
+ * + * + * .google.cloud.visionai.v1.IndexEndpoint index_endpoint = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.IndexEndpoint, + com.google.cloud.visionai.v1.IndexEndpoint.Builder, + com.google.cloud.visionai.v1.IndexEndpointOrBuilder> + getIndexEndpointFieldBuilder() { + if (indexEndpointBuilder_ == null) { + indexEndpointBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.IndexEndpoint, + com.google.cloud.visionai.v1.IndexEndpoint.Builder, + com.google.cloud.visionai.v1.IndexEndpointOrBuilder>( + getIndexEndpoint(), getParentForChildren(), isClean()); + indexEndpoint_ = null; + } + return indexEndpointBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.CreateIndexEndpointRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.CreateIndexEndpointRequest) + private static final com.google.cloud.visionai.v1.CreateIndexEndpointRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.CreateIndexEndpointRequest(); + } + + public static com.google.cloud.visionai.v1.CreateIndexEndpointRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateIndexEndpointRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.CreateIndexEndpointRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/CreateIndexEndpointRequestOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/CreateIndexEndpointRequestOrBuilder.java new file mode 100644 index 000000000000..32a8e8bee89e --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/CreateIndexEndpointRequestOrBuilder.java @@ -0,0 +1,133 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/warehouse.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface CreateIndexEndpointRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.CreateIndexEndpointRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Format: `projects/{project}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. Format: `projects/{project}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Optional. The ID to use for the IndexEndpoint, which will become the final
+   * component of the IndexEndpoint's resource name if the user specifies it.
+   * Otherwise, IndexEndpoint id will be autogenerated.
+   *
+   * This value should be up to 63 characters, and valid characters
+   * are a-z, 0-9 and dash (-). The first character must be a letter, the last
+   * must be a letter or a number.
+   * 
+ * + * string index_endpoint_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The indexEndpointId. + */ + java.lang.String getIndexEndpointId(); + /** + * + * + *
+   * Optional. The ID to use for the IndexEndpoint, which will become the final
+   * component of the IndexEndpoint's resource name if the user specifies it.
+   * Otherwise, IndexEndpoint id will be autogenerated.
+   *
+   * This value should be up to 63 characters, and valid characters
+   * are a-z, 0-9 and dash (-). The first character must be a letter, the last
+   * must be a letter or a number.
+   * 
+ * + * string index_endpoint_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for indexEndpointId. + */ + com.google.protobuf.ByteString getIndexEndpointIdBytes(); + + /** + * + * + *
+   * Required. The resource being created.
+   * 
+ * + * + * .google.cloud.visionai.v1.IndexEndpoint index_endpoint = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the indexEndpoint field is set. + */ + boolean hasIndexEndpoint(); + /** + * + * + *
+   * Required. The resource being created.
+   * 
+ * + * + * .google.cloud.visionai.v1.IndexEndpoint index_endpoint = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The indexEndpoint. + */ + com.google.cloud.visionai.v1.IndexEndpoint getIndexEndpoint(); + /** + * + * + *
+   * Required. The resource being created.
+   * 
+ * + * + * .google.cloud.visionai.v1.IndexEndpoint index_endpoint = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.visionai.v1.IndexEndpointOrBuilder getIndexEndpointOrBuilder(); +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/CreateIndexMetadata.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/CreateIndexMetadata.java new file mode 100644 index 000000000000..bb7c4a4f5e5b --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/CreateIndexMetadata.java @@ -0,0 +1,727 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/warehouse.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * Metadata message for CreateIndexRequest
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.CreateIndexMetadata} + */ +public final class CreateIndexMetadata extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.CreateIndexMetadata) + CreateIndexMetadataOrBuilder { + private static final long serialVersionUID = 0L; + // Use CreateIndexMetadata.newBuilder() to construct. + private CreateIndexMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CreateIndexMetadata() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CreateIndexMetadata(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_CreateIndexMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_CreateIndexMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.CreateIndexMetadata.class, + com.google.cloud.visionai.v1.CreateIndexMetadata.Builder.class); + } + + private int bitField0_; + public static final int OPERATION_METADATA_FIELD_NUMBER = 1; + private com.google.cloud.visionai.v1.OperationMetadata operationMetadata_; + /** + * + * + *
+   * Common metadata of the long-running operation.
+   * 
+ * + * .google.cloud.visionai.v1.OperationMetadata operation_metadata = 1; + * + * @return Whether the operationMetadata field is set. + */ + @java.lang.Override + public boolean hasOperationMetadata() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * Common metadata of the long-running operation.
+   * 
+ * + * .google.cloud.visionai.v1.OperationMetadata operation_metadata = 1; + * + * @return The operationMetadata. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.OperationMetadata getOperationMetadata() { + return operationMetadata_ == null + ? com.google.cloud.visionai.v1.OperationMetadata.getDefaultInstance() + : operationMetadata_; + } + /** + * + * + *
+   * Common metadata of the long-running operation.
+   * 
+ * + * .google.cloud.visionai.v1.OperationMetadata operation_metadata = 1; + */ + @java.lang.Override + public com.google.cloud.visionai.v1.OperationMetadataOrBuilder getOperationMetadataOrBuilder() { + return operationMetadata_ == null + ? com.google.cloud.visionai.v1.OperationMetadata.getDefaultInstance() + : operationMetadata_; + } + + 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 (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getOperationMetadata()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getOperationMetadata()); + } + size += getUnknownFields().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.visionai.v1.CreateIndexMetadata)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.CreateIndexMetadata other = + (com.google.cloud.visionai.v1.CreateIndexMetadata) obj; + + if (hasOperationMetadata() != other.hasOperationMetadata()) return false; + if (hasOperationMetadata()) { + if (!getOperationMetadata().equals(other.getOperationMetadata())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasOperationMetadata()) { + hash = (37 * hash) + OPERATION_METADATA_FIELD_NUMBER; + hash = (53 * hash) + getOperationMetadata().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.CreateIndexMetadata parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.CreateIndexMetadata 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.visionai.v1.CreateIndexMetadata parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.CreateIndexMetadata 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.visionai.v1.CreateIndexMetadata parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.CreateIndexMetadata parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.CreateIndexMetadata parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.CreateIndexMetadata 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.visionai.v1.CreateIndexMetadata parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.CreateIndexMetadata 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.visionai.v1.CreateIndexMetadata parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.CreateIndexMetadata 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.visionai.v1.CreateIndexMetadata 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; + } + /** + * + * + *
+   * Metadata message for CreateIndexRequest
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.CreateIndexMetadata} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.CreateIndexMetadata) + com.google.cloud.visionai.v1.CreateIndexMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_CreateIndexMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_CreateIndexMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.CreateIndexMetadata.class, + com.google.cloud.visionai.v1.CreateIndexMetadata.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.CreateIndexMetadata.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getOperationMetadataFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + operationMetadata_ = null; + if (operationMetadataBuilder_ != null) { + operationMetadataBuilder_.dispose(); + operationMetadataBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_CreateIndexMetadata_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.CreateIndexMetadata getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.CreateIndexMetadata.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.CreateIndexMetadata build() { + com.google.cloud.visionai.v1.CreateIndexMetadata result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.CreateIndexMetadata buildPartial() { + com.google.cloud.visionai.v1.CreateIndexMetadata result = + new com.google.cloud.visionai.v1.CreateIndexMetadata(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.visionai.v1.CreateIndexMetadata result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.operationMetadata_ = + operationMetadataBuilder_ == null + ? operationMetadata_ + : operationMetadataBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.CreateIndexMetadata) { + return mergeFrom((com.google.cloud.visionai.v1.CreateIndexMetadata) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.CreateIndexMetadata other) { + if (other == com.google.cloud.visionai.v1.CreateIndexMetadata.getDefaultInstance()) + return this; + if (other.hasOperationMetadata()) { + mergeOperationMetadata(other.getOperationMetadata()); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage( + getOperationMetadataFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.cloud.visionai.v1.OperationMetadata operationMetadata_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.OperationMetadata, + com.google.cloud.visionai.v1.OperationMetadata.Builder, + com.google.cloud.visionai.v1.OperationMetadataOrBuilder> + operationMetadataBuilder_; + /** + * + * + *
+     * Common metadata of the long-running operation.
+     * 
+ * + * .google.cloud.visionai.v1.OperationMetadata operation_metadata = 1; + * + * @return Whether the operationMetadata field is set. + */ + public boolean hasOperationMetadata() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * Common metadata of the long-running operation.
+     * 
+ * + * .google.cloud.visionai.v1.OperationMetadata operation_metadata = 1; + * + * @return The operationMetadata. + */ + public com.google.cloud.visionai.v1.OperationMetadata getOperationMetadata() { + if (operationMetadataBuilder_ == null) { + return operationMetadata_ == null + ? com.google.cloud.visionai.v1.OperationMetadata.getDefaultInstance() + : operationMetadata_; + } else { + return operationMetadataBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Common metadata of the long-running operation.
+     * 
+ * + * .google.cloud.visionai.v1.OperationMetadata operation_metadata = 1; + */ + public Builder setOperationMetadata(com.google.cloud.visionai.v1.OperationMetadata value) { + if (operationMetadataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + operationMetadata_ = value; + } else { + operationMetadataBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Common metadata of the long-running operation.
+     * 
+ * + * .google.cloud.visionai.v1.OperationMetadata operation_metadata = 1; + */ + public Builder setOperationMetadata( + com.google.cloud.visionai.v1.OperationMetadata.Builder builderForValue) { + if (operationMetadataBuilder_ == null) { + operationMetadata_ = builderForValue.build(); + } else { + operationMetadataBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Common metadata of the long-running operation.
+     * 
+ * + * .google.cloud.visionai.v1.OperationMetadata operation_metadata = 1; + */ + public Builder mergeOperationMetadata(com.google.cloud.visionai.v1.OperationMetadata value) { + if (operationMetadataBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && operationMetadata_ != null + && operationMetadata_ + != com.google.cloud.visionai.v1.OperationMetadata.getDefaultInstance()) { + getOperationMetadataBuilder().mergeFrom(value); + } else { + operationMetadata_ = value; + } + } else { + operationMetadataBuilder_.mergeFrom(value); + } + if (operationMetadata_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Common metadata of the long-running operation.
+     * 
+ * + * .google.cloud.visionai.v1.OperationMetadata operation_metadata = 1; + */ + public Builder clearOperationMetadata() { + bitField0_ = (bitField0_ & ~0x00000001); + operationMetadata_ = null; + if (operationMetadataBuilder_ != null) { + operationMetadataBuilder_.dispose(); + operationMetadataBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Common metadata of the long-running operation.
+     * 
+ * + * .google.cloud.visionai.v1.OperationMetadata operation_metadata = 1; + */ + public com.google.cloud.visionai.v1.OperationMetadata.Builder getOperationMetadataBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getOperationMetadataFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Common metadata of the long-running operation.
+     * 
+ * + * .google.cloud.visionai.v1.OperationMetadata operation_metadata = 1; + */ + public com.google.cloud.visionai.v1.OperationMetadataOrBuilder getOperationMetadataOrBuilder() { + if (operationMetadataBuilder_ != null) { + return operationMetadataBuilder_.getMessageOrBuilder(); + } else { + return operationMetadata_ == null + ? com.google.cloud.visionai.v1.OperationMetadata.getDefaultInstance() + : operationMetadata_; + } + } + /** + * + * + *
+     * Common metadata of the long-running operation.
+     * 
+ * + * .google.cloud.visionai.v1.OperationMetadata operation_metadata = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.OperationMetadata, + com.google.cloud.visionai.v1.OperationMetadata.Builder, + com.google.cloud.visionai.v1.OperationMetadataOrBuilder> + getOperationMetadataFieldBuilder() { + if (operationMetadataBuilder_ == null) { + operationMetadataBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.OperationMetadata, + com.google.cloud.visionai.v1.OperationMetadata.Builder, + com.google.cloud.visionai.v1.OperationMetadataOrBuilder>( + getOperationMetadata(), getParentForChildren(), isClean()); + operationMetadata_ = null; + } + return operationMetadataBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.CreateIndexMetadata) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.CreateIndexMetadata) + private static final com.google.cloud.visionai.v1.CreateIndexMetadata DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.CreateIndexMetadata(); + } + + public static com.google.cloud.visionai.v1.CreateIndexMetadata getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateIndexMetadata parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.CreateIndexMetadata getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/CreateIndexMetadataOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/CreateIndexMetadataOrBuilder.java new file mode 100644 index 000000000000..a02ca52abb0c --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/CreateIndexMetadataOrBuilder.java @@ -0,0 +1,61 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/warehouse.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface CreateIndexMetadataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.CreateIndexMetadata) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Common metadata of the long-running operation.
+   * 
+ * + * .google.cloud.visionai.v1.OperationMetadata operation_metadata = 1; + * + * @return Whether the operationMetadata field is set. + */ + boolean hasOperationMetadata(); + /** + * + * + *
+   * Common metadata of the long-running operation.
+   * 
+ * + * .google.cloud.visionai.v1.OperationMetadata operation_metadata = 1; + * + * @return The operationMetadata. + */ + com.google.cloud.visionai.v1.OperationMetadata getOperationMetadata(); + /** + * + * + *
+   * Common metadata of the long-running operation.
+   * 
+ * + * .google.cloud.visionai.v1.OperationMetadata operation_metadata = 1; + */ + com.google.cloud.visionai.v1.OperationMetadataOrBuilder getOperationMetadataOrBuilder(); +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/CreateIndexRequest.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/CreateIndexRequest.java new file mode 100644 index 000000000000..4d8c1c9751fe --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/CreateIndexRequest.java @@ -0,0 +1,1160 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/warehouse.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * Message for creating an Index.
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.CreateIndexRequest} + */ +public final class CreateIndexRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.CreateIndexRequest) + CreateIndexRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use CreateIndexRequest.newBuilder() to construct. + private CreateIndexRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CreateIndexRequest() { + parent_ = ""; + indexId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CreateIndexRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_CreateIndexRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_CreateIndexRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.CreateIndexRequest.class, + com.google.cloud.visionai.v1.CreateIndexRequest.Builder.class); + } + + private int bitField0_; + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + /** + * + * + *
+   * Required. Value for the parent. The resource name of the Corpus under which
+   * this index is created. Format:
+   * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + 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(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Value for the parent. The resource name of the Corpus under which
+   * this index is created. Format:
+   * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int INDEX_ID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object indexId_ = ""; + /** + * + * + *
+   * Optional. The ID for the index. This will become the final resource name
+   * for the index. If the user does not specify this value, it will be
+   * generated by system.
+   *
+   * This value should be up to 63 characters, and valid characters
+   * are /[a-z][0-9]-/. The first character must be a letter, the last could be
+   * a letter or a number.
+   * 
+ * + * string index_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The indexId. + */ + @java.lang.Override + public java.lang.String getIndexId() { + java.lang.Object ref = indexId_; + 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(); + indexId_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. The ID for the index. This will become the final resource name
+   * for the index. If the user does not specify this value, it will be
+   * generated by system.
+   *
+   * This value should be up to 63 characters, and valid characters
+   * are /[a-z][0-9]-/. The first character must be a letter, the last could be
+   * a letter or a number.
+   * 
+ * + * string index_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for indexId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getIndexIdBytes() { + java.lang.Object ref = indexId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + indexId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int INDEX_FIELD_NUMBER = 3; + private com.google.cloud.visionai.v1.Index index_; + /** + * + * + *
+   * Required. The index being created.
+   * 
+ * + * .google.cloud.visionai.v1.Index index = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the index field is set. + */ + @java.lang.Override + public boolean hasIndex() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * Required. The index being created.
+   * 
+ * + * .google.cloud.visionai.v1.Index index = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The index. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.Index getIndex() { + return index_ == null ? com.google.cloud.visionai.v1.Index.getDefaultInstance() : index_; + } + /** + * + * + *
+   * Required. The index being created.
+   * 
+ * + * .google.cloud.visionai.v1.Index index = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.visionai.v1.IndexOrBuilder getIndexOrBuilder() { + return index_ == null ? com.google.cloud.visionai.v1.Index.getDefaultInstance() : 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(indexId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, indexId_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(3, getIndex()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(indexId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, indexId_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getIndex()); + } + size += getUnknownFields().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.visionai.v1.CreateIndexRequest)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.CreateIndexRequest other = + (com.google.cloud.visionai.v1.CreateIndexRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (!getIndexId().equals(other.getIndexId())) return false; + if (hasIndex() != other.hasIndex()) return false; + if (hasIndex()) { + if (!getIndex().equals(other.getIndex())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + INDEX_ID_FIELD_NUMBER; + hash = (53 * hash) + getIndexId().hashCode(); + if (hasIndex()) { + hash = (37 * hash) + INDEX_FIELD_NUMBER; + hash = (53 * hash) + getIndex().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.CreateIndexRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.CreateIndexRequest 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.visionai.v1.CreateIndexRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.CreateIndexRequest 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.visionai.v1.CreateIndexRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.CreateIndexRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.CreateIndexRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.CreateIndexRequest 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.visionai.v1.CreateIndexRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.CreateIndexRequest 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.visionai.v1.CreateIndexRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.CreateIndexRequest 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.visionai.v1.CreateIndexRequest 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; + } + /** + * + * + *
+   * Message for creating an Index.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.CreateIndexRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.CreateIndexRequest) + com.google.cloud.visionai.v1.CreateIndexRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_CreateIndexRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_CreateIndexRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.CreateIndexRequest.class, + com.google.cloud.visionai.v1.CreateIndexRequest.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.CreateIndexRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getIndexFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + indexId_ = ""; + index_ = null; + if (indexBuilder_ != null) { + indexBuilder_.dispose(); + indexBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_CreateIndexRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.CreateIndexRequest getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.CreateIndexRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.CreateIndexRequest build() { + com.google.cloud.visionai.v1.CreateIndexRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.CreateIndexRequest buildPartial() { + com.google.cloud.visionai.v1.CreateIndexRequest result = + new com.google.cloud.visionai.v1.CreateIndexRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.visionai.v1.CreateIndexRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.indexId_ = indexId_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.index_ = indexBuilder_ == null ? index_ : indexBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.CreateIndexRequest) { + return mergeFrom((com.google.cloud.visionai.v1.CreateIndexRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.CreateIndexRequest other) { + if (other == com.google.cloud.visionai.v1.CreateIndexRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getIndexId().isEmpty()) { + indexId_ = other.indexId_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.hasIndex()) { + mergeIndex(other.getIndex()); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + indexId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage(getIndexFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. Value for the parent. The resource name of the Corpus under which
+     * this index is created. Format:
+     * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Value for the parent. The resource name of the Corpus under which
+     * this index is created. Format:
+     * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Value for the parent. The resource name of the Corpus under which
+     * this index is created. Format:
+     * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Value for the parent. The resource name of the Corpus under which
+     * this index is created. Format:
+     * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Value for the parent. The resource name of the Corpus under which
+     * this index is created. Format:
+     * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object indexId_ = ""; + /** + * + * + *
+     * Optional. The ID for the index. This will become the final resource name
+     * for the index. If the user does not specify this value, it will be
+     * generated by system.
+     *
+     * This value should be up to 63 characters, and valid characters
+     * are /[a-z][0-9]-/. The first character must be a letter, the last could be
+     * a letter or a number.
+     * 
+ * + * string index_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The indexId. + */ + public java.lang.String getIndexId() { + java.lang.Object ref = indexId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + indexId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. The ID for the index. This will become the final resource name
+     * for the index. If the user does not specify this value, it will be
+     * generated by system.
+     *
+     * This value should be up to 63 characters, and valid characters
+     * are /[a-z][0-9]-/. The first character must be a letter, the last could be
+     * a letter or a number.
+     * 
+ * + * string index_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for indexId. + */ + public com.google.protobuf.ByteString getIndexIdBytes() { + java.lang.Object ref = indexId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + indexId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. The ID for the index. This will become the final resource name
+     * for the index. If the user does not specify this value, it will be
+     * generated by system.
+     *
+     * This value should be up to 63 characters, and valid characters
+     * are /[a-z][0-9]-/. The first character must be a letter, the last could be
+     * a letter or a number.
+     * 
+ * + * string index_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The indexId to set. + * @return This builder for chaining. + */ + public Builder setIndexId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + indexId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The ID for the index. This will become the final resource name
+     * for the index. If the user does not specify this value, it will be
+     * generated by system.
+     *
+     * This value should be up to 63 characters, and valid characters
+     * are /[a-z][0-9]-/. The first character must be a letter, the last could be
+     * a letter or a number.
+     * 
+ * + * string index_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearIndexId() { + indexId_ = getDefaultInstance().getIndexId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The ID for the index. This will become the final resource name
+     * for the index. If the user does not specify this value, it will be
+     * generated by system.
+     *
+     * This value should be up to 63 characters, and valid characters
+     * are /[a-z][0-9]-/. The first character must be a letter, the last could be
+     * a letter or a number.
+     * 
+ * + * string index_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for indexId to set. + * @return This builder for chaining. + */ + public Builder setIndexIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + indexId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.cloud.visionai.v1.Index index_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.Index, + com.google.cloud.visionai.v1.Index.Builder, + com.google.cloud.visionai.v1.IndexOrBuilder> + indexBuilder_; + /** + * + * + *
+     * Required. The index being created.
+     * 
+ * + * .google.cloud.visionai.v1.Index index = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the index field is set. + */ + public boolean hasIndex() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+     * Required. The index being created.
+     * 
+ * + * .google.cloud.visionai.v1.Index index = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The index. + */ + public com.google.cloud.visionai.v1.Index getIndex() { + if (indexBuilder_ == null) { + return index_ == null ? com.google.cloud.visionai.v1.Index.getDefaultInstance() : index_; + } else { + return indexBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The index being created.
+     * 
+ * + * .google.cloud.visionai.v1.Index index = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setIndex(com.google.cloud.visionai.v1.Index value) { + if (indexBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + index_ = value; + } else { + indexBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The index being created.
+     * 
+ * + * .google.cloud.visionai.v1.Index index = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setIndex(com.google.cloud.visionai.v1.Index.Builder builderForValue) { + if (indexBuilder_ == null) { + index_ = builderForValue.build(); + } else { + indexBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The index being created.
+     * 
+ * + * .google.cloud.visionai.v1.Index index = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeIndex(com.google.cloud.visionai.v1.Index value) { + if (indexBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && index_ != null + && index_ != com.google.cloud.visionai.v1.Index.getDefaultInstance()) { + getIndexBuilder().mergeFrom(value); + } else { + index_ = value; + } + } else { + indexBuilder_.mergeFrom(value); + } + if (index_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Required. The index being created.
+     * 
+ * + * .google.cloud.visionai.v1.Index index = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearIndex() { + bitField0_ = (bitField0_ & ~0x00000004); + index_ = null; + if (indexBuilder_ != null) { + indexBuilder_.dispose(); + indexBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The index being created.
+     * 
+ * + * .google.cloud.visionai.v1.Index index = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.visionai.v1.Index.Builder getIndexBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getIndexFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The index being created.
+     * 
+ * + * .google.cloud.visionai.v1.Index index = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.visionai.v1.IndexOrBuilder getIndexOrBuilder() { + if (indexBuilder_ != null) { + return indexBuilder_.getMessageOrBuilder(); + } else { + return index_ == null ? com.google.cloud.visionai.v1.Index.getDefaultInstance() : index_; + } + } + /** + * + * + *
+     * Required. The index being created.
+     * 
+ * + * .google.cloud.visionai.v1.Index index = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.Index, + com.google.cloud.visionai.v1.Index.Builder, + com.google.cloud.visionai.v1.IndexOrBuilder> + getIndexFieldBuilder() { + if (indexBuilder_ == null) { + indexBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.Index, + com.google.cloud.visionai.v1.Index.Builder, + com.google.cloud.visionai.v1.IndexOrBuilder>( + getIndex(), getParentForChildren(), isClean()); + index_ = null; + } + return indexBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.CreateIndexRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.CreateIndexRequest) + private static final com.google.cloud.visionai.v1.CreateIndexRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.CreateIndexRequest(); + } + + public static com.google.cloud.visionai.v1.CreateIndexRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateIndexRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.CreateIndexRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/CreateIndexRequestOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/CreateIndexRequestOrBuilder.java new file mode 100644 index 000000000000..5d3493ce175e --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/CreateIndexRequestOrBuilder.java @@ -0,0 +1,134 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/warehouse.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface CreateIndexRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.CreateIndexRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Value for the parent. The resource name of the Corpus under which
+   * this index is created. Format:
+   * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. Value for the parent. The resource name of the Corpus under which
+   * this index is created. Format:
+   * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Optional. The ID for the index. This will become the final resource name
+   * for the index. If the user does not specify this value, it will be
+   * generated by system.
+   *
+   * This value should be up to 63 characters, and valid characters
+   * are /[a-z][0-9]-/. The first character must be a letter, the last could be
+   * a letter or a number.
+   * 
+ * + * string index_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The indexId. + */ + java.lang.String getIndexId(); + /** + * + * + *
+   * Optional. The ID for the index. This will become the final resource name
+   * for the index. If the user does not specify this value, it will be
+   * generated by system.
+   *
+   * This value should be up to 63 characters, and valid characters
+   * are /[a-z][0-9]-/. The first character must be a letter, the last could be
+   * a letter or a number.
+   * 
+ * + * string index_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for indexId. + */ + com.google.protobuf.ByteString getIndexIdBytes(); + + /** + * + * + *
+   * Required. The index being created.
+   * 
+ * + * .google.cloud.visionai.v1.Index index = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the index field is set. + */ + boolean hasIndex(); + /** + * + * + *
+   * Required. The index being created.
+   * 
+ * + * .google.cloud.visionai.v1.Index index = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The index. + */ + com.google.cloud.visionai.v1.Index getIndex(); + /** + * + * + *
+   * Required. The index being created.
+   * 
+ * + * .google.cloud.visionai.v1.Index index = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.visionai.v1.IndexOrBuilder getIndexOrBuilder(); +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/CreateOperatorRequest.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/CreateOperatorRequest.java new file mode 100644 index 000000000000..e47516516c8a --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/CreateOperatorRequest.java @@ -0,0 +1,1390 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/lva_service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * Message for creating a Operator.
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.CreateOperatorRequest} + */ +public final class CreateOperatorRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.CreateOperatorRequest) + CreateOperatorRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use CreateOperatorRequest.newBuilder() to construct. + private CreateOperatorRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CreateOperatorRequest() { + parent_ = ""; + operatorId_ = ""; + requestId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CreateOperatorRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.LvaServiceProto + .internal_static_google_cloud_visionai_v1_CreateOperatorRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.LvaServiceProto + .internal_static_google_cloud_visionai_v1_CreateOperatorRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.CreateOperatorRequest.class, + com.google.cloud.visionai.v1.CreateOperatorRequest.Builder.class); + } + + private int bitField0_; + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + /** + * + * + *
+   * Required. Value for parent.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + 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(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Value for parent.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int OPERATOR_ID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object operatorId_ = ""; + /** + * + * + *
+   * Required. Id of the requesting object.
+   * 
+ * + * string operator_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The operatorId. + */ + @java.lang.Override + public java.lang.String getOperatorId() { + java.lang.Object ref = operatorId_; + 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(); + operatorId_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Id of the requesting object.
+   * 
+ * + * string operator_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for operatorId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getOperatorIdBytes() { + java.lang.Object ref = operatorId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + operatorId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int OPERATOR_FIELD_NUMBER = 3; + private com.google.cloud.visionai.v1.Operator operator_; + /** + * + * + *
+   * Required. The resource being created.
+   * 
+ * + * + * .google.cloud.visionai.v1.Operator operator = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the operator field is set. + */ + @java.lang.Override + public boolean hasOperator() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * Required. The resource being created.
+   * 
+ * + * + * .google.cloud.visionai.v1.Operator operator = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The operator. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.Operator getOperator() { + return operator_ == null + ? com.google.cloud.visionai.v1.Operator.getDefaultInstance() + : operator_; + } + /** + * + * + *
+   * Required. The resource being created.
+   * 
+ * + * + * .google.cloud.visionai.v1.Operator operator = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.visionai.v1.OperatorOrBuilder getOperatorOrBuilder() { + return operator_ == null + ? com.google.cloud.visionai.v1.Operator.getDefaultInstance() + : operator_; + } + + public static final int REQUEST_ID_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object requestId_ = ""; + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request ID,
+   * the server can check if original operation with the same request ID was
+   * received, and if so, will ignore the second request. This prevents clients
+   * from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + @java.lang.Override + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + 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(); + requestId_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request ID,
+   * the server can check if original operation with the same request ID was
+   * received, and if so, will ignore the second request. This prevents clients
+   * from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(operatorId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, operatorId_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(3, getOperator()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, requestId_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(operatorId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, operatorId_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getOperator()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, requestId_); + } + size += getUnknownFields().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.visionai.v1.CreateOperatorRequest)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.CreateOperatorRequest other = + (com.google.cloud.visionai.v1.CreateOperatorRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (!getOperatorId().equals(other.getOperatorId())) return false; + if (hasOperator() != other.hasOperator()) return false; + if (hasOperator()) { + if (!getOperator().equals(other.getOperator())) return false; + } + if (!getRequestId().equals(other.getRequestId())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + OPERATOR_ID_FIELD_NUMBER; + hash = (53 * hash) + getOperatorId().hashCode(); + if (hasOperator()) { + hash = (37 * hash) + OPERATOR_FIELD_NUMBER; + hash = (53 * hash) + getOperator().hashCode(); + } + hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; + hash = (53 * hash) + getRequestId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.CreateOperatorRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.CreateOperatorRequest 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.visionai.v1.CreateOperatorRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.CreateOperatorRequest 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.visionai.v1.CreateOperatorRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.CreateOperatorRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.CreateOperatorRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.CreateOperatorRequest 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.visionai.v1.CreateOperatorRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.CreateOperatorRequest 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.visionai.v1.CreateOperatorRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.CreateOperatorRequest 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.visionai.v1.CreateOperatorRequest 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; + } + /** + * + * + *
+   * Message for creating a Operator.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.CreateOperatorRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.CreateOperatorRequest) + com.google.cloud.visionai.v1.CreateOperatorRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.LvaServiceProto + .internal_static_google_cloud_visionai_v1_CreateOperatorRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.LvaServiceProto + .internal_static_google_cloud_visionai_v1_CreateOperatorRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.CreateOperatorRequest.class, + com.google.cloud.visionai.v1.CreateOperatorRequest.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.CreateOperatorRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getOperatorFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + operatorId_ = ""; + operator_ = null; + if (operatorBuilder_ != null) { + operatorBuilder_.dispose(); + operatorBuilder_ = null; + } + requestId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.LvaServiceProto + .internal_static_google_cloud_visionai_v1_CreateOperatorRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.CreateOperatorRequest getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.CreateOperatorRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.CreateOperatorRequest build() { + com.google.cloud.visionai.v1.CreateOperatorRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.CreateOperatorRequest buildPartial() { + com.google.cloud.visionai.v1.CreateOperatorRequest result = + new com.google.cloud.visionai.v1.CreateOperatorRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.visionai.v1.CreateOperatorRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.operatorId_ = operatorId_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.operator_ = operatorBuilder_ == null ? operator_ : operatorBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.requestId_ = requestId_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.CreateOperatorRequest) { + return mergeFrom((com.google.cloud.visionai.v1.CreateOperatorRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.CreateOperatorRequest other) { + if (other == com.google.cloud.visionai.v1.CreateOperatorRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getOperatorId().isEmpty()) { + operatorId_ = other.operatorId_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.hasOperator()) { + mergeOperator(other.getOperator()); + } + if (!other.getRequestId().isEmpty()) { + requestId_ = other.requestId_; + bitField0_ |= 0x00000008; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + operatorId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage(getOperatorFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. Value for parent.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Value for parent.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Value for parent.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Value for parent.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Value for parent.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object operatorId_ = ""; + /** + * + * + *
+     * Required. Id of the requesting object.
+     * 
+ * + * string operator_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The operatorId. + */ + public java.lang.String getOperatorId() { + java.lang.Object ref = operatorId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + operatorId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Id of the requesting object.
+     * 
+ * + * string operator_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for operatorId. + */ + public com.google.protobuf.ByteString getOperatorIdBytes() { + java.lang.Object ref = operatorId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + operatorId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Id of the requesting object.
+     * 
+ * + * string operator_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The operatorId to set. + * @return This builder for chaining. + */ + public Builder setOperatorId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + operatorId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Id of the requesting object.
+     * 
+ * + * string operator_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearOperatorId() { + operatorId_ = getDefaultInstance().getOperatorId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Id of the requesting object.
+     * 
+ * + * string operator_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for operatorId to set. + * @return This builder for chaining. + */ + public Builder setOperatorIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + operatorId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.cloud.visionai.v1.Operator operator_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.Operator, + com.google.cloud.visionai.v1.Operator.Builder, + com.google.cloud.visionai.v1.OperatorOrBuilder> + operatorBuilder_; + /** + * + * + *
+     * Required. The resource being created.
+     * 
+ * + * + * .google.cloud.visionai.v1.Operator operator = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the operator field is set. + */ + public boolean hasOperator() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+     * Required. The resource being created.
+     * 
+ * + * + * .google.cloud.visionai.v1.Operator operator = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The operator. + */ + public com.google.cloud.visionai.v1.Operator getOperator() { + if (operatorBuilder_ == null) { + return operator_ == null + ? com.google.cloud.visionai.v1.Operator.getDefaultInstance() + : operator_; + } else { + return operatorBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The resource being created.
+     * 
+ * + * + * .google.cloud.visionai.v1.Operator operator = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setOperator(com.google.cloud.visionai.v1.Operator value) { + if (operatorBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + operator_ = value; + } else { + operatorBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource being created.
+     * 
+ * + * + * .google.cloud.visionai.v1.Operator operator = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setOperator(com.google.cloud.visionai.v1.Operator.Builder builderForValue) { + if (operatorBuilder_ == null) { + operator_ = builderForValue.build(); + } else { + operatorBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource being created.
+     * 
+ * + * + * .google.cloud.visionai.v1.Operator operator = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeOperator(com.google.cloud.visionai.v1.Operator value) { + if (operatorBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && operator_ != null + && operator_ != com.google.cloud.visionai.v1.Operator.getDefaultInstance()) { + getOperatorBuilder().mergeFrom(value); + } else { + operator_ = value; + } + } else { + operatorBuilder_.mergeFrom(value); + } + if (operator_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Required. The resource being created.
+     * 
+ * + * + * .google.cloud.visionai.v1.Operator operator = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearOperator() { + bitField0_ = (bitField0_ & ~0x00000004); + operator_ = null; + if (operatorBuilder_ != null) { + operatorBuilder_.dispose(); + operatorBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource being created.
+     * 
+ * + * + * .google.cloud.visionai.v1.Operator operator = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.visionai.v1.Operator.Builder getOperatorBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getOperatorFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The resource being created.
+     * 
+ * + * + * .google.cloud.visionai.v1.Operator operator = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.visionai.v1.OperatorOrBuilder getOperatorOrBuilder() { + if (operatorBuilder_ != null) { + return operatorBuilder_.getMessageOrBuilder(); + } else { + return operator_ == null + ? com.google.cloud.visionai.v1.Operator.getDefaultInstance() + : operator_; + } + } + /** + * + * + *
+     * Required. The resource being created.
+     * 
+ * + * + * .google.cloud.visionai.v1.Operator operator = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.Operator, + com.google.cloud.visionai.v1.Operator.Builder, + com.google.cloud.visionai.v1.OperatorOrBuilder> + getOperatorFieldBuilder() { + if (operatorBuilder_ == null) { + operatorBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.Operator, + com.google.cloud.visionai.v1.Operator.Builder, + com.google.cloud.visionai.v1.OperatorOrBuilder>( + getOperator(), getParentForChildren(), isClean()); + operator_ = null; + } + return operatorBuilder_; + } + + private java.lang.Object requestId_ = ""; + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request ID,
+     * the server can check if original operation with the same request ID was
+     * received, and if so, will ignore the second request. This prevents clients
+     * from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request ID,
+     * the server can check if original operation with the same request ID was
+     * received, and if so, will ignore the second request. This prevents clients
+     * from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request ID,
+     * the server can check if original operation with the same request ID was
+     * received, and if so, will ignore the second request. This prevents clients
+     * from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + requestId_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request ID,
+     * the server can check if original operation with the same request ID was
+     * received, and if so, will ignore the second request. This prevents clients
+     * from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearRequestId() { + requestId_ = getDefaultInstance().getRequestId(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request ID,
+     * the server can check if original operation with the same request ID was
+     * received, and if so, will ignore the second request. This prevents clients
+     * from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + requestId_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.CreateOperatorRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.CreateOperatorRequest) + private static final com.google.cloud.visionai.v1.CreateOperatorRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.CreateOperatorRequest(); + } + + public static com.google.cloud.visionai.v1.CreateOperatorRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateOperatorRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.CreateOperatorRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/CreateOperatorRequestOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/CreateOperatorRequestOrBuilder.java new file mode 100644 index 000000000000..21a7c6f585fd --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/CreateOperatorRequestOrBuilder.java @@ -0,0 +1,170 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/lva_service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface CreateOperatorRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.CreateOperatorRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Value for parent.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. Value for parent.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Required. Id of the requesting object.
+   * 
+ * + * string operator_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The operatorId. + */ + java.lang.String getOperatorId(); + /** + * + * + *
+   * Required. Id of the requesting object.
+   * 
+ * + * string operator_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for operatorId. + */ + com.google.protobuf.ByteString getOperatorIdBytes(); + + /** + * + * + *
+   * Required. The resource being created.
+   * 
+ * + * + * .google.cloud.visionai.v1.Operator operator = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the operator field is set. + */ + boolean hasOperator(); + /** + * + * + *
+   * Required. The resource being created.
+   * 
+ * + * + * .google.cloud.visionai.v1.Operator operator = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The operator. + */ + com.google.cloud.visionai.v1.Operator getOperator(); + /** + * + * + *
+   * Required. The resource being created.
+   * 
+ * + * + * .google.cloud.visionai.v1.Operator operator = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.visionai.v1.OperatorOrBuilder getOperatorOrBuilder(); + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request ID,
+   * the server can check if original operation with the same request ID was
+   * received, and if so, will ignore the second request. This prevents clients
+   * from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + java.lang.String getRequestId(); + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request ID,
+   * the server can check if original operation with the same request ID was
+   * received, and if so, will ignore the second request. This prevents clients
+   * from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + com.google.protobuf.ByteString getRequestIdBytes(); +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/CreateProcessRequest.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/CreateProcessRequest.java new file mode 100644 index 000000000000..eba6a1298b99 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/CreateProcessRequest.java @@ -0,0 +1,1383 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/lva_service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * Message for creating a Process.
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.CreateProcessRequest} + */ +public final class CreateProcessRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.CreateProcessRequest) + CreateProcessRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use CreateProcessRequest.newBuilder() to construct. + private CreateProcessRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CreateProcessRequest() { + parent_ = ""; + processId_ = ""; + requestId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CreateProcessRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.LvaServiceProto + .internal_static_google_cloud_visionai_v1_CreateProcessRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.LvaServiceProto + .internal_static_google_cloud_visionai_v1_CreateProcessRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.CreateProcessRequest.class, + com.google.cloud.visionai.v1.CreateProcessRequest.Builder.class); + } + + private int bitField0_; + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + /** + * + * + *
+   * Required. Value for parent.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + 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(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Value for parent.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PROCESS_ID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object processId_ = ""; + /** + * + * + *
+   * Required. Id of the requesting object.
+   * 
+ * + * string process_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The processId. + */ + @java.lang.Override + public java.lang.String getProcessId() { + java.lang.Object ref = processId_; + 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(); + processId_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Id of the requesting object.
+   * 
+ * + * string process_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for processId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getProcessIdBytes() { + java.lang.Object ref = processId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + processId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PROCESS_FIELD_NUMBER = 3; + private com.google.cloud.visionai.v1.Process process_; + /** + * + * + *
+   * Required. The resource being created.
+   * 
+ * + * .google.cloud.visionai.v1.Process process = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the process field is set. + */ + @java.lang.Override + public boolean hasProcess() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * Required. The resource being created.
+   * 
+ * + * .google.cloud.visionai.v1.Process process = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The process. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.Process getProcess() { + return process_ == null ? com.google.cloud.visionai.v1.Process.getDefaultInstance() : process_; + } + /** + * + * + *
+   * Required. The resource being created.
+   * 
+ * + * .google.cloud.visionai.v1.Process process = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.visionai.v1.ProcessOrBuilder getProcessOrBuilder() { + return process_ == null ? com.google.cloud.visionai.v1.Process.getDefaultInstance() : process_; + } + + public static final int REQUEST_ID_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object requestId_ = ""; + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request ID,
+   * the server can check if original operation with the same request ID was
+   * received, and if so, will ignore the second request. This prevents clients
+   * from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + @java.lang.Override + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + 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(); + requestId_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request ID,
+   * the server can check if original operation with the same request ID was
+   * received, and if so, will ignore the second request. This prevents clients
+   * from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(processId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, processId_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(3, getProcess()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, requestId_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(processId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, processId_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getProcess()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, requestId_); + } + size += getUnknownFields().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.visionai.v1.CreateProcessRequest)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.CreateProcessRequest other = + (com.google.cloud.visionai.v1.CreateProcessRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (!getProcessId().equals(other.getProcessId())) return false; + if (hasProcess() != other.hasProcess()) return false; + if (hasProcess()) { + if (!getProcess().equals(other.getProcess())) return false; + } + if (!getRequestId().equals(other.getRequestId())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + PROCESS_ID_FIELD_NUMBER; + hash = (53 * hash) + getProcessId().hashCode(); + if (hasProcess()) { + hash = (37 * hash) + PROCESS_FIELD_NUMBER; + hash = (53 * hash) + getProcess().hashCode(); + } + hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; + hash = (53 * hash) + getRequestId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.CreateProcessRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.CreateProcessRequest 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.visionai.v1.CreateProcessRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.CreateProcessRequest 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.visionai.v1.CreateProcessRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.CreateProcessRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.CreateProcessRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.CreateProcessRequest 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.visionai.v1.CreateProcessRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.CreateProcessRequest 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.visionai.v1.CreateProcessRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.CreateProcessRequest 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.visionai.v1.CreateProcessRequest 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; + } + /** + * + * + *
+   * Message for creating a Process.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.CreateProcessRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.CreateProcessRequest) + com.google.cloud.visionai.v1.CreateProcessRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.LvaServiceProto + .internal_static_google_cloud_visionai_v1_CreateProcessRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.LvaServiceProto + .internal_static_google_cloud_visionai_v1_CreateProcessRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.CreateProcessRequest.class, + com.google.cloud.visionai.v1.CreateProcessRequest.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.CreateProcessRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getProcessFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + processId_ = ""; + process_ = null; + if (processBuilder_ != null) { + processBuilder_.dispose(); + processBuilder_ = null; + } + requestId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.LvaServiceProto + .internal_static_google_cloud_visionai_v1_CreateProcessRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.CreateProcessRequest getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.CreateProcessRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.CreateProcessRequest build() { + com.google.cloud.visionai.v1.CreateProcessRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.CreateProcessRequest buildPartial() { + com.google.cloud.visionai.v1.CreateProcessRequest result = + new com.google.cloud.visionai.v1.CreateProcessRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.visionai.v1.CreateProcessRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.processId_ = processId_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.process_ = processBuilder_ == null ? process_ : processBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.requestId_ = requestId_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.CreateProcessRequest) { + return mergeFrom((com.google.cloud.visionai.v1.CreateProcessRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.CreateProcessRequest other) { + if (other == com.google.cloud.visionai.v1.CreateProcessRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getProcessId().isEmpty()) { + processId_ = other.processId_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.hasProcess()) { + mergeProcess(other.getProcess()); + } + if (!other.getRequestId().isEmpty()) { + requestId_ = other.requestId_; + bitField0_ |= 0x00000008; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + processId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage(getProcessFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. Value for parent.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Value for parent.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Value for parent.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Value for parent.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Value for parent.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object processId_ = ""; + /** + * + * + *
+     * Required. Id of the requesting object.
+     * 
+ * + * string process_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The processId. + */ + public java.lang.String getProcessId() { + java.lang.Object ref = processId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + processId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Id of the requesting object.
+     * 
+ * + * string process_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for processId. + */ + public com.google.protobuf.ByteString getProcessIdBytes() { + java.lang.Object ref = processId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + processId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Id of the requesting object.
+     * 
+ * + * string process_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The processId to set. + * @return This builder for chaining. + */ + public Builder setProcessId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + processId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Id of the requesting object.
+     * 
+ * + * string process_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearProcessId() { + processId_ = getDefaultInstance().getProcessId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Id of the requesting object.
+     * 
+ * + * string process_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for processId to set. + * @return This builder for chaining. + */ + public Builder setProcessIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + processId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.cloud.visionai.v1.Process process_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.Process, + com.google.cloud.visionai.v1.Process.Builder, + com.google.cloud.visionai.v1.ProcessOrBuilder> + processBuilder_; + /** + * + * + *
+     * Required. The resource being created.
+     * 
+ * + * + * .google.cloud.visionai.v1.Process process = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the process field is set. + */ + public boolean hasProcess() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+     * Required. The resource being created.
+     * 
+ * + * + * .google.cloud.visionai.v1.Process process = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The process. + */ + public com.google.cloud.visionai.v1.Process getProcess() { + if (processBuilder_ == null) { + return process_ == null + ? com.google.cloud.visionai.v1.Process.getDefaultInstance() + : process_; + } else { + return processBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The resource being created.
+     * 
+ * + * + * .google.cloud.visionai.v1.Process process = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setProcess(com.google.cloud.visionai.v1.Process value) { + if (processBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + process_ = value; + } else { + processBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource being created.
+     * 
+ * + * + * .google.cloud.visionai.v1.Process process = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setProcess(com.google.cloud.visionai.v1.Process.Builder builderForValue) { + if (processBuilder_ == null) { + process_ = builderForValue.build(); + } else { + processBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource being created.
+     * 
+ * + * + * .google.cloud.visionai.v1.Process process = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeProcess(com.google.cloud.visionai.v1.Process value) { + if (processBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && process_ != null + && process_ != com.google.cloud.visionai.v1.Process.getDefaultInstance()) { + getProcessBuilder().mergeFrom(value); + } else { + process_ = value; + } + } else { + processBuilder_.mergeFrom(value); + } + if (process_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Required. The resource being created.
+     * 
+ * + * + * .google.cloud.visionai.v1.Process process = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearProcess() { + bitField0_ = (bitField0_ & ~0x00000004); + process_ = null; + if (processBuilder_ != null) { + processBuilder_.dispose(); + processBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource being created.
+     * 
+ * + * + * .google.cloud.visionai.v1.Process process = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.visionai.v1.Process.Builder getProcessBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getProcessFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The resource being created.
+     * 
+ * + * + * .google.cloud.visionai.v1.Process process = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.visionai.v1.ProcessOrBuilder getProcessOrBuilder() { + if (processBuilder_ != null) { + return processBuilder_.getMessageOrBuilder(); + } else { + return process_ == null + ? com.google.cloud.visionai.v1.Process.getDefaultInstance() + : process_; + } + } + /** + * + * + *
+     * Required. The resource being created.
+     * 
+ * + * + * .google.cloud.visionai.v1.Process process = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.Process, + com.google.cloud.visionai.v1.Process.Builder, + com.google.cloud.visionai.v1.ProcessOrBuilder> + getProcessFieldBuilder() { + if (processBuilder_ == null) { + processBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.Process, + com.google.cloud.visionai.v1.Process.Builder, + com.google.cloud.visionai.v1.ProcessOrBuilder>( + getProcess(), getParentForChildren(), isClean()); + process_ = null; + } + return processBuilder_; + } + + private java.lang.Object requestId_ = ""; + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request ID,
+     * the server can check if original operation with the same request ID was
+     * received, and if so, will ignore the second request. This prevents clients
+     * from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request ID,
+     * the server can check if original operation with the same request ID was
+     * received, and if so, will ignore the second request. This prevents clients
+     * from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request ID,
+     * the server can check if original operation with the same request ID was
+     * received, and if so, will ignore the second request. This prevents clients
+     * from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + requestId_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request ID,
+     * the server can check if original operation with the same request ID was
+     * received, and if so, will ignore the second request. This prevents clients
+     * from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearRequestId() { + requestId_ = getDefaultInstance().getRequestId(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request ID,
+     * the server can check if original operation with the same request ID was
+     * received, and if so, will ignore the second request. This prevents clients
+     * from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + requestId_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.CreateProcessRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.CreateProcessRequest) + private static final com.google.cloud.visionai.v1.CreateProcessRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.CreateProcessRequest(); + } + + public static com.google.cloud.visionai.v1.CreateProcessRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateProcessRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.CreateProcessRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/CreateProcessRequestOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/CreateProcessRequestOrBuilder.java new file mode 100644 index 000000000000..20de80f526e3 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/CreateProcessRequestOrBuilder.java @@ -0,0 +1,167 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/lva_service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface CreateProcessRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.CreateProcessRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Value for parent.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. Value for parent.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Required. Id of the requesting object.
+   * 
+ * + * string process_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The processId. + */ + java.lang.String getProcessId(); + /** + * + * + *
+   * Required. Id of the requesting object.
+   * 
+ * + * string process_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for processId. + */ + com.google.protobuf.ByteString getProcessIdBytes(); + + /** + * + * + *
+   * Required. The resource being created.
+   * 
+ * + * .google.cloud.visionai.v1.Process process = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the process field is set. + */ + boolean hasProcess(); + /** + * + * + *
+   * Required. The resource being created.
+   * 
+ * + * .google.cloud.visionai.v1.Process process = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The process. + */ + com.google.cloud.visionai.v1.Process getProcess(); + /** + * + * + *
+   * Required. The resource being created.
+   * 
+ * + * .google.cloud.visionai.v1.Process process = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.visionai.v1.ProcessOrBuilder getProcessOrBuilder(); + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request ID,
+   * the server can check if original operation with the same request ID was
+   * received, and if so, will ignore the second request. This prevents clients
+   * from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + java.lang.String getRequestId(); + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request ID,
+   * the server can check if original operation with the same request ID was
+   * received, and if so, will ignore the second request. This prevents clients
+   * from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + com.google.protobuf.ByteString getRequestIdBytes(); +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/CreateProcessorRequest.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/CreateProcessorRequest.java new file mode 100644 index 000000000000..9f52d6a88117 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/CreateProcessorRequest.java @@ -0,0 +1,1390 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/platform.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * Message for creating a Processor.
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.CreateProcessorRequest} + */ +public final class CreateProcessorRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.CreateProcessorRequest) + CreateProcessorRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use CreateProcessorRequest.newBuilder() to construct. + private CreateProcessorRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CreateProcessorRequest() { + parent_ = ""; + processorId_ = ""; + requestId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CreateProcessorRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_CreateProcessorRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_CreateProcessorRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.CreateProcessorRequest.class, + com.google.cloud.visionai.v1.CreateProcessorRequest.Builder.class); + } + + private int bitField0_; + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + /** + * + * + *
+   * Required. Value for parent.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + 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(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Value for parent.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PROCESSOR_ID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object processorId_ = ""; + /** + * + * + *
+   * Required. Id of the requesting object.
+   * 
+ * + * string processor_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The processorId. + */ + @java.lang.Override + public java.lang.String getProcessorId() { + java.lang.Object ref = processorId_; + 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(); + processorId_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Id of the requesting object.
+   * 
+ * + * string processor_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for processorId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getProcessorIdBytes() { + java.lang.Object ref = processorId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + processorId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PROCESSOR_FIELD_NUMBER = 3; + private com.google.cloud.visionai.v1.Processor processor_; + /** + * + * + *
+   * Required. The resource being created.
+   * 
+ * + * + * .google.cloud.visionai.v1.Processor processor = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the processor field is set. + */ + @java.lang.Override + public boolean hasProcessor() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * Required. The resource being created.
+   * 
+ * + * + * .google.cloud.visionai.v1.Processor processor = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The processor. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.Processor getProcessor() { + return processor_ == null + ? com.google.cloud.visionai.v1.Processor.getDefaultInstance() + : processor_; + } + /** + * + * + *
+   * Required. The resource being created.
+   * 
+ * + * + * .google.cloud.visionai.v1.Processor processor = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.visionai.v1.ProcessorOrBuilder getProcessorOrBuilder() { + return processor_ == null + ? com.google.cloud.visionai.v1.Processor.getDefaultInstance() + : processor_; + } + + public static final int REQUEST_ID_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object requestId_ = ""; + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and
+   * the request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + @java.lang.Override + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + 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(); + requestId_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and
+   * the request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(processorId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, processorId_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(3, getProcessor()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, requestId_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(processorId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, processorId_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getProcessor()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, requestId_); + } + size += getUnknownFields().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.visionai.v1.CreateProcessorRequest)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.CreateProcessorRequest other = + (com.google.cloud.visionai.v1.CreateProcessorRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (!getProcessorId().equals(other.getProcessorId())) return false; + if (hasProcessor() != other.hasProcessor()) return false; + if (hasProcessor()) { + if (!getProcessor().equals(other.getProcessor())) return false; + } + if (!getRequestId().equals(other.getRequestId())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + PROCESSOR_ID_FIELD_NUMBER; + hash = (53 * hash) + getProcessorId().hashCode(); + if (hasProcessor()) { + hash = (37 * hash) + PROCESSOR_FIELD_NUMBER; + hash = (53 * hash) + getProcessor().hashCode(); + } + hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; + hash = (53 * hash) + getRequestId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.CreateProcessorRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.CreateProcessorRequest 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.visionai.v1.CreateProcessorRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.CreateProcessorRequest 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.visionai.v1.CreateProcessorRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.CreateProcessorRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.CreateProcessorRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.CreateProcessorRequest 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.visionai.v1.CreateProcessorRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.CreateProcessorRequest 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.visionai.v1.CreateProcessorRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.CreateProcessorRequest 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.visionai.v1.CreateProcessorRequest 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; + } + /** + * + * + *
+   * Message for creating a Processor.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.CreateProcessorRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.CreateProcessorRequest) + com.google.cloud.visionai.v1.CreateProcessorRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_CreateProcessorRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_CreateProcessorRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.CreateProcessorRequest.class, + com.google.cloud.visionai.v1.CreateProcessorRequest.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.CreateProcessorRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getProcessorFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + processorId_ = ""; + processor_ = null; + if (processorBuilder_ != null) { + processorBuilder_.dispose(); + processorBuilder_ = null; + } + requestId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_CreateProcessorRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.CreateProcessorRequest getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.CreateProcessorRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.CreateProcessorRequest build() { + com.google.cloud.visionai.v1.CreateProcessorRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.CreateProcessorRequest buildPartial() { + com.google.cloud.visionai.v1.CreateProcessorRequest result = + new com.google.cloud.visionai.v1.CreateProcessorRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.visionai.v1.CreateProcessorRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.processorId_ = processorId_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.processor_ = processorBuilder_ == null ? processor_ : processorBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.requestId_ = requestId_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.CreateProcessorRequest) { + return mergeFrom((com.google.cloud.visionai.v1.CreateProcessorRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.CreateProcessorRequest other) { + if (other == com.google.cloud.visionai.v1.CreateProcessorRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getProcessorId().isEmpty()) { + processorId_ = other.processorId_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.hasProcessor()) { + mergeProcessor(other.getProcessor()); + } + if (!other.getRequestId().isEmpty()) { + requestId_ = other.requestId_; + bitField0_ |= 0x00000008; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + processorId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage(getProcessorFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. Value for parent.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Value for parent.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Value for parent.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Value for parent.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Value for parent.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object processorId_ = ""; + /** + * + * + *
+     * Required. Id of the requesting object.
+     * 
+ * + * string processor_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The processorId. + */ + public java.lang.String getProcessorId() { + java.lang.Object ref = processorId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + processorId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Id of the requesting object.
+     * 
+ * + * string processor_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for processorId. + */ + public com.google.protobuf.ByteString getProcessorIdBytes() { + java.lang.Object ref = processorId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + processorId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Id of the requesting object.
+     * 
+ * + * string processor_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The processorId to set. + * @return This builder for chaining. + */ + public Builder setProcessorId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + processorId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Id of the requesting object.
+     * 
+ * + * string processor_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearProcessorId() { + processorId_ = getDefaultInstance().getProcessorId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Id of the requesting object.
+     * 
+ * + * string processor_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for processorId to set. + * @return This builder for chaining. + */ + public Builder setProcessorIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + processorId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.cloud.visionai.v1.Processor processor_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.Processor, + com.google.cloud.visionai.v1.Processor.Builder, + com.google.cloud.visionai.v1.ProcessorOrBuilder> + processorBuilder_; + /** + * + * + *
+     * Required. The resource being created.
+     * 
+ * + * + * .google.cloud.visionai.v1.Processor processor = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the processor field is set. + */ + public boolean hasProcessor() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+     * Required. The resource being created.
+     * 
+ * + * + * .google.cloud.visionai.v1.Processor processor = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The processor. + */ + public com.google.cloud.visionai.v1.Processor getProcessor() { + if (processorBuilder_ == null) { + return processor_ == null + ? com.google.cloud.visionai.v1.Processor.getDefaultInstance() + : processor_; + } else { + return processorBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The resource being created.
+     * 
+ * + * + * .google.cloud.visionai.v1.Processor processor = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setProcessor(com.google.cloud.visionai.v1.Processor value) { + if (processorBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + processor_ = value; + } else { + processorBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource being created.
+     * 
+ * + * + * .google.cloud.visionai.v1.Processor processor = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setProcessor(com.google.cloud.visionai.v1.Processor.Builder builderForValue) { + if (processorBuilder_ == null) { + processor_ = builderForValue.build(); + } else { + processorBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource being created.
+     * 
+ * + * + * .google.cloud.visionai.v1.Processor processor = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeProcessor(com.google.cloud.visionai.v1.Processor value) { + if (processorBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && processor_ != null + && processor_ != com.google.cloud.visionai.v1.Processor.getDefaultInstance()) { + getProcessorBuilder().mergeFrom(value); + } else { + processor_ = value; + } + } else { + processorBuilder_.mergeFrom(value); + } + if (processor_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Required. The resource being created.
+     * 
+ * + * + * .google.cloud.visionai.v1.Processor processor = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearProcessor() { + bitField0_ = (bitField0_ & ~0x00000004); + processor_ = null; + if (processorBuilder_ != null) { + processorBuilder_.dispose(); + processorBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource being created.
+     * 
+ * + * + * .google.cloud.visionai.v1.Processor processor = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.visionai.v1.Processor.Builder getProcessorBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getProcessorFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The resource being created.
+     * 
+ * + * + * .google.cloud.visionai.v1.Processor processor = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.visionai.v1.ProcessorOrBuilder getProcessorOrBuilder() { + if (processorBuilder_ != null) { + return processorBuilder_.getMessageOrBuilder(); + } else { + return processor_ == null + ? com.google.cloud.visionai.v1.Processor.getDefaultInstance() + : processor_; + } + } + /** + * + * + *
+     * Required. The resource being created.
+     * 
+ * + * + * .google.cloud.visionai.v1.Processor processor = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.Processor, + com.google.cloud.visionai.v1.Processor.Builder, + com.google.cloud.visionai.v1.ProcessorOrBuilder> + getProcessorFieldBuilder() { + if (processorBuilder_ == null) { + processorBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.Processor, + com.google.cloud.visionai.v1.Processor.Builder, + com.google.cloud.visionai.v1.ProcessorOrBuilder>( + getProcessor(), getParentForChildren(), isClean()); + processor_ = null; + } + return processorBuilder_; + } + + private java.lang.Object requestId_ = ""; + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + requestId_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearRequestId() { + requestId_ = getDefaultInstance().getRequestId(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + requestId_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.CreateProcessorRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.CreateProcessorRequest) + private static final com.google.cloud.visionai.v1.CreateProcessorRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.CreateProcessorRequest(); + } + + public static com.google.cloud.visionai.v1.CreateProcessorRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateProcessorRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.CreateProcessorRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/CreateProcessorRequestOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/CreateProcessorRequestOrBuilder.java new file mode 100644 index 000000000000..43418be001a4 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/CreateProcessorRequestOrBuilder.java @@ -0,0 +1,170 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/platform.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface CreateProcessorRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.CreateProcessorRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Value for parent.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. Value for parent.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Required. Id of the requesting object.
+   * 
+ * + * string processor_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The processorId. + */ + java.lang.String getProcessorId(); + /** + * + * + *
+   * Required. Id of the requesting object.
+   * 
+ * + * string processor_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for processorId. + */ + com.google.protobuf.ByteString getProcessorIdBytes(); + + /** + * + * + *
+   * Required. The resource being created.
+   * 
+ * + * + * .google.cloud.visionai.v1.Processor processor = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the processor field is set. + */ + boolean hasProcessor(); + /** + * + * + *
+   * Required. The resource being created.
+   * 
+ * + * + * .google.cloud.visionai.v1.Processor processor = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The processor. + */ + com.google.cloud.visionai.v1.Processor getProcessor(); + /** + * + * + *
+   * Required. The resource being created.
+   * 
+ * + * + * .google.cloud.visionai.v1.Processor processor = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.visionai.v1.ProcessorOrBuilder getProcessorOrBuilder(); + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and
+   * the request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + java.lang.String getRequestId(); + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and
+   * the request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + com.google.protobuf.ByteString getRequestIdBytes(); +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/CreateSearchConfigRequest.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/CreateSearchConfigRequest.java new file mode 100644 index 000000000000..d9901120acff --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/CreateSearchConfigRequest.java @@ -0,0 +1,1162 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/warehouse.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * Request message for CreateSearchConfig.
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.CreateSearchConfigRequest} + */ +public final class CreateSearchConfigRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.CreateSearchConfigRequest) + CreateSearchConfigRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use CreateSearchConfigRequest.newBuilder() to construct. + private CreateSearchConfigRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CreateSearchConfigRequest() { + parent_ = ""; + searchConfigId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CreateSearchConfigRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_CreateSearchConfigRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_CreateSearchConfigRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.CreateSearchConfigRequest.class, + com.google.cloud.visionai.v1.CreateSearchConfigRequest.Builder.class); + } + + private int bitField0_; + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + /** + * + * + *
+   * Required. The parent resource where this search configuration will be
+   * created. Format:
+   * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + 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(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The parent resource where this search configuration will be
+   * created. Format:
+   * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SEARCH_CONFIG_FIELD_NUMBER = 2; + private com.google.cloud.visionai.v1.SearchConfig searchConfig_; + /** + * + * + *
+   * Required. The search config to create.
+   * 
+ * + * + * .google.cloud.visionai.v1.SearchConfig search_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the searchConfig field is set. + */ + @java.lang.Override + public boolean hasSearchConfig() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * Required. The search config to create.
+   * 
+ * + * + * .google.cloud.visionai.v1.SearchConfig search_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The searchConfig. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.SearchConfig getSearchConfig() { + return searchConfig_ == null + ? com.google.cloud.visionai.v1.SearchConfig.getDefaultInstance() + : searchConfig_; + } + /** + * + * + *
+   * Required. The search config to create.
+   * 
+ * + * + * .google.cloud.visionai.v1.SearchConfig search_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.visionai.v1.SearchConfigOrBuilder getSearchConfigOrBuilder() { + return searchConfig_ == null + ? com.google.cloud.visionai.v1.SearchConfig.getDefaultInstance() + : searchConfig_; + } + + public static final int SEARCH_CONFIG_ID_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object searchConfigId_ = ""; + /** + * + * + *
+   * Required. ID to use for the new search config. Will become the final
+   * component of the SearchConfig's resource name. This value should be up to
+   * 63 characters, and valid characters are /[a-z][0-9]-_/. The first character
+   * must be a letter, the last could be a letter or a number.
+   * 
+ * + * string search_config_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The searchConfigId. + */ + @java.lang.Override + public java.lang.String getSearchConfigId() { + java.lang.Object ref = searchConfigId_; + 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(); + searchConfigId_ = s; + return s; + } + } + /** + * + * + *
+   * Required. ID to use for the new search config. Will become the final
+   * component of the SearchConfig's resource name. This value should be up to
+   * 63 characters, and valid characters are /[a-z][0-9]-_/. The first character
+   * must be a letter, the last could be a letter or a number.
+   * 
+ * + * string search_config_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for searchConfigId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSearchConfigIdBytes() { + java.lang.Object ref = searchConfigId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + searchConfigId_ = 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getSearchConfig()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(searchConfigId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, searchConfigId_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getSearchConfig()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(searchConfigId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, searchConfigId_); + } + size += getUnknownFields().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.visionai.v1.CreateSearchConfigRequest)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.CreateSearchConfigRequest other = + (com.google.cloud.visionai.v1.CreateSearchConfigRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (hasSearchConfig() != other.hasSearchConfig()) return false; + if (hasSearchConfig()) { + if (!getSearchConfig().equals(other.getSearchConfig())) return false; + } + if (!getSearchConfigId().equals(other.getSearchConfigId())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + if (hasSearchConfig()) { + hash = (37 * hash) + SEARCH_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getSearchConfig().hashCode(); + } + hash = (37 * hash) + SEARCH_CONFIG_ID_FIELD_NUMBER; + hash = (53 * hash) + getSearchConfigId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.CreateSearchConfigRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.CreateSearchConfigRequest 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.visionai.v1.CreateSearchConfigRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.CreateSearchConfigRequest 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.visionai.v1.CreateSearchConfigRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.CreateSearchConfigRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.CreateSearchConfigRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.CreateSearchConfigRequest 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.visionai.v1.CreateSearchConfigRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.CreateSearchConfigRequest 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.visionai.v1.CreateSearchConfigRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.CreateSearchConfigRequest 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.visionai.v1.CreateSearchConfigRequest 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; + } + /** + * + * + *
+   * Request message for CreateSearchConfig.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.CreateSearchConfigRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.CreateSearchConfigRequest) + com.google.cloud.visionai.v1.CreateSearchConfigRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_CreateSearchConfigRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_CreateSearchConfigRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.CreateSearchConfigRequest.class, + com.google.cloud.visionai.v1.CreateSearchConfigRequest.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.CreateSearchConfigRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getSearchConfigFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + searchConfig_ = null; + if (searchConfigBuilder_ != null) { + searchConfigBuilder_.dispose(); + searchConfigBuilder_ = null; + } + searchConfigId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_CreateSearchConfigRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.CreateSearchConfigRequest getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.CreateSearchConfigRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.CreateSearchConfigRequest build() { + com.google.cloud.visionai.v1.CreateSearchConfigRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.CreateSearchConfigRequest buildPartial() { + com.google.cloud.visionai.v1.CreateSearchConfigRequest result = + new com.google.cloud.visionai.v1.CreateSearchConfigRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.visionai.v1.CreateSearchConfigRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.searchConfig_ = + searchConfigBuilder_ == null ? searchConfig_ : searchConfigBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.searchConfigId_ = searchConfigId_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.CreateSearchConfigRequest) { + return mergeFrom((com.google.cloud.visionai.v1.CreateSearchConfigRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.CreateSearchConfigRequest other) { + if (other == com.google.cloud.visionai.v1.CreateSearchConfigRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasSearchConfig()) { + mergeSearchConfig(other.getSearchConfig()); + } + if (!other.getSearchConfigId().isEmpty()) { + searchConfigId_ = other.searchConfigId_; + bitField0_ |= 0x00000004; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage(getSearchConfigFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + searchConfigId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The parent resource where this search configuration will be
+     * created. Format:
+     * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The parent resource where this search configuration will be
+     * created. Format:
+     * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The parent resource where this search configuration will be
+     * created. Format:
+     * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The parent resource where this search configuration will be
+     * created. Format:
+     * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The parent resource where this search configuration will be
+     * created. Format:
+     * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.cloud.visionai.v1.SearchConfig searchConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.SearchConfig, + com.google.cloud.visionai.v1.SearchConfig.Builder, + com.google.cloud.visionai.v1.SearchConfigOrBuilder> + searchConfigBuilder_; + /** + * + * + *
+     * Required. The search config to create.
+     * 
+ * + * + * .google.cloud.visionai.v1.SearchConfig search_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the searchConfig field is set. + */ + public boolean hasSearchConfig() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * Required. The search config to create.
+     * 
+ * + * + * .google.cloud.visionai.v1.SearchConfig search_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The searchConfig. + */ + public com.google.cloud.visionai.v1.SearchConfig getSearchConfig() { + if (searchConfigBuilder_ == null) { + return searchConfig_ == null + ? com.google.cloud.visionai.v1.SearchConfig.getDefaultInstance() + : searchConfig_; + } else { + return searchConfigBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The search config to create.
+     * 
+ * + * + * .google.cloud.visionai.v1.SearchConfig search_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setSearchConfig(com.google.cloud.visionai.v1.SearchConfig value) { + if (searchConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + searchConfig_ = value; + } else { + searchConfigBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The search config to create.
+     * 
+ * + * + * .google.cloud.visionai.v1.SearchConfig search_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setSearchConfig( + com.google.cloud.visionai.v1.SearchConfig.Builder builderForValue) { + if (searchConfigBuilder_ == null) { + searchConfig_ = builderForValue.build(); + } else { + searchConfigBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The search config to create.
+     * 
+ * + * + * .google.cloud.visionai.v1.SearchConfig search_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeSearchConfig(com.google.cloud.visionai.v1.SearchConfig value) { + if (searchConfigBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && searchConfig_ != null + && searchConfig_ != com.google.cloud.visionai.v1.SearchConfig.getDefaultInstance()) { + getSearchConfigBuilder().mergeFrom(value); + } else { + searchConfig_ = value; + } + } else { + searchConfigBuilder_.mergeFrom(value); + } + if (searchConfig_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Required. The search config to create.
+     * 
+ * + * + * .google.cloud.visionai.v1.SearchConfig search_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearSearchConfig() { + bitField0_ = (bitField0_ & ~0x00000002); + searchConfig_ = null; + if (searchConfigBuilder_ != null) { + searchConfigBuilder_.dispose(); + searchConfigBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The search config to create.
+     * 
+ * + * + * .google.cloud.visionai.v1.SearchConfig search_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.visionai.v1.SearchConfig.Builder getSearchConfigBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getSearchConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The search config to create.
+     * 
+ * + * + * .google.cloud.visionai.v1.SearchConfig search_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.visionai.v1.SearchConfigOrBuilder getSearchConfigOrBuilder() { + if (searchConfigBuilder_ != null) { + return searchConfigBuilder_.getMessageOrBuilder(); + } else { + return searchConfig_ == null + ? com.google.cloud.visionai.v1.SearchConfig.getDefaultInstance() + : searchConfig_; + } + } + /** + * + * + *
+     * Required. The search config to create.
+     * 
+ * + * + * .google.cloud.visionai.v1.SearchConfig search_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.SearchConfig, + com.google.cloud.visionai.v1.SearchConfig.Builder, + com.google.cloud.visionai.v1.SearchConfigOrBuilder> + getSearchConfigFieldBuilder() { + if (searchConfigBuilder_ == null) { + searchConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.SearchConfig, + com.google.cloud.visionai.v1.SearchConfig.Builder, + com.google.cloud.visionai.v1.SearchConfigOrBuilder>( + getSearchConfig(), getParentForChildren(), isClean()); + searchConfig_ = null; + } + return searchConfigBuilder_; + } + + private java.lang.Object searchConfigId_ = ""; + /** + * + * + *
+     * Required. ID to use for the new search config. Will become the final
+     * component of the SearchConfig's resource name. This value should be up to
+     * 63 characters, and valid characters are /[a-z][0-9]-_/. The first character
+     * must be a letter, the last could be a letter or a number.
+     * 
+ * + * string search_config_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The searchConfigId. + */ + public java.lang.String getSearchConfigId() { + java.lang.Object ref = searchConfigId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + searchConfigId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. ID to use for the new search config. Will become the final
+     * component of the SearchConfig's resource name. This value should be up to
+     * 63 characters, and valid characters are /[a-z][0-9]-_/. The first character
+     * must be a letter, the last could be a letter or a number.
+     * 
+ * + * string search_config_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for searchConfigId. + */ + public com.google.protobuf.ByteString getSearchConfigIdBytes() { + java.lang.Object ref = searchConfigId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + searchConfigId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. ID to use for the new search config. Will become the final
+     * component of the SearchConfig's resource name. This value should be up to
+     * 63 characters, and valid characters are /[a-z][0-9]-_/. The first character
+     * must be a letter, the last could be a letter or a number.
+     * 
+ * + * string search_config_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The searchConfigId to set. + * @return This builder for chaining. + */ + public Builder setSearchConfigId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + searchConfigId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. ID to use for the new search config. Will become the final
+     * component of the SearchConfig's resource name. This value should be up to
+     * 63 characters, and valid characters are /[a-z][0-9]-_/. The first character
+     * must be a letter, the last could be a letter or a number.
+     * 
+ * + * string search_config_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearSearchConfigId() { + searchConfigId_ = getDefaultInstance().getSearchConfigId(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. ID to use for the new search config. Will become the final
+     * component of the SearchConfig's resource name. This value should be up to
+     * 63 characters, and valid characters are /[a-z][0-9]-_/. The first character
+     * must be a letter, the last could be a letter or a number.
+     * 
+ * + * string search_config_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for searchConfigId to set. + * @return This builder for chaining. + */ + public Builder setSearchConfigIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + searchConfigId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.CreateSearchConfigRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.CreateSearchConfigRequest) + private static final com.google.cloud.visionai.v1.CreateSearchConfigRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.CreateSearchConfigRequest(); + } + + public static com.google.cloud.visionai.v1.CreateSearchConfigRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateSearchConfigRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.CreateSearchConfigRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/CreateSearchConfigRequestOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/CreateSearchConfigRequestOrBuilder.java new file mode 100644 index 000000000000..740106bcb5dd --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/CreateSearchConfigRequestOrBuilder.java @@ -0,0 +1,131 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/warehouse.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface CreateSearchConfigRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.CreateSearchConfigRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The parent resource where this search configuration will be
+   * created. Format:
+   * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The parent resource where this search configuration will be
+   * created. Format:
+   * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Required. The search config to create.
+   * 
+ * + * + * .google.cloud.visionai.v1.SearchConfig search_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the searchConfig field is set. + */ + boolean hasSearchConfig(); + /** + * + * + *
+   * Required. The search config to create.
+   * 
+ * + * + * .google.cloud.visionai.v1.SearchConfig search_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The searchConfig. + */ + com.google.cloud.visionai.v1.SearchConfig getSearchConfig(); + /** + * + * + *
+   * Required. The search config to create.
+   * 
+ * + * + * .google.cloud.visionai.v1.SearchConfig search_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.visionai.v1.SearchConfigOrBuilder getSearchConfigOrBuilder(); + + /** + * + * + *
+   * Required. ID to use for the new search config. Will become the final
+   * component of the SearchConfig's resource name. This value should be up to
+   * 63 characters, and valid characters are /[a-z][0-9]-_/. The first character
+   * must be a letter, the last could be a letter or a number.
+   * 
+ * + * string search_config_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The searchConfigId. + */ + java.lang.String getSearchConfigId(); + /** + * + * + *
+   * Required. ID to use for the new search config. Will become the final
+   * component of the SearchConfig's resource name. This value should be up to
+   * 63 characters, and valid characters are /[a-z][0-9]-_/. The first character
+   * must be a letter, the last could be a letter or a number.
+   * 
+ * + * string search_config_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for searchConfigId. + */ + com.google.protobuf.ByteString getSearchConfigIdBytes(); +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/CreateSearchHypernymRequest.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/CreateSearchHypernymRequest.java new file mode 100644 index 000000000000..5eab4b90cda6 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/CreateSearchHypernymRequest.java @@ -0,0 +1,1185 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/warehouse.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * Request message for creating SearchHypernym.
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.CreateSearchHypernymRequest} + */ +public final class CreateSearchHypernymRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.CreateSearchHypernymRequest) + CreateSearchHypernymRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use CreateSearchHypernymRequest.newBuilder() to construct. + private CreateSearchHypernymRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CreateSearchHypernymRequest() { + parent_ = ""; + searchHypernymId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CreateSearchHypernymRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_CreateSearchHypernymRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_CreateSearchHypernymRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.CreateSearchHypernymRequest.class, + com.google.cloud.visionai.v1.CreateSearchHypernymRequest.Builder.class); + } + + private int bitField0_; + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + /** + * + * + *
+   * Required. The parent resource where this SearchHypernym will be created.
+   * Format: `projects/{project_number}/locations/{location}/corpora/{corpus}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + 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(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The parent resource where this SearchHypernym will be created.
+   * Format: `projects/{project_number}/locations/{location}/corpora/{corpus}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SEARCH_HYPERNYM_FIELD_NUMBER = 2; + private com.google.cloud.visionai.v1.SearchHypernym searchHypernym_; + /** + * + * + *
+   * Required. The SearchHypernym to create.
+   * 
+ * + * + * .google.cloud.visionai.v1.SearchHypernym search_hypernym = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the searchHypernym field is set. + */ + @java.lang.Override + public boolean hasSearchHypernym() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * Required. The SearchHypernym to create.
+   * 
+ * + * + * .google.cloud.visionai.v1.SearchHypernym search_hypernym = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The searchHypernym. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.SearchHypernym getSearchHypernym() { + return searchHypernym_ == null + ? com.google.cloud.visionai.v1.SearchHypernym.getDefaultInstance() + : searchHypernym_; + } + /** + * + * + *
+   * Required. The SearchHypernym to create.
+   * 
+ * + * + * .google.cloud.visionai.v1.SearchHypernym search_hypernym = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.visionai.v1.SearchHypernymOrBuilder getSearchHypernymOrBuilder() { + return searchHypernym_ == null + ? com.google.cloud.visionai.v1.SearchHypernym.getDefaultInstance() + : searchHypernym_; + } + + public static final int SEARCH_HYPERNYM_ID_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object searchHypernymId_ = ""; + /** + * + * + *
+   * Optional. The search hypernym id.
+   * If omitted, a random UUID will be generated.
+   * 
+ * + * optional string search_hypernym_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the searchHypernymId field is set. + */ + @java.lang.Override + public boolean hasSearchHypernymId() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+   * Optional. The search hypernym id.
+   * If omitted, a random UUID will be generated.
+   * 
+ * + * optional string search_hypernym_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The searchHypernymId. + */ + @java.lang.Override + public java.lang.String getSearchHypernymId() { + java.lang.Object ref = searchHypernymId_; + 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(); + searchHypernymId_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. The search hypernym id.
+   * If omitted, a random UUID will be generated.
+   * 
+ * + * optional string search_hypernym_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for searchHypernymId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSearchHypernymIdBytes() { + java.lang.Object ref = searchHypernymId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + searchHypernymId_ = 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getSearchHypernym()); + } + if (((bitField0_ & 0x00000002) != 0)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, searchHypernymId_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getSearchHypernym()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, searchHypernymId_); + } + size += getUnknownFields().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.visionai.v1.CreateSearchHypernymRequest)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.CreateSearchHypernymRequest other = + (com.google.cloud.visionai.v1.CreateSearchHypernymRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (hasSearchHypernym() != other.hasSearchHypernym()) return false; + if (hasSearchHypernym()) { + if (!getSearchHypernym().equals(other.getSearchHypernym())) return false; + } + if (hasSearchHypernymId() != other.hasSearchHypernymId()) return false; + if (hasSearchHypernymId()) { + if (!getSearchHypernymId().equals(other.getSearchHypernymId())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + if (hasSearchHypernym()) { + hash = (37 * hash) + SEARCH_HYPERNYM_FIELD_NUMBER; + hash = (53 * hash) + getSearchHypernym().hashCode(); + } + if (hasSearchHypernymId()) { + hash = (37 * hash) + SEARCH_HYPERNYM_ID_FIELD_NUMBER; + hash = (53 * hash) + getSearchHypernymId().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.CreateSearchHypernymRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.CreateSearchHypernymRequest 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.visionai.v1.CreateSearchHypernymRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.CreateSearchHypernymRequest 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.visionai.v1.CreateSearchHypernymRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.CreateSearchHypernymRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.CreateSearchHypernymRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.CreateSearchHypernymRequest 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.visionai.v1.CreateSearchHypernymRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.CreateSearchHypernymRequest 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.visionai.v1.CreateSearchHypernymRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.CreateSearchHypernymRequest 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.visionai.v1.CreateSearchHypernymRequest 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; + } + /** + * + * + *
+   * Request message for creating SearchHypernym.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.CreateSearchHypernymRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.CreateSearchHypernymRequest) + com.google.cloud.visionai.v1.CreateSearchHypernymRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_CreateSearchHypernymRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_CreateSearchHypernymRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.CreateSearchHypernymRequest.class, + com.google.cloud.visionai.v1.CreateSearchHypernymRequest.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.CreateSearchHypernymRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getSearchHypernymFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + searchHypernym_ = null; + if (searchHypernymBuilder_ != null) { + searchHypernymBuilder_.dispose(); + searchHypernymBuilder_ = null; + } + searchHypernymId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_CreateSearchHypernymRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.CreateSearchHypernymRequest getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.CreateSearchHypernymRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.CreateSearchHypernymRequest build() { + com.google.cloud.visionai.v1.CreateSearchHypernymRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.CreateSearchHypernymRequest buildPartial() { + com.google.cloud.visionai.v1.CreateSearchHypernymRequest result = + new com.google.cloud.visionai.v1.CreateSearchHypernymRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.visionai.v1.CreateSearchHypernymRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.searchHypernym_ = + searchHypernymBuilder_ == null ? searchHypernym_ : searchHypernymBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.searchHypernymId_ = searchHypernymId_; + to_bitField0_ |= 0x00000002; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.CreateSearchHypernymRequest) { + return mergeFrom((com.google.cloud.visionai.v1.CreateSearchHypernymRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.CreateSearchHypernymRequest other) { + if (other == com.google.cloud.visionai.v1.CreateSearchHypernymRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasSearchHypernym()) { + mergeSearchHypernym(other.getSearchHypernym()); + } + if (other.hasSearchHypernymId()) { + searchHypernymId_ = other.searchHypernymId_; + bitField0_ |= 0x00000004; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage(getSearchHypernymFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + searchHypernymId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The parent resource where this SearchHypernym will be created.
+     * Format: `projects/{project_number}/locations/{location}/corpora/{corpus}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The parent resource where this SearchHypernym will be created.
+     * Format: `projects/{project_number}/locations/{location}/corpora/{corpus}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The parent resource where this SearchHypernym will be created.
+     * Format: `projects/{project_number}/locations/{location}/corpora/{corpus}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The parent resource where this SearchHypernym will be created.
+     * Format: `projects/{project_number}/locations/{location}/corpora/{corpus}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The parent resource where this SearchHypernym will be created.
+     * Format: `projects/{project_number}/locations/{location}/corpora/{corpus}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.cloud.visionai.v1.SearchHypernym searchHypernym_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.SearchHypernym, + com.google.cloud.visionai.v1.SearchHypernym.Builder, + com.google.cloud.visionai.v1.SearchHypernymOrBuilder> + searchHypernymBuilder_; + /** + * + * + *
+     * Required. The SearchHypernym to create.
+     * 
+ * + * + * .google.cloud.visionai.v1.SearchHypernym search_hypernym = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the searchHypernym field is set. + */ + public boolean hasSearchHypernym() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * Required. The SearchHypernym to create.
+     * 
+ * + * + * .google.cloud.visionai.v1.SearchHypernym search_hypernym = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The searchHypernym. + */ + public com.google.cloud.visionai.v1.SearchHypernym getSearchHypernym() { + if (searchHypernymBuilder_ == null) { + return searchHypernym_ == null + ? com.google.cloud.visionai.v1.SearchHypernym.getDefaultInstance() + : searchHypernym_; + } else { + return searchHypernymBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The SearchHypernym to create.
+     * 
+ * + * + * .google.cloud.visionai.v1.SearchHypernym search_hypernym = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setSearchHypernym(com.google.cloud.visionai.v1.SearchHypernym value) { + if (searchHypernymBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + searchHypernym_ = value; + } else { + searchHypernymBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The SearchHypernym to create.
+     * 
+ * + * + * .google.cloud.visionai.v1.SearchHypernym search_hypernym = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setSearchHypernym( + com.google.cloud.visionai.v1.SearchHypernym.Builder builderForValue) { + if (searchHypernymBuilder_ == null) { + searchHypernym_ = builderForValue.build(); + } else { + searchHypernymBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The SearchHypernym to create.
+     * 
+ * + * + * .google.cloud.visionai.v1.SearchHypernym search_hypernym = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeSearchHypernym(com.google.cloud.visionai.v1.SearchHypernym value) { + if (searchHypernymBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && searchHypernym_ != null + && searchHypernym_ + != com.google.cloud.visionai.v1.SearchHypernym.getDefaultInstance()) { + getSearchHypernymBuilder().mergeFrom(value); + } else { + searchHypernym_ = value; + } + } else { + searchHypernymBuilder_.mergeFrom(value); + } + if (searchHypernym_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Required. The SearchHypernym to create.
+     * 
+ * + * + * .google.cloud.visionai.v1.SearchHypernym search_hypernym = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearSearchHypernym() { + bitField0_ = (bitField0_ & ~0x00000002); + searchHypernym_ = null; + if (searchHypernymBuilder_ != null) { + searchHypernymBuilder_.dispose(); + searchHypernymBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The SearchHypernym to create.
+     * 
+ * + * + * .google.cloud.visionai.v1.SearchHypernym search_hypernym = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.visionai.v1.SearchHypernym.Builder getSearchHypernymBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getSearchHypernymFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The SearchHypernym to create.
+     * 
+ * + * + * .google.cloud.visionai.v1.SearchHypernym search_hypernym = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.visionai.v1.SearchHypernymOrBuilder getSearchHypernymOrBuilder() { + if (searchHypernymBuilder_ != null) { + return searchHypernymBuilder_.getMessageOrBuilder(); + } else { + return searchHypernym_ == null + ? com.google.cloud.visionai.v1.SearchHypernym.getDefaultInstance() + : searchHypernym_; + } + } + /** + * + * + *
+     * Required. The SearchHypernym to create.
+     * 
+ * + * + * .google.cloud.visionai.v1.SearchHypernym search_hypernym = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.SearchHypernym, + com.google.cloud.visionai.v1.SearchHypernym.Builder, + com.google.cloud.visionai.v1.SearchHypernymOrBuilder> + getSearchHypernymFieldBuilder() { + if (searchHypernymBuilder_ == null) { + searchHypernymBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.SearchHypernym, + com.google.cloud.visionai.v1.SearchHypernym.Builder, + com.google.cloud.visionai.v1.SearchHypernymOrBuilder>( + getSearchHypernym(), getParentForChildren(), isClean()); + searchHypernym_ = null; + } + return searchHypernymBuilder_; + } + + private java.lang.Object searchHypernymId_ = ""; + /** + * + * + *
+     * Optional. The search hypernym id.
+     * If omitted, a random UUID will be generated.
+     * 
+ * + * optional string search_hypernym_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the searchHypernymId field is set. + */ + public boolean hasSearchHypernymId() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+     * Optional. The search hypernym id.
+     * If omitted, a random UUID will be generated.
+     * 
+ * + * optional string search_hypernym_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The searchHypernymId. + */ + public java.lang.String getSearchHypernymId() { + java.lang.Object ref = searchHypernymId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + searchHypernymId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. The search hypernym id.
+     * If omitted, a random UUID will be generated.
+     * 
+ * + * optional string search_hypernym_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The bytes for searchHypernymId. + */ + public com.google.protobuf.ByteString getSearchHypernymIdBytes() { + java.lang.Object ref = searchHypernymId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + searchHypernymId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. The search hypernym id.
+     * If omitted, a random UUID will be generated.
+     * 
+ * + * optional string search_hypernym_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The searchHypernymId to set. + * @return This builder for chaining. + */ + public Builder setSearchHypernymId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + searchHypernymId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The search hypernym id.
+     * If omitted, a random UUID will be generated.
+     * 
+ * + * optional string search_hypernym_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearSearchHypernymId() { + searchHypernymId_ = getDefaultInstance().getSearchHypernymId(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The search hypernym id.
+     * If omitted, a random UUID will be generated.
+     * 
+ * + * optional string search_hypernym_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The bytes for searchHypernymId to set. + * @return This builder for chaining. + */ + public Builder setSearchHypernymIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + searchHypernymId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.CreateSearchHypernymRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.CreateSearchHypernymRequest) + private static final com.google.cloud.visionai.v1.CreateSearchHypernymRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.CreateSearchHypernymRequest(); + } + + public static com.google.cloud.visionai.v1.CreateSearchHypernymRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateSearchHypernymRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.CreateSearchHypernymRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/CreateSearchHypernymRequestOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/CreateSearchHypernymRequestOrBuilder.java new file mode 100644 index 000000000000..2405234322f6 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/CreateSearchHypernymRequestOrBuilder.java @@ -0,0 +1,138 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/warehouse.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface CreateSearchHypernymRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.CreateSearchHypernymRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The parent resource where this SearchHypernym will be created.
+   * Format: `projects/{project_number}/locations/{location}/corpora/{corpus}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The parent resource where this SearchHypernym will be created.
+   * Format: `projects/{project_number}/locations/{location}/corpora/{corpus}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Required. The SearchHypernym to create.
+   * 
+ * + * + * .google.cloud.visionai.v1.SearchHypernym search_hypernym = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the searchHypernym field is set. + */ + boolean hasSearchHypernym(); + /** + * + * + *
+   * Required. The SearchHypernym to create.
+   * 
+ * + * + * .google.cloud.visionai.v1.SearchHypernym search_hypernym = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The searchHypernym. + */ + com.google.cloud.visionai.v1.SearchHypernym getSearchHypernym(); + /** + * + * + *
+   * Required. The SearchHypernym to create.
+   * 
+ * + * + * .google.cloud.visionai.v1.SearchHypernym search_hypernym = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.visionai.v1.SearchHypernymOrBuilder getSearchHypernymOrBuilder(); + + /** + * + * + *
+   * Optional. The search hypernym id.
+   * If omitted, a random UUID will be generated.
+   * 
+ * + * optional string search_hypernym_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the searchHypernymId field is set. + */ + boolean hasSearchHypernymId(); + /** + * + * + *
+   * Optional. The search hypernym id.
+   * If omitted, a random UUID will be generated.
+   * 
+ * + * optional string search_hypernym_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The searchHypernymId. + */ + java.lang.String getSearchHypernymId(); + /** + * + * + *
+   * Optional. The search hypernym id.
+   * If omitted, a random UUID will be generated.
+   * 
+ * + * optional string search_hypernym_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for searchHypernymId. + */ + com.google.protobuf.ByteString getSearchHypernymIdBytes(); +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/CreateSeriesRequest.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/CreateSeriesRequest.java new file mode 100644 index 000000000000..8dd4bbfd8402 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/CreateSeriesRequest.java @@ -0,0 +1,1370 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/streams_service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * Message for creating a Series.
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.CreateSeriesRequest} + */ +public final class CreateSeriesRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.CreateSeriesRequest) + CreateSeriesRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use CreateSeriesRequest.newBuilder() to construct. + private CreateSeriesRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CreateSeriesRequest() { + parent_ = ""; + seriesId_ = ""; + requestId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CreateSeriesRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.StreamsServiceProto + .internal_static_google_cloud_visionai_v1_CreateSeriesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.StreamsServiceProto + .internal_static_google_cloud_visionai_v1_CreateSeriesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.CreateSeriesRequest.class, + com.google.cloud.visionai.v1.CreateSeriesRequest.Builder.class); + } + + private int bitField0_; + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + /** + * + * + *
+   * Required. Value for parent.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + 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(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Value for parent.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SERIES_ID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object seriesId_ = ""; + /** + * + * + *
+   * Required. Id of the requesting object.
+   * 
+ * + * string series_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The seriesId. + */ + @java.lang.Override + public java.lang.String getSeriesId() { + java.lang.Object ref = seriesId_; + 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(); + seriesId_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Id of the requesting object.
+   * 
+ * + * string series_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for seriesId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSeriesIdBytes() { + java.lang.Object ref = seriesId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + seriesId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SERIES_FIELD_NUMBER = 3; + private com.google.cloud.visionai.v1.Series series_; + /** + * + * + *
+   * Required. The resource being created.
+   * 
+ * + * .google.cloud.visionai.v1.Series series = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the series field is set. + */ + @java.lang.Override + public boolean hasSeries() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * Required. The resource being created.
+   * 
+ * + * .google.cloud.visionai.v1.Series series = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The series. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.Series getSeries() { + return series_ == null ? com.google.cloud.visionai.v1.Series.getDefaultInstance() : series_; + } + /** + * + * + *
+   * Required. The resource being created.
+   * 
+ * + * .google.cloud.visionai.v1.Series series = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.visionai.v1.SeriesOrBuilder getSeriesOrBuilder() { + return series_ == null ? com.google.cloud.visionai.v1.Series.getDefaultInstance() : series_; + } + + public static final int REQUEST_ID_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object requestId_ = ""; + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request ID,
+   * the server can check if original operation with the same request ID was
+   * received, and if so, will ignore the second request. This prevents clients
+   * from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + @java.lang.Override + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + 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(); + requestId_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request ID,
+   * the server can check if original operation with the same request ID was
+   * received, and if so, will ignore the second request. This prevents clients
+   * from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(seriesId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, seriesId_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(3, getSeries()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, requestId_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(seriesId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, seriesId_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getSeries()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, requestId_); + } + size += getUnknownFields().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.visionai.v1.CreateSeriesRequest)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.CreateSeriesRequest other = + (com.google.cloud.visionai.v1.CreateSeriesRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (!getSeriesId().equals(other.getSeriesId())) return false; + if (hasSeries() != other.hasSeries()) return false; + if (hasSeries()) { + if (!getSeries().equals(other.getSeries())) return false; + } + if (!getRequestId().equals(other.getRequestId())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + SERIES_ID_FIELD_NUMBER; + hash = (53 * hash) + getSeriesId().hashCode(); + if (hasSeries()) { + hash = (37 * hash) + SERIES_FIELD_NUMBER; + hash = (53 * hash) + getSeries().hashCode(); + } + hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; + hash = (53 * hash) + getRequestId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.CreateSeriesRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.CreateSeriesRequest 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.visionai.v1.CreateSeriesRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.CreateSeriesRequest 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.visionai.v1.CreateSeriesRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.CreateSeriesRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.CreateSeriesRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.CreateSeriesRequest 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.visionai.v1.CreateSeriesRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.CreateSeriesRequest 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.visionai.v1.CreateSeriesRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.CreateSeriesRequest 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.visionai.v1.CreateSeriesRequest 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; + } + /** + * + * + *
+   * Message for creating a Series.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.CreateSeriesRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.CreateSeriesRequest) + com.google.cloud.visionai.v1.CreateSeriesRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.StreamsServiceProto + .internal_static_google_cloud_visionai_v1_CreateSeriesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.StreamsServiceProto + .internal_static_google_cloud_visionai_v1_CreateSeriesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.CreateSeriesRequest.class, + com.google.cloud.visionai.v1.CreateSeriesRequest.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.CreateSeriesRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getSeriesFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + seriesId_ = ""; + series_ = null; + if (seriesBuilder_ != null) { + seriesBuilder_.dispose(); + seriesBuilder_ = null; + } + requestId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.StreamsServiceProto + .internal_static_google_cloud_visionai_v1_CreateSeriesRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.CreateSeriesRequest getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.CreateSeriesRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.CreateSeriesRequest build() { + com.google.cloud.visionai.v1.CreateSeriesRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.CreateSeriesRequest buildPartial() { + com.google.cloud.visionai.v1.CreateSeriesRequest result = + new com.google.cloud.visionai.v1.CreateSeriesRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.visionai.v1.CreateSeriesRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.seriesId_ = seriesId_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.series_ = seriesBuilder_ == null ? series_ : seriesBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.requestId_ = requestId_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.CreateSeriesRequest) { + return mergeFrom((com.google.cloud.visionai.v1.CreateSeriesRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.CreateSeriesRequest other) { + if (other == com.google.cloud.visionai.v1.CreateSeriesRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getSeriesId().isEmpty()) { + seriesId_ = other.seriesId_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.hasSeries()) { + mergeSeries(other.getSeries()); + } + if (!other.getRequestId().isEmpty()) { + requestId_ = other.requestId_; + bitField0_ |= 0x00000008; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + seriesId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage(getSeriesFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. Value for parent.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Value for parent.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Value for parent.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Value for parent.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Value for parent.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object seriesId_ = ""; + /** + * + * + *
+     * Required. Id of the requesting object.
+     * 
+ * + * string series_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The seriesId. + */ + public java.lang.String getSeriesId() { + java.lang.Object ref = seriesId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + seriesId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Id of the requesting object.
+     * 
+ * + * string series_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for seriesId. + */ + public com.google.protobuf.ByteString getSeriesIdBytes() { + java.lang.Object ref = seriesId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + seriesId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Id of the requesting object.
+     * 
+ * + * string series_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The seriesId to set. + * @return This builder for chaining. + */ + public Builder setSeriesId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + seriesId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Id of the requesting object.
+     * 
+ * + * string series_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearSeriesId() { + seriesId_ = getDefaultInstance().getSeriesId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Id of the requesting object.
+     * 
+ * + * string series_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for seriesId to set. + * @return This builder for chaining. + */ + public Builder setSeriesIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + seriesId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.cloud.visionai.v1.Series series_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.Series, + com.google.cloud.visionai.v1.Series.Builder, + com.google.cloud.visionai.v1.SeriesOrBuilder> + seriesBuilder_; + /** + * + * + *
+     * Required. The resource being created.
+     * 
+ * + * .google.cloud.visionai.v1.Series series = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the series field is set. + */ + public boolean hasSeries() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+     * Required. The resource being created.
+     * 
+ * + * .google.cloud.visionai.v1.Series series = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The series. + */ + public com.google.cloud.visionai.v1.Series getSeries() { + if (seriesBuilder_ == null) { + return series_ == null ? com.google.cloud.visionai.v1.Series.getDefaultInstance() : series_; + } else { + return seriesBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The resource being created.
+     * 
+ * + * .google.cloud.visionai.v1.Series series = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setSeries(com.google.cloud.visionai.v1.Series value) { + if (seriesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + series_ = value; + } else { + seriesBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource being created.
+     * 
+ * + * .google.cloud.visionai.v1.Series series = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setSeries(com.google.cloud.visionai.v1.Series.Builder builderForValue) { + if (seriesBuilder_ == null) { + series_ = builderForValue.build(); + } else { + seriesBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource being created.
+     * 
+ * + * .google.cloud.visionai.v1.Series series = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeSeries(com.google.cloud.visionai.v1.Series value) { + if (seriesBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && series_ != null + && series_ != com.google.cloud.visionai.v1.Series.getDefaultInstance()) { + getSeriesBuilder().mergeFrom(value); + } else { + series_ = value; + } + } else { + seriesBuilder_.mergeFrom(value); + } + if (series_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Required. The resource being created.
+     * 
+ * + * .google.cloud.visionai.v1.Series series = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearSeries() { + bitField0_ = (bitField0_ & ~0x00000004); + series_ = null; + if (seriesBuilder_ != null) { + seriesBuilder_.dispose(); + seriesBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource being created.
+     * 
+ * + * .google.cloud.visionai.v1.Series series = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.visionai.v1.Series.Builder getSeriesBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getSeriesFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The resource being created.
+     * 
+ * + * .google.cloud.visionai.v1.Series series = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.visionai.v1.SeriesOrBuilder getSeriesOrBuilder() { + if (seriesBuilder_ != null) { + return seriesBuilder_.getMessageOrBuilder(); + } else { + return series_ == null ? com.google.cloud.visionai.v1.Series.getDefaultInstance() : series_; + } + } + /** + * + * + *
+     * Required. The resource being created.
+     * 
+ * + * .google.cloud.visionai.v1.Series series = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.Series, + com.google.cloud.visionai.v1.Series.Builder, + com.google.cloud.visionai.v1.SeriesOrBuilder> + getSeriesFieldBuilder() { + if (seriesBuilder_ == null) { + seriesBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.Series, + com.google.cloud.visionai.v1.Series.Builder, + com.google.cloud.visionai.v1.SeriesOrBuilder>( + getSeries(), getParentForChildren(), isClean()); + series_ = null; + } + return seriesBuilder_; + } + + private java.lang.Object requestId_ = ""; + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request ID,
+     * the server can check if original operation with the same request ID was
+     * received, and if so, will ignore the second request. This prevents clients
+     * from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request ID,
+     * the server can check if original operation with the same request ID was
+     * received, and if so, will ignore the second request. This prevents clients
+     * from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request ID,
+     * the server can check if original operation with the same request ID was
+     * received, and if so, will ignore the second request. This prevents clients
+     * from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + requestId_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request ID,
+     * the server can check if original operation with the same request ID was
+     * received, and if so, will ignore the second request. This prevents clients
+     * from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearRequestId() { + requestId_ = getDefaultInstance().getRequestId(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request ID,
+     * the server can check if original operation with the same request ID was
+     * received, and if so, will ignore the second request. This prevents clients
+     * from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + requestId_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.CreateSeriesRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.CreateSeriesRequest) + private static final com.google.cloud.visionai.v1.CreateSeriesRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.CreateSeriesRequest(); + } + + public static com.google.cloud.visionai.v1.CreateSeriesRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateSeriesRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.CreateSeriesRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/CreateSeriesRequestOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/CreateSeriesRequestOrBuilder.java new file mode 100644 index 000000000000..e8bf6b9b7a93 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/CreateSeriesRequestOrBuilder.java @@ -0,0 +1,167 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/streams_service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface CreateSeriesRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.CreateSeriesRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Value for parent.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. Value for parent.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Required. Id of the requesting object.
+   * 
+ * + * string series_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The seriesId. + */ + java.lang.String getSeriesId(); + /** + * + * + *
+   * Required. Id of the requesting object.
+   * 
+ * + * string series_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for seriesId. + */ + com.google.protobuf.ByteString getSeriesIdBytes(); + + /** + * + * + *
+   * Required. The resource being created.
+   * 
+ * + * .google.cloud.visionai.v1.Series series = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the series field is set. + */ + boolean hasSeries(); + /** + * + * + *
+   * Required. The resource being created.
+   * 
+ * + * .google.cloud.visionai.v1.Series series = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The series. + */ + com.google.cloud.visionai.v1.Series getSeries(); + /** + * + * + *
+   * Required. The resource being created.
+   * 
+ * + * .google.cloud.visionai.v1.Series series = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.visionai.v1.SeriesOrBuilder getSeriesOrBuilder(); + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request ID,
+   * the server can check if original operation with the same request ID was
+   * received, and if so, will ignore the second request. This prevents clients
+   * from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + java.lang.String getRequestId(); + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request ID,
+   * the server can check if original operation with the same request ID was
+   * received, and if so, will ignore the second request. This prevents clients
+   * from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + com.google.protobuf.ByteString getRequestIdBytes(); +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/CreateStreamRequest.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/CreateStreamRequest.java new file mode 100644 index 000000000000..07798b12bfe4 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/CreateStreamRequest.java @@ -0,0 +1,1370 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/streams_service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * Message for creating a Stream.
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.CreateStreamRequest} + */ +public final class CreateStreamRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.CreateStreamRequest) + CreateStreamRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use CreateStreamRequest.newBuilder() to construct. + private CreateStreamRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CreateStreamRequest() { + parent_ = ""; + streamId_ = ""; + requestId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CreateStreamRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.StreamsServiceProto + .internal_static_google_cloud_visionai_v1_CreateStreamRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.StreamsServiceProto + .internal_static_google_cloud_visionai_v1_CreateStreamRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.CreateStreamRequest.class, + com.google.cloud.visionai.v1.CreateStreamRequest.Builder.class); + } + + private int bitField0_; + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + /** + * + * + *
+   * Required. Value for parent.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + 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(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Value for parent.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int STREAM_ID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object streamId_ = ""; + /** + * + * + *
+   * Required. Id of the requesting object.
+   * 
+ * + * string stream_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The streamId. + */ + @java.lang.Override + public java.lang.String getStreamId() { + java.lang.Object ref = streamId_; + 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(); + streamId_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Id of the requesting object.
+   * 
+ * + * string stream_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for streamId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getStreamIdBytes() { + java.lang.Object ref = streamId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + streamId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int STREAM_FIELD_NUMBER = 3; + private com.google.cloud.visionai.v1.Stream stream_; + /** + * + * + *
+   * Required. The resource being created.
+   * 
+ * + * .google.cloud.visionai.v1.Stream stream = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the stream field is set. + */ + @java.lang.Override + public boolean hasStream() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * Required. The resource being created.
+   * 
+ * + * .google.cloud.visionai.v1.Stream stream = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The stream. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.Stream getStream() { + return stream_ == null ? com.google.cloud.visionai.v1.Stream.getDefaultInstance() : stream_; + } + /** + * + * + *
+   * Required. The resource being created.
+   * 
+ * + * .google.cloud.visionai.v1.Stream stream = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.visionai.v1.StreamOrBuilder getStreamOrBuilder() { + return stream_ == null ? com.google.cloud.visionai.v1.Stream.getDefaultInstance() : stream_; + } + + public static final int REQUEST_ID_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object requestId_ = ""; + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request ID,
+   * the server can check if original operation with the same request ID was
+   * received, and if so, will ignore the second request. This prevents clients
+   * from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + @java.lang.Override + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + 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(); + requestId_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request ID,
+   * the server can check if original operation with the same request ID was
+   * received, and if so, will ignore the second request. This prevents clients
+   * from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(streamId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, streamId_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(3, getStream()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, requestId_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(streamId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, streamId_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getStream()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, requestId_); + } + size += getUnknownFields().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.visionai.v1.CreateStreamRequest)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.CreateStreamRequest other = + (com.google.cloud.visionai.v1.CreateStreamRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (!getStreamId().equals(other.getStreamId())) return false; + if (hasStream() != other.hasStream()) return false; + if (hasStream()) { + if (!getStream().equals(other.getStream())) return false; + } + if (!getRequestId().equals(other.getRequestId())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + STREAM_ID_FIELD_NUMBER; + hash = (53 * hash) + getStreamId().hashCode(); + if (hasStream()) { + hash = (37 * hash) + STREAM_FIELD_NUMBER; + hash = (53 * hash) + getStream().hashCode(); + } + hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; + hash = (53 * hash) + getRequestId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.CreateStreamRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.CreateStreamRequest 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.visionai.v1.CreateStreamRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.CreateStreamRequest 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.visionai.v1.CreateStreamRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.CreateStreamRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.CreateStreamRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.CreateStreamRequest 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.visionai.v1.CreateStreamRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.CreateStreamRequest 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.visionai.v1.CreateStreamRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.CreateStreamRequest 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.visionai.v1.CreateStreamRequest 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; + } + /** + * + * + *
+   * Message for creating a Stream.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.CreateStreamRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.CreateStreamRequest) + com.google.cloud.visionai.v1.CreateStreamRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.StreamsServiceProto + .internal_static_google_cloud_visionai_v1_CreateStreamRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.StreamsServiceProto + .internal_static_google_cloud_visionai_v1_CreateStreamRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.CreateStreamRequest.class, + com.google.cloud.visionai.v1.CreateStreamRequest.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.CreateStreamRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getStreamFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + streamId_ = ""; + stream_ = null; + if (streamBuilder_ != null) { + streamBuilder_.dispose(); + streamBuilder_ = null; + } + requestId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.StreamsServiceProto + .internal_static_google_cloud_visionai_v1_CreateStreamRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.CreateStreamRequest getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.CreateStreamRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.CreateStreamRequest build() { + com.google.cloud.visionai.v1.CreateStreamRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.CreateStreamRequest buildPartial() { + com.google.cloud.visionai.v1.CreateStreamRequest result = + new com.google.cloud.visionai.v1.CreateStreamRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.visionai.v1.CreateStreamRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.streamId_ = streamId_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.stream_ = streamBuilder_ == null ? stream_ : streamBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.requestId_ = requestId_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.CreateStreamRequest) { + return mergeFrom((com.google.cloud.visionai.v1.CreateStreamRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.CreateStreamRequest other) { + if (other == com.google.cloud.visionai.v1.CreateStreamRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getStreamId().isEmpty()) { + streamId_ = other.streamId_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.hasStream()) { + mergeStream(other.getStream()); + } + if (!other.getRequestId().isEmpty()) { + requestId_ = other.requestId_; + bitField0_ |= 0x00000008; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + streamId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage(getStreamFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. Value for parent.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Value for parent.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Value for parent.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Value for parent.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Value for parent.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object streamId_ = ""; + /** + * + * + *
+     * Required. Id of the requesting object.
+     * 
+ * + * string stream_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The streamId. + */ + public java.lang.String getStreamId() { + java.lang.Object ref = streamId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + streamId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Id of the requesting object.
+     * 
+ * + * string stream_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for streamId. + */ + public com.google.protobuf.ByteString getStreamIdBytes() { + java.lang.Object ref = streamId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + streamId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Id of the requesting object.
+     * 
+ * + * string stream_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The streamId to set. + * @return This builder for chaining. + */ + public Builder setStreamId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + streamId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Id of the requesting object.
+     * 
+ * + * string stream_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearStreamId() { + streamId_ = getDefaultInstance().getStreamId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Id of the requesting object.
+     * 
+ * + * string stream_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for streamId to set. + * @return This builder for chaining. + */ + public Builder setStreamIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + streamId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.cloud.visionai.v1.Stream stream_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.Stream, + com.google.cloud.visionai.v1.Stream.Builder, + com.google.cloud.visionai.v1.StreamOrBuilder> + streamBuilder_; + /** + * + * + *
+     * Required. The resource being created.
+     * 
+ * + * .google.cloud.visionai.v1.Stream stream = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the stream field is set. + */ + public boolean hasStream() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+     * Required. The resource being created.
+     * 
+ * + * .google.cloud.visionai.v1.Stream stream = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The stream. + */ + public com.google.cloud.visionai.v1.Stream getStream() { + if (streamBuilder_ == null) { + return stream_ == null ? com.google.cloud.visionai.v1.Stream.getDefaultInstance() : stream_; + } else { + return streamBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The resource being created.
+     * 
+ * + * .google.cloud.visionai.v1.Stream stream = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setStream(com.google.cloud.visionai.v1.Stream value) { + if (streamBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + stream_ = value; + } else { + streamBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource being created.
+     * 
+ * + * .google.cloud.visionai.v1.Stream stream = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setStream(com.google.cloud.visionai.v1.Stream.Builder builderForValue) { + if (streamBuilder_ == null) { + stream_ = builderForValue.build(); + } else { + streamBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource being created.
+     * 
+ * + * .google.cloud.visionai.v1.Stream stream = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeStream(com.google.cloud.visionai.v1.Stream value) { + if (streamBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && stream_ != null + && stream_ != com.google.cloud.visionai.v1.Stream.getDefaultInstance()) { + getStreamBuilder().mergeFrom(value); + } else { + stream_ = value; + } + } else { + streamBuilder_.mergeFrom(value); + } + if (stream_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Required. The resource being created.
+     * 
+ * + * .google.cloud.visionai.v1.Stream stream = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearStream() { + bitField0_ = (bitField0_ & ~0x00000004); + stream_ = null; + if (streamBuilder_ != null) { + streamBuilder_.dispose(); + streamBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource being created.
+     * 
+ * + * .google.cloud.visionai.v1.Stream stream = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.visionai.v1.Stream.Builder getStreamBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getStreamFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The resource being created.
+     * 
+ * + * .google.cloud.visionai.v1.Stream stream = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.visionai.v1.StreamOrBuilder getStreamOrBuilder() { + if (streamBuilder_ != null) { + return streamBuilder_.getMessageOrBuilder(); + } else { + return stream_ == null ? com.google.cloud.visionai.v1.Stream.getDefaultInstance() : stream_; + } + } + /** + * + * + *
+     * Required. The resource being created.
+     * 
+ * + * .google.cloud.visionai.v1.Stream stream = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.Stream, + com.google.cloud.visionai.v1.Stream.Builder, + com.google.cloud.visionai.v1.StreamOrBuilder> + getStreamFieldBuilder() { + if (streamBuilder_ == null) { + streamBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.Stream, + com.google.cloud.visionai.v1.Stream.Builder, + com.google.cloud.visionai.v1.StreamOrBuilder>( + getStream(), getParentForChildren(), isClean()); + stream_ = null; + } + return streamBuilder_; + } + + private java.lang.Object requestId_ = ""; + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request ID,
+     * the server can check if original operation with the same request ID was
+     * received, and if so, will ignore the second request. This prevents clients
+     * from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request ID,
+     * the server can check if original operation with the same request ID was
+     * received, and if so, will ignore the second request. This prevents clients
+     * from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request ID,
+     * the server can check if original operation with the same request ID was
+     * received, and if so, will ignore the second request. This prevents clients
+     * from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + requestId_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request ID,
+     * the server can check if original operation with the same request ID was
+     * received, and if so, will ignore the second request. This prevents clients
+     * from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearRequestId() { + requestId_ = getDefaultInstance().getRequestId(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request ID,
+     * the server can check if original operation with the same request ID was
+     * received, and if so, will ignore the second request. This prevents clients
+     * from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + requestId_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.CreateStreamRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.CreateStreamRequest) + private static final com.google.cloud.visionai.v1.CreateStreamRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.CreateStreamRequest(); + } + + public static com.google.cloud.visionai.v1.CreateStreamRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateStreamRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.CreateStreamRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/CreateStreamRequestOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/CreateStreamRequestOrBuilder.java new file mode 100644 index 000000000000..e5b7f85bb044 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/CreateStreamRequestOrBuilder.java @@ -0,0 +1,167 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/streams_service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface CreateStreamRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.CreateStreamRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Value for parent.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. Value for parent.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Required. Id of the requesting object.
+   * 
+ * + * string stream_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The streamId. + */ + java.lang.String getStreamId(); + /** + * + * + *
+   * Required. Id of the requesting object.
+   * 
+ * + * string stream_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for streamId. + */ + com.google.protobuf.ByteString getStreamIdBytes(); + + /** + * + * + *
+   * Required. The resource being created.
+   * 
+ * + * .google.cloud.visionai.v1.Stream stream = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the stream field is set. + */ + boolean hasStream(); + /** + * + * + *
+   * Required. The resource being created.
+   * 
+ * + * .google.cloud.visionai.v1.Stream stream = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The stream. + */ + com.google.cloud.visionai.v1.Stream getStream(); + /** + * + * + *
+   * Required. The resource being created.
+   * 
+ * + * .google.cloud.visionai.v1.Stream stream = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.visionai.v1.StreamOrBuilder getStreamOrBuilder(); + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request ID,
+   * the server can check if original operation with the same request ID was
+   * received, and if so, will ignore the second request. This prevents clients
+   * from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + java.lang.String getRequestId(); + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request ID,
+   * the server can check if original operation with the same request ID was
+   * received, and if so, will ignore the second request. This prevents clients
+   * from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + com.google.protobuf.ByteString getRequestIdBytes(); +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/Criteria.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/Criteria.java new file mode 100644 index 000000000000..2b7f079e72c3 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/Criteria.java @@ -0,0 +1,2592 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/warehouse.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * Filter criteria applied to current search results.
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.Criteria} + */ +public final class Criteria extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.Criteria) + CriteriaOrBuilder { + private static final long serialVersionUID = 0L; + // Use Criteria.newBuilder() to construct. + private Criteria(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Criteria() { + field_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Criteria(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_Criteria_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_Criteria_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.Criteria.class, + com.google.cloud.visionai.v1.Criteria.Builder.class); + } + + private int valueCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object value_; + + public enum ValueCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + TEXT_ARRAY(2), + INT_RANGE_ARRAY(3), + FLOAT_RANGE_ARRAY(4), + DATE_TIME_RANGE_ARRAY(5), + GEO_LOCATION_ARRAY(6), + BOOL_VALUE(7), + VALUE_NOT_SET(0); + private final int value; + + private ValueCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static ValueCase valueOf(int value) { + return forNumber(value); + } + + public static ValueCase forNumber(int value) { + switch (value) { + case 2: + return TEXT_ARRAY; + case 3: + return INT_RANGE_ARRAY; + case 4: + return FLOAT_RANGE_ARRAY; + case 5: + return DATE_TIME_RANGE_ARRAY; + case 6: + return GEO_LOCATION_ARRAY; + case 7: + return BOOL_VALUE; + case 0: + return VALUE_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public ValueCase getValueCase() { + return ValueCase.forNumber(valueCase_); + } + + public static final int TEXT_ARRAY_FIELD_NUMBER = 2; + /** + * + * + *
+   * The text values associated with the field.
+   * 
+ * + * .google.cloud.visionai.v1.StringArray text_array = 2; + * + * @return Whether the textArray field is set. + */ + @java.lang.Override + public boolean hasTextArray() { + return valueCase_ == 2; + } + /** + * + * + *
+   * The text values associated with the field.
+   * 
+ * + * .google.cloud.visionai.v1.StringArray text_array = 2; + * + * @return The textArray. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.StringArray getTextArray() { + if (valueCase_ == 2) { + return (com.google.cloud.visionai.v1.StringArray) value_; + } + return com.google.cloud.visionai.v1.StringArray.getDefaultInstance(); + } + /** + * + * + *
+   * The text values associated with the field.
+   * 
+ * + * .google.cloud.visionai.v1.StringArray text_array = 2; + */ + @java.lang.Override + public com.google.cloud.visionai.v1.StringArrayOrBuilder getTextArrayOrBuilder() { + if (valueCase_ == 2) { + return (com.google.cloud.visionai.v1.StringArray) value_; + } + return com.google.cloud.visionai.v1.StringArray.getDefaultInstance(); + } + + public static final int INT_RANGE_ARRAY_FIELD_NUMBER = 3; + /** + * + * + *
+   * The integer ranges associated with the field.
+   * 
+ * + * .google.cloud.visionai.v1.IntRangeArray int_range_array = 3; + * + * @return Whether the intRangeArray field is set. + */ + @java.lang.Override + public boolean hasIntRangeArray() { + return valueCase_ == 3; + } + /** + * + * + *
+   * The integer ranges associated with the field.
+   * 
+ * + * .google.cloud.visionai.v1.IntRangeArray int_range_array = 3; + * + * @return The intRangeArray. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.IntRangeArray getIntRangeArray() { + if (valueCase_ == 3) { + return (com.google.cloud.visionai.v1.IntRangeArray) value_; + } + return com.google.cloud.visionai.v1.IntRangeArray.getDefaultInstance(); + } + /** + * + * + *
+   * The integer ranges associated with the field.
+   * 
+ * + * .google.cloud.visionai.v1.IntRangeArray int_range_array = 3; + */ + @java.lang.Override + public com.google.cloud.visionai.v1.IntRangeArrayOrBuilder getIntRangeArrayOrBuilder() { + if (valueCase_ == 3) { + return (com.google.cloud.visionai.v1.IntRangeArray) value_; + } + return com.google.cloud.visionai.v1.IntRangeArray.getDefaultInstance(); + } + + public static final int FLOAT_RANGE_ARRAY_FIELD_NUMBER = 4; + /** + * + * + *
+   * The float ranges associated with the field.
+   * 
+ * + * .google.cloud.visionai.v1.FloatRangeArray float_range_array = 4; + * + * @return Whether the floatRangeArray field is set. + */ + @java.lang.Override + public boolean hasFloatRangeArray() { + return valueCase_ == 4; + } + /** + * + * + *
+   * The float ranges associated with the field.
+   * 
+ * + * .google.cloud.visionai.v1.FloatRangeArray float_range_array = 4; + * + * @return The floatRangeArray. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.FloatRangeArray getFloatRangeArray() { + if (valueCase_ == 4) { + return (com.google.cloud.visionai.v1.FloatRangeArray) value_; + } + return com.google.cloud.visionai.v1.FloatRangeArray.getDefaultInstance(); + } + /** + * + * + *
+   * The float ranges associated with the field.
+   * 
+ * + * .google.cloud.visionai.v1.FloatRangeArray float_range_array = 4; + */ + @java.lang.Override + public com.google.cloud.visionai.v1.FloatRangeArrayOrBuilder getFloatRangeArrayOrBuilder() { + if (valueCase_ == 4) { + return (com.google.cloud.visionai.v1.FloatRangeArray) value_; + } + return com.google.cloud.visionai.v1.FloatRangeArray.getDefaultInstance(); + } + + public static final int DATE_TIME_RANGE_ARRAY_FIELD_NUMBER = 5; + /** + * + * + *
+   * The datetime ranges associated with the field.
+   * 
+ * + * .google.cloud.visionai.v1.DateTimeRangeArray date_time_range_array = 5; + * + * @return Whether the dateTimeRangeArray field is set. + */ + @java.lang.Override + public boolean hasDateTimeRangeArray() { + return valueCase_ == 5; + } + /** + * + * + *
+   * The datetime ranges associated with the field.
+   * 
+ * + * .google.cloud.visionai.v1.DateTimeRangeArray date_time_range_array = 5; + * + * @return The dateTimeRangeArray. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.DateTimeRangeArray getDateTimeRangeArray() { + if (valueCase_ == 5) { + return (com.google.cloud.visionai.v1.DateTimeRangeArray) value_; + } + return com.google.cloud.visionai.v1.DateTimeRangeArray.getDefaultInstance(); + } + /** + * + * + *
+   * The datetime ranges associated with the field.
+   * 
+ * + * .google.cloud.visionai.v1.DateTimeRangeArray date_time_range_array = 5; + */ + @java.lang.Override + public com.google.cloud.visionai.v1.DateTimeRangeArrayOrBuilder getDateTimeRangeArrayOrBuilder() { + if (valueCase_ == 5) { + return (com.google.cloud.visionai.v1.DateTimeRangeArray) value_; + } + return com.google.cloud.visionai.v1.DateTimeRangeArray.getDefaultInstance(); + } + + public static final int GEO_LOCATION_ARRAY_FIELD_NUMBER = 6; + /** + * + * + *
+   * Geo Location array.
+   * 
+ * + * .google.cloud.visionai.v1.GeoLocationArray geo_location_array = 6; + * + * @return Whether the geoLocationArray field is set. + */ + @java.lang.Override + public boolean hasGeoLocationArray() { + return valueCase_ == 6; + } + /** + * + * + *
+   * Geo Location array.
+   * 
+ * + * .google.cloud.visionai.v1.GeoLocationArray geo_location_array = 6; + * + * @return The geoLocationArray. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.GeoLocationArray getGeoLocationArray() { + if (valueCase_ == 6) { + return (com.google.cloud.visionai.v1.GeoLocationArray) value_; + } + return com.google.cloud.visionai.v1.GeoLocationArray.getDefaultInstance(); + } + /** + * + * + *
+   * Geo Location array.
+   * 
+ * + * .google.cloud.visionai.v1.GeoLocationArray geo_location_array = 6; + */ + @java.lang.Override + public com.google.cloud.visionai.v1.GeoLocationArrayOrBuilder getGeoLocationArrayOrBuilder() { + if (valueCase_ == 6) { + return (com.google.cloud.visionai.v1.GeoLocationArray) value_; + } + return com.google.cloud.visionai.v1.GeoLocationArray.getDefaultInstance(); + } + + public static final int BOOL_VALUE_FIELD_NUMBER = 7; + /** + * + * + *
+   * A Boolean value.
+   * 
+ * + * .google.cloud.visionai.v1.BoolValue bool_value = 7; + * + * @return Whether the boolValue field is set. + */ + @java.lang.Override + public boolean hasBoolValue() { + return valueCase_ == 7; + } + /** + * + * + *
+   * A Boolean value.
+   * 
+ * + * .google.cloud.visionai.v1.BoolValue bool_value = 7; + * + * @return The boolValue. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.BoolValue getBoolValue() { + if (valueCase_ == 7) { + return (com.google.cloud.visionai.v1.BoolValue) value_; + } + return com.google.cloud.visionai.v1.BoolValue.getDefaultInstance(); + } + /** + * + * + *
+   * A Boolean value.
+   * 
+ * + * .google.cloud.visionai.v1.BoolValue bool_value = 7; + */ + @java.lang.Override + public com.google.cloud.visionai.v1.BoolValueOrBuilder getBoolValueOrBuilder() { + if (valueCase_ == 7) { + return (com.google.cloud.visionai.v1.BoolValue) value_; + } + return com.google.cloud.visionai.v1.BoolValue.getDefaultInstance(); + } + + public static final int FIELD_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object field_ = ""; + /** + * + * + *
+   * The UGA field or ML field to apply filtering criteria.
+   * 
+ * + * string field = 1; + * + * @return The field. + */ + @java.lang.Override + public java.lang.String getField() { + java.lang.Object ref = field_; + 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(); + field_ = s; + return s; + } + } + /** + * + * + *
+   * The UGA field or ML field to apply filtering criteria.
+   * 
+ * + * string field = 1; + * + * @return The bytes for field. + */ + @java.lang.Override + public com.google.protobuf.ByteString getFieldBytes() { + java.lang.Object ref = field_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + field_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FETCH_MATCHED_ANNOTATIONS_FIELD_NUMBER = 8; + private boolean fetchMatchedAnnotations_ = false; + /** + * + * + *
+   * If true, return query matched annotations for this criteria.
+   * This option is only applicable for inclusion criteria, i.e., not exclusion
+   * criteria, with partition level annotations.  It supports the following data
+   * types:
+   *  - INTEGER
+   *  - FLOAT
+   *  - STRING (DataSchema.SearchStrategy.EXACT_SEARCH only)
+   *  - BOOLEAN
+   * 
+ * + * bool fetch_matched_annotations = 8; + * + * @return The fetchMatchedAnnotations. + */ + @java.lang.Override + public boolean getFetchMatchedAnnotations() { + return fetchMatchedAnnotations_; + } + + 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(field_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, field_); + } + if (valueCase_ == 2) { + output.writeMessage(2, (com.google.cloud.visionai.v1.StringArray) value_); + } + if (valueCase_ == 3) { + output.writeMessage(3, (com.google.cloud.visionai.v1.IntRangeArray) value_); + } + if (valueCase_ == 4) { + output.writeMessage(4, (com.google.cloud.visionai.v1.FloatRangeArray) value_); + } + if (valueCase_ == 5) { + output.writeMessage(5, (com.google.cloud.visionai.v1.DateTimeRangeArray) value_); + } + if (valueCase_ == 6) { + output.writeMessage(6, (com.google.cloud.visionai.v1.GeoLocationArray) value_); + } + if (valueCase_ == 7) { + output.writeMessage(7, (com.google.cloud.visionai.v1.BoolValue) value_); + } + if (fetchMatchedAnnotations_ != false) { + output.writeBool(8, fetchMatchedAnnotations_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(field_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, field_); + } + if (valueCase_ == 2) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 2, (com.google.cloud.visionai.v1.StringArray) value_); + } + if (valueCase_ == 3) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 3, (com.google.cloud.visionai.v1.IntRangeArray) value_); + } + if (valueCase_ == 4) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 4, (com.google.cloud.visionai.v1.FloatRangeArray) value_); + } + if (valueCase_ == 5) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 5, (com.google.cloud.visionai.v1.DateTimeRangeArray) value_); + } + if (valueCase_ == 6) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 6, (com.google.cloud.visionai.v1.GeoLocationArray) value_); + } + if (valueCase_ == 7) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 7, (com.google.cloud.visionai.v1.BoolValue) value_); + } + if (fetchMatchedAnnotations_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(8, fetchMatchedAnnotations_); + } + size += getUnknownFields().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.visionai.v1.Criteria)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.Criteria other = (com.google.cloud.visionai.v1.Criteria) obj; + + if (!getField().equals(other.getField())) return false; + if (getFetchMatchedAnnotations() != other.getFetchMatchedAnnotations()) return false; + if (!getValueCase().equals(other.getValueCase())) return false; + switch (valueCase_) { + case 2: + if (!getTextArray().equals(other.getTextArray())) return false; + break; + case 3: + if (!getIntRangeArray().equals(other.getIntRangeArray())) return false; + break; + case 4: + if (!getFloatRangeArray().equals(other.getFloatRangeArray())) return false; + break; + case 5: + if (!getDateTimeRangeArray().equals(other.getDateTimeRangeArray())) return false; + break; + case 6: + if (!getGeoLocationArray().equals(other.getGeoLocationArray())) return false; + break; + case 7: + if (!getBoolValue().equals(other.getBoolValue())) return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + FIELD_FIELD_NUMBER; + hash = (53 * hash) + getField().hashCode(); + hash = (37 * hash) + FETCH_MATCHED_ANNOTATIONS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getFetchMatchedAnnotations()); + switch (valueCase_) { + case 2: + hash = (37 * hash) + TEXT_ARRAY_FIELD_NUMBER; + hash = (53 * hash) + getTextArray().hashCode(); + break; + case 3: + hash = (37 * hash) + INT_RANGE_ARRAY_FIELD_NUMBER; + hash = (53 * hash) + getIntRangeArray().hashCode(); + break; + case 4: + hash = (37 * hash) + FLOAT_RANGE_ARRAY_FIELD_NUMBER; + hash = (53 * hash) + getFloatRangeArray().hashCode(); + break; + case 5: + hash = (37 * hash) + DATE_TIME_RANGE_ARRAY_FIELD_NUMBER; + hash = (53 * hash) + getDateTimeRangeArray().hashCode(); + break; + case 6: + hash = (37 * hash) + GEO_LOCATION_ARRAY_FIELD_NUMBER; + hash = (53 * hash) + getGeoLocationArray().hashCode(); + break; + case 7: + hash = (37 * hash) + BOOL_VALUE_FIELD_NUMBER; + hash = (53 * hash) + getBoolValue().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.Criteria parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.Criteria 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.visionai.v1.Criteria parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.Criteria 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.visionai.v1.Criteria parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.Criteria parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.Criteria parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.Criteria 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.visionai.v1.Criteria parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.Criteria 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.visionai.v1.Criteria parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.Criteria 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.visionai.v1.Criteria 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; + } + /** + * + * + *
+   * Filter criteria applied to current search results.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.Criteria} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.Criteria) + com.google.cloud.visionai.v1.CriteriaOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_Criteria_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_Criteria_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.Criteria.class, + com.google.cloud.visionai.v1.Criteria.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.Criteria.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (textArrayBuilder_ != null) { + textArrayBuilder_.clear(); + } + if (intRangeArrayBuilder_ != null) { + intRangeArrayBuilder_.clear(); + } + if (floatRangeArrayBuilder_ != null) { + floatRangeArrayBuilder_.clear(); + } + if (dateTimeRangeArrayBuilder_ != null) { + dateTimeRangeArrayBuilder_.clear(); + } + if (geoLocationArrayBuilder_ != null) { + geoLocationArrayBuilder_.clear(); + } + if (boolValueBuilder_ != null) { + boolValueBuilder_.clear(); + } + field_ = ""; + fetchMatchedAnnotations_ = false; + valueCase_ = 0; + value_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_Criteria_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.Criteria getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.Criteria.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.Criteria build() { + com.google.cloud.visionai.v1.Criteria result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.Criteria buildPartial() { + com.google.cloud.visionai.v1.Criteria result = + new com.google.cloud.visionai.v1.Criteria(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.visionai.v1.Criteria result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000040) != 0)) { + result.field_ = field_; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.fetchMatchedAnnotations_ = fetchMatchedAnnotations_; + } + } + + private void buildPartialOneofs(com.google.cloud.visionai.v1.Criteria result) { + result.valueCase_ = valueCase_; + result.value_ = this.value_; + if (valueCase_ == 2 && textArrayBuilder_ != null) { + result.value_ = textArrayBuilder_.build(); + } + if (valueCase_ == 3 && intRangeArrayBuilder_ != null) { + result.value_ = intRangeArrayBuilder_.build(); + } + if (valueCase_ == 4 && floatRangeArrayBuilder_ != null) { + result.value_ = floatRangeArrayBuilder_.build(); + } + if (valueCase_ == 5 && dateTimeRangeArrayBuilder_ != null) { + result.value_ = dateTimeRangeArrayBuilder_.build(); + } + if (valueCase_ == 6 && geoLocationArrayBuilder_ != null) { + result.value_ = geoLocationArrayBuilder_.build(); + } + if (valueCase_ == 7 && boolValueBuilder_ != null) { + result.value_ = boolValueBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.Criteria) { + return mergeFrom((com.google.cloud.visionai.v1.Criteria) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.Criteria other) { + if (other == com.google.cloud.visionai.v1.Criteria.getDefaultInstance()) return this; + if (!other.getField().isEmpty()) { + field_ = other.field_; + bitField0_ |= 0x00000040; + onChanged(); + } + if (other.getFetchMatchedAnnotations() != false) { + setFetchMatchedAnnotations(other.getFetchMatchedAnnotations()); + } + switch (other.getValueCase()) { + case TEXT_ARRAY: + { + mergeTextArray(other.getTextArray()); + break; + } + case INT_RANGE_ARRAY: + { + mergeIntRangeArray(other.getIntRangeArray()); + break; + } + case FLOAT_RANGE_ARRAY: + { + mergeFloatRangeArray(other.getFloatRangeArray()); + break; + } + case DATE_TIME_RANGE_ARRAY: + { + mergeDateTimeRangeArray(other.getDateTimeRangeArray()); + break; + } + case GEO_LOCATION_ARRAY: + { + mergeGeoLocationArray(other.getGeoLocationArray()); + break; + } + case BOOL_VALUE: + { + mergeBoolValue(other.getBoolValue()); + break; + } + case VALUE_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + field_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000040; + break; + } // case 10 + case 18: + { + input.readMessage(getTextArrayFieldBuilder().getBuilder(), extensionRegistry); + valueCase_ = 2; + break; + } // case 18 + case 26: + { + input.readMessage(getIntRangeArrayFieldBuilder().getBuilder(), extensionRegistry); + valueCase_ = 3; + break; + } // case 26 + case 34: + { + input.readMessage(getFloatRangeArrayFieldBuilder().getBuilder(), extensionRegistry); + valueCase_ = 4; + break; + } // case 34 + case 42: + { + input.readMessage( + getDateTimeRangeArrayFieldBuilder().getBuilder(), extensionRegistry); + valueCase_ = 5; + break; + } // case 42 + case 50: + { + input.readMessage( + getGeoLocationArrayFieldBuilder().getBuilder(), extensionRegistry); + valueCase_ = 6; + break; + } // case 50 + case 58: + { + input.readMessage(getBoolValueFieldBuilder().getBuilder(), extensionRegistry); + valueCase_ = 7; + break; + } // case 58 + case 64: + { + fetchMatchedAnnotations_ = input.readBool(); + bitField0_ |= 0x00000080; + break; + } // case 64 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int valueCase_ = 0; + private java.lang.Object value_; + + public ValueCase getValueCase() { + return ValueCase.forNumber(valueCase_); + } + + public Builder clearValue() { + valueCase_ = 0; + value_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.StringArray, + com.google.cloud.visionai.v1.StringArray.Builder, + com.google.cloud.visionai.v1.StringArrayOrBuilder> + textArrayBuilder_; + /** + * + * + *
+     * The text values associated with the field.
+     * 
+ * + * .google.cloud.visionai.v1.StringArray text_array = 2; + * + * @return Whether the textArray field is set. + */ + @java.lang.Override + public boolean hasTextArray() { + return valueCase_ == 2; + } + /** + * + * + *
+     * The text values associated with the field.
+     * 
+ * + * .google.cloud.visionai.v1.StringArray text_array = 2; + * + * @return The textArray. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.StringArray getTextArray() { + if (textArrayBuilder_ == null) { + if (valueCase_ == 2) { + return (com.google.cloud.visionai.v1.StringArray) value_; + } + return com.google.cloud.visionai.v1.StringArray.getDefaultInstance(); + } else { + if (valueCase_ == 2) { + return textArrayBuilder_.getMessage(); + } + return com.google.cloud.visionai.v1.StringArray.getDefaultInstance(); + } + } + /** + * + * + *
+     * The text values associated with the field.
+     * 
+ * + * .google.cloud.visionai.v1.StringArray text_array = 2; + */ + public Builder setTextArray(com.google.cloud.visionai.v1.StringArray value) { + if (textArrayBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + value_ = value; + onChanged(); + } else { + textArrayBuilder_.setMessage(value); + } + valueCase_ = 2; + return this; + } + /** + * + * + *
+     * The text values associated with the field.
+     * 
+ * + * .google.cloud.visionai.v1.StringArray text_array = 2; + */ + public Builder setTextArray(com.google.cloud.visionai.v1.StringArray.Builder builderForValue) { + if (textArrayBuilder_ == null) { + value_ = builderForValue.build(); + onChanged(); + } else { + textArrayBuilder_.setMessage(builderForValue.build()); + } + valueCase_ = 2; + return this; + } + /** + * + * + *
+     * The text values associated with the field.
+     * 
+ * + * .google.cloud.visionai.v1.StringArray text_array = 2; + */ + public Builder mergeTextArray(com.google.cloud.visionai.v1.StringArray value) { + if (textArrayBuilder_ == null) { + if (valueCase_ == 2 + && value_ != com.google.cloud.visionai.v1.StringArray.getDefaultInstance()) { + value_ = + com.google.cloud.visionai.v1.StringArray.newBuilder( + (com.google.cloud.visionai.v1.StringArray) value_) + .mergeFrom(value) + .buildPartial(); + } else { + value_ = value; + } + onChanged(); + } else { + if (valueCase_ == 2) { + textArrayBuilder_.mergeFrom(value); + } else { + textArrayBuilder_.setMessage(value); + } + } + valueCase_ = 2; + return this; + } + /** + * + * + *
+     * The text values associated with the field.
+     * 
+ * + * .google.cloud.visionai.v1.StringArray text_array = 2; + */ + public Builder clearTextArray() { + if (textArrayBuilder_ == null) { + if (valueCase_ == 2) { + valueCase_ = 0; + value_ = null; + onChanged(); + } + } else { + if (valueCase_ == 2) { + valueCase_ = 0; + value_ = null; + } + textArrayBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The text values associated with the field.
+     * 
+ * + * .google.cloud.visionai.v1.StringArray text_array = 2; + */ + public com.google.cloud.visionai.v1.StringArray.Builder getTextArrayBuilder() { + return getTextArrayFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The text values associated with the field.
+     * 
+ * + * .google.cloud.visionai.v1.StringArray text_array = 2; + */ + @java.lang.Override + public com.google.cloud.visionai.v1.StringArrayOrBuilder getTextArrayOrBuilder() { + if ((valueCase_ == 2) && (textArrayBuilder_ != null)) { + return textArrayBuilder_.getMessageOrBuilder(); + } else { + if (valueCase_ == 2) { + return (com.google.cloud.visionai.v1.StringArray) value_; + } + return com.google.cloud.visionai.v1.StringArray.getDefaultInstance(); + } + } + /** + * + * + *
+     * The text values associated with the field.
+     * 
+ * + * .google.cloud.visionai.v1.StringArray text_array = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.StringArray, + com.google.cloud.visionai.v1.StringArray.Builder, + com.google.cloud.visionai.v1.StringArrayOrBuilder> + getTextArrayFieldBuilder() { + if (textArrayBuilder_ == null) { + if (!(valueCase_ == 2)) { + value_ = com.google.cloud.visionai.v1.StringArray.getDefaultInstance(); + } + textArrayBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.StringArray, + com.google.cloud.visionai.v1.StringArray.Builder, + com.google.cloud.visionai.v1.StringArrayOrBuilder>( + (com.google.cloud.visionai.v1.StringArray) value_, + getParentForChildren(), + isClean()); + value_ = null; + } + valueCase_ = 2; + onChanged(); + return textArrayBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.IntRangeArray, + com.google.cloud.visionai.v1.IntRangeArray.Builder, + com.google.cloud.visionai.v1.IntRangeArrayOrBuilder> + intRangeArrayBuilder_; + /** + * + * + *
+     * The integer ranges associated with the field.
+     * 
+ * + * .google.cloud.visionai.v1.IntRangeArray int_range_array = 3; + * + * @return Whether the intRangeArray field is set. + */ + @java.lang.Override + public boolean hasIntRangeArray() { + return valueCase_ == 3; + } + /** + * + * + *
+     * The integer ranges associated with the field.
+     * 
+ * + * .google.cloud.visionai.v1.IntRangeArray int_range_array = 3; + * + * @return The intRangeArray. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.IntRangeArray getIntRangeArray() { + if (intRangeArrayBuilder_ == null) { + if (valueCase_ == 3) { + return (com.google.cloud.visionai.v1.IntRangeArray) value_; + } + return com.google.cloud.visionai.v1.IntRangeArray.getDefaultInstance(); + } else { + if (valueCase_ == 3) { + return intRangeArrayBuilder_.getMessage(); + } + return com.google.cloud.visionai.v1.IntRangeArray.getDefaultInstance(); + } + } + /** + * + * + *
+     * The integer ranges associated with the field.
+     * 
+ * + * .google.cloud.visionai.v1.IntRangeArray int_range_array = 3; + */ + public Builder setIntRangeArray(com.google.cloud.visionai.v1.IntRangeArray value) { + if (intRangeArrayBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + value_ = value; + onChanged(); + } else { + intRangeArrayBuilder_.setMessage(value); + } + valueCase_ = 3; + return this; + } + /** + * + * + *
+     * The integer ranges associated with the field.
+     * 
+ * + * .google.cloud.visionai.v1.IntRangeArray int_range_array = 3; + */ + public Builder setIntRangeArray( + com.google.cloud.visionai.v1.IntRangeArray.Builder builderForValue) { + if (intRangeArrayBuilder_ == null) { + value_ = builderForValue.build(); + onChanged(); + } else { + intRangeArrayBuilder_.setMessage(builderForValue.build()); + } + valueCase_ = 3; + return this; + } + /** + * + * + *
+     * The integer ranges associated with the field.
+     * 
+ * + * .google.cloud.visionai.v1.IntRangeArray int_range_array = 3; + */ + public Builder mergeIntRangeArray(com.google.cloud.visionai.v1.IntRangeArray value) { + if (intRangeArrayBuilder_ == null) { + if (valueCase_ == 3 + && value_ != com.google.cloud.visionai.v1.IntRangeArray.getDefaultInstance()) { + value_ = + com.google.cloud.visionai.v1.IntRangeArray.newBuilder( + (com.google.cloud.visionai.v1.IntRangeArray) value_) + .mergeFrom(value) + .buildPartial(); + } else { + value_ = value; + } + onChanged(); + } else { + if (valueCase_ == 3) { + intRangeArrayBuilder_.mergeFrom(value); + } else { + intRangeArrayBuilder_.setMessage(value); + } + } + valueCase_ = 3; + return this; + } + /** + * + * + *
+     * The integer ranges associated with the field.
+     * 
+ * + * .google.cloud.visionai.v1.IntRangeArray int_range_array = 3; + */ + public Builder clearIntRangeArray() { + if (intRangeArrayBuilder_ == null) { + if (valueCase_ == 3) { + valueCase_ = 0; + value_ = null; + onChanged(); + } + } else { + if (valueCase_ == 3) { + valueCase_ = 0; + value_ = null; + } + intRangeArrayBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The integer ranges associated with the field.
+     * 
+ * + * .google.cloud.visionai.v1.IntRangeArray int_range_array = 3; + */ + public com.google.cloud.visionai.v1.IntRangeArray.Builder getIntRangeArrayBuilder() { + return getIntRangeArrayFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The integer ranges associated with the field.
+     * 
+ * + * .google.cloud.visionai.v1.IntRangeArray int_range_array = 3; + */ + @java.lang.Override + public com.google.cloud.visionai.v1.IntRangeArrayOrBuilder getIntRangeArrayOrBuilder() { + if ((valueCase_ == 3) && (intRangeArrayBuilder_ != null)) { + return intRangeArrayBuilder_.getMessageOrBuilder(); + } else { + if (valueCase_ == 3) { + return (com.google.cloud.visionai.v1.IntRangeArray) value_; + } + return com.google.cloud.visionai.v1.IntRangeArray.getDefaultInstance(); + } + } + /** + * + * + *
+     * The integer ranges associated with the field.
+     * 
+ * + * .google.cloud.visionai.v1.IntRangeArray int_range_array = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.IntRangeArray, + com.google.cloud.visionai.v1.IntRangeArray.Builder, + com.google.cloud.visionai.v1.IntRangeArrayOrBuilder> + getIntRangeArrayFieldBuilder() { + if (intRangeArrayBuilder_ == null) { + if (!(valueCase_ == 3)) { + value_ = com.google.cloud.visionai.v1.IntRangeArray.getDefaultInstance(); + } + intRangeArrayBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.IntRangeArray, + com.google.cloud.visionai.v1.IntRangeArray.Builder, + com.google.cloud.visionai.v1.IntRangeArrayOrBuilder>( + (com.google.cloud.visionai.v1.IntRangeArray) value_, + getParentForChildren(), + isClean()); + value_ = null; + } + valueCase_ = 3; + onChanged(); + return intRangeArrayBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.FloatRangeArray, + com.google.cloud.visionai.v1.FloatRangeArray.Builder, + com.google.cloud.visionai.v1.FloatRangeArrayOrBuilder> + floatRangeArrayBuilder_; + /** + * + * + *
+     * The float ranges associated with the field.
+     * 
+ * + * .google.cloud.visionai.v1.FloatRangeArray float_range_array = 4; + * + * @return Whether the floatRangeArray field is set. + */ + @java.lang.Override + public boolean hasFloatRangeArray() { + return valueCase_ == 4; + } + /** + * + * + *
+     * The float ranges associated with the field.
+     * 
+ * + * .google.cloud.visionai.v1.FloatRangeArray float_range_array = 4; + * + * @return The floatRangeArray. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.FloatRangeArray getFloatRangeArray() { + if (floatRangeArrayBuilder_ == null) { + if (valueCase_ == 4) { + return (com.google.cloud.visionai.v1.FloatRangeArray) value_; + } + return com.google.cloud.visionai.v1.FloatRangeArray.getDefaultInstance(); + } else { + if (valueCase_ == 4) { + return floatRangeArrayBuilder_.getMessage(); + } + return com.google.cloud.visionai.v1.FloatRangeArray.getDefaultInstance(); + } + } + /** + * + * + *
+     * The float ranges associated with the field.
+     * 
+ * + * .google.cloud.visionai.v1.FloatRangeArray float_range_array = 4; + */ + public Builder setFloatRangeArray(com.google.cloud.visionai.v1.FloatRangeArray value) { + if (floatRangeArrayBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + value_ = value; + onChanged(); + } else { + floatRangeArrayBuilder_.setMessage(value); + } + valueCase_ = 4; + return this; + } + /** + * + * + *
+     * The float ranges associated with the field.
+     * 
+ * + * .google.cloud.visionai.v1.FloatRangeArray float_range_array = 4; + */ + public Builder setFloatRangeArray( + com.google.cloud.visionai.v1.FloatRangeArray.Builder builderForValue) { + if (floatRangeArrayBuilder_ == null) { + value_ = builderForValue.build(); + onChanged(); + } else { + floatRangeArrayBuilder_.setMessage(builderForValue.build()); + } + valueCase_ = 4; + return this; + } + /** + * + * + *
+     * The float ranges associated with the field.
+     * 
+ * + * .google.cloud.visionai.v1.FloatRangeArray float_range_array = 4; + */ + public Builder mergeFloatRangeArray(com.google.cloud.visionai.v1.FloatRangeArray value) { + if (floatRangeArrayBuilder_ == null) { + if (valueCase_ == 4 + && value_ != com.google.cloud.visionai.v1.FloatRangeArray.getDefaultInstance()) { + value_ = + com.google.cloud.visionai.v1.FloatRangeArray.newBuilder( + (com.google.cloud.visionai.v1.FloatRangeArray) value_) + .mergeFrom(value) + .buildPartial(); + } else { + value_ = value; + } + onChanged(); + } else { + if (valueCase_ == 4) { + floatRangeArrayBuilder_.mergeFrom(value); + } else { + floatRangeArrayBuilder_.setMessage(value); + } + } + valueCase_ = 4; + return this; + } + /** + * + * + *
+     * The float ranges associated with the field.
+     * 
+ * + * .google.cloud.visionai.v1.FloatRangeArray float_range_array = 4; + */ + public Builder clearFloatRangeArray() { + if (floatRangeArrayBuilder_ == null) { + if (valueCase_ == 4) { + valueCase_ = 0; + value_ = null; + onChanged(); + } + } else { + if (valueCase_ == 4) { + valueCase_ = 0; + value_ = null; + } + floatRangeArrayBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The float ranges associated with the field.
+     * 
+ * + * .google.cloud.visionai.v1.FloatRangeArray float_range_array = 4; + */ + public com.google.cloud.visionai.v1.FloatRangeArray.Builder getFloatRangeArrayBuilder() { + return getFloatRangeArrayFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The float ranges associated with the field.
+     * 
+ * + * .google.cloud.visionai.v1.FloatRangeArray float_range_array = 4; + */ + @java.lang.Override + public com.google.cloud.visionai.v1.FloatRangeArrayOrBuilder getFloatRangeArrayOrBuilder() { + if ((valueCase_ == 4) && (floatRangeArrayBuilder_ != null)) { + return floatRangeArrayBuilder_.getMessageOrBuilder(); + } else { + if (valueCase_ == 4) { + return (com.google.cloud.visionai.v1.FloatRangeArray) value_; + } + return com.google.cloud.visionai.v1.FloatRangeArray.getDefaultInstance(); + } + } + /** + * + * + *
+     * The float ranges associated with the field.
+     * 
+ * + * .google.cloud.visionai.v1.FloatRangeArray float_range_array = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.FloatRangeArray, + com.google.cloud.visionai.v1.FloatRangeArray.Builder, + com.google.cloud.visionai.v1.FloatRangeArrayOrBuilder> + getFloatRangeArrayFieldBuilder() { + if (floatRangeArrayBuilder_ == null) { + if (!(valueCase_ == 4)) { + value_ = com.google.cloud.visionai.v1.FloatRangeArray.getDefaultInstance(); + } + floatRangeArrayBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.FloatRangeArray, + com.google.cloud.visionai.v1.FloatRangeArray.Builder, + com.google.cloud.visionai.v1.FloatRangeArrayOrBuilder>( + (com.google.cloud.visionai.v1.FloatRangeArray) value_, + getParentForChildren(), + isClean()); + value_ = null; + } + valueCase_ = 4; + onChanged(); + return floatRangeArrayBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.DateTimeRangeArray, + com.google.cloud.visionai.v1.DateTimeRangeArray.Builder, + com.google.cloud.visionai.v1.DateTimeRangeArrayOrBuilder> + dateTimeRangeArrayBuilder_; + /** + * + * + *
+     * The datetime ranges associated with the field.
+     * 
+ * + * .google.cloud.visionai.v1.DateTimeRangeArray date_time_range_array = 5; + * + * @return Whether the dateTimeRangeArray field is set. + */ + @java.lang.Override + public boolean hasDateTimeRangeArray() { + return valueCase_ == 5; + } + /** + * + * + *
+     * The datetime ranges associated with the field.
+     * 
+ * + * .google.cloud.visionai.v1.DateTimeRangeArray date_time_range_array = 5; + * + * @return The dateTimeRangeArray. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.DateTimeRangeArray getDateTimeRangeArray() { + if (dateTimeRangeArrayBuilder_ == null) { + if (valueCase_ == 5) { + return (com.google.cloud.visionai.v1.DateTimeRangeArray) value_; + } + return com.google.cloud.visionai.v1.DateTimeRangeArray.getDefaultInstance(); + } else { + if (valueCase_ == 5) { + return dateTimeRangeArrayBuilder_.getMessage(); + } + return com.google.cloud.visionai.v1.DateTimeRangeArray.getDefaultInstance(); + } + } + /** + * + * + *
+     * The datetime ranges associated with the field.
+     * 
+ * + * .google.cloud.visionai.v1.DateTimeRangeArray date_time_range_array = 5; + */ + public Builder setDateTimeRangeArray(com.google.cloud.visionai.v1.DateTimeRangeArray value) { + if (dateTimeRangeArrayBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + value_ = value; + onChanged(); + } else { + dateTimeRangeArrayBuilder_.setMessage(value); + } + valueCase_ = 5; + return this; + } + /** + * + * + *
+     * The datetime ranges associated with the field.
+     * 
+ * + * .google.cloud.visionai.v1.DateTimeRangeArray date_time_range_array = 5; + */ + public Builder setDateTimeRangeArray( + com.google.cloud.visionai.v1.DateTimeRangeArray.Builder builderForValue) { + if (dateTimeRangeArrayBuilder_ == null) { + value_ = builderForValue.build(); + onChanged(); + } else { + dateTimeRangeArrayBuilder_.setMessage(builderForValue.build()); + } + valueCase_ = 5; + return this; + } + /** + * + * + *
+     * The datetime ranges associated with the field.
+     * 
+ * + * .google.cloud.visionai.v1.DateTimeRangeArray date_time_range_array = 5; + */ + public Builder mergeDateTimeRangeArray(com.google.cloud.visionai.v1.DateTimeRangeArray value) { + if (dateTimeRangeArrayBuilder_ == null) { + if (valueCase_ == 5 + && value_ != com.google.cloud.visionai.v1.DateTimeRangeArray.getDefaultInstance()) { + value_ = + com.google.cloud.visionai.v1.DateTimeRangeArray.newBuilder( + (com.google.cloud.visionai.v1.DateTimeRangeArray) value_) + .mergeFrom(value) + .buildPartial(); + } else { + value_ = value; + } + onChanged(); + } else { + if (valueCase_ == 5) { + dateTimeRangeArrayBuilder_.mergeFrom(value); + } else { + dateTimeRangeArrayBuilder_.setMessage(value); + } + } + valueCase_ = 5; + return this; + } + /** + * + * + *
+     * The datetime ranges associated with the field.
+     * 
+ * + * .google.cloud.visionai.v1.DateTimeRangeArray date_time_range_array = 5; + */ + public Builder clearDateTimeRangeArray() { + if (dateTimeRangeArrayBuilder_ == null) { + if (valueCase_ == 5) { + valueCase_ = 0; + value_ = null; + onChanged(); + } + } else { + if (valueCase_ == 5) { + valueCase_ = 0; + value_ = null; + } + dateTimeRangeArrayBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The datetime ranges associated with the field.
+     * 
+ * + * .google.cloud.visionai.v1.DateTimeRangeArray date_time_range_array = 5; + */ + public com.google.cloud.visionai.v1.DateTimeRangeArray.Builder getDateTimeRangeArrayBuilder() { + return getDateTimeRangeArrayFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The datetime ranges associated with the field.
+     * 
+ * + * .google.cloud.visionai.v1.DateTimeRangeArray date_time_range_array = 5; + */ + @java.lang.Override + public com.google.cloud.visionai.v1.DateTimeRangeArrayOrBuilder + getDateTimeRangeArrayOrBuilder() { + if ((valueCase_ == 5) && (dateTimeRangeArrayBuilder_ != null)) { + return dateTimeRangeArrayBuilder_.getMessageOrBuilder(); + } else { + if (valueCase_ == 5) { + return (com.google.cloud.visionai.v1.DateTimeRangeArray) value_; + } + return com.google.cloud.visionai.v1.DateTimeRangeArray.getDefaultInstance(); + } + } + /** + * + * + *
+     * The datetime ranges associated with the field.
+     * 
+ * + * .google.cloud.visionai.v1.DateTimeRangeArray date_time_range_array = 5; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.DateTimeRangeArray, + com.google.cloud.visionai.v1.DateTimeRangeArray.Builder, + com.google.cloud.visionai.v1.DateTimeRangeArrayOrBuilder> + getDateTimeRangeArrayFieldBuilder() { + if (dateTimeRangeArrayBuilder_ == null) { + if (!(valueCase_ == 5)) { + value_ = com.google.cloud.visionai.v1.DateTimeRangeArray.getDefaultInstance(); + } + dateTimeRangeArrayBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.DateTimeRangeArray, + com.google.cloud.visionai.v1.DateTimeRangeArray.Builder, + com.google.cloud.visionai.v1.DateTimeRangeArrayOrBuilder>( + (com.google.cloud.visionai.v1.DateTimeRangeArray) value_, + getParentForChildren(), + isClean()); + value_ = null; + } + valueCase_ = 5; + onChanged(); + return dateTimeRangeArrayBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.GeoLocationArray, + com.google.cloud.visionai.v1.GeoLocationArray.Builder, + com.google.cloud.visionai.v1.GeoLocationArrayOrBuilder> + geoLocationArrayBuilder_; + /** + * + * + *
+     * Geo Location array.
+     * 
+ * + * .google.cloud.visionai.v1.GeoLocationArray geo_location_array = 6; + * + * @return Whether the geoLocationArray field is set. + */ + @java.lang.Override + public boolean hasGeoLocationArray() { + return valueCase_ == 6; + } + /** + * + * + *
+     * Geo Location array.
+     * 
+ * + * .google.cloud.visionai.v1.GeoLocationArray geo_location_array = 6; + * + * @return The geoLocationArray. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.GeoLocationArray getGeoLocationArray() { + if (geoLocationArrayBuilder_ == null) { + if (valueCase_ == 6) { + return (com.google.cloud.visionai.v1.GeoLocationArray) value_; + } + return com.google.cloud.visionai.v1.GeoLocationArray.getDefaultInstance(); + } else { + if (valueCase_ == 6) { + return geoLocationArrayBuilder_.getMessage(); + } + return com.google.cloud.visionai.v1.GeoLocationArray.getDefaultInstance(); + } + } + /** + * + * + *
+     * Geo Location array.
+     * 
+ * + * .google.cloud.visionai.v1.GeoLocationArray geo_location_array = 6; + */ + public Builder setGeoLocationArray(com.google.cloud.visionai.v1.GeoLocationArray value) { + if (geoLocationArrayBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + value_ = value; + onChanged(); + } else { + geoLocationArrayBuilder_.setMessage(value); + } + valueCase_ = 6; + return this; + } + /** + * + * + *
+     * Geo Location array.
+     * 
+ * + * .google.cloud.visionai.v1.GeoLocationArray geo_location_array = 6; + */ + public Builder setGeoLocationArray( + com.google.cloud.visionai.v1.GeoLocationArray.Builder builderForValue) { + if (geoLocationArrayBuilder_ == null) { + value_ = builderForValue.build(); + onChanged(); + } else { + geoLocationArrayBuilder_.setMessage(builderForValue.build()); + } + valueCase_ = 6; + return this; + } + /** + * + * + *
+     * Geo Location array.
+     * 
+ * + * .google.cloud.visionai.v1.GeoLocationArray geo_location_array = 6; + */ + public Builder mergeGeoLocationArray(com.google.cloud.visionai.v1.GeoLocationArray value) { + if (geoLocationArrayBuilder_ == null) { + if (valueCase_ == 6 + && value_ != com.google.cloud.visionai.v1.GeoLocationArray.getDefaultInstance()) { + value_ = + com.google.cloud.visionai.v1.GeoLocationArray.newBuilder( + (com.google.cloud.visionai.v1.GeoLocationArray) value_) + .mergeFrom(value) + .buildPartial(); + } else { + value_ = value; + } + onChanged(); + } else { + if (valueCase_ == 6) { + geoLocationArrayBuilder_.mergeFrom(value); + } else { + geoLocationArrayBuilder_.setMessage(value); + } + } + valueCase_ = 6; + return this; + } + /** + * + * + *
+     * Geo Location array.
+     * 
+ * + * .google.cloud.visionai.v1.GeoLocationArray geo_location_array = 6; + */ + public Builder clearGeoLocationArray() { + if (geoLocationArrayBuilder_ == null) { + if (valueCase_ == 6) { + valueCase_ = 0; + value_ = null; + onChanged(); + } + } else { + if (valueCase_ == 6) { + valueCase_ = 0; + value_ = null; + } + geoLocationArrayBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Geo Location array.
+     * 
+ * + * .google.cloud.visionai.v1.GeoLocationArray geo_location_array = 6; + */ + public com.google.cloud.visionai.v1.GeoLocationArray.Builder getGeoLocationArrayBuilder() { + return getGeoLocationArrayFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Geo Location array.
+     * 
+ * + * .google.cloud.visionai.v1.GeoLocationArray geo_location_array = 6; + */ + @java.lang.Override + public com.google.cloud.visionai.v1.GeoLocationArrayOrBuilder getGeoLocationArrayOrBuilder() { + if ((valueCase_ == 6) && (geoLocationArrayBuilder_ != null)) { + return geoLocationArrayBuilder_.getMessageOrBuilder(); + } else { + if (valueCase_ == 6) { + return (com.google.cloud.visionai.v1.GeoLocationArray) value_; + } + return com.google.cloud.visionai.v1.GeoLocationArray.getDefaultInstance(); + } + } + /** + * + * + *
+     * Geo Location array.
+     * 
+ * + * .google.cloud.visionai.v1.GeoLocationArray geo_location_array = 6; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.GeoLocationArray, + com.google.cloud.visionai.v1.GeoLocationArray.Builder, + com.google.cloud.visionai.v1.GeoLocationArrayOrBuilder> + getGeoLocationArrayFieldBuilder() { + if (geoLocationArrayBuilder_ == null) { + if (!(valueCase_ == 6)) { + value_ = com.google.cloud.visionai.v1.GeoLocationArray.getDefaultInstance(); + } + geoLocationArrayBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.GeoLocationArray, + com.google.cloud.visionai.v1.GeoLocationArray.Builder, + com.google.cloud.visionai.v1.GeoLocationArrayOrBuilder>( + (com.google.cloud.visionai.v1.GeoLocationArray) value_, + getParentForChildren(), + isClean()); + value_ = null; + } + valueCase_ = 6; + onChanged(); + return geoLocationArrayBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.BoolValue, + com.google.cloud.visionai.v1.BoolValue.Builder, + com.google.cloud.visionai.v1.BoolValueOrBuilder> + boolValueBuilder_; + /** + * + * + *
+     * A Boolean value.
+     * 
+ * + * .google.cloud.visionai.v1.BoolValue bool_value = 7; + * + * @return Whether the boolValue field is set. + */ + @java.lang.Override + public boolean hasBoolValue() { + return valueCase_ == 7; + } + /** + * + * + *
+     * A Boolean value.
+     * 
+ * + * .google.cloud.visionai.v1.BoolValue bool_value = 7; + * + * @return The boolValue. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.BoolValue getBoolValue() { + if (boolValueBuilder_ == null) { + if (valueCase_ == 7) { + return (com.google.cloud.visionai.v1.BoolValue) value_; + } + return com.google.cloud.visionai.v1.BoolValue.getDefaultInstance(); + } else { + if (valueCase_ == 7) { + return boolValueBuilder_.getMessage(); + } + return com.google.cloud.visionai.v1.BoolValue.getDefaultInstance(); + } + } + /** + * + * + *
+     * A Boolean value.
+     * 
+ * + * .google.cloud.visionai.v1.BoolValue bool_value = 7; + */ + public Builder setBoolValue(com.google.cloud.visionai.v1.BoolValue value) { + if (boolValueBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + value_ = value; + onChanged(); + } else { + boolValueBuilder_.setMessage(value); + } + valueCase_ = 7; + return this; + } + /** + * + * + *
+     * A Boolean value.
+     * 
+ * + * .google.cloud.visionai.v1.BoolValue bool_value = 7; + */ + public Builder setBoolValue(com.google.cloud.visionai.v1.BoolValue.Builder builderForValue) { + if (boolValueBuilder_ == null) { + value_ = builderForValue.build(); + onChanged(); + } else { + boolValueBuilder_.setMessage(builderForValue.build()); + } + valueCase_ = 7; + return this; + } + /** + * + * + *
+     * A Boolean value.
+     * 
+ * + * .google.cloud.visionai.v1.BoolValue bool_value = 7; + */ + public Builder mergeBoolValue(com.google.cloud.visionai.v1.BoolValue value) { + if (boolValueBuilder_ == null) { + if (valueCase_ == 7 + && value_ != com.google.cloud.visionai.v1.BoolValue.getDefaultInstance()) { + value_ = + com.google.cloud.visionai.v1.BoolValue.newBuilder( + (com.google.cloud.visionai.v1.BoolValue) value_) + .mergeFrom(value) + .buildPartial(); + } else { + value_ = value; + } + onChanged(); + } else { + if (valueCase_ == 7) { + boolValueBuilder_.mergeFrom(value); + } else { + boolValueBuilder_.setMessage(value); + } + } + valueCase_ = 7; + return this; + } + /** + * + * + *
+     * A Boolean value.
+     * 
+ * + * .google.cloud.visionai.v1.BoolValue bool_value = 7; + */ + public Builder clearBoolValue() { + if (boolValueBuilder_ == null) { + if (valueCase_ == 7) { + valueCase_ = 0; + value_ = null; + onChanged(); + } + } else { + if (valueCase_ == 7) { + valueCase_ = 0; + value_ = null; + } + boolValueBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * A Boolean value.
+     * 
+ * + * .google.cloud.visionai.v1.BoolValue bool_value = 7; + */ + public com.google.cloud.visionai.v1.BoolValue.Builder getBoolValueBuilder() { + return getBoolValueFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * A Boolean value.
+     * 
+ * + * .google.cloud.visionai.v1.BoolValue bool_value = 7; + */ + @java.lang.Override + public com.google.cloud.visionai.v1.BoolValueOrBuilder getBoolValueOrBuilder() { + if ((valueCase_ == 7) && (boolValueBuilder_ != null)) { + return boolValueBuilder_.getMessageOrBuilder(); + } else { + if (valueCase_ == 7) { + return (com.google.cloud.visionai.v1.BoolValue) value_; + } + return com.google.cloud.visionai.v1.BoolValue.getDefaultInstance(); + } + } + /** + * + * + *
+     * A Boolean value.
+     * 
+ * + * .google.cloud.visionai.v1.BoolValue bool_value = 7; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.BoolValue, + com.google.cloud.visionai.v1.BoolValue.Builder, + com.google.cloud.visionai.v1.BoolValueOrBuilder> + getBoolValueFieldBuilder() { + if (boolValueBuilder_ == null) { + if (!(valueCase_ == 7)) { + value_ = com.google.cloud.visionai.v1.BoolValue.getDefaultInstance(); + } + boolValueBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.BoolValue, + com.google.cloud.visionai.v1.BoolValue.Builder, + com.google.cloud.visionai.v1.BoolValueOrBuilder>( + (com.google.cloud.visionai.v1.BoolValue) value_, getParentForChildren(), isClean()); + value_ = null; + } + valueCase_ = 7; + onChanged(); + return boolValueBuilder_; + } + + private java.lang.Object field_ = ""; + /** + * + * + *
+     * The UGA field or ML field to apply filtering criteria.
+     * 
+ * + * string field = 1; + * + * @return The field. + */ + public java.lang.String getField() { + java.lang.Object ref = field_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + field_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The UGA field or ML field to apply filtering criteria.
+     * 
+ * + * string field = 1; + * + * @return The bytes for field. + */ + public com.google.protobuf.ByteString getFieldBytes() { + java.lang.Object ref = field_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + field_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The UGA field or ML field to apply filtering criteria.
+     * 
+ * + * string field = 1; + * + * @param value The field to set. + * @return This builder for chaining. + */ + public Builder setField(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + field_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * + * + *
+     * The UGA field or ML field to apply filtering criteria.
+     * 
+ * + * string field = 1; + * + * @return This builder for chaining. + */ + public Builder clearField() { + field_ = getDefaultInstance().getField(); + bitField0_ = (bitField0_ & ~0x00000040); + onChanged(); + return this; + } + /** + * + * + *
+     * The UGA field or ML field to apply filtering criteria.
+     * 
+ * + * string field = 1; + * + * @param value The bytes for field to set. + * @return This builder for chaining. + */ + public Builder setFieldBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + field_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + private boolean fetchMatchedAnnotations_; + /** + * + * + *
+     * If true, return query matched annotations for this criteria.
+     * This option is only applicable for inclusion criteria, i.e., not exclusion
+     * criteria, with partition level annotations.  It supports the following data
+     * types:
+     *  - INTEGER
+     *  - FLOAT
+     *  - STRING (DataSchema.SearchStrategy.EXACT_SEARCH only)
+     *  - BOOLEAN
+     * 
+ * + * bool fetch_matched_annotations = 8; + * + * @return The fetchMatchedAnnotations. + */ + @java.lang.Override + public boolean getFetchMatchedAnnotations() { + return fetchMatchedAnnotations_; + } + /** + * + * + *
+     * If true, return query matched annotations for this criteria.
+     * This option is only applicable for inclusion criteria, i.e., not exclusion
+     * criteria, with partition level annotations.  It supports the following data
+     * types:
+     *  - INTEGER
+     *  - FLOAT
+     *  - STRING (DataSchema.SearchStrategy.EXACT_SEARCH only)
+     *  - BOOLEAN
+     * 
+ * + * bool fetch_matched_annotations = 8; + * + * @param value The fetchMatchedAnnotations to set. + * @return This builder for chaining. + */ + public Builder setFetchMatchedAnnotations(boolean value) { + + fetchMatchedAnnotations_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * + * + *
+     * If true, return query matched annotations for this criteria.
+     * This option is only applicable for inclusion criteria, i.e., not exclusion
+     * criteria, with partition level annotations.  It supports the following data
+     * types:
+     *  - INTEGER
+     *  - FLOAT
+     *  - STRING (DataSchema.SearchStrategy.EXACT_SEARCH only)
+     *  - BOOLEAN
+     * 
+ * + * bool fetch_matched_annotations = 8; + * + * @return This builder for chaining. + */ + public Builder clearFetchMatchedAnnotations() { + bitField0_ = (bitField0_ & ~0x00000080); + fetchMatchedAnnotations_ = false; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.Criteria) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.Criteria) + private static final com.google.cloud.visionai.v1.Criteria DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.Criteria(); + } + + public static com.google.cloud.visionai.v1.Criteria getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Criteria parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.Criteria getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/CriteriaOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/CriteriaOrBuilder.java new file mode 100644 index 000000000000..091dc5c680fa --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/CriteriaOrBuilder.java @@ -0,0 +1,283 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/warehouse.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface CriteriaOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.Criteria) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The text values associated with the field.
+   * 
+ * + * .google.cloud.visionai.v1.StringArray text_array = 2; + * + * @return Whether the textArray field is set. + */ + boolean hasTextArray(); + /** + * + * + *
+   * The text values associated with the field.
+   * 
+ * + * .google.cloud.visionai.v1.StringArray text_array = 2; + * + * @return The textArray. + */ + com.google.cloud.visionai.v1.StringArray getTextArray(); + /** + * + * + *
+   * The text values associated with the field.
+   * 
+ * + * .google.cloud.visionai.v1.StringArray text_array = 2; + */ + com.google.cloud.visionai.v1.StringArrayOrBuilder getTextArrayOrBuilder(); + + /** + * + * + *
+   * The integer ranges associated with the field.
+   * 
+ * + * .google.cloud.visionai.v1.IntRangeArray int_range_array = 3; + * + * @return Whether the intRangeArray field is set. + */ + boolean hasIntRangeArray(); + /** + * + * + *
+   * The integer ranges associated with the field.
+   * 
+ * + * .google.cloud.visionai.v1.IntRangeArray int_range_array = 3; + * + * @return The intRangeArray. + */ + com.google.cloud.visionai.v1.IntRangeArray getIntRangeArray(); + /** + * + * + *
+   * The integer ranges associated with the field.
+   * 
+ * + * .google.cloud.visionai.v1.IntRangeArray int_range_array = 3; + */ + com.google.cloud.visionai.v1.IntRangeArrayOrBuilder getIntRangeArrayOrBuilder(); + + /** + * + * + *
+   * The float ranges associated with the field.
+   * 
+ * + * .google.cloud.visionai.v1.FloatRangeArray float_range_array = 4; + * + * @return Whether the floatRangeArray field is set. + */ + boolean hasFloatRangeArray(); + /** + * + * + *
+   * The float ranges associated with the field.
+   * 
+ * + * .google.cloud.visionai.v1.FloatRangeArray float_range_array = 4; + * + * @return The floatRangeArray. + */ + com.google.cloud.visionai.v1.FloatRangeArray getFloatRangeArray(); + /** + * + * + *
+   * The float ranges associated with the field.
+   * 
+ * + * .google.cloud.visionai.v1.FloatRangeArray float_range_array = 4; + */ + com.google.cloud.visionai.v1.FloatRangeArrayOrBuilder getFloatRangeArrayOrBuilder(); + + /** + * + * + *
+   * The datetime ranges associated with the field.
+   * 
+ * + * .google.cloud.visionai.v1.DateTimeRangeArray date_time_range_array = 5; + * + * @return Whether the dateTimeRangeArray field is set. + */ + boolean hasDateTimeRangeArray(); + /** + * + * + *
+   * The datetime ranges associated with the field.
+   * 
+ * + * .google.cloud.visionai.v1.DateTimeRangeArray date_time_range_array = 5; + * + * @return The dateTimeRangeArray. + */ + com.google.cloud.visionai.v1.DateTimeRangeArray getDateTimeRangeArray(); + /** + * + * + *
+   * The datetime ranges associated with the field.
+   * 
+ * + * .google.cloud.visionai.v1.DateTimeRangeArray date_time_range_array = 5; + */ + com.google.cloud.visionai.v1.DateTimeRangeArrayOrBuilder getDateTimeRangeArrayOrBuilder(); + + /** + * + * + *
+   * Geo Location array.
+   * 
+ * + * .google.cloud.visionai.v1.GeoLocationArray geo_location_array = 6; + * + * @return Whether the geoLocationArray field is set. + */ + boolean hasGeoLocationArray(); + /** + * + * + *
+   * Geo Location array.
+   * 
+ * + * .google.cloud.visionai.v1.GeoLocationArray geo_location_array = 6; + * + * @return The geoLocationArray. + */ + com.google.cloud.visionai.v1.GeoLocationArray getGeoLocationArray(); + /** + * + * + *
+   * Geo Location array.
+   * 
+ * + * .google.cloud.visionai.v1.GeoLocationArray geo_location_array = 6; + */ + com.google.cloud.visionai.v1.GeoLocationArrayOrBuilder getGeoLocationArrayOrBuilder(); + + /** + * + * + *
+   * A Boolean value.
+   * 
+ * + * .google.cloud.visionai.v1.BoolValue bool_value = 7; + * + * @return Whether the boolValue field is set. + */ + boolean hasBoolValue(); + /** + * + * + *
+   * A Boolean value.
+   * 
+ * + * .google.cloud.visionai.v1.BoolValue bool_value = 7; + * + * @return The boolValue. + */ + com.google.cloud.visionai.v1.BoolValue getBoolValue(); + /** + * + * + *
+   * A Boolean value.
+   * 
+ * + * .google.cloud.visionai.v1.BoolValue bool_value = 7; + */ + com.google.cloud.visionai.v1.BoolValueOrBuilder getBoolValueOrBuilder(); + + /** + * + * + *
+   * The UGA field or ML field to apply filtering criteria.
+   * 
+ * + * string field = 1; + * + * @return The field. + */ + java.lang.String getField(); + /** + * + * + *
+   * The UGA field or ML field to apply filtering criteria.
+   * 
+ * + * string field = 1; + * + * @return The bytes for field. + */ + com.google.protobuf.ByteString getFieldBytes(); + + /** + * + * + *
+   * If true, return query matched annotations for this criteria.
+   * This option is only applicable for inclusion criteria, i.e., not exclusion
+   * criteria, with partition level annotations.  It supports the following data
+   * types:
+   *  - INTEGER
+   *  - FLOAT
+   *  - STRING (DataSchema.SearchStrategy.EXACT_SEARCH only)
+   *  - BOOLEAN
+   * 
+ * + * bool fetch_matched_annotations = 8; + * + * @return The fetchMatchedAnnotations. + */ + boolean getFetchMatchedAnnotations(); + + com.google.cloud.visionai.v1.Criteria.ValueCase getValueCase(); +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/CustomProcessorSourceInfo.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/CustomProcessorSourceInfo.java new file mode 100644 index 000000000000..95f581e97ded --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/CustomProcessorSourceInfo.java @@ -0,0 +1,4528 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/platform.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * Describes the source info for a custom processor.
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.CustomProcessorSourceInfo} + */ +public final class CustomProcessorSourceInfo extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.CustomProcessorSourceInfo) + CustomProcessorSourceInfoOrBuilder { + private static final long serialVersionUID = 0L; + // Use CustomProcessorSourceInfo.newBuilder() to construct. + private CustomProcessorSourceInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CustomProcessorSourceInfo() { + sourceType_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CustomProcessorSourceInfo(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_CustomProcessorSourceInfo_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 4: + return internalGetAdditionalInfo(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_CustomProcessorSourceInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.CustomProcessorSourceInfo.class, + com.google.cloud.visionai.v1.CustomProcessorSourceInfo.Builder.class); + } + + /** + * + * + *
+   * Source type of the imported custom processor.
+   * 
+ * + * Protobuf enum {@code google.cloud.visionai.v1.CustomProcessorSourceInfo.SourceType} + */ + public enum SourceType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Source type unspecified.
+     * 
+ * + * SOURCE_TYPE_UNSPECIFIED = 0; + */ + SOURCE_TYPE_UNSPECIFIED(0), + /** + * + * + *
+     * Custom processors coming from Vertex AutoML product.
+     * 
+ * + * VERTEX_AUTOML = 1; + */ + VERTEX_AUTOML(1), + /** + * + * + *
+     * Custom processors coming from general custom models from Vertex.
+     * 
+ * + * VERTEX_CUSTOM = 2; + */ + VERTEX_CUSTOM(2), + /** + * + * + *
+     * Source for Product Recognizer.
+     * 
+ * + * PRODUCT_RECOGNIZER = 3; + */ + PRODUCT_RECOGNIZER(3), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Source type unspecified.
+     * 
+ * + * SOURCE_TYPE_UNSPECIFIED = 0; + */ + public static final int SOURCE_TYPE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * Custom processors coming from Vertex AutoML product.
+     * 
+ * + * VERTEX_AUTOML = 1; + */ + public static final int VERTEX_AUTOML_VALUE = 1; + /** + * + * + *
+     * Custom processors coming from general custom models from Vertex.
+     * 
+ * + * VERTEX_CUSTOM = 2; + */ + public static final int VERTEX_CUSTOM_VALUE = 2; + /** + * + * + *
+     * Source for Product Recognizer.
+     * 
+ * + * PRODUCT_RECOGNIZER = 3; + */ + public static final int PRODUCT_RECOGNIZER_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; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static SourceType valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static SourceType forNumber(int value) { + switch (value) { + case 0: + return SOURCE_TYPE_UNSPECIFIED; + case 1: + return VERTEX_AUTOML; + case 2: + return VERTEX_CUSTOM; + case 3: + return PRODUCT_RECOGNIZER; + 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 SourceType findValueByNumber(int number) { + return SourceType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + 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.visionai.v1.CustomProcessorSourceInfo.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final SourceType[] VALUES = values(); + + public static SourceType 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 SourceType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.visionai.v1.CustomProcessorSourceInfo.SourceType) + } + + public interface ProductRecognizerArtifactOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.CustomProcessorSourceInfo.ProductRecognizerArtifact) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Required. Resource name of RetailProductRecognitionIndex.
+     * Format is
+     * 'projects/*/locations/*/retailCatalogs/*/retailProductRecognitionIndexes/*'
+     * 
+ * + * string retail_product_recognition_index = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The retailProductRecognitionIndex. + */ + java.lang.String getRetailProductRecognitionIndex(); + /** + * + * + *
+     * Required. Resource name of RetailProductRecognitionIndex.
+     * Format is
+     * 'projects/*/locations/*/retailCatalogs/*/retailProductRecognitionIndexes/*'
+     * 
+ * + * string retail_product_recognition_index = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The bytes for retailProductRecognitionIndex. + */ + com.google.protobuf.ByteString getRetailProductRecognitionIndexBytes(); + + /** + * + * + *
+     * Optional. The resource name of embedding model hosted in Vertex AI
+     * Platform.
+     * 
+ * + * string vertex_model = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The vertexModel. + */ + java.lang.String getVertexModel(); + /** + * + * + *
+     * Optional. The resource name of embedding model hosted in Vertex AI
+     * Platform.
+     * 
+ * + * string vertex_model = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for vertexModel. + */ + com.google.protobuf.ByteString getVertexModelBytes(); + } + /** + * + * + *
+   * Message describes product recognizer artifact.
+   * 
+ * + * Protobuf type {@code + * google.cloud.visionai.v1.CustomProcessorSourceInfo.ProductRecognizerArtifact} + */ + public static final class ProductRecognizerArtifact extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.CustomProcessorSourceInfo.ProductRecognizerArtifact) + ProductRecognizerArtifactOrBuilder { + private static final long serialVersionUID = 0L; + // Use ProductRecognizerArtifact.newBuilder() to construct. + private ProductRecognizerArtifact(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ProductRecognizerArtifact() { + retailProductRecognitionIndex_ = ""; + vertexModel_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ProductRecognizerArtifact(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_CustomProcessorSourceInfo_ProductRecognizerArtifact_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_CustomProcessorSourceInfo_ProductRecognizerArtifact_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.CustomProcessorSourceInfo.ProductRecognizerArtifact + .class, + com.google.cloud.visionai.v1.CustomProcessorSourceInfo.ProductRecognizerArtifact + .Builder.class); + } + + public static final int RETAIL_PRODUCT_RECOGNITION_INDEX_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object retailProductRecognitionIndex_ = ""; + /** + * + * + *
+     * Required. Resource name of RetailProductRecognitionIndex.
+     * Format is
+     * 'projects/*/locations/*/retailCatalogs/*/retailProductRecognitionIndexes/*'
+     * 
+ * + * string retail_product_recognition_index = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The retailProductRecognitionIndex. + */ + @java.lang.Override + public java.lang.String getRetailProductRecognitionIndex() { + java.lang.Object ref = retailProductRecognitionIndex_; + 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(); + retailProductRecognitionIndex_ = s; + return s; + } + } + /** + * + * + *
+     * Required. Resource name of RetailProductRecognitionIndex.
+     * Format is
+     * 'projects/*/locations/*/retailCatalogs/*/retailProductRecognitionIndexes/*'
+     * 
+ * + * string retail_product_recognition_index = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The bytes for retailProductRecognitionIndex. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRetailProductRecognitionIndexBytes() { + java.lang.Object ref = retailProductRecognitionIndex_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + retailProductRecognitionIndex_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VERTEX_MODEL_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object vertexModel_ = ""; + /** + * + * + *
+     * Optional. The resource name of embedding model hosted in Vertex AI
+     * Platform.
+     * 
+ * + * string vertex_model = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The vertexModel. + */ + @java.lang.Override + public java.lang.String getVertexModel() { + java.lang.Object ref = vertexModel_; + 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(); + vertexModel_ = s; + return s; + } + } + /** + * + * + *
+     * Optional. The resource name of embedding model hosted in Vertex AI
+     * Platform.
+     * 
+ * + * string vertex_model = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for vertexModel. + */ + @java.lang.Override + public com.google.protobuf.ByteString getVertexModelBytes() { + java.lang.Object ref = vertexModel_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + vertexModel_ = 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(retailProductRecognitionIndex_)) { + com.google.protobuf.GeneratedMessageV3.writeString( + output, 1, retailProductRecognitionIndex_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(vertexModel_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, vertexModel_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(retailProductRecognitionIndex_)) { + size += + com.google.protobuf.GeneratedMessageV3.computeStringSize( + 1, retailProductRecognitionIndex_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(vertexModel_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, vertexModel_); + } + size += getUnknownFields().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.visionai.v1.CustomProcessorSourceInfo.ProductRecognizerArtifact)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.CustomProcessorSourceInfo.ProductRecognizerArtifact other = + (com.google.cloud.visionai.v1.CustomProcessorSourceInfo.ProductRecognizerArtifact) obj; + + if (!getRetailProductRecognitionIndex().equals(other.getRetailProductRecognitionIndex())) + return false; + if (!getVertexModel().equals(other.getVertexModel())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + RETAIL_PRODUCT_RECOGNITION_INDEX_FIELD_NUMBER; + hash = (53 * hash) + getRetailProductRecognitionIndex().hashCode(); + hash = (37 * hash) + VERTEX_MODEL_FIELD_NUMBER; + hash = (53 * hash) + getVertexModel().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.CustomProcessorSourceInfo.ProductRecognizerArtifact + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.CustomProcessorSourceInfo.ProductRecognizerArtifact + 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.visionai.v1.CustomProcessorSourceInfo.ProductRecognizerArtifact + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.CustomProcessorSourceInfo.ProductRecognizerArtifact + 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.visionai.v1.CustomProcessorSourceInfo.ProductRecognizerArtifact + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.CustomProcessorSourceInfo.ProductRecognizerArtifact + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.CustomProcessorSourceInfo.ProductRecognizerArtifact + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.CustomProcessorSourceInfo.ProductRecognizerArtifact + 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.visionai.v1.CustomProcessorSourceInfo.ProductRecognizerArtifact + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.CustomProcessorSourceInfo.ProductRecognizerArtifact + 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.visionai.v1.CustomProcessorSourceInfo.ProductRecognizerArtifact + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.CustomProcessorSourceInfo.ProductRecognizerArtifact + 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.visionai.v1.CustomProcessorSourceInfo.ProductRecognizerArtifact + 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; + } + /** + * + * + *
+     * Message describes product recognizer artifact.
+     * 
+ * + * Protobuf type {@code + * google.cloud.visionai.v1.CustomProcessorSourceInfo.ProductRecognizerArtifact} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.CustomProcessorSourceInfo.ProductRecognizerArtifact) + com.google.cloud.visionai.v1.CustomProcessorSourceInfo.ProductRecognizerArtifactOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_CustomProcessorSourceInfo_ProductRecognizerArtifact_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_CustomProcessorSourceInfo_ProductRecognizerArtifact_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.CustomProcessorSourceInfo.ProductRecognizerArtifact + .class, + com.google.cloud.visionai.v1.CustomProcessorSourceInfo.ProductRecognizerArtifact + .Builder.class); + } + + // Construct using + // com.google.cloud.visionai.v1.CustomProcessorSourceInfo.ProductRecognizerArtifact.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + retailProductRecognitionIndex_ = ""; + vertexModel_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_CustomProcessorSourceInfo_ProductRecognizerArtifact_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.CustomProcessorSourceInfo.ProductRecognizerArtifact + getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.CustomProcessorSourceInfo.ProductRecognizerArtifact + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.CustomProcessorSourceInfo.ProductRecognizerArtifact + build() { + com.google.cloud.visionai.v1.CustomProcessorSourceInfo.ProductRecognizerArtifact result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.CustomProcessorSourceInfo.ProductRecognizerArtifact + buildPartial() { + com.google.cloud.visionai.v1.CustomProcessorSourceInfo.ProductRecognizerArtifact result = + new com.google.cloud.visionai.v1.CustomProcessorSourceInfo.ProductRecognizerArtifact( + this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.visionai.v1.CustomProcessorSourceInfo.ProductRecognizerArtifact result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.retailProductRecognitionIndex_ = retailProductRecognitionIndex_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.vertexModel_ = vertexModel_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.visionai.v1.CustomProcessorSourceInfo.ProductRecognizerArtifact) { + return mergeFrom( + (com.google.cloud.visionai.v1.CustomProcessorSourceInfo.ProductRecognizerArtifact) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.visionai.v1.CustomProcessorSourceInfo.ProductRecognizerArtifact other) { + if (other + == com.google.cloud.visionai.v1.CustomProcessorSourceInfo.ProductRecognizerArtifact + .getDefaultInstance()) return this; + if (!other.getRetailProductRecognitionIndex().isEmpty()) { + retailProductRecognitionIndex_ = other.retailProductRecognitionIndex_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getVertexModel().isEmpty()) { + vertexModel_ = other.vertexModel_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + retailProductRecognitionIndex_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + vertexModel_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object retailProductRecognitionIndex_ = ""; + /** + * + * + *
+       * Required. Resource name of RetailProductRecognitionIndex.
+       * Format is
+       * 'projects/*/locations/*/retailCatalogs/*/retailProductRecognitionIndexes/*'
+       * 
+ * + * + * string retail_product_recognition_index = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The retailProductRecognitionIndex. + */ + public java.lang.String getRetailProductRecognitionIndex() { + java.lang.Object ref = retailProductRecognitionIndex_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + retailProductRecognitionIndex_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * Required. Resource name of RetailProductRecognitionIndex.
+       * Format is
+       * 'projects/*/locations/*/retailCatalogs/*/retailProductRecognitionIndexes/*'
+       * 
+ * + * + * string retail_product_recognition_index = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The bytes for retailProductRecognitionIndex. + */ + public com.google.protobuf.ByteString getRetailProductRecognitionIndexBytes() { + java.lang.Object ref = retailProductRecognitionIndex_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + retailProductRecognitionIndex_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * Required. Resource name of RetailProductRecognitionIndex.
+       * Format is
+       * 'projects/*/locations/*/retailCatalogs/*/retailProductRecognitionIndexes/*'
+       * 
+ * + * + * string retail_product_recognition_index = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The retailProductRecognitionIndex to set. + * @return This builder for chaining. + */ + public Builder setRetailProductRecognitionIndex(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + retailProductRecognitionIndex_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * Required. Resource name of RetailProductRecognitionIndex.
+       * Format is
+       * 'projects/*/locations/*/retailCatalogs/*/retailProductRecognitionIndexes/*'
+       * 
+ * + * + * string retail_product_recognition_index = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return This builder for chaining. + */ + public Builder clearRetailProductRecognitionIndex() { + retailProductRecognitionIndex_ = getDefaultInstance().getRetailProductRecognitionIndex(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+       * Required. Resource name of RetailProductRecognitionIndex.
+       * Format is
+       * 'projects/*/locations/*/retailCatalogs/*/retailProductRecognitionIndexes/*'
+       * 
+ * + * + * string retail_product_recognition_index = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The bytes for retailProductRecognitionIndex to set. + * @return This builder for chaining. + */ + public Builder setRetailProductRecognitionIndexBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + retailProductRecognitionIndex_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object vertexModel_ = ""; + /** + * + * + *
+       * Optional. The resource name of embedding model hosted in Vertex AI
+       * Platform.
+       * 
+ * + * string vertex_model = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The vertexModel. + */ + public java.lang.String getVertexModel() { + java.lang.Object ref = vertexModel_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + vertexModel_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * Optional. The resource name of embedding model hosted in Vertex AI
+       * Platform.
+       * 
+ * + * string vertex_model = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for vertexModel. + */ + public com.google.protobuf.ByteString getVertexModelBytes() { + java.lang.Object ref = vertexModel_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + vertexModel_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * Optional. The resource name of embedding model hosted in Vertex AI
+       * Platform.
+       * 
+ * + * string vertex_model = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The vertexModel to set. + * @return This builder for chaining. + */ + public Builder setVertexModel(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + vertexModel_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * Optional. The resource name of embedding model hosted in Vertex AI
+       * Platform.
+       * 
+ * + * string vertex_model = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearVertexModel() { + vertexModel_ = getDefaultInstance().getVertexModel(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+       * Optional. The resource name of embedding model hosted in Vertex AI
+       * Platform.
+       * 
+ * + * string vertex_model = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for vertexModel to set. + * @return This builder for chaining. + */ + public Builder setVertexModelBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + vertexModel_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.CustomProcessorSourceInfo.ProductRecognizerArtifact) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.CustomProcessorSourceInfo.ProductRecognizerArtifact) + private static final com.google.cloud.visionai.v1.CustomProcessorSourceInfo + .ProductRecognizerArtifact + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.visionai.v1.CustomProcessorSourceInfo.ProductRecognizerArtifact(); + } + + public static com.google.cloud.visionai.v1.CustomProcessorSourceInfo.ProductRecognizerArtifact + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ProductRecognizerArtifact parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.CustomProcessorSourceInfo.ProductRecognizerArtifact + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface ModelSchemaOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.CustomProcessorSourceInfo.ModelSchema) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Cloud Storage location to a YAML file that defines the format of a single
+     * instance used in prediction and explanation requests.
+     * 
+ * + * .google.cloud.visionai.v1.GcsSource instances_schema = 1; + * + * @return Whether the instancesSchema field is set. + */ + boolean hasInstancesSchema(); + /** + * + * + *
+     * Cloud Storage location to a YAML file that defines the format of a single
+     * instance used in prediction and explanation requests.
+     * 
+ * + * .google.cloud.visionai.v1.GcsSource instances_schema = 1; + * + * @return The instancesSchema. + */ + com.google.cloud.visionai.v1.GcsSource getInstancesSchema(); + /** + * + * + *
+     * Cloud Storage location to a YAML file that defines the format of a single
+     * instance used in prediction and explanation requests.
+     * 
+ * + * .google.cloud.visionai.v1.GcsSource instances_schema = 1; + */ + com.google.cloud.visionai.v1.GcsSourceOrBuilder getInstancesSchemaOrBuilder(); + + /** + * + * + *
+     * Cloud Storage location to a YAML file that defines the prediction and
+     * explanation parameters.
+     * 
+ * + * .google.cloud.visionai.v1.GcsSource parameters_schema = 2; + * + * @return Whether the parametersSchema field is set. + */ + boolean hasParametersSchema(); + /** + * + * + *
+     * Cloud Storage location to a YAML file that defines the prediction and
+     * explanation parameters.
+     * 
+ * + * .google.cloud.visionai.v1.GcsSource parameters_schema = 2; + * + * @return The parametersSchema. + */ + com.google.cloud.visionai.v1.GcsSource getParametersSchema(); + /** + * + * + *
+     * Cloud Storage location to a YAML file that defines the prediction and
+     * explanation parameters.
+     * 
+ * + * .google.cloud.visionai.v1.GcsSource parameters_schema = 2; + */ + com.google.cloud.visionai.v1.GcsSourceOrBuilder getParametersSchemaOrBuilder(); + + /** + * + * + *
+     * Cloud Storage location to a YAML file that defines the format of a single
+     * prediction or explanation.
+     * 
+ * + * .google.cloud.visionai.v1.GcsSource predictions_schema = 3; + * + * @return Whether the predictionsSchema field is set. + */ + boolean hasPredictionsSchema(); + /** + * + * + *
+     * Cloud Storage location to a YAML file that defines the format of a single
+     * prediction or explanation.
+     * 
+ * + * .google.cloud.visionai.v1.GcsSource predictions_schema = 3; + * + * @return The predictionsSchema. + */ + com.google.cloud.visionai.v1.GcsSource getPredictionsSchema(); + /** + * + * + *
+     * Cloud Storage location to a YAML file that defines the format of a single
+     * prediction or explanation.
+     * 
+ * + * .google.cloud.visionai.v1.GcsSource predictions_schema = 3; + */ + com.google.cloud.visionai.v1.GcsSourceOrBuilder getPredictionsSchemaOrBuilder(); + } + /** + * + * + *
+   * The schema is defined as an OpenAPI 3.0.2 [Schema
+   * Object](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.2.md#schemaObject).
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.CustomProcessorSourceInfo.ModelSchema} + */ + public static final class ModelSchema extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.CustomProcessorSourceInfo.ModelSchema) + ModelSchemaOrBuilder { + private static final long serialVersionUID = 0L; + // Use ModelSchema.newBuilder() to construct. + private ModelSchema(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ModelSchema() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ModelSchema(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_CustomProcessorSourceInfo_ModelSchema_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_CustomProcessorSourceInfo_ModelSchema_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.CustomProcessorSourceInfo.ModelSchema.class, + com.google.cloud.visionai.v1.CustomProcessorSourceInfo.ModelSchema.Builder.class); + } + + private int bitField0_; + public static final int INSTANCES_SCHEMA_FIELD_NUMBER = 1; + private com.google.cloud.visionai.v1.GcsSource instancesSchema_; + /** + * + * + *
+     * Cloud Storage location to a YAML file that defines the format of a single
+     * instance used in prediction and explanation requests.
+     * 
+ * + * .google.cloud.visionai.v1.GcsSource instances_schema = 1; + * + * @return Whether the instancesSchema field is set. + */ + @java.lang.Override + public boolean hasInstancesSchema() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * Cloud Storage location to a YAML file that defines the format of a single
+     * instance used in prediction and explanation requests.
+     * 
+ * + * .google.cloud.visionai.v1.GcsSource instances_schema = 1; + * + * @return The instancesSchema. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.GcsSource getInstancesSchema() { + return instancesSchema_ == null + ? com.google.cloud.visionai.v1.GcsSource.getDefaultInstance() + : instancesSchema_; + } + /** + * + * + *
+     * Cloud Storage location to a YAML file that defines the format of a single
+     * instance used in prediction and explanation requests.
+     * 
+ * + * .google.cloud.visionai.v1.GcsSource instances_schema = 1; + */ + @java.lang.Override + public com.google.cloud.visionai.v1.GcsSourceOrBuilder getInstancesSchemaOrBuilder() { + return instancesSchema_ == null + ? com.google.cloud.visionai.v1.GcsSource.getDefaultInstance() + : instancesSchema_; + } + + public static final int PARAMETERS_SCHEMA_FIELD_NUMBER = 2; + private com.google.cloud.visionai.v1.GcsSource parametersSchema_; + /** + * + * + *
+     * Cloud Storage location to a YAML file that defines the prediction and
+     * explanation parameters.
+     * 
+ * + * .google.cloud.visionai.v1.GcsSource parameters_schema = 2; + * + * @return Whether the parametersSchema field is set. + */ + @java.lang.Override + public boolean hasParametersSchema() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * Cloud Storage location to a YAML file that defines the prediction and
+     * explanation parameters.
+     * 
+ * + * .google.cloud.visionai.v1.GcsSource parameters_schema = 2; + * + * @return The parametersSchema. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.GcsSource getParametersSchema() { + return parametersSchema_ == null + ? com.google.cloud.visionai.v1.GcsSource.getDefaultInstance() + : parametersSchema_; + } + /** + * + * + *
+     * Cloud Storage location to a YAML file that defines the prediction and
+     * explanation parameters.
+     * 
+ * + * .google.cloud.visionai.v1.GcsSource parameters_schema = 2; + */ + @java.lang.Override + public com.google.cloud.visionai.v1.GcsSourceOrBuilder getParametersSchemaOrBuilder() { + return parametersSchema_ == null + ? com.google.cloud.visionai.v1.GcsSource.getDefaultInstance() + : parametersSchema_; + } + + public static final int PREDICTIONS_SCHEMA_FIELD_NUMBER = 3; + private com.google.cloud.visionai.v1.GcsSource predictionsSchema_; + /** + * + * + *
+     * Cloud Storage location to a YAML file that defines the format of a single
+     * prediction or explanation.
+     * 
+ * + * .google.cloud.visionai.v1.GcsSource predictions_schema = 3; + * + * @return Whether the predictionsSchema field is set. + */ + @java.lang.Override + public boolean hasPredictionsSchema() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+     * Cloud Storage location to a YAML file that defines the format of a single
+     * prediction or explanation.
+     * 
+ * + * .google.cloud.visionai.v1.GcsSource predictions_schema = 3; + * + * @return The predictionsSchema. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.GcsSource getPredictionsSchema() { + return predictionsSchema_ == null + ? com.google.cloud.visionai.v1.GcsSource.getDefaultInstance() + : predictionsSchema_; + } + /** + * + * + *
+     * Cloud Storage location to a YAML file that defines the format of a single
+     * prediction or explanation.
+     * 
+ * + * .google.cloud.visionai.v1.GcsSource predictions_schema = 3; + */ + @java.lang.Override + public com.google.cloud.visionai.v1.GcsSourceOrBuilder getPredictionsSchemaOrBuilder() { + return predictionsSchema_ == null + ? com.google.cloud.visionai.v1.GcsSource.getDefaultInstance() + : predictionsSchema_; + } + + 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 (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getInstancesSchema()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(2, getParametersSchema()); + } + if (((bitField0_ & 0x00000004) != 0)) { + output.writeMessage(3, getPredictionsSchema()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getInstancesSchema()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getParametersSchema()); + } + if (((bitField0_ & 0x00000004) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getPredictionsSchema()); + } + size += getUnknownFields().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.visionai.v1.CustomProcessorSourceInfo.ModelSchema)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.CustomProcessorSourceInfo.ModelSchema other = + (com.google.cloud.visionai.v1.CustomProcessorSourceInfo.ModelSchema) obj; + + if (hasInstancesSchema() != other.hasInstancesSchema()) return false; + if (hasInstancesSchema()) { + if (!getInstancesSchema().equals(other.getInstancesSchema())) return false; + } + if (hasParametersSchema() != other.hasParametersSchema()) return false; + if (hasParametersSchema()) { + if (!getParametersSchema().equals(other.getParametersSchema())) return false; + } + if (hasPredictionsSchema() != other.hasPredictionsSchema()) return false; + if (hasPredictionsSchema()) { + if (!getPredictionsSchema().equals(other.getPredictionsSchema())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasInstancesSchema()) { + hash = (37 * hash) + INSTANCES_SCHEMA_FIELD_NUMBER; + hash = (53 * hash) + getInstancesSchema().hashCode(); + } + if (hasParametersSchema()) { + hash = (37 * hash) + PARAMETERS_SCHEMA_FIELD_NUMBER; + hash = (53 * hash) + getParametersSchema().hashCode(); + } + if (hasPredictionsSchema()) { + hash = (37 * hash) + PREDICTIONS_SCHEMA_FIELD_NUMBER; + hash = (53 * hash) + getPredictionsSchema().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.CustomProcessorSourceInfo.ModelSchema parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.CustomProcessorSourceInfo.ModelSchema 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.visionai.v1.CustomProcessorSourceInfo.ModelSchema parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.CustomProcessorSourceInfo.ModelSchema 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.visionai.v1.CustomProcessorSourceInfo.ModelSchema parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.CustomProcessorSourceInfo.ModelSchema parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.CustomProcessorSourceInfo.ModelSchema parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.CustomProcessorSourceInfo.ModelSchema 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.visionai.v1.CustomProcessorSourceInfo.ModelSchema + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.CustomProcessorSourceInfo.ModelSchema + 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.visionai.v1.CustomProcessorSourceInfo.ModelSchema parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.CustomProcessorSourceInfo.ModelSchema 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.visionai.v1.CustomProcessorSourceInfo.ModelSchema 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 schema is defined as an OpenAPI 3.0.2 [Schema
+     * Object](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.2.md#schemaObject).
+     * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.CustomProcessorSourceInfo.ModelSchema} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.CustomProcessorSourceInfo.ModelSchema) + com.google.cloud.visionai.v1.CustomProcessorSourceInfo.ModelSchemaOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_CustomProcessorSourceInfo_ModelSchema_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_CustomProcessorSourceInfo_ModelSchema_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.CustomProcessorSourceInfo.ModelSchema.class, + com.google.cloud.visionai.v1.CustomProcessorSourceInfo.ModelSchema.Builder.class); + } + + // Construct using + // com.google.cloud.visionai.v1.CustomProcessorSourceInfo.ModelSchema.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getInstancesSchemaFieldBuilder(); + getParametersSchemaFieldBuilder(); + getPredictionsSchemaFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + instancesSchema_ = null; + if (instancesSchemaBuilder_ != null) { + instancesSchemaBuilder_.dispose(); + instancesSchemaBuilder_ = null; + } + parametersSchema_ = null; + if (parametersSchemaBuilder_ != null) { + parametersSchemaBuilder_.dispose(); + parametersSchemaBuilder_ = null; + } + predictionsSchema_ = null; + if (predictionsSchemaBuilder_ != null) { + predictionsSchemaBuilder_.dispose(); + predictionsSchemaBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_CustomProcessorSourceInfo_ModelSchema_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.CustomProcessorSourceInfo.ModelSchema + getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.CustomProcessorSourceInfo.ModelSchema + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.CustomProcessorSourceInfo.ModelSchema build() { + com.google.cloud.visionai.v1.CustomProcessorSourceInfo.ModelSchema result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.CustomProcessorSourceInfo.ModelSchema buildPartial() { + com.google.cloud.visionai.v1.CustomProcessorSourceInfo.ModelSchema result = + new com.google.cloud.visionai.v1.CustomProcessorSourceInfo.ModelSchema(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.visionai.v1.CustomProcessorSourceInfo.ModelSchema result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.instancesSchema_ = + instancesSchemaBuilder_ == null ? instancesSchema_ : instancesSchemaBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.parametersSchema_ = + parametersSchemaBuilder_ == null + ? parametersSchema_ + : parametersSchemaBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.predictionsSchema_ = + predictionsSchemaBuilder_ == null + ? predictionsSchema_ + : predictionsSchemaBuilder_.build(); + to_bitField0_ |= 0x00000004; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.CustomProcessorSourceInfo.ModelSchema) { + return mergeFrom( + (com.google.cloud.visionai.v1.CustomProcessorSourceInfo.ModelSchema) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.visionai.v1.CustomProcessorSourceInfo.ModelSchema other) { + if (other + == com.google.cloud.visionai.v1.CustomProcessorSourceInfo.ModelSchema + .getDefaultInstance()) return this; + if (other.hasInstancesSchema()) { + mergeInstancesSchema(other.getInstancesSchema()); + } + if (other.hasParametersSchema()) { + mergeParametersSchema(other.getParametersSchema()); + } + if (other.hasPredictionsSchema()) { + mergePredictionsSchema(other.getPredictionsSchema()); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage( + getInstancesSchemaFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage( + getParametersSchemaFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage( + getPredictionsSchemaFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.cloud.visionai.v1.GcsSource instancesSchema_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.GcsSource, + com.google.cloud.visionai.v1.GcsSource.Builder, + com.google.cloud.visionai.v1.GcsSourceOrBuilder> + instancesSchemaBuilder_; + /** + * + * + *
+       * Cloud Storage location to a YAML file that defines the format of a single
+       * instance used in prediction and explanation requests.
+       * 
+ * + * .google.cloud.visionai.v1.GcsSource instances_schema = 1; + * + * @return Whether the instancesSchema field is set. + */ + public boolean hasInstancesSchema() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+       * Cloud Storage location to a YAML file that defines the format of a single
+       * instance used in prediction and explanation requests.
+       * 
+ * + * .google.cloud.visionai.v1.GcsSource instances_schema = 1; + * + * @return The instancesSchema. + */ + public com.google.cloud.visionai.v1.GcsSource getInstancesSchema() { + if (instancesSchemaBuilder_ == null) { + return instancesSchema_ == null + ? com.google.cloud.visionai.v1.GcsSource.getDefaultInstance() + : instancesSchema_; + } else { + return instancesSchemaBuilder_.getMessage(); + } + } + /** + * + * + *
+       * Cloud Storage location to a YAML file that defines the format of a single
+       * instance used in prediction and explanation requests.
+       * 
+ * + * .google.cloud.visionai.v1.GcsSource instances_schema = 1; + */ + public Builder setInstancesSchema(com.google.cloud.visionai.v1.GcsSource value) { + if (instancesSchemaBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + instancesSchema_ = value; + } else { + instancesSchemaBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * Cloud Storage location to a YAML file that defines the format of a single
+       * instance used in prediction and explanation requests.
+       * 
+ * + * .google.cloud.visionai.v1.GcsSource instances_schema = 1; + */ + public Builder setInstancesSchema( + com.google.cloud.visionai.v1.GcsSource.Builder builderForValue) { + if (instancesSchemaBuilder_ == null) { + instancesSchema_ = builderForValue.build(); + } else { + instancesSchemaBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * Cloud Storage location to a YAML file that defines the format of a single
+       * instance used in prediction and explanation requests.
+       * 
+ * + * .google.cloud.visionai.v1.GcsSource instances_schema = 1; + */ + public Builder mergeInstancesSchema(com.google.cloud.visionai.v1.GcsSource value) { + if (instancesSchemaBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && instancesSchema_ != null + && instancesSchema_ != com.google.cloud.visionai.v1.GcsSource.getDefaultInstance()) { + getInstancesSchemaBuilder().mergeFrom(value); + } else { + instancesSchema_ = value; + } + } else { + instancesSchemaBuilder_.mergeFrom(value); + } + if (instancesSchema_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + /** + * + * + *
+       * Cloud Storage location to a YAML file that defines the format of a single
+       * instance used in prediction and explanation requests.
+       * 
+ * + * .google.cloud.visionai.v1.GcsSource instances_schema = 1; + */ + public Builder clearInstancesSchema() { + bitField0_ = (bitField0_ & ~0x00000001); + instancesSchema_ = null; + if (instancesSchemaBuilder_ != null) { + instancesSchemaBuilder_.dispose(); + instancesSchemaBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+       * Cloud Storage location to a YAML file that defines the format of a single
+       * instance used in prediction and explanation requests.
+       * 
+ * + * .google.cloud.visionai.v1.GcsSource instances_schema = 1; + */ + public com.google.cloud.visionai.v1.GcsSource.Builder getInstancesSchemaBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getInstancesSchemaFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Cloud Storage location to a YAML file that defines the format of a single
+       * instance used in prediction and explanation requests.
+       * 
+ * + * .google.cloud.visionai.v1.GcsSource instances_schema = 1; + */ + public com.google.cloud.visionai.v1.GcsSourceOrBuilder getInstancesSchemaOrBuilder() { + if (instancesSchemaBuilder_ != null) { + return instancesSchemaBuilder_.getMessageOrBuilder(); + } else { + return instancesSchema_ == null + ? com.google.cloud.visionai.v1.GcsSource.getDefaultInstance() + : instancesSchema_; + } + } + /** + * + * + *
+       * Cloud Storage location to a YAML file that defines the format of a single
+       * instance used in prediction and explanation requests.
+       * 
+ * + * .google.cloud.visionai.v1.GcsSource instances_schema = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.GcsSource, + com.google.cloud.visionai.v1.GcsSource.Builder, + com.google.cloud.visionai.v1.GcsSourceOrBuilder> + getInstancesSchemaFieldBuilder() { + if (instancesSchemaBuilder_ == null) { + instancesSchemaBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.GcsSource, + com.google.cloud.visionai.v1.GcsSource.Builder, + com.google.cloud.visionai.v1.GcsSourceOrBuilder>( + getInstancesSchema(), getParentForChildren(), isClean()); + instancesSchema_ = null; + } + return instancesSchemaBuilder_; + } + + private com.google.cloud.visionai.v1.GcsSource parametersSchema_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.GcsSource, + com.google.cloud.visionai.v1.GcsSource.Builder, + com.google.cloud.visionai.v1.GcsSourceOrBuilder> + parametersSchemaBuilder_; + /** + * + * + *
+       * Cloud Storage location to a YAML file that defines the prediction and
+       * explanation parameters.
+       * 
+ * + * .google.cloud.visionai.v1.GcsSource parameters_schema = 2; + * + * @return Whether the parametersSchema field is set. + */ + public boolean hasParametersSchema() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+       * Cloud Storage location to a YAML file that defines the prediction and
+       * explanation parameters.
+       * 
+ * + * .google.cloud.visionai.v1.GcsSource parameters_schema = 2; + * + * @return The parametersSchema. + */ + public com.google.cloud.visionai.v1.GcsSource getParametersSchema() { + if (parametersSchemaBuilder_ == null) { + return parametersSchema_ == null + ? com.google.cloud.visionai.v1.GcsSource.getDefaultInstance() + : parametersSchema_; + } else { + return parametersSchemaBuilder_.getMessage(); + } + } + /** + * + * + *
+       * Cloud Storage location to a YAML file that defines the prediction and
+       * explanation parameters.
+       * 
+ * + * .google.cloud.visionai.v1.GcsSource parameters_schema = 2; + */ + public Builder setParametersSchema(com.google.cloud.visionai.v1.GcsSource value) { + if (parametersSchemaBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + parametersSchema_ = value; + } else { + parametersSchemaBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * Cloud Storage location to a YAML file that defines the prediction and
+       * explanation parameters.
+       * 
+ * + * .google.cloud.visionai.v1.GcsSource parameters_schema = 2; + */ + public Builder setParametersSchema( + com.google.cloud.visionai.v1.GcsSource.Builder builderForValue) { + if (parametersSchemaBuilder_ == null) { + parametersSchema_ = builderForValue.build(); + } else { + parametersSchemaBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * Cloud Storage location to a YAML file that defines the prediction and
+       * explanation parameters.
+       * 
+ * + * .google.cloud.visionai.v1.GcsSource parameters_schema = 2; + */ + public Builder mergeParametersSchema(com.google.cloud.visionai.v1.GcsSource value) { + if (parametersSchemaBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && parametersSchema_ != null + && parametersSchema_ != com.google.cloud.visionai.v1.GcsSource.getDefaultInstance()) { + getParametersSchemaBuilder().mergeFrom(value); + } else { + parametersSchema_ = value; + } + } else { + parametersSchemaBuilder_.mergeFrom(value); + } + if (parametersSchema_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + /** + * + * + *
+       * Cloud Storage location to a YAML file that defines the prediction and
+       * explanation parameters.
+       * 
+ * + * .google.cloud.visionai.v1.GcsSource parameters_schema = 2; + */ + public Builder clearParametersSchema() { + bitField0_ = (bitField0_ & ~0x00000002); + parametersSchema_ = null; + if (parametersSchemaBuilder_ != null) { + parametersSchemaBuilder_.dispose(); + parametersSchemaBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+       * Cloud Storage location to a YAML file that defines the prediction and
+       * explanation parameters.
+       * 
+ * + * .google.cloud.visionai.v1.GcsSource parameters_schema = 2; + */ + public com.google.cloud.visionai.v1.GcsSource.Builder getParametersSchemaBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getParametersSchemaFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Cloud Storage location to a YAML file that defines the prediction and
+       * explanation parameters.
+       * 
+ * + * .google.cloud.visionai.v1.GcsSource parameters_schema = 2; + */ + public com.google.cloud.visionai.v1.GcsSourceOrBuilder getParametersSchemaOrBuilder() { + if (parametersSchemaBuilder_ != null) { + return parametersSchemaBuilder_.getMessageOrBuilder(); + } else { + return parametersSchema_ == null + ? com.google.cloud.visionai.v1.GcsSource.getDefaultInstance() + : parametersSchema_; + } + } + /** + * + * + *
+       * Cloud Storage location to a YAML file that defines the prediction and
+       * explanation parameters.
+       * 
+ * + * .google.cloud.visionai.v1.GcsSource parameters_schema = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.GcsSource, + com.google.cloud.visionai.v1.GcsSource.Builder, + com.google.cloud.visionai.v1.GcsSourceOrBuilder> + getParametersSchemaFieldBuilder() { + if (parametersSchemaBuilder_ == null) { + parametersSchemaBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.GcsSource, + com.google.cloud.visionai.v1.GcsSource.Builder, + com.google.cloud.visionai.v1.GcsSourceOrBuilder>( + getParametersSchema(), getParentForChildren(), isClean()); + parametersSchema_ = null; + } + return parametersSchemaBuilder_; + } + + private com.google.cloud.visionai.v1.GcsSource predictionsSchema_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.GcsSource, + com.google.cloud.visionai.v1.GcsSource.Builder, + com.google.cloud.visionai.v1.GcsSourceOrBuilder> + predictionsSchemaBuilder_; + /** + * + * + *
+       * Cloud Storage location to a YAML file that defines the format of a single
+       * prediction or explanation.
+       * 
+ * + * .google.cloud.visionai.v1.GcsSource predictions_schema = 3; + * + * @return Whether the predictionsSchema field is set. + */ + public boolean hasPredictionsSchema() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+       * Cloud Storage location to a YAML file that defines the format of a single
+       * prediction or explanation.
+       * 
+ * + * .google.cloud.visionai.v1.GcsSource predictions_schema = 3; + * + * @return The predictionsSchema. + */ + public com.google.cloud.visionai.v1.GcsSource getPredictionsSchema() { + if (predictionsSchemaBuilder_ == null) { + return predictionsSchema_ == null + ? com.google.cloud.visionai.v1.GcsSource.getDefaultInstance() + : predictionsSchema_; + } else { + return predictionsSchemaBuilder_.getMessage(); + } + } + /** + * + * + *
+       * Cloud Storage location to a YAML file that defines the format of a single
+       * prediction or explanation.
+       * 
+ * + * .google.cloud.visionai.v1.GcsSource predictions_schema = 3; + */ + public Builder setPredictionsSchema(com.google.cloud.visionai.v1.GcsSource value) { + if (predictionsSchemaBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + predictionsSchema_ = value; + } else { + predictionsSchemaBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+       * Cloud Storage location to a YAML file that defines the format of a single
+       * prediction or explanation.
+       * 
+ * + * .google.cloud.visionai.v1.GcsSource predictions_schema = 3; + */ + public Builder setPredictionsSchema( + com.google.cloud.visionai.v1.GcsSource.Builder builderForValue) { + if (predictionsSchemaBuilder_ == null) { + predictionsSchema_ = builderForValue.build(); + } else { + predictionsSchemaBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+       * Cloud Storage location to a YAML file that defines the format of a single
+       * prediction or explanation.
+       * 
+ * + * .google.cloud.visionai.v1.GcsSource predictions_schema = 3; + */ + public Builder mergePredictionsSchema(com.google.cloud.visionai.v1.GcsSource value) { + if (predictionsSchemaBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && predictionsSchema_ != null + && predictionsSchema_ + != com.google.cloud.visionai.v1.GcsSource.getDefaultInstance()) { + getPredictionsSchemaBuilder().mergeFrom(value); + } else { + predictionsSchema_ = value; + } + } else { + predictionsSchemaBuilder_.mergeFrom(value); + } + if (predictionsSchema_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + /** + * + * + *
+       * Cloud Storage location to a YAML file that defines the format of a single
+       * prediction or explanation.
+       * 
+ * + * .google.cloud.visionai.v1.GcsSource predictions_schema = 3; + */ + public Builder clearPredictionsSchema() { + bitField0_ = (bitField0_ & ~0x00000004); + predictionsSchema_ = null; + if (predictionsSchemaBuilder_ != null) { + predictionsSchemaBuilder_.dispose(); + predictionsSchemaBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+       * Cloud Storage location to a YAML file that defines the format of a single
+       * prediction or explanation.
+       * 
+ * + * .google.cloud.visionai.v1.GcsSource predictions_schema = 3; + */ + public com.google.cloud.visionai.v1.GcsSource.Builder getPredictionsSchemaBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getPredictionsSchemaFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Cloud Storage location to a YAML file that defines the format of a single
+       * prediction or explanation.
+       * 
+ * + * .google.cloud.visionai.v1.GcsSource predictions_schema = 3; + */ + public com.google.cloud.visionai.v1.GcsSourceOrBuilder getPredictionsSchemaOrBuilder() { + if (predictionsSchemaBuilder_ != null) { + return predictionsSchemaBuilder_.getMessageOrBuilder(); + } else { + return predictionsSchema_ == null + ? com.google.cloud.visionai.v1.GcsSource.getDefaultInstance() + : predictionsSchema_; + } + } + /** + * + * + *
+       * Cloud Storage location to a YAML file that defines the format of a single
+       * prediction or explanation.
+       * 
+ * + * .google.cloud.visionai.v1.GcsSource predictions_schema = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.GcsSource, + com.google.cloud.visionai.v1.GcsSource.Builder, + com.google.cloud.visionai.v1.GcsSourceOrBuilder> + getPredictionsSchemaFieldBuilder() { + if (predictionsSchemaBuilder_ == null) { + predictionsSchemaBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.GcsSource, + com.google.cloud.visionai.v1.GcsSource.Builder, + com.google.cloud.visionai.v1.GcsSourceOrBuilder>( + getPredictionsSchema(), getParentForChildren(), isClean()); + predictionsSchema_ = null; + } + return predictionsSchemaBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.CustomProcessorSourceInfo.ModelSchema) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.CustomProcessorSourceInfo.ModelSchema) + private static final com.google.cloud.visionai.v1.CustomProcessorSourceInfo.ModelSchema + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.CustomProcessorSourceInfo.ModelSchema(); + } + + public static com.google.cloud.visionai.v1.CustomProcessorSourceInfo.ModelSchema + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ModelSchema parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.CustomProcessorSourceInfo.ModelSchema + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int bitField0_; + private int artifactPathCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object artifactPath_; + + public enum ArtifactPathCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + VERTEX_MODEL(2), + PRODUCT_RECOGNIZER_ARTIFACT(3), + ARTIFACTPATH_NOT_SET(0); + private final int value; + + private ArtifactPathCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static ArtifactPathCase valueOf(int value) { + return forNumber(value); + } + + public static ArtifactPathCase forNumber(int value) { + switch (value) { + case 2: + return VERTEX_MODEL; + case 3: + return PRODUCT_RECOGNIZER_ARTIFACT; + case 0: + return ARTIFACTPATH_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public ArtifactPathCase getArtifactPathCase() { + return ArtifactPathCase.forNumber(artifactPathCase_); + } + + public static final int VERTEX_MODEL_FIELD_NUMBER = 2; + /** + * + * + *
+   * The resource name original model hosted in the vertex AI platform.
+   * 
+ * + * string vertex_model = 2; + * + * @return Whether the vertexModel field is set. + */ + public boolean hasVertexModel() { + return artifactPathCase_ == 2; + } + /** + * + * + *
+   * The resource name original model hosted in the vertex AI platform.
+   * 
+ * + * string vertex_model = 2; + * + * @return The vertexModel. + */ + public java.lang.String getVertexModel() { + java.lang.Object ref = ""; + if (artifactPathCase_ == 2) { + ref = artifactPath_; + } + 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(); + if (artifactPathCase_ == 2) { + artifactPath_ = s; + } + return s; + } + } + /** + * + * + *
+   * The resource name original model hosted in the vertex AI platform.
+   * 
+ * + * string vertex_model = 2; + * + * @return The bytes for vertexModel. + */ + public com.google.protobuf.ByteString getVertexModelBytes() { + java.lang.Object ref = ""; + if (artifactPathCase_ == 2) { + ref = artifactPath_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (artifactPathCase_ == 2) { + artifactPath_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PRODUCT_RECOGNIZER_ARTIFACT_FIELD_NUMBER = 3; + /** + * + * + *
+   * Artifact for product recognizer.
+   * 
+ * + * + * .google.cloud.visionai.v1.CustomProcessorSourceInfo.ProductRecognizerArtifact product_recognizer_artifact = 3; + * + * + * @return Whether the productRecognizerArtifact field is set. + */ + @java.lang.Override + public boolean hasProductRecognizerArtifact() { + return artifactPathCase_ == 3; + } + /** + * + * + *
+   * Artifact for product recognizer.
+   * 
+ * + * + * .google.cloud.visionai.v1.CustomProcessorSourceInfo.ProductRecognizerArtifact product_recognizer_artifact = 3; + * + * + * @return The productRecognizerArtifact. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.CustomProcessorSourceInfo.ProductRecognizerArtifact + getProductRecognizerArtifact() { + if (artifactPathCase_ == 3) { + return (com.google.cloud.visionai.v1.CustomProcessorSourceInfo.ProductRecognizerArtifact) + artifactPath_; + } + return com.google.cloud.visionai.v1.CustomProcessorSourceInfo.ProductRecognizerArtifact + .getDefaultInstance(); + } + /** + * + * + *
+   * Artifact for product recognizer.
+   * 
+ * + * + * .google.cloud.visionai.v1.CustomProcessorSourceInfo.ProductRecognizerArtifact product_recognizer_artifact = 3; + * + */ + @java.lang.Override + public com.google.cloud.visionai.v1.CustomProcessorSourceInfo.ProductRecognizerArtifactOrBuilder + getProductRecognizerArtifactOrBuilder() { + if (artifactPathCase_ == 3) { + return (com.google.cloud.visionai.v1.CustomProcessorSourceInfo.ProductRecognizerArtifact) + artifactPath_; + } + return com.google.cloud.visionai.v1.CustomProcessorSourceInfo.ProductRecognizerArtifact + .getDefaultInstance(); + } + + public static final int SOURCE_TYPE_FIELD_NUMBER = 1; + private int sourceType_ = 0; + /** + * + * + *
+   * The original product which holds the custom processor's functionality.
+   * 
+ * + * .google.cloud.visionai.v1.CustomProcessorSourceInfo.SourceType source_type = 1; + * + * @return The enum numeric value on the wire for sourceType. + */ + @java.lang.Override + public int getSourceTypeValue() { + return sourceType_; + } + /** + * + * + *
+   * The original product which holds the custom processor's functionality.
+   * 
+ * + * .google.cloud.visionai.v1.CustomProcessorSourceInfo.SourceType source_type = 1; + * + * @return The sourceType. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.CustomProcessorSourceInfo.SourceType getSourceType() { + com.google.cloud.visionai.v1.CustomProcessorSourceInfo.SourceType result = + com.google.cloud.visionai.v1.CustomProcessorSourceInfo.SourceType.forNumber(sourceType_); + return result == null + ? com.google.cloud.visionai.v1.CustomProcessorSourceInfo.SourceType.UNRECOGNIZED + : result; + } + + public static final int ADDITIONAL_INFO_FIELD_NUMBER = 4; + + private static final class AdditionalInfoDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_CustomProcessorSourceInfo_AdditionalInfoEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + + @SuppressWarnings("serial") + private com.google.protobuf.MapField additionalInfo_; + + private com.google.protobuf.MapField + internalGetAdditionalInfo() { + if (additionalInfo_ == null) { + return com.google.protobuf.MapField.emptyMapField( + AdditionalInfoDefaultEntryHolder.defaultEntry); + } + return additionalInfo_; + } + + public int getAdditionalInfoCount() { + return internalGetAdditionalInfo().getMap().size(); + } + /** + * + * + *
+   * Output only. Additional info related to the imported custom processor.
+   * Data is filled in by app platform during the processor creation.
+   * 
+ * + * + * map<string, string> additional_info = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public boolean containsAdditionalInfo(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetAdditionalInfo().getMap().containsKey(key); + } + /** Use {@link #getAdditionalInfoMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getAdditionalInfo() { + return getAdditionalInfoMap(); + } + /** + * + * + *
+   * Output only. Additional info related to the imported custom processor.
+   * Data is filled in by app platform during the processor creation.
+   * 
+ * + * + * map<string, string> additional_info = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.util.Map getAdditionalInfoMap() { + return internalGetAdditionalInfo().getMap(); + } + /** + * + * + *
+   * Output only. Additional info related to the imported custom processor.
+   * Data is filled in by app platform during the processor creation.
+   * 
+ * + * + * map<string, string> additional_info = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public /* nullable */ java.lang.String getAdditionalInfoOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetAdditionalInfo().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+   * Output only. Additional info related to the imported custom processor.
+   * Data is filled in by app platform during the processor creation.
+   * 
+ * + * + * map<string, string> additional_info = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.lang.String getAdditionalInfoOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetAdditionalInfo().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int MODEL_SCHEMA_FIELD_NUMBER = 5; + private com.google.cloud.visionai.v1.CustomProcessorSourceInfo.ModelSchema modelSchema_; + /** + * + * + *
+   * Model schema files which specifies the signature of the model.
+   * For VERTEX_CUSTOM models, instances schema is required.
+   * If instances schema is not specified during the processor creation,
+   * VisionAI Platform will try to get it from Vertex, if it doesn't exist, the
+   * creation will fail.
+   * 
+ * + * .google.cloud.visionai.v1.CustomProcessorSourceInfo.ModelSchema model_schema = 5; + * + * @return Whether the modelSchema field is set. + */ + @java.lang.Override + public boolean hasModelSchema() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * Model schema files which specifies the signature of the model.
+   * For VERTEX_CUSTOM models, instances schema is required.
+   * If instances schema is not specified during the processor creation,
+   * VisionAI Platform will try to get it from Vertex, if it doesn't exist, the
+   * creation will fail.
+   * 
+ * + * .google.cloud.visionai.v1.CustomProcessorSourceInfo.ModelSchema model_schema = 5; + * + * @return The modelSchema. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.CustomProcessorSourceInfo.ModelSchema getModelSchema() { + return modelSchema_ == null + ? com.google.cloud.visionai.v1.CustomProcessorSourceInfo.ModelSchema.getDefaultInstance() + : modelSchema_; + } + /** + * + * + *
+   * Model schema files which specifies the signature of the model.
+   * For VERTEX_CUSTOM models, instances schema is required.
+   * If instances schema is not specified during the processor creation,
+   * VisionAI Platform will try to get it from Vertex, if it doesn't exist, the
+   * creation will fail.
+   * 
+ * + * .google.cloud.visionai.v1.CustomProcessorSourceInfo.ModelSchema model_schema = 5; + */ + @java.lang.Override + public com.google.cloud.visionai.v1.CustomProcessorSourceInfo.ModelSchemaOrBuilder + getModelSchemaOrBuilder() { + return modelSchema_ == null + ? com.google.cloud.visionai.v1.CustomProcessorSourceInfo.ModelSchema.getDefaultInstance() + : modelSchema_; + } + + 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 (sourceType_ + != com.google.cloud.visionai.v1.CustomProcessorSourceInfo.SourceType.SOURCE_TYPE_UNSPECIFIED + .getNumber()) { + output.writeEnum(1, sourceType_); + } + if (artifactPathCase_ == 2) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, artifactPath_); + } + if (artifactPathCase_ == 3) { + output.writeMessage( + 3, + (com.google.cloud.visionai.v1.CustomProcessorSourceInfo.ProductRecognizerArtifact) + artifactPath_); + } + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, internalGetAdditionalInfo(), AdditionalInfoDefaultEntryHolder.defaultEntry, 4); + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(5, getModelSchema()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (sourceType_ + != com.google.cloud.visionai.v1.CustomProcessorSourceInfo.SourceType.SOURCE_TYPE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, sourceType_); + } + if (artifactPathCase_ == 2) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, artifactPath_); + } + if (artifactPathCase_ == 3) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 3, + (com.google.cloud.visionai.v1.CustomProcessorSourceInfo.ProductRecognizerArtifact) + artifactPath_); + } + for (java.util.Map.Entry entry : + internalGetAdditionalInfo().getMap().entrySet()) { + com.google.protobuf.MapEntry additionalInfo__ = + AdditionalInfoDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, additionalInfo__); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getModelSchema()); + } + size += getUnknownFields().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.visionai.v1.CustomProcessorSourceInfo)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.CustomProcessorSourceInfo other = + (com.google.cloud.visionai.v1.CustomProcessorSourceInfo) obj; + + if (sourceType_ != other.sourceType_) return false; + if (!internalGetAdditionalInfo().equals(other.internalGetAdditionalInfo())) return false; + if (hasModelSchema() != other.hasModelSchema()) return false; + if (hasModelSchema()) { + if (!getModelSchema().equals(other.getModelSchema())) return false; + } + if (!getArtifactPathCase().equals(other.getArtifactPathCase())) return false; + switch (artifactPathCase_) { + case 2: + if (!getVertexModel().equals(other.getVertexModel())) return false; + break; + case 3: + if (!getProductRecognizerArtifact().equals(other.getProductRecognizerArtifact())) + return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + SOURCE_TYPE_FIELD_NUMBER; + hash = (53 * hash) + sourceType_; + if (!internalGetAdditionalInfo().getMap().isEmpty()) { + hash = (37 * hash) + ADDITIONAL_INFO_FIELD_NUMBER; + hash = (53 * hash) + internalGetAdditionalInfo().hashCode(); + } + if (hasModelSchema()) { + hash = (37 * hash) + MODEL_SCHEMA_FIELD_NUMBER; + hash = (53 * hash) + getModelSchema().hashCode(); + } + switch (artifactPathCase_) { + case 2: + hash = (37 * hash) + VERTEX_MODEL_FIELD_NUMBER; + hash = (53 * hash) + getVertexModel().hashCode(); + break; + case 3: + hash = (37 * hash) + PRODUCT_RECOGNIZER_ARTIFACT_FIELD_NUMBER; + hash = (53 * hash) + getProductRecognizerArtifact().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.CustomProcessorSourceInfo parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.CustomProcessorSourceInfo 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.visionai.v1.CustomProcessorSourceInfo parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.CustomProcessorSourceInfo 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.visionai.v1.CustomProcessorSourceInfo parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.CustomProcessorSourceInfo parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.CustomProcessorSourceInfo parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.CustomProcessorSourceInfo 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.visionai.v1.CustomProcessorSourceInfo parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.CustomProcessorSourceInfo 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.visionai.v1.CustomProcessorSourceInfo parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.CustomProcessorSourceInfo 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.visionai.v1.CustomProcessorSourceInfo 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; + } + /** + * + * + *
+   * Describes the source info for a custom processor.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.CustomProcessorSourceInfo} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.CustomProcessorSourceInfo) + com.google.cloud.visionai.v1.CustomProcessorSourceInfoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_CustomProcessorSourceInfo_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 4: + return internalGetAdditionalInfo(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( + int number) { + switch (number) { + case 4: + return internalGetMutableAdditionalInfo(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_CustomProcessorSourceInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.CustomProcessorSourceInfo.class, + com.google.cloud.visionai.v1.CustomProcessorSourceInfo.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.CustomProcessorSourceInfo.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getModelSchemaFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (productRecognizerArtifactBuilder_ != null) { + productRecognizerArtifactBuilder_.clear(); + } + sourceType_ = 0; + internalGetMutableAdditionalInfo().clear(); + modelSchema_ = null; + if (modelSchemaBuilder_ != null) { + modelSchemaBuilder_.dispose(); + modelSchemaBuilder_ = null; + } + artifactPathCase_ = 0; + artifactPath_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_CustomProcessorSourceInfo_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.CustomProcessorSourceInfo getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.CustomProcessorSourceInfo.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.CustomProcessorSourceInfo build() { + com.google.cloud.visionai.v1.CustomProcessorSourceInfo result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.CustomProcessorSourceInfo buildPartial() { + com.google.cloud.visionai.v1.CustomProcessorSourceInfo result = + new com.google.cloud.visionai.v1.CustomProcessorSourceInfo(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.visionai.v1.CustomProcessorSourceInfo result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.sourceType_ = sourceType_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.additionalInfo_ = internalGetAdditionalInfo(); + result.additionalInfo_.makeImmutable(); + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000010) != 0)) { + result.modelSchema_ = + modelSchemaBuilder_ == null ? modelSchema_ : modelSchemaBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + private void buildPartialOneofs(com.google.cloud.visionai.v1.CustomProcessorSourceInfo result) { + result.artifactPathCase_ = artifactPathCase_; + result.artifactPath_ = this.artifactPath_; + if (artifactPathCase_ == 3 && productRecognizerArtifactBuilder_ != null) { + result.artifactPath_ = productRecognizerArtifactBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.CustomProcessorSourceInfo) { + return mergeFrom((com.google.cloud.visionai.v1.CustomProcessorSourceInfo) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.CustomProcessorSourceInfo other) { + if (other == com.google.cloud.visionai.v1.CustomProcessorSourceInfo.getDefaultInstance()) + return this; + if (other.sourceType_ != 0) { + setSourceTypeValue(other.getSourceTypeValue()); + } + internalGetMutableAdditionalInfo().mergeFrom(other.internalGetAdditionalInfo()); + bitField0_ |= 0x00000008; + if (other.hasModelSchema()) { + mergeModelSchema(other.getModelSchema()); + } + switch (other.getArtifactPathCase()) { + case VERTEX_MODEL: + { + artifactPathCase_ = 2; + artifactPath_ = other.artifactPath_; + onChanged(); + break; + } + case PRODUCT_RECOGNIZER_ARTIFACT: + { + mergeProductRecognizerArtifact(other.getProductRecognizerArtifact()); + break; + } + case ARTIFACTPATH_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + sourceType_ = input.readEnum(); + bitField0_ |= 0x00000004; + break; + } // case 8 + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + artifactPathCase_ = 2; + artifactPath_ = s; + break; + } // case 18 + case 26: + { + input.readMessage( + getProductRecognizerArtifactFieldBuilder().getBuilder(), extensionRegistry); + artifactPathCase_ = 3; + break; + } // case 26 + case 34: + { + com.google.protobuf.MapEntry additionalInfo__ = + input.readMessage( + AdditionalInfoDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableAdditionalInfo() + .getMutableMap() + .put(additionalInfo__.getKey(), additionalInfo__.getValue()); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + input.readMessage(getModelSchemaFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000010; + break; + } // case 42 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int artifactPathCase_ = 0; + private java.lang.Object artifactPath_; + + public ArtifactPathCase getArtifactPathCase() { + return ArtifactPathCase.forNumber(artifactPathCase_); + } + + public Builder clearArtifactPath() { + artifactPathCase_ = 0; + artifactPath_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + /** + * + * + *
+     * The resource name original model hosted in the vertex AI platform.
+     * 
+ * + * string vertex_model = 2; + * + * @return Whether the vertexModel field is set. + */ + @java.lang.Override + public boolean hasVertexModel() { + return artifactPathCase_ == 2; + } + /** + * + * + *
+     * The resource name original model hosted in the vertex AI platform.
+     * 
+ * + * string vertex_model = 2; + * + * @return The vertexModel. + */ + @java.lang.Override + public java.lang.String getVertexModel() { + java.lang.Object ref = ""; + if (artifactPathCase_ == 2) { + ref = artifactPath_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (artifactPathCase_ == 2) { + artifactPath_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The resource name original model hosted in the vertex AI platform.
+     * 
+ * + * string vertex_model = 2; + * + * @return The bytes for vertexModel. + */ + @java.lang.Override + public com.google.protobuf.ByteString getVertexModelBytes() { + java.lang.Object ref = ""; + if (artifactPathCase_ == 2) { + ref = artifactPath_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (artifactPathCase_ == 2) { + artifactPath_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The resource name original model hosted in the vertex AI platform.
+     * 
+ * + * string vertex_model = 2; + * + * @param value The vertexModel to set. + * @return This builder for chaining. + */ + public Builder setVertexModel(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + artifactPathCase_ = 2; + artifactPath_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The resource name original model hosted in the vertex AI platform.
+     * 
+ * + * string vertex_model = 2; + * + * @return This builder for chaining. + */ + public Builder clearVertexModel() { + if (artifactPathCase_ == 2) { + artifactPathCase_ = 0; + artifactPath_ = null; + onChanged(); + } + return this; + } + /** + * + * + *
+     * The resource name original model hosted in the vertex AI platform.
+     * 
+ * + * string vertex_model = 2; + * + * @param value The bytes for vertexModel to set. + * @return This builder for chaining. + */ + public Builder setVertexModelBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + artifactPathCase_ = 2; + artifactPath_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.CustomProcessorSourceInfo.ProductRecognizerArtifact, + com.google.cloud.visionai.v1.CustomProcessorSourceInfo.ProductRecognizerArtifact + .Builder, + com.google.cloud.visionai.v1.CustomProcessorSourceInfo + .ProductRecognizerArtifactOrBuilder> + productRecognizerArtifactBuilder_; + /** + * + * + *
+     * Artifact for product recognizer.
+     * 
+ * + * + * .google.cloud.visionai.v1.CustomProcessorSourceInfo.ProductRecognizerArtifact product_recognizer_artifact = 3; + * + * + * @return Whether the productRecognizerArtifact field is set. + */ + @java.lang.Override + public boolean hasProductRecognizerArtifact() { + return artifactPathCase_ == 3; + } + /** + * + * + *
+     * Artifact for product recognizer.
+     * 
+ * + * + * .google.cloud.visionai.v1.CustomProcessorSourceInfo.ProductRecognizerArtifact product_recognizer_artifact = 3; + * + * + * @return The productRecognizerArtifact. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.CustomProcessorSourceInfo.ProductRecognizerArtifact + getProductRecognizerArtifact() { + if (productRecognizerArtifactBuilder_ == null) { + if (artifactPathCase_ == 3) { + return (com.google.cloud.visionai.v1.CustomProcessorSourceInfo.ProductRecognizerArtifact) + artifactPath_; + } + return com.google.cloud.visionai.v1.CustomProcessorSourceInfo.ProductRecognizerArtifact + .getDefaultInstance(); + } else { + if (artifactPathCase_ == 3) { + return productRecognizerArtifactBuilder_.getMessage(); + } + return com.google.cloud.visionai.v1.CustomProcessorSourceInfo.ProductRecognizerArtifact + .getDefaultInstance(); + } + } + /** + * + * + *
+     * Artifact for product recognizer.
+     * 
+ * + * + * .google.cloud.visionai.v1.CustomProcessorSourceInfo.ProductRecognizerArtifact product_recognizer_artifact = 3; + * + */ + public Builder setProductRecognizerArtifact( + com.google.cloud.visionai.v1.CustomProcessorSourceInfo.ProductRecognizerArtifact value) { + if (productRecognizerArtifactBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + artifactPath_ = value; + onChanged(); + } else { + productRecognizerArtifactBuilder_.setMessage(value); + } + artifactPathCase_ = 3; + return this; + } + /** + * + * + *
+     * Artifact for product recognizer.
+     * 
+ * + * + * .google.cloud.visionai.v1.CustomProcessorSourceInfo.ProductRecognizerArtifact product_recognizer_artifact = 3; + * + */ + public Builder setProductRecognizerArtifact( + com.google.cloud.visionai.v1.CustomProcessorSourceInfo.ProductRecognizerArtifact.Builder + builderForValue) { + if (productRecognizerArtifactBuilder_ == null) { + artifactPath_ = builderForValue.build(); + onChanged(); + } else { + productRecognizerArtifactBuilder_.setMessage(builderForValue.build()); + } + artifactPathCase_ = 3; + return this; + } + /** + * + * + *
+     * Artifact for product recognizer.
+     * 
+ * + * + * .google.cloud.visionai.v1.CustomProcessorSourceInfo.ProductRecognizerArtifact product_recognizer_artifact = 3; + * + */ + public Builder mergeProductRecognizerArtifact( + com.google.cloud.visionai.v1.CustomProcessorSourceInfo.ProductRecognizerArtifact value) { + if (productRecognizerArtifactBuilder_ == null) { + if (artifactPathCase_ == 3 + && artifactPath_ + != com.google.cloud.visionai.v1.CustomProcessorSourceInfo.ProductRecognizerArtifact + .getDefaultInstance()) { + artifactPath_ = + com.google.cloud.visionai.v1.CustomProcessorSourceInfo.ProductRecognizerArtifact + .newBuilder( + (com.google.cloud.visionai.v1.CustomProcessorSourceInfo + .ProductRecognizerArtifact) + artifactPath_) + .mergeFrom(value) + .buildPartial(); + } else { + artifactPath_ = value; + } + onChanged(); + } else { + if (artifactPathCase_ == 3) { + productRecognizerArtifactBuilder_.mergeFrom(value); + } else { + productRecognizerArtifactBuilder_.setMessage(value); + } + } + artifactPathCase_ = 3; + return this; + } + /** + * + * + *
+     * Artifact for product recognizer.
+     * 
+ * + * + * .google.cloud.visionai.v1.CustomProcessorSourceInfo.ProductRecognizerArtifact product_recognizer_artifact = 3; + * + */ + public Builder clearProductRecognizerArtifact() { + if (productRecognizerArtifactBuilder_ == null) { + if (artifactPathCase_ == 3) { + artifactPathCase_ = 0; + artifactPath_ = null; + onChanged(); + } + } else { + if (artifactPathCase_ == 3) { + artifactPathCase_ = 0; + artifactPath_ = null; + } + productRecognizerArtifactBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Artifact for product recognizer.
+     * 
+ * + * + * .google.cloud.visionai.v1.CustomProcessorSourceInfo.ProductRecognizerArtifact product_recognizer_artifact = 3; + * + */ + public com.google.cloud.visionai.v1.CustomProcessorSourceInfo.ProductRecognizerArtifact.Builder + getProductRecognizerArtifactBuilder() { + return getProductRecognizerArtifactFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Artifact for product recognizer.
+     * 
+ * + * + * .google.cloud.visionai.v1.CustomProcessorSourceInfo.ProductRecognizerArtifact product_recognizer_artifact = 3; + * + */ + @java.lang.Override + public com.google.cloud.visionai.v1.CustomProcessorSourceInfo.ProductRecognizerArtifactOrBuilder + getProductRecognizerArtifactOrBuilder() { + if ((artifactPathCase_ == 3) && (productRecognizerArtifactBuilder_ != null)) { + return productRecognizerArtifactBuilder_.getMessageOrBuilder(); + } else { + if (artifactPathCase_ == 3) { + return (com.google.cloud.visionai.v1.CustomProcessorSourceInfo.ProductRecognizerArtifact) + artifactPath_; + } + return com.google.cloud.visionai.v1.CustomProcessorSourceInfo.ProductRecognizerArtifact + .getDefaultInstance(); + } + } + /** + * + * + *
+     * Artifact for product recognizer.
+     * 
+ * + * + * .google.cloud.visionai.v1.CustomProcessorSourceInfo.ProductRecognizerArtifact product_recognizer_artifact = 3; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.CustomProcessorSourceInfo.ProductRecognizerArtifact, + com.google.cloud.visionai.v1.CustomProcessorSourceInfo.ProductRecognizerArtifact + .Builder, + com.google.cloud.visionai.v1.CustomProcessorSourceInfo + .ProductRecognizerArtifactOrBuilder> + getProductRecognizerArtifactFieldBuilder() { + if (productRecognizerArtifactBuilder_ == null) { + if (!(artifactPathCase_ == 3)) { + artifactPath_ = + com.google.cloud.visionai.v1.CustomProcessorSourceInfo.ProductRecognizerArtifact + .getDefaultInstance(); + } + productRecognizerArtifactBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.CustomProcessorSourceInfo.ProductRecognizerArtifact, + com.google.cloud.visionai.v1.CustomProcessorSourceInfo.ProductRecognizerArtifact + .Builder, + com.google.cloud.visionai.v1.CustomProcessorSourceInfo + .ProductRecognizerArtifactOrBuilder>( + (com.google.cloud.visionai.v1.CustomProcessorSourceInfo.ProductRecognizerArtifact) + artifactPath_, + getParentForChildren(), + isClean()); + artifactPath_ = null; + } + artifactPathCase_ = 3; + onChanged(); + return productRecognizerArtifactBuilder_; + } + + private int sourceType_ = 0; + /** + * + * + *
+     * The original product which holds the custom processor's functionality.
+     * 
+ * + * .google.cloud.visionai.v1.CustomProcessorSourceInfo.SourceType source_type = 1; + * + * @return The enum numeric value on the wire for sourceType. + */ + @java.lang.Override + public int getSourceTypeValue() { + return sourceType_; + } + /** + * + * + *
+     * The original product which holds the custom processor's functionality.
+     * 
+ * + * .google.cloud.visionai.v1.CustomProcessorSourceInfo.SourceType source_type = 1; + * + * @param value The enum numeric value on the wire for sourceType to set. + * @return This builder for chaining. + */ + public Builder setSourceTypeValue(int value) { + sourceType_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * The original product which holds the custom processor's functionality.
+     * 
+ * + * .google.cloud.visionai.v1.CustomProcessorSourceInfo.SourceType source_type = 1; + * + * @return The sourceType. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.CustomProcessorSourceInfo.SourceType getSourceType() { + com.google.cloud.visionai.v1.CustomProcessorSourceInfo.SourceType result = + com.google.cloud.visionai.v1.CustomProcessorSourceInfo.SourceType.forNumber(sourceType_); + return result == null + ? com.google.cloud.visionai.v1.CustomProcessorSourceInfo.SourceType.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * The original product which holds the custom processor's functionality.
+     * 
+ * + * .google.cloud.visionai.v1.CustomProcessorSourceInfo.SourceType source_type = 1; + * + * @param value The sourceType to set. + * @return This builder for chaining. + */ + public Builder setSourceType( + com.google.cloud.visionai.v1.CustomProcessorSourceInfo.SourceType value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000004; + sourceType_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * The original product which holds the custom processor's functionality.
+     * 
+ * + * .google.cloud.visionai.v1.CustomProcessorSourceInfo.SourceType source_type = 1; + * + * @return This builder for chaining. + */ + public Builder clearSourceType() { + bitField0_ = (bitField0_ & ~0x00000004); + sourceType_ = 0; + onChanged(); + return this; + } + + private com.google.protobuf.MapField additionalInfo_; + + private com.google.protobuf.MapField + internalGetAdditionalInfo() { + if (additionalInfo_ == null) { + return com.google.protobuf.MapField.emptyMapField( + AdditionalInfoDefaultEntryHolder.defaultEntry); + } + return additionalInfo_; + } + + private com.google.protobuf.MapField + internalGetMutableAdditionalInfo() { + if (additionalInfo_ == null) { + additionalInfo_ = + com.google.protobuf.MapField.newMapField(AdditionalInfoDefaultEntryHolder.defaultEntry); + } + if (!additionalInfo_.isMutable()) { + additionalInfo_ = additionalInfo_.copy(); + } + bitField0_ |= 0x00000008; + onChanged(); + return additionalInfo_; + } + + public int getAdditionalInfoCount() { + return internalGetAdditionalInfo().getMap().size(); + } + /** + * + * + *
+     * Output only. Additional info related to the imported custom processor.
+     * Data is filled in by app platform during the processor creation.
+     * 
+ * + * + * map<string, string> additional_info = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public boolean containsAdditionalInfo(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetAdditionalInfo().getMap().containsKey(key); + } + /** Use {@link #getAdditionalInfoMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getAdditionalInfo() { + return getAdditionalInfoMap(); + } + /** + * + * + *
+     * Output only. Additional info related to the imported custom processor.
+     * Data is filled in by app platform during the processor creation.
+     * 
+ * + * + * map<string, string> additional_info = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.util.Map getAdditionalInfoMap() { + return internalGetAdditionalInfo().getMap(); + } + /** + * + * + *
+     * Output only. Additional info related to the imported custom processor.
+     * Data is filled in by app platform during the processor creation.
+     * 
+ * + * + * map<string, string> additional_info = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public /* nullable */ java.lang.String getAdditionalInfoOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetAdditionalInfo().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+     * Output only. Additional info related to the imported custom processor.
+     * Data is filled in by app platform during the processor creation.
+     * 
+ * + * + * map<string, string> additional_info = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.lang.String getAdditionalInfoOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetAdditionalInfo().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearAdditionalInfo() { + bitField0_ = (bitField0_ & ~0x00000008); + internalGetMutableAdditionalInfo().getMutableMap().clear(); + return this; + } + /** + * + * + *
+     * Output only. Additional info related to the imported custom processor.
+     * Data is filled in by app platform during the processor creation.
+     * 
+ * + * + * map<string, string> additional_info = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder removeAdditionalInfo(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + internalGetMutableAdditionalInfo().getMutableMap().remove(key); + return this; + } + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableAdditionalInfo() { + bitField0_ |= 0x00000008; + return internalGetMutableAdditionalInfo().getMutableMap(); + } + /** + * + * + *
+     * Output only. Additional info related to the imported custom processor.
+     * Data is filled in by app platform during the processor creation.
+     * 
+ * + * + * map<string, string> additional_info = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder putAdditionalInfo(java.lang.String key, java.lang.String value) { + if (key == null) { + throw new NullPointerException("map key"); + } + if (value == null) { + throw new NullPointerException("map value"); + } + internalGetMutableAdditionalInfo().getMutableMap().put(key, value); + bitField0_ |= 0x00000008; + return this; + } + /** + * + * + *
+     * Output only. Additional info related to the imported custom processor.
+     * Data is filled in by app platform during the processor creation.
+     * 
+ * + * + * map<string, string> additional_info = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder putAllAdditionalInfo(java.util.Map values) { + internalGetMutableAdditionalInfo().getMutableMap().putAll(values); + bitField0_ |= 0x00000008; + return this; + } + + private com.google.cloud.visionai.v1.CustomProcessorSourceInfo.ModelSchema modelSchema_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.CustomProcessorSourceInfo.ModelSchema, + com.google.cloud.visionai.v1.CustomProcessorSourceInfo.ModelSchema.Builder, + com.google.cloud.visionai.v1.CustomProcessorSourceInfo.ModelSchemaOrBuilder> + modelSchemaBuilder_; + /** + * + * + *
+     * Model schema files which specifies the signature of the model.
+     * For VERTEX_CUSTOM models, instances schema is required.
+     * If instances schema is not specified during the processor creation,
+     * VisionAI Platform will try to get it from Vertex, if it doesn't exist, the
+     * creation will fail.
+     * 
+ * + * .google.cloud.visionai.v1.CustomProcessorSourceInfo.ModelSchema model_schema = 5; + * + * + * @return Whether the modelSchema field is set. + */ + public boolean hasModelSchema() { + return ((bitField0_ & 0x00000010) != 0); + } + /** + * + * + *
+     * Model schema files which specifies the signature of the model.
+     * For VERTEX_CUSTOM models, instances schema is required.
+     * If instances schema is not specified during the processor creation,
+     * VisionAI Platform will try to get it from Vertex, if it doesn't exist, the
+     * creation will fail.
+     * 
+ * + * .google.cloud.visionai.v1.CustomProcessorSourceInfo.ModelSchema model_schema = 5; + * + * + * @return The modelSchema. + */ + public com.google.cloud.visionai.v1.CustomProcessorSourceInfo.ModelSchema getModelSchema() { + if (modelSchemaBuilder_ == null) { + return modelSchema_ == null + ? com.google.cloud.visionai.v1.CustomProcessorSourceInfo.ModelSchema + .getDefaultInstance() + : modelSchema_; + } else { + return modelSchemaBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Model schema files which specifies the signature of the model.
+     * For VERTEX_CUSTOM models, instances schema is required.
+     * If instances schema is not specified during the processor creation,
+     * VisionAI Platform will try to get it from Vertex, if it doesn't exist, the
+     * creation will fail.
+     * 
+ * + * .google.cloud.visionai.v1.CustomProcessorSourceInfo.ModelSchema model_schema = 5; + * + */ + public Builder setModelSchema( + com.google.cloud.visionai.v1.CustomProcessorSourceInfo.ModelSchema value) { + if (modelSchemaBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + modelSchema_ = value; + } else { + modelSchemaBuilder_.setMessage(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Model schema files which specifies the signature of the model.
+     * For VERTEX_CUSTOM models, instances schema is required.
+     * If instances schema is not specified during the processor creation,
+     * VisionAI Platform will try to get it from Vertex, if it doesn't exist, the
+     * creation will fail.
+     * 
+ * + * .google.cloud.visionai.v1.CustomProcessorSourceInfo.ModelSchema model_schema = 5; + * + */ + public Builder setModelSchema( + com.google.cloud.visionai.v1.CustomProcessorSourceInfo.ModelSchema.Builder + builderForValue) { + if (modelSchemaBuilder_ == null) { + modelSchema_ = builderForValue.build(); + } else { + modelSchemaBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Model schema files which specifies the signature of the model.
+     * For VERTEX_CUSTOM models, instances schema is required.
+     * If instances schema is not specified during the processor creation,
+     * VisionAI Platform will try to get it from Vertex, if it doesn't exist, the
+     * creation will fail.
+     * 
+ * + * .google.cloud.visionai.v1.CustomProcessorSourceInfo.ModelSchema model_schema = 5; + * + */ + public Builder mergeModelSchema( + com.google.cloud.visionai.v1.CustomProcessorSourceInfo.ModelSchema value) { + if (modelSchemaBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0) + && modelSchema_ != null + && modelSchema_ + != com.google.cloud.visionai.v1.CustomProcessorSourceInfo.ModelSchema + .getDefaultInstance()) { + getModelSchemaBuilder().mergeFrom(value); + } else { + modelSchema_ = value; + } + } else { + modelSchemaBuilder_.mergeFrom(value); + } + if (modelSchema_ != null) { + bitField0_ |= 0x00000010; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Model schema files which specifies the signature of the model.
+     * For VERTEX_CUSTOM models, instances schema is required.
+     * If instances schema is not specified during the processor creation,
+     * VisionAI Platform will try to get it from Vertex, if it doesn't exist, the
+     * creation will fail.
+     * 
+ * + * .google.cloud.visionai.v1.CustomProcessorSourceInfo.ModelSchema model_schema = 5; + * + */ + public Builder clearModelSchema() { + bitField0_ = (bitField0_ & ~0x00000010); + modelSchema_ = null; + if (modelSchemaBuilder_ != null) { + modelSchemaBuilder_.dispose(); + modelSchemaBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Model schema files which specifies the signature of the model.
+     * For VERTEX_CUSTOM models, instances schema is required.
+     * If instances schema is not specified during the processor creation,
+     * VisionAI Platform will try to get it from Vertex, if it doesn't exist, the
+     * creation will fail.
+     * 
+ * + * .google.cloud.visionai.v1.CustomProcessorSourceInfo.ModelSchema model_schema = 5; + * + */ + public com.google.cloud.visionai.v1.CustomProcessorSourceInfo.ModelSchema.Builder + getModelSchemaBuilder() { + bitField0_ |= 0x00000010; + onChanged(); + return getModelSchemaFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Model schema files which specifies the signature of the model.
+     * For VERTEX_CUSTOM models, instances schema is required.
+     * If instances schema is not specified during the processor creation,
+     * VisionAI Platform will try to get it from Vertex, if it doesn't exist, the
+     * creation will fail.
+     * 
+ * + * .google.cloud.visionai.v1.CustomProcessorSourceInfo.ModelSchema model_schema = 5; + * + */ + public com.google.cloud.visionai.v1.CustomProcessorSourceInfo.ModelSchemaOrBuilder + getModelSchemaOrBuilder() { + if (modelSchemaBuilder_ != null) { + return modelSchemaBuilder_.getMessageOrBuilder(); + } else { + return modelSchema_ == null + ? com.google.cloud.visionai.v1.CustomProcessorSourceInfo.ModelSchema + .getDefaultInstance() + : modelSchema_; + } + } + /** + * + * + *
+     * Model schema files which specifies the signature of the model.
+     * For VERTEX_CUSTOM models, instances schema is required.
+     * If instances schema is not specified during the processor creation,
+     * VisionAI Platform will try to get it from Vertex, if it doesn't exist, the
+     * creation will fail.
+     * 
+ * + * .google.cloud.visionai.v1.CustomProcessorSourceInfo.ModelSchema model_schema = 5; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.CustomProcessorSourceInfo.ModelSchema, + com.google.cloud.visionai.v1.CustomProcessorSourceInfo.ModelSchema.Builder, + com.google.cloud.visionai.v1.CustomProcessorSourceInfo.ModelSchemaOrBuilder> + getModelSchemaFieldBuilder() { + if (modelSchemaBuilder_ == null) { + modelSchemaBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.CustomProcessorSourceInfo.ModelSchema, + com.google.cloud.visionai.v1.CustomProcessorSourceInfo.ModelSchema.Builder, + com.google.cloud.visionai.v1.CustomProcessorSourceInfo.ModelSchemaOrBuilder>( + getModelSchema(), getParentForChildren(), isClean()); + modelSchema_ = null; + } + return modelSchemaBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.CustomProcessorSourceInfo) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.CustomProcessorSourceInfo) + private static final com.google.cloud.visionai.v1.CustomProcessorSourceInfo DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.CustomProcessorSourceInfo(); + } + + public static com.google.cloud.visionai.v1.CustomProcessorSourceInfo getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CustomProcessorSourceInfo parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.CustomProcessorSourceInfo getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/CustomProcessorSourceInfoOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/CustomProcessorSourceInfoOrBuilder.java new file mode 100644 index 000000000000..955831f385dc --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/CustomProcessorSourceInfoOrBuilder.java @@ -0,0 +1,254 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/platform.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface CustomProcessorSourceInfoOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.CustomProcessorSourceInfo) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The resource name original model hosted in the vertex AI platform.
+   * 
+ * + * string vertex_model = 2; + * + * @return Whether the vertexModel field is set. + */ + boolean hasVertexModel(); + /** + * + * + *
+   * The resource name original model hosted in the vertex AI platform.
+   * 
+ * + * string vertex_model = 2; + * + * @return The vertexModel. + */ + java.lang.String getVertexModel(); + /** + * + * + *
+   * The resource name original model hosted in the vertex AI platform.
+   * 
+ * + * string vertex_model = 2; + * + * @return The bytes for vertexModel. + */ + com.google.protobuf.ByteString getVertexModelBytes(); + + /** + * + * + *
+   * Artifact for product recognizer.
+   * 
+ * + * + * .google.cloud.visionai.v1.CustomProcessorSourceInfo.ProductRecognizerArtifact product_recognizer_artifact = 3; + * + * + * @return Whether the productRecognizerArtifact field is set. + */ + boolean hasProductRecognizerArtifact(); + /** + * + * + *
+   * Artifact for product recognizer.
+   * 
+ * + * + * .google.cloud.visionai.v1.CustomProcessorSourceInfo.ProductRecognizerArtifact product_recognizer_artifact = 3; + * + * + * @return The productRecognizerArtifact. + */ + com.google.cloud.visionai.v1.CustomProcessorSourceInfo.ProductRecognizerArtifact + getProductRecognizerArtifact(); + /** + * + * + *
+   * Artifact for product recognizer.
+   * 
+ * + * + * .google.cloud.visionai.v1.CustomProcessorSourceInfo.ProductRecognizerArtifact product_recognizer_artifact = 3; + * + */ + com.google.cloud.visionai.v1.CustomProcessorSourceInfo.ProductRecognizerArtifactOrBuilder + getProductRecognizerArtifactOrBuilder(); + + /** + * + * + *
+   * The original product which holds the custom processor's functionality.
+   * 
+ * + * .google.cloud.visionai.v1.CustomProcessorSourceInfo.SourceType source_type = 1; + * + * @return The enum numeric value on the wire for sourceType. + */ + int getSourceTypeValue(); + /** + * + * + *
+   * The original product which holds the custom processor's functionality.
+   * 
+ * + * .google.cloud.visionai.v1.CustomProcessorSourceInfo.SourceType source_type = 1; + * + * @return The sourceType. + */ + com.google.cloud.visionai.v1.CustomProcessorSourceInfo.SourceType getSourceType(); + + /** + * + * + *
+   * Output only. Additional info related to the imported custom processor.
+   * Data is filled in by app platform during the processor creation.
+   * 
+ * + * + * map<string, string> additional_info = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + int getAdditionalInfoCount(); + /** + * + * + *
+   * Output only. Additional info related to the imported custom processor.
+   * Data is filled in by app platform during the processor creation.
+   * 
+ * + * + * map<string, string> additional_info = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + boolean containsAdditionalInfo(java.lang.String key); + /** Use {@link #getAdditionalInfoMap()} instead. */ + @java.lang.Deprecated + java.util.Map getAdditionalInfo(); + /** + * + * + *
+   * Output only. Additional info related to the imported custom processor.
+   * Data is filled in by app platform during the processor creation.
+   * 
+ * + * + * map<string, string> additional_info = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + java.util.Map getAdditionalInfoMap(); + /** + * + * + *
+   * Output only. Additional info related to the imported custom processor.
+   * Data is filled in by app platform during the processor creation.
+   * 
+ * + * + * map<string, string> additional_info = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + /* nullable */ + java.lang.String getAdditionalInfoOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue); + /** + * + * + *
+   * Output only. Additional info related to the imported custom processor.
+   * Data is filled in by app platform during the processor creation.
+   * 
+ * + * + * map<string, string> additional_info = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + java.lang.String getAdditionalInfoOrThrow(java.lang.String key); + + /** + * + * + *
+   * Model schema files which specifies the signature of the model.
+   * For VERTEX_CUSTOM models, instances schema is required.
+   * If instances schema is not specified during the processor creation,
+   * VisionAI Platform will try to get it from Vertex, if it doesn't exist, the
+   * creation will fail.
+   * 
+ * + * .google.cloud.visionai.v1.CustomProcessorSourceInfo.ModelSchema model_schema = 5; + * + * @return Whether the modelSchema field is set. + */ + boolean hasModelSchema(); + /** + * + * + *
+   * Model schema files which specifies the signature of the model.
+   * For VERTEX_CUSTOM models, instances schema is required.
+   * If instances schema is not specified during the processor creation,
+   * VisionAI Platform will try to get it from Vertex, if it doesn't exist, the
+   * creation will fail.
+   * 
+ * + * .google.cloud.visionai.v1.CustomProcessorSourceInfo.ModelSchema model_schema = 5; + * + * @return The modelSchema. + */ + com.google.cloud.visionai.v1.CustomProcessorSourceInfo.ModelSchema getModelSchema(); + /** + * + * + *
+   * Model schema files which specifies the signature of the model.
+   * For VERTEX_CUSTOM models, instances schema is required.
+   * If instances schema is not specified during the processor creation,
+   * VisionAI Platform will try to get it from Vertex, if it doesn't exist, the
+   * creation will fail.
+   * 
+ * + * .google.cloud.visionai.v1.CustomProcessorSourceInfo.ModelSchema model_schema = 5; + */ + com.google.cloud.visionai.v1.CustomProcessorSourceInfo.ModelSchemaOrBuilder + getModelSchemaOrBuilder(); + + com.google.cloud.visionai.v1.CustomProcessorSourceInfo.ArtifactPathCase getArtifactPathCase(); +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DataSchema.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DataSchema.java new file mode 100644 index 000000000000..9cc442aa795a --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DataSchema.java @@ -0,0 +1,1124 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/warehouse.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * Data schema indicates how the user specified annotation is interpreted in the
+ * system.
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.DataSchema} + */ +public final class DataSchema extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.DataSchema) + DataSchemaOrBuilder { + private static final long serialVersionUID = 0L; + // Use DataSchema.newBuilder() to construct. + private DataSchema(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DataSchema() { + name_ = ""; + key_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DataSchema(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_DataSchema_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_DataSchema_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.DataSchema.class, + com.google.cloud.visionai.v1.DataSchema.Builder.class); + } + + private int bitField0_; + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Resource name of the data schema in the form of:
+   * `projects/{project_number}/locations/{location}/corpora/{corpus}/dataSchemas/{data_schema}`
+   * where {data_schema} part should be the same as the `key` field below.
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + 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(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Resource name of the data schema in the form of:
+   * `projects/{project_number}/locations/{location}/corpora/{corpus}/dataSchemas/{data_schema}`
+   * where {data_schema} part should be the same as the `key` field below.
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int KEY_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object key_ = ""; + /** + * + * + *
+   * Required. The key of this data schema. This key should be matching the key
+   * of user specified annotation and unique inside corpus. This value can be up
+   * to 63 characters, and valid characters are /[a-z][0-9]-/. The first
+   * character must be a letter, the last could be a letter or a number.
+   * 
+ * + * string key = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The key. + */ + @java.lang.Override + public java.lang.String getKey() { + java.lang.Object ref = key_; + 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(); + key_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The key of this data schema. This key should be matching the key
+   * of user specified annotation and unique inside corpus. This value can be up
+   * to 63 characters, and valid characters are /[a-z][0-9]-/. The first
+   * character must be a letter, the last could be a letter or a number.
+   * 
+ * + * string key = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for key. + */ + @java.lang.Override + public com.google.protobuf.ByteString getKeyBytes() { + java.lang.Object ref = key_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + key_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SCHEMA_DETAILS_FIELD_NUMBER = 3; + private com.google.cloud.visionai.v1.DataSchemaDetails schemaDetails_; + /** + * + * + *
+   * The schema details mapping to the key.
+   * 
+ * + * .google.cloud.visionai.v1.DataSchemaDetails schema_details = 3; + * + * @return Whether the schemaDetails field is set. + */ + @java.lang.Override + public boolean hasSchemaDetails() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * The schema details mapping to the key.
+   * 
+ * + * .google.cloud.visionai.v1.DataSchemaDetails schema_details = 3; + * + * @return The schemaDetails. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.DataSchemaDetails getSchemaDetails() { + return schemaDetails_ == null + ? com.google.cloud.visionai.v1.DataSchemaDetails.getDefaultInstance() + : schemaDetails_; + } + /** + * + * + *
+   * The schema details mapping to the key.
+   * 
+ * + * .google.cloud.visionai.v1.DataSchemaDetails schema_details = 3; + */ + @java.lang.Override + public com.google.cloud.visionai.v1.DataSchemaDetailsOrBuilder getSchemaDetailsOrBuilder() { + return schemaDetails_ == null + ? com.google.cloud.visionai.v1.DataSchemaDetails.getDefaultInstance() + : schemaDetails_; + } + + 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(key_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, key_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(3, getSchemaDetails()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(key_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, key_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getSchemaDetails()); + } + size += getUnknownFields().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.visionai.v1.DataSchema)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.DataSchema other = (com.google.cloud.visionai.v1.DataSchema) obj; + + if (!getName().equals(other.getName())) return false; + if (!getKey().equals(other.getKey())) return false; + if (hasSchemaDetails() != other.hasSchemaDetails()) return false; + if (hasSchemaDetails()) { + if (!getSchemaDetails().equals(other.getSchemaDetails())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + KEY_FIELD_NUMBER; + hash = (53 * hash) + getKey().hashCode(); + if (hasSchemaDetails()) { + hash = (37 * hash) + SCHEMA_DETAILS_FIELD_NUMBER; + hash = (53 * hash) + getSchemaDetails().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.DataSchema parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.DataSchema 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.visionai.v1.DataSchema parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.DataSchema 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.visionai.v1.DataSchema parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.DataSchema parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.DataSchema parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.DataSchema 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.visionai.v1.DataSchema parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.DataSchema 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.visionai.v1.DataSchema parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.DataSchema 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.visionai.v1.DataSchema 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; + } + /** + * + * + *
+   * Data schema indicates how the user specified annotation is interpreted in the
+   * system.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.DataSchema} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.DataSchema) + com.google.cloud.visionai.v1.DataSchemaOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_DataSchema_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_DataSchema_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.DataSchema.class, + com.google.cloud.visionai.v1.DataSchema.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.DataSchema.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getSchemaDetailsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + key_ = ""; + schemaDetails_ = null; + if (schemaDetailsBuilder_ != null) { + schemaDetailsBuilder_.dispose(); + schemaDetailsBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_DataSchema_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.DataSchema getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.DataSchema.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.DataSchema build() { + com.google.cloud.visionai.v1.DataSchema result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.DataSchema buildPartial() { + com.google.cloud.visionai.v1.DataSchema result = + new com.google.cloud.visionai.v1.DataSchema(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.visionai.v1.DataSchema result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.key_ = key_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.schemaDetails_ = + schemaDetailsBuilder_ == null ? schemaDetails_ : schemaDetailsBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.DataSchema) { + return mergeFrom((com.google.cloud.visionai.v1.DataSchema) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.DataSchema other) { + if (other == com.google.cloud.visionai.v1.DataSchema.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getKey().isEmpty()) { + key_ = other.key_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.hasSchemaDetails()) { + mergeSchemaDetails(other.getSchemaDetails()); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + key_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage(getSchemaDetailsFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Resource name of the data schema in the form of:
+     * `projects/{project_number}/locations/{location}/corpora/{corpus}/dataSchemas/{data_schema}`
+     * where {data_schema} part should be the same as the `key` field below.
+     * 
+ * + * string name = 1; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Resource name of the data schema in the form of:
+     * `projects/{project_number}/locations/{location}/corpora/{corpus}/dataSchemas/{data_schema}`
+     * where {data_schema} part should be the same as the `key` field below.
+     * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Resource name of the data schema in the form of:
+     * `projects/{project_number}/locations/{location}/corpora/{corpus}/dataSchemas/{data_schema}`
+     * where {data_schema} part should be the same as the `key` field below.
+     * 
+ * + * string name = 1; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Resource name of the data schema in the form of:
+     * `projects/{project_number}/locations/{location}/corpora/{corpus}/dataSchemas/{data_schema}`
+     * where {data_schema} part should be the same as the `key` field below.
+     * 
+ * + * string name = 1; + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Resource name of the data schema in the form of:
+     * `projects/{project_number}/locations/{location}/corpora/{corpus}/dataSchemas/{data_schema}`
+     * where {data_schema} part should be the same as the `key` field below.
+     * 
+ * + * string name = 1; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object key_ = ""; + /** + * + * + *
+     * Required. The key of this data schema. This key should be matching the key
+     * of user specified annotation and unique inside corpus. This value can be up
+     * to 63 characters, and valid characters are /[a-z][0-9]-/. The first
+     * character must be a letter, the last could be a letter or a number.
+     * 
+ * + * string key = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The key. + */ + public java.lang.String getKey() { + java.lang.Object ref = key_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + key_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The key of this data schema. This key should be matching the key
+     * of user specified annotation and unique inside corpus. This value can be up
+     * to 63 characters, and valid characters are /[a-z][0-9]-/. The first
+     * character must be a letter, the last could be a letter or a number.
+     * 
+ * + * string key = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for key. + */ + public com.google.protobuf.ByteString getKeyBytes() { + java.lang.Object ref = key_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + key_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The key of this data schema. This key should be matching the key
+     * of user specified annotation and unique inside corpus. This value can be up
+     * to 63 characters, and valid characters are /[a-z][0-9]-/. The first
+     * character must be a letter, the last could be a letter or a number.
+     * 
+ * + * string key = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The key to set. + * @return This builder for chaining. + */ + public Builder setKey(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + key_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The key of this data schema. This key should be matching the key
+     * of user specified annotation and unique inside corpus. This value can be up
+     * to 63 characters, and valid characters are /[a-z][0-9]-/. The first
+     * character must be a letter, the last could be a letter or a number.
+     * 
+ * + * string key = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearKey() { + key_ = getDefaultInstance().getKey(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The key of this data schema. This key should be matching the key
+     * of user specified annotation and unique inside corpus. This value can be up
+     * to 63 characters, and valid characters are /[a-z][0-9]-/. The first
+     * character must be a letter, the last could be a letter or a number.
+     * 
+ * + * string key = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for key to set. + * @return This builder for chaining. + */ + public Builder setKeyBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + key_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.cloud.visionai.v1.DataSchemaDetails schemaDetails_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.DataSchemaDetails, + com.google.cloud.visionai.v1.DataSchemaDetails.Builder, + com.google.cloud.visionai.v1.DataSchemaDetailsOrBuilder> + schemaDetailsBuilder_; + /** + * + * + *
+     * The schema details mapping to the key.
+     * 
+ * + * .google.cloud.visionai.v1.DataSchemaDetails schema_details = 3; + * + * @return Whether the schemaDetails field is set. + */ + public boolean hasSchemaDetails() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+     * The schema details mapping to the key.
+     * 
+ * + * .google.cloud.visionai.v1.DataSchemaDetails schema_details = 3; + * + * @return The schemaDetails. + */ + public com.google.cloud.visionai.v1.DataSchemaDetails getSchemaDetails() { + if (schemaDetailsBuilder_ == null) { + return schemaDetails_ == null + ? com.google.cloud.visionai.v1.DataSchemaDetails.getDefaultInstance() + : schemaDetails_; + } else { + return schemaDetailsBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The schema details mapping to the key.
+     * 
+ * + * .google.cloud.visionai.v1.DataSchemaDetails schema_details = 3; + */ + public Builder setSchemaDetails(com.google.cloud.visionai.v1.DataSchemaDetails value) { + if (schemaDetailsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + schemaDetails_ = value; + } else { + schemaDetailsBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * The schema details mapping to the key.
+     * 
+ * + * .google.cloud.visionai.v1.DataSchemaDetails schema_details = 3; + */ + public Builder setSchemaDetails( + com.google.cloud.visionai.v1.DataSchemaDetails.Builder builderForValue) { + if (schemaDetailsBuilder_ == null) { + schemaDetails_ = builderForValue.build(); + } else { + schemaDetailsBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * The schema details mapping to the key.
+     * 
+ * + * .google.cloud.visionai.v1.DataSchemaDetails schema_details = 3; + */ + public Builder mergeSchemaDetails(com.google.cloud.visionai.v1.DataSchemaDetails value) { + if (schemaDetailsBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && schemaDetails_ != null + && schemaDetails_ + != com.google.cloud.visionai.v1.DataSchemaDetails.getDefaultInstance()) { + getSchemaDetailsBuilder().mergeFrom(value); + } else { + schemaDetails_ = value; + } + } else { + schemaDetailsBuilder_.mergeFrom(value); + } + if (schemaDetails_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + /** + * + * + *
+     * The schema details mapping to the key.
+     * 
+ * + * .google.cloud.visionai.v1.DataSchemaDetails schema_details = 3; + */ + public Builder clearSchemaDetails() { + bitField0_ = (bitField0_ & ~0x00000004); + schemaDetails_ = null; + if (schemaDetailsBuilder_ != null) { + schemaDetailsBuilder_.dispose(); + schemaDetailsBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * The schema details mapping to the key.
+     * 
+ * + * .google.cloud.visionai.v1.DataSchemaDetails schema_details = 3; + */ + public com.google.cloud.visionai.v1.DataSchemaDetails.Builder getSchemaDetailsBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getSchemaDetailsFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The schema details mapping to the key.
+     * 
+ * + * .google.cloud.visionai.v1.DataSchemaDetails schema_details = 3; + */ + public com.google.cloud.visionai.v1.DataSchemaDetailsOrBuilder getSchemaDetailsOrBuilder() { + if (schemaDetailsBuilder_ != null) { + return schemaDetailsBuilder_.getMessageOrBuilder(); + } else { + return schemaDetails_ == null + ? com.google.cloud.visionai.v1.DataSchemaDetails.getDefaultInstance() + : schemaDetails_; + } + } + /** + * + * + *
+     * The schema details mapping to the key.
+     * 
+ * + * .google.cloud.visionai.v1.DataSchemaDetails schema_details = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.DataSchemaDetails, + com.google.cloud.visionai.v1.DataSchemaDetails.Builder, + com.google.cloud.visionai.v1.DataSchemaDetailsOrBuilder> + getSchemaDetailsFieldBuilder() { + if (schemaDetailsBuilder_ == null) { + schemaDetailsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.DataSchemaDetails, + com.google.cloud.visionai.v1.DataSchemaDetails.Builder, + com.google.cloud.visionai.v1.DataSchemaDetailsOrBuilder>( + getSchemaDetails(), getParentForChildren(), isClean()); + schemaDetails_ = null; + } + return schemaDetailsBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.DataSchema) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.DataSchema) + private static final com.google.cloud.visionai.v1.DataSchema DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.DataSchema(); + } + + public static com.google.cloud.visionai.v1.DataSchema getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DataSchema parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.DataSchema getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DataSchemaDetails.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DataSchemaDetails.java new file mode 100644 index 000000000000..56907b58b134 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DataSchemaDetails.java @@ -0,0 +1,7432 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/warehouse.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * Data schema details indicates the data type and the data struct corresponding
+ * to the key of user specified annotation.
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.DataSchemaDetails} + */ +public final class DataSchemaDetails extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.DataSchemaDetails) + DataSchemaDetailsOrBuilder { + private static final long serialVersionUID = 0L; + // Use DataSchemaDetails.newBuilder() to construct. + private DataSchemaDetails(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DataSchemaDetails() { + type_ = 0; + granularity_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DataSchemaDetails(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_DataSchemaDetails_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_DataSchemaDetails_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.DataSchemaDetails.class, + com.google.cloud.visionai.v1.DataSchemaDetails.Builder.class); + } + + /** + * + * + *
+   * Data type of the annotation.
+   * 
+ * + * Protobuf enum {@code google.cloud.visionai.v1.DataSchemaDetails.DataType} + */ + public enum DataType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Unspecified type.
+     * 
+ * + * DATA_TYPE_UNSPECIFIED = 0; + */ + DATA_TYPE_UNSPECIFIED(0), + /** + * + * + *
+     * Integer type.
+     * Allowed search strategies:
+     * - DataSchema.SearchStrategy.NO_SEARCH,
+     * - DataSchema.SearchStrategy.EXACT_SEARCH.
+     *   Supports query by IntRangeArray.
+     * 
+ * + * INTEGER = 1; + */ + INTEGER(1), + /** + * + * + *
+     * Float type.
+     * Allowed search strategies:
+     * - DataSchema.SearchStrategy.NO_SEARCH,
+     * - DataSchema.SearchStrategy.EXACT_SEARCH.
+     *   Supports query by FloatRangeArray.
+     * 
+ * + * FLOAT = 2; + */ + FLOAT(2), + /** + * + * + *
+     * String type.
+     * Allowed search strategies:
+     * - DataSchema.SearchStrategy.NO_SEARCH,
+     * - DataSchema.SearchStrategy.EXACT_SEARCH,
+     * - DataSchema.SearchStrategy.SMART_SEARCH.
+     * 
+ * + * STRING = 3; + */ + STRING(3), + /** + * + * + *
+     * Supported formats:
+     * %Y-%m-%dT%H:%M:%E*S%E*z (absl::RFC3339_full)
+     * %Y-%m-%dT%H:%M:%E*S
+     * %Y-%m-%dT%H:%M%E*z
+     * %Y-%m-%dT%H:%M
+     * %Y-%m-%dT%H%E*z
+     * %Y-%m-%dT%H
+     * %Y-%m-%d%E*z
+     * %Y-%m-%d
+     * %Y-%m
+     * %Y
+     * Allowed search strategies:
+     * - DataSchema.SearchStrategy.NO_SEARCH,
+     * - DataSchema.SearchStrategy.EXACT_SEARCH.
+     *   Supports query by DateTimeRangeArray.
+     * 
+ * + * DATETIME = 5; + */ + DATETIME(5), + /** + * + * + *
+     * Geo coordinate type.
+     * Allowed search strategies:
+     * - DataSchema.SearchStrategy.NO_SEARCH,
+     * - DataSchema.SearchStrategy.EXACT_SEARCH.
+     *   Supports query by GeoLocationArray.
+     * 
+ * + * GEO_COORDINATE = 7; + */ + GEO_COORDINATE(7), + /** + * + * + *
+     * Type to pass any proto as available in annotations.proto. Only use
+     * internally.
+     * Available proto types and its corresponding search behavior:
+     * - ImageObjectDetectionPredictionResult, allows SMART_SEARCH on
+     *   display_names and NO_SEARCH.
+     * - ClassificationPredictionResult, allows SMART_SEARCH on display_names
+     *   and NO_SEARCH.
+     * - ImageSegmentationPredictionResult, allows NO_SEARCH.
+     * - VideoActionRecognitionPredictionResult, allows SMART_SEARCH on
+     *   display_name and NO_SEARCH.
+     * - VideoObjectTrackingPredictionResult, allows SMART_SEARCH on
+     *   display_name and NO_SEARCH.
+     * - VideoClassificationPredictionResult, allows SMART_SEARCH on
+     *   display_name and NO_SEARCH.
+     * - OccupancyCountingPredictionResult, allows EXACT_SEARCH on
+     *   stats.full_frame_count.count and NO_SEARCH.
+     * - ObjectDetectionPredictionResult, allows SMART_SEARCH on
+     *   identified_boxes.entity.label_string and NO_SEARCH.
+     * 
+ * + * PROTO_ANY = 8; + */ + PROTO_ANY(8), + /** + * + * + *
+     * Boolean type.
+     * Allowed search strategies:
+     * - DataSchema.SearchStrategy.NO_SEARCH,
+     * - DataSchema.SearchStrategy.EXACT_SEARCH.
+     * 
+ * + * BOOLEAN = 9; + */ + BOOLEAN(9), + /** + * + * + *
+     * List type.
+     *  - Each element in the list must be of the exact same data schema;
+     *    otherwise, they are invalid arguments.
+     *  - List level cannot set search strategy. Leaf node level can do.
+     *  - Elements cannot be another list (no list of list).
+     *  - Elements can be CUSTOMIZED_STRUCT, and max number of layers is 10.
+     * 
+ * + * LIST = 10; + */ + LIST(10), + /** + * + * + *
+     * Struct type.
+     * - SearchStrategy:
+     *   * Data Schema that's CUSTOMIZED_STRUCT cannot set search strategy.
+     *   * Leaf-node elements allow setting search strategy based on element's
+     *     SearchStrategy restriction.
+     * - Nested layer restrictions:
+     *   * Data Schema that's CUSTOMIZED_STRUCT allows its fields to be of
+     *     CUSTOMIZED_STRUCT as well, but the overall layers restriction is 10.
+     * 
+ * + * CUSTOMIZED_STRUCT = 6; + */ + CUSTOMIZED_STRUCT(6), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Unspecified type.
+     * 
+ * + * DATA_TYPE_UNSPECIFIED = 0; + */ + public static final int DATA_TYPE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * Integer type.
+     * Allowed search strategies:
+     * - DataSchema.SearchStrategy.NO_SEARCH,
+     * - DataSchema.SearchStrategy.EXACT_SEARCH.
+     *   Supports query by IntRangeArray.
+     * 
+ * + * INTEGER = 1; + */ + public static final int INTEGER_VALUE = 1; + /** + * + * + *
+     * Float type.
+     * Allowed search strategies:
+     * - DataSchema.SearchStrategy.NO_SEARCH,
+     * - DataSchema.SearchStrategy.EXACT_SEARCH.
+     *   Supports query by FloatRangeArray.
+     * 
+ * + * FLOAT = 2; + */ + public static final int FLOAT_VALUE = 2; + /** + * + * + *
+     * String type.
+     * Allowed search strategies:
+     * - DataSchema.SearchStrategy.NO_SEARCH,
+     * - DataSchema.SearchStrategy.EXACT_SEARCH,
+     * - DataSchema.SearchStrategy.SMART_SEARCH.
+     * 
+ * + * STRING = 3; + */ + public static final int STRING_VALUE = 3; + /** + * + * + *
+     * Supported formats:
+     * %Y-%m-%dT%H:%M:%E*S%E*z (absl::RFC3339_full)
+     * %Y-%m-%dT%H:%M:%E*S
+     * %Y-%m-%dT%H:%M%E*z
+     * %Y-%m-%dT%H:%M
+     * %Y-%m-%dT%H%E*z
+     * %Y-%m-%dT%H
+     * %Y-%m-%d%E*z
+     * %Y-%m-%d
+     * %Y-%m
+     * %Y
+     * Allowed search strategies:
+     * - DataSchema.SearchStrategy.NO_SEARCH,
+     * - DataSchema.SearchStrategy.EXACT_SEARCH.
+     *   Supports query by DateTimeRangeArray.
+     * 
+ * + * DATETIME = 5; + */ + public static final int DATETIME_VALUE = 5; + /** + * + * + *
+     * Geo coordinate type.
+     * Allowed search strategies:
+     * - DataSchema.SearchStrategy.NO_SEARCH,
+     * - DataSchema.SearchStrategy.EXACT_SEARCH.
+     *   Supports query by GeoLocationArray.
+     * 
+ * + * GEO_COORDINATE = 7; + */ + public static final int GEO_COORDINATE_VALUE = 7; + /** + * + * + *
+     * Type to pass any proto as available in annotations.proto. Only use
+     * internally.
+     * Available proto types and its corresponding search behavior:
+     * - ImageObjectDetectionPredictionResult, allows SMART_SEARCH on
+     *   display_names and NO_SEARCH.
+     * - ClassificationPredictionResult, allows SMART_SEARCH on display_names
+     *   and NO_SEARCH.
+     * - ImageSegmentationPredictionResult, allows NO_SEARCH.
+     * - VideoActionRecognitionPredictionResult, allows SMART_SEARCH on
+     *   display_name and NO_SEARCH.
+     * - VideoObjectTrackingPredictionResult, allows SMART_SEARCH on
+     *   display_name and NO_SEARCH.
+     * - VideoClassificationPredictionResult, allows SMART_SEARCH on
+     *   display_name and NO_SEARCH.
+     * - OccupancyCountingPredictionResult, allows EXACT_SEARCH on
+     *   stats.full_frame_count.count and NO_SEARCH.
+     * - ObjectDetectionPredictionResult, allows SMART_SEARCH on
+     *   identified_boxes.entity.label_string and NO_SEARCH.
+     * 
+ * + * PROTO_ANY = 8; + */ + public static final int PROTO_ANY_VALUE = 8; + /** + * + * + *
+     * Boolean type.
+     * Allowed search strategies:
+     * - DataSchema.SearchStrategy.NO_SEARCH,
+     * - DataSchema.SearchStrategy.EXACT_SEARCH.
+     * 
+ * + * BOOLEAN = 9; + */ + public static final int BOOLEAN_VALUE = 9; + /** + * + * + *
+     * List type.
+     *  - Each element in the list must be of the exact same data schema;
+     *    otherwise, they are invalid arguments.
+     *  - List level cannot set search strategy. Leaf node level can do.
+     *  - Elements cannot be another list (no list of list).
+     *  - Elements can be CUSTOMIZED_STRUCT, and max number of layers is 10.
+     * 
+ * + * LIST = 10; + */ + public static final int LIST_VALUE = 10; + /** + * + * + *
+     * Struct type.
+     * - SearchStrategy:
+     *   * Data Schema that's CUSTOMIZED_STRUCT cannot set search strategy.
+     *   * Leaf-node elements allow setting search strategy based on element's
+     *     SearchStrategy restriction.
+     * - Nested layer restrictions:
+     *   * Data Schema that's CUSTOMIZED_STRUCT allows its fields to be of
+     *     CUSTOMIZED_STRUCT as well, but the overall layers restriction is 10.
+     * 
+ * + * CUSTOMIZED_STRUCT = 6; + */ + public static final int CUSTOMIZED_STRUCT_VALUE = 6; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static DataType valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static DataType forNumber(int value) { + switch (value) { + case 0: + return DATA_TYPE_UNSPECIFIED; + case 1: + return INTEGER; + case 2: + return FLOAT; + case 3: + return STRING; + case 5: + return DATETIME; + case 7: + return GEO_COORDINATE; + case 8: + return PROTO_ANY; + case 9: + return BOOLEAN; + case 10: + return LIST; + case 6: + return CUSTOMIZED_STRUCT; + 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 DataType findValueByNumber(int number) { + return DataType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + 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.visionai.v1.DataSchemaDetails.getDescriptor().getEnumTypes().get(0); + } + + private static final DataType[] VALUES = values(); + + public static DataType 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 DataType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.visionai.v1.DataSchemaDetails.DataType) + } + + /** + * + * + *
+   * The granularity of annotations under this DataSchema.
+   * 
+ * + * Protobuf enum {@code google.cloud.visionai.v1.DataSchemaDetails.Granularity} + */ + public enum Granularity implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Unspecified granularity.
+     * 
+ * + * GRANULARITY_UNSPECIFIED = 0; + */ + GRANULARITY_UNSPECIFIED(0), + /** + * + * + *
+     * Asset-level granularity (annotations must not contain partition info).
+     * 
+ * + * GRANULARITY_ASSET_LEVEL = 1; + */ + GRANULARITY_ASSET_LEVEL(1), + /** + * + * + *
+     * Partition-level granularity (annotations must contain partition info).
+     * 
+ * + * GRANULARITY_PARTITION_LEVEL = 2; + */ + GRANULARITY_PARTITION_LEVEL(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Unspecified granularity.
+     * 
+ * + * GRANULARITY_UNSPECIFIED = 0; + */ + public static final int GRANULARITY_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * Asset-level granularity (annotations must not contain partition info).
+     * 
+ * + * GRANULARITY_ASSET_LEVEL = 1; + */ + public static final int GRANULARITY_ASSET_LEVEL_VALUE = 1; + /** + * + * + *
+     * Partition-level granularity (annotations must contain partition info).
+     * 
+ * + * GRANULARITY_PARTITION_LEVEL = 2; + */ + public static final int GRANULARITY_PARTITION_LEVEL_VALUE = 2; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static Granularity valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static Granularity forNumber(int value) { + switch (value) { + case 0: + return GRANULARITY_UNSPECIFIED; + case 1: + return GRANULARITY_ASSET_LEVEL; + case 2: + return GRANULARITY_PARTITION_LEVEL; + 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 Granularity findValueByNumber(int number) { + return Granularity.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + 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.visionai.v1.DataSchemaDetails.getDescriptor().getEnumTypes().get(1); + } + + private static final Granularity[] VALUES = values(); + + public static Granularity 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 Granularity(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.visionai.v1.DataSchemaDetails.Granularity) + } + + public interface ProtoAnyConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.DataSchemaDetails.ProtoAnyConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * The type URI of the proto message.
+     * 
+ * + * string type_uri = 1; + * + * @return The typeUri. + */ + java.lang.String getTypeUri(); + /** + * + * + *
+     * The type URI of the proto message.
+     * 
+ * + * string type_uri = 1; + * + * @return The bytes for typeUri. + */ + com.google.protobuf.ByteString getTypeUriBytes(); + } + /** + * + * + *
+   * The configuration for `PROTO_ANY` data type.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.DataSchemaDetails.ProtoAnyConfig} + */ + public static final class ProtoAnyConfig extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.DataSchemaDetails.ProtoAnyConfig) + ProtoAnyConfigOrBuilder { + private static final long serialVersionUID = 0L; + // Use ProtoAnyConfig.newBuilder() to construct. + private ProtoAnyConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ProtoAnyConfig() { + typeUri_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ProtoAnyConfig(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_DataSchemaDetails_ProtoAnyConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_DataSchemaDetails_ProtoAnyConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.DataSchemaDetails.ProtoAnyConfig.class, + com.google.cloud.visionai.v1.DataSchemaDetails.ProtoAnyConfig.Builder.class); + } + + public static final int TYPE_URI_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object typeUri_ = ""; + /** + * + * + *
+     * The type URI of the proto message.
+     * 
+ * + * string type_uri = 1; + * + * @return The typeUri. + */ + @java.lang.Override + public java.lang.String getTypeUri() { + java.lang.Object ref = typeUri_; + 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(); + typeUri_ = s; + return s; + } + } + /** + * + * + *
+     * The type URI of the proto message.
+     * 
+ * + * string type_uri = 1; + * + * @return The bytes for typeUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTypeUriBytes() { + java.lang.Object ref = typeUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + typeUri_ = 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(typeUri_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, typeUri_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(typeUri_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, typeUri_); + } + size += getUnknownFields().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.visionai.v1.DataSchemaDetails.ProtoAnyConfig)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.DataSchemaDetails.ProtoAnyConfig other = + (com.google.cloud.visionai.v1.DataSchemaDetails.ProtoAnyConfig) obj; + + if (!getTypeUri().equals(other.getTypeUri())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + TYPE_URI_FIELD_NUMBER; + hash = (53 * hash) + getTypeUri().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.DataSchemaDetails.ProtoAnyConfig parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.DataSchemaDetails.ProtoAnyConfig 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.visionai.v1.DataSchemaDetails.ProtoAnyConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.DataSchemaDetails.ProtoAnyConfig 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.visionai.v1.DataSchemaDetails.ProtoAnyConfig parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.DataSchemaDetails.ProtoAnyConfig parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.DataSchemaDetails.ProtoAnyConfig parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.DataSchemaDetails.ProtoAnyConfig 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.visionai.v1.DataSchemaDetails.ProtoAnyConfig parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.DataSchemaDetails.ProtoAnyConfig 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.visionai.v1.DataSchemaDetails.ProtoAnyConfig parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.DataSchemaDetails.ProtoAnyConfig 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.visionai.v1.DataSchemaDetails.ProtoAnyConfig 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 configuration for `PROTO_ANY` data type.
+     * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.DataSchemaDetails.ProtoAnyConfig} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.DataSchemaDetails.ProtoAnyConfig) + com.google.cloud.visionai.v1.DataSchemaDetails.ProtoAnyConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_DataSchemaDetails_ProtoAnyConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_DataSchemaDetails_ProtoAnyConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.DataSchemaDetails.ProtoAnyConfig.class, + com.google.cloud.visionai.v1.DataSchemaDetails.ProtoAnyConfig.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.DataSchemaDetails.ProtoAnyConfig.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + typeUri_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_DataSchemaDetails_ProtoAnyConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.DataSchemaDetails.ProtoAnyConfig + getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.DataSchemaDetails.ProtoAnyConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.DataSchemaDetails.ProtoAnyConfig build() { + com.google.cloud.visionai.v1.DataSchemaDetails.ProtoAnyConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.DataSchemaDetails.ProtoAnyConfig buildPartial() { + com.google.cloud.visionai.v1.DataSchemaDetails.ProtoAnyConfig result = + new com.google.cloud.visionai.v1.DataSchemaDetails.ProtoAnyConfig(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.visionai.v1.DataSchemaDetails.ProtoAnyConfig result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.typeUri_ = typeUri_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.DataSchemaDetails.ProtoAnyConfig) { + return mergeFrom((com.google.cloud.visionai.v1.DataSchemaDetails.ProtoAnyConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.visionai.v1.DataSchemaDetails.ProtoAnyConfig other) { + if (other + == com.google.cloud.visionai.v1.DataSchemaDetails.ProtoAnyConfig.getDefaultInstance()) + return this; + if (!other.getTypeUri().isEmpty()) { + typeUri_ = other.typeUri_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + typeUri_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object typeUri_ = ""; + /** + * + * + *
+       * The type URI of the proto message.
+       * 
+ * + * string type_uri = 1; + * + * @return The typeUri. + */ + public java.lang.String getTypeUri() { + java.lang.Object ref = typeUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + typeUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * The type URI of the proto message.
+       * 
+ * + * string type_uri = 1; + * + * @return The bytes for typeUri. + */ + public com.google.protobuf.ByteString getTypeUriBytes() { + java.lang.Object ref = typeUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + typeUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * The type URI of the proto message.
+       * 
+ * + * string type_uri = 1; + * + * @param value The typeUri to set. + * @return This builder for chaining. + */ + public Builder setTypeUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + typeUri_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * The type URI of the proto message.
+       * 
+ * + * string type_uri = 1; + * + * @return This builder for chaining. + */ + public Builder clearTypeUri() { + typeUri_ = getDefaultInstance().getTypeUri(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+       * The type URI of the proto message.
+       * 
+ * + * string type_uri = 1; + * + * @param value The bytes for typeUri to set. + * @return This builder for chaining. + */ + public Builder setTypeUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + typeUri_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.DataSchemaDetails.ProtoAnyConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.DataSchemaDetails.ProtoAnyConfig) + private static final com.google.cloud.visionai.v1.DataSchemaDetails.ProtoAnyConfig + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.DataSchemaDetails.ProtoAnyConfig(); + } + + public static com.google.cloud.visionai.v1.DataSchemaDetails.ProtoAnyConfig + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ProtoAnyConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.DataSchemaDetails.ProtoAnyConfig + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface ListConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.DataSchemaDetails.ListConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * The value's data schema in the list.
+     * 
+ * + * .google.cloud.visionai.v1.DataSchemaDetails value_schema = 1; + * + * @return Whether the valueSchema field is set. + */ + boolean hasValueSchema(); + /** + * + * + *
+     * The value's data schema in the list.
+     * 
+ * + * .google.cloud.visionai.v1.DataSchemaDetails value_schema = 1; + * + * @return The valueSchema. + */ + com.google.cloud.visionai.v1.DataSchemaDetails getValueSchema(); + /** + * + * + *
+     * The value's data schema in the list.
+     * 
+ * + * .google.cloud.visionai.v1.DataSchemaDetails value_schema = 1; + */ + com.google.cloud.visionai.v1.DataSchemaDetailsOrBuilder getValueSchemaOrBuilder(); + } + /** + * + * + *
+   * The configuration for `LIST` data type.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.DataSchemaDetails.ListConfig} + */ + public static final class ListConfig extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.DataSchemaDetails.ListConfig) + ListConfigOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListConfig.newBuilder() to construct. + private ListConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListConfig() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListConfig(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_DataSchemaDetails_ListConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_DataSchemaDetails_ListConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.DataSchemaDetails.ListConfig.class, + com.google.cloud.visionai.v1.DataSchemaDetails.ListConfig.Builder.class); + } + + private int bitField0_; + public static final int VALUE_SCHEMA_FIELD_NUMBER = 1; + private com.google.cloud.visionai.v1.DataSchemaDetails valueSchema_; + /** + * + * + *
+     * The value's data schema in the list.
+     * 
+ * + * .google.cloud.visionai.v1.DataSchemaDetails value_schema = 1; + * + * @return Whether the valueSchema field is set. + */ + @java.lang.Override + public boolean hasValueSchema() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * The value's data schema in the list.
+     * 
+ * + * .google.cloud.visionai.v1.DataSchemaDetails value_schema = 1; + * + * @return The valueSchema. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.DataSchemaDetails getValueSchema() { + return valueSchema_ == null + ? com.google.cloud.visionai.v1.DataSchemaDetails.getDefaultInstance() + : valueSchema_; + } + /** + * + * + *
+     * The value's data schema in the list.
+     * 
+ * + * .google.cloud.visionai.v1.DataSchemaDetails value_schema = 1; + */ + @java.lang.Override + public com.google.cloud.visionai.v1.DataSchemaDetailsOrBuilder getValueSchemaOrBuilder() { + return valueSchema_ == null + ? com.google.cloud.visionai.v1.DataSchemaDetails.getDefaultInstance() + : valueSchema_; + } + + 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 (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getValueSchema()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getValueSchema()); + } + size += getUnknownFields().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.visionai.v1.DataSchemaDetails.ListConfig)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.DataSchemaDetails.ListConfig other = + (com.google.cloud.visionai.v1.DataSchemaDetails.ListConfig) obj; + + if (hasValueSchema() != other.hasValueSchema()) return false; + if (hasValueSchema()) { + if (!getValueSchema().equals(other.getValueSchema())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasValueSchema()) { + hash = (37 * hash) + VALUE_SCHEMA_FIELD_NUMBER; + hash = (53 * hash) + getValueSchema().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.DataSchemaDetails.ListConfig parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.DataSchemaDetails.ListConfig 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.visionai.v1.DataSchemaDetails.ListConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.DataSchemaDetails.ListConfig 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.visionai.v1.DataSchemaDetails.ListConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.DataSchemaDetails.ListConfig parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.DataSchemaDetails.ListConfig parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.DataSchemaDetails.ListConfig 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.visionai.v1.DataSchemaDetails.ListConfig parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.DataSchemaDetails.ListConfig 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.visionai.v1.DataSchemaDetails.ListConfig parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.DataSchemaDetails.ListConfig 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.visionai.v1.DataSchemaDetails.ListConfig 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 configuration for `LIST` data type.
+     * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.DataSchemaDetails.ListConfig} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.DataSchemaDetails.ListConfig) + com.google.cloud.visionai.v1.DataSchemaDetails.ListConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_DataSchemaDetails_ListConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_DataSchemaDetails_ListConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.DataSchemaDetails.ListConfig.class, + com.google.cloud.visionai.v1.DataSchemaDetails.ListConfig.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.DataSchemaDetails.ListConfig.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getValueSchemaFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + valueSchema_ = null; + if (valueSchemaBuilder_ != null) { + valueSchemaBuilder_.dispose(); + valueSchemaBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_DataSchemaDetails_ListConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.DataSchemaDetails.ListConfig getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.DataSchemaDetails.ListConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.DataSchemaDetails.ListConfig build() { + com.google.cloud.visionai.v1.DataSchemaDetails.ListConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.DataSchemaDetails.ListConfig buildPartial() { + com.google.cloud.visionai.v1.DataSchemaDetails.ListConfig result = + new com.google.cloud.visionai.v1.DataSchemaDetails.ListConfig(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.visionai.v1.DataSchemaDetails.ListConfig result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.valueSchema_ = + valueSchemaBuilder_ == null ? valueSchema_ : valueSchemaBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.DataSchemaDetails.ListConfig) { + return mergeFrom((com.google.cloud.visionai.v1.DataSchemaDetails.ListConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.DataSchemaDetails.ListConfig other) { + if (other == com.google.cloud.visionai.v1.DataSchemaDetails.ListConfig.getDefaultInstance()) + return this; + if (other.hasValueSchema()) { + mergeValueSchema(other.getValueSchema()); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getValueSchemaFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.cloud.visionai.v1.DataSchemaDetails valueSchema_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.DataSchemaDetails, + com.google.cloud.visionai.v1.DataSchemaDetails.Builder, + com.google.cloud.visionai.v1.DataSchemaDetailsOrBuilder> + valueSchemaBuilder_; + /** + * + * + *
+       * The value's data schema in the list.
+       * 
+ * + * .google.cloud.visionai.v1.DataSchemaDetails value_schema = 1; + * + * @return Whether the valueSchema field is set. + */ + public boolean hasValueSchema() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+       * The value's data schema in the list.
+       * 
+ * + * .google.cloud.visionai.v1.DataSchemaDetails value_schema = 1; + * + * @return The valueSchema. + */ + public com.google.cloud.visionai.v1.DataSchemaDetails getValueSchema() { + if (valueSchemaBuilder_ == null) { + return valueSchema_ == null + ? com.google.cloud.visionai.v1.DataSchemaDetails.getDefaultInstance() + : valueSchema_; + } else { + return valueSchemaBuilder_.getMessage(); + } + } + /** + * + * + *
+       * The value's data schema in the list.
+       * 
+ * + * .google.cloud.visionai.v1.DataSchemaDetails value_schema = 1; + */ + public Builder setValueSchema(com.google.cloud.visionai.v1.DataSchemaDetails value) { + if (valueSchemaBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + valueSchema_ = value; + } else { + valueSchemaBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * The value's data schema in the list.
+       * 
+ * + * .google.cloud.visionai.v1.DataSchemaDetails value_schema = 1; + */ + public Builder setValueSchema( + com.google.cloud.visionai.v1.DataSchemaDetails.Builder builderForValue) { + if (valueSchemaBuilder_ == null) { + valueSchema_ = builderForValue.build(); + } else { + valueSchemaBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * The value's data schema in the list.
+       * 
+ * + * .google.cloud.visionai.v1.DataSchemaDetails value_schema = 1; + */ + public Builder mergeValueSchema(com.google.cloud.visionai.v1.DataSchemaDetails value) { + if (valueSchemaBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && valueSchema_ != null + && valueSchema_ + != com.google.cloud.visionai.v1.DataSchemaDetails.getDefaultInstance()) { + getValueSchemaBuilder().mergeFrom(value); + } else { + valueSchema_ = value; + } + } else { + valueSchemaBuilder_.mergeFrom(value); + } + if (valueSchema_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + /** + * + * + *
+       * The value's data schema in the list.
+       * 
+ * + * .google.cloud.visionai.v1.DataSchemaDetails value_schema = 1; + */ + public Builder clearValueSchema() { + bitField0_ = (bitField0_ & ~0x00000001); + valueSchema_ = null; + if (valueSchemaBuilder_ != null) { + valueSchemaBuilder_.dispose(); + valueSchemaBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+       * The value's data schema in the list.
+       * 
+ * + * .google.cloud.visionai.v1.DataSchemaDetails value_schema = 1; + */ + public com.google.cloud.visionai.v1.DataSchemaDetails.Builder getValueSchemaBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getValueSchemaFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * The value's data schema in the list.
+       * 
+ * + * .google.cloud.visionai.v1.DataSchemaDetails value_schema = 1; + */ + public com.google.cloud.visionai.v1.DataSchemaDetailsOrBuilder getValueSchemaOrBuilder() { + if (valueSchemaBuilder_ != null) { + return valueSchemaBuilder_.getMessageOrBuilder(); + } else { + return valueSchema_ == null + ? com.google.cloud.visionai.v1.DataSchemaDetails.getDefaultInstance() + : valueSchema_; + } + } + /** + * + * + *
+       * The value's data schema in the list.
+       * 
+ * + * .google.cloud.visionai.v1.DataSchemaDetails value_schema = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.DataSchemaDetails, + com.google.cloud.visionai.v1.DataSchemaDetails.Builder, + com.google.cloud.visionai.v1.DataSchemaDetailsOrBuilder> + getValueSchemaFieldBuilder() { + if (valueSchemaBuilder_ == null) { + valueSchemaBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.DataSchemaDetails, + com.google.cloud.visionai.v1.DataSchemaDetails.Builder, + com.google.cloud.visionai.v1.DataSchemaDetailsOrBuilder>( + getValueSchema(), getParentForChildren(), isClean()); + valueSchema_ = null; + } + return valueSchemaBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.DataSchemaDetails.ListConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.DataSchemaDetails.ListConfig) + private static final com.google.cloud.visionai.v1.DataSchemaDetails.ListConfig DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.DataSchemaDetails.ListConfig(); + } + + public static com.google.cloud.visionai.v1.DataSchemaDetails.ListConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.DataSchemaDetails.ListConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface CustomizedStructConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.DataSchemaDetails.CustomizedStructConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Direct child elements data schemas.
+     * 
+ * + * map<string, .google.cloud.visionai.v1.DataSchemaDetails> field_schemas = 1; + * + */ + int getFieldSchemasCount(); + /** + * + * + *
+     * Direct child elements data schemas.
+     * 
+ * + * map<string, .google.cloud.visionai.v1.DataSchemaDetails> field_schemas = 1; + * + */ + boolean containsFieldSchemas(java.lang.String key); + /** Use {@link #getFieldSchemasMap()} instead. */ + @java.lang.Deprecated + java.util.Map + getFieldSchemas(); + /** + * + * + *
+     * Direct child elements data schemas.
+     * 
+ * + * map<string, .google.cloud.visionai.v1.DataSchemaDetails> field_schemas = 1; + * + */ + java.util.Map + getFieldSchemasMap(); + /** + * + * + *
+     * Direct child elements data schemas.
+     * 
+ * + * map<string, .google.cloud.visionai.v1.DataSchemaDetails> field_schemas = 1; + * + */ + /* nullable */ + com.google.cloud.visionai.v1.DataSchemaDetails getFieldSchemasOrDefault( + java.lang.String key, + /* nullable */ + com.google.cloud.visionai.v1.DataSchemaDetails defaultValue); + /** + * + * + *
+     * Direct child elements data schemas.
+     * 
+ * + * map<string, .google.cloud.visionai.v1.DataSchemaDetails> field_schemas = 1; + * + */ + com.google.cloud.visionai.v1.DataSchemaDetails getFieldSchemasOrThrow(java.lang.String key); + } + /** + * + * + *
+   * The configuration for `CUSTOMIZED_STRUCT` data type.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.DataSchemaDetails.CustomizedStructConfig} + */ + public static final class CustomizedStructConfig extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.DataSchemaDetails.CustomizedStructConfig) + CustomizedStructConfigOrBuilder { + private static final long serialVersionUID = 0L; + // Use CustomizedStructConfig.newBuilder() to construct. + private CustomizedStructConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CustomizedStructConfig() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CustomizedStructConfig(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_DataSchemaDetails_CustomizedStructConfig_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 1: + return internalGetFieldSchemas(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_DataSchemaDetails_CustomizedStructConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.DataSchemaDetails.CustomizedStructConfig.class, + com.google.cloud.visionai.v1.DataSchemaDetails.CustomizedStructConfig.Builder.class); + } + + public static final int FIELD_SCHEMAS_FIELD_NUMBER = 1; + + private static final class FieldSchemasDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.String, com.google.cloud.visionai.v1.DataSchemaDetails> + defaultEntry = + com.google.protobuf.MapEntry + . + newDefaultInstance( + com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_DataSchemaDetails_CustomizedStructConfig_FieldSchemasEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.MESSAGE, + com.google.cloud.visionai.v1.DataSchemaDetails.getDefaultInstance()); + } + + @SuppressWarnings("serial") + private com.google.protobuf.MapField< + java.lang.String, com.google.cloud.visionai.v1.DataSchemaDetails> + fieldSchemas_; + + private com.google.protobuf.MapField< + java.lang.String, com.google.cloud.visionai.v1.DataSchemaDetails> + internalGetFieldSchemas() { + if (fieldSchemas_ == null) { + return com.google.protobuf.MapField.emptyMapField( + FieldSchemasDefaultEntryHolder.defaultEntry); + } + return fieldSchemas_; + } + + public int getFieldSchemasCount() { + return internalGetFieldSchemas().getMap().size(); + } + /** + * + * + *
+     * Direct child elements data schemas.
+     * 
+ * + * map<string, .google.cloud.visionai.v1.DataSchemaDetails> field_schemas = 1; + * + */ + @java.lang.Override + public boolean containsFieldSchemas(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetFieldSchemas().getMap().containsKey(key); + } + /** Use {@link #getFieldSchemasMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map + getFieldSchemas() { + return getFieldSchemasMap(); + } + /** + * + * + *
+     * Direct child elements data schemas.
+     * 
+ * + * map<string, .google.cloud.visionai.v1.DataSchemaDetails> field_schemas = 1; + * + */ + @java.lang.Override + public java.util.Map + getFieldSchemasMap() { + return internalGetFieldSchemas().getMap(); + } + /** + * + * + *
+     * Direct child elements data schemas.
+     * 
+ * + * map<string, .google.cloud.visionai.v1.DataSchemaDetails> field_schemas = 1; + * + */ + @java.lang.Override + public /* nullable */ com.google.cloud.visionai.v1.DataSchemaDetails getFieldSchemasOrDefault( + java.lang.String key, + /* nullable */ + com.google.cloud.visionai.v1.DataSchemaDetails defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = + internalGetFieldSchemas().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+     * Direct child elements data schemas.
+     * 
+ * + * map<string, .google.cloud.visionai.v1.DataSchemaDetails> field_schemas = 1; + * + */ + @java.lang.Override + public com.google.cloud.visionai.v1.DataSchemaDetails getFieldSchemasOrThrow( + java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = + internalGetFieldSchemas().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + 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 { + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, internalGetFieldSchemas(), FieldSchemasDefaultEntryHolder.defaultEntry, 1); + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (java.util.Map.Entry + entry : internalGetFieldSchemas().getMap().entrySet()) { + com.google.protobuf.MapEntry< + java.lang.String, com.google.cloud.visionai.v1.DataSchemaDetails> + fieldSchemas__ = + FieldSchemasDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, fieldSchemas__); + } + size += getUnknownFields().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.visionai.v1.DataSchemaDetails.CustomizedStructConfig)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.DataSchemaDetails.CustomizedStructConfig other = + (com.google.cloud.visionai.v1.DataSchemaDetails.CustomizedStructConfig) obj; + + if (!internalGetFieldSchemas().equals(other.internalGetFieldSchemas())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (!internalGetFieldSchemas().getMap().isEmpty()) { + hash = (37 * hash) + FIELD_SCHEMAS_FIELD_NUMBER; + hash = (53 * hash) + internalGetFieldSchemas().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.DataSchemaDetails.CustomizedStructConfig parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.DataSchemaDetails.CustomizedStructConfig 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.visionai.v1.DataSchemaDetails.CustomizedStructConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.DataSchemaDetails.CustomizedStructConfig 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.visionai.v1.DataSchemaDetails.CustomizedStructConfig parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.DataSchemaDetails.CustomizedStructConfig parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.DataSchemaDetails.CustomizedStructConfig parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.DataSchemaDetails.CustomizedStructConfig 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.visionai.v1.DataSchemaDetails.CustomizedStructConfig + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.DataSchemaDetails.CustomizedStructConfig + 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.visionai.v1.DataSchemaDetails.CustomizedStructConfig parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.DataSchemaDetails.CustomizedStructConfig 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.visionai.v1.DataSchemaDetails.CustomizedStructConfig 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 configuration for `CUSTOMIZED_STRUCT` data type.
+     * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.DataSchemaDetails.CustomizedStructConfig} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.DataSchemaDetails.CustomizedStructConfig) + com.google.cloud.visionai.v1.DataSchemaDetails.CustomizedStructConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_DataSchemaDetails_CustomizedStructConfig_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 1: + return internalGetFieldSchemas(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( + int number) { + switch (number) { + case 1: + return internalGetMutableFieldSchemas(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_DataSchemaDetails_CustomizedStructConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.DataSchemaDetails.CustomizedStructConfig.class, + com.google.cloud.visionai.v1.DataSchemaDetails.CustomizedStructConfig.Builder + .class); + } + + // Construct using + // com.google.cloud.visionai.v1.DataSchemaDetails.CustomizedStructConfig.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + internalGetMutableFieldSchemas().clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_DataSchemaDetails_CustomizedStructConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.DataSchemaDetails.CustomizedStructConfig + getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.DataSchemaDetails.CustomizedStructConfig + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.DataSchemaDetails.CustomizedStructConfig build() { + com.google.cloud.visionai.v1.DataSchemaDetails.CustomizedStructConfig result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.DataSchemaDetails.CustomizedStructConfig buildPartial() { + com.google.cloud.visionai.v1.DataSchemaDetails.CustomizedStructConfig result = + new com.google.cloud.visionai.v1.DataSchemaDetails.CustomizedStructConfig(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.visionai.v1.DataSchemaDetails.CustomizedStructConfig result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.fieldSchemas_ = + internalGetFieldSchemas().build(FieldSchemasDefaultEntryHolder.defaultEntry); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof com.google.cloud.visionai.v1.DataSchemaDetails.CustomizedStructConfig) { + return mergeFrom( + (com.google.cloud.visionai.v1.DataSchemaDetails.CustomizedStructConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.visionai.v1.DataSchemaDetails.CustomizedStructConfig other) { + if (other + == com.google.cloud.visionai.v1.DataSchemaDetails.CustomizedStructConfig + .getDefaultInstance()) return this; + internalGetMutableFieldSchemas().mergeFrom(other.internalGetFieldSchemas()); + bitField0_ |= 0x00000001; + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.protobuf.MapEntry< + java.lang.String, com.google.cloud.visionai.v1.DataSchemaDetails> + fieldSchemas__ = + input.readMessage( + FieldSchemasDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableFieldSchemas() + .ensureBuilderMap() + .put(fieldSchemas__.getKey(), fieldSchemas__.getValue()); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private static final class FieldSchemasConverter + implements com.google.protobuf.MapFieldBuilder.Converter< + java.lang.String, + com.google.cloud.visionai.v1.DataSchemaDetailsOrBuilder, + com.google.cloud.visionai.v1.DataSchemaDetails> { + @java.lang.Override + public com.google.cloud.visionai.v1.DataSchemaDetails build( + com.google.cloud.visionai.v1.DataSchemaDetailsOrBuilder val) { + if (val instanceof com.google.cloud.visionai.v1.DataSchemaDetails) { + return (com.google.cloud.visionai.v1.DataSchemaDetails) val; + } + return ((com.google.cloud.visionai.v1.DataSchemaDetails.Builder) val).build(); + } + + @java.lang.Override + public com.google.protobuf.MapEntry< + java.lang.String, com.google.cloud.visionai.v1.DataSchemaDetails> + defaultEntry() { + return FieldSchemasDefaultEntryHolder.defaultEntry; + } + }; + + private static final FieldSchemasConverter fieldSchemasConverter = + new FieldSchemasConverter(); + + private com.google.protobuf.MapFieldBuilder< + java.lang.String, + com.google.cloud.visionai.v1.DataSchemaDetailsOrBuilder, + com.google.cloud.visionai.v1.DataSchemaDetails, + com.google.cloud.visionai.v1.DataSchemaDetails.Builder> + fieldSchemas_; + + private com.google.protobuf.MapFieldBuilder< + java.lang.String, + com.google.cloud.visionai.v1.DataSchemaDetailsOrBuilder, + com.google.cloud.visionai.v1.DataSchemaDetails, + com.google.cloud.visionai.v1.DataSchemaDetails.Builder> + internalGetFieldSchemas() { + if (fieldSchemas_ == null) { + return new com.google.protobuf.MapFieldBuilder<>(fieldSchemasConverter); + } + return fieldSchemas_; + } + + private com.google.protobuf.MapFieldBuilder< + java.lang.String, + com.google.cloud.visionai.v1.DataSchemaDetailsOrBuilder, + com.google.cloud.visionai.v1.DataSchemaDetails, + com.google.cloud.visionai.v1.DataSchemaDetails.Builder> + internalGetMutableFieldSchemas() { + if (fieldSchemas_ == null) { + fieldSchemas_ = new com.google.protobuf.MapFieldBuilder<>(fieldSchemasConverter); + } + bitField0_ |= 0x00000001; + onChanged(); + return fieldSchemas_; + } + + public int getFieldSchemasCount() { + return internalGetFieldSchemas().ensureBuilderMap().size(); + } + /** + * + * + *
+       * Direct child elements data schemas.
+       * 
+ * + * map<string, .google.cloud.visionai.v1.DataSchemaDetails> field_schemas = 1; + * + */ + @java.lang.Override + public boolean containsFieldSchemas(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetFieldSchemas().ensureBuilderMap().containsKey(key); + } + /** Use {@link #getFieldSchemasMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map + getFieldSchemas() { + return getFieldSchemasMap(); + } + /** + * + * + *
+       * Direct child elements data schemas.
+       * 
+ * + * map<string, .google.cloud.visionai.v1.DataSchemaDetails> field_schemas = 1; + * + */ + @java.lang.Override + public java.util.Map + getFieldSchemasMap() { + return internalGetFieldSchemas().getImmutableMap(); + } + /** + * + * + *
+       * Direct child elements data schemas.
+       * 
+ * + * map<string, .google.cloud.visionai.v1.DataSchemaDetails> field_schemas = 1; + * + */ + @java.lang.Override + public /* nullable */ com.google.cloud.visionai.v1.DataSchemaDetails getFieldSchemasOrDefault( + java.lang.String key, + /* nullable */ + com.google.cloud.visionai.v1.DataSchemaDetails defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map + map = internalGetMutableFieldSchemas().ensureBuilderMap(); + return map.containsKey(key) ? fieldSchemasConverter.build(map.get(key)) : defaultValue; + } + /** + * + * + *
+       * Direct child elements data schemas.
+       * 
+ * + * map<string, .google.cloud.visionai.v1.DataSchemaDetails> field_schemas = 1; + * + */ + @java.lang.Override + public com.google.cloud.visionai.v1.DataSchemaDetails getFieldSchemasOrThrow( + java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map + map = internalGetMutableFieldSchemas().ensureBuilderMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return fieldSchemasConverter.build(map.get(key)); + } + + public Builder clearFieldSchemas() { + bitField0_ = (bitField0_ & ~0x00000001); + internalGetMutableFieldSchemas().clear(); + return this; + } + /** + * + * + *
+       * Direct child elements data schemas.
+       * 
+ * + * map<string, .google.cloud.visionai.v1.DataSchemaDetails> field_schemas = 1; + * + */ + public Builder removeFieldSchemas(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + internalGetMutableFieldSchemas().ensureBuilderMap().remove(key); + return this; + } + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map + getMutableFieldSchemas() { + bitField0_ |= 0x00000001; + return internalGetMutableFieldSchemas().ensureMessageMap(); + } + /** + * + * + *
+       * Direct child elements data schemas.
+       * 
+ * + * map<string, .google.cloud.visionai.v1.DataSchemaDetails> field_schemas = 1; + * + */ + public Builder putFieldSchemas( + java.lang.String key, com.google.cloud.visionai.v1.DataSchemaDetails value) { + if (key == null) { + throw new NullPointerException("map key"); + } + if (value == null) { + throw new NullPointerException("map value"); + } + internalGetMutableFieldSchemas().ensureBuilderMap().put(key, value); + bitField0_ |= 0x00000001; + return this; + } + /** + * + * + *
+       * Direct child elements data schemas.
+       * 
+ * + * map<string, .google.cloud.visionai.v1.DataSchemaDetails> field_schemas = 1; + * + */ + public Builder putAllFieldSchemas( + java.util.Map values) { + for (java.util.Map.Entry + e : values.entrySet()) { + if (e.getKey() == null || e.getValue() == null) { + throw new NullPointerException(); + } + } + internalGetMutableFieldSchemas().ensureBuilderMap().putAll(values); + bitField0_ |= 0x00000001; + return this; + } + /** + * + * + *
+       * Direct child elements data schemas.
+       * 
+ * + * map<string, .google.cloud.visionai.v1.DataSchemaDetails> field_schemas = 1; + * + */ + public com.google.cloud.visionai.v1.DataSchemaDetails.Builder putFieldSchemasBuilderIfAbsent( + java.lang.String key) { + java.util.Map + builderMap = internalGetMutableFieldSchemas().ensureBuilderMap(); + com.google.cloud.visionai.v1.DataSchemaDetailsOrBuilder entry = builderMap.get(key); + if (entry == null) { + entry = com.google.cloud.visionai.v1.DataSchemaDetails.newBuilder(); + builderMap.put(key, entry); + } + if (entry instanceof com.google.cloud.visionai.v1.DataSchemaDetails) { + entry = ((com.google.cloud.visionai.v1.DataSchemaDetails) entry).toBuilder(); + builderMap.put(key, entry); + } + return (com.google.cloud.visionai.v1.DataSchemaDetails.Builder) entry; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.DataSchemaDetails.CustomizedStructConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.DataSchemaDetails.CustomizedStructConfig) + private static final com.google.cloud.visionai.v1.DataSchemaDetails.CustomizedStructConfig + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.visionai.v1.DataSchemaDetails.CustomizedStructConfig(); + } + + public static com.google.cloud.visionai.v1.DataSchemaDetails.CustomizedStructConfig + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CustomizedStructConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.DataSchemaDetails.CustomizedStructConfig + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface SearchStrategyOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.DataSchemaDetails.SearchStrategy) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * The type of search strategy to be applied on the `key` above.
+     * The allowed `search_strategy_type` is different for different data types,
+     * which is documented in the DataSchemaDetails.DataType. Specifying
+     * unsupported `search_strategy_type` for data types will result in
+     * INVALID_ARGUMENT error.
+     * 
+ * + * + * optional .google.cloud.visionai.v1.DataSchemaDetails.SearchStrategy.SearchStrategyType search_strategy_type = 1; + * + * + * @return Whether the searchStrategyType field is set. + */ + boolean hasSearchStrategyType(); + /** + * + * + *
+     * The type of search strategy to be applied on the `key` above.
+     * The allowed `search_strategy_type` is different for different data types,
+     * which is documented in the DataSchemaDetails.DataType. Specifying
+     * unsupported `search_strategy_type` for data types will result in
+     * INVALID_ARGUMENT error.
+     * 
+ * + * + * optional .google.cloud.visionai.v1.DataSchemaDetails.SearchStrategy.SearchStrategyType search_strategy_type = 1; + * + * + * @return The enum numeric value on the wire for searchStrategyType. + */ + int getSearchStrategyTypeValue(); + /** + * + * + *
+     * The type of search strategy to be applied on the `key` above.
+     * The allowed `search_strategy_type` is different for different data types,
+     * which is documented in the DataSchemaDetails.DataType. Specifying
+     * unsupported `search_strategy_type` for data types will result in
+     * INVALID_ARGUMENT error.
+     * 
+ * + * + * optional .google.cloud.visionai.v1.DataSchemaDetails.SearchStrategy.SearchStrategyType search_strategy_type = 1; + * + * + * @return The searchStrategyType. + */ + com.google.cloud.visionai.v1.DataSchemaDetails.SearchStrategy.SearchStrategyType + getSearchStrategyType(); + + /** + * + * + *
+     * Optional. Configs the path to the confidence score, and the threshold.
+     * Only if the score is greater than the threshold, current field will be
+     * built into the index. Only applies to leaf nodes using EXACT_SEARCH or
+     * SMART_SEARCH.
+     * 
+ * + * + * .google.cloud.visionai.v1.DataSchemaDetails.SearchStrategy.ConfidenceScoreIndexConfig confidence_score_index_config = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the confidenceScoreIndexConfig field is set. + */ + boolean hasConfidenceScoreIndexConfig(); + /** + * + * + *
+     * Optional. Configs the path to the confidence score, and the threshold.
+     * Only if the score is greater than the threshold, current field will be
+     * built into the index. Only applies to leaf nodes using EXACT_SEARCH or
+     * SMART_SEARCH.
+     * 
+ * + * + * .google.cloud.visionai.v1.DataSchemaDetails.SearchStrategy.ConfidenceScoreIndexConfig confidence_score_index_config = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The confidenceScoreIndexConfig. + */ + com.google.cloud.visionai.v1.DataSchemaDetails.SearchStrategy.ConfidenceScoreIndexConfig + getConfidenceScoreIndexConfig(); + /** + * + * + *
+     * Optional. Configs the path to the confidence score, and the threshold.
+     * Only if the score is greater than the threshold, current field will be
+     * built into the index. Only applies to leaf nodes using EXACT_SEARCH or
+     * SMART_SEARCH.
+     * 
+ * + * + * .google.cloud.visionai.v1.DataSchemaDetails.SearchStrategy.ConfidenceScoreIndexConfig confidence_score_index_config = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.visionai.v1.DataSchemaDetails.SearchStrategy + .ConfidenceScoreIndexConfigOrBuilder + getConfidenceScoreIndexConfigOrBuilder(); + } + /** + * + * + *
+   * The search strategy for annotations value of the `key`.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.DataSchemaDetails.SearchStrategy} + */ + public static final class SearchStrategy extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.DataSchemaDetails.SearchStrategy) + SearchStrategyOrBuilder { + private static final long serialVersionUID = 0L; + // Use SearchStrategy.newBuilder() to construct. + private SearchStrategy(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private SearchStrategy() { + searchStrategyType_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new SearchStrategy(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_DataSchemaDetails_SearchStrategy_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_DataSchemaDetails_SearchStrategy_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.DataSchemaDetails.SearchStrategy.class, + com.google.cloud.visionai.v1.DataSchemaDetails.SearchStrategy.Builder.class); + } + + /** + * + * + *
+     * The types of search strategies to be applied on the annotation key.
+     * 
+ * + * Protobuf enum {@code + * google.cloud.visionai.v1.DataSchemaDetails.SearchStrategy.SearchStrategyType} + */ + public enum SearchStrategyType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+       * Annotatation values of the `key` above will not be searchable.
+       * 
+ * + * NO_SEARCH = 0; + */ + NO_SEARCH(0), + /** + * + * + *
+       * When searching with `key`, the value must be exactly as the annotation
+       * value that has been ingested.
+       * 
+ * + * EXACT_SEARCH = 1; + */ + EXACT_SEARCH(1), + /** + * + * + *
+       * When searching with `key`, Warehouse will perform broad search based on
+       * semantic of the annotation value.
+       * 
+ * + * SMART_SEARCH = 2; + */ + SMART_SEARCH(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+       * Annotatation values of the `key` above will not be searchable.
+       * 
+ * + * NO_SEARCH = 0; + */ + public static final int NO_SEARCH_VALUE = 0; + /** + * + * + *
+       * When searching with `key`, the value must be exactly as the annotation
+       * value that has been ingested.
+       * 
+ * + * EXACT_SEARCH = 1; + */ + public static final int EXACT_SEARCH_VALUE = 1; + /** + * + * + *
+       * When searching with `key`, Warehouse will perform broad search based on
+       * semantic of the annotation value.
+       * 
+ * + * SMART_SEARCH = 2; + */ + public static final int SMART_SEARCH_VALUE = 2; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static SearchStrategyType valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static SearchStrategyType forNumber(int value) { + switch (value) { + case 0: + return NO_SEARCH; + case 1: + return EXACT_SEARCH; + case 2: + return SMART_SEARCH; + 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 SearchStrategyType findValueByNumber(int number) { + return SearchStrategyType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + 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.visionai.v1.DataSchemaDetails.SearchStrategy.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final SearchStrategyType[] VALUES = values(); + + public static SearchStrategyType 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 SearchStrategyType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.visionai.v1.DataSchemaDetails.SearchStrategy.SearchStrategyType) + } + + public interface ConfidenceScoreIndexConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.DataSchemaDetails.SearchStrategy.ConfidenceScoreIndexConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+       * Required. The path to the confidence score field. It is a string that
+       * concatenates all the data schema keys along the path. See the example
+       * above. If the data schema contains LIST, use '_ENTRIES' to concatenate.
+       * Example data schema contains a list:
+       * "key": "list-name-score",
+       * "schemaDetails": {
+       *   "type": "LIST",
+       *   "granularity": "GRANULARITY_PARTITION_LEVEL",
+       *   "listConfig": {
+       *     "valueSchema": {
+       *       "type": "CUSTOMIZED_STRUCT",
+       *       "granularity": "GRANULARITY_PARTITION_LEVEL",
+       *       "customizedStructConfig": {
+       *         "fieldSchemas": {
+       *           "name": {
+       *             "type": "STRING",
+       *             "granularity": "GRANULARITY_PARTITION_LEVEL",
+       *             "searchStrategy": {
+       *               "searchStrategyType": "SMART_SEARCH"
+       *               "confidence_score_index_config": {
+       *                 "field_path": "list-name-score._ENTRIES.score",
+       *                 "threshold": "0.9",
+       *               }
+       *             }
+       *           },
+       *           "score": {
+       *             "type": "FLOAT",
+       *             "granularity": "GRANULARITY_PARTITION_LEVEL",
+       *           }
+       *         }
+       *       }
+       *     }
+       *   }
+       * }
+       * 
+ * + * string field_path = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The fieldPath. + */ + java.lang.String getFieldPath(); + /** + * + * + *
+       * Required. The path to the confidence score field. It is a string that
+       * concatenates all the data schema keys along the path. See the example
+       * above. If the data schema contains LIST, use '_ENTRIES' to concatenate.
+       * Example data schema contains a list:
+       * "key": "list-name-score",
+       * "schemaDetails": {
+       *   "type": "LIST",
+       *   "granularity": "GRANULARITY_PARTITION_LEVEL",
+       *   "listConfig": {
+       *     "valueSchema": {
+       *       "type": "CUSTOMIZED_STRUCT",
+       *       "granularity": "GRANULARITY_PARTITION_LEVEL",
+       *       "customizedStructConfig": {
+       *         "fieldSchemas": {
+       *           "name": {
+       *             "type": "STRING",
+       *             "granularity": "GRANULARITY_PARTITION_LEVEL",
+       *             "searchStrategy": {
+       *               "searchStrategyType": "SMART_SEARCH"
+       *               "confidence_score_index_config": {
+       *                 "field_path": "list-name-score._ENTRIES.score",
+       *                 "threshold": "0.9",
+       *               }
+       *             }
+       *           },
+       *           "score": {
+       *             "type": "FLOAT",
+       *             "granularity": "GRANULARITY_PARTITION_LEVEL",
+       *           }
+       *         }
+       *       }
+       *     }
+       *   }
+       * }
+       * 
+ * + * string field_path = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for fieldPath. + */ + com.google.protobuf.ByteString getFieldPathBytes(); + + /** + * + * + *
+       * Required. The threshold.
+       * 
+ * + * float threshold = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The threshold. + */ + float getThreshold(); + } + /** + * + * + *
+     * Filter on the confidence score. Only adds to index if the confidence
+     * score is higher than the threshold.
+     * Example data schema:
+     * key: "name-confidence-pair"
+     * type: CUSTOMIZED_STRUCT
+     * granularity: GRANULARITY_PARTITION_LEVEL
+     * customized_struct_config {
+     *   field_schemas {
+     *     key: "name"
+     *     type: STRING
+     *     granularity: GRANULARITY_PARTITION_LEVEL
+     *     search_strategy {
+     *       search_strategy_type: SMART_SEARCH
+     *       confidence_score_index_config {
+     *         field_path: "name-confidence-pair.score"
+     *         threshold: 0.6
+     *       }
+     *     }
+     *   }
+     *   field_schemas {
+     *     key: "score"
+     *     type: FLOAT
+     *     granularity: GRANULARITY_PARTITION_LEVEL
+     *   }
+     * }
+     * This means only "name" with score > 0.6 will be indexed.
+     * 
+ * + * Protobuf type {@code + * google.cloud.visionai.v1.DataSchemaDetails.SearchStrategy.ConfidenceScoreIndexConfig} + */ + public static final class ConfidenceScoreIndexConfig + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.DataSchemaDetails.SearchStrategy.ConfidenceScoreIndexConfig) + ConfidenceScoreIndexConfigOrBuilder { + private static final long serialVersionUID = 0L; + // Use ConfidenceScoreIndexConfig.newBuilder() to construct. + private ConfidenceScoreIndexConfig( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ConfidenceScoreIndexConfig() { + fieldPath_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ConfidenceScoreIndexConfig(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_DataSchemaDetails_SearchStrategy_ConfidenceScoreIndexConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_DataSchemaDetails_SearchStrategy_ConfidenceScoreIndexConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.DataSchemaDetails.SearchStrategy + .ConfidenceScoreIndexConfig.class, + com.google.cloud.visionai.v1.DataSchemaDetails.SearchStrategy + .ConfidenceScoreIndexConfig.Builder.class); + } + + public static final int FIELD_PATH_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object fieldPath_ = ""; + /** + * + * + *
+       * Required. The path to the confidence score field. It is a string that
+       * concatenates all the data schema keys along the path. See the example
+       * above. If the data schema contains LIST, use '_ENTRIES' to concatenate.
+       * Example data schema contains a list:
+       * "key": "list-name-score",
+       * "schemaDetails": {
+       *   "type": "LIST",
+       *   "granularity": "GRANULARITY_PARTITION_LEVEL",
+       *   "listConfig": {
+       *     "valueSchema": {
+       *       "type": "CUSTOMIZED_STRUCT",
+       *       "granularity": "GRANULARITY_PARTITION_LEVEL",
+       *       "customizedStructConfig": {
+       *         "fieldSchemas": {
+       *           "name": {
+       *             "type": "STRING",
+       *             "granularity": "GRANULARITY_PARTITION_LEVEL",
+       *             "searchStrategy": {
+       *               "searchStrategyType": "SMART_SEARCH"
+       *               "confidence_score_index_config": {
+       *                 "field_path": "list-name-score._ENTRIES.score",
+       *                 "threshold": "0.9",
+       *               }
+       *             }
+       *           },
+       *           "score": {
+       *             "type": "FLOAT",
+       *             "granularity": "GRANULARITY_PARTITION_LEVEL",
+       *           }
+       *         }
+       *       }
+       *     }
+       *   }
+       * }
+       * 
+ * + * string field_path = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The fieldPath. + */ + @java.lang.Override + public java.lang.String getFieldPath() { + java.lang.Object ref = fieldPath_; + 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(); + fieldPath_ = s; + return s; + } + } + /** + * + * + *
+       * Required. The path to the confidence score field. It is a string that
+       * concatenates all the data schema keys along the path. See the example
+       * above. If the data schema contains LIST, use '_ENTRIES' to concatenate.
+       * Example data schema contains a list:
+       * "key": "list-name-score",
+       * "schemaDetails": {
+       *   "type": "LIST",
+       *   "granularity": "GRANULARITY_PARTITION_LEVEL",
+       *   "listConfig": {
+       *     "valueSchema": {
+       *       "type": "CUSTOMIZED_STRUCT",
+       *       "granularity": "GRANULARITY_PARTITION_LEVEL",
+       *       "customizedStructConfig": {
+       *         "fieldSchemas": {
+       *           "name": {
+       *             "type": "STRING",
+       *             "granularity": "GRANULARITY_PARTITION_LEVEL",
+       *             "searchStrategy": {
+       *               "searchStrategyType": "SMART_SEARCH"
+       *               "confidence_score_index_config": {
+       *                 "field_path": "list-name-score._ENTRIES.score",
+       *                 "threshold": "0.9",
+       *               }
+       *             }
+       *           },
+       *           "score": {
+       *             "type": "FLOAT",
+       *             "granularity": "GRANULARITY_PARTITION_LEVEL",
+       *           }
+       *         }
+       *       }
+       *     }
+       *   }
+       * }
+       * 
+ * + * string field_path = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for fieldPath. + */ + @java.lang.Override + public com.google.protobuf.ByteString getFieldPathBytes() { + java.lang.Object ref = fieldPath_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + fieldPath_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int THRESHOLD_FIELD_NUMBER = 2; + private float threshold_ = 0F; + /** + * + * + *
+       * Required. The threshold.
+       * 
+ * + * float threshold = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The threshold. + */ + @java.lang.Override + public float getThreshold() { + return threshold_; + } + + 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(fieldPath_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, fieldPath_); + } + if (java.lang.Float.floatToRawIntBits(threshold_) != 0) { + output.writeFloat(2, threshold_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(fieldPath_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, fieldPath_); + } + if (java.lang.Float.floatToRawIntBits(threshold_) != 0) { + size += com.google.protobuf.CodedOutputStream.computeFloatSize(2, threshold_); + } + size += getUnknownFields().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.visionai.v1.DataSchemaDetails.SearchStrategy + .ConfidenceScoreIndexConfig)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.DataSchemaDetails.SearchStrategy.ConfidenceScoreIndexConfig + other = + (com.google.cloud.visionai.v1.DataSchemaDetails.SearchStrategy + .ConfidenceScoreIndexConfig) + obj; + + if (!getFieldPath().equals(other.getFieldPath())) return false; + if (java.lang.Float.floatToIntBits(getThreshold()) + != java.lang.Float.floatToIntBits(other.getThreshold())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + FIELD_PATH_FIELD_NUMBER; + hash = (53 * hash) + getFieldPath().hashCode(); + hash = (37 * hash) + THRESHOLD_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits(getThreshold()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.DataSchemaDetails.SearchStrategy + .ConfidenceScoreIndexConfig + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.DataSchemaDetails.SearchStrategy + .ConfidenceScoreIndexConfig + 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.visionai.v1.DataSchemaDetails.SearchStrategy + .ConfidenceScoreIndexConfig + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.DataSchemaDetails.SearchStrategy + .ConfidenceScoreIndexConfig + 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.visionai.v1.DataSchemaDetails.SearchStrategy + .ConfidenceScoreIndexConfig + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.DataSchemaDetails.SearchStrategy + .ConfidenceScoreIndexConfig + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.DataSchemaDetails.SearchStrategy + .ConfidenceScoreIndexConfig + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.DataSchemaDetails.SearchStrategy + .ConfidenceScoreIndexConfig + 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.visionai.v1.DataSchemaDetails.SearchStrategy + .ConfidenceScoreIndexConfig + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.DataSchemaDetails.SearchStrategy + .ConfidenceScoreIndexConfig + 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.visionai.v1.DataSchemaDetails.SearchStrategy + .ConfidenceScoreIndexConfig + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.DataSchemaDetails.SearchStrategy + .ConfidenceScoreIndexConfig + 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.visionai.v1.DataSchemaDetails.SearchStrategy.ConfidenceScoreIndexConfig + 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; + } + /** + * + * + *
+       * Filter on the confidence score. Only adds to index if the confidence
+       * score is higher than the threshold.
+       * Example data schema:
+       * key: "name-confidence-pair"
+       * type: CUSTOMIZED_STRUCT
+       * granularity: GRANULARITY_PARTITION_LEVEL
+       * customized_struct_config {
+       *   field_schemas {
+       *     key: "name"
+       *     type: STRING
+       *     granularity: GRANULARITY_PARTITION_LEVEL
+       *     search_strategy {
+       *       search_strategy_type: SMART_SEARCH
+       *       confidence_score_index_config {
+       *         field_path: "name-confidence-pair.score"
+       *         threshold: 0.6
+       *       }
+       *     }
+       *   }
+       *   field_schemas {
+       *     key: "score"
+       *     type: FLOAT
+       *     granularity: GRANULARITY_PARTITION_LEVEL
+       *   }
+       * }
+       * This means only "name" with score > 0.6 will be indexed.
+       * 
+ * + * Protobuf type {@code + * google.cloud.visionai.v1.DataSchemaDetails.SearchStrategy.ConfidenceScoreIndexConfig} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.DataSchemaDetails.SearchStrategy.ConfidenceScoreIndexConfig) + com.google.cloud.visionai.v1.DataSchemaDetails.SearchStrategy + .ConfidenceScoreIndexConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_DataSchemaDetails_SearchStrategy_ConfidenceScoreIndexConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_DataSchemaDetails_SearchStrategy_ConfidenceScoreIndexConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.DataSchemaDetails.SearchStrategy + .ConfidenceScoreIndexConfig.class, + com.google.cloud.visionai.v1.DataSchemaDetails.SearchStrategy + .ConfidenceScoreIndexConfig.Builder.class); + } + + // Construct using + // com.google.cloud.visionai.v1.DataSchemaDetails.SearchStrategy.ConfidenceScoreIndexConfig.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + fieldPath_ = ""; + threshold_ = 0F; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_DataSchemaDetails_SearchStrategy_ConfidenceScoreIndexConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.DataSchemaDetails.SearchStrategy + .ConfidenceScoreIndexConfig + getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.DataSchemaDetails.SearchStrategy + .ConfidenceScoreIndexConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.DataSchemaDetails.SearchStrategy + .ConfidenceScoreIndexConfig + build() { + com.google.cloud.visionai.v1.DataSchemaDetails.SearchStrategy.ConfidenceScoreIndexConfig + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.DataSchemaDetails.SearchStrategy + .ConfidenceScoreIndexConfig + buildPartial() { + com.google.cloud.visionai.v1.DataSchemaDetails.SearchStrategy.ConfidenceScoreIndexConfig + result = + new com.google.cloud.visionai.v1.DataSchemaDetails.SearchStrategy + .ConfidenceScoreIndexConfig(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.visionai.v1.DataSchemaDetails.SearchStrategy.ConfidenceScoreIndexConfig + result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.fieldPath_ = fieldPath_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.threshold_ = threshold_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.visionai.v1.DataSchemaDetails.SearchStrategy + .ConfidenceScoreIndexConfig) { + return mergeFrom( + (com.google.cloud.visionai.v1.DataSchemaDetails.SearchStrategy + .ConfidenceScoreIndexConfig) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.visionai.v1.DataSchemaDetails.SearchStrategy.ConfidenceScoreIndexConfig + other) { + if (other + == com.google.cloud.visionai.v1.DataSchemaDetails.SearchStrategy + .ConfidenceScoreIndexConfig.getDefaultInstance()) return this; + if (!other.getFieldPath().isEmpty()) { + fieldPath_ = other.fieldPath_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getThreshold() != 0F) { + setThreshold(other.getThreshold()); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + fieldPath_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 21: + { + threshold_ = input.readFloat(); + bitField0_ |= 0x00000002; + break; + } // case 21 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object fieldPath_ = ""; + /** + * + * + *
+         * Required. The path to the confidence score field. It is a string that
+         * concatenates all the data schema keys along the path. See the example
+         * above. If the data schema contains LIST, use '_ENTRIES' to concatenate.
+         * Example data schema contains a list:
+         * "key": "list-name-score",
+         * "schemaDetails": {
+         *   "type": "LIST",
+         *   "granularity": "GRANULARITY_PARTITION_LEVEL",
+         *   "listConfig": {
+         *     "valueSchema": {
+         *       "type": "CUSTOMIZED_STRUCT",
+         *       "granularity": "GRANULARITY_PARTITION_LEVEL",
+         *       "customizedStructConfig": {
+         *         "fieldSchemas": {
+         *           "name": {
+         *             "type": "STRING",
+         *             "granularity": "GRANULARITY_PARTITION_LEVEL",
+         *             "searchStrategy": {
+         *               "searchStrategyType": "SMART_SEARCH"
+         *               "confidence_score_index_config": {
+         *                 "field_path": "list-name-score._ENTRIES.score",
+         *                 "threshold": "0.9",
+         *               }
+         *             }
+         *           },
+         *           "score": {
+         *             "type": "FLOAT",
+         *             "granularity": "GRANULARITY_PARTITION_LEVEL",
+         *           }
+         *         }
+         *       }
+         *     }
+         *   }
+         * }
+         * 
+ * + * string field_path = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The fieldPath. + */ + public java.lang.String getFieldPath() { + java.lang.Object ref = fieldPath_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + fieldPath_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+         * Required. The path to the confidence score field. It is a string that
+         * concatenates all the data schema keys along the path. See the example
+         * above. If the data schema contains LIST, use '_ENTRIES' to concatenate.
+         * Example data schema contains a list:
+         * "key": "list-name-score",
+         * "schemaDetails": {
+         *   "type": "LIST",
+         *   "granularity": "GRANULARITY_PARTITION_LEVEL",
+         *   "listConfig": {
+         *     "valueSchema": {
+         *       "type": "CUSTOMIZED_STRUCT",
+         *       "granularity": "GRANULARITY_PARTITION_LEVEL",
+         *       "customizedStructConfig": {
+         *         "fieldSchemas": {
+         *           "name": {
+         *             "type": "STRING",
+         *             "granularity": "GRANULARITY_PARTITION_LEVEL",
+         *             "searchStrategy": {
+         *               "searchStrategyType": "SMART_SEARCH"
+         *               "confidence_score_index_config": {
+         *                 "field_path": "list-name-score._ENTRIES.score",
+         *                 "threshold": "0.9",
+         *               }
+         *             }
+         *           },
+         *           "score": {
+         *             "type": "FLOAT",
+         *             "granularity": "GRANULARITY_PARTITION_LEVEL",
+         *           }
+         *         }
+         *       }
+         *     }
+         *   }
+         * }
+         * 
+ * + * string field_path = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for fieldPath. + */ + public com.google.protobuf.ByteString getFieldPathBytes() { + java.lang.Object ref = fieldPath_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + fieldPath_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+         * Required. The path to the confidence score field. It is a string that
+         * concatenates all the data schema keys along the path. See the example
+         * above. If the data schema contains LIST, use '_ENTRIES' to concatenate.
+         * Example data schema contains a list:
+         * "key": "list-name-score",
+         * "schemaDetails": {
+         *   "type": "LIST",
+         *   "granularity": "GRANULARITY_PARTITION_LEVEL",
+         *   "listConfig": {
+         *     "valueSchema": {
+         *       "type": "CUSTOMIZED_STRUCT",
+         *       "granularity": "GRANULARITY_PARTITION_LEVEL",
+         *       "customizedStructConfig": {
+         *         "fieldSchemas": {
+         *           "name": {
+         *             "type": "STRING",
+         *             "granularity": "GRANULARITY_PARTITION_LEVEL",
+         *             "searchStrategy": {
+         *               "searchStrategyType": "SMART_SEARCH"
+         *               "confidence_score_index_config": {
+         *                 "field_path": "list-name-score._ENTRIES.score",
+         *                 "threshold": "0.9",
+         *               }
+         *             }
+         *           },
+         *           "score": {
+         *             "type": "FLOAT",
+         *             "granularity": "GRANULARITY_PARTITION_LEVEL",
+         *           }
+         *         }
+         *       }
+         *     }
+         *   }
+         * }
+         * 
+ * + * string field_path = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The fieldPath to set. + * @return This builder for chaining. + */ + public Builder setFieldPath(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + fieldPath_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+         * Required. The path to the confidence score field. It is a string that
+         * concatenates all the data schema keys along the path. See the example
+         * above. If the data schema contains LIST, use '_ENTRIES' to concatenate.
+         * Example data schema contains a list:
+         * "key": "list-name-score",
+         * "schemaDetails": {
+         *   "type": "LIST",
+         *   "granularity": "GRANULARITY_PARTITION_LEVEL",
+         *   "listConfig": {
+         *     "valueSchema": {
+         *       "type": "CUSTOMIZED_STRUCT",
+         *       "granularity": "GRANULARITY_PARTITION_LEVEL",
+         *       "customizedStructConfig": {
+         *         "fieldSchemas": {
+         *           "name": {
+         *             "type": "STRING",
+         *             "granularity": "GRANULARITY_PARTITION_LEVEL",
+         *             "searchStrategy": {
+         *               "searchStrategyType": "SMART_SEARCH"
+         *               "confidence_score_index_config": {
+         *                 "field_path": "list-name-score._ENTRIES.score",
+         *                 "threshold": "0.9",
+         *               }
+         *             }
+         *           },
+         *           "score": {
+         *             "type": "FLOAT",
+         *             "granularity": "GRANULARITY_PARTITION_LEVEL",
+         *           }
+         *         }
+         *       }
+         *     }
+         *   }
+         * }
+         * 
+ * + * string field_path = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearFieldPath() { + fieldPath_ = getDefaultInstance().getFieldPath(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+         * Required. The path to the confidence score field. It is a string that
+         * concatenates all the data schema keys along the path. See the example
+         * above. If the data schema contains LIST, use '_ENTRIES' to concatenate.
+         * Example data schema contains a list:
+         * "key": "list-name-score",
+         * "schemaDetails": {
+         *   "type": "LIST",
+         *   "granularity": "GRANULARITY_PARTITION_LEVEL",
+         *   "listConfig": {
+         *     "valueSchema": {
+         *       "type": "CUSTOMIZED_STRUCT",
+         *       "granularity": "GRANULARITY_PARTITION_LEVEL",
+         *       "customizedStructConfig": {
+         *         "fieldSchemas": {
+         *           "name": {
+         *             "type": "STRING",
+         *             "granularity": "GRANULARITY_PARTITION_LEVEL",
+         *             "searchStrategy": {
+         *               "searchStrategyType": "SMART_SEARCH"
+         *               "confidence_score_index_config": {
+         *                 "field_path": "list-name-score._ENTRIES.score",
+         *                 "threshold": "0.9",
+         *               }
+         *             }
+         *           },
+         *           "score": {
+         *             "type": "FLOAT",
+         *             "granularity": "GRANULARITY_PARTITION_LEVEL",
+         *           }
+         *         }
+         *       }
+         *     }
+         *   }
+         * }
+         * 
+ * + * string field_path = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for fieldPath to set. + * @return This builder for chaining. + */ + public Builder setFieldPathBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + fieldPath_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private float threshold_; + /** + * + * + *
+         * Required. The threshold.
+         * 
+ * + * float threshold = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The threshold. + */ + @java.lang.Override + public float getThreshold() { + return threshold_; + } + /** + * + * + *
+         * Required. The threshold.
+         * 
+ * + * float threshold = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The threshold to set. + * @return This builder for chaining. + */ + public Builder setThreshold(float value) { + + threshold_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+         * Required. The threshold.
+         * 
+ * + * float threshold = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearThreshold() { + bitField0_ = (bitField0_ & ~0x00000002); + threshold_ = 0F; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.DataSchemaDetails.SearchStrategy.ConfidenceScoreIndexConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.DataSchemaDetails.SearchStrategy.ConfidenceScoreIndexConfig) + private static final com.google.cloud.visionai.v1.DataSchemaDetails.SearchStrategy + .ConfidenceScoreIndexConfig + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.visionai.v1.DataSchemaDetails.SearchStrategy + .ConfidenceScoreIndexConfig(); + } + + public static com.google.cloud.visionai.v1.DataSchemaDetails.SearchStrategy + .ConfidenceScoreIndexConfig + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ConfidenceScoreIndexConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.DataSchemaDetails.SearchStrategy + .ConfidenceScoreIndexConfig + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int bitField0_; + public static final int SEARCH_STRATEGY_TYPE_FIELD_NUMBER = 1; + private int searchStrategyType_ = 0; + /** + * + * + *
+     * The type of search strategy to be applied on the `key` above.
+     * The allowed `search_strategy_type` is different for different data types,
+     * which is documented in the DataSchemaDetails.DataType. Specifying
+     * unsupported `search_strategy_type` for data types will result in
+     * INVALID_ARGUMENT error.
+     * 
+ * + * + * optional .google.cloud.visionai.v1.DataSchemaDetails.SearchStrategy.SearchStrategyType search_strategy_type = 1; + * + * + * @return Whether the searchStrategyType field is set. + */ + @java.lang.Override + public boolean hasSearchStrategyType() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * The type of search strategy to be applied on the `key` above.
+     * The allowed `search_strategy_type` is different for different data types,
+     * which is documented in the DataSchemaDetails.DataType. Specifying
+     * unsupported `search_strategy_type` for data types will result in
+     * INVALID_ARGUMENT error.
+     * 
+ * + * + * optional .google.cloud.visionai.v1.DataSchemaDetails.SearchStrategy.SearchStrategyType search_strategy_type = 1; + * + * + * @return The enum numeric value on the wire for searchStrategyType. + */ + @java.lang.Override + public int getSearchStrategyTypeValue() { + return searchStrategyType_; + } + /** + * + * + *
+     * The type of search strategy to be applied on the `key` above.
+     * The allowed `search_strategy_type` is different for different data types,
+     * which is documented in the DataSchemaDetails.DataType. Specifying
+     * unsupported `search_strategy_type` for data types will result in
+     * INVALID_ARGUMENT error.
+     * 
+ * + * + * optional .google.cloud.visionai.v1.DataSchemaDetails.SearchStrategy.SearchStrategyType search_strategy_type = 1; + * + * + * @return The searchStrategyType. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.DataSchemaDetails.SearchStrategy.SearchStrategyType + getSearchStrategyType() { + com.google.cloud.visionai.v1.DataSchemaDetails.SearchStrategy.SearchStrategyType result = + com.google.cloud.visionai.v1.DataSchemaDetails.SearchStrategy.SearchStrategyType + .forNumber(searchStrategyType_); + return result == null + ? com.google.cloud.visionai.v1.DataSchemaDetails.SearchStrategy.SearchStrategyType + .UNRECOGNIZED + : result; + } + + public static final int CONFIDENCE_SCORE_INDEX_CONFIG_FIELD_NUMBER = 2; + private com.google.cloud.visionai.v1.DataSchemaDetails.SearchStrategy.ConfidenceScoreIndexConfig + confidenceScoreIndexConfig_; + /** + * + * + *
+     * Optional. Configs the path to the confidence score, and the threshold.
+     * Only if the score is greater than the threshold, current field will be
+     * built into the index. Only applies to leaf nodes using EXACT_SEARCH or
+     * SMART_SEARCH.
+     * 
+ * + * + * .google.cloud.visionai.v1.DataSchemaDetails.SearchStrategy.ConfidenceScoreIndexConfig confidence_score_index_config = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the confidenceScoreIndexConfig field is set. + */ + @java.lang.Override + public boolean hasConfidenceScoreIndexConfig() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * Optional. Configs the path to the confidence score, and the threshold.
+     * Only if the score is greater than the threshold, current field will be
+     * built into the index. Only applies to leaf nodes using EXACT_SEARCH or
+     * SMART_SEARCH.
+     * 
+ * + * + * .google.cloud.visionai.v1.DataSchemaDetails.SearchStrategy.ConfidenceScoreIndexConfig confidence_score_index_config = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The confidenceScoreIndexConfig. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.DataSchemaDetails.SearchStrategy.ConfidenceScoreIndexConfig + getConfidenceScoreIndexConfig() { + return confidenceScoreIndexConfig_ == null + ? com.google.cloud.visionai.v1.DataSchemaDetails.SearchStrategy.ConfidenceScoreIndexConfig + .getDefaultInstance() + : confidenceScoreIndexConfig_; + } + /** + * + * + *
+     * Optional. Configs the path to the confidence score, and the threshold.
+     * Only if the score is greater than the threshold, current field will be
+     * built into the index. Only applies to leaf nodes using EXACT_SEARCH or
+     * SMART_SEARCH.
+     * 
+ * + * + * .google.cloud.visionai.v1.DataSchemaDetails.SearchStrategy.ConfidenceScoreIndexConfig confidence_score_index_config = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.visionai.v1.DataSchemaDetails.SearchStrategy + .ConfidenceScoreIndexConfigOrBuilder + getConfidenceScoreIndexConfigOrBuilder() { + return confidenceScoreIndexConfig_ == null + ? com.google.cloud.visionai.v1.DataSchemaDetails.SearchStrategy.ConfidenceScoreIndexConfig + .getDefaultInstance() + : confidenceScoreIndexConfig_; + } + + 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 (((bitField0_ & 0x00000001) != 0)) { + output.writeEnum(1, searchStrategyType_); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(2, getConfidenceScoreIndexConfig()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, searchStrategyType_); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 2, getConfidenceScoreIndexConfig()); + } + size += getUnknownFields().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.visionai.v1.DataSchemaDetails.SearchStrategy)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.DataSchemaDetails.SearchStrategy other = + (com.google.cloud.visionai.v1.DataSchemaDetails.SearchStrategy) obj; + + if (hasSearchStrategyType() != other.hasSearchStrategyType()) return false; + if (hasSearchStrategyType()) { + if (searchStrategyType_ != other.searchStrategyType_) return false; + } + if (hasConfidenceScoreIndexConfig() != other.hasConfidenceScoreIndexConfig()) return false; + if (hasConfidenceScoreIndexConfig()) { + if (!getConfidenceScoreIndexConfig().equals(other.getConfidenceScoreIndexConfig())) + return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasSearchStrategyType()) { + hash = (37 * hash) + SEARCH_STRATEGY_TYPE_FIELD_NUMBER; + hash = (53 * hash) + searchStrategyType_; + } + if (hasConfidenceScoreIndexConfig()) { + hash = (37 * hash) + CONFIDENCE_SCORE_INDEX_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getConfidenceScoreIndexConfig().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.DataSchemaDetails.SearchStrategy parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.DataSchemaDetails.SearchStrategy 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.visionai.v1.DataSchemaDetails.SearchStrategy parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.DataSchemaDetails.SearchStrategy 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.visionai.v1.DataSchemaDetails.SearchStrategy parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.DataSchemaDetails.SearchStrategy parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.DataSchemaDetails.SearchStrategy parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.DataSchemaDetails.SearchStrategy 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.visionai.v1.DataSchemaDetails.SearchStrategy parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.DataSchemaDetails.SearchStrategy 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.visionai.v1.DataSchemaDetails.SearchStrategy parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.DataSchemaDetails.SearchStrategy 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.visionai.v1.DataSchemaDetails.SearchStrategy 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 search strategy for annotations value of the `key`.
+     * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.DataSchemaDetails.SearchStrategy} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.DataSchemaDetails.SearchStrategy) + com.google.cloud.visionai.v1.DataSchemaDetails.SearchStrategyOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_DataSchemaDetails_SearchStrategy_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_DataSchemaDetails_SearchStrategy_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.DataSchemaDetails.SearchStrategy.class, + com.google.cloud.visionai.v1.DataSchemaDetails.SearchStrategy.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.DataSchemaDetails.SearchStrategy.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getConfidenceScoreIndexConfigFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + searchStrategyType_ = 0; + confidenceScoreIndexConfig_ = null; + if (confidenceScoreIndexConfigBuilder_ != null) { + confidenceScoreIndexConfigBuilder_.dispose(); + confidenceScoreIndexConfigBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_DataSchemaDetails_SearchStrategy_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.DataSchemaDetails.SearchStrategy + getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.DataSchemaDetails.SearchStrategy.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.DataSchemaDetails.SearchStrategy build() { + com.google.cloud.visionai.v1.DataSchemaDetails.SearchStrategy result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.DataSchemaDetails.SearchStrategy buildPartial() { + com.google.cloud.visionai.v1.DataSchemaDetails.SearchStrategy result = + new com.google.cloud.visionai.v1.DataSchemaDetails.SearchStrategy(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.visionai.v1.DataSchemaDetails.SearchStrategy result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.searchStrategyType_ = searchStrategyType_; + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.confidenceScoreIndexConfig_ = + confidenceScoreIndexConfigBuilder_ == null + ? confidenceScoreIndexConfig_ + : confidenceScoreIndexConfigBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.DataSchemaDetails.SearchStrategy) { + return mergeFrom((com.google.cloud.visionai.v1.DataSchemaDetails.SearchStrategy) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.visionai.v1.DataSchemaDetails.SearchStrategy other) { + if (other + == com.google.cloud.visionai.v1.DataSchemaDetails.SearchStrategy.getDefaultInstance()) + return this; + if (other.hasSearchStrategyType()) { + setSearchStrategyType(other.getSearchStrategyType()); + } + if (other.hasConfidenceScoreIndexConfig()) { + mergeConfidenceScoreIndexConfig(other.getConfidenceScoreIndexConfig()); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + searchStrategyType_ = input.readEnum(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 18: + { + input.readMessage( + getConfidenceScoreIndexConfigFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private int searchStrategyType_ = 0; + /** + * + * + *
+       * The type of search strategy to be applied on the `key` above.
+       * The allowed `search_strategy_type` is different for different data types,
+       * which is documented in the DataSchemaDetails.DataType. Specifying
+       * unsupported `search_strategy_type` for data types will result in
+       * INVALID_ARGUMENT error.
+       * 
+ * + * + * optional .google.cloud.visionai.v1.DataSchemaDetails.SearchStrategy.SearchStrategyType search_strategy_type = 1; + * + * + * @return Whether the searchStrategyType field is set. + */ + @java.lang.Override + public boolean hasSearchStrategyType() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+       * The type of search strategy to be applied on the `key` above.
+       * The allowed `search_strategy_type` is different for different data types,
+       * which is documented in the DataSchemaDetails.DataType. Specifying
+       * unsupported `search_strategy_type` for data types will result in
+       * INVALID_ARGUMENT error.
+       * 
+ * + * + * optional .google.cloud.visionai.v1.DataSchemaDetails.SearchStrategy.SearchStrategyType search_strategy_type = 1; + * + * + * @return The enum numeric value on the wire for searchStrategyType. + */ + @java.lang.Override + public int getSearchStrategyTypeValue() { + return searchStrategyType_; + } + /** + * + * + *
+       * The type of search strategy to be applied on the `key` above.
+       * The allowed `search_strategy_type` is different for different data types,
+       * which is documented in the DataSchemaDetails.DataType. Specifying
+       * unsupported `search_strategy_type` for data types will result in
+       * INVALID_ARGUMENT error.
+       * 
+ * + * + * optional .google.cloud.visionai.v1.DataSchemaDetails.SearchStrategy.SearchStrategyType search_strategy_type = 1; + * + * + * @param value The enum numeric value on the wire for searchStrategyType to set. + * @return This builder for chaining. + */ + public Builder setSearchStrategyTypeValue(int value) { + searchStrategyType_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * The type of search strategy to be applied on the `key` above.
+       * The allowed `search_strategy_type` is different for different data types,
+       * which is documented in the DataSchemaDetails.DataType. Specifying
+       * unsupported `search_strategy_type` for data types will result in
+       * INVALID_ARGUMENT error.
+       * 
+ * + * + * optional .google.cloud.visionai.v1.DataSchemaDetails.SearchStrategy.SearchStrategyType search_strategy_type = 1; + * + * + * @return The searchStrategyType. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.DataSchemaDetails.SearchStrategy.SearchStrategyType + getSearchStrategyType() { + com.google.cloud.visionai.v1.DataSchemaDetails.SearchStrategy.SearchStrategyType result = + com.google.cloud.visionai.v1.DataSchemaDetails.SearchStrategy.SearchStrategyType + .forNumber(searchStrategyType_); + return result == null + ? com.google.cloud.visionai.v1.DataSchemaDetails.SearchStrategy.SearchStrategyType + .UNRECOGNIZED + : result; + } + /** + * + * + *
+       * The type of search strategy to be applied on the `key` above.
+       * The allowed `search_strategy_type` is different for different data types,
+       * which is documented in the DataSchemaDetails.DataType. Specifying
+       * unsupported `search_strategy_type` for data types will result in
+       * INVALID_ARGUMENT error.
+       * 
+ * + * + * optional .google.cloud.visionai.v1.DataSchemaDetails.SearchStrategy.SearchStrategyType search_strategy_type = 1; + * + * + * @param value The searchStrategyType to set. + * @return This builder for chaining. + */ + public Builder setSearchStrategyType( + com.google.cloud.visionai.v1.DataSchemaDetails.SearchStrategy.SearchStrategyType value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + searchStrategyType_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+       * The type of search strategy to be applied on the `key` above.
+       * The allowed `search_strategy_type` is different for different data types,
+       * which is documented in the DataSchemaDetails.DataType. Specifying
+       * unsupported `search_strategy_type` for data types will result in
+       * INVALID_ARGUMENT error.
+       * 
+ * + * + * optional .google.cloud.visionai.v1.DataSchemaDetails.SearchStrategy.SearchStrategyType search_strategy_type = 1; + * + * + * @return This builder for chaining. + */ + public Builder clearSearchStrategyType() { + bitField0_ = (bitField0_ & ~0x00000001); + searchStrategyType_ = 0; + onChanged(); + return this; + } + + private com.google.cloud.visionai.v1.DataSchemaDetails.SearchStrategy + .ConfidenceScoreIndexConfig + confidenceScoreIndexConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.DataSchemaDetails.SearchStrategy + .ConfidenceScoreIndexConfig, + com.google.cloud.visionai.v1.DataSchemaDetails.SearchStrategy + .ConfidenceScoreIndexConfig.Builder, + com.google.cloud.visionai.v1.DataSchemaDetails.SearchStrategy + .ConfidenceScoreIndexConfigOrBuilder> + confidenceScoreIndexConfigBuilder_; + /** + * + * + *
+       * Optional. Configs the path to the confidence score, and the threshold.
+       * Only if the score is greater than the threshold, current field will be
+       * built into the index. Only applies to leaf nodes using EXACT_SEARCH or
+       * SMART_SEARCH.
+       * 
+ * + * + * .google.cloud.visionai.v1.DataSchemaDetails.SearchStrategy.ConfidenceScoreIndexConfig confidence_score_index_config = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the confidenceScoreIndexConfig field is set. + */ + public boolean hasConfidenceScoreIndexConfig() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+       * Optional. Configs the path to the confidence score, and the threshold.
+       * Only if the score is greater than the threshold, current field will be
+       * built into the index. Only applies to leaf nodes using EXACT_SEARCH or
+       * SMART_SEARCH.
+       * 
+ * + * + * .google.cloud.visionai.v1.DataSchemaDetails.SearchStrategy.ConfidenceScoreIndexConfig confidence_score_index_config = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The confidenceScoreIndexConfig. + */ + public com.google.cloud.visionai.v1.DataSchemaDetails.SearchStrategy + .ConfidenceScoreIndexConfig + getConfidenceScoreIndexConfig() { + if (confidenceScoreIndexConfigBuilder_ == null) { + return confidenceScoreIndexConfig_ == null + ? com.google.cloud.visionai.v1.DataSchemaDetails.SearchStrategy + .ConfidenceScoreIndexConfig.getDefaultInstance() + : confidenceScoreIndexConfig_; + } else { + return confidenceScoreIndexConfigBuilder_.getMessage(); + } + } + /** + * + * + *
+       * Optional. Configs the path to the confidence score, and the threshold.
+       * Only if the score is greater than the threshold, current field will be
+       * built into the index. Only applies to leaf nodes using EXACT_SEARCH or
+       * SMART_SEARCH.
+       * 
+ * + * + * .google.cloud.visionai.v1.DataSchemaDetails.SearchStrategy.ConfidenceScoreIndexConfig confidence_score_index_config = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setConfidenceScoreIndexConfig( + com.google.cloud.visionai.v1.DataSchemaDetails.SearchStrategy.ConfidenceScoreIndexConfig + value) { + if (confidenceScoreIndexConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + confidenceScoreIndexConfig_ = value; + } else { + confidenceScoreIndexConfigBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * Optional. Configs the path to the confidence score, and the threshold.
+       * Only if the score is greater than the threshold, current field will be
+       * built into the index. Only applies to leaf nodes using EXACT_SEARCH or
+       * SMART_SEARCH.
+       * 
+ * + * + * .google.cloud.visionai.v1.DataSchemaDetails.SearchStrategy.ConfidenceScoreIndexConfig confidence_score_index_config = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setConfidenceScoreIndexConfig( + com.google.cloud.visionai.v1.DataSchemaDetails.SearchStrategy.ConfidenceScoreIndexConfig + .Builder + builderForValue) { + if (confidenceScoreIndexConfigBuilder_ == null) { + confidenceScoreIndexConfig_ = builderForValue.build(); + } else { + confidenceScoreIndexConfigBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * Optional. Configs the path to the confidence score, and the threshold.
+       * Only if the score is greater than the threshold, current field will be
+       * built into the index. Only applies to leaf nodes using EXACT_SEARCH or
+       * SMART_SEARCH.
+       * 
+ * + * + * .google.cloud.visionai.v1.DataSchemaDetails.SearchStrategy.ConfidenceScoreIndexConfig confidence_score_index_config = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeConfidenceScoreIndexConfig( + com.google.cloud.visionai.v1.DataSchemaDetails.SearchStrategy.ConfidenceScoreIndexConfig + value) { + if (confidenceScoreIndexConfigBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && confidenceScoreIndexConfig_ != null + && confidenceScoreIndexConfig_ + != com.google.cloud.visionai.v1.DataSchemaDetails.SearchStrategy + .ConfidenceScoreIndexConfig.getDefaultInstance()) { + getConfidenceScoreIndexConfigBuilder().mergeFrom(value); + } else { + confidenceScoreIndexConfig_ = value; + } + } else { + confidenceScoreIndexConfigBuilder_.mergeFrom(value); + } + if (confidenceScoreIndexConfig_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + /** + * + * + *
+       * Optional. Configs the path to the confidence score, and the threshold.
+       * Only if the score is greater than the threshold, current field will be
+       * built into the index. Only applies to leaf nodes using EXACT_SEARCH or
+       * SMART_SEARCH.
+       * 
+ * + * + * .google.cloud.visionai.v1.DataSchemaDetails.SearchStrategy.ConfidenceScoreIndexConfig confidence_score_index_config = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearConfidenceScoreIndexConfig() { + bitField0_ = (bitField0_ & ~0x00000002); + confidenceScoreIndexConfig_ = null; + if (confidenceScoreIndexConfigBuilder_ != null) { + confidenceScoreIndexConfigBuilder_.dispose(); + confidenceScoreIndexConfigBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+       * Optional. Configs the path to the confidence score, and the threshold.
+       * Only if the score is greater than the threshold, current field will be
+       * built into the index. Only applies to leaf nodes using EXACT_SEARCH or
+       * SMART_SEARCH.
+       * 
+ * + * + * .google.cloud.visionai.v1.DataSchemaDetails.SearchStrategy.ConfidenceScoreIndexConfig confidence_score_index_config = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.visionai.v1.DataSchemaDetails.SearchStrategy + .ConfidenceScoreIndexConfig.Builder + getConfidenceScoreIndexConfigBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getConfidenceScoreIndexConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Optional. Configs the path to the confidence score, and the threshold.
+       * Only if the score is greater than the threshold, current field will be
+       * built into the index. Only applies to leaf nodes using EXACT_SEARCH or
+       * SMART_SEARCH.
+       * 
+ * + * + * .google.cloud.visionai.v1.DataSchemaDetails.SearchStrategy.ConfidenceScoreIndexConfig confidence_score_index_config = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.visionai.v1.DataSchemaDetails.SearchStrategy + .ConfidenceScoreIndexConfigOrBuilder + getConfidenceScoreIndexConfigOrBuilder() { + if (confidenceScoreIndexConfigBuilder_ != null) { + return confidenceScoreIndexConfigBuilder_.getMessageOrBuilder(); + } else { + return confidenceScoreIndexConfig_ == null + ? com.google.cloud.visionai.v1.DataSchemaDetails.SearchStrategy + .ConfidenceScoreIndexConfig.getDefaultInstance() + : confidenceScoreIndexConfig_; + } + } + /** + * + * + *
+       * Optional. Configs the path to the confidence score, and the threshold.
+       * Only if the score is greater than the threshold, current field will be
+       * built into the index. Only applies to leaf nodes using EXACT_SEARCH or
+       * SMART_SEARCH.
+       * 
+ * + * + * .google.cloud.visionai.v1.DataSchemaDetails.SearchStrategy.ConfidenceScoreIndexConfig confidence_score_index_config = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.DataSchemaDetails.SearchStrategy + .ConfidenceScoreIndexConfig, + com.google.cloud.visionai.v1.DataSchemaDetails.SearchStrategy + .ConfidenceScoreIndexConfig.Builder, + com.google.cloud.visionai.v1.DataSchemaDetails.SearchStrategy + .ConfidenceScoreIndexConfigOrBuilder> + getConfidenceScoreIndexConfigFieldBuilder() { + if (confidenceScoreIndexConfigBuilder_ == null) { + confidenceScoreIndexConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.DataSchemaDetails.SearchStrategy + .ConfidenceScoreIndexConfig, + com.google.cloud.visionai.v1.DataSchemaDetails.SearchStrategy + .ConfidenceScoreIndexConfig.Builder, + com.google.cloud.visionai.v1.DataSchemaDetails.SearchStrategy + .ConfidenceScoreIndexConfigOrBuilder>( + getConfidenceScoreIndexConfig(), getParentForChildren(), isClean()); + confidenceScoreIndexConfig_ = null; + } + return confidenceScoreIndexConfigBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.DataSchemaDetails.SearchStrategy) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.DataSchemaDetails.SearchStrategy) + private static final com.google.cloud.visionai.v1.DataSchemaDetails.SearchStrategy + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.DataSchemaDetails.SearchStrategy(); + } + + public static com.google.cloud.visionai.v1.DataSchemaDetails.SearchStrategy + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SearchStrategy parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.DataSchemaDetails.SearchStrategy + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int bitField0_; + public static final int TYPE_FIELD_NUMBER = 1; + private int type_ = 0; + /** + * + * + *
+   * Type of the annotation.
+   * 
+ * + * optional .google.cloud.visionai.v1.DataSchemaDetails.DataType type = 1; + * + * @return Whether the type field is set. + */ + @java.lang.Override + public boolean hasType() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * Type of the annotation.
+   * 
+ * + * optional .google.cloud.visionai.v1.DataSchemaDetails.DataType type = 1; + * + * @return The enum numeric value on the wire for type. + */ + @java.lang.Override + public int getTypeValue() { + return type_; + } + /** + * + * + *
+   * Type of the annotation.
+   * 
+ * + * optional .google.cloud.visionai.v1.DataSchemaDetails.DataType type = 1; + * + * @return The type. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.DataSchemaDetails.DataType getType() { + com.google.cloud.visionai.v1.DataSchemaDetails.DataType result = + com.google.cloud.visionai.v1.DataSchemaDetails.DataType.forNumber(type_); + return result == null + ? com.google.cloud.visionai.v1.DataSchemaDetails.DataType.UNRECOGNIZED + : result; + } + + public static final int PROTO_ANY_CONFIG_FIELD_NUMBER = 6; + private com.google.cloud.visionai.v1.DataSchemaDetails.ProtoAnyConfig protoAnyConfig_; + /** + * + * + *
+   * Config for protobuf any type.
+   * 
+ * + * .google.cloud.visionai.v1.DataSchemaDetails.ProtoAnyConfig proto_any_config = 6; + * + * @return Whether the protoAnyConfig field is set. + */ + @java.lang.Override + public boolean hasProtoAnyConfig() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+   * Config for protobuf any type.
+   * 
+ * + * .google.cloud.visionai.v1.DataSchemaDetails.ProtoAnyConfig proto_any_config = 6; + * + * @return The protoAnyConfig. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.DataSchemaDetails.ProtoAnyConfig getProtoAnyConfig() { + return protoAnyConfig_ == null + ? com.google.cloud.visionai.v1.DataSchemaDetails.ProtoAnyConfig.getDefaultInstance() + : protoAnyConfig_; + } + /** + * + * + *
+   * Config for protobuf any type.
+   * 
+ * + * .google.cloud.visionai.v1.DataSchemaDetails.ProtoAnyConfig proto_any_config = 6; + */ + @java.lang.Override + public com.google.cloud.visionai.v1.DataSchemaDetails.ProtoAnyConfigOrBuilder + getProtoAnyConfigOrBuilder() { + return protoAnyConfig_ == null + ? com.google.cloud.visionai.v1.DataSchemaDetails.ProtoAnyConfig.getDefaultInstance() + : protoAnyConfig_; + } + + public static final int LIST_CONFIG_FIELD_NUMBER = 8; + private com.google.cloud.visionai.v1.DataSchemaDetails.ListConfig listConfig_; + /** + * + * + *
+   * Config for List data type.
+   * 
+ * + * .google.cloud.visionai.v1.DataSchemaDetails.ListConfig list_config = 8; + * + * @return Whether the listConfig field is set. + */ + @java.lang.Override + public boolean hasListConfig() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+   * Config for List data type.
+   * 
+ * + * .google.cloud.visionai.v1.DataSchemaDetails.ListConfig list_config = 8; + * + * @return The listConfig. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.DataSchemaDetails.ListConfig getListConfig() { + return listConfig_ == null + ? com.google.cloud.visionai.v1.DataSchemaDetails.ListConfig.getDefaultInstance() + : listConfig_; + } + /** + * + * + *
+   * Config for List data type.
+   * 
+ * + * .google.cloud.visionai.v1.DataSchemaDetails.ListConfig list_config = 8; + */ + @java.lang.Override + public com.google.cloud.visionai.v1.DataSchemaDetails.ListConfigOrBuilder + getListConfigOrBuilder() { + return listConfig_ == null + ? com.google.cloud.visionai.v1.DataSchemaDetails.ListConfig.getDefaultInstance() + : listConfig_; + } + + public static final int CUSTOMIZED_STRUCT_CONFIG_FIELD_NUMBER = 9; + private com.google.cloud.visionai.v1.DataSchemaDetails.CustomizedStructConfig + customizedStructConfig_; + /** + * + * + *
+   * Config for CustomizedStruct data type.
+   * 
+ * + * + * .google.cloud.visionai.v1.DataSchemaDetails.CustomizedStructConfig customized_struct_config = 9; + * + * + * @return Whether the customizedStructConfig field is set. + */ + @java.lang.Override + public boolean hasCustomizedStructConfig() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + * + * + *
+   * Config for CustomizedStruct data type.
+   * 
+ * + * + * .google.cloud.visionai.v1.DataSchemaDetails.CustomizedStructConfig customized_struct_config = 9; + * + * + * @return The customizedStructConfig. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.DataSchemaDetails.CustomizedStructConfig + getCustomizedStructConfig() { + return customizedStructConfig_ == null + ? com.google.cloud.visionai.v1.DataSchemaDetails.CustomizedStructConfig.getDefaultInstance() + : customizedStructConfig_; + } + /** + * + * + *
+   * Config for CustomizedStruct data type.
+   * 
+ * + * + * .google.cloud.visionai.v1.DataSchemaDetails.CustomizedStructConfig customized_struct_config = 9; + * + */ + @java.lang.Override + public com.google.cloud.visionai.v1.DataSchemaDetails.CustomizedStructConfigOrBuilder + getCustomizedStructConfigOrBuilder() { + return customizedStructConfig_ == null + ? com.google.cloud.visionai.v1.DataSchemaDetails.CustomizedStructConfig.getDefaultInstance() + : customizedStructConfig_; + } + + public static final int GRANULARITY_FIELD_NUMBER = 5; + private int granularity_ = 0; + /** + * + * + *
+   * The granularity associated with this DataSchema.
+   * 
+ * + * optional .google.cloud.visionai.v1.DataSchemaDetails.Granularity granularity = 5; + * + * @return Whether the granularity field is set. + */ + @java.lang.Override + public boolean hasGranularity() { + return ((bitField0_ & 0x00000010) != 0); + } + /** + * + * + *
+   * The granularity associated with this DataSchema.
+   * 
+ * + * optional .google.cloud.visionai.v1.DataSchemaDetails.Granularity granularity = 5; + * + * @return The enum numeric value on the wire for granularity. + */ + @java.lang.Override + public int getGranularityValue() { + return granularity_; + } + /** + * + * + *
+   * The granularity associated with this DataSchema.
+   * 
+ * + * optional .google.cloud.visionai.v1.DataSchemaDetails.Granularity granularity = 5; + * + * @return The granularity. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.DataSchemaDetails.Granularity getGranularity() { + com.google.cloud.visionai.v1.DataSchemaDetails.Granularity result = + com.google.cloud.visionai.v1.DataSchemaDetails.Granularity.forNumber(granularity_); + return result == null + ? com.google.cloud.visionai.v1.DataSchemaDetails.Granularity.UNRECOGNIZED + : result; + } + + public static final int SEARCH_STRATEGY_FIELD_NUMBER = 7; + private com.google.cloud.visionai.v1.DataSchemaDetails.SearchStrategy searchStrategy_; + /** + * + * + *
+   * The search strategy to be applied on the `key` above.
+   * 
+ * + * .google.cloud.visionai.v1.DataSchemaDetails.SearchStrategy search_strategy = 7; + * + * @return Whether the searchStrategy field is set. + */ + @java.lang.Override + public boolean hasSearchStrategy() { + return ((bitField0_ & 0x00000020) != 0); + } + /** + * + * + *
+   * The search strategy to be applied on the `key` above.
+   * 
+ * + * .google.cloud.visionai.v1.DataSchemaDetails.SearchStrategy search_strategy = 7; + * + * @return The searchStrategy. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.DataSchemaDetails.SearchStrategy getSearchStrategy() { + return searchStrategy_ == null + ? com.google.cloud.visionai.v1.DataSchemaDetails.SearchStrategy.getDefaultInstance() + : searchStrategy_; + } + /** + * + * + *
+   * The search strategy to be applied on the `key` above.
+   * 
+ * + * .google.cloud.visionai.v1.DataSchemaDetails.SearchStrategy search_strategy = 7; + */ + @java.lang.Override + public com.google.cloud.visionai.v1.DataSchemaDetails.SearchStrategyOrBuilder + getSearchStrategyOrBuilder() { + return searchStrategy_ == null + ? com.google.cloud.visionai.v1.DataSchemaDetails.SearchStrategy.getDefaultInstance() + : searchStrategy_; + } + + 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 (((bitField0_ & 0x00000001) != 0)) { + output.writeEnum(1, type_); + } + if (((bitField0_ & 0x00000010) != 0)) { + output.writeEnum(5, granularity_); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(6, getProtoAnyConfig()); + } + if (((bitField0_ & 0x00000020) != 0)) { + output.writeMessage(7, getSearchStrategy()); + } + if (((bitField0_ & 0x00000004) != 0)) { + output.writeMessage(8, getListConfig()); + } + if (((bitField0_ & 0x00000008) != 0)) { + output.writeMessage(9, getCustomizedStructConfig()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, type_); + } + if (((bitField0_ & 0x00000010) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(5, granularity_); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getProtoAnyConfig()); + } + if (((bitField0_ & 0x00000020) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getSearchStrategy()); + } + if (((bitField0_ & 0x00000004) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(8, getListConfig()); + } + if (((bitField0_ & 0x00000008) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(9, getCustomizedStructConfig()); + } + size += getUnknownFields().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.visionai.v1.DataSchemaDetails)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.DataSchemaDetails other = + (com.google.cloud.visionai.v1.DataSchemaDetails) obj; + + if (hasType() != other.hasType()) return false; + if (hasType()) { + if (type_ != other.type_) return false; + } + if (hasProtoAnyConfig() != other.hasProtoAnyConfig()) return false; + if (hasProtoAnyConfig()) { + if (!getProtoAnyConfig().equals(other.getProtoAnyConfig())) return false; + } + if (hasListConfig() != other.hasListConfig()) return false; + if (hasListConfig()) { + if (!getListConfig().equals(other.getListConfig())) return false; + } + if (hasCustomizedStructConfig() != other.hasCustomizedStructConfig()) return false; + if (hasCustomizedStructConfig()) { + if (!getCustomizedStructConfig().equals(other.getCustomizedStructConfig())) return false; + } + if (hasGranularity() != other.hasGranularity()) return false; + if (hasGranularity()) { + if (granularity_ != other.granularity_) return false; + } + if (hasSearchStrategy() != other.hasSearchStrategy()) return false; + if (hasSearchStrategy()) { + if (!getSearchStrategy().equals(other.getSearchStrategy())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasType()) { + hash = (37 * hash) + TYPE_FIELD_NUMBER; + hash = (53 * hash) + type_; + } + if (hasProtoAnyConfig()) { + hash = (37 * hash) + PROTO_ANY_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getProtoAnyConfig().hashCode(); + } + if (hasListConfig()) { + hash = (37 * hash) + LIST_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getListConfig().hashCode(); + } + if (hasCustomizedStructConfig()) { + hash = (37 * hash) + CUSTOMIZED_STRUCT_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getCustomizedStructConfig().hashCode(); + } + if (hasGranularity()) { + hash = (37 * hash) + GRANULARITY_FIELD_NUMBER; + hash = (53 * hash) + granularity_; + } + if (hasSearchStrategy()) { + hash = (37 * hash) + SEARCH_STRATEGY_FIELD_NUMBER; + hash = (53 * hash) + getSearchStrategy().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.DataSchemaDetails parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.DataSchemaDetails 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.visionai.v1.DataSchemaDetails parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.DataSchemaDetails 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.visionai.v1.DataSchemaDetails parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.DataSchemaDetails parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.DataSchemaDetails parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.DataSchemaDetails 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.visionai.v1.DataSchemaDetails parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.DataSchemaDetails 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.visionai.v1.DataSchemaDetails parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.DataSchemaDetails 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.visionai.v1.DataSchemaDetails 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; + } + /** + * + * + *
+   * Data schema details indicates the data type and the data struct corresponding
+   * to the key of user specified annotation.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.DataSchemaDetails} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.DataSchemaDetails) + com.google.cloud.visionai.v1.DataSchemaDetailsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_DataSchemaDetails_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_DataSchemaDetails_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.DataSchemaDetails.class, + com.google.cloud.visionai.v1.DataSchemaDetails.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.DataSchemaDetails.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getProtoAnyConfigFieldBuilder(); + getListConfigFieldBuilder(); + getCustomizedStructConfigFieldBuilder(); + getSearchStrategyFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + type_ = 0; + protoAnyConfig_ = null; + if (protoAnyConfigBuilder_ != null) { + protoAnyConfigBuilder_.dispose(); + protoAnyConfigBuilder_ = null; + } + listConfig_ = null; + if (listConfigBuilder_ != null) { + listConfigBuilder_.dispose(); + listConfigBuilder_ = null; + } + customizedStructConfig_ = null; + if (customizedStructConfigBuilder_ != null) { + customizedStructConfigBuilder_.dispose(); + customizedStructConfigBuilder_ = null; + } + granularity_ = 0; + searchStrategy_ = null; + if (searchStrategyBuilder_ != null) { + searchStrategyBuilder_.dispose(); + searchStrategyBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_DataSchemaDetails_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.DataSchemaDetails getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.DataSchemaDetails.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.DataSchemaDetails build() { + com.google.cloud.visionai.v1.DataSchemaDetails result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.DataSchemaDetails buildPartial() { + com.google.cloud.visionai.v1.DataSchemaDetails result = + new com.google.cloud.visionai.v1.DataSchemaDetails(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.visionai.v1.DataSchemaDetails result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.type_ = type_; + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.protoAnyConfig_ = + protoAnyConfigBuilder_ == null ? protoAnyConfig_ : protoAnyConfigBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.listConfig_ = listConfigBuilder_ == null ? listConfig_ : listConfigBuilder_.build(); + to_bitField0_ |= 0x00000004; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.customizedStructConfig_ = + customizedStructConfigBuilder_ == null + ? customizedStructConfig_ + : customizedStructConfigBuilder_.build(); + to_bitField0_ |= 0x00000008; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.granularity_ = granularity_; + to_bitField0_ |= 0x00000010; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.searchStrategy_ = + searchStrategyBuilder_ == null ? searchStrategy_ : searchStrategyBuilder_.build(); + to_bitField0_ |= 0x00000020; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.DataSchemaDetails) { + return mergeFrom((com.google.cloud.visionai.v1.DataSchemaDetails) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.DataSchemaDetails other) { + if (other == com.google.cloud.visionai.v1.DataSchemaDetails.getDefaultInstance()) return this; + if (other.hasType()) { + setType(other.getType()); + } + if (other.hasProtoAnyConfig()) { + mergeProtoAnyConfig(other.getProtoAnyConfig()); + } + if (other.hasListConfig()) { + mergeListConfig(other.getListConfig()); + } + if (other.hasCustomizedStructConfig()) { + mergeCustomizedStructConfig(other.getCustomizedStructConfig()); + } + if (other.hasGranularity()) { + setGranularity(other.getGranularity()); + } + if (other.hasSearchStrategy()) { + mergeSearchStrategy(other.getSearchStrategy()); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + type_ = input.readEnum(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 40: + { + granularity_ = input.readEnum(); + bitField0_ |= 0x00000010; + break; + } // case 40 + case 50: + { + input.readMessage(getProtoAnyConfigFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 50 + case 58: + { + input.readMessage(getSearchStrategyFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000020; + break; + } // case 58 + case 66: + { + input.readMessage(getListConfigFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 66 + case 74: + { + input.readMessage( + getCustomizedStructConfigFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 74 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private int type_ = 0; + /** + * + * + *
+     * Type of the annotation.
+     * 
+ * + * optional .google.cloud.visionai.v1.DataSchemaDetails.DataType type = 1; + * + * @return Whether the type field is set. + */ + @java.lang.Override + public boolean hasType() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * Type of the annotation.
+     * 
+ * + * optional .google.cloud.visionai.v1.DataSchemaDetails.DataType type = 1; + * + * @return The enum numeric value on the wire for type. + */ + @java.lang.Override + public int getTypeValue() { + return type_; + } + /** + * + * + *
+     * Type of the annotation.
+     * 
+ * + * optional .google.cloud.visionai.v1.DataSchemaDetails.DataType type = 1; + * + * @param value The enum numeric value on the wire for type to set. + * @return This builder for chaining. + */ + public Builder setTypeValue(int value) { + type_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Type of the annotation.
+     * 
+ * + * optional .google.cloud.visionai.v1.DataSchemaDetails.DataType type = 1; + * + * @return The type. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.DataSchemaDetails.DataType getType() { + com.google.cloud.visionai.v1.DataSchemaDetails.DataType result = + com.google.cloud.visionai.v1.DataSchemaDetails.DataType.forNumber(type_); + return result == null + ? com.google.cloud.visionai.v1.DataSchemaDetails.DataType.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Type of the annotation.
+     * 
+ * + * optional .google.cloud.visionai.v1.DataSchemaDetails.DataType type = 1; + * + * @param value The type to set. + * @return This builder for chaining. + */ + public Builder setType(com.google.cloud.visionai.v1.DataSchemaDetails.DataType value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + type_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Type of the annotation.
+     * 
+ * + * optional .google.cloud.visionai.v1.DataSchemaDetails.DataType type = 1; + * + * @return This builder for chaining. + */ + public Builder clearType() { + bitField0_ = (bitField0_ & ~0x00000001); + type_ = 0; + onChanged(); + return this; + } + + private com.google.cloud.visionai.v1.DataSchemaDetails.ProtoAnyConfig protoAnyConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.DataSchemaDetails.ProtoAnyConfig, + com.google.cloud.visionai.v1.DataSchemaDetails.ProtoAnyConfig.Builder, + com.google.cloud.visionai.v1.DataSchemaDetails.ProtoAnyConfigOrBuilder> + protoAnyConfigBuilder_; + /** + * + * + *
+     * Config for protobuf any type.
+     * 
+ * + * .google.cloud.visionai.v1.DataSchemaDetails.ProtoAnyConfig proto_any_config = 6; + * + * @return Whether the protoAnyConfig field is set. + */ + public boolean hasProtoAnyConfig() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * Config for protobuf any type.
+     * 
+ * + * .google.cloud.visionai.v1.DataSchemaDetails.ProtoAnyConfig proto_any_config = 6; + * + * @return The protoAnyConfig. + */ + public com.google.cloud.visionai.v1.DataSchemaDetails.ProtoAnyConfig getProtoAnyConfig() { + if (protoAnyConfigBuilder_ == null) { + return protoAnyConfig_ == null + ? com.google.cloud.visionai.v1.DataSchemaDetails.ProtoAnyConfig.getDefaultInstance() + : protoAnyConfig_; + } else { + return protoAnyConfigBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Config for protobuf any type.
+     * 
+ * + * .google.cloud.visionai.v1.DataSchemaDetails.ProtoAnyConfig proto_any_config = 6; + */ + public Builder setProtoAnyConfig( + com.google.cloud.visionai.v1.DataSchemaDetails.ProtoAnyConfig value) { + if (protoAnyConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + protoAnyConfig_ = value; + } else { + protoAnyConfigBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Config for protobuf any type.
+     * 
+ * + * .google.cloud.visionai.v1.DataSchemaDetails.ProtoAnyConfig proto_any_config = 6; + */ + public Builder setProtoAnyConfig( + com.google.cloud.visionai.v1.DataSchemaDetails.ProtoAnyConfig.Builder builderForValue) { + if (protoAnyConfigBuilder_ == null) { + protoAnyConfig_ = builderForValue.build(); + } else { + protoAnyConfigBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Config for protobuf any type.
+     * 
+ * + * .google.cloud.visionai.v1.DataSchemaDetails.ProtoAnyConfig proto_any_config = 6; + */ + public Builder mergeProtoAnyConfig( + com.google.cloud.visionai.v1.DataSchemaDetails.ProtoAnyConfig value) { + if (protoAnyConfigBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && protoAnyConfig_ != null + && protoAnyConfig_ + != com.google.cloud.visionai.v1.DataSchemaDetails.ProtoAnyConfig + .getDefaultInstance()) { + getProtoAnyConfigBuilder().mergeFrom(value); + } else { + protoAnyConfig_ = value; + } + } else { + protoAnyConfigBuilder_.mergeFrom(value); + } + if (protoAnyConfig_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Config for protobuf any type.
+     * 
+ * + * .google.cloud.visionai.v1.DataSchemaDetails.ProtoAnyConfig proto_any_config = 6; + */ + public Builder clearProtoAnyConfig() { + bitField0_ = (bitField0_ & ~0x00000002); + protoAnyConfig_ = null; + if (protoAnyConfigBuilder_ != null) { + protoAnyConfigBuilder_.dispose(); + protoAnyConfigBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Config for protobuf any type.
+     * 
+ * + * .google.cloud.visionai.v1.DataSchemaDetails.ProtoAnyConfig proto_any_config = 6; + */ + public com.google.cloud.visionai.v1.DataSchemaDetails.ProtoAnyConfig.Builder + getProtoAnyConfigBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getProtoAnyConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Config for protobuf any type.
+     * 
+ * + * .google.cloud.visionai.v1.DataSchemaDetails.ProtoAnyConfig proto_any_config = 6; + */ + public com.google.cloud.visionai.v1.DataSchemaDetails.ProtoAnyConfigOrBuilder + getProtoAnyConfigOrBuilder() { + if (protoAnyConfigBuilder_ != null) { + return protoAnyConfigBuilder_.getMessageOrBuilder(); + } else { + return protoAnyConfig_ == null + ? com.google.cloud.visionai.v1.DataSchemaDetails.ProtoAnyConfig.getDefaultInstance() + : protoAnyConfig_; + } + } + /** + * + * + *
+     * Config for protobuf any type.
+     * 
+ * + * .google.cloud.visionai.v1.DataSchemaDetails.ProtoAnyConfig proto_any_config = 6; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.DataSchemaDetails.ProtoAnyConfig, + com.google.cloud.visionai.v1.DataSchemaDetails.ProtoAnyConfig.Builder, + com.google.cloud.visionai.v1.DataSchemaDetails.ProtoAnyConfigOrBuilder> + getProtoAnyConfigFieldBuilder() { + if (protoAnyConfigBuilder_ == null) { + protoAnyConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.DataSchemaDetails.ProtoAnyConfig, + com.google.cloud.visionai.v1.DataSchemaDetails.ProtoAnyConfig.Builder, + com.google.cloud.visionai.v1.DataSchemaDetails.ProtoAnyConfigOrBuilder>( + getProtoAnyConfig(), getParentForChildren(), isClean()); + protoAnyConfig_ = null; + } + return protoAnyConfigBuilder_; + } + + private com.google.cloud.visionai.v1.DataSchemaDetails.ListConfig listConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.DataSchemaDetails.ListConfig, + com.google.cloud.visionai.v1.DataSchemaDetails.ListConfig.Builder, + com.google.cloud.visionai.v1.DataSchemaDetails.ListConfigOrBuilder> + listConfigBuilder_; + /** + * + * + *
+     * Config for List data type.
+     * 
+ * + * .google.cloud.visionai.v1.DataSchemaDetails.ListConfig list_config = 8; + * + * @return Whether the listConfig field is set. + */ + public boolean hasListConfig() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+     * Config for List data type.
+     * 
+ * + * .google.cloud.visionai.v1.DataSchemaDetails.ListConfig list_config = 8; + * + * @return The listConfig. + */ + public com.google.cloud.visionai.v1.DataSchemaDetails.ListConfig getListConfig() { + if (listConfigBuilder_ == null) { + return listConfig_ == null + ? com.google.cloud.visionai.v1.DataSchemaDetails.ListConfig.getDefaultInstance() + : listConfig_; + } else { + return listConfigBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Config for List data type.
+     * 
+ * + * .google.cloud.visionai.v1.DataSchemaDetails.ListConfig list_config = 8; + */ + public Builder setListConfig(com.google.cloud.visionai.v1.DataSchemaDetails.ListConfig value) { + if (listConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + listConfig_ = value; + } else { + listConfigBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Config for List data type.
+     * 
+ * + * .google.cloud.visionai.v1.DataSchemaDetails.ListConfig list_config = 8; + */ + public Builder setListConfig( + com.google.cloud.visionai.v1.DataSchemaDetails.ListConfig.Builder builderForValue) { + if (listConfigBuilder_ == null) { + listConfig_ = builderForValue.build(); + } else { + listConfigBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Config for List data type.
+     * 
+ * + * .google.cloud.visionai.v1.DataSchemaDetails.ListConfig list_config = 8; + */ + public Builder mergeListConfig( + com.google.cloud.visionai.v1.DataSchemaDetails.ListConfig value) { + if (listConfigBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && listConfig_ != null + && listConfig_ + != com.google.cloud.visionai.v1.DataSchemaDetails.ListConfig.getDefaultInstance()) { + getListConfigBuilder().mergeFrom(value); + } else { + listConfig_ = value; + } + } else { + listConfigBuilder_.mergeFrom(value); + } + if (listConfig_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Config for List data type.
+     * 
+ * + * .google.cloud.visionai.v1.DataSchemaDetails.ListConfig list_config = 8; + */ + public Builder clearListConfig() { + bitField0_ = (bitField0_ & ~0x00000004); + listConfig_ = null; + if (listConfigBuilder_ != null) { + listConfigBuilder_.dispose(); + listConfigBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Config for List data type.
+     * 
+ * + * .google.cloud.visionai.v1.DataSchemaDetails.ListConfig list_config = 8; + */ + public com.google.cloud.visionai.v1.DataSchemaDetails.ListConfig.Builder + getListConfigBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getListConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Config for List data type.
+     * 
+ * + * .google.cloud.visionai.v1.DataSchemaDetails.ListConfig list_config = 8; + */ + public com.google.cloud.visionai.v1.DataSchemaDetails.ListConfigOrBuilder + getListConfigOrBuilder() { + if (listConfigBuilder_ != null) { + return listConfigBuilder_.getMessageOrBuilder(); + } else { + return listConfig_ == null + ? com.google.cloud.visionai.v1.DataSchemaDetails.ListConfig.getDefaultInstance() + : listConfig_; + } + } + /** + * + * + *
+     * Config for List data type.
+     * 
+ * + * .google.cloud.visionai.v1.DataSchemaDetails.ListConfig list_config = 8; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.DataSchemaDetails.ListConfig, + com.google.cloud.visionai.v1.DataSchemaDetails.ListConfig.Builder, + com.google.cloud.visionai.v1.DataSchemaDetails.ListConfigOrBuilder> + getListConfigFieldBuilder() { + if (listConfigBuilder_ == null) { + listConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.DataSchemaDetails.ListConfig, + com.google.cloud.visionai.v1.DataSchemaDetails.ListConfig.Builder, + com.google.cloud.visionai.v1.DataSchemaDetails.ListConfigOrBuilder>( + getListConfig(), getParentForChildren(), isClean()); + listConfig_ = null; + } + return listConfigBuilder_; + } + + private com.google.cloud.visionai.v1.DataSchemaDetails.CustomizedStructConfig + customizedStructConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.DataSchemaDetails.CustomizedStructConfig, + com.google.cloud.visionai.v1.DataSchemaDetails.CustomizedStructConfig.Builder, + com.google.cloud.visionai.v1.DataSchemaDetails.CustomizedStructConfigOrBuilder> + customizedStructConfigBuilder_; + /** + * + * + *
+     * Config for CustomizedStruct data type.
+     * 
+ * + * + * .google.cloud.visionai.v1.DataSchemaDetails.CustomizedStructConfig customized_struct_config = 9; + * + * + * @return Whether the customizedStructConfig field is set. + */ + public boolean hasCustomizedStructConfig() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + * + * + *
+     * Config for CustomizedStruct data type.
+     * 
+ * + * + * .google.cloud.visionai.v1.DataSchemaDetails.CustomizedStructConfig customized_struct_config = 9; + * + * + * @return The customizedStructConfig. + */ + public com.google.cloud.visionai.v1.DataSchemaDetails.CustomizedStructConfig + getCustomizedStructConfig() { + if (customizedStructConfigBuilder_ == null) { + return customizedStructConfig_ == null + ? com.google.cloud.visionai.v1.DataSchemaDetails.CustomizedStructConfig + .getDefaultInstance() + : customizedStructConfig_; + } else { + return customizedStructConfigBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Config for CustomizedStruct data type.
+     * 
+ * + * + * .google.cloud.visionai.v1.DataSchemaDetails.CustomizedStructConfig customized_struct_config = 9; + * + */ + public Builder setCustomizedStructConfig( + com.google.cloud.visionai.v1.DataSchemaDetails.CustomizedStructConfig value) { + if (customizedStructConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + customizedStructConfig_ = value; + } else { + customizedStructConfigBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Config for CustomizedStruct data type.
+     * 
+ * + * + * .google.cloud.visionai.v1.DataSchemaDetails.CustomizedStructConfig customized_struct_config = 9; + * + */ + public Builder setCustomizedStructConfig( + com.google.cloud.visionai.v1.DataSchemaDetails.CustomizedStructConfig.Builder + builderForValue) { + if (customizedStructConfigBuilder_ == null) { + customizedStructConfig_ = builderForValue.build(); + } else { + customizedStructConfigBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Config for CustomizedStruct data type.
+     * 
+ * + * + * .google.cloud.visionai.v1.DataSchemaDetails.CustomizedStructConfig customized_struct_config = 9; + * + */ + public Builder mergeCustomizedStructConfig( + com.google.cloud.visionai.v1.DataSchemaDetails.CustomizedStructConfig value) { + if (customizedStructConfigBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) + && customizedStructConfig_ != null + && customizedStructConfig_ + != com.google.cloud.visionai.v1.DataSchemaDetails.CustomizedStructConfig + .getDefaultInstance()) { + getCustomizedStructConfigBuilder().mergeFrom(value); + } else { + customizedStructConfig_ = value; + } + } else { + customizedStructConfigBuilder_.mergeFrom(value); + } + if (customizedStructConfig_ != null) { + bitField0_ |= 0x00000008; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Config for CustomizedStruct data type.
+     * 
+ * + * + * .google.cloud.visionai.v1.DataSchemaDetails.CustomizedStructConfig customized_struct_config = 9; + * + */ + public Builder clearCustomizedStructConfig() { + bitField0_ = (bitField0_ & ~0x00000008); + customizedStructConfig_ = null; + if (customizedStructConfigBuilder_ != null) { + customizedStructConfigBuilder_.dispose(); + customizedStructConfigBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Config for CustomizedStruct data type.
+     * 
+ * + * + * .google.cloud.visionai.v1.DataSchemaDetails.CustomizedStructConfig customized_struct_config = 9; + * + */ + public com.google.cloud.visionai.v1.DataSchemaDetails.CustomizedStructConfig.Builder + getCustomizedStructConfigBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return getCustomizedStructConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Config for CustomizedStruct data type.
+     * 
+ * + * + * .google.cloud.visionai.v1.DataSchemaDetails.CustomizedStructConfig customized_struct_config = 9; + * + */ + public com.google.cloud.visionai.v1.DataSchemaDetails.CustomizedStructConfigOrBuilder + getCustomizedStructConfigOrBuilder() { + if (customizedStructConfigBuilder_ != null) { + return customizedStructConfigBuilder_.getMessageOrBuilder(); + } else { + return customizedStructConfig_ == null + ? com.google.cloud.visionai.v1.DataSchemaDetails.CustomizedStructConfig + .getDefaultInstance() + : customizedStructConfig_; + } + } + /** + * + * + *
+     * Config for CustomizedStruct data type.
+     * 
+ * + * + * .google.cloud.visionai.v1.DataSchemaDetails.CustomizedStructConfig customized_struct_config = 9; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.DataSchemaDetails.CustomizedStructConfig, + com.google.cloud.visionai.v1.DataSchemaDetails.CustomizedStructConfig.Builder, + com.google.cloud.visionai.v1.DataSchemaDetails.CustomizedStructConfigOrBuilder> + getCustomizedStructConfigFieldBuilder() { + if (customizedStructConfigBuilder_ == null) { + customizedStructConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.DataSchemaDetails.CustomizedStructConfig, + com.google.cloud.visionai.v1.DataSchemaDetails.CustomizedStructConfig.Builder, + com.google.cloud.visionai.v1.DataSchemaDetails.CustomizedStructConfigOrBuilder>( + getCustomizedStructConfig(), getParentForChildren(), isClean()); + customizedStructConfig_ = null; + } + return customizedStructConfigBuilder_; + } + + private int granularity_ = 0; + /** + * + * + *
+     * The granularity associated with this DataSchema.
+     * 
+ * + * optional .google.cloud.visionai.v1.DataSchemaDetails.Granularity granularity = 5; + * + * + * @return Whether the granularity field is set. + */ + @java.lang.Override + public boolean hasGranularity() { + return ((bitField0_ & 0x00000010) != 0); + } + /** + * + * + *
+     * The granularity associated with this DataSchema.
+     * 
+ * + * optional .google.cloud.visionai.v1.DataSchemaDetails.Granularity granularity = 5; + * + * + * @return The enum numeric value on the wire for granularity. + */ + @java.lang.Override + public int getGranularityValue() { + return granularity_; + } + /** + * + * + *
+     * The granularity associated with this DataSchema.
+     * 
+ * + * optional .google.cloud.visionai.v1.DataSchemaDetails.Granularity granularity = 5; + * + * + * @param value The enum numeric value on the wire for granularity to set. + * @return This builder for chaining. + */ + public Builder setGranularityValue(int value) { + granularity_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * The granularity associated with this DataSchema.
+     * 
+ * + * optional .google.cloud.visionai.v1.DataSchemaDetails.Granularity granularity = 5; + * + * + * @return The granularity. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.DataSchemaDetails.Granularity getGranularity() { + com.google.cloud.visionai.v1.DataSchemaDetails.Granularity result = + com.google.cloud.visionai.v1.DataSchemaDetails.Granularity.forNumber(granularity_); + return result == null + ? com.google.cloud.visionai.v1.DataSchemaDetails.Granularity.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * The granularity associated with this DataSchema.
+     * 
+ * + * optional .google.cloud.visionai.v1.DataSchemaDetails.Granularity granularity = 5; + * + * + * @param value The granularity to set. + * @return This builder for chaining. + */ + public Builder setGranularity( + com.google.cloud.visionai.v1.DataSchemaDetails.Granularity value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000010; + granularity_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * The granularity associated with this DataSchema.
+     * 
+ * + * optional .google.cloud.visionai.v1.DataSchemaDetails.Granularity granularity = 5; + * + * + * @return This builder for chaining. + */ + public Builder clearGranularity() { + bitField0_ = (bitField0_ & ~0x00000010); + granularity_ = 0; + onChanged(); + return this; + } + + private com.google.cloud.visionai.v1.DataSchemaDetails.SearchStrategy searchStrategy_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.DataSchemaDetails.SearchStrategy, + com.google.cloud.visionai.v1.DataSchemaDetails.SearchStrategy.Builder, + com.google.cloud.visionai.v1.DataSchemaDetails.SearchStrategyOrBuilder> + searchStrategyBuilder_; + /** + * + * + *
+     * The search strategy to be applied on the `key` above.
+     * 
+ * + * .google.cloud.visionai.v1.DataSchemaDetails.SearchStrategy search_strategy = 7; + * + * @return Whether the searchStrategy field is set. + */ + public boolean hasSearchStrategy() { + return ((bitField0_ & 0x00000020) != 0); + } + /** + * + * + *
+     * The search strategy to be applied on the `key` above.
+     * 
+ * + * .google.cloud.visionai.v1.DataSchemaDetails.SearchStrategy search_strategy = 7; + * + * @return The searchStrategy. + */ + public com.google.cloud.visionai.v1.DataSchemaDetails.SearchStrategy getSearchStrategy() { + if (searchStrategyBuilder_ == null) { + return searchStrategy_ == null + ? com.google.cloud.visionai.v1.DataSchemaDetails.SearchStrategy.getDefaultInstance() + : searchStrategy_; + } else { + return searchStrategyBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The search strategy to be applied on the `key` above.
+     * 
+ * + * .google.cloud.visionai.v1.DataSchemaDetails.SearchStrategy search_strategy = 7; + */ + public Builder setSearchStrategy( + com.google.cloud.visionai.v1.DataSchemaDetails.SearchStrategy value) { + if (searchStrategyBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + searchStrategy_ = value; + } else { + searchStrategyBuilder_.setMessage(value); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * The search strategy to be applied on the `key` above.
+     * 
+ * + * .google.cloud.visionai.v1.DataSchemaDetails.SearchStrategy search_strategy = 7; + */ + public Builder setSearchStrategy( + com.google.cloud.visionai.v1.DataSchemaDetails.SearchStrategy.Builder builderForValue) { + if (searchStrategyBuilder_ == null) { + searchStrategy_ = builderForValue.build(); + } else { + searchStrategyBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * The search strategy to be applied on the `key` above.
+     * 
+ * + * .google.cloud.visionai.v1.DataSchemaDetails.SearchStrategy search_strategy = 7; + */ + public Builder mergeSearchStrategy( + com.google.cloud.visionai.v1.DataSchemaDetails.SearchStrategy value) { + if (searchStrategyBuilder_ == null) { + if (((bitField0_ & 0x00000020) != 0) + && searchStrategy_ != null + && searchStrategy_ + != com.google.cloud.visionai.v1.DataSchemaDetails.SearchStrategy + .getDefaultInstance()) { + getSearchStrategyBuilder().mergeFrom(value); + } else { + searchStrategy_ = value; + } + } else { + searchStrategyBuilder_.mergeFrom(value); + } + if (searchStrategy_ != null) { + bitField0_ |= 0x00000020; + onChanged(); + } + return this; + } + /** + * + * + *
+     * The search strategy to be applied on the `key` above.
+     * 
+ * + * .google.cloud.visionai.v1.DataSchemaDetails.SearchStrategy search_strategy = 7; + */ + public Builder clearSearchStrategy() { + bitField0_ = (bitField0_ & ~0x00000020); + searchStrategy_ = null; + if (searchStrategyBuilder_ != null) { + searchStrategyBuilder_.dispose(); + searchStrategyBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * The search strategy to be applied on the `key` above.
+     * 
+ * + * .google.cloud.visionai.v1.DataSchemaDetails.SearchStrategy search_strategy = 7; + */ + public com.google.cloud.visionai.v1.DataSchemaDetails.SearchStrategy.Builder + getSearchStrategyBuilder() { + bitField0_ |= 0x00000020; + onChanged(); + return getSearchStrategyFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The search strategy to be applied on the `key` above.
+     * 
+ * + * .google.cloud.visionai.v1.DataSchemaDetails.SearchStrategy search_strategy = 7; + */ + public com.google.cloud.visionai.v1.DataSchemaDetails.SearchStrategyOrBuilder + getSearchStrategyOrBuilder() { + if (searchStrategyBuilder_ != null) { + return searchStrategyBuilder_.getMessageOrBuilder(); + } else { + return searchStrategy_ == null + ? com.google.cloud.visionai.v1.DataSchemaDetails.SearchStrategy.getDefaultInstance() + : searchStrategy_; + } + } + /** + * + * + *
+     * The search strategy to be applied on the `key` above.
+     * 
+ * + * .google.cloud.visionai.v1.DataSchemaDetails.SearchStrategy search_strategy = 7; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.DataSchemaDetails.SearchStrategy, + com.google.cloud.visionai.v1.DataSchemaDetails.SearchStrategy.Builder, + com.google.cloud.visionai.v1.DataSchemaDetails.SearchStrategyOrBuilder> + getSearchStrategyFieldBuilder() { + if (searchStrategyBuilder_ == null) { + searchStrategyBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.DataSchemaDetails.SearchStrategy, + com.google.cloud.visionai.v1.DataSchemaDetails.SearchStrategy.Builder, + com.google.cloud.visionai.v1.DataSchemaDetails.SearchStrategyOrBuilder>( + getSearchStrategy(), getParentForChildren(), isClean()); + searchStrategy_ = null; + } + return searchStrategyBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.DataSchemaDetails) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.DataSchemaDetails) + private static final com.google.cloud.visionai.v1.DataSchemaDetails DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.DataSchemaDetails(); + } + + public static com.google.cloud.visionai.v1.DataSchemaDetails getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DataSchemaDetails parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.DataSchemaDetails getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DataSchemaDetailsOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DataSchemaDetailsOrBuilder.java new file mode 100644 index 000000000000..a20ba99edb24 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DataSchemaDetailsOrBuilder.java @@ -0,0 +1,249 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/warehouse.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface DataSchemaDetailsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.DataSchemaDetails) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Type of the annotation.
+   * 
+ * + * optional .google.cloud.visionai.v1.DataSchemaDetails.DataType type = 1; + * + * @return Whether the type field is set. + */ + boolean hasType(); + /** + * + * + *
+   * Type of the annotation.
+   * 
+ * + * optional .google.cloud.visionai.v1.DataSchemaDetails.DataType type = 1; + * + * @return The enum numeric value on the wire for type. + */ + int getTypeValue(); + /** + * + * + *
+   * Type of the annotation.
+   * 
+ * + * optional .google.cloud.visionai.v1.DataSchemaDetails.DataType type = 1; + * + * @return The type. + */ + com.google.cloud.visionai.v1.DataSchemaDetails.DataType getType(); + + /** + * + * + *
+   * Config for protobuf any type.
+   * 
+ * + * .google.cloud.visionai.v1.DataSchemaDetails.ProtoAnyConfig proto_any_config = 6; + * + * @return Whether the protoAnyConfig field is set. + */ + boolean hasProtoAnyConfig(); + /** + * + * + *
+   * Config for protobuf any type.
+   * 
+ * + * .google.cloud.visionai.v1.DataSchemaDetails.ProtoAnyConfig proto_any_config = 6; + * + * @return The protoAnyConfig. + */ + com.google.cloud.visionai.v1.DataSchemaDetails.ProtoAnyConfig getProtoAnyConfig(); + /** + * + * + *
+   * Config for protobuf any type.
+   * 
+ * + * .google.cloud.visionai.v1.DataSchemaDetails.ProtoAnyConfig proto_any_config = 6; + */ + com.google.cloud.visionai.v1.DataSchemaDetails.ProtoAnyConfigOrBuilder + getProtoAnyConfigOrBuilder(); + + /** + * + * + *
+   * Config for List data type.
+   * 
+ * + * .google.cloud.visionai.v1.DataSchemaDetails.ListConfig list_config = 8; + * + * @return Whether the listConfig field is set. + */ + boolean hasListConfig(); + /** + * + * + *
+   * Config for List data type.
+   * 
+ * + * .google.cloud.visionai.v1.DataSchemaDetails.ListConfig list_config = 8; + * + * @return The listConfig. + */ + com.google.cloud.visionai.v1.DataSchemaDetails.ListConfig getListConfig(); + /** + * + * + *
+   * Config for List data type.
+   * 
+ * + * .google.cloud.visionai.v1.DataSchemaDetails.ListConfig list_config = 8; + */ + com.google.cloud.visionai.v1.DataSchemaDetails.ListConfigOrBuilder getListConfigOrBuilder(); + + /** + * + * + *
+   * Config for CustomizedStruct data type.
+   * 
+ * + * + * .google.cloud.visionai.v1.DataSchemaDetails.CustomizedStructConfig customized_struct_config = 9; + * + * + * @return Whether the customizedStructConfig field is set. + */ + boolean hasCustomizedStructConfig(); + /** + * + * + *
+   * Config for CustomizedStruct data type.
+   * 
+ * + * + * .google.cloud.visionai.v1.DataSchemaDetails.CustomizedStructConfig customized_struct_config = 9; + * + * + * @return The customizedStructConfig. + */ + com.google.cloud.visionai.v1.DataSchemaDetails.CustomizedStructConfig getCustomizedStructConfig(); + /** + * + * + *
+   * Config for CustomizedStruct data type.
+   * 
+ * + * + * .google.cloud.visionai.v1.DataSchemaDetails.CustomizedStructConfig customized_struct_config = 9; + * + */ + com.google.cloud.visionai.v1.DataSchemaDetails.CustomizedStructConfigOrBuilder + getCustomizedStructConfigOrBuilder(); + + /** + * + * + *
+   * The granularity associated with this DataSchema.
+   * 
+ * + * optional .google.cloud.visionai.v1.DataSchemaDetails.Granularity granularity = 5; + * + * @return Whether the granularity field is set. + */ + boolean hasGranularity(); + /** + * + * + *
+   * The granularity associated with this DataSchema.
+   * 
+ * + * optional .google.cloud.visionai.v1.DataSchemaDetails.Granularity granularity = 5; + * + * @return The enum numeric value on the wire for granularity. + */ + int getGranularityValue(); + /** + * + * + *
+   * The granularity associated with this DataSchema.
+   * 
+ * + * optional .google.cloud.visionai.v1.DataSchemaDetails.Granularity granularity = 5; + * + * @return The granularity. + */ + com.google.cloud.visionai.v1.DataSchemaDetails.Granularity getGranularity(); + + /** + * + * + *
+   * The search strategy to be applied on the `key` above.
+   * 
+ * + * .google.cloud.visionai.v1.DataSchemaDetails.SearchStrategy search_strategy = 7; + * + * @return Whether the searchStrategy field is set. + */ + boolean hasSearchStrategy(); + /** + * + * + *
+   * The search strategy to be applied on the `key` above.
+   * 
+ * + * .google.cloud.visionai.v1.DataSchemaDetails.SearchStrategy search_strategy = 7; + * + * @return The searchStrategy. + */ + com.google.cloud.visionai.v1.DataSchemaDetails.SearchStrategy getSearchStrategy(); + /** + * + * + *
+   * The search strategy to be applied on the `key` above.
+   * 
+ * + * .google.cloud.visionai.v1.DataSchemaDetails.SearchStrategy search_strategy = 7; + */ + com.google.cloud.visionai.v1.DataSchemaDetails.SearchStrategyOrBuilder + getSearchStrategyOrBuilder(); +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DataSchemaName.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DataSchemaName.java new file mode 100644 index 000000000000..e9340d76c255 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DataSchemaName.java @@ -0,0 +1,269 @@ +/* + * Copyright 2024 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.visionai.v1; + +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") +public class DataSchemaName implements ResourceName { + private static final PathTemplate PROJECT_NUMBER_LOCATION_CORPUS_DATA_SCHEMA = + PathTemplate.createWithoutUrlEncoding( + "projects/{project_number}/locations/{location}/corpora/{corpus}/dataSchemas/{data_schema}"); + private volatile Map fieldValuesMap; + private final String projectNumber; + private final String location; + private final String corpus; + private final String dataSchema; + + @Deprecated + protected DataSchemaName() { + projectNumber = null; + location = null; + corpus = null; + dataSchema = null; + } + + private DataSchemaName(Builder builder) { + projectNumber = Preconditions.checkNotNull(builder.getProjectNumber()); + location = Preconditions.checkNotNull(builder.getLocation()); + corpus = Preconditions.checkNotNull(builder.getCorpus()); + dataSchema = Preconditions.checkNotNull(builder.getDataSchema()); + } + + public String getProjectNumber() { + return projectNumber; + } + + public String getLocation() { + return location; + } + + public String getCorpus() { + return corpus; + } + + public String getDataSchema() { + return dataSchema; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static DataSchemaName of( + String projectNumber, String location, String corpus, String dataSchema) { + return newBuilder() + .setProjectNumber(projectNumber) + .setLocation(location) + .setCorpus(corpus) + .setDataSchema(dataSchema) + .build(); + } + + public static String format( + String projectNumber, String location, String corpus, String dataSchema) { + return newBuilder() + .setProjectNumber(projectNumber) + .setLocation(location) + .setCorpus(corpus) + .setDataSchema(dataSchema) + .build() + .toString(); + } + + public static DataSchemaName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_NUMBER_LOCATION_CORPUS_DATA_SCHEMA.validatedMatch( + formattedString, "DataSchemaName.parse: formattedString not in valid format"); + return of( + matchMap.get("project_number"), + matchMap.get("location"), + matchMap.get("corpus"), + matchMap.get("data_schema")); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List values) { + List list = new ArrayList<>(values.size()); + for (DataSchemaName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_NUMBER_LOCATION_CORPUS_DATA_SCHEMA.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (projectNumber != null) { + fieldMapBuilder.put("project_number", projectNumber); + } + if (location != null) { + fieldMapBuilder.put("location", location); + } + if (corpus != null) { + fieldMapBuilder.put("corpus", corpus); + } + if (dataSchema != null) { + fieldMapBuilder.put("data_schema", dataSchema); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_NUMBER_LOCATION_CORPUS_DATA_SCHEMA.instantiate( + "project_number", + projectNumber, + "location", + location, + "corpus", + corpus, + "data_schema", + dataSchema); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null && getClass() == o.getClass()) { + DataSchemaName that = ((DataSchemaName) o); + return Objects.equals(this.projectNumber, that.projectNumber) + && Objects.equals(this.location, that.location) + && Objects.equals(this.corpus, that.corpus) + && Objects.equals(this.dataSchema, that.dataSchema); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(projectNumber); + h *= 1000003; + h ^= Objects.hashCode(location); + h *= 1000003; + h ^= Objects.hashCode(corpus); + h *= 1000003; + h ^= Objects.hashCode(dataSchema); + return h; + } + + /** + * Builder for + * projects/{project_number}/locations/{location}/corpora/{corpus}/dataSchemas/{data_schema}. + */ + public static class Builder { + private String projectNumber; + private String location; + private String corpus; + private String dataSchema; + + protected Builder() {} + + public String getProjectNumber() { + return projectNumber; + } + + public String getLocation() { + return location; + } + + public String getCorpus() { + return corpus; + } + + public String getDataSchema() { + return dataSchema; + } + + public Builder setProjectNumber(String projectNumber) { + this.projectNumber = projectNumber; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setCorpus(String corpus) { + this.corpus = corpus; + return this; + } + + public Builder setDataSchema(String dataSchema) { + this.dataSchema = dataSchema; + return this; + } + + private Builder(DataSchemaName dataSchemaName) { + this.projectNumber = dataSchemaName.projectNumber; + this.location = dataSchemaName.location; + this.corpus = dataSchemaName.corpus; + this.dataSchema = dataSchemaName.dataSchema; + } + + public DataSchemaName build() { + return new DataSchemaName(this); + } + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DataSchemaOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DataSchemaOrBuilder.java new file mode 100644 index 000000000000..b9aa1665b1fd --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DataSchemaOrBuilder.java @@ -0,0 +1,121 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/warehouse.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface DataSchemaOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.DataSchema) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Resource name of the data schema in the form of:
+   * `projects/{project_number}/locations/{location}/corpora/{corpus}/dataSchemas/{data_schema}`
+   * where {data_schema} part should be the same as the `key` field below.
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Resource name of the data schema in the form of:
+   * `projects/{project_number}/locations/{location}/corpora/{corpus}/dataSchemas/{data_schema}`
+   * where {data_schema} part should be the same as the `key` field below.
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Required. The key of this data schema. This key should be matching the key
+   * of user specified annotation and unique inside corpus. This value can be up
+   * to 63 characters, and valid characters are /[a-z][0-9]-/. The first
+   * character must be a letter, the last could be a letter or a number.
+   * 
+ * + * string key = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The key. + */ + java.lang.String getKey(); + /** + * + * + *
+   * Required. The key of this data schema. This key should be matching the key
+   * of user specified annotation and unique inside corpus. This value can be up
+   * to 63 characters, and valid characters are /[a-z][0-9]-/. The first
+   * character must be a letter, the last could be a letter or a number.
+   * 
+ * + * string key = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for key. + */ + com.google.protobuf.ByteString getKeyBytes(); + + /** + * + * + *
+   * The schema details mapping to the key.
+   * 
+ * + * .google.cloud.visionai.v1.DataSchemaDetails schema_details = 3; + * + * @return Whether the schemaDetails field is set. + */ + boolean hasSchemaDetails(); + /** + * + * + *
+   * The schema details mapping to the key.
+   * 
+ * + * .google.cloud.visionai.v1.DataSchemaDetails schema_details = 3; + * + * @return The schemaDetails. + */ + com.google.cloud.visionai.v1.DataSchemaDetails getSchemaDetails(); + /** + * + * + *
+   * The schema details mapping to the key.
+   * 
+ * + * .google.cloud.visionai.v1.DataSchemaDetails schema_details = 3; + */ + com.google.cloud.visionai.v1.DataSchemaDetailsOrBuilder getSchemaDetailsOrBuilder(); +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DataType.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DataType.java new file mode 100644 index 000000000000..deab6846264e --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DataType.java @@ -0,0 +1,225 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/platform.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * All supported data types.
+ * 
+ * + * Protobuf enum {@code google.cloud.visionai.v1.DataType} + */ +public enum DataType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+   * The default value of DataType.
+   * 
+ * + * DATA_TYPE_UNSPECIFIED = 0; + */ + DATA_TYPE_UNSPECIFIED(0), + /** + * + * + *
+   * Video data type like H264.
+   * 
+ * + * VIDEO = 1; + */ + VIDEO(1), + /** + * + * + *
+   * Image data type.
+   * 
+ * + * IMAGE = 3; + */ + IMAGE(3), + /** + * + * + *
+   * Protobuf data type, usually used for general data blob.
+   * 
+ * + * PROTO = 2; + */ + PROTO(2), + /** + * + * + *
+   * A placeholder data type, applicable for the universal input processor which
+   * supports any data type. This will be instantiated and replaced by a
+   * concrete underlying `DataType` during instance deployment.
+   * 
+ * + * PLACEHOLDER = 4; + */ + PLACEHOLDER(4), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+   * The default value of DataType.
+   * 
+ * + * DATA_TYPE_UNSPECIFIED = 0; + */ + public static final int DATA_TYPE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+   * Video data type like H264.
+   * 
+ * + * VIDEO = 1; + */ + public static final int VIDEO_VALUE = 1; + /** + * + * + *
+   * Image data type.
+   * 
+ * + * IMAGE = 3; + */ + public static final int IMAGE_VALUE = 3; + /** + * + * + *
+   * Protobuf data type, usually used for general data blob.
+   * 
+ * + * PROTO = 2; + */ + public static final int PROTO_VALUE = 2; + /** + * + * + *
+   * A placeholder data type, applicable for the universal input processor which
+   * supports any data type. This will be instantiated and replaced by a
+   * concrete underlying `DataType` during instance deployment.
+   * 
+ * + * PLACEHOLDER = 4; + */ + public static final int PLACEHOLDER_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; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static DataType valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static DataType forNumber(int value) { + switch (value) { + case 0: + return DATA_TYPE_UNSPECIFIED; + case 1: + return VIDEO; + case 3: + return IMAGE; + case 2: + return PROTO; + case 4: + return PLACEHOLDER; + 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 DataType findValueByNumber(int number) { + return DataType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + 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.visionai.v1.PlatformProto.getDescriptor().getEnumTypes().get(2); + } + + private static final DataType[] VALUES = values(); + + public static DataType 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 DataType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.visionai.v1.DataType) +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DateTimeRange.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DateTimeRange.java new file mode 100644 index 000000000000..580d8fe5b5d4 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DateTimeRange.java @@ -0,0 +1,970 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/warehouse.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * Datetime range type.
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.DateTimeRange} + */ +public final class DateTimeRange extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.DateTimeRange) + DateTimeRangeOrBuilder { + private static final long serialVersionUID = 0L; + // Use DateTimeRange.newBuilder() to construct. + private DateTimeRange(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DateTimeRange() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DateTimeRange(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_DateTimeRange_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_DateTimeRange_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.DateTimeRange.class, + com.google.cloud.visionai.v1.DateTimeRange.Builder.class); + } + + private int bitField0_; + public static final int START_FIELD_NUMBER = 1; + private com.google.type.DateTime start_; + /** + * + * + *
+   * Start date time.
+   * 
+ * + * .google.type.DateTime start = 1; + * + * @return Whether the start field is set. + */ + @java.lang.Override + public boolean hasStart() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * Start date time.
+   * 
+ * + * .google.type.DateTime start = 1; + * + * @return The start. + */ + @java.lang.Override + public com.google.type.DateTime getStart() { + return start_ == null ? com.google.type.DateTime.getDefaultInstance() : start_; + } + /** + * + * + *
+   * Start date time.
+   * 
+ * + * .google.type.DateTime start = 1; + */ + @java.lang.Override + public com.google.type.DateTimeOrBuilder getStartOrBuilder() { + return start_ == null ? com.google.type.DateTime.getDefaultInstance() : start_; + } + + public static final int END_FIELD_NUMBER = 2; + private com.google.type.DateTime end_; + /** + * + * + *
+   * End data time.
+   * 
+ * + * .google.type.DateTime end = 2; + * + * @return Whether the end field is set. + */ + @java.lang.Override + public boolean hasEnd() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+   * End data time.
+   * 
+ * + * .google.type.DateTime end = 2; + * + * @return The end. + */ + @java.lang.Override + public com.google.type.DateTime getEnd() { + return end_ == null ? com.google.type.DateTime.getDefaultInstance() : end_; + } + /** + * + * + *
+   * End data time.
+   * 
+ * + * .google.type.DateTime end = 2; + */ + @java.lang.Override + public com.google.type.DateTimeOrBuilder getEndOrBuilder() { + return end_ == null ? com.google.type.DateTime.getDefaultInstance() : end_; + } + + 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 (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getStart()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(2, getEnd()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getStart()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getEnd()); + } + size += getUnknownFields().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.visionai.v1.DateTimeRange)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.DateTimeRange other = + (com.google.cloud.visionai.v1.DateTimeRange) obj; + + if (hasStart() != other.hasStart()) return false; + if (hasStart()) { + if (!getStart().equals(other.getStart())) return false; + } + if (hasEnd() != other.hasEnd()) return false; + if (hasEnd()) { + if (!getEnd().equals(other.getEnd())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasStart()) { + hash = (37 * hash) + START_FIELD_NUMBER; + hash = (53 * hash) + getStart().hashCode(); + } + if (hasEnd()) { + hash = (37 * hash) + END_FIELD_NUMBER; + hash = (53 * hash) + getEnd().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.DateTimeRange parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.DateTimeRange 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.visionai.v1.DateTimeRange parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.DateTimeRange 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.visionai.v1.DateTimeRange parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.DateTimeRange parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.DateTimeRange parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.DateTimeRange 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.visionai.v1.DateTimeRange parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.DateTimeRange 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.visionai.v1.DateTimeRange parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.DateTimeRange 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.visionai.v1.DateTimeRange 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; + } + /** + * + * + *
+   * Datetime range type.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.DateTimeRange} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.DateTimeRange) + com.google.cloud.visionai.v1.DateTimeRangeOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_DateTimeRange_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_DateTimeRange_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.DateTimeRange.class, + com.google.cloud.visionai.v1.DateTimeRange.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.DateTimeRange.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getStartFieldBuilder(); + getEndFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + start_ = null; + if (startBuilder_ != null) { + startBuilder_.dispose(); + startBuilder_ = null; + } + end_ = null; + if (endBuilder_ != null) { + endBuilder_.dispose(); + endBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_DateTimeRange_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.DateTimeRange getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.DateTimeRange.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.DateTimeRange build() { + com.google.cloud.visionai.v1.DateTimeRange result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.DateTimeRange buildPartial() { + com.google.cloud.visionai.v1.DateTimeRange result = + new com.google.cloud.visionai.v1.DateTimeRange(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.visionai.v1.DateTimeRange result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.start_ = startBuilder_ == null ? start_ : startBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.end_ = endBuilder_ == null ? end_ : endBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.DateTimeRange) { + return mergeFrom((com.google.cloud.visionai.v1.DateTimeRange) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.DateTimeRange other) { + if (other == com.google.cloud.visionai.v1.DateTimeRange.getDefaultInstance()) return this; + if (other.hasStart()) { + mergeStart(other.getStart()); + } + if (other.hasEnd()) { + mergeEnd(other.getEnd()); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getStartFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage(getEndFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.type.DateTime start_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.type.DateTime, + com.google.type.DateTime.Builder, + com.google.type.DateTimeOrBuilder> + startBuilder_; + /** + * + * + *
+     * Start date time.
+     * 
+ * + * .google.type.DateTime start = 1; + * + * @return Whether the start field is set. + */ + public boolean hasStart() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * Start date time.
+     * 
+ * + * .google.type.DateTime start = 1; + * + * @return The start. + */ + public com.google.type.DateTime getStart() { + if (startBuilder_ == null) { + return start_ == null ? com.google.type.DateTime.getDefaultInstance() : start_; + } else { + return startBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Start date time.
+     * 
+ * + * .google.type.DateTime start = 1; + */ + public Builder setStart(com.google.type.DateTime value) { + if (startBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + start_ = value; + } else { + startBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Start date time.
+     * 
+ * + * .google.type.DateTime start = 1; + */ + public Builder setStart(com.google.type.DateTime.Builder builderForValue) { + if (startBuilder_ == null) { + start_ = builderForValue.build(); + } else { + startBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Start date time.
+     * 
+ * + * .google.type.DateTime start = 1; + */ + public Builder mergeStart(com.google.type.DateTime value) { + if (startBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && start_ != null + && start_ != com.google.type.DateTime.getDefaultInstance()) { + getStartBuilder().mergeFrom(value); + } else { + start_ = value; + } + } else { + startBuilder_.mergeFrom(value); + } + if (start_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Start date time.
+     * 
+ * + * .google.type.DateTime start = 1; + */ + public Builder clearStart() { + bitField0_ = (bitField0_ & ~0x00000001); + start_ = null; + if (startBuilder_ != null) { + startBuilder_.dispose(); + startBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Start date time.
+     * 
+ * + * .google.type.DateTime start = 1; + */ + public com.google.type.DateTime.Builder getStartBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getStartFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Start date time.
+     * 
+ * + * .google.type.DateTime start = 1; + */ + public com.google.type.DateTimeOrBuilder getStartOrBuilder() { + if (startBuilder_ != null) { + return startBuilder_.getMessageOrBuilder(); + } else { + return start_ == null ? com.google.type.DateTime.getDefaultInstance() : start_; + } + } + /** + * + * + *
+     * Start date time.
+     * 
+ * + * .google.type.DateTime start = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.type.DateTime, + com.google.type.DateTime.Builder, + com.google.type.DateTimeOrBuilder> + getStartFieldBuilder() { + if (startBuilder_ == null) { + startBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.type.DateTime, + com.google.type.DateTime.Builder, + com.google.type.DateTimeOrBuilder>(getStart(), getParentForChildren(), isClean()); + start_ = null; + } + return startBuilder_; + } + + private com.google.type.DateTime end_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.type.DateTime, + com.google.type.DateTime.Builder, + com.google.type.DateTimeOrBuilder> + endBuilder_; + /** + * + * + *
+     * End data time.
+     * 
+ * + * .google.type.DateTime end = 2; + * + * @return Whether the end field is set. + */ + public boolean hasEnd() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * End data time.
+     * 
+ * + * .google.type.DateTime end = 2; + * + * @return The end. + */ + public com.google.type.DateTime getEnd() { + if (endBuilder_ == null) { + return end_ == null ? com.google.type.DateTime.getDefaultInstance() : end_; + } else { + return endBuilder_.getMessage(); + } + } + /** + * + * + *
+     * End data time.
+     * 
+ * + * .google.type.DateTime end = 2; + */ + public Builder setEnd(com.google.type.DateTime value) { + if (endBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + end_ = value; + } else { + endBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * End data time.
+     * 
+ * + * .google.type.DateTime end = 2; + */ + public Builder setEnd(com.google.type.DateTime.Builder builderForValue) { + if (endBuilder_ == null) { + end_ = builderForValue.build(); + } else { + endBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * End data time.
+     * 
+ * + * .google.type.DateTime end = 2; + */ + public Builder mergeEnd(com.google.type.DateTime value) { + if (endBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && end_ != null + && end_ != com.google.type.DateTime.getDefaultInstance()) { + getEndBuilder().mergeFrom(value); + } else { + end_ = value; + } + } else { + endBuilder_.mergeFrom(value); + } + if (end_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + /** + * + * + *
+     * End data time.
+     * 
+ * + * .google.type.DateTime end = 2; + */ + public Builder clearEnd() { + bitField0_ = (bitField0_ & ~0x00000002); + end_ = null; + if (endBuilder_ != null) { + endBuilder_.dispose(); + endBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * End data time.
+     * 
+ * + * .google.type.DateTime end = 2; + */ + public com.google.type.DateTime.Builder getEndBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getEndFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * End data time.
+     * 
+ * + * .google.type.DateTime end = 2; + */ + public com.google.type.DateTimeOrBuilder getEndOrBuilder() { + if (endBuilder_ != null) { + return endBuilder_.getMessageOrBuilder(); + } else { + return end_ == null ? com.google.type.DateTime.getDefaultInstance() : end_; + } + } + /** + * + * + *
+     * End data time.
+     * 
+ * + * .google.type.DateTime end = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.type.DateTime, + com.google.type.DateTime.Builder, + com.google.type.DateTimeOrBuilder> + getEndFieldBuilder() { + if (endBuilder_ == null) { + endBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.type.DateTime, + com.google.type.DateTime.Builder, + com.google.type.DateTimeOrBuilder>(getEnd(), getParentForChildren(), isClean()); + end_ = null; + } + return endBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.DateTimeRange) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.DateTimeRange) + private static final com.google.cloud.visionai.v1.DateTimeRange DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.DateTimeRange(); + } + + public static com.google.cloud.visionai.v1.DateTimeRange getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DateTimeRange parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.DateTimeRange getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DateTimeRangeArray.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DateTimeRangeArray.java new file mode 100644 index 000000000000..446fa972a2f2 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DateTimeRangeArray.java @@ -0,0 +1,942 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/warehouse.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * A list of datetime range values.
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.DateTimeRangeArray} + */ +public final class DateTimeRangeArray extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.DateTimeRangeArray) + DateTimeRangeArrayOrBuilder { + private static final long serialVersionUID = 0L; + // Use DateTimeRangeArray.newBuilder() to construct. + private DateTimeRangeArray(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DateTimeRangeArray() { + dateTimeRanges_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DateTimeRangeArray(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_DateTimeRangeArray_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_DateTimeRangeArray_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.DateTimeRangeArray.class, + com.google.cloud.visionai.v1.DateTimeRangeArray.Builder.class); + } + + public static final int DATE_TIME_RANGES_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List dateTimeRanges_; + /** + * + * + *
+   * Date time ranges.
+   * 
+ * + * repeated .google.cloud.visionai.v1.DateTimeRange date_time_ranges = 1; + */ + @java.lang.Override + public java.util.List getDateTimeRangesList() { + return dateTimeRanges_; + } + /** + * + * + *
+   * Date time ranges.
+   * 
+ * + * repeated .google.cloud.visionai.v1.DateTimeRange date_time_ranges = 1; + */ + @java.lang.Override + public java.util.List + getDateTimeRangesOrBuilderList() { + return dateTimeRanges_; + } + /** + * + * + *
+   * Date time ranges.
+   * 
+ * + * repeated .google.cloud.visionai.v1.DateTimeRange date_time_ranges = 1; + */ + @java.lang.Override + public int getDateTimeRangesCount() { + return dateTimeRanges_.size(); + } + /** + * + * + *
+   * Date time ranges.
+   * 
+ * + * repeated .google.cloud.visionai.v1.DateTimeRange date_time_ranges = 1; + */ + @java.lang.Override + public com.google.cloud.visionai.v1.DateTimeRange getDateTimeRanges(int index) { + return dateTimeRanges_.get(index); + } + /** + * + * + *
+   * Date time ranges.
+   * 
+ * + * repeated .google.cloud.visionai.v1.DateTimeRange date_time_ranges = 1; + */ + @java.lang.Override + public com.google.cloud.visionai.v1.DateTimeRangeOrBuilder getDateTimeRangesOrBuilder(int index) { + return dateTimeRanges_.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 < dateTimeRanges_.size(); i++) { + output.writeMessage(1, dateTimeRanges_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < dateTimeRanges_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, dateTimeRanges_.get(i)); + } + size += getUnknownFields().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.visionai.v1.DateTimeRangeArray)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.DateTimeRangeArray other = + (com.google.cloud.visionai.v1.DateTimeRangeArray) obj; + + if (!getDateTimeRangesList().equals(other.getDateTimeRangesList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getDateTimeRangesCount() > 0) { + hash = (37 * hash) + DATE_TIME_RANGES_FIELD_NUMBER; + hash = (53 * hash) + getDateTimeRangesList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.DateTimeRangeArray parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.DateTimeRangeArray 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.visionai.v1.DateTimeRangeArray parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.DateTimeRangeArray 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.visionai.v1.DateTimeRangeArray parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.DateTimeRangeArray parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.DateTimeRangeArray parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.DateTimeRangeArray 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.visionai.v1.DateTimeRangeArray parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.DateTimeRangeArray 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.visionai.v1.DateTimeRangeArray parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.DateTimeRangeArray 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.visionai.v1.DateTimeRangeArray 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 list of datetime range values.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.DateTimeRangeArray} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.DateTimeRangeArray) + com.google.cloud.visionai.v1.DateTimeRangeArrayOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_DateTimeRangeArray_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_DateTimeRangeArray_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.DateTimeRangeArray.class, + com.google.cloud.visionai.v1.DateTimeRangeArray.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.DateTimeRangeArray.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (dateTimeRangesBuilder_ == null) { + dateTimeRanges_ = java.util.Collections.emptyList(); + } else { + dateTimeRanges_ = null; + dateTimeRangesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_DateTimeRangeArray_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.DateTimeRangeArray getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.DateTimeRangeArray.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.DateTimeRangeArray build() { + com.google.cloud.visionai.v1.DateTimeRangeArray result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.DateTimeRangeArray buildPartial() { + com.google.cloud.visionai.v1.DateTimeRangeArray result = + new com.google.cloud.visionai.v1.DateTimeRangeArray(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.visionai.v1.DateTimeRangeArray result) { + if (dateTimeRangesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + dateTimeRanges_ = java.util.Collections.unmodifiableList(dateTimeRanges_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.dateTimeRanges_ = dateTimeRanges_; + } else { + result.dateTimeRanges_ = dateTimeRangesBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.visionai.v1.DateTimeRangeArray result) { + int from_bitField0_ = bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.DateTimeRangeArray) { + return mergeFrom((com.google.cloud.visionai.v1.DateTimeRangeArray) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.DateTimeRangeArray other) { + if (other == com.google.cloud.visionai.v1.DateTimeRangeArray.getDefaultInstance()) + return this; + if (dateTimeRangesBuilder_ == null) { + if (!other.dateTimeRanges_.isEmpty()) { + if (dateTimeRanges_.isEmpty()) { + dateTimeRanges_ = other.dateTimeRanges_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureDateTimeRangesIsMutable(); + dateTimeRanges_.addAll(other.dateTimeRanges_); + } + onChanged(); + } + } else { + if (!other.dateTimeRanges_.isEmpty()) { + if (dateTimeRangesBuilder_.isEmpty()) { + dateTimeRangesBuilder_.dispose(); + dateTimeRangesBuilder_ = null; + dateTimeRanges_ = other.dateTimeRanges_; + bitField0_ = (bitField0_ & ~0x00000001); + dateTimeRangesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getDateTimeRangesFieldBuilder() + : null; + } else { + dateTimeRangesBuilder_.addAllMessages(other.dateTimeRanges_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.visionai.v1.DateTimeRange m = + input.readMessage( + com.google.cloud.visionai.v1.DateTimeRange.parser(), extensionRegistry); + if (dateTimeRangesBuilder_ == null) { + ensureDateTimeRangesIsMutable(); + dateTimeRanges_.add(m); + } else { + dateTimeRangesBuilder_.addMessage(m); + } + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List dateTimeRanges_ = + java.util.Collections.emptyList(); + + private void ensureDateTimeRangesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + dateTimeRanges_ = + new java.util.ArrayList(dateTimeRanges_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.visionai.v1.DateTimeRange, + com.google.cloud.visionai.v1.DateTimeRange.Builder, + com.google.cloud.visionai.v1.DateTimeRangeOrBuilder> + dateTimeRangesBuilder_; + + /** + * + * + *
+     * Date time ranges.
+     * 
+ * + * repeated .google.cloud.visionai.v1.DateTimeRange date_time_ranges = 1; + */ + public java.util.List getDateTimeRangesList() { + if (dateTimeRangesBuilder_ == null) { + return java.util.Collections.unmodifiableList(dateTimeRanges_); + } else { + return dateTimeRangesBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Date time ranges.
+     * 
+ * + * repeated .google.cloud.visionai.v1.DateTimeRange date_time_ranges = 1; + */ + public int getDateTimeRangesCount() { + if (dateTimeRangesBuilder_ == null) { + return dateTimeRanges_.size(); + } else { + return dateTimeRangesBuilder_.getCount(); + } + } + /** + * + * + *
+     * Date time ranges.
+     * 
+ * + * repeated .google.cloud.visionai.v1.DateTimeRange date_time_ranges = 1; + */ + public com.google.cloud.visionai.v1.DateTimeRange getDateTimeRanges(int index) { + if (dateTimeRangesBuilder_ == null) { + return dateTimeRanges_.get(index); + } else { + return dateTimeRangesBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Date time ranges.
+     * 
+ * + * repeated .google.cloud.visionai.v1.DateTimeRange date_time_ranges = 1; + */ + public Builder setDateTimeRanges(int index, com.google.cloud.visionai.v1.DateTimeRange value) { + if (dateTimeRangesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDateTimeRangesIsMutable(); + dateTimeRanges_.set(index, value); + onChanged(); + } else { + dateTimeRangesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Date time ranges.
+     * 
+ * + * repeated .google.cloud.visionai.v1.DateTimeRange date_time_ranges = 1; + */ + public Builder setDateTimeRanges( + int index, com.google.cloud.visionai.v1.DateTimeRange.Builder builderForValue) { + if (dateTimeRangesBuilder_ == null) { + ensureDateTimeRangesIsMutable(); + dateTimeRanges_.set(index, builderForValue.build()); + onChanged(); + } else { + dateTimeRangesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Date time ranges.
+     * 
+ * + * repeated .google.cloud.visionai.v1.DateTimeRange date_time_ranges = 1; + */ + public Builder addDateTimeRanges(com.google.cloud.visionai.v1.DateTimeRange value) { + if (dateTimeRangesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDateTimeRangesIsMutable(); + dateTimeRanges_.add(value); + onChanged(); + } else { + dateTimeRangesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Date time ranges.
+     * 
+ * + * repeated .google.cloud.visionai.v1.DateTimeRange date_time_ranges = 1; + */ + public Builder addDateTimeRanges(int index, com.google.cloud.visionai.v1.DateTimeRange value) { + if (dateTimeRangesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDateTimeRangesIsMutable(); + dateTimeRanges_.add(index, value); + onChanged(); + } else { + dateTimeRangesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Date time ranges.
+     * 
+ * + * repeated .google.cloud.visionai.v1.DateTimeRange date_time_ranges = 1; + */ + public Builder addDateTimeRanges( + com.google.cloud.visionai.v1.DateTimeRange.Builder builderForValue) { + if (dateTimeRangesBuilder_ == null) { + ensureDateTimeRangesIsMutable(); + dateTimeRanges_.add(builderForValue.build()); + onChanged(); + } else { + dateTimeRangesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Date time ranges.
+     * 
+ * + * repeated .google.cloud.visionai.v1.DateTimeRange date_time_ranges = 1; + */ + public Builder addDateTimeRanges( + int index, com.google.cloud.visionai.v1.DateTimeRange.Builder builderForValue) { + if (dateTimeRangesBuilder_ == null) { + ensureDateTimeRangesIsMutable(); + dateTimeRanges_.add(index, builderForValue.build()); + onChanged(); + } else { + dateTimeRangesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Date time ranges.
+     * 
+ * + * repeated .google.cloud.visionai.v1.DateTimeRange date_time_ranges = 1; + */ + public Builder addAllDateTimeRanges( + java.lang.Iterable values) { + if (dateTimeRangesBuilder_ == null) { + ensureDateTimeRangesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, dateTimeRanges_); + onChanged(); + } else { + dateTimeRangesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Date time ranges.
+     * 
+ * + * repeated .google.cloud.visionai.v1.DateTimeRange date_time_ranges = 1; + */ + public Builder clearDateTimeRanges() { + if (dateTimeRangesBuilder_ == null) { + dateTimeRanges_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + dateTimeRangesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Date time ranges.
+     * 
+ * + * repeated .google.cloud.visionai.v1.DateTimeRange date_time_ranges = 1; + */ + public Builder removeDateTimeRanges(int index) { + if (dateTimeRangesBuilder_ == null) { + ensureDateTimeRangesIsMutable(); + dateTimeRanges_.remove(index); + onChanged(); + } else { + dateTimeRangesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Date time ranges.
+     * 
+ * + * repeated .google.cloud.visionai.v1.DateTimeRange date_time_ranges = 1; + */ + public com.google.cloud.visionai.v1.DateTimeRange.Builder getDateTimeRangesBuilder(int index) { + return getDateTimeRangesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Date time ranges.
+     * 
+ * + * repeated .google.cloud.visionai.v1.DateTimeRange date_time_ranges = 1; + */ + public com.google.cloud.visionai.v1.DateTimeRangeOrBuilder getDateTimeRangesOrBuilder( + int index) { + if (dateTimeRangesBuilder_ == null) { + return dateTimeRanges_.get(index); + } else { + return dateTimeRangesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Date time ranges.
+     * 
+ * + * repeated .google.cloud.visionai.v1.DateTimeRange date_time_ranges = 1; + */ + public java.util.List + getDateTimeRangesOrBuilderList() { + if (dateTimeRangesBuilder_ != null) { + return dateTimeRangesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(dateTimeRanges_); + } + } + /** + * + * + *
+     * Date time ranges.
+     * 
+ * + * repeated .google.cloud.visionai.v1.DateTimeRange date_time_ranges = 1; + */ + public com.google.cloud.visionai.v1.DateTimeRange.Builder addDateTimeRangesBuilder() { + return getDateTimeRangesFieldBuilder() + .addBuilder(com.google.cloud.visionai.v1.DateTimeRange.getDefaultInstance()); + } + /** + * + * + *
+     * Date time ranges.
+     * 
+ * + * repeated .google.cloud.visionai.v1.DateTimeRange date_time_ranges = 1; + */ + public com.google.cloud.visionai.v1.DateTimeRange.Builder addDateTimeRangesBuilder(int index) { + return getDateTimeRangesFieldBuilder() + .addBuilder(index, com.google.cloud.visionai.v1.DateTimeRange.getDefaultInstance()); + } + /** + * + * + *
+     * Date time ranges.
+     * 
+ * + * repeated .google.cloud.visionai.v1.DateTimeRange date_time_ranges = 1; + */ + public java.util.List + getDateTimeRangesBuilderList() { + return getDateTimeRangesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.visionai.v1.DateTimeRange, + com.google.cloud.visionai.v1.DateTimeRange.Builder, + com.google.cloud.visionai.v1.DateTimeRangeOrBuilder> + getDateTimeRangesFieldBuilder() { + if (dateTimeRangesBuilder_ == null) { + dateTimeRangesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.visionai.v1.DateTimeRange, + com.google.cloud.visionai.v1.DateTimeRange.Builder, + com.google.cloud.visionai.v1.DateTimeRangeOrBuilder>( + dateTimeRanges_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + dateTimeRanges_ = null; + } + return dateTimeRangesBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.DateTimeRangeArray) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.DateTimeRangeArray) + private static final com.google.cloud.visionai.v1.DateTimeRangeArray DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.DateTimeRangeArray(); + } + + public static com.google.cloud.visionai.v1.DateTimeRangeArray getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DateTimeRangeArray parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.DateTimeRangeArray getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DateTimeRangeArrayOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DateTimeRangeArrayOrBuilder.java new file mode 100644 index 000000000000..46f1e3fc6947 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DateTimeRangeArrayOrBuilder.java @@ -0,0 +1,78 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/warehouse.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface DateTimeRangeArrayOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.DateTimeRangeArray) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Date time ranges.
+   * 
+ * + * repeated .google.cloud.visionai.v1.DateTimeRange date_time_ranges = 1; + */ + java.util.List getDateTimeRangesList(); + /** + * + * + *
+   * Date time ranges.
+   * 
+ * + * repeated .google.cloud.visionai.v1.DateTimeRange date_time_ranges = 1; + */ + com.google.cloud.visionai.v1.DateTimeRange getDateTimeRanges(int index); + /** + * + * + *
+   * Date time ranges.
+   * 
+ * + * repeated .google.cloud.visionai.v1.DateTimeRange date_time_ranges = 1; + */ + int getDateTimeRangesCount(); + /** + * + * + *
+   * Date time ranges.
+   * 
+ * + * repeated .google.cloud.visionai.v1.DateTimeRange date_time_ranges = 1; + */ + java.util.List + getDateTimeRangesOrBuilderList(); + /** + * + * + *
+   * Date time ranges.
+   * 
+ * + * repeated .google.cloud.visionai.v1.DateTimeRange date_time_ranges = 1; + */ + com.google.cloud.visionai.v1.DateTimeRangeOrBuilder getDateTimeRangesOrBuilder(int index); +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DateTimeRangeOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DateTimeRangeOrBuilder.java new file mode 100644 index 000000000000..c9bf9940c6e8 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DateTimeRangeOrBuilder.java @@ -0,0 +1,96 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/warehouse.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface DateTimeRangeOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.DateTimeRange) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Start date time.
+   * 
+ * + * .google.type.DateTime start = 1; + * + * @return Whether the start field is set. + */ + boolean hasStart(); + /** + * + * + *
+   * Start date time.
+   * 
+ * + * .google.type.DateTime start = 1; + * + * @return The start. + */ + com.google.type.DateTime getStart(); + /** + * + * + *
+   * Start date time.
+   * 
+ * + * .google.type.DateTime start = 1; + */ + com.google.type.DateTimeOrBuilder getStartOrBuilder(); + + /** + * + * + *
+   * End data time.
+   * 
+ * + * .google.type.DateTime end = 2; + * + * @return Whether the end field is set. + */ + boolean hasEnd(); + /** + * + * + *
+   * End data time.
+   * 
+ * + * .google.type.DateTime end = 2; + * + * @return The end. + */ + com.google.type.DateTime getEnd(); + /** + * + * + *
+   * End data time.
+   * 
+ * + * .google.type.DateTime end = 2; + */ + com.google.type.DateTimeOrBuilder getEndOrBuilder(); +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DedicatedResources.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DedicatedResources.java new file mode 100644 index 000000000000..255703f9aed7 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DedicatedResources.java @@ -0,0 +1,2100 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/platform.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * A description of resources that are dedicated to a DeployedModel, and
+ * that need a higher degree of manual configuration.
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.DedicatedResources} + */ +public final class DedicatedResources extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.DedicatedResources) + DedicatedResourcesOrBuilder { + private static final long serialVersionUID = 0L; + // Use DedicatedResources.newBuilder() to construct. + private DedicatedResources(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DedicatedResources() { + autoscalingMetricSpecs_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DedicatedResources(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_DedicatedResources_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_DedicatedResources_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.DedicatedResources.class, + com.google.cloud.visionai.v1.DedicatedResources.Builder.class); + } + + private int bitField0_; + public static final int MACHINE_SPEC_FIELD_NUMBER = 1; + private com.google.cloud.visionai.v1.MachineSpec machineSpec_; + /** + * + * + *
+   * Required. Immutable. The specification of a single machine used by the
+   * prediction.
+   * 
+ * + * + * .google.cloud.visionai.v1.MachineSpec machine_spec = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return Whether the machineSpec field is set. + */ + @java.lang.Override + public boolean hasMachineSpec() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * Required. Immutable. The specification of a single machine used by the
+   * prediction.
+   * 
+ * + * + * .google.cloud.visionai.v1.MachineSpec machine_spec = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The machineSpec. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.MachineSpec getMachineSpec() { + return machineSpec_ == null + ? com.google.cloud.visionai.v1.MachineSpec.getDefaultInstance() + : machineSpec_; + } + /** + * + * + *
+   * Required. Immutable. The specification of a single machine used by the
+   * prediction.
+   * 
+ * + * + * .google.cloud.visionai.v1.MachineSpec machine_spec = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + */ + @java.lang.Override + public com.google.cloud.visionai.v1.MachineSpecOrBuilder getMachineSpecOrBuilder() { + return machineSpec_ == null + ? com.google.cloud.visionai.v1.MachineSpec.getDefaultInstance() + : machineSpec_; + } + + public static final int MIN_REPLICA_COUNT_FIELD_NUMBER = 2; + private int minReplicaCount_ = 0; + /** + * + * + *
+   * Required. Immutable. The minimum number of machine replicas this
+   * DeployedModel will be always deployed on. This value must be greater than
+   * or equal to 1.
+   *
+   * If traffic against the DeployedModel increases, it may dynamically be
+   * deployed onto more replicas, and as traffic decreases, some of these extra
+   * replicas may be freed.
+   * 
+ * + * + * int32 min_replica_count = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The minReplicaCount. + */ + @java.lang.Override + public int getMinReplicaCount() { + return minReplicaCount_; + } + + public static final int MAX_REPLICA_COUNT_FIELD_NUMBER = 3; + private int maxReplicaCount_ = 0; + /** + * + * + *
+   * Immutable. The maximum number of replicas this DeployedModel may be
+   * deployed on when the traffic against it increases. If the requested value
+   * is too large, the deployment will error, but if deployment succeeds then
+   * the ability to scale the model to that many replicas is guaranteed (barring
+   * service outages). If traffic against the DeployedModel increases beyond
+   * what its replicas at maximum may handle, a portion of the traffic will be
+   * dropped. If this value is not provided, will use
+   * [min_replica_count][google.cloud.visionai.v1.DedicatedResources.min_replica_count]
+   * as the default value.
+   *
+   * The value of this field impacts the charge against Vertex CPU and GPU
+   * quotas. Specifically, you will be charged for max_replica_count *
+   * number of cores in the selected machine type) and (max_replica_count *
+   * number of GPUs per replica in the selected machine type).
+   * 
+ * + * int32 max_replica_count = 3 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The maxReplicaCount. + */ + @java.lang.Override + public int getMaxReplicaCount() { + return maxReplicaCount_; + } + + public static final int AUTOSCALING_METRIC_SPECS_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private java.util.List + autoscalingMetricSpecs_; + /** + * + * + *
+   * Immutable. The metric specifications that overrides a resource
+   * utilization metric (CPU utilization, accelerator's duty cycle, and so on)
+   * target value (default to 60 if not set). At most one entry is allowed per
+   * metric.
+   *
+   * If
+   * [machine_spec.accelerator_count][google.cloud.visionai.v1.MachineSpec.accelerator_count]
+   * is above 0, the autoscaling will be based on both CPU utilization and
+   * accelerator's duty cycle metrics and scale up when either metrics exceeds
+   * its target value while scale down if both metrics are under their target
+   * value. The default target value is 60 for both metrics.
+   *
+   * If
+   * [machine_spec.accelerator_count][google.cloud.visionai.v1.MachineSpec.accelerator_count]
+   * is 0, the autoscaling will be based on CPU utilization metric only with
+   * default target value 60 if not explicitly set.
+   *
+   * For example, in the case of Online Prediction, if you want to override
+   * target CPU utilization to 80, you should set
+   * [autoscaling_metric_specs.metric_name][google.cloud.visionai.v1.AutoscalingMetricSpec.metric_name]
+   * to `aiplatform.googleapis.com/prediction/online/cpu/utilization` and
+   * [autoscaling_metric_specs.target][google.cloud.visionai.v1.AutoscalingMetricSpec.target]
+   * to `80`.
+   * 
+ * + * + * repeated .google.cloud.visionai.v1.AutoscalingMetricSpec autoscaling_metric_specs = 4 [(.google.api.field_behavior) = IMMUTABLE]; + * + */ + @java.lang.Override + public java.util.List + getAutoscalingMetricSpecsList() { + return autoscalingMetricSpecs_; + } + /** + * + * + *
+   * Immutable. The metric specifications that overrides a resource
+   * utilization metric (CPU utilization, accelerator's duty cycle, and so on)
+   * target value (default to 60 if not set). At most one entry is allowed per
+   * metric.
+   *
+   * If
+   * [machine_spec.accelerator_count][google.cloud.visionai.v1.MachineSpec.accelerator_count]
+   * is above 0, the autoscaling will be based on both CPU utilization and
+   * accelerator's duty cycle metrics and scale up when either metrics exceeds
+   * its target value while scale down if both metrics are under their target
+   * value. The default target value is 60 for both metrics.
+   *
+   * If
+   * [machine_spec.accelerator_count][google.cloud.visionai.v1.MachineSpec.accelerator_count]
+   * is 0, the autoscaling will be based on CPU utilization metric only with
+   * default target value 60 if not explicitly set.
+   *
+   * For example, in the case of Online Prediction, if you want to override
+   * target CPU utilization to 80, you should set
+   * [autoscaling_metric_specs.metric_name][google.cloud.visionai.v1.AutoscalingMetricSpec.metric_name]
+   * to `aiplatform.googleapis.com/prediction/online/cpu/utilization` and
+   * [autoscaling_metric_specs.target][google.cloud.visionai.v1.AutoscalingMetricSpec.target]
+   * to `80`.
+   * 
+ * + * + * repeated .google.cloud.visionai.v1.AutoscalingMetricSpec autoscaling_metric_specs = 4 [(.google.api.field_behavior) = IMMUTABLE]; + * + */ + @java.lang.Override + public java.util.List + getAutoscalingMetricSpecsOrBuilderList() { + return autoscalingMetricSpecs_; + } + /** + * + * + *
+   * Immutable. The metric specifications that overrides a resource
+   * utilization metric (CPU utilization, accelerator's duty cycle, and so on)
+   * target value (default to 60 if not set). At most one entry is allowed per
+   * metric.
+   *
+   * If
+   * [machine_spec.accelerator_count][google.cloud.visionai.v1.MachineSpec.accelerator_count]
+   * is above 0, the autoscaling will be based on both CPU utilization and
+   * accelerator's duty cycle metrics and scale up when either metrics exceeds
+   * its target value while scale down if both metrics are under their target
+   * value. The default target value is 60 for both metrics.
+   *
+   * If
+   * [machine_spec.accelerator_count][google.cloud.visionai.v1.MachineSpec.accelerator_count]
+   * is 0, the autoscaling will be based on CPU utilization metric only with
+   * default target value 60 if not explicitly set.
+   *
+   * For example, in the case of Online Prediction, if you want to override
+   * target CPU utilization to 80, you should set
+   * [autoscaling_metric_specs.metric_name][google.cloud.visionai.v1.AutoscalingMetricSpec.metric_name]
+   * to `aiplatform.googleapis.com/prediction/online/cpu/utilization` and
+   * [autoscaling_metric_specs.target][google.cloud.visionai.v1.AutoscalingMetricSpec.target]
+   * to `80`.
+   * 
+ * + * + * repeated .google.cloud.visionai.v1.AutoscalingMetricSpec autoscaling_metric_specs = 4 [(.google.api.field_behavior) = IMMUTABLE]; + * + */ + @java.lang.Override + public int getAutoscalingMetricSpecsCount() { + return autoscalingMetricSpecs_.size(); + } + /** + * + * + *
+   * Immutable. The metric specifications that overrides a resource
+   * utilization metric (CPU utilization, accelerator's duty cycle, and so on)
+   * target value (default to 60 if not set). At most one entry is allowed per
+   * metric.
+   *
+   * If
+   * [machine_spec.accelerator_count][google.cloud.visionai.v1.MachineSpec.accelerator_count]
+   * is above 0, the autoscaling will be based on both CPU utilization and
+   * accelerator's duty cycle metrics and scale up when either metrics exceeds
+   * its target value while scale down if both metrics are under their target
+   * value. The default target value is 60 for both metrics.
+   *
+   * If
+   * [machine_spec.accelerator_count][google.cloud.visionai.v1.MachineSpec.accelerator_count]
+   * is 0, the autoscaling will be based on CPU utilization metric only with
+   * default target value 60 if not explicitly set.
+   *
+   * For example, in the case of Online Prediction, if you want to override
+   * target CPU utilization to 80, you should set
+   * [autoscaling_metric_specs.metric_name][google.cloud.visionai.v1.AutoscalingMetricSpec.metric_name]
+   * to `aiplatform.googleapis.com/prediction/online/cpu/utilization` and
+   * [autoscaling_metric_specs.target][google.cloud.visionai.v1.AutoscalingMetricSpec.target]
+   * to `80`.
+   * 
+ * + * + * repeated .google.cloud.visionai.v1.AutoscalingMetricSpec autoscaling_metric_specs = 4 [(.google.api.field_behavior) = IMMUTABLE]; + * + */ + @java.lang.Override + public com.google.cloud.visionai.v1.AutoscalingMetricSpec getAutoscalingMetricSpecs(int index) { + return autoscalingMetricSpecs_.get(index); + } + /** + * + * + *
+   * Immutable. The metric specifications that overrides a resource
+   * utilization metric (CPU utilization, accelerator's duty cycle, and so on)
+   * target value (default to 60 if not set). At most one entry is allowed per
+   * metric.
+   *
+   * If
+   * [machine_spec.accelerator_count][google.cloud.visionai.v1.MachineSpec.accelerator_count]
+   * is above 0, the autoscaling will be based on both CPU utilization and
+   * accelerator's duty cycle metrics and scale up when either metrics exceeds
+   * its target value while scale down if both metrics are under their target
+   * value. The default target value is 60 for both metrics.
+   *
+   * If
+   * [machine_spec.accelerator_count][google.cloud.visionai.v1.MachineSpec.accelerator_count]
+   * is 0, the autoscaling will be based on CPU utilization metric only with
+   * default target value 60 if not explicitly set.
+   *
+   * For example, in the case of Online Prediction, if you want to override
+   * target CPU utilization to 80, you should set
+   * [autoscaling_metric_specs.metric_name][google.cloud.visionai.v1.AutoscalingMetricSpec.metric_name]
+   * to `aiplatform.googleapis.com/prediction/online/cpu/utilization` and
+   * [autoscaling_metric_specs.target][google.cloud.visionai.v1.AutoscalingMetricSpec.target]
+   * to `80`.
+   * 
+ * + * + * repeated .google.cloud.visionai.v1.AutoscalingMetricSpec autoscaling_metric_specs = 4 [(.google.api.field_behavior) = IMMUTABLE]; + * + */ + @java.lang.Override + public com.google.cloud.visionai.v1.AutoscalingMetricSpecOrBuilder + getAutoscalingMetricSpecsOrBuilder(int index) { + return autoscalingMetricSpecs_.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 (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getMachineSpec()); + } + if (minReplicaCount_ != 0) { + output.writeInt32(2, minReplicaCount_); + } + if (maxReplicaCount_ != 0) { + output.writeInt32(3, maxReplicaCount_); + } + for (int i = 0; i < autoscalingMetricSpecs_.size(); i++) { + output.writeMessage(4, autoscalingMetricSpecs_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getMachineSpec()); + } + if (minReplicaCount_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, minReplicaCount_); + } + if (maxReplicaCount_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(3, maxReplicaCount_); + } + for (int i = 0; i < autoscalingMetricSpecs_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 4, autoscalingMetricSpecs_.get(i)); + } + size += getUnknownFields().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.visionai.v1.DedicatedResources)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.DedicatedResources other = + (com.google.cloud.visionai.v1.DedicatedResources) obj; + + if (hasMachineSpec() != other.hasMachineSpec()) return false; + if (hasMachineSpec()) { + if (!getMachineSpec().equals(other.getMachineSpec())) return false; + } + if (getMinReplicaCount() != other.getMinReplicaCount()) return false; + if (getMaxReplicaCount() != other.getMaxReplicaCount()) return false; + if (!getAutoscalingMetricSpecsList().equals(other.getAutoscalingMetricSpecsList())) + return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasMachineSpec()) { + hash = (37 * hash) + MACHINE_SPEC_FIELD_NUMBER; + hash = (53 * hash) + getMachineSpec().hashCode(); + } + hash = (37 * hash) + MIN_REPLICA_COUNT_FIELD_NUMBER; + hash = (53 * hash) + getMinReplicaCount(); + hash = (37 * hash) + MAX_REPLICA_COUNT_FIELD_NUMBER; + hash = (53 * hash) + getMaxReplicaCount(); + if (getAutoscalingMetricSpecsCount() > 0) { + hash = (37 * hash) + AUTOSCALING_METRIC_SPECS_FIELD_NUMBER; + hash = (53 * hash) + getAutoscalingMetricSpecsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.DedicatedResources parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.DedicatedResources 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.visionai.v1.DedicatedResources parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.DedicatedResources 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.visionai.v1.DedicatedResources parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.DedicatedResources parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.DedicatedResources parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.DedicatedResources 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.visionai.v1.DedicatedResources parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.DedicatedResources 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.visionai.v1.DedicatedResources parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.DedicatedResources 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.visionai.v1.DedicatedResources 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 description of resources that are dedicated to a DeployedModel, and
+   * that need a higher degree of manual configuration.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.DedicatedResources} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.DedicatedResources) + com.google.cloud.visionai.v1.DedicatedResourcesOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_DedicatedResources_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_DedicatedResources_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.DedicatedResources.class, + com.google.cloud.visionai.v1.DedicatedResources.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.DedicatedResources.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getMachineSpecFieldBuilder(); + getAutoscalingMetricSpecsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + machineSpec_ = null; + if (machineSpecBuilder_ != null) { + machineSpecBuilder_.dispose(); + machineSpecBuilder_ = null; + } + minReplicaCount_ = 0; + maxReplicaCount_ = 0; + if (autoscalingMetricSpecsBuilder_ == null) { + autoscalingMetricSpecs_ = java.util.Collections.emptyList(); + } else { + autoscalingMetricSpecs_ = null; + autoscalingMetricSpecsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000008); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_DedicatedResources_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.DedicatedResources getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.DedicatedResources.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.DedicatedResources build() { + com.google.cloud.visionai.v1.DedicatedResources result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.DedicatedResources buildPartial() { + com.google.cloud.visionai.v1.DedicatedResources result = + new com.google.cloud.visionai.v1.DedicatedResources(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.visionai.v1.DedicatedResources result) { + if (autoscalingMetricSpecsBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0)) { + autoscalingMetricSpecs_ = java.util.Collections.unmodifiableList(autoscalingMetricSpecs_); + bitField0_ = (bitField0_ & ~0x00000008); + } + result.autoscalingMetricSpecs_ = autoscalingMetricSpecs_; + } else { + result.autoscalingMetricSpecs_ = autoscalingMetricSpecsBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.visionai.v1.DedicatedResources result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.machineSpec_ = + machineSpecBuilder_ == null ? machineSpec_ : machineSpecBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.minReplicaCount_ = minReplicaCount_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.maxReplicaCount_ = maxReplicaCount_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.DedicatedResources) { + return mergeFrom((com.google.cloud.visionai.v1.DedicatedResources) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.DedicatedResources other) { + if (other == com.google.cloud.visionai.v1.DedicatedResources.getDefaultInstance()) + return this; + if (other.hasMachineSpec()) { + mergeMachineSpec(other.getMachineSpec()); + } + if (other.getMinReplicaCount() != 0) { + setMinReplicaCount(other.getMinReplicaCount()); + } + if (other.getMaxReplicaCount() != 0) { + setMaxReplicaCount(other.getMaxReplicaCount()); + } + if (autoscalingMetricSpecsBuilder_ == null) { + if (!other.autoscalingMetricSpecs_.isEmpty()) { + if (autoscalingMetricSpecs_.isEmpty()) { + autoscalingMetricSpecs_ = other.autoscalingMetricSpecs_; + bitField0_ = (bitField0_ & ~0x00000008); + } else { + ensureAutoscalingMetricSpecsIsMutable(); + autoscalingMetricSpecs_.addAll(other.autoscalingMetricSpecs_); + } + onChanged(); + } + } else { + if (!other.autoscalingMetricSpecs_.isEmpty()) { + if (autoscalingMetricSpecsBuilder_.isEmpty()) { + autoscalingMetricSpecsBuilder_.dispose(); + autoscalingMetricSpecsBuilder_ = null; + autoscalingMetricSpecs_ = other.autoscalingMetricSpecs_; + bitField0_ = (bitField0_ & ~0x00000008); + autoscalingMetricSpecsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getAutoscalingMetricSpecsFieldBuilder() + : null; + } else { + autoscalingMetricSpecsBuilder_.addAllMessages(other.autoscalingMetricSpecs_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getMachineSpecFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + minReplicaCount_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 24: + { + maxReplicaCount_ = input.readInt32(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 34: + { + com.google.cloud.visionai.v1.AutoscalingMetricSpec m = + input.readMessage( + com.google.cloud.visionai.v1.AutoscalingMetricSpec.parser(), + extensionRegistry); + if (autoscalingMetricSpecsBuilder_ == null) { + ensureAutoscalingMetricSpecsIsMutable(); + autoscalingMetricSpecs_.add(m); + } else { + autoscalingMetricSpecsBuilder_.addMessage(m); + } + break; + } // case 34 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.cloud.visionai.v1.MachineSpec machineSpec_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.MachineSpec, + com.google.cloud.visionai.v1.MachineSpec.Builder, + com.google.cloud.visionai.v1.MachineSpecOrBuilder> + machineSpecBuilder_; + /** + * + * + *
+     * Required. Immutable. The specification of a single machine used by the
+     * prediction.
+     * 
+ * + * + * .google.cloud.visionai.v1.MachineSpec machine_spec = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return Whether the machineSpec field is set. + */ + public boolean hasMachineSpec() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * Required. Immutable. The specification of a single machine used by the
+     * prediction.
+     * 
+ * + * + * .google.cloud.visionai.v1.MachineSpec machine_spec = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The machineSpec. + */ + public com.google.cloud.visionai.v1.MachineSpec getMachineSpec() { + if (machineSpecBuilder_ == null) { + return machineSpec_ == null + ? com.google.cloud.visionai.v1.MachineSpec.getDefaultInstance() + : machineSpec_; + } else { + return machineSpecBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. Immutable. The specification of a single machine used by the
+     * prediction.
+     * 
+ * + * + * .google.cloud.visionai.v1.MachineSpec machine_spec = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + */ + public Builder setMachineSpec(com.google.cloud.visionai.v1.MachineSpec value) { + if (machineSpecBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + machineSpec_ = value; + } else { + machineSpecBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Immutable. The specification of a single machine used by the
+     * prediction.
+     * 
+ * + * + * .google.cloud.visionai.v1.MachineSpec machine_spec = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + */ + public Builder setMachineSpec( + com.google.cloud.visionai.v1.MachineSpec.Builder builderForValue) { + if (machineSpecBuilder_ == null) { + machineSpec_ = builderForValue.build(); + } else { + machineSpecBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Immutable. The specification of a single machine used by the
+     * prediction.
+     * 
+ * + * + * .google.cloud.visionai.v1.MachineSpec machine_spec = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + */ + public Builder mergeMachineSpec(com.google.cloud.visionai.v1.MachineSpec value) { + if (machineSpecBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && machineSpec_ != null + && machineSpec_ != com.google.cloud.visionai.v1.MachineSpec.getDefaultInstance()) { + getMachineSpecBuilder().mergeFrom(value); + } else { + machineSpec_ = value; + } + } else { + machineSpecBuilder_.mergeFrom(value); + } + if (machineSpec_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Required. Immutable. The specification of a single machine used by the
+     * prediction.
+     * 
+ * + * + * .google.cloud.visionai.v1.MachineSpec machine_spec = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + */ + public Builder clearMachineSpec() { + bitField0_ = (bitField0_ & ~0x00000001); + machineSpec_ = null; + if (machineSpecBuilder_ != null) { + machineSpecBuilder_.dispose(); + machineSpecBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Immutable. The specification of a single machine used by the
+     * prediction.
+     * 
+ * + * + * .google.cloud.visionai.v1.MachineSpec machine_spec = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + */ + public com.google.cloud.visionai.v1.MachineSpec.Builder getMachineSpecBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getMachineSpecFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. Immutable. The specification of a single machine used by the
+     * prediction.
+     * 
+ * + * + * .google.cloud.visionai.v1.MachineSpec machine_spec = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + */ + public com.google.cloud.visionai.v1.MachineSpecOrBuilder getMachineSpecOrBuilder() { + if (machineSpecBuilder_ != null) { + return machineSpecBuilder_.getMessageOrBuilder(); + } else { + return machineSpec_ == null + ? com.google.cloud.visionai.v1.MachineSpec.getDefaultInstance() + : machineSpec_; + } + } + /** + * + * + *
+     * Required. Immutable. The specification of a single machine used by the
+     * prediction.
+     * 
+ * + * + * .google.cloud.visionai.v1.MachineSpec machine_spec = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.MachineSpec, + com.google.cloud.visionai.v1.MachineSpec.Builder, + com.google.cloud.visionai.v1.MachineSpecOrBuilder> + getMachineSpecFieldBuilder() { + if (machineSpecBuilder_ == null) { + machineSpecBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.MachineSpec, + com.google.cloud.visionai.v1.MachineSpec.Builder, + com.google.cloud.visionai.v1.MachineSpecOrBuilder>( + getMachineSpec(), getParentForChildren(), isClean()); + machineSpec_ = null; + } + return machineSpecBuilder_; + } + + private int minReplicaCount_; + /** + * + * + *
+     * Required. Immutable. The minimum number of machine replicas this
+     * DeployedModel will be always deployed on. This value must be greater than
+     * or equal to 1.
+     *
+     * If traffic against the DeployedModel increases, it may dynamically be
+     * deployed onto more replicas, and as traffic decreases, some of these extra
+     * replicas may be freed.
+     * 
+ * + * + * int32 min_replica_count = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The minReplicaCount. + */ + @java.lang.Override + public int getMinReplicaCount() { + return minReplicaCount_; + } + /** + * + * + *
+     * Required. Immutable. The minimum number of machine replicas this
+     * DeployedModel will be always deployed on. This value must be greater than
+     * or equal to 1.
+     *
+     * If traffic against the DeployedModel increases, it may dynamically be
+     * deployed onto more replicas, and as traffic decreases, some of these extra
+     * replicas may be freed.
+     * 
+ * + * + * int32 min_replica_count = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @param value The minReplicaCount to set. + * @return This builder for chaining. + */ + public Builder setMinReplicaCount(int value) { + + minReplicaCount_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Immutable. The minimum number of machine replicas this
+     * DeployedModel will be always deployed on. This value must be greater than
+     * or equal to 1.
+     *
+     * If traffic against the DeployedModel increases, it may dynamically be
+     * deployed onto more replicas, and as traffic decreases, some of these extra
+     * replicas may be freed.
+     * 
+ * + * + * int32 min_replica_count = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return This builder for chaining. + */ + public Builder clearMinReplicaCount() { + bitField0_ = (bitField0_ & ~0x00000002); + minReplicaCount_ = 0; + onChanged(); + return this; + } + + private int maxReplicaCount_; + /** + * + * + *
+     * Immutable. The maximum number of replicas this DeployedModel may be
+     * deployed on when the traffic against it increases. If the requested value
+     * is too large, the deployment will error, but if deployment succeeds then
+     * the ability to scale the model to that many replicas is guaranteed (barring
+     * service outages). If traffic against the DeployedModel increases beyond
+     * what its replicas at maximum may handle, a portion of the traffic will be
+     * dropped. If this value is not provided, will use
+     * [min_replica_count][google.cloud.visionai.v1.DedicatedResources.min_replica_count]
+     * as the default value.
+     *
+     * The value of this field impacts the charge against Vertex CPU and GPU
+     * quotas. Specifically, you will be charged for max_replica_count *
+     * number of cores in the selected machine type) and (max_replica_count *
+     * number of GPUs per replica in the selected machine type).
+     * 
+ * + * int32 max_replica_count = 3 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The maxReplicaCount. + */ + @java.lang.Override + public int getMaxReplicaCount() { + return maxReplicaCount_; + } + /** + * + * + *
+     * Immutable. The maximum number of replicas this DeployedModel may be
+     * deployed on when the traffic against it increases. If the requested value
+     * is too large, the deployment will error, but if deployment succeeds then
+     * the ability to scale the model to that many replicas is guaranteed (barring
+     * service outages). If traffic against the DeployedModel increases beyond
+     * what its replicas at maximum may handle, a portion of the traffic will be
+     * dropped. If this value is not provided, will use
+     * [min_replica_count][google.cloud.visionai.v1.DedicatedResources.min_replica_count]
+     * as the default value.
+     *
+     * The value of this field impacts the charge against Vertex CPU and GPU
+     * quotas. Specifically, you will be charged for max_replica_count *
+     * number of cores in the selected machine type) and (max_replica_count *
+     * number of GPUs per replica in the selected machine type).
+     * 
+ * + * int32 max_replica_count = 3 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @param value The maxReplicaCount to set. + * @return This builder for chaining. + */ + public Builder setMaxReplicaCount(int value) { + + maxReplicaCount_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Immutable. The maximum number of replicas this DeployedModel may be
+     * deployed on when the traffic against it increases. If the requested value
+     * is too large, the deployment will error, but if deployment succeeds then
+     * the ability to scale the model to that many replicas is guaranteed (barring
+     * service outages). If traffic against the DeployedModel increases beyond
+     * what its replicas at maximum may handle, a portion of the traffic will be
+     * dropped. If this value is not provided, will use
+     * [min_replica_count][google.cloud.visionai.v1.DedicatedResources.min_replica_count]
+     * as the default value.
+     *
+     * The value of this field impacts the charge against Vertex CPU and GPU
+     * quotas. Specifically, you will be charged for max_replica_count *
+     * number of cores in the selected machine type) and (max_replica_count *
+     * number of GPUs per replica in the selected machine type).
+     * 
+ * + * int32 max_replica_count = 3 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return This builder for chaining. + */ + public Builder clearMaxReplicaCount() { + bitField0_ = (bitField0_ & ~0x00000004); + maxReplicaCount_ = 0; + onChanged(); + return this; + } + + private java.util.List + autoscalingMetricSpecs_ = java.util.Collections.emptyList(); + + private void ensureAutoscalingMetricSpecsIsMutable() { + if (!((bitField0_ & 0x00000008) != 0)) { + autoscalingMetricSpecs_ = + new java.util.ArrayList( + autoscalingMetricSpecs_); + bitField0_ |= 0x00000008; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.visionai.v1.AutoscalingMetricSpec, + com.google.cloud.visionai.v1.AutoscalingMetricSpec.Builder, + com.google.cloud.visionai.v1.AutoscalingMetricSpecOrBuilder> + autoscalingMetricSpecsBuilder_; + + /** + * + * + *
+     * Immutable. The metric specifications that overrides a resource
+     * utilization metric (CPU utilization, accelerator's duty cycle, and so on)
+     * target value (default to 60 if not set). At most one entry is allowed per
+     * metric.
+     *
+     * If
+     * [machine_spec.accelerator_count][google.cloud.visionai.v1.MachineSpec.accelerator_count]
+     * is above 0, the autoscaling will be based on both CPU utilization and
+     * accelerator's duty cycle metrics and scale up when either metrics exceeds
+     * its target value while scale down if both metrics are under their target
+     * value. The default target value is 60 for both metrics.
+     *
+     * If
+     * [machine_spec.accelerator_count][google.cloud.visionai.v1.MachineSpec.accelerator_count]
+     * is 0, the autoscaling will be based on CPU utilization metric only with
+     * default target value 60 if not explicitly set.
+     *
+     * For example, in the case of Online Prediction, if you want to override
+     * target CPU utilization to 80, you should set
+     * [autoscaling_metric_specs.metric_name][google.cloud.visionai.v1.AutoscalingMetricSpec.metric_name]
+     * to `aiplatform.googleapis.com/prediction/online/cpu/utilization` and
+     * [autoscaling_metric_specs.target][google.cloud.visionai.v1.AutoscalingMetricSpec.target]
+     * to `80`.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.AutoscalingMetricSpec autoscaling_metric_specs = 4 [(.google.api.field_behavior) = IMMUTABLE]; + * + */ + public java.util.List + getAutoscalingMetricSpecsList() { + if (autoscalingMetricSpecsBuilder_ == null) { + return java.util.Collections.unmodifiableList(autoscalingMetricSpecs_); + } else { + return autoscalingMetricSpecsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Immutable. The metric specifications that overrides a resource
+     * utilization metric (CPU utilization, accelerator's duty cycle, and so on)
+     * target value (default to 60 if not set). At most one entry is allowed per
+     * metric.
+     *
+     * If
+     * [machine_spec.accelerator_count][google.cloud.visionai.v1.MachineSpec.accelerator_count]
+     * is above 0, the autoscaling will be based on both CPU utilization and
+     * accelerator's duty cycle metrics and scale up when either metrics exceeds
+     * its target value while scale down if both metrics are under their target
+     * value. The default target value is 60 for both metrics.
+     *
+     * If
+     * [machine_spec.accelerator_count][google.cloud.visionai.v1.MachineSpec.accelerator_count]
+     * is 0, the autoscaling will be based on CPU utilization metric only with
+     * default target value 60 if not explicitly set.
+     *
+     * For example, in the case of Online Prediction, if you want to override
+     * target CPU utilization to 80, you should set
+     * [autoscaling_metric_specs.metric_name][google.cloud.visionai.v1.AutoscalingMetricSpec.metric_name]
+     * to `aiplatform.googleapis.com/prediction/online/cpu/utilization` and
+     * [autoscaling_metric_specs.target][google.cloud.visionai.v1.AutoscalingMetricSpec.target]
+     * to `80`.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.AutoscalingMetricSpec autoscaling_metric_specs = 4 [(.google.api.field_behavior) = IMMUTABLE]; + * + */ + public int getAutoscalingMetricSpecsCount() { + if (autoscalingMetricSpecsBuilder_ == null) { + return autoscalingMetricSpecs_.size(); + } else { + return autoscalingMetricSpecsBuilder_.getCount(); + } + } + /** + * + * + *
+     * Immutable. The metric specifications that overrides a resource
+     * utilization metric (CPU utilization, accelerator's duty cycle, and so on)
+     * target value (default to 60 if not set). At most one entry is allowed per
+     * metric.
+     *
+     * If
+     * [machine_spec.accelerator_count][google.cloud.visionai.v1.MachineSpec.accelerator_count]
+     * is above 0, the autoscaling will be based on both CPU utilization and
+     * accelerator's duty cycle metrics and scale up when either metrics exceeds
+     * its target value while scale down if both metrics are under their target
+     * value. The default target value is 60 for both metrics.
+     *
+     * If
+     * [machine_spec.accelerator_count][google.cloud.visionai.v1.MachineSpec.accelerator_count]
+     * is 0, the autoscaling will be based on CPU utilization metric only with
+     * default target value 60 if not explicitly set.
+     *
+     * For example, in the case of Online Prediction, if you want to override
+     * target CPU utilization to 80, you should set
+     * [autoscaling_metric_specs.metric_name][google.cloud.visionai.v1.AutoscalingMetricSpec.metric_name]
+     * to `aiplatform.googleapis.com/prediction/online/cpu/utilization` and
+     * [autoscaling_metric_specs.target][google.cloud.visionai.v1.AutoscalingMetricSpec.target]
+     * to `80`.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.AutoscalingMetricSpec autoscaling_metric_specs = 4 [(.google.api.field_behavior) = IMMUTABLE]; + * + */ + public com.google.cloud.visionai.v1.AutoscalingMetricSpec getAutoscalingMetricSpecs(int index) { + if (autoscalingMetricSpecsBuilder_ == null) { + return autoscalingMetricSpecs_.get(index); + } else { + return autoscalingMetricSpecsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Immutable. The metric specifications that overrides a resource
+     * utilization metric (CPU utilization, accelerator's duty cycle, and so on)
+     * target value (default to 60 if not set). At most one entry is allowed per
+     * metric.
+     *
+     * If
+     * [machine_spec.accelerator_count][google.cloud.visionai.v1.MachineSpec.accelerator_count]
+     * is above 0, the autoscaling will be based on both CPU utilization and
+     * accelerator's duty cycle metrics and scale up when either metrics exceeds
+     * its target value while scale down if both metrics are under their target
+     * value. The default target value is 60 for both metrics.
+     *
+     * If
+     * [machine_spec.accelerator_count][google.cloud.visionai.v1.MachineSpec.accelerator_count]
+     * is 0, the autoscaling will be based on CPU utilization metric only with
+     * default target value 60 if not explicitly set.
+     *
+     * For example, in the case of Online Prediction, if you want to override
+     * target CPU utilization to 80, you should set
+     * [autoscaling_metric_specs.metric_name][google.cloud.visionai.v1.AutoscalingMetricSpec.metric_name]
+     * to `aiplatform.googleapis.com/prediction/online/cpu/utilization` and
+     * [autoscaling_metric_specs.target][google.cloud.visionai.v1.AutoscalingMetricSpec.target]
+     * to `80`.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.AutoscalingMetricSpec autoscaling_metric_specs = 4 [(.google.api.field_behavior) = IMMUTABLE]; + * + */ + public Builder setAutoscalingMetricSpecs( + int index, com.google.cloud.visionai.v1.AutoscalingMetricSpec value) { + if (autoscalingMetricSpecsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAutoscalingMetricSpecsIsMutable(); + autoscalingMetricSpecs_.set(index, value); + onChanged(); + } else { + autoscalingMetricSpecsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Immutable. The metric specifications that overrides a resource
+     * utilization metric (CPU utilization, accelerator's duty cycle, and so on)
+     * target value (default to 60 if not set). At most one entry is allowed per
+     * metric.
+     *
+     * If
+     * [machine_spec.accelerator_count][google.cloud.visionai.v1.MachineSpec.accelerator_count]
+     * is above 0, the autoscaling will be based on both CPU utilization and
+     * accelerator's duty cycle metrics and scale up when either metrics exceeds
+     * its target value while scale down if both metrics are under their target
+     * value. The default target value is 60 for both metrics.
+     *
+     * If
+     * [machine_spec.accelerator_count][google.cloud.visionai.v1.MachineSpec.accelerator_count]
+     * is 0, the autoscaling will be based on CPU utilization metric only with
+     * default target value 60 if not explicitly set.
+     *
+     * For example, in the case of Online Prediction, if you want to override
+     * target CPU utilization to 80, you should set
+     * [autoscaling_metric_specs.metric_name][google.cloud.visionai.v1.AutoscalingMetricSpec.metric_name]
+     * to `aiplatform.googleapis.com/prediction/online/cpu/utilization` and
+     * [autoscaling_metric_specs.target][google.cloud.visionai.v1.AutoscalingMetricSpec.target]
+     * to `80`.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.AutoscalingMetricSpec autoscaling_metric_specs = 4 [(.google.api.field_behavior) = IMMUTABLE]; + * + */ + public Builder setAutoscalingMetricSpecs( + int index, com.google.cloud.visionai.v1.AutoscalingMetricSpec.Builder builderForValue) { + if (autoscalingMetricSpecsBuilder_ == null) { + ensureAutoscalingMetricSpecsIsMutable(); + autoscalingMetricSpecs_.set(index, builderForValue.build()); + onChanged(); + } else { + autoscalingMetricSpecsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Immutable. The metric specifications that overrides a resource
+     * utilization metric (CPU utilization, accelerator's duty cycle, and so on)
+     * target value (default to 60 if not set). At most one entry is allowed per
+     * metric.
+     *
+     * If
+     * [machine_spec.accelerator_count][google.cloud.visionai.v1.MachineSpec.accelerator_count]
+     * is above 0, the autoscaling will be based on both CPU utilization and
+     * accelerator's duty cycle metrics and scale up when either metrics exceeds
+     * its target value while scale down if both metrics are under their target
+     * value. The default target value is 60 for both metrics.
+     *
+     * If
+     * [machine_spec.accelerator_count][google.cloud.visionai.v1.MachineSpec.accelerator_count]
+     * is 0, the autoscaling will be based on CPU utilization metric only with
+     * default target value 60 if not explicitly set.
+     *
+     * For example, in the case of Online Prediction, if you want to override
+     * target CPU utilization to 80, you should set
+     * [autoscaling_metric_specs.metric_name][google.cloud.visionai.v1.AutoscalingMetricSpec.metric_name]
+     * to `aiplatform.googleapis.com/prediction/online/cpu/utilization` and
+     * [autoscaling_metric_specs.target][google.cloud.visionai.v1.AutoscalingMetricSpec.target]
+     * to `80`.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.AutoscalingMetricSpec autoscaling_metric_specs = 4 [(.google.api.field_behavior) = IMMUTABLE]; + * + */ + public Builder addAutoscalingMetricSpecs( + com.google.cloud.visionai.v1.AutoscalingMetricSpec value) { + if (autoscalingMetricSpecsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAutoscalingMetricSpecsIsMutable(); + autoscalingMetricSpecs_.add(value); + onChanged(); + } else { + autoscalingMetricSpecsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Immutable. The metric specifications that overrides a resource
+     * utilization metric (CPU utilization, accelerator's duty cycle, and so on)
+     * target value (default to 60 if not set). At most one entry is allowed per
+     * metric.
+     *
+     * If
+     * [machine_spec.accelerator_count][google.cloud.visionai.v1.MachineSpec.accelerator_count]
+     * is above 0, the autoscaling will be based on both CPU utilization and
+     * accelerator's duty cycle metrics and scale up when either metrics exceeds
+     * its target value while scale down if both metrics are under their target
+     * value. The default target value is 60 for both metrics.
+     *
+     * If
+     * [machine_spec.accelerator_count][google.cloud.visionai.v1.MachineSpec.accelerator_count]
+     * is 0, the autoscaling will be based on CPU utilization metric only with
+     * default target value 60 if not explicitly set.
+     *
+     * For example, in the case of Online Prediction, if you want to override
+     * target CPU utilization to 80, you should set
+     * [autoscaling_metric_specs.metric_name][google.cloud.visionai.v1.AutoscalingMetricSpec.metric_name]
+     * to `aiplatform.googleapis.com/prediction/online/cpu/utilization` and
+     * [autoscaling_metric_specs.target][google.cloud.visionai.v1.AutoscalingMetricSpec.target]
+     * to `80`.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.AutoscalingMetricSpec autoscaling_metric_specs = 4 [(.google.api.field_behavior) = IMMUTABLE]; + * + */ + public Builder addAutoscalingMetricSpecs( + int index, com.google.cloud.visionai.v1.AutoscalingMetricSpec value) { + if (autoscalingMetricSpecsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAutoscalingMetricSpecsIsMutable(); + autoscalingMetricSpecs_.add(index, value); + onChanged(); + } else { + autoscalingMetricSpecsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Immutable. The metric specifications that overrides a resource
+     * utilization metric (CPU utilization, accelerator's duty cycle, and so on)
+     * target value (default to 60 if not set). At most one entry is allowed per
+     * metric.
+     *
+     * If
+     * [machine_spec.accelerator_count][google.cloud.visionai.v1.MachineSpec.accelerator_count]
+     * is above 0, the autoscaling will be based on both CPU utilization and
+     * accelerator's duty cycle metrics and scale up when either metrics exceeds
+     * its target value while scale down if both metrics are under their target
+     * value. The default target value is 60 for both metrics.
+     *
+     * If
+     * [machine_spec.accelerator_count][google.cloud.visionai.v1.MachineSpec.accelerator_count]
+     * is 0, the autoscaling will be based on CPU utilization metric only with
+     * default target value 60 if not explicitly set.
+     *
+     * For example, in the case of Online Prediction, if you want to override
+     * target CPU utilization to 80, you should set
+     * [autoscaling_metric_specs.metric_name][google.cloud.visionai.v1.AutoscalingMetricSpec.metric_name]
+     * to `aiplatform.googleapis.com/prediction/online/cpu/utilization` and
+     * [autoscaling_metric_specs.target][google.cloud.visionai.v1.AutoscalingMetricSpec.target]
+     * to `80`.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.AutoscalingMetricSpec autoscaling_metric_specs = 4 [(.google.api.field_behavior) = IMMUTABLE]; + * + */ + public Builder addAutoscalingMetricSpecs( + com.google.cloud.visionai.v1.AutoscalingMetricSpec.Builder builderForValue) { + if (autoscalingMetricSpecsBuilder_ == null) { + ensureAutoscalingMetricSpecsIsMutable(); + autoscalingMetricSpecs_.add(builderForValue.build()); + onChanged(); + } else { + autoscalingMetricSpecsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Immutable. The metric specifications that overrides a resource
+     * utilization metric (CPU utilization, accelerator's duty cycle, and so on)
+     * target value (default to 60 if not set). At most one entry is allowed per
+     * metric.
+     *
+     * If
+     * [machine_spec.accelerator_count][google.cloud.visionai.v1.MachineSpec.accelerator_count]
+     * is above 0, the autoscaling will be based on both CPU utilization and
+     * accelerator's duty cycle metrics and scale up when either metrics exceeds
+     * its target value while scale down if both metrics are under their target
+     * value. The default target value is 60 for both metrics.
+     *
+     * If
+     * [machine_spec.accelerator_count][google.cloud.visionai.v1.MachineSpec.accelerator_count]
+     * is 0, the autoscaling will be based on CPU utilization metric only with
+     * default target value 60 if not explicitly set.
+     *
+     * For example, in the case of Online Prediction, if you want to override
+     * target CPU utilization to 80, you should set
+     * [autoscaling_metric_specs.metric_name][google.cloud.visionai.v1.AutoscalingMetricSpec.metric_name]
+     * to `aiplatform.googleapis.com/prediction/online/cpu/utilization` and
+     * [autoscaling_metric_specs.target][google.cloud.visionai.v1.AutoscalingMetricSpec.target]
+     * to `80`.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.AutoscalingMetricSpec autoscaling_metric_specs = 4 [(.google.api.field_behavior) = IMMUTABLE]; + * + */ + public Builder addAutoscalingMetricSpecs( + int index, com.google.cloud.visionai.v1.AutoscalingMetricSpec.Builder builderForValue) { + if (autoscalingMetricSpecsBuilder_ == null) { + ensureAutoscalingMetricSpecsIsMutable(); + autoscalingMetricSpecs_.add(index, builderForValue.build()); + onChanged(); + } else { + autoscalingMetricSpecsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Immutable. The metric specifications that overrides a resource
+     * utilization metric (CPU utilization, accelerator's duty cycle, and so on)
+     * target value (default to 60 if not set). At most one entry is allowed per
+     * metric.
+     *
+     * If
+     * [machine_spec.accelerator_count][google.cloud.visionai.v1.MachineSpec.accelerator_count]
+     * is above 0, the autoscaling will be based on both CPU utilization and
+     * accelerator's duty cycle metrics and scale up when either metrics exceeds
+     * its target value while scale down if both metrics are under their target
+     * value. The default target value is 60 for both metrics.
+     *
+     * If
+     * [machine_spec.accelerator_count][google.cloud.visionai.v1.MachineSpec.accelerator_count]
+     * is 0, the autoscaling will be based on CPU utilization metric only with
+     * default target value 60 if not explicitly set.
+     *
+     * For example, in the case of Online Prediction, if you want to override
+     * target CPU utilization to 80, you should set
+     * [autoscaling_metric_specs.metric_name][google.cloud.visionai.v1.AutoscalingMetricSpec.metric_name]
+     * to `aiplatform.googleapis.com/prediction/online/cpu/utilization` and
+     * [autoscaling_metric_specs.target][google.cloud.visionai.v1.AutoscalingMetricSpec.target]
+     * to `80`.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.AutoscalingMetricSpec autoscaling_metric_specs = 4 [(.google.api.field_behavior) = IMMUTABLE]; + * + */ + public Builder addAllAutoscalingMetricSpecs( + java.lang.Iterable values) { + if (autoscalingMetricSpecsBuilder_ == null) { + ensureAutoscalingMetricSpecsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, autoscalingMetricSpecs_); + onChanged(); + } else { + autoscalingMetricSpecsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Immutable. The metric specifications that overrides a resource
+     * utilization metric (CPU utilization, accelerator's duty cycle, and so on)
+     * target value (default to 60 if not set). At most one entry is allowed per
+     * metric.
+     *
+     * If
+     * [machine_spec.accelerator_count][google.cloud.visionai.v1.MachineSpec.accelerator_count]
+     * is above 0, the autoscaling will be based on both CPU utilization and
+     * accelerator's duty cycle metrics and scale up when either metrics exceeds
+     * its target value while scale down if both metrics are under their target
+     * value. The default target value is 60 for both metrics.
+     *
+     * If
+     * [machine_spec.accelerator_count][google.cloud.visionai.v1.MachineSpec.accelerator_count]
+     * is 0, the autoscaling will be based on CPU utilization metric only with
+     * default target value 60 if not explicitly set.
+     *
+     * For example, in the case of Online Prediction, if you want to override
+     * target CPU utilization to 80, you should set
+     * [autoscaling_metric_specs.metric_name][google.cloud.visionai.v1.AutoscalingMetricSpec.metric_name]
+     * to `aiplatform.googleapis.com/prediction/online/cpu/utilization` and
+     * [autoscaling_metric_specs.target][google.cloud.visionai.v1.AutoscalingMetricSpec.target]
+     * to `80`.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.AutoscalingMetricSpec autoscaling_metric_specs = 4 [(.google.api.field_behavior) = IMMUTABLE]; + * + */ + public Builder clearAutoscalingMetricSpecs() { + if (autoscalingMetricSpecsBuilder_ == null) { + autoscalingMetricSpecs_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + } else { + autoscalingMetricSpecsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Immutable. The metric specifications that overrides a resource
+     * utilization metric (CPU utilization, accelerator's duty cycle, and so on)
+     * target value (default to 60 if not set). At most one entry is allowed per
+     * metric.
+     *
+     * If
+     * [machine_spec.accelerator_count][google.cloud.visionai.v1.MachineSpec.accelerator_count]
+     * is above 0, the autoscaling will be based on both CPU utilization and
+     * accelerator's duty cycle metrics and scale up when either metrics exceeds
+     * its target value while scale down if both metrics are under their target
+     * value. The default target value is 60 for both metrics.
+     *
+     * If
+     * [machine_spec.accelerator_count][google.cloud.visionai.v1.MachineSpec.accelerator_count]
+     * is 0, the autoscaling will be based on CPU utilization metric only with
+     * default target value 60 if not explicitly set.
+     *
+     * For example, in the case of Online Prediction, if you want to override
+     * target CPU utilization to 80, you should set
+     * [autoscaling_metric_specs.metric_name][google.cloud.visionai.v1.AutoscalingMetricSpec.metric_name]
+     * to `aiplatform.googleapis.com/prediction/online/cpu/utilization` and
+     * [autoscaling_metric_specs.target][google.cloud.visionai.v1.AutoscalingMetricSpec.target]
+     * to `80`.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.AutoscalingMetricSpec autoscaling_metric_specs = 4 [(.google.api.field_behavior) = IMMUTABLE]; + * + */ + public Builder removeAutoscalingMetricSpecs(int index) { + if (autoscalingMetricSpecsBuilder_ == null) { + ensureAutoscalingMetricSpecsIsMutable(); + autoscalingMetricSpecs_.remove(index); + onChanged(); + } else { + autoscalingMetricSpecsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Immutable. The metric specifications that overrides a resource
+     * utilization metric (CPU utilization, accelerator's duty cycle, and so on)
+     * target value (default to 60 if not set). At most one entry is allowed per
+     * metric.
+     *
+     * If
+     * [machine_spec.accelerator_count][google.cloud.visionai.v1.MachineSpec.accelerator_count]
+     * is above 0, the autoscaling will be based on both CPU utilization and
+     * accelerator's duty cycle metrics and scale up when either metrics exceeds
+     * its target value while scale down if both metrics are under their target
+     * value. The default target value is 60 for both metrics.
+     *
+     * If
+     * [machine_spec.accelerator_count][google.cloud.visionai.v1.MachineSpec.accelerator_count]
+     * is 0, the autoscaling will be based on CPU utilization metric only with
+     * default target value 60 if not explicitly set.
+     *
+     * For example, in the case of Online Prediction, if you want to override
+     * target CPU utilization to 80, you should set
+     * [autoscaling_metric_specs.metric_name][google.cloud.visionai.v1.AutoscalingMetricSpec.metric_name]
+     * to `aiplatform.googleapis.com/prediction/online/cpu/utilization` and
+     * [autoscaling_metric_specs.target][google.cloud.visionai.v1.AutoscalingMetricSpec.target]
+     * to `80`.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.AutoscalingMetricSpec autoscaling_metric_specs = 4 [(.google.api.field_behavior) = IMMUTABLE]; + * + */ + public com.google.cloud.visionai.v1.AutoscalingMetricSpec.Builder + getAutoscalingMetricSpecsBuilder(int index) { + return getAutoscalingMetricSpecsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Immutable. The metric specifications that overrides a resource
+     * utilization metric (CPU utilization, accelerator's duty cycle, and so on)
+     * target value (default to 60 if not set). At most one entry is allowed per
+     * metric.
+     *
+     * If
+     * [machine_spec.accelerator_count][google.cloud.visionai.v1.MachineSpec.accelerator_count]
+     * is above 0, the autoscaling will be based on both CPU utilization and
+     * accelerator's duty cycle metrics and scale up when either metrics exceeds
+     * its target value while scale down if both metrics are under their target
+     * value. The default target value is 60 for both metrics.
+     *
+     * If
+     * [machine_spec.accelerator_count][google.cloud.visionai.v1.MachineSpec.accelerator_count]
+     * is 0, the autoscaling will be based on CPU utilization metric only with
+     * default target value 60 if not explicitly set.
+     *
+     * For example, in the case of Online Prediction, if you want to override
+     * target CPU utilization to 80, you should set
+     * [autoscaling_metric_specs.metric_name][google.cloud.visionai.v1.AutoscalingMetricSpec.metric_name]
+     * to `aiplatform.googleapis.com/prediction/online/cpu/utilization` and
+     * [autoscaling_metric_specs.target][google.cloud.visionai.v1.AutoscalingMetricSpec.target]
+     * to `80`.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.AutoscalingMetricSpec autoscaling_metric_specs = 4 [(.google.api.field_behavior) = IMMUTABLE]; + * + */ + public com.google.cloud.visionai.v1.AutoscalingMetricSpecOrBuilder + getAutoscalingMetricSpecsOrBuilder(int index) { + if (autoscalingMetricSpecsBuilder_ == null) { + return autoscalingMetricSpecs_.get(index); + } else { + return autoscalingMetricSpecsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Immutable. The metric specifications that overrides a resource
+     * utilization metric (CPU utilization, accelerator's duty cycle, and so on)
+     * target value (default to 60 if not set). At most one entry is allowed per
+     * metric.
+     *
+     * If
+     * [machine_spec.accelerator_count][google.cloud.visionai.v1.MachineSpec.accelerator_count]
+     * is above 0, the autoscaling will be based on both CPU utilization and
+     * accelerator's duty cycle metrics and scale up when either metrics exceeds
+     * its target value while scale down if both metrics are under their target
+     * value. The default target value is 60 for both metrics.
+     *
+     * If
+     * [machine_spec.accelerator_count][google.cloud.visionai.v1.MachineSpec.accelerator_count]
+     * is 0, the autoscaling will be based on CPU utilization metric only with
+     * default target value 60 if not explicitly set.
+     *
+     * For example, in the case of Online Prediction, if you want to override
+     * target CPU utilization to 80, you should set
+     * [autoscaling_metric_specs.metric_name][google.cloud.visionai.v1.AutoscalingMetricSpec.metric_name]
+     * to `aiplatform.googleapis.com/prediction/online/cpu/utilization` and
+     * [autoscaling_metric_specs.target][google.cloud.visionai.v1.AutoscalingMetricSpec.target]
+     * to `80`.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.AutoscalingMetricSpec autoscaling_metric_specs = 4 [(.google.api.field_behavior) = IMMUTABLE]; + * + */ + public java.util.List + getAutoscalingMetricSpecsOrBuilderList() { + if (autoscalingMetricSpecsBuilder_ != null) { + return autoscalingMetricSpecsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(autoscalingMetricSpecs_); + } + } + /** + * + * + *
+     * Immutable. The metric specifications that overrides a resource
+     * utilization metric (CPU utilization, accelerator's duty cycle, and so on)
+     * target value (default to 60 if not set). At most one entry is allowed per
+     * metric.
+     *
+     * If
+     * [machine_spec.accelerator_count][google.cloud.visionai.v1.MachineSpec.accelerator_count]
+     * is above 0, the autoscaling will be based on both CPU utilization and
+     * accelerator's duty cycle metrics and scale up when either metrics exceeds
+     * its target value while scale down if both metrics are under their target
+     * value. The default target value is 60 for both metrics.
+     *
+     * If
+     * [machine_spec.accelerator_count][google.cloud.visionai.v1.MachineSpec.accelerator_count]
+     * is 0, the autoscaling will be based on CPU utilization metric only with
+     * default target value 60 if not explicitly set.
+     *
+     * For example, in the case of Online Prediction, if you want to override
+     * target CPU utilization to 80, you should set
+     * [autoscaling_metric_specs.metric_name][google.cloud.visionai.v1.AutoscalingMetricSpec.metric_name]
+     * to `aiplatform.googleapis.com/prediction/online/cpu/utilization` and
+     * [autoscaling_metric_specs.target][google.cloud.visionai.v1.AutoscalingMetricSpec.target]
+     * to `80`.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.AutoscalingMetricSpec autoscaling_metric_specs = 4 [(.google.api.field_behavior) = IMMUTABLE]; + * + */ + public com.google.cloud.visionai.v1.AutoscalingMetricSpec.Builder + addAutoscalingMetricSpecsBuilder() { + return getAutoscalingMetricSpecsFieldBuilder() + .addBuilder(com.google.cloud.visionai.v1.AutoscalingMetricSpec.getDefaultInstance()); + } + /** + * + * + *
+     * Immutable. The metric specifications that overrides a resource
+     * utilization metric (CPU utilization, accelerator's duty cycle, and so on)
+     * target value (default to 60 if not set). At most one entry is allowed per
+     * metric.
+     *
+     * If
+     * [machine_spec.accelerator_count][google.cloud.visionai.v1.MachineSpec.accelerator_count]
+     * is above 0, the autoscaling will be based on both CPU utilization and
+     * accelerator's duty cycle metrics and scale up when either metrics exceeds
+     * its target value while scale down if both metrics are under their target
+     * value. The default target value is 60 for both metrics.
+     *
+     * If
+     * [machine_spec.accelerator_count][google.cloud.visionai.v1.MachineSpec.accelerator_count]
+     * is 0, the autoscaling will be based on CPU utilization metric only with
+     * default target value 60 if not explicitly set.
+     *
+     * For example, in the case of Online Prediction, if you want to override
+     * target CPU utilization to 80, you should set
+     * [autoscaling_metric_specs.metric_name][google.cloud.visionai.v1.AutoscalingMetricSpec.metric_name]
+     * to `aiplatform.googleapis.com/prediction/online/cpu/utilization` and
+     * [autoscaling_metric_specs.target][google.cloud.visionai.v1.AutoscalingMetricSpec.target]
+     * to `80`.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.AutoscalingMetricSpec autoscaling_metric_specs = 4 [(.google.api.field_behavior) = IMMUTABLE]; + * + */ + public com.google.cloud.visionai.v1.AutoscalingMetricSpec.Builder + addAutoscalingMetricSpecsBuilder(int index) { + return getAutoscalingMetricSpecsFieldBuilder() + .addBuilder( + index, com.google.cloud.visionai.v1.AutoscalingMetricSpec.getDefaultInstance()); + } + /** + * + * + *
+     * Immutable. The metric specifications that overrides a resource
+     * utilization metric (CPU utilization, accelerator's duty cycle, and so on)
+     * target value (default to 60 if not set). At most one entry is allowed per
+     * metric.
+     *
+     * If
+     * [machine_spec.accelerator_count][google.cloud.visionai.v1.MachineSpec.accelerator_count]
+     * is above 0, the autoscaling will be based on both CPU utilization and
+     * accelerator's duty cycle metrics and scale up when either metrics exceeds
+     * its target value while scale down if both metrics are under their target
+     * value. The default target value is 60 for both metrics.
+     *
+     * If
+     * [machine_spec.accelerator_count][google.cloud.visionai.v1.MachineSpec.accelerator_count]
+     * is 0, the autoscaling will be based on CPU utilization metric only with
+     * default target value 60 if not explicitly set.
+     *
+     * For example, in the case of Online Prediction, if you want to override
+     * target CPU utilization to 80, you should set
+     * [autoscaling_metric_specs.metric_name][google.cloud.visionai.v1.AutoscalingMetricSpec.metric_name]
+     * to `aiplatform.googleapis.com/prediction/online/cpu/utilization` and
+     * [autoscaling_metric_specs.target][google.cloud.visionai.v1.AutoscalingMetricSpec.target]
+     * to `80`.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.AutoscalingMetricSpec autoscaling_metric_specs = 4 [(.google.api.field_behavior) = IMMUTABLE]; + * + */ + public java.util.List + getAutoscalingMetricSpecsBuilderList() { + return getAutoscalingMetricSpecsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.visionai.v1.AutoscalingMetricSpec, + com.google.cloud.visionai.v1.AutoscalingMetricSpec.Builder, + com.google.cloud.visionai.v1.AutoscalingMetricSpecOrBuilder> + getAutoscalingMetricSpecsFieldBuilder() { + if (autoscalingMetricSpecsBuilder_ == null) { + autoscalingMetricSpecsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.visionai.v1.AutoscalingMetricSpec, + com.google.cloud.visionai.v1.AutoscalingMetricSpec.Builder, + com.google.cloud.visionai.v1.AutoscalingMetricSpecOrBuilder>( + autoscalingMetricSpecs_, + ((bitField0_ & 0x00000008) != 0), + getParentForChildren(), + isClean()); + autoscalingMetricSpecs_ = null; + } + return autoscalingMetricSpecsBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.DedicatedResources) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.DedicatedResources) + private static final com.google.cloud.visionai.v1.DedicatedResources DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.DedicatedResources(); + } + + public static com.google.cloud.visionai.v1.DedicatedResources getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DedicatedResources parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.DedicatedResources getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DedicatedResourcesOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DedicatedResourcesOrBuilder.java new file mode 100644 index 000000000000..8f14816f6631 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DedicatedResourcesOrBuilder.java @@ -0,0 +1,291 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/platform.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface DedicatedResourcesOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.DedicatedResources) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Immutable. The specification of a single machine used by the
+   * prediction.
+   * 
+ * + * + * .google.cloud.visionai.v1.MachineSpec machine_spec = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return Whether the machineSpec field is set. + */ + boolean hasMachineSpec(); + /** + * + * + *
+   * Required. Immutable. The specification of a single machine used by the
+   * prediction.
+   * 
+ * + * + * .google.cloud.visionai.v1.MachineSpec machine_spec = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The machineSpec. + */ + com.google.cloud.visionai.v1.MachineSpec getMachineSpec(); + /** + * + * + *
+   * Required. Immutable. The specification of a single machine used by the
+   * prediction.
+   * 
+ * + * + * .google.cloud.visionai.v1.MachineSpec machine_spec = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + */ + com.google.cloud.visionai.v1.MachineSpecOrBuilder getMachineSpecOrBuilder(); + + /** + * + * + *
+   * Required. Immutable. The minimum number of machine replicas this
+   * DeployedModel will be always deployed on. This value must be greater than
+   * or equal to 1.
+   *
+   * If traffic against the DeployedModel increases, it may dynamically be
+   * deployed onto more replicas, and as traffic decreases, some of these extra
+   * replicas may be freed.
+   * 
+ * + * + * int32 min_replica_count = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The minReplicaCount. + */ + int getMinReplicaCount(); + + /** + * + * + *
+   * Immutable. The maximum number of replicas this DeployedModel may be
+   * deployed on when the traffic against it increases. If the requested value
+   * is too large, the deployment will error, but if deployment succeeds then
+   * the ability to scale the model to that many replicas is guaranteed (barring
+   * service outages). If traffic against the DeployedModel increases beyond
+   * what its replicas at maximum may handle, a portion of the traffic will be
+   * dropped. If this value is not provided, will use
+   * [min_replica_count][google.cloud.visionai.v1.DedicatedResources.min_replica_count]
+   * as the default value.
+   *
+   * The value of this field impacts the charge against Vertex CPU and GPU
+   * quotas. Specifically, you will be charged for max_replica_count *
+   * number of cores in the selected machine type) and (max_replica_count *
+   * number of GPUs per replica in the selected machine type).
+   * 
+ * + * int32 max_replica_count = 3 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The maxReplicaCount. + */ + int getMaxReplicaCount(); + + /** + * + * + *
+   * Immutable. The metric specifications that overrides a resource
+   * utilization metric (CPU utilization, accelerator's duty cycle, and so on)
+   * target value (default to 60 if not set). At most one entry is allowed per
+   * metric.
+   *
+   * If
+   * [machine_spec.accelerator_count][google.cloud.visionai.v1.MachineSpec.accelerator_count]
+   * is above 0, the autoscaling will be based on both CPU utilization and
+   * accelerator's duty cycle metrics and scale up when either metrics exceeds
+   * its target value while scale down if both metrics are under their target
+   * value. The default target value is 60 for both metrics.
+   *
+   * If
+   * [machine_spec.accelerator_count][google.cloud.visionai.v1.MachineSpec.accelerator_count]
+   * is 0, the autoscaling will be based on CPU utilization metric only with
+   * default target value 60 if not explicitly set.
+   *
+   * For example, in the case of Online Prediction, if you want to override
+   * target CPU utilization to 80, you should set
+   * [autoscaling_metric_specs.metric_name][google.cloud.visionai.v1.AutoscalingMetricSpec.metric_name]
+   * to `aiplatform.googleapis.com/prediction/online/cpu/utilization` and
+   * [autoscaling_metric_specs.target][google.cloud.visionai.v1.AutoscalingMetricSpec.target]
+   * to `80`.
+   * 
+ * + * + * repeated .google.cloud.visionai.v1.AutoscalingMetricSpec autoscaling_metric_specs = 4 [(.google.api.field_behavior) = IMMUTABLE]; + * + */ + java.util.List + getAutoscalingMetricSpecsList(); + /** + * + * + *
+   * Immutable. The metric specifications that overrides a resource
+   * utilization metric (CPU utilization, accelerator's duty cycle, and so on)
+   * target value (default to 60 if not set). At most one entry is allowed per
+   * metric.
+   *
+   * If
+   * [machine_spec.accelerator_count][google.cloud.visionai.v1.MachineSpec.accelerator_count]
+   * is above 0, the autoscaling will be based on both CPU utilization and
+   * accelerator's duty cycle metrics and scale up when either metrics exceeds
+   * its target value while scale down if both metrics are under their target
+   * value. The default target value is 60 for both metrics.
+   *
+   * If
+   * [machine_spec.accelerator_count][google.cloud.visionai.v1.MachineSpec.accelerator_count]
+   * is 0, the autoscaling will be based on CPU utilization metric only with
+   * default target value 60 if not explicitly set.
+   *
+   * For example, in the case of Online Prediction, if you want to override
+   * target CPU utilization to 80, you should set
+   * [autoscaling_metric_specs.metric_name][google.cloud.visionai.v1.AutoscalingMetricSpec.metric_name]
+   * to `aiplatform.googleapis.com/prediction/online/cpu/utilization` and
+   * [autoscaling_metric_specs.target][google.cloud.visionai.v1.AutoscalingMetricSpec.target]
+   * to `80`.
+   * 
+ * + * + * repeated .google.cloud.visionai.v1.AutoscalingMetricSpec autoscaling_metric_specs = 4 [(.google.api.field_behavior) = IMMUTABLE]; + * + */ + com.google.cloud.visionai.v1.AutoscalingMetricSpec getAutoscalingMetricSpecs(int index); + /** + * + * + *
+   * Immutable. The metric specifications that overrides a resource
+   * utilization metric (CPU utilization, accelerator's duty cycle, and so on)
+   * target value (default to 60 if not set). At most one entry is allowed per
+   * metric.
+   *
+   * If
+   * [machine_spec.accelerator_count][google.cloud.visionai.v1.MachineSpec.accelerator_count]
+   * is above 0, the autoscaling will be based on both CPU utilization and
+   * accelerator's duty cycle metrics and scale up when either metrics exceeds
+   * its target value while scale down if both metrics are under their target
+   * value. The default target value is 60 for both metrics.
+   *
+   * If
+   * [machine_spec.accelerator_count][google.cloud.visionai.v1.MachineSpec.accelerator_count]
+   * is 0, the autoscaling will be based on CPU utilization metric only with
+   * default target value 60 if not explicitly set.
+   *
+   * For example, in the case of Online Prediction, if you want to override
+   * target CPU utilization to 80, you should set
+   * [autoscaling_metric_specs.metric_name][google.cloud.visionai.v1.AutoscalingMetricSpec.metric_name]
+   * to `aiplatform.googleapis.com/prediction/online/cpu/utilization` and
+   * [autoscaling_metric_specs.target][google.cloud.visionai.v1.AutoscalingMetricSpec.target]
+   * to `80`.
+   * 
+ * + * + * repeated .google.cloud.visionai.v1.AutoscalingMetricSpec autoscaling_metric_specs = 4 [(.google.api.field_behavior) = IMMUTABLE]; + * + */ + int getAutoscalingMetricSpecsCount(); + /** + * + * + *
+   * Immutable. The metric specifications that overrides a resource
+   * utilization metric (CPU utilization, accelerator's duty cycle, and so on)
+   * target value (default to 60 if not set). At most one entry is allowed per
+   * metric.
+   *
+   * If
+   * [machine_spec.accelerator_count][google.cloud.visionai.v1.MachineSpec.accelerator_count]
+   * is above 0, the autoscaling will be based on both CPU utilization and
+   * accelerator's duty cycle metrics and scale up when either metrics exceeds
+   * its target value while scale down if both metrics are under their target
+   * value. The default target value is 60 for both metrics.
+   *
+   * If
+   * [machine_spec.accelerator_count][google.cloud.visionai.v1.MachineSpec.accelerator_count]
+   * is 0, the autoscaling will be based on CPU utilization metric only with
+   * default target value 60 if not explicitly set.
+   *
+   * For example, in the case of Online Prediction, if you want to override
+   * target CPU utilization to 80, you should set
+   * [autoscaling_metric_specs.metric_name][google.cloud.visionai.v1.AutoscalingMetricSpec.metric_name]
+   * to `aiplatform.googleapis.com/prediction/online/cpu/utilization` and
+   * [autoscaling_metric_specs.target][google.cloud.visionai.v1.AutoscalingMetricSpec.target]
+   * to `80`.
+   * 
+ * + * + * repeated .google.cloud.visionai.v1.AutoscalingMetricSpec autoscaling_metric_specs = 4 [(.google.api.field_behavior) = IMMUTABLE]; + * + */ + java.util.List + getAutoscalingMetricSpecsOrBuilderList(); + /** + * + * + *
+   * Immutable. The metric specifications that overrides a resource
+   * utilization metric (CPU utilization, accelerator's duty cycle, and so on)
+   * target value (default to 60 if not set). At most one entry is allowed per
+   * metric.
+   *
+   * If
+   * [machine_spec.accelerator_count][google.cloud.visionai.v1.MachineSpec.accelerator_count]
+   * is above 0, the autoscaling will be based on both CPU utilization and
+   * accelerator's duty cycle metrics and scale up when either metrics exceeds
+   * its target value while scale down if both metrics are under their target
+   * value. The default target value is 60 for both metrics.
+   *
+   * If
+   * [machine_spec.accelerator_count][google.cloud.visionai.v1.MachineSpec.accelerator_count]
+   * is 0, the autoscaling will be based on CPU utilization metric only with
+   * default target value 60 if not explicitly set.
+   *
+   * For example, in the case of Online Prediction, if you want to override
+   * target CPU utilization to 80, you should set
+   * [autoscaling_metric_specs.metric_name][google.cloud.visionai.v1.AutoscalingMetricSpec.metric_name]
+   * to `aiplatform.googleapis.com/prediction/online/cpu/utilization` and
+   * [autoscaling_metric_specs.target][google.cloud.visionai.v1.AutoscalingMetricSpec.target]
+   * to `80`.
+   * 
+ * + * + * repeated .google.cloud.visionai.v1.AutoscalingMetricSpec autoscaling_metric_specs = 4 [(.google.api.field_behavior) = IMMUTABLE]; + * + */ + com.google.cloud.visionai.v1.AutoscalingMetricSpecOrBuilder getAutoscalingMetricSpecsOrBuilder( + int index); +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DeleteAnalysisRequest.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DeleteAnalysisRequest.java new file mode 100644 index 000000000000..d20e4daa918f --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DeleteAnalysisRequest.java @@ -0,0 +1,905 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/lva_service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * Message for deleting an Analysis.
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.DeleteAnalysisRequest} + */ +public final class DeleteAnalysisRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.DeleteAnalysisRequest) + DeleteAnalysisRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use DeleteAnalysisRequest.newBuilder() to construct. + private DeleteAnalysisRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DeleteAnalysisRequest() { + name_ = ""; + requestId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DeleteAnalysisRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.LvaServiceProto + .internal_static_google_cloud_visionai_v1_DeleteAnalysisRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.LvaServiceProto + .internal_static_google_cloud_visionai_v1_DeleteAnalysisRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.DeleteAnalysisRequest.class, + com.google.cloud.visionai.v1.DeleteAnalysisRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Required. Name of the resource.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + 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(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Name of the resource.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int REQUEST_ID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object requestId_ = ""; + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes after the first request.
+   *
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request ID,
+   * the server can check if original operation with the same request ID was
+   * received, and if so, will ignore the second request. This prevents clients
+   * from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + @java.lang.Override + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + 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(); + requestId_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes after the first request.
+   *
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request ID,
+   * the server can check if original operation with the same request ID was
+   * received, and if so, will ignore the second request. This prevents clients
+   * from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, requestId_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, requestId_); + } + size += getUnknownFields().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.visionai.v1.DeleteAnalysisRequest)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.DeleteAnalysisRequest other = + (com.google.cloud.visionai.v1.DeleteAnalysisRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getRequestId().equals(other.getRequestId())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; + hash = (53 * hash) + getRequestId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.DeleteAnalysisRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.DeleteAnalysisRequest 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.visionai.v1.DeleteAnalysisRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.DeleteAnalysisRequest 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.visionai.v1.DeleteAnalysisRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.DeleteAnalysisRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.DeleteAnalysisRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.DeleteAnalysisRequest 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.visionai.v1.DeleteAnalysisRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.DeleteAnalysisRequest 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.visionai.v1.DeleteAnalysisRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.DeleteAnalysisRequest 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.visionai.v1.DeleteAnalysisRequest 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; + } + /** + * + * + *
+   * Message for deleting an Analysis.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.DeleteAnalysisRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.DeleteAnalysisRequest) + com.google.cloud.visionai.v1.DeleteAnalysisRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.LvaServiceProto + .internal_static_google_cloud_visionai_v1_DeleteAnalysisRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.LvaServiceProto + .internal_static_google_cloud_visionai_v1_DeleteAnalysisRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.DeleteAnalysisRequest.class, + com.google.cloud.visionai.v1.DeleteAnalysisRequest.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.DeleteAnalysisRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + requestId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.LvaServiceProto + .internal_static_google_cloud_visionai_v1_DeleteAnalysisRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.DeleteAnalysisRequest getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.DeleteAnalysisRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.DeleteAnalysisRequest build() { + com.google.cloud.visionai.v1.DeleteAnalysisRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.DeleteAnalysisRequest buildPartial() { + com.google.cloud.visionai.v1.DeleteAnalysisRequest result = + new com.google.cloud.visionai.v1.DeleteAnalysisRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.visionai.v1.DeleteAnalysisRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.requestId_ = requestId_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.DeleteAnalysisRequest) { + return mergeFrom((com.google.cloud.visionai.v1.DeleteAnalysisRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.DeleteAnalysisRequest other) { + if (other == com.google.cloud.visionai.v1.DeleteAnalysisRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getRequestId().isEmpty()) { + requestId_ = other.requestId_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. Name of the resource.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Name of the resource.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Name of the resource.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Name of the resource.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Name of the resource.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object requestId_ = ""; + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes after the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request ID,
+     * the server can check if original operation with the same request ID was
+     * received, and if so, will ignore the second request. This prevents clients
+     * from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes after the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request ID,
+     * the server can check if original operation with the same request ID was
+     * received, and if so, will ignore the second request. This prevents clients
+     * from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes after the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request ID,
+     * the server can check if original operation with the same request ID was
+     * received, and if so, will ignore the second request. This prevents clients
+     * from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + requestId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes after the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request ID,
+     * the server can check if original operation with the same request ID was
+     * received, and if so, will ignore the second request. This prevents clients
+     * from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearRequestId() { + requestId_ = getDefaultInstance().getRequestId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes after the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request ID,
+     * the server can check if original operation with the same request ID was
+     * received, and if so, will ignore the second request. This prevents clients
+     * from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + requestId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.DeleteAnalysisRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.DeleteAnalysisRequest) + private static final com.google.cloud.visionai.v1.DeleteAnalysisRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.DeleteAnalysisRequest(); + } + + public static com.google.cloud.visionai.v1.DeleteAnalysisRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteAnalysisRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.DeleteAnalysisRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DeleteAnalysisRequestOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DeleteAnalysisRequestOrBuilder.java new file mode 100644 index 000000000000..ee7e54993021 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DeleteAnalysisRequestOrBuilder.java @@ -0,0 +1,104 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/lva_service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface DeleteAnalysisRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.DeleteAnalysisRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Name of the resource.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. Name of the resource.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes after the first request.
+   *
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request ID,
+   * the server can check if original operation with the same request ID was
+   * received, and if so, will ignore the second request. This prevents clients
+   * from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + java.lang.String getRequestId(); + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes after the first request.
+   *
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request ID,
+   * the server can check if original operation with the same request ID was
+   * received, and if so, will ignore the second request. This prevents clients
+   * from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + com.google.protobuf.ByteString getRequestIdBytes(); +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DeleteAnnotationRequest.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DeleteAnnotationRequest.java new file mode 100644 index 000000000000..195458caf3cc --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DeleteAnnotationRequest.java @@ -0,0 +1,653 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/warehouse.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * Request message for DeleteAnnotation API.
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.DeleteAnnotationRequest} + */ +public final class DeleteAnnotationRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.DeleteAnnotationRequest) + DeleteAnnotationRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use DeleteAnnotationRequest.newBuilder() to construct. + private DeleteAnnotationRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DeleteAnnotationRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DeleteAnnotationRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_DeleteAnnotationRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_DeleteAnnotationRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.DeleteAnnotationRequest.class, + com.google.cloud.visionai.v1.DeleteAnnotationRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Required. The name of the annotation to delete.
+   * Format:
+   * `projects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset}/annotations/{annotation}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + 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(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The name of the annotation to delete.
+   * Format:
+   * `projects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset}/annotations/{annotation}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += getUnknownFields().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.visionai.v1.DeleteAnnotationRequest)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.DeleteAnnotationRequest other = + (com.google.cloud.visionai.v1.DeleteAnnotationRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.DeleteAnnotationRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.DeleteAnnotationRequest 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.visionai.v1.DeleteAnnotationRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.DeleteAnnotationRequest 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.visionai.v1.DeleteAnnotationRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.DeleteAnnotationRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.DeleteAnnotationRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.DeleteAnnotationRequest 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.visionai.v1.DeleteAnnotationRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.DeleteAnnotationRequest 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.visionai.v1.DeleteAnnotationRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.DeleteAnnotationRequest 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.visionai.v1.DeleteAnnotationRequest 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; + } + /** + * + * + *
+   * Request message for DeleteAnnotation API.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.DeleteAnnotationRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.DeleteAnnotationRequest) + com.google.cloud.visionai.v1.DeleteAnnotationRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_DeleteAnnotationRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_DeleteAnnotationRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.DeleteAnnotationRequest.class, + com.google.cloud.visionai.v1.DeleteAnnotationRequest.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.DeleteAnnotationRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_DeleteAnnotationRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.DeleteAnnotationRequest getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.DeleteAnnotationRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.DeleteAnnotationRequest build() { + com.google.cloud.visionai.v1.DeleteAnnotationRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.DeleteAnnotationRequest buildPartial() { + com.google.cloud.visionai.v1.DeleteAnnotationRequest result = + new com.google.cloud.visionai.v1.DeleteAnnotationRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.visionai.v1.DeleteAnnotationRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.DeleteAnnotationRequest) { + return mergeFrom((com.google.cloud.visionai.v1.DeleteAnnotationRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.DeleteAnnotationRequest other) { + if (other == com.google.cloud.visionai.v1.DeleteAnnotationRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. The name of the annotation to delete.
+     * Format:
+     * `projects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset}/annotations/{annotation}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The name of the annotation to delete.
+     * Format:
+     * `projects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset}/annotations/{annotation}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The name of the annotation to delete.
+     * Format:
+     * `projects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset}/annotations/{annotation}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the annotation to delete.
+     * Format:
+     * `projects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset}/annotations/{annotation}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the annotation to delete.
+     * Format:
+     * `projects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset}/annotations/{annotation}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.DeleteAnnotationRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.DeleteAnnotationRequest) + private static final com.google.cloud.visionai.v1.DeleteAnnotationRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.DeleteAnnotationRequest(); + } + + public static com.google.cloud.visionai.v1.DeleteAnnotationRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteAnnotationRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.DeleteAnnotationRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DeleteAnnotationRequestOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DeleteAnnotationRequestOrBuilder.java new file mode 100644 index 000000000000..78ac96e27e11 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DeleteAnnotationRequestOrBuilder.java @@ -0,0 +1,59 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/warehouse.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface DeleteAnnotationRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.DeleteAnnotationRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the annotation to delete.
+   * Format:
+   * `projects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset}/annotations/{annotation}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The name of the annotation to delete.
+   * Format:
+   * `projects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset}/annotations/{annotation}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DeleteApplicationInstancesRequest.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DeleteApplicationInstancesRequest.java new file mode 100644 index 000000000000..ec28c8bd01c4 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DeleteApplicationInstancesRequest.java @@ -0,0 +1,1230 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/platform.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * Message for removing stream input from an Application.
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.DeleteApplicationInstancesRequest} + */ +public final class DeleteApplicationInstancesRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.DeleteApplicationInstancesRequest) + DeleteApplicationInstancesRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use DeleteApplicationInstancesRequest.newBuilder() to construct. + private DeleteApplicationInstancesRequest( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DeleteApplicationInstancesRequest() { + name_ = ""; + instanceIds_ = com.google.protobuf.LazyStringArrayList.emptyList(); + requestId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DeleteApplicationInstancesRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_DeleteApplicationInstancesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_DeleteApplicationInstancesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.DeleteApplicationInstancesRequest.class, + com.google.cloud.visionai.v1.DeleteApplicationInstancesRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Required. the name of the application to retrieve.
+   * Format:
+   * "projects/{project}/locations/{location}/applications/{application}"
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + 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(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. the name of the application to retrieve.
+   * Format:
+   * "projects/{project}/locations/{location}/applications/{application}"
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int INSTANCE_IDS_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList instanceIds_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + * + * + *
+   * Required. Id of the requesting object.
+   * 
+ * + * + * repeated string instance_ids = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return A list containing the instanceIds. + */ + public com.google.protobuf.ProtocolStringList getInstanceIdsList() { + return instanceIds_; + } + /** + * + * + *
+   * Required. Id of the requesting object.
+   * 
+ * + * + * repeated string instance_ids = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The count of instanceIds. + */ + public int getInstanceIdsCount() { + return instanceIds_.size(); + } + /** + * + * + *
+   * Required. Id of the requesting object.
+   * 
+ * + * + * repeated string instance_ids = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param index The index of the element to return. + * @return The instanceIds at the given index. + */ + public java.lang.String getInstanceIds(int index) { + return instanceIds_.get(index); + } + /** + * + * + *
+   * Required. Id of the requesting object.
+   * 
+ * + * + * repeated string instance_ids = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param index The index of the value to return. + * @return The bytes of the instanceIds at the given index. + */ + public com.google.protobuf.ByteString getInstanceIdsBytes(int index) { + return instanceIds_.getByteString(index); + } + + public static final int REQUEST_ID_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object requestId_ = ""; + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and
+   * the request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + @java.lang.Override + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + 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(); + requestId_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and
+   * the request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + for (int i = 0; i < instanceIds_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, instanceIds_.getRaw(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, requestId_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + { + int dataSize = 0; + for (int i = 0; i < instanceIds_.size(); i++) { + dataSize += computeStringSizeNoTag(instanceIds_.getRaw(i)); + } + size += dataSize; + size += 1 * getInstanceIdsList().size(); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, requestId_); + } + size += getUnknownFields().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.visionai.v1.DeleteApplicationInstancesRequest)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.DeleteApplicationInstancesRequest other = + (com.google.cloud.visionai.v1.DeleteApplicationInstancesRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getInstanceIdsList().equals(other.getInstanceIdsList())) return false; + if (!getRequestId().equals(other.getRequestId())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + if (getInstanceIdsCount() > 0) { + hash = (37 * hash) + INSTANCE_IDS_FIELD_NUMBER; + hash = (53 * hash) + getInstanceIdsList().hashCode(); + } + hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; + hash = (53 * hash) + getRequestId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.DeleteApplicationInstancesRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.DeleteApplicationInstancesRequest 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.visionai.v1.DeleteApplicationInstancesRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.DeleteApplicationInstancesRequest 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.visionai.v1.DeleteApplicationInstancesRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.DeleteApplicationInstancesRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.DeleteApplicationInstancesRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.DeleteApplicationInstancesRequest 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.visionai.v1.DeleteApplicationInstancesRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.DeleteApplicationInstancesRequest 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.visionai.v1.DeleteApplicationInstancesRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.DeleteApplicationInstancesRequest 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.visionai.v1.DeleteApplicationInstancesRequest 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; + } + /** + * + * + *
+   * Message for removing stream input from an Application.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.DeleteApplicationInstancesRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.DeleteApplicationInstancesRequest) + com.google.cloud.visionai.v1.DeleteApplicationInstancesRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_DeleteApplicationInstancesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_DeleteApplicationInstancesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.DeleteApplicationInstancesRequest.class, + com.google.cloud.visionai.v1.DeleteApplicationInstancesRequest.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.DeleteApplicationInstancesRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + instanceIds_ = com.google.protobuf.LazyStringArrayList.emptyList(); + requestId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_DeleteApplicationInstancesRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.DeleteApplicationInstancesRequest + getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.DeleteApplicationInstancesRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.DeleteApplicationInstancesRequest build() { + com.google.cloud.visionai.v1.DeleteApplicationInstancesRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.DeleteApplicationInstancesRequest buildPartial() { + com.google.cloud.visionai.v1.DeleteApplicationInstancesRequest result = + new com.google.cloud.visionai.v1.DeleteApplicationInstancesRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.visionai.v1.DeleteApplicationInstancesRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + instanceIds_.makeImmutable(); + result.instanceIds_ = instanceIds_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.requestId_ = requestId_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.DeleteApplicationInstancesRequest) { + return mergeFrom((com.google.cloud.visionai.v1.DeleteApplicationInstancesRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.DeleteApplicationInstancesRequest other) { + if (other + == com.google.cloud.visionai.v1.DeleteApplicationInstancesRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.instanceIds_.isEmpty()) { + if (instanceIds_.isEmpty()) { + instanceIds_ = other.instanceIds_; + bitField0_ |= 0x00000002; + } else { + ensureInstanceIdsIsMutable(); + instanceIds_.addAll(other.instanceIds_); + } + onChanged(); + } + if (!other.getRequestId().isEmpty()) { + requestId_ = other.requestId_; + bitField0_ |= 0x00000004; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureInstanceIdsIsMutable(); + instanceIds_.add(s); + break; + } // case 18 + case 26: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. the name of the application to retrieve.
+     * Format:
+     * "projects/{project}/locations/{location}/applications/{application}"
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. the name of the application to retrieve.
+     * Format:
+     * "projects/{project}/locations/{location}/applications/{application}"
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. the name of the application to retrieve.
+     * Format:
+     * "projects/{project}/locations/{location}/applications/{application}"
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. the name of the application to retrieve.
+     * Format:
+     * "projects/{project}/locations/{location}/applications/{application}"
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. the name of the application to retrieve.
+     * Format:
+     * "projects/{project}/locations/{location}/applications/{application}"
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList instanceIds_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureInstanceIdsIsMutable() { + if (!instanceIds_.isModifiable()) { + instanceIds_ = new com.google.protobuf.LazyStringArrayList(instanceIds_); + } + bitField0_ |= 0x00000002; + } + /** + * + * + *
+     * Required. Id of the requesting object.
+     * 
+ * + * + * repeated string instance_ids = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return A list containing the instanceIds. + */ + public com.google.protobuf.ProtocolStringList getInstanceIdsList() { + instanceIds_.makeImmutable(); + return instanceIds_; + } + /** + * + * + *
+     * Required. Id of the requesting object.
+     * 
+ * + * + * repeated string instance_ids = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The count of instanceIds. + */ + public int getInstanceIdsCount() { + return instanceIds_.size(); + } + /** + * + * + *
+     * Required. Id of the requesting object.
+     * 
+ * + * + * repeated string instance_ids = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param index The index of the element to return. + * @return The instanceIds at the given index. + */ + public java.lang.String getInstanceIds(int index) { + return instanceIds_.get(index); + } + /** + * + * + *
+     * Required. Id of the requesting object.
+     * 
+ * + * + * repeated string instance_ids = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param index The index of the value to return. + * @return The bytes of the instanceIds at the given index. + */ + public com.google.protobuf.ByteString getInstanceIdsBytes(int index) { + return instanceIds_.getByteString(index); + } + /** + * + * + *
+     * Required. Id of the requesting object.
+     * 
+ * + * + * repeated string instance_ids = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param index The index to set the value at. + * @param value The instanceIds to set. + * @return This builder for chaining. + */ + public Builder setInstanceIds(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureInstanceIdsIsMutable(); + instanceIds_.set(index, value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Id of the requesting object.
+     * 
+ * + * + * repeated string instance_ids = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The instanceIds to add. + * @return This builder for chaining. + */ + public Builder addInstanceIds(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureInstanceIdsIsMutable(); + instanceIds_.add(value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Id of the requesting object.
+     * 
+ * + * + * repeated string instance_ids = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param values The instanceIds to add. + * @return This builder for chaining. + */ + public Builder addAllInstanceIds(java.lang.Iterable values) { + ensureInstanceIdsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, instanceIds_); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Id of the requesting object.
+     * 
+ * + * + * repeated string instance_ids = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearInstanceIds() { + instanceIds_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + ; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Id of the requesting object.
+     * 
+ * + * + * repeated string instance_ids = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes of the instanceIds to add. + * @return This builder for chaining. + */ + public Builder addInstanceIdsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureInstanceIdsIsMutable(); + instanceIds_.add(value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object requestId_ = ""; + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + requestId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearRequestId() { + requestId_ = getDefaultInstance().getRequestId(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + requestId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.DeleteApplicationInstancesRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.DeleteApplicationInstancesRequest) + private static final com.google.cloud.visionai.v1.DeleteApplicationInstancesRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.DeleteApplicationInstancesRequest(); + } + + public static com.google.cloud.visionai.v1.DeleteApplicationInstancesRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteApplicationInstancesRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.DeleteApplicationInstancesRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DeleteApplicationInstancesRequestOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DeleteApplicationInstancesRequestOrBuilder.java new file mode 100644 index 000000000000..4606dbd2b2a0 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DeleteApplicationInstancesRequestOrBuilder.java @@ -0,0 +1,167 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/platform.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface DeleteApplicationInstancesRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.DeleteApplicationInstancesRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. the name of the application to retrieve.
+   * Format:
+   * "projects/{project}/locations/{location}/applications/{application}"
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. the name of the application to retrieve.
+   * Format:
+   * "projects/{project}/locations/{location}/applications/{application}"
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Required. Id of the requesting object.
+   * 
+ * + * + * repeated string instance_ids = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return A list containing the instanceIds. + */ + java.util.List getInstanceIdsList(); + /** + * + * + *
+   * Required. Id of the requesting object.
+   * 
+ * + * + * repeated string instance_ids = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The count of instanceIds. + */ + int getInstanceIdsCount(); + /** + * + * + *
+   * Required. Id of the requesting object.
+   * 
+ * + * + * repeated string instance_ids = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param index The index of the element to return. + * @return The instanceIds at the given index. + */ + java.lang.String getInstanceIds(int index); + /** + * + * + *
+   * Required. Id of the requesting object.
+   * 
+ * + * + * repeated string instance_ids = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param index The index of the value to return. + * @return The bytes of the instanceIds at the given index. + */ + com.google.protobuf.ByteString getInstanceIdsBytes(int index); + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and
+   * the request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + java.lang.String getRequestId(); + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and
+   * the request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + com.google.protobuf.ByteString getRequestIdBytes(); +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DeleteApplicationInstancesResponse.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DeleteApplicationInstancesResponse.java new file mode 100644 index 000000000000..41dde5ce9f4b --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DeleteApplicationInstancesResponse.java @@ -0,0 +1,440 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/platform.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * Message for DeleteApplicationInstance Response.
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.DeleteApplicationInstancesResponse} + */ +public final class DeleteApplicationInstancesResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.DeleteApplicationInstancesResponse) + DeleteApplicationInstancesResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use DeleteApplicationInstancesResponse.newBuilder() to construct. + private DeleteApplicationInstancesResponse( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DeleteApplicationInstancesResponse() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DeleteApplicationInstancesResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_DeleteApplicationInstancesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_DeleteApplicationInstancesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.DeleteApplicationInstancesResponse.class, + com.google.cloud.visionai.v1.DeleteApplicationInstancesResponse.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 { + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += getUnknownFields().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.visionai.v1.DeleteApplicationInstancesResponse)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.DeleteApplicationInstancesResponse other = + (com.google.cloud.visionai.v1.DeleteApplicationInstancesResponse) obj; + + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.DeleteApplicationInstancesResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.DeleteApplicationInstancesResponse 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.visionai.v1.DeleteApplicationInstancesResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.DeleteApplicationInstancesResponse 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.visionai.v1.DeleteApplicationInstancesResponse parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.DeleteApplicationInstancesResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.DeleteApplicationInstancesResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.DeleteApplicationInstancesResponse 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.visionai.v1.DeleteApplicationInstancesResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.DeleteApplicationInstancesResponse 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.visionai.v1.DeleteApplicationInstancesResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.DeleteApplicationInstancesResponse 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.visionai.v1.DeleteApplicationInstancesResponse 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; + } + /** + * + * + *
+   * Message for DeleteApplicationInstance Response.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.DeleteApplicationInstancesResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.DeleteApplicationInstancesResponse) + com.google.cloud.visionai.v1.DeleteApplicationInstancesResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_DeleteApplicationInstancesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_DeleteApplicationInstancesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.DeleteApplicationInstancesResponse.class, + com.google.cloud.visionai.v1.DeleteApplicationInstancesResponse.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.DeleteApplicationInstancesResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_DeleteApplicationInstancesResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.DeleteApplicationInstancesResponse + getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.DeleteApplicationInstancesResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.DeleteApplicationInstancesResponse build() { + com.google.cloud.visionai.v1.DeleteApplicationInstancesResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.DeleteApplicationInstancesResponse buildPartial() { + com.google.cloud.visionai.v1.DeleteApplicationInstancesResponse result = + new com.google.cloud.visionai.v1.DeleteApplicationInstancesResponse(this); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.DeleteApplicationInstancesResponse) { + return mergeFrom((com.google.cloud.visionai.v1.DeleteApplicationInstancesResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.visionai.v1.DeleteApplicationInstancesResponse other) { + if (other + == com.google.cloud.visionai.v1.DeleteApplicationInstancesResponse.getDefaultInstance()) + return this; + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.DeleteApplicationInstancesResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.DeleteApplicationInstancesResponse) + private static final com.google.cloud.visionai.v1.DeleteApplicationInstancesResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.DeleteApplicationInstancesResponse(); + } + + public static com.google.cloud.visionai.v1.DeleteApplicationInstancesResponse + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteApplicationInstancesResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.DeleteApplicationInstancesResponse + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DeleteApplicationInstancesResponseOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DeleteApplicationInstancesResponseOrBuilder.java new file mode 100644 index 000000000000..7c9c5e481d3e --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DeleteApplicationInstancesResponseOrBuilder.java @@ -0,0 +1,25 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/platform.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface DeleteApplicationInstancesResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.DeleteApplicationInstancesResponse) + com.google.protobuf.MessageOrBuilder {} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DeleteApplicationRequest.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DeleteApplicationRequest.java new file mode 100644 index 000000000000..8355c5d46a19 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DeleteApplicationRequest.java @@ -0,0 +1,1007 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/platform.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * Message for deleting an Application.
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.DeleteApplicationRequest} + */ +public final class DeleteApplicationRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.DeleteApplicationRequest) + DeleteApplicationRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use DeleteApplicationRequest.newBuilder() to construct. + private DeleteApplicationRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DeleteApplicationRequest() { + name_ = ""; + requestId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DeleteApplicationRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_DeleteApplicationRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_DeleteApplicationRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.DeleteApplicationRequest.class, + com.google.cloud.visionai.v1.DeleteApplicationRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Required. Name of the resource.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + 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(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Name of the resource.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int REQUEST_ID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object requestId_ = ""; + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes after the first request.
+   *
+   * For example, consider a situation where you make an initial request and
+   * the request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + @java.lang.Override + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + 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(); + requestId_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes after the first request.
+   *
+   * For example, consider a situation where you make an initial request and
+   * the request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FORCE_FIELD_NUMBER = 3; + private boolean force_ = false; + /** + * + * + *
+   * Optional. If set to true, any instances and drafts from this application
+   * will also be deleted. (Otherwise, the request will only work if the
+   * application has no instances and drafts.)
+   * 
+ * + * bool force = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The force. + */ + @java.lang.Override + public boolean getForce() { + return force_; + } + + 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, requestId_); + } + if (force_ != false) { + output.writeBool(3, force_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, requestId_); + } + if (force_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(3, force_); + } + size += getUnknownFields().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.visionai.v1.DeleteApplicationRequest)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.DeleteApplicationRequest other = + (com.google.cloud.visionai.v1.DeleteApplicationRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getRequestId().equals(other.getRequestId())) return false; + if (getForce() != other.getForce()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; + hash = (53 * hash) + getRequestId().hashCode(); + hash = (37 * hash) + FORCE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getForce()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.DeleteApplicationRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.DeleteApplicationRequest 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.visionai.v1.DeleteApplicationRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.DeleteApplicationRequest 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.visionai.v1.DeleteApplicationRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.DeleteApplicationRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.DeleteApplicationRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.DeleteApplicationRequest 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.visionai.v1.DeleteApplicationRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.DeleteApplicationRequest 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.visionai.v1.DeleteApplicationRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.DeleteApplicationRequest 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.visionai.v1.DeleteApplicationRequest 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; + } + /** + * + * + *
+   * Message for deleting an Application.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.DeleteApplicationRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.DeleteApplicationRequest) + com.google.cloud.visionai.v1.DeleteApplicationRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_DeleteApplicationRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_DeleteApplicationRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.DeleteApplicationRequest.class, + com.google.cloud.visionai.v1.DeleteApplicationRequest.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.DeleteApplicationRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + requestId_ = ""; + force_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_DeleteApplicationRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.DeleteApplicationRequest getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.DeleteApplicationRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.DeleteApplicationRequest build() { + com.google.cloud.visionai.v1.DeleteApplicationRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.DeleteApplicationRequest buildPartial() { + com.google.cloud.visionai.v1.DeleteApplicationRequest result = + new com.google.cloud.visionai.v1.DeleteApplicationRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.visionai.v1.DeleteApplicationRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.requestId_ = requestId_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.force_ = force_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.DeleteApplicationRequest) { + return mergeFrom((com.google.cloud.visionai.v1.DeleteApplicationRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.DeleteApplicationRequest other) { + if (other == com.google.cloud.visionai.v1.DeleteApplicationRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getRequestId().isEmpty()) { + requestId_ = other.requestId_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.getForce() != false) { + setForce(other.getForce()); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 24: + { + force_ = input.readBool(); + bitField0_ |= 0x00000004; + break; + } // case 24 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. Name of the resource.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Name of the resource.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Name of the resource.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Name of the resource.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Name of the resource.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object requestId_ = ""; + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes after the first request.
+     *
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes after the first request.
+     *
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes after the first request.
+     *
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + requestId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes after the first request.
+     *
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearRequestId() { + requestId_ = getDefaultInstance().getRequestId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes after the first request.
+     *
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + requestId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private boolean force_; + /** + * + * + *
+     * Optional. If set to true, any instances and drafts from this application
+     * will also be deleted. (Otherwise, the request will only work if the
+     * application has no instances and drafts.)
+     * 
+ * + * bool force = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The force. + */ + @java.lang.Override + public boolean getForce() { + return force_; + } + /** + * + * + *
+     * Optional. If set to true, any instances and drafts from this application
+     * will also be deleted. (Otherwise, the request will only work if the
+     * application has no instances and drafts.)
+     * 
+ * + * bool force = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The force to set. + * @return This builder for chaining. + */ + public Builder setForce(boolean value) { + + force_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. If set to true, any instances and drafts from this application
+     * will also be deleted. (Otherwise, the request will only work if the
+     * application has no instances and drafts.)
+     * 
+ * + * bool force = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearForce() { + bitField0_ = (bitField0_ & ~0x00000004); + force_ = false; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.DeleteApplicationRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.DeleteApplicationRequest) + private static final com.google.cloud.visionai.v1.DeleteApplicationRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.DeleteApplicationRequest(); + } + + public static com.google.cloud.visionai.v1.DeleteApplicationRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteApplicationRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.DeleteApplicationRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DeleteApplicationRequestOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DeleteApplicationRequestOrBuilder.java new file mode 100644 index 000000000000..a6f2a79578d4 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DeleteApplicationRequestOrBuilder.java @@ -0,0 +1,119 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/platform.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface DeleteApplicationRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.DeleteApplicationRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Name of the resource.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. Name of the resource.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes after the first request.
+   *
+   * For example, consider a situation where you make an initial request and
+   * the request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + java.lang.String getRequestId(); + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes after the first request.
+   *
+   * For example, consider a situation where you make an initial request and
+   * the request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + com.google.protobuf.ByteString getRequestIdBytes(); + + /** + * + * + *
+   * Optional. If set to true, any instances and drafts from this application
+   * will also be deleted. (Otherwise, the request will only work if the
+   * application has no instances and drafts.)
+   * 
+ * + * bool force = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The force. + */ + boolean getForce(); +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DeleteAssetMetadata.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DeleteAssetMetadata.java new file mode 100644 index 000000000000..3d1e92e4371c --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DeleteAssetMetadata.java @@ -0,0 +1,434 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/warehouse.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * The metadata for DeleteAsset API that embeds in
+ * [metadata][google.longrunning.Operation.metadata] field.
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.DeleteAssetMetadata} + */ +public final class DeleteAssetMetadata extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.DeleteAssetMetadata) + DeleteAssetMetadataOrBuilder { + private static final long serialVersionUID = 0L; + // Use DeleteAssetMetadata.newBuilder() to construct. + private DeleteAssetMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DeleteAssetMetadata() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DeleteAssetMetadata(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_DeleteAssetMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_DeleteAssetMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.DeleteAssetMetadata.class, + com.google.cloud.visionai.v1.DeleteAssetMetadata.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 { + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += getUnknownFields().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.visionai.v1.DeleteAssetMetadata)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.DeleteAssetMetadata other = + (com.google.cloud.visionai.v1.DeleteAssetMetadata) obj; + + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.DeleteAssetMetadata parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.DeleteAssetMetadata 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.visionai.v1.DeleteAssetMetadata parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.DeleteAssetMetadata 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.visionai.v1.DeleteAssetMetadata parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.DeleteAssetMetadata parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.DeleteAssetMetadata parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.DeleteAssetMetadata 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.visionai.v1.DeleteAssetMetadata parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.DeleteAssetMetadata 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.visionai.v1.DeleteAssetMetadata parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.DeleteAssetMetadata 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.visionai.v1.DeleteAssetMetadata 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 metadata for DeleteAsset API that embeds in
+   * [metadata][google.longrunning.Operation.metadata] field.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.DeleteAssetMetadata} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.DeleteAssetMetadata) + com.google.cloud.visionai.v1.DeleteAssetMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_DeleteAssetMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_DeleteAssetMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.DeleteAssetMetadata.class, + com.google.cloud.visionai.v1.DeleteAssetMetadata.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.DeleteAssetMetadata.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_DeleteAssetMetadata_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.DeleteAssetMetadata getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.DeleteAssetMetadata.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.DeleteAssetMetadata build() { + com.google.cloud.visionai.v1.DeleteAssetMetadata result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.DeleteAssetMetadata buildPartial() { + com.google.cloud.visionai.v1.DeleteAssetMetadata result = + new com.google.cloud.visionai.v1.DeleteAssetMetadata(this); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.DeleteAssetMetadata) { + return mergeFrom((com.google.cloud.visionai.v1.DeleteAssetMetadata) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.DeleteAssetMetadata other) { + if (other == com.google.cloud.visionai.v1.DeleteAssetMetadata.getDefaultInstance()) + return this; + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.DeleteAssetMetadata) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.DeleteAssetMetadata) + private static final com.google.cloud.visionai.v1.DeleteAssetMetadata DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.DeleteAssetMetadata(); + } + + public static com.google.cloud.visionai.v1.DeleteAssetMetadata getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteAssetMetadata parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.DeleteAssetMetadata getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DeleteAssetMetadataOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DeleteAssetMetadataOrBuilder.java new file mode 100644 index 000000000000..29193855e2e2 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DeleteAssetMetadataOrBuilder.java @@ -0,0 +1,25 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/warehouse.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface DeleteAssetMetadataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.DeleteAssetMetadata) + com.google.protobuf.MessageOrBuilder {} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DeleteAssetRequest.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DeleteAssetRequest.java new file mode 100644 index 000000000000..c23fb5e00aac --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DeleteAssetRequest.java @@ -0,0 +1,653 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/warehouse.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * Request message for DeleteAsset.
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.DeleteAssetRequest} + */ +public final class DeleteAssetRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.DeleteAssetRequest) + DeleteAssetRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use DeleteAssetRequest.newBuilder() to construct. + private DeleteAssetRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DeleteAssetRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DeleteAssetRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_DeleteAssetRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_DeleteAssetRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.DeleteAssetRequest.class, + com.google.cloud.visionai.v1.DeleteAssetRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Required. The name of the asset to delete.
+   * Format:
+   * `projects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + 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(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The name of the asset to delete.
+   * Format:
+   * `projects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += getUnknownFields().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.visionai.v1.DeleteAssetRequest)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.DeleteAssetRequest other = + (com.google.cloud.visionai.v1.DeleteAssetRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.DeleteAssetRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.DeleteAssetRequest 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.visionai.v1.DeleteAssetRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.DeleteAssetRequest 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.visionai.v1.DeleteAssetRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.DeleteAssetRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.DeleteAssetRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.DeleteAssetRequest 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.visionai.v1.DeleteAssetRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.DeleteAssetRequest 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.visionai.v1.DeleteAssetRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.DeleteAssetRequest 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.visionai.v1.DeleteAssetRequest 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; + } + /** + * + * + *
+   * Request message for DeleteAsset.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.DeleteAssetRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.DeleteAssetRequest) + com.google.cloud.visionai.v1.DeleteAssetRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_DeleteAssetRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_DeleteAssetRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.DeleteAssetRequest.class, + com.google.cloud.visionai.v1.DeleteAssetRequest.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.DeleteAssetRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_DeleteAssetRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.DeleteAssetRequest getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.DeleteAssetRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.DeleteAssetRequest build() { + com.google.cloud.visionai.v1.DeleteAssetRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.DeleteAssetRequest buildPartial() { + com.google.cloud.visionai.v1.DeleteAssetRequest result = + new com.google.cloud.visionai.v1.DeleteAssetRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.visionai.v1.DeleteAssetRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.DeleteAssetRequest) { + return mergeFrom((com.google.cloud.visionai.v1.DeleteAssetRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.DeleteAssetRequest other) { + if (other == com.google.cloud.visionai.v1.DeleteAssetRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. The name of the asset to delete.
+     * Format:
+     * `projects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The name of the asset to delete.
+     * Format:
+     * `projects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The name of the asset to delete.
+     * Format:
+     * `projects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the asset to delete.
+     * Format:
+     * `projects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the asset to delete.
+     * Format:
+     * `projects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.DeleteAssetRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.DeleteAssetRequest) + private static final com.google.cloud.visionai.v1.DeleteAssetRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.DeleteAssetRequest(); + } + + public static com.google.cloud.visionai.v1.DeleteAssetRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteAssetRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.DeleteAssetRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DeleteAssetRequestOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DeleteAssetRequestOrBuilder.java new file mode 100644 index 000000000000..61be15b6d7ba --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DeleteAssetRequestOrBuilder.java @@ -0,0 +1,59 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/warehouse.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface DeleteAssetRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.DeleteAssetRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the asset to delete.
+   * Format:
+   * `projects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The name of the asset to delete.
+   * Format:
+   * `projects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DeleteClusterRequest.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DeleteClusterRequest.java new file mode 100644 index 000000000000..21eccd9553f3 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DeleteClusterRequest.java @@ -0,0 +1,905 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/streams_service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * Message for deleting a Cluster.
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.DeleteClusterRequest} + */ +public final class DeleteClusterRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.DeleteClusterRequest) + DeleteClusterRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use DeleteClusterRequest.newBuilder() to construct. + private DeleteClusterRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DeleteClusterRequest() { + name_ = ""; + requestId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DeleteClusterRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.StreamsServiceProto + .internal_static_google_cloud_visionai_v1_DeleteClusterRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.StreamsServiceProto + .internal_static_google_cloud_visionai_v1_DeleteClusterRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.DeleteClusterRequest.class, + com.google.cloud.visionai.v1.DeleteClusterRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Required. Name of the resource
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + 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(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Name of the resource
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int REQUEST_ID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object requestId_ = ""; + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes after the first request.
+   *
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request ID,
+   * the server can check if original operation with the same request ID was
+   * received, and if so, will ignore the second request. This prevents clients
+   * from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + @java.lang.Override + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + 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(); + requestId_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes after the first request.
+   *
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request ID,
+   * the server can check if original operation with the same request ID was
+   * received, and if so, will ignore the second request. This prevents clients
+   * from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, requestId_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, requestId_); + } + size += getUnknownFields().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.visionai.v1.DeleteClusterRequest)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.DeleteClusterRequest other = + (com.google.cloud.visionai.v1.DeleteClusterRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getRequestId().equals(other.getRequestId())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; + hash = (53 * hash) + getRequestId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.DeleteClusterRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.DeleteClusterRequest 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.visionai.v1.DeleteClusterRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.DeleteClusterRequest 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.visionai.v1.DeleteClusterRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.DeleteClusterRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.DeleteClusterRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.DeleteClusterRequest 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.visionai.v1.DeleteClusterRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.DeleteClusterRequest 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.visionai.v1.DeleteClusterRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.DeleteClusterRequest 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.visionai.v1.DeleteClusterRequest 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; + } + /** + * + * + *
+   * Message for deleting a Cluster.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.DeleteClusterRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.DeleteClusterRequest) + com.google.cloud.visionai.v1.DeleteClusterRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.StreamsServiceProto + .internal_static_google_cloud_visionai_v1_DeleteClusterRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.StreamsServiceProto + .internal_static_google_cloud_visionai_v1_DeleteClusterRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.DeleteClusterRequest.class, + com.google.cloud.visionai.v1.DeleteClusterRequest.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.DeleteClusterRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + requestId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.StreamsServiceProto + .internal_static_google_cloud_visionai_v1_DeleteClusterRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.DeleteClusterRequest getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.DeleteClusterRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.DeleteClusterRequest build() { + com.google.cloud.visionai.v1.DeleteClusterRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.DeleteClusterRequest buildPartial() { + com.google.cloud.visionai.v1.DeleteClusterRequest result = + new com.google.cloud.visionai.v1.DeleteClusterRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.visionai.v1.DeleteClusterRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.requestId_ = requestId_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.DeleteClusterRequest) { + return mergeFrom((com.google.cloud.visionai.v1.DeleteClusterRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.DeleteClusterRequest other) { + if (other == com.google.cloud.visionai.v1.DeleteClusterRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getRequestId().isEmpty()) { + requestId_ = other.requestId_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. Name of the resource
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Name of the resource
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Name of the resource
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Name of the resource
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Name of the resource
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object requestId_ = ""; + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes after the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request ID,
+     * the server can check if original operation with the same request ID was
+     * received, and if so, will ignore the second request. This prevents clients
+     * from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes after the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request ID,
+     * the server can check if original operation with the same request ID was
+     * received, and if so, will ignore the second request. This prevents clients
+     * from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes after the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request ID,
+     * the server can check if original operation with the same request ID was
+     * received, and if so, will ignore the second request. This prevents clients
+     * from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + requestId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes after the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request ID,
+     * the server can check if original operation with the same request ID was
+     * received, and if so, will ignore the second request. This prevents clients
+     * from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearRequestId() { + requestId_ = getDefaultInstance().getRequestId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes after the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request ID,
+     * the server can check if original operation with the same request ID was
+     * received, and if so, will ignore the second request. This prevents clients
+     * from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + requestId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.DeleteClusterRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.DeleteClusterRequest) + private static final com.google.cloud.visionai.v1.DeleteClusterRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.DeleteClusterRequest(); + } + + public static com.google.cloud.visionai.v1.DeleteClusterRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteClusterRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.DeleteClusterRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DeleteClusterRequestOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DeleteClusterRequestOrBuilder.java new file mode 100644 index 000000000000..1ff2ba36cef8 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DeleteClusterRequestOrBuilder.java @@ -0,0 +1,104 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/streams_service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface DeleteClusterRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.DeleteClusterRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Name of the resource
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. Name of the resource
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes after the first request.
+   *
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request ID,
+   * the server can check if original operation with the same request ID was
+   * received, and if so, will ignore the second request. This prevents clients
+   * from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + java.lang.String getRequestId(); + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes after the first request.
+   *
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request ID,
+   * the server can check if original operation with the same request ID was
+   * received, and if so, will ignore the second request. This prevents clients
+   * from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + com.google.protobuf.ByteString getRequestIdBytes(); +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DeleteCollectionMetadata.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DeleteCollectionMetadata.java new file mode 100644 index 000000000000..935623dc4d67 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DeleteCollectionMetadata.java @@ -0,0 +1,728 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/warehouse.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * Metadata message for DeleteCollectionRequest
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.DeleteCollectionMetadata} + */ +public final class DeleteCollectionMetadata extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.DeleteCollectionMetadata) + DeleteCollectionMetadataOrBuilder { + private static final long serialVersionUID = 0L; + // Use DeleteCollectionMetadata.newBuilder() to construct. + private DeleteCollectionMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DeleteCollectionMetadata() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DeleteCollectionMetadata(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_DeleteCollectionMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_DeleteCollectionMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.DeleteCollectionMetadata.class, + com.google.cloud.visionai.v1.DeleteCollectionMetadata.Builder.class); + } + + private int bitField0_; + public static final int OPERATION_METADATA_FIELD_NUMBER = 1; + private com.google.cloud.visionai.v1.OperationMetadata operationMetadata_; + /** + * + * + *
+   * Common metadata of the long-running operation.
+   * 
+ * + * .google.cloud.visionai.v1.OperationMetadata operation_metadata = 1; + * + * @return Whether the operationMetadata field is set. + */ + @java.lang.Override + public boolean hasOperationMetadata() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * Common metadata of the long-running operation.
+   * 
+ * + * .google.cloud.visionai.v1.OperationMetadata operation_metadata = 1; + * + * @return The operationMetadata. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.OperationMetadata getOperationMetadata() { + return operationMetadata_ == null + ? com.google.cloud.visionai.v1.OperationMetadata.getDefaultInstance() + : operationMetadata_; + } + /** + * + * + *
+   * Common metadata of the long-running operation.
+   * 
+ * + * .google.cloud.visionai.v1.OperationMetadata operation_metadata = 1; + */ + @java.lang.Override + public com.google.cloud.visionai.v1.OperationMetadataOrBuilder getOperationMetadataOrBuilder() { + return operationMetadata_ == null + ? com.google.cloud.visionai.v1.OperationMetadata.getDefaultInstance() + : operationMetadata_; + } + + 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 (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getOperationMetadata()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getOperationMetadata()); + } + size += getUnknownFields().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.visionai.v1.DeleteCollectionMetadata)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.DeleteCollectionMetadata other = + (com.google.cloud.visionai.v1.DeleteCollectionMetadata) obj; + + if (hasOperationMetadata() != other.hasOperationMetadata()) return false; + if (hasOperationMetadata()) { + if (!getOperationMetadata().equals(other.getOperationMetadata())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasOperationMetadata()) { + hash = (37 * hash) + OPERATION_METADATA_FIELD_NUMBER; + hash = (53 * hash) + getOperationMetadata().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.DeleteCollectionMetadata parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.DeleteCollectionMetadata 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.visionai.v1.DeleteCollectionMetadata parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.DeleteCollectionMetadata 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.visionai.v1.DeleteCollectionMetadata parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.DeleteCollectionMetadata parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.DeleteCollectionMetadata parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.DeleteCollectionMetadata 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.visionai.v1.DeleteCollectionMetadata parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.DeleteCollectionMetadata 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.visionai.v1.DeleteCollectionMetadata parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.DeleteCollectionMetadata 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.visionai.v1.DeleteCollectionMetadata 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; + } + /** + * + * + *
+   * Metadata message for DeleteCollectionRequest
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.DeleteCollectionMetadata} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.DeleteCollectionMetadata) + com.google.cloud.visionai.v1.DeleteCollectionMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_DeleteCollectionMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_DeleteCollectionMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.DeleteCollectionMetadata.class, + com.google.cloud.visionai.v1.DeleteCollectionMetadata.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.DeleteCollectionMetadata.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getOperationMetadataFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + operationMetadata_ = null; + if (operationMetadataBuilder_ != null) { + operationMetadataBuilder_.dispose(); + operationMetadataBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_DeleteCollectionMetadata_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.DeleteCollectionMetadata getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.DeleteCollectionMetadata.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.DeleteCollectionMetadata build() { + com.google.cloud.visionai.v1.DeleteCollectionMetadata result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.DeleteCollectionMetadata buildPartial() { + com.google.cloud.visionai.v1.DeleteCollectionMetadata result = + new com.google.cloud.visionai.v1.DeleteCollectionMetadata(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.visionai.v1.DeleteCollectionMetadata result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.operationMetadata_ = + operationMetadataBuilder_ == null + ? operationMetadata_ + : operationMetadataBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.DeleteCollectionMetadata) { + return mergeFrom((com.google.cloud.visionai.v1.DeleteCollectionMetadata) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.DeleteCollectionMetadata other) { + if (other == com.google.cloud.visionai.v1.DeleteCollectionMetadata.getDefaultInstance()) + return this; + if (other.hasOperationMetadata()) { + mergeOperationMetadata(other.getOperationMetadata()); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage( + getOperationMetadataFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.cloud.visionai.v1.OperationMetadata operationMetadata_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.OperationMetadata, + com.google.cloud.visionai.v1.OperationMetadata.Builder, + com.google.cloud.visionai.v1.OperationMetadataOrBuilder> + operationMetadataBuilder_; + /** + * + * + *
+     * Common metadata of the long-running operation.
+     * 
+ * + * .google.cloud.visionai.v1.OperationMetadata operation_metadata = 1; + * + * @return Whether the operationMetadata field is set. + */ + public boolean hasOperationMetadata() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * Common metadata of the long-running operation.
+     * 
+ * + * .google.cloud.visionai.v1.OperationMetadata operation_metadata = 1; + * + * @return The operationMetadata. + */ + public com.google.cloud.visionai.v1.OperationMetadata getOperationMetadata() { + if (operationMetadataBuilder_ == null) { + return operationMetadata_ == null + ? com.google.cloud.visionai.v1.OperationMetadata.getDefaultInstance() + : operationMetadata_; + } else { + return operationMetadataBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Common metadata of the long-running operation.
+     * 
+ * + * .google.cloud.visionai.v1.OperationMetadata operation_metadata = 1; + */ + public Builder setOperationMetadata(com.google.cloud.visionai.v1.OperationMetadata value) { + if (operationMetadataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + operationMetadata_ = value; + } else { + operationMetadataBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Common metadata of the long-running operation.
+     * 
+ * + * .google.cloud.visionai.v1.OperationMetadata operation_metadata = 1; + */ + public Builder setOperationMetadata( + com.google.cloud.visionai.v1.OperationMetadata.Builder builderForValue) { + if (operationMetadataBuilder_ == null) { + operationMetadata_ = builderForValue.build(); + } else { + operationMetadataBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Common metadata of the long-running operation.
+     * 
+ * + * .google.cloud.visionai.v1.OperationMetadata operation_metadata = 1; + */ + public Builder mergeOperationMetadata(com.google.cloud.visionai.v1.OperationMetadata value) { + if (operationMetadataBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && operationMetadata_ != null + && operationMetadata_ + != com.google.cloud.visionai.v1.OperationMetadata.getDefaultInstance()) { + getOperationMetadataBuilder().mergeFrom(value); + } else { + operationMetadata_ = value; + } + } else { + operationMetadataBuilder_.mergeFrom(value); + } + if (operationMetadata_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Common metadata of the long-running operation.
+     * 
+ * + * .google.cloud.visionai.v1.OperationMetadata operation_metadata = 1; + */ + public Builder clearOperationMetadata() { + bitField0_ = (bitField0_ & ~0x00000001); + operationMetadata_ = null; + if (operationMetadataBuilder_ != null) { + operationMetadataBuilder_.dispose(); + operationMetadataBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Common metadata of the long-running operation.
+     * 
+ * + * .google.cloud.visionai.v1.OperationMetadata operation_metadata = 1; + */ + public com.google.cloud.visionai.v1.OperationMetadata.Builder getOperationMetadataBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getOperationMetadataFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Common metadata of the long-running operation.
+     * 
+ * + * .google.cloud.visionai.v1.OperationMetadata operation_metadata = 1; + */ + public com.google.cloud.visionai.v1.OperationMetadataOrBuilder getOperationMetadataOrBuilder() { + if (operationMetadataBuilder_ != null) { + return operationMetadataBuilder_.getMessageOrBuilder(); + } else { + return operationMetadata_ == null + ? com.google.cloud.visionai.v1.OperationMetadata.getDefaultInstance() + : operationMetadata_; + } + } + /** + * + * + *
+     * Common metadata of the long-running operation.
+     * 
+ * + * .google.cloud.visionai.v1.OperationMetadata operation_metadata = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.OperationMetadata, + com.google.cloud.visionai.v1.OperationMetadata.Builder, + com.google.cloud.visionai.v1.OperationMetadataOrBuilder> + getOperationMetadataFieldBuilder() { + if (operationMetadataBuilder_ == null) { + operationMetadataBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.OperationMetadata, + com.google.cloud.visionai.v1.OperationMetadata.Builder, + com.google.cloud.visionai.v1.OperationMetadataOrBuilder>( + getOperationMetadata(), getParentForChildren(), isClean()); + operationMetadata_ = null; + } + return operationMetadataBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.DeleteCollectionMetadata) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.DeleteCollectionMetadata) + private static final com.google.cloud.visionai.v1.DeleteCollectionMetadata DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.DeleteCollectionMetadata(); + } + + public static com.google.cloud.visionai.v1.DeleteCollectionMetadata getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteCollectionMetadata parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.DeleteCollectionMetadata getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DeleteCollectionMetadataOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DeleteCollectionMetadataOrBuilder.java new file mode 100644 index 000000000000..6a0e6cf10411 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DeleteCollectionMetadataOrBuilder.java @@ -0,0 +1,61 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/warehouse.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface DeleteCollectionMetadataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.DeleteCollectionMetadata) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Common metadata of the long-running operation.
+   * 
+ * + * .google.cloud.visionai.v1.OperationMetadata operation_metadata = 1; + * + * @return Whether the operationMetadata field is set. + */ + boolean hasOperationMetadata(); + /** + * + * + *
+   * Common metadata of the long-running operation.
+   * 
+ * + * .google.cloud.visionai.v1.OperationMetadata operation_metadata = 1; + * + * @return The operationMetadata. + */ + com.google.cloud.visionai.v1.OperationMetadata getOperationMetadata(); + /** + * + * + *
+   * Common metadata of the long-running operation.
+   * 
+ * + * .google.cloud.visionai.v1.OperationMetadata operation_metadata = 1; + */ + com.google.cloud.visionai.v1.OperationMetadataOrBuilder getOperationMetadataOrBuilder(); +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DeleteCollectionRequest.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DeleteCollectionRequest.java new file mode 100644 index 000000000000..f7480a8dfde0 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DeleteCollectionRequest.java @@ -0,0 +1,646 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/warehouse.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * Request message for DeleteCollectionRequest.
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.DeleteCollectionRequest} + */ +public final class DeleteCollectionRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.DeleteCollectionRequest) + DeleteCollectionRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use DeleteCollectionRequest.newBuilder() to construct. + private DeleteCollectionRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DeleteCollectionRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DeleteCollectionRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_DeleteCollectionRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_DeleteCollectionRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.DeleteCollectionRequest.class, + com.google.cloud.visionai.v1.DeleteCollectionRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Required. The name of the collection to delete. Format:
+   * `projects/{project_number}/locations/{location}/corpora/{corpus}/collections/{collection}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + 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(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The name of the collection to delete. Format:
+   * `projects/{project_number}/locations/{location}/corpora/{corpus}/collections/{collection}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += getUnknownFields().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.visionai.v1.DeleteCollectionRequest)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.DeleteCollectionRequest other = + (com.google.cloud.visionai.v1.DeleteCollectionRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.DeleteCollectionRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.DeleteCollectionRequest 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.visionai.v1.DeleteCollectionRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.DeleteCollectionRequest 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.visionai.v1.DeleteCollectionRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.DeleteCollectionRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.DeleteCollectionRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.DeleteCollectionRequest 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.visionai.v1.DeleteCollectionRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.DeleteCollectionRequest 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.visionai.v1.DeleteCollectionRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.DeleteCollectionRequest 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.visionai.v1.DeleteCollectionRequest 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; + } + /** + * + * + *
+   * Request message for DeleteCollectionRequest.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.DeleteCollectionRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.DeleteCollectionRequest) + com.google.cloud.visionai.v1.DeleteCollectionRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_DeleteCollectionRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_DeleteCollectionRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.DeleteCollectionRequest.class, + com.google.cloud.visionai.v1.DeleteCollectionRequest.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.DeleteCollectionRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_DeleteCollectionRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.DeleteCollectionRequest getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.DeleteCollectionRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.DeleteCollectionRequest build() { + com.google.cloud.visionai.v1.DeleteCollectionRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.DeleteCollectionRequest buildPartial() { + com.google.cloud.visionai.v1.DeleteCollectionRequest result = + new com.google.cloud.visionai.v1.DeleteCollectionRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.visionai.v1.DeleteCollectionRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.DeleteCollectionRequest) { + return mergeFrom((com.google.cloud.visionai.v1.DeleteCollectionRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.DeleteCollectionRequest other) { + if (other == com.google.cloud.visionai.v1.DeleteCollectionRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. The name of the collection to delete. Format:
+     * `projects/{project_number}/locations/{location}/corpora/{corpus}/collections/{collection}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The name of the collection to delete. Format:
+     * `projects/{project_number}/locations/{location}/corpora/{corpus}/collections/{collection}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The name of the collection to delete. Format:
+     * `projects/{project_number}/locations/{location}/corpora/{corpus}/collections/{collection}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the collection to delete. Format:
+     * `projects/{project_number}/locations/{location}/corpora/{corpus}/collections/{collection}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the collection to delete. Format:
+     * `projects/{project_number}/locations/{location}/corpora/{corpus}/collections/{collection}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.DeleteCollectionRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.DeleteCollectionRequest) + private static final com.google.cloud.visionai.v1.DeleteCollectionRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.DeleteCollectionRequest(); + } + + public static com.google.cloud.visionai.v1.DeleteCollectionRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteCollectionRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.DeleteCollectionRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DeleteCollectionRequestOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DeleteCollectionRequestOrBuilder.java new file mode 100644 index 000000000000..3498413df7bf --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DeleteCollectionRequestOrBuilder.java @@ -0,0 +1,57 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/warehouse.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface DeleteCollectionRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.DeleteCollectionRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the collection to delete. Format:
+   * `projects/{project_number}/locations/{location}/corpora/{corpus}/collections/{collection}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The name of the collection to delete. Format:
+   * `projects/{project_number}/locations/{location}/corpora/{corpus}/collections/{collection}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DeleteCorpusRequest.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DeleteCorpusRequest.java new file mode 100644 index 000000000000..b4852038e21e --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DeleteCorpusRequest.java @@ -0,0 +1,639 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/warehouse.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * Request message for DeleteCorpus.
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.DeleteCorpusRequest} + */ +public final class DeleteCorpusRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.DeleteCorpusRequest) + DeleteCorpusRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use DeleteCorpusRequest.newBuilder() to construct. + private DeleteCorpusRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DeleteCorpusRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DeleteCorpusRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_DeleteCorpusRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_DeleteCorpusRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.DeleteCorpusRequest.class, + com.google.cloud.visionai.v1.DeleteCorpusRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Required. The resource name of the corpus to delete.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + 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(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The resource name of the corpus to delete.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += getUnknownFields().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.visionai.v1.DeleteCorpusRequest)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.DeleteCorpusRequest other = + (com.google.cloud.visionai.v1.DeleteCorpusRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.DeleteCorpusRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.DeleteCorpusRequest 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.visionai.v1.DeleteCorpusRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.DeleteCorpusRequest 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.visionai.v1.DeleteCorpusRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.DeleteCorpusRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.DeleteCorpusRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.DeleteCorpusRequest 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.visionai.v1.DeleteCorpusRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.DeleteCorpusRequest 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.visionai.v1.DeleteCorpusRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.DeleteCorpusRequest 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.visionai.v1.DeleteCorpusRequest 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; + } + /** + * + * + *
+   * Request message for DeleteCorpus.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.DeleteCorpusRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.DeleteCorpusRequest) + com.google.cloud.visionai.v1.DeleteCorpusRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_DeleteCorpusRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_DeleteCorpusRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.DeleteCorpusRequest.class, + com.google.cloud.visionai.v1.DeleteCorpusRequest.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.DeleteCorpusRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_DeleteCorpusRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.DeleteCorpusRequest getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.DeleteCorpusRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.DeleteCorpusRequest build() { + com.google.cloud.visionai.v1.DeleteCorpusRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.DeleteCorpusRequest buildPartial() { + com.google.cloud.visionai.v1.DeleteCorpusRequest result = + new com.google.cloud.visionai.v1.DeleteCorpusRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.visionai.v1.DeleteCorpusRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.DeleteCorpusRequest) { + return mergeFrom((com.google.cloud.visionai.v1.DeleteCorpusRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.DeleteCorpusRequest other) { + if (other == com.google.cloud.visionai.v1.DeleteCorpusRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. The resource name of the corpus to delete.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The resource name of the corpus to delete.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The resource name of the corpus to delete.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the corpus to delete.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the corpus to delete.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.DeleteCorpusRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.DeleteCorpusRequest) + private static final com.google.cloud.visionai.v1.DeleteCorpusRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.DeleteCorpusRequest(); + } + + public static com.google.cloud.visionai.v1.DeleteCorpusRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteCorpusRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.DeleteCorpusRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DeleteCorpusRequestOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DeleteCorpusRequestOrBuilder.java new file mode 100644 index 000000000000..d5cc3cdcb0ea --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DeleteCorpusRequestOrBuilder.java @@ -0,0 +1,55 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/warehouse.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface DeleteCorpusRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.DeleteCorpusRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The resource name of the corpus to delete.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The resource name of the corpus to delete.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DeleteDataSchemaRequest.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DeleteDataSchemaRequest.java new file mode 100644 index 000000000000..065e8ace9683 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DeleteDataSchemaRequest.java @@ -0,0 +1,653 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/warehouse.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * Request message for DeleteDataSchema.
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.DeleteDataSchemaRequest} + */ +public final class DeleteDataSchemaRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.DeleteDataSchemaRequest) + DeleteDataSchemaRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use DeleteDataSchemaRequest.newBuilder() to construct. + private DeleteDataSchemaRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DeleteDataSchemaRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DeleteDataSchemaRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_DeleteDataSchemaRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_DeleteDataSchemaRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.DeleteDataSchemaRequest.class, + com.google.cloud.visionai.v1.DeleteDataSchemaRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Required. The name of the data schema to delete.
+   * Format:
+   * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/dataSchemas/{data_schema_id}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + 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(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The name of the data schema to delete.
+   * Format:
+   * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/dataSchemas/{data_schema_id}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += getUnknownFields().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.visionai.v1.DeleteDataSchemaRequest)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.DeleteDataSchemaRequest other = + (com.google.cloud.visionai.v1.DeleteDataSchemaRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.DeleteDataSchemaRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.DeleteDataSchemaRequest 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.visionai.v1.DeleteDataSchemaRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.DeleteDataSchemaRequest 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.visionai.v1.DeleteDataSchemaRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.DeleteDataSchemaRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.DeleteDataSchemaRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.DeleteDataSchemaRequest 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.visionai.v1.DeleteDataSchemaRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.DeleteDataSchemaRequest 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.visionai.v1.DeleteDataSchemaRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.DeleteDataSchemaRequest 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.visionai.v1.DeleteDataSchemaRequest 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; + } + /** + * + * + *
+   * Request message for DeleteDataSchema.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.DeleteDataSchemaRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.DeleteDataSchemaRequest) + com.google.cloud.visionai.v1.DeleteDataSchemaRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_DeleteDataSchemaRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_DeleteDataSchemaRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.DeleteDataSchemaRequest.class, + com.google.cloud.visionai.v1.DeleteDataSchemaRequest.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.DeleteDataSchemaRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_DeleteDataSchemaRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.DeleteDataSchemaRequest getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.DeleteDataSchemaRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.DeleteDataSchemaRequest build() { + com.google.cloud.visionai.v1.DeleteDataSchemaRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.DeleteDataSchemaRequest buildPartial() { + com.google.cloud.visionai.v1.DeleteDataSchemaRequest result = + new com.google.cloud.visionai.v1.DeleteDataSchemaRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.visionai.v1.DeleteDataSchemaRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.DeleteDataSchemaRequest) { + return mergeFrom((com.google.cloud.visionai.v1.DeleteDataSchemaRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.DeleteDataSchemaRequest other) { + if (other == com.google.cloud.visionai.v1.DeleteDataSchemaRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. The name of the data schema to delete.
+     * Format:
+     * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/dataSchemas/{data_schema_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The name of the data schema to delete.
+     * Format:
+     * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/dataSchemas/{data_schema_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The name of the data schema to delete.
+     * Format:
+     * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/dataSchemas/{data_schema_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the data schema to delete.
+     * Format:
+     * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/dataSchemas/{data_schema_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the data schema to delete.
+     * Format:
+     * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/dataSchemas/{data_schema_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.DeleteDataSchemaRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.DeleteDataSchemaRequest) + private static final com.google.cloud.visionai.v1.DeleteDataSchemaRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.DeleteDataSchemaRequest(); + } + + public static com.google.cloud.visionai.v1.DeleteDataSchemaRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteDataSchemaRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.DeleteDataSchemaRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DeleteDataSchemaRequestOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DeleteDataSchemaRequestOrBuilder.java new file mode 100644 index 000000000000..a7ff30e0e8ec --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DeleteDataSchemaRequestOrBuilder.java @@ -0,0 +1,59 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/warehouse.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface DeleteDataSchemaRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.DeleteDataSchemaRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the data schema to delete.
+   * Format:
+   * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/dataSchemas/{data_schema_id}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The name of the data schema to delete.
+   * Format:
+   * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/dataSchemas/{data_schema_id}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DeleteDraftRequest.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DeleteDraftRequest.java new file mode 100644 index 000000000000..0953a61d9dbc --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DeleteDraftRequest.java @@ -0,0 +1,905 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/platform.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * Message for deleting a Draft.
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.DeleteDraftRequest} + */ +public final class DeleteDraftRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.DeleteDraftRequest) + DeleteDraftRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use DeleteDraftRequest.newBuilder() to construct. + private DeleteDraftRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DeleteDraftRequest() { + name_ = ""; + requestId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DeleteDraftRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_DeleteDraftRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_DeleteDraftRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.DeleteDraftRequest.class, + com.google.cloud.visionai.v1.DeleteDraftRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Required. Name of the resource.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + 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(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Name of the resource.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int REQUEST_ID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object requestId_ = ""; + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes after the first request.
+   *
+   * For example, consider a situation where you make an initial request and
+   * the request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + @java.lang.Override + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + 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(); + requestId_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes after the first request.
+   *
+   * For example, consider a situation where you make an initial request and
+   * the request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, requestId_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, requestId_); + } + size += getUnknownFields().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.visionai.v1.DeleteDraftRequest)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.DeleteDraftRequest other = + (com.google.cloud.visionai.v1.DeleteDraftRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getRequestId().equals(other.getRequestId())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; + hash = (53 * hash) + getRequestId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.DeleteDraftRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.DeleteDraftRequest 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.visionai.v1.DeleteDraftRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.DeleteDraftRequest 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.visionai.v1.DeleteDraftRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.DeleteDraftRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.DeleteDraftRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.DeleteDraftRequest 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.visionai.v1.DeleteDraftRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.DeleteDraftRequest 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.visionai.v1.DeleteDraftRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.DeleteDraftRequest 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.visionai.v1.DeleteDraftRequest 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; + } + /** + * + * + *
+   * Message for deleting a Draft.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.DeleteDraftRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.DeleteDraftRequest) + com.google.cloud.visionai.v1.DeleteDraftRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_DeleteDraftRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_DeleteDraftRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.DeleteDraftRequest.class, + com.google.cloud.visionai.v1.DeleteDraftRequest.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.DeleteDraftRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + requestId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_DeleteDraftRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.DeleteDraftRequest getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.DeleteDraftRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.DeleteDraftRequest build() { + com.google.cloud.visionai.v1.DeleteDraftRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.DeleteDraftRequest buildPartial() { + com.google.cloud.visionai.v1.DeleteDraftRequest result = + new com.google.cloud.visionai.v1.DeleteDraftRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.visionai.v1.DeleteDraftRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.requestId_ = requestId_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.DeleteDraftRequest) { + return mergeFrom((com.google.cloud.visionai.v1.DeleteDraftRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.DeleteDraftRequest other) { + if (other == com.google.cloud.visionai.v1.DeleteDraftRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getRequestId().isEmpty()) { + requestId_ = other.requestId_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. Name of the resource.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Name of the resource.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Name of the resource.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Name of the resource.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Name of the resource.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object requestId_ = ""; + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes after the first request.
+     *
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes after the first request.
+     *
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes after the first request.
+     *
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + requestId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes after the first request.
+     *
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearRequestId() { + requestId_ = getDefaultInstance().getRequestId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes after the first request.
+     *
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + requestId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.DeleteDraftRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.DeleteDraftRequest) + private static final com.google.cloud.visionai.v1.DeleteDraftRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.DeleteDraftRequest(); + } + + public static com.google.cloud.visionai.v1.DeleteDraftRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteDraftRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.DeleteDraftRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DeleteDraftRequestOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DeleteDraftRequestOrBuilder.java new file mode 100644 index 000000000000..2c9fec1cd643 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DeleteDraftRequestOrBuilder.java @@ -0,0 +1,104 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/platform.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface DeleteDraftRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.DeleteDraftRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Name of the resource.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. Name of the resource.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes after the first request.
+   *
+   * For example, consider a situation where you make an initial request and
+   * the request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + java.lang.String getRequestId(); + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes after the first request.
+   *
+   * For example, consider a situation where you make an initial request and
+   * the request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + com.google.protobuf.ByteString getRequestIdBytes(); +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DeleteEventRequest.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DeleteEventRequest.java new file mode 100644 index 000000000000..0e059df6978e --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DeleteEventRequest.java @@ -0,0 +1,905 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/streams_service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * Message for deleting a Event.
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.DeleteEventRequest} + */ +public final class DeleteEventRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.DeleteEventRequest) + DeleteEventRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use DeleteEventRequest.newBuilder() to construct. + private DeleteEventRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DeleteEventRequest() { + name_ = ""; + requestId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DeleteEventRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.StreamsServiceProto + .internal_static_google_cloud_visionai_v1_DeleteEventRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.StreamsServiceProto + .internal_static_google_cloud_visionai_v1_DeleteEventRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.DeleteEventRequest.class, + com.google.cloud.visionai.v1.DeleteEventRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Required. Name of the resource.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + 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(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Name of the resource.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int REQUEST_ID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object requestId_ = ""; + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes after the first request.
+   *
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request ID,
+   * the server can check if original operation with the same request ID was
+   * received, and if so, will ignore the second request. This prevents clients
+   * from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + @java.lang.Override + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + 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(); + requestId_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes after the first request.
+   *
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request ID,
+   * the server can check if original operation with the same request ID was
+   * received, and if so, will ignore the second request. This prevents clients
+   * from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, requestId_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, requestId_); + } + size += getUnknownFields().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.visionai.v1.DeleteEventRequest)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.DeleteEventRequest other = + (com.google.cloud.visionai.v1.DeleteEventRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getRequestId().equals(other.getRequestId())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; + hash = (53 * hash) + getRequestId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.DeleteEventRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.DeleteEventRequest 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.visionai.v1.DeleteEventRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.DeleteEventRequest 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.visionai.v1.DeleteEventRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.DeleteEventRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.DeleteEventRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.DeleteEventRequest 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.visionai.v1.DeleteEventRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.DeleteEventRequest 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.visionai.v1.DeleteEventRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.DeleteEventRequest 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.visionai.v1.DeleteEventRequest 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; + } + /** + * + * + *
+   * Message for deleting a Event.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.DeleteEventRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.DeleteEventRequest) + com.google.cloud.visionai.v1.DeleteEventRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.StreamsServiceProto + .internal_static_google_cloud_visionai_v1_DeleteEventRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.StreamsServiceProto + .internal_static_google_cloud_visionai_v1_DeleteEventRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.DeleteEventRequest.class, + com.google.cloud.visionai.v1.DeleteEventRequest.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.DeleteEventRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + requestId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.StreamsServiceProto + .internal_static_google_cloud_visionai_v1_DeleteEventRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.DeleteEventRequest getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.DeleteEventRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.DeleteEventRequest build() { + com.google.cloud.visionai.v1.DeleteEventRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.DeleteEventRequest buildPartial() { + com.google.cloud.visionai.v1.DeleteEventRequest result = + new com.google.cloud.visionai.v1.DeleteEventRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.visionai.v1.DeleteEventRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.requestId_ = requestId_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.DeleteEventRequest) { + return mergeFrom((com.google.cloud.visionai.v1.DeleteEventRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.DeleteEventRequest other) { + if (other == com.google.cloud.visionai.v1.DeleteEventRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getRequestId().isEmpty()) { + requestId_ = other.requestId_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. Name of the resource.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Name of the resource.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Name of the resource.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Name of the resource.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Name of the resource.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object requestId_ = ""; + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes after the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request ID,
+     * the server can check if original operation with the same request ID was
+     * received, and if so, will ignore the second request. This prevents clients
+     * from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes after the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request ID,
+     * the server can check if original operation with the same request ID was
+     * received, and if so, will ignore the second request. This prevents clients
+     * from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes after the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request ID,
+     * the server can check if original operation with the same request ID was
+     * received, and if so, will ignore the second request. This prevents clients
+     * from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + requestId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes after the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request ID,
+     * the server can check if original operation with the same request ID was
+     * received, and if so, will ignore the second request. This prevents clients
+     * from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearRequestId() { + requestId_ = getDefaultInstance().getRequestId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes after the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request ID,
+     * the server can check if original operation with the same request ID was
+     * received, and if so, will ignore the second request. This prevents clients
+     * from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + requestId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.DeleteEventRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.DeleteEventRequest) + private static final com.google.cloud.visionai.v1.DeleteEventRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.DeleteEventRequest(); + } + + public static com.google.cloud.visionai.v1.DeleteEventRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteEventRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.DeleteEventRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DeleteEventRequestOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DeleteEventRequestOrBuilder.java new file mode 100644 index 000000000000..7334c96d558d --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DeleteEventRequestOrBuilder.java @@ -0,0 +1,104 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/streams_service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface DeleteEventRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.DeleteEventRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Name of the resource.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. Name of the resource.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes after the first request.
+   *
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request ID,
+   * the server can check if original operation with the same request ID was
+   * received, and if so, will ignore the second request. This prevents clients
+   * from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + java.lang.String getRequestId(); + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes after the first request.
+   *
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request ID,
+   * the server can check if original operation with the same request ID was
+   * received, and if so, will ignore the second request. This prevents clients
+   * from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + com.google.protobuf.ByteString getRequestIdBytes(); +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DeleteIndexEndpointMetadata.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DeleteIndexEndpointMetadata.java new file mode 100644 index 000000000000..ce1795ceaf65 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DeleteIndexEndpointMetadata.java @@ -0,0 +1,728 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/warehouse.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * Metadata message for DeleteIndexEndpoint.
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.DeleteIndexEndpointMetadata} + */ +public final class DeleteIndexEndpointMetadata extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.DeleteIndexEndpointMetadata) + DeleteIndexEndpointMetadataOrBuilder { + private static final long serialVersionUID = 0L; + // Use DeleteIndexEndpointMetadata.newBuilder() to construct. + private DeleteIndexEndpointMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DeleteIndexEndpointMetadata() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DeleteIndexEndpointMetadata(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_DeleteIndexEndpointMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_DeleteIndexEndpointMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.DeleteIndexEndpointMetadata.class, + com.google.cloud.visionai.v1.DeleteIndexEndpointMetadata.Builder.class); + } + + private int bitField0_; + public static final int OPERATION_METADATA_FIELD_NUMBER = 1; + private com.google.cloud.visionai.v1.OperationMetadata operationMetadata_; + /** + * + * + *
+   * Common metadata of the long-running operation.
+   * 
+ * + * .google.cloud.visionai.v1.OperationMetadata operation_metadata = 1; + * + * @return Whether the operationMetadata field is set. + */ + @java.lang.Override + public boolean hasOperationMetadata() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * Common metadata of the long-running operation.
+   * 
+ * + * .google.cloud.visionai.v1.OperationMetadata operation_metadata = 1; + * + * @return The operationMetadata. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.OperationMetadata getOperationMetadata() { + return operationMetadata_ == null + ? com.google.cloud.visionai.v1.OperationMetadata.getDefaultInstance() + : operationMetadata_; + } + /** + * + * + *
+   * Common metadata of the long-running operation.
+   * 
+ * + * .google.cloud.visionai.v1.OperationMetadata operation_metadata = 1; + */ + @java.lang.Override + public com.google.cloud.visionai.v1.OperationMetadataOrBuilder getOperationMetadataOrBuilder() { + return operationMetadata_ == null + ? com.google.cloud.visionai.v1.OperationMetadata.getDefaultInstance() + : operationMetadata_; + } + + 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 (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getOperationMetadata()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getOperationMetadata()); + } + size += getUnknownFields().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.visionai.v1.DeleteIndexEndpointMetadata)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.DeleteIndexEndpointMetadata other = + (com.google.cloud.visionai.v1.DeleteIndexEndpointMetadata) obj; + + if (hasOperationMetadata() != other.hasOperationMetadata()) return false; + if (hasOperationMetadata()) { + if (!getOperationMetadata().equals(other.getOperationMetadata())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasOperationMetadata()) { + hash = (37 * hash) + OPERATION_METADATA_FIELD_NUMBER; + hash = (53 * hash) + getOperationMetadata().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.DeleteIndexEndpointMetadata parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.DeleteIndexEndpointMetadata 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.visionai.v1.DeleteIndexEndpointMetadata parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.DeleteIndexEndpointMetadata 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.visionai.v1.DeleteIndexEndpointMetadata parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.DeleteIndexEndpointMetadata parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.DeleteIndexEndpointMetadata parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.DeleteIndexEndpointMetadata 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.visionai.v1.DeleteIndexEndpointMetadata parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.DeleteIndexEndpointMetadata 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.visionai.v1.DeleteIndexEndpointMetadata parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.DeleteIndexEndpointMetadata 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.visionai.v1.DeleteIndexEndpointMetadata 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; + } + /** + * + * + *
+   * Metadata message for DeleteIndexEndpoint.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.DeleteIndexEndpointMetadata} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.DeleteIndexEndpointMetadata) + com.google.cloud.visionai.v1.DeleteIndexEndpointMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_DeleteIndexEndpointMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_DeleteIndexEndpointMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.DeleteIndexEndpointMetadata.class, + com.google.cloud.visionai.v1.DeleteIndexEndpointMetadata.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.DeleteIndexEndpointMetadata.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getOperationMetadataFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + operationMetadata_ = null; + if (operationMetadataBuilder_ != null) { + operationMetadataBuilder_.dispose(); + operationMetadataBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_DeleteIndexEndpointMetadata_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.DeleteIndexEndpointMetadata getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.DeleteIndexEndpointMetadata.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.DeleteIndexEndpointMetadata build() { + com.google.cloud.visionai.v1.DeleteIndexEndpointMetadata result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.DeleteIndexEndpointMetadata buildPartial() { + com.google.cloud.visionai.v1.DeleteIndexEndpointMetadata result = + new com.google.cloud.visionai.v1.DeleteIndexEndpointMetadata(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.visionai.v1.DeleteIndexEndpointMetadata result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.operationMetadata_ = + operationMetadataBuilder_ == null + ? operationMetadata_ + : operationMetadataBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.DeleteIndexEndpointMetadata) { + return mergeFrom((com.google.cloud.visionai.v1.DeleteIndexEndpointMetadata) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.DeleteIndexEndpointMetadata other) { + if (other == com.google.cloud.visionai.v1.DeleteIndexEndpointMetadata.getDefaultInstance()) + return this; + if (other.hasOperationMetadata()) { + mergeOperationMetadata(other.getOperationMetadata()); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage( + getOperationMetadataFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.cloud.visionai.v1.OperationMetadata operationMetadata_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.OperationMetadata, + com.google.cloud.visionai.v1.OperationMetadata.Builder, + com.google.cloud.visionai.v1.OperationMetadataOrBuilder> + operationMetadataBuilder_; + /** + * + * + *
+     * Common metadata of the long-running operation.
+     * 
+ * + * .google.cloud.visionai.v1.OperationMetadata operation_metadata = 1; + * + * @return Whether the operationMetadata field is set. + */ + public boolean hasOperationMetadata() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * Common metadata of the long-running operation.
+     * 
+ * + * .google.cloud.visionai.v1.OperationMetadata operation_metadata = 1; + * + * @return The operationMetadata. + */ + public com.google.cloud.visionai.v1.OperationMetadata getOperationMetadata() { + if (operationMetadataBuilder_ == null) { + return operationMetadata_ == null + ? com.google.cloud.visionai.v1.OperationMetadata.getDefaultInstance() + : operationMetadata_; + } else { + return operationMetadataBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Common metadata of the long-running operation.
+     * 
+ * + * .google.cloud.visionai.v1.OperationMetadata operation_metadata = 1; + */ + public Builder setOperationMetadata(com.google.cloud.visionai.v1.OperationMetadata value) { + if (operationMetadataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + operationMetadata_ = value; + } else { + operationMetadataBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Common metadata of the long-running operation.
+     * 
+ * + * .google.cloud.visionai.v1.OperationMetadata operation_metadata = 1; + */ + public Builder setOperationMetadata( + com.google.cloud.visionai.v1.OperationMetadata.Builder builderForValue) { + if (operationMetadataBuilder_ == null) { + operationMetadata_ = builderForValue.build(); + } else { + operationMetadataBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Common metadata of the long-running operation.
+     * 
+ * + * .google.cloud.visionai.v1.OperationMetadata operation_metadata = 1; + */ + public Builder mergeOperationMetadata(com.google.cloud.visionai.v1.OperationMetadata value) { + if (operationMetadataBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && operationMetadata_ != null + && operationMetadata_ + != com.google.cloud.visionai.v1.OperationMetadata.getDefaultInstance()) { + getOperationMetadataBuilder().mergeFrom(value); + } else { + operationMetadata_ = value; + } + } else { + operationMetadataBuilder_.mergeFrom(value); + } + if (operationMetadata_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Common metadata of the long-running operation.
+     * 
+ * + * .google.cloud.visionai.v1.OperationMetadata operation_metadata = 1; + */ + public Builder clearOperationMetadata() { + bitField0_ = (bitField0_ & ~0x00000001); + operationMetadata_ = null; + if (operationMetadataBuilder_ != null) { + operationMetadataBuilder_.dispose(); + operationMetadataBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Common metadata of the long-running operation.
+     * 
+ * + * .google.cloud.visionai.v1.OperationMetadata operation_metadata = 1; + */ + public com.google.cloud.visionai.v1.OperationMetadata.Builder getOperationMetadataBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getOperationMetadataFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Common metadata of the long-running operation.
+     * 
+ * + * .google.cloud.visionai.v1.OperationMetadata operation_metadata = 1; + */ + public com.google.cloud.visionai.v1.OperationMetadataOrBuilder getOperationMetadataOrBuilder() { + if (operationMetadataBuilder_ != null) { + return operationMetadataBuilder_.getMessageOrBuilder(); + } else { + return operationMetadata_ == null + ? com.google.cloud.visionai.v1.OperationMetadata.getDefaultInstance() + : operationMetadata_; + } + } + /** + * + * + *
+     * Common metadata of the long-running operation.
+     * 
+ * + * .google.cloud.visionai.v1.OperationMetadata operation_metadata = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.OperationMetadata, + com.google.cloud.visionai.v1.OperationMetadata.Builder, + com.google.cloud.visionai.v1.OperationMetadataOrBuilder> + getOperationMetadataFieldBuilder() { + if (operationMetadataBuilder_ == null) { + operationMetadataBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.OperationMetadata, + com.google.cloud.visionai.v1.OperationMetadata.Builder, + com.google.cloud.visionai.v1.OperationMetadataOrBuilder>( + getOperationMetadata(), getParentForChildren(), isClean()); + operationMetadata_ = null; + } + return operationMetadataBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.DeleteIndexEndpointMetadata) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.DeleteIndexEndpointMetadata) + private static final com.google.cloud.visionai.v1.DeleteIndexEndpointMetadata DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.DeleteIndexEndpointMetadata(); + } + + public static com.google.cloud.visionai.v1.DeleteIndexEndpointMetadata getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteIndexEndpointMetadata parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.DeleteIndexEndpointMetadata getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DeleteIndexEndpointMetadataOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DeleteIndexEndpointMetadataOrBuilder.java new file mode 100644 index 000000000000..7e5e9a5393d5 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DeleteIndexEndpointMetadataOrBuilder.java @@ -0,0 +1,61 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/warehouse.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface DeleteIndexEndpointMetadataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.DeleteIndexEndpointMetadata) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Common metadata of the long-running operation.
+   * 
+ * + * .google.cloud.visionai.v1.OperationMetadata operation_metadata = 1; + * + * @return Whether the operationMetadata field is set. + */ + boolean hasOperationMetadata(); + /** + * + * + *
+   * Common metadata of the long-running operation.
+   * 
+ * + * .google.cloud.visionai.v1.OperationMetadata operation_metadata = 1; + * + * @return The operationMetadata. + */ + com.google.cloud.visionai.v1.OperationMetadata getOperationMetadata(); + /** + * + * + *
+   * Common metadata of the long-running operation.
+   * 
+ * + * .google.cloud.visionai.v1.OperationMetadata operation_metadata = 1; + */ + com.google.cloud.visionai.v1.OperationMetadataOrBuilder getOperationMetadataOrBuilder(); +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DeleteIndexEndpointRequest.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DeleteIndexEndpointRequest.java new file mode 100644 index 000000000000..5c516005f2a5 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DeleteIndexEndpointRequest.java @@ -0,0 +1,640 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/warehouse.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * Request message for DeleteIndexEndpoint.
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.DeleteIndexEndpointRequest} + */ +public final class DeleteIndexEndpointRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.DeleteIndexEndpointRequest) + DeleteIndexEndpointRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use DeleteIndexEndpointRequest.newBuilder() to construct. + private DeleteIndexEndpointRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DeleteIndexEndpointRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DeleteIndexEndpointRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_DeleteIndexEndpointRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_DeleteIndexEndpointRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.DeleteIndexEndpointRequest.class, + com.google.cloud.visionai.v1.DeleteIndexEndpointRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Required. Name of the resource.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + 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(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Name of the resource.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += getUnknownFields().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.visionai.v1.DeleteIndexEndpointRequest)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.DeleteIndexEndpointRequest other = + (com.google.cloud.visionai.v1.DeleteIndexEndpointRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.DeleteIndexEndpointRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.DeleteIndexEndpointRequest 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.visionai.v1.DeleteIndexEndpointRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.DeleteIndexEndpointRequest 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.visionai.v1.DeleteIndexEndpointRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.DeleteIndexEndpointRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.DeleteIndexEndpointRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.DeleteIndexEndpointRequest 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.visionai.v1.DeleteIndexEndpointRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.DeleteIndexEndpointRequest 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.visionai.v1.DeleteIndexEndpointRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.DeleteIndexEndpointRequest 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.visionai.v1.DeleteIndexEndpointRequest 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; + } + /** + * + * + *
+   * Request message for DeleteIndexEndpoint.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.DeleteIndexEndpointRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.DeleteIndexEndpointRequest) + com.google.cloud.visionai.v1.DeleteIndexEndpointRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_DeleteIndexEndpointRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_DeleteIndexEndpointRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.DeleteIndexEndpointRequest.class, + com.google.cloud.visionai.v1.DeleteIndexEndpointRequest.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.DeleteIndexEndpointRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_DeleteIndexEndpointRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.DeleteIndexEndpointRequest getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.DeleteIndexEndpointRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.DeleteIndexEndpointRequest build() { + com.google.cloud.visionai.v1.DeleteIndexEndpointRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.DeleteIndexEndpointRequest buildPartial() { + com.google.cloud.visionai.v1.DeleteIndexEndpointRequest result = + new com.google.cloud.visionai.v1.DeleteIndexEndpointRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.visionai.v1.DeleteIndexEndpointRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.DeleteIndexEndpointRequest) { + return mergeFrom((com.google.cloud.visionai.v1.DeleteIndexEndpointRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.DeleteIndexEndpointRequest other) { + if (other == com.google.cloud.visionai.v1.DeleteIndexEndpointRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. Name of the resource.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Name of the resource.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Name of the resource.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Name of the resource.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Name of the resource.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.DeleteIndexEndpointRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.DeleteIndexEndpointRequest) + private static final com.google.cloud.visionai.v1.DeleteIndexEndpointRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.DeleteIndexEndpointRequest(); + } + + public static com.google.cloud.visionai.v1.DeleteIndexEndpointRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteIndexEndpointRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.DeleteIndexEndpointRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DeleteIndexEndpointRequestOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DeleteIndexEndpointRequestOrBuilder.java new file mode 100644 index 000000000000..66c2a93dc5b8 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DeleteIndexEndpointRequestOrBuilder.java @@ -0,0 +1,55 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/warehouse.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface DeleteIndexEndpointRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.DeleteIndexEndpointRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Name of the resource.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. Name of the resource.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DeleteIndexMetadata.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DeleteIndexMetadata.java new file mode 100644 index 000000000000..ce0f2f9d16ff --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DeleteIndexMetadata.java @@ -0,0 +1,432 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/warehouse.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * Metadata message for DeleteIndexRequest
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.DeleteIndexMetadata} + */ +public final class DeleteIndexMetadata extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.DeleteIndexMetadata) + DeleteIndexMetadataOrBuilder { + private static final long serialVersionUID = 0L; + // Use DeleteIndexMetadata.newBuilder() to construct. + private DeleteIndexMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DeleteIndexMetadata() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DeleteIndexMetadata(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_DeleteIndexMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_DeleteIndexMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.DeleteIndexMetadata.class, + com.google.cloud.visionai.v1.DeleteIndexMetadata.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 { + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += getUnknownFields().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.visionai.v1.DeleteIndexMetadata)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.DeleteIndexMetadata other = + (com.google.cloud.visionai.v1.DeleteIndexMetadata) obj; + + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.DeleteIndexMetadata parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.DeleteIndexMetadata 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.visionai.v1.DeleteIndexMetadata parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.DeleteIndexMetadata 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.visionai.v1.DeleteIndexMetadata parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.DeleteIndexMetadata parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.DeleteIndexMetadata parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.DeleteIndexMetadata 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.visionai.v1.DeleteIndexMetadata parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.DeleteIndexMetadata 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.visionai.v1.DeleteIndexMetadata parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.DeleteIndexMetadata 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.visionai.v1.DeleteIndexMetadata 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; + } + /** + * + * + *
+   * Metadata message for DeleteIndexRequest
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.DeleteIndexMetadata} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.DeleteIndexMetadata) + com.google.cloud.visionai.v1.DeleteIndexMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_DeleteIndexMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_DeleteIndexMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.DeleteIndexMetadata.class, + com.google.cloud.visionai.v1.DeleteIndexMetadata.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.DeleteIndexMetadata.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_DeleteIndexMetadata_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.DeleteIndexMetadata getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.DeleteIndexMetadata.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.DeleteIndexMetadata build() { + com.google.cloud.visionai.v1.DeleteIndexMetadata result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.DeleteIndexMetadata buildPartial() { + com.google.cloud.visionai.v1.DeleteIndexMetadata result = + new com.google.cloud.visionai.v1.DeleteIndexMetadata(this); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.DeleteIndexMetadata) { + return mergeFrom((com.google.cloud.visionai.v1.DeleteIndexMetadata) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.DeleteIndexMetadata other) { + if (other == com.google.cloud.visionai.v1.DeleteIndexMetadata.getDefaultInstance()) + return this; + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.DeleteIndexMetadata) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.DeleteIndexMetadata) + private static final com.google.cloud.visionai.v1.DeleteIndexMetadata DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.DeleteIndexMetadata(); + } + + public static com.google.cloud.visionai.v1.DeleteIndexMetadata getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteIndexMetadata parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.DeleteIndexMetadata getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DeleteIndexMetadataOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DeleteIndexMetadataOrBuilder.java new file mode 100644 index 000000000000..87e4f55ffeb9 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DeleteIndexMetadataOrBuilder.java @@ -0,0 +1,25 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/warehouse.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface DeleteIndexMetadataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.DeleteIndexMetadata) + com.google.protobuf.MessageOrBuilder {} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DeleteIndexRequest.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DeleteIndexRequest.java new file mode 100644 index 000000000000..d201f39a7d0b --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DeleteIndexRequest.java @@ -0,0 +1,653 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/warehouse.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * Request message for DeleteIndex.
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.DeleteIndexRequest} + */ +public final class DeleteIndexRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.DeleteIndexRequest) + DeleteIndexRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use DeleteIndexRequest.newBuilder() to construct. + private DeleteIndexRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DeleteIndexRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DeleteIndexRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_DeleteIndexRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_DeleteIndexRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.DeleteIndexRequest.class, + com.google.cloud.visionai.v1.DeleteIndexRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Required. The name of the index to delete.
+   * Format:
+   * `projects/{project_number}/locations/{location}/corpora/{corpus}/indexes/{index}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + 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(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The name of the index to delete.
+   * Format:
+   * `projects/{project_number}/locations/{location}/corpora/{corpus}/indexes/{index}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += getUnknownFields().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.visionai.v1.DeleteIndexRequest)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.DeleteIndexRequest other = + (com.google.cloud.visionai.v1.DeleteIndexRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.DeleteIndexRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.DeleteIndexRequest 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.visionai.v1.DeleteIndexRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.DeleteIndexRequest 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.visionai.v1.DeleteIndexRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.DeleteIndexRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.DeleteIndexRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.DeleteIndexRequest 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.visionai.v1.DeleteIndexRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.DeleteIndexRequest 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.visionai.v1.DeleteIndexRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.DeleteIndexRequest 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.visionai.v1.DeleteIndexRequest 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; + } + /** + * + * + *
+   * Request message for DeleteIndex.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.DeleteIndexRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.DeleteIndexRequest) + com.google.cloud.visionai.v1.DeleteIndexRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_DeleteIndexRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_DeleteIndexRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.DeleteIndexRequest.class, + com.google.cloud.visionai.v1.DeleteIndexRequest.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.DeleteIndexRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_DeleteIndexRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.DeleteIndexRequest getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.DeleteIndexRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.DeleteIndexRequest build() { + com.google.cloud.visionai.v1.DeleteIndexRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.DeleteIndexRequest buildPartial() { + com.google.cloud.visionai.v1.DeleteIndexRequest result = + new com.google.cloud.visionai.v1.DeleteIndexRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.visionai.v1.DeleteIndexRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.DeleteIndexRequest) { + return mergeFrom((com.google.cloud.visionai.v1.DeleteIndexRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.DeleteIndexRequest other) { + if (other == com.google.cloud.visionai.v1.DeleteIndexRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. The name of the index to delete.
+     * Format:
+     * `projects/{project_number}/locations/{location}/corpora/{corpus}/indexes/{index}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The name of the index to delete.
+     * Format:
+     * `projects/{project_number}/locations/{location}/corpora/{corpus}/indexes/{index}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The name of the index to delete.
+     * Format:
+     * `projects/{project_number}/locations/{location}/corpora/{corpus}/indexes/{index}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the index to delete.
+     * Format:
+     * `projects/{project_number}/locations/{location}/corpora/{corpus}/indexes/{index}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the index to delete.
+     * Format:
+     * `projects/{project_number}/locations/{location}/corpora/{corpus}/indexes/{index}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.DeleteIndexRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.DeleteIndexRequest) + private static final com.google.cloud.visionai.v1.DeleteIndexRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.DeleteIndexRequest(); + } + + public static com.google.cloud.visionai.v1.DeleteIndexRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteIndexRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.DeleteIndexRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DeleteIndexRequestOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DeleteIndexRequestOrBuilder.java new file mode 100644 index 000000000000..13f0cdc192b0 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DeleteIndexRequestOrBuilder.java @@ -0,0 +1,59 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/warehouse.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface DeleteIndexRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.DeleteIndexRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the index to delete.
+   * Format:
+   * `projects/{project_number}/locations/{location}/corpora/{corpus}/indexes/{index}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The name of the index to delete.
+   * Format:
+   * `projects/{project_number}/locations/{location}/corpora/{corpus}/indexes/{index}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DeleteOperatorRequest.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DeleteOperatorRequest.java new file mode 100644 index 000000000000..46b72886701c --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DeleteOperatorRequest.java @@ -0,0 +1,905 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/lva_service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * Message for deleting a Operator
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.DeleteOperatorRequest} + */ +public final class DeleteOperatorRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.DeleteOperatorRequest) + DeleteOperatorRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use DeleteOperatorRequest.newBuilder() to construct. + private DeleteOperatorRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DeleteOperatorRequest() { + name_ = ""; + requestId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DeleteOperatorRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.LvaServiceProto + .internal_static_google_cloud_visionai_v1_DeleteOperatorRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.LvaServiceProto + .internal_static_google_cloud_visionai_v1_DeleteOperatorRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.DeleteOperatorRequest.class, + com.google.cloud.visionai.v1.DeleteOperatorRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Required. Name of the resource
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + 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(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Name of the resource
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int REQUEST_ID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object requestId_ = ""; + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes after the first request.
+   *
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request ID,
+   * the server can check if original operation with the same request ID was
+   * received, and if so, will ignore the second request. This prevents clients
+   * from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + @java.lang.Override + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + 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(); + requestId_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes after the first request.
+   *
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request ID,
+   * the server can check if original operation with the same request ID was
+   * received, and if so, will ignore the second request. This prevents clients
+   * from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, requestId_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, requestId_); + } + size += getUnknownFields().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.visionai.v1.DeleteOperatorRequest)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.DeleteOperatorRequest other = + (com.google.cloud.visionai.v1.DeleteOperatorRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getRequestId().equals(other.getRequestId())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; + hash = (53 * hash) + getRequestId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.DeleteOperatorRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.DeleteOperatorRequest 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.visionai.v1.DeleteOperatorRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.DeleteOperatorRequest 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.visionai.v1.DeleteOperatorRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.DeleteOperatorRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.DeleteOperatorRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.DeleteOperatorRequest 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.visionai.v1.DeleteOperatorRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.DeleteOperatorRequest 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.visionai.v1.DeleteOperatorRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.DeleteOperatorRequest 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.visionai.v1.DeleteOperatorRequest 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; + } + /** + * + * + *
+   * Message for deleting a Operator
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.DeleteOperatorRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.DeleteOperatorRequest) + com.google.cloud.visionai.v1.DeleteOperatorRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.LvaServiceProto + .internal_static_google_cloud_visionai_v1_DeleteOperatorRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.LvaServiceProto + .internal_static_google_cloud_visionai_v1_DeleteOperatorRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.DeleteOperatorRequest.class, + com.google.cloud.visionai.v1.DeleteOperatorRequest.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.DeleteOperatorRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + requestId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.LvaServiceProto + .internal_static_google_cloud_visionai_v1_DeleteOperatorRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.DeleteOperatorRequest getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.DeleteOperatorRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.DeleteOperatorRequest build() { + com.google.cloud.visionai.v1.DeleteOperatorRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.DeleteOperatorRequest buildPartial() { + com.google.cloud.visionai.v1.DeleteOperatorRequest result = + new com.google.cloud.visionai.v1.DeleteOperatorRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.visionai.v1.DeleteOperatorRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.requestId_ = requestId_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.DeleteOperatorRequest) { + return mergeFrom((com.google.cloud.visionai.v1.DeleteOperatorRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.DeleteOperatorRequest other) { + if (other == com.google.cloud.visionai.v1.DeleteOperatorRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getRequestId().isEmpty()) { + requestId_ = other.requestId_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. Name of the resource
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Name of the resource
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Name of the resource
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Name of the resource
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Name of the resource
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object requestId_ = ""; + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes after the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request ID,
+     * the server can check if original operation with the same request ID was
+     * received, and if so, will ignore the second request. This prevents clients
+     * from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes after the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request ID,
+     * the server can check if original operation with the same request ID was
+     * received, and if so, will ignore the second request. This prevents clients
+     * from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes after the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request ID,
+     * the server can check if original operation with the same request ID was
+     * received, and if so, will ignore the second request. This prevents clients
+     * from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + requestId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes after the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request ID,
+     * the server can check if original operation with the same request ID was
+     * received, and if so, will ignore the second request. This prevents clients
+     * from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearRequestId() { + requestId_ = getDefaultInstance().getRequestId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes after the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request ID,
+     * the server can check if original operation with the same request ID was
+     * received, and if so, will ignore the second request. This prevents clients
+     * from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + requestId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.DeleteOperatorRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.DeleteOperatorRequest) + private static final com.google.cloud.visionai.v1.DeleteOperatorRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.DeleteOperatorRequest(); + } + + public static com.google.cloud.visionai.v1.DeleteOperatorRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteOperatorRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.DeleteOperatorRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DeleteOperatorRequestOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DeleteOperatorRequestOrBuilder.java new file mode 100644 index 000000000000..dc916b53d93e --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DeleteOperatorRequestOrBuilder.java @@ -0,0 +1,104 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/lva_service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface DeleteOperatorRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.DeleteOperatorRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Name of the resource
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. Name of the resource
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes after the first request.
+   *
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request ID,
+   * the server can check if original operation with the same request ID was
+   * received, and if so, will ignore the second request. This prevents clients
+   * from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + java.lang.String getRequestId(); + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes after the first request.
+   *
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request ID,
+   * the server can check if original operation with the same request ID was
+   * received, and if so, will ignore the second request. This prevents clients
+   * from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + com.google.protobuf.ByteString getRequestIdBytes(); +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DeleteProcessRequest.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DeleteProcessRequest.java new file mode 100644 index 000000000000..7c493cd4b210 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DeleteProcessRequest.java @@ -0,0 +1,905 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/lva_service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * Message for deleting a Process.
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.DeleteProcessRequest} + */ +public final class DeleteProcessRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.DeleteProcessRequest) + DeleteProcessRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use DeleteProcessRequest.newBuilder() to construct. + private DeleteProcessRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DeleteProcessRequest() { + name_ = ""; + requestId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DeleteProcessRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.LvaServiceProto + .internal_static_google_cloud_visionai_v1_DeleteProcessRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.LvaServiceProto + .internal_static_google_cloud_visionai_v1_DeleteProcessRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.DeleteProcessRequest.class, + com.google.cloud.visionai.v1.DeleteProcessRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Required. Name of the resource.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + 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(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Name of the resource.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int REQUEST_ID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object requestId_ = ""; + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes after the first request.
+   *
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request ID,
+   * the server can check if original operation with the same request ID was
+   * received, and if so, will ignore the second request. This prevents clients
+   * from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + @java.lang.Override + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + 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(); + requestId_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes after the first request.
+   *
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request ID,
+   * the server can check if original operation with the same request ID was
+   * received, and if so, will ignore the second request. This prevents clients
+   * from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, requestId_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, requestId_); + } + size += getUnknownFields().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.visionai.v1.DeleteProcessRequest)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.DeleteProcessRequest other = + (com.google.cloud.visionai.v1.DeleteProcessRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getRequestId().equals(other.getRequestId())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; + hash = (53 * hash) + getRequestId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.DeleteProcessRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.DeleteProcessRequest 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.visionai.v1.DeleteProcessRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.DeleteProcessRequest 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.visionai.v1.DeleteProcessRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.DeleteProcessRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.DeleteProcessRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.DeleteProcessRequest 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.visionai.v1.DeleteProcessRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.DeleteProcessRequest 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.visionai.v1.DeleteProcessRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.DeleteProcessRequest 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.visionai.v1.DeleteProcessRequest 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; + } + /** + * + * + *
+   * Message for deleting a Process.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.DeleteProcessRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.DeleteProcessRequest) + com.google.cloud.visionai.v1.DeleteProcessRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.LvaServiceProto + .internal_static_google_cloud_visionai_v1_DeleteProcessRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.LvaServiceProto + .internal_static_google_cloud_visionai_v1_DeleteProcessRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.DeleteProcessRequest.class, + com.google.cloud.visionai.v1.DeleteProcessRequest.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.DeleteProcessRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + requestId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.LvaServiceProto + .internal_static_google_cloud_visionai_v1_DeleteProcessRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.DeleteProcessRequest getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.DeleteProcessRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.DeleteProcessRequest build() { + com.google.cloud.visionai.v1.DeleteProcessRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.DeleteProcessRequest buildPartial() { + com.google.cloud.visionai.v1.DeleteProcessRequest result = + new com.google.cloud.visionai.v1.DeleteProcessRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.visionai.v1.DeleteProcessRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.requestId_ = requestId_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.DeleteProcessRequest) { + return mergeFrom((com.google.cloud.visionai.v1.DeleteProcessRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.DeleteProcessRequest other) { + if (other == com.google.cloud.visionai.v1.DeleteProcessRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getRequestId().isEmpty()) { + requestId_ = other.requestId_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. Name of the resource.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Name of the resource.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Name of the resource.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Name of the resource.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Name of the resource.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object requestId_ = ""; + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes after the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request ID,
+     * the server can check if original operation with the same request ID was
+     * received, and if so, will ignore the second request. This prevents clients
+     * from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes after the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request ID,
+     * the server can check if original operation with the same request ID was
+     * received, and if so, will ignore the second request. This prevents clients
+     * from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes after the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request ID,
+     * the server can check if original operation with the same request ID was
+     * received, and if so, will ignore the second request. This prevents clients
+     * from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + requestId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes after the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request ID,
+     * the server can check if original operation with the same request ID was
+     * received, and if so, will ignore the second request. This prevents clients
+     * from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearRequestId() { + requestId_ = getDefaultInstance().getRequestId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes after the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request ID,
+     * the server can check if original operation with the same request ID was
+     * received, and if so, will ignore the second request. This prevents clients
+     * from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + requestId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.DeleteProcessRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.DeleteProcessRequest) + private static final com.google.cloud.visionai.v1.DeleteProcessRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.DeleteProcessRequest(); + } + + public static com.google.cloud.visionai.v1.DeleteProcessRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteProcessRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.DeleteProcessRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DeleteProcessRequestOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DeleteProcessRequestOrBuilder.java new file mode 100644 index 000000000000..b0cbcb1d3ff5 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DeleteProcessRequestOrBuilder.java @@ -0,0 +1,104 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/lva_service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface DeleteProcessRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.DeleteProcessRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Name of the resource.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. Name of the resource.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes after the first request.
+   *
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request ID,
+   * the server can check if original operation with the same request ID was
+   * received, and if so, will ignore the second request. This prevents clients
+   * from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + java.lang.String getRequestId(); + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes after the first request.
+   *
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request ID,
+   * the server can check if original operation with the same request ID was
+   * received, and if so, will ignore the second request. This prevents clients
+   * from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + com.google.protobuf.ByteString getRequestIdBytes(); +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DeleteProcessorRequest.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DeleteProcessorRequest.java new file mode 100644 index 000000000000..f68cf2f505f7 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DeleteProcessorRequest.java @@ -0,0 +1,905 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/platform.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * Message for deleting a Processor.
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.DeleteProcessorRequest} + */ +public final class DeleteProcessorRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.DeleteProcessorRequest) + DeleteProcessorRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use DeleteProcessorRequest.newBuilder() to construct. + private DeleteProcessorRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DeleteProcessorRequest() { + name_ = ""; + requestId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DeleteProcessorRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_DeleteProcessorRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_DeleteProcessorRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.DeleteProcessorRequest.class, + com.google.cloud.visionai.v1.DeleteProcessorRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Required. Name of the resource
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + 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(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Name of the resource
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int REQUEST_ID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object requestId_ = ""; + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes after the first request.
+   *
+   * For example, consider a situation where you make an initial request and
+   * the request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + @java.lang.Override + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + 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(); + requestId_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes after the first request.
+   *
+   * For example, consider a situation where you make an initial request and
+   * the request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, requestId_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, requestId_); + } + size += getUnknownFields().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.visionai.v1.DeleteProcessorRequest)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.DeleteProcessorRequest other = + (com.google.cloud.visionai.v1.DeleteProcessorRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getRequestId().equals(other.getRequestId())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; + hash = (53 * hash) + getRequestId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.DeleteProcessorRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.DeleteProcessorRequest 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.visionai.v1.DeleteProcessorRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.DeleteProcessorRequest 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.visionai.v1.DeleteProcessorRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.DeleteProcessorRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.DeleteProcessorRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.DeleteProcessorRequest 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.visionai.v1.DeleteProcessorRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.DeleteProcessorRequest 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.visionai.v1.DeleteProcessorRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.DeleteProcessorRequest 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.visionai.v1.DeleteProcessorRequest 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; + } + /** + * + * + *
+   * Message for deleting a Processor.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.DeleteProcessorRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.DeleteProcessorRequest) + com.google.cloud.visionai.v1.DeleteProcessorRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_DeleteProcessorRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_DeleteProcessorRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.DeleteProcessorRequest.class, + com.google.cloud.visionai.v1.DeleteProcessorRequest.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.DeleteProcessorRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + requestId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_DeleteProcessorRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.DeleteProcessorRequest getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.DeleteProcessorRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.DeleteProcessorRequest build() { + com.google.cloud.visionai.v1.DeleteProcessorRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.DeleteProcessorRequest buildPartial() { + com.google.cloud.visionai.v1.DeleteProcessorRequest result = + new com.google.cloud.visionai.v1.DeleteProcessorRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.visionai.v1.DeleteProcessorRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.requestId_ = requestId_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.DeleteProcessorRequest) { + return mergeFrom((com.google.cloud.visionai.v1.DeleteProcessorRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.DeleteProcessorRequest other) { + if (other == com.google.cloud.visionai.v1.DeleteProcessorRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getRequestId().isEmpty()) { + requestId_ = other.requestId_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. Name of the resource
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Name of the resource
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Name of the resource
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Name of the resource
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Name of the resource
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object requestId_ = ""; + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes after the first request.
+     *
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes after the first request.
+     *
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes after the first request.
+     *
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + requestId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes after the first request.
+     *
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearRequestId() { + requestId_ = getDefaultInstance().getRequestId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes after the first request.
+     *
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + requestId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.DeleteProcessorRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.DeleteProcessorRequest) + private static final com.google.cloud.visionai.v1.DeleteProcessorRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.DeleteProcessorRequest(); + } + + public static com.google.cloud.visionai.v1.DeleteProcessorRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteProcessorRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.DeleteProcessorRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DeleteProcessorRequestOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DeleteProcessorRequestOrBuilder.java new file mode 100644 index 000000000000..cb7b9f890cc8 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DeleteProcessorRequestOrBuilder.java @@ -0,0 +1,104 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/platform.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface DeleteProcessorRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.DeleteProcessorRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Name of the resource
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. Name of the resource
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes after the first request.
+   *
+   * For example, consider a situation where you make an initial request and
+   * the request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + java.lang.String getRequestId(); + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes after the first request.
+   *
+   * For example, consider a situation where you make an initial request and
+   * the request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + com.google.protobuf.ByteString getRequestIdBytes(); +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DeleteSearchConfigRequest.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DeleteSearchConfigRequest.java new file mode 100644 index 000000000000..cb6a0acb2772 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DeleteSearchConfigRequest.java @@ -0,0 +1,654 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/warehouse.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * Request message for DeleteSearchConfig.
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.DeleteSearchConfigRequest} + */ +public final class DeleteSearchConfigRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.DeleteSearchConfigRequest) + DeleteSearchConfigRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use DeleteSearchConfigRequest.newBuilder() to construct. + private DeleteSearchConfigRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DeleteSearchConfigRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DeleteSearchConfigRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_DeleteSearchConfigRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_DeleteSearchConfigRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.DeleteSearchConfigRequest.class, + com.google.cloud.visionai.v1.DeleteSearchConfigRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Required. The name of the search configuration to delete.
+   * Format:
+   * `projects/{project_number}/locations/{location}/corpora/{corpus}/searchConfigs/{search_config}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + 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(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The name of the search configuration to delete.
+   * Format:
+   * `projects/{project_number}/locations/{location}/corpora/{corpus}/searchConfigs/{search_config}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += getUnknownFields().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.visionai.v1.DeleteSearchConfigRequest)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.DeleteSearchConfigRequest other = + (com.google.cloud.visionai.v1.DeleteSearchConfigRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.DeleteSearchConfigRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.DeleteSearchConfigRequest 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.visionai.v1.DeleteSearchConfigRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.DeleteSearchConfigRequest 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.visionai.v1.DeleteSearchConfigRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.DeleteSearchConfigRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.DeleteSearchConfigRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.DeleteSearchConfigRequest 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.visionai.v1.DeleteSearchConfigRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.DeleteSearchConfigRequest 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.visionai.v1.DeleteSearchConfigRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.DeleteSearchConfigRequest 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.visionai.v1.DeleteSearchConfigRequest 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; + } + /** + * + * + *
+   * Request message for DeleteSearchConfig.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.DeleteSearchConfigRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.DeleteSearchConfigRequest) + com.google.cloud.visionai.v1.DeleteSearchConfigRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_DeleteSearchConfigRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_DeleteSearchConfigRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.DeleteSearchConfigRequest.class, + com.google.cloud.visionai.v1.DeleteSearchConfigRequest.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.DeleteSearchConfigRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_DeleteSearchConfigRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.DeleteSearchConfigRequest getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.DeleteSearchConfigRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.DeleteSearchConfigRequest build() { + com.google.cloud.visionai.v1.DeleteSearchConfigRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.DeleteSearchConfigRequest buildPartial() { + com.google.cloud.visionai.v1.DeleteSearchConfigRequest result = + new com.google.cloud.visionai.v1.DeleteSearchConfigRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.visionai.v1.DeleteSearchConfigRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.DeleteSearchConfigRequest) { + return mergeFrom((com.google.cloud.visionai.v1.DeleteSearchConfigRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.DeleteSearchConfigRequest other) { + if (other == com.google.cloud.visionai.v1.DeleteSearchConfigRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. The name of the search configuration to delete.
+     * Format:
+     * `projects/{project_number}/locations/{location}/corpora/{corpus}/searchConfigs/{search_config}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The name of the search configuration to delete.
+     * Format:
+     * `projects/{project_number}/locations/{location}/corpora/{corpus}/searchConfigs/{search_config}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The name of the search configuration to delete.
+     * Format:
+     * `projects/{project_number}/locations/{location}/corpora/{corpus}/searchConfigs/{search_config}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the search configuration to delete.
+     * Format:
+     * `projects/{project_number}/locations/{location}/corpora/{corpus}/searchConfigs/{search_config}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the search configuration to delete.
+     * Format:
+     * `projects/{project_number}/locations/{location}/corpora/{corpus}/searchConfigs/{search_config}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.DeleteSearchConfigRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.DeleteSearchConfigRequest) + private static final com.google.cloud.visionai.v1.DeleteSearchConfigRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.DeleteSearchConfigRequest(); + } + + public static com.google.cloud.visionai.v1.DeleteSearchConfigRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteSearchConfigRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.DeleteSearchConfigRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DeleteSearchConfigRequestOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DeleteSearchConfigRequestOrBuilder.java new file mode 100644 index 000000000000..b0e9a7e3a2a5 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DeleteSearchConfigRequestOrBuilder.java @@ -0,0 +1,59 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/warehouse.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface DeleteSearchConfigRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.DeleteSearchConfigRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the search configuration to delete.
+   * Format:
+   * `projects/{project_number}/locations/{location}/corpora/{corpus}/searchConfigs/{search_config}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The name of the search configuration to delete.
+   * Format:
+   * `projects/{project_number}/locations/{location}/corpora/{corpus}/searchConfigs/{search_config}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DeleteSearchHypernymRequest.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DeleteSearchHypernymRequest.java new file mode 100644 index 000000000000..e6c09fa3639b --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DeleteSearchHypernymRequest.java @@ -0,0 +1,654 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/warehouse.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * Request message for deleting SearchHypernym.
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.DeleteSearchHypernymRequest} + */ +public final class DeleteSearchHypernymRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.DeleteSearchHypernymRequest) + DeleteSearchHypernymRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use DeleteSearchHypernymRequest.newBuilder() to construct. + private DeleteSearchHypernymRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DeleteSearchHypernymRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DeleteSearchHypernymRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_DeleteSearchHypernymRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_DeleteSearchHypernymRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.DeleteSearchHypernymRequest.class, + com.google.cloud.visionai.v1.DeleteSearchHypernymRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Required. The name of the SearchHypernym to delete.
+   * Format:
+   * `projects/{project_number}/locations/{location}/corpora/{corpus}/searchHypernyms/{search_hypernym}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + 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(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The name of the SearchHypernym to delete.
+   * Format:
+   * `projects/{project_number}/locations/{location}/corpora/{corpus}/searchHypernyms/{search_hypernym}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += getUnknownFields().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.visionai.v1.DeleteSearchHypernymRequest)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.DeleteSearchHypernymRequest other = + (com.google.cloud.visionai.v1.DeleteSearchHypernymRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.DeleteSearchHypernymRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.DeleteSearchHypernymRequest 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.visionai.v1.DeleteSearchHypernymRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.DeleteSearchHypernymRequest 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.visionai.v1.DeleteSearchHypernymRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.DeleteSearchHypernymRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.DeleteSearchHypernymRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.DeleteSearchHypernymRequest 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.visionai.v1.DeleteSearchHypernymRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.DeleteSearchHypernymRequest 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.visionai.v1.DeleteSearchHypernymRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.DeleteSearchHypernymRequest 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.visionai.v1.DeleteSearchHypernymRequest 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; + } + /** + * + * + *
+   * Request message for deleting SearchHypernym.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.DeleteSearchHypernymRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.DeleteSearchHypernymRequest) + com.google.cloud.visionai.v1.DeleteSearchHypernymRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_DeleteSearchHypernymRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_DeleteSearchHypernymRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.DeleteSearchHypernymRequest.class, + com.google.cloud.visionai.v1.DeleteSearchHypernymRequest.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.DeleteSearchHypernymRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_DeleteSearchHypernymRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.DeleteSearchHypernymRequest getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.DeleteSearchHypernymRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.DeleteSearchHypernymRequest build() { + com.google.cloud.visionai.v1.DeleteSearchHypernymRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.DeleteSearchHypernymRequest buildPartial() { + com.google.cloud.visionai.v1.DeleteSearchHypernymRequest result = + new com.google.cloud.visionai.v1.DeleteSearchHypernymRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.visionai.v1.DeleteSearchHypernymRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.DeleteSearchHypernymRequest) { + return mergeFrom((com.google.cloud.visionai.v1.DeleteSearchHypernymRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.DeleteSearchHypernymRequest other) { + if (other == com.google.cloud.visionai.v1.DeleteSearchHypernymRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. The name of the SearchHypernym to delete.
+     * Format:
+     * `projects/{project_number}/locations/{location}/corpora/{corpus}/searchHypernyms/{search_hypernym}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The name of the SearchHypernym to delete.
+     * Format:
+     * `projects/{project_number}/locations/{location}/corpora/{corpus}/searchHypernyms/{search_hypernym}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The name of the SearchHypernym to delete.
+     * Format:
+     * `projects/{project_number}/locations/{location}/corpora/{corpus}/searchHypernyms/{search_hypernym}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the SearchHypernym to delete.
+     * Format:
+     * `projects/{project_number}/locations/{location}/corpora/{corpus}/searchHypernyms/{search_hypernym}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the SearchHypernym to delete.
+     * Format:
+     * `projects/{project_number}/locations/{location}/corpora/{corpus}/searchHypernyms/{search_hypernym}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.DeleteSearchHypernymRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.DeleteSearchHypernymRequest) + private static final com.google.cloud.visionai.v1.DeleteSearchHypernymRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.DeleteSearchHypernymRequest(); + } + + public static com.google.cloud.visionai.v1.DeleteSearchHypernymRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteSearchHypernymRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.DeleteSearchHypernymRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DeleteSearchHypernymRequestOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DeleteSearchHypernymRequestOrBuilder.java new file mode 100644 index 000000000000..59350bbb6657 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DeleteSearchHypernymRequestOrBuilder.java @@ -0,0 +1,59 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/warehouse.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface DeleteSearchHypernymRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.DeleteSearchHypernymRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the SearchHypernym to delete.
+   * Format:
+   * `projects/{project_number}/locations/{location}/corpora/{corpus}/searchHypernyms/{search_hypernym}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The name of the SearchHypernym to delete.
+   * Format:
+   * `projects/{project_number}/locations/{location}/corpora/{corpus}/searchHypernyms/{search_hypernym}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DeleteSeriesRequest.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DeleteSeriesRequest.java new file mode 100644 index 000000000000..983c2f7c9f68 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DeleteSeriesRequest.java @@ -0,0 +1,905 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/streams_service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * Message for deleting a Series.
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.DeleteSeriesRequest} + */ +public final class DeleteSeriesRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.DeleteSeriesRequest) + DeleteSeriesRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use DeleteSeriesRequest.newBuilder() to construct. + private DeleteSeriesRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DeleteSeriesRequest() { + name_ = ""; + requestId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DeleteSeriesRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.StreamsServiceProto + .internal_static_google_cloud_visionai_v1_DeleteSeriesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.StreamsServiceProto + .internal_static_google_cloud_visionai_v1_DeleteSeriesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.DeleteSeriesRequest.class, + com.google.cloud.visionai.v1.DeleteSeriesRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Required. Name of the resource.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + 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(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Name of the resource.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int REQUEST_ID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object requestId_ = ""; + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes after the first request.
+   *
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request ID,
+   * the server can check if original operation with the same request ID was
+   * received, and if so, will ignore the second request. This prevents clients
+   * from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + @java.lang.Override + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + 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(); + requestId_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes after the first request.
+   *
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request ID,
+   * the server can check if original operation with the same request ID was
+   * received, and if so, will ignore the second request. This prevents clients
+   * from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, requestId_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, requestId_); + } + size += getUnknownFields().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.visionai.v1.DeleteSeriesRequest)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.DeleteSeriesRequest other = + (com.google.cloud.visionai.v1.DeleteSeriesRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getRequestId().equals(other.getRequestId())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; + hash = (53 * hash) + getRequestId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.DeleteSeriesRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.DeleteSeriesRequest 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.visionai.v1.DeleteSeriesRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.DeleteSeriesRequest 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.visionai.v1.DeleteSeriesRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.DeleteSeriesRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.DeleteSeriesRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.DeleteSeriesRequest 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.visionai.v1.DeleteSeriesRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.DeleteSeriesRequest 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.visionai.v1.DeleteSeriesRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.DeleteSeriesRequest 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.visionai.v1.DeleteSeriesRequest 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; + } + /** + * + * + *
+   * Message for deleting a Series.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.DeleteSeriesRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.DeleteSeriesRequest) + com.google.cloud.visionai.v1.DeleteSeriesRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.StreamsServiceProto + .internal_static_google_cloud_visionai_v1_DeleteSeriesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.StreamsServiceProto + .internal_static_google_cloud_visionai_v1_DeleteSeriesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.DeleteSeriesRequest.class, + com.google.cloud.visionai.v1.DeleteSeriesRequest.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.DeleteSeriesRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + requestId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.StreamsServiceProto + .internal_static_google_cloud_visionai_v1_DeleteSeriesRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.DeleteSeriesRequest getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.DeleteSeriesRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.DeleteSeriesRequest build() { + com.google.cloud.visionai.v1.DeleteSeriesRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.DeleteSeriesRequest buildPartial() { + com.google.cloud.visionai.v1.DeleteSeriesRequest result = + new com.google.cloud.visionai.v1.DeleteSeriesRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.visionai.v1.DeleteSeriesRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.requestId_ = requestId_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.DeleteSeriesRequest) { + return mergeFrom((com.google.cloud.visionai.v1.DeleteSeriesRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.DeleteSeriesRequest other) { + if (other == com.google.cloud.visionai.v1.DeleteSeriesRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getRequestId().isEmpty()) { + requestId_ = other.requestId_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. Name of the resource.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Name of the resource.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Name of the resource.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Name of the resource.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Name of the resource.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object requestId_ = ""; + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes after the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request ID,
+     * the server can check if original operation with the same request ID was
+     * received, and if so, will ignore the second request. This prevents clients
+     * from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes after the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request ID,
+     * the server can check if original operation with the same request ID was
+     * received, and if so, will ignore the second request. This prevents clients
+     * from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes after the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request ID,
+     * the server can check if original operation with the same request ID was
+     * received, and if so, will ignore the second request. This prevents clients
+     * from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + requestId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes after the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request ID,
+     * the server can check if original operation with the same request ID was
+     * received, and if so, will ignore the second request. This prevents clients
+     * from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearRequestId() { + requestId_ = getDefaultInstance().getRequestId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes after the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request ID,
+     * the server can check if original operation with the same request ID was
+     * received, and if so, will ignore the second request. This prevents clients
+     * from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + requestId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.DeleteSeriesRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.DeleteSeriesRequest) + private static final com.google.cloud.visionai.v1.DeleteSeriesRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.DeleteSeriesRequest(); + } + + public static com.google.cloud.visionai.v1.DeleteSeriesRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteSeriesRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.DeleteSeriesRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DeleteSeriesRequestOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DeleteSeriesRequestOrBuilder.java new file mode 100644 index 000000000000..6651113ae3e2 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DeleteSeriesRequestOrBuilder.java @@ -0,0 +1,104 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/streams_service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface DeleteSeriesRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.DeleteSeriesRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Name of the resource.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. Name of the resource.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes after the first request.
+   *
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request ID,
+   * the server can check if original operation with the same request ID was
+   * received, and if so, will ignore the second request. This prevents clients
+   * from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + java.lang.String getRequestId(); + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes after the first request.
+   *
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request ID,
+   * the server can check if original operation with the same request ID was
+   * received, and if so, will ignore the second request. This prevents clients
+   * from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + com.google.protobuf.ByteString getRequestIdBytes(); +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DeleteStreamRequest.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DeleteStreamRequest.java new file mode 100644 index 000000000000..7bee695486e9 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DeleteStreamRequest.java @@ -0,0 +1,905 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/streams_service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * Message for deleting a Stream.
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.DeleteStreamRequest} + */ +public final class DeleteStreamRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.DeleteStreamRequest) + DeleteStreamRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use DeleteStreamRequest.newBuilder() to construct. + private DeleteStreamRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DeleteStreamRequest() { + name_ = ""; + requestId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DeleteStreamRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.StreamsServiceProto + .internal_static_google_cloud_visionai_v1_DeleteStreamRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.StreamsServiceProto + .internal_static_google_cloud_visionai_v1_DeleteStreamRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.DeleteStreamRequest.class, + com.google.cloud.visionai.v1.DeleteStreamRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Required. Name of the resource.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + 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(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Name of the resource.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int REQUEST_ID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object requestId_ = ""; + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes after the first request.
+   *
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request ID,
+   * the server can check if original operation with the same request ID was
+   * received, and if so, will ignore the second request. This prevents clients
+   * from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + @java.lang.Override + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + 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(); + requestId_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes after the first request.
+   *
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request ID,
+   * the server can check if original operation with the same request ID was
+   * received, and if so, will ignore the second request. This prevents clients
+   * from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, requestId_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, requestId_); + } + size += getUnknownFields().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.visionai.v1.DeleteStreamRequest)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.DeleteStreamRequest other = + (com.google.cloud.visionai.v1.DeleteStreamRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getRequestId().equals(other.getRequestId())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; + hash = (53 * hash) + getRequestId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.DeleteStreamRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.DeleteStreamRequest 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.visionai.v1.DeleteStreamRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.DeleteStreamRequest 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.visionai.v1.DeleteStreamRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.DeleteStreamRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.DeleteStreamRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.DeleteStreamRequest 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.visionai.v1.DeleteStreamRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.DeleteStreamRequest 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.visionai.v1.DeleteStreamRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.DeleteStreamRequest 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.visionai.v1.DeleteStreamRequest 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; + } + /** + * + * + *
+   * Message for deleting a Stream.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.DeleteStreamRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.DeleteStreamRequest) + com.google.cloud.visionai.v1.DeleteStreamRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.StreamsServiceProto + .internal_static_google_cloud_visionai_v1_DeleteStreamRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.StreamsServiceProto + .internal_static_google_cloud_visionai_v1_DeleteStreamRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.DeleteStreamRequest.class, + com.google.cloud.visionai.v1.DeleteStreamRequest.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.DeleteStreamRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + requestId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.StreamsServiceProto + .internal_static_google_cloud_visionai_v1_DeleteStreamRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.DeleteStreamRequest getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.DeleteStreamRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.DeleteStreamRequest build() { + com.google.cloud.visionai.v1.DeleteStreamRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.DeleteStreamRequest buildPartial() { + com.google.cloud.visionai.v1.DeleteStreamRequest result = + new com.google.cloud.visionai.v1.DeleteStreamRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.visionai.v1.DeleteStreamRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.requestId_ = requestId_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.DeleteStreamRequest) { + return mergeFrom((com.google.cloud.visionai.v1.DeleteStreamRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.DeleteStreamRequest other) { + if (other == com.google.cloud.visionai.v1.DeleteStreamRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getRequestId().isEmpty()) { + requestId_ = other.requestId_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. Name of the resource.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Name of the resource.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Name of the resource.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Name of the resource.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Name of the resource.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object requestId_ = ""; + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes after the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request ID,
+     * the server can check if original operation with the same request ID was
+     * received, and if so, will ignore the second request. This prevents clients
+     * from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes after the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request ID,
+     * the server can check if original operation with the same request ID was
+     * received, and if so, will ignore the second request. This prevents clients
+     * from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes after the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request ID,
+     * the server can check if original operation with the same request ID was
+     * received, and if so, will ignore the second request. This prevents clients
+     * from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + requestId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes after the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request ID,
+     * the server can check if original operation with the same request ID was
+     * received, and if so, will ignore the second request. This prevents clients
+     * from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearRequestId() { + requestId_ = getDefaultInstance().getRequestId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes after the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request ID,
+     * the server can check if original operation with the same request ID was
+     * received, and if so, will ignore the second request. This prevents clients
+     * from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + requestId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.DeleteStreamRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.DeleteStreamRequest) + private static final com.google.cloud.visionai.v1.DeleteStreamRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.DeleteStreamRequest(); + } + + public static com.google.cloud.visionai.v1.DeleteStreamRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteStreamRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.DeleteStreamRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DeleteStreamRequestOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DeleteStreamRequestOrBuilder.java new file mode 100644 index 000000000000..ed53c20f5b9a --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DeleteStreamRequestOrBuilder.java @@ -0,0 +1,104 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/streams_service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface DeleteStreamRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.DeleteStreamRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Name of the resource.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. Name of the resource.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes after the first request.
+   *
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request ID,
+   * the server can check if original operation with the same request ID was
+   * received, and if so, will ignore the second request. This prevents clients
+   * from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + java.lang.String getRequestId(); + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes after the first request.
+   *
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request ID,
+   * the server can check if original operation with the same request ID was
+   * received, and if so, will ignore the second request. This prevents clients
+   * from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + com.google.protobuf.ByteString getRequestIdBytes(); +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DeployApplicationRequest.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DeployApplicationRequest.java new file mode 100644 index 000000000000..ccce6f92cc0e --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DeployApplicationRequest.java @@ -0,0 +1,1114 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/platform.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * Message for deploying an Application.
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.DeployApplicationRequest} + */ +public final class DeployApplicationRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.DeployApplicationRequest) + DeployApplicationRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use DeployApplicationRequest.newBuilder() to construct. + private DeployApplicationRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DeployApplicationRequest() { + name_ = ""; + requestId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DeployApplicationRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_DeployApplicationRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_DeployApplicationRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.DeployApplicationRequest.class, + com.google.cloud.visionai.v1.DeployApplicationRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Required. the name of the application to retrieve.
+   * Format:
+   * "projects/{project}/locations/{location}/applications/{application}"
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + 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(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. the name of the application to retrieve.
+   * Format:
+   * "projects/{project}/locations/{location}/applications/{application}"
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VALIDATE_ONLY_FIELD_NUMBER = 2; + private boolean validateOnly_ = false; + /** + * + * + *
+   * If set, validate the request and preview the application graph, but do not
+   * actually deploy it.
+   * 
+ * + * bool validate_only = 2; + * + * @return The validateOnly. + */ + @java.lang.Override + public boolean getValidateOnly() { + return validateOnly_; + } + + public static final int REQUEST_ID_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object requestId_ = ""; + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and
+   * the request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + @java.lang.Override + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + 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(); + requestId_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and
+   * the request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ENABLE_MONITORING_FIELD_NUMBER = 4; + private boolean enableMonitoring_ = false; + /** + * + * + *
+   * Optional. Whether or not to enable monitoring for the application on
+   * deployment.
+   * 
+ * + * bool enable_monitoring = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The enableMonitoring. + */ + @java.lang.Override + public boolean getEnableMonitoring() { + return enableMonitoring_; + } + + 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (validateOnly_ != false) { + output.writeBool(2, validateOnly_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, requestId_); + } + if (enableMonitoring_ != false) { + output.writeBool(4, enableMonitoring_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (validateOnly_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(2, validateOnly_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, requestId_); + } + if (enableMonitoring_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(4, enableMonitoring_); + } + size += getUnknownFields().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.visionai.v1.DeployApplicationRequest)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.DeployApplicationRequest other = + (com.google.cloud.visionai.v1.DeployApplicationRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (getValidateOnly() != other.getValidateOnly()) return false; + if (!getRequestId().equals(other.getRequestId())) return false; + if (getEnableMonitoring() != other.getEnableMonitoring()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + VALIDATE_ONLY_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getValidateOnly()); + hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; + hash = (53 * hash) + getRequestId().hashCode(); + hash = (37 * hash) + ENABLE_MONITORING_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getEnableMonitoring()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.DeployApplicationRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.DeployApplicationRequest 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.visionai.v1.DeployApplicationRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.DeployApplicationRequest 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.visionai.v1.DeployApplicationRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.DeployApplicationRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.DeployApplicationRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.DeployApplicationRequest 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.visionai.v1.DeployApplicationRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.DeployApplicationRequest 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.visionai.v1.DeployApplicationRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.DeployApplicationRequest 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.visionai.v1.DeployApplicationRequest 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; + } + /** + * + * + *
+   * Message for deploying an Application.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.DeployApplicationRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.DeployApplicationRequest) + com.google.cloud.visionai.v1.DeployApplicationRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_DeployApplicationRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_DeployApplicationRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.DeployApplicationRequest.class, + com.google.cloud.visionai.v1.DeployApplicationRequest.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.DeployApplicationRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + validateOnly_ = false; + requestId_ = ""; + enableMonitoring_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_DeployApplicationRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.DeployApplicationRequest getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.DeployApplicationRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.DeployApplicationRequest build() { + com.google.cloud.visionai.v1.DeployApplicationRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.DeployApplicationRequest buildPartial() { + com.google.cloud.visionai.v1.DeployApplicationRequest result = + new com.google.cloud.visionai.v1.DeployApplicationRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.visionai.v1.DeployApplicationRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.validateOnly_ = validateOnly_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.requestId_ = requestId_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.enableMonitoring_ = enableMonitoring_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.DeployApplicationRequest) { + return mergeFrom((com.google.cloud.visionai.v1.DeployApplicationRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.DeployApplicationRequest other) { + if (other == com.google.cloud.visionai.v1.DeployApplicationRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getValidateOnly() != false) { + setValidateOnly(other.getValidateOnly()); + } + if (!other.getRequestId().isEmpty()) { + requestId_ = other.requestId_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (other.getEnableMonitoring() != false) { + setEnableMonitoring(other.getEnableMonitoring()); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + validateOnly_ = input.readBool(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 32: + { + enableMonitoring_ = input.readBool(); + bitField0_ |= 0x00000008; + break; + } // case 32 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. the name of the application to retrieve.
+     * Format:
+     * "projects/{project}/locations/{location}/applications/{application}"
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. the name of the application to retrieve.
+     * Format:
+     * "projects/{project}/locations/{location}/applications/{application}"
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. the name of the application to retrieve.
+     * Format:
+     * "projects/{project}/locations/{location}/applications/{application}"
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. the name of the application to retrieve.
+     * Format:
+     * "projects/{project}/locations/{location}/applications/{application}"
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. the name of the application to retrieve.
+     * Format:
+     * "projects/{project}/locations/{location}/applications/{application}"
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private boolean validateOnly_; + /** + * + * + *
+     * If set, validate the request and preview the application graph, but do not
+     * actually deploy it.
+     * 
+ * + * bool validate_only = 2; + * + * @return The validateOnly. + */ + @java.lang.Override + public boolean getValidateOnly() { + return validateOnly_; + } + /** + * + * + *
+     * If set, validate the request and preview the application graph, but do not
+     * actually deploy it.
+     * 
+ * + * bool validate_only = 2; + * + * @param value The validateOnly to set. + * @return This builder for chaining. + */ + public Builder setValidateOnly(boolean value) { + + validateOnly_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * If set, validate the request and preview the application graph, but do not
+     * actually deploy it.
+     * 
+ * + * bool validate_only = 2; + * + * @return This builder for chaining. + */ + public Builder clearValidateOnly() { + bitField0_ = (bitField0_ & ~0x00000002); + validateOnly_ = false; + onChanged(); + return this; + } + + private java.lang.Object requestId_ = ""; + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + requestId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearRequestId() { + requestId_ = getDefaultInstance().getRequestId(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + requestId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private boolean enableMonitoring_; + /** + * + * + *
+     * Optional. Whether or not to enable monitoring for the application on
+     * deployment.
+     * 
+ * + * bool enable_monitoring = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The enableMonitoring. + */ + @java.lang.Override + public boolean getEnableMonitoring() { + return enableMonitoring_; + } + /** + * + * + *
+     * Optional. Whether or not to enable monitoring for the application on
+     * deployment.
+     * 
+ * + * bool enable_monitoring = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The enableMonitoring to set. + * @return This builder for chaining. + */ + public Builder setEnableMonitoring(boolean value) { + + enableMonitoring_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Whether or not to enable monitoring for the application on
+     * deployment.
+     * 
+ * + * bool enable_monitoring = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearEnableMonitoring() { + bitField0_ = (bitField0_ & ~0x00000008); + enableMonitoring_ = false; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.DeployApplicationRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.DeployApplicationRequest) + private static final com.google.cloud.visionai.v1.DeployApplicationRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.DeployApplicationRequest(); + } + + public static com.google.cloud.visionai.v1.DeployApplicationRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeployApplicationRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.DeployApplicationRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DeployApplicationRequestOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DeployApplicationRequestOrBuilder.java new file mode 100644 index 000000000000..3fb093e674d3 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DeployApplicationRequestOrBuilder.java @@ -0,0 +1,136 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/platform.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface DeployApplicationRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.DeployApplicationRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. the name of the application to retrieve.
+   * Format:
+   * "projects/{project}/locations/{location}/applications/{application}"
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. the name of the application to retrieve.
+   * Format:
+   * "projects/{project}/locations/{location}/applications/{application}"
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * If set, validate the request and preview the application graph, but do not
+   * actually deploy it.
+   * 
+ * + * bool validate_only = 2; + * + * @return The validateOnly. + */ + boolean getValidateOnly(); + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and
+   * the request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + java.lang.String getRequestId(); + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and
+   * the request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + com.google.protobuf.ByteString getRequestIdBytes(); + + /** + * + * + *
+   * Optional. Whether or not to enable monitoring for the application on
+   * deployment.
+   * 
+ * + * bool enable_monitoring = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The enableMonitoring. + */ + boolean getEnableMonitoring(); +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DeployApplicationResponse.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DeployApplicationResponse.java new file mode 100644 index 000000000000..2b74cab45696 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DeployApplicationResponse.java @@ -0,0 +1,435 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/platform.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * RPC Request Messages.
+ * Message for DeployApplication Response.
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.DeployApplicationResponse} + */ +public final class DeployApplicationResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.DeployApplicationResponse) + DeployApplicationResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use DeployApplicationResponse.newBuilder() to construct. + private DeployApplicationResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DeployApplicationResponse() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DeployApplicationResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_DeployApplicationResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_DeployApplicationResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.DeployApplicationResponse.class, + com.google.cloud.visionai.v1.DeployApplicationResponse.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 { + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += getUnknownFields().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.visionai.v1.DeployApplicationResponse)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.DeployApplicationResponse other = + (com.google.cloud.visionai.v1.DeployApplicationResponse) obj; + + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.DeployApplicationResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.DeployApplicationResponse 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.visionai.v1.DeployApplicationResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.DeployApplicationResponse 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.visionai.v1.DeployApplicationResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.DeployApplicationResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.DeployApplicationResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.DeployApplicationResponse 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.visionai.v1.DeployApplicationResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.DeployApplicationResponse 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.visionai.v1.DeployApplicationResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.DeployApplicationResponse 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.visionai.v1.DeployApplicationResponse 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; + } + /** + * + * + *
+   * RPC Request Messages.
+   * Message for DeployApplication Response.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.DeployApplicationResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.DeployApplicationResponse) + com.google.cloud.visionai.v1.DeployApplicationResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_DeployApplicationResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_DeployApplicationResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.DeployApplicationResponse.class, + com.google.cloud.visionai.v1.DeployApplicationResponse.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.DeployApplicationResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_DeployApplicationResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.DeployApplicationResponse getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.DeployApplicationResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.DeployApplicationResponse build() { + com.google.cloud.visionai.v1.DeployApplicationResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.DeployApplicationResponse buildPartial() { + com.google.cloud.visionai.v1.DeployApplicationResponse result = + new com.google.cloud.visionai.v1.DeployApplicationResponse(this); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.DeployApplicationResponse) { + return mergeFrom((com.google.cloud.visionai.v1.DeployApplicationResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.DeployApplicationResponse other) { + if (other == com.google.cloud.visionai.v1.DeployApplicationResponse.getDefaultInstance()) + return this; + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.DeployApplicationResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.DeployApplicationResponse) + private static final com.google.cloud.visionai.v1.DeployApplicationResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.DeployApplicationResponse(); + } + + public static com.google.cloud.visionai.v1.DeployApplicationResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeployApplicationResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.DeployApplicationResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DeployApplicationResponseOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DeployApplicationResponseOrBuilder.java new file mode 100644 index 000000000000..1deec3523068 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DeployApplicationResponseOrBuilder.java @@ -0,0 +1,25 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/platform.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface DeployApplicationResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.DeployApplicationResponse) + com.google.protobuf.MessageOrBuilder {} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DeployIndexMetadata.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DeployIndexMetadata.java new file mode 100644 index 000000000000..1a7b2ee0a28a --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DeployIndexMetadata.java @@ -0,0 +1,924 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/warehouse.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * Metadata message for DeployIndex.
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.DeployIndexMetadata} + */ +public final class DeployIndexMetadata extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.DeployIndexMetadata) + DeployIndexMetadataOrBuilder { + private static final long serialVersionUID = 0L; + // Use DeployIndexMetadata.newBuilder() to construct. + private DeployIndexMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DeployIndexMetadata() { + deployedIndex_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DeployIndexMetadata(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_DeployIndexMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_DeployIndexMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.DeployIndexMetadata.class, + com.google.cloud.visionai.v1.DeployIndexMetadata.Builder.class); + } + + private int bitField0_; + public static final int OPERATION_METADATA_FIELD_NUMBER = 1; + private com.google.cloud.visionai.v1.OperationMetadata operationMetadata_; + /** + * + * + *
+   * Common metadata of the long-running operation.
+   * 
+ * + * .google.cloud.visionai.v1.OperationMetadata operation_metadata = 1; + * + * @return Whether the operationMetadata field is set. + */ + @java.lang.Override + public boolean hasOperationMetadata() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * Common metadata of the long-running operation.
+   * 
+ * + * .google.cloud.visionai.v1.OperationMetadata operation_metadata = 1; + * + * @return The operationMetadata. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.OperationMetadata getOperationMetadata() { + return operationMetadata_ == null + ? com.google.cloud.visionai.v1.OperationMetadata.getDefaultInstance() + : operationMetadata_; + } + /** + * + * + *
+   * Common metadata of the long-running operation.
+   * 
+ * + * .google.cloud.visionai.v1.OperationMetadata operation_metadata = 1; + */ + @java.lang.Override + public com.google.cloud.visionai.v1.OperationMetadataOrBuilder getOperationMetadataOrBuilder() { + return operationMetadata_ == null + ? com.google.cloud.visionai.v1.OperationMetadata.getDefaultInstance() + : operationMetadata_; + } + + public static final int DEPLOYED_INDEX_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object deployedIndex_ = ""; + /** + * + * + *
+   * Output only. The index being deployed.
+   * 
+ * + * + * string deployed_index = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The deployedIndex. + */ + @java.lang.Override + public java.lang.String getDeployedIndex() { + java.lang.Object ref = deployedIndex_; + 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(); + deployedIndex_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. The index being deployed.
+   * 
+ * + * + * string deployed_index = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for deployedIndex. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDeployedIndexBytes() { + java.lang.Object ref = deployedIndex_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + deployedIndex_ = 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 (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getOperationMetadata()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(deployedIndex_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, deployedIndex_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getOperationMetadata()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(deployedIndex_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, deployedIndex_); + } + size += getUnknownFields().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.visionai.v1.DeployIndexMetadata)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.DeployIndexMetadata other = + (com.google.cloud.visionai.v1.DeployIndexMetadata) obj; + + if (hasOperationMetadata() != other.hasOperationMetadata()) return false; + if (hasOperationMetadata()) { + if (!getOperationMetadata().equals(other.getOperationMetadata())) return false; + } + if (!getDeployedIndex().equals(other.getDeployedIndex())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasOperationMetadata()) { + hash = (37 * hash) + OPERATION_METADATA_FIELD_NUMBER; + hash = (53 * hash) + getOperationMetadata().hashCode(); + } + hash = (37 * hash) + DEPLOYED_INDEX_FIELD_NUMBER; + hash = (53 * hash) + getDeployedIndex().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.DeployIndexMetadata parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.DeployIndexMetadata 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.visionai.v1.DeployIndexMetadata parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.DeployIndexMetadata 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.visionai.v1.DeployIndexMetadata parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.DeployIndexMetadata parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.DeployIndexMetadata parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.DeployIndexMetadata 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.visionai.v1.DeployIndexMetadata parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.DeployIndexMetadata 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.visionai.v1.DeployIndexMetadata parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.DeployIndexMetadata 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.visionai.v1.DeployIndexMetadata 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; + } + /** + * + * + *
+   * Metadata message for DeployIndex.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.DeployIndexMetadata} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.DeployIndexMetadata) + com.google.cloud.visionai.v1.DeployIndexMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_DeployIndexMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_DeployIndexMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.DeployIndexMetadata.class, + com.google.cloud.visionai.v1.DeployIndexMetadata.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.DeployIndexMetadata.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getOperationMetadataFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + operationMetadata_ = null; + if (operationMetadataBuilder_ != null) { + operationMetadataBuilder_.dispose(); + operationMetadataBuilder_ = null; + } + deployedIndex_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_DeployIndexMetadata_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.DeployIndexMetadata getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.DeployIndexMetadata.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.DeployIndexMetadata build() { + com.google.cloud.visionai.v1.DeployIndexMetadata result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.DeployIndexMetadata buildPartial() { + com.google.cloud.visionai.v1.DeployIndexMetadata result = + new com.google.cloud.visionai.v1.DeployIndexMetadata(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.visionai.v1.DeployIndexMetadata result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.operationMetadata_ = + operationMetadataBuilder_ == null + ? operationMetadata_ + : operationMetadataBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.deployedIndex_ = deployedIndex_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.DeployIndexMetadata) { + return mergeFrom((com.google.cloud.visionai.v1.DeployIndexMetadata) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.DeployIndexMetadata other) { + if (other == com.google.cloud.visionai.v1.DeployIndexMetadata.getDefaultInstance()) + return this; + if (other.hasOperationMetadata()) { + mergeOperationMetadata(other.getOperationMetadata()); + } + if (!other.getDeployedIndex().isEmpty()) { + deployedIndex_ = other.deployedIndex_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage( + getOperationMetadataFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + deployedIndex_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.cloud.visionai.v1.OperationMetadata operationMetadata_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.OperationMetadata, + com.google.cloud.visionai.v1.OperationMetadata.Builder, + com.google.cloud.visionai.v1.OperationMetadataOrBuilder> + operationMetadataBuilder_; + /** + * + * + *
+     * Common metadata of the long-running operation.
+     * 
+ * + * .google.cloud.visionai.v1.OperationMetadata operation_metadata = 1; + * + * @return Whether the operationMetadata field is set. + */ + public boolean hasOperationMetadata() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * Common metadata of the long-running operation.
+     * 
+ * + * .google.cloud.visionai.v1.OperationMetadata operation_metadata = 1; + * + * @return The operationMetadata. + */ + public com.google.cloud.visionai.v1.OperationMetadata getOperationMetadata() { + if (operationMetadataBuilder_ == null) { + return operationMetadata_ == null + ? com.google.cloud.visionai.v1.OperationMetadata.getDefaultInstance() + : operationMetadata_; + } else { + return operationMetadataBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Common metadata of the long-running operation.
+     * 
+ * + * .google.cloud.visionai.v1.OperationMetadata operation_metadata = 1; + */ + public Builder setOperationMetadata(com.google.cloud.visionai.v1.OperationMetadata value) { + if (operationMetadataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + operationMetadata_ = value; + } else { + operationMetadataBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Common metadata of the long-running operation.
+     * 
+ * + * .google.cloud.visionai.v1.OperationMetadata operation_metadata = 1; + */ + public Builder setOperationMetadata( + com.google.cloud.visionai.v1.OperationMetadata.Builder builderForValue) { + if (operationMetadataBuilder_ == null) { + operationMetadata_ = builderForValue.build(); + } else { + operationMetadataBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Common metadata of the long-running operation.
+     * 
+ * + * .google.cloud.visionai.v1.OperationMetadata operation_metadata = 1; + */ + public Builder mergeOperationMetadata(com.google.cloud.visionai.v1.OperationMetadata value) { + if (operationMetadataBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && operationMetadata_ != null + && operationMetadata_ + != com.google.cloud.visionai.v1.OperationMetadata.getDefaultInstance()) { + getOperationMetadataBuilder().mergeFrom(value); + } else { + operationMetadata_ = value; + } + } else { + operationMetadataBuilder_.mergeFrom(value); + } + if (operationMetadata_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Common metadata of the long-running operation.
+     * 
+ * + * .google.cloud.visionai.v1.OperationMetadata operation_metadata = 1; + */ + public Builder clearOperationMetadata() { + bitField0_ = (bitField0_ & ~0x00000001); + operationMetadata_ = null; + if (operationMetadataBuilder_ != null) { + operationMetadataBuilder_.dispose(); + operationMetadataBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Common metadata of the long-running operation.
+     * 
+ * + * .google.cloud.visionai.v1.OperationMetadata operation_metadata = 1; + */ + public com.google.cloud.visionai.v1.OperationMetadata.Builder getOperationMetadataBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getOperationMetadataFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Common metadata of the long-running operation.
+     * 
+ * + * .google.cloud.visionai.v1.OperationMetadata operation_metadata = 1; + */ + public com.google.cloud.visionai.v1.OperationMetadataOrBuilder getOperationMetadataOrBuilder() { + if (operationMetadataBuilder_ != null) { + return operationMetadataBuilder_.getMessageOrBuilder(); + } else { + return operationMetadata_ == null + ? com.google.cloud.visionai.v1.OperationMetadata.getDefaultInstance() + : operationMetadata_; + } + } + /** + * + * + *
+     * Common metadata of the long-running operation.
+     * 
+ * + * .google.cloud.visionai.v1.OperationMetadata operation_metadata = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.OperationMetadata, + com.google.cloud.visionai.v1.OperationMetadata.Builder, + com.google.cloud.visionai.v1.OperationMetadataOrBuilder> + getOperationMetadataFieldBuilder() { + if (operationMetadataBuilder_ == null) { + operationMetadataBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.OperationMetadata, + com.google.cloud.visionai.v1.OperationMetadata.Builder, + com.google.cloud.visionai.v1.OperationMetadataOrBuilder>( + getOperationMetadata(), getParentForChildren(), isClean()); + operationMetadata_ = null; + } + return operationMetadataBuilder_; + } + + private java.lang.Object deployedIndex_ = ""; + /** + * + * + *
+     * Output only. The index being deployed.
+     * 
+ * + * + * string deployed_index = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The deployedIndex. + */ + public java.lang.String getDeployedIndex() { + java.lang.Object ref = deployedIndex_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + deployedIndex_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. The index being deployed.
+     * 
+ * + * + * string deployed_index = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for deployedIndex. + */ + public com.google.protobuf.ByteString getDeployedIndexBytes() { + java.lang.Object ref = deployedIndex_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + deployedIndex_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. The index being deployed.
+     * 
+ * + * + * string deployed_index = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @param value The deployedIndex to set. + * @return This builder for chaining. + */ + public Builder setDeployedIndex(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + deployedIndex_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The index being deployed.
+     * 
+ * + * + * string deployed_index = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearDeployedIndex() { + deployedIndex_ = getDefaultInstance().getDeployedIndex(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The index being deployed.
+     * 
+ * + * + * string deployed_index = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for deployedIndex to set. + * @return This builder for chaining. + */ + public Builder setDeployedIndexBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + deployedIndex_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.DeployIndexMetadata) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.DeployIndexMetadata) + private static final com.google.cloud.visionai.v1.DeployIndexMetadata DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.DeployIndexMetadata(); + } + + public static com.google.cloud.visionai.v1.DeployIndexMetadata getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeployIndexMetadata parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.DeployIndexMetadata getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DeployIndexMetadataOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DeployIndexMetadataOrBuilder.java new file mode 100644 index 000000000000..cef3d5cdb71b --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DeployIndexMetadataOrBuilder.java @@ -0,0 +1,90 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/warehouse.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface DeployIndexMetadataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.DeployIndexMetadata) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Common metadata of the long-running operation.
+   * 
+ * + * .google.cloud.visionai.v1.OperationMetadata operation_metadata = 1; + * + * @return Whether the operationMetadata field is set. + */ + boolean hasOperationMetadata(); + /** + * + * + *
+   * Common metadata of the long-running operation.
+   * 
+ * + * .google.cloud.visionai.v1.OperationMetadata operation_metadata = 1; + * + * @return The operationMetadata. + */ + com.google.cloud.visionai.v1.OperationMetadata getOperationMetadata(); + /** + * + * + *
+   * Common metadata of the long-running operation.
+   * 
+ * + * .google.cloud.visionai.v1.OperationMetadata operation_metadata = 1; + */ + com.google.cloud.visionai.v1.OperationMetadataOrBuilder getOperationMetadataOrBuilder(); + + /** + * + * + *
+   * Output only. The index being deployed.
+   * 
+ * + * + * string deployed_index = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The deployedIndex. + */ + java.lang.String getDeployedIndex(); + /** + * + * + *
+   * Output only. The index being deployed.
+   * 
+ * + * + * string deployed_index = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for deployedIndex. + */ + com.google.protobuf.ByteString getDeployedIndexBytes(); +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DeployIndexRequest.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DeployIndexRequest.java new file mode 100644 index 000000000000..c4cd95e3df40 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DeployIndexRequest.java @@ -0,0 +1,958 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/warehouse.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * Request message for DeployIndex.
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.DeployIndexRequest} + */ +public final class DeployIndexRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.DeployIndexRequest) + DeployIndexRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use DeployIndexRequest.newBuilder() to construct. + private DeployIndexRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DeployIndexRequest() { + indexEndpoint_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DeployIndexRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_DeployIndexRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_DeployIndexRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.DeployIndexRequest.class, + com.google.cloud.visionai.v1.DeployIndexRequest.Builder.class); + } + + private int bitField0_; + public static final int INDEX_ENDPOINT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object indexEndpoint_ = ""; + /** + * + * + *
+   * Required. IndexEndpoint the index is deployed to.
+   * Format:
+   * `projects/{project}/locations/{location}/indexEndpoints/{index_endpoint}`
+   * 
+ * + * + * string index_endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The indexEndpoint. + */ + @java.lang.Override + public java.lang.String getIndexEndpoint() { + java.lang.Object ref = indexEndpoint_; + 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(); + indexEndpoint_ = s; + return s; + } + } + /** + * + * + *
+   * Required. IndexEndpoint the index is deployed to.
+   * Format:
+   * `projects/{project}/locations/{location}/indexEndpoints/{index_endpoint}`
+   * 
+ * + * + * string index_endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for indexEndpoint. + */ + @java.lang.Override + public com.google.protobuf.ByteString getIndexEndpointBytes() { + java.lang.Object ref = indexEndpoint_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + indexEndpoint_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DEPLOYED_INDEX_FIELD_NUMBER = 3; + private com.google.cloud.visionai.v1.DeployedIndex deployedIndex_; + /** + * + * + *
+   * Required. Index to deploy.
+   * 
+ * + * + * .google.cloud.visionai.v1.DeployedIndex deployed_index = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the deployedIndex field is set. + */ + @java.lang.Override + public boolean hasDeployedIndex() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * Required. Index to deploy.
+   * 
+ * + * + * .google.cloud.visionai.v1.DeployedIndex deployed_index = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The deployedIndex. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.DeployedIndex getDeployedIndex() { + return deployedIndex_ == null + ? com.google.cloud.visionai.v1.DeployedIndex.getDefaultInstance() + : deployedIndex_; + } + /** + * + * + *
+   * Required. Index to deploy.
+   * 
+ * + * + * .google.cloud.visionai.v1.DeployedIndex deployed_index = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.visionai.v1.DeployedIndexOrBuilder getDeployedIndexOrBuilder() { + return deployedIndex_ == null + ? com.google.cloud.visionai.v1.DeployedIndex.getDefaultInstance() + : deployedIndex_; + } + + 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(indexEndpoint_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, indexEndpoint_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(3, getDeployedIndex()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(indexEndpoint_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, indexEndpoint_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getDeployedIndex()); + } + size += getUnknownFields().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.visionai.v1.DeployIndexRequest)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.DeployIndexRequest other = + (com.google.cloud.visionai.v1.DeployIndexRequest) obj; + + if (!getIndexEndpoint().equals(other.getIndexEndpoint())) return false; + if (hasDeployedIndex() != other.hasDeployedIndex()) return false; + if (hasDeployedIndex()) { + if (!getDeployedIndex().equals(other.getDeployedIndex())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + INDEX_ENDPOINT_FIELD_NUMBER; + hash = (53 * hash) + getIndexEndpoint().hashCode(); + if (hasDeployedIndex()) { + hash = (37 * hash) + DEPLOYED_INDEX_FIELD_NUMBER; + hash = (53 * hash) + getDeployedIndex().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.DeployIndexRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.DeployIndexRequest 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.visionai.v1.DeployIndexRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.DeployIndexRequest 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.visionai.v1.DeployIndexRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.DeployIndexRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.DeployIndexRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.DeployIndexRequest 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.visionai.v1.DeployIndexRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.DeployIndexRequest 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.visionai.v1.DeployIndexRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.DeployIndexRequest 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.visionai.v1.DeployIndexRequest 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; + } + /** + * + * + *
+   * Request message for DeployIndex.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.DeployIndexRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.DeployIndexRequest) + com.google.cloud.visionai.v1.DeployIndexRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_DeployIndexRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_DeployIndexRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.DeployIndexRequest.class, + com.google.cloud.visionai.v1.DeployIndexRequest.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.DeployIndexRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getDeployedIndexFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + indexEndpoint_ = ""; + deployedIndex_ = null; + if (deployedIndexBuilder_ != null) { + deployedIndexBuilder_.dispose(); + deployedIndexBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_DeployIndexRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.DeployIndexRequest getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.DeployIndexRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.DeployIndexRequest build() { + com.google.cloud.visionai.v1.DeployIndexRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.DeployIndexRequest buildPartial() { + com.google.cloud.visionai.v1.DeployIndexRequest result = + new com.google.cloud.visionai.v1.DeployIndexRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.visionai.v1.DeployIndexRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.indexEndpoint_ = indexEndpoint_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.deployedIndex_ = + deployedIndexBuilder_ == null ? deployedIndex_ : deployedIndexBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.DeployIndexRequest) { + return mergeFrom((com.google.cloud.visionai.v1.DeployIndexRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.DeployIndexRequest other) { + if (other == com.google.cloud.visionai.v1.DeployIndexRequest.getDefaultInstance()) + return this; + if (!other.getIndexEndpoint().isEmpty()) { + indexEndpoint_ = other.indexEndpoint_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasDeployedIndex()) { + mergeDeployedIndex(other.getDeployedIndex()); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + indexEndpoint_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 26: + { + input.readMessage(getDeployedIndexFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object indexEndpoint_ = ""; + /** + * + * + *
+     * Required. IndexEndpoint the index is deployed to.
+     * Format:
+     * `projects/{project}/locations/{location}/indexEndpoints/{index_endpoint}`
+     * 
+ * + * + * string index_endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The indexEndpoint. + */ + public java.lang.String getIndexEndpoint() { + java.lang.Object ref = indexEndpoint_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + indexEndpoint_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. IndexEndpoint the index is deployed to.
+     * Format:
+     * `projects/{project}/locations/{location}/indexEndpoints/{index_endpoint}`
+     * 
+ * + * + * string index_endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for indexEndpoint. + */ + public com.google.protobuf.ByteString getIndexEndpointBytes() { + java.lang.Object ref = indexEndpoint_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + indexEndpoint_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. IndexEndpoint the index is deployed to.
+     * Format:
+     * `projects/{project}/locations/{location}/indexEndpoints/{index_endpoint}`
+     * 
+ * + * + * string index_endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The indexEndpoint to set. + * @return This builder for chaining. + */ + public Builder setIndexEndpoint(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + indexEndpoint_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. IndexEndpoint the index is deployed to.
+     * Format:
+     * `projects/{project}/locations/{location}/indexEndpoints/{index_endpoint}`
+     * 
+ * + * + * string index_endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearIndexEndpoint() { + indexEndpoint_ = getDefaultInstance().getIndexEndpoint(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. IndexEndpoint the index is deployed to.
+     * Format:
+     * `projects/{project}/locations/{location}/indexEndpoints/{index_endpoint}`
+     * 
+ * + * + * string index_endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for indexEndpoint to set. + * @return This builder for chaining. + */ + public Builder setIndexEndpointBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + indexEndpoint_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.cloud.visionai.v1.DeployedIndex deployedIndex_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.DeployedIndex, + com.google.cloud.visionai.v1.DeployedIndex.Builder, + com.google.cloud.visionai.v1.DeployedIndexOrBuilder> + deployedIndexBuilder_; + /** + * + * + *
+     * Required. Index to deploy.
+     * 
+ * + * + * .google.cloud.visionai.v1.DeployedIndex deployed_index = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the deployedIndex field is set. + */ + public boolean hasDeployedIndex() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * Required. Index to deploy.
+     * 
+ * + * + * .google.cloud.visionai.v1.DeployedIndex deployed_index = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The deployedIndex. + */ + public com.google.cloud.visionai.v1.DeployedIndex getDeployedIndex() { + if (deployedIndexBuilder_ == null) { + return deployedIndex_ == null + ? com.google.cloud.visionai.v1.DeployedIndex.getDefaultInstance() + : deployedIndex_; + } else { + return deployedIndexBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. Index to deploy.
+     * 
+ * + * + * .google.cloud.visionai.v1.DeployedIndex deployed_index = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setDeployedIndex(com.google.cloud.visionai.v1.DeployedIndex value) { + if (deployedIndexBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + deployedIndex_ = value; + } else { + deployedIndexBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Index to deploy.
+     * 
+ * + * + * .google.cloud.visionai.v1.DeployedIndex deployed_index = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setDeployedIndex( + com.google.cloud.visionai.v1.DeployedIndex.Builder builderForValue) { + if (deployedIndexBuilder_ == null) { + deployedIndex_ = builderForValue.build(); + } else { + deployedIndexBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Index to deploy.
+     * 
+ * + * + * .google.cloud.visionai.v1.DeployedIndex deployed_index = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeDeployedIndex(com.google.cloud.visionai.v1.DeployedIndex value) { + if (deployedIndexBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && deployedIndex_ != null + && deployedIndex_ != com.google.cloud.visionai.v1.DeployedIndex.getDefaultInstance()) { + getDeployedIndexBuilder().mergeFrom(value); + } else { + deployedIndex_ = value; + } + } else { + deployedIndexBuilder_.mergeFrom(value); + } + if (deployedIndex_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Required. Index to deploy.
+     * 
+ * + * + * .google.cloud.visionai.v1.DeployedIndex deployed_index = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearDeployedIndex() { + bitField0_ = (bitField0_ & ~0x00000002); + deployedIndex_ = null; + if (deployedIndexBuilder_ != null) { + deployedIndexBuilder_.dispose(); + deployedIndexBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Index to deploy.
+     * 
+ * + * + * .google.cloud.visionai.v1.DeployedIndex deployed_index = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.visionai.v1.DeployedIndex.Builder getDeployedIndexBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getDeployedIndexFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. Index to deploy.
+     * 
+ * + * + * .google.cloud.visionai.v1.DeployedIndex deployed_index = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.visionai.v1.DeployedIndexOrBuilder getDeployedIndexOrBuilder() { + if (deployedIndexBuilder_ != null) { + return deployedIndexBuilder_.getMessageOrBuilder(); + } else { + return deployedIndex_ == null + ? com.google.cloud.visionai.v1.DeployedIndex.getDefaultInstance() + : deployedIndex_; + } + } + /** + * + * + *
+     * Required. Index to deploy.
+     * 
+ * + * + * .google.cloud.visionai.v1.DeployedIndex deployed_index = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.DeployedIndex, + com.google.cloud.visionai.v1.DeployedIndex.Builder, + com.google.cloud.visionai.v1.DeployedIndexOrBuilder> + getDeployedIndexFieldBuilder() { + if (deployedIndexBuilder_ == null) { + deployedIndexBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.DeployedIndex, + com.google.cloud.visionai.v1.DeployedIndex.Builder, + com.google.cloud.visionai.v1.DeployedIndexOrBuilder>( + getDeployedIndex(), getParentForChildren(), isClean()); + deployedIndex_ = null; + } + return deployedIndexBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.DeployIndexRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.DeployIndexRequest) + private static final com.google.cloud.visionai.v1.DeployIndexRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.DeployIndexRequest(); + } + + public static com.google.cloud.visionai.v1.DeployIndexRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeployIndexRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.DeployIndexRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DeployIndexRequestOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DeployIndexRequestOrBuilder.java new file mode 100644 index 000000000000..7fce68c7dc67 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DeployIndexRequestOrBuilder.java @@ -0,0 +1,100 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/warehouse.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface DeployIndexRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.DeployIndexRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. IndexEndpoint the index is deployed to.
+   * Format:
+   * `projects/{project}/locations/{location}/indexEndpoints/{index_endpoint}`
+   * 
+ * + * + * string index_endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The indexEndpoint. + */ + java.lang.String getIndexEndpoint(); + /** + * + * + *
+   * Required. IndexEndpoint the index is deployed to.
+   * Format:
+   * `projects/{project}/locations/{location}/indexEndpoints/{index_endpoint}`
+   * 
+ * + * + * string index_endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for indexEndpoint. + */ + com.google.protobuf.ByteString getIndexEndpointBytes(); + + /** + * + * + *
+   * Required. Index to deploy.
+   * 
+ * + * + * .google.cloud.visionai.v1.DeployedIndex deployed_index = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the deployedIndex field is set. + */ + boolean hasDeployedIndex(); + /** + * + * + *
+   * Required. Index to deploy.
+   * 
+ * + * + * .google.cloud.visionai.v1.DeployedIndex deployed_index = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The deployedIndex. + */ + com.google.cloud.visionai.v1.DeployedIndex getDeployedIndex(); + /** + * + * + *
+   * Required. Index to deploy.
+   * 
+ * + * + * .google.cloud.visionai.v1.DeployedIndex deployed_index = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.visionai.v1.DeployedIndexOrBuilder getDeployedIndexOrBuilder(); +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DeployIndexResponse.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DeployIndexResponse.java new file mode 100644 index 000000000000..8178a75348fc --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DeployIndexResponse.java @@ -0,0 +1,432 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/warehouse.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * DeployIndex response once the operation is done.
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.DeployIndexResponse} + */ +public final class DeployIndexResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.DeployIndexResponse) + DeployIndexResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use DeployIndexResponse.newBuilder() to construct. + private DeployIndexResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DeployIndexResponse() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DeployIndexResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_DeployIndexResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_DeployIndexResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.DeployIndexResponse.class, + com.google.cloud.visionai.v1.DeployIndexResponse.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 { + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += getUnknownFields().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.visionai.v1.DeployIndexResponse)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.DeployIndexResponse other = + (com.google.cloud.visionai.v1.DeployIndexResponse) obj; + + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.DeployIndexResponse parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.DeployIndexResponse 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.visionai.v1.DeployIndexResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.DeployIndexResponse 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.visionai.v1.DeployIndexResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.DeployIndexResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.DeployIndexResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.DeployIndexResponse 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.visionai.v1.DeployIndexResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.DeployIndexResponse 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.visionai.v1.DeployIndexResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.DeployIndexResponse 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.visionai.v1.DeployIndexResponse 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; + } + /** + * + * + *
+   * DeployIndex response once the operation is done.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.DeployIndexResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.DeployIndexResponse) + com.google.cloud.visionai.v1.DeployIndexResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_DeployIndexResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_DeployIndexResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.DeployIndexResponse.class, + com.google.cloud.visionai.v1.DeployIndexResponse.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.DeployIndexResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_DeployIndexResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.DeployIndexResponse getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.DeployIndexResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.DeployIndexResponse build() { + com.google.cloud.visionai.v1.DeployIndexResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.DeployIndexResponse buildPartial() { + com.google.cloud.visionai.v1.DeployIndexResponse result = + new com.google.cloud.visionai.v1.DeployIndexResponse(this); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.DeployIndexResponse) { + return mergeFrom((com.google.cloud.visionai.v1.DeployIndexResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.DeployIndexResponse other) { + if (other == com.google.cloud.visionai.v1.DeployIndexResponse.getDefaultInstance()) + return this; + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.DeployIndexResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.DeployIndexResponse) + private static final com.google.cloud.visionai.v1.DeployIndexResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.DeployIndexResponse(); + } + + public static com.google.cloud.visionai.v1.DeployIndexResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeployIndexResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.DeployIndexResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DeployIndexResponseOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DeployIndexResponseOrBuilder.java new file mode 100644 index 000000000000..86b5ea53b747 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DeployIndexResponseOrBuilder.java @@ -0,0 +1,25 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/warehouse.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface DeployIndexResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.DeployIndexResponse) + com.google.protobuf.MessageOrBuilder {} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DeployedIndex.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DeployedIndex.java new file mode 100644 index 000000000000..0acb2b934eb0 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DeployedIndex.java @@ -0,0 +1,652 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/warehouse.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * A deployment of an Index.
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.DeployedIndex} + */ +public final class DeployedIndex extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.DeployedIndex) + DeployedIndexOrBuilder { + private static final long serialVersionUID = 0L; + // Use DeployedIndex.newBuilder() to construct. + private DeployedIndex(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DeployedIndex() { + index_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DeployedIndex(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_DeployedIndex_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_DeployedIndex_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.DeployedIndex.class, + com.google.cloud.visionai.v1.DeployedIndex.Builder.class); + } + + public static final int INDEX_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object index_ = ""; + /** + * + * + *
+   * Required. Name of the deployed Index.
+   * Format:
+   * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/indexes/{index_id}`
+   * 
+ * + * + * string index = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The index. + */ + @java.lang.Override + public java.lang.String getIndex() { + java.lang.Object ref = index_; + 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(); + index_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Name of the deployed Index.
+   * Format:
+   * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/indexes/{index_id}`
+   * 
+ * + * + * string index = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for index. + */ + @java.lang.Override + public com.google.protobuf.ByteString getIndexBytes() { + java.lang.Object ref = index_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + index_ = 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(index_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, index_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(index_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, index_); + } + size += getUnknownFields().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.visionai.v1.DeployedIndex)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.DeployedIndex other = + (com.google.cloud.visionai.v1.DeployedIndex) obj; + + if (!getIndex().equals(other.getIndex())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + INDEX_FIELD_NUMBER; + hash = (53 * hash) + getIndex().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.DeployedIndex parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.DeployedIndex 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.visionai.v1.DeployedIndex parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.DeployedIndex 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.visionai.v1.DeployedIndex parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.DeployedIndex parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.DeployedIndex parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.DeployedIndex 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.visionai.v1.DeployedIndex parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.DeployedIndex 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.visionai.v1.DeployedIndex parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.DeployedIndex 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.visionai.v1.DeployedIndex 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 deployment of an Index.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.DeployedIndex} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.DeployedIndex) + com.google.cloud.visionai.v1.DeployedIndexOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_DeployedIndex_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_DeployedIndex_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.DeployedIndex.class, + com.google.cloud.visionai.v1.DeployedIndex.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.DeployedIndex.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + index_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_DeployedIndex_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.DeployedIndex getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.DeployedIndex.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.DeployedIndex build() { + com.google.cloud.visionai.v1.DeployedIndex result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.DeployedIndex buildPartial() { + com.google.cloud.visionai.v1.DeployedIndex result = + new com.google.cloud.visionai.v1.DeployedIndex(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.visionai.v1.DeployedIndex result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.index_ = index_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.DeployedIndex) { + return mergeFrom((com.google.cloud.visionai.v1.DeployedIndex) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.DeployedIndex other) { + if (other == com.google.cloud.visionai.v1.DeployedIndex.getDefaultInstance()) return this; + if (!other.getIndex().isEmpty()) { + index_ = other.index_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + index_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object index_ = ""; + /** + * + * + *
+     * Required. Name of the deployed Index.
+     * Format:
+     * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/indexes/{index_id}`
+     * 
+ * + * + * string index = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The index. + */ + public java.lang.String getIndex() { + java.lang.Object ref = index_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + index_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Name of the deployed Index.
+     * Format:
+     * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/indexes/{index_id}`
+     * 
+ * + * + * string index = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for index. + */ + public com.google.protobuf.ByteString getIndexBytes() { + java.lang.Object ref = index_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + index_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Name of the deployed Index.
+     * Format:
+     * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/indexes/{index_id}`
+     * 
+ * + * + * string index = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The index to set. + * @return This builder for chaining. + */ + public Builder setIndex(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + index_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Name of the deployed Index.
+     * Format:
+     * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/indexes/{index_id}`
+     * 
+ * + * + * string index = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearIndex() { + index_ = getDefaultInstance().getIndex(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Name of the deployed Index.
+     * Format:
+     * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/indexes/{index_id}`
+     * 
+ * + * + * string index = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for index to set. + * @return This builder for chaining. + */ + public Builder setIndexBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + index_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.DeployedIndex) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.DeployedIndex) + private static final com.google.cloud.visionai.v1.DeployedIndex DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.DeployedIndex(); + } + + public static com.google.cloud.visionai.v1.DeployedIndex getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeployedIndex parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.DeployedIndex getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DeployedIndexOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DeployedIndexOrBuilder.java new file mode 100644 index 000000000000..7ad46f6ca6b4 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DeployedIndexOrBuilder.java @@ -0,0 +1,59 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/warehouse.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface DeployedIndexOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.DeployedIndex) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Name of the deployed Index.
+   * Format:
+   * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/indexes/{index_id}`
+   * 
+ * + * + * string index = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The index. + */ + java.lang.String getIndex(); + /** + * + * + *
+   * Required. Name of the deployed Index.
+   * Format:
+   * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/indexes/{index_id}`
+   * 
+ * + * + * string index = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for index. + */ + com.google.protobuf.ByteString getIndexBytes(); +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DeployedIndexReference.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DeployedIndexReference.java new file mode 100644 index 000000000000..a5a51e197a0e --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DeployedIndexReference.java @@ -0,0 +1,639 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/warehouse.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * Points to a DeployedIndex.
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.DeployedIndexReference} + */ +public final class DeployedIndexReference extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.DeployedIndexReference) + DeployedIndexReferenceOrBuilder { + private static final long serialVersionUID = 0L; + // Use DeployedIndexReference.newBuilder() to construct. + private DeployedIndexReference(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DeployedIndexReference() { + indexEndpoint_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DeployedIndexReference(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_DeployedIndexReference_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_DeployedIndexReference_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.DeployedIndexReference.class, + com.google.cloud.visionai.v1.DeployedIndexReference.Builder.class); + } + + public static final int INDEX_ENDPOINT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object indexEndpoint_ = ""; + /** + * + * + *
+   * Immutable. A resource name of the IndexEndpoint.
+   * 
+ * + * + * string index_endpoint = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } + * + * + * @return The indexEndpoint. + */ + @java.lang.Override + public java.lang.String getIndexEndpoint() { + java.lang.Object ref = indexEndpoint_; + 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(); + indexEndpoint_ = s; + return s; + } + } + /** + * + * + *
+   * Immutable. A resource name of the IndexEndpoint.
+   * 
+ * + * + * string index_endpoint = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for indexEndpoint. + */ + @java.lang.Override + public com.google.protobuf.ByteString getIndexEndpointBytes() { + java.lang.Object ref = indexEndpoint_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + indexEndpoint_ = 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(indexEndpoint_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, indexEndpoint_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(indexEndpoint_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, indexEndpoint_); + } + size += getUnknownFields().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.visionai.v1.DeployedIndexReference)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.DeployedIndexReference other = + (com.google.cloud.visionai.v1.DeployedIndexReference) obj; + + if (!getIndexEndpoint().equals(other.getIndexEndpoint())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + INDEX_ENDPOINT_FIELD_NUMBER; + hash = (53 * hash) + getIndexEndpoint().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.DeployedIndexReference parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.DeployedIndexReference 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.visionai.v1.DeployedIndexReference parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.DeployedIndexReference 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.visionai.v1.DeployedIndexReference parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.DeployedIndexReference parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.DeployedIndexReference parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.DeployedIndexReference 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.visionai.v1.DeployedIndexReference parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.DeployedIndexReference 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.visionai.v1.DeployedIndexReference parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.DeployedIndexReference 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.visionai.v1.DeployedIndexReference 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; + } + /** + * + * + *
+   * Points to a DeployedIndex.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.DeployedIndexReference} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.DeployedIndexReference) + com.google.cloud.visionai.v1.DeployedIndexReferenceOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_DeployedIndexReference_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_DeployedIndexReference_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.DeployedIndexReference.class, + com.google.cloud.visionai.v1.DeployedIndexReference.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.DeployedIndexReference.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + indexEndpoint_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_DeployedIndexReference_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.DeployedIndexReference getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.DeployedIndexReference.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.DeployedIndexReference build() { + com.google.cloud.visionai.v1.DeployedIndexReference result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.DeployedIndexReference buildPartial() { + com.google.cloud.visionai.v1.DeployedIndexReference result = + new com.google.cloud.visionai.v1.DeployedIndexReference(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.visionai.v1.DeployedIndexReference result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.indexEndpoint_ = indexEndpoint_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.DeployedIndexReference) { + return mergeFrom((com.google.cloud.visionai.v1.DeployedIndexReference) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.DeployedIndexReference other) { + if (other == com.google.cloud.visionai.v1.DeployedIndexReference.getDefaultInstance()) + return this; + if (!other.getIndexEndpoint().isEmpty()) { + indexEndpoint_ = other.indexEndpoint_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + indexEndpoint_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object indexEndpoint_ = ""; + /** + * + * + *
+     * Immutable. A resource name of the IndexEndpoint.
+     * 
+ * + * + * string index_endpoint = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } + * + * + * @return The indexEndpoint. + */ + public java.lang.String getIndexEndpoint() { + java.lang.Object ref = indexEndpoint_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + indexEndpoint_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Immutable. A resource name of the IndexEndpoint.
+     * 
+ * + * + * string index_endpoint = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for indexEndpoint. + */ + public com.google.protobuf.ByteString getIndexEndpointBytes() { + java.lang.Object ref = indexEndpoint_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + indexEndpoint_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Immutable. A resource name of the IndexEndpoint.
+     * 
+ * + * + * string index_endpoint = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } + * + * + * @param value The indexEndpoint to set. + * @return This builder for chaining. + */ + public Builder setIndexEndpoint(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + indexEndpoint_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Immutable. A resource name of the IndexEndpoint.
+     * 
+ * + * + * string index_endpoint = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearIndexEndpoint() { + indexEndpoint_ = getDefaultInstance().getIndexEndpoint(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Immutable. A resource name of the IndexEndpoint.
+     * 
+ * + * + * string index_endpoint = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for indexEndpoint to set. + * @return This builder for chaining. + */ + public Builder setIndexEndpointBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + indexEndpoint_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.DeployedIndexReference) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.DeployedIndexReference) + private static final com.google.cloud.visionai.v1.DeployedIndexReference DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.DeployedIndexReference(); + } + + public static com.google.cloud.visionai.v1.DeployedIndexReference getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeployedIndexReference parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.DeployedIndexReference getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DeployedIndexReferenceOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DeployedIndexReferenceOrBuilder.java new file mode 100644 index 000000000000..d3c5db7ae5a0 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DeployedIndexReferenceOrBuilder.java @@ -0,0 +1,55 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/warehouse.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface DeployedIndexReferenceOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.DeployedIndexReference) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Immutable. A resource name of the IndexEndpoint.
+   * 
+ * + * + * string index_endpoint = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } + * + * + * @return The indexEndpoint. + */ + java.lang.String getIndexEndpoint(); + /** + * + * + *
+   * Immutable. A resource name of the IndexEndpoint.
+   * 
+ * + * + * string index_endpoint = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for indexEndpoint. + */ + com.google.protobuf.ByteString getIndexEndpointBytes(); +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/Draft.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/Draft.java new file mode 100644 index 000000000000..386ad162b407 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/Draft.java @@ -0,0 +1,2181 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/platform.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * Message describing Draft object
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.Draft} + */ +public final class Draft extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.Draft) + DraftOrBuilder { + private static final long serialVersionUID = 0L; + // Use Draft.newBuilder() to construct. + private Draft(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Draft() { + name_ = ""; + displayName_ = ""; + description_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Draft(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_Draft_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 3: + return internalGetLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_Draft_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.Draft.class, + com.google.cloud.visionai.v1.Draft.Builder.class); + } + + private int bitField0_; + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * name of resource
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + 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(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * name of resource
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CREATE_TIME_FIELD_NUMBER = 2; + private com.google.protobuf.Timestamp createTime_; + /** + * + * + *
+   * Output only. [Output only] Create timestamp
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * Output only. [Output only] Create timestamp
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + /** + * + * + *
+   * Output only. [Output only] Create timestamp
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + + public static final int UPDATE_TIME_FIELD_NUMBER = 7; + private com.google.protobuf.Timestamp updateTime_; + /** + * + * + *
+   * Output only. [Output only] Create timestamp
+   * 
+ * + * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + @java.lang.Override + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+   * Output only. [Output only] Create timestamp
+   * 
+ * + * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getUpdateTime() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + /** + * + * + *
+   * Output only. [Output only] Create timestamp
+   * 
+ * + * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + + public static final int LABELS_FIELD_NUMBER = 3; + + private static final class LabelsDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_Draft_LabelsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + + @SuppressWarnings("serial") + private com.google.protobuf.MapField labels_; + + private com.google.protobuf.MapField internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + /** + * + * + *
+   * Labels as key value pairs
+   * 
+ * + * map<string, string> labels = 3; + */ + @java.lang.Override + public boolean containsLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetLabels().getMap().containsKey(key); + } + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + /** + * + * + *
+   * Labels as key value pairs
+   * 
+ * + * map<string, string> labels = 3; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + * + * + *
+   * Labels as key value pairs
+   * 
+ * + * map<string, string> labels = 3; + */ + @java.lang.Override + public /* nullable */ java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+   * Labels as key value pairs
+   * 
+ * + * map<string, string> labels = 3; + */ + @java.lang.Override + public java.lang.String getLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int DISPLAY_NAME_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object displayName_ = ""; + /** + * + * + *
+   * Required. A user friendly display name for the solution.
+   * 
+ * + * string display_name = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The displayName. + */ + @java.lang.Override + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + 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(); + displayName_ = s; + return s; + } + } + /** + * + * + *
+   * Required. A user friendly display name for the solution.
+   * 
+ * + * string display_name = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for displayName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DESCRIPTION_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object description_ = ""; + /** + * + * + *
+   * A description for this application.
+   * 
+ * + * string description = 5; + * + * @return The description. + */ + @java.lang.Override + 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; + } + } + /** + * + * + *
+   * A description for this application.
+   * 
+ * + * string description = 5; + * + * @return The bytes for description. + */ + @java.lang.Override + 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 DRAFT_APPLICATION_CONFIGS_FIELD_NUMBER = 6; + private com.google.cloud.visionai.v1.ApplicationConfigs draftApplicationConfigs_; + /** + * + * + *
+   * The draft application configs which haven't been updated to an application.
+   * 
+ * + * .google.cloud.visionai.v1.ApplicationConfigs draft_application_configs = 6; + * + * @return Whether the draftApplicationConfigs field is set. + */ + @java.lang.Override + public boolean hasDraftApplicationConfigs() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+   * The draft application configs which haven't been updated to an application.
+   * 
+ * + * .google.cloud.visionai.v1.ApplicationConfigs draft_application_configs = 6; + * + * @return The draftApplicationConfigs. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.ApplicationConfigs getDraftApplicationConfigs() { + return draftApplicationConfigs_ == null + ? com.google.cloud.visionai.v1.ApplicationConfigs.getDefaultInstance() + : draftApplicationConfigs_; + } + /** + * + * + *
+   * The draft application configs which haven't been updated to an application.
+   * 
+ * + * .google.cloud.visionai.v1.ApplicationConfigs draft_application_configs = 6; + */ + @java.lang.Override + public com.google.cloud.visionai.v1.ApplicationConfigsOrBuilder + getDraftApplicationConfigsOrBuilder() { + return draftApplicationConfigs_ == null + ? com.google.cloud.visionai.v1.ApplicationConfigs.getDefaultInstance() + : draftApplicationConfigs_; + } + + 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getCreateTime()); + } + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 3); + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, displayName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, description_); + } + if (((bitField0_ & 0x00000004) != 0)) { + output.writeMessage(6, getDraftApplicationConfigs()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(7, getUpdateTime()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getCreateTime()); + } + for (java.util.Map.Entry entry : + internalGetLabels().getMap().entrySet()) { + com.google.protobuf.MapEntry labels__ = + LabelsDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, labels__); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, displayName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, description_); + } + if (((bitField0_ & 0x00000004) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(6, getDraftApplicationConfigs()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getUpdateTime()); + } + size += getUnknownFields().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.visionai.v1.Draft)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.Draft other = (com.google.cloud.visionai.v1.Draft) obj; + + if (!getName().equals(other.getName())) return false; + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime().equals(other.getCreateTime())) return false; + } + if (hasUpdateTime() != other.hasUpdateTime()) return false; + if (hasUpdateTime()) { + if (!getUpdateTime().equals(other.getUpdateTime())) return false; + } + if (!internalGetLabels().equals(other.internalGetLabels())) return false; + if (!getDisplayName().equals(other.getDisplayName())) return false; + if (!getDescription().equals(other.getDescription())) return false; + if (hasDraftApplicationConfigs() != other.hasDraftApplicationConfigs()) return false; + if (hasDraftApplicationConfigs()) { + if (!getDraftApplicationConfigs().equals(other.getDraftApplicationConfigs())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasUpdateTime()) { + hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getUpdateTime().hashCode(); + } + if (!internalGetLabels().getMap().isEmpty()) { + hash = (37 * hash) + LABELS_FIELD_NUMBER; + hash = (53 * hash) + internalGetLabels().hashCode(); + } + hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDisplayName().hashCode(); + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + if (hasDraftApplicationConfigs()) { + hash = (37 * hash) + DRAFT_APPLICATION_CONFIGS_FIELD_NUMBER; + hash = (53 * hash) + getDraftApplicationConfigs().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.Draft parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.Draft 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.visionai.v1.Draft parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.Draft 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.visionai.v1.Draft parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.Draft parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.Draft parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.Draft 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.visionai.v1.Draft parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.Draft 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.visionai.v1.Draft parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.Draft 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.visionai.v1.Draft 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; + } + /** + * + * + *
+   * Message describing Draft object
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.Draft} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.Draft) + com.google.cloud.visionai.v1.DraftOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_Draft_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 3: + return internalGetLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( + int number) { + switch (number) { + case 3: + return internalGetMutableLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_Draft_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.Draft.class, + com.google.cloud.visionai.v1.Draft.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.Draft.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getCreateTimeFieldBuilder(); + getUpdateTimeFieldBuilder(); + getDraftApplicationConfigsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + internalGetMutableLabels().clear(); + displayName_ = ""; + description_ = ""; + draftApplicationConfigs_ = null; + if (draftApplicationConfigsBuilder_ != null) { + draftApplicationConfigsBuilder_.dispose(); + draftApplicationConfigsBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_Draft_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.Draft getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.Draft.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.Draft build() { + com.google.cloud.visionai.v1.Draft result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.Draft buildPartial() { + com.google.cloud.visionai.v1.Draft result = new com.google.cloud.visionai.v1.Draft(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.visionai.v1.Draft result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.updateTime_ = updateTimeBuilder_ == null ? updateTime_ : updateTimeBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.labels_ = internalGetLabels(); + result.labels_.makeImmutable(); + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.displayName_ = displayName_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.description_ = description_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.draftApplicationConfigs_ = + draftApplicationConfigsBuilder_ == null + ? draftApplicationConfigs_ + : draftApplicationConfigsBuilder_.build(); + to_bitField0_ |= 0x00000004; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.Draft) { + return mergeFrom((com.google.cloud.visionai.v1.Draft) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.Draft other) { + if (other == com.google.cloud.visionai.v1.Draft.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + internalGetMutableLabels().mergeFrom(other.internalGetLabels()); + bitField0_ |= 0x00000008; + if (!other.getDisplayName().isEmpty()) { + displayName_ = other.displayName_; + bitField0_ |= 0x00000010; + onChanged(); + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + bitField0_ |= 0x00000020; + onChanged(); + } + if (other.hasDraftApplicationConfigs()) { + mergeDraftApplicationConfigs(other.getDraftApplicationConfigs()); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + com.google.protobuf.MapEntry labels__ = + input.readMessage( + LabelsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableLabels() + .getMutableMap() + .put(labels__.getKey(), labels__.getValue()); + bitField0_ |= 0x00000008; + break; + } // case 26 + case 34: + { + displayName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 34 + case 42: + { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case 42 + case 50: + { + input.readMessage( + getDraftApplicationConfigsFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000040; + break; + } // case 50 + case 58: + { + input.readMessage(getUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 58 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * name of resource
+     * 
+ * + * string name = 1; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * name of resource
+     * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * name of resource
+     * 
+ * + * string name = 1; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * name of resource
+     * 
+ * + * string name = 1; + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * name of resource
+     * 
+ * + * string name = 1; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + createTimeBuilder_; + /** + * + * + *
+     * Output only. [Output only] Create timestamp
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * Output only. [Output only] Create timestamp
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. [Output only] Create timestamp
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + } else { + createTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. [Output only] Create timestamp
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. [Output only] Create timestamp
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && createTime_ != null + && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getCreateTimeBuilder().mergeFrom(value); + } else { + createTime_ = value; + } + } else { + createTimeBuilder_.mergeFrom(value); + } + if (createTime_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Output only. [Output only] Create timestamp
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearCreateTime() { + bitField0_ = (bitField0_ & ~0x00000002); + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. [Output only] Create timestamp
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. [Output only] Create timestamp
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } + } + /** + * + * + *
+     * Output only. [Output only] Create timestamp
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), getParentForChildren(), isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private com.google.protobuf.Timestamp updateTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + updateTimeBuilder_; + /** + * + * + *
+     * Output only. [Output only] Create timestamp
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+     * Output only. [Output only] Create timestamp
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + public com.google.protobuf.Timestamp getUpdateTime() { + if (updateTimeBuilder_ == null) { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } else { + return updateTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. [Output only] Create timestamp
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateTime_ = value; + } else { + updateTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. [Output only] Create timestamp
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (updateTimeBuilder_ == null) { + updateTime_ = builderForValue.build(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. [Output only] Create timestamp
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && updateTime_ != null + && updateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getUpdateTimeBuilder().mergeFrom(value); + } else { + updateTime_ = value; + } + } else { + updateTimeBuilder_.mergeFrom(value); + } + if (updateTime_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Output only. [Output only] Create timestamp
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearUpdateTime() { + bitField0_ = (bitField0_ & ~0x00000004); + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. [Output only] Create timestamp
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getUpdateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. [Output only] Create timestamp
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + if (updateTimeBuilder_ != null) { + return updateTimeBuilder_.getMessageOrBuilder(); + } else { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } + } + /** + * + * + *
+     * Output only. [Output only] Create timestamp
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + 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_; + } + + private com.google.protobuf.MapField labels_; + + private com.google.protobuf.MapField internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + + private com.google.protobuf.MapField + internalGetMutableLabels() { + if (labels_ == null) { + labels_ = com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry); + } + if (!labels_.isMutable()) { + labels_ = labels_.copy(); + } + bitField0_ |= 0x00000008; + onChanged(); + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + /** + * + * + *
+     * Labels as key value pairs
+     * 
+ * + * map<string, string> labels = 3; + */ + @java.lang.Override + public boolean containsLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetLabels().getMap().containsKey(key); + } + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + /** + * + * + *
+     * Labels as key value pairs
+     * 
+ * + * map<string, string> labels = 3; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + * + * + *
+     * Labels as key value pairs
+     * 
+ * + * map<string, string> labels = 3; + */ + @java.lang.Override + public /* nullable */ java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+     * Labels as key value pairs
+     * 
+ * + * map<string, string> labels = 3; + */ + @java.lang.Override + public java.lang.String getLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearLabels() { + bitField0_ = (bitField0_ & ~0x00000008); + internalGetMutableLabels().getMutableMap().clear(); + return this; + } + /** + * + * + *
+     * Labels as key value pairs
+     * 
+ * + * map<string, string> labels = 3; + */ + public Builder removeLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + internalGetMutableLabels().getMutableMap().remove(key); + return this; + } + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableLabels() { + bitField0_ |= 0x00000008; + return internalGetMutableLabels().getMutableMap(); + } + /** + * + * + *
+     * Labels as key value pairs
+     * 
+ * + * map<string, string> labels = 3; + */ + public Builder putLabels(java.lang.String key, java.lang.String value) { + if (key == null) { + throw new NullPointerException("map key"); + } + if (value == null) { + throw new NullPointerException("map value"); + } + internalGetMutableLabels().getMutableMap().put(key, value); + bitField0_ |= 0x00000008; + return this; + } + /** + * + * + *
+     * Labels as key value pairs
+     * 
+ * + * map<string, string> labels = 3; + */ + public Builder putAllLabels(java.util.Map values) { + internalGetMutableLabels().getMutableMap().putAll(values); + bitField0_ |= 0x00000008; + return this; + } + + private java.lang.Object displayName_ = ""; + /** + * + * + *
+     * Required. A user friendly display name for the solution.
+     * 
+ * + * string display_name = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The displayName. + */ + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. A user friendly display name for the solution.
+     * 
+ * + * string display_name = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for displayName. + */ + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. A user friendly display name for the solution.
+     * 
+ * + * string display_name = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + displayName_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. A user friendly display name for the solution.
+     * 
+ * + * string display_name = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearDisplayName() { + displayName_ = getDefaultInstance().getDisplayName(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. A user friendly display name for the solution.
+     * 
+ * + * string display_name = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + displayName_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + private java.lang.Object description_ = ""; + /** + * + * + *
+     * A description for this application.
+     * 
+ * + * string description = 5; + * + * @return The description. + */ + 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; + } + } + /** + * + * + *
+     * A description for this application.
+     * 
+ * + * string description = 5; + * + * @return The bytes for description. + */ + 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; + } + } + /** + * + * + *
+     * A description for this application.
+     * 
+ * + * string description = 5; + * + * @param value The description to set. + * @return This builder for chaining. + */ + public Builder setDescription(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + description_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * A description for this application.
+     * 
+ * + * string description = 5; + * + * @return This builder for chaining. + */ + public Builder clearDescription() { + description_ = getDefaultInstance().getDescription(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + return this; + } + /** + * + * + *
+     * A description for this application.
+     * 
+ * + * string description = 5; + * + * @param value The bytes for description to set. + * @return This builder for chaining. + */ + public Builder setDescriptionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + description_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + private com.google.cloud.visionai.v1.ApplicationConfigs draftApplicationConfigs_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.ApplicationConfigs, + com.google.cloud.visionai.v1.ApplicationConfigs.Builder, + com.google.cloud.visionai.v1.ApplicationConfigsOrBuilder> + draftApplicationConfigsBuilder_; + /** + * + * + *
+     * The draft application configs which haven't been updated to an application.
+     * 
+ * + * .google.cloud.visionai.v1.ApplicationConfigs draft_application_configs = 6; + * + * @return Whether the draftApplicationConfigs field is set. + */ + public boolean hasDraftApplicationConfigs() { + return ((bitField0_ & 0x00000040) != 0); + } + /** + * + * + *
+     * The draft application configs which haven't been updated to an application.
+     * 
+ * + * .google.cloud.visionai.v1.ApplicationConfigs draft_application_configs = 6; + * + * @return The draftApplicationConfigs. + */ + public com.google.cloud.visionai.v1.ApplicationConfigs getDraftApplicationConfigs() { + if (draftApplicationConfigsBuilder_ == null) { + return draftApplicationConfigs_ == null + ? com.google.cloud.visionai.v1.ApplicationConfigs.getDefaultInstance() + : draftApplicationConfigs_; + } else { + return draftApplicationConfigsBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The draft application configs which haven't been updated to an application.
+     * 
+ * + * .google.cloud.visionai.v1.ApplicationConfigs draft_application_configs = 6; + */ + public Builder setDraftApplicationConfigs( + com.google.cloud.visionai.v1.ApplicationConfigs value) { + if (draftApplicationConfigsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + draftApplicationConfigs_ = value; + } else { + draftApplicationConfigsBuilder_.setMessage(value); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * + * + *
+     * The draft application configs which haven't been updated to an application.
+     * 
+ * + * .google.cloud.visionai.v1.ApplicationConfigs draft_application_configs = 6; + */ + public Builder setDraftApplicationConfigs( + com.google.cloud.visionai.v1.ApplicationConfigs.Builder builderForValue) { + if (draftApplicationConfigsBuilder_ == null) { + draftApplicationConfigs_ = builderForValue.build(); + } else { + draftApplicationConfigsBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * + * + *
+     * The draft application configs which haven't been updated to an application.
+     * 
+ * + * .google.cloud.visionai.v1.ApplicationConfigs draft_application_configs = 6; + */ + public Builder mergeDraftApplicationConfigs( + com.google.cloud.visionai.v1.ApplicationConfigs value) { + if (draftApplicationConfigsBuilder_ == null) { + if (((bitField0_ & 0x00000040) != 0) + && draftApplicationConfigs_ != null + && draftApplicationConfigs_ + != com.google.cloud.visionai.v1.ApplicationConfigs.getDefaultInstance()) { + getDraftApplicationConfigsBuilder().mergeFrom(value); + } else { + draftApplicationConfigs_ = value; + } + } else { + draftApplicationConfigsBuilder_.mergeFrom(value); + } + if (draftApplicationConfigs_ != null) { + bitField0_ |= 0x00000040; + onChanged(); + } + return this; + } + /** + * + * + *
+     * The draft application configs which haven't been updated to an application.
+     * 
+ * + * .google.cloud.visionai.v1.ApplicationConfigs draft_application_configs = 6; + */ + public Builder clearDraftApplicationConfigs() { + bitField0_ = (bitField0_ & ~0x00000040); + draftApplicationConfigs_ = null; + if (draftApplicationConfigsBuilder_ != null) { + draftApplicationConfigsBuilder_.dispose(); + draftApplicationConfigsBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * The draft application configs which haven't been updated to an application.
+     * 
+ * + * .google.cloud.visionai.v1.ApplicationConfigs draft_application_configs = 6; + */ + public com.google.cloud.visionai.v1.ApplicationConfigs.Builder + getDraftApplicationConfigsBuilder() { + bitField0_ |= 0x00000040; + onChanged(); + return getDraftApplicationConfigsFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The draft application configs which haven't been updated to an application.
+     * 
+ * + * .google.cloud.visionai.v1.ApplicationConfigs draft_application_configs = 6; + */ + public com.google.cloud.visionai.v1.ApplicationConfigsOrBuilder + getDraftApplicationConfigsOrBuilder() { + if (draftApplicationConfigsBuilder_ != null) { + return draftApplicationConfigsBuilder_.getMessageOrBuilder(); + } else { + return draftApplicationConfigs_ == null + ? com.google.cloud.visionai.v1.ApplicationConfigs.getDefaultInstance() + : draftApplicationConfigs_; + } + } + /** + * + * + *
+     * The draft application configs which haven't been updated to an application.
+     * 
+ * + * .google.cloud.visionai.v1.ApplicationConfigs draft_application_configs = 6; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.ApplicationConfigs, + com.google.cloud.visionai.v1.ApplicationConfigs.Builder, + com.google.cloud.visionai.v1.ApplicationConfigsOrBuilder> + getDraftApplicationConfigsFieldBuilder() { + if (draftApplicationConfigsBuilder_ == null) { + draftApplicationConfigsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.ApplicationConfigs, + com.google.cloud.visionai.v1.ApplicationConfigs.Builder, + com.google.cloud.visionai.v1.ApplicationConfigsOrBuilder>( + getDraftApplicationConfigs(), getParentForChildren(), isClean()); + draftApplicationConfigs_ = null; + } + return draftApplicationConfigsBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.Draft) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.Draft) + private static final com.google.cloud.visionai.v1.Draft DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.Draft(); + } + + public static com.google.cloud.visionai.v1.Draft getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Draft parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.Draft getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DraftName.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DraftName.java new file mode 100644 index 000000000000..1f902188458e --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DraftName.java @@ -0,0 +1,259 @@ +/* + * Copyright 2024 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.visionai.v1; + +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") +public class DraftName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION_APPLICATION_DRAFT = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/applications/{application}/drafts/{draft}"); + private volatile Map fieldValuesMap; + private final String project; + private final String location; + private final String application; + private final String draft; + + @Deprecated + protected DraftName() { + project = null; + location = null; + application = null; + draft = null; + } + + private DraftName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + application = Preconditions.checkNotNull(builder.getApplication()); + draft = Preconditions.checkNotNull(builder.getDraft()); + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getApplication() { + return application; + } + + public String getDraft() { + return draft; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static DraftName of(String project, String location, String application, String draft) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setApplication(application) + .setDraft(draft) + .build(); + } + + public static String format(String project, String location, String application, String draft) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setApplication(application) + .setDraft(draft) + .build() + .toString(); + } + + public static DraftName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION_APPLICATION_DRAFT.validatedMatch( + formattedString, "DraftName.parse: formattedString not in valid format"); + return of( + matchMap.get("project"), + matchMap.get("location"), + matchMap.get("application"), + matchMap.get("draft")); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List values) { + List list = new ArrayList<>(values.size()); + for (DraftName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION_APPLICATION_DRAFT.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (project != null) { + fieldMapBuilder.put("project", project); + } + if (location != null) { + fieldMapBuilder.put("location", location); + } + if (application != null) { + fieldMapBuilder.put("application", application); + } + if (draft != null) { + fieldMapBuilder.put("draft", draft); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION_APPLICATION_DRAFT.instantiate( + "project", project, "location", location, "application", application, "draft", draft); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null && getClass() == o.getClass()) { + DraftName that = ((DraftName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location) + && Objects.equals(this.application, that.application) + && Objects.equals(this.draft, that.draft); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(project); + h *= 1000003; + h ^= Objects.hashCode(location); + h *= 1000003; + h ^= Objects.hashCode(application); + h *= 1000003; + h ^= Objects.hashCode(draft); + return h; + } + + /** + * Builder for projects/{project}/locations/{location}/applications/{application}/drafts/{draft}. + */ + public static class Builder { + private String project; + private String location; + private String application; + private String draft; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getApplication() { + return application; + } + + public String getDraft() { + return draft; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setApplication(String application) { + this.application = application; + return this; + } + + public Builder setDraft(String draft) { + this.draft = draft; + return this; + } + + private Builder(DraftName draftName) { + this.project = draftName.project; + this.location = draftName.location; + this.application = draftName.application; + this.draft = draftName.draft; + } + + public DraftName build() { + return new DraftName(this); + } + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DraftOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DraftOrBuilder.java new file mode 100644 index 000000000000..e314b124adb2 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/DraftOrBuilder.java @@ -0,0 +1,270 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/platform.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface DraftOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.Draft) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * name of resource
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * name of resource
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Output only. [Output only] Create timestamp
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + /** + * + * + *
+   * Output only. [Output only] Create timestamp
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + * + * + *
+   * Output only. [Output only] Create timestamp
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. [Output only] Create timestamp
+   * 
+ * + * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + /** + * + * + *
+   * Output only. [Output only] Create timestamp
+   * 
+ * + * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + /** + * + * + *
+   * Output only. [Output only] Create timestamp
+   * 
+ * + * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); + + /** + * + * + *
+   * Labels as key value pairs
+   * 
+ * + * map<string, string> labels = 3; + */ + int getLabelsCount(); + /** + * + * + *
+   * Labels as key value pairs
+   * 
+ * + * map<string, string> labels = 3; + */ + boolean containsLabels(java.lang.String key); + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Deprecated + java.util.Map getLabels(); + /** + * + * + *
+   * Labels as key value pairs
+   * 
+ * + * map<string, string> labels = 3; + */ + java.util.Map getLabelsMap(); + /** + * + * + *
+   * Labels as key value pairs
+   * 
+ * + * map<string, string> labels = 3; + */ + /* nullable */ + java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue); + /** + * + * + *
+   * Labels as key value pairs
+   * 
+ * + * map<string, string> labels = 3; + */ + java.lang.String getLabelsOrThrow(java.lang.String key); + + /** + * + * + *
+   * Required. A user friendly display name for the solution.
+   * 
+ * + * string display_name = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The displayName. + */ + java.lang.String getDisplayName(); + /** + * + * + *
+   * Required. A user friendly display name for the solution.
+   * 
+ * + * string display_name = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for displayName. + */ + com.google.protobuf.ByteString getDisplayNameBytes(); + + /** + * + * + *
+   * A description for this application.
+   * 
+ * + * string description = 5; + * + * @return The description. + */ + java.lang.String getDescription(); + /** + * + * + *
+   * A description for this application.
+   * 
+ * + * string description = 5; + * + * @return The bytes for description. + */ + com.google.protobuf.ByteString getDescriptionBytes(); + + /** + * + * + *
+   * The draft application configs which haven't been updated to an application.
+   * 
+ * + * .google.cloud.visionai.v1.ApplicationConfigs draft_application_configs = 6; + * + * @return Whether the draftApplicationConfigs field is set. + */ + boolean hasDraftApplicationConfigs(); + /** + * + * + *
+   * The draft application configs which haven't been updated to an application.
+   * 
+ * + * .google.cloud.visionai.v1.ApplicationConfigs draft_application_configs = 6; + * + * @return The draftApplicationConfigs. + */ + com.google.cloud.visionai.v1.ApplicationConfigs getDraftApplicationConfigs(); + /** + * + * + *
+   * The draft application configs which haven't been updated to an application.
+   * 
+ * + * .google.cloud.visionai.v1.ApplicationConfigs draft_application_configs = 6; + */ + com.google.cloud.visionai.v1.ApplicationConfigsOrBuilder getDraftApplicationConfigsOrBuilder(); +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/EagerMode.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/EagerMode.java new file mode 100644 index 000000000000..f5f60974d3b4 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/EagerMode.java @@ -0,0 +1,430 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/streaming_service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * The options for receiver under the eager mode.
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.EagerMode} + */ +public final class EagerMode extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.EagerMode) + EagerModeOrBuilder { + private static final long serialVersionUID = 0L; + // Use EagerMode.newBuilder() to construct. + private EagerMode(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private EagerMode() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new EagerMode(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.StreamingServiceProto + .internal_static_google_cloud_visionai_v1_EagerMode_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.StreamingServiceProto + .internal_static_google_cloud_visionai_v1_EagerMode_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.EagerMode.class, + com.google.cloud.visionai.v1.EagerMode.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 { + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += getUnknownFields().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.visionai.v1.EagerMode)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.EagerMode other = (com.google.cloud.visionai.v1.EagerMode) obj; + + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.EagerMode parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.EagerMode 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.visionai.v1.EagerMode parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.EagerMode 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.visionai.v1.EagerMode parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.EagerMode parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.EagerMode parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.EagerMode 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.visionai.v1.EagerMode parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.EagerMode 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.visionai.v1.EagerMode parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.EagerMode 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.visionai.v1.EagerMode 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 options for receiver under the eager mode.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.EagerMode} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.EagerMode) + com.google.cloud.visionai.v1.EagerModeOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.StreamingServiceProto + .internal_static_google_cloud_visionai_v1_EagerMode_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.StreamingServiceProto + .internal_static_google_cloud_visionai_v1_EagerMode_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.EagerMode.class, + com.google.cloud.visionai.v1.EagerMode.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.EagerMode.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.StreamingServiceProto + .internal_static_google_cloud_visionai_v1_EagerMode_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.EagerMode getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.EagerMode.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.EagerMode build() { + com.google.cloud.visionai.v1.EagerMode result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.EagerMode buildPartial() { + com.google.cloud.visionai.v1.EagerMode result = + new com.google.cloud.visionai.v1.EagerMode(this); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.EagerMode) { + return mergeFrom((com.google.cloud.visionai.v1.EagerMode) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.EagerMode other) { + if (other == com.google.cloud.visionai.v1.EagerMode.getDefaultInstance()) return this; + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.EagerMode) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.EagerMode) + private static final com.google.cloud.visionai.v1.EagerMode DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.EagerMode(); + } + + public static com.google.cloud.visionai.v1.EagerMode getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public EagerMode parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.EagerMode getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/EagerModeOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/EagerModeOrBuilder.java new file mode 100644 index 000000000000..35fbaee5582d --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/EagerModeOrBuilder.java @@ -0,0 +1,25 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/streaming_service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface EagerModeOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.EagerMode) + com.google.protobuf.MessageOrBuilder {} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/Event.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/Event.java new file mode 100644 index 000000000000..976939c619f6 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/Event.java @@ -0,0 +1,2456 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/streams_resources.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * Message describing the Event object.
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.Event} + */ +public final class Event extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.Event) + EventOrBuilder { + private static final long serialVersionUID = 0L; + // Use Event.newBuilder() to construct. + private Event(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Event() { + name_ = ""; + alignmentClock_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Event(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.StreamsResourcesProto + .internal_static_google_cloud_visionai_v1_Event_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 4: + return internalGetLabels(); + case 5: + return internalGetAnnotations(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.StreamsResourcesProto + .internal_static_google_cloud_visionai_v1_Event_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.Event.class, + com.google.cloud.visionai.v1.Event.Builder.class); + } + + /** + * + * + *
+   * Clock that will be used for joining streams.
+   * 
+ * + * Protobuf enum {@code google.cloud.visionai.v1.Event.Clock} + */ + public enum Clock implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Clock is not specified.
+     * 
+ * + * CLOCK_UNSPECIFIED = 0; + */ + CLOCK_UNSPECIFIED(0), + /** + * + * + *
+     * Use the timestamp when the data is captured. Clients need to sync the
+     * clock.
+     * 
+ * + * CAPTURE = 1; + */ + CAPTURE(1), + /** + * + * + *
+     * Use the timestamp when the data is received.
+     * 
+ * + * INGEST = 2; + */ + INGEST(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Clock is not specified.
+     * 
+ * + * CLOCK_UNSPECIFIED = 0; + */ + public static final int CLOCK_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * Use the timestamp when the data is captured. Clients need to sync the
+     * clock.
+     * 
+ * + * CAPTURE = 1; + */ + public static final int CAPTURE_VALUE = 1; + /** + * + * + *
+     * Use the timestamp when the data is received.
+     * 
+ * + * INGEST = 2; + */ + public static final int INGEST_VALUE = 2; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static Clock valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static Clock forNumber(int value) { + switch (value) { + case 0: + return CLOCK_UNSPECIFIED; + case 1: + return CAPTURE; + case 2: + return INGEST; + 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 Clock findValueByNumber(int number) { + return Clock.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + 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.visionai.v1.Event.getDescriptor().getEnumTypes().get(0); + } + + private static final Clock[] VALUES = values(); + + public static Clock 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 Clock(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.visionai.v1.Event.Clock) + } + + private int bitField0_; + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Name of the resource.
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + 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(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Name of the resource.
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CREATE_TIME_FIELD_NUMBER = 2; + private com.google.protobuf.Timestamp createTime_; + /** + * + * + *
+   * Output only. The create timestamp.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * Output only. The create timestamp.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + /** + * + * + *
+   * Output only. The create timestamp.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + + public static final int UPDATE_TIME_FIELD_NUMBER = 3; + private com.google.protobuf.Timestamp updateTime_; + /** + * + * + *
+   * Output only. The update timestamp.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + @java.lang.Override + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+   * Output only. The update timestamp.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getUpdateTime() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + /** + * + * + *
+   * Output only. The update timestamp.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + + public static final int LABELS_FIELD_NUMBER = 4; + + private static final class LabelsDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.cloud.visionai.v1.StreamsResourcesProto + .internal_static_google_cloud_visionai_v1_Event_LabelsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + + @SuppressWarnings("serial") + private com.google.protobuf.MapField labels_; + + private com.google.protobuf.MapField internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + /** + * + * + *
+   * Labels as key value pairs.
+   * 
+ * + * map<string, string> labels = 4; + */ + @java.lang.Override + public boolean containsLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetLabels().getMap().containsKey(key); + } + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + /** + * + * + *
+   * Labels as key value pairs.
+   * 
+ * + * map<string, string> labels = 4; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + * + * + *
+   * Labels as key value pairs.
+   * 
+ * + * map<string, string> labels = 4; + */ + @java.lang.Override + public /* nullable */ java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+   * Labels as key value pairs.
+   * 
+ * + * map<string, string> labels = 4; + */ + @java.lang.Override + public java.lang.String getLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int ANNOTATIONS_FIELD_NUMBER = 5; + + private static final class AnnotationsDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.cloud.visionai.v1.StreamsResourcesProto + .internal_static_google_cloud_visionai_v1_Event_AnnotationsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + + @SuppressWarnings("serial") + private com.google.protobuf.MapField annotations_; + + private com.google.protobuf.MapField + internalGetAnnotations() { + if (annotations_ == null) { + return com.google.protobuf.MapField.emptyMapField(AnnotationsDefaultEntryHolder.defaultEntry); + } + return annotations_; + } + + public int getAnnotationsCount() { + return internalGetAnnotations().getMap().size(); + } + /** + * + * + *
+   * Annotations to allow clients to store small amounts of arbitrary data.
+   * 
+ * + * map<string, string> annotations = 5; + */ + @java.lang.Override + public boolean containsAnnotations(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetAnnotations().getMap().containsKey(key); + } + /** Use {@link #getAnnotationsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getAnnotations() { + return getAnnotationsMap(); + } + /** + * + * + *
+   * Annotations to allow clients to store small amounts of arbitrary data.
+   * 
+ * + * map<string, string> annotations = 5; + */ + @java.lang.Override + public java.util.Map getAnnotationsMap() { + return internalGetAnnotations().getMap(); + } + /** + * + * + *
+   * Annotations to allow clients to store small amounts of arbitrary data.
+   * 
+ * + * map<string, string> annotations = 5; + */ + @java.lang.Override + public /* nullable */ java.lang.String getAnnotationsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetAnnotations().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+   * Annotations to allow clients to store small amounts of arbitrary data.
+   * 
+ * + * map<string, string> annotations = 5; + */ + @java.lang.Override + public java.lang.String getAnnotationsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetAnnotations().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int ALIGNMENT_CLOCK_FIELD_NUMBER = 6; + private int alignmentClock_ = 0; + /** + * + * + *
+   * The clock used for joining streams.
+   * 
+ * + * .google.cloud.visionai.v1.Event.Clock alignment_clock = 6; + * + * @return The enum numeric value on the wire for alignmentClock. + */ + @java.lang.Override + public int getAlignmentClockValue() { + return alignmentClock_; + } + /** + * + * + *
+   * The clock used for joining streams.
+   * 
+ * + * .google.cloud.visionai.v1.Event.Clock alignment_clock = 6; + * + * @return The alignmentClock. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.Event.Clock getAlignmentClock() { + com.google.cloud.visionai.v1.Event.Clock result = + com.google.cloud.visionai.v1.Event.Clock.forNumber(alignmentClock_); + return result == null ? com.google.cloud.visionai.v1.Event.Clock.UNRECOGNIZED : result; + } + + public static final int GRACE_PERIOD_FIELD_NUMBER = 7; + private com.google.protobuf.Duration gracePeriod_; + /** + * + * + *
+   * Grace period for cleaning up the event. This is the time the controller
+   * waits for before deleting the event. During this period, if there is any
+   * active channel on the event. The deletion of the event after grace_period
+   * will be ignored.
+   * 
+ * + * .google.protobuf.Duration grace_period = 7; + * + * @return Whether the gracePeriod field is set. + */ + @java.lang.Override + public boolean hasGracePeriod() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+   * Grace period for cleaning up the event. This is the time the controller
+   * waits for before deleting the event. During this period, if there is any
+   * active channel on the event. The deletion of the event after grace_period
+   * will be ignored.
+   * 
+ * + * .google.protobuf.Duration grace_period = 7; + * + * @return The gracePeriod. + */ + @java.lang.Override + public com.google.protobuf.Duration getGracePeriod() { + return gracePeriod_ == null ? com.google.protobuf.Duration.getDefaultInstance() : gracePeriod_; + } + /** + * + * + *
+   * Grace period for cleaning up the event. This is the time the controller
+   * waits for before deleting the event. During this period, if there is any
+   * active channel on the event. The deletion of the event after grace_period
+   * will be ignored.
+   * 
+ * + * .google.protobuf.Duration grace_period = 7; + */ + @java.lang.Override + public com.google.protobuf.DurationOrBuilder getGracePeriodOrBuilder() { + return gracePeriod_ == null ? com.google.protobuf.Duration.getDefaultInstance() : gracePeriod_; + } + + 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getCreateTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(3, getUpdateTime()); + } + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 4); + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, internalGetAnnotations(), AnnotationsDefaultEntryHolder.defaultEntry, 5); + if (alignmentClock_ != com.google.cloud.visionai.v1.Event.Clock.CLOCK_UNSPECIFIED.getNumber()) { + output.writeEnum(6, alignmentClock_); + } + if (((bitField0_ & 0x00000004) != 0)) { + output.writeMessage(7, getGracePeriod()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getCreateTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getUpdateTime()); + } + for (java.util.Map.Entry entry : + internalGetLabels().getMap().entrySet()) { + com.google.protobuf.MapEntry labels__ = + LabelsDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, labels__); + } + for (java.util.Map.Entry entry : + internalGetAnnotations().getMap().entrySet()) { + com.google.protobuf.MapEntry annotations__ = + AnnotationsDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, annotations__); + } + if (alignmentClock_ != com.google.cloud.visionai.v1.Event.Clock.CLOCK_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(6, alignmentClock_); + } + if (((bitField0_ & 0x00000004) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getGracePeriod()); + } + size += getUnknownFields().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.visionai.v1.Event)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.Event other = (com.google.cloud.visionai.v1.Event) obj; + + if (!getName().equals(other.getName())) return false; + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime().equals(other.getCreateTime())) return false; + } + if (hasUpdateTime() != other.hasUpdateTime()) return false; + if (hasUpdateTime()) { + if (!getUpdateTime().equals(other.getUpdateTime())) return false; + } + if (!internalGetLabels().equals(other.internalGetLabels())) return false; + if (!internalGetAnnotations().equals(other.internalGetAnnotations())) return false; + if (alignmentClock_ != other.alignmentClock_) return false; + if (hasGracePeriod() != other.hasGracePeriod()) return false; + if (hasGracePeriod()) { + if (!getGracePeriod().equals(other.getGracePeriod())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasUpdateTime()) { + hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getUpdateTime().hashCode(); + } + if (!internalGetLabels().getMap().isEmpty()) { + hash = (37 * hash) + LABELS_FIELD_NUMBER; + hash = (53 * hash) + internalGetLabels().hashCode(); + } + if (!internalGetAnnotations().getMap().isEmpty()) { + hash = (37 * hash) + ANNOTATIONS_FIELD_NUMBER; + hash = (53 * hash) + internalGetAnnotations().hashCode(); + } + hash = (37 * hash) + ALIGNMENT_CLOCK_FIELD_NUMBER; + hash = (53 * hash) + alignmentClock_; + if (hasGracePeriod()) { + hash = (37 * hash) + GRACE_PERIOD_FIELD_NUMBER; + hash = (53 * hash) + getGracePeriod().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.Event parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.Event 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.visionai.v1.Event parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.Event 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.visionai.v1.Event parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.Event parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.Event parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.Event 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.visionai.v1.Event parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.Event 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.visionai.v1.Event parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.Event 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.visionai.v1.Event 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; + } + /** + * + * + *
+   * Message describing the Event object.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.Event} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.Event) + com.google.cloud.visionai.v1.EventOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.StreamsResourcesProto + .internal_static_google_cloud_visionai_v1_Event_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 4: + return internalGetLabels(); + case 5: + return internalGetAnnotations(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( + int number) { + switch (number) { + case 4: + return internalGetMutableLabels(); + case 5: + return internalGetMutableAnnotations(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.StreamsResourcesProto + .internal_static_google_cloud_visionai_v1_Event_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.Event.class, + com.google.cloud.visionai.v1.Event.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.Event.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getCreateTimeFieldBuilder(); + getUpdateTimeFieldBuilder(); + getGracePeriodFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + internalGetMutableLabels().clear(); + internalGetMutableAnnotations().clear(); + alignmentClock_ = 0; + gracePeriod_ = null; + if (gracePeriodBuilder_ != null) { + gracePeriodBuilder_.dispose(); + gracePeriodBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.StreamsResourcesProto + .internal_static_google_cloud_visionai_v1_Event_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.Event getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.Event.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.Event build() { + com.google.cloud.visionai.v1.Event result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.Event buildPartial() { + com.google.cloud.visionai.v1.Event result = new com.google.cloud.visionai.v1.Event(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.visionai.v1.Event result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.updateTime_ = updateTimeBuilder_ == null ? updateTime_ : updateTimeBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.labels_ = internalGetLabels(); + result.labels_.makeImmutable(); + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.annotations_ = internalGetAnnotations(); + result.annotations_.makeImmutable(); + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.alignmentClock_ = alignmentClock_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.gracePeriod_ = + gracePeriodBuilder_ == null ? gracePeriod_ : gracePeriodBuilder_.build(); + to_bitField0_ |= 0x00000004; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.Event) { + return mergeFrom((com.google.cloud.visionai.v1.Event) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.Event other) { + if (other == com.google.cloud.visionai.v1.Event.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + internalGetMutableLabels().mergeFrom(other.internalGetLabels()); + bitField0_ |= 0x00000008; + internalGetMutableAnnotations().mergeFrom(other.internalGetAnnotations()); + bitField0_ |= 0x00000010; + if (other.alignmentClock_ != 0) { + setAlignmentClockValue(other.getAlignmentClockValue()); + } + if (other.hasGracePeriod()) { + mergeGracePeriod(other.getGracePeriod()); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage(getUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + com.google.protobuf.MapEntry labels__ = + input.readMessage( + LabelsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableLabels() + .getMutableMap() + .put(labels__.getKey(), labels__.getValue()); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + com.google.protobuf.MapEntry annotations__ = + input.readMessage( + AnnotationsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableAnnotations() + .getMutableMap() + .put(annotations__.getKey(), annotations__.getValue()); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 48: + { + alignmentClock_ = input.readEnum(); + bitField0_ |= 0x00000020; + break; + } // case 48 + case 58: + { + input.readMessage(getGracePeriodFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000040; + break; + } // case 58 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Name of the resource.
+     * 
+ * + * string name = 1; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Name of the resource.
+     * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Name of the resource.
+     * 
+ * + * string name = 1; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Name of the resource.
+     * 
+ * + * string name = 1; + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Name of the resource.
+     * 
+ * + * string name = 1; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + createTimeBuilder_; + /** + * + * + *
+     * Output only. The create timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * Output only. The create timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. The create timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + } else { + createTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The create timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The create timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && createTime_ != null + && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getCreateTimeBuilder().mergeFrom(value); + } else { + createTime_ = value; + } + } else { + createTimeBuilder_.mergeFrom(value); + } + if (createTime_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Output only. The create timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearCreateTime() { + bitField0_ = (bitField0_ & ~0x00000002); + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The create timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. The create timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } + } + /** + * + * + *
+     * Output only. The create timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), getParentForChildren(), isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private com.google.protobuf.Timestamp updateTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + updateTimeBuilder_; + /** + * + * + *
+     * Output only. The update timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+     * Output only. The update timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + public com.google.protobuf.Timestamp getUpdateTime() { + if (updateTimeBuilder_ == null) { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } else { + return updateTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. The update timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateTime_ = value; + } else { + updateTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The update timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (updateTimeBuilder_ == null) { + updateTime_ = builderForValue.build(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The update timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && updateTime_ != null + && updateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getUpdateTimeBuilder().mergeFrom(value); + } else { + updateTime_ = value; + } + } else { + updateTimeBuilder_.mergeFrom(value); + } + if (updateTime_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Output only. The update timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearUpdateTime() { + bitField0_ = (bitField0_ & ~0x00000004); + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The update timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getUpdateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. The update timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + if (updateTimeBuilder_ != null) { + return updateTimeBuilder_.getMessageOrBuilder(); + } else { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } + } + /** + * + * + *
+     * Output only. The update timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + 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_; + } + + private com.google.protobuf.MapField labels_; + + private com.google.protobuf.MapField internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + + private com.google.protobuf.MapField + internalGetMutableLabels() { + if (labels_ == null) { + labels_ = com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry); + } + if (!labels_.isMutable()) { + labels_ = labels_.copy(); + } + bitField0_ |= 0x00000008; + onChanged(); + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + /** + * + * + *
+     * Labels as key value pairs.
+     * 
+ * + * map<string, string> labels = 4; + */ + @java.lang.Override + public boolean containsLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetLabels().getMap().containsKey(key); + } + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + /** + * + * + *
+     * Labels as key value pairs.
+     * 
+ * + * map<string, string> labels = 4; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + * + * + *
+     * Labels as key value pairs.
+     * 
+ * + * map<string, string> labels = 4; + */ + @java.lang.Override + public /* nullable */ java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+     * Labels as key value pairs.
+     * 
+ * + * map<string, string> labels = 4; + */ + @java.lang.Override + public java.lang.String getLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearLabels() { + bitField0_ = (bitField0_ & ~0x00000008); + internalGetMutableLabels().getMutableMap().clear(); + return this; + } + /** + * + * + *
+     * Labels as key value pairs.
+     * 
+ * + * map<string, string> labels = 4; + */ + public Builder removeLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + internalGetMutableLabels().getMutableMap().remove(key); + return this; + } + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableLabels() { + bitField0_ |= 0x00000008; + return internalGetMutableLabels().getMutableMap(); + } + /** + * + * + *
+     * Labels as key value pairs.
+     * 
+ * + * map<string, string> labels = 4; + */ + public Builder putLabels(java.lang.String key, java.lang.String value) { + if (key == null) { + throw new NullPointerException("map key"); + } + if (value == null) { + throw new NullPointerException("map value"); + } + internalGetMutableLabels().getMutableMap().put(key, value); + bitField0_ |= 0x00000008; + return this; + } + /** + * + * + *
+     * Labels as key value pairs.
+     * 
+ * + * map<string, string> labels = 4; + */ + public Builder putAllLabels(java.util.Map values) { + internalGetMutableLabels().getMutableMap().putAll(values); + bitField0_ |= 0x00000008; + return this; + } + + private com.google.protobuf.MapField annotations_; + + private com.google.protobuf.MapField + internalGetAnnotations() { + if (annotations_ == null) { + return com.google.protobuf.MapField.emptyMapField( + AnnotationsDefaultEntryHolder.defaultEntry); + } + return annotations_; + } + + private com.google.protobuf.MapField + internalGetMutableAnnotations() { + if (annotations_ == null) { + annotations_ = + com.google.protobuf.MapField.newMapField(AnnotationsDefaultEntryHolder.defaultEntry); + } + if (!annotations_.isMutable()) { + annotations_ = annotations_.copy(); + } + bitField0_ |= 0x00000010; + onChanged(); + return annotations_; + } + + public int getAnnotationsCount() { + return internalGetAnnotations().getMap().size(); + } + /** + * + * + *
+     * Annotations to allow clients to store small amounts of arbitrary data.
+     * 
+ * + * map<string, string> annotations = 5; + */ + @java.lang.Override + public boolean containsAnnotations(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetAnnotations().getMap().containsKey(key); + } + /** Use {@link #getAnnotationsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getAnnotations() { + return getAnnotationsMap(); + } + /** + * + * + *
+     * Annotations to allow clients to store small amounts of arbitrary data.
+     * 
+ * + * map<string, string> annotations = 5; + */ + @java.lang.Override + public java.util.Map getAnnotationsMap() { + return internalGetAnnotations().getMap(); + } + /** + * + * + *
+     * Annotations to allow clients to store small amounts of arbitrary data.
+     * 
+ * + * map<string, string> annotations = 5; + */ + @java.lang.Override + public /* nullable */ java.lang.String getAnnotationsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetAnnotations().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+     * Annotations to allow clients to store small amounts of arbitrary data.
+     * 
+ * + * map<string, string> annotations = 5; + */ + @java.lang.Override + public java.lang.String getAnnotationsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetAnnotations().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearAnnotations() { + bitField0_ = (bitField0_ & ~0x00000010); + internalGetMutableAnnotations().getMutableMap().clear(); + return this; + } + /** + * + * + *
+     * Annotations to allow clients to store small amounts of arbitrary data.
+     * 
+ * + * map<string, string> annotations = 5; + */ + public Builder removeAnnotations(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + internalGetMutableAnnotations().getMutableMap().remove(key); + return this; + } + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableAnnotations() { + bitField0_ |= 0x00000010; + return internalGetMutableAnnotations().getMutableMap(); + } + /** + * + * + *
+     * Annotations to allow clients to store small amounts of arbitrary data.
+     * 
+ * + * map<string, string> annotations = 5; + */ + public Builder putAnnotations(java.lang.String key, java.lang.String value) { + if (key == null) { + throw new NullPointerException("map key"); + } + if (value == null) { + throw new NullPointerException("map value"); + } + internalGetMutableAnnotations().getMutableMap().put(key, value); + bitField0_ |= 0x00000010; + return this; + } + /** + * + * + *
+     * Annotations to allow clients to store small amounts of arbitrary data.
+     * 
+ * + * map<string, string> annotations = 5; + */ + public Builder putAllAnnotations(java.util.Map values) { + internalGetMutableAnnotations().getMutableMap().putAll(values); + bitField0_ |= 0x00000010; + return this; + } + + private int alignmentClock_ = 0; + /** + * + * + *
+     * The clock used for joining streams.
+     * 
+ * + * .google.cloud.visionai.v1.Event.Clock alignment_clock = 6; + * + * @return The enum numeric value on the wire for alignmentClock. + */ + @java.lang.Override + public int getAlignmentClockValue() { + return alignmentClock_; + } + /** + * + * + *
+     * The clock used for joining streams.
+     * 
+ * + * .google.cloud.visionai.v1.Event.Clock alignment_clock = 6; + * + * @param value The enum numeric value on the wire for alignmentClock to set. + * @return This builder for chaining. + */ + public Builder setAlignmentClockValue(int value) { + alignmentClock_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * The clock used for joining streams.
+     * 
+ * + * .google.cloud.visionai.v1.Event.Clock alignment_clock = 6; + * + * @return The alignmentClock. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.Event.Clock getAlignmentClock() { + com.google.cloud.visionai.v1.Event.Clock result = + com.google.cloud.visionai.v1.Event.Clock.forNumber(alignmentClock_); + return result == null ? com.google.cloud.visionai.v1.Event.Clock.UNRECOGNIZED : result; + } + /** + * + * + *
+     * The clock used for joining streams.
+     * 
+ * + * .google.cloud.visionai.v1.Event.Clock alignment_clock = 6; + * + * @param value The alignmentClock to set. + * @return This builder for chaining. + */ + public Builder setAlignmentClock(com.google.cloud.visionai.v1.Event.Clock value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000020; + alignmentClock_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * The clock used for joining streams.
+     * 
+ * + * .google.cloud.visionai.v1.Event.Clock alignment_clock = 6; + * + * @return This builder for chaining. + */ + public Builder clearAlignmentClock() { + bitField0_ = (bitField0_ & ~0x00000020); + alignmentClock_ = 0; + onChanged(); + return this; + } + + private com.google.protobuf.Duration gracePeriod_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + gracePeriodBuilder_; + /** + * + * + *
+     * Grace period for cleaning up the event. This is the time the controller
+     * waits for before deleting the event. During this period, if there is any
+     * active channel on the event. The deletion of the event after grace_period
+     * will be ignored.
+     * 
+ * + * .google.protobuf.Duration grace_period = 7; + * + * @return Whether the gracePeriod field is set. + */ + public boolean hasGracePeriod() { + return ((bitField0_ & 0x00000040) != 0); + } + /** + * + * + *
+     * Grace period for cleaning up the event. This is the time the controller
+     * waits for before deleting the event. During this period, if there is any
+     * active channel on the event. The deletion of the event after grace_period
+     * will be ignored.
+     * 
+ * + * .google.protobuf.Duration grace_period = 7; + * + * @return The gracePeriod. + */ + public com.google.protobuf.Duration getGracePeriod() { + if (gracePeriodBuilder_ == null) { + return gracePeriod_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : gracePeriod_; + } else { + return gracePeriodBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Grace period for cleaning up the event. This is the time the controller
+     * waits for before deleting the event. During this period, if there is any
+     * active channel on the event. The deletion of the event after grace_period
+     * will be ignored.
+     * 
+ * + * .google.protobuf.Duration grace_period = 7; + */ + public Builder setGracePeriod(com.google.protobuf.Duration value) { + if (gracePeriodBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + gracePeriod_ = value; + } else { + gracePeriodBuilder_.setMessage(value); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * + * + *
+     * Grace period for cleaning up the event. This is the time the controller
+     * waits for before deleting the event. During this period, if there is any
+     * active channel on the event. The deletion of the event after grace_period
+     * will be ignored.
+     * 
+ * + * .google.protobuf.Duration grace_period = 7; + */ + public Builder setGracePeriod(com.google.protobuf.Duration.Builder builderForValue) { + if (gracePeriodBuilder_ == null) { + gracePeriod_ = builderForValue.build(); + } else { + gracePeriodBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * + * + *
+     * Grace period for cleaning up the event. This is the time the controller
+     * waits for before deleting the event. During this period, if there is any
+     * active channel on the event. The deletion of the event after grace_period
+     * will be ignored.
+     * 
+ * + * .google.protobuf.Duration grace_period = 7; + */ + public Builder mergeGracePeriod(com.google.protobuf.Duration value) { + if (gracePeriodBuilder_ == null) { + if (((bitField0_ & 0x00000040) != 0) + && gracePeriod_ != null + && gracePeriod_ != com.google.protobuf.Duration.getDefaultInstance()) { + getGracePeriodBuilder().mergeFrom(value); + } else { + gracePeriod_ = value; + } + } else { + gracePeriodBuilder_.mergeFrom(value); + } + if (gracePeriod_ != null) { + bitField0_ |= 0x00000040; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Grace period for cleaning up the event. This is the time the controller
+     * waits for before deleting the event. During this period, if there is any
+     * active channel on the event. The deletion of the event after grace_period
+     * will be ignored.
+     * 
+ * + * .google.protobuf.Duration grace_period = 7; + */ + public Builder clearGracePeriod() { + bitField0_ = (bitField0_ & ~0x00000040); + gracePeriod_ = null; + if (gracePeriodBuilder_ != null) { + gracePeriodBuilder_.dispose(); + gracePeriodBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Grace period for cleaning up the event. This is the time the controller
+     * waits for before deleting the event. During this period, if there is any
+     * active channel on the event. The deletion of the event after grace_period
+     * will be ignored.
+     * 
+ * + * .google.protobuf.Duration grace_period = 7; + */ + public com.google.protobuf.Duration.Builder getGracePeriodBuilder() { + bitField0_ |= 0x00000040; + onChanged(); + return getGracePeriodFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Grace period for cleaning up the event. This is the time the controller
+     * waits for before deleting the event. During this period, if there is any
+     * active channel on the event. The deletion of the event after grace_period
+     * will be ignored.
+     * 
+ * + * .google.protobuf.Duration grace_period = 7; + */ + public com.google.protobuf.DurationOrBuilder getGracePeriodOrBuilder() { + if (gracePeriodBuilder_ != null) { + return gracePeriodBuilder_.getMessageOrBuilder(); + } else { + return gracePeriod_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : gracePeriod_; + } + } + /** + * + * + *
+     * Grace period for cleaning up the event. This is the time the controller
+     * waits for before deleting the event. During this period, if there is any
+     * active channel on the event. The deletion of the event after grace_period
+     * will be ignored.
+     * 
+ * + * .google.protobuf.Duration grace_period = 7; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + getGracePeriodFieldBuilder() { + if (gracePeriodBuilder_ == null) { + gracePeriodBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder>( + getGracePeriod(), getParentForChildren(), isClean()); + gracePeriod_ = null; + } + return gracePeriodBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.Event) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.Event) + private static final com.google.cloud.visionai.v1.Event DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.Event(); + } + + public static com.google.cloud.visionai.v1.Event getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Event parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.Event getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/EventName.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/EventName.java new file mode 100644 index 000000000000..5e976f521a6e --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/EventName.java @@ -0,0 +1,257 @@ +/* + * Copyright 2024 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.visionai.v1; + +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") +public class EventName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION_CLUSTER_EVENT = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/clusters/{cluster}/events/{event}"); + private volatile Map fieldValuesMap; + private final String project; + private final String location; + private final String cluster; + private final String event; + + @Deprecated + protected EventName() { + project = null; + location = null; + cluster = null; + event = null; + } + + private EventName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + cluster = Preconditions.checkNotNull(builder.getCluster()); + event = Preconditions.checkNotNull(builder.getEvent()); + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getCluster() { + return cluster; + } + + public String getEvent() { + return event; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static EventName of(String project, String location, String cluster, String event) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setCluster(cluster) + .setEvent(event) + .build(); + } + + public static String format(String project, String location, String cluster, String event) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setCluster(cluster) + .setEvent(event) + .build() + .toString(); + } + + public static EventName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION_CLUSTER_EVENT.validatedMatch( + formattedString, "EventName.parse: formattedString not in valid format"); + return of( + matchMap.get("project"), + matchMap.get("location"), + matchMap.get("cluster"), + matchMap.get("event")); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List values) { + List list = new ArrayList<>(values.size()); + for (EventName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION_CLUSTER_EVENT.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (project != null) { + fieldMapBuilder.put("project", project); + } + if (location != null) { + fieldMapBuilder.put("location", location); + } + if (cluster != null) { + fieldMapBuilder.put("cluster", cluster); + } + if (event != null) { + fieldMapBuilder.put("event", event); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION_CLUSTER_EVENT.instantiate( + "project", project, "location", location, "cluster", cluster, "event", event); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null && getClass() == o.getClass()) { + EventName that = ((EventName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location) + && Objects.equals(this.cluster, that.cluster) + && Objects.equals(this.event, that.event); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(project); + h *= 1000003; + h ^= Objects.hashCode(location); + h *= 1000003; + h ^= Objects.hashCode(cluster); + h *= 1000003; + h ^= Objects.hashCode(event); + return h; + } + + /** Builder for projects/{project}/locations/{location}/clusters/{cluster}/events/{event}. */ + public static class Builder { + private String project; + private String location; + private String cluster; + private String event; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getCluster() { + return cluster; + } + + public String getEvent() { + return event; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setCluster(String cluster) { + this.cluster = cluster; + return this; + } + + public Builder setEvent(String event) { + this.event = event; + return this; + } + + private Builder(EventName eventName) { + this.project = eventName.project; + this.location = eventName.location; + this.cluster = eventName.cluster; + this.event = eventName.event; + } + + public EventName build() { + return new EventName(this); + } + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/EventOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/EventOrBuilder.java new file mode 100644 index 000000000000..5d0e8d5717e2 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/EventOrBuilder.java @@ -0,0 +1,312 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/streams_resources.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface EventOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.Event) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Name of the resource.
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Name of the resource.
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Output only. The create timestamp.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + /** + * + * + *
+   * Output only. The create timestamp.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + * + * + *
+   * Output only. The create timestamp.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. The update timestamp.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + /** + * + * + *
+   * Output only. The update timestamp.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + /** + * + * + *
+   * Output only. The update timestamp.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); + + /** + * + * + *
+   * Labels as key value pairs.
+   * 
+ * + * map<string, string> labels = 4; + */ + int getLabelsCount(); + /** + * + * + *
+   * Labels as key value pairs.
+   * 
+ * + * map<string, string> labels = 4; + */ + boolean containsLabels(java.lang.String key); + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Deprecated + java.util.Map getLabels(); + /** + * + * + *
+   * Labels as key value pairs.
+   * 
+ * + * map<string, string> labels = 4; + */ + java.util.Map getLabelsMap(); + /** + * + * + *
+   * Labels as key value pairs.
+   * 
+ * + * map<string, string> labels = 4; + */ + /* nullable */ + java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue); + /** + * + * + *
+   * Labels as key value pairs.
+   * 
+ * + * map<string, string> labels = 4; + */ + java.lang.String getLabelsOrThrow(java.lang.String key); + + /** + * + * + *
+   * Annotations to allow clients to store small amounts of arbitrary data.
+   * 
+ * + * map<string, string> annotations = 5; + */ + int getAnnotationsCount(); + /** + * + * + *
+   * Annotations to allow clients to store small amounts of arbitrary data.
+   * 
+ * + * map<string, string> annotations = 5; + */ + boolean containsAnnotations(java.lang.String key); + /** Use {@link #getAnnotationsMap()} instead. */ + @java.lang.Deprecated + java.util.Map getAnnotations(); + /** + * + * + *
+   * Annotations to allow clients to store small amounts of arbitrary data.
+   * 
+ * + * map<string, string> annotations = 5; + */ + java.util.Map getAnnotationsMap(); + /** + * + * + *
+   * Annotations to allow clients to store small amounts of arbitrary data.
+   * 
+ * + * map<string, string> annotations = 5; + */ + /* nullable */ + java.lang.String getAnnotationsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue); + /** + * + * + *
+   * Annotations to allow clients to store small amounts of arbitrary data.
+   * 
+ * + * map<string, string> annotations = 5; + */ + java.lang.String getAnnotationsOrThrow(java.lang.String key); + + /** + * + * + *
+   * The clock used for joining streams.
+   * 
+ * + * .google.cloud.visionai.v1.Event.Clock alignment_clock = 6; + * + * @return The enum numeric value on the wire for alignmentClock. + */ + int getAlignmentClockValue(); + /** + * + * + *
+   * The clock used for joining streams.
+   * 
+ * + * .google.cloud.visionai.v1.Event.Clock alignment_clock = 6; + * + * @return The alignmentClock. + */ + com.google.cloud.visionai.v1.Event.Clock getAlignmentClock(); + + /** + * + * + *
+   * Grace period for cleaning up the event. This is the time the controller
+   * waits for before deleting the event. During this period, if there is any
+   * active channel on the event. The deletion of the event after grace_period
+   * will be ignored.
+   * 
+ * + * .google.protobuf.Duration grace_period = 7; + * + * @return Whether the gracePeriod field is set. + */ + boolean hasGracePeriod(); + /** + * + * + *
+   * Grace period for cleaning up the event. This is the time the controller
+   * waits for before deleting the event. During this period, if there is any
+   * active channel on the event. The deletion of the event after grace_period
+   * will be ignored.
+   * 
+ * + * .google.protobuf.Duration grace_period = 7; + * + * @return The gracePeriod. + */ + com.google.protobuf.Duration getGracePeriod(); + /** + * + * + *
+   * Grace period for cleaning up the event. This is the time the controller
+   * waits for before deleting the event. During this period, if there is any
+   * active channel on the event. The deletion of the event after grace_period
+   * will be ignored.
+   * 
+ * + * .google.protobuf.Duration grace_period = 7; + */ + com.google.protobuf.DurationOrBuilder getGracePeriodOrBuilder(); +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/EventUpdate.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/EventUpdate.java new file mode 100644 index 000000000000..79cb2ece0045 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/EventUpdate.java @@ -0,0 +1,1359 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/streaming_service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * The event update message.
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.EventUpdate} + */ +public final class EventUpdate extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.EventUpdate) + EventUpdateOrBuilder { + private static final long serialVersionUID = 0L; + // Use EventUpdate.newBuilder() to construct. + private EventUpdate(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private EventUpdate() { + stream_ = ""; + event_ = ""; + series_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new EventUpdate(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.StreamingServiceProto + .internal_static_google_cloud_visionai_v1_EventUpdate_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.StreamingServiceProto + .internal_static_google_cloud_visionai_v1_EventUpdate_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.EventUpdate.class, + com.google.cloud.visionai.v1.EventUpdate.Builder.class); + } + + private int bitField0_; + public static final int STREAM_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object stream_ = ""; + /** + * + * + *
+   * The name of the stream that the event is attached to.
+   * 
+ * + * string stream = 1; + * + * @return The stream. + */ + @java.lang.Override + public java.lang.String getStream() { + java.lang.Object ref = stream_; + 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(); + stream_ = s; + return s; + } + } + /** + * + * + *
+   * The name of the stream that the event is attached to.
+   * 
+ * + * string stream = 1; + * + * @return The bytes for stream. + */ + @java.lang.Override + public com.google.protobuf.ByteString getStreamBytes() { + java.lang.Object ref = stream_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + stream_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int EVENT_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object event_ = ""; + /** + * + * + *
+   * The name of the event.
+   * 
+ * + * string event = 2; + * + * @return The event. + */ + @java.lang.Override + public java.lang.String getEvent() { + java.lang.Object ref = event_; + 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(); + event_ = s; + return s; + } + } + /** + * + * + *
+   * The name of the event.
+   * 
+ * + * string event = 2; + * + * @return The bytes for event. + */ + @java.lang.Override + public com.google.protobuf.ByteString getEventBytes() { + java.lang.Object ref = event_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + event_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SERIES_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object series_ = ""; + /** + * + * + *
+   * The name of the series.
+   * 
+ * + * string series = 3; + * + * @return The series. + */ + @java.lang.Override + public java.lang.String getSeries() { + java.lang.Object ref = series_; + 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(); + series_ = s; + return s; + } + } + /** + * + * + *
+   * The name of the series.
+   * 
+ * + * string series = 3; + * + * @return The bytes for series. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSeriesBytes() { + java.lang.Object ref = series_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + series_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int UPDATE_TIME_FIELD_NUMBER = 4; + private com.google.protobuf.Timestamp updateTime_; + /** + * + * + *
+   * The timestamp when the Event update happens.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 4; + * + * @return Whether the updateTime field is set. + */ + @java.lang.Override + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * The timestamp when the Event update happens.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 4; + * + * @return The updateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getUpdateTime() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + /** + * + * + *
+   * The timestamp when the Event update happens.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 4; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + + public static final int OFFSET_FIELD_NUMBER = 5; + private long offset_ = 0L; + /** + * + * + *
+   * The offset of the message that will be used to acknowledge of the message
+   * receiving.
+   * 
+ * + * int64 offset = 5; + * + * @return The offset. + */ + @java.lang.Override + public long getOffset() { + return offset_; + } + + 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(stream_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, stream_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(event_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, event_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(series_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, series_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(4, getUpdateTime()); + } + if (offset_ != 0L) { + output.writeInt64(5, offset_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(stream_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, stream_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(event_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, event_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(series_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, series_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getUpdateTime()); + } + if (offset_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(5, offset_); + } + size += getUnknownFields().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.visionai.v1.EventUpdate)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.EventUpdate other = (com.google.cloud.visionai.v1.EventUpdate) obj; + + if (!getStream().equals(other.getStream())) return false; + if (!getEvent().equals(other.getEvent())) return false; + if (!getSeries().equals(other.getSeries())) return false; + if (hasUpdateTime() != other.hasUpdateTime()) return false; + if (hasUpdateTime()) { + if (!getUpdateTime().equals(other.getUpdateTime())) return false; + } + if (getOffset() != other.getOffset()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + STREAM_FIELD_NUMBER; + hash = (53 * hash) + getStream().hashCode(); + hash = (37 * hash) + EVENT_FIELD_NUMBER; + hash = (53 * hash) + getEvent().hashCode(); + hash = (37 * hash) + SERIES_FIELD_NUMBER; + hash = (53 * hash) + getSeries().hashCode(); + if (hasUpdateTime()) { + hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getUpdateTime().hashCode(); + } + hash = (37 * hash) + OFFSET_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getOffset()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.EventUpdate parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.EventUpdate 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.visionai.v1.EventUpdate parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.EventUpdate 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.visionai.v1.EventUpdate parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.EventUpdate parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.EventUpdate parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.EventUpdate 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.visionai.v1.EventUpdate parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.EventUpdate 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.visionai.v1.EventUpdate parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.EventUpdate 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.visionai.v1.EventUpdate 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 event update message.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.EventUpdate} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.EventUpdate) + com.google.cloud.visionai.v1.EventUpdateOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.StreamingServiceProto + .internal_static_google_cloud_visionai_v1_EventUpdate_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.StreamingServiceProto + .internal_static_google_cloud_visionai_v1_EventUpdate_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.EventUpdate.class, + com.google.cloud.visionai.v1.EventUpdate.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.EventUpdate.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getUpdateTimeFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + stream_ = ""; + event_ = ""; + series_ = ""; + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + offset_ = 0L; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.StreamingServiceProto + .internal_static_google_cloud_visionai_v1_EventUpdate_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.EventUpdate getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.EventUpdate.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.EventUpdate build() { + com.google.cloud.visionai.v1.EventUpdate result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.EventUpdate buildPartial() { + com.google.cloud.visionai.v1.EventUpdate result = + new com.google.cloud.visionai.v1.EventUpdate(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.visionai.v1.EventUpdate result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.stream_ = stream_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.event_ = event_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.series_ = series_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000008) != 0)) { + result.updateTime_ = updateTimeBuilder_ == null ? updateTime_ : updateTimeBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.offset_ = offset_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.EventUpdate) { + return mergeFrom((com.google.cloud.visionai.v1.EventUpdate) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.EventUpdate other) { + if (other == com.google.cloud.visionai.v1.EventUpdate.getDefaultInstance()) return this; + if (!other.getStream().isEmpty()) { + stream_ = other.stream_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getEvent().isEmpty()) { + event_ = other.event_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getSeries().isEmpty()) { + series_ = other.series_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + if (other.getOffset() != 0L) { + setOffset(other.getOffset()); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + stream_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + event_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + series_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + input.readMessage(getUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 40: + { + offset_ = input.readInt64(); + bitField0_ |= 0x00000010; + break; + } // case 40 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object stream_ = ""; + /** + * + * + *
+     * The name of the stream that the event is attached to.
+     * 
+ * + * string stream = 1; + * + * @return The stream. + */ + public java.lang.String getStream() { + java.lang.Object ref = stream_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + stream_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The name of the stream that the event is attached to.
+     * 
+ * + * string stream = 1; + * + * @return The bytes for stream. + */ + public com.google.protobuf.ByteString getStreamBytes() { + java.lang.Object ref = stream_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + stream_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The name of the stream that the event is attached to.
+     * 
+ * + * string stream = 1; + * + * @param value The stream to set. + * @return This builder for chaining. + */ + public Builder setStream(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + stream_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The name of the stream that the event is attached to.
+     * 
+ * + * string stream = 1; + * + * @return This builder for chaining. + */ + public Builder clearStream() { + stream_ = getDefaultInstance().getStream(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * The name of the stream that the event is attached to.
+     * 
+ * + * string stream = 1; + * + * @param value The bytes for stream to set. + * @return This builder for chaining. + */ + public Builder setStreamBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + stream_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object event_ = ""; + /** + * + * + *
+     * The name of the event.
+     * 
+ * + * string event = 2; + * + * @return The event. + */ + public java.lang.String getEvent() { + java.lang.Object ref = event_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + event_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The name of the event.
+     * 
+ * + * string event = 2; + * + * @return The bytes for event. + */ + public com.google.protobuf.ByteString getEventBytes() { + java.lang.Object ref = event_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + event_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The name of the event.
+     * 
+ * + * string event = 2; + * + * @param value The event to set. + * @return This builder for chaining. + */ + public Builder setEvent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + event_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * The name of the event.
+     * 
+ * + * string event = 2; + * + * @return This builder for chaining. + */ + public Builder clearEvent() { + event_ = getDefaultInstance().getEvent(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * The name of the event.
+     * 
+ * + * string event = 2; + * + * @param value The bytes for event to set. + * @return This builder for chaining. + */ + public Builder setEventBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + event_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object series_ = ""; + /** + * + * + *
+     * The name of the series.
+     * 
+ * + * string series = 3; + * + * @return The series. + */ + public java.lang.String getSeries() { + java.lang.Object ref = series_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + series_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The name of the series.
+     * 
+ * + * string series = 3; + * + * @return The bytes for series. + */ + public com.google.protobuf.ByteString getSeriesBytes() { + java.lang.Object ref = series_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + series_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The name of the series.
+     * 
+ * + * string series = 3; + * + * @param value The series to set. + * @return This builder for chaining. + */ + public Builder setSeries(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + series_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * The name of the series.
+     * 
+ * + * string series = 3; + * + * @return This builder for chaining. + */ + public Builder clearSeries() { + series_ = getDefaultInstance().getSeries(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * The name of the series.
+     * 
+ * + * string series = 3; + * + * @param value The bytes for series to set. + * @return This builder for chaining. + */ + public Builder setSeriesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + series_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp updateTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + updateTimeBuilder_; + /** + * + * + *
+     * The timestamp when the Event update happens.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 4; + * + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + * + * + *
+     * The timestamp when the Event update happens.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 4; + * + * @return The updateTime. + */ + public com.google.protobuf.Timestamp getUpdateTime() { + if (updateTimeBuilder_ == null) { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } else { + return updateTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The timestamp when the Event update happens.
+     * 
+ * + * .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; + } else { + updateTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * The timestamp when the Event update happens.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 4; + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (updateTimeBuilder_ == null) { + updateTime_ = builderForValue.build(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * The timestamp when the Event update happens.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 4; + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) + && updateTime_ != null + && updateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getUpdateTimeBuilder().mergeFrom(value); + } else { + updateTime_ = value; + } + } else { + updateTimeBuilder_.mergeFrom(value); + } + if (updateTime_ != null) { + bitField0_ |= 0x00000008; + onChanged(); + } + return this; + } + /** + * + * + *
+     * The timestamp when the Event update happens.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 4; + */ + public Builder clearUpdateTime() { + bitField0_ = (bitField0_ & ~0x00000008); + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * The timestamp when the Event update happens.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 4; + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return getUpdateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The timestamp when the Event update happens.
+     * 
+ * + * .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_; + } + } + /** + * + * + *
+     * The timestamp when the Event update happens.
+     * 
+ * + * .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_; + } + + private long offset_; + /** + * + * + *
+     * The offset of the message that will be used to acknowledge of the message
+     * receiving.
+     * 
+ * + * int64 offset = 5; + * + * @return The offset. + */ + @java.lang.Override + public long getOffset() { + return offset_; + } + /** + * + * + *
+     * The offset of the message that will be used to acknowledge of the message
+     * receiving.
+     * 
+ * + * int64 offset = 5; + * + * @param value The offset to set. + * @return This builder for chaining. + */ + public Builder setOffset(long value) { + + offset_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * The offset of the message that will be used to acknowledge of the message
+     * receiving.
+     * 
+ * + * int64 offset = 5; + * + * @return This builder for chaining. + */ + public Builder clearOffset() { + bitField0_ = (bitField0_ & ~0x00000010); + offset_ = 0L; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.EventUpdate) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.EventUpdate) + private static final com.google.cloud.visionai.v1.EventUpdate DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.EventUpdate(); + } + + public static com.google.cloud.visionai.v1.EventUpdate getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public EventUpdate parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.EventUpdate getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/EventUpdateOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/EventUpdateOrBuilder.java new file mode 100644 index 000000000000..e4351bd68240 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/EventUpdateOrBuilder.java @@ -0,0 +1,150 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/streaming_service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface EventUpdateOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.EventUpdate) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The name of the stream that the event is attached to.
+   * 
+ * + * string stream = 1; + * + * @return The stream. + */ + java.lang.String getStream(); + /** + * + * + *
+   * The name of the stream that the event is attached to.
+   * 
+ * + * string stream = 1; + * + * @return The bytes for stream. + */ + com.google.protobuf.ByteString getStreamBytes(); + + /** + * + * + *
+   * The name of the event.
+   * 
+ * + * string event = 2; + * + * @return The event. + */ + java.lang.String getEvent(); + /** + * + * + *
+   * The name of the event.
+   * 
+ * + * string event = 2; + * + * @return The bytes for event. + */ + com.google.protobuf.ByteString getEventBytes(); + + /** + * + * + *
+   * The name of the series.
+   * 
+ * + * string series = 3; + * + * @return The series. + */ + java.lang.String getSeries(); + /** + * + * + *
+   * The name of the series.
+   * 
+ * + * string series = 3; + * + * @return The bytes for series. + */ + com.google.protobuf.ByteString getSeriesBytes(); + + /** + * + * + *
+   * The timestamp when the Event update happens.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 4; + * + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + /** + * + * + *
+   * The timestamp when the Event update happens.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 4; + * + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + /** + * + * + *
+   * The timestamp when the Event update happens.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 4; + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); + + /** + * + * + *
+   * The offset of the message that will be used to acknowledge of the message
+   * receiving.
+   * 
+ * + * int64 offset = 5; + * + * @return The offset. + */ + long getOffset(); +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/FacetBucket.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/FacetBucket.java new file mode 100644 index 000000000000..ad4ec5f392ae --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/FacetBucket.java @@ -0,0 +1,2245 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/warehouse.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * Holds the facet value, selections state, and metadata.
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.FacetBucket} + */ +public final class FacetBucket extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.FacetBucket) + FacetBucketOrBuilder { + private static final long serialVersionUID = 0L; + // Use FacetBucket.newBuilder() to construct. + private FacetBucket(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private FacetBucket() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new FacetBucket(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_FacetBucket_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_FacetBucket_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.FacetBucket.class, + com.google.cloud.visionai.v1.FacetBucket.Builder.class); + } + + public interface RangeOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.FacetBucket.Range) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Start of the range. Non-existence indicates some bound (e.g. -inf).
+     * 
+ * + * .google.cloud.visionai.v1.FacetValue start = 1; + * + * @return Whether the start field is set. + */ + boolean hasStart(); + /** + * + * + *
+     * Start of the range. Non-existence indicates some bound (e.g. -inf).
+     * 
+ * + * .google.cloud.visionai.v1.FacetValue start = 1; + * + * @return The start. + */ + com.google.cloud.visionai.v1.FacetValue getStart(); + /** + * + * + *
+     * Start of the range. Non-existence indicates some bound (e.g. -inf).
+     * 
+ * + * .google.cloud.visionai.v1.FacetValue start = 1; + */ + com.google.cloud.visionai.v1.FacetValueOrBuilder getStartOrBuilder(); + + /** + * + * + *
+     * End of the range. Non-existence indicates some bound (e.g. inf).
+     * 
+ * + * .google.cloud.visionai.v1.FacetValue end = 2; + * + * @return Whether the end field is set. + */ + boolean hasEnd(); + /** + * + * + *
+     * End of the range. Non-existence indicates some bound (e.g. inf).
+     * 
+ * + * .google.cloud.visionai.v1.FacetValue end = 2; + * + * @return The end. + */ + com.google.cloud.visionai.v1.FacetValue getEnd(); + /** + * + * + *
+     * End of the range. Non-existence indicates some bound (e.g. inf).
+     * 
+ * + * .google.cloud.visionai.v1.FacetValue end = 2; + */ + com.google.cloud.visionai.v1.FacetValueOrBuilder getEndOrBuilder(); + } + /** + * + * + *
+   * The range of values [start, end) for which faceting is applied.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.FacetBucket.Range} + */ + public static final class Range extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.FacetBucket.Range) + RangeOrBuilder { + private static final long serialVersionUID = 0L; + // Use Range.newBuilder() to construct. + private Range(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Range() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Range(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_FacetBucket_Range_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_FacetBucket_Range_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.FacetBucket.Range.class, + com.google.cloud.visionai.v1.FacetBucket.Range.Builder.class); + } + + private int bitField0_; + public static final int START_FIELD_NUMBER = 1; + private com.google.cloud.visionai.v1.FacetValue start_; + /** + * + * + *
+     * Start of the range. Non-existence indicates some bound (e.g. -inf).
+     * 
+ * + * .google.cloud.visionai.v1.FacetValue start = 1; + * + * @return Whether the start field is set. + */ + @java.lang.Override + public boolean hasStart() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * Start of the range. Non-existence indicates some bound (e.g. -inf).
+     * 
+ * + * .google.cloud.visionai.v1.FacetValue start = 1; + * + * @return The start. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.FacetValue getStart() { + return start_ == null ? com.google.cloud.visionai.v1.FacetValue.getDefaultInstance() : start_; + } + /** + * + * + *
+     * Start of the range. Non-existence indicates some bound (e.g. -inf).
+     * 
+ * + * .google.cloud.visionai.v1.FacetValue start = 1; + */ + @java.lang.Override + public com.google.cloud.visionai.v1.FacetValueOrBuilder getStartOrBuilder() { + return start_ == null ? com.google.cloud.visionai.v1.FacetValue.getDefaultInstance() : start_; + } + + public static final int END_FIELD_NUMBER = 2; + private com.google.cloud.visionai.v1.FacetValue end_; + /** + * + * + *
+     * End of the range. Non-existence indicates some bound (e.g. inf).
+     * 
+ * + * .google.cloud.visionai.v1.FacetValue end = 2; + * + * @return Whether the end field is set. + */ + @java.lang.Override + public boolean hasEnd() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * End of the range. Non-existence indicates some bound (e.g. inf).
+     * 
+ * + * .google.cloud.visionai.v1.FacetValue end = 2; + * + * @return The end. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.FacetValue getEnd() { + return end_ == null ? com.google.cloud.visionai.v1.FacetValue.getDefaultInstance() : end_; + } + /** + * + * + *
+     * End of the range. Non-existence indicates some bound (e.g. inf).
+     * 
+ * + * .google.cloud.visionai.v1.FacetValue end = 2; + */ + @java.lang.Override + public com.google.cloud.visionai.v1.FacetValueOrBuilder getEndOrBuilder() { + return end_ == null ? com.google.cloud.visionai.v1.FacetValue.getDefaultInstance() : end_; + } + + 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 (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getStart()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(2, getEnd()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getStart()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getEnd()); + } + size += getUnknownFields().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.visionai.v1.FacetBucket.Range)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.FacetBucket.Range other = + (com.google.cloud.visionai.v1.FacetBucket.Range) obj; + + if (hasStart() != other.hasStart()) return false; + if (hasStart()) { + if (!getStart().equals(other.getStart())) return false; + } + if (hasEnd() != other.hasEnd()) return false; + if (hasEnd()) { + if (!getEnd().equals(other.getEnd())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasStart()) { + hash = (37 * hash) + START_FIELD_NUMBER; + hash = (53 * hash) + getStart().hashCode(); + } + if (hasEnd()) { + hash = (37 * hash) + END_FIELD_NUMBER; + hash = (53 * hash) + getEnd().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.FacetBucket.Range parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.FacetBucket.Range 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.visionai.v1.FacetBucket.Range parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.FacetBucket.Range 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.visionai.v1.FacetBucket.Range parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.FacetBucket.Range parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.FacetBucket.Range parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.FacetBucket.Range 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.visionai.v1.FacetBucket.Range parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.FacetBucket.Range 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.visionai.v1.FacetBucket.Range parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.FacetBucket.Range 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.visionai.v1.FacetBucket.Range 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 range of values [start, end) for which faceting is applied.
+     * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.FacetBucket.Range} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.FacetBucket.Range) + com.google.cloud.visionai.v1.FacetBucket.RangeOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_FacetBucket_Range_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_FacetBucket_Range_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.FacetBucket.Range.class, + com.google.cloud.visionai.v1.FacetBucket.Range.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.FacetBucket.Range.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getStartFieldBuilder(); + getEndFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + start_ = null; + if (startBuilder_ != null) { + startBuilder_.dispose(); + startBuilder_ = null; + } + end_ = null; + if (endBuilder_ != null) { + endBuilder_.dispose(); + endBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_FacetBucket_Range_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.FacetBucket.Range getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.FacetBucket.Range.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.FacetBucket.Range build() { + com.google.cloud.visionai.v1.FacetBucket.Range result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.FacetBucket.Range buildPartial() { + com.google.cloud.visionai.v1.FacetBucket.Range result = + new com.google.cloud.visionai.v1.FacetBucket.Range(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.visionai.v1.FacetBucket.Range result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.start_ = startBuilder_ == null ? start_ : startBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.end_ = endBuilder_ == null ? end_ : endBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.FacetBucket.Range) { + return mergeFrom((com.google.cloud.visionai.v1.FacetBucket.Range) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.FacetBucket.Range other) { + if (other == com.google.cloud.visionai.v1.FacetBucket.Range.getDefaultInstance()) + return this; + if (other.hasStart()) { + mergeStart(other.getStart()); + } + if (other.hasEnd()) { + mergeEnd(other.getEnd()); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getStartFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage(getEndFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.cloud.visionai.v1.FacetValue start_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.FacetValue, + com.google.cloud.visionai.v1.FacetValue.Builder, + com.google.cloud.visionai.v1.FacetValueOrBuilder> + startBuilder_; + /** + * + * + *
+       * Start of the range. Non-existence indicates some bound (e.g. -inf).
+       * 
+ * + * .google.cloud.visionai.v1.FacetValue start = 1; + * + * @return Whether the start field is set. + */ + public boolean hasStart() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+       * Start of the range. Non-existence indicates some bound (e.g. -inf).
+       * 
+ * + * .google.cloud.visionai.v1.FacetValue start = 1; + * + * @return The start. + */ + public com.google.cloud.visionai.v1.FacetValue getStart() { + if (startBuilder_ == null) { + return start_ == null + ? com.google.cloud.visionai.v1.FacetValue.getDefaultInstance() + : start_; + } else { + return startBuilder_.getMessage(); + } + } + /** + * + * + *
+       * Start of the range. Non-existence indicates some bound (e.g. -inf).
+       * 
+ * + * .google.cloud.visionai.v1.FacetValue start = 1; + */ + public Builder setStart(com.google.cloud.visionai.v1.FacetValue value) { + if (startBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + start_ = value; + } else { + startBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * Start of the range. Non-existence indicates some bound (e.g. -inf).
+       * 
+ * + * .google.cloud.visionai.v1.FacetValue start = 1; + */ + public Builder setStart(com.google.cloud.visionai.v1.FacetValue.Builder builderForValue) { + if (startBuilder_ == null) { + start_ = builderForValue.build(); + } else { + startBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * Start of the range. Non-existence indicates some bound (e.g. -inf).
+       * 
+ * + * .google.cloud.visionai.v1.FacetValue start = 1; + */ + public Builder mergeStart(com.google.cloud.visionai.v1.FacetValue value) { + if (startBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && start_ != null + && start_ != com.google.cloud.visionai.v1.FacetValue.getDefaultInstance()) { + getStartBuilder().mergeFrom(value); + } else { + start_ = value; + } + } else { + startBuilder_.mergeFrom(value); + } + if (start_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + /** + * + * + *
+       * Start of the range. Non-existence indicates some bound (e.g. -inf).
+       * 
+ * + * .google.cloud.visionai.v1.FacetValue start = 1; + */ + public Builder clearStart() { + bitField0_ = (bitField0_ & ~0x00000001); + start_ = null; + if (startBuilder_ != null) { + startBuilder_.dispose(); + startBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+       * Start of the range. Non-existence indicates some bound (e.g. -inf).
+       * 
+ * + * .google.cloud.visionai.v1.FacetValue start = 1; + */ + public com.google.cloud.visionai.v1.FacetValue.Builder getStartBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getStartFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Start of the range. Non-existence indicates some bound (e.g. -inf).
+       * 
+ * + * .google.cloud.visionai.v1.FacetValue start = 1; + */ + public com.google.cloud.visionai.v1.FacetValueOrBuilder getStartOrBuilder() { + if (startBuilder_ != null) { + return startBuilder_.getMessageOrBuilder(); + } else { + return start_ == null + ? com.google.cloud.visionai.v1.FacetValue.getDefaultInstance() + : start_; + } + } + /** + * + * + *
+       * Start of the range. Non-existence indicates some bound (e.g. -inf).
+       * 
+ * + * .google.cloud.visionai.v1.FacetValue start = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.FacetValue, + com.google.cloud.visionai.v1.FacetValue.Builder, + com.google.cloud.visionai.v1.FacetValueOrBuilder> + getStartFieldBuilder() { + if (startBuilder_ == null) { + startBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.FacetValue, + com.google.cloud.visionai.v1.FacetValue.Builder, + com.google.cloud.visionai.v1.FacetValueOrBuilder>( + getStart(), getParentForChildren(), isClean()); + start_ = null; + } + return startBuilder_; + } + + private com.google.cloud.visionai.v1.FacetValue end_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.FacetValue, + com.google.cloud.visionai.v1.FacetValue.Builder, + com.google.cloud.visionai.v1.FacetValueOrBuilder> + endBuilder_; + /** + * + * + *
+       * End of the range. Non-existence indicates some bound (e.g. inf).
+       * 
+ * + * .google.cloud.visionai.v1.FacetValue end = 2; + * + * @return Whether the end field is set. + */ + public boolean hasEnd() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+       * End of the range. Non-existence indicates some bound (e.g. inf).
+       * 
+ * + * .google.cloud.visionai.v1.FacetValue end = 2; + * + * @return The end. + */ + public com.google.cloud.visionai.v1.FacetValue getEnd() { + if (endBuilder_ == null) { + return end_ == null ? com.google.cloud.visionai.v1.FacetValue.getDefaultInstance() : end_; + } else { + return endBuilder_.getMessage(); + } + } + /** + * + * + *
+       * End of the range. Non-existence indicates some bound (e.g. inf).
+       * 
+ * + * .google.cloud.visionai.v1.FacetValue end = 2; + */ + public Builder setEnd(com.google.cloud.visionai.v1.FacetValue value) { + if (endBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + end_ = value; + } else { + endBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * End of the range. Non-existence indicates some bound (e.g. inf).
+       * 
+ * + * .google.cloud.visionai.v1.FacetValue end = 2; + */ + public Builder setEnd(com.google.cloud.visionai.v1.FacetValue.Builder builderForValue) { + if (endBuilder_ == null) { + end_ = builderForValue.build(); + } else { + endBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * End of the range. Non-existence indicates some bound (e.g. inf).
+       * 
+ * + * .google.cloud.visionai.v1.FacetValue end = 2; + */ + public Builder mergeEnd(com.google.cloud.visionai.v1.FacetValue value) { + if (endBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && end_ != null + && end_ != com.google.cloud.visionai.v1.FacetValue.getDefaultInstance()) { + getEndBuilder().mergeFrom(value); + } else { + end_ = value; + } + } else { + endBuilder_.mergeFrom(value); + } + if (end_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + /** + * + * + *
+       * End of the range. Non-existence indicates some bound (e.g. inf).
+       * 
+ * + * .google.cloud.visionai.v1.FacetValue end = 2; + */ + public Builder clearEnd() { + bitField0_ = (bitField0_ & ~0x00000002); + end_ = null; + if (endBuilder_ != null) { + endBuilder_.dispose(); + endBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+       * End of the range. Non-existence indicates some bound (e.g. inf).
+       * 
+ * + * .google.cloud.visionai.v1.FacetValue end = 2; + */ + public com.google.cloud.visionai.v1.FacetValue.Builder getEndBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getEndFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * End of the range. Non-existence indicates some bound (e.g. inf).
+       * 
+ * + * .google.cloud.visionai.v1.FacetValue end = 2; + */ + public com.google.cloud.visionai.v1.FacetValueOrBuilder getEndOrBuilder() { + if (endBuilder_ != null) { + return endBuilder_.getMessageOrBuilder(); + } else { + return end_ == null ? com.google.cloud.visionai.v1.FacetValue.getDefaultInstance() : end_; + } + } + /** + * + * + *
+       * End of the range. Non-existence indicates some bound (e.g. inf).
+       * 
+ * + * .google.cloud.visionai.v1.FacetValue end = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.FacetValue, + com.google.cloud.visionai.v1.FacetValue.Builder, + com.google.cloud.visionai.v1.FacetValueOrBuilder> + getEndFieldBuilder() { + if (endBuilder_ == null) { + endBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.FacetValue, + com.google.cloud.visionai.v1.FacetValue.Builder, + com.google.cloud.visionai.v1.FacetValueOrBuilder>( + getEnd(), getParentForChildren(), isClean()); + end_ = null; + } + return endBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.FacetBucket.Range) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.FacetBucket.Range) + private static final com.google.cloud.visionai.v1.FacetBucket.Range DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.FacetBucket.Range(); + } + + public static com.google.cloud.visionai.v1.FacetBucket.Range getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Range parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.FacetBucket.Range getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int bucketValueCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object bucketValue_; + + public enum BucketValueCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + VALUE(2), + RANGE(4), + BUCKETVALUE_NOT_SET(0); + private final int value; + + private BucketValueCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static BucketValueCase valueOf(int value) { + return forNumber(value); + } + + public static BucketValueCase forNumber(int value) { + switch (value) { + case 2: + return VALUE; + case 4: + return RANGE; + case 0: + return BUCKETVALUE_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public BucketValueCase getBucketValueCase() { + return BucketValueCase.forNumber(bucketValueCase_); + } + + public static final int VALUE_FIELD_NUMBER = 2; + /** + * + * + *
+   * Singular value.
+   * 
+ * + * .google.cloud.visionai.v1.FacetValue value = 2; + * + * @return Whether the value field is set. + */ + @java.lang.Override + public boolean hasValue() { + return bucketValueCase_ == 2; + } + /** + * + * + *
+   * Singular value.
+   * 
+ * + * .google.cloud.visionai.v1.FacetValue value = 2; + * + * @return The value. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.FacetValue getValue() { + if (bucketValueCase_ == 2) { + return (com.google.cloud.visionai.v1.FacetValue) bucketValue_; + } + return com.google.cloud.visionai.v1.FacetValue.getDefaultInstance(); + } + /** + * + * + *
+   * Singular value.
+   * 
+ * + * .google.cloud.visionai.v1.FacetValue value = 2; + */ + @java.lang.Override + public com.google.cloud.visionai.v1.FacetValueOrBuilder getValueOrBuilder() { + if (bucketValueCase_ == 2) { + return (com.google.cloud.visionai.v1.FacetValue) bucketValue_; + } + return com.google.cloud.visionai.v1.FacetValue.getDefaultInstance(); + } + + public static final int RANGE_FIELD_NUMBER = 4; + /** + * + * + *
+   * Range value.
+   * 
+ * + * .google.cloud.visionai.v1.FacetBucket.Range range = 4; + * + * @return Whether the range field is set. + */ + @java.lang.Override + public boolean hasRange() { + return bucketValueCase_ == 4; + } + /** + * + * + *
+   * Range value.
+   * 
+ * + * .google.cloud.visionai.v1.FacetBucket.Range range = 4; + * + * @return The range. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.FacetBucket.Range getRange() { + if (bucketValueCase_ == 4) { + return (com.google.cloud.visionai.v1.FacetBucket.Range) bucketValue_; + } + return com.google.cloud.visionai.v1.FacetBucket.Range.getDefaultInstance(); + } + /** + * + * + *
+   * Range value.
+   * 
+ * + * .google.cloud.visionai.v1.FacetBucket.Range range = 4; + */ + @java.lang.Override + public com.google.cloud.visionai.v1.FacetBucket.RangeOrBuilder getRangeOrBuilder() { + if (bucketValueCase_ == 4) { + return (com.google.cloud.visionai.v1.FacetBucket.Range) bucketValue_; + } + return com.google.cloud.visionai.v1.FacetBucket.Range.getDefaultInstance(); + } + + public static final int SELECTED_FIELD_NUMBER = 3; + private boolean selected_ = false; + /** + * + * + *
+   * Whether one facet bucket is selected. This field represents user's facet
+   * selection. It is set by frontend in SearchVideosRequest.
+   * 
+ * + * bool selected = 3; + * + * @return The selected. + */ + @java.lang.Override + public boolean getSelected() { + return selected_; + } + + 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 (bucketValueCase_ == 2) { + output.writeMessage(2, (com.google.cloud.visionai.v1.FacetValue) bucketValue_); + } + if (selected_ != false) { + output.writeBool(3, selected_); + } + if (bucketValueCase_ == 4) { + output.writeMessage(4, (com.google.cloud.visionai.v1.FacetBucket.Range) bucketValue_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (bucketValueCase_ == 2) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 2, (com.google.cloud.visionai.v1.FacetValue) bucketValue_); + } + if (selected_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(3, selected_); + } + if (bucketValueCase_ == 4) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 4, (com.google.cloud.visionai.v1.FacetBucket.Range) bucketValue_); + } + size += getUnknownFields().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.visionai.v1.FacetBucket)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.FacetBucket other = (com.google.cloud.visionai.v1.FacetBucket) obj; + + if (getSelected() != other.getSelected()) return false; + if (!getBucketValueCase().equals(other.getBucketValueCase())) return false; + switch (bucketValueCase_) { + case 2: + if (!getValue().equals(other.getValue())) return false; + break; + case 4: + if (!getRange().equals(other.getRange())) return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + SELECTED_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getSelected()); + switch (bucketValueCase_) { + case 2: + hash = (37 * hash) + VALUE_FIELD_NUMBER; + hash = (53 * hash) + getValue().hashCode(); + break; + case 4: + hash = (37 * hash) + RANGE_FIELD_NUMBER; + hash = (53 * hash) + getRange().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.FacetBucket parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.FacetBucket 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.visionai.v1.FacetBucket parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.FacetBucket 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.visionai.v1.FacetBucket parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.FacetBucket parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.FacetBucket parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.FacetBucket 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.visionai.v1.FacetBucket parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.FacetBucket 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.visionai.v1.FacetBucket parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.FacetBucket 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.visionai.v1.FacetBucket 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; + } + /** + * + * + *
+   * Holds the facet value, selections state, and metadata.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.FacetBucket} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.FacetBucket) + com.google.cloud.visionai.v1.FacetBucketOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_FacetBucket_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_FacetBucket_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.FacetBucket.class, + com.google.cloud.visionai.v1.FacetBucket.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.FacetBucket.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (valueBuilder_ != null) { + valueBuilder_.clear(); + } + if (rangeBuilder_ != null) { + rangeBuilder_.clear(); + } + selected_ = false; + bucketValueCase_ = 0; + bucketValue_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_FacetBucket_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.FacetBucket getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.FacetBucket.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.FacetBucket build() { + com.google.cloud.visionai.v1.FacetBucket result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.FacetBucket buildPartial() { + com.google.cloud.visionai.v1.FacetBucket result = + new com.google.cloud.visionai.v1.FacetBucket(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.visionai.v1.FacetBucket result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.selected_ = selected_; + } + } + + private void buildPartialOneofs(com.google.cloud.visionai.v1.FacetBucket result) { + result.bucketValueCase_ = bucketValueCase_; + result.bucketValue_ = this.bucketValue_; + if (bucketValueCase_ == 2 && valueBuilder_ != null) { + result.bucketValue_ = valueBuilder_.build(); + } + if (bucketValueCase_ == 4 && rangeBuilder_ != null) { + result.bucketValue_ = rangeBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.FacetBucket) { + return mergeFrom((com.google.cloud.visionai.v1.FacetBucket) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.FacetBucket other) { + if (other == com.google.cloud.visionai.v1.FacetBucket.getDefaultInstance()) return this; + if (other.getSelected() != false) { + setSelected(other.getSelected()); + } + switch (other.getBucketValueCase()) { + case VALUE: + { + mergeValue(other.getValue()); + break; + } + case RANGE: + { + mergeRange(other.getRange()); + break; + } + case BUCKETVALUE_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 18: + { + input.readMessage(getValueFieldBuilder().getBuilder(), extensionRegistry); + bucketValueCase_ = 2; + break; + } // case 18 + case 24: + { + selected_ = input.readBool(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 34: + { + input.readMessage(getRangeFieldBuilder().getBuilder(), extensionRegistry); + bucketValueCase_ = 4; + break; + } // case 34 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bucketValueCase_ = 0; + private java.lang.Object bucketValue_; + + public BucketValueCase getBucketValueCase() { + return BucketValueCase.forNumber(bucketValueCase_); + } + + public Builder clearBucketValue() { + bucketValueCase_ = 0; + bucketValue_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.FacetValue, + com.google.cloud.visionai.v1.FacetValue.Builder, + com.google.cloud.visionai.v1.FacetValueOrBuilder> + valueBuilder_; + /** + * + * + *
+     * Singular value.
+     * 
+ * + * .google.cloud.visionai.v1.FacetValue value = 2; + * + * @return Whether the value field is set. + */ + @java.lang.Override + public boolean hasValue() { + return bucketValueCase_ == 2; + } + /** + * + * + *
+     * Singular value.
+     * 
+ * + * .google.cloud.visionai.v1.FacetValue value = 2; + * + * @return The value. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.FacetValue getValue() { + if (valueBuilder_ == null) { + if (bucketValueCase_ == 2) { + return (com.google.cloud.visionai.v1.FacetValue) bucketValue_; + } + return com.google.cloud.visionai.v1.FacetValue.getDefaultInstance(); + } else { + if (bucketValueCase_ == 2) { + return valueBuilder_.getMessage(); + } + return com.google.cloud.visionai.v1.FacetValue.getDefaultInstance(); + } + } + /** + * + * + *
+     * Singular value.
+     * 
+ * + * .google.cloud.visionai.v1.FacetValue value = 2; + */ + public Builder setValue(com.google.cloud.visionai.v1.FacetValue value) { + if (valueBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + bucketValue_ = value; + onChanged(); + } else { + valueBuilder_.setMessage(value); + } + bucketValueCase_ = 2; + return this; + } + /** + * + * + *
+     * Singular value.
+     * 
+ * + * .google.cloud.visionai.v1.FacetValue value = 2; + */ + public Builder setValue(com.google.cloud.visionai.v1.FacetValue.Builder builderForValue) { + if (valueBuilder_ == null) { + bucketValue_ = builderForValue.build(); + onChanged(); + } else { + valueBuilder_.setMessage(builderForValue.build()); + } + bucketValueCase_ = 2; + return this; + } + /** + * + * + *
+     * Singular value.
+     * 
+ * + * .google.cloud.visionai.v1.FacetValue value = 2; + */ + public Builder mergeValue(com.google.cloud.visionai.v1.FacetValue value) { + if (valueBuilder_ == null) { + if (bucketValueCase_ == 2 + && bucketValue_ != com.google.cloud.visionai.v1.FacetValue.getDefaultInstance()) { + bucketValue_ = + com.google.cloud.visionai.v1.FacetValue.newBuilder( + (com.google.cloud.visionai.v1.FacetValue) bucketValue_) + .mergeFrom(value) + .buildPartial(); + } else { + bucketValue_ = value; + } + onChanged(); + } else { + if (bucketValueCase_ == 2) { + valueBuilder_.mergeFrom(value); + } else { + valueBuilder_.setMessage(value); + } + } + bucketValueCase_ = 2; + return this; + } + /** + * + * + *
+     * Singular value.
+     * 
+ * + * .google.cloud.visionai.v1.FacetValue value = 2; + */ + public Builder clearValue() { + if (valueBuilder_ == null) { + if (bucketValueCase_ == 2) { + bucketValueCase_ = 0; + bucketValue_ = null; + onChanged(); + } + } else { + if (bucketValueCase_ == 2) { + bucketValueCase_ = 0; + bucketValue_ = null; + } + valueBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Singular value.
+     * 
+ * + * .google.cloud.visionai.v1.FacetValue value = 2; + */ + public com.google.cloud.visionai.v1.FacetValue.Builder getValueBuilder() { + return getValueFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Singular value.
+     * 
+ * + * .google.cloud.visionai.v1.FacetValue value = 2; + */ + @java.lang.Override + public com.google.cloud.visionai.v1.FacetValueOrBuilder getValueOrBuilder() { + if ((bucketValueCase_ == 2) && (valueBuilder_ != null)) { + return valueBuilder_.getMessageOrBuilder(); + } else { + if (bucketValueCase_ == 2) { + return (com.google.cloud.visionai.v1.FacetValue) bucketValue_; + } + return com.google.cloud.visionai.v1.FacetValue.getDefaultInstance(); + } + } + /** + * + * + *
+     * Singular value.
+     * 
+ * + * .google.cloud.visionai.v1.FacetValue value = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.FacetValue, + com.google.cloud.visionai.v1.FacetValue.Builder, + com.google.cloud.visionai.v1.FacetValueOrBuilder> + getValueFieldBuilder() { + if (valueBuilder_ == null) { + if (!(bucketValueCase_ == 2)) { + bucketValue_ = com.google.cloud.visionai.v1.FacetValue.getDefaultInstance(); + } + valueBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.FacetValue, + com.google.cloud.visionai.v1.FacetValue.Builder, + com.google.cloud.visionai.v1.FacetValueOrBuilder>( + (com.google.cloud.visionai.v1.FacetValue) bucketValue_, + getParentForChildren(), + isClean()); + bucketValue_ = null; + } + bucketValueCase_ = 2; + onChanged(); + return valueBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.FacetBucket.Range, + com.google.cloud.visionai.v1.FacetBucket.Range.Builder, + com.google.cloud.visionai.v1.FacetBucket.RangeOrBuilder> + rangeBuilder_; + /** + * + * + *
+     * Range value.
+     * 
+ * + * .google.cloud.visionai.v1.FacetBucket.Range range = 4; + * + * @return Whether the range field is set. + */ + @java.lang.Override + public boolean hasRange() { + return bucketValueCase_ == 4; + } + /** + * + * + *
+     * Range value.
+     * 
+ * + * .google.cloud.visionai.v1.FacetBucket.Range range = 4; + * + * @return The range. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.FacetBucket.Range getRange() { + if (rangeBuilder_ == null) { + if (bucketValueCase_ == 4) { + return (com.google.cloud.visionai.v1.FacetBucket.Range) bucketValue_; + } + return com.google.cloud.visionai.v1.FacetBucket.Range.getDefaultInstance(); + } else { + if (bucketValueCase_ == 4) { + return rangeBuilder_.getMessage(); + } + return com.google.cloud.visionai.v1.FacetBucket.Range.getDefaultInstance(); + } + } + /** + * + * + *
+     * Range value.
+     * 
+ * + * .google.cloud.visionai.v1.FacetBucket.Range range = 4; + */ + public Builder setRange(com.google.cloud.visionai.v1.FacetBucket.Range value) { + if (rangeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + bucketValue_ = value; + onChanged(); + } else { + rangeBuilder_.setMessage(value); + } + bucketValueCase_ = 4; + return this; + } + /** + * + * + *
+     * Range value.
+     * 
+ * + * .google.cloud.visionai.v1.FacetBucket.Range range = 4; + */ + public Builder setRange( + com.google.cloud.visionai.v1.FacetBucket.Range.Builder builderForValue) { + if (rangeBuilder_ == null) { + bucketValue_ = builderForValue.build(); + onChanged(); + } else { + rangeBuilder_.setMessage(builderForValue.build()); + } + bucketValueCase_ = 4; + return this; + } + /** + * + * + *
+     * Range value.
+     * 
+ * + * .google.cloud.visionai.v1.FacetBucket.Range range = 4; + */ + public Builder mergeRange(com.google.cloud.visionai.v1.FacetBucket.Range value) { + if (rangeBuilder_ == null) { + if (bucketValueCase_ == 4 + && bucketValue_ + != com.google.cloud.visionai.v1.FacetBucket.Range.getDefaultInstance()) { + bucketValue_ = + com.google.cloud.visionai.v1.FacetBucket.Range.newBuilder( + (com.google.cloud.visionai.v1.FacetBucket.Range) bucketValue_) + .mergeFrom(value) + .buildPartial(); + } else { + bucketValue_ = value; + } + onChanged(); + } else { + if (bucketValueCase_ == 4) { + rangeBuilder_.mergeFrom(value); + } else { + rangeBuilder_.setMessage(value); + } + } + bucketValueCase_ = 4; + return this; + } + /** + * + * + *
+     * Range value.
+     * 
+ * + * .google.cloud.visionai.v1.FacetBucket.Range range = 4; + */ + public Builder clearRange() { + if (rangeBuilder_ == null) { + if (bucketValueCase_ == 4) { + bucketValueCase_ = 0; + bucketValue_ = null; + onChanged(); + } + } else { + if (bucketValueCase_ == 4) { + bucketValueCase_ = 0; + bucketValue_ = null; + } + rangeBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Range value.
+     * 
+ * + * .google.cloud.visionai.v1.FacetBucket.Range range = 4; + */ + public com.google.cloud.visionai.v1.FacetBucket.Range.Builder getRangeBuilder() { + return getRangeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Range value.
+     * 
+ * + * .google.cloud.visionai.v1.FacetBucket.Range range = 4; + */ + @java.lang.Override + public com.google.cloud.visionai.v1.FacetBucket.RangeOrBuilder getRangeOrBuilder() { + if ((bucketValueCase_ == 4) && (rangeBuilder_ != null)) { + return rangeBuilder_.getMessageOrBuilder(); + } else { + if (bucketValueCase_ == 4) { + return (com.google.cloud.visionai.v1.FacetBucket.Range) bucketValue_; + } + return com.google.cloud.visionai.v1.FacetBucket.Range.getDefaultInstance(); + } + } + /** + * + * + *
+     * Range value.
+     * 
+ * + * .google.cloud.visionai.v1.FacetBucket.Range range = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.FacetBucket.Range, + com.google.cloud.visionai.v1.FacetBucket.Range.Builder, + com.google.cloud.visionai.v1.FacetBucket.RangeOrBuilder> + getRangeFieldBuilder() { + if (rangeBuilder_ == null) { + if (!(bucketValueCase_ == 4)) { + bucketValue_ = com.google.cloud.visionai.v1.FacetBucket.Range.getDefaultInstance(); + } + rangeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.FacetBucket.Range, + com.google.cloud.visionai.v1.FacetBucket.Range.Builder, + com.google.cloud.visionai.v1.FacetBucket.RangeOrBuilder>( + (com.google.cloud.visionai.v1.FacetBucket.Range) bucketValue_, + getParentForChildren(), + isClean()); + bucketValue_ = null; + } + bucketValueCase_ = 4; + onChanged(); + return rangeBuilder_; + } + + private boolean selected_; + /** + * + * + *
+     * Whether one facet bucket is selected. This field represents user's facet
+     * selection. It is set by frontend in SearchVideosRequest.
+     * 
+ * + * bool selected = 3; + * + * @return The selected. + */ + @java.lang.Override + public boolean getSelected() { + return selected_; + } + /** + * + * + *
+     * Whether one facet bucket is selected. This field represents user's facet
+     * selection. It is set by frontend in SearchVideosRequest.
+     * 
+ * + * bool selected = 3; + * + * @param value The selected to set. + * @return This builder for chaining. + */ + public Builder setSelected(boolean value) { + + selected_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Whether one facet bucket is selected. This field represents user's facet
+     * selection. It is set by frontend in SearchVideosRequest.
+     * 
+ * + * bool selected = 3; + * + * @return This builder for chaining. + */ + public Builder clearSelected() { + bitField0_ = (bitField0_ & ~0x00000004); + selected_ = false; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.FacetBucket) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.FacetBucket) + private static final com.google.cloud.visionai.v1.FacetBucket DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.FacetBucket(); + } + + public static com.google.cloud.visionai.v1.FacetBucket getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public FacetBucket parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.FacetBucket getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/FacetBucketOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/FacetBucketOrBuilder.java new file mode 100644 index 000000000000..ae4fcacb15a3 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/FacetBucketOrBuilder.java @@ -0,0 +1,112 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/warehouse.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface FacetBucketOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.FacetBucket) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Singular value.
+   * 
+ * + * .google.cloud.visionai.v1.FacetValue value = 2; + * + * @return Whether the value field is set. + */ + boolean hasValue(); + /** + * + * + *
+   * Singular value.
+   * 
+ * + * .google.cloud.visionai.v1.FacetValue value = 2; + * + * @return The value. + */ + com.google.cloud.visionai.v1.FacetValue getValue(); + /** + * + * + *
+   * Singular value.
+   * 
+ * + * .google.cloud.visionai.v1.FacetValue value = 2; + */ + com.google.cloud.visionai.v1.FacetValueOrBuilder getValueOrBuilder(); + + /** + * + * + *
+   * Range value.
+   * 
+ * + * .google.cloud.visionai.v1.FacetBucket.Range range = 4; + * + * @return Whether the range field is set. + */ + boolean hasRange(); + /** + * + * + *
+   * Range value.
+   * 
+ * + * .google.cloud.visionai.v1.FacetBucket.Range range = 4; + * + * @return The range. + */ + com.google.cloud.visionai.v1.FacetBucket.Range getRange(); + /** + * + * + *
+   * Range value.
+   * 
+ * + * .google.cloud.visionai.v1.FacetBucket.Range range = 4; + */ + com.google.cloud.visionai.v1.FacetBucket.RangeOrBuilder getRangeOrBuilder(); + + /** + * + * + *
+   * Whether one facet bucket is selected. This field represents user's facet
+   * selection. It is set by frontend in SearchVideosRequest.
+   * 
+ * + * bool selected = 3; + * + * @return The selected. + */ + boolean getSelected(); + + com.google.cloud.visionai.v1.FacetBucket.BucketValueCase getBucketValueCase(); +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/FacetBucketType.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/FacetBucketType.java new file mode 100644 index 000000000000..109ecae0ae2f --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/FacetBucketType.java @@ -0,0 +1,221 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/warehouse.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * Different types for a facet bucket.
+ * 
+ * + * Protobuf enum {@code google.cloud.visionai.v1.FacetBucketType} + */ +public enum FacetBucketType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+   * Unspecified type.
+   * 
+ * + * FACET_BUCKET_TYPE_UNSPECIFIED = 0; + */ + FACET_BUCKET_TYPE_UNSPECIFIED(0), + /** + * + * + *
+   * Value type.
+   * 
+ * + * FACET_BUCKET_TYPE_VALUE = 1; + */ + FACET_BUCKET_TYPE_VALUE(1), + /** + * + * + *
+   * Datetime type.
+   * 
+ * + * FACET_BUCKET_TYPE_DATETIME = 2; + */ + FACET_BUCKET_TYPE_DATETIME(2), + /** + * + * + *
+   * Fixed Range type.
+   * 
+ * + * FACET_BUCKET_TYPE_FIXED_RANGE = 3; + */ + FACET_BUCKET_TYPE_FIXED_RANGE(3), + /** + * + * + *
+   * Custom Range type.
+   * 
+ * + * FACET_BUCKET_TYPE_CUSTOM_RANGE = 4; + */ + FACET_BUCKET_TYPE_CUSTOM_RANGE(4), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+   * Unspecified type.
+   * 
+ * + * FACET_BUCKET_TYPE_UNSPECIFIED = 0; + */ + public static final int FACET_BUCKET_TYPE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+   * Value type.
+   * 
+ * + * FACET_BUCKET_TYPE_VALUE = 1; + */ + public static final int FACET_BUCKET_TYPE_VALUE_VALUE = 1; + /** + * + * + *
+   * Datetime type.
+   * 
+ * + * FACET_BUCKET_TYPE_DATETIME = 2; + */ + public static final int FACET_BUCKET_TYPE_DATETIME_VALUE = 2; + /** + * + * + *
+   * Fixed Range type.
+   * 
+ * + * FACET_BUCKET_TYPE_FIXED_RANGE = 3; + */ + public static final int FACET_BUCKET_TYPE_FIXED_RANGE_VALUE = 3; + /** + * + * + *
+   * Custom Range type.
+   * 
+ * + * FACET_BUCKET_TYPE_CUSTOM_RANGE = 4; + */ + public static final int FACET_BUCKET_TYPE_CUSTOM_RANGE_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; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static FacetBucketType valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static FacetBucketType forNumber(int value) { + switch (value) { + case 0: + return FACET_BUCKET_TYPE_UNSPECIFIED; + case 1: + return FACET_BUCKET_TYPE_VALUE; + case 2: + return FACET_BUCKET_TYPE_DATETIME; + case 3: + return FACET_BUCKET_TYPE_FIXED_RANGE; + case 4: + return FACET_BUCKET_TYPE_CUSTOM_RANGE; + 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 FacetBucketType findValueByNumber(int number) { + return FacetBucketType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + 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.visionai.v1.WarehouseProto.getDescriptor().getEnumTypes().get(0); + } + + private static final FacetBucketType[] VALUES = values(); + + public static FacetBucketType 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 FacetBucketType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.visionai.v1.FacetBucketType) +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/FacetGroup.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/FacetGroup.java new file mode 100644 index 000000000000..13dbac24b7ef --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/FacetGroup.java @@ -0,0 +1,1581 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/warehouse.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * A group of facet buckets to be passed back and forth between backend &
+ * frontend.
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.FacetGroup} + */ +public final class FacetGroup extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.FacetGroup) + FacetGroupOrBuilder { + private static final long serialVersionUID = 0L; + // Use FacetGroup.newBuilder() to construct. + private FacetGroup(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private FacetGroup() { + facetId_ = ""; + displayName_ = ""; + buckets_ = java.util.Collections.emptyList(); + bucketType_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new FacetGroup(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_FacetGroup_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_FacetGroup_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.FacetGroup.class, + com.google.cloud.visionai.v1.FacetGroup.Builder.class); + } + + public static final int FACET_ID_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object facetId_ = ""; + /** + * + * + *
+   * Unique id of the facet group.
+   * 
+ * + * string facet_id = 1; + * + * @return The facetId. + */ + @java.lang.Override + public java.lang.String getFacetId() { + java.lang.Object ref = facetId_; + 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(); + facetId_ = s; + return s; + } + } + /** + * + * + *
+   * Unique id of the facet group.
+   * 
+ * + * string facet_id = 1; + * + * @return The bytes for facetId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getFacetIdBytes() { + java.lang.Object ref = facetId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + facetId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DISPLAY_NAME_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object displayName_ = ""; + /** + * + * + *
+   * Display name of the facet. To be used by UI for facet rendering.
+   * 
+ * + * string display_name = 2; + * + * @return The displayName. + */ + @java.lang.Override + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + 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(); + displayName_ = s; + return s; + } + } + /** + * + * + *
+   * Display name of the facet. To be used by UI for facet rendering.
+   * 
+ * + * string display_name = 2; + * + * @return The bytes for displayName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int BUCKETS_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private java.util.List buckets_; + /** + * + * + *
+   * Buckets associated with the facet. E.g. for "Team" facet, the bucket
+   * can be 49ers, patriots, etc.
+   * 
+ * + * repeated .google.cloud.visionai.v1.FacetBucket buckets = 3; + */ + @java.lang.Override + public java.util.List getBucketsList() { + return buckets_; + } + /** + * + * + *
+   * Buckets associated with the facet. E.g. for "Team" facet, the bucket
+   * can be 49ers, patriots, etc.
+   * 
+ * + * repeated .google.cloud.visionai.v1.FacetBucket buckets = 3; + */ + @java.lang.Override + public java.util.List + getBucketsOrBuilderList() { + return buckets_; + } + /** + * + * + *
+   * Buckets associated with the facet. E.g. for "Team" facet, the bucket
+   * can be 49ers, patriots, etc.
+   * 
+ * + * repeated .google.cloud.visionai.v1.FacetBucket buckets = 3; + */ + @java.lang.Override + public int getBucketsCount() { + return buckets_.size(); + } + /** + * + * + *
+   * Buckets associated with the facet. E.g. for "Team" facet, the bucket
+   * can be 49ers, patriots, etc.
+   * 
+ * + * repeated .google.cloud.visionai.v1.FacetBucket buckets = 3; + */ + @java.lang.Override + public com.google.cloud.visionai.v1.FacetBucket getBuckets(int index) { + return buckets_.get(index); + } + /** + * + * + *
+   * Buckets associated with the facet. E.g. for "Team" facet, the bucket
+   * can be 49ers, patriots, etc.
+   * 
+ * + * repeated .google.cloud.visionai.v1.FacetBucket buckets = 3; + */ + @java.lang.Override + public com.google.cloud.visionai.v1.FacetBucketOrBuilder getBucketsOrBuilder(int index) { + return buckets_.get(index); + } + + public static final int BUCKET_TYPE_FIELD_NUMBER = 4; + private int bucketType_ = 0; + /** + * + * + *
+   * Facet bucket type.
+   * 
+ * + * .google.cloud.visionai.v1.FacetBucketType bucket_type = 4; + * + * @return The enum numeric value on the wire for bucketType. + */ + @java.lang.Override + public int getBucketTypeValue() { + return bucketType_; + } + /** + * + * + *
+   * Facet bucket type.
+   * 
+ * + * .google.cloud.visionai.v1.FacetBucketType bucket_type = 4; + * + * @return The bucketType. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.FacetBucketType getBucketType() { + com.google.cloud.visionai.v1.FacetBucketType result = + com.google.cloud.visionai.v1.FacetBucketType.forNumber(bucketType_); + return result == null ? com.google.cloud.visionai.v1.FacetBucketType.UNRECOGNIZED : result; + } + + public static final int FETCH_MATCHED_ANNOTATIONS_FIELD_NUMBER = 5; + private boolean fetchMatchedAnnotations_ = false; + /** + * + * + *
+   * If true, return query matched annotations for this facet group's selection.
+   * This option is only applicable for facets based on partition level
+   * annotations. It supports the following facet values:
+   *  - INTEGER
+   *  - STRING (DataSchema.SearchStrategy.EXACT_SEARCH only)
+   * 
+ * + * bool fetch_matched_annotations = 5; + * + * @return The fetchMatchedAnnotations. + */ + @java.lang.Override + public boolean getFetchMatchedAnnotations() { + return fetchMatchedAnnotations_; + } + + 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(facetId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, facetId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, displayName_); + } + for (int i = 0; i < buckets_.size(); i++) { + output.writeMessage(3, buckets_.get(i)); + } + if (bucketType_ + != com.google.cloud.visionai.v1.FacetBucketType.FACET_BUCKET_TYPE_UNSPECIFIED.getNumber()) { + output.writeEnum(4, bucketType_); + } + if (fetchMatchedAnnotations_ != false) { + output.writeBool(5, fetchMatchedAnnotations_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(facetId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, facetId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, displayName_); + } + for (int i = 0; i < buckets_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, buckets_.get(i)); + } + if (bucketType_ + != com.google.cloud.visionai.v1.FacetBucketType.FACET_BUCKET_TYPE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(4, bucketType_); + } + if (fetchMatchedAnnotations_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(5, fetchMatchedAnnotations_); + } + size += getUnknownFields().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.visionai.v1.FacetGroup)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.FacetGroup other = (com.google.cloud.visionai.v1.FacetGroup) obj; + + if (!getFacetId().equals(other.getFacetId())) return false; + if (!getDisplayName().equals(other.getDisplayName())) return false; + if (!getBucketsList().equals(other.getBucketsList())) return false; + if (bucketType_ != other.bucketType_) return false; + if (getFetchMatchedAnnotations() != other.getFetchMatchedAnnotations()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + FACET_ID_FIELD_NUMBER; + hash = (53 * hash) + getFacetId().hashCode(); + hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDisplayName().hashCode(); + if (getBucketsCount() > 0) { + hash = (37 * hash) + BUCKETS_FIELD_NUMBER; + hash = (53 * hash) + getBucketsList().hashCode(); + } + hash = (37 * hash) + BUCKET_TYPE_FIELD_NUMBER; + hash = (53 * hash) + bucketType_; + hash = (37 * hash) + FETCH_MATCHED_ANNOTATIONS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getFetchMatchedAnnotations()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.FacetGroup parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.FacetGroup 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.visionai.v1.FacetGroup parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.FacetGroup 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.visionai.v1.FacetGroup parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.FacetGroup parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.FacetGroup parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.FacetGroup 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.visionai.v1.FacetGroup parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.FacetGroup 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.visionai.v1.FacetGroup parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.FacetGroup 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.visionai.v1.FacetGroup 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 group of facet buckets to be passed back and forth between backend &
+   * frontend.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.FacetGroup} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.FacetGroup) + com.google.cloud.visionai.v1.FacetGroupOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_FacetGroup_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_FacetGroup_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.FacetGroup.class, + com.google.cloud.visionai.v1.FacetGroup.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.FacetGroup.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + facetId_ = ""; + displayName_ = ""; + if (bucketsBuilder_ == null) { + buckets_ = java.util.Collections.emptyList(); + } else { + buckets_ = null; + bucketsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000004); + bucketType_ = 0; + fetchMatchedAnnotations_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_FacetGroup_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.FacetGroup getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.FacetGroup.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.FacetGroup build() { + com.google.cloud.visionai.v1.FacetGroup result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.FacetGroup buildPartial() { + com.google.cloud.visionai.v1.FacetGroup result = + new com.google.cloud.visionai.v1.FacetGroup(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.google.cloud.visionai.v1.FacetGroup result) { + if (bucketsBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0)) { + buckets_ = java.util.Collections.unmodifiableList(buckets_); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.buckets_ = buckets_; + } else { + result.buckets_ = bucketsBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.visionai.v1.FacetGroup result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.facetId_ = facetId_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.displayName_ = displayName_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.bucketType_ = bucketType_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.fetchMatchedAnnotations_ = fetchMatchedAnnotations_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.FacetGroup) { + return mergeFrom((com.google.cloud.visionai.v1.FacetGroup) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.FacetGroup other) { + if (other == com.google.cloud.visionai.v1.FacetGroup.getDefaultInstance()) return this; + if (!other.getFacetId().isEmpty()) { + facetId_ = other.facetId_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getDisplayName().isEmpty()) { + displayName_ = other.displayName_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (bucketsBuilder_ == null) { + if (!other.buckets_.isEmpty()) { + if (buckets_.isEmpty()) { + buckets_ = other.buckets_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureBucketsIsMutable(); + buckets_.addAll(other.buckets_); + } + onChanged(); + } + } else { + if (!other.buckets_.isEmpty()) { + if (bucketsBuilder_.isEmpty()) { + bucketsBuilder_.dispose(); + bucketsBuilder_ = null; + buckets_ = other.buckets_; + bitField0_ = (bitField0_ & ~0x00000004); + bucketsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getBucketsFieldBuilder() + : null; + } else { + bucketsBuilder_.addAllMessages(other.buckets_); + } + } + } + if (other.bucketType_ != 0) { + setBucketTypeValue(other.getBucketTypeValue()); + } + if (other.getFetchMatchedAnnotations() != false) { + setFetchMatchedAnnotations(other.getFetchMatchedAnnotations()); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + facetId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + displayName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + com.google.cloud.visionai.v1.FacetBucket m = + input.readMessage( + com.google.cloud.visionai.v1.FacetBucket.parser(), extensionRegistry); + if (bucketsBuilder_ == null) { + ensureBucketsIsMutable(); + buckets_.add(m); + } else { + bucketsBuilder_.addMessage(m); + } + break; + } // case 26 + case 32: + { + bucketType_ = input.readEnum(); + bitField0_ |= 0x00000008; + break; + } // case 32 + case 40: + { + fetchMatchedAnnotations_ = input.readBool(); + bitField0_ |= 0x00000010; + break; + } // case 40 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object facetId_ = ""; + /** + * + * + *
+     * Unique id of the facet group.
+     * 
+ * + * string facet_id = 1; + * + * @return The facetId. + */ + public java.lang.String getFacetId() { + java.lang.Object ref = facetId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + facetId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Unique id of the facet group.
+     * 
+ * + * string facet_id = 1; + * + * @return The bytes for facetId. + */ + public com.google.protobuf.ByteString getFacetIdBytes() { + java.lang.Object ref = facetId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + facetId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Unique id of the facet group.
+     * 
+ * + * string facet_id = 1; + * + * @param value The facetId to set. + * @return This builder for chaining. + */ + public Builder setFacetId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + facetId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Unique id of the facet group.
+     * 
+ * + * string facet_id = 1; + * + * @return This builder for chaining. + */ + public Builder clearFacetId() { + facetId_ = getDefaultInstance().getFacetId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Unique id of the facet group.
+     * 
+ * + * string facet_id = 1; + * + * @param value The bytes for facetId to set. + * @return This builder for chaining. + */ + public Builder setFacetIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + facetId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object displayName_ = ""; + /** + * + * + *
+     * Display name of the facet. To be used by UI for facet rendering.
+     * 
+ * + * string display_name = 2; + * + * @return The displayName. + */ + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Display name of the facet. To be used by UI for facet rendering.
+     * 
+ * + * string display_name = 2; + * + * @return The bytes for displayName. + */ + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Display name of the facet. To be used by UI for facet rendering.
+     * 
+ * + * string display_name = 2; + * + * @param value The displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + displayName_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Display name of the facet. To be used by UI for facet rendering.
+     * 
+ * + * string display_name = 2; + * + * @return This builder for chaining. + */ + public Builder clearDisplayName() { + displayName_ = getDefaultInstance().getDisplayName(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Display name of the facet. To be used by UI for facet rendering.
+     * 
+ * + * string display_name = 2; + * + * @param value The bytes for displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + displayName_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.util.List buckets_ = + java.util.Collections.emptyList(); + + private void ensureBucketsIsMutable() { + if (!((bitField0_ & 0x00000004) != 0)) { + buckets_ = new java.util.ArrayList(buckets_); + bitField0_ |= 0x00000004; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.visionai.v1.FacetBucket, + com.google.cloud.visionai.v1.FacetBucket.Builder, + com.google.cloud.visionai.v1.FacetBucketOrBuilder> + bucketsBuilder_; + + /** + * + * + *
+     * Buckets associated with the facet. E.g. for "Team" facet, the bucket
+     * can be 49ers, patriots, etc.
+     * 
+ * + * repeated .google.cloud.visionai.v1.FacetBucket buckets = 3; + */ + public java.util.List getBucketsList() { + if (bucketsBuilder_ == null) { + return java.util.Collections.unmodifiableList(buckets_); + } else { + return bucketsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Buckets associated with the facet. E.g. for "Team" facet, the bucket
+     * can be 49ers, patriots, etc.
+     * 
+ * + * repeated .google.cloud.visionai.v1.FacetBucket buckets = 3; + */ + public int getBucketsCount() { + if (bucketsBuilder_ == null) { + return buckets_.size(); + } else { + return bucketsBuilder_.getCount(); + } + } + /** + * + * + *
+     * Buckets associated with the facet. E.g. for "Team" facet, the bucket
+     * can be 49ers, patriots, etc.
+     * 
+ * + * repeated .google.cloud.visionai.v1.FacetBucket buckets = 3; + */ + public com.google.cloud.visionai.v1.FacetBucket getBuckets(int index) { + if (bucketsBuilder_ == null) { + return buckets_.get(index); + } else { + return bucketsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Buckets associated with the facet. E.g. for "Team" facet, the bucket
+     * can be 49ers, patriots, etc.
+     * 
+ * + * repeated .google.cloud.visionai.v1.FacetBucket buckets = 3; + */ + public Builder setBuckets(int index, com.google.cloud.visionai.v1.FacetBucket value) { + if (bucketsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBucketsIsMutable(); + buckets_.set(index, value); + onChanged(); + } else { + bucketsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Buckets associated with the facet. E.g. for "Team" facet, the bucket
+     * can be 49ers, patriots, etc.
+     * 
+ * + * repeated .google.cloud.visionai.v1.FacetBucket buckets = 3; + */ + public Builder setBuckets( + int index, com.google.cloud.visionai.v1.FacetBucket.Builder builderForValue) { + if (bucketsBuilder_ == null) { + ensureBucketsIsMutable(); + buckets_.set(index, builderForValue.build()); + onChanged(); + } else { + bucketsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Buckets associated with the facet. E.g. for "Team" facet, the bucket
+     * can be 49ers, patriots, etc.
+     * 
+ * + * repeated .google.cloud.visionai.v1.FacetBucket buckets = 3; + */ + public Builder addBuckets(com.google.cloud.visionai.v1.FacetBucket value) { + if (bucketsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBucketsIsMutable(); + buckets_.add(value); + onChanged(); + } else { + bucketsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Buckets associated with the facet. E.g. for "Team" facet, the bucket
+     * can be 49ers, patriots, etc.
+     * 
+ * + * repeated .google.cloud.visionai.v1.FacetBucket buckets = 3; + */ + public Builder addBuckets(int index, com.google.cloud.visionai.v1.FacetBucket value) { + if (bucketsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBucketsIsMutable(); + buckets_.add(index, value); + onChanged(); + } else { + bucketsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Buckets associated with the facet. E.g. for "Team" facet, the bucket
+     * can be 49ers, patriots, etc.
+     * 
+ * + * repeated .google.cloud.visionai.v1.FacetBucket buckets = 3; + */ + public Builder addBuckets(com.google.cloud.visionai.v1.FacetBucket.Builder builderForValue) { + if (bucketsBuilder_ == null) { + ensureBucketsIsMutable(); + buckets_.add(builderForValue.build()); + onChanged(); + } else { + bucketsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Buckets associated with the facet. E.g. for "Team" facet, the bucket
+     * can be 49ers, patriots, etc.
+     * 
+ * + * repeated .google.cloud.visionai.v1.FacetBucket buckets = 3; + */ + public Builder addBuckets( + int index, com.google.cloud.visionai.v1.FacetBucket.Builder builderForValue) { + if (bucketsBuilder_ == null) { + ensureBucketsIsMutable(); + buckets_.add(index, builderForValue.build()); + onChanged(); + } else { + bucketsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Buckets associated with the facet. E.g. for "Team" facet, the bucket
+     * can be 49ers, patriots, etc.
+     * 
+ * + * repeated .google.cloud.visionai.v1.FacetBucket buckets = 3; + */ + public Builder addAllBuckets( + java.lang.Iterable values) { + if (bucketsBuilder_ == null) { + ensureBucketsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, buckets_); + onChanged(); + } else { + bucketsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Buckets associated with the facet. E.g. for "Team" facet, the bucket
+     * can be 49ers, patriots, etc.
+     * 
+ * + * repeated .google.cloud.visionai.v1.FacetBucket buckets = 3; + */ + public Builder clearBuckets() { + if (bucketsBuilder_ == null) { + buckets_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + } else { + bucketsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Buckets associated with the facet. E.g. for "Team" facet, the bucket
+     * can be 49ers, patriots, etc.
+     * 
+ * + * repeated .google.cloud.visionai.v1.FacetBucket buckets = 3; + */ + public Builder removeBuckets(int index) { + if (bucketsBuilder_ == null) { + ensureBucketsIsMutable(); + buckets_.remove(index); + onChanged(); + } else { + bucketsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Buckets associated with the facet. E.g. for "Team" facet, the bucket
+     * can be 49ers, patriots, etc.
+     * 
+ * + * repeated .google.cloud.visionai.v1.FacetBucket buckets = 3; + */ + public com.google.cloud.visionai.v1.FacetBucket.Builder getBucketsBuilder(int index) { + return getBucketsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Buckets associated with the facet. E.g. for "Team" facet, the bucket
+     * can be 49ers, patriots, etc.
+     * 
+ * + * repeated .google.cloud.visionai.v1.FacetBucket buckets = 3; + */ + public com.google.cloud.visionai.v1.FacetBucketOrBuilder getBucketsOrBuilder(int index) { + if (bucketsBuilder_ == null) { + return buckets_.get(index); + } else { + return bucketsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Buckets associated with the facet. E.g. for "Team" facet, the bucket
+     * can be 49ers, patriots, etc.
+     * 
+ * + * repeated .google.cloud.visionai.v1.FacetBucket buckets = 3; + */ + public java.util.List + getBucketsOrBuilderList() { + if (bucketsBuilder_ != null) { + return bucketsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(buckets_); + } + } + /** + * + * + *
+     * Buckets associated with the facet. E.g. for "Team" facet, the bucket
+     * can be 49ers, patriots, etc.
+     * 
+ * + * repeated .google.cloud.visionai.v1.FacetBucket buckets = 3; + */ + public com.google.cloud.visionai.v1.FacetBucket.Builder addBucketsBuilder() { + return getBucketsFieldBuilder() + .addBuilder(com.google.cloud.visionai.v1.FacetBucket.getDefaultInstance()); + } + /** + * + * + *
+     * Buckets associated with the facet. E.g. for "Team" facet, the bucket
+     * can be 49ers, patriots, etc.
+     * 
+ * + * repeated .google.cloud.visionai.v1.FacetBucket buckets = 3; + */ + public com.google.cloud.visionai.v1.FacetBucket.Builder addBucketsBuilder(int index) { + return getBucketsFieldBuilder() + .addBuilder(index, com.google.cloud.visionai.v1.FacetBucket.getDefaultInstance()); + } + /** + * + * + *
+     * Buckets associated with the facet. E.g. for "Team" facet, the bucket
+     * can be 49ers, patriots, etc.
+     * 
+ * + * repeated .google.cloud.visionai.v1.FacetBucket buckets = 3; + */ + public java.util.List + getBucketsBuilderList() { + return getBucketsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.visionai.v1.FacetBucket, + com.google.cloud.visionai.v1.FacetBucket.Builder, + com.google.cloud.visionai.v1.FacetBucketOrBuilder> + getBucketsFieldBuilder() { + if (bucketsBuilder_ == null) { + bucketsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.visionai.v1.FacetBucket, + com.google.cloud.visionai.v1.FacetBucket.Builder, + com.google.cloud.visionai.v1.FacetBucketOrBuilder>( + buckets_, ((bitField0_ & 0x00000004) != 0), getParentForChildren(), isClean()); + buckets_ = null; + } + return bucketsBuilder_; + } + + private int bucketType_ = 0; + /** + * + * + *
+     * Facet bucket type.
+     * 
+ * + * .google.cloud.visionai.v1.FacetBucketType bucket_type = 4; + * + * @return The enum numeric value on the wire for bucketType. + */ + @java.lang.Override + public int getBucketTypeValue() { + return bucketType_; + } + /** + * + * + *
+     * Facet bucket type.
+     * 
+ * + * .google.cloud.visionai.v1.FacetBucketType bucket_type = 4; + * + * @param value The enum numeric value on the wire for bucketType to set. + * @return This builder for chaining. + */ + public Builder setBucketTypeValue(int value) { + bucketType_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Facet bucket type.
+     * 
+ * + * .google.cloud.visionai.v1.FacetBucketType bucket_type = 4; + * + * @return The bucketType. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.FacetBucketType getBucketType() { + com.google.cloud.visionai.v1.FacetBucketType result = + com.google.cloud.visionai.v1.FacetBucketType.forNumber(bucketType_); + return result == null ? com.google.cloud.visionai.v1.FacetBucketType.UNRECOGNIZED : result; + } + /** + * + * + *
+     * Facet bucket type.
+     * 
+ * + * .google.cloud.visionai.v1.FacetBucketType bucket_type = 4; + * + * @param value The bucketType to set. + * @return This builder for chaining. + */ + public Builder setBucketType(com.google.cloud.visionai.v1.FacetBucketType value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000008; + bucketType_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Facet bucket type.
+     * 
+ * + * .google.cloud.visionai.v1.FacetBucketType bucket_type = 4; + * + * @return This builder for chaining. + */ + public Builder clearBucketType() { + bitField0_ = (bitField0_ & ~0x00000008); + bucketType_ = 0; + onChanged(); + return this; + } + + private boolean fetchMatchedAnnotations_; + /** + * + * + *
+     * If true, return query matched annotations for this facet group's selection.
+     * This option is only applicable for facets based on partition level
+     * annotations. It supports the following facet values:
+     *  - INTEGER
+     *  - STRING (DataSchema.SearchStrategy.EXACT_SEARCH only)
+     * 
+ * + * bool fetch_matched_annotations = 5; + * + * @return The fetchMatchedAnnotations. + */ + @java.lang.Override + public boolean getFetchMatchedAnnotations() { + return fetchMatchedAnnotations_; + } + /** + * + * + *
+     * If true, return query matched annotations for this facet group's selection.
+     * This option is only applicable for facets based on partition level
+     * annotations. It supports the following facet values:
+     *  - INTEGER
+     *  - STRING (DataSchema.SearchStrategy.EXACT_SEARCH only)
+     * 
+ * + * bool fetch_matched_annotations = 5; + * + * @param value The fetchMatchedAnnotations to set. + * @return This builder for chaining. + */ + public Builder setFetchMatchedAnnotations(boolean value) { + + fetchMatchedAnnotations_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * If true, return query matched annotations for this facet group's selection.
+     * This option is only applicable for facets based on partition level
+     * annotations. It supports the following facet values:
+     *  - INTEGER
+     *  - STRING (DataSchema.SearchStrategy.EXACT_SEARCH only)
+     * 
+ * + * bool fetch_matched_annotations = 5; + * + * @return This builder for chaining. + */ + public Builder clearFetchMatchedAnnotations() { + bitField0_ = (bitField0_ & ~0x00000010); + fetchMatchedAnnotations_ = false; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.FacetGroup) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.FacetGroup) + private static final com.google.cloud.visionai.v1.FacetGroup DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.FacetGroup(); + } + + public static com.google.cloud.visionai.v1.FacetGroup getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public FacetGroup parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.FacetGroup getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/FacetGroupOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/FacetGroupOrBuilder.java new file mode 100644 index 000000000000..cafb403a37e5 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/FacetGroupOrBuilder.java @@ -0,0 +1,175 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/warehouse.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface FacetGroupOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.FacetGroup) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Unique id of the facet group.
+   * 
+ * + * string facet_id = 1; + * + * @return The facetId. + */ + java.lang.String getFacetId(); + /** + * + * + *
+   * Unique id of the facet group.
+   * 
+ * + * string facet_id = 1; + * + * @return The bytes for facetId. + */ + com.google.protobuf.ByteString getFacetIdBytes(); + + /** + * + * + *
+   * Display name of the facet. To be used by UI for facet rendering.
+   * 
+ * + * string display_name = 2; + * + * @return The displayName. + */ + java.lang.String getDisplayName(); + /** + * + * + *
+   * Display name of the facet. To be used by UI for facet rendering.
+   * 
+ * + * string display_name = 2; + * + * @return The bytes for displayName. + */ + com.google.protobuf.ByteString getDisplayNameBytes(); + + /** + * + * + *
+   * Buckets associated with the facet. E.g. for "Team" facet, the bucket
+   * can be 49ers, patriots, etc.
+   * 
+ * + * repeated .google.cloud.visionai.v1.FacetBucket buckets = 3; + */ + java.util.List getBucketsList(); + /** + * + * + *
+   * Buckets associated with the facet. E.g. for "Team" facet, the bucket
+   * can be 49ers, patriots, etc.
+   * 
+ * + * repeated .google.cloud.visionai.v1.FacetBucket buckets = 3; + */ + com.google.cloud.visionai.v1.FacetBucket getBuckets(int index); + /** + * + * + *
+   * Buckets associated with the facet. E.g. for "Team" facet, the bucket
+   * can be 49ers, patriots, etc.
+   * 
+ * + * repeated .google.cloud.visionai.v1.FacetBucket buckets = 3; + */ + int getBucketsCount(); + /** + * + * + *
+   * Buckets associated with the facet. E.g. for "Team" facet, the bucket
+   * can be 49ers, patriots, etc.
+   * 
+ * + * repeated .google.cloud.visionai.v1.FacetBucket buckets = 3; + */ + java.util.List + getBucketsOrBuilderList(); + /** + * + * + *
+   * Buckets associated with the facet. E.g. for "Team" facet, the bucket
+   * can be 49ers, patriots, etc.
+   * 
+ * + * repeated .google.cloud.visionai.v1.FacetBucket buckets = 3; + */ + com.google.cloud.visionai.v1.FacetBucketOrBuilder getBucketsOrBuilder(int index); + + /** + * + * + *
+   * Facet bucket type.
+   * 
+ * + * .google.cloud.visionai.v1.FacetBucketType bucket_type = 4; + * + * @return The enum numeric value on the wire for bucketType. + */ + int getBucketTypeValue(); + /** + * + * + *
+   * Facet bucket type.
+   * 
+ * + * .google.cloud.visionai.v1.FacetBucketType bucket_type = 4; + * + * @return The bucketType. + */ + com.google.cloud.visionai.v1.FacetBucketType getBucketType(); + + /** + * + * + *
+   * If true, return query matched annotations for this facet group's selection.
+   * This option is only applicable for facets based on partition level
+   * annotations. It supports the following facet values:
+   *  - INTEGER
+   *  - STRING (DataSchema.SearchStrategy.EXACT_SEARCH only)
+   * 
+ * + * bool fetch_matched_annotations = 5; + * + * @return The fetchMatchedAnnotations. + */ + boolean getFetchMatchedAnnotations(); +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/FacetProperty.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/FacetProperty.java new file mode 100644 index 000000000000..b795694c6198 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/FacetProperty.java @@ -0,0 +1,5426 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/warehouse.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * Central configuration for a facet.
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.FacetProperty} + */ +public final class FacetProperty extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.FacetProperty) + FacetPropertyOrBuilder { + private static final long serialVersionUID = 0L; + // Use FacetProperty.newBuilder() to construct. + private FacetProperty(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private FacetProperty() { + mappedFields_ = com.google.protobuf.LazyStringArrayList.emptyList(); + displayName_ = ""; + bucketType_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new FacetProperty(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_FacetProperty_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_FacetProperty_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.FacetProperty.class, + com.google.cloud.visionai.v1.FacetProperty.Builder.class); + } + + public interface FixedRangeBucketSpecOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.FacetProperty.FixedRangeBucketSpec) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Lower bound of the bucket. NOTE: Only integer type is currently supported
+     * for this field.
+     * 
+ * + * .google.cloud.visionai.v1.FacetValue bucket_start = 1; + * + * @return Whether the bucketStart field is set. + */ + boolean hasBucketStart(); + /** + * + * + *
+     * Lower bound of the bucket. NOTE: Only integer type is currently supported
+     * for this field.
+     * 
+ * + * .google.cloud.visionai.v1.FacetValue bucket_start = 1; + * + * @return The bucketStart. + */ + com.google.cloud.visionai.v1.FacetValue getBucketStart(); + /** + * + * + *
+     * Lower bound of the bucket. NOTE: Only integer type is currently supported
+     * for this field.
+     * 
+ * + * .google.cloud.visionai.v1.FacetValue bucket_start = 1; + */ + com.google.cloud.visionai.v1.FacetValueOrBuilder getBucketStartOrBuilder(); + + /** + * + * + *
+     * Bucket granularity. NOTE: Only integer type is currently supported for
+     * this field.
+     * 
+ * + * .google.cloud.visionai.v1.FacetValue bucket_granularity = 2; + * + * @return Whether the bucketGranularity field is set. + */ + boolean hasBucketGranularity(); + /** + * + * + *
+     * Bucket granularity. NOTE: Only integer type is currently supported for
+     * this field.
+     * 
+ * + * .google.cloud.visionai.v1.FacetValue bucket_granularity = 2; + * + * @return The bucketGranularity. + */ + com.google.cloud.visionai.v1.FacetValue getBucketGranularity(); + /** + * + * + *
+     * Bucket granularity. NOTE: Only integer type is currently supported for
+     * this field.
+     * 
+ * + * .google.cloud.visionai.v1.FacetValue bucket_granularity = 2; + */ + com.google.cloud.visionai.v1.FacetValueOrBuilder getBucketGranularityOrBuilder(); + + /** + * + * + *
+     * Total number of buckets.
+     * 
+ * + * int32 bucket_count = 3; + * + * @return The bucketCount. + */ + int getBucketCount(); + } + /** + * + * + *
+   * If bucket type is FIXED_RANGE, specify how values are bucketized. Use
+   * FixedRangeBucketSpec when you want to create multiple buckets with equal
+   * granularities. Using integer bucket value as an example, when
+   * bucket_start = 0, bucket_granularity = 10, bucket_count = 5, this facet
+   * will be aggregated via the following buckets:
+   * [-inf, 0), [0, 10), [10, 20), [20, 30), [30, inf).
+   * Notably, bucket_count <= 1 is an invalid spec.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.FacetProperty.FixedRangeBucketSpec} + */ + public static final class FixedRangeBucketSpec extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.FacetProperty.FixedRangeBucketSpec) + FixedRangeBucketSpecOrBuilder { + private static final long serialVersionUID = 0L; + // Use FixedRangeBucketSpec.newBuilder() to construct. + private FixedRangeBucketSpec(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private FixedRangeBucketSpec() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new FixedRangeBucketSpec(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_FacetProperty_FixedRangeBucketSpec_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_FacetProperty_FixedRangeBucketSpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.FacetProperty.FixedRangeBucketSpec.class, + com.google.cloud.visionai.v1.FacetProperty.FixedRangeBucketSpec.Builder.class); + } + + private int bitField0_; + public static final int BUCKET_START_FIELD_NUMBER = 1; + private com.google.cloud.visionai.v1.FacetValue bucketStart_; + /** + * + * + *
+     * Lower bound of the bucket. NOTE: Only integer type is currently supported
+     * for this field.
+     * 
+ * + * .google.cloud.visionai.v1.FacetValue bucket_start = 1; + * + * @return Whether the bucketStart field is set. + */ + @java.lang.Override + public boolean hasBucketStart() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * Lower bound of the bucket. NOTE: Only integer type is currently supported
+     * for this field.
+     * 
+ * + * .google.cloud.visionai.v1.FacetValue bucket_start = 1; + * + * @return The bucketStart. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.FacetValue getBucketStart() { + return bucketStart_ == null + ? com.google.cloud.visionai.v1.FacetValue.getDefaultInstance() + : bucketStart_; + } + /** + * + * + *
+     * Lower bound of the bucket. NOTE: Only integer type is currently supported
+     * for this field.
+     * 
+ * + * .google.cloud.visionai.v1.FacetValue bucket_start = 1; + */ + @java.lang.Override + public com.google.cloud.visionai.v1.FacetValueOrBuilder getBucketStartOrBuilder() { + return bucketStart_ == null + ? com.google.cloud.visionai.v1.FacetValue.getDefaultInstance() + : bucketStart_; + } + + public static final int BUCKET_GRANULARITY_FIELD_NUMBER = 2; + private com.google.cloud.visionai.v1.FacetValue bucketGranularity_; + /** + * + * + *
+     * Bucket granularity. NOTE: Only integer type is currently supported for
+     * this field.
+     * 
+ * + * .google.cloud.visionai.v1.FacetValue bucket_granularity = 2; + * + * @return Whether the bucketGranularity field is set. + */ + @java.lang.Override + public boolean hasBucketGranularity() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * Bucket granularity. NOTE: Only integer type is currently supported for
+     * this field.
+     * 
+ * + * .google.cloud.visionai.v1.FacetValue bucket_granularity = 2; + * + * @return The bucketGranularity. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.FacetValue getBucketGranularity() { + return bucketGranularity_ == null + ? com.google.cloud.visionai.v1.FacetValue.getDefaultInstance() + : bucketGranularity_; + } + /** + * + * + *
+     * Bucket granularity. NOTE: Only integer type is currently supported for
+     * this field.
+     * 
+ * + * .google.cloud.visionai.v1.FacetValue bucket_granularity = 2; + */ + @java.lang.Override + public com.google.cloud.visionai.v1.FacetValueOrBuilder getBucketGranularityOrBuilder() { + return bucketGranularity_ == null + ? com.google.cloud.visionai.v1.FacetValue.getDefaultInstance() + : bucketGranularity_; + } + + public static final int BUCKET_COUNT_FIELD_NUMBER = 3; + private int bucketCount_ = 0; + /** + * + * + *
+     * Total number of buckets.
+     * 
+ * + * int32 bucket_count = 3; + * + * @return The bucketCount. + */ + @java.lang.Override + public int getBucketCount() { + return bucketCount_; + } + + 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 (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getBucketStart()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(2, getBucketGranularity()); + } + if (bucketCount_ != 0) { + output.writeInt32(3, bucketCount_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getBucketStart()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getBucketGranularity()); + } + if (bucketCount_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(3, bucketCount_); + } + size += getUnknownFields().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.visionai.v1.FacetProperty.FixedRangeBucketSpec)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.FacetProperty.FixedRangeBucketSpec other = + (com.google.cloud.visionai.v1.FacetProperty.FixedRangeBucketSpec) obj; + + if (hasBucketStart() != other.hasBucketStart()) return false; + if (hasBucketStart()) { + if (!getBucketStart().equals(other.getBucketStart())) return false; + } + if (hasBucketGranularity() != other.hasBucketGranularity()) return false; + if (hasBucketGranularity()) { + if (!getBucketGranularity().equals(other.getBucketGranularity())) return false; + } + if (getBucketCount() != other.getBucketCount()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasBucketStart()) { + hash = (37 * hash) + BUCKET_START_FIELD_NUMBER; + hash = (53 * hash) + getBucketStart().hashCode(); + } + if (hasBucketGranularity()) { + hash = (37 * hash) + BUCKET_GRANULARITY_FIELD_NUMBER; + hash = (53 * hash) + getBucketGranularity().hashCode(); + } + hash = (37 * hash) + BUCKET_COUNT_FIELD_NUMBER; + hash = (53 * hash) + getBucketCount(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.FacetProperty.FixedRangeBucketSpec parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.FacetProperty.FixedRangeBucketSpec 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.visionai.v1.FacetProperty.FixedRangeBucketSpec parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.FacetProperty.FixedRangeBucketSpec 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.visionai.v1.FacetProperty.FixedRangeBucketSpec parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.FacetProperty.FixedRangeBucketSpec parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.FacetProperty.FixedRangeBucketSpec parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.FacetProperty.FixedRangeBucketSpec 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.visionai.v1.FacetProperty.FixedRangeBucketSpec + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.FacetProperty.FixedRangeBucketSpec + 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.visionai.v1.FacetProperty.FixedRangeBucketSpec parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.FacetProperty.FixedRangeBucketSpec 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.visionai.v1.FacetProperty.FixedRangeBucketSpec 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; + } + /** + * + * + *
+     * If bucket type is FIXED_RANGE, specify how values are bucketized. Use
+     * FixedRangeBucketSpec when you want to create multiple buckets with equal
+     * granularities. Using integer bucket value as an example, when
+     * bucket_start = 0, bucket_granularity = 10, bucket_count = 5, this facet
+     * will be aggregated via the following buckets:
+     * [-inf, 0), [0, 10), [10, 20), [20, 30), [30, inf).
+     * Notably, bucket_count <= 1 is an invalid spec.
+     * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.FacetProperty.FixedRangeBucketSpec} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.FacetProperty.FixedRangeBucketSpec) + com.google.cloud.visionai.v1.FacetProperty.FixedRangeBucketSpecOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_FacetProperty_FixedRangeBucketSpec_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_FacetProperty_FixedRangeBucketSpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.FacetProperty.FixedRangeBucketSpec.class, + com.google.cloud.visionai.v1.FacetProperty.FixedRangeBucketSpec.Builder.class); + } + + // Construct using + // com.google.cloud.visionai.v1.FacetProperty.FixedRangeBucketSpec.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getBucketStartFieldBuilder(); + getBucketGranularityFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + bucketStart_ = null; + if (bucketStartBuilder_ != null) { + bucketStartBuilder_.dispose(); + bucketStartBuilder_ = null; + } + bucketGranularity_ = null; + if (bucketGranularityBuilder_ != null) { + bucketGranularityBuilder_.dispose(); + bucketGranularityBuilder_ = null; + } + bucketCount_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_FacetProperty_FixedRangeBucketSpec_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.FacetProperty.FixedRangeBucketSpec + getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.FacetProperty.FixedRangeBucketSpec.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.FacetProperty.FixedRangeBucketSpec build() { + com.google.cloud.visionai.v1.FacetProperty.FixedRangeBucketSpec result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.FacetProperty.FixedRangeBucketSpec buildPartial() { + com.google.cloud.visionai.v1.FacetProperty.FixedRangeBucketSpec result = + new com.google.cloud.visionai.v1.FacetProperty.FixedRangeBucketSpec(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.visionai.v1.FacetProperty.FixedRangeBucketSpec result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.bucketStart_ = + bucketStartBuilder_ == null ? bucketStart_ : bucketStartBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.bucketGranularity_ = + bucketGranularityBuilder_ == null + ? bucketGranularity_ + : bucketGranularityBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.bucketCount_ = bucketCount_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.FacetProperty.FixedRangeBucketSpec) { + return mergeFrom((com.google.cloud.visionai.v1.FacetProperty.FixedRangeBucketSpec) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.visionai.v1.FacetProperty.FixedRangeBucketSpec other) { + if (other + == com.google.cloud.visionai.v1.FacetProperty.FixedRangeBucketSpec.getDefaultInstance()) + return this; + if (other.hasBucketStart()) { + mergeBucketStart(other.getBucketStart()); + } + if (other.hasBucketGranularity()) { + mergeBucketGranularity(other.getBucketGranularity()); + } + if (other.getBucketCount() != 0) { + setBucketCount(other.getBucketCount()); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getBucketStartFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage( + getBucketGranularityFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 24: + { + bucketCount_ = input.readInt32(); + bitField0_ |= 0x00000004; + break; + } // case 24 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.cloud.visionai.v1.FacetValue bucketStart_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.FacetValue, + com.google.cloud.visionai.v1.FacetValue.Builder, + com.google.cloud.visionai.v1.FacetValueOrBuilder> + bucketStartBuilder_; + /** + * + * + *
+       * Lower bound of the bucket. NOTE: Only integer type is currently supported
+       * for this field.
+       * 
+ * + * .google.cloud.visionai.v1.FacetValue bucket_start = 1; + * + * @return Whether the bucketStart field is set. + */ + public boolean hasBucketStart() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+       * Lower bound of the bucket. NOTE: Only integer type is currently supported
+       * for this field.
+       * 
+ * + * .google.cloud.visionai.v1.FacetValue bucket_start = 1; + * + * @return The bucketStart. + */ + public com.google.cloud.visionai.v1.FacetValue getBucketStart() { + if (bucketStartBuilder_ == null) { + return bucketStart_ == null + ? com.google.cloud.visionai.v1.FacetValue.getDefaultInstance() + : bucketStart_; + } else { + return bucketStartBuilder_.getMessage(); + } + } + /** + * + * + *
+       * Lower bound of the bucket. NOTE: Only integer type is currently supported
+       * for this field.
+       * 
+ * + * .google.cloud.visionai.v1.FacetValue bucket_start = 1; + */ + public Builder setBucketStart(com.google.cloud.visionai.v1.FacetValue value) { + if (bucketStartBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + bucketStart_ = value; + } else { + bucketStartBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * Lower bound of the bucket. NOTE: Only integer type is currently supported
+       * for this field.
+       * 
+ * + * .google.cloud.visionai.v1.FacetValue bucket_start = 1; + */ + public Builder setBucketStart( + com.google.cloud.visionai.v1.FacetValue.Builder builderForValue) { + if (bucketStartBuilder_ == null) { + bucketStart_ = builderForValue.build(); + } else { + bucketStartBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * Lower bound of the bucket. NOTE: Only integer type is currently supported
+       * for this field.
+       * 
+ * + * .google.cloud.visionai.v1.FacetValue bucket_start = 1; + */ + public Builder mergeBucketStart(com.google.cloud.visionai.v1.FacetValue value) { + if (bucketStartBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && bucketStart_ != null + && bucketStart_ != com.google.cloud.visionai.v1.FacetValue.getDefaultInstance()) { + getBucketStartBuilder().mergeFrom(value); + } else { + bucketStart_ = value; + } + } else { + bucketStartBuilder_.mergeFrom(value); + } + if (bucketStart_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + /** + * + * + *
+       * Lower bound of the bucket. NOTE: Only integer type is currently supported
+       * for this field.
+       * 
+ * + * .google.cloud.visionai.v1.FacetValue bucket_start = 1; + */ + public Builder clearBucketStart() { + bitField0_ = (bitField0_ & ~0x00000001); + bucketStart_ = null; + if (bucketStartBuilder_ != null) { + bucketStartBuilder_.dispose(); + bucketStartBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+       * Lower bound of the bucket. NOTE: Only integer type is currently supported
+       * for this field.
+       * 
+ * + * .google.cloud.visionai.v1.FacetValue bucket_start = 1; + */ + public com.google.cloud.visionai.v1.FacetValue.Builder getBucketStartBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getBucketStartFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Lower bound of the bucket. NOTE: Only integer type is currently supported
+       * for this field.
+       * 
+ * + * .google.cloud.visionai.v1.FacetValue bucket_start = 1; + */ + public com.google.cloud.visionai.v1.FacetValueOrBuilder getBucketStartOrBuilder() { + if (bucketStartBuilder_ != null) { + return bucketStartBuilder_.getMessageOrBuilder(); + } else { + return bucketStart_ == null + ? com.google.cloud.visionai.v1.FacetValue.getDefaultInstance() + : bucketStart_; + } + } + /** + * + * + *
+       * Lower bound of the bucket. NOTE: Only integer type is currently supported
+       * for this field.
+       * 
+ * + * .google.cloud.visionai.v1.FacetValue bucket_start = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.FacetValue, + com.google.cloud.visionai.v1.FacetValue.Builder, + com.google.cloud.visionai.v1.FacetValueOrBuilder> + getBucketStartFieldBuilder() { + if (bucketStartBuilder_ == null) { + bucketStartBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.FacetValue, + com.google.cloud.visionai.v1.FacetValue.Builder, + com.google.cloud.visionai.v1.FacetValueOrBuilder>( + getBucketStart(), getParentForChildren(), isClean()); + bucketStart_ = null; + } + return bucketStartBuilder_; + } + + private com.google.cloud.visionai.v1.FacetValue bucketGranularity_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.FacetValue, + com.google.cloud.visionai.v1.FacetValue.Builder, + com.google.cloud.visionai.v1.FacetValueOrBuilder> + bucketGranularityBuilder_; + /** + * + * + *
+       * Bucket granularity. NOTE: Only integer type is currently supported for
+       * this field.
+       * 
+ * + * .google.cloud.visionai.v1.FacetValue bucket_granularity = 2; + * + * @return Whether the bucketGranularity field is set. + */ + public boolean hasBucketGranularity() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+       * Bucket granularity. NOTE: Only integer type is currently supported for
+       * this field.
+       * 
+ * + * .google.cloud.visionai.v1.FacetValue bucket_granularity = 2; + * + * @return The bucketGranularity. + */ + public com.google.cloud.visionai.v1.FacetValue getBucketGranularity() { + if (bucketGranularityBuilder_ == null) { + return bucketGranularity_ == null + ? com.google.cloud.visionai.v1.FacetValue.getDefaultInstance() + : bucketGranularity_; + } else { + return bucketGranularityBuilder_.getMessage(); + } + } + /** + * + * + *
+       * Bucket granularity. NOTE: Only integer type is currently supported for
+       * this field.
+       * 
+ * + * .google.cloud.visionai.v1.FacetValue bucket_granularity = 2; + */ + public Builder setBucketGranularity(com.google.cloud.visionai.v1.FacetValue value) { + if (bucketGranularityBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + bucketGranularity_ = value; + } else { + bucketGranularityBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * Bucket granularity. NOTE: Only integer type is currently supported for
+       * this field.
+       * 
+ * + * .google.cloud.visionai.v1.FacetValue bucket_granularity = 2; + */ + public Builder setBucketGranularity( + com.google.cloud.visionai.v1.FacetValue.Builder builderForValue) { + if (bucketGranularityBuilder_ == null) { + bucketGranularity_ = builderForValue.build(); + } else { + bucketGranularityBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * Bucket granularity. NOTE: Only integer type is currently supported for
+       * this field.
+       * 
+ * + * .google.cloud.visionai.v1.FacetValue bucket_granularity = 2; + */ + public Builder mergeBucketGranularity(com.google.cloud.visionai.v1.FacetValue value) { + if (bucketGranularityBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && bucketGranularity_ != null + && bucketGranularity_ + != com.google.cloud.visionai.v1.FacetValue.getDefaultInstance()) { + getBucketGranularityBuilder().mergeFrom(value); + } else { + bucketGranularity_ = value; + } + } else { + bucketGranularityBuilder_.mergeFrom(value); + } + if (bucketGranularity_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + /** + * + * + *
+       * Bucket granularity. NOTE: Only integer type is currently supported for
+       * this field.
+       * 
+ * + * .google.cloud.visionai.v1.FacetValue bucket_granularity = 2; + */ + public Builder clearBucketGranularity() { + bitField0_ = (bitField0_ & ~0x00000002); + bucketGranularity_ = null; + if (bucketGranularityBuilder_ != null) { + bucketGranularityBuilder_.dispose(); + bucketGranularityBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+       * Bucket granularity. NOTE: Only integer type is currently supported for
+       * this field.
+       * 
+ * + * .google.cloud.visionai.v1.FacetValue bucket_granularity = 2; + */ + public com.google.cloud.visionai.v1.FacetValue.Builder getBucketGranularityBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getBucketGranularityFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Bucket granularity. NOTE: Only integer type is currently supported for
+       * this field.
+       * 
+ * + * .google.cloud.visionai.v1.FacetValue bucket_granularity = 2; + */ + public com.google.cloud.visionai.v1.FacetValueOrBuilder getBucketGranularityOrBuilder() { + if (bucketGranularityBuilder_ != null) { + return bucketGranularityBuilder_.getMessageOrBuilder(); + } else { + return bucketGranularity_ == null + ? com.google.cloud.visionai.v1.FacetValue.getDefaultInstance() + : bucketGranularity_; + } + } + /** + * + * + *
+       * Bucket granularity. NOTE: Only integer type is currently supported for
+       * this field.
+       * 
+ * + * .google.cloud.visionai.v1.FacetValue bucket_granularity = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.FacetValue, + com.google.cloud.visionai.v1.FacetValue.Builder, + com.google.cloud.visionai.v1.FacetValueOrBuilder> + getBucketGranularityFieldBuilder() { + if (bucketGranularityBuilder_ == null) { + bucketGranularityBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.FacetValue, + com.google.cloud.visionai.v1.FacetValue.Builder, + com.google.cloud.visionai.v1.FacetValueOrBuilder>( + getBucketGranularity(), getParentForChildren(), isClean()); + bucketGranularity_ = null; + } + return bucketGranularityBuilder_; + } + + private int bucketCount_; + /** + * + * + *
+       * Total number of buckets.
+       * 
+ * + * int32 bucket_count = 3; + * + * @return The bucketCount. + */ + @java.lang.Override + public int getBucketCount() { + return bucketCount_; + } + /** + * + * + *
+       * Total number of buckets.
+       * 
+ * + * int32 bucket_count = 3; + * + * @param value The bucketCount to set. + * @return This builder for chaining. + */ + public Builder setBucketCount(int value) { + + bucketCount_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+       * Total number of buckets.
+       * 
+ * + * int32 bucket_count = 3; + * + * @return This builder for chaining. + */ + public Builder clearBucketCount() { + bitField0_ = (bitField0_ & ~0x00000004); + bucketCount_ = 0; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.FacetProperty.FixedRangeBucketSpec) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.FacetProperty.FixedRangeBucketSpec) + private static final com.google.cloud.visionai.v1.FacetProperty.FixedRangeBucketSpec + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.FacetProperty.FixedRangeBucketSpec(); + } + + public static com.google.cloud.visionai.v1.FacetProperty.FixedRangeBucketSpec + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public FixedRangeBucketSpec parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.FacetProperty.FixedRangeBucketSpec + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface CustomRangeBucketSpecOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.FacetProperty.CustomRangeBucketSpec) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Currently, only integer type is supported for this field.
+     * 
+ * + * repeated .google.cloud.visionai.v1.FacetValue endpoints = 1; + */ + java.util.List getEndpointsList(); + /** + * + * + *
+     * Currently, only integer type is supported for this field.
+     * 
+ * + * repeated .google.cloud.visionai.v1.FacetValue endpoints = 1; + */ + com.google.cloud.visionai.v1.FacetValue getEndpoints(int index); + /** + * + * + *
+     * Currently, only integer type is supported for this field.
+     * 
+ * + * repeated .google.cloud.visionai.v1.FacetValue endpoints = 1; + */ + int getEndpointsCount(); + /** + * + * + *
+     * Currently, only integer type is supported for this field.
+     * 
+ * + * repeated .google.cloud.visionai.v1.FacetValue endpoints = 1; + */ + java.util.List + getEndpointsOrBuilderList(); + /** + * + * + *
+     * Currently, only integer type is supported for this field.
+     * 
+ * + * repeated .google.cloud.visionai.v1.FacetValue endpoints = 1; + */ + com.google.cloud.visionai.v1.FacetValueOrBuilder getEndpointsOrBuilder(int index); + } + /** + * + * + *
+   * If bucket type is CUSTOM_RANGE, specify how values are bucketized. Use
+   * integer bucket value as an example, when the endpoints are 0, 10, 100, and
+   * 1000, we will generate the following facets:
+   * [-inf, 0), [0, 10), [10, 100), [100, 1000), [1000, inf).
+   * Notably:
+   * - endpoints must be listed in ascending order. Otherwise, the SearchConfig
+   *   API will reject the facet config.
+   * - < 1 endpoints is an invalid spec.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.FacetProperty.CustomRangeBucketSpec} + */ + public static final class CustomRangeBucketSpec extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.FacetProperty.CustomRangeBucketSpec) + CustomRangeBucketSpecOrBuilder { + private static final long serialVersionUID = 0L; + // Use CustomRangeBucketSpec.newBuilder() to construct. + private CustomRangeBucketSpec(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CustomRangeBucketSpec() { + endpoints_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CustomRangeBucketSpec(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_FacetProperty_CustomRangeBucketSpec_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_FacetProperty_CustomRangeBucketSpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.FacetProperty.CustomRangeBucketSpec.class, + com.google.cloud.visionai.v1.FacetProperty.CustomRangeBucketSpec.Builder.class); + } + + public static final int ENDPOINTS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List endpoints_; + /** + * + * + *
+     * Currently, only integer type is supported for this field.
+     * 
+ * + * repeated .google.cloud.visionai.v1.FacetValue endpoints = 1; + */ + @java.lang.Override + public java.util.List getEndpointsList() { + return endpoints_; + } + /** + * + * + *
+     * Currently, only integer type is supported for this field.
+     * 
+ * + * repeated .google.cloud.visionai.v1.FacetValue endpoints = 1; + */ + @java.lang.Override + public java.util.List + getEndpointsOrBuilderList() { + return endpoints_; + } + /** + * + * + *
+     * Currently, only integer type is supported for this field.
+     * 
+ * + * repeated .google.cloud.visionai.v1.FacetValue endpoints = 1; + */ + @java.lang.Override + public int getEndpointsCount() { + return endpoints_.size(); + } + /** + * + * + *
+     * Currently, only integer type is supported for this field.
+     * 
+ * + * repeated .google.cloud.visionai.v1.FacetValue endpoints = 1; + */ + @java.lang.Override + public com.google.cloud.visionai.v1.FacetValue getEndpoints(int index) { + return endpoints_.get(index); + } + /** + * + * + *
+     * Currently, only integer type is supported for this field.
+     * 
+ * + * repeated .google.cloud.visionai.v1.FacetValue endpoints = 1; + */ + @java.lang.Override + public com.google.cloud.visionai.v1.FacetValueOrBuilder getEndpointsOrBuilder(int index) { + return endpoints_.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 < endpoints_.size(); i++) { + output.writeMessage(1, endpoints_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < endpoints_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, endpoints_.get(i)); + } + size += getUnknownFields().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.visionai.v1.FacetProperty.CustomRangeBucketSpec)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.FacetProperty.CustomRangeBucketSpec other = + (com.google.cloud.visionai.v1.FacetProperty.CustomRangeBucketSpec) obj; + + if (!getEndpointsList().equals(other.getEndpointsList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getEndpointsCount() > 0) { + hash = (37 * hash) + ENDPOINTS_FIELD_NUMBER; + hash = (53 * hash) + getEndpointsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.FacetProperty.CustomRangeBucketSpec parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.FacetProperty.CustomRangeBucketSpec 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.visionai.v1.FacetProperty.CustomRangeBucketSpec parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.FacetProperty.CustomRangeBucketSpec 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.visionai.v1.FacetProperty.CustomRangeBucketSpec parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.FacetProperty.CustomRangeBucketSpec parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.FacetProperty.CustomRangeBucketSpec parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.FacetProperty.CustomRangeBucketSpec 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.visionai.v1.FacetProperty.CustomRangeBucketSpec + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.FacetProperty.CustomRangeBucketSpec + 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.visionai.v1.FacetProperty.CustomRangeBucketSpec parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.FacetProperty.CustomRangeBucketSpec 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.visionai.v1.FacetProperty.CustomRangeBucketSpec 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; + } + /** + * + * + *
+     * If bucket type is CUSTOM_RANGE, specify how values are bucketized. Use
+     * integer bucket value as an example, when the endpoints are 0, 10, 100, and
+     * 1000, we will generate the following facets:
+     * [-inf, 0), [0, 10), [10, 100), [100, 1000), [1000, inf).
+     * Notably:
+     * - endpoints must be listed in ascending order. Otherwise, the SearchConfig
+     *   API will reject the facet config.
+     * - < 1 endpoints is an invalid spec.
+     * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.FacetProperty.CustomRangeBucketSpec} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.FacetProperty.CustomRangeBucketSpec) + com.google.cloud.visionai.v1.FacetProperty.CustomRangeBucketSpecOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_FacetProperty_CustomRangeBucketSpec_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_FacetProperty_CustomRangeBucketSpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.FacetProperty.CustomRangeBucketSpec.class, + com.google.cloud.visionai.v1.FacetProperty.CustomRangeBucketSpec.Builder.class); + } + + // Construct using + // com.google.cloud.visionai.v1.FacetProperty.CustomRangeBucketSpec.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (endpointsBuilder_ == null) { + endpoints_ = java.util.Collections.emptyList(); + } else { + endpoints_ = null; + endpointsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_FacetProperty_CustomRangeBucketSpec_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.FacetProperty.CustomRangeBucketSpec + getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.FacetProperty.CustomRangeBucketSpec + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.FacetProperty.CustomRangeBucketSpec build() { + com.google.cloud.visionai.v1.FacetProperty.CustomRangeBucketSpec result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.FacetProperty.CustomRangeBucketSpec buildPartial() { + com.google.cloud.visionai.v1.FacetProperty.CustomRangeBucketSpec result = + new com.google.cloud.visionai.v1.FacetProperty.CustomRangeBucketSpec(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.visionai.v1.FacetProperty.CustomRangeBucketSpec result) { + if (endpointsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + endpoints_ = java.util.Collections.unmodifiableList(endpoints_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.endpoints_ = endpoints_; + } else { + result.endpoints_ = endpointsBuilder_.build(); + } + } + + private void buildPartial0( + com.google.cloud.visionai.v1.FacetProperty.CustomRangeBucketSpec result) { + int from_bitField0_ = bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.FacetProperty.CustomRangeBucketSpec) { + return mergeFrom( + (com.google.cloud.visionai.v1.FacetProperty.CustomRangeBucketSpec) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.visionai.v1.FacetProperty.CustomRangeBucketSpec other) { + if (other + == com.google.cloud.visionai.v1.FacetProperty.CustomRangeBucketSpec + .getDefaultInstance()) return this; + if (endpointsBuilder_ == null) { + if (!other.endpoints_.isEmpty()) { + if (endpoints_.isEmpty()) { + endpoints_ = other.endpoints_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureEndpointsIsMutable(); + endpoints_.addAll(other.endpoints_); + } + onChanged(); + } + } else { + if (!other.endpoints_.isEmpty()) { + if (endpointsBuilder_.isEmpty()) { + endpointsBuilder_.dispose(); + endpointsBuilder_ = null; + endpoints_ = other.endpoints_; + bitField0_ = (bitField0_ & ~0x00000001); + endpointsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getEndpointsFieldBuilder() + : null; + } else { + endpointsBuilder_.addAllMessages(other.endpoints_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.visionai.v1.FacetValue m = + input.readMessage( + com.google.cloud.visionai.v1.FacetValue.parser(), extensionRegistry); + if (endpointsBuilder_ == null) { + ensureEndpointsIsMutable(); + endpoints_.add(m); + } else { + endpointsBuilder_.addMessage(m); + } + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List endpoints_ = + java.util.Collections.emptyList(); + + private void ensureEndpointsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + endpoints_ = new java.util.ArrayList(endpoints_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.visionai.v1.FacetValue, + com.google.cloud.visionai.v1.FacetValue.Builder, + com.google.cloud.visionai.v1.FacetValueOrBuilder> + endpointsBuilder_; + + /** + * + * + *
+       * Currently, only integer type is supported for this field.
+       * 
+ * + * repeated .google.cloud.visionai.v1.FacetValue endpoints = 1; + */ + public java.util.List getEndpointsList() { + if (endpointsBuilder_ == null) { + return java.util.Collections.unmodifiableList(endpoints_); + } else { + return endpointsBuilder_.getMessageList(); + } + } + /** + * + * + *
+       * Currently, only integer type is supported for this field.
+       * 
+ * + * repeated .google.cloud.visionai.v1.FacetValue endpoints = 1; + */ + public int getEndpointsCount() { + if (endpointsBuilder_ == null) { + return endpoints_.size(); + } else { + return endpointsBuilder_.getCount(); + } + } + /** + * + * + *
+       * Currently, only integer type is supported for this field.
+       * 
+ * + * repeated .google.cloud.visionai.v1.FacetValue endpoints = 1; + */ + public com.google.cloud.visionai.v1.FacetValue getEndpoints(int index) { + if (endpointsBuilder_ == null) { + return endpoints_.get(index); + } else { + return endpointsBuilder_.getMessage(index); + } + } + /** + * + * + *
+       * Currently, only integer type is supported for this field.
+       * 
+ * + * repeated .google.cloud.visionai.v1.FacetValue endpoints = 1; + */ + public Builder setEndpoints(int index, com.google.cloud.visionai.v1.FacetValue value) { + if (endpointsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureEndpointsIsMutable(); + endpoints_.set(index, value); + onChanged(); + } else { + endpointsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+       * Currently, only integer type is supported for this field.
+       * 
+ * + * repeated .google.cloud.visionai.v1.FacetValue endpoints = 1; + */ + public Builder setEndpoints( + int index, com.google.cloud.visionai.v1.FacetValue.Builder builderForValue) { + if (endpointsBuilder_ == null) { + ensureEndpointsIsMutable(); + endpoints_.set(index, builderForValue.build()); + onChanged(); + } else { + endpointsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Currently, only integer type is supported for this field.
+       * 
+ * + * repeated .google.cloud.visionai.v1.FacetValue endpoints = 1; + */ + public Builder addEndpoints(com.google.cloud.visionai.v1.FacetValue value) { + if (endpointsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureEndpointsIsMutable(); + endpoints_.add(value); + onChanged(); + } else { + endpointsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+       * Currently, only integer type is supported for this field.
+       * 
+ * + * repeated .google.cloud.visionai.v1.FacetValue endpoints = 1; + */ + public Builder addEndpoints(int index, com.google.cloud.visionai.v1.FacetValue value) { + if (endpointsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureEndpointsIsMutable(); + endpoints_.add(index, value); + onChanged(); + } else { + endpointsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+       * Currently, only integer type is supported for this field.
+       * 
+ * + * repeated .google.cloud.visionai.v1.FacetValue endpoints = 1; + */ + public Builder addEndpoints(com.google.cloud.visionai.v1.FacetValue.Builder builderForValue) { + if (endpointsBuilder_ == null) { + ensureEndpointsIsMutable(); + endpoints_.add(builderForValue.build()); + onChanged(); + } else { + endpointsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Currently, only integer type is supported for this field.
+       * 
+ * + * repeated .google.cloud.visionai.v1.FacetValue endpoints = 1; + */ + public Builder addEndpoints( + int index, com.google.cloud.visionai.v1.FacetValue.Builder builderForValue) { + if (endpointsBuilder_ == null) { + ensureEndpointsIsMutable(); + endpoints_.add(index, builderForValue.build()); + onChanged(); + } else { + endpointsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Currently, only integer type is supported for this field.
+       * 
+ * + * repeated .google.cloud.visionai.v1.FacetValue endpoints = 1; + */ + public Builder addAllEndpoints( + java.lang.Iterable values) { + if (endpointsBuilder_ == null) { + ensureEndpointsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, endpoints_); + onChanged(); + } else { + endpointsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+       * Currently, only integer type is supported for this field.
+       * 
+ * + * repeated .google.cloud.visionai.v1.FacetValue endpoints = 1; + */ + public Builder clearEndpoints() { + if (endpointsBuilder_ == null) { + endpoints_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + endpointsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+       * Currently, only integer type is supported for this field.
+       * 
+ * + * repeated .google.cloud.visionai.v1.FacetValue endpoints = 1; + */ + public Builder removeEndpoints(int index) { + if (endpointsBuilder_ == null) { + ensureEndpointsIsMutable(); + endpoints_.remove(index); + onChanged(); + } else { + endpointsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+       * Currently, only integer type is supported for this field.
+       * 
+ * + * repeated .google.cloud.visionai.v1.FacetValue endpoints = 1; + */ + public com.google.cloud.visionai.v1.FacetValue.Builder getEndpointsBuilder(int index) { + return getEndpointsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+       * Currently, only integer type is supported for this field.
+       * 
+ * + * repeated .google.cloud.visionai.v1.FacetValue endpoints = 1; + */ + public com.google.cloud.visionai.v1.FacetValueOrBuilder getEndpointsOrBuilder(int index) { + if (endpointsBuilder_ == null) { + return endpoints_.get(index); + } else { + return endpointsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+       * Currently, only integer type is supported for this field.
+       * 
+ * + * repeated .google.cloud.visionai.v1.FacetValue endpoints = 1; + */ + public java.util.List + getEndpointsOrBuilderList() { + if (endpointsBuilder_ != null) { + return endpointsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(endpoints_); + } + } + /** + * + * + *
+       * Currently, only integer type is supported for this field.
+       * 
+ * + * repeated .google.cloud.visionai.v1.FacetValue endpoints = 1; + */ + public com.google.cloud.visionai.v1.FacetValue.Builder addEndpointsBuilder() { + return getEndpointsFieldBuilder() + .addBuilder(com.google.cloud.visionai.v1.FacetValue.getDefaultInstance()); + } + /** + * + * + *
+       * Currently, only integer type is supported for this field.
+       * 
+ * + * repeated .google.cloud.visionai.v1.FacetValue endpoints = 1; + */ + public com.google.cloud.visionai.v1.FacetValue.Builder addEndpointsBuilder(int index) { + return getEndpointsFieldBuilder() + .addBuilder(index, com.google.cloud.visionai.v1.FacetValue.getDefaultInstance()); + } + /** + * + * + *
+       * Currently, only integer type is supported for this field.
+       * 
+ * + * repeated .google.cloud.visionai.v1.FacetValue endpoints = 1; + */ + public java.util.List + getEndpointsBuilderList() { + return getEndpointsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.visionai.v1.FacetValue, + com.google.cloud.visionai.v1.FacetValue.Builder, + com.google.cloud.visionai.v1.FacetValueOrBuilder> + getEndpointsFieldBuilder() { + if (endpointsBuilder_ == null) { + endpointsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.visionai.v1.FacetValue, + com.google.cloud.visionai.v1.FacetValue.Builder, + com.google.cloud.visionai.v1.FacetValueOrBuilder>( + endpoints_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + endpoints_ = null; + } + return endpointsBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.FacetProperty.CustomRangeBucketSpec) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.FacetProperty.CustomRangeBucketSpec) + private static final com.google.cloud.visionai.v1.FacetProperty.CustomRangeBucketSpec + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.FacetProperty.CustomRangeBucketSpec(); + } + + public static com.google.cloud.visionai.v1.FacetProperty.CustomRangeBucketSpec + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CustomRangeBucketSpec parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.FacetProperty.CustomRangeBucketSpec + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface DateTimeBucketSpecOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.FacetProperty.DateTimeBucketSpec) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Granularity of date type facet.
+     * 
+ * + * .google.cloud.visionai.v1.FacetProperty.DateTimeBucketSpec.Granularity granularity = 1; + * + * + * @return The enum numeric value on the wire for granularity. + */ + int getGranularityValue(); + /** + * + * + *
+     * Granularity of date type facet.
+     * 
+ * + * .google.cloud.visionai.v1.FacetProperty.DateTimeBucketSpec.Granularity granularity = 1; + * + * + * @return The granularity. + */ + com.google.cloud.visionai.v1.FacetProperty.DateTimeBucketSpec.Granularity getGranularity(); + } + /** + * + * + *
+   * If bucket type is DATE, specify how date values are bucketized.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.FacetProperty.DateTimeBucketSpec} + */ + public static final class DateTimeBucketSpec extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.FacetProperty.DateTimeBucketSpec) + DateTimeBucketSpecOrBuilder { + private static final long serialVersionUID = 0L; + // Use DateTimeBucketSpec.newBuilder() to construct. + private DateTimeBucketSpec(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DateTimeBucketSpec() { + granularity_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DateTimeBucketSpec(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_FacetProperty_DateTimeBucketSpec_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_FacetProperty_DateTimeBucketSpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.FacetProperty.DateTimeBucketSpec.class, + com.google.cloud.visionai.v1.FacetProperty.DateTimeBucketSpec.Builder.class); + } + + /** + * + * + *
+     * Granularity enum for the datetime bucket.
+     * 
+ * + * Protobuf enum {@code google.cloud.visionai.v1.FacetProperty.DateTimeBucketSpec.Granularity} + */ + public enum Granularity implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+       * Unspecified granularity.
+       * 
+ * + * GRANULARITY_UNSPECIFIED = 0; + */ + GRANULARITY_UNSPECIFIED(0), + /** + * + * + *
+       * Granularity is year.
+       * 
+ * + * YEAR = 1; + */ + YEAR(1), + /** + * + * + *
+       * Granularity is month.
+       * 
+ * + * MONTH = 2; + */ + MONTH(2), + /** + * + * + *
+       * Granularity is day.
+       * 
+ * + * DAY = 3; + */ + DAY(3), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+       * Unspecified granularity.
+       * 
+ * + * GRANULARITY_UNSPECIFIED = 0; + */ + public static final int GRANULARITY_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+       * Granularity is year.
+       * 
+ * + * YEAR = 1; + */ + public static final int YEAR_VALUE = 1; + /** + * + * + *
+       * Granularity is month.
+       * 
+ * + * MONTH = 2; + */ + public static final int MONTH_VALUE = 2; + /** + * + * + *
+       * Granularity is day.
+       * 
+ * + * DAY = 3; + */ + public static final int DAY_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; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static Granularity valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static Granularity forNumber(int value) { + switch (value) { + case 0: + return GRANULARITY_UNSPECIFIED; + case 1: + return YEAR; + case 2: + return MONTH; + case 3: + return DAY; + 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 Granularity findValueByNumber(int number) { + return Granularity.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + 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.visionai.v1.FacetProperty.DateTimeBucketSpec.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final Granularity[] VALUES = values(); + + public static Granularity 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 Granularity(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.visionai.v1.FacetProperty.DateTimeBucketSpec.Granularity) + } + + public static final int GRANULARITY_FIELD_NUMBER = 1; + private int granularity_ = 0; + /** + * + * + *
+     * Granularity of date type facet.
+     * 
+ * + * .google.cloud.visionai.v1.FacetProperty.DateTimeBucketSpec.Granularity granularity = 1; + * + * + * @return The enum numeric value on the wire for granularity. + */ + @java.lang.Override + public int getGranularityValue() { + return granularity_; + } + /** + * + * + *
+     * Granularity of date type facet.
+     * 
+ * + * .google.cloud.visionai.v1.FacetProperty.DateTimeBucketSpec.Granularity granularity = 1; + * + * + * @return The granularity. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.FacetProperty.DateTimeBucketSpec.Granularity + getGranularity() { + com.google.cloud.visionai.v1.FacetProperty.DateTimeBucketSpec.Granularity result = + com.google.cloud.visionai.v1.FacetProperty.DateTimeBucketSpec.Granularity.forNumber( + granularity_); + return result == null + ? com.google.cloud.visionai.v1.FacetProperty.DateTimeBucketSpec.Granularity.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 (granularity_ + != com.google.cloud.visionai.v1.FacetProperty.DateTimeBucketSpec.Granularity + .GRANULARITY_UNSPECIFIED + .getNumber()) { + output.writeEnum(1, granularity_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (granularity_ + != com.google.cloud.visionai.v1.FacetProperty.DateTimeBucketSpec.Granularity + .GRANULARITY_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, granularity_); + } + size += getUnknownFields().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.visionai.v1.FacetProperty.DateTimeBucketSpec)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.FacetProperty.DateTimeBucketSpec other = + (com.google.cloud.visionai.v1.FacetProperty.DateTimeBucketSpec) obj; + + if (granularity_ != other.granularity_) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + GRANULARITY_FIELD_NUMBER; + hash = (53 * hash) + granularity_; + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.FacetProperty.DateTimeBucketSpec parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.FacetProperty.DateTimeBucketSpec 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.visionai.v1.FacetProperty.DateTimeBucketSpec parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.FacetProperty.DateTimeBucketSpec 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.visionai.v1.FacetProperty.DateTimeBucketSpec parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.FacetProperty.DateTimeBucketSpec parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.FacetProperty.DateTimeBucketSpec parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.FacetProperty.DateTimeBucketSpec 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.visionai.v1.FacetProperty.DateTimeBucketSpec parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.FacetProperty.DateTimeBucketSpec 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.visionai.v1.FacetProperty.DateTimeBucketSpec parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.FacetProperty.DateTimeBucketSpec 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.visionai.v1.FacetProperty.DateTimeBucketSpec 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; + } + /** + * + * + *
+     * If bucket type is DATE, specify how date values are bucketized.
+     * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.FacetProperty.DateTimeBucketSpec} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.FacetProperty.DateTimeBucketSpec) + com.google.cloud.visionai.v1.FacetProperty.DateTimeBucketSpecOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_FacetProperty_DateTimeBucketSpec_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_FacetProperty_DateTimeBucketSpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.FacetProperty.DateTimeBucketSpec.class, + com.google.cloud.visionai.v1.FacetProperty.DateTimeBucketSpec.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.FacetProperty.DateTimeBucketSpec.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + granularity_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_FacetProperty_DateTimeBucketSpec_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.FacetProperty.DateTimeBucketSpec + getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.FacetProperty.DateTimeBucketSpec.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.FacetProperty.DateTimeBucketSpec build() { + com.google.cloud.visionai.v1.FacetProperty.DateTimeBucketSpec result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.FacetProperty.DateTimeBucketSpec buildPartial() { + com.google.cloud.visionai.v1.FacetProperty.DateTimeBucketSpec result = + new com.google.cloud.visionai.v1.FacetProperty.DateTimeBucketSpec(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.visionai.v1.FacetProperty.DateTimeBucketSpec result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.granularity_ = granularity_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.FacetProperty.DateTimeBucketSpec) { + return mergeFrom((com.google.cloud.visionai.v1.FacetProperty.DateTimeBucketSpec) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.visionai.v1.FacetProperty.DateTimeBucketSpec other) { + if (other + == com.google.cloud.visionai.v1.FacetProperty.DateTimeBucketSpec.getDefaultInstance()) + return this; + if (other.granularity_ != 0) { + setGranularityValue(other.getGranularityValue()); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + granularity_ = input.readEnum(); + bitField0_ |= 0x00000001; + break; + } // case 8 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private int granularity_ = 0; + /** + * + * + *
+       * Granularity of date type facet.
+       * 
+ * + * + * .google.cloud.visionai.v1.FacetProperty.DateTimeBucketSpec.Granularity granularity = 1; + * + * + * @return The enum numeric value on the wire for granularity. + */ + @java.lang.Override + public int getGranularityValue() { + return granularity_; + } + /** + * + * + *
+       * Granularity of date type facet.
+       * 
+ * + * + * .google.cloud.visionai.v1.FacetProperty.DateTimeBucketSpec.Granularity granularity = 1; + * + * + * @param value The enum numeric value on the wire for granularity to set. + * @return This builder for chaining. + */ + public Builder setGranularityValue(int value) { + granularity_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * Granularity of date type facet.
+       * 
+ * + * + * .google.cloud.visionai.v1.FacetProperty.DateTimeBucketSpec.Granularity granularity = 1; + * + * + * @return The granularity. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.FacetProperty.DateTimeBucketSpec.Granularity + getGranularity() { + com.google.cloud.visionai.v1.FacetProperty.DateTimeBucketSpec.Granularity result = + com.google.cloud.visionai.v1.FacetProperty.DateTimeBucketSpec.Granularity.forNumber( + granularity_); + return result == null + ? com.google.cloud.visionai.v1.FacetProperty.DateTimeBucketSpec.Granularity.UNRECOGNIZED + : result; + } + /** + * + * + *
+       * Granularity of date type facet.
+       * 
+ * + * + * .google.cloud.visionai.v1.FacetProperty.DateTimeBucketSpec.Granularity granularity = 1; + * + * + * @param value The granularity to set. + * @return This builder for chaining. + */ + public Builder setGranularity( + com.google.cloud.visionai.v1.FacetProperty.DateTimeBucketSpec.Granularity value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + granularity_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+       * Granularity of date type facet.
+       * 
+ * + * + * .google.cloud.visionai.v1.FacetProperty.DateTimeBucketSpec.Granularity granularity = 1; + * + * + * @return This builder for chaining. + */ + public Builder clearGranularity() { + bitField0_ = (bitField0_ & ~0x00000001); + granularity_ = 0; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.FacetProperty.DateTimeBucketSpec) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.FacetProperty.DateTimeBucketSpec) + private static final com.google.cloud.visionai.v1.FacetProperty.DateTimeBucketSpec + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.FacetProperty.DateTimeBucketSpec(); + } + + public static com.google.cloud.visionai.v1.FacetProperty.DateTimeBucketSpec + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DateTimeBucketSpec parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.FacetProperty.DateTimeBucketSpec + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int rangeFacetConfigCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object rangeFacetConfig_; + + public enum RangeFacetConfigCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + FIXED_RANGE_BUCKET_SPEC(5), + CUSTOM_RANGE_BUCKET_SPEC(6), + DATETIME_BUCKET_SPEC(7), + RANGEFACETCONFIG_NOT_SET(0); + private final int value; + + private RangeFacetConfigCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static RangeFacetConfigCase valueOf(int value) { + return forNumber(value); + } + + public static RangeFacetConfigCase forNumber(int value) { + switch (value) { + case 5: + return FIXED_RANGE_BUCKET_SPEC; + case 6: + return CUSTOM_RANGE_BUCKET_SPEC; + case 7: + return DATETIME_BUCKET_SPEC; + case 0: + return RANGEFACETCONFIG_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public RangeFacetConfigCase getRangeFacetConfigCase() { + return RangeFacetConfigCase.forNumber(rangeFacetConfigCase_); + } + + public static final int FIXED_RANGE_BUCKET_SPEC_FIELD_NUMBER = 5; + /** + * + * + *
+   * Fixed range facet bucket config.
+   * 
+ * + * .google.cloud.visionai.v1.FacetProperty.FixedRangeBucketSpec fixed_range_bucket_spec = 5; + * + * + * @return Whether the fixedRangeBucketSpec field is set. + */ + @java.lang.Override + public boolean hasFixedRangeBucketSpec() { + return rangeFacetConfigCase_ == 5; + } + /** + * + * + *
+   * Fixed range facet bucket config.
+   * 
+ * + * .google.cloud.visionai.v1.FacetProperty.FixedRangeBucketSpec fixed_range_bucket_spec = 5; + * + * + * @return The fixedRangeBucketSpec. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.FacetProperty.FixedRangeBucketSpec getFixedRangeBucketSpec() { + if (rangeFacetConfigCase_ == 5) { + return (com.google.cloud.visionai.v1.FacetProperty.FixedRangeBucketSpec) rangeFacetConfig_; + } + return com.google.cloud.visionai.v1.FacetProperty.FixedRangeBucketSpec.getDefaultInstance(); + } + /** + * + * + *
+   * Fixed range facet bucket config.
+   * 
+ * + * .google.cloud.visionai.v1.FacetProperty.FixedRangeBucketSpec fixed_range_bucket_spec = 5; + * + */ + @java.lang.Override + public com.google.cloud.visionai.v1.FacetProperty.FixedRangeBucketSpecOrBuilder + getFixedRangeBucketSpecOrBuilder() { + if (rangeFacetConfigCase_ == 5) { + return (com.google.cloud.visionai.v1.FacetProperty.FixedRangeBucketSpec) rangeFacetConfig_; + } + return com.google.cloud.visionai.v1.FacetProperty.FixedRangeBucketSpec.getDefaultInstance(); + } + + public static final int CUSTOM_RANGE_BUCKET_SPEC_FIELD_NUMBER = 6; + /** + * + * + *
+   * Custom range facet bucket config.
+   * 
+ * + * + * .google.cloud.visionai.v1.FacetProperty.CustomRangeBucketSpec custom_range_bucket_spec = 6; + * + * + * @return Whether the customRangeBucketSpec field is set. + */ + @java.lang.Override + public boolean hasCustomRangeBucketSpec() { + return rangeFacetConfigCase_ == 6; + } + /** + * + * + *
+   * Custom range facet bucket config.
+   * 
+ * + * + * .google.cloud.visionai.v1.FacetProperty.CustomRangeBucketSpec custom_range_bucket_spec = 6; + * + * + * @return The customRangeBucketSpec. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.FacetProperty.CustomRangeBucketSpec + getCustomRangeBucketSpec() { + if (rangeFacetConfigCase_ == 6) { + return (com.google.cloud.visionai.v1.FacetProperty.CustomRangeBucketSpec) rangeFacetConfig_; + } + return com.google.cloud.visionai.v1.FacetProperty.CustomRangeBucketSpec.getDefaultInstance(); + } + /** + * + * + *
+   * Custom range facet bucket config.
+   * 
+ * + * + * .google.cloud.visionai.v1.FacetProperty.CustomRangeBucketSpec custom_range_bucket_spec = 6; + * + */ + @java.lang.Override + public com.google.cloud.visionai.v1.FacetProperty.CustomRangeBucketSpecOrBuilder + getCustomRangeBucketSpecOrBuilder() { + if (rangeFacetConfigCase_ == 6) { + return (com.google.cloud.visionai.v1.FacetProperty.CustomRangeBucketSpec) rangeFacetConfig_; + } + return com.google.cloud.visionai.v1.FacetProperty.CustomRangeBucketSpec.getDefaultInstance(); + } + + public static final int DATETIME_BUCKET_SPEC_FIELD_NUMBER = 7; + /** + * + * + *
+   * Datetime range facet bucket config.
+   * 
+ * + * .google.cloud.visionai.v1.FacetProperty.DateTimeBucketSpec datetime_bucket_spec = 7; + * + * + * @return Whether the datetimeBucketSpec field is set. + */ + @java.lang.Override + public boolean hasDatetimeBucketSpec() { + return rangeFacetConfigCase_ == 7; + } + /** + * + * + *
+   * Datetime range facet bucket config.
+   * 
+ * + * .google.cloud.visionai.v1.FacetProperty.DateTimeBucketSpec datetime_bucket_spec = 7; + * + * + * @return The datetimeBucketSpec. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.FacetProperty.DateTimeBucketSpec getDatetimeBucketSpec() { + if (rangeFacetConfigCase_ == 7) { + return (com.google.cloud.visionai.v1.FacetProperty.DateTimeBucketSpec) rangeFacetConfig_; + } + return com.google.cloud.visionai.v1.FacetProperty.DateTimeBucketSpec.getDefaultInstance(); + } + /** + * + * + *
+   * Datetime range facet bucket config.
+   * 
+ * + * .google.cloud.visionai.v1.FacetProperty.DateTimeBucketSpec datetime_bucket_spec = 7; + * + */ + @java.lang.Override + public com.google.cloud.visionai.v1.FacetProperty.DateTimeBucketSpecOrBuilder + getDatetimeBucketSpecOrBuilder() { + if (rangeFacetConfigCase_ == 7) { + return (com.google.cloud.visionai.v1.FacetProperty.DateTimeBucketSpec) rangeFacetConfig_; + } + return com.google.cloud.visionai.v1.FacetProperty.DateTimeBucketSpec.getDefaultInstance(); + } + + public static final int MAPPED_FIELDS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList mappedFields_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + * + * + *
+   * Name of the facets, which are the dimensions users want to use to refine
+   * search results. `mapped_fields` will match UserSpecifiedDataSchema keys.
+   *
+   * For example, user can add a bunch of UGAs with the same key, such as
+   * player:adam, player:bob, player:charles. When multiple mapped_fields are
+   * specified, will merge their value together as final facet value. E.g.
+   * home_team: a, home_team:b, away_team:a, away_team:c, when facet_field =
+   * [home_team, away_team], facet_value will be [a, b, c].
+   *
+   * UNLESS this is a 1:1 facet dimension (mapped_fields.size() == 1) AND the
+   * mapped_field equals the parent SearchConfig.name, the parent must
+   * also contain a SearchCriteriaProperty that maps to the same fields.
+   * mapped_fields must not be empty.
+   * 
+ * + * repeated string mapped_fields = 1; + * + * @return A list containing the mappedFields. + */ + public com.google.protobuf.ProtocolStringList getMappedFieldsList() { + return mappedFields_; + } + /** + * + * + *
+   * Name of the facets, which are the dimensions users want to use to refine
+   * search results. `mapped_fields` will match UserSpecifiedDataSchema keys.
+   *
+   * For example, user can add a bunch of UGAs with the same key, such as
+   * player:adam, player:bob, player:charles. When multiple mapped_fields are
+   * specified, will merge their value together as final facet value. E.g.
+   * home_team: a, home_team:b, away_team:a, away_team:c, when facet_field =
+   * [home_team, away_team], facet_value will be [a, b, c].
+   *
+   * UNLESS this is a 1:1 facet dimension (mapped_fields.size() == 1) AND the
+   * mapped_field equals the parent SearchConfig.name, the parent must
+   * also contain a SearchCriteriaProperty that maps to the same fields.
+   * mapped_fields must not be empty.
+   * 
+ * + * repeated string mapped_fields = 1; + * + * @return The count of mappedFields. + */ + public int getMappedFieldsCount() { + return mappedFields_.size(); + } + /** + * + * + *
+   * Name of the facets, which are the dimensions users want to use to refine
+   * search results. `mapped_fields` will match UserSpecifiedDataSchema keys.
+   *
+   * For example, user can add a bunch of UGAs with the same key, such as
+   * player:adam, player:bob, player:charles. When multiple mapped_fields are
+   * specified, will merge their value together as final facet value. E.g.
+   * home_team: a, home_team:b, away_team:a, away_team:c, when facet_field =
+   * [home_team, away_team], facet_value will be [a, b, c].
+   *
+   * UNLESS this is a 1:1 facet dimension (mapped_fields.size() == 1) AND the
+   * mapped_field equals the parent SearchConfig.name, the parent must
+   * also contain a SearchCriteriaProperty that maps to the same fields.
+   * mapped_fields must not be empty.
+   * 
+ * + * repeated string mapped_fields = 1; + * + * @param index The index of the element to return. + * @return The mappedFields at the given index. + */ + public java.lang.String getMappedFields(int index) { + return mappedFields_.get(index); + } + /** + * + * + *
+   * Name of the facets, which are the dimensions users want to use to refine
+   * search results. `mapped_fields` will match UserSpecifiedDataSchema keys.
+   *
+   * For example, user can add a bunch of UGAs with the same key, such as
+   * player:adam, player:bob, player:charles. When multiple mapped_fields are
+   * specified, will merge their value together as final facet value. E.g.
+   * home_team: a, home_team:b, away_team:a, away_team:c, when facet_field =
+   * [home_team, away_team], facet_value will be [a, b, c].
+   *
+   * UNLESS this is a 1:1 facet dimension (mapped_fields.size() == 1) AND the
+   * mapped_field equals the parent SearchConfig.name, the parent must
+   * also contain a SearchCriteriaProperty that maps to the same fields.
+   * mapped_fields must not be empty.
+   * 
+ * + * repeated string mapped_fields = 1; + * + * @param index The index of the value to return. + * @return The bytes of the mappedFields at the given index. + */ + public com.google.protobuf.ByteString getMappedFieldsBytes(int index) { + return mappedFields_.getByteString(index); + } + + public static final int DISPLAY_NAME_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object displayName_ = ""; + /** + * + * + *
+   * Display name of the facet. To be used by UI for facet rendering.
+   * 
+ * + * string display_name = 2; + * + * @return The displayName. + */ + @java.lang.Override + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + 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(); + displayName_ = s; + return s; + } + } + /** + * + * + *
+   * Display name of the facet. To be used by UI for facet rendering.
+   * 
+ * + * string display_name = 2; + * + * @return The bytes for displayName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int RESULT_SIZE_FIELD_NUMBER = 3; + private long resultSize_ = 0L; + /** + * + * + *
+   * Maximum number of unique bucket to return for one facet. Bucket number can
+   * be large for high-cardinality facet such as "player". We only return top-n
+   * most related ones to user. If it's <= 0, the server will decide the
+   * appropriate result_size.
+   * 
+ * + * int64 result_size = 3; + * + * @return The resultSize. + */ + @java.lang.Override + public long getResultSize() { + return resultSize_; + } + + public static final int BUCKET_TYPE_FIELD_NUMBER = 4; + private int bucketType_ = 0; + /** + * + * + *
+   * Facet bucket type e.g. value, range.
+   * 
+ * + * .google.cloud.visionai.v1.FacetBucketType bucket_type = 4; + * + * @return The enum numeric value on the wire for bucketType. + */ + @java.lang.Override + public int getBucketTypeValue() { + return bucketType_; + } + /** + * + * + *
+   * Facet bucket type e.g. value, range.
+   * 
+ * + * .google.cloud.visionai.v1.FacetBucketType bucket_type = 4; + * + * @return The bucketType. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.FacetBucketType getBucketType() { + com.google.cloud.visionai.v1.FacetBucketType result = + com.google.cloud.visionai.v1.FacetBucketType.forNumber(bucketType_); + return result == null ? com.google.cloud.visionai.v1.FacetBucketType.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 { + for (int i = 0; i < mappedFields_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, mappedFields_.getRaw(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, displayName_); + } + if (resultSize_ != 0L) { + output.writeInt64(3, resultSize_); + } + if (bucketType_ + != com.google.cloud.visionai.v1.FacetBucketType.FACET_BUCKET_TYPE_UNSPECIFIED.getNumber()) { + output.writeEnum(4, bucketType_); + } + if (rangeFacetConfigCase_ == 5) { + output.writeMessage( + 5, (com.google.cloud.visionai.v1.FacetProperty.FixedRangeBucketSpec) rangeFacetConfig_); + } + if (rangeFacetConfigCase_ == 6) { + output.writeMessage( + 6, (com.google.cloud.visionai.v1.FacetProperty.CustomRangeBucketSpec) rangeFacetConfig_); + } + if (rangeFacetConfigCase_ == 7) { + output.writeMessage( + 7, (com.google.cloud.visionai.v1.FacetProperty.DateTimeBucketSpec) rangeFacetConfig_); + } + getUnknownFields().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 < mappedFields_.size(); i++) { + dataSize += computeStringSizeNoTag(mappedFields_.getRaw(i)); + } + size += dataSize; + size += 1 * getMappedFieldsList().size(); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, displayName_); + } + if (resultSize_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(3, resultSize_); + } + if (bucketType_ + != com.google.cloud.visionai.v1.FacetBucketType.FACET_BUCKET_TYPE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(4, bucketType_); + } + if (rangeFacetConfigCase_ == 5) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 5, + (com.google.cloud.visionai.v1.FacetProperty.FixedRangeBucketSpec) rangeFacetConfig_); + } + if (rangeFacetConfigCase_ == 6) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 6, + (com.google.cloud.visionai.v1.FacetProperty.CustomRangeBucketSpec) rangeFacetConfig_); + } + if (rangeFacetConfigCase_ == 7) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 7, (com.google.cloud.visionai.v1.FacetProperty.DateTimeBucketSpec) rangeFacetConfig_); + } + size += getUnknownFields().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.visionai.v1.FacetProperty)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.FacetProperty other = + (com.google.cloud.visionai.v1.FacetProperty) obj; + + if (!getMappedFieldsList().equals(other.getMappedFieldsList())) return false; + if (!getDisplayName().equals(other.getDisplayName())) return false; + if (getResultSize() != other.getResultSize()) return false; + if (bucketType_ != other.bucketType_) return false; + if (!getRangeFacetConfigCase().equals(other.getRangeFacetConfigCase())) return false; + switch (rangeFacetConfigCase_) { + case 5: + if (!getFixedRangeBucketSpec().equals(other.getFixedRangeBucketSpec())) return false; + break; + case 6: + if (!getCustomRangeBucketSpec().equals(other.getCustomRangeBucketSpec())) return false; + break; + case 7: + if (!getDatetimeBucketSpec().equals(other.getDatetimeBucketSpec())) return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getMappedFieldsCount() > 0) { + hash = (37 * hash) + MAPPED_FIELDS_FIELD_NUMBER; + hash = (53 * hash) + getMappedFieldsList().hashCode(); + } + hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDisplayName().hashCode(); + hash = (37 * hash) + RESULT_SIZE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getResultSize()); + hash = (37 * hash) + BUCKET_TYPE_FIELD_NUMBER; + hash = (53 * hash) + bucketType_; + switch (rangeFacetConfigCase_) { + case 5: + hash = (37 * hash) + FIXED_RANGE_BUCKET_SPEC_FIELD_NUMBER; + hash = (53 * hash) + getFixedRangeBucketSpec().hashCode(); + break; + case 6: + hash = (37 * hash) + CUSTOM_RANGE_BUCKET_SPEC_FIELD_NUMBER; + hash = (53 * hash) + getCustomRangeBucketSpec().hashCode(); + break; + case 7: + hash = (37 * hash) + DATETIME_BUCKET_SPEC_FIELD_NUMBER; + hash = (53 * hash) + getDatetimeBucketSpec().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.FacetProperty parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.FacetProperty 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.visionai.v1.FacetProperty parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.FacetProperty 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.visionai.v1.FacetProperty parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.FacetProperty parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.FacetProperty parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.FacetProperty 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.visionai.v1.FacetProperty parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.FacetProperty 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.visionai.v1.FacetProperty parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.FacetProperty 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.visionai.v1.FacetProperty 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; + } + /** + * + * + *
+   * Central configuration for a facet.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.FacetProperty} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.FacetProperty) + com.google.cloud.visionai.v1.FacetPropertyOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_FacetProperty_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_FacetProperty_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.FacetProperty.class, + com.google.cloud.visionai.v1.FacetProperty.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.FacetProperty.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (fixedRangeBucketSpecBuilder_ != null) { + fixedRangeBucketSpecBuilder_.clear(); + } + if (customRangeBucketSpecBuilder_ != null) { + customRangeBucketSpecBuilder_.clear(); + } + if (datetimeBucketSpecBuilder_ != null) { + datetimeBucketSpecBuilder_.clear(); + } + mappedFields_ = com.google.protobuf.LazyStringArrayList.emptyList(); + displayName_ = ""; + resultSize_ = 0L; + bucketType_ = 0; + rangeFacetConfigCase_ = 0; + rangeFacetConfig_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_FacetProperty_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.FacetProperty getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.FacetProperty.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.FacetProperty build() { + com.google.cloud.visionai.v1.FacetProperty result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.FacetProperty buildPartial() { + com.google.cloud.visionai.v1.FacetProperty result = + new com.google.cloud.visionai.v1.FacetProperty(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.visionai.v1.FacetProperty result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000008) != 0)) { + mappedFields_.makeImmutable(); + result.mappedFields_ = mappedFields_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.displayName_ = displayName_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.resultSize_ = resultSize_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.bucketType_ = bucketType_; + } + } + + private void buildPartialOneofs(com.google.cloud.visionai.v1.FacetProperty result) { + result.rangeFacetConfigCase_ = rangeFacetConfigCase_; + result.rangeFacetConfig_ = this.rangeFacetConfig_; + if (rangeFacetConfigCase_ == 5 && fixedRangeBucketSpecBuilder_ != null) { + result.rangeFacetConfig_ = fixedRangeBucketSpecBuilder_.build(); + } + if (rangeFacetConfigCase_ == 6 && customRangeBucketSpecBuilder_ != null) { + result.rangeFacetConfig_ = customRangeBucketSpecBuilder_.build(); + } + if (rangeFacetConfigCase_ == 7 && datetimeBucketSpecBuilder_ != null) { + result.rangeFacetConfig_ = datetimeBucketSpecBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.FacetProperty) { + return mergeFrom((com.google.cloud.visionai.v1.FacetProperty) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.FacetProperty other) { + if (other == com.google.cloud.visionai.v1.FacetProperty.getDefaultInstance()) return this; + if (!other.mappedFields_.isEmpty()) { + if (mappedFields_.isEmpty()) { + mappedFields_ = other.mappedFields_; + bitField0_ |= 0x00000008; + } else { + ensureMappedFieldsIsMutable(); + mappedFields_.addAll(other.mappedFields_); + } + onChanged(); + } + if (!other.getDisplayName().isEmpty()) { + displayName_ = other.displayName_; + bitField0_ |= 0x00000010; + onChanged(); + } + if (other.getResultSize() != 0L) { + setResultSize(other.getResultSize()); + } + if (other.bucketType_ != 0) { + setBucketTypeValue(other.getBucketTypeValue()); + } + switch (other.getRangeFacetConfigCase()) { + case FIXED_RANGE_BUCKET_SPEC: + { + mergeFixedRangeBucketSpec(other.getFixedRangeBucketSpec()); + break; + } + case CUSTOM_RANGE_BUCKET_SPEC: + { + mergeCustomRangeBucketSpec(other.getCustomRangeBucketSpec()); + break; + } + case DATETIME_BUCKET_SPEC: + { + mergeDatetimeBucketSpec(other.getDatetimeBucketSpec()); + break; + } + case RANGEFACETCONFIG_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + 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(); + ensureMappedFieldsIsMutable(); + mappedFields_.add(s); + break; + } // case 10 + case 18: + { + displayName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 18 + case 24: + { + resultSize_ = input.readInt64(); + bitField0_ |= 0x00000020; + break; + } // case 24 + case 32: + { + bucketType_ = input.readEnum(); + bitField0_ |= 0x00000040; + break; + } // case 32 + case 42: + { + input.readMessage( + getFixedRangeBucketSpecFieldBuilder().getBuilder(), extensionRegistry); + rangeFacetConfigCase_ = 5; + break; + } // case 42 + case 50: + { + input.readMessage( + getCustomRangeBucketSpecFieldBuilder().getBuilder(), extensionRegistry); + rangeFacetConfigCase_ = 6; + break; + } // case 50 + case 58: + { + input.readMessage( + getDatetimeBucketSpecFieldBuilder().getBuilder(), extensionRegistry); + rangeFacetConfigCase_ = 7; + break; + } // case 58 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int rangeFacetConfigCase_ = 0; + private java.lang.Object rangeFacetConfig_; + + public RangeFacetConfigCase getRangeFacetConfigCase() { + return RangeFacetConfigCase.forNumber(rangeFacetConfigCase_); + } + + public Builder clearRangeFacetConfig() { + rangeFacetConfigCase_ = 0; + rangeFacetConfig_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.FacetProperty.FixedRangeBucketSpec, + com.google.cloud.visionai.v1.FacetProperty.FixedRangeBucketSpec.Builder, + com.google.cloud.visionai.v1.FacetProperty.FixedRangeBucketSpecOrBuilder> + fixedRangeBucketSpecBuilder_; + /** + * + * + *
+     * Fixed range facet bucket config.
+     * 
+ * + * + * .google.cloud.visionai.v1.FacetProperty.FixedRangeBucketSpec fixed_range_bucket_spec = 5; + * + * + * @return Whether the fixedRangeBucketSpec field is set. + */ + @java.lang.Override + public boolean hasFixedRangeBucketSpec() { + return rangeFacetConfigCase_ == 5; + } + /** + * + * + *
+     * Fixed range facet bucket config.
+     * 
+ * + * + * .google.cloud.visionai.v1.FacetProperty.FixedRangeBucketSpec fixed_range_bucket_spec = 5; + * + * + * @return The fixedRangeBucketSpec. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.FacetProperty.FixedRangeBucketSpec + getFixedRangeBucketSpec() { + if (fixedRangeBucketSpecBuilder_ == null) { + if (rangeFacetConfigCase_ == 5) { + return (com.google.cloud.visionai.v1.FacetProperty.FixedRangeBucketSpec) + rangeFacetConfig_; + } + return com.google.cloud.visionai.v1.FacetProperty.FixedRangeBucketSpec.getDefaultInstance(); + } else { + if (rangeFacetConfigCase_ == 5) { + return fixedRangeBucketSpecBuilder_.getMessage(); + } + return com.google.cloud.visionai.v1.FacetProperty.FixedRangeBucketSpec.getDefaultInstance(); + } + } + /** + * + * + *
+     * Fixed range facet bucket config.
+     * 
+ * + * + * .google.cloud.visionai.v1.FacetProperty.FixedRangeBucketSpec fixed_range_bucket_spec = 5; + * + */ + public Builder setFixedRangeBucketSpec( + com.google.cloud.visionai.v1.FacetProperty.FixedRangeBucketSpec value) { + if (fixedRangeBucketSpecBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + rangeFacetConfig_ = value; + onChanged(); + } else { + fixedRangeBucketSpecBuilder_.setMessage(value); + } + rangeFacetConfigCase_ = 5; + return this; + } + /** + * + * + *
+     * Fixed range facet bucket config.
+     * 
+ * + * + * .google.cloud.visionai.v1.FacetProperty.FixedRangeBucketSpec fixed_range_bucket_spec = 5; + * + */ + public Builder setFixedRangeBucketSpec( + com.google.cloud.visionai.v1.FacetProperty.FixedRangeBucketSpec.Builder builderForValue) { + if (fixedRangeBucketSpecBuilder_ == null) { + rangeFacetConfig_ = builderForValue.build(); + onChanged(); + } else { + fixedRangeBucketSpecBuilder_.setMessage(builderForValue.build()); + } + rangeFacetConfigCase_ = 5; + return this; + } + /** + * + * + *
+     * Fixed range facet bucket config.
+     * 
+ * + * + * .google.cloud.visionai.v1.FacetProperty.FixedRangeBucketSpec fixed_range_bucket_spec = 5; + * + */ + public Builder mergeFixedRangeBucketSpec( + com.google.cloud.visionai.v1.FacetProperty.FixedRangeBucketSpec value) { + if (fixedRangeBucketSpecBuilder_ == null) { + if (rangeFacetConfigCase_ == 5 + && rangeFacetConfig_ + != com.google.cloud.visionai.v1.FacetProperty.FixedRangeBucketSpec + .getDefaultInstance()) { + rangeFacetConfig_ = + com.google.cloud.visionai.v1.FacetProperty.FixedRangeBucketSpec.newBuilder( + (com.google.cloud.visionai.v1.FacetProperty.FixedRangeBucketSpec) + rangeFacetConfig_) + .mergeFrom(value) + .buildPartial(); + } else { + rangeFacetConfig_ = value; + } + onChanged(); + } else { + if (rangeFacetConfigCase_ == 5) { + fixedRangeBucketSpecBuilder_.mergeFrom(value); + } else { + fixedRangeBucketSpecBuilder_.setMessage(value); + } + } + rangeFacetConfigCase_ = 5; + return this; + } + /** + * + * + *
+     * Fixed range facet bucket config.
+     * 
+ * + * + * .google.cloud.visionai.v1.FacetProperty.FixedRangeBucketSpec fixed_range_bucket_spec = 5; + * + */ + public Builder clearFixedRangeBucketSpec() { + if (fixedRangeBucketSpecBuilder_ == null) { + if (rangeFacetConfigCase_ == 5) { + rangeFacetConfigCase_ = 0; + rangeFacetConfig_ = null; + onChanged(); + } + } else { + if (rangeFacetConfigCase_ == 5) { + rangeFacetConfigCase_ = 0; + rangeFacetConfig_ = null; + } + fixedRangeBucketSpecBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Fixed range facet bucket config.
+     * 
+ * + * + * .google.cloud.visionai.v1.FacetProperty.FixedRangeBucketSpec fixed_range_bucket_spec = 5; + * + */ + public com.google.cloud.visionai.v1.FacetProperty.FixedRangeBucketSpec.Builder + getFixedRangeBucketSpecBuilder() { + return getFixedRangeBucketSpecFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Fixed range facet bucket config.
+     * 
+ * + * + * .google.cloud.visionai.v1.FacetProperty.FixedRangeBucketSpec fixed_range_bucket_spec = 5; + * + */ + @java.lang.Override + public com.google.cloud.visionai.v1.FacetProperty.FixedRangeBucketSpecOrBuilder + getFixedRangeBucketSpecOrBuilder() { + if ((rangeFacetConfigCase_ == 5) && (fixedRangeBucketSpecBuilder_ != null)) { + return fixedRangeBucketSpecBuilder_.getMessageOrBuilder(); + } else { + if (rangeFacetConfigCase_ == 5) { + return (com.google.cloud.visionai.v1.FacetProperty.FixedRangeBucketSpec) + rangeFacetConfig_; + } + return com.google.cloud.visionai.v1.FacetProperty.FixedRangeBucketSpec.getDefaultInstance(); + } + } + /** + * + * + *
+     * Fixed range facet bucket config.
+     * 
+ * + * + * .google.cloud.visionai.v1.FacetProperty.FixedRangeBucketSpec fixed_range_bucket_spec = 5; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.FacetProperty.FixedRangeBucketSpec, + com.google.cloud.visionai.v1.FacetProperty.FixedRangeBucketSpec.Builder, + com.google.cloud.visionai.v1.FacetProperty.FixedRangeBucketSpecOrBuilder> + getFixedRangeBucketSpecFieldBuilder() { + if (fixedRangeBucketSpecBuilder_ == null) { + if (!(rangeFacetConfigCase_ == 5)) { + rangeFacetConfig_ = + com.google.cloud.visionai.v1.FacetProperty.FixedRangeBucketSpec.getDefaultInstance(); + } + fixedRangeBucketSpecBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.FacetProperty.FixedRangeBucketSpec, + com.google.cloud.visionai.v1.FacetProperty.FixedRangeBucketSpec.Builder, + com.google.cloud.visionai.v1.FacetProperty.FixedRangeBucketSpecOrBuilder>( + (com.google.cloud.visionai.v1.FacetProperty.FixedRangeBucketSpec) rangeFacetConfig_, + getParentForChildren(), + isClean()); + rangeFacetConfig_ = null; + } + rangeFacetConfigCase_ = 5; + onChanged(); + return fixedRangeBucketSpecBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.FacetProperty.CustomRangeBucketSpec, + com.google.cloud.visionai.v1.FacetProperty.CustomRangeBucketSpec.Builder, + com.google.cloud.visionai.v1.FacetProperty.CustomRangeBucketSpecOrBuilder> + customRangeBucketSpecBuilder_; + /** + * + * + *
+     * Custom range facet bucket config.
+     * 
+ * + * + * .google.cloud.visionai.v1.FacetProperty.CustomRangeBucketSpec custom_range_bucket_spec = 6; + * + * + * @return Whether the customRangeBucketSpec field is set. + */ + @java.lang.Override + public boolean hasCustomRangeBucketSpec() { + return rangeFacetConfigCase_ == 6; + } + /** + * + * + *
+     * Custom range facet bucket config.
+     * 
+ * + * + * .google.cloud.visionai.v1.FacetProperty.CustomRangeBucketSpec custom_range_bucket_spec = 6; + * + * + * @return The customRangeBucketSpec. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.FacetProperty.CustomRangeBucketSpec + getCustomRangeBucketSpec() { + if (customRangeBucketSpecBuilder_ == null) { + if (rangeFacetConfigCase_ == 6) { + return (com.google.cloud.visionai.v1.FacetProperty.CustomRangeBucketSpec) + rangeFacetConfig_; + } + return com.google.cloud.visionai.v1.FacetProperty.CustomRangeBucketSpec + .getDefaultInstance(); + } else { + if (rangeFacetConfigCase_ == 6) { + return customRangeBucketSpecBuilder_.getMessage(); + } + return com.google.cloud.visionai.v1.FacetProperty.CustomRangeBucketSpec + .getDefaultInstance(); + } + } + /** + * + * + *
+     * Custom range facet bucket config.
+     * 
+ * + * + * .google.cloud.visionai.v1.FacetProperty.CustomRangeBucketSpec custom_range_bucket_spec = 6; + * + */ + public Builder setCustomRangeBucketSpec( + com.google.cloud.visionai.v1.FacetProperty.CustomRangeBucketSpec value) { + if (customRangeBucketSpecBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + rangeFacetConfig_ = value; + onChanged(); + } else { + customRangeBucketSpecBuilder_.setMessage(value); + } + rangeFacetConfigCase_ = 6; + return this; + } + /** + * + * + *
+     * Custom range facet bucket config.
+     * 
+ * + * + * .google.cloud.visionai.v1.FacetProperty.CustomRangeBucketSpec custom_range_bucket_spec = 6; + * + */ + public Builder setCustomRangeBucketSpec( + com.google.cloud.visionai.v1.FacetProperty.CustomRangeBucketSpec.Builder builderForValue) { + if (customRangeBucketSpecBuilder_ == null) { + rangeFacetConfig_ = builderForValue.build(); + onChanged(); + } else { + customRangeBucketSpecBuilder_.setMessage(builderForValue.build()); + } + rangeFacetConfigCase_ = 6; + return this; + } + /** + * + * + *
+     * Custom range facet bucket config.
+     * 
+ * + * + * .google.cloud.visionai.v1.FacetProperty.CustomRangeBucketSpec custom_range_bucket_spec = 6; + * + */ + public Builder mergeCustomRangeBucketSpec( + com.google.cloud.visionai.v1.FacetProperty.CustomRangeBucketSpec value) { + if (customRangeBucketSpecBuilder_ == null) { + if (rangeFacetConfigCase_ == 6 + && rangeFacetConfig_ + != com.google.cloud.visionai.v1.FacetProperty.CustomRangeBucketSpec + .getDefaultInstance()) { + rangeFacetConfig_ = + com.google.cloud.visionai.v1.FacetProperty.CustomRangeBucketSpec.newBuilder( + (com.google.cloud.visionai.v1.FacetProperty.CustomRangeBucketSpec) + rangeFacetConfig_) + .mergeFrom(value) + .buildPartial(); + } else { + rangeFacetConfig_ = value; + } + onChanged(); + } else { + if (rangeFacetConfigCase_ == 6) { + customRangeBucketSpecBuilder_.mergeFrom(value); + } else { + customRangeBucketSpecBuilder_.setMessage(value); + } + } + rangeFacetConfigCase_ = 6; + return this; + } + /** + * + * + *
+     * Custom range facet bucket config.
+     * 
+ * + * + * .google.cloud.visionai.v1.FacetProperty.CustomRangeBucketSpec custom_range_bucket_spec = 6; + * + */ + public Builder clearCustomRangeBucketSpec() { + if (customRangeBucketSpecBuilder_ == null) { + if (rangeFacetConfigCase_ == 6) { + rangeFacetConfigCase_ = 0; + rangeFacetConfig_ = null; + onChanged(); + } + } else { + if (rangeFacetConfigCase_ == 6) { + rangeFacetConfigCase_ = 0; + rangeFacetConfig_ = null; + } + customRangeBucketSpecBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Custom range facet bucket config.
+     * 
+ * + * + * .google.cloud.visionai.v1.FacetProperty.CustomRangeBucketSpec custom_range_bucket_spec = 6; + * + */ + public com.google.cloud.visionai.v1.FacetProperty.CustomRangeBucketSpec.Builder + getCustomRangeBucketSpecBuilder() { + return getCustomRangeBucketSpecFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Custom range facet bucket config.
+     * 
+ * + * + * .google.cloud.visionai.v1.FacetProperty.CustomRangeBucketSpec custom_range_bucket_spec = 6; + * + */ + @java.lang.Override + public com.google.cloud.visionai.v1.FacetProperty.CustomRangeBucketSpecOrBuilder + getCustomRangeBucketSpecOrBuilder() { + if ((rangeFacetConfigCase_ == 6) && (customRangeBucketSpecBuilder_ != null)) { + return customRangeBucketSpecBuilder_.getMessageOrBuilder(); + } else { + if (rangeFacetConfigCase_ == 6) { + return (com.google.cloud.visionai.v1.FacetProperty.CustomRangeBucketSpec) + rangeFacetConfig_; + } + return com.google.cloud.visionai.v1.FacetProperty.CustomRangeBucketSpec + .getDefaultInstance(); + } + } + /** + * + * + *
+     * Custom range facet bucket config.
+     * 
+ * + * + * .google.cloud.visionai.v1.FacetProperty.CustomRangeBucketSpec custom_range_bucket_spec = 6; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.FacetProperty.CustomRangeBucketSpec, + com.google.cloud.visionai.v1.FacetProperty.CustomRangeBucketSpec.Builder, + com.google.cloud.visionai.v1.FacetProperty.CustomRangeBucketSpecOrBuilder> + getCustomRangeBucketSpecFieldBuilder() { + if (customRangeBucketSpecBuilder_ == null) { + if (!(rangeFacetConfigCase_ == 6)) { + rangeFacetConfig_ = + com.google.cloud.visionai.v1.FacetProperty.CustomRangeBucketSpec.getDefaultInstance(); + } + customRangeBucketSpecBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.FacetProperty.CustomRangeBucketSpec, + com.google.cloud.visionai.v1.FacetProperty.CustomRangeBucketSpec.Builder, + com.google.cloud.visionai.v1.FacetProperty.CustomRangeBucketSpecOrBuilder>( + (com.google.cloud.visionai.v1.FacetProperty.CustomRangeBucketSpec) + rangeFacetConfig_, + getParentForChildren(), + isClean()); + rangeFacetConfig_ = null; + } + rangeFacetConfigCase_ = 6; + onChanged(); + return customRangeBucketSpecBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.FacetProperty.DateTimeBucketSpec, + com.google.cloud.visionai.v1.FacetProperty.DateTimeBucketSpec.Builder, + com.google.cloud.visionai.v1.FacetProperty.DateTimeBucketSpecOrBuilder> + datetimeBucketSpecBuilder_; + /** + * + * + *
+     * Datetime range facet bucket config.
+     * 
+ * + * .google.cloud.visionai.v1.FacetProperty.DateTimeBucketSpec datetime_bucket_spec = 7; + * + * + * @return Whether the datetimeBucketSpec field is set. + */ + @java.lang.Override + public boolean hasDatetimeBucketSpec() { + return rangeFacetConfigCase_ == 7; + } + /** + * + * + *
+     * Datetime range facet bucket config.
+     * 
+ * + * .google.cloud.visionai.v1.FacetProperty.DateTimeBucketSpec datetime_bucket_spec = 7; + * + * + * @return The datetimeBucketSpec. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.FacetProperty.DateTimeBucketSpec getDatetimeBucketSpec() { + if (datetimeBucketSpecBuilder_ == null) { + if (rangeFacetConfigCase_ == 7) { + return (com.google.cloud.visionai.v1.FacetProperty.DateTimeBucketSpec) rangeFacetConfig_; + } + return com.google.cloud.visionai.v1.FacetProperty.DateTimeBucketSpec.getDefaultInstance(); + } else { + if (rangeFacetConfigCase_ == 7) { + return datetimeBucketSpecBuilder_.getMessage(); + } + return com.google.cloud.visionai.v1.FacetProperty.DateTimeBucketSpec.getDefaultInstance(); + } + } + /** + * + * + *
+     * Datetime range facet bucket config.
+     * 
+ * + * .google.cloud.visionai.v1.FacetProperty.DateTimeBucketSpec datetime_bucket_spec = 7; + * + */ + public Builder setDatetimeBucketSpec( + com.google.cloud.visionai.v1.FacetProperty.DateTimeBucketSpec value) { + if (datetimeBucketSpecBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + rangeFacetConfig_ = value; + onChanged(); + } else { + datetimeBucketSpecBuilder_.setMessage(value); + } + rangeFacetConfigCase_ = 7; + return this; + } + /** + * + * + *
+     * Datetime range facet bucket config.
+     * 
+ * + * .google.cloud.visionai.v1.FacetProperty.DateTimeBucketSpec datetime_bucket_spec = 7; + * + */ + public Builder setDatetimeBucketSpec( + com.google.cloud.visionai.v1.FacetProperty.DateTimeBucketSpec.Builder builderForValue) { + if (datetimeBucketSpecBuilder_ == null) { + rangeFacetConfig_ = builderForValue.build(); + onChanged(); + } else { + datetimeBucketSpecBuilder_.setMessage(builderForValue.build()); + } + rangeFacetConfigCase_ = 7; + return this; + } + /** + * + * + *
+     * Datetime range facet bucket config.
+     * 
+ * + * .google.cloud.visionai.v1.FacetProperty.DateTimeBucketSpec datetime_bucket_spec = 7; + * + */ + public Builder mergeDatetimeBucketSpec( + com.google.cloud.visionai.v1.FacetProperty.DateTimeBucketSpec value) { + if (datetimeBucketSpecBuilder_ == null) { + if (rangeFacetConfigCase_ == 7 + && rangeFacetConfig_ + != com.google.cloud.visionai.v1.FacetProperty.DateTimeBucketSpec + .getDefaultInstance()) { + rangeFacetConfig_ = + com.google.cloud.visionai.v1.FacetProperty.DateTimeBucketSpec.newBuilder( + (com.google.cloud.visionai.v1.FacetProperty.DateTimeBucketSpec) + rangeFacetConfig_) + .mergeFrom(value) + .buildPartial(); + } else { + rangeFacetConfig_ = value; + } + onChanged(); + } else { + if (rangeFacetConfigCase_ == 7) { + datetimeBucketSpecBuilder_.mergeFrom(value); + } else { + datetimeBucketSpecBuilder_.setMessage(value); + } + } + rangeFacetConfigCase_ = 7; + return this; + } + /** + * + * + *
+     * Datetime range facet bucket config.
+     * 
+ * + * .google.cloud.visionai.v1.FacetProperty.DateTimeBucketSpec datetime_bucket_spec = 7; + * + */ + public Builder clearDatetimeBucketSpec() { + if (datetimeBucketSpecBuilder_ == null) { + if (rangeFacetConfigCase_ == 7) { + rangeFacetConfigCase_ = 0; + rangeFacetConfig_ = null; + onChanged(); + } + } else { + if (rangeFacetConfigCase_ == 7) { + rangeFacetConfigCase_ = 0; + rangeFacetConfig_ = null; + } + datetimeBucketSpecBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Datetime range facet bucket config.
+     * 
+ * + * .google.cloud.visionai.v1.FacetProperty.DateTimeBucketSpec datetime_bucket_spec = 7; + * + */ + public com.google.cloud.visionai.v1.FacetProperty.DateTimeBucketSpec.Builder + getDatetimeBucketSpecBuilder() { + return getDatetimeBucketSpecFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Datetime range facet bucket config.
+     * 
+ * + * .google.cloud.visionai.v1.FacetProperty.DateTimeBucketSpec datetime_bucket_spec = 7; + * + */ + @java.lang.Override + public com.google.cloud.visionai.v1.FacetProperty.DateTimeBucketSpecOrBuilder + getDatetimeBucketSpecOrBuilder() { + if ((rangeFacetConfigCase_ == 7) && (datetimeBucketSpecBuilder_ != null)) { + return datetimeBucketSpecBuilder_.getMessageOrBuilder(); + } else { + if (rangeFacetConfigCase_ == 7) { + return (com.google.cloud.visionai.v1.FacetProperty.DateTimeBucketSpec) rangeFacetConfig_; + } + return com.google.cloud.visionai.v1.FacetProperty.DateTimeBucketSpec.getDefaultInstance(); + } + } + /** + * + * + *
+     * Datetime range facet bucket config.
+     * 
+ * + * .google.cloud.visionai.v1.FacetProperty.DateTimeBucketSpec datetime_bucket_spec = 7; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.FacetProperty.DateTimeBucketSpec, + com.google.cloud.visionai.v1.FacetProperty.DateTimeBucketSpec.Builder, + com.google.cloud.visionai.v1.FacetProperty.DateTimeBucketSpecOrBuilder> + getDatetimeBucketSpecFieldBuilder() { + if (datetimeBucketSpecBuilder_ == null) { + if (!(rangeFacetConfigCase_ == 7)) { + rangeFacetConfig_ = + com.google.cloud.visionai.v1.FacetProperty.DateTimeBucketSpec.getDefaultInstance(); + } + datetimeBucketSpecBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.FacetProperty.DateTimeBucketSpec, + com.google.cloud.visionai.v1.FacetProperty.DateTimeBucketSpec.Builder, + com.google.cloud.visionai.v1.FacetProperty.DateTimeBucketSpecOrBuilder>( + (com.google.cloud.visionai.v1.FacetProperty.DateTimeBucketSpec) rangeFacetConfig_, + getParentForChildren(), + isClean()); + rangeFacetConfig_ = null; + } + rangeFacetConfigCase_ = 7; + onChanged(); + return datetimeBucketSpecBuilder_; + } + + private com.google.protobuf.LazyStringArrayList mappedFields_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureMappedFieldsIsMutable() { + if (!mappedFields_.isModifiable()) { + mappedFields_ = new com.google.protobuf.LazyStringArrayList(mappedFields_); + } + bitField0_ |= 0x00000008; + } + /** + * + * + *
+     * Name of the facets, which are the dimensions users want to use to refine
+     * search results. `mapped_fields` will match UserSpecifiedDataSchema keys.
+     *
+     * For example, user can add a bunch of UGAs with the same key, such as
+     * player:adam, player:bob, player:charles. When multiple mapped_fields are
+     * specified, will merge their value together as final facet value. E.g.
+     * home_team: a, home_team:b, away_team:a, away_team:c, when facet_field =
+     * [home_team, away_team], facet_value will be [a, b, c].
+     *
+     * UNLESS this is a 1:1 facet dimension (mapped_fields.size() == 1) AND the
+     * mapped_field equals the parent SearchConfig.name, the parent must
+     * also contain a SearchCriteriaProperty that maps to the same fields.
+     * mapped_fields must not be empty.
+     * 
+ * + * repeated string mapped_fields = 1; + * + * @return A list containing the mappedFields. + */ + public com.google.protobuf.ProtocolStringList getMappedFieldsList() { + mappedFields_.makeImmutable(); + return mappedFields_; + } + /** + * + * + *
+     * Name of the facets, which are the dimensions users want to use to refine
+     * search results. `mapped_fields` will match UserSpecifiedDataSchema keys.
+     *
+     * For example, user can add a bunch of UGAs with the same key, such as
+     * player:adam, player:bob, player:charles. When multiple mapped_fields are
+     * specified, will merge their value together as final facet value. E.g.
+     * home_team: a, home_team:b, away_team:a, away_team:c, when facet_field =
+     * [home_team, away_team], facet_value will be [a, b, c].
+     *
+     * UNLESS this is a 1:1 facet dimension (mapped_fields.size() == 1) AND the
+     * mapped_field equals the parent SearchConfig.name, the parent must
+     * also contain a SearchCriteriaProperty that maps to the same fields.
+     * mapped_fields must not be empty.
+     * 
+ * + * repeated string mapped_fields = 1; + * + * @return The count of mappedFields. + */ + public int getMappedFieldsCount() { + return mappedFields_.size(); + } + /** + * + * + *
+     * Name of the facets, which are the dimensions users want to use to refine
+     * search results. `mapped_fields` will match UserSpecifiedDataSchema keys.
+     *
+     * For example, user can add a bunch of UGAs with the same key, such as
+     * player:adam, player:bob, player:charles. When multiple mapped_fields are
+     * specified, will merge their value together as final facet value. E.g.
+     * home_team: a, home_team:b, away_team:a, away_team:c, when facet_field =
+     * [home_team, away_team], facet_value will be [a, b, c].
+     *
+     * UNLESS this is a 1:1 facet dimension (mapped_fields.size() == 1) AND the
+     * mapped_field equals the parent SearchConfig.name, the parent must
+     * also contain a SearchCriteriaProperty that maps to the same fields.
+     * mapped_fields must not be empty.
+     * 
+ * + * repeated string mapped_fields = 1; + * + * @param index The index of the element to return. + * @return The mappedFields at the given index. + */ + public java.lang.String getMappedFields(int index) { + return mappedFields_.get(index); + } + /** + * + * + *
+     * Name of the facets, which are the dimensions users want to use to refine
+     * search results. `mapped_fields` will match UserSpecifiedDataSchema keys.
+     *
+     * For example, user can add a bunch of UGAs with the same key, such as
+     * player:adam, player:bob, player:charles. When multiple mapped_fields are
+     * specified, will merge their value together as final facet value. E.g.
+     * home_team: a, home_team:b, away_team:a, away_team:c, when facet_field =
+     * [home_team, away_team], facet_value will be [a, b, c].
+     *
+     * UNLESS this is a 1:1 facet dimension (mapped_fields.size() == 1) AND the
+     * mapped_field equals the parent SearchConfig.name, the parent must
+     * also contain a SearchCriteriaProperty that maps to the same fields.
+     * mapped_fields must not be empty.
+     * 
+ * + * repeated string mapped_fields = 1; + * + * @param index The index of the value to return. + * @return The bytes of the mappedFields at the given index. + */ + public com.google.protobuf.ByteString getMappedFieldsBytes(int index) { + return mappedFields_.getByteString(index); + } + /** + * + * + *
+     * Name of the facets, which are the dimensions users want to use to refine
+     * search results. `mapped_fields` will match UserSpecifiedDataSchema keys.
+     *
+     * For example, user can add a bunch of UGAs with the same key, such as
+     * player:adam, player:bob, player:charles. When multiple mapped_fields are
+     * specified, will merge their value together as final facet value. E.g.
+     * home_team: a, home_team:b, away_team:a, away_team:c, when facet_field =
+     * [home_team, away_team], facet_value will be [a, b, c].
+     *
+     * UNLESS this is a 1:1 facet dimension (mapped_fields.size() == 1) AND the
+     * mapped_field equals the parent SearchConfig.name, the parent must
+     * also contain a SearchCriteriaProperty that maps to the same fields.
+     * mapped_fields must not be empty.
+     * 
+ * + * repeated string mapped_fields = 1; + * + * @param index The index to set the value at. + * @param value The mappedFields to set. + * @return This builder for chaining. + */ + public Builder setMappedFields(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureMappedFieldsIsMutable(); + mappedFields_.set(index, value); + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Name of the facets, which are the dimensions users want to use to refine
+     * search results. `mapped_fields` will match UserSpecifiedDataSchema keys.
+     *
+     * For example, user can add a bunch of UGAs with the same key, such as
+     * player:adam, player:bob, player:charles. When multiple mapped_fields are
+     * specified, will merge their value together as final facet value. E.g.
+     * home_team: a, home_team:b, away_team:a, away_team:c, when facet_field =
+     * [home_team, away_team], facet_value will be [a, b, c].
+     *
+     * UNLESS this is a 1:1 facet dimension (mapped_fields.size() == 1) AND the
+     * mapped_field equals the parent SearchConfig.name, the parent must
+     * also contain a SearchCriteriaProperty that maps to the same fields.
+     * mapped_fields must not be empty.
+     * 
+ * + * repeated string mapped_fields = 1; + * + * @param value The mappedFields to add. + * @return This builder for chaining. + */ + public Builder addMappedFields(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureMappedFieldsIsMutable(); + mappedFields_.add(value); + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Name of the facets, which are the dimensions users want to use to refine
+     * search results. `mapped_fields` will match UserSpecifiedDataSchema keys.
+     *
+     * For example, user can add a bunch of UGAs with the same key, such as
+     * player:adam, player:bob, player:charles. When multiple mapped_fields are
+     * specified, will merge their value together as final facet value. E.g.
+     * home_team: a, home_team:b, away_team:a, away_team:c, when facet_field =
+     * [home_team, away_team], facet_value will be [a, b, c].
+     *
+     * UNLESS this is a 1:1 facet dimension (mapped_fields.size() == 1) AND the
+     * mapped_field equals the parent SearchConfig.name, the parent must
+     * also contain a SearchCriteriaProperty that maps to the same fields.
+     * mapped_fields must not be empty.
+     * 
+ * + * repeated string mapped_fields = 1; + * + * @param values The mappedFields to add. + * @return This builder for chaining. + */ + public Builder addAllMappedFields(java.lang.Iterable values) { + ensureMappedFieldsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, mappedFields_); + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Name of the facets, which are the dimensions users want to use to refine
+     * search results. `mapped_fields` will match UserSpecifiedDataSchema keys.
+     *
+     * For example, user can add a bunch of UGAs with the same key, such as
+     * player:adam, player:bob, player:charles. When multiple mapped_fields are
+     * specified, will merge their value together as final facet value. E.g.
+     * home_team: a, home_team:b, away_team:a, away_team:c, when facet_field =
+     * [home_team, away_team], facet_value will be [a, b, c].
+     *
+     * UNLESS this is a 1:1 facet dimension (mapped_fields.size() == 1) AND the
+     * mapped_field equals the parent SearchConfig.name, the parent must
+     * also contain a SearchCriteriaProperty that maps to the same fields.
+     * mapped_fields must not be empty.
+     * 
+ * + * repeated string mapped_fields = 1; + * + * @return This builder for chaining. + */ + public Builder clearMappedFields() { + mappedFields_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); + ; + onChanged(); + return this; + } + /** + * + * + *
+     * Name of the facets, which are the dimensions users want to use to refine
+     * search results. `mapped_fields` will match UserSpecifiedDataSchema keys.
+     *
+     * For example, user can add a bunch of UGAs with the same key, such as
+     * player:adam, player:bob, player:charles. When multiple mapped_fields are
+     * specified, will merge their value together as final facet value. E.g.
+     * home_team: a, home_team:b, away_team:a, away_team:c, when facet_field =
+     * [home_team, away_team], facet_value will be [a, b, c].
+     *
+     * UNLESS this is a 1:1 facet dimension (mapped_fields.size() == 1) AND the
+     * mapped_field equals the parent SearchConfig.name, the parent must
+     * also contain a SearchCriteriaProperty that maps to the same fields.
+     * mapped_fields must not be empty.
+     * 
+ * + * repeated string mapped_fields = 1; + * + * @param value The bytes of the mappedFields to add. + * @return This builder for chaining. + */ + public Builder addMappedFieldsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureMappedFieldsIsMutable(); + mappedFields_.add(value); + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private java.lang.Object displayName_ = ""; + /** + * + * + *
+     * Display name of the facet. To be used by UI for facet rendering.
+     * 
+ * + * string display_name = 2; + * + * @return The displayName. + */ + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Display name of the facet. To be used by UI for facet rendering.
+     * 
+ * + * string display_name = 2; + * + * @return The bytes for displayName. + */ + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Display name of the facet. To be used by UI for facet rendering.
+     * 
+ * + * string display_name = 2; + * + * @param value The displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + displayName_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Display name of the facet. To be used by UI for facet rendering.
+     * 
+ * + * string display_name = 2; + * + * @return This builder for chaining. + */ + public Builder clearDisplayName() { + displayName_ = getDefaultInstance().getDisplayName(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + /** + * + * + *
+     * Display name of the facet. To be used by UI for facet rendering.
+     * 
+ * + * string display_name = 2; + * + * @param value The bytes for displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + displayName_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + private long resultSize_; + /** + * + * + *
+     * Maximum number of unique bucket to return for one facet. Bucket number can
+     * be large for high-cardinality facet such as "player". We only return top-n
+     * most related ones to user. If it's <= 0, the server will decide the
+     * appropriate result_size.
+     * 
+ * + * int64 result_size = 3; + * + * @return The resultSize. + */ + @java.lang.Override + public long getResultSize() { + return resultSize_; + } + /** + * + * + *
+     * Maximum number of unique bucket to return for one facet. Bucket number can
+     * be large for high-cardinality facet such as "player". We only return top-n
+     * most related ones to user. If it's <= 0, the server will decide the
+     * appropriate result_size.
+     * 
+ * + * int64 result_size = 3; + * + * @param value The resultSize to set. + * @return This builder for chaining. + */ + public Builder setResultSize(long value) { + + resultSize_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * Maximum number of unique bucket to return for one facet. Bucket number can
+     * be large for high-cardinality facet such as "player". We only return top-n
+     * most related ones to user. If it's <= 0, the server will decide the
+     * appropriate result_size.
+     * 
+ * + * int64 result_size = 3; + * + * @return This builder for chaining. + */ + public Builder clearResultSize() { + bitField0_ = (bitField0_ & ~0x00000020); + resultSize_ = 0L; + onChanged(); + return this; + } + + private int bucketType_ = 0; + /** + * + * + *
+     * Facet bucket type e.g. value, range.
+     * 
+ * + * .google.cloud.visionai.v1.FacetBucketType bucket_type = 4; + * + * @return The enum numeric value on the wire for bucketType. + */ + @java.lang.Override + public int getBucketTypeValue() { + return bucketType_; + } + /** + * + * + *
+     * Facet bucket type e.g. value, range.
+     * 
+ * + * .google.cloud.visionai.v1.FacetBucketType bucket_type = 4; + * + * @param value The enum numeric value on the wire for bucketType to set. + * @return This builder for chaining. + */ + public Builder setBucketTypeValue(int value) { + bucketType_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * + * + *
+     * Facet bucket type e.g. value, range.
+     * 
+ * + * .google.cloud.visionai.v1.FacetBucketType bucket_type = 4; + * + * @return The bucketType. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.FacetBucketType getBucketType() { + com.google.cloud.visionai.v1.FacetBucketType result = + com.google.cloud.visionai.v1.FacetBucketType.forNumber(bucketType_); + return result == null ? com.google.cloud.visionai.v1.FacetBucketType.UNRECOGNIZED : result; + } + /** + * + * + *
+     * Facet bucket type e.g. value, range.
+     * 
+ * + * .google.cloud.visionai.v1.FacetBucketType bucket_type = 4; + * + * @param value The bucketType to set. + * @return This builder for chaining. + */ + public Builder setBucketType(com.google.cloud.visionai.v1.FacetBucketType value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000040; + bucketType_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Facet bucket type e.g. value, range.
+     * 
+ * + * .google.cloud.visionai.v1.FacetBucketType bucket_type = 4; + * + * @return This builder for chaining. + */ + public Builder clearBucketType() { + bitField0_ = (bitField0_ & ~0x00000040); + bucketType_ = 0; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.FacetProperty) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.FacetProperty) + private static final com.google.cloud.visionai.v1.FacetProperty DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.FacetProperty(); + } + + public static com.google.cloud.visionai.v1.FacetProperty getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public FacetProperty parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.FacetProperty getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/FacetPropertyOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/FacetPropertyOrBuilder.java new file mode 100644 index 000000000000..c8d0d00cdc1e --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/FacetPropertyOrBuilder.java @@ -0,0 +1,313 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/warehouse.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface FacetPropertyOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.FacetProperty) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Fixed range facet bucket config.
+   * 
+ * + * .google.cloud.visionai.v1.FacetProperty.FixedRangeBucketSpec fixed_range_bucket_spec = 5; + * + * + * @return Whether the fixedRangeBucketSpec field is set. + */ + boolean hasFixedRangeBucketSpec(); + /** + * + * + *
+   * Fixed range facet bucket config.
+   * 
+ * + * .google.cloud.visionai.v1.FacetProperty.FixedRangeBucketSpec fixed_range_bucket_spec = 5; + * + * + * @return The fixedRangeBucketSpec. + */ + com.google.cloud.visionai.v1.FacetProperty.FixedRangeBucketSpec getFixedRangeBucketSpec(); + /** + * + * + *
+   * Fixed range facet bucket config.
+   * 
+ * + * .google.cloud.visionai.v1.FacetProperty.FixedRangeBucketSpec fixed_range_bucket_spec = 5; + * + */ + com.google.cloud.visionai.v1.FacetProperty.FixedRangeBucketSpecOrBuilder + getFixedRangeBucketSpecOrBuilder(); + + /** + * + * + *
+   * Custom range facet bucket config.
+   * 
+ * + * + * .google.cloud.visionai.v1.FacetProperty.CustomRangeBucketSpec custom_range_bucket_spec = 6; + * + * + * @return Whether the customRangeBucketSpec field is set. + */ + boolean hasCustomRangeBucketSpec(); + /** + * + * + *
+   * Custom range facet bucket config.
+   * 
+ * + * + * .google.cloud.visionai.v1.FacetProperty.CustomRangeBucketSpec custom_range_bucket_spec = 6; + * + * + * @return The customRangeBucketSpec. + */ + com.google.cloud.visionai.v1.FacetProperty.CustomRangeBucketSpec getCustomRangeBucketSpec(); + /** + * + * + *
+   * Custom range facet bucket config.
+   * 
+ * + * + * .google.cloud.visionai.v1.FacetProperty.CustomRangeBucketSpec custom_range_bucket_spec = 6; + * + */ + com.google.cloud.visionai.v1.FacetProperty.CustomRangeBucketSpecOrBuilder + getCustomRangeBucketSpecOrBuilder(); + + /** + * + * + *
+   * Datetime range facet bucket config.
+   * 
+ * + * .google.cloud.visionai.v1.FacetProperty.DateTimeBucketSpec datetime_bucket_spec = 7; + * + * + * @return Whether the datetimeBucketSpec field is set. + */ + boolean hasDatetimeBucketSpec(); + /** + * + * + *
+   * Datetime range facet bucket config.
+   * 
+ * + * .google.cloud.visionai.v1.FacetProperty.DateTimeBucketSpec datetime_bucket_spec = 7; + * + * + * @return The datetimeBucketSpec. + */ + com.google.cloud.visionai.v1.FacetProperty.DateTimeBucketSpec getDatetimeBucketSpec(); + /** + * + * + *
+   * Datetime range facet bucket config.
+   * 
+ * + * .google.cloud.visionai.v1.FacetProperty.DateTimeBucketSpec datetime_bucket_spec = 7; + * + */ + com.google.cloud.visionai.v1.FacetProperty.DateTimeBucketSpecOrBuilder + getDatetimeBucketSpecOrBuilder(); + + /** + * + * + *
+   * Name of the facets, which are the dimensions users want to use to refine
+   * search results. `mapped_fields` will match UserSpecifiedDataSchema keys.
+   *
+   * For example, user can add a bunch of UGAs with the same key, such as
+   * player:adam, player:bob, player:charles. When multiple mapped_fields are
+   * specified, will merge their value together as final facet value. E.g.
+   * home_team: a, home_team:b, away_team:a, away_team:c, when facet_field =
+   * [home_team, away_team], facet_value will be [a, b, c].
+   *
+   * UNLESS this is a 1:1 facet dimension (mapped_fields.size() == 1) AND the
+   * mapped_field equals the parent SearchConfig.name, the parent must
+   * also contain a SearchCriteriaProperty that maps to the same fields.
+   * mapped_fields must not be empty.
+   * 
+ * + * repeated string mapped_fields = 1; + * + * @return A list containing the mappedFields. + */ + java.util.List getMappedFieldsList(); + /** + * + * + *
+   * Name of the facets, which are the dimensions users want to use to refine
+   * search results. `mapped_fields` will match UserSpecifiedDataSchema keys.
+   *
+   * For example, user can add a bunch of UGAs with the same key, such as
+   * player:adam, player:bob, player:charles. When multiple mapped_fields are
+   * specified, will merge their value together as final facet value. E.g.
+   * home_team: a, home_team:b, away_team:a, away_team:c, when facet_field =
+   * [home_team, away_team], facet_value will be [a, b, c].
+   *
+   * UNLESS this is a 1:1 facet dimension (mapped_fields.size() == 1) AND the
+   * mapped_field equals the parent SearchConfig.name, the parent must
+   * also contain a SearchCriteriaProperty that maps to the same fields.
+   * mapped_fields must not be empty.
+   * 
+ * + * repeated string mapped_fields = 1; + * + * @return The count of mappedFields. + */ + int getMappedFieldsCount(); + /** + * + * + *
+   * Name of the facets, which are the dimensions users want to use to refine
+   * search results. `mapped_fields` will match UserSpecifiedDataSchema keys.
+   *
+   * For example, user can add a bunch of UGAs with the same key, such as
+   * player:adam, player:bob, player:charles. When multiple mapped_fields are
+   * specified, will merge their value together as final facet value. E.g.
+   * home_team: a, home_team:b, away_team:a, away_team:c, when facet_field =
+   * [home_team, away_team], facet_value will be [a, b, c].
+   *
+   * UNLESS this is a 1:1 facet dimension (mapped_fields.size() == 1) AND the
+   * mapped_field equals the parent SearchConfig.name, the parent must
+   * also contain a SearchCriteriaProperty that maps to the same fields.
+   * mapped_fields must not be empty.
+   * 
+ * + * repeated string mapped_fields = 1; + * + * @param index The index of the element to return. + * @return The mappedFields at the given index. + */ + java.lang.String getMappedFields(int index); + /** + * + * + *
+   * Name of the facets, which are the dimensions users want to use to refine
+   * search results. `mapped_fields` will match UserSpecifiedDataSchema keys.
+   *
+   * For example, user can add a bunch of UGAs with the same key, such as
+   * player:adam, player:bob, player:charles. When multiple mapped_fields are
+   * specified, will merge their value together as final facet value. E.g.
+   * home_team: a, home_team:b, away_team:a, away_team:c, when facet_field =
+   * [home_team, away_team], facet_value will be [a, b, c].
+   *
+   * UNLESS this is a 1:1 facet dimension (mapped_fields.size() == 1) AND the
+   * mapped_field equals the parent SearchConfig.name, the parent must
+   * also contain a SearchCriteriaProperty that maps to the same fields.
+   * mapped_fields must not be empty.
+   * 
+ * + * repeated string mapped_fields = 1; + * + * @param index The index of the value to return. + * @return The bytes of the mappedFields at the given index. + */ + com.google.protobuf.ByteString getMappedFieldsBytes(int index); + + /** + * + * + *
+   * Display name of the facet. To be used by UI for facet rendering.
+   * 
+ * + * string display_name = 2; + * + * @return The displayName. + */ + java.lang.String getDisplayName(); + /** + * + * + *
+   * Display name of the facet. To be used by UI for facet rendering.
+   * 
+ * + * string display_name = 2; + * + * @return The bytes for displayName. + */ + com.google.protobuf.ByteString getDisplayNameBytes(); + + /** + * + * + *
+   * Maximum number of unique bucket to return for one facet. Bucket number can
+   * be large for high-cardinality facet such as "player". We only return top-n
+   * most related ones to user. If it's <= 0, the server will decide the
+   * appropriate result_size.
+   * 
+ * + * int64 result_size = 3; + * + * @return The resultSize. + */ + long getResultSize(); + + /** + * + * + *
+   * Facet bucket type e.g. value, range.
+   * 
+ * + * .google.cloud.visionai.v1.FacetBucketType bucket_type = 4; + * + * @return The enum numeric value on the wire for bucketType. + */ + int getBucketTypeValue(); + /** + * + * + *
+   * Facet bucket type e.g. value, range.
+   * 
+ * + * .google.cloud.visionai.v1.FacetBucketType bucket_type = 4; + * + * @return The bucketType. + */ + com.google.cloud.visionai.v1.FacetBucketType getBucketType(); + + com.google.cloud.visionai.v1.FacetProperty.RangeFacetConfigCase getRangeFacetConfigCase(); +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/FacetValue.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/FacetValue.java new file mode 100644 index 000000000000..b2268c2e543b --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/FacetValue.java @@ -0,0 +1,1178 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/warehouse.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * Definition of a single value with generic type.
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.FacetValue} + */ +public final class FacetValue extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.FacetValue) + FacetValueOrBuilder { + private static final long serialVersionUID = 0L; + // Use FacetValue.newBuilder() to construct. + private FacetValue(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private FacetValue() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new FacetValue(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_FacetValue_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_FacetValue_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.FacetValue.class, + com.google.cloud.visionai.v1.FacetValue.Builder.class); + } + + private int valueCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object value_; + + public enum ValueCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + STRING_VALUE(1), + INTEGER_VALUE(2), + DATETIME_VALUE(3), + VALUE_NOT_SET(0); + private final int value; + + private ValueCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static ValueCase valueOf(int value) { + return forNumber(value); + } + + public static ValueCase forNumber(int value) { + switch (value) { + case 1: + return STRING_VALUE; + case 2: + return INTEGER_VALUE; + case 3: + return DATETIME_VALUE; + case 0: + return VALUE_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public ValueCase getValueCase() { + return ValueCase.forNumber(valueCase_); + } + + public static final int STRING_VALUE_FIELD_NUMBER = 1; + /** + * + * + *
+   * String type value.
+   * 
+ * + * string string_value = 1; + * + * @return Whether the stringValue field is set. + */ + public boolean hasStringValue() { + return valueCase_ == 1; + } + /** + * + * + *
+   * String type value.
+   * 
+ * + * string string_value = 1; + * + * @return The stringValue. + */ + public java.lang.String getStringValue() { + java.lang.Object ref = ""; + if (valueCase_ == 1) { + ref = value_; + } + 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(); + if (valueCase_ == 1) { + value_ = s; + } + return s; + } + } + /** + * + * + *
+   * String type value.
+   * 
+ * + * string string_value = 1; + * + * @return The bytes for stringValue. + */ + public com.google.protobuf.ByteString getStringValueBytes() { + java.lang.Object ref = ""; + if (valueCase_ == 1) { + ref = value_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (valueCase_ == 1) { + value_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int INTEGER_VALUE_FIELD_NUMBER = 2; + /** + * + * + *
+   * Integer type value.
+   * 
+ * + * int64 integer_value = 2; + * + * @return Whether the integerValue field is set. + */ + @java.lang.Override + public boolean hasIntegerValue() { + return valueCase_ == 2; + } + /** + * + * + *
+   * Integer type value.
+   * 
+ * + * int64 integer_value = 2; + * + * @return The integerValue. + */ + @java.lang.Override + public long getIntegerValue() { + if (valueCase_ == 2) { + return (java.lang.Long) value_; + } + return 0L; + } + + public static final int DATETIME_VALUE_FIELD_NUMBER = 3; + /** + * + * + *
+   * Datetime type value.
+   * 
+ * + * .google.type.DateTime datetime_value = 3; + * + * @return Whether the datetimeValue field is set. + */ + @java.lang.Override + public boolean hasDatetimeValue() { + return valueCase_ == 3; + } + /** + * + * + *
+   * Datetime type value.
+   * 
+ * + * .google.type.DateTime datetime_value = 3; + * + * @return The datetimeValue. + */ + @java.lang.Override + public com.google.type.DateTime getDatetimeValue() { + if (valueCase_ == 3) { + return (com.google.type.DateTime) value_; + } + return com.google.type.DateTime.getDefaultInstance(); + } + /** + * + * + *
+   * Datetime type value.
+   * 
+ * + * .google.type.DateTime datetime_value = 3; + */ + @java.lang.Override + public com.google.type.DateTimeOrBuilder getDatetimeValueOrBuilder() { + if (valueCase_ == 3) { + return (com.google.type.DateTime) value_; + } + return com.google.type.DateTime.getDefaultInstance(); + } + + 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 (valueCase_ == 1) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, value_); + } + if (valueCase_ == 2) { + output.writeInt64(2, (long) ((java.lang.Long) value_)); + } + if (valueCase_ == 3) { + output.writeMessage(3, (com.google.type.DateTime) value_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (valueCase_ == 1) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, value_); + } + if (valueCase_ == 2) { + size += + com.google.protobuf.CodedOutputStream.computeInt64Size( + 2, (long) ((java.lang.Long) value_)); + } + if (valueCase_ == 3) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 3, (com.google.type.DateTime) value_); + } + size += getUnknownFields().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.visionai.v1.FacetValue)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.FacetValue other = (com.google.cloud.visionai.v1.FacetValue) obj; + + if (!getValueCase().equals(other.getValueCase())) return false; + switch (valueCase_) { + case 1: + if (!getStringValue().equals(other.getStringValue())) return false; + break; + case 2: + if (getIntegerValue() != other.getIntegerValue()) return false; + break; + case 3: + if (!getDatetimeValue().equals(other.getDatetimeValue())) return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + switch (valueCase_) { + case 1: + hash = (37 * hash) + STRING_VALUE_FIELD_NUMBER; + hash = (53 * hash) + getStringValue().hashCode(); + break; + case 2: + hash = (37 * hash) + INTEGER_VALUE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getIntegerValue()); + break; + case 3: + hash = (37 * hash) + DATETIME_VALUE_FIELD_NUMBER; + hash = (53 * hash) + getDatetimeValue().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.FacetValue parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.FacetValue 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.visionai.v1.FacetValue parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.FacetValue 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.visionai.v1.FacetValue parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.FacetValue parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.FacetValue parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.FacetValue 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.visionai.v1.FacetValue parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.FacetValue 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.visionai.v1.FacetValue parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.FacetValue 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.visionai.v1.FacetValue 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; + } + /** + * + * + *
+   * Definition of a single value with generic type.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.FacetValue} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.FacetValue) + com.google.cloud.visionai.v1.FacetValueOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_FacetValue_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_FacetValue_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.FacetValue.class, + com.google.cloud.visionai.v1.FacetValue.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.FacetValue.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (datetimeValueBuilder_ != null) { + datetimeValueBuilder_.clear(); + } + valueCase_ = 0; + value_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_FacetValue_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.FacetValue getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.FacetValue.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.FacetValue build() { + com.google.cloud.visionai.v1.FacetValue result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.FacetValue buildPartial() { + com.google.cloud.visionai.v1.FacetValue result = + new com.google.cloud.visionai.v1.FacetValue(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.visionai.v1.FacetValue result) { + int from_bitField0_ = bitField0_; + } + + private void buildPartialOneofs(com.google.cloud.visionai.v1.FacetValue result) { + result.valueCase_ = valueCase_; + result.value_ = this.value_; + if (valueCase_ == 3 && datetimeValueBuilder_ != null) { + result.value_ = datetimeValueBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.FacetValue) { + return mergeFrom((com.google.cloud.visionai.v1.FacetValue) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.FacetValue other) { + if (other == com.google.cloud.visionai.v1.FacetValue.getDefaultInstance()) return this; + switch (other.getValueCase()) { + case STRING_VALUE: + { + valueCase_ = 1; + value_ = other.value_; + onChanged(); + break; + } + case INTEGER_VALUE: + { + setIntegerValue(other.getIntegerValue()); + break; + } + case DATETIME_VALUE: + { + mergeDatetimeValue(other.getDatetimeValue()); + break; + } + case VALUE_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + 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(); + valueCase_ = 1; + value_ = s; + break; + } // case 10 + case 16: + { + value_ = input.readInt64(); + valueCase_ = 2; + break; + } // case 16 + case 26: + { + input.readMessage(getDatetimeValueFieldBuilder().getBuilder(), extensionRegistry); + valueCase_ = 3; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int valueCase_ = 0; + private java.lang.Object value_; + + public ValueCase getValueCase() { + return ValueCase.forNumber(valueCase_); + } + + public Builder clearValue() { + valueCase_ = 0; + value_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + /** + * + * + *
+     * String type value.
+     * 
+ * + * string string_value = 1; + * + * @return Whether the stringValue field is set. + */ + @java.lang.Override + public boolean hasStringValue() { + return valueCase_ == 1; + } + /** + * + * + *
+     * String type value.
+     * 
+ * + * string string_value = 1; + * + * @return The stringValue. + */ + @java.lang.Override + public java.lang.String getStringValue() { + java.lang.Object ref = ""; + if (valueCase_ == 1) { + ref = value_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (valueCase_ == 1) { + value_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * String type value.
+     * 
+ * + * string string_value = 1; + * + * @return The bytes for stringValue. + */ + @java.lang.Override + public com.google.protobuf.ByteString getStringValueBytes() { + java.lang.Object ref = ""; + if (valueCase_ == 1) { + ref = value_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (valueCase_ == 1) { + value_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * String type value.
+     * 
+ * + * string string_value = 1; + * + * @param value The stringValue to set. + * @return This builder for chaining. + */ + public Builder setStringValue(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + valueCase_ = 1; + value_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * String type value.
+     * 
+ * + * string string_value = 1; + * + * @return This builder for chaining. + */ + public Builder clearStringValue() { + if (valueCase_ == 1) { + valueCase_ = 0; + value_ = null; + onChanged(); + } + return this; + } + /** + * + * + *
+     * String type value.
+     * 
+ * + * string string_value = 1; + * + * @param value The bytes for stringValue to set. + * @return This builder for chaining. + */ + public Builder setStringValueBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + valueCase_ = 1; + value_ = value; + onChanged(); + return this; + } + + /** + * + * + *
+     * Integer type value.
+     * 
+ * + * int64 integer_value = 2; + * + * @return Whether the integerValue field is set. + */ + public boolean hasIntegerValue() { + return valueCase_ == 2; + } + /** + * + * + *
+     * Integer type value.
+     * 
+ * + * int64 integer_value = 2; + * + * @return The integerValue. + */ + public long getIntegerValue() { + if (valueCase_ == 2) { + return (java.lang.Long) value_; + } + return 0L; + } + /** + * + * + *
+     * Integer type value.
+     * 
+ * + * int64 integer_value = 2; + * + * @param value The integerValue to set. + * @return This builder for chaining. + */ + public Builder setIntegerValue(long value) { + + valueCase_ = 2; + value_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Integer type value.
+     * 
+ * + * int64 integer_value = 2; + * + * @return This builder for chaining. + */ + public Builder clearIntegerValue() { + if (valueCase_ == 2) { + valueCase_ = 0; + value_ = null; + onChanged(); + } + return this; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.type.DateTime, + com.google.type.DateTime.Builder, + com.google.type.DateTimeOrBuilder> + datetimeValueBuilder_; + /** + * + * + *
+     * Datetime type value.
+     * 
+ * + * .google.type.DateTime datetime_value = 3; + * + * @return Whether the datetimeValue field is set. + */ + @java.lang.Override + public boolean hasDatetimeValue() { + return valueCase_ == 3; + } + /** + * + * + *
+     * Datetime type value.
+     * 
+ * + * .google.type.DateTime datetime_value = 3; + * + * @return The datetimeValue. + */ + @java.lang.Override + public com.google.type.DateTime getDatetimeValue() { + if (datetimeValueBuilder_ == null) { + if (valueCase_ == 3) { + return (com.google.type.DateTime) value_; + } + return com.google.type.DateTime.getDefaultInstance(); + } else { + if (valueCase_ == 3) { + return datetimeValueBuilder_.getMessage(); + } + return com.google.type.DateTime.getDefaultInstance(); + } + } + /** + * + * + *
+     * Datetime type value.
+     * 
+ * + * .google.type.DateTime datetime_value = 3; + */ + public Builder setDatetimeValue(com.google.type.DateTime value) { + if (datetimeValueBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + value_ = value; + onChanged(); + } else { + datetimeValueBuilder_.setMessage(value); + } + valueCase_ = 3; + return this; + } + /** + * + * + *
+     * Datetime type value.
+     * 
+ * + * .google.type.DateTime datetime_value = 3; + */ + public Builder setDatetimeValue(com.google.type.DateTime.Builder builderForValue) { + if (datetimeValueBuilder_ == null) { + value_ = builderForValue.build(); + onChanged(); + } else { + datetimeValueBuilder_.setMessage(builderForValue.build()); + } + valueCase_ = 3; + return this; + } + /** + * + * + *
+     * Datetime type value.
+     * 
+ * + * .google.type.DateTime datetime_value = 3; + */ + public Builder mergeDatetimeValue(com.google.type.DateTime value) { + if (datetimeValueBuilder_ == null) { + if (valueCase_ == 3 && value_ != com.google.type.DateTime.getDefaultInstance()) { + value_ = + com.google.type.DateTime.newBuilder((com.google.type.DateTime) value_) + .mergeFrom(value) + .buildPartial(); + } else { + value_ = value; + } + onChanged(); + } else { + if (valueCase_ == 3) { + datetimeValueBuilder_.mergeFrom(value); + } else { + datetimeValueBuilder_.setMessage(value); + } + } + valueCase_ = 3; + return this; + } + /** + * + * + *
+     * Datetime type value.
+     * 
+ * + * .google.type.DateTime datetime_value = 3; + */ + public Builder clearDatetimeValue() { + if (datetimeValueBuilder_ == null) { + if (valueCase_ == 3) { + valueCase_ = 0; + value_ = null; + onChanged(); + } + } else { + if (valueCase_ == 3) { + valueCase_ = 0; + value_ = null; + } + datetimeValueBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Datetime type value.
+     * 
+ * + * .google.type.DateTime datetime_value = 3; + */ + public com.google.type.DateTime.Builder getDatetimeValueBuilder() { + return getDatetimeValueFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Datetime type value.
+     * 
+ * + * .google.type.DateTime datetime_value = 3; + */ + @java.lang.Override + public com.google.type.DateTimeOrBuilder getDatetimeValueOrBuilder() { + if ((valueCase_ == 3) && (datetimeValueBuilder_ != null)) { + return datetimeValueBuilder_.getMessageOrBuilder(); + } else { + if (valueCase_ == 3) { + return (com.google.type.DateTime) value_; + } + return com.google.type.DateTime.getDefaultInstance(); + } + } + /** + * + * + *
+     * Datetime type value.
+     * 
+ * + * .google.type.DateTime datetime_value = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.type.DateTime, + com.google.type.DateTime.Builder, + com.google.type.DateTimeOrBuilder> + getDatetimeValueFieldBuilder() { + if (datetimeValueBuilder_ == null) { + if (!(valueCase_ == 3)) { + value_ = com.google.type.DateTime.getDefaultInstance(); + } + datetimeValueBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.type.DateTime, + com.google.type.DateTime.Builder, + com.google.type.DateTimeOrBuilder>( + (com.google.type.DateTime) value_, getParentForChildren(), isClean()); + value_ = null; + } + valueCase_ = 3; + onChanged(); + return datetimeValueBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.FacetValue) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.FacetValue) + private static final com.google.cloud.visionai.v1.FacetValue DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.FacetValue(); + } + + public static com.google.cloud.visionai.v1.FacetValue getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public FacetValue parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.FacetValue getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/FacetValueOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/FacetValueOrBuilder.java new file mode 100644 index 000000000000..29cc70e22d59 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/FacetValueOrBuilder.java @@ -0,0 +1,125 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/warehouse.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface FacetValueOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.FacetValue) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * String type value.
+   * 
+ * + * string string_value = 1; + * + * @return Whether the stringValue field is set. + */ + boolean hasStringValue(); + /** + * + * + *
+   * String type value.
+   * 
+ * + * string string_value = 1; + * + * @return The stringValue. + */ + java.lang.String getStringValue(); + /** + * + * + *
+   * String type value.
+   * 
+ * + * string string_value = 1; + * + * @return The bytes for stringValue. + */ + com.google.protobuf.ByteString getStringValueBytes(); + + /** + * + * + *
+   * Integer type value.
+   * 
+ * + * int64 integer_value = 2; + * + * @return Whether the integerValue field is set. + */ + boolean hasIntegerValue(); + /** + * + * + *
+   * Integer type value.
+   * 
+ * + * int64 integer_value = 2; + * + * @return The integerValue. + */ + long getIntegerValue(); + + /** + * + * + *
+   * Datetime type value.
+   * 
+ * + * .google.type.DateTime datetime_value = 3; + * + * @return Whether the datetimeValue field is set. + */ + boolean hasDatetimeValue(); + /** + * + * + *
+   * Datetime type value.
+   * 
+ * + * .google.type.DateTime datetime_value = 3; + * + * @return The datetimeValue. + */ + com.google.type.DateTime getDatetimeValue(); + /** + * + * + *
+   * Datetime type value.
+   * 
+ * + * .google.type.DateTime datetime_value = 3; + */ + com.google.type.DateTimeOrBuilder getDatetimeValueOrBuilder(); + + com.google.cloud.visionai.v1.FacetValue.ValueCase getValueCase(); +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/FloatRange.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/FloatRange.java new file mode 100644 index 000000000000..a544085d6e03 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/FloatRange.java @@ -0,0 +1,703 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/warehouse.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * Float range type.
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.FloatRange} + */ +public final class FloatRange extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.FloatRange) + FloatRangeOrBuilder { + private static final long serialVersionUID = 0L; + // Use FloatRange.newBuilder() to construct. + private FloatRange(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private FloatRange() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new FloatRange(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_FloatRange_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_FloatRange_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.FloatRange.class, + com.google.cloud.visionai.v1.FloatRange.Builder.class); + } + + private int bitField0_; + public static final int START_FIELD_NUMBER = 1; + private float start_ = 0F; + /** + * + * + *
+   * Start of the float range.
+   * 
+ * + * optional float start = 1; + * + * @return Whether the start field is set. + */ + @java.lang.Override + public boolean hasStart() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * Start of the float range.
+   * 
+ * + * optional float start = 1; + * + * @return The start. + */ + @java.lang.Override + public float getStart() { + return start_; + } + + public static final int END_FIELD_NUMBER = 2; + private float end_ = 0F; + /** + * + * + *
+   * End of the float range.
+   * 
+ * + * optional float end = 2; + * + * @return Whether the end field is set. + */ + @java.lang.Override + public boolean hasEnd() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+   * End of the float range.
+   * 
+ * + * optional float end = 2; + * + * @return The end. + */ + @java.lang.Override + public float getEnd() { + return end_; + } + + 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 (((bitField0_ & 0x00000001) != 0)) { + output.writeFloat(1, start_); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeFloat(2, end_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeFloatSize(1, start_); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeFloatSize(2, end_); + } + size += getUnknownFields().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.visionai.v1.FloatRange)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.FloatRange other = (com.google.cloud.visionai.v1.FloatRange) obj; + + if (hasStart() != other.hasStart()) return false; + if (hasStart()) { + if (java.lang.Float.floatToIntBits(getStart()) + != java.lang.Float.floatToIntBits(other.getStart())) return false; + } + if (hasEnd() != other.hasEnd()) return false; + if (hasEnd()) { + if (java.lang.Float.floatToIntBits(getEnd()) + != java.lang.Float.floatToIntBits(other.getEnd())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasStart()) { + hash = (37 * hash) + START_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits(getStart()); + } + if (hasEnd()) { + hash = (37 * hash) + END_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits(getEnd()); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.FloatRange parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.FloatRange 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.visionai.v1.FloatRange parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.FloatRange 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.visionai.v1.FloatRange parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.FloatRange parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.FloatRange parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.FloatRange 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.visionai.v1.FloatRange parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.FloatRange 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.visionai.v1.FloatRange parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.FloatRange 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.visionai.v1.FloatRange 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; + } + /** + * + * + *
+   * Float range type.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.FloatRange} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.FloatRange) + com.google.cloud.visionai.v1.FloatRangeOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_FloatRange_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_FloatRange_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.FloatRange.class, + com.google.cloud.visionai.v1.FloatRange.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.FloatRange.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + start_ = 0F; + end_ = 0F; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_FloatRange_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.FloatRange getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.FloatRange.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.FloatRange build() { + com.google.cloud.visionai.v1.FloatRange result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.FloatRange buildPartial() { + com.google.cloud.visionai.v1.FloatRange result = + new com.google.cloud.visionai.v1.FloatRange(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.visionai.v1.FloatRange result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.start_ = start_; + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.end_ = end_; + to_bitField0_ |= 0x00000002; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.FloatRange) { + return mergeFrom((com.google.cloud.visionai.v1.FloatRange) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.FloatRange other) { + if (other == com.google.cloud.visionai.v1.FloatRange.getDefaultInstance()) return this; + if (other.hasStart()) { + setStart(other.getStart()); + } + if (other.hasEnd()) { + setEnd(other.getEnd()); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 13: + { + start_ = input.readFloat(); + bitField0_ |= 0x00000001; + break; + } // case 13 + case 21: + { + end_ = input.readFloat(); + bitField0_ |= 0x00000002; + break; + } // case 21 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private float start_; + /** + * + * + *
+     * Start of the float range.
+     * 
+ * + * optional float start = 1; + * + * @return Whether the start field is set. + */ + @java.lang.Override + public boolean hasStart() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * Start of the float range.
+     * 
+ * + * optional float start = 1; + * + * @return The start. + */ + @java.lang.Override + public float getStart() { + return start_; + } + /** + * + * + *
+     * Start of the float range.
+     * 
+ * + * optional float start = 1; + * + * @param value The start to set. + * @return This builder for chaining. + */ + public Builder setStart(float value) { + + start_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Start of the float range.
+     * 
+ * + * optional float start = 1; + * + * @return This builder for chaining. + */ + public Builder clearStart() { + bitField0_ = (bitField0_ & ~0x00000001); + start_ = 0F; + onChanged(); + return this; + } + + private float end_; + /** + * + * + *
+     * End of the float range.
+     * 
+ * + * optional float end = 2; + * + * @return Whether the end field is set. + */ + @java.lang.Override + public boolean hasEnd() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * End of the float range.
+     * 
+ * + * optional float end = 2; + * + * @return The end. + */ + @java.lang.Override + public float getEnd() { + return end_; + } + /** + * + * + *
+     * End of the float range.
+     * 
+ * + * optional float end = 2; + * + * @param value The end to set. + * @return This builder for chaining. + */ + public Builder setEnd(float value) { + + end_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * End of the float range.
+     * 
+ * + * optional float end = 2; + * + * @return This builder for chaining. + */ + public Builder clearEnd() { + bitField0_ = (bitField0_ & ~0x00000002); + end_ = 0F; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.FloatRange) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.FloatRange) + private static final com.google.cloud.visionai.v1.FloatRange DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.FloatRange(); + } + + public static com.google.cloud.visionai.v1.FloatRange getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public FloatRange parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.FloatRange getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/FloatRangeArray.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/FloatRangeArray.java new file mode 100644 index 000000000000..c9ef07f2835e --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/FloatRangeArray.java @@ -0,0 +1,935 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/warehouse.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * A list of float range values.
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.FloatRangeArray} + */ +public final class FloatRangeArray extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.FloatRangeArray) + FloatRangeArrayOrBuilder { + private static final long serialVersionUID = 0L; + // Use FloatRangeArray.newBuilder() to construct. + private FloatRangeArray(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private FloatRangeArray() { + floatRanges_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new FloatRangeArray(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_FloatRangeArray_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_FloatRangeArray_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.FloatRangeArray.class, + com.google.cloud.visionai.v1.FloatRangeArray.Builder.class); + } + + public static final int FLOAT_RANGES_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List floatRanges_; + /** + * + * + *
+   * Float range values.
+   * 
+ * + * repeated .google.cloud.visionai.v1.FloatRange float_ranges = 1; + */ + @java.lang.Override + public java.util.List getFloatRangesList() { + return floatRanges_; + } + /** + * + * + *
+   * Float range values.
+   * 
+ * + * repeated .google.cloud.visionai.v1.FloatRange float_ranges = 1; + */ + @java.lang.Override + public java.util.List + getFloatRangesOrBuilderList() { + return floatRanges_; + } + /** + * + * + *
+   * Float range values.
+   * 
+ * + * repeated .google.cloud.visionai.v1.FloatRange float_ranges = 1; + */ + @java.lang.Override + public int getFloatRangesCount() { + return floatRanges_.size(); + } + /** + * + * + *
+   * Float range values.
+   * 
+ * + * repeated .google.cloud.visionai.v1.FloatRange float_ranges = 1; + */ + @java.lang.Override + public com.google.cloud.visionai.v1.FloatRange getFloatRanges(int index) { + return floatRanges_.get(index); + } + /** + * + * + *
+   * Float range values.
+   * 
+ * + * repeated .google.cloud.visionai.v1.FloatRange float_ranges = 1; + */ + @java.lang.Override + public com.google.cloud.visionai.v1.FloatRangeOrBuilder getFloatRangesOrBuilder(int index) { + return floatRanges_.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 < floatRanges_.size(); i++) { + output.writeMessage(1, floatRanges_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < floatRanges_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, floatRanges_.get(i)); + } + size += getUnknownFields().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.visionai.v1.FloatRangeArray)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.FloatRangeArray other = + (com.google.cloud.visionai.v1.FloatRangeArray) obj; + + if (!getFloatRangesList().equals(other.getFloatRangesList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getFloatRangesCount() > 0) { + hash = (37 * hash) + FLOAT_RANGES_FIELD_NUMBER; + hash = (53 * hash) + getFloatRangesList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.FloatRangeArray parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.FloatRangeArray 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.visionai.v1.FloatRangeArray parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.FloatRangeArray 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.visionai.v1.FloatRangeArray parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.FloatRangeArray parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.FloatRangeArray parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.FloatRangeArray 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.visionai.v1.FloatRangeArray parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.FloatRangeArray 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.visionai.v1.FloatRangeArray parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.FloatRangeArray 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.visionai.v1.FloatRangeArray 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 list of float range values.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.FloatRangeArray} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.FloatRangeArray) + com.google.cloud.visionai.v1.FloatRangeArrayOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_FloatRangeArray_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_FloatRangeArray_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.FloatRangeArray.class, + com.google.cloud.visionai.v1.FloatRangeArray.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.FloatRangeArray.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (floatRangesBuilder_ == null) { + floatRanges_ = java.util.Collections.emptyList(); + } else { + floatRanges_ = null; + floatRangesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_FloatRangeArray_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.FloatRangeArray getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.FloatRangeArray.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.FloatRangeArray build() { + com.google.cloud.visionai.v1.FloatRangeArray result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.FloatRangeArray buildPartial() { + com.google.cloud.visionai.v1.FloatRangeArray result = + new com.google.cloud.visionai.v1.FloatRangeArray(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.google.cloud.visionai.v1.FloatRangeArray result) { + if (floatRangesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + floatRanges_ = java.util.Collections.unmodifiableList(floatRanges_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.floatRanges_ = floatRanges_; + } else { + result.floatRanges_ = floatRangesBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.visionai.v1.FloatRangeArray result) { + int from_bitField0_ = bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.FloatRangeArray) { + return mergeFrom((com.google.cloud.visionai.v1.FloatRangeArray) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.FloatRangeArray other) { + if (other == com.google.cloud.visionai.v1.FloatRangeArray.getDefaultInstance()) return this; + if (floatRangesBuilder_ == null) { + if (!other.floatRanges_.isEmpty()) { + if (floatRanges_.isEmpty()) { + floatRanges_ = other.floatRanges_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureFloatRangesIsMutable(); + floatRanges_.addAll(other.floatRanges_); + } + onChanged(); + } + } else { + if (!other.floatRanges_.isEmpty()) { + if (floatRangesBuilder_.isEmpty()) { + floatRangesBuilder_.dispose(); + floatRangesBuilder_ = null; + floatRanges_ = other.floatRanges_; + bitField0_ = (bitField0_ & ~0x00000001); + floatRangesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getFloatRangesFieldBuilder() + : null; + } else { + floatRangesBuilder_.addAllMessages(other.floatRanges_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.visionai.v1.FloatRange m = + input.readMessage( + com.google.cloud.visionai.v1.FloatRange.parser(), extensionRegistry); + if (floatRangesBuilder_ == null) { + ensureFloatRangesIsMutable(); + floatRanges_.add(m); + } else { + floatRangesBuilder_.addMessage(m); + } + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List floatRanges_ = + java.util.Collections.emptyList(); + + private void ensureFloatRangesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + floatRanges_ = + new java.util.ArrayList(floatRanges_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.visionai.v1.FloatRange, + com.google.cloud.visionai.v1.FloatRange.Builder, + com.google.cloud.visionai.v1.FloatRangeOrBuilder> + floatRangesBuilder_; + + /** + * + * + *
+     * Float range values.
+     * 
+ * + * repeated .google.cloud.visionai.v1.FloatRange float_ranges = 1; + */ + public java.util.List getFloatRangesList() { + if (floatRangesBuilder_ == null) { + return java.util.Collections.unmodifiableList(floatRanges_); + } else { + return floatRangesBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Float range values.
+     * 
+ * + * repeated .google.cloud.visionai.v1.FloatRange float_ranges = 1; + */ + public int getFloatRangesCount() { + if (floatRangesBuilder_ == null) { + return floatRanges_.size(); + } else { + return floatRangesBuilder_.getCount(); + } + } + /** + * + * + *
+     * Float range values.
+     * 
+ * + * repeated .google.cloud.visionai.v1.FloatRange float_ranges = 1; + */ + public com.google.cloud.visionai.v1.FloatRange getFloatRanges(int index) { + if (floatRangesBuilder_ == null) { + return floatRanges_.get(index); + } else { + return floatRangesBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Float range values.
+     * 
+ * + * repeated .google.cloud.visionai.v1.FloatRange float_ranges = 1; + */ + public Builder setFloatRanges(int index, com.google.cloud.visionai.v1.FloatRange value) { + if (floatRangesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFloatRangesIsMutable(); + floatRanges_.set(index, value); + onChanged(); + } else { + floatRangesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Float range values.
+     * 
+ * + * repeated .google.cloud.visionai.v1.FloatRange float_ranges = 1; + */ + public Builder setFloatRanges( + int index, com.google.cloud.visionai.v1.FloatRange.Builder builderForValue) { + if (floatRangesBuilder_ == null) { + ensureFloatRangesIsMutable(); + floatRanges_.set(index, builderForValue.build()); + onChanged(); + } else { + floatRangesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Float range values.
+     * 
+ * + * repeated .google.cloud.visionai.v1.FloatRange float_ranges = 1; + */ + public Builder addFloatRanges(com.google.cloud.visionai.v1.FloatRange value) { + if (floatRangesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFloatRangesIsMutable(); + floatRanges_.add(value); + onChanged(); + } else { + floatRangesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Float range values.
+     * 
+ * + * repeated .google.cloud.visionai.v1.FloatRange float_ranges = 1; + */ + public Builder addFloatRanges(int index, com.google.cloud.visionai.v1.FloatRange value) { + if (floatRangesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFloatRangesIsMutable(); + floatRanges_.add(index, value); + onChanged(); + } else { + floatRangesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Float range values.
+     * 
+ * + * repeated .google.cloud.visionai.v1.FloatRange float_ranges = 1; + */ + public Builder addFloatRanges(com.google.cloud.visionai.v1.FloatRange.Builder builderForValue) { + if (floatRangesBuilder_ == null) { + ensureFloatRangesIsMutable(); + floatRanges_.add(builderForValue.build()); + onChanged(); + } else { + floatRangesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Float range values.
+     * 
+ * + * repeated .google.cloud.visionai.v1.FloatRange float_ranges = 1; + */ + public Builder addFloatRanges( + int index, com.google.cloud.visionai.v1.FloatRange.Builder builderForValue) { + if (floatRangesBuilder_ == null) { + ensureFloatRangesIsMutable(); + floatRanges_.add(index, builderForValue.build()); + onChanged(); + } else { + floatRangesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Float range values.
+     * 
+ * + * repeated .google.cloud.visionai.v1.FloatRange float_ranges = 1; + */ + public Builder addAllFloatRanges( + java.lang.Iterable values) { + if (floatRangesBuilder_ == null) { + ensureFloatRangesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, floatRanges_); + onChanged(); + } else { + floatRangesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Float range values.
+     * 
+ * + * repeated .google.cloud.visionai.v1.FloatRange float_ranges = 1; + */ + public Builder clearFloatRanges() { + if (floatRangesBuilder_ == null) { + floatRanges_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + floatRangesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Float range values.
+     * 
+ * + * repeated .google.cloud.visionai.v1.FloatRange float_ranges = 1; + */ + public Builder removeFloatRanges(int index) { + if (floatRangesBuilder_ == null) { + ensureFloatRangesIsMutable(); + floatRanges_.remove(index); + onChanged(); + } else { + floatRangesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Float range values.
+     * 
+ * + * repeated .google.cloud.visionai.v1.FloatRange float_ranges = 1; + */ + public com.google.cloud.visionai.v1.FloatRange.Builder getFloatRangesBuilder(int index) { + return getFloatRangesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Float range values.
+     * 
+ * + * repeated .google.cloud.visionai.v1.FloatRange float_ranges = 1; + */ + public com.google.cloud.visionai.v1.FloatRangeOrBuilder getFloatRangesOrBuilder(int index) { + if (floatRangesBuilder_ == null) { + return floatRanges_.get(index); + } else { + return floatRangesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Float range values.
+     * 
+ * + * repeated .google.cloud.visionai.v1.FloatRange float_ranges = 1; + */ + public java.util.List + getFloatRangesOrBuilderList() { + if (floatRangesBuilder_ != null) { + return floatRangesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(floatRanges_); + } + } + /** + * + * + *
+     * Float range values.
+     * 
+ * + * repeated .google.cloud.visionai.v1.FloatRange float_ranges = 1; + */ + public com.google.cloud.visionai.v1.FloatRange.Builder addFloatRangesBuilder() { + return getFloatRangesFieldBuilder() + .addBuilder(com.google.cloud.visionai.v1.FloatRange.getDefaultInstance()); + } + /** + * + * + *
+     * Float range values.
+     * 
+ * + * repeated .google.cloud.visionai.v1.FloatRange float_ranges = 1; + */ + public com.google.cloud.visionai.v1.FloatRange.Builder addFloatRangesBuilder(int index) { + return getFloatRangesFieldBuilder() + .addBuilder(index, com.google.cloud.visionai.v1.FloatRange.getDefaultInstance()); + } + /** + * + * + *
+     * Float range values.
+     * 
+ * + * repeated .google.cloud.visionai.v1.FloatRange float_ranges = 1; + */ + public java.util.List + getFloatRangesBuilderList() { + return getFloatRangesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.visionai.v1.FloatRange, + com.google.cloud.visionai.v1.FloatRange.Builder, + com.google.cloud.visionai.v1.FloatRangeOrBuilder> + getFloatRangesFieldBuilder() { + if (floatRangesBuilder_ == null) { + floatRangesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.visionai.v1.FloatRange, + com.google.cloud.visionai.v1.FloatRange.Builder, + com.google.cloud.visionai.v1.FloatRangeOrBuilder>( + floatRanges_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + floatRanges_ = null; + } + return floatRangesBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.FloatRangeArray) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.FloatRangeArray) + private static final com.google.cloud.visionai.v1.FloatRangeArray DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.FloatRangeArray(); + } + + public static com.google.cloud.visionai.v1.FloatRangeArray getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public FloatRangeArray parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.FloatRangeArray getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/FloatRangeArrayOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/FloatRangeArrayOrBuilder.java new file mode 100644 index 000000000000..6808e7b2d7f4 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/FloatRangeArrayOrBuilder.java @@ -0,0 +1,78 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/warehouse.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface FloatRangeArrayOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.FloatRangeArray) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Float range values.
+   * 
+ * + * repeated .google.cloud.visionai.v1.FloatRange float_ranges = 1; + */ + java.util.List getFloatRangesList(); + /** + * + * + *
+   * Float range values.
+   * 
+ * + * repeated .google.cloud.visionai.v1.FloatRange float_ranges = 1; + */ + com.google.cloud.visionai.v1.FloatRange getFloatRanges(int index); + /** + * + * + *
+   * Float range values.
+   * 
+ * + * repeated .google.cloud.visionai.v1.FloatRange float_ranges = 1; + */ + int getFloatRangesCount(); + /** + * + * + *
+   * Float range values.
+   * 
+ * + * repeated .google.cloud.visionai.v1.FloatRange float_ranges = 1; + */ + java.util.List + getFloatRangesOrBuilderList(); + /** + * + * + *
+   * Float range values.
+   * 
+ * + * repeated .google.cloud.visionai.v1.FloatRange float_ranges = 1; + */ + com.google.cloud.visionai.v1.FloatRangeOrBuilder getFloatRangesOrBuilder(int index); +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/FloatRangeOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/FloatRangeOrBuilder.java new file mode 100644 index 000000000000..cbbfb9261aaf --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/FloatRangeOrBuilder.java @@ -0,0 +1,76 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/warehouse.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface FloatRangeOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.FloatRange) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Start of the float range.
+   * 
+ * + * optional float start = 1; + * + * @return Whether the start field is set. + */ + boolean hasStart(); + /** + * + * + *
+   * Start of the float range.
+   * 
+ * + * optional float start = 1; + * + * @return The start. + */ + float getStart(); + + /** + * + * + *
+   * End of the float range.
+   * 
+ * + * optional float end = 2; + * + * @return Whether the end field is set. + */ + boolean hasEnd(); + /** + * + * + *
+   * End of the float range.
+   * 
+ * + * optional float end = 2; + * + * @return The end. + */ + float getEnd(); +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GcsOutputConfig.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GcsOutputConfig.java new file mode 100644 index 000000000000..e81cc0da8dd0 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GcsOutputConfig.java @@ -0,0 +1,624 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/platform.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * Message describing GcsOutputConfig.
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.GcsOutputConfig} + */ +public final class GcsOutputConfig extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.GcsOutputConfig) + GcsOutputConfigOrBuilder { + private static final long serialVersionUID = 0L; + // Use GcsOutputConfig.newBuilder() to construct. + private GcsOutputConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GcsOutputConfig() { + gcsPath_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GcsOutputConfig(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_GcsOutputConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_GcsOutputConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.GcsOutputConfig.class, + com.google.cloud.visionai.v1.GcsOutputConfig.Builder.class); + } + + public static final int GCS_PATH_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object gcsPath_ = ""; + /** + * + * + *
+   * The Cloud Storage path for Vision AI Platform to ingest annotations to.
+   * 
+ * + * string gcs_path = 1; + * + * @return The gcsPath. + */ + @java.lang.Override + public java.lang.String getGcsPath() { + java.lang.Object ref = gcsPath_; + 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(); + gcsPath_ = s; + return s; + } + } + /** + * + * + *
+   * The Cloud Storage path for Vision AI Platform to ingest annotations to.
+   * 
+ * + * string gcs_path = 1; + * + * @return The bytes for gcsPath. + */ + @java.lang.Override + public com.google.protobuf.ByteString getGcsPathBytes() { + java.lang.Object ref = gcsPath_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + gcsPath_ = 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(gcsPath_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, gcsPath_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(gcsPath_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, gcsPath_); + } + size += getUnknownFields().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.visionai.v1.GcsOutputConfig)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.GcsOutputConfig other = + (com.google.cloud.visionai.v1.GcsOutputConfig) obj; + + if (!getGcsPath().equals(other.getGcsPath())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + GCS_PATH_FIELD_NUMBER; + hash = (53 * hash) + getGcsPath().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.GcsOutputConfig parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.GcsOutputConfig 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.visionai.v1.GcsOutputConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.GcsOutputConfig 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.visionai.v1.GcsOutputConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.GcsOutputConfig parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.GcsOutputConfig parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.GcsOutputConfig 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.visionai.v1.GcsOutputConfig parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.GcsOutputConfig 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.visionai.v1.GcsOutputConfig parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.GcsOutputConfig 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.visionai.v1.GcsOutputConfig 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; + } + /** + * + * + *
+   * Message describing GcsOutputConfig.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.GcsOutputConfig} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.GcsOutputConfig) + com.google.cloud.visionai.v1.GcsOutputConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_GcsOutputConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_GcsOutputConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.GcsOutputConfig.class, + com.google.cloud.visionai.v1.GcsOutputConfig.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.GcsOutputConfig.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + gcsPath_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_GcsOutputConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.GcsOutputConfig getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.GcsOutputConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.GcsOutputConfig build() { + com.google.cloud.visionai.v1.GcsOutputConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.GcsOutputConfig buildPartial() { + com.google.cloud.visionai.v1.GcsOutputConfig result = + new com.google.cloud.visionai.v1.GcsOutputConfig(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.visionai.v1.GcsOutputConfig result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.gcsPath_ = gcsPath_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.GcsOutputConfig) { + return mergeFrom((com.google.cloud.visionai.v1.GcsOutputConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.GcsOutputConfig other) { + if (other == com.google.cloud.visionai.v1.GcsOutputConfig.getDefaultInstance()) return this; + if (!other.getGcsPath().isEmpty()) { + gcsPath_ = other.gcsPath_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + gcsPath_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object gcsPath_ = ""; + /** + * + * + *
+     * The Cloud Storage path for Vision AI Platform to ingest annotations to.
+     * 
+ * + * string gcs_path = 1; + * + * @return The gcsPath. + */ + public java.lang.String getGcsPath() { + java.lang.Object ref = gcsPath_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + gcsPath_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The Cloud Storage path for Vision AI Platform to ingest annotations to.
+     * 
+ * + * string gcs_path = 1; + * + * @return The bytes for gcsPath. + */ + public com.google.protobuf.ByteString getGcsPathBytes() { + java.lang.Object ref = gcsPath_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + gcsPath_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The Cloud Storage path for Vision AI Platform to ingest annotations to.
+     * 
+ * + * string gcs_path = 1; + * + * @param value The gcsPath to set. + * @return This builder for chaining. + */ + public Builder setGcsPath(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + gcsPath_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The Cloud Storage path for Vision AI Platform to ingest annotations to.
+     * 
+ * + * string gcs_path = 1; + * + * @return This builder for chaining. + */ + public Builder clearGcsPath() { + gcsPath_ = getDefaultInstance().getGcsPath(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * The Cloud Storage path for Vision AI Platform to ingest annotations to.
+     * 
+ * + * string gcs_path = 1; + * + * @param value The bytes for gcsPath to set. + * @return This builder for chaining. + */ + public Builder setGcsPathBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + gcsPath_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.GcsOutputConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.GcsOutputConfig) + private static final com.google.cloud.visionai.v1.GcsOutputConfig DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.GcsOutputConfig(); + } + + public static com.google.cloud.visionai.v1.GcsOutputConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GcsOutputConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.GcsOutputConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GcsOutputConfigOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GcsOutputConfigOrBuilder.java new file mode 100644 index 000000000000..02170ec6dd40 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GcsOutputConfigOrBuilder.java @@ -0,0 +1,51 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/platform.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface GcsOutputConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.GcsOutputConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The Cloud Storage path for Vision AI Platform to ingest annotations to.
+   * 
+ * + * string gcs_path = 1; + * + * @return The gcsPath. + */ + java.lang.String getGcsPath(); + /** + * + * + *
+   * The Cloud Storage path for Vision AI Platform to ingest annotations to.
+   * 
+ * + * string gcs_path = 1; + * + * @return The bytes for gcsPath. + */ + com.google.protobuf.ByteString getGcsPathBytes(); +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GcsSource.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GcsSource.java new file mode 100644 index 000000000000..e32754dfe8f5 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GcsSource.java @@ -0,0 +1,718 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/common.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * The Google Cloud Storage location for the input content.
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.GcsSource} + */ +public final class GcsSource extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.GcsSource) + GcsSourceOrBuilder { + private static final long serialVersionUID = 0L; + // Use GcsSource.newBuilder() to construct. + private GcsSource(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GcsSource() { + uris_ = com.google.protobuf.LazyStringArrayList.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GcsSource(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.CommonProto + .internal_static_google_cloud_visionai_v1_GcsSource_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.CommonProto + .internal_static_google_cloud_visionai_v1_GcsSource_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.GcsSource.class, + com.google.cloud.visionai.v1.GcsSource.Builder.class); + } + + public static final int URIS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList uris_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + * + * + *
+   * Required. References to a Google Cloud Storage paths.
+   * 
+ * + * repeated string uris = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return A list containing the uris. + */ + public com.google.protobuf.ProtocolStringList getUrisList() { + return uris_; + } + /** + * + * + *
+   * Required. References to a Google Cloud Storage paths.
+   * 
+ * + * repeated string uris = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The count of uris. + */ + public int getUrisCount() { + return uris_.size(); + } + /** + * + * + *
+   * Required. References to a Google Cloud Storage paths.
+   * 
+ * + * repeated string uris = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param index The index of the element to return. + * @return The uris at the given index. + */ + public java.lang.String getUris(int index) { + return uris_.get(index); + } + /** + * + * + *
+   * Required. References to a Google Cloud Storage paths.
+   * 
+ * + * repeated string uris = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param index The index of the value to return. + * @return The bytes of the uris at the given index. + */ + public com.google.protobuf.ByteString getUrisBytes(int index) { + return uris_.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 < uris_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, uris_.getRaw(i)); + } + getUnknownFields().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 < uris_.size(); i++) { + dataSize += computeStringSizeNoTag(uris_.getRaw(i)); + } + size += dataSize; + size += 1 * getUrisList().size(); + } + size += getUnknownFields().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.visionai.v1.GcsSource)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.GcsSource other = (com.google.cloud.visionai.v1.GcsSource) obj; + + if (!getUrisList().equals(other.getUrisList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getUrisCount() > 0) { + hash = (37 * hash) + URIS_FIELD_NUMBER; + hash = (53 * hash) + getUrisList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.GcsSource parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.GcsSource 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.visionai.v1.GcsSource parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.GcsSource 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.visionai.v1.GcsSource parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.GcsSource parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.GcsSource parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.GcsSource 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.visionai.v1.GcsSource parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.GcsSource 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.visionai.v1.GcsSource parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.GcsSource 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.visionai.v1.GcsSource 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 Google Cloud Storage location for the input content.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.GcsSource} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.GcsSource) + com.google.cloud.visionai.v1.GcsSourceOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.CommonProto + .internal_static_google_cloud_visionai_v1_GcsSource_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.CommonProto + .internal_static_google_cloud_visionai_v1_GcsSource_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.GcsSource.class, + com.google.cloud.visionai.v1.GcsSource.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.GcsSource.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + uris_ = com.google.protobuf.LazyStringArrayList.emptyList(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.CommonProto + .internal_static_google_cloud_visionai_v1_GcsSource_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.GcsSource getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.GcsSource.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.GcsSource build() { + com.google.cloud.visionai.v1.GcsSource result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.GcsSource buildPartial() { + com.google.cloud.visionai.v1.GcsSource result = + new com.google.cloud.visionai.v1.GcsSource(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.visionai.v1.GcsSource result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + uris_.makeImmutable(); + result.uris_ = uris_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.GcsSource) { + return mergeFrom((com.google.cloud.visionai.v1.GcsSource) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.GcsSource other) { + if (other == com.google.cloud.visionai.v1.GcsSource.getDefaultInstance()) return this; + if (!other.uris_.isEmpty()) { + if (uris_.isEmpty()) { + uris_ = other.uris_; + bitField0_ |= 0x00000001; + } else { + ensureUrisIsMutable(); + uris_.addAll(other.uris_); + } + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + 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(); + ensureUrisIsMutable(); + uris_.add(s); + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.protobuf.LazyStringArrayList uris_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureUrisIsMutable() { + if (!uris_.isModifiable()) { + uris_ = new com.google.protobuf.LazyStringArrayList(uris_); + } + bitField0_ |= 0x00000001; + } + /** + * + * + *
+     * Required. References to a Google Cloud Storage paths.
+     * 
+ * + * repeated string uris = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return A list containing the uris. + */ + public com.google.protobuf.ProtocolStringList getUrisList() { + uris_.makeImmutable(); + return uris_; + } + /** + * + * + *
+     * Required. References to a Google Cloud Storage paths.
+     * 
+ * + * repeated string uris = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The count of uris. + */ + public int getUrisCount() { + return uris_.size(); + } + /** + * + * + *
+     * Required. References to a Google Cloud Storage paths.
+     * 
+ * + * repeated string uris = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param index The index of the element to return. + * @return The uris at the given index. + */ + public java.lang.String getUris(int index) { + return uris_.get(index); + } + /** + * + * + *
+     * Required. References to a Google Cloud Storage paths.
+     * 
+ * + * repeated string uris = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param index The index of the value to return. + * @return The bytes of the uris at the given index. + */ + public com.google.protobuf.ByteString getUrisBytes(int index) { + return uris_.getByteString(index); + } + /** + * + * + *
+     * Required. References to a Google Cloud Storage paths.
+     * 
+ * + * repeated string uris = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param index The index to set the value at. + * @param value The uris to set. + * @return This builder for chaining. + */ + public Builder setUris(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureUrisIsMutable(); + uris_.set(index, value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. References to a Google Cloud Storage paths.
+     * 
+ * + * repeated string uris = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The uris to add. + * @return This builder for chaining. + */ + public Builder addUris(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureUrisIsMutable(); + uris_.add(value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. References to a Google Cloud Storage paths.
+     * 
+ * + * repeated string uris = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param values The uris to add. + * @return This builder for chaining. + */ + public Builder addAllUris(java.lang.Iterable values) { + ensureUrisIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, uris_); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. References to a Google Cloud Storage paths.
+     * 
+ * + * repeated string uris = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearUris() { + uris_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + ; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. References to a Google Cloud Storage paths.
+     * 
+ * + * repeated string uris = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes of the uris to add. + * @return This builder for chaining. + */ + public Builder addUrisBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureUrisIsMutable(); + uris_.add(value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.GcsSource) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.GcsSource) + private static final com.google.cloud.visionai.v1.GcsSource DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.GcsSource(); + } + + public static com.google.cloud.visionai.v1.GcsSource getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GcsSource parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.GcsSource getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GcsSourceOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GcsSourceOrBuilder.java new file mode 100644 index 000000000000..df5986a5380d --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GcsSourceOrBuilder.java @@ -0,0 +1,77 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/common.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface GcsSourceOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.GcsSource) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. References to a Google Cloud Storage paths.
+   * 
+ * + * repeated string uris = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return A list containing the uris. + */ + java.util.List getUrisList(); + /** + * + * + *
+   * Required. References to a Google Cloud Storage paths.
+   * 
+ * + * repeated string uris = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The count of uris. + */ + int getUrisCount(); + /** + * + * + *
+   * Required. References to a Google Cloud Storage paths.
+   * 
+ * + * repeated string uris = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param index The index of the element to return. + * @return The uris at the given index. + */ + java.lang.String getUris(int index); + /** + * + * + *
+   * Required. References to a Google Cloud Storage paths.
+   * 
+ * + * repeated string uris = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param index The index of the value to return. + * @return The bytes of the uris at the given index. + */ + com.google.protobuf.ByteString getUrisBytes(int index); +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GeneralObjectDetectionConfig.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GeneralObjectDetectionConfig.java new file mode 100644 index 000000000000..07a04dabf92e --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GeneralObjectDetectionConfig.java @@ -0,0 +1,433 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/platform.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * Message of configurations for General Object Detection processor.
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.GeneralObjectDetectionConfig} + */ +public final class GeneralObjectDetectionConfig extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.GeneralObjectDetectionConfig) + GeneralObjectDetectionConfigOrBuilder { + private static final long serialVersionUID = 0L; + // Use GeneralObjectDetectionConfig.newBuilder() to construct. + private GeneralObjectDetectionConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GeneralObjectDetectionConfig() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GeneralObjectDetectionConfig(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_GeneralObjectDetectionConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_GeneralObjectDetectionConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.GeneralObjectDetectionConfig.class, + com.google.cloud.visionai.v1.GeneralObjectDetectionConfig.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 { + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += getUnknownFields().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.visionai.v1.GeneralObjectDetectionConfig)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.GeneralObjectDetectionConfig other = + (com.google.cloud.visionai.v1.GeneralObjectDetectionConfig) obj; + + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.GeneralObjectDetectionConfig parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.GeneralObjectDetectionConfig 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.visionai.v1.GeneralObjectDetectionConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.GeneralObjectDetectionConfig 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.visionai.v1.GeneralObjectDetectionConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.GeneralObjectDetectionConfig parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.GeneralObjectDetectionConfig parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.GeneralObjectDetectionConfig 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.visionai.v1.GeneralObjectDetectionConfig parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.GeneralObjectDetectionConfig 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.visionai.v1.GeneralObjectDetectionConfig parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.GeneralObjectDetectionConfig 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.visionai.v1.GeneralObjectDetectionConfig 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; + } + /** + * + * + *
+   * Message of configurations for General Object Detection processor.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.GeneralObjectDetectionConfig} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.GeneralObjectDetectionConfig) + com.google.cloud.visionai.v1.GeneralObjectDetectionConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_GeneralObjectDetectionConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_GeneralObjectDetectionConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.GeneralObjectDetectionConfig.class, + com.google.cloud.visionai.v1.GeneralObjectDetectionConfig.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.GeneralObjectDetectionConfig.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_GeneralObjectDetectionConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.GeneralObjectDetectionConfig getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.GeneralObjectDetectionConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.GeneralObjectDetectionConfig build() { + com.google.cloud.visionai.v1.GeneralObjectDetectionConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.GeneralObjectDetectionConfig buildPartial() { + com.google.cloud.visionai.v1.GeneralObjectDetectionConfig result = + new com.google.cloud.visionai.v1.GeneralObjectDetectionConfig(this); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.GeneralObjectDetectionConfig) { + return mergeFrom((com.google.cloud.visionai.v1.GeneralObjectDetectionConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.GeneralObjectDetectionConfig other) { + if (other == com.google.cloud.visionai.v1.GeneralObjectDetectionConfig.getDefaultInstance()) + return this; + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.GeneralObjectDetectionConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.GeneralObjectDetectionConfig) + private static final com.google.cloud.visionai.v1.GeneralObjectDetectionConfig DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.GeneralObjectDetectionConfig(); + } + + public static com.google.cloud.visionai.v1.GeneralObjectDetectionConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GeneralObjectDetectionConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.GeneralObjectDetectionConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GeneralObjectDetectionConfigOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GeneralObjectDetectionConfigOrBuilder.java new file mode 100644 index 000000000000..b01cdd61df73 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GeneralObjectDetectionConfigOrBuilder.java @@ -0,0 +1,25 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/platform.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface GeneralObjectDetectionConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.GeneralObjectDetectionConfig) + com.google.protobuf.MessageOrBuilder {} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GenerateHlsUriRequest.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GenerateHlsUriRequest.java new file mode 100644 index 000000000000..315162d0f2af --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GenerateHlsUriRequest.java @@ -0,0 +1,1315 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/warehouse.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * Request message for GenerateHlsUri API.
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.GenerateHlsUriRequest} + */ +public final class GenerateHlsUriRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.GenerateHlsUriRequest) + GenerateHlsUriRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GenerateHlsUriRequest.newBuilder() to construct. + private GenerateHlsUriRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GenerateHlsUriRequest() { + name_ = ""; + temporalPartitions_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GenerateHlsUriRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_GenerateHlsUriRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_GenerateHlsUriRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.GenerateHlsUriRequest.class, + com.google.cloud.visionai.v1.GenerateHlsUriRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Required. The resource name of the asset to request clips for.
+   * Format:
+   * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/assets/{asset_id}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + 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(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The resource name of the asset to request clips for.
+   * Format:
+   * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/assets/{asset_id}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TEMPORAL_PARTITIONS_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private java.util.List + temporalPartitions_; + /** + * + * + *
+   * The time range to request clips for. Will be ignored if `get_live_view` is
+   * set to True. The total time range requested should be smaller than 24h.
+   * 
+ * + * repeated .google.cloud.visionai.v1.Partition.TemporalPartition temporal_partitions = 2; + * + */ + @java.lang.Override + public java.util.List + getTemporalPartitionsList() { + return temporalPartitions_; + } + /** + * + * + *
+   * The time range to request clips for. Will be ignored if `get_live_view` is
+   * set to True. The total time range requested should be smaller than 24h.
+   * 
+ * + * repeated .google.cloud.visionai.v1.Partition.TemporalPartition temporal_partitions = 2; + * + */ + @java.lang.Override + public java.util.List + getTemporalPartitionsOrBuilderList() { + return temporalPartitions_; + } + /** + * + * + *
+   * The time range to request clips for. Will be ignored if `get_live_view` is
+   * set to True. The total time range requested should be smaller than 24h.
+   * 
+ * + * repeated .google.cloud.visionai.v1.Partition.TemporalPartition temporal_partitions = 2; + * + */ + @java.lang.Override + public int getTemporalPartitionsCount() { + return temporalPartitions_.size(); + } + /** + * + * + *
+   * The time range to request clips for. Will be ignored if `get_live_view` is
+   * set to True. The total time range requested should be smaller than 24h.
+   * 
+ * + * repeated .google.cloud.visionai.v1.Partition.TemporalPartition temporal_partitions = 2; + * + */ + @java.lang.Override + public com.google.cloud.visionai.v1.Partition.TemporalPartition getTemporalPartitions(int index) { + return temporalPartitions_.get(index); + } + /** + * + * + *
+   * The time range to request clips for. Will be ignored if `get_live_view` is
+   * set to True. The total time range requested should be smaller than 24h.
+   * 
+ * + * repeated .google.cloud.visionai.v1.Partition.TemporalPartition temporal_partitions = 2; + * + */ + @java.lang.Override + public com.google.cloud.visionai.v1.Partition.TemporalPartitionOrBuilder + getTemporalPartitionsOrBuilder(int index) { + return temporalPartitions_.get(index); + } + + public static final int LIVE_VIEW_ENABLED_FIELD_NUMBER = 3; + private boolean liveViewEnabled_ = false; + /** + * + * + *
+   * Option to exclusively show a livestream of the asset with up to 3 minutes
+   * of backlog data.
+   * 
+ * + * bool live_view_enabled = 3; + * + * @return The liveViewEnabled. + */ + @java.lang.Override + public boolean getLiveViewEnabled() { + return liveViewEnabled_; + } + + 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + for (int i = 0; i < temporalPartitions_.size(); i++) { + output.writeMessage(2, temporalPartitions_.get(i)); + } + if (liveViewEnabled_ != false) { + output.writeBool(3, liveViewEnabled_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + for (int i = 0; i < temporalPartitions_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(2, temporalPartitions_.get(i)); + } + if (liveViewEnabled_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(3, liveViewEnabled_); + } + size += getUnknownFields().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.visionai.v1.GenerateHlsUriRequest)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.GenerateHlsUriRequest other = + (com.google.cloud.visionai.v1.GenerateHlsUriRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getTemporalPartitionsList().equals(other.getTemporalPartitionsList())) return false; + if (getLiveViewEnabled() != other.getLiveViewEnabled()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + if (getTemporalPartitionsCount() > 0) { + hash = (37 * hash) + TEMPORAL_PARTITIONS_FIELD_NUMBER; + hash = (53 * hash) + getTemporalPartitionsList().hashCode(); + } + hash = (37 * hash) + LIVE_VIEW_ENABLED_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getLiveViewEnabled()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.GenerateHlsUriRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.GenerateHlsUriRequest 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.visionai.v1.GenerateHlsUriRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.GenerateHlsUriRequest 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.visionai.v1.GenerateHlsUriRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.GenerateHlsUriRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.GenerateHlsUriRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.GenerateHlsUriRequest 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.visionai.v1.GenerateHlsUriRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.GenerateHlsUriRequest 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.visionai.v1.GenerateHlsUriRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.GenerateHlsUriRequest 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.visionai.v1.GenerateHlsUriRequest 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; + } + /** + * + * + *
+   * Request message for GenerateHlsUri API.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.GenerateHlsUriRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.GenerateHlsUriRequest) + com.google.cloud.visionai.v1.GenerateHlsUriRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_GenerateHlsUriRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_GenerateHlsUriRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.GenerateHlsUriRequest.class, + com.google.cloud.visionai.v1.GenerateHlsUriRequest.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.GenerateHlsUriRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + if (temporalPartitionsBuilder_ == null) { + temporalPartitions_ = java.util.Collections.emptyList(); + } else { + temporalPartitions_ = null; + temporalPartitionsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + liveViewEnabled_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_GenerateHlsUriRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.GenerateHlsUriRequest getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.GenerateHlsUriRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.GenerateHlsUriRequest build() { + com.google.cloud.visionai.v1.GenerateHlsUriRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.GenerateHlsUriRequest buildPartial() { + com.google.cloud.visionai.v1.GenerateHlsUriRequest result = + new com.google.cloud.visionai.v1.GenerateHlsUriRequest(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.visionai.v1.GenerateHlsUriRequest result) { + if (temporalPartitionsBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + temporalPartitions_ = java.util.Collections.unmodifiableList(temporalPartitions_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.temporalPartitions_ = temporalPartitions_; + } else { + result.temporalPartitions_ = temporalPartitionsBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.visionai.v1.GenerateHlsUriRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.liveViewEnabled_ = liveViewEnabled_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.GenerateHlsUriRequest) { + return mergeFrom((com.google.cloud.visionai.v1.GenerateHlsUriRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.GenerateHlsUriRequest other) { + if (other == com.google.cloud.visionai.v1.GenerateHlsUriRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (temporalPartitionsBuilder_ == null) { + if (!other.temporalPartitions_.isEmpty()) { + if (temporalPartitions_.isEmpty()) { + temporalPartitions_ = other.temporalPartitions_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureTemporalPartitionsIsMutable(); + temporalPartitions_.addAll(other.temporalPartitions_); + } + onChanged(); + } + } else { + if (!other.temporalPartitions_.isEmpty()) { + if (temporalPartitionsBuilder_.isEmpty()) { + temporalPartitionsBuilder_.dispose(); + temporalPartitionsBuilder_ = null; + temporalPartitions_ = other.temporalPartitions_; + bitField0_ = (bitField0_ & ~0x00000002); + temporalPartitionsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getTemporalPartitionsFieldBuilder() + : null; + } else { + temporalPartitionsBuilder_.addAllMessages(other.temporalPartitions_); + } + } + } + if (other.getLiveViewEnabled() != false) { + setLiveViewEnabled(other.getLiveViewEnabled()); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + com.google.cloud.visionai.v1.Partition.TemporalPartition m = + input.readMessage( + com.google.cloud.visionai.v1.Partition.TemporalPartition.parser(), + extensionRegistry); + if (temporalPartitionsBuilder_ == null) { + ensureTemporalPartitionsIsMutable(); + temporalPartitions_.add(m); + } else { + temporalPartitionsBuilder_.addMessage(m); + } + break; + } // case 18 + case 24: + { + liveViewEnabled_ = input.readBool(); + bitField0_ |= 0x00000004; + break; + } // case 24 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. The resource name of the asset to request clips for.
+     * Format:
+     * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/assets/{asset_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The resource name of the asset to request clips for.
+     * Format:
+     * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/assets/{asset_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The resource name of the asset to request clips for.
+     * Format:
+     * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/assets/{asset_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the asset to request clips for.
+     * Format:
+     * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/assets/{asset_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the asset to request clips for.
+     * Format:
+     * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/assets/{asset_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.util.List + temporalPartitions_ = java.util.Collections.emptyList(); + + private void ensureTemporalPartitionsIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + temporalPartitions_ = + new java.util.ArrayList( + temporalPartitions_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.visionai.v1.Partition.TemporalPartition, + com.google.cloud.visionai.v1.Partition.TemporalPartition.Builder, + com.google.cloud.visionai.v1.Partition.TemporalPartitionOrBuilder> + temporalPartitionsBuilder_; + + /** + * + * + *
+     * The time range to request clips for. Will be ignored if `get_live_view` is
+     * set to True. The total time range requested should be smaller than 24h.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Partition.TemporalPartition temporal_partitions = 2; + * + */ + public java.util.List + getTemporalPartitionsList() { + if (temporalPartitionsBuilder_ == null) { + return java.util.Collections.unmodifiableList(temporalPartitions_); + } else { + return temporalPartitionsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * The time range to request clips for. Will be ignored if `get_live_view` is
+     * set to True. The total time range requested should be smaller than 24h.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Partition.TemporalPartition temporal_partitions = 2; + * + */ + public int getTemporalPartitionsCount() { + if (temporalPartitionsBuilder_ == null) { + return temporalPartitions_.size(); + } else { + return temporalPartitionsBuilder_.getCount(); + } + } + /** + * + * + *
+     * The time range to request clips for. Will be ignored if `get_live_view` is
+     * set to True. The total time range requested should be smaller than 24h.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Partition.TemporalPartition temporal_partitions = 2; + * + */ + public com.google.cloud.visionai.v1.Partition.TemporalPartition getTemporalPartitions( + int index) { + if (temporalPartitionsBuilder_ == null) { + return temporalPartitions_.get(index); + } else { + return temporalPartitionsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * The time range to request clips for. Will be ignored if `get_live_view` is
+     * set to True. The total time range requested should be smaller than 24h.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Partition.TemporalPartition temporal_partitions = 2; + * + */ + public Builder setTemporalPartitions( + int index, com.google.cloud.visionai.v1.Partition.TemporalPartition value) { + if (temporalPartitionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTemporalPartitionsIsMutable(); + temporalPartitions_.set(index, value); + onChanged(); + } else { + temporalPartitionsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The time range to request clips for. Will be ignored if `get_live_view` is
+     * set to True. The total time range requested should be smaller than 24h.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Partition.TemporalPartition temporal_partitions = 2; + * + */ + public Builder setTemporalPartitions( + int index, + com.google.cloud.visionai.v1.Partition.TemporalPartition.Builder builderForValue) { + if (temporalPartitionsBuilder_ == null) { + ensureTemporalPartitionsIsMutable(); + temporalPartitions_.set(index, builderForValue.build()); + onChanged(); + } else { + temporalPartitionsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The time range to request clips for. Will be ignored if `get_live_view` is
+     * set to True. The total time range requested should be smaller than 24h.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Partition.TemporalPartition temporal_partitions = 2; + * + */ + public Builder addTemporalPartitions( + com.google.cloud.visionai.v1.Partition.TemporalPartition value) { + if (temporalPartitionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTemporalPartitionsIsMutable(); + temporalPartitions_.add(value); + onChanged(); + } else { + temporalPartitionsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * The time range to request clips for. Will be ignored if `get_live_view` is
+     * set to True. The total time range requested should be smaller than 24h.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Partition.TemporalPartition temporal_partitions = 2; + * + */ + public Builder addTemporalPartitions( + int index, com.google.cloud.visionai.v1.Partition.TemporalPartition value) { + if (temporalPartitionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTemporalPartitionsIsMutable(); + temporalPartitions_.add(index, value); + onChanged(); + } else { + temporalPartitionsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The time range to request clips for. Will be ignored if `get_live_view` is
+     * set to True. The total time range requested should be smaller than 24h.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Partition.TemporalPartition temporal_partitions = 2; + * + */ + public Builder addTemporalPartitions( + com.google.cloud.visionai.v1.Partition.TemporalPartition.Builder builderForValue) { + if (temporalPartitionsBuilder_ == null) { + ensureTemporalPartitionsIsMutable(); + temporalPartitions_.add(builderForValue.build()); + onChanged(); + } else { + temporalPartitionsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The time range to request clips for. Will be ignored if `get_live_view` is
+     * set to True. The total time range requested should be smaller than 24h.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Partition.TemporalPartition temporal_partitions = 2; + * + */ + public Builder addTemporalPartitions( + int index, + com.google.cloud.visionai.v1.Partition.TemporalPartition.Builder builderForValue) { + if (temporalPartitionsBuilder_ == null) { + ensureTemporalPartitionsIsMutable(); + temporalPartitions_.add(index, builderForValue.build()); + onChanged(); + } else { + temporalPartitionsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The time range to request clips for. Will be ignored if `get_live_view` is
+     * set to True. The total time range requested should be smaller than 24h.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Partition.TemporalPartition temporal_partitions = 2; + * + */ + public Builder addAllTemporalPartitions( + java.lang.Iterable + values) { + if (temporalPartitionsBuilder_ == null) { + ensureTemporalPartitionsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, temporalPartitions_); + onChanged(); + } else { + temporalPartitionsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * The time range to request clips for. Will be ignored if `get_live_view` is
+     * set to True. The total time range requested should be smaller than 24h.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Partition.TemporalPartition temporal_partitions = 2; + * + */ + public Builder clearTemporalPartitions() { + if (temporalPartitionsBuilder_ == null) { + temporalPartitions_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + temporalPartitionsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The time range to request clips for. Will be ignored if `get_live_view` is
+     * set to True. The total time range requested should be smaller than 24h.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Partition.TemporalPartition temporal_partitions = 2; + * + */ + public Builder removeTemporalPartitions(int index) { + if (temporalPartitionsBuilder_ == null) { + ensureTemporalPartitionsIsMutable(); + temporalPartitions_.remove(index); + onChanged(); + } else { + temporalPartitionsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * The time range to request clips for. Will be ignored if `get_live_view` is
+     * set to True. The total time range requested should be smaller than 24h.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Partition.TemporalPartition temporal_partitions = 2; + * + */ + public com.google.cloud.visionai.v1.Partition.TemporalPartition.Builder + getTemporalPartitionsBuilder(int index) { + return getTemporalPartitionsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * The time range to request clips for. Will be ignored if `get_live_view` is
+     * set to True. The total time range requested should be smaller than 24h.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Partition.TemporalPartition temporal_partitions = 2; + * + */ + public com.google.cloud.visionai.v1.Partition.TemporalPartitionOrBuilder + getTemporalPartitionsOrBuilder(int index) { + if (temporalPartitionsBuilder_ == null) { + return temporalPartitions_.get(index); + } else { + return temporalPartitionsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * The time range to request clips for. Will be ignored if `get_live_view` is
+     * set to True. The total time range requested should be smaller than 24h.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Partition.TemporalPartition temporal_partitions = 2; + * + */ + public java.util.List< + ? extends com.google.cloud.visionai.v1.Partition.TemporalPartitionOrBuilder> + getTemporalPartitionsOrBuilderList() { + if (temporalPartitionsBuilder_ != null) { + return temporalPartitionsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(temporalPartitions_); + } + } + /** + * + * + *
+     * The time range to request clips for. Will be ignored if `get_live_view` is
+     * set to True. The total time range requested should be smaller than 24h.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Partition.TemporalPartition temporal_partitions = 2; + * + */ + public com.google.cloud.visionai.v1.Partition.TemporalPartition.Builder + addTemporalPartitionsBuilder() { + return getTemporalPartitionsFieldBuilder() + .addBuilder( + com.google.cloud.visionai.v1.Partition.TemporalPartition.getDefaultInstance()); + } + /** + * + * + *
+     * The time range to request clips for. Will be ignored if `get_live_view` is
+     * set to True. The total time range requested should be smaller than 24h.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Partition.TemporalPartition temporal_partitions = 2; + * + */ + public com.google.cloud.visionai.v1.Partition.TemporalPartition.Builder + addTemporalPartitionsBuilder(int index) { + return getTemporalPartitionsFieldBuilder() + .addBuilder( + index, com.google.cloud.visionai.v1.Partition.TemporalPartition.getDefaultInstance()); + } + /** + * + * + *
+     * The time range to request clips for. Will be ignored if `get_live_view` is
+     * set to True. The total time range requested should be smaller than 24h.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Partition.TemporalPartition temporal_partitions = 2; + * + */ + public java.util.List + getTemporalPartitionsBuilderList() { + return getTemporalPartitionsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.visionai.v1.Partition.TemporalPartition, + com.google.cloud.visionai.v1.Partition.TemporalPartition.Builder, + com.google.cloud.visionai.v1.Partition.TemporalPartitionOrBuilder> + getTemporalPartitionsFieldBuilder() { + if (temporalPartitionsBuilder_ == null) { + temporalPartitionsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.visionai.v1.Partition.TemporalPartition, + com.google.cloud.visionai.v1.Partition.TemporalPartition.Builder, + com.google.cloud.visionai.v1.Partition.TemporalPartitionOrBuilder>( + temporalPartitions_, + ((bitField0_ & 0x00000002) != 0), + getParentForChildren(), + isClean()); + temporalPartitions_ = null; + } + return temporalPartitionsBuilder_; + } + + private boolean liveViewEnabled_; + /** + * + * + *
+     * Option to exclusively show a livestream of the asset with up to 3 minutes
+     * of backlog data.
+     * 
+ * + * bool live_view_enabled = 3; + * + * @return The liveViewEnabled. + */ + @java.lang.Override + public boolean getLiveViewEnabled() { + return liveViewEnabled_; + } + /** + * + * + *
+     * Option to exclusively show a livestream of the asset with up to 3 minutes
+     * of backlog data.
+     * 
+ * + * bool live_view_enabled = 3; + * + * @param value The liveViewEnabled to set. + * @return This builder for chaining. + */ + public Builder setLiveViewEnabled(boolean value) { + + liveViewEnabled_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Option to exclusively show a livestream of the asset with up to 3 minutes
+     * of backlog data.
+     * 
+ * + * bool live_view_enabled = 3; + * + * @return This builder for chaining. + */ + public Builder clearLiveViewEnabled() { + bitField0_ = (bitField0_ & ~0x00000004); + liveViewEnabled_ = false; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.GenerateHlsUriRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.GenerateHlsUriRequest) + private static final com.google.cloud.visionai.v1.GenerateHlsUriRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.GenerateHlsUriRequest(); + } + + public static com.google.cloud.visionai.v1.GenerateHlsUriRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GenerateHlsUriRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.GenerateHlsUriRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GenerateHlsUriRequestOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GenerateHlsUriRequestOrBuilder.java new file mode 100644 index 000000000000..1bb772455ad2 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GenerateHlsUriRequestOrBuilder.java @@ -0,0 +1,137 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/warehouse.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface GenerateHlsUriRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.GenerateHlsUriRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The resource name of the asset to request clips for.
+   * Format:
+   * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/assets/{asset_id}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The resource name of the asset to request clips for.
+   * Format:
+   * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/assets/{asset_id}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * The time range to request clips for. Will be ignored if `get_live_view` is
+   * set to True. The total time range requested should be smaller than 24h.
+   * 
+ * + * repeated .google.cloud.visionai.v1.Partition.TemporalPartition temporal_partitions = 2; + * + */ + java.util.List + getTemporalPartitionsList(); + /** + * + * + *
+   * The time range to request clips for. Will be ignored if `get_live_view` is
+   * set to True. The total time range requested should be smaller than 24h.
+   * 
+ * + * repeated .google.cloud.visionai.v1.Partition.TemporalPartition temporal_partitions = 2; + * + */ + com.google.cloud.visionai.v1.Partition.TemporalPartition getTemporalPartitions(int index); + /** + * + * + *
+   * The time range to request clips for. Will be ignored if `get_live_view` is
+   * set to True. The total time range requested should be smaller than 24h.
+   * 
+ * + * repeated .google.cloud.visionai.v1.Partition.TemporalPartition temporal_partitions = 2; + * + */ + int getTemporalPartitionsCount(); + /** + * + * + *
+   * The time range to request clips for. Will be ignored if `get_live_view` is
+   * set to True. The total time range requested should be smaller than 24h.
+   * 
+ * + * repeated .google.cloud.visionai.v1.Partition.TemporalPartition temporal_partitions = 2; + * + */ + java.util.List + getTemporalPartitionsOrBuilderList(); + /** + * + * + *
+   * The time range to request clips for. Will be ignored if `get_live_view` is
+   * set to True. The total time range requested should be smaller than 24h.
+   * 
+ * + * repeated .google.cloud.visionai.v1.Partition.TemporalPartition temporal_partitions = 2; + * + */ + com.google.cloud.visionai.v1.Partition.TemporalPartitionOrBuilder getTemporalPartitionsOrBuilder( + int index); + + /** + * + * + *
+   * Option to exclusively show a livestream of the asset with up to 3 minutes
+   * of backlog data.
+   * 
+ * + * bool live_view_enabled = 3; + * + * @return The liveViewEnabled. + */ + boolean getLiveViewEnabled(); +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GenerateHlsUriResponse.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GenerateHlsUriResponse.java new file mode 100644 index 000000000000..151e6481839e --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GenerateHlsUriResponse.java @@ -0,0 +1,1197 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/warehouse.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * Response message for GenerateHlsUri API.
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.GenerateHlsUriResponse} + */ +public final class GenerateHlsUriResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.GenerateHlsUriResponse) + GenerateHlsUriResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use GenerateHlsUriResponse.newBuilder() to construct. + private GenerateHlsUriResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GenerateHlsUriResponse() { + uri_ = ""; + temporalPartitions_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GenerateHlsUriResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_GenerateHlsUriResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_GenerateHlsUriResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.GenerateHlsUriResponse.class, + com.google.cloud.visionai.v1.GenerateHlsUriResponse.Builder.class); + } + + public static final int URI_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object uri_ = ""; + /** + * + * + *
+   * A signed uri to download the HLS manifest corresponding to the requested
+   * times.
+   * 
+ * + * string uri = 1; + * + * @return The uri. + */ + @java.lang.Override + public java.lang.String getUri() { + java.lang.Object ref = uri_; + 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(); + uri_ = s; + return s; + } + } + /** + * + * + *
+   * A signed uri to download the HLS manifest corresponding to the requested
+   * times.
+   * 
+ * + * string uri = 1; + * + * @return The bytes for uri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getUriBytes() { + java.lang.Object ref = uri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TEMPORAL_PARTITIONS_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private java.util.List + temporalPartitions_; + /** + * + * + *
+   * A list of temporal partitions of the content returned in the order they
+   * appear in the stream.
+   * 
+ * + * repeated .google.cloud.visionai.v1.Partition.TemporalPartition temporal_partitions = 2; + * + */ + @java.lang.Override + public java.util.List + getTemporalPartitionsList() { + return temporalPartitions_; + } + /** + * + * + *
+   * A list of temporal partitions of the content returned in the order they
+   * appear in the stream.
+   * 
+ * + * repeated .google.cloud.visionai.v1.Partition.TemporalPartition temporal_partitions = 2; + * + */ + @java.lang.Override + public java.util.List + getTemporalPartitionsOrBuilderList() { + return temporalPartitions_; + } + /** + * + * + *
+   * A list of temporal partitions of the content returned in the order they
+   * appear in the stream.
+   * 
+ * + * repeated .google.cloud.visionai.v1.Partition.TemporalPartition temporal_partitions = 2; + * + */ + @java.lang.Override + public int getTemporalPartitionsCount() { + return temporalPartitions_.size(); + } + /** + * + * + *
+   * A list of temporal partitions of the content returned in the order they
+   * appear in the stream.
+   * 
+ * + * repeated .google.cloud.visionai.v1.Partition.TemporalPartition temporal_partitions = 2; + * + */ + @java.lang.Override + public com.google.cloud.visionai.v1.Partition.TemporalPartition getTemporalPartitions(int index) { + return temporalPartitions_.get(index); + } + /** + * + * + *
+   * A list of temporal partitions of the content returned in the order they
+   * appear in the stream.
+   * 
+ * + * repeated .google.cloud.visionai.v1.Partition.TemporalPartition temporal_partitions = 2; + * + */ + @java.lang.Override + public com.google.cloud.visionai.v1.Partition.TemporalPartitionOrBuilder + getTemporalPartitionsOrBuilder(int index) { + return temporalPartitions_.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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uri_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, uri_); + } + for (int i = 0; i < temporalPartitions_.size(); i++) { + output.writeMessage(2, temporalPartitions_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uri_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, uri_); + } + for (int i = 0; i < temporalPartitions_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(2, temporalPartitions_.get(i)); + } + size += getUnknownFields().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.visionai.v1.GenerateHlsUriResponse)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.GenerateHlsUriResponse other = + (com.google.cloud.visionai.v1.GenerateHlsUriResponse) obj; + + if (!getUri().equals(other.getUri())) return false; + if (!getTemporalPartitionsList().equals(other.getTemporalPartitionsList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + URI_FIELD_NUMBER; + hash = (53 * hash) + getUri().hashCode(); + if (getTemporalPartitionsCount() > 0) { + hash = (37 * hash) + TEMPORAL_PARTITIONS_FIELD_NUMBER; + hash = (53 * hash) + getTemporalPartitionsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.GenerateHlsUriResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.GenerateHlsUriResponse 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.visionai.v1.GenerateHlsUriResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.GenerateHlsUriResponse 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.visionai.v1.GenerateHlsUriResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.GenerateHlsUriResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.GenerateHlsUriResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.GenerateHlsUriResponse 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.visionai.v1.GenerateHlsUriResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.GenerateHlsUriResponse 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.visionai.v1.GenerateHlsUriResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.GenerateHlsUriResponse 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.visionai.v1.GenerateHlsUriResponse 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; + } + /** + * + * + *
+   * Response message for GenerateHlsUri API.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.GenerateHlsUriResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.GenerateHlsUriResponse) + com.google.cloud.visionai.v1.GenerateHlsUriResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_GenerateHlsUriResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_GenerateHlsUriResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.GenerateHlsUriResponse.class, + com.google.cloud.visionai.v1.GenerateHlsUriResponse.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.GenerateHlsUriResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + uri_ = ""; + if (temporalPartitionsBuilder_ == null) { + temporalPartitions_ = java.util.Collections.emptyList(); + } else { + temporalPartitions_ = null; + temporalPartitionsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_GenerateHlsUriResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.GenerateHlsUriResponse getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.GenerateHlsUriResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.GenerateHlsUriResponse build() { + com.google.cloud.visionai.v1.GenerateHlsUriResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.GenerateHlsUriResponse buildPartial() { + com.google.cloud.visionai.v1.GenerateHlsUriResponse result = + new com.google.cloud.visionai.v1.GenerateHlsUriResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.visionai.v1.GenerateHlsUriResponse result) { + if (temporalPartitionsBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + temporalPartitions_ = java.util.Collections.unmodifiableList(temporalPartitions_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.temporalPartitions_ = temporalPartitions_; + } else { + result.temporalPartitions_ = temporalPartitionsBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.visionai.v1.GenerateHlsUriResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.uri_ = uri_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.GenerateHlsUriResponse) { + return mergeFrom((com.google.cloud.visionai.v1.GenerateHlsUriResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.GenerateHlsUriResponse other) { + if (other == com.google.cloud.visionai.v1.GenerateHlsUriResponse.getDefaultInstance()) + return this; + if (!other.getUri().isEmpty()) { + uri_ = other.uri_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (temporalPartitionsBuilder_ == null) { + if (!other.temporalPartitions_.isEmpty()) { + if (temporalPartitions_.isEmpty()) { + temporalPartitions_ = other.temporalPartitions_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureTemporalPartitionsIsMutable(); + temporalPartitions_.addAll(other.temporalPartitions_); + } + onChanged(); + } + } else { + if (!other.temporalPartitions_.isEmpty()) { + if (temporalPartitionsBuilder_.isEmpty()) { + temporalPartitionsBuilder_.dispose(); + temporalPartitionsBuilder_ = null; + temporalPartitions_ = other.temporalPartitions_; + bitField0_ = (bitField0_ & ~0x00000002); + temporalPartitionsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getTemporalPartitionsFieldBuilder() + : null; + } else { + temporalPartitionsBuilder_.addAllMessages(other.temporalPartitions_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + uri_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + com.google.cloud.visionai.v1.Partition.TemporalPartition m = + input.readMessage( + com.google.cloud.visionai.v1.Partition.TemporalPartition.parser(), + extensionRegistry); + if (temporalPartitionsBuilder_ == null) { + ensureTemporalPartitionsIsMutable(); + temporalPartitions_.add(m); + } else { + temporalPartitionsBuilder_.addMessage(m); + } + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object uri_ = ""; + /** + * + * + *
+     * A signed uri to download the HLS manifest corresponding to the requested
+     * times.
+     * 
+ * + * string uri = 1; + * + * @return The uri. + */ + public java.lang.String getUri() { + java.lang.Object ref = uri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A signed uri to download the HLS manifest corresponding to the requested
+     * times.
+     * 
+ * + * string uri = 1; + * + * @return The bytes for uri. + */ + public com.google.protobuf.ByteString getUriBytes() { + java.lang.Object ref = uri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A signed uri to download the HLS manifest corresponding to the requested
+     * times.
+     * 
+ * + * string uri = 1; + * + * @param value The uri to set. + * @return This builder for chaining. + */ + public Builder setUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + uri_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * A signed uri to download the HLS manifest corresponding to the requested
+     * times.
+     * 
+ * + * string uri = 1; + * + * @return This builder for chaining. + */ + public Builder clearUri() { + uri_ = getDefaultInstance().getUri(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * A signed uri to download the HLS manifest corresponding to the requested
+     * times.
+     * 
+ * + * string uri = 1; + * + * @param value The bytes for uri to set. + * @return This builder for chaining. + */ + public Builder setUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + uri_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.util.List + temporalPartitions_ = java.util.Collections.emptyList(); + + private void ensureTemporalPartitionsIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + temporalPartitions_ = + new java.util.ArrayList( + temporalPartitions_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.visionai.v1.Partition.TemporalPartition, + com.google.cloud.visionai.v1.Partition.TemporalPartition.Builder, + com.google.cloud.visionai.v1.Partition.TemporalPartitionOrBuilder> + temporalPartitionsBuilder_; + + /** + * + * + *
+     * A list of temporal partitions of the content returned in the order they
+     * appear in the stream.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Partition.TemporalPartition temporal_partitions = 2; + * + */ + public java.util.List + getTemporalPartitionsList() { + if (temporalPartitionsBuilder_ == null) { + return java.util.Collections.unmodifiableList(temporalPartitions_); + } else { + return temporalPartitionsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * A list of temporal partitions of the content returned in the order they
+     * appear in the stream.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Partition.TemporalPartition temporal_partitions = 2; + * + */ + public int getTemporalPartitionsCount() { + if (temporalPartitionsBuilder_ == null) { + return temporalPartitions_.size(); + } else { + return temporalPartitionsBuilder_.getCount(); + } + } + /** + * + * + *
+     * A list of temporal partitions of the content returned in the order they
+     * appear in the stream.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Partition.TemporalPartition temporal_partitions = 2; + * + */ + public com.google.cloud.visionai.v1.Partition.TemporalPartition getTemporalPartitions( + int index) { + if (temporalPartitionsBuilder_ == null) { + return temporalPartitions_.get(index); + } else { + return temporalPartitionsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * A list of temporal partitions of the content returned in the order they
+     * appear in the stream.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Partition.TemporalPartition temporal_partitions = 2; + * + */ + public Builder setTemporalPartitions( + int index, com.google.cloud.visionai.v1.Partition.TemporalPartition value) { + if (temporalPartitionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTemporalPartitionsIsMutable(); + temporalPartitions_.set(index, value); + onChanged(); + } else { + temporalPartitionsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * A list of temporal partitions of the content returned in the order they
+     * appear in the stream.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Partition.TemporalPartition temporal_partitions = 2; + * + */ + public Builder setTemporalPartitions( + int index, + com.google.cloud.visionai.v1.Partition.TemporalPartition.Builder builderForValue) { + if (temporalPartitionsBuilder_ == null) { + ensureTemporalPartitionsIsMutable(); + temporalPartitions_.set(index, builderForValue.build()); + onChanged(); + } else { + temporalPartitionsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A list of temporal partitions of the content returned in the order they
+     * appear in the stream.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Partition.TemporalPartition temporal_partitions = 2; + * + */ + public Builder addTemporalPartitions( + com.google.cloud.visionai.v1.Partition.TemporalPartition value) { + if (temporalPartitionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTemporalPartitionsIsMutable(); + temporalPartitions_.add(value); + onChanged(); + } else { + temporalPartitionsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * A list of temporal partitions of the content returned in the order they
+     * appear in the stream.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Partition.TemporalPartition temporal_partitions = 2; + * + */ + public Builder addTemporalPartitions( + int index, com.google.cloud.visionai.v1.Partition.TemporalPartition value) { + if (temporalPartitionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTemporalPartitionsIsMutable(); + temporalPartitions_.add(index, value); + onChanged(); + } else { + temporalPartitionsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * A list of temporal partitions of the content returned in the order they
+     * appear in the stream.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Partition.TemporalPartition temporal_partitions = 2; + * + */ + public Builder addTemporalPartitions( + com.google.cloud.visionai.v1.Partition.TemporalPartition.Builder builderForValue) { + if (temporalPartitionsBuilder_ == null) { + ensureTemporalPartitionsIsMutable(); + temporalPartitions_.add(builderForValue.build()); + onChanged(); + } else { + temporalPartitionsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A list of temporal partitions of the content returned in the order they
+     * appear in the stream.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Partition.TemporalPartition temporal_partitions = 2; + * + */ + public Builder addTemporalPartitions( + int index, + com.google.cloud.visionai.v1.Partition.TemporalPartition.Builder builderForValue) { + if (temporalPartitionsBuilder_ == null) { + ensureTemporalPartitionsIsMutable(); + temporalPartitions_.add(index, builderForValue.build()); + onChanged(); + } else { + temporalPartitionsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A list of temporal partitions of the content returned in the order they
+     * appear in the stream.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Partition.TemporalPartition temporal_partitions = 2; + * + */ + public Builder addAllTemporalPartitions( + java.lang.Iterable + values) { + if (temporalPartitionsBuilder_ == null) { + ensureTemporalPartitionsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, temporalPartitions_); + onChanged(); + } else { + temporalPartitionsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * A list of temporal partitions of the content returned in the order they
+     * appear in the stream.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Partition.TemporalPartition temporal_partitions = 2; + * + */ + public Builder clearTemporalPartitions() { + if (temporalPartitionsBuilder_ == null) { + temporalPartitions_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + temporalPartitionsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * A list of temporal partitions of the content returned in the order they
+     * appear in the stream.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Partition.TemporalPartition temporal_partitions = 2; + * + */ + public Builder removeTemporalPartitions(int index) { + if (temporalPartitionsBuilder_ == null) { + ensureTemporalPartitionsIsMutable(); + temporalPartitions_.remove(index); + onChanged(); + } else { + temporalPartitionsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * A list of temporal partitions of the content returned in the order they
+     * appear in the stream.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Partition.TemporalPartition temporal_partitions = 2; + * + */ + public com.google.cloud.visionai.v1.Partition.TemporalPartition.Builder + getTemporalPartitionsBuilder(int index) { + return getTemporalPartitionsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * A list of temporal partitions of the content returned in the order they
+     * appear in the stream.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Partition.TemporalPartition temporal_partitions = 2; + * + */ + public com.google.cloud.visionai.v1.Partition.TemporalPartitionOrBuilder + getTemporalPartitionsOrBuilder(int index) { + if (temporalPartitionsBuilder_ == null) { + return temporalPartitions_.get(index); + } else { + return temporalPartitionsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * A list of temporal partitions of the content returned in the order they
+     * appear in the stream.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Partition.TemporalPartition temporal_partitions = 2; + * + */ + public java.util.List< + ? extends com.google.cloud.visionai.v1.Partition.TemporalPartitionOrBuilder> + getTemporalPartitionsOrBuilderList() { + if (temporalPartitionsBuilder_ != null) { + return temporalPartitionsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(temporalPartitions_); + } + } + /** + * + * + *
+     * A list of temporal partitions of the content returned in the order they
+     * appear in the stream.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Partition.TemporalPartition temporal_partitions = 2; + * + */ + public com.google.cloud.visionai.v1.Partition.TemporalPartition.Builder + addTemporalPartitionsBuilder() { + return getTemporalPartitionsFieldBuilder() + .addBuilder( + com.google.cloud.visionai.v1.Partition.TemporalPartition.getDefaultInstance()); + } + /** + * + * + *
+     * A list of temporal partitions of the content returned in the order they
+     * appear in the stream.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Partition.TemporalPartition temporal_partitions = 2; + * + */ + public com.google.cloud.visionai.v1.Partition.TemporalPartition.Builder + addTemporalPartitionsBuilder(int index) { + return getTemporalPartitionsFieldBuilder() + .addBuilder( + index, com.google.cloud.visionai.v1.Partition.TemporalPartition.getDefaultInstance()); + } + /** + * + * + *
+     * A list of temporal partitions of the content returned in the order they
+     * appear in the stream.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Partition.TemporalPartition temporal_partitions = 2; + * + */ + public java.util.List + getTemporalPartitionsBuilderList() { + return getTemporalPartitionsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.visionai.v1.Partition.TemporalPartition, + com.google.cloud.visionai.v1.Partition.TemporalPartition.Builder, + com.google.cloud.visionai.v1.Partition.TemporalPartitionOrBuilder> + getTemporalPartitionsFieldBuilder() { + if (temporalPartitionsBuilder_ == null) { + temporalPartitionsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.visionai.v1.Partition.TemporalPartition, + com.google.cloud.visionai.v1.Partition.TemporalPartition.Builder, + com.google.cloud.visionai.v1.Partition.TemporalPartitionOrBuilder>( + temporalPartitions_, + ((bitField0_ & 0x00000002) != 0), + getParentForChildren(), + isClean()); + temporalPartitions_ = null; + } + return temporalPartitionsBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.GenerateHlsUriResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.GenerateHlsUriResponse) + private static final com.google.cloud.visionai.v1.GenerateHlsUriResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.GenerateHlsUriResponse(); + } + + public static com.google.cloud.visionai.v1.GenerateHlsUriResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GenerateHlsUriResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.GenerateHlsUriResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GenerateHlsUriResponseOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GenerateHlsUriResponseOrBuilder.java new file mode 100644 index 000000000000..a834203e6152 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GenerateHlsUriResponseOrBuilder.java @@ -0,0 +1,117 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/warehouse.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface GenerateHlsUriResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.GenerateHlsUriResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * A signed uri to download the HLS manifest corresponding to the requested
+   * times.
+   * 
+ * + * string uri = 1; + * + * @return The uri. + */ + java.lang.String getUri(); + /** + * + * + *
+   * A signed uri to download the HLS manifest corresponding to the requested
+   * times.
+   * 
+ * + * string uri = 1; + * + * @return The bytes for uri. + */ + com.google.protobuf.ByteString getUriBytes(); + + /** + * + * + *
+   * A list of temporal partitions of the content returned in the order they
+   * appear in the stream.
+   * 
+ * + * repeated .google.cloud.visionai.v1.Partition.TemporalPartition temporal_partitions = 2; + * + */ + java.util.List + getTemporalPartitionsList(); + /** + * + * + *
+   * A list of temporal partitions of the content returned in the order they
+   * appear in the stream.
+   * 
+ * + * repeated .google.cloud.visionai.v1.Partition.TemporalPartition temporal_partitions = 2; + * + */ + com.google.cloud.visionai.v1.Partition.TemporalPartition getTemporalPartitions(int index); + /** + * + * + *
+   * A list of temporal partitions of the content returned in the order they
+   * appear in the stream.
+   * 
+ * + * repeated .google.cloud.visionai.v1.Partition.TemporalPartition temporal_partitions = 2; + * + */ + int getTemporalPartitionsCount(); + /** + * + * + *
+   * A list of temporal partitions of the content returned in the order they
+   * appear in the stream.
+   * 
+ * + * repeated .google.cloud.visionai.v1.Partition.TemporalPartition temporal_partitions = 2; + * + */ + java.util.List + getTemporalPartitionsOrBuilderList(); + /** + * + * + *
+   * A list of temporal partitions of the content returned in the order they
+   * appear in the stream.
+   * 
+ * + * repeated .google.cloud.visionai.v1.Partition.TemporalPartition temporal_partitions = 2; + * + */ + com.google.cloud.visionai.v1.Partition.TemporalPartitionOrBuilder getTemporalPartitionsOrBuilder( + int index); +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GenerateRetrievalUrlRequest.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GenerateRetrievalUrlRequest.java new file mode 100644 index 000000000000..e4d49b23edfd --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GenerateRetrievalUrlRequest.java @@ -0,0 +1,654 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/warehouse.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * Request message for GenerateRetrievalUrl API.
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.GenerateRetrievalUrlRequest} + */ +public final class GenerateRetrievalUrlRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.GenerateRetrievalUrlRequest) + GenerateRetrievalUrlRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GenerateRetrievalUrlRequest.newBuilder() to construct. + private GenerateRetrievalUrlRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GenerateRetrievalUrlRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GenerateRetrievalUrlRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_GenerateRetrievalUrlRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_GenerateRetrievalUrlRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.GenerateRetrievalUrlRequest.class, + com.google.cloud.visionai.v1.GenerateRetrievalUrlRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Required. The resource name of the asset to request signed url for.
+   * Format:
+   * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/assets/{asset_id}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + 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(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The resource name of the asset to request signed url for.
+   * Format:
+   * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/assets/{asset_id}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += getUnknownFields().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.visionai.v1.GenerateRetrievalUrlRequest)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.GenerateRetrievalUrlRequest other = + (com.google.cloud.visionai.v1.GenerateRetrievalUrlRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.GenerateRetrievalUrlRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.GenerateRetrievalUrlRequest 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.visionai.v1.GenerateRetrievalUrlRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.GenerateRetrievalUrlRequest 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.visionai.v1.GenerateRetrievalUrlRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.GenerateRetrievalUrlRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.GenerateRetrievalUrlRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.GenerateRetrievalUrlRequest 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.visionai.v1.GenerateRetrievalUrlRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.GenerateRetrievalUrlRequest 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.visionai.v1.GenerateRetrievalUrlRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.GenerateRetrievalUrlRequest 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.visionai.v1.GenerateRetrievalUrlRequest 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; + } + /** + * + * + *
+   * Request message for GenerateRetrievalUrl API.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.GenerateRetrievalUrlRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.GenerateRetrievalUrlRequest) + com.google.cloud.visionai.v1.GenerateRetrievalUrlRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_GenerateRetrievalUrlRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_GenerateRetrievalUrlRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.GenerateRetrievalUrlRequest.class, + com.google.cloud.visionai.v1.GenerateRetrievalUrlRequest.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.GenerateRetrievalUrlRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_GenerateRetrievalUrlRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.GenerateRetrievalUrlRequest getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.GenerateRetrievalUrlRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.GenerateRetrievalUrlRequest build() { + com.google.cloud.visionai.v1.GenerateRetrievalUrlRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.GenerateRetrievalUrlRequest buildPartial() { + com.google.cloud.visionai.v1.GenerateRetrievalUrlRequest result = + new com.google.cloud.visionai.v1.GenerateRetrievalUrlRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.visionai.v1.GenerateRetrievalUrlRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.GenerateRetrievalUrlRequest) { + return mergeFrom((com.google.cloud.visionai.v1.GenerateRetrievalUrlRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.GenerateRetrievalUrlRequest other) { + if (other == com.google.cloud.visionai.v1.GenerateRetrievalUrlRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. The resource name of the asset to request signed url for.
+     * Format:
+     * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/assets/{asset_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The resource name of the asset to request signed url for.
+     * Format:
+     * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/assets/{asset_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The resource name of the asset to request signed url for.
+     * Format:
+     * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/assets/{asset_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the asset to request signed url for.
+     * Format:
+     * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/assets/{asset_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the asset to request signed url for.
+     * Format:
+     * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/assets/{asset_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.GenerateRetrievalUrlRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.GenerateRetrievalUrlRequest) + private static final com.google.cloud.visionai.v1.GenerateRetrievalUrlRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.GenerateRetrievalUrlRequest(); + } + + public static com.google.cloud.visionai.v1.GenerateRetrievalUrlRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GenerateRetrievalUrlRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.GenerateRetrievalUrlRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GenerateRetrievalUrlRequestOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GenerateRetrievalUrlRequestOrBuilder.java new file mode 100644 index 000000000000..ca09634b4f2a --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GenerateRetrievalUrlRequestOrBuilder.java @@ -0,0 +1,59 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/warehouse.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface GenerateRetrievalUrlRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.GenerateRetrievalUrlRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The resource name of the asset to request signed url for.
+   * Format:
+   * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/assets/{asset_id}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The resource name of the asset to request signed url for.
+   * Format:
+   * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/assets/{asset_id}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GenerateRetrievalUrlResponse.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GenerateRetrievalUrlResponse.java new file mode 100644 index 000000000000..d53c8203f85d --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GenerateRetrievalUrlResponse.java @@ -0,0 +1,626 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/warehouse.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * Response message for GenerateRetrievalUrl API.
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.GenerateRetrievalUrlResponse} + */ +public final class GenerateRetrievalUrlResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.GenerateRetrievalUrlResponse) + GenerateRetrievalUrlResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use GenerateRetrievalUrlResponse.newBuilder() to construct. + private GenerateRetrievalUrlResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GenerateRetrievalUrlResponse() { + signedUri_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GenerateRetrievalUrlResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_GenerateRetrievalUrlResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_GenerateRetrievalUrlResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.GenerateRetrievalUrlResponse.class, + com.google.cloud.visionai.v1.GenerateRetrievalUrlResponse.Builder.class); + } + + public static final int SIGNED_URI_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object signedUri_ = ""; + /** + * + * + *
+   * A signed url to download the content of the asset.
+   * 
+ * + * string signed_uri = 1; + * + * @return The signedUri. + */ + @java.lang.Override + public java.lang.String getSignedUri() { + java.lang.Object ref = signedUri_; + 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(); + signedUri_ = s; + return s; + } + } + /** + * + * + *
+   * A signed url to download the content of the asset.
+   * 
+ * + * string signed_uri = 1; + * + * @return The bytes for signedUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSignedUriBytes() { + java.lang.Object ref = signedUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + signedUri_ = 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(signedUri_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, signedUri_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(signedUri_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, signedUri_); + } + size += getUnknownFields().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.visionai.v1.GenerateRetrievalUrlResponse)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.GenerateRetrievalUrlResponse other = + (com.google.cloud.visionai.v1.GenerateRetrievalUrlResponse) obj; + + if (!getSignedUri().equals(other.getSignedUri())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + SIGNED_URI_FIELD_NUMBER; + hash = (53 * hash) + getSignedUri().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.GenerateRetrievalUrlResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.GenerateRetrievalUrlResponse 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.visionai.v1.GenerateRetrievalUrlResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.GenerateRetrievalUrlResponse 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.visionai.v1.GenerateRetrievalUrlResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.GenerateRetrievalUrlResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.GenerateRetrievalUrlResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.GenerateRetrievalUrlResponse 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.visionai.v1.GenerateRetrievalUrlResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.GenerateRetrievalUrlResponse 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.visionai.v1.GenerateRetrievalUrlResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.GenerateRetrievalUrlResponse 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.visionai.v1.GenerateRetrievalUrlResponse 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; + } + /** + * + * + *
+   * Response message for GenerateRetrievalUrl API.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.GenerateRetrievalUrlResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.GenerateRetrievalUrlResponse) + com.google.cloud.visionai.v1.GenerateRetrievalUrlResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_GenerateRetrievalUrlResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_GenerateRetrievalUrlResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.GenerateRetrievalUrlResponse.class, + com.google.cloud.visionai.v1.GenerateRetrievalUrlResponse.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.GenerateRetrievalUrlResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + signedUri_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_GenerateRetrievalUrlResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.GenerateRetrievalUrlResponse getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.GenerateRetrievalUrlResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.GenerateRetrievalUrlResponse build() { + com.google.cloud.visionai.v1.GenerateRetrievalUrlResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.GenerateRetrievalUrlResponse buildPartial() { + com.google.cloud.visionai.v1.GenerateRetrievalUrlResponse result = + new com.google.cloud.visionai.v1.GenerateRetrievalUrlResponse(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.visionai.v1.GenerateRetrievalUrlResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.signedUri_ = signedUri_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.GenerateRetrievalUrlResponse) { + return mergeFrom((com.google.cloud.visionai.v1.GenerateRetrievalUrlResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.GenerateRetrievalUrlResponse other) { + if (other == com.google.cloud.visionai.v1.GenerateRetrievalUrlResponse.getDefaultInstance()) + return this; + if (!other.getSignedUri().isEmpty()) { + signedUri_ = other.signedUri_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + signedUri_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object signedUri_ = ""; + /** + * + * + *
+     * A signed url to download the content of the asset.
+     * 
+ * + * string signed_uri = 1; + * + * @return The signedUri. + */ + public java.lang.String getSignedUri() { + java.lang.Object ref = signedUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + signedUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A signed url to download the content of the asset.
+     * 
+ * + * string signed_uri = 1; + * + * @return The bytes for signedUri. + */ + public com.google.protobuf.ByteString getSignedUriBytes() { + java.lang.Object ref = signedUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + signedUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A signed url to download the content of the asset.
+     * 
+ * + * string signed_uri = 1; + * + * @param value The signedUri to set. + * @return This builder for chaining. + */ + public Builder setSignedUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + signedUri_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * A signed url to download the content of the asset.
+     * 
+ * + * string signed_uri = 1; + * + * @return This builder for chaining. + */ + public Builder clearSignedUri() { + signedUri_ = getDefaultInstance().getSignedUri(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * A signed url to download the content of the asset.
+     * 
+ * + * string signed_uri = 1; + * + * @param value The bytes for signedUri to set. + * @return This builder for chaining. + */ + public Builder setSignedUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + signedUri_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.GenerateRetrievalUrlResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.GenerateRetrievalUrlResponse) + private static final com.google.cloud.visionai.v1.GenerateRetrievalUrlResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.GenerateRetrievalUrlResponse(); + } + + public static com.google.cloud.visionai.v1.GenerateRetrievalUrlResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GenerateRetrievalUrlResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.GenerateRetrievalUrlResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GenerateRetrievalUrlResponseOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GenerateRetrievalUrlResponseOrBuilder.java new file mode 100644 index 000000000000..cd565e966f3b --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GenerateRetrievalUrlResponseOrBuilder.java @@ -0,0 +1,51 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/warehouse.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface GenerateRetrievalUrlResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.GenerateRetrievalUrlResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * A signed url to download the content of the asset.
+   * 
+ * + * string signed_uri = 1; + * + * @return The signedUri. + */ + java.lang.String getSignedUri(); + /** + * + * + *
+   * A signed url to download the content of the asset.
+   * 
+ * + * string signed_uri = 1; + * + * @return The bytes for signedUri. + */ + com.google.protobuf.ByteString getSignedUriBytes(); +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GenerateStreamHlsTokenRequest.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GenerateStreamHlsTokenRequest.java new file mode 100644 index 000000000000..5c76290c4e2f --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GenerateStreamHlsTokenRequest.java @@ -0,0 +1,626 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/streams_service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * Request message for getting the auth token to access the stream HLS contents.
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.GenerateStreamHlsTokenRequest} + */ +public final class GenerateStreamHlsTokenRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.GenerateStreamHlsTokenRequest) + GenerateStreamHlsTokenRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GenerateStreamHlsTokenRequest.newBuilder() to construct. + private GenerateStreamHlsTokenRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GenerateStreamHlsTokenRequest() { + stream_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GenerateStreamHlsTokenRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.StreamsServiceProto + .internal_static_google_cloud_visionai_v1_GenerateStreamHlsTokenRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.StreamsServiceProto + .internal_static_google_cloud_visionai_v1_GenerateStreamHlsTokenRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.GenerateStreamHlsTokenRequest.class, + com.google.cloud.visionai.v1.GenerateStreamHlsTokenRequest.Builder.class); + } + + public static final int STREAM_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object stream_ = ""; + /** + * + * + *
+   * Required. The name of the stream.
+   * 
+ * + * string stream = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The stream. + */ + @java.lang.Override + public java.lang.String getStream() { + java.lang.Object ref = stream_; + 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(); + stream_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The name of the stream.
+   * 
+ * + * string stream = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for stream. + */ + @java.lang.Override + public com.google.protobuf.ByteString getStreamBytes() { + java.lang.Object ref = stream_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + stream_ = 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(stream_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, stream_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(stream_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, stream_); + } + size += getUnknownFields().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.visionai.v1.GenerateStreamHlsTokenRequest)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.GenerateStreamHlsTokenRequest other = + (com.google.cloud.visionai.v1.GenerateStreamHlsTokenRequest) obj; + + if (!getStream().equals(other.getStream())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + STREAM_FIELD_NUMBER; + hash = (53 * hash) + getStream().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.GenerateStreamHlsTokenRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.GenerateStreamHlsTokenRequest 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.visionai.v1.GenerateStreamHlsTokenRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.GenerateStreamHlsTokenRequest 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.visionai.v1.GenerateStreamHlsTokenRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.GenerateStreamHlsTokenRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.GenerateStreamHlsTokenRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.GenerateStreamHlsTokenRequest 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.visionai.v1.GenerateStreamHlsTokenRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.GenerateStreamHlsTokenRequest 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.visionai.v1.GenerateStreamHlsTokenRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.GenerateStreamHlsTokenRequest 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.visionai.v1.GenerateStreamHlsTokenRequest 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; + } + /** + * + * + *
+   * Request message for getting the auth token to access the stream HLS contents.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.GenerateStreamHlsTokenRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.GenerateStreamHlsTokenRequest) + com.google.cloud.visionai.v1.GenerateStreamHlsTokenRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.StreamsServiceProto + .internal_static_google_cloud_visionai_v1_GenerateStreamHlsTokenRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.StreamsServiceProto + .internal_static_google_cloud_visionai_v1_GenerateStreamHlsTokenRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.GenerateStreamHlsTokenRequest.class, + com.google.cloud.visionai.v1.GenerateStreamHlsTokenRequest.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.GenerateStreamHlsTokenRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + stream_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.StreamsServiceProto + .internal_static_google_cloud_visionai_v1_GenerateStreamHlsTokenRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.GenerateStreamHlsTokenRequest getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.GenerateStreamHlsTokenRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.GenerateStreamHlsTokenRequest build() { + com.google.cloud.visionai.v1.GenerateStreamHlsTokenRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.GenerateStreamHlsTokenRequest buildPartial() { + com.google.cloud.visionai.v1.GenerateStreamHlsTokenRequest result = + new com.google.cloud.visionai.v1.GenerateStreamHlsTokenRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.visionai.v1.GenerateStreamHlsTokenRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.stream_ = stream_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.GenerateStreamHlsTokenRequest) { + return mergeFrom((com.google.cloud.visionai.v1.GenerateStreamHlsTokenRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.GenerateStreamHlsTokenRequest other) { + if (other == com.google.cloud.visionai.v1.GenerateStreamHlsTokenRequest.getDefaultInstance()) + return this; + if (!other.getStream().isEmpty()) { + stream_ = other.stream_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + stream_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object stream_ = ""; + /** + * + * + *
+     * Required. The name of the stream.
+     * 
+ * + * string stream = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The stream. + */ + public java.lang.String getStream() { + java.lang.Object ref = stream_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + stream_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The name of the stream.
+     * 
+ * + * string stream = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for stream. + */ + public com.google.protobuf.ByteString getStreamBytes() { + java.lang.Object ref = stream_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + stream_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The name of the stream.
+     * 
+ * + * string stream = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The stream to set. + * @return This builder for chaining. + */ + public Builder setStream(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + stream_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the stream.
+     * 
+ * + * string stream = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearStream() { + stream_ = getDefaultInstance().getStream(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the stream.
+     * 
+ * + * string stream = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for stream to set. + * @return This builder for chaining. + */ + public Builder setStreamBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + stream_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.GenerateStreamHlsTokenRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.GenerateStreamHlsTokenRequest) + private static final com.google.cloud.visionai.v1.GenerateStreamHlsTokenRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.GenerateStreamHlsTokenRequest(); + } + + public static com.google.cloud.visionai.v1.GenerateStreamHlsTokenRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GenerateStreamHlsTokenRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.GenerateStreamHlsTokenRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GenerateStreamHlsTokenRequestOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GenerateStreamHlsTokenRequestOrBuilder.java new file mode 100644 index 000000000000..4bb33cf37147 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GenerateStreamHlsTokenRequestOrBuilder.java @@ -0,0 +1,51 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/streams_service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface GenerateStreamHlsTokenRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.GenerateStreamHlsTokenRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the stream.
+   * 
+ * + * string stream = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The stream. + */ + java.lang.String getStream(); + /** + * + * + *
+   * Required. The name of the stream.
+   * 
+ * + * string stream = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for stream. + */ + com.google.protobuf.ByteString getStreamBytes(); +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GenerateStreamHlsTokenResponse.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GenerateStreamHlsTokenResponse.java new file mode 100644 index 000000000000..42dafc0d121c --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GenerateStreamHlsTokenResponse.java @@ -0,0 +1,942 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/streams_service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * Response message for GenerateStreamHlsToken.
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.GenerateStreamHlsTokenResponse} + */ +public final class GenerateStreamHlsTokenResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.GenerateStreamHlsTokenResponse) + GenerateStreamHlsTokenResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use GenerateStreamHlsTokenResponse.newBuilder() to construct. + private GenerateStreamHlsTokenResponse( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GenerateStreamHlsTokenResponse() { + token_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GenerateStreamHlsTokenResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.StreamsServiceProto + .internal_static_google_cloud_visionai_v1_GenerateStreamHlsTokenResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.StreamsServiceProto + .internal_static_google_cloud_visionai_v1_GenerateStreamHlsTokenResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.GenerateStreamHlsTokenResponse.class, + com.google.cloud.visionai.v1.GenerateStreamHlsTokenResponse.Builder.class); + } + + private int bitField0_; + public static final int TOKEN_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object token_ = ""; + /** + * + * + *
+   * The generated JWT token.
+   *
+   * The caller should insert this token to the authorization header of the HTTP
+   * requests to get the HLS playlist manifest and the video chunks.
+   * eg: curl -H "Authorization: Bearer $TOKEN"
+   *     https://domain.com/test-stream.playback/master.m3u8
+   * 
+ * + * string token = 1; + * + * @return The token. + */ + @java.lang.Override + public java.lang.String getToken() { + java.lang.Object ref = token_; + 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(); + token_ = s; + return s; + } + } + /** + * + * + *
+   * The generated JWT token.
+   *
+   * The caller should insert this token to the authorization header of the HTTP
+   * requests to get the HLS playlist manifest and the video chunks.
+   * eg: curl -H "Authorization: Bearer $TOKEN"
+   *     https://domain.com/test-stream.playback/master.m3u8
+   * 
+ * + * string token = 1; + * + * @return The bytes for token. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTokenBytes() { + java.lang.Object ref = token_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + token_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int EXPIRATION_TIME_FIELD_NUMBER = 2; + private com.google.protobuf.Timestamp expirationTime_; + /** + * + * + *
+   * The expiration time of the token.
+   * 
+ * + * .google.protobuf.Timestamp expiration_time = 2; + * + * @return Whether the expirationTime field is set. + */ + @java.lang.Override + public boolean hasExpirationTime() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * The expiration time of the token.
+   * 
+ * + * .google.protobuf.Timestamp expiration_time = 2; + * + * @return The expirationTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getExpirationTime() { + return expirationTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : expirationTime_; + } + /** + * + * + *
+   * The expiration time of the token.
+   * 
+ * + * .google.protobuf.Timestamp expiration_time = 2; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getExpirationTimeOrBuilder() { + return expirationTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : expirationTime_; + } + + 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(token_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, token_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getExpirationTime()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(token_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, token_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getExpirationTime()); + } + size += getUnknownFields().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.visionai.v1.GenerateStreamHlsTokenResponse)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.GenerateStreamHlsTokenResponse other = + (com.google.cloud.visionai.v1.GenerateStreamHlsTokenResponse) obj; + + if (!getToken().equals(other.getToken())) return false; + if (hasExpirationTime() != other.hasExpirationTime()) return false; + if (hasExpirationTime()) { + if (!getExpirationTime().equals(other.getExpirationTime())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getToken().hashCode(); + if (hasExpirationTime()) { + hash = (37 * hash) + EXPIRATION_TIME_FIELD_NUMBER; + hash = (53 * hash) + getExpirationTime().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.GenerateStreamHlsTokenResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.GenerateStreamHlsTokenResponse 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.visionai.v1.GenerateStreamHlsTokenResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.GenerateStreamHlsTokenResponse 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.visionai.v1.GenerateStreamHlsTokenResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.GenerateStreamHlsTokenResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.GenerateStreamHlsTokenResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.GenerateStreamHlsTokenResponse 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.visionai.v1.GenerateStreamHlsTokenResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.GenerateStreamHlsTokenResponse 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.visionai.v1.GenerateStreamHlsTokenResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.GenerateStreamHlsTokenResponse 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.visionai.v1.GenerateStreamHlsTokenResponse 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; + } + /** + * + * + *
+   * Response message for GenerateStreamHlsToken.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.GenerateStreamHlsTokenResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.GenerateStreamHlsTokenResponse) + com.google.cloud.visionai.v1.GenerateStreamHlsTokenResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.StreamsServiceProto + .internal_static_google_cloud_visionai_v1_GenerateStreamHlsTokenResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.StreamsServiceProto + .internal_static_google_cloud_visionai_v1_GenerateStreamHlsTokenResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.GenerateStreamHlsTokenResponse.class, + com.google.cloud.visionai.v1.GenerateStreamHlsTokenResponse.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.GenerateStreamHlsTokenResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getExpirationTimeFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + token_ = ""; + expirationTime_ = null; + if (expirationTimeBuilder_ != null) { + expirationTimeBuilder_.dispose(); + expirationTimeBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.StreamsServiceProto + .internal_static_google_cloud_visionai_v1_GenerateStreamHlsTokenResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.GenerateStreamHlsTokenResponse getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.GenerateStreamHlsTokenResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.GenerateStreamHlsTokenResponse build() { + com.google.cloud.visionai.v1.GenerateStreamHlsTokenResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.GenerateStreamHlsTokenResponse buildPartial() { + com.google.cloud.visionai.v1.GenerateStreamHlsTokenResponse result = + new com.google.cloud.visionai.v1.GenerateStreamHlsTokenResponse(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.visionai.v1.GenerateStreamHlsTokenResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.token_ = token_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.expirationTime_ = + expirationTimeBuilder_ == null ? expirationTime_ : expirationTimeBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.GenerateStreamHlsTokenResponse) { + return mergeFrom((com.google.cloud.visionai.v1.GenerateStreamHlsTokenResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.GenerateStreamHlsTokenResponse other) { + if (other == com.google.cloud.visionai.v1.GenerateStreamHlsTokenResponse.getDefaultInstance()) + return this; + if (!other.getToken().isEmpty()) { + token_ = other.token_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasExpirationTime()) { + mergeExpirationTime(other.getExpirationTime()); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + token_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage(getExpirationTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object token_ = ""; + /** + * + * + *
+     * The generated JWT token.
+     *
+     * The caller should insert this token to the authorization header of the HTTP
+     * requests to get the HLS playlist manifest and the video chunks.
+     * eg: curl -H "Authorization: Bearer $TOKEN"
+     *     https://domain.com/test-stream.playback/master.m3u8
+     * 
+ * + * string token = 1; + * + * @return The token. + */ + public java.lang.String getToken() { + java.lang.Object ref = token_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + token_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The generated JWT token.
+     *
+     * The caller should insert this token to the authorization header of the HTTP
+     * requests to get the HLS playlist manifest and the video chunks.
+     * eg: curl -H "Authorization: Bearer $TOKEN"
+     *     https://domain.com/test-stream.playback/master.m3u8
+     * 
+ * + * string token = 1; + * + * @return The bytes for token. + */ + public com.google.protobuf.ByteString getTokenBytes() { + java.lang.Object ref = token_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + token_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The generated JWT token.
+     *
+     * The caller should insert this token to the authorization header of the HTTP
+     * requests to get the HLS playlist manifest and the video chunks.
+     * eg: curl -H "Authorization: Bearer $TOKEN"
+     *     https://domain.com/test-stream.playback/master.m3u8
+     * 
+ * + * string token = 1; + * + * @param value The token to set. + * @return This builder for chaining. + */ + public Builder setToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + token_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The generated JWT token.
+     *
+     * The caller should insert this token to the authorization header of the HTTP
+     * requests to get the HLS playlist manifest and the video chunks.
+     * eg: curl -H "Authorization: Bearer $TOKEN"
+     *     https://domain.com/test-stream.playback/master.m3u8
+     * 
+ * + * string token = 1; + * + * @return This builder for chaining. + */ + public Builder clearToken() { + token_ = getDefaultInstance().getToken(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * The generated JWT token.
+     *
+     * The caller should insert this token to the authorization header of the HTTP
+     * requests to get the HLS playlist manifest and the video chunks.
+     * eg: curl -H "Authorization: Bearer $TOKEN"
+     *     https://domain.com/test-stream.playback/master.m3u8
+     * 
+ * + * string token = 1; + * + * @param value The bytes for token to set. + * @return This builder for chaining. + */ + public Builder setTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + token_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp expirationTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + expirationTimeBuilder_; + /** + * + * + *
+     * The expiration time of the token.
+     * 
+ * + * .google.protobuf.Timestamp expiration_time = 2; + * + * @return Whether the expirationTime field is set. + */ + public boolean hasExpirationTime() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * The expiration time of the token.
+     * 
+ * + * .google.protobuf.Timestamp expiration_time = 2; + * + * @return The expirationTime. + */ + public com.google.protobuf.Timestamp getExpirationTime() { + if (expirationTimeBuilder_ == null) { + return expirationTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : expirationTime_; + } else { + return expirationTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The expiration time of the token.
+     * 
+ * + * .google.protobuf.Timestamp expiration_time = 2; + */ + public Builder setExpirationTime(com.google.protobuf.Timestamp value) { + if (expirationTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + expirationTime_ = value; + } else { + expirationTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * The expiration time of the token.
+     * 
+ * + * .google.protobuf.Timestamp expiration_time = 2; + */ + public Builder setExpirationTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (expirationTimeBuilder_ == null) { + expirationTime_ = builderForValue.build(); + } else { + expirationTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * The expiration time of the token.
+     * 
+ * + * .google.protobuf.Timestamp expiration_time = 2; + */ + public Builder mergeExpirationTime(com.google.protobuf.Timestamp value) { + if (expirationTimeBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && expirationTime_ != null + && expirationTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getExpirationTimeBuilder().mergeFrom(value); + } else { + expirationTime_ = value; + } + } else { + expirationTimeBuilder_.mergeFrom(value); + } + if (expirationTime_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + /** + * + * + *
+     * The expiration time of the token.
+     * 
+ * + * .google.protobuf.Timestamp expiration_time = 2; + */ + public Builder clearExpirationTime() { + bitField0_ = (bitField0_ & ~0x00000002); + expirationTime_ = null; + if (expirationTimeBuilder_ != null) { + expirationTimeBuilder_.dispose(); + expirationTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * The expiration time of the token.
+     * 
+ * + * .google.protobuf.Timestamp expiration_time = 2; + */ + public com.google.protobuf.Timestamp.Builder getExpirationTimeBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getExpirationTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The expiration time of the token.
+     * 
+ * + * .google.protobuf.Timestamp expiration_time = 2; + */ + public com.google.protobuf.TimestampOrBuilder getExpirationTimeOrBuilder() { + if (expirationTimeBuilder_ != null) { + return expirationTimeBuilder_.getMessageOrBuilder(); + } else { + return expirationTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : expirationTime_; + } + } + /** + * + * + *
+     * The expiration time of the token.
+     * 
+ * + * .google.protobuf.Timestamp expiration_time = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getExpirationTimeFieldBuilder() { + if (expirationTimeBuilder_ == null) { + expirationTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getExpirationTime(), getParentForChildren(), isClean()); + expirationTime_ = null; + } + return expirationTimeBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.GenerateStreamHlsTokenResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.GenerateStreamHlsTokenResponse) + private static final com.google.cloud.visionai.v1.GenerateStreamHlsTokenResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.GenerateStreamHlsTokenResponse(); + } + + public static com.google.cloud.visionai.v1.GenerateStreamHlsTokenResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GenerateStreamHlsTokenResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.GenerateStreamHlsTokenResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GenerateStreamHlsTokenResponseOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GenerateStreamHlsTokenResponseOrBuilder.java new file mode 100644 index 000000000000..bf027ad8d718 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GenerateStreamHlsTokenResponseOrBuilder.java @@ -0,0 +1,96 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/streams_service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface GenerateStreamHlsTokenResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.GenerateStreamHlsTokenResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The generated JWT token.
+   *
+   * The caller should insert this token to the authorization header of the HTTP
+   * requests to get the HLS playlist manifest and the video chunks.
+   * eg: curl -H "Authorization: Bearer $TOKEN"
+   *     https://domain.com/test-stream.playback/master.m3u8
+   * 
+ * + * string token = 1; + * + * @return The token. + */ + java.lang.String getToken(); + /** + * + * + *
+   * The generated JWT token.
+   *
+   * The caller should insert this token to the authorization header of the HTTP
+   * requests to get the HLS playlist manifest and the video chunks.
+   * eg: curl -H "Authorization: Bearer $TOKEN"
+   *     https://domain.com/test-stream.playback/master.m3u8
+   * 
+ * + * string token = 1; + * + * @return The bytes for token. + */ + com.google.protobuf.ByteString getTokenBytes(); + + /** + * + * + *
+   * The expiration time of the token.
+   * 
+ * + * .google.protobuf.Timestamp expiration_time = 2; + * + * @return Whether the expirationTime field is set. + */ + boolean hasExpirationTime(); + /** + * + * + *
+   * The expiration time of the token.
+   * 
+ * + * .google.protobuf.Timestamp expiration_time = 2; + * + * @return The expirationTime. + */ + com.google.protobuf.Timestamp getExpirationTime(); + /** + * + * + *
+   * The expiration time of the token.
+   * 
+ * + * .google.protobuf.Timestamp expiration_time = 2; + */ + com.google.protobuf.TimestampOrBuilder getExpirationTimeOrBuilder(); +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GeoCoordinate.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GeoCoordinate.java new file mode 100644 index 000000000000..b8d7e8eecc23 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GeoCoordinate.java @@ -0,0 +1,635 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/warehouse.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * Location Coordinate Representation
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.GeoCoordinate} + */ +public final class GeoCoordinate extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.GeoCoordinate) + GeoCoordinateOrBuilder { + private static final long serialVersionUID = 0L; + // Use GeoCoordinate.newBuilder() to construct. + private GeoCoordinate(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GeoCoordinate() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GeoCoordinate(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_GeoCoordinate_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_GeoCoordinate_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.GeoCoordinate.class, + com.google.cloud.visionai.v1.GeoCoordinate.Builder.class); + } + + public static final int LATITUDE_FIELD_NUMBER = 1; + private double latitude_ = 0D; + /** + * + * + *
+   * Latitude Coordinate. Degrees [-90 .. 90]
+   * 
+ * + * double latitude = 1; + * + * @return The latitude. + */ + @java.lang.Override + public double getLatitude() { + return latitude_; + } + + public static final int LONGITUDE_FIELD_NUMBER = 2; + private double longitude_ = 0D; + /** + * + * + *
+   * Longitude Coordinate. Degrees [-180 .. 180]
+   * 
+ * + * double longitude = 2; + * + * @return The longitude. + */ + @java.lang.Override + public double getLongitude() { + return longitude_; + } + + 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 (java.lang.Double.doubleToRawLongBits(latitude_) != 0) { + output.writeDouble(1, latitude_); + } + if (java.lang.Double.doubleToRawLongBits(longitude_) != 0) { + output.writeDouble(2, longitude_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (java.lang.Double.doubleToRawLongBits(latitude_) != 0) { + size += com.google.protobuf.CodedOutputStream.computeDoubleSize(1, latitude_); + } + if (java.lang.Double.doubleToRawLongBits(longitude_) != 0) { + size += com.google.protobuf.CodedOutputStream.computeDoubleSize(2, longitude_); + } + size += getUnknownFields().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.visionai.v1.GeoCoordinate)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.GeoCoordinate other = + (com.google.cloud.visionai.v1.GeoCoordinate) obj; + + if (java.lang.Double.doubleToLongBits(getLatitude()) + != java.lang.Double.doubleToLongBits(other.getLatitude())) return false; + if (java.lang.Double.doubleToLongBits(getLongitude()) + != java.lang.Double.doubleToLongBits(other.getLongitude())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + LATITUDE_FIELD_NUMBER; + hash = + (53 * hash) + + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getLatitude())); + hash = (37 * hash) + LONGITUDE_FIELD_NUMBER; + hash = + (53 * hash) + + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getLongitude())); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.GeoCoordinate parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.GeoCoordinate 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.visionai.v1.GeoCoordinate parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.GeoCoordinate 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.visionai.v1.GeoCoordinate parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.GeoCoordinate parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.GeoCoordinate parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.GeoCoordinate 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.visionai.v1.GeoCoordinate parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.GeoCoordinate 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.visionai.v1.GeoCoordinate parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.GeoCoordinate 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.visionai.v1.GeoCoordinate 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; + } + /** + * + * + *
+   * Location Coordinate Representation
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.GeoCoordinate} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.GeoCoordinate) + com.google.cloud.visionai.v1.GeoCoordinateOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_GeoCoordinate_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_GeoCoordinate_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.GeoCoordinate.class, + com.google.cloud.visionai.v1.GeoCoordinate.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.GeoCoordinate.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + latitude_ = 0D; + longitude_ = 0D; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_GeoCoordinate_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.GeoCoordinate getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.GeoCoordinate.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.GeoCoordinate build() { + com.google.cloud.visionai.v1.GeoCoordinate result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.GeoCoordinate buildPartial() { + com.google.cloud.visionai.v1.GeoCoordinate result = + new com.google.cloud.visionai.v1.GeoCoordinate(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.visionai.v1.GeoCoordinate result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.latitude_ = latitude_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.longitude_ = longitude_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.GeoCoordinate) { + return mergeFrom((com.google.cloud.visionai.v1.GeoCoordinate) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.GeoCoordinate other) { + if (other == com.google.cloud.visionai.v1.GeoCoordinate.getDefaultInstance()) return this; + if (other.getLatitude() != 0D) { + setLatitude(other.getLatitude()); + } + if (other.getLongitude() != 0D) { + setLongitude(other.getLongitude()); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 9: + { + latitude_ = input.readDouble(); + bitField0_ |= 0x00000001; + break; + } // case 9 + case 17: + { + longitude_ = input.readDouble(); + bitField0_ |= 0x00000002; + break; + } // case 17 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private double latitude_; + /** + * + * + *
+     * Latitude Coordinate. Degrees [-90 .. 90]
+     * 
+ * + * double latitude = 1; + * + * @return The latitude. + */ + @java.lang.Override + public double getLatitude() { + return latitude_; + } + /** + * + * + *
+     * Latitude Coordinate. Degrees [-90 .. 90]
+     * 
+ * + * double latitude = 1; + * + * @param value The latitude to set. + * @return This builder for chaining. + */ + public Builder setLatitude(double value) { + + latitude_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Latitude Coordinate. Degrees [-90 .. 90]
+     * 
+ * + * double latitude = 1; + * + * @return This builder for chaining. + */ + public Builder clearLatitude() { + bitField0_ = (bitField0_ & ~0x00000001); + latitude_ = 0D; + onChanged(); + return this; + } + + private double longitude_; + /** + * + * + *
+     * Longitude Coordinate. Degrees [-180 .. 180]
+     * 
+ * + * double longitude = 2; + * + * @return The longitude. + */ + @java.lang.Override + public double getLongitude() { + return longitude_; + } + /** + * + * + *
+     * Longitude Coordinate. Degrees [-180 .. 180]
+     * 
+ * + * double longitude = 2; + * + * @param value The longitude to set. + * @return This builder for chaining. + */ + public Builder setLongitude(double value) { + + longitude_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Longitude Coordinate. Degrees [-180 .. 180]
+     * 
+ * + * double longitude = 2; + * + * @return This builder for chaining. + */ + public Builder clearLongitude() { + bitField0_ = (bitField0_ & ~0x00000002); + longitude_ = 0D; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.GeoCoordinate) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.GeoCoordinate) + private static final com.google.cloud.visionai.v1.GeoCoordinate DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.GeoCoordinate(); + } + + public static com.google.cloud.visionai.v1.GeoCoordinate getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GeoCoordinate parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.GeoCoordinate getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GeoCoordinateOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GeoCoordinateOrBuilder.java new file mode 100644 index 000000000000..a1c0bb14d29a --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GeoCoordinateOrBuilder.java @@ -0,0 +1,52 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/warehouse.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface GeoCoordinateOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.GeoCoordinate) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Latitude Coordinate. Degrees [-90 .. 90]
+   * 
+ * + * double latitude = 1; + * + * @return The latitude. + */ + double getLatitude(); + + /** + * + * + *
+   * Longitude Coordinate. Degrees [-180 .. 180]
+   * 
+ * + * double longitude = 2; + * + * @return The longitude. + */ + double getLongitude(); +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GeoLocationArray.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GeoLocationArray.java new file mode 100644 index 000000000000..fa9d952da5a6 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GeoLocationArray.java @@ -0,0 +1,935 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/warehouse.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * A list of locations.
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.GeoLocationArray} + */ +public final class GeoLocationArray extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.GeoLocationArray) + GeoLocationArrayOrBuilder { + private static final long serialVersionUID = 0L; + // Use GeoLocationArray.newBuilder() to construct. + private GeoLocationArray(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GeoLocationArray() { + circleAreas_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GeoLocationArray(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_GeoLocationArray_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_GeoLocationArray_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.GeoLocationArray.class, + com.google.cloud.visionai.v1.GeoLocationArray.Builder.class); + } + + public static final int CIRCLE_AREAS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List circleAreas_; + /** + * + * + *
+   * A list of circle areas.
+   * 
+ * + * repeated .google.cloud.visionai.v1.CircleArea circle_areas = 1; + */ + @java.lang.Override + public java.util.List getCircleAreasList() { + return circleAreas_; + } + /** + * + * + *
+   * A list of circle areas.
+   * 
+ * + * repeated .google.cloud.visionai.v1.CircleArea circle_areas = 1; + */ + @java.lang.Override + public java.util.List + getCircleAreasOrBuilderList() { + return circleAreas_; + } + /** + * + * + *
+   * A list of circle areas.
+   * 
+ * + * repeated .google.cloud.visionai.v1.CircleArea circle_areas = 1; + */ + @java.lang.Override + public int getCircleAreasCount() { + return circleAreas_.size(); + } + /** + * + * + *
+   * A list of circle areas.
+   * 
+ * + * repeated .google.cloud.visionai.v1.CircleArea circle_areas = 1; + */ + @java.lang.Override + public com.google.cloud.visionai.v1.CircleArea getCircleAreas(int index) { + return circleAreas_.get(index); + } + /** + * + * + *
+   * A list of circle areas.
+   * 
+ * + * repeated .google.cloud.visionai.v1.CircleArea circle_areas = 1; + */ + @java.lang.Override + public com.google.cloud.visionai.v1.CircleAreaOrBuilder getCircleAreasOrBuilder(int index) { + return circleAreas_.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 < circleAreas_.size(); i++) { + output.writeMessage(1, circleAreas_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < circleAreas_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, circleAreas_.get(i)); + } + size += getUnknownFields().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.visionai.v1.GeoLocationArray)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.GeoLocationArray other = + (com.google.cloud.visionai.v1.GeoLocationArray) obj; + + if (!getCircleAreasList().equals(other.getCircleAreasList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getCircleAreasCount() > 0) { + hash = (37 * hash) + CIRCLE_AREAS_FIELD_NUMBER; + hash = (53 * hash) + getCircleAreasList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.GeoLocationArray parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.GeoLocationArray 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.visionai.v1.GeoLocationArray parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.GeoLocationArray 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.visionai.v1.GeoLocationArray parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.GeoLocationArray parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.GeoLocationArray parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.GeoLocationArray 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.visionai.v1.GeoLocationArray parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.GeoLocationArray 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.visionai.v1.GeoLocationArray parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.GeoLocationArray 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.visionai.v1.GeoLocationArray 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 list of locations.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.GeoLocationArray} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.GeoLocationArray) + com.google.cloud.visionai.v1.GeoLocationArrayOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_GeoLocationArray_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_GeoLocationArray_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.GeoLocationArray.class, + com.google.cloud.visionai.v1.GeoLocationArray.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.GeoLocationArray.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (circleAreasBuilder_ == null) { + circleAreas_ = java.util.Collections.emptyList(); + } else { + circleAreas_ = null; + circleAreasBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_GeoLocationArray_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.GeoLocationArray getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.GeoLocationArray.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.GeoLocationArray build() { + com.google.cloud.visionai.v1.GeoLocationArray result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.GeoLocationArray buildPartial() { + com.google.cloud.visionai.v1.GeoLocationArray result = + new com.google.cloud.visionai.v1.GeoLocationArray(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.google.cloud.visionai.v1.GeoLocationArray result) { + if (circleAreasBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + circleAreas_ = java.util.Collections.unmodifiableList(circleAreas_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.circleAreas_ = circleAreas_; + } else { + result.circleAreas_ = circleAreasBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.visionai.v1.GeoLocationArray result) { + int from_bitField0_ = bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.GeoLocationArray) { + return mergeFrom((com.google.cloud.visionai.v1.GeoLocationArray) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.GeoLocationArray other) { + if (other == com.google.cloud.visionai.v1.GeoLocationArray.getDefaultInstance()) return this; + if (circleAreasBuilder_ == null) { + if (!other.circleAreas_.isEmpty()) { + if (circleAreas_.isEmpty()) { + circleAreas_ = other.circleAreas_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureCircleAreasIsMutable(); + circleAreas_.addAll(other.circleAreas_); + } + onChanged(); + } + } else { + if (!other.circleAreas_.isEmpty()) { + if (circleAreasBuilder_.isEmpty()) { + circleAreasBuilder_.dispose(); + circleAreasBuilder_ = null; + circleAreas_ = other.circleAreas_; + bitField0_ = (bitField0_ & ~0x00000001); + circleAreasBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getCircleAreasFieldBuilder() + : null; + } else { + circleAreasBuilder_.addAllMessages(other.circleAreas_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.visionai.v1.CircleArea m = + input.readMessage( + com.google.cloud.visionai.v1.CircleArea.parser(), extensionRegistry); + if (circleAreasBuilder_ == null) { + ensureCircleAreasIsMutable(); + circleAreas_.add(m); + } else { + circleAreasBuilder_.addMessage(m); + } + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List circleAreas_ = + java.util.Collections.emptyList(); + + private void ensureCircleAreasIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + circleAreas_ = + new java.util.ArrayList(circleAreas_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.visionai.v1.CircleArea, + com.google.cloud.visionai.v1.CircleArea.Builder, + com.google.cloud.visionai.v1.CircleAreaOrBuilder> + circleAreasBuilder_; + + /** + * + * + *
+     * A list of circle areas.
+     * 
+ * + * repeated .google.cloud.visionai.v1.CircleArea circle_areas = 1; + */ + public java.util.List getCircleAreasList() { + if (circleAreasBuilder_ == null) { + return java.util.Collections.unmodifiableList(circleAreas_); + } else { + return circleAreasBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * A list of circle areas.
+     * 
+ * + * repeated .google.cloud.visionai.v1.CircleArea circle_areas = 1; + */ + public int getCircleAreasCount() { + if (circleAreasBuilder_ == null) { + return circleAreas_.size(); + } else { + return circleAreasBuilder_.getCount(); + } + } + /** + * + * + *
+     * A list of circle areas.
+     * 
+ * + * repeated .google.cloud.visionai.v1.CircleArea circle_areas = 1; + */ + public com.google.cloud.visionai.v1.CircleArea getCircleAreas(int index) { + if (circleAreasBuilder_ == null) { + return circleAreas_.get(index); + } else { + return circleAreasBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * A list of circle areas.
+     * 
+ * + * repeated .google.cloud.visionai.v1.CircleArea circle_areas = 1; + */ + public Builder setCircleAreas(int index, com.google.cloud.visionai.v1.CircleArea value) { + if (circleAreasBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureCircleAreasIsMutable(); + circleAreas_.set(index, value); + onChanged(); + } else { + circleAreasBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * A list of circle areas.
+     * 
+ * + * repeated .google.cloud.visionai.v1.CircleArea circle_areas = 1; + */ + public Builder setCircleAreas( + int index, com.google.cloud.visionai.v1.CircleArea.Builder builderForValue) { + if (circleAreasBuilder_ == null) { + ensureCircleAreasIsMutable(); + circleAreas_.set(index, builderForValue.build()); + onChanged(); + } else { + circleAreasBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A list of circle areas.
+     * 
+ * + * repeated .google.cloud.visionai.v1.CircleArea circle_areas = 1; + */ + public Builder addCircleAreas(com.google.cloud.visionai.v1.CircleArea value) { + if (circleAreasBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureCircleAreasIsMutable(); + circleAreas_.add(value); + onChanged(); + } else { + circleAreasBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * A list of circle areas.
+     * 
+ * + * repeated .google.cloud.visionai.v1.CircleArea circle_areas = 1; + */ + public Builder addCircleAreas(int index, com.google.cloud.visionai.v1.CircleArea value) { + if (circleAreasBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureCircleAreasIsMutable(); + circleAreas_.add(index, value); + onChanged(); + } else { + circleAreasBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * A list of circle areas.
+     * 
+ * + * repeated .google.cloud.visionai.v1.CircleArea circle_areas = 1; + */ + public Builder addCircleAreas(com.google.cloud.visionai.v1.CircleArea.Builder builderForValue) { + if (circleAreasBuilder_ == null) { + ensureCircleAreasIsMutable(); + circleAreas_.add(builderForValue.build()); + onChanged(); + } else { + circleAreasBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A list of circle areas.
+     * 
+ * + * repeated .google.cloud.visionai.v1.CircleArea circle_areas = 1; + */ + public Builder addCircleAreas( + int index, com.google.cloud.visionai.v1.CircleArea.Builder builderForValue) { + if (circleAreasBuilder_ == null) { + ensureCircleAreasIsMutable(); + circleAreas_.add(index, builderForValue.build()); + onChanged(); + } else { + circleAreasBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A list of circle areas.
+     * 
+ * + * repeated .google.cloud.visionai.v1.CircleArea circle_areas = 1; + */ + public Builder addAllCircleAreas( + java.lang.Iterable values) { + if (circleAreasBuilder_ == null) { + ensureCircleAreasIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, circleAreas_); + onChanged(); + } else { + circleAreasBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * A list of circle areas.
+     * 
+ * + * repeated .google.cloud.visionai.v1.CircleArea circle_areas = 1; + */ + public Builder clearCircleAreas() { + if (circleAreasBuilder_ == null) { + circleAreas_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + circleAreasBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * A list of circle areas.
+     * 
+ * + * repeated .google.cloud.visionai.v1.CircleArea circle_areas = 1; + */ + public Builder removeCircleAreas(int index) { + if (circleAreasBuilder_ == null) { + ensureCircleAreasIsMutable(); + circleAreas_.remove(index); + onChanged(); + } else { + circleAreasBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * A list of circle areas.
+     * 
+ * + * repeated .google.cloud.visionai.v1.CircleArea circle_areas = 1; + */ + public com.google.cloud.visionai.v1.CircleArea.Builder getCircleAreasBuilder(int index) { + return getCircleAreasFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * A list of circle areas.
+     * 
+ * + * repeated .google.cloud.visionai.v1.CircleArea circle_areas = 1; + */ + public com.google.cloud.visionai.v1.CircleAreaOrBuilder getCircleAreasOrBuilder(int index) { + if (circleAreasBuilder_ == null) { + return circleAreas_.get(index); + } else { + return circleAreasBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * A list of circle areas.
+     * 
+ * + * repeated .google.cloud.visionai.v1.CircleArea circle_areas = 1; + */ + public java.util.List + getCircleAreasOrBuilderList() { + if (circleAreasBuilder_ != null) { + return circleAreasBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(circleAreas_); + } + } + /** + * + * + *
+     * A list of circle areas.
+     * 
+ * + * repeated .google.cloud.visionai.v1.CircleArea circle_areas = 1; + */ + public com.google.cloud.visionai.v1.CircleArea.Builder addCircleAreasBuilder() { + return getCircleAreasFieldBuilder() + .addBuilder(com.google.cloud.visionai.v1.CircleArea.getDefaultInstance()); + } + /** + * + * + *
+     * A list of circle areas.
+     * 
+ * + * repeated .google.cloud.visionai.v1.CircleArea circle_areas = 1; + */ + public com.google.cloud.visionai.v1.CircleArea.Builder addCircleAreasBuilder(int index) { + return getCircleAreasFieldBuilder() + .addBuilder(index, com.google.cloud.visionai.v1.CircleArea.getDefaultInstance()); + } + /** + * + * + *
+     * A list of circle areas.
+     * 
+ * + * repeated .google.cloud.visionai.v1.CircleArea circle_areas = 1; + */ + public java.util.List + getCircleAreasBuilderList() { + return getCircleAreasFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.visionai.v1.CircleArea, + com.google.cloud.visionai.v1.CircleArea.Builder, + com.google.cloud.visionai.v1.CircleAreaOrBuilder> + getCircleAreasFieldBuilder() { + if (circleAreasBuilder_ == null) { + circleAreasBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.visionai.v1.CircleArea, + com.google.cloud.visionai.v1.CircleArea.Builder, + com.google.cloud.visionai.v1.CircleAreaOrBuilder>( + circleAreas_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + circleAreas_ = null; + } + return circleAreasBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.GeoLocationArray) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.GeoLocationArray) + private static final com.google.cloud.visionai.v1.GeoLocationArray DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.GeoLocationArray(); + } + + public static com.google.cloud.visionai.v1.GeoLocationArray getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GeoLocationArray parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.GeoLocationArray getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GeoLocationArrayOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GeoLocationArrayOrBuilder.java new file mode 100644 index 000000000000..2a28b5b5fd8a --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GeoLocationArrayOrBuilder.java @@ -0,0 +1,78 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/warehouse.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface GeoLocationArrayOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.GeoLocationArray) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * A list of circle areas.
+   * 
+ * + * repeated .google.cloud.visionai.v1.CircleArea circle_areas = 1; + */ + java.util.List getCircleAreasList(); + /** + * + * + *
+   * A list of circle areas.
+   * 
+ * + * repeated .google.cloud.visionai.v1.CircleArea circle_areas = 1; + */ + com.google.cloud.visionai.v1.CircleArea getCircleAreas(int index); + /** + * + * + *
+   * A list of circle areas.
+   * 
+ * + * repeated .google.cloud.visionai.v1.CircleArea circle_areas = 1; + */ + int getCircleAreasCount(); + /** + * + * + *
+   * A list of circle areas.
+   * 
+ * + * repeated .google.cloud.visionai.v1.CircleArea circle_areas = 1; + */ + java.util.List + getCircleAreasOrBuilderList(); + /** + * + * + *
+   * A list of circle areas.
+   * 
+ * + * repeated .google.cloud.visionai.v1.CircleArea circle_areas = 1; + */ + com.google.cloud.visionai.v1.CircleAreaOrBuilder getCircleAreasOrBuilder(int index); +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GetAnalysisRequest.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GetAnalysisRequest.java new file mode 100644 index 000000000000..5557116810d1 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GetAnalysisRequest.java @@ -0,0 +1,639 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/lva_service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * Message for getting an Analysis.
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.GetAnalysisRequest} + */ +public final class GetAnalysisRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.GetAnalysisRequest) + GetAnalysisRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetAnalysisRequest.newBuilder() to construct. + private GetAnalysisRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetAnalysisRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetAnalysisRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.LvaServiceProto + .internal_static_google_cloud_visionai_v1_GetAnalysisRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.LvaServiceProto + .internal_static_google_cloud_visionai_v1_GetAnalysisRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.GetAnalysisRequest.class, + com.google.cloud.visionai.v1.GetAnalysisRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Required. Name of the resource.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + 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(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Name of the resource.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += getUnknownFields().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.visionai.v1.GetAnalysisRequest)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.GetAnalysisRequest other = + (com.google.cloud.visionai.v1.GetAnalysisRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.GetAnalysisRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.GetAnalysisRequest 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.visionai.v1.GetAnalysisRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.GetAnalysisRequest 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.visionai.v1.GetAnalysisRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.GetAnalysisRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.GetAnalysisRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.GetAnalysisRequest 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.visionai.v1.GetAnalysisRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.GetAnalysisRequest 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.visionai.v1.GetAnalysisRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.GetAnalysisRequest 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.visionai.v1.GetAnalysisRequest 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; + } + /** + * + * + *
+   * Message for getting an Analysis.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.GetAnalysisRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.GetAnalysisRequest) + com.google.cloud.visionai.v1.GetAnalysisRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.LvaServiceProto + .internal_static_google_cloud_visionai_v1_GetAnalysisRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.LvaServiceProto + .internal_static_google_cloud_visionai_v1_GetAnalysisRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.GetAnalysisRequest.class, + com.google.cloud.visionai.v1.GetAnalysisRequest.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.GetAnalysisRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.LvaServiceProto + .internal_static_google_cloud_visionai_v1_GetAnalysisRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.GetAnalysisRequest getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.GetAnalysisRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.GetAnalysisRequest build() { + com.google.cloud.visionai.v1.GetAnalysisRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.GetAnalysisRequest buildPartial() { + com.google.cloud.visionai.v1.GetAnalysisRequest result = + new com.google.cloud.visionai.v1.GetAnalysisRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.visionai.v1.GetAnalysisRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.GetAnalysisRequest) { + return mergeFrom((com.google.cloud.visionai.v1.GetAnalysisRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.GetAnalysisRequest other) { + if (other == com.google.cloud.visionai.v1.GetAnalysisRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. Name of the resource.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Name of the resource.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Name of the resource.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Name of the resource.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Name of the resource.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.GetAnalysisRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.GetAnalysisRequest) + private static final com.google.cloud.visionai.v1.GetAnalysisRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.GetAnalysisRequest(); + } + + public static com.google.cloud.visionai.v1.GetAnalysisRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetAnalysisRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.GetAnalysisRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GetAnalysisRequestOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GetAnalysisRequestOrBuilder.java new file mode 100644 index 000000000000..f5326a823743 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GetAnalysisRequestOrBuilder.java @@ -0,0 +1,55 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/lva_service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface GetAnalysisRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.GetAnalysisRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Name of the resource.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. Name of the resource.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GetAnnotationRequest.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GetAnnotationRequest.java new file mode 100644 index 000000000000..6953231dfb76 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GetAnnotationRequest.java @@ -0,0 +1,653 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/warehouse.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * Request message for GetAnnotation API.
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.GetAnnotationRequest} + */ +public final class GetAnnotationRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.GetAnnotationRequest) + GetAnnotationRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetAnnotationRequest.newBuilder() to construct. + private GetAnnotationRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetAnnotationRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetAnnotationRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_GetAnnotationRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_GetAnnotationRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.GetAnnotationRequest.class, + com.google.cloud.visionai.v1.GetAnnotationRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Required. The name of the annotation to retrieve.
+   * Format:
+   * `projects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset}/annotations/{annotation}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + 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(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The name of the annotation to retrieve.
+   * Format:
+   * `projects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset}/annotations/{annotation}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += getUnknownFields().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.visionai.v1.GetAnnotationRequest)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.GetAnnotationRequest other = + (com.google.cloud.visionai.v1.GetAnnotationRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.GetAnnotationRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.GetAnnotationRequest 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.visionai.v1.GetAnnotationRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.GetAnnotationRequest 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.visionai.v1.GetAnnotationRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.GetAnnotationRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.GetAnnotationRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.GetAnnotationRequest 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.visionai.v1.GetAnnotationRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.GetAnnotationRequest 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.visionai.v1.GetAnnotationRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.GetAnnotationRequest 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.visionai.v1.GetAnnotationRequest 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; + } + /** + * + * + *
+   * Request message for GetAnnotation API.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.GetAnnotationRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.GetAnnotationRequest) + com.google.cloud.visionai.v1.GetAnnotationRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_GetAnnotationRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_GetAnnotationRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.GetAnnotationRequest.class, + com.google.cloud.visionai.v1.GetAnnotationRequest.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.GetAnnotationRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_GetAnnotationRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.GetAnnotationRequest getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.GetAnnotationRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.GetAnnotationRequest build() { + com.google.cloud.visionai.v1.GetAnnotationRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.GetAnnotationRequest buildPartial() { + com.google.cloud.visionai.v1.GetAnnotationRequest result = + new com.google.cloud.visionai.v1.GetAnnotationRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.visionai.v1.GetAnnotationRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.GetAnnotationRequest) { + return mergeFrom((com.google.cloud.visionai.v1.GetAnnotationRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.GetAnnotationRequest other) { + if (other == com.google.cloud.visionai.v1.GetAnnotationRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. The name of the annotation to retrieve.
+     * Format:
+     * `projects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset}/annotations/{annotation}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The name of the annotation to retrieve.
+     * Format:
+     * `projects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset}/annotations/{annotation}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The name of the annotation to retrieve.
+     * Format:
+     * `projects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset}/annotations/{annotation}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the annotation to retrieve.
+     * Format:
+     * `projects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset}/annotations/{annotation}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the annotation to retrieve.
+     * Format:
+     * `projects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset}/annotations/{annotation}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.GetAnnotationRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.GetAnnotationRequest) + private static final com.google.cloud.visionai.v1.GetAnnotationRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.GetAnnotationRequest(); + } + + public static com.google.cloud.visionai.v1.GetAnnotationRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetAnnotationRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.GetAnnotationRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GetAnnotationRequestOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GetAnnotationRequestOrBuilder.java new file mode 100644 index 000000000000..cd0a11a7f709 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GetAnnotationRequestOrBuilder.java @@ -0,0 +1,59 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/warehouse.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface GetAnnotationRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.GetAnnotationRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the annotation to retrieve.
+   * Format:
+   * `projects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset}/annotations/{annotation}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The name of the annotation to retrieve.
+   * Format:
+   * `projects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset}/annotations/{annotation}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GetApplicationRequest.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GetApplicationRequest.java new file mode 100644 index 000000000000..d3468e3c4cbe --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GetApplicationRequest.java @@ -0,0 +1,639 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/platform.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * Message for getting a Application.
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.GetApplicationRequest} + */ +public final class GetApplicationRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.GetApplicationRequest) + GetApplicationRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetApplicationRequest.newBuilder() to construct. + private GetApplicationRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetApplicationRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetApplicationRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_GetApplicationRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_GetApplicationRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.GetApplicationRequest.class, + com.google.cloud.visionai.v1.GetApplicationRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Required. Name of the resource.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + 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(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Name of the resource.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += getUnknownFields().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.visionai.v1.GetApplicationRequest)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.GetApplicationRequest other = + (com.google.cloud.visionai.v1.GetApplicationRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.GetApplicationRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.GetApplicationRequest 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.visionai.v1.GetApplicationRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.GetApplicationRequest 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.visionai.v1.GetApplicationRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.GetApplicationRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.GetApplicationRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.GetApplicationRequest 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.visionai.v1.GetApplicationRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.GetApplicationRequest 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.visionai.v1.GetApplicationRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.GetApplicationRequest 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.visionai.v1.GetApplicationRequest 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; + } + /** + * + * + *
+   * Message for getting a Application.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.GetApplicationRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.GetApplicationRequest) + com.google.cloud.visionai.v1.GetApplicationRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_GetApplicationRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_GetApplicationRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.GetApplicationRequest.class, + com.google.cloud.visionai.v1.GetApplicationRequest.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.GetApplicationRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_GetApplicationRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.GetApplicationRequest getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.GetApplicationRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.GetApplicationRequest build() { + com.google.cloud.visionai.v1.GetApplicationRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.GetApplicationRequest buildPartial() { + com.google.cloud.visionai.v1.GetApplicationRequest result = + new com.google.cloud.visionai.v1.GetApplicationRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.visionai.v1.GetApplicationRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.GetApplicationRequest) { + return mergeFrom((com.google.cloud.visionai.v1.GetApplicationRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.GetApplicationRequest other) { + if (other == com.google.cloud.visionai.v1.GetApplicationRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. Name of the resource.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Name of the resource.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Name of the resource.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Name of the resource.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Name of the resource.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.GetApplicationRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.GetApplicationRequest) + private static final com.google.cloud.visionai.v1.GetApplicationRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.GetApplicationRequest(); + } + + public static com.google.cloud.visionai.v1.GetApplicationRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetApplicationRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.GetApplicationRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GetApplicationRequestOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GetApplicationRequestOrBuilder.java new file mode 100644 index 000000000000..39c55e91f450 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GetApplicationRequestOrBuilder.java @@ -0,0 +1,55 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/platform.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface GetApplicationRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.GetApplicationRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Name of the resource.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. Name of the resource.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GetAssetRequest.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GetAssetRequest.java new file mode 100644 index 000000000000..2455be47d08c --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GetAssetRequest.java @@ -0,0 +1,652 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/warehouse.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * Request message for GetAsset.
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.GetAssetRequest} + */ +public final class GetAssetRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.GetAssetRequest) + GetAssetRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetAssetRequest.newBuilder() to construct. + private GetAssetRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetAssetRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetAssetRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_GetAssetRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_GetAssetRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.GetAssetRequest.class, + com.google.cloud.visionai.v1.GetAssetRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Required. The name of the asset to retrieve.
+   * Format:
+   * projects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset}
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + 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(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The name of the asset to retrieve.
+   * Format:
+   * projects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset}
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += getUnknownFields().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.visionai.v1.GetAssetRequest)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.GetAssetRequest other = + (com.google.cloud.visionai.v1.GetAssetRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.GetAssetRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.GetAssetRequest 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.visionai.v1.GetAssetRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.GetAssetRequest 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.visionai.v1.GetAssetRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.GetAssetRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.GetAssetRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.GetAssetRequest 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.visionai.v1.GetAssetRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.GetAssetRequest 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.visionai.v1.GetAssetRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.GetAssetRequest 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.visionai.v1.GetAssetRequest 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; + } + /** + * + * + *
+   * Request message for GetAsset.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.GetAssetRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.GetAssetRequest) + com.google.cloud.visionai.v1.GetAssetRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_GetAssetRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_GetAssetRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.GetAssetRequest.class, + com.google.cloud.visionai.v1.GetAssetRequest.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.GetAssetRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_GetAssetRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.GetAssetRequest getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.GetAssetRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.GetAssetRequest build() { + com.google.cloud.visionai.v1.GetAssetRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.GetAssetRequest buildPartial() { + com.google.cloud.visionai.v1.GetAssetRequest result = + new com.google.cloud.visionai.v1.GetAssetRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.visionai.v1.GetAssetRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.GetAssetRequest) { + return mergeFrom((com.google.cloud.visionai.v1.GetAssetRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.GetAssetRequest other) { + if (other == com.google.cloud.visionai.v1.GetAssetRequest.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. The name of the asset to retrieve.
+     * Format:
+     * projects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset}
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The name of the asset to retrieve.
+     * Format:
+     * projects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset}
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The name of the asset to retrieve.
+     * Format:
+     * projects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset}
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the asset to retrieve.
+     * Format:
+     * projects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset}
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the asset to retrieve.
+     * Format:
+     * projects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset}
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.GetAssetRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.GetAssetRequest) + private static final com.google.cloud.visionai.v1.GetAssetRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.GetAssetRequest(); + } + + public static com.google.cloud.visionai.v1.GetAssetRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetAssetRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.GetAssetRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GetAssetRequestOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GetAssetRequestOrBuilder.java new file mode 100644 index 000000000000..41e79d765a28 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GetAssetRequestOrBuilder.java @@ -0,0 +1,59 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/warehouse.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface GetAssetRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.GetAssetRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the asset to retrieve.
+   * Format:
+   * projects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset}
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The name of the asset to retrieve.
+   * Format:
+   * projects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset}
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GetClusterRequest.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GetClusterRequest.java new file mode 100644 index 000000000000..3967fab8ed69 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GetClusterRequest.java @@ -0,0 +1,638 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/streams_service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * Message for getting a Cluster.
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.GetClusterRequest} + */ +public final class GetClusterRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.GetClusterRequest) + GetClusterRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetClusterRequest.newBuilder() to construct. + private GetClusterRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetClusterRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetClusterRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.StreamsServiceProto + .internal_static_google_cloud_visionai_v1_GetClusterRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.StreamsServiceProto + .internal_static_google_cloud_visionai_v1_GetClusterRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.GetClusterRequest.class, + com.google.cloud.visionai.v1.GetClusterRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Required. Name of the resource.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + 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(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Name of the resource.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += getUnknownFields().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.visionai.v1.GetClusterRequest)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.GetClusterRequest other = + (com.google.cloud.visionai.v1.GetClusterRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.GetClusterRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.GetClusterRequest 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.visionai.v1.GetClusterRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.GetClusterRequest 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.visionai.v1.GetClusterRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.GetClusterRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.GetClusterRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.GetClusterRequest 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.visionai.v1.GetClusterRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.GetClusterRequest 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.visionai.v1.GetClusterRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.GetClusterRequest 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.visionai.v1.GetClusterRequest 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; + } + /** + * + * + *
+   * Message for getting a Cluster.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.GetClusterRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.GetClusterRequest) + com.google.cloud.visionai.v1.GetClusterRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.StreamsServiceProto + .internal_static_google_cloud_visionai_v1_GetClusterRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.StreamsServiceProto + .internal_static_google_cloud_visionai_v1_GetClusterRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.GetClusterRequest.class, + com.google.cloud.visionai.v1.GetClusterRequest.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.GetClusterRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.StreamsServiceProto + .internal_static_google_cloud_visionai_v1_GetClusterRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.GetClusterRequest getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.GetClusterRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.GetClusterRequest build() { + com.google.cloud.visionai.v1.GetClusterRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.GetClusterRequest buildPartial() { + com.google.cloud.visionai.v1.GetClusterRequest result = + new com.google.cloud.visionai.v1.GetClusterRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.visionai.v1.GetClusterRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.GetClusterRequest) { + return mergeFrom((com.google.cloud.visionai.v1.GetClusterRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.GetClusterRequest other) { + if (other == com.google.cloud.visionai.v1.GetClusterRequest.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. Name of the resource.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Name of the resource.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Name of the resource.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Name of the resource.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Name of the resource.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.GetClusterRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.GetClusterRequest) + private static final com.google.cloud.visionai.v1.GetClusterRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.GetClusterRequest(); + } + + public static com.google.cloud.visionai.v1.GetClusterRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetClusterRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.GetClusterRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GetClusterRequestOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GetClusterRequestOrBuilder.java new file mode 100644 index 000000000000..8608b52284b0 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GetClusterRequestOrBuilder.java @@ -0,0 +1,55 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/streams_service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface GetClusterRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.GetClusterRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Name of the resource.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. Name of the resource.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GetCollectionRequest.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GetCollectionRequest.java new file mode 100644 index 000000000000..7a9985620d49 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GetCollectionRequest.java @@ -0,0 +1,646 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/warehouse.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * Request message for GetCollectionRequest.
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.GetCollectionRequest} + */ +public final class GetCollectionRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.GetCollectionRequest) + GetCollectionRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetCollectionRequest.newBuilder() to construct. + private GetCollectionRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetCollectionRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetCollectionRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_GetCollectionRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_GetCollectionRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.GetCollectionRequest.class, + com.google.cloud.visionai.v1.GetCollectionRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Required. The name of the collection to retrieve. Format:
+   * `projects/{project_number}/locations/{location}/corpora/{corpus}/collections/{collection}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + 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(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The name of the collection to retrieve. Format:
+   * `projects/{project_number}/locations/{location}/corpora/{corpus}/collections/{collection}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += getUnknownFields().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.visionai.v1.GetCollectionRequest)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.GetCollectionRequest other = + (com.google.cloud.visionai.v1.GetCollectionRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.GetCollectionRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.GetCollectionRequest 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.visionai.v1.GetCollectionRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.GetCollectionRequest 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.visionai.v1.GetCollectionRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.GetCollectionRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.GetCollectionRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.GetCollectionRequest 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.visionai.v1.GetCollectionRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.GetCollectionRequest 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.visionai.v1.GetCollectionRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.GetCollectionRequest 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.visionai.v1.GetCollectionRequest 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; + } + /** + * + * + *
+   * Request message for GetCollectionRequest.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.GetCollectionRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.GetCollectionRequest) + com.google.cloud.visionai.v1.GetCollectionRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_GetCollectionRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_GetCollectionRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.GetCollectionRequest.class, + com.google.cloud.visionai.v1.GetCollectionRequest.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.GetCollectionRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_GetCollectionRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.GetCollectionRequest getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.GetCollectionRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.GetCollectionRequest build() { + com.google.cloud.visionai.v1.GetCollectionRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.GetCollectionRequest buildPartial() { + com.google.cloud.visionai.v1.GetCollectionRequest result = + new com.google.cloud.visionai.v1.GetCollectionRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.visionai.v1.GetCollectionRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.GetCollectionRequest) { + return mergeFrom((com.google.cloud.visionai.v1.GetCollectionRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.GetCollectionRequest other) { + if (other == com.google.cloud.visionai.v1.GetCollectionRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. The name of the collection to retrieve. Format:
+     * `projects/{project_number}/locations/{location}/corpora/{corpus}/collections/{collection}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The name of the collection to retrieve. Format:
+     * `projects/{project_number}/locations/{location}/corpora/{corpus}/collections/{collection}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The name of the collection to retrieve. Format:
+     * `projects/{project_number}/locations/{location}/corpora/{corpus}/collections/{collection}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the collection to retrieve. Format:
+     * `projects/{project_number}/locations/{location}/corpora/{corpus}/collections/{collection}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the collection to retrieve. Format:
+     * `projects/{project_number}/locations/{location}/corpora/{corpus}/collections/{collection}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.GetCollectionRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.GetCollectionRequest) + private static final com.google.cloud.visionai.v1.GetCollectionRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.GetCollectionRequest(); + } + + public static com.google.cloud.visionai.v1.GetCollectionRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetCollectionRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.GetCollectionRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GetCollectionRequestOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GetCollectionRequestOrBuilder.java new file mode 100644 index 000000000000..525bf72703bd --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GetCollectionRequestOrBuilder.java @@ -0,0 +1,57 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/warehouse.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface GetCollectionRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.GetCollectionRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the collection to retrieve. Format:
+   * `projects/{project_number}/locations/{location}/corpora/{corpus}/collections/{collection}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The name of the collection to retrieve. Format:
+   * `projects/{project_number}/locations/{location}/corpora/{corpus}/collections/{collection}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GetCorpusRequest.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GetCorpusRequest.java new file mode 100644 index 000000000000..ba60f0de69b6 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GetCorpusRequest.java @@ -0,0 +1,638 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/warehouse.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * Request message for GetCorpus.
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.GetCorpusRequest} + */ +public final class GetCorpusRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.GetCorpusRequest) + GetCorpusRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetCorpusRequest.newBuilder() to construct. + private GetCorpusRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetCorpusRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetCorpusRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_GetCorpusRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_GetCorpusRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.GetCorpusRequest.class, + com.google.cloud.visionai.v1.GetCorpusRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Required. The resource name of the corpus to retrieve.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + 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(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The resource name of the corpus to retrieve.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += getUnknownFields().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.visionai.v1.GetCorpusRequest)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.GetCorpusRequest other = + (com.google.cloud.visionai.v1.GetCorpusRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.GetCorpusRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.GetCorpusRequest 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.visionai.v1.GetCorpusRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.GetCorpusRequest 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.visionai.v1.GetCorpusRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.GetCorpusRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.GetCorpusRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.GetCorpusRequest 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.visionai.v1.GetCorpusRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.GetCorpusRequest 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.visionai.v1.GetCorpusRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.GetCorpusRequest 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.visionai.v1.GetCorpusRequest 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; + } + /** + * + * + *
+   * Request message for GetCorpus.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.GetCorpusRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.GetCorpusRequest) + com.google.cloud.visionai.v1.GetCorpusRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_GetCorpusRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_GetCorpusRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.GetCorpusRequest.class, + com.google.cloud.visionai.v1.GetCorpusRequest.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.GetCorpusRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_GetCorpusRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.GetCorpusRequest getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.GetCorpusRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.GetCorpusRequest build() { + com.google.cloud.visionai.v1.GetCorpusRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.GetCorpusRequest buildPartial() { + com.google.cloud.visionai.v1.GetCorpusRequest result = + new com.google.cloud.visionai.v1.GetCorpusRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.visionai.v1.GetCorpusRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.GetCorpusRequest) { + return mergeFrom((com.google.cloud.visionai.v1.GetCorpusRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.GetCorpusRequest other) { + if (other == com.google.cloud.visionai.v1.GetCorpusRequest.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. The resource name of the corpus to retrieve.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The resource name of the corpus to retrieve.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The resource name of the corpus to retrieve.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the corpus to retrieve.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the corpus to retrieve.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.GetCorpusRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.GetCorpusRequest) + private static final com.google.cloud.visionai.v1.GetCorpusRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.GetCorpusRequest(); + } + + public static com.google.cloud.visionai.v1.GetCorpusRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetCorpusRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.GetCorpusRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GetCorpusRequestOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GetCorpusRequestOrBuilder.java new file mode 100644 index 000000000000..f2c89ea87713 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GetCorpusRequestOrBuilder.java @@ -0,0 +1,55 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/warehouse.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface GetCorpusRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.GetCorpusRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The resource name of the corpus to retrieve.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The resource name of the corpus to retrieve.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GetDataSchemaRequest.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GetDataSchemaRequest.java new file mode 100644 index 000000000000..8707015ebcce --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GetDataSchemaRequest.java @@ -0,0 +1,653 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/warehouse.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * Request message for GetDataSchema.
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.GetDataSchemaRequest} + */ +public final class GetDataSchemaRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.GetDataSchemaRequest) + GetDataSchemaRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetDataSchemaRequest.newBuilder() to construct. + private GetDataSchemaRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetDataSchemaRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetDataSchemaRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_GetDataSchemaRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_GetDataSchemaRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.GetDataSchemaRequest.class, + com.google.cloud.visionai.v1.GetDataSchemaRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Required. The name of the data schema to retrieve.
+   * Format:
+   * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/dataSchemas/{data_schema_id}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + 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(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The name of the data schema to retrieve.
+   * Format:
+   * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/dataSchemas/{data_schema_id}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += getUnknownFields().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.visionai.v1.GetDataSchemaRequest)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.GetDataSchemaRequest other = + (com.google.cloud.visionai.v1.GetDataSchemaRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.GetDataSchemaRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.GetDataSchemaRequest 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.visionai.v1.GetDataSchemaRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.GetDataSchemaRequest 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.visionai.v1.GetDataSchemaRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.GetDataSchemaRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.GetDataSchemaRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.GetDataSchemaRequest 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.visionai.v1.GetDataSchemaRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.GetDataSchemaRequest 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.visionai.v1.GetDataSchemaRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.GetDataSchemaRequest 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.visionai.v1.GetDataSchemaRequest 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; + } + /** + * + * + *
+   * Request message for GetDataSchema.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.GetDataSchemaRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.GetDataSchemaRequest) + com.google.cloud.visionai.v1.GetDataSchemaRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_GetDataSchemaRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_GetDataSchemaRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.GetDataSchemaRequest.class, + com.google.cloud.visionai.v1.GetDataSchemaRequest.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.GetDataSchemaRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_GetDataSchemaRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.GetDataSchemaRequest getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.GetDataSchemaRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.GetDataSchemaRequest build() { + com.google.cloud.visionai.v1.GetDataSchemaRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.GetDataSchemaRequest buildPartial() { + com.google.cloud.visionai.v1.GetDataSchemaRequest result = + new com.google.cloud.visionai.v1.GetDataSchemaRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.visionai.v1.GetDataSchemaRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.GetDataSchemaRequest) { + return mergeFrom((com.google.cloud.visionai.v1.GetDataSchemaRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.GetDataSchemaRequest other) { + if (other == com.google.cloud.visionai.v1.GetDataSchemaRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. The name of the data schema to retrieve.
+     * Format:
+     * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/dataSchemas/{data_schema_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The name of the data schema to retrieve.
+     * Format:
+     * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/dataSchemas/{data_schema_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The name of the data schema to retrieve.
+     * Format:
+     * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/dataSchemas/{data_schema_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the data schema to retrieve.
+     * Format:
+     * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/dataSchemas/{data_schema_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the data schema to retrieve.
+     * Format:
+     * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/dataSchemas/{data_schema_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.GetDataSchemaRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.GetDataSchemaRequest) + private static final com.google.cloud.visionai.v1.GetDataSchemaRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.GetDataSchemaRequest(); + } + + public static com.google.cloud.visionai.v1.GetDataSchemaRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetDataSchemaRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.GetDataSchemaRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GetDataSchemaRequestOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GetDataSchemaRequestOrBuilder.java new file mode 100644 index 000000000000..0a470196d302 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GetDataSchemaRequestOrBuilder.java @@ -0,0 +1,59 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/warehouse.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface GetDataSchemaRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.GetDataSchemaRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the data schema to retrieve.
+   * Format:
+   * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/dataSchemas/{data_schema_id}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The name of the data schema to retrieve.
+   * Format:
+   * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/dataSchemas/{data_schema_id}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GetDraftRequest.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GetDraftRequest.java new file mode 100644 index 000000000000..77b70632f8a9 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GetDraftRequest.java @@ -0,0 +1,638 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/platform.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * Message for getting a Draft.
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.GetDraftRequest} + */ +public final class GetDraftRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.GetDraftRequest) + GetDraftRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetDraftRequest.newBuilder() to construct. + private GetDraftRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetDraftRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetDraftRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_GetDraftRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_GetDraftRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.GetDraftRequest.class, + com.google.cloud.visionai.v1.GetDraftRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Required. Name of the resource.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + 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(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Name of the resource.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += getUnknownFields().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.visionai.v1.GetDraftRequest)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.GetDraftRequest other = + (com.google.cloud.visionai.v1.GetDraftRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.GetDraftRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.GetDraftRequest 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.visionai.v1.GetDraftRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.GetDraftRequest 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.visionai.v1.GetDraftRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.GetDraftRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.GetDraftRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.GetDraftRequest 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.visionai.v1.GetDraftRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.GetDraftRequest 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.visionai.v1.GetDraftRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.GetDraftRequest 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.visionai.v1.GetDraftRequest 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; + } + /** + * + * + *
+   * Message for getting a Draft.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.GetDraftRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.GetDraftRequest) + com.google.cloud.visionai.v1.GetDraftRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_GetDraftRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_GetDraftRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.GetDraftRequest.class, + com.google.cloud.visionai.v1.GetDraftRequest.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.GetDraftRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_GetDraftRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.GetDraftRequest getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.GetDraftRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.GetDraftRequest build() { + com.google.cloud.visionai.v1.GetDraftRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.GetDraftRequest buildPartial() { + com.google.cloud.visionai.v1.GetDraftRequest result = + new com.google.cloud.visionai.v1.GetDraftRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.visionai.v1.GetDraftRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.GetDraftRequest) { + return mergeFrom((com.google.cloud.visionai.v1.GetDraftRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.GetDraftRequest other) { + if (other == com.google.cloud.visionai.v1.GetDraftRequest.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. Name of the resource.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Name of the resource.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Name of the resource.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Name of the resource.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Name of the resource.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.GetDraftRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.GetDraftRequest) + private static final com.google.cloud.visionai.v1.GetDraftRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.GetDraftRequest(); + } + + public static com.google.cloud.visionai.v1.GetDraftRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetDraftRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.GetDraftRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GetDraftRequestOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GetDraftRequestOrBuilder.java new file mode 100644 index 000000000000..a6a9db21f448 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GetDraftRequestOrBuilder.java @@ -0,0 +1,55 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/platform.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface GetDraftRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.GetDraftRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Name of the resource.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. Name of the resource.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GetEventRequest.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GetEventRequest.java new file mode 100644 index 000000000000..a5720f06be43 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GetEventRequest.java @@ -0,0 +1,638 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/streams_service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * Message for getting a Event.
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.GetEventRequest} + */ +public final class GetEventRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.GetEventRequest) + GetEventRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetEventRequest.newBuilder() to construct. + private GetEventRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetEventRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetEventRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.StreamsServiceProto + .internal_static_google_cloud_visionai_v1_GetEventRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.StreamsServiceProto + .internal_static_google_cloud_visionai_v1_GetEventRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.GetEventRequest.class, + com.google.cloud.visionai.v1.GetEventRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Required. Name of the resource.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + 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(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Name of the resource.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += getUnknownFields().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.visionai.v1.GetEventRequest)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.GetEventRequest other = + (com.google.cloud.visionai.v1.GetEventRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.GetEventRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.GetEventRequest 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.visionai.v1.GetEventRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.GetEventRequest 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.visionai.v1.GetEventRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.GetEventRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.GetEventRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.GetEventRequest 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.visionai.v1.GetEventRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.GetEventRequest 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.visionai.v1.GetEventRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.GetEventRequest 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.visionai.v1.GetEventRequest 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; + } + /** + * + * + *
+   * Message for getting a Event.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.GetEventRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.GetEventRequest) + com.google.cloud.visionai.v1.GetEventRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.StreamsServiceProto + .internal_static_google_cloud_visionai_v1_GetEventRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.StreamsServiceProto + .internal_static_google_cloud_visionai_v1_GetEventRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.GetEventRequest.class, + com.google.cloud.visionai.v1.GetEventRequest.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.GetEventRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.StreamsServiceProto + .internal_static_google_cloud_visionai_v1_GetEventRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.GetEventRequest getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.GetEventRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.GetEventRequest build() { + com.google.cloud.visionai.v1.GetEventRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.GetEventRequest buildPartial() { + com.google.cloud.visionai.v1.GetEventRequest result = + new com.google.cloud.visionai.v1.GetEventRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.visionai.v1.GetEventRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.GetEventRequest) { + return mergeFrom((com.google.cloud.visionai.v1.GetEventRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.GetEventRequest other) { + if (other == com.google.cloud.visionai.v1.GetEventRequest.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. Name of the resource.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Name of the resource.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Name of the resource.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Name of the resource.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Name of the resource.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.GetEventRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.GetEventRequest) + private static final com.google.cloud.visionai.v1.GetEventRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.GetEventRequest(); + } + + public static com.google.cloud.visionai.v1.GetEventRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetEventRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.GetEventRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GetEventRequestOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GetEventRequestOrBuilder.java new file mode 100644 index 000000000000..8d4229c45557 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GetEventRequestOrBuilder.java @@ -0,0 +1,55 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/streams_service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface GetEventRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.GetEventRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Name of the resource.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. Name of the resource.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GetIndexEndpointRequest.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GetIndexEndpointRequest.java new file mode 100644 index 000000000000..ebcb962bc6c3 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GetIndexEndpointRequest.java @@ -0,0 +1,639 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/warehouse.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * Request message for GetIndexEndpoint.
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.GetIndexEndpointRequest} + */ +public final class GetIndexEndpointRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.GetIndexEndpointRequest) + GetIndexEndpointRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetIndexEndpointRequest.newBuilder() to construct. + private GetIndexEndpointRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetIndexEndpointRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetIndexEndpointRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_GetIndexEndpointRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_GetIndexEndpointRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.GetIndexEndpointRequest.class, + com.google.cloud.visionai.v1.GetIndexEndpointRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Required. Name of the IndexEndpoint resource.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + 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(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Name of the IndexEndpoint resource.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += getUnknownFields().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.visionai.v1.GetIndexEndpointRequest)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.GetIndexEndpointRequest other = + (com.google.cloud.visionai.v1.GetIndexEndpointRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.GetIndexEndpointRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.GetIndexEndpointRequest 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.visionai.v1.GetIndexEndpointRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.GetIndexEndpointRequest 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.visionai.v1.GetIndexEndpointRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.GetIndexEndpointRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.GetIndexEndpointRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.GetIndexEndpointRequest 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.visionai.v1.GetIndexEndpointRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.GetIndexEndpointRequest 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.visionai.v1.GetIndexEndpointRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.GetIndexEndpointRequest 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.visionai.v1.GetIndexEndpointRequest 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; + } + /** + * + * + *
+   * Request message for GetIndexEndpoint.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.GetIndexEndpointRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.GetIndexEndpointRequest) + com.google.cloud.visionai.v1.GetIndexEndpointRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_GetIndexEndpointRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_GetIndexEndpointRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.GetIndexEndpointRequest.class, + com.google.cloud.visionai.v1.GetIndexEndpointRequest.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.GetIndexEndpointRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_GetIndexEndpointRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.GetIndexEndpointRequest getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.GetIndexEndpointRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.GetIndexEndpointRequest build() { + com.google.cloud.visionai.v1.GetIndexEndpointRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.GetIndexEndpointRequest buildPartial() { + com.google.cloud.visionai.v1.GetIndexEndpointRequest result = + new com.google.cloud.visionai.v1.GetIndexEndpointRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.visionai.v1.GetIndexEndpointRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.GetIndexEndpointRequest) { + return mergeFrom((com.google.cloud.visionai.v1.GetIndexEndpointRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.GetIndexEndpointRequest other) { + if (other == com.google.cloud.visionai.v1.GetIndexEndpointRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. Name of the IndexEndpoint resource.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Name of the IndexEndpoint resource.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Name of the IndexEndpoint resource.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Name of the IndexEndpoint resource.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Name of the IndexEndpoint resource.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.GetIndexEndpointRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.GetIndexEndpointRequest) + private static final com.google.cloud.visionai.v1.GetIndexEndpointRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.GetIndexEndpointRequest(); + } + + public static com.google.cloud.visionai.v1.GetIndexEndpointRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetIndexEndpointRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.GetIndexEndpointRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GetIndexEndpointRequestOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GetIndexEndpointRequestOrBuilder.java new file mode 100644 index 000000000000..cde776f5c591 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GetIndexEndpointRequestOrBuilder.java @@ -0,0 +1,55 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/warehouse.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface GetIndexEndpointRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.GetIndexEndpointRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Name of the IndexEndpoint resource.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. Name of the IndexEndpoint resource.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GetIndexRequest.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GetIndexRequest.java new file mode 100644 index 000000000000..05440afa4ae6 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GetIndexRequest.java @@ -0,0 +1,652 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/warehouse.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * Request message for getting an Index.
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.GetIndexRequest} + */ +public final class GetIndexRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.GetIndexRequest) + GetIndexRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetIndexRequest.newBuilder() to construct. + private GetIndexRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetIndexRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetIndexRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_GetIndexRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_GetIndexRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.GetIndexRequest.class, + com.google.cloud.visionai.v1.GetIndexRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Required. Name of the Index resource.
+   * Format:
+   * `projects/{project_number}/locations/{location}/corpora/{corpus}/indexes/{index}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + 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(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Name of the Index resource.
+   * Format:
+   * `projects/{project_number}/locations/{location}/corpora/{corpus}/indexes/{index}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += getUnknownFields().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.visionai.v1.GetIndexRequest)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.GetIndexRequest other = + (com.google.cloud.visionai.v1.GetIndexRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.GetIndexRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.GetIndexRequest 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.visionai.v1.GetIndexRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.GetIndexRequest 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.visionai.v1.GetIndexRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.GetIndexRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.GetIndexRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.GetIndexRequest 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.visionai.v1.GetIndexRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.GetIndexRequest 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.visionai.v1.GetIndexRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.GetIndexRequest 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.visionai.v1.GetIndexRequest 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; + } + /** + * + * + *
+   * Request message for getting an Index.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.GetIndexRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.GetIndexRequest) + com.google.cloud.visionai.v1.GetIndexRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_GetIndexRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_GetIndexRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.GetIndexRequest.class, + com.google.cloud.visionai.v1.GetIndexRequest.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.GetIndexRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_GetIndexRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.GetIndexRequest getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.GetIndexRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.GetIndexRequest build() { + com.google.cloud.visionai.v1.GetIndexRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.GetIndexRequest buildPartial() { + com.google.cloud.visionai.v1.GetIndexRequest result = + new com.google.cloud.visionai.v1.GetIndexRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.visionai.v1.GetIndexRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.GetIndexRequest) { + return mergeFrom((com.google.cloud.visionai.v1.GetIndexRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.GetIndexRequest other) { + if (other == com.google.cloud.visionai.v1.GetIndexRequest.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. Name of the Index resource.
+     * Format:
+     * `projects/{project_number}/locations/{location}/corpora/{corpus}/indexes/{index}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Name of the Index resource.
+     * Format:
+     * `projects/{project_number}/locations/{location}/corpora/{corpus}/indexes/{index}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Name of the Index resource.
+     * Format:
+     * `projects/{project_number}/locations/{location}/corpora/{corpus}/indexes/{index}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Name of the Index resource.
+     * Format:
+     * `projects/{project_number}/locations/{location}/corpora/{corpus}/indexes/{index}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Name of the Index resource.
+     * Format:
+     * `projects/{project_number}/locations/{location}/corpora/{corpus}/indexes/{index}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.GetIndexRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.GetIndexRequest) + private static final com.google.cloud.visionai.v1.GetIndexRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.GetIndexRequest(); + } + + public static com.google.cloud.visionai.v1.GetIndexRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetIndexRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.GetIndexRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GetIndexRequestOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GetIndexRequestOrBuilder.java new file mode 100644 index 000000000000..0697f09d71f9 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GetIndexRequestOrBuilder.java @@ -0,0 +1,59 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/warehouse.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface GetIndexRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.GetIndexRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Name of the Index resource.
+   * Format:
+   * `projects/{project_number}/locations/{location}/corpora/{corpus}/indexes/{index}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. Name of the Index resource.
+   * Format:
+   * `projects/{project_number}/locations/{location}/corpora/{corpus}/indexes/{index}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GetInstanceRequest.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GetInstanceRequest.java new file mode 100644 index 000000000000..bb2249044d3f --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GetInstanceRequest.java @@ -0,0 +1,639 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/platform.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * Message for getting a Instance.
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.GetInstanceRequest} + */ +public final class GetInstanceRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.GetInstanceRequest) + GetInstanceRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetInstanceRequest.newBuilder() to construct. + private GetInstanceRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetInstanceRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetInstanceRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_GetInstanceRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_GetInstanceRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.GetInstanceRequest.class, + com.google.cloud.visionai.v1.GetInstanceRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Required. Name of the resource.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + 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(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Name of the resource.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += getUnknownFields().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.visionai.v1.GetInstanceRequest)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.GetInstanceRequest other = + (com.google.cloud.visionai.v1.GetInstanceRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.GetInstanceRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.GetInstanceRequest 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.visionai.v1.GetInstanceRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.GetInstanceRequest 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.visionai.v1.GetInstanceRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.GetInstanceRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.GetInstanceRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.GetInstanceRequest 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.visionai.v1.GetInstanceRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.GetInstanceRequest 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.visionai.v1.GetInstanceRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.GetInstanceRequest 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.visionai.v1.GetInstanceRequest 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; + } + /** + * + * + *
+   * Message for getting a Instance.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.GetInstanceRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.GetInstanceRequest) + com.google.cloud.visionai.v1.GetInstanceRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_GetInstanceRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_GetInstanceRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.GetInstanceRequest.class, + com.google.cloud.visionai.v1.GetInstanceRequest.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.GetInstanceRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_GetInstanceRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.GetInstanceRequest getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.GetInstanceRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.GetInstanceRequest build() { + com.google.cloud.visionai.v1.GetInstanceRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.GetInstanceRequest buildPartial() { + com.google.cloud.visionai.v1.GetInstanceRequest result = + new com.google.cloud.visionai.v1.GetInstanceRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.visionai.v1.GetInstanceRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.GetInstanceRequest) { + return mergeFrom((com.google.cloud.visionai.v1.GetInstanceRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.GetInstanceRequest other) { + if (other == com.google.cloud.visionai.v1.GetInstanceRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. Name of the resource.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Name of the resource.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Name of the resource.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Name of the resource.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Name of the resource.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.GetInstanceRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.GetInstanceRequest) + private static final com.google.cloud.visionai.v1.GetInstanceRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.GetInstanceRequest(); + } + + public static com.google.cloud.visionai.v1.GetInstanceRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetInstanceRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.GetInstanceRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GetInstanceRequestOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GetInstanceRequestOrBuilder.java new file mode 100644 index 000000000000..f28336239a11 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GetInstanceRequestOrBuilder.java @@ -0,0 +1,55 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/platform.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface GetInstanceRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.GetInstanceRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Name of the resource.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. Name of the resource.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GetOperatorRequest.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GetOperatorRequest.java new file mode 100644 index 000000000000..4a7937e10cf8 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GetOperatorRequest.java @@ -0,0 +1,639 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/lva_service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * Message for getting a Operator.
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.GetOperatorRequest} + */ +public final class GetOperatorRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.GetOperatorRequest) + GetOperatorRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetOperatorRequest.newBuilder() to construct. + private GetOperatorRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetOperatorRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetOperatorRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.LvaServiceProto + .internal_static_google_cloud_visionai_v1_GetOperatorRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.LvaServiceProto + .internal_static_google_cloud_visionai_v1_GetOperatorRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.GetOperatorRequest.class, + com.google.cloud.visionai.v1.GetOperatorRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Required. Name of the resource.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + 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(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Name of the resource.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += getUnknownFields().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.visionai.v1.GetOperatorRequest)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.GetOperatorRequest other = + (com.google.cloud.visionai.v1.GetOperatorRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.GetOperatorRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.GetOperatorRequest 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.visionai.v1.GetOperatorRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.GetOperatorRequest 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.visionai.v1.GetOperatorRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.GetOperatorRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.GetOperatorRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.GetOperatorRequest 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.visionai.v1.GetOperatorRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.GetOperatorRequest 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.visionai.v1.GetOperatorRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.GetOperatorRequest 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.visionai.v1.GetOperatorRequest 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; + } + /** + * + * + *
+   * Message for getting a Operator.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.GetOperatorRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.GetOperatorRequest) + com.google.cloud.visionai.v1.GetOperatorRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.LvaServiceProto + .internal_static_google_cloud_visionai_v1_GetOperatorRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.LvaServiceProto + .internal_static_google_cloud_visionai_v1_GetOperatorRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.GetOperatorRequest.class, + com.google.cloud.visionai.v1.GetOperatorRequest.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.GetOperatorRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.LvaServiceProto + .internal_static_google_cloud_visionai_v1_GetOperatorRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.GetOperatorRequest getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.GetOperatorRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.GetOperatorRequest build() { + com.google.cloud.visionai.v1.GetOperatorRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.GetOperatorRequest buildPartial() { + com.google.cloud.visionai.v1.GetOperatorRequest result = + new com.google.cloud.visionai.v1.GetOperatorRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.visionai.v1.GetOperatorRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.GetOperatorRequest) { + return mergeFrom((com.google.cloud.visionai.v1.GetOperatorRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.GetOperatorRequest other) { + if (other == com.google.cloud.visionai.v1.GetOperatorRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. Name of the resource.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Name of the resource.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Name of the resource.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Name of the resource.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Name of the resource.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.GetOperatorRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.GetOperatorRequest) + private static final com.google.cloud.visionai.v1.GetOperatorRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.GetOperatorRequest(); + } + + public static com.google.cloud.visionai.v1.GetOperatorRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetOperatorRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.GetOperatorRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GetOperatorRequestOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GetOperatorRequestOrBuilder.java new file mode 100644 index 000000000000..76487b2af52b --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GetOperatorRequestOrBuilder.java @@ -0,0 +1,55 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/lva_service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface GetOperatorRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.GetOperatorRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Name of the resource.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. Name of the resource.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GetProcessRequest.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GetProcessRequest.java new file mode 100644 index 000000000000..53f4f9730710 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GetProcessRequest.java @@ -0,0 +1,638 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/lva_service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * Message for getting a Process.
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.GetProcessRequest} + */ +public final class GetProcessRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.GetProcessRequest) + GetProcessRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetProcessRequest.newBuilder() to construct. + private GetProcessRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetProcessRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetProcessRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.LvaServiceProto + .internal_static_google_cloud_visionai_v1_GetProcessRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.LvaServiceProto + .internal_static_google_cloud_visionai_v1_GetProcessRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.GetProcessRequest.class, + com.google.cloud.visionai.v1.GetProcessRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Required. Name of the resource.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + 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(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Name of the resource.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += getUnknownFields().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.visionai.v1.GetProcessRequest)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.GetProcessRequest other = + (com.google.cloud.visionai.v1.GetProcessRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.GetProcessRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.GetProcessRequest 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.visionai.v1.GetProcessRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.GetProcessRequest 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.visionai.v1.GetProcessRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.GetProcessRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.GetProcessRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.GetProcessRequest 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.visionai.v1.GetProcessRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.GetProcessRequest 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.visionai.v1.GetProcessRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.GetProcessRequest 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.visionai.v1.GetProcessRequest 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; + } + /** + * + * + *
+   * Message for getting a Process.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.GetProcessRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.GetProcessRequest) + com.google.cloud.visionai.v1.GetProcessRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.LvaServiceProto + .internal_static_google_cloud_visionai_v1_GetProcessRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.LvaServiceProto + .internal_static_google_cloud_visionai_v1_GetProcessRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.GetProcessRequest.class, + com.google.cloud.visionai.v1.GetProcessRequest.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.GetProcessRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.LvaServiceProto + .internal_static_google_cloud_visionai_v1_GetProcessRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.GetProcessRequest getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.GetProcessRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.GetProcessRequest build() { + com.google.cloud.visionai.v1.GetProcessRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.GetProcessRequest buildPartial() { + com.google.cloud.visionai.v1.GetProcessRequest result = + new com.google.cloud.visionai.v1.GetProcessRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.visionai.v1.GetProcessRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.GetProcessRequest) { + return mergeFrom((com.google.cloud.visionai.v1.GetProcessRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.GetProcessRequest other) { + if (other == com.google.cloud.visionai.v1.GetProcessRequest.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. Name of the resource.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Name of the resource.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Name of the resource.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Name of the resource.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Name of the resource.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.GetProcessRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.GetProcessRequest) + private static final com.google.cloud.visionai.v1.GetProcessRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.GetProcessRequest(); + } + + public static com.google.cloud.visionai.v1.GetProcessRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetProcessRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.GetProcessRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GetProcessRequestOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GetProcessRequestOrBuilder.java new file mode 100644 index 000000000000..129e8effe75f --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GetProcessRequestOrBuilder.java @@ -0,0 +1,55 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/lva_service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface GetProcessRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.GetProcessRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Name of the resource.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. Name of the resource.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GetProcessorRequest.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GetProcessorRequest.java new file mode 100644 index 000000000000..a48b7b088f4f --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GetProcessorRequest.java @@ -0,0 +1,639 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/platform.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * Message for getting a Processor.
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.GetProcessorRequest} + */ +public final class GetProcessorRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.GetProcessorRequest) + GetProcessorRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetProcessorRequest.newBuilder() to construct. + private GetProcessorRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetProcessorRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetProcessorRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_GetProcessorRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_GetProcessorRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.GetProcessorRequest.class, + com.google.cloud.visionai.v1.GetProcessorRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Required. Name of the resource.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + 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(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Name of the resource.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += getUnknownFields().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.visionai.v1.GetProcessorRequest)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.GetProcessorRequest other = + (com.google.cloud.visionai.v1.GetProcessorRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.GetProcessorRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.GetProcessorRequest 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.visionai.v1.GetProcessorRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.GetProcessorRequest 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.visionai.v1.GetProcessorRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.GetProcessorRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.GetProcessorRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.GetProcessorRequest 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.visionai.v1.GetProcessorRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.GetProcessorRequest 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.visionai.v1.GetProcessorRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.GetProcessorRequest 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.visionai.v1.GetProcessorRequest 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; + } + /** + * + * + *
+   * Message for getting a Processor.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.GetProcessorRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.GetProcessorRequest) + com.google.cloud.visionai.v1.GetProcessorRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_GetProcessorRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_GetProcessorRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.GetProcessorRequest.class, + com.google.cloud.visionai.v1.GetProcessorRequest.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.GetProcessorRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_GetProcessorRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.GetProcessorRequest getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.GetProcessorRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.GetProcessorRequest build() { + com.google.cloud.visionai.v1.GetProcessorRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.GetProcessorRequest buildPartial() { + com.google.cloud.visionai.v1.GetProcessorRequest result = + new com.google.cloud.visionai.v1.GetProcessorRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.visionai.v1.GetProcessorRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.GetProcessorRequest) { + return mergeFrom((com.google.cloud.visionai.v1.GetProcessorRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.GetProcessorRequest other) { + if (other == com.google.cloud.visionai.v1.GetProcessorRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. Name of the resource.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Name of the resource.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Name of the resource.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Name of the resource.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Name of the resource.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.GetProcessorRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.GetProcessorRequest) + private static final com.google.cloud.visionai.v1.GetProcessorRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.GetProcessorRequest(); + } + + public static com.google.cloud.visionai.v1.GetProcessorRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetProcessorRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.GetProcessorRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GetProcessorRequestOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GetProcessorRequestOrBuilder.java new file mode 100644 index 000000000000..ee7c75cfdaec --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GetProcessorRequestOrBuilder.java @@ -0,0 +1,55 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/platform.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface GetProcessorRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.GetProcessorRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Name of the resource.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. Name of the resource.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GetSearchConfigRequest.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GetSearchConfigRequest.java new file mode 100644 index 000000000000..da1b2d17de4f --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GetSearchConfigRequest.java @@ -0,0 +1,653 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/warehouse.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * Request message for GetSearchConfig.
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.GetSearchConfigRequest} + */ +public final class GetSearchConfigRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.GetSearchConfigRequest) + GetSearchConfigRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetSearchConfigRequest.newBuilder() to construct. + private GetSearchConfigRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetSearchConfigRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetSearchConfigRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_GetSearchConfigRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_GetSearchConfigRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.GetSearchConfigRequest.class, + com.google.cloud.visionai.v1.GetSearchConfigRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Required. The name of the search configuration to retrieve.
+   * Format:
+   * `projects/{project_number}/locations/{location}/corpora/{corpus}/searchConfigs/{search_config}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + 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(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The name of the search configuration to retrieve.
+   * Format:
+   * `projects/{project_number}/locations/{location}/corpora/{corpus}/searchConfigs/{search_config}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += getUnknownFields().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.visionai.v1.GetSearchConfigRequest)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.GetSearchConfigRequest other = + (com.google.cloud.visionai.v1.GetSearchConfigRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.GetSearchConfigRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.GetSearchConfigRequest 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.visionai.v1.GetSearchConfigRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.GetSearchConfigRequest 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.visionai.v1.GetSearchConfigRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.GetSearchConfigRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.GetSearchConfigRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.GetSearchConfigRequest 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.visionai.v1.GetSearchConfigRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.GetSearchConfigRequest 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.visionai.v1.GetSearchConfigRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.GetSearchConfigRequest 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.visionai.v1.GetSearchConfigRequest 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; + } + /** + * + * + *
+   * Request message for GetSearchConfig.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.GetSearchConfigRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.GetSearchConfigRequest) + com.google.cloud.visionai.v1.GetSearchConfigRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_GetSearchConfigRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_GetSearchConfigRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.GetSearchConfigRequest.class, + com.google.cloud.visionai.v1.GetSearchConfigRequest.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.GetSearchConfigRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_GetSearchConfigRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.GetSearchConfigRequest getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.GetSearchConfigRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.GetSearchConfigRequest build() { + com.google.cloud.visionai.v1.GetSearchConfigRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.GetSearchConfigRequest buildPartial() { + com.google.cloud.visionai.v1.GetSearchConfigRequest result = + new com.google.cloud.visionai.v1.GetSearchConfigRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.visionai.v1.GetSearchConfigRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.GetSearchConfigRequest) { + return mergeFrom((com.google.cloud.visionai.v1.GetSearchConfigRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.GetSearchConfigRequest other) { + if (other == com.google.cloud.visionai.v1.GetSearchConfigRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. The name of the search configuration to retrieve.
+     * Format:
+     * `projects/{project_number}/locations/{location}/corpora/{corpus}/searchConfigs/{search_config}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The name of the search configuration to retrieve.
+     * Format:
+     * `projects/{project_number}/locations/{location}/corpora/{corpus}/searchConfigs/{search_config}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The name of the search configuration to retrieve.
+     * Format:
+     * `projects/{project_number}/locations/{location}/corpora/{corpus}/searchConfigs/{search_config}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the search configuration to retrieve.
+     * Format:
+     * `projects/{project_number}/locations/{location}/corpora/{corpus}/searchConfigs/{search_config}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the search configuration to retrieve.
+     * Format:
+     * `projects/{project_number}/locations/{location}/corpora/{corpus}/searchConfigs/{search_config}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.GetSearchConfigRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.GetSearchConfigRequest) + private static final com.google.cloud.visionai.v1.GetSearchConfigRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.GetSearchConfigRequest(); + } + + public static com.google.cloud.visionai.v1.GetSearchConfigRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetSearchConfigRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.GetSearchConfigRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GetSearchConfigRequestOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GetSearchConfigRequestOrBuilder.java new file mode 100644 index 000000000000..c7b9933f5708 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GetSearchConfigRequestOrBuilder.java @@ -0,0 +1,59 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/warehouse.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface GetSearchConfigRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.GetSearchConfigRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the search configuration to retrieve.
+   * Format:
+   * `projects/{project_number}/locations/{location}/corpora/{corpus}/searchConfigs/{search_config}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The name of the search configuration to retrieve.
+   * Format:
+   * `projects/{project_number}/locations/{location}/corpora/{corpus}/searchConfigs/{search_config}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GetSearchHypernymRequest.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GetSearchHypernymRequest.java new file mode 100644 index 000000000000..824e1435100b --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GetSearchHypernymRequest.java @@ -0,0 +1,654 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/warehouse.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * Request message for getting SearchHypernym.
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.GetSearchHypernymRequest} + */ +public final class GetSearchHypernymRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.GetSearchHypernymRequest) + GetSearchHypernymRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetSearchHypernymRequest.newBuilder() to construct. + private GetSearchHypernymRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetSearchHypernymRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetSearchHypernymRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_GetSearchHypernymRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_GetSearchHypernymRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.GetSearchHypernymRequest.class, + com.google.cloud.visionai.v1.GetSearchHypernymRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Required. The name of the SearchHypernym to retrieve.
+   * Format:
+   * `projects/{project_number}/locations/{location}/corpora/{corpus}/searchHypernyms/{search_hypernym}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + 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(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The name of the SearchHypernym to retrieve.
+   * Format:
+   * `projects/{project_number}/locations/{location}/corpora/{corpus}/searchHypernyms/{search_hypernym}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += getUnknownFields().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.visionai.v1.GetSearchHypernymRequest)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.GetSearchHypernymRequest other = + (com.google.cloud.visionai.v1.GetSearchHypernymRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.GetSearchHypernymRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.GetSearchHypernymRequest 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.visionai.v1.GetSearchHypernymRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.GetSearchHypernymRequest 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.visionai.v1.GetSearchHypernymRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.GetSearchHypernymRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.GetSearchHypernymRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.GetSearchHypernymRequest 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.visionai.v1.GetSearchHypernymRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.GetSearchHypernymRequest 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.visionai.v1.GetSearchHypernymRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.GetSearchHypernymRequest 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.visionai.v1.GetSearchHypernymRequest 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; + } + /** + * + * + *
+   * Request message for getting SearchHypernym.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.GetSearchHypernymRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.GetSearchHypernymRequest) + com.google.cloud.visionai.v1.GetSearchHypernymRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_GetSearchHypernymRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_GetSearchHypernymRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.GetSearchHypernymRequest.class, + com.google.cloud.visionai.v1.GetSearchHypernymRequest.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.GetSearchHypernymRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_GetSearchHypernymRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.GetSearchHypernymRequest getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.GetSearchHypernymRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.GetSearchHypernymRequest build() { + com.google.cloud.visionai.v1.GetSearchHypernymRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.GetSearchHypernymRequest buildPartial() { + com.google.cloud.visionai.v1.GetSearchHypernymRequest result = + new com.google.cloud.visionai.v1.GetSearchHypernymRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.visionai.v1.GetSearchHypernymRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.GetSearchHypernymRequest) { + return mergeFrom((com.google.cloud.visionai.v1.GetSearchHypernymRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.GetSearchHypernymRequest other) { + if (other == com.google.cloud.visionai.v1.GetSearchHypernymRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. The name of the SearchHypernym to retrieve.
+     * Format:
+     * `projects/{project_number}/locations/{location}/corpora/{corpus}/searchHypernyms/{search_hypernym}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The name of the SearchHypernym to retrieve.
+     * Format:
+     * `projects/{project_number}/locations/{location}/corpora/{corpus}/searchHypernyms/{search_hypernym}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The name of the SearchHypernym to retrieve.
+     * Format:
+     * `projects/{project_number}/locations/{location}/corpora/{corpus}/searchHypernyms/{search_hypernym}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the SearchHypernym to retrieve.
+     * Format:
+     * `projects/{project_number}/locations/{location}/corpora/{corpus}/searchHypernyms/{search_hypernym}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the SearchHypernym to retrieve.
+     * Format:
+     * `projects/{project_number}/locations/{location}/corpora/{corpus}/searchHypernyms/{search_hypernym}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.GetSearchHypernymRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.GetSearchHypernymRequest) + private static final com.google.cloud.visionai.v1.GetSearchHypernymRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.GetSearchHypernymRequest(); + } + + public static com.google.cloud.visionai.v1.GetSearchHypernymRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetSearchHypernymRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.GetSearchHypernymRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GetSearchHypernymRequestOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GetSearchHypernymRequestOrBuilder.java new file mode 100644 index 000000000000..638914087be6 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GetSearchHypernymRequestOrBuilder.java @@ -0,0 +1,59 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/warehouse.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface GetSearchHypernymRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.GetSearchHypernymRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the SearchHypernym to retrieve.
+   * Format:
+   * `projects/{project_number}/locations/{location}/corpora/{corpus}/searchHypernyms/{search_hypernym}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The name of the SearchHypernym to retrieve.
+   * Format:
+   * `projects/{project_number}/locations/{location}/corpora/{corpus}/searchHypernyms/{search_hypernym}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GetSeriesRequest.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GetSeriesRequest.java new file mode 100644 index 000000000000..8bee24e87107 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GetSeriesRequest.java @@ -0,0 +1,638 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/streams_service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * Message for getting a Series.
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.GetSeriesRequest} + */ +public final class GetSeriesRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.GetSeriesRequest) + GetSeriesRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetSeriesRequest.newBuilder() to construct. + private GetSeriesRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetSeriesRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetSeriesRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.StreamsServiceProto + .internal_static_google_cloud_visionai_v1_GetSeriesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.StreamsServiceProto + .internal_static_google_cloud_visionai_v1_GetSeriesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.GetSeriesRequest.class, + com.google.cloud.visionai.v1.GetSeriesRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Required. Name of the resource.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + 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(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Name of the resource.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += getUnknownFields().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.visionai.v1.GetSeriesRequest)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.GetSeriesRequest other = + (com.google.cloud.visionai.v1.GetSeriesRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.GetSeriesRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.GetSeriesRequest 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.visionai.v1.GetSeriesRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.GetSeriesRequest 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.visionai.v1.GetSeriesRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.GetSeriesRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.GetSeriesRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.GetSeriesRequest 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.visionai.v1.GetSeriesRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.GetSeriesRequest 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.visionai.v1.GetSeriesRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.GetSeriesRequest 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.visionai.v1.GetSeriesRequest 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; + } + /** + * + * + *
+   * Message for getting a Series.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.GetSeriesRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.GetSeriesRequest) + com.google.cloud.visionai.v1.GetSeriesRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.StreamsServiceProto + .internal_static_google_cloud_visionai_v1_GetSeriesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.StreamsServiceProto + .internal_static_google_cloud_visionai_v1_GetSeriesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.GetSeriesRequest.class, + com.google.cloud.visionai.v1.GetSeriesRequest.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.GetSeriesRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.StreamsServiceProto + .internal_static_google_cloud_visionai_v1_GetSeriesRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.GetSeriesRequest getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.GetSeriesRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.GetSeriesRequest build() { + com.google.cloud.visionai.v1.GetSeriesRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.GetSeriesRequest buildPartial() { + com.google.cloud.visionai.v1.GetSeriesRequest result = + new com.google.cloud.visionai.v1.GetSeriesRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.visionai.v1.GetSeriesRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.GetSeriesRequest) { + return mergeFrom((com.google.cloud.visionai.v1.GetSeriesRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.GetSeriesRequest other) { + if (other == com.google.cloud.visionai.v1.GetSeriesRequest.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. Name of the resource.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Name of the resource.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Name of the resource.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Name of the resource.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Name of the resource.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.GetSeriesRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.GetSeriesRequest) + private static final com.google.cloud.visionai.v1.GetSeriesRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.GetSeriesRequest(); + } + + public static com.google.cloud.visionai.v1.GetSeriesRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetSeriesRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.GetSeriesRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GetSeriesRequestOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GetSeriesRequestOrBuilder.java new file mode 100644 index 000000000000..b92c4f595a77 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GetSeriesRequestOrBuilder.java @@ -0,0 +1,55 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/streams_service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface GetSeriesRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.GetSeriesRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Name of the resource.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. Name of the resource.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GetStreamRequest.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GetStreamRequest.java new file mode 100644 index 000000000000..502cd8a86200 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GetStreamRequest.java @@ -0,0 +1,638 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/streams_service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * Message for getting a Stream.
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.GetStreamRequest} + */ +public final class GetStreamRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.GetStreamRequest) + GetStreamRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetStreamRequest.newBuilder() to construct. + private GetStreamRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetStreamRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetStreamRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.StreamsServiceProto + .internal_static_google_cloud_visionai_v1_GetStreamRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.StreamsServiceProto + .internal_static_google_cloud_visionai_v1_GetStreamRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.GetStreamRequest.class, + com.google.cloud.visionai.v1.GetStreamRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Required. Name of the resource.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + 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(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Name of the resource.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += getUnknownFields().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.visionai.v1.GetStreamRequest)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.GetStreamRequest other = + (com.google.cloud.visionai.v1.GetStreamRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.GetStreamRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.GetStreamRequest 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.visionai.v1.GetStreamRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.GetStreamRequest 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.visionai.v1.GetStreamRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.GetStreamRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.GetStreamRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.GetStreamRequest 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.visionai.v1.GetStreamRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.GetStreamRequest 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.visionai.v1.GetStreamRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.GetStreamRequest 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.visionai.v1.GetStreamRequest 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; + } + /** + * + * + *
+   * Message for getting a Stream.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.GetStreamRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.GetStreamRequest) + com.google.cloud.visionai.v1.GetStreamRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.StreamsServiceProto + .internal_static_google_cloud_visionai_v1_GetStreamRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.StreamsServiceProto + .internal_static_google_cloud_visionai_v1_GetStreamRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.GetStreamRequest.class, + com.google.cloud.visionai.v1.GetStreamRequest.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.GetStreamRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.StreamsServiceProto + .internal_static_google_cloud_visionai_v1_GetStreamRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.GetStreamRequest getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.GetStreamRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.GetStreamRequest build() { + com.google.cloud.visionai.v1.GetStreamRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.GetStreamRequest buildPartial() { + com.google.cloud.visionai.v1.GetStreamRequest result = + new com.google.cloud.visionai.v1.GetStreamRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.visionai.v1.GetStreamRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.GetStreamRequest) { + return mergeFrom((com.google.cloud.visionai.v1.GetStreamRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.GetStreamRequest other) { + if (other == com.google.cloud.visionai.v1.GetStreamRequest.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. Name of the resource.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Name of the resource.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Name of the resource.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Name of the resource.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Name of the resource.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.GetStreamRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.GetStreamRequest) + private static final com.google.cloud.visionai.v1.GetStreamRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.GetStreamRequest(); + } + + public static com.google.cloud.visionai.v1.GetStreamRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetStreamRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.GetStreamRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GetStreamRequestOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GetStreamRequestOrBuilder.java new file mode 100644 index 000000000000..0525b6ba21d0 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GetStreamRequestOrBuilder.java @@ -0,0 +1,55 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/streams_service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface GetStreamRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.GetStreamRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Name of the resource.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. Name of the resource.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GetStreamThumbnailRequest.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GetStreamThumbnailRequest.java new file mode 100644 index 000000000000..bf2ec41e3308 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GetStreamThumbnailRequest.java @@ -0,0 +1,1263 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/streams_service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * Message for getting the thumbnail of a Stream.
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.GetStreamThumbnailRequest} + */ +public final class GetStreamThumbnailRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.GetStreamThumbnailRequest) + GetStreamThumbnailRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetStreamThumbnailRequest.newBuilder() to construct. + private GetStreamThumbnailRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetStreamThumbnailRequest() { + stream_ = ""; + gcsObjectName_ = ""; + event_ = ""; + requestId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetStreamThumbnailRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.StreamsServiceProto + .internal_static_google_cloud_visionai_v1_GetStreamThumbnailRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.StreamsServiceProto + .internal_static_google_cloud_visionai_v1_GetStreamThumbnailRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.GetStreamThumbnailRequest.class, + com.google.cloud.visionai.v1.GetStreamThumbnailRequest.Builder.class); + } + + public static final int STREAM_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object stream_ = ""; + /** + * + * + *
+   * Required. The name of the stream for to get the thumbnail from.
+   * 
+ * + * string stream = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The stream. + */ + @java.lang.Override + public java.lang.String getStream() { + java.lang.Object ref = stream_; + 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(); + stream_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The name of the stream for to get the thumbnail from.
+   * 
+ * + * string stream = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for stream. + */ + @java.lang.Override + public com.google.protobuf.ByteString getStreamBytes() { + java.lang.Object ref = stream_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + stream_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int GCS_OBJECT_NAME_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object gcsObjectName_ = ""; + /** + * + * + *
+   * Required. The name of the GCS object to store the thumbnail image.
+   * 
+ * + * string gcs_object_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The gcsObjectName. + */ + @java.lang.Override + public java.lang.String getGcsObjectName() { + java.lang.Object ref = gcsObjectName_; + 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(); + gcsObjectName_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The name of the GCS object to store the thumbnail image.
+   * 
+ * + * string gcs_object_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for gcsObjectName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getGcsObjectNameBytes() { + java.lang.Object ref = gcsObjectName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + gcsObjectName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int EVENT_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object event_ = ""; + /** + * + * + *
+   * Optional. The name of the event. If unspecified, the thumbnail will be
+   * retrieved from the latest event.
+   * 
+ * + * string event = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The event. + */ + @java.lang.Override + public java.lang.String getEvent() { + java.lang.Object ref = event_; + 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(); + event_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. The name of the event. If unspecified, the thumbnail will be
+   * retrieved from the latest event.
+   * 
+ * + * string event = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for event. + */ + @java.lang.Override + public com.google.protobuf.ByteString getEventBytes() { + java.lang.Object ref = event_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + event_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int REQUEST_ID_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object requestId_ = ""; + /** + * + * + *
+   * Optional. An optional request ID to identify the requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request ID,
+   * the server can check if original operation with the same request ID was
+   * received, and if so, will ignore the second request. This prevents clients
+   * from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + @java.lang.Override + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + 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(); + requestId_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. An optional request ID to identify the requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request ID,
+   * the server can check if original operation with the same request ID was
+   * received, and if so, will ignore the second request. This prevents clients
+   * from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(stream_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, stream_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(gcsObjectName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, gcsObjectName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(event_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, event_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, requestId_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(stream_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, stream_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(gcsObjectName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, gcsObjectName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(event_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, event_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, requestId_); + } + size += getUnknownFields().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.visionai.v1.GetStreamThumbnailRequest)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.GetStreamThumbnailRequest other = + (com.google.cloud.visionai.v1.GetStreamThumbnailRequest) obj; + + if (!getStream().equals(other.getStream())) return false; + if (!getGcsObjectName().equals(other.getGcsObjectName())) return false; + if (!getEvent().equals(other.getEvent())) return false; + if (!getRequestId().equals(other.getRequestId())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + STREAM_FIELD_NUMBER; + hash = (53 * hash) + getStream().hashCode(); + hash = (37 * hash) + GCS_OBJECT_NAME_FIELD_NUMBER; + hash = (53 * hash) + getGcsObjectName().hashCode(); + hash = (37 * hash) + EVENT_FIELD_NUMBER; + hash = (53 * hash) + getEvent().hashCode(); + hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; + hash = (53 * hash) + getRequestId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.GetStreamThumbnailRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.GetStreamThumbnailRequest 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.visionai.v1.GetStreamThumbnailRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.GetStreamThumbnailRequest 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.visionai.v1.GetStreamThumbnailRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.GetStreamThumbnailRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.GetStreamThumbnailRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.GetStreamThumbnailRequest 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.visionai.v1.GetStreamThumbnailRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.GetStreamThumbnailRequest 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.visionai.v1.GetStreamThumbnailRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.GetStreamThumbnailRequest 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.visionai.v1.GetStreamThumbnailRequest 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; + } + /** + * + * + *
+   * Message for getting the thumbnail of a Stream.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.GetStreamThumbnailRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.GetStreamThumbnailRequest) + com.google.cloud.visionai.v1.GetStreamThumbnailRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.StreamsServiceProto + .internal_static_google_cloud_visionai_v1_GetStreamThumbnailRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.StreamsServiceProto + .internal_static_google_cloud_visionai_v1_GetStreamThumbnailRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.GetStreamThumbnailRequest.class, + com.google.cloud.visionai.v1.GetStreamThumbnailRequest.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.GetStreamThumbnailRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + stream_ = ""; + gcsObjectName_ = ""; + event_ = ""; + requestId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.StreamsServiceProto + .internal_static_google_cloud_visionai_v1_GetStreamThumbnailRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.GetStreamThumbnailRequest getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.GetStreamThumbnailRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.GetStreamThumbnailRequest build() { + com.google.cloud.visionai.v1.GetStreamThumbnailRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.GetStreamThumbnailRequest buildPartial() { + com.google.cloud.visionai.v1.GetStreamThumbnailRequest result = + new com.google.cloud.visionai.v1.GetStreamThumbnailRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.visionai.v1.GetStreamThumbnailRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.stream_ = stream_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.gcsObjectName_ = gcsObjectName_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.event_ = event_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.requestId_ = requestId_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.GetStreamThumbnailRequest) { + return mergeFrom((com.google.cloud.visionai.v1.GetStreamThumbnailRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.GetStreamThumbnailRequest other) { + if (other == com.google.cloud.visionai.v1.GetStreamThumbnailRequest.getDefaultInstance()) + return this; + if (!other.getStream().isEmpty()) { + stream_ = other.stream_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getGcsObjectName().isEmpty()) { + gcsObjectName_ = other.gcsObjectName_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getEvent().isEmpty()) { + event_ = other.event_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getRequestId().isEmpty()) { + requestId_ = other.requestId_; + bitField0_ |= 0x00000008; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + stream_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + gcsObjectName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + event_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object stream_ = ""; + /** + * + * + *
+     * Required. The name of the stream for to get the thumbnail from.
+     * 
+ * + * string stream = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The stream. + */ + public java.lang.String getStream() { + java.lang.Object ref = stream_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + stream_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The name of the stream for to get the thumbnail from.
+     * 
+ * + * string stream = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for stream. + */ + public com.google.protobuf.ByteString getStreamBytes() { + java.lang.Object ref = stream_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + stream_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The name of the stream for to get the thumbnail from.
+     * 
+ * + * string stream = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The stream to set. + * @return This builder for chaining. + */ + public Builder setStream(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + stream_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the stream for to get the thumbnail from.
+     * 
+ * + * string stream = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearStream() { + stream_ = getDefaultInstance().getStream(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the stream for to get the thumbnail from.
+     * 
+ * + * string stream = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for stream to set. + * @return This builder for chaining. + */ + public Builder setStreamBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + stream_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object gcsObjectName_ = ""; + /** + * + * + *
+     * Required. The name of the GCS object to store the thumbnail image.
+     * 
+ * + * string gcs_object_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The gcsObjectName. + */ + public java.lang.String getGcsObjectName() { + java.lang.Object ref = gcsObjectName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + gcsObjectName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The name of the GCS object to store the thumbnail image.
+     * 
+ * + * string gcs_object_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for gcsObjectName. + */ + public com.google.protobuf.ByteString getGcsObjectNameBytes() { + java.lang.Object ref = gcsObjectName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + gcsObjectName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The name of the GCS object to store the thumbnail image.
+     * 
+ * + * string gcs_object_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The gcsObjectName to set. + * @return This builder for chaining. + */ + public Builder setGcsObjectName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + gcsObjectName_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the GCS object to store the thumbnail image.
+     * 
+ * + * string gcs_object_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearGcsObjectName() { + gcsObjectName_ = getDefaultInstance().getGcsObjectName(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the GCS object to store the thumbnail image.
+     * 
+ * + * string gcs_object_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for gcsObjectName to set. + * @return This builder for chaining. + */ + public Builder setGcsObjectNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + gcsObjectName_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object event_ = ""; + /** + * + * + *
+     * Optional. The name of the event. If unspecified, the thumbnail will be
+     * retrieved from the latest event.
+     * 
+ * + * string event = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The event. + */ + public java.lang.String getEvent() { + java.lang.Object ref = event_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + event_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. The name of the event. If unspecified, the thumbnail will be
+     * retrieved from the latest event.
+     * 
+ * + * string event = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for event. + */ + public com.google.protobuf.ByteString getEventBytes() { + java.lang.Object ref = event_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + event_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. The name of the event. If unspecified, the thumbnail will be
+     * retrieved from the latest event.
+     * 
+ * + * string event = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The event to set. + * @return This builder for chaining. + */ + public Builder setEvent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + event_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The name of the event. If unspecified, the thumbnail will be
+     * retrieved from the latest event.
+     * 
+ * + * string event = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearEvent() { + event_ = getDefaultInstance().getEvent(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The name of the event. If unspecified, the thumbnail will be
+     * retrieved from the latest event.
+     * 
+ * + * string event = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for event to set. + * @return This builder for chaining. + */ + public Builder setEventBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + event_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object requestId_ = ""; + /** + * + * + *
+     * Optional. An optional request ID to identify the requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request ID,
+     * the server can check if original operation with the same request ID was
+     * received, and if so, will ignore the second request. This prevents clients
+     * from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. An optional request ID to identify the requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request ID,
+     * the server can check if original operation with the same request ID was
+     * received, and if so, will ignore the second request. This prevents clients
+     * from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. An optional request ID to identify the requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request ID,
+     * the server can check if original operation with the same request ID was
+     * received, and if so, will ignore the second request. This prevents clients
+     * from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + requestId_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. An optional request ID to identify the requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request ID,
+     * the server can check if original operation with the same request ID was
+     * received, and if so, will ignore the second request. This prevents clients
+     * from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearRequestId() { + requestId_ = getDefaultInstance().getRequestId(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. An optional request ID to identify the requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request ID,
+     * the server can check if original operation with the same request ID was
+     * received, and if so, will ignore the second request. This prevents clients
+     * from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + requestId_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.GetStreamThumbnailRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.GetStreamThumbnailRequest) + private static final com.google.cloud.visionai.v1.GetStreamThumbnailRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.GetStreamThumbnailRequest(); + } + + public static com.google.cloud.visionai.v1.GetStreamThumbnailRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetStreamThumbnailRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.GetStreamThumbnailRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GetStreamThumbnailRequestOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GetStreamThumbnailRequestOrBuilder.java new file mode 100644 index 000000000000..e11f0591c781 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GetStreamThumbnailRequestOrBuilder.java @@ -0,0 +1,152 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/streams_service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface GetStreamThumbnailRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.GetStreamThumbnailRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the stream for to get the thumbnail from.
+   * 
+ * + * string stream = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The stream. + */ + java.lang.String getStream(); + /** + * + * + *
+   * Required. The name of the stream for to get the thumbnail from.
+   * 
+ * + * string stream = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for stream. + */ + com.google.protobuf.ByteString getStreamBytes(); + + /** + * + * + *
+   * Required. The name of the GCS object to store the thumbnail image.
+   * 
+ * + * string gcs_object_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The gcsObjectName. + */ + java.lang.String getGcsObjectName(); + /** + * + * + *
+   * Required. The name of the GCS object to store the thumbnail image.
+   * 
+ * + * string gcs_object_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for gcsObjectName. + */ + com.google.protobuf.ByteString getGcsObjectNameBytes(); + + /** + * + * + *
+   * Optional. The name of the event. If unspecified, the thumbnail will be
+   * retrieved from the latest event.
+   * 
+ * + * string event = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The event. + */ + java.lang.String getEvent(); + /** + * + * + *
+   * Optional. The name of the event. If unspecified, the thumbnail will be
+   * retrieved from the latest event.
+   * 
+ * + * string event = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for event. + */ + com.google.protobuf.ByteString getEventBytes(); + + /** + * + * + *
+   * Optional. An optional request ID to identify the requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request ID,
+   * the server can check if original operation with the same request ID was
+   * received, and if so, will ignore the second request. This prevents clients
+   * from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + java.lang.String getRequestId(); + /** + * + * + *
+   * Optional. An optional request ID to identify the requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request ID,
+   * the server can check if original operation with the same request ID was
+   * received, and if so, will ignore the second request. This prevents clients
+   * from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + com.google.protobuf.ByteString getRequestIdBytes(); +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GetStreamThumbnailResponse.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GetStreamThumbnailResponse.java new file mode 100644 index 000000000000..c4bf6fb0ce6e --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GetStreamThumbnailResponse.java @@ -0,0 +1,435 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/streams_service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * Message for the response of GetStreamThumbnail. The empty response message
+ * indicates the thumbnail image has been uploaded to GCS successfully.
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.GetStreamThumbnailResponse} + */ +public final class GetStreamThumbnailResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.GetStreamThumbnailResponse) + GetStreamThumbnailResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetStreamThumbnailResponse.newBuilder() to construct. + private GetStreamThumbnailResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetStreamThumbnailResponse() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetStreamThumbnailResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.StreamsServiceProto + .internal_static_google_cloud_visionai_v1_GetStreamThumbnailResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.StreamsServiceProto + .internal_static_google_cloud_visionai_v1_GetStreamThumbnailResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.GetStreamThumbnailResponse.class, + com.google.cloud.visionai.v1.GetStreamThumbnailResponse.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 { + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += getUnknownFields().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.visionai.v1.GetStreamThumbnailResponse)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.GetStreamThumbnailResponse other = + (com.google.cloud.visionai.v1.GetStreamThumbnailResponse) obj; + + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.GetStreamThumbnailResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.GetStreamThumbnailResponse 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.visionai.v1.GetStreamThumbnailResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.GetStreamThumbnailResponse 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.visionai.v1.GetStreamThumbnailResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.GetStreamThumbnailResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.GetStreamThumbnailResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.GetStreamThumbnailResponse 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.visionai.v1.GetStreamThumbnailResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.GetStreamThumbnailResponse 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.visionai.v1.GetStreamThumbnailResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.GetStreamThumbnailResponse 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.visionai.v1.GetStreamThumbnailResponse 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; + } + /** + * + * + *
+   * Message for the response of GetStreamThumbnail. The empty response message
+   * indicates the thumbnail image has been uploaded to GCS successfully.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.GetStreamThumbnailResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.GetStreamThumbnailResponse) + com.google.cloud.visionai.v1.GetStreamThumbnailResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.StreamsServiceProto + .internal_static_google_cloud_visionai_v1_GetStreamThumbnailResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.StreamsServiceProto + .internal_static_google_cloud_visionai_v1_GetStreamThumbnailResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.GetStreamThumbnailResponse.class, + com.google.cloud.visionai.v1.GetStreamThumbnailResponse.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.GetStreamThumbnailResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.StreamsServiceProto + .internal_static_google_cloud_visionai_v1_GetStreamThumbnailResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.GetStreamThumbnailResponse getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.GetStreamThumbnailResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.GetStreamThumbnailResponse build() { + com.google.cloud.visionai.v1.GetStreamThumbnailResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.GetStreamThumbnailResponse buildPartial() { + com.google.cloud.visionai.v1.GetStreamThumbnailResponse result = + new com.google.cloud.visionai.v1.GetStreamThumbnailResponse(this); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.GetStreamThumbnailResponse) { + return mergeFrom((com.google.cloud.visionai.v1.GetStreamThumbnailResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.GetStreamThumbnailResponse other) { + if (other == com.google.cloud.visionai.v1.GetStreamThumbnailResponse.getDefaultInstance()) + return this; + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.GetStreamThumbnailResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.GetStreamThumbnailResponse) + private static final com.google.cloud.visionai.v1.GetStreamThumbnailResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.GetStreamThumbnailResponse(); + } + + public static com.google.cloud.visionai.v1.GetStreamThumbnailResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetStreamThumbnailResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.GetStreamThumbnailResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GetStreamThumbnailResponseOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GetStreamThumbnailResponseOrBuilder.java new file mode 100644 index 000000000000..63dd84bec3ad --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GetStreamThumbnailResponseOrBuilder.java @@ -0,0 +1,25 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/streams_service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface GetStreamThumbnailResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.GetStreamThumbnailResponse) + com.google.protobuf.MessageOrBuilder {} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GstreamerBufferDescriptor.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GstreamerBufferDescriptor.java new file mode 100644 index 000000000000..b629ec6dd18d --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GstreamerBufferDescriptor.java @@ -0,0 +1,1510 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/streaming_resources.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * The descriptor for a gstreamer buffer payload.
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.GstreamerBufferDescriptor} + */ +public final class GstreamerBufferDescriptor extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.GstreamerBufferDescriptor) + GstreamerBufferDescriptorOrBuilder { + private static final long serialVersionUID = 0L; + // Use GstreamerBufferDescriptor.newBuilder() to construct. + private GstreamerBufferDescriptor(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GstreamerBufferDescriptor() { + capsString_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GstreamerBufferDescriptor(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.StreamingResourcesProto + .internal_static_google_cloud_visionai_v1_GstreamerBufferDescriptor_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.StreamingResourcesProto + .internal_static_google_cloud_visionai_v1_GstreamerBufferDescriptor_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.GstreamerBufferDescriptor.class, + com.google.cloud.visionai.v1.GstreamerBufferDescriptor.Builder.class); + } + + private int bitField0_; + public static final int CAPS_STRING_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object capsString_ = ""; + /** + * + * + *
+   * The caps string of the payload.
+   * 
+ * + * string caps_string = 1; + * + * @return The capsString. + */ + @java.lang.Override + public java.lang.String getCapsString() { + java.lang.Object ref = capsString_; + 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(); + capsString_ = s; + return s; + } + } + /** + * + * + *
+   * The caps string of the payload.
+   * 
+ * + * string caps_string = 1; + * + * @return The bytes for capsString. + */ + @java.lang.Override + public com.google.protobuf.ByteString getCapsStringBytes() { + java.lang.Object ref = capsString_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + capsString_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int IS_KEY_FRAME_FIELD_NUMBER = 2; + private boolean isKeyFrame_ = false; + /** + * + * + *
+   * Whether the buffer is a key frame.
+   * 
+ * + * bool is_key_frame = 2; + * + * @return The isKeyFrame. + */ + @java.lang.Override + public boolean getIsKeyFrame() { + return isKeyFrame_; + } + + public static final int PTS_TIME_FIELD_NUMBER = 3; + private com.google.protobuf.Timestamp ptsTime_; + /** + * + * + *
+   * PTS of the frame.
+   * 
+ * + * .google.protobuf.Timestamp pts_time = 3; + * + * @return Whether the ptsTime field is set. + */ + @java.lang.Override + public boolean hasPtsTime() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * PTS of the frame.
+   * 
+ * + * .google.protobuf.Timestamp pts_time = 3; + * + * @return The ptsTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getPtsTime() { + return ptsTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : ptsTime_; + } + /** + * + * + *
+   * PTS of the frame.
+   * 
+ * + * .google.protobuf.Timestamp pts_time = 3; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getPtsTimeOrBuilder() { + return ptsTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : ptsTime_; + } + + public static final int DTS_TIME_FIELD_NUMBER = 4; + private com.google.protobuf.Timestamp dtsTime_; + /** + * + * + *
+   * DTS of the frame.
+   * 
+ * + * .google.protobuf.Timestamp dts_time = 4; + * + * @return Whether the dtsTime field is set. + */ + @java.lang.Override + public boolean hasDtsTime() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+   * DTS of the frame.
+   * 
+ * + * .google.protobuf.Timestamp dts_time = 4; + * + * @return The dtsTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getDtsTime() { + return dtsTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : dtsTime_; + } + /** + * + * + *
+   * DTS of the frame.
+   * 
+ * + * .google.protobuf.Timestamp dts_time = 4; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getDtsTimeOrBuilder() { + return dtsTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : dtsTime_; + } + + public static final int DURATION_FIELD_NUMBER = 5; + private com.google.protobuf.Duration duration_; + /** + * + * + *
+   * Duration of the frame.
+   * 
+ * + * .google.protobuf.Duration duration = 5; + * + * @return Whether the duration field is set. + */ + @java.lang.Override + public boolean hasDuration() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+   * Duration of the frame.
+   * 
+ * + * .google.protobuf.Duration duration = 5; + * + * @return The duration. + */ + @java.lang.Override + public com.google.protobuf.Duration getDuration() { + return duration_ == null ? com.google.protobuf.Duration.getDefaultInstance() : duration_; + } + /** + * + * + *
+   * Duration of the frame.
+   * 
+ * + * .google.protobuf.Duration duration = 5; + */ + @java.lang.Override + public com.google.protobuf.DurationOrBuilder getDurationOrBuilder() { + return duration_ == null ? com.google.protobuf.Duration.getDefaultInstance() : duration_; + } + + 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(capsString_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, capsString_); + } + if (isKeyFrame_ != false) { + output.writeBool(2, isKeyFrame_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(3, getPtsTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(4, getDtsTime()); + } + if (((bitField0_ & 0x00000004) != 0)) { + output.writeMessage(5, getDuration()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(capsString_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, capsString_); + } + if (isKeyFrame_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(2, isKeyFrame_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getPtsTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getDtsTime()); + } + if (((bitField0_ & 0x00000004) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getDuration()); + } + size += getUnknownFields().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.visionai.v1.GstreamerBufferDescriptor)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.GstreamerBufferDescriptor other = + (com.google.cloud.visionai.v1.GstreamerBufferDescriptor) obj; + + if (!getCapsString().equals(other.getCapsString())) return false; + if (getIsKeyFrame() != other.getIsKeyFrame()) return false; + if (hasPtsTime() != other.hasPtsTime()) return false; + if (hasPtsTime()) { + if (!getPtsTime().equals(other.getPtsTime())) return false; + } + if (hasDtsTime() != other.hasDtsTime()) return false; + if (hasDtsTime()) { + if (!getDtsTime().equals(other.getDtsTime())) return false; + } + if (hasDuration() != other.hasDuration()) return false; + if (hasDuration()) { + if (!getDuration().equals(other.getDuration())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + CAPS_STRING_FIELD_NUMBER; + hash = (53 * hash) + getCapsString().hashCode(); + hash = (37 * hash) + IS_KEY_FRAME_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getIsKeyFrame()); + if (hasPtsTime()) { + hash = (37 * hash) + PTS_TIME_FIELD_NUMBER; + hash = (53 * hash) + getPtsTime().hashCode(); + } + if (hasDtsTime()) { + hash = (37 * hash) + DTS_TIME_FIELD_NUMBER; + hash = (53 * hash) + getDtsTime().hashCode(); + } + if (hasDuration()) { + hash = (37 * hash) + DURATION_FIELD_NUMBER; + hash = (53 * hash) + getDuration().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.GstreamerBufferDescriptor parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.GstreamerBufferDescriptor 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.visionai.v1.GstreamerBufferDescriptor parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.GstreamerBufferDescriptor 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.visionai.v1.GstreamerBufferDescriptor parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.GstreamerBufferDescriptor parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.GstreamerBufferDescriptor parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.GstreamerBufferDescriptor 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.visionai.v1.GstreamerBufferDescriptor parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.GstreamerBufferDescriptor 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.visionai.v1.GstreamerBufferDescriptor parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.GstreamerBufferDescriptor 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.visionai.v1.GstreamerBufferDescriptor 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 descriptor for a gstreamer buffer payload.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.GstreamerBufferDescriptor} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.GstreamerBufferDescriptor) + com.google.cloud.visionai.v1.GstreamerBufferDescriptorOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.StreamingResourcesProto + .internal_static_google_cloud_visionai_v1_GstreamerBufferDescriptor_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.StreamingResourcesProto + .internal_static_google_cloud_visionai_v1_GstreamerBufferDescriptor_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.GstreamerBufferDescriptor.class, + com.google.cloud.visionai.v1.GstreamerBufferDescriptor.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.GstreamerBufferDescriptor.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getPtsTimeFieldBuilder(); + getDtsTimeFieldBuilder(); + getDurationFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + capsString_ = ""; + isKeyFrame_ = false; + ptsTime_ = null; + if (ptsTimeBuilder_ != null) { + ptsTimeBuilder_.dispose(); + ptsTimeBuilder_ = null; + } + dtsTime_ = null; + if (dtsTimeBuilder_ != null) { + dtsTimeBuilder_.dispose(); + dtsTimeBuilder_ = null; + } + duration_ = null; + if (durationBuilder_ != null) { + durationBuilder_.dispose(); + durationBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.StreamingResourcesProto + .internal_static_google_cloud_visionai_v1_GstreamerBufferDescriptor_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.GstreamerBufferDescriptor getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.GstreamerBufferDescriptor.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.GstreamerBufferDescriptor build() { + com.google.cloud.visionai.v1.GstreamerBufferDescriptor result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.GstreamerBufferDescriptor buildPartial() { + com.google.cloud.visionai.v1.GstreamerBufferDescriptor result = + new com.google.cloud.visionai.v1.GstreamerBufferDescriptor(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.visionai.v1.GstreamerBufferDescriptor result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.capsString_ = capsString_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.isKeyFrame_ = isKeyFrame_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.ptsTime_ = ptsTimeBuilder_ == null ? ptsTime_ : ptsTimeBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.dtsTime_ = dtsTimeBuilder_ == null ? dtsTime_ : dtsTimeBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.duration_ = durationBuilder_ == null ? duration_ : durationBuilder_.build(); + to_bitField0_ |= 0x00000004; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.GstreamerBufferDescriptor) { + return mergeFrom((com.google.cloud.visionai.v1.GstreamerBufferDescriptor) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.GstreamerBufferDescriptor other) { + if (other == com.google.cloud.visionai.v1.GstreamerBufferDescriptor.getDefaultInstance()) + return this; + if (!other.getCapsString().isEmpty()) { + capsString_ = other.capsString_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getIsKeyFrame() != false) { + setIsKeyFrame(other.getIsKeyFrame()); + } + if (other.hasPtsTime()) { + mergePtsTime(other.getPtsTime()); + } + if (other.hasDtsTime()) { + mergeDtsTime(other.getDtsTime()); + } + if (other.hasDuration()) { + mergeDuration(other.getDuration()); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + capsString_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + isKeyFrame_ = input.readBool(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: + { + input.readMessage(getPtsTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + input.readMessage(getDtsTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + input.readMessage(getDurationFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000010; + break; + } // case 42 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object capsString_ = ""; + /** + * + * + *
+     * The caps string of the payload.
+     * 
+ * + * string caps_string = 1; + * + * @return The capsString. + */ + public java.lang.String getCapsString() { + java.lang.Object ref = capsString_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + capsString_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The caps string of the payload.
+     * 
+ * + * string caps_string = 1; + * + * @return The bytes for capsString. + */ + public com.google.protobuf.ByteString getCapsStringBytes() { + java.lang.Object ref = capsString_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + capsString_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The caps string of the payload.
+     * 
+ * + * string caps_string = 1; + * + * @param value The capsString to set. + * @return This builder for chaining. + */ + public Builder setCapsString(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + capsString_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The caps string of the payload.
+     * 
+ * + * string caps_string = 1; + * + * @return This builder for chaining. + */ + public Builder clearCapsString() { + capsString_ = getDefaultInstance().getCapsString(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * The caps string of the payload.
+     * 
+ * + * string caps_string = 1; + * + * @param value The bytes for capsString to set. + * @return This builder for chaining. + */ + public Builder setCapsStringBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + capsString_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private boolean isKeyFrame_; + /** + * + * + *
+     * Whether the buffer is a key frame.
+     * 
+ * + * bool is_key_frame = 2; + * + * @return The isKeyFrame. + */ + @java.lang.Override + public boolean getIsKeyFrame() { + return isKeyFrame_; + } + /** + * + * + *
+     * Whether the buffer is a key frame.
+     * 
+ * + * bool is_key_frame = 2; + * + * @param value The isKeyFrame to set. + * @return This builder for chaining. + */ + public Builder setIsKeyFrame(boolean value) { + + isKeyFrame_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Whether the buffer is a key frame.
+     * 
+ * + * bool is_key_frame = 2; + * + * @return This builder for chaining. + */ + public Builder clearIsKeyFrame() { + bitField0_ = (bitField0_ & ~0x00000002); + isKeyFrame_ = false; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp ptsTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + ptsTimeBuilder_; + /** + * + * + *
+     * PTS of the frame.
+     * 
+ * + * .google.protobuf.Timestamp pts_time = 3; + * + * @return Whether the ptsTime field is set. + */ + public boolean hasPtsTime() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+     * PTS of the frame.
+     * 
+ * + * .google.protobuf.Timestamp pts_time = 3; + * + * @return The ptsTime. + */ + public com.google.protobuf.Timestamp getPtsTime() { + if (ptsTimeBuilder_ == null) { + return ptsTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : ptsTime_; + } else { + return ptsTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * PTS of the frame.
+     * 
+ * + * .google.protobuf.Timestamp pts_time = 3; + */ + public Builder setPtsTime(com.google.protobuf.Timestamp value) { + if (ptsTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ptsTime_ = value; + } else { + ptsTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * PTS of the frame.
+     * 
+ * + * .google.protobuf.Timestamp pts_time = 3; + */ + public Builder setPtsTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (ptsTimeBuilder_ == null) { + ptsTime_ = builderForValue.build(); + } else { + ptsTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * PTS of the frame.
+     * 
+ * + * .google.protobuf.Timestamp pts_time = 3; + */ + public Builder mergePtsTime(com.google.protobuf.Timestamp value) { + if (ptsTimeBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && ptsTime_ != null + && ptsTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getPtsTimeBuilder().mergeFrom(value); + } else { + ptsTime_ = value; + } + } else { + ptsTimeBuilder_.mergeFrom(value); + } + if (ptsTime_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + /** + * + * + *
+     * PTS of the frame.
+     * 
+ * + * .google.protobuf.Timestamp pts_time = 3; + */ + public Builder clearPtsTime() { + bitField0_ = (bitField0_ & ~0x00000004); + ptsTime_ = null; + if (ptsTimeBuilder_ != null) { + ptsTimeBuilder_.dispose(); + ptsTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * PTS of the frame.
+     * 
+ * + * .google.protobuf.Timestamp pts_time = 3; + */ + public com.google.protobuf.Timestamp.Builder getPtsTimeBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getPtsTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * PTS of the frame.
+     * 
+ * + * .google.protobuf.Timestamp pts_time = 3; + */ + public com.google.protobuf.TimestampOrBuilder getPtsTimeOrBuilder() { + if (ptsTimeBuilder_ != null) { + return ptsTimeBuilder_.getMessageOrBuilder(); + } else { + return ptsTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : ptsTime_; + } + } + /** + * + * + *
+     * PTS of the frame.
+     * 
+ * + * .google.protobuf.Timestamp pts_time = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getPtsTimeFieldBuilder() { + if (ptsTimeBuilder_ == null) { + ptsTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getPtsTime(), getParentForChildren(), isClean()); + ptsTime_ = null; + } + return ptsTimeBuilder_; + } + + private com.google.protobuf.Timestamp dtsTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + dtsTimeBuilder_; + /** + * + * + *
+     * DTS of the frame.
+     * 
+ * + * .google.protobuf.Timestamp dts_time = 4; + * + * @return Whether the dtsTime field is set. + */ + public boolean hasDtsTime() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + * + * + *
+     * DTS of the frame.
+     * 
+ * + * .google.protobuf.Timestamp dts_time = 4; + * + * @return The dtsTime. + */ + public com.google.protobuf.Timestamp getDtsTime() { + if (dtsTimeBuilder_ == null) { + return dtsTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : dtsTime_; + } else { + return dtsTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * DTS of the frame.
+     * 
+ * + * .google.protobuf.Timestamp dts_time = 4; + */ + public Builder setDtsTime(com.google.protobuf.Timestamp value) { + if (dtsTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + dtsTime_ = value; + } else { + dtsTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * DTS of the frame.
+     * 
+ * + * .google.protobuf.Timestamp dts_time = 4; + */ + public Builder setDtsTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (dtsTimeBuilder_ == null) { + dtsTime_ = builderForValue.build(); + } else { + dtsTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * DTS of the frame.
+     * 
+ * + * .google.protobuf.Timestamp dts_time = 4; + */ + public Builder mergeDtsTime(com.google.protobuf.Timestamp value) { + if (dtsTimeBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) + && dtsTime_ != null + && dtsTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getDtsTimeBuilder().mergeFrom(value); + } else { + dtsTime_ = value; + } + } else { + dtsTimeBuilder_.mergeFrom(value); + } + if (dtsTime_ != null) { + bitField0_ |= 0x00000008; + onChanged(); + } + return this; + } + /** + * + * + *
+     * DTS of the frame.
+     * 
+ * + * .google.protobuf.Timestamp dts_time = 4; + */ + public Builder clearDtsTime() { + bitField0_ = (bitField0_ & ~0x00000008); + dtsTime_ = null; + if (dtsTimeBuilder_ != null) { + dtsTimeBuilder_.dispose(); + dtsTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * DTS of the frame.
+     * 
+ * + * .google.protobuf.Timestamp dts_time = 4; + */ + public com.google.protobuf.Timestamp.Builder getDtsTimeBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return getDtsTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * DTS of the frame.
+     * 
+ * + * .google.protobuf.Timestamp dts_time = 4; + */ + public com.google.protobuf.TimestampOrBuilder getDtsTimeOrBuilder() { + if (dtsTimeBuilder_ != null) { + return dtsTimeBuilder_.getMessageOrBuilder(); + } else { + return dtsTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : dtsTime_; + } + } + /** + * + * + *
+     * DTS of the frame.
+     * 
+ * + * .google.protobuf.Timestamp dts_time = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getDtsTimeFieldBuilder() { + if (dtsTimeBuilder_ == null) { + dtsTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getDtsTime(), getParentForChildren(), isClean()); + dtsTime_ = null; + } + return dtsTimeBuilder_; + } + + private com.google.protobuf.Duration duration_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + durationBuilder_; + /** + * + * + *
+     * Duration of the frame.
+     * 
+ * + * .google.protobuf.Duration duration = 5; + * + * @return Whether the duration field is set. + */ + public boolean hasDuration() { + return ((bitField0_ & 0x00000010) != 0); + } + /** + * + * + *
+     * Duration of the frame.
+     * 
+ * + * .google.protobuf.Duration duration = 5; + * + * @return The duration. + */ + public com.google.protobuf.Duration getDuration() { + if (durationBuilder_ == null) { + return duration_ == null ? com.google.protobuf.Duration.getDefaultInstance() : duration_; + } else { + return durationBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Duration of the frame.
+     * 
+ * + * .google.protobuf.Duration duration = 5; + */ + public Builder setDuration(com.google.protobuf.Duration value) { + if (durationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + duration_ = value; + } else { + durationBuilder_.setMessage(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Duration of the frame.
+     * 
+ * + * .google.protobuf.Duration duration = 5; + */ + public Builder setDuration(com.google.protobuf.Duration.Builder builderForValue) { + if (durationBuilder_ == null) { + duration_ = builderForValue.build(); + } else { + durationBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Duration of the frame.
+     * 
+ * + * .google.protobuf.Duration duration = 5; + */ + public Builder mergeDuration(com.google.protobuf.Duration value) { + if (durationBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0) + && duration_ != null + && duration_ != com.google.protobuf.Duration.getDefaultInstance()) { + getDurationBuilder().mergeFrom(value); + } else { + duration_ = value; + } + } else { + durationBuilder_.mergeFrom(value); + } + if (duration_ != null) { + bitField0_ |= 0x00000010; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Duration of the frame.
+     * 
+ * + * .google.protobuf.Duration duration = 5; + */ + public Builder clearDuration() { + bitField0_ = (bitField0_ & ~0x00000010); + duration_ = null; + if (durationBuilder_ != null) { + durationBuilder_.dispose(); + durationBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Duration of the frame.
+     * 
+ * + * .google.protobuf.Duration duration = 5; + */ + public com.google.protobuf.Duration.Builder getDurationBuilder() { + bitField0_ |= 0x00000010; + onChanged(); + return getDurationFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Duration of the frame.
+     * 
+ * + * .google.protobuf.Duration duration = 5; + */ + public com.google.protobuf.DurationOrBuilder getDurationOrBuilder() { + if (durationBuilder_ != null) { + return durationBuilder_.getMessageOrBuilder(); + } else { + return duration_ == null ? com.google.protobuf.Duration.getDefaultInstance() : duration_; + } + } + /** + * + * + *
+     * Duration of the frame.
+     * 
+ * + * .google.protobuf.Duration duration = 5; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + getDurationFieldBuilder() { + if (durationBuilder_ == null) { + durationBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder>( + getDuration(), getParentForChildren(), isClean()); + duration_ = null; + } + return durationBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.GstreamerBufferDescriptor) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.GstreamerBufferDescriptor) + private static final com.google.cloud.visionai.v1.GstreamerBufferDescriptor DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.GstreamerBufferDescriptor(); + } + + public static com.google.cloud.visionai.v1.GstreamerBufferDescriptor getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GstreamerBufferDescriptor parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.GstreamerBufferDescriptor getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GstreamerBufferDescriptorOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GstreamerBufferDescriptorOrBuilder.java new file mode 100644 index 000000000000..af0cb45d3585 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/GstreamerBufferDescriptorOrBuilder.java @@ -0,0 +1,169 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/streaming_resources.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface GstreamerBufferDescriptorOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.GstreamerBufferDescriptor) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The caps string of the payload.
+   * 
+ * + * string caps_string = 1; + * + * @return The capsString. + */ + java.lang.String getCapsString(); + /** + * + * + *
+   * The caps string of the payload.
+   * 
+ * + * string caps_string = 1; + * + * @return The bytes for capsString. + */ + com.google.protobuf.ByteString getCapsStringBytes(); + + /** + * + * + *
+   * Whether the buffer is a key frame.
+   * 
+ * + * bool is_key_frame = 2; + * + * @return The isKeyFrame. + */ + boolean getIsKeyFrame(); + + /** + * + * + *
+   * PTS of the frame.
+   * 
+ * + * .google.protobuf.Timestamp pts_time = 3; + * + * @return Whether the ptsTime field is set. + */ + boolean hasPtsTime(); + /** + * + * + *
+   * PTS of the frame.
+   * 
+ * + * .google.protobuf.Timestamp pts_time = 3; + * + * @return The ptsTime. + */ + com.google.protobuf.Timestamp getPtsTime(); + /** + * + * + *
+   * PTS of the frame.
+   * 
+ * + * .google.protobuf.Timestamp pts_time = 3; + */ + com.google.protobuf.TimestampOrBuilder getPtsTimeOrBuilder(); + + /** + * + * + *
+   * DTS of the frame.
+   * 
+ * + * .google.protobuf.Timestamp dts_time = 4; + * + * @return Whether the dtsTime field is set. + */ + boolean hasDtsTime(); + /** + * + * + *
+   * DTS of the frame.
+   * 
+ * + * .google.protobuf.Timestamp dts_time = 4; + * + * @return The dtsTime. + */ + com.google.protobuf.Timestamp getDtsTime(); + /** + * + * + *
+   * DTS of the frame.
+   * 
+ * + * .google.protobuf.Timestamp dts_time = 4; + */ + com.google.protobuf.TimestampOrBuilder getDtsTimeOrBuilder(); + + /** + * + * + *
+   * Duration of the frame.
+   * 
+ * + * .google.protobuf.Duration duration = 5; + * + * @return Whether the duration field is set. + */ + boolean hasDuration(); + /** + * + * + *
+   * Duration of the frame.
+   * 
+ * + * .google.protobuf.Duration duration = 5; + * + * @return The duration. + */ + com.google.protobuf.Duration getDuration(); + /** + * + * + *
+   * Duration of the frame.
+   * 
+ * + * .google.protobuf.Duration duration = 5; + */ + com.google.protobuf.DurationOrBuilder getDurationOrBuilder(); +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/HealthCheckRequest.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/HealthCheckRequest.java new file mode 100644 index 000000000000..60c271653835 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/HealthCheckRequest.java @@ -0,0 +1,625 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/health_service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * HealthCheckRequest is the request message for Check.
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.HealthCheckRequest} + */ +public final class HealthCheckRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.HealthCheckRequest) + HealthCheckRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use HealthCheckRequest.newBuilder() to construct. + private HealthCheckRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private HealthCheckRequest() { + cluster_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new HealthCheckRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.HealthCheckServiceProto + .internal_static_google_cloud_visionai_v1_HealthCheckRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.HealthCheckServiceProto + .internal_static_google_cloud_visionai_v1_HealthCheckRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.HealthCheckRequest.class, + com.google.cloud.visionai.v1.HealthCheckRequest.Builder.class); + } + + public static final int CLUSTER_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object cluster_ = ""; + /** + * + * + *
+   * The parent of the resource.
+   * 
+ * + * string cluster = 1 [(.google.api.resource_reference) = { ... } + * + * @return The cluster. + */ + @java.lang.Override + public java.lang.String getCluster() { + java.lang.Object ref = cluster_; + 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(); + cluster_ = s; + return s; + } + } + /** + * + * + *
+   * The parent of the resource.
+   * 
+ * + * string cluster = 1 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for cluster. + */ + @java.lang.Override + public com.google.protobuf.ByteString getClusterBytes() { + java.lang.Object ref = cluster_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + cluster_ = 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(cluster_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, cluster_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(cluster_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, cluster_); + } + size += getUnknownFields().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.visionai.v1.HealthCheckRequest)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.HealthCheckRequest other = + (com.google.cloud.visionai.v1.HealthCheckRequest) obj; + + if (!getCluster().equals(other.getCluster())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + CLUSTER_FIELD_NUMBER; + hash = (53 * hash) + getCluster().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.HealthCheckRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.HealthCheckRequest 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.visionai.v1.HealthCheckRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.HealthCheckRequest 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.visionai.v1.HealthCheckRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.HealthCheckRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.HealthCheckRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.HealthCheckRequest 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.visionai.v1.HealthCheckRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.HealthCheckRequest 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.visionai.v1.HealthCheckRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.HealthCheckRequest 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.visionai.v1.HealthCheckRequest 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; + } + /** + * + * + *
+   * HealthCheckRequest is the request message for Check.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.HealthCheckRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.HealthCheckRequest) + com.google.cloud.visionai.v1.HealthCheckRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.HealthCheckServiceProto + .internal_static_google_cloud_visionai_v1_HealthCheckRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.HealthCheckServiceProto + .internal_static_google_cloud_visionai_v1_HealthCheckRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.HealthCheckRequest.class, + com.google.cloud.visionai.v1.HealthCheckRequest.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.HealthCheckRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + cluster_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.HealthCheckServiceProto + .internal_static_google_cloud_visionai_v1_HealthCheckRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.HealthCheckRequest getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.HealthCheckRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.HealthCheckRequest build() { + com.google.cloud.visionai.v1.HealthCheckRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.HealthCheckRequest buildPartial() { + com.google.cloud.visionai.v1.HealthCheckRequest result = + new com.google.cloud.visionai.v1.HealthCheckRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.visionai.v1.HealthCheckRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.cluster_ = cluster_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.HealthCheckRequest) { + return mergeFrom((com.google.cloud.visionai.v1.HealthCheckRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.HealthCheckRequest other) { + if (other == com.google.cloud.visionai.v1.HealthCheckRequest.getDefaultInstance()) + return this; + if (!other.getCluster().isEmpty()) { + cluster_ = other.cluster_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + cluster_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object cluster_ = ""; + /** + * + * + *
+     * The parent of the resource.
+     * 
+ * + * string cluster = 1 [(.google.api.resource_reference) = { ... } + * + * @return The cluster. + */ + public java.lang.String getCluster() { + java.lang.Object ref = cluster_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + cluster_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The parent of the resource.
+     * 
+ * + * string cluster = 1 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for cluster. + */ + public com.google.protobuf.ByteString getClusterBytes() { + java.lang.Object ref = cluster_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + cluster_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The parent of the resource.
+     * 
+ * + * string cluster = 1 [(.google.api.resource_reference) = { ... } + * + * @param value The cluster to set. + * @return This builder for chaining. + */ + public Builder setCluster(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + cluster_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The parent of the resource.
+     * 
+ * + * string cluster = 1 [(.google.api.resource_reference) = { ... } + * + * @return This builder for chaining. + */ + public Builder clearCluster() { + cluster_ = getDefaultInstance().getCluster(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * The parent of the resource.
+     * 
+ * + * string cluster = 1 [(.google.api.resource_reference) = { ... } + * + * @param value The bytes for cluster to set. + * @return This builder for chaining. + */ + public Builder setClusterBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + cluster_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.HealthCheckRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.HealthCheckRequest) + private static final com.google.cloud.visionai.v1.HealthCheckRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.HealthCheckRequest(); + } + + public static com.google.cloud.visionai.v1.HealthCheckRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public HealthCheckRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.HealthCheckRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/HealthCheckRequestOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/HealthCheckRequestOrBuilder.java new file mode 100644 index 000000000000..12b9320c930d --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/HealthCheckRequestOrBuilder.java @@ -0,0 +1,51 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/health_service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface HealthCheckRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.HealthCheckRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The parent of the resource.
+   * 
+ * + * string cluster = 1 [(.google.api.resource_reference) = { ... } + * + * @return The cluster. + */ + java.lang.String getCluster(); + /** + * + * + *
+   * The parent of the resource.
+   * 
+ * + * string cluster = 1 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for cluster. + */ + com.google.protobuf.ByteString getClusterBytes(); +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/HealthCheckResponse.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/HealthCheckResponse.java new file mode 100644 index 000000000000..62ced76b7ca8 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/HealthCheckResponse.java @@ -0,0 +1,999 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/health_service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * HealthCheckResponse is the response message for Check.
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.HealthCheckResponse} + */ +public final class HealthCheckResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.HealthCheckResponse) + HealthCheckResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use HealthCheckResponse.newBuilder() to construct. + private HealthCheckResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private HealthCheckResponse() { + reason_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new HealthCheckResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.HealthCheckServiceProto + .internal_static_google_cloud_visionai_v1_HealthCheckResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.HealthCheckServiceProto + .internal_static_google_cloud_visionai_v1_HealthCheckResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.HealthCheckResponse.class, + com.google.cloud.visionai.v1.HealthCheckResponse.Builder.class); + } + + private int bitField0_; + public static final int HEALTHY_FIELD_NUMBER = 1; + private boolean healthy_ = false; + /** + * + * + *
+   * Indicates whether the cluster is in healthy state or not.
+   * 
+ * + * bool healthy = 1; + * + * @return The healthy. + */ + @java.lang.Override + public boolean getHealthy() { + return healthy_; + } + + public static final int REASON_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object reason_ = ""; + /** + * + * + *
+   * Reason of why the cluster is in unhealthy state.
+   * 
+ * + * string reason = 2; + * + * @return The reason. + */ + @java.lang.Override + public java.lang.String getReason() { + java.lang.Object ref = reason_; + 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(); + reason_ = s; + return s; + } + } + /** + * + * + *
+   * Reason of why the cluster is in unhealthy state.
+   * 
+ * + * string reason = 2; + * + * @return The bytes for reason. + */ + @java.lang.Override + public com.google.protobuf.ByteString getReasonBytes() { + java.lang.Object ref = reason_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + reason_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CLUSTER_INFO_FIELD_NUMBER = 3; + private com.google.cloud.visionai.v1.ClusterInfo clusterInfo_; + /** + * + * + *
+   * Other information of the cluster client may be interested.
+   * 
+ * + * .google.cloud.visionai.v1.ClusterInfo cluster_info = 3; + * + * @return Whether the clusterInfo field is set. + */ + @java.lang.Override + public boolean hasClusterInfo() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * Other information of the cluster client may be interested.
+   * 
+ * + * .google.cloud.visionai.v1.ClusterInfo cluster_info = 3; + * + * @return The clusterInfo. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.ClusterInfo getClusterInfo() { + return clusterInfo_ == null + ? com.google.cloud.visionai.v1.ClusterInfo.getDefaultInstance() + : clusterInfo_; + } + /** + * + * + *
+   * Other information of the cluster client may be interested.
+   * 
+ * + * .google.cloud.visionai.v1.ClusterInfo cluster_info = 3; + */ + @java.lang.Override + public com.google.cloud.visionai.v1.ClusterInfoOrBuilder getClusterInfoOrBuilder() { + return clusterInfo_ == null + ? com.google.cloud.visionai.v1.ClusterInfo.getDefaultInstance() + : clusterInfo_; + } + + 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 (healthy_ != false) { + output.writeBool(1, healthy_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(reason_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, reason_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(3, getClusterInfo()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (healthy_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(1, healthy_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(reason_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, reason_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getClusterInfo()); + } + size += getUnknownFields().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.visionai.v1.HealthCheckResponse)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.HealthCheckResponse other = + (com.google.cloud.visionai.v1.HealthCheckResponse) obj; + + if (getHealthy() != other.getHealthy()) return false; + if (!getReason().equals(other.getReason())) return false; + if (hasClusterInfo() != other.hasClusterInfo()) return false; + if (hasClusterInfo()) { + if (!getClusterInfo().equals(other.getClusterInfo())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + HEALTHY_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getHealthy()); + hash = (37 * hash) + REASON_FIELD_NUMBER; + hash = (53 * hash) + getReason().hashCode(); + if (hasClusterInfo()) { + hash = (37 * hash) + CLUSTER_INFO_FIELD_NUMBER; + hash = (53 * hash) + getClusterInfo().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.HealthCheckResponse parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.HealthCheckResponse 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.visionai.v1.HealthCheckResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.HealthCheckResponse 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.visionai.v1.HealthCheckResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.HealthCheckResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.HealthCheckResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.HealthCheckResponse 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.visionai.v1.HealthCheckResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.HealthCheckResponse 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.visionai.v1.HealthCheckResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.HealthCheckResponse 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.visionai.v1.HealthCheckResponse 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; + } + /** + * + * + *
+   * HealthCheckResponse is the response message for Check.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.HealthCheckResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.HealthCheckResponse) + com.google.cloud.visionai.v1.HealthCheckResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.HealthCheckServiceProto + .internal_static_google_cloud_visionai_v1_HealthCheckResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.HealthCheckServiceProto + .internal_static_google_cloud_visionai_v1_HealthCheckResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.HealthCheckResponse.class, + com.google.cloud.visionai.v1.HealthCheckResponse.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.HealthCheckResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getClusterInfoFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + healthy_ = false; + reason_ = ""; + clusterInfo_ = null; + if (clusterInfoBuilder_ != null) { + clusterInfoBuilder_.dispose(); + clusterInfoBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.HealthCheckServiceProto + .internal_static_google_cloud_visionai_v1_HealthCheckResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.HealthCheckResponse getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.HealthCheckResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.HealthCheckResponse build() { + com.google.cloud.visionai.v1.HealthCheckResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.HealthCheckResponse buildPartial() { + com.google.cloud.visionai.v1.HealthCheckResponse result = + new com.google.cloud.visionai.v1.HealthCheckResponse(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.visionai.v1.HealthCheckResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.healthy_ = healthy_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.reason_ = reason_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.clusterInfo_ = + clusterInfoBuilder_ == null ? clusterInfo_ : clusterInfoBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.HealthCheckResponse) { + return mergeFrom((com.google.cloud.visionai.v1.HealthCheckResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.HealthCheckResponse other) { + if (other == com.google.cloud.visionai.v1.HealthCheckResponse.getDefaultInstance()) + return this; + if (other.getHealthy() != false) { + setHealthy(other.getHealthy()); + } + if (!other.getReason().isEmpty()) { + reason_ = other.reason_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.hasClusterInfo()) { + mergeClusterInfo(other.getClusterInfo()); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + healthy_ = input.readBool(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 18: + { + reason_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage(getClusterInfoFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private boolean healthy_; + /** + * + * + *
+     * Indicates whether the cluster is in healthy state or not.
+     * 
+ * + * bool healthy = 1; + * + * @return The healthy. + */ + @java.lang.Override + public boolean getHealthy() { + return healthy_; + } + /** + * + * + *
+     * Indicates whether the cluster is in healthy state or not.
+     * 
+ * + * bool healthy = 1; + * + * @param value The healthy to set. + * @return This builder for chaining. + */ + public Builder setHealthy(boolean value) { + + healthy_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Indicates whether the cluster is in healthy state or not.
+     * 
+ * + * bool healthy = 1; + * + * @return This builder for chaining. + */ + public Builder clearHealthy() { + bitField0_ = (bitField0_ & ~0x00000001); + healthy_ = false; + onChanged(); + return this; + } + + private java.lang.Object reason_ = ""; + /** + * + * + *
+     * Reason of why the cluster is in unhealthy state.
+     * 
+ * + * string reason = 2; + * + * @return The reason. + */ + public java.lang.String getReason() { + java.lang.Object ref = reason_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + reason_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Reason of why the cluster is in unhealthy state.
+     * 
+ * + * string reason = 2; + * + * @return The bytes for reason. + */ + public com.google.protobuf.ByteString getReasonBytes() { + java.lang.Object ref = reason_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + reason_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Reason of why the cluster is in unhealthy state.
+     * 
+ * + * string reason = 2; + * + * @param value The reason to set. + * @return This builder for chaining. + */ + public Builder setReason(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + reason_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Reason of why the cluster is in unhealthy state.
+     * 
+ * + * string reason = 2; + * + * @return This builder for chaining. + */ + public Builder clearReason() { + reason_ = getDefaultInstance().getReason(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Reason of why the cluster is in unhealthy state.
+     * 
+ * + * string reason = 2; + * + * @param value The bytes for reason to set. + * @return This builder for chaining. + */ + public Builder setReasonBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + reason_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.cloud.visionai.v1.ClusterInfo clusterInfo_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.ClusterInfo, + com.google.cloud.visionai.v1.ClusterInfo.Builder, + com.google.cloud.visionai.v1.ClusterInfoOrBuilder> + clusterInfoBuilder_; + /** + * + * + *
+     * Other information of the cluster client may be interested.
+     * 
+ * + * .google.cloud.visionai.v1.ClusterInfo cluster_info = 3; + * + * @return Whether the clusterInfo field is set. + */ + public boolean hasClusterInfo() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+     * Other information of the cluster client may be interested.
+     * 
+ * + * .google.cloud.visionai.v1.ClusterInfo cluster_info = 3; + * + * @return The clusterInfo. + */ + public com.google.cloud.visionai.v1.ClusterInfo getClusterInfo() { + if (clusterInfoBuilder_ == null) { + return clusterInfo_ == null + ? com.google.cloud.visionai.v1.ClusterInfo.getDefaultInstance() + : clusterInfo_; + } else { + return clusterInfoBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Other information of the cluster client may be interested.
+     * 
+ * + * .google.cloud.visionai.v1.ClusterInfo cluster_info = 3; + */ + public Builder setClusterInfo(com.google.cloud.visionai.v1.ClusterInfo value) { + if (clusterInfoBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + clusterInfo_ = value; + } else { + clusterInfoBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Other information of the cluster client may be interested.
+     * 
+ * + * .google.cloud.visionai.v1.ClusterInfo cluster_info = 3; + */ + public Builder setClusterInfo( + com.google.cloud.visionai.v1.ClusterInfo.Builder builderForValue) { + if (clusterInfoBuilder_ == null) { + clusterInfo_ = builderForValue.build(); + } else { + clusterInfoBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Other information of the cluster client may be interested.
+     * 
+ * + * .google.cloud.visionai.v1.ClusterInfo cluster_info = 3; + */ + public Builder mergeClusterInfo(com.google.cloud.visionai.v1.ClusterInfo value) { + if (clusterInfoBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && clusterInfo_ != null + && clusterInfo_ != com.google.cloud.visionai.v1.ClusterInfo.getDefaultInstance()) { + getClusterInfoBuilder().mergeFrom(value); + } else { + clusterInfo_ = value; + } + } else { + clusterInfoBuilder_.mergeFrom(value); + } + if (clusterInfo_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Other information of the cluster client may be interested.
+     * 
+ * + * .google.cloud.visionai.v1.ClusterInfo cluster_info = 3; + */ + public Builder clearClusterInfo() { + bitField0_ = (bitField0_ & ~0x00000004); + clusterInfo_ = null; + if (clusterInfoBuilder_ != null) { + clusterInfoBuilder_.dispose(); + clusterInfoBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Other information of the cluster client may be interested.
+     * 
+ * + * .google.cloud.visionai.v1.ClusterInfo cluster_info = 3; + */ + public com.google.cloud.visionai.v1.ClusterInfo.Builder getClusterInfoBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getClusterInfoFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Other information of the cluster client may be interested.
+     * 
+ * + * .google.cloud.visionai.v1.ClusterInfo cluster_info = 3; + */ + public com.google.cloud.visionai.v1.ClusterInfoOrBuilder getClusterInfoOrBuilder() { + if (clusterInfoBuilder_ != null) { + return clusterInfoBuilder_.getMessageOrBuilder(); + } else { + return clusterInfo_ == null + ? com.google.cloud.visionai.v1.ClusterInfo.getDefaultInstance() + : clusterInfo_; + } + } + /** + * + * + *
+     * Other information of the cluster client may be interested.
+     * 
+ * + * .google.cloud.visionai.v1.ClusterInfo cluster_info = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.ClusterInfo, + com.google.cloud.visionai.v1.ClusterInfo.Builder, + com.google.cloud.visionai.v1.ClusterInfoOrBuilder> + getClusterInfoFieldBuilder() { + if (clusterInfoBuilder_ == null) { + clusterInfoBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.ClusterInfo, + com.google.cloud.visionai.v1.ClusterInfo.Builder, + com.google.cloud.visionai.v1.ClusterInfoOrBuilder>( + getClusterInfo(), getParentForChildren(), isClean()); + clusterInfo_ = null; + } + return clusterInfoBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.HealthCheckResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.HealthCheckResponse) + private static final com.google.cloud.visionai.v1.HealthCheckResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.HealthCheckResponse(); + } + + public static com.google.cloud.visionai.v1.HealthCheckResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public HealthCheckResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.HealthCheckResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/HealthCheckResponseOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/HealthCheckResponseOrBuilder.java new file mode 100644 index 000000000000..7522cc88978c --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/HealthCheckResponseOrBuilder.java @@ -0,0 +1,99 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/health_service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface HealthCheckResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.HealthCheckResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Indicates whether the cluster is in healthy state or not.
+   * 
+ * + * bool healthy = 1; + * + * @return The healthy. + */ + boolean getHealthy(); + + /** + * + * + *
+   * Reason of why the cluster is in unhealthy state.
+   * 
+ * + * string reason = 2; + * + * @return The reason. + */ + java.lang.String getReason(); + /** + * + * + *
+   * Reason of why the cluster is in unhealthy state.
+   * 
+ * + * string reason = 2; + * + * @return The bytes for reason. + */ + com.google.protobuf.ByteString getReasonBytes(); + + /** + * + * + *
+   * Other information of the cluster client may be interested.
+   * 
+ * + * .google.cloud.visionai.v1.ClusterInfo cluster_info = 3; + * + * @return Whether the clusterInfo field is set. + */ + boolean hasClusterInfo(); + /** + * + * + *
+   * Other information of the cluster client may be interested.
+   * 
+ * + * .google.cloud.visionai.v1.ClusterInfo cluster_info = 3; + * + * @return The clusterInfo. + */ + com.google.cloud.visionai.v1.ClusterInfo getClusterInfo(); + /** + * + * + *
+   * Other information of the cluster client may be interested.
+   * 
+ * + * .google.cloud.visionai.v1.ClusterInfo cluster_info = 3; + */ + com.google.cloud.visionai.v1.ClusterInfoOrBuilder getClusterInfoOrBuilder(); +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/HealthCheckServiceProto.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/HealthCheckServiceProto.java new file mode 100644 index 000000000000..642163b9f8a3 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/HealthCheckServiceProto.java @@ -0,0 +1,122 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/health_service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public final class HealthCheckServiceProto { + private HealthCheckServiceProto() {} + + 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_visionai_v1_HealthCheckRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_visionai_v1_HealthCheckRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_visionai_v1_HealthCheckResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_visionai_v1_HealthCheckResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_visionai_v1_ClusterInfo_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_visionai_v1_ClusterInfo_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n-google/cloud/visionai/v1/health_servic" + + "e.proto\022\030google.cloud.visionai.v1\032\034googl" + + "e/api/annotations.proto\032\027google/api/clie" + + "nt.proto\032\031google/api/resource.proto\"K\n\022H" + + "ealthCheckRequest\0225\n\007cluster\030\001 \001(\tB$\372A!\n" + + "\037visionai.googleapis.com/Cluster\"s\n\023Heal" + + "thCheckResponse\022\017\n\007healthy\030\001 \001(\010\022\016\n\006reas" + + "on\030\002 \001(\t\022;\n\014cluster_info\030\003 \001(\0132%.google." + + "cloud.visionai.v1.ClusterInfo\"=\n\013Cluster" + + "Info\022\025\n\rstreams_count\030\001 \001(\005\022\027\n\017processes" + + "_count\030\002 \001(\0052\223\002\n\022HealthCheckService\022\257\001\n\013" + + "HealthCheck\022,.google.cloud.visionai.v1.H" + + "ealthCheckRequest\032-.google.cloud.visiona" + + "i.v1.HealthCheckResponse\"C\202\323\344\223\002=\022;/v1/{c" + + "luster=projects/*/locations/*/clusters/*" + + "}:healthCheck\032K\312A\027visionai.googleapis.co" + + "m\322A.https://www.googleapis.com/auth/clou" + + "d-platformB\307\001\n\034com.google.cloud.visionai" + + ".v1B\027HealthCheckServiceProtoP\001Z8cloud.go" + + "ogle.com/go/visionai/apiv1/visionaipb;vi" + + "sionaipb\252\002\030Google.Cloud.VisionAI.V1\312\002\030Go" + + "ogle\\Cloud\\VisionAI\\V1\352\002\033Google::Cloud::" + + "VisionAI::V1b\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.AnnotationsProto.getDescriptor(), + com.google.api.ClientProto.getDescriptor(), + com.google.api.ResourceProto.getDescriptor(), + }); + internal_static_google_cloud_visionai_v1_HealthCheckRequest_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_visionai_v1_HealthCheckRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_visionai_v1_HealthCheckRequest_descriptor, + new java.lang.String[] { + "Cluster", + }); + internal_static_google_cloud_visionai_v1_HealthCheckResponse_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_cloud_visionai_v1_HealthCheckResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_visionai_v1_HealthCheckResponse_descriptor, + new java.lang.String[] { + "Healthy", "Reason", "ClusterInfo", + }); + internal_static_google_cloud_visionai_v1_ClusterInfo_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_google_cloud_visionai_v1_ClusterInfo_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_visionai_v1_ClusterInfo_descriptor, + new java.lang.String[] { + "StreamsCount", "ProcessesCount", + }); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.ClientProto.defaultHost); + registry.add(com.google.api.AnnotationsProto.http); + registry.add(com.google.api.ClientProto.oauthScopes); + registry.add(com.google.api.ResourceProto.resourceReference); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + com.google.api.AnnotationsProto.getDescriptor(); + com.google.api.ClientProto.getDescriptor(); + com.google.api.ResourceProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ImageObjectDetectionPredictionResult.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ImageObjectDetectionPredictionResult.java new file mode 100644 index 000000000000..fea00364636d --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ImageObjectDetectionPredictionResult.java @@ -0,0 +1,1864 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/annotations.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * Prediction output format for Image Object Detection.
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.ImageObjectDetectionPredictionResult} + */ +public final class ImageObjectDetectionPredictionResult + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.ImageObjectDetectionPredictionResult) + ImageObjectDetectionPredictionResultOrBuilder { + private static final long serialVersionUID = 0L; + // Use ImageObjectDetectionPredictionResult.newBuilder() to construct. + private ImageObjectDetectionPredictionResult( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ImageObjectDetectionPredictionResult() { + ids_ = emptyLongList(); + displayNames_ = com.google.protobuf.LazyStringArrayList.emptyList(); + confidences_ = emptyFloatList(); + bboxes_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ImageObjectDetectionPredictionResult(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.AnnotationsProto + .internal_static_google_cloud_visionai_v1_ImageObjectDetectionPredictionResult_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.AnnotationsProto + .internal_static_google_cloud_visionai_v1_ImageObjectDetectionPredictionResult_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.ImageObjectDetectionPredictionResult.class, + com.google.cloud.visionai.v1.ImageObjectDetectionPredictionResult.Builder.class); + } + + public static final int IDS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private com.google.protobuf.Internal.LongList ids_ = emptyLongList(); + /** + * + * + *
+   * The resource IDs of the AnnotationSpecs that had been identified, ordered
+   * by the confidence score descendingly. It is the id segment instead of full
+   * resource name.
+   * 
+ * + * repeated int64 ids = 1; + * + * @return A list containing the ids. + */ + @java.lang.Override + public java.util.List getIdsList() { + return ids_; + } + /** + * + * + *
+   * The resource IDs of the AnnotationSpecs that had been identified, ordered
+   * by the confidence score descendingly. It is the id segment instead of full
+   * resource name.
+   * 
+ * + * repeated int64 ids = 1; + * + * @return The count of ids. + */ + public int getIdsCount() { + return ids_.size(); + } + /** + * + * + *
+   * The resource IDs of the AnnotationSpecs that had been identified, ordered
+   * by the confidence score descendingly. It is the id segment instead of full
+   * resource name.
+   * 
+ * + * repeated int64 ids = 1; + * + * @param index The index of the element to return. + * @return The ids at the given index. + */ + public long getIds(int index) { + return ids_.getLong(index); + } + + private int idsMemoizedSerializedSize = -1; + + public static final int DISPLAY_NAMES_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList displayNames_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + * + * + *
+   * The display names of the AnnotationSpecs that had been identified, order
+   * matches the IDs.
+   * 
+ * + * repeated string display_names = 2; + * + * @return A list containing the displayNames. + */ + public com.google.protobuf.ProtocolStringList getDisplayNamesList() { + return displayNames_; + } + /** + * + * + *
+   * The display names of the AnnotationSpecs that had been identified, order
+   * matches the IDs.
+   * 
+ * + * repeated string display_names = 2; + * + * @return The count of displayNames. + */ + public int getDisplayNamesCount() { + return displayNames_.size(); + } + /** + * + * + *
+   * The display names of the AnnotationSpecs that had been identified, order
+   * matches the IDs.
+   * 
+ * + * repeated string display_names = 2; + * + * @param index The index of the element to return. + * @return The displayNames at the given index. + */ + public java.lang.String getDisplayNames(int index) { + return displayNames_.get(index); + } + /** + * + * + *
+   * The display names of the AnnotationSpecs that had been identified, order
+   * matches the IDs.
+   * 
+ * + * repeated string display_names = 2; + * + * @param index The index of the value to return. + * @return The bytes of the displayNames at the given index. + */ + public com.google.protobuf.ByteString getDisplayNamesBytes(int index) { + return displayNames_.getByteString(index); + } + + public static final int CONFIDENCES_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private com.google.protobuf.Internal.FloatList confidences_ = emptyFloatList(); + /** + * + * + *
+   * The Model's confidences in correctness of the predicted IDs, higher value
+   * means higher confidence. Order matches the Ids.
+   * 
+ * + * repeated float confidences = 3; + * + * @return A list containing the confidences. + */ + @java.lang.Override + public java.util.List getConfidencesList() { + return confidences_; + } + /** + * + * + *
+   * The Model's confidences in correctness of the predicted IDs, higher value
+   * means higher confidence. Order matches the Ids.
+   * 
+ * + * repeated float confidences = 3; + * + * @return The count of confidences. + */ + public int getConfidencesCount() { + return confidences_.size(); + } + /** + * + * + *
+   * The Model's confidences in correctness of the predicted IDs, higher value
+   * means higher confidence. Order matches the Ids.
+   * 
+ * + * repeated float confidences = 3; + * + * @param index The index of the element to return. + * @return The confidences at the given index. + */ + public float getConfidences(int index) { + return confidences_.getFloat(index); + } + + private int confidencesMemoizedSerializedSize = -1; + + public static final int BBOXES_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private java.util.List bboxes_; + /** + * + * + *
+   * Bounding boxes, i.e. the rectangles over the image, that pinpoint
+   * the found AnnotationSpecs. Given in order that matches the IDs. Each
+   * bounding box is an array of 4 numbers `xMin`, `xMax`, `yMin`, and
+   * `yMax`, which represent the extremal coordinates of the box. They are
+   * relative to the image size, and the point 0,0 is in the top left
+   * of the image.
+   * 
+ * + * repeated .google.protobuf.ListValue bboxes = 4; + */ + @java.lang.Override + public java.util.List getBboxesList() { + return bboxes_; + } + /** + * + * + *
+   * Bounding boxes, i.e. the rectangles over the image, that pinpoint
+   * the found AnnotationSpecs. Given in order that matches the IDs. Each
+   * bounding box is an array of 4 numbers `xMin`, `xMax`, `yMin`, and
+   * `yMax`, which represent the extremal coordinates of the box. They are
+   * relative to the image size, and the point 0,0 is in the top left
+   * of the image.
+   * 
+ * + * repeated .google.protobuf.ListValue bboxes = 4; + */ + @java.lang.Override + public java.util.List getBboxesOrBuilderList() { + return bboxes_; + } + /** + * + * + *
+   * Bounding boxes, i.e. the rectangles over the image, that pinpoint
+   * the found AnnotationSpecs. Given in order that matches the IDs. Each
+   * bounding box is an array of 4 numbers `xMin`, `xMax`, `yMin`, and
+   * `yMax`, which represent the extremal coordinates of the box. They are
+   * relative to the image size, and the point 0,0 is in the top left
+   * of the image.
+   * 
+ * + * repeated .google.protobuf.ListValue bboxes = 4; + */ + @java.lang.Override + public int getBboxesCount() { + return bboxes_.size(); + } + /** + * + * + *
+   * Bounding boxes, i.e. the rectangles over the image, that pinpoint
+   * the found AnnotationSpecs. Given in order that matches the IDs. Each
+   * bounding box is an array of 4 numbers `xMin`, `xMax`, `yMin`, and
+   * `yMax`, which represent the extremal coordinates of the box. They are
+   * relative to the image size, and the point 0,0 is in the top left
+   * of the image.
+   * 
+ * + * repeated .google.protobuf.ListValue bboxes = 4; + */ + @java.lang.Override + public com.google.protobuf.ListValue getBboxes(int index) { + return bboxes_.get(index); + } + /** + * + * + *
+   * Bounding boxes, i.e. the rectangles over the image, that pinpoint
+   * the found AnnotationSpecs. Given in order that matches the IDs. Each
+   * bounding box is an array of 4 numbers `xMin`, `xMax`, `yMin`, and
+   * `yMax`, which represent the extremal coordinates of the box. They are
+   * relative to the image size, and the point 0,0 is in the top left
+   * of the image.
+   * 
+ * + * repeated .google.protobuf.ListValue bboxes = 4; + */ + @java.lang.Override + public com.google.protobuf.ListValueOrBuilder getBboxesOrBuilder(int index) { + return bboxes_.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 { + getSerializedSize(); + if (getIdsList().size() > 0) { + output.writeUInt32NoTag(10); + output.writeUInt32NoTag(idsMemoizedSerializedSize); + } + for (int i = 0; i < ids_.size(); i++) { + output.writeInt64NoTag(ids_.getLong(i)); + } + for (int i = 0; i < displayNames_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, displayNames_.getRaw(i)); + } + if (getConfidencesList().size() > 0) { + output.writeUInt32NoTag(26); + output.writeUInt32NoTag(confidencesMemoizedSerializedSize); + } + for (int i = 0; i < confidences_.size(); i++) { + output.writeFloatNoTag(confidences_.getFloat(i)); + } + for (int i = 0; i < bboxes_.size(); i++) { + output.writeMessage(4, bboxes_.get(i)); + } + getUnknownFields().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 < ids_.size(); i++) { + dataSize += com.google.protobuf.CodedOutputStream.computeInt64SizeNoTag(ids_.getLong(i)); + } + size += dataSize; + if (!getIdsList().isEmpty()) { + size += 1; + size += com.google.protobuf.CodedOutputStream.computeInt32SizeNoTag(dataSize); + } + idsMemoizedSerializedSize = dataSize; + } + { + int dataSize = 0; + for (int i = 0; i < displayNames_.size(); i++) { + dataSize += computeStringSizeNoTag(displayNames_.getRaw(i)); + } + size += dataSize; + size += 1 * getDisplayNamesList().size(); + } + { + int dataSize = 0; + dataSize = 4 * getConfidencesList().size(); + size += dataSize; + if (!getConfidencesList().isEmpty()) { + size += 1; + size += com.google.protobuf.CodedOutputStream.computeInt32SizeNoTag(dataSize); + } + confidencesMemoizedSerializedSize = dataSize; + } + for (int i = 0; i < bboxes_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, bboxes_.get(i)); + } + size += getUnknownFields().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.visionai.v1.ImageObjectDetectionPredictionResult)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.ImageObjectDetectionPredictionResult other = + (com.google.cloud.visionai.v1.ImageObjectDetectionPredictionResult) obj; + + if (!getIdsList().equals(other.getIdsList())) return false; + if (!getDisplayNamesList().equals(other.getDisplayNamesList())) return false; + if (!getConfidencesList().equals(other.getConfidencesList())) return false; + if (!getBboxesList().equals(other.getBboxesList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getIdsCount() > 0) { + hash = (37 * hash) + IDS_FIELD_NUMBER; + hash = (53 * hash) + getIdsList().hashCode(); + } + if (getDisplayNamesCount() > 0) { + hash = (37 * hash) + DISPLAY_NAMES_FIELD_NUMBER; + hash = (53 * hash) + getDisplayNamesList().hashCode(); + } + if (getConfidencesCount() > 0) { + hash = (37 * hash) + CONFIDENCES_FIELD_NUMBER; + hash = (53 * hash) + getConfidencesList().hashCode(); + } + if (getBboxesCount() > 0) { + hash = (37 * hash) + BBOXES_FIELD_NUMBER; + hash = (53 * hash) + getBboxesList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.ImageObjectDetectionPredictionResult parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ImageObjectDetectionPredictionResult 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.visionai.v1.ImageObjectDetectionPredictionResult parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ImageObjectDetectionPredictionResult 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.visionai.v1.ImageObjectDetectionPredictionResult parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ImageObjectDetectionPredictionResult parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.ImageObjectDetectionPredictionResult parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ImageObjectDetectionPredictionResult 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.visionai.v1.ImageObjectDetectionPredictionResult + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ImageObjectDetectionPredictionResult + 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.visionai.v1.ImageObjectDetectionPredictionResult parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ImageObjectDetectionPredictionResult 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.visionai.v1.ImageObjectDetectionPredictionResult 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; + } + /** + * + * + *
+   * Prediction output format for Image Object Detection.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.ImageObjectDetectionPredictionResult} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.ImageObjectDetectionPredictionResult) + com.google.cloud.visionai.v1.ImageObjectDetectionPredictionResultOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.AnnotationsProto + .internal_static_google_cloud_visionai_v1_ImageObjectDetectionPredictionResult_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.AnnotationsProto + .internal_static_google_cloud_visionai_v1_ImageObjectDetectionPredictionResult_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.ImageObjectDetectionPredictionResult.class, + com.google.cloud.visionai.v1.ImageObjectDetectionPredictionResult.Builder.class); + } + + // Construct using + // com.google.cloud.visionai.v1.ImageObjectDetectionPredictionResult.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + ids_ = emptyLongList(); + displayNames_ = com.google.protobuf.LazyStringArrayList.emptyList(); + confidences_ = emptyFloatList(); + if (bboxesBuilder_ == null) { + bboxes_ = java.util.Collections.emptyList(); + } else { + bboxes_ = null; + bboxesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000008); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.AnnotationsProto + .internal_static_google_cloud_visionai_v1_ImageObjectDetectionPredictionResult_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ImageObjectDetectionPredictionResult + getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.ImageObjectDetectionPredictionResult.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ImageObjectDetectionPredictionResult build() { + com.google.cloud.visionai.v1.ImageObjectDetectionPredictionResult result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ImageObjectDetectionPredictionResult buildPartial() { + com.google.cloud.visionai.v1.ImageObjectDetectionPredictionResult result = + new com.google.cloud.visionai.v1.ImageObjectDetectionPredictionResult(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.visionai.v1.ImageObjectDetectionPredictionResult result) { + if (bboxesBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0)) { + bboxes_ = java.util.Collections.unmodifiableList(bboxes_); + bitField0_ = (bitField0_ & ~0x00000008); + } + result.bboxes_ = bboxes_; + } else { + result.bboxes_ = bboxesBuilder_.build(); + } + } + + private void buildPartial0( + com.google.cloud.visionai.v1.ImageObjectDetectionPredictionResult result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + ids_.makeImmutable(); + result.ids_ = ids_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + displayNames_.makeImmutable(); + result.displayNames_ = displayNames_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + confidences_.makeImmutable(); + result.confidences_ = confidences_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.ImageObjectDetectionPredictionResult) { + return mergeFrom((com.google.cloud.visionai.v1.ImageObjectDetectionPredictionResult) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.visionai.v1.ImageObjectDetectionPredictionResult other) { + if (other + == com.google.cloud.visionai.v1.ImageObjectDetectionPredictionResult.getDefaultInstance()) + return this; + if (!other.ids_.isEmpty()) { + if (ids_.isEmpty()) { + ids_ = other.ids_; + ids_.makeImmutable(); + bitField0_ |= 0x00000001; + } else { + ensureIdsIsMutable(); + ids_.addAll(other.ids_); + } + onChanged(); + } + if (!other.displayNames_.isEmpty()) { + if (displayNames_.isEmpty()) { + displayNames_ = other.displayNames_; + bitField0_ |= 0x00000002; + } else { + ensureDisplayNamesIsMutable(); + displayNames_.addAll(other.displayNames_); + } + onChanged(); + } + if (!other.confidences_.isEmpty()) { + if (confidences_.isEmpty()) { + confidences_ = other.confidences_; + confidences_.makeImmutable(); + bitField0_ |= 0x00000004; + } else { + ensureConfidencesIsMutable(); + confidences_.addAll(other.confidences_); + } + onChanged(); + } + if (bboxesBuilder_ == null) { + if (!other.bboxes_.isEmpty()) { + if (bboxes_.isEmpty()) { + bboxes_ = other.bboxes_; + bitField0_ = (bitField0_ & ~0x00000008); + } else { + ensureBboxesIsMutable(); + bboxes_.addAll(other.bboxes_); + } + onChanged(); + } + } else { + if (!other.bboxes_.isEmpty()) { + if (bboxesBuilder_.isEmpty()) { + bboxesBuilder_.dispose(); + bboxesBuilder_ = null; + bboxes_ = other.bboxes_; + bitField0_ = (bitField0_ & ~0x00000008); + bboxesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getBboxesFieldBuilder() + : null; + } else { + bboxesBuilder_.addAllMessages(other.bboxes_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + long v = input.readInt64(); + ensureIdsIsMutable(); + ids_.addLong(v); + break; + } // case 8 + case 10: + { + int length = input.readRawVarint32(); + int limit = input.pushLimit(length); + ensureIdsIsMutable(); + while (input.getBytesUntilLimit() > 0) { + ids_.addLong(input.readInt64()); + } + input.popLimit(limit); + break; + } // case 10 + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureDisplayNamesIsMutable(); + displayNames_.add(s); + break; + } // case 18 + case 29: + { + float v = input.readFloat(); + ensureConfidencesIsMutable(); + confidences_.addFloat(v); + break; + } // case 29 + case 26: + { + int length = input.readRawVarint32(); + int limit = input.pushLimit(length); + int alloc = length > 4096 ? 4096 : length; + ensureConfidencesIsMutable(alloc / 4); + while (input.getBytesUntilLimit() > 0) { + confidences_.addFloat(input.readFloat()); + } + input.popLimit(limit); + break; + } // case 26 + case 34: + { + com.google.protobuf.ListValue m = + input.readMessage(com.google.protobuf.ListValue.parser(), extensionRegistry); + if (bboxesBuilder_ == null) { + ensureBboxesIsMutable(); + bboxes_.add(m); + } else { + bboxesBuilder_.addMessage(m); + } + break; + } // case 34 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.protobuf.Internal.LongList ids_ = emptyLongList(); + + private void ensureIdsIsMutable() { + if (!ids_.isModifiable()) { + ids_ = makeMutableCopy(ids_); + } + bitField0_ |= 0x00000001; + } + /** + * + * + *
+     * The resource IDs of the AnnotationSpecs that had been identified, ordered
+     * by the confidence score descendingly. It is the id segment instead of full
+     * resource name.
+     * 
+ * + * repeated int64 ids = 1; + * + * @return A list containing the ids. + */ + public java.util.List getIdsList() { + ids_.makeImmutable(); + return ids_; + } + /** + * + * + *
+     * The resource IDs of the AnnotationSpecs that had been identified, ordered
+     * by the confidence score descendingly. It is the id segment instead of full
+     * resource name.
+     * 
+ * + * repeated int64 ids = 1; + * + * @return The count of ids. + */ + public int getIdsCount() { + return ids_.size(); + } + /** + * + * + *
+     * The resource IDs of the AnnotationSpecs that had been identified, ordered
+     * by the confidence score descendingly. It is the id segment instead of full
+     * resource name.
+     * 
+ * + * repeated int64 ids = 1; + * + * @param index The index of the element to return. + * @return The ids at the given index. + */ + public long getIds(int index) { + return ids_.getLong(index); + } + /** + * + * + *
+     * The resource IDs of the AnnotationSpecs that had been identified, ordered
+     * by the confidence score descendingly. It is the id segment instead of full
+     * resource name.
+     * 
+ * + * repeated int64 ids = 1; + * + * @param index The index to set the value at. + * @param value The ids to set. + * @return This builder for chaining. + */ + public Builder setIds(int index, long value) { + + ensureIdsIsMutable(); + ids_.setLong(index, value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The resource IDs of the AnnotationSpecs that had been identified, ordered
+     * by the confidence score descendingly. It is the id segment instead of full
+     * resource name.
+     * 
+ * + * repeated int64 ids = 1; + * + * @param value The ids to add. + * @return This builder for chaining. + */ + public Builder addIds(long value) { + + ensureIdsIsMutable(); + ids_.addLong(value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The resource IDs of the AnnotationSpecs that had been identified, ordered
+     * by the confidence score descendingly. It is the id segment instead of full
+     * resource name.
+     * 
+ * + * repeated int64 ids = 1; + * + * @param values The ids to add. + * @return This builder for chaining. + */ + public Builder addAllIds(java.lang.Iterable values) { + ensureIdsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, ids_); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The resource IDs of the AnnotationSpecs that had been identified, ordered
+     * by the confidence score descendingly. It is the id segment instead of full
+     * resource name.
+     * 
+ * + * repeated int64 ids = 1; + * + * @return This builder for chaining. + */ + public Builder clearIds() { + ids_ = emptyLongList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList displayNames_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureDisplayNamesIsMutable() { + if (!displayNames_.isModifiable()) { + displayNames_ = new com.google.protobuf.LazyStringArrayList(displayNames_); + } + bitField0_ |= 0x00000002; + } + /** + * + * + *
+     * The display names of the AnnotationSpecs that had been identified, order
+     * matches the IDs.
+     * 
+ * + * repeated string display_names = 2; + * + * @return A list containing the displayNames. + */ + public com.google.protobuf.ProtocolStringList getDisplayNamesList() { + displayNames_.makeImmutable(); + return displayNames_; + } + /** + * + * + *
+     * The display names of the AnnotationSpecs that had been identified, order
+     * matches the IDs.
+     * 
+ * + * repeated string display_names = 2; + * + * @return The count of displayNames. + */ + public int getDisplayNamesCount() { + return displayNames_.size(); + } + /** + * + * + *
+     * The display names of the AnnotationSpecs that had been identified, order
+     * matches the IDs.
+     * 
+ * + * repeated string display_names = 2; + * + * @param index The index of the element to return. + * @return The displayNames at the given index. + */ + public java.lang.String getDisplayNames(int index) { + return displayNames_.get(index); + } + /** + * + * + *
+     * The display names of the AnnotationSpecs that had been identified, order
+     * matches the IDs.
+     * 
+ * + * repeated string display_names = 2; + * + * @param index The index of the value to return. + * @return The bytes of the displayNames at the given index. + */ + public com.google.protobuf.ByteString getDisplayNamesBytes(int index) { + return displayNames_.getByteString(index); + } + /** + * + * + *
+     * The display names of the AnnotationSpecs that had been identified, order
+     * matches the IDs.
+     * 
+ * + * repeated string display_names = 2; + * + * @param index The index to set the value at. + * @param value The displayNames to set. + * @return This builder for chaining. + */ + public Builder setDisplayNames(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureDisplayNamesIsMutable(); + displayNames_.set(index, value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * The display names of the AnnotationSpecs that had been identified, order
+     * matches the IDs.
+     * 
+ * + * repeated string display_names = 2; + * + * @param value The displayNames to add. + * @return This builder for chaining. + */ + public Builder addDisplayNames(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureDisplayNamesIsMutable(); + displayNames_.add(value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * The display names of the AnnotationSpecs that had been identified, order
+     * matches the IDs.
+     * 
+ * + * repeated string display_names = 2; + * + * @param values The displayNames to add. + * @return This builder for chaining. + */ + public Builder addAllDisplayNames(java.lang.Iterable values) { + ensureDisplayNamesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, displayNames_); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * The display names of the AnnotationSpecs that had been identified, order
+     * matches the IDs.
+     * 
+ * + * repeated string display_names = 2; + * + * @return This builder for chaining. + */ + public Builder clearDisplayNames() { + displayNames_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + ; + onChanged(); + return this; + } + /** + * + * + *
+     * The display names of the AnnotationSpecs that had been identified, order
+     * matches the IDs.
+     * 
+ * + * repeated string display_names = 2; + * + * @param value The bytes of the displayNames to add. + * @return This builder for chaining. + */ + public Builder addDisplayNamesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureDisplayNamesIsMutable(); + displayNames_.add(value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.protobuf.Internal.FloatList confidences_ = emptyFloatList(); + + private void ensureConfidencesIsMutable() { + if (!confidences_.isModifiable()) { + confidences_ = makeMutableCopy(confidences_); + } + bitField0_ |= 0x00000004; + } + + private void ensureConfidencesIsMutable(int capacity) { + if (!confidences_.isModifiable()) { + confidences_ = makeMutableCopy(confidences_, capacity); + } + bitField0_ |= 0x00000004; + } + /** + * + * + *
+     * The Model's confidences in correctness of the predicted IDs, higher value
+     * means higher confidence. Order matches the Ids.
+     * 
+ * + * repeated float confidences = 3; + * + * @return A list containing the confidences. + */ + public java.util.List getConfidencesList() { + confidences_.makeImmutable(); + return confidences_; + } + /** + * + * + *
+     * The Model's confidences in correctness of the predicted IDs, higher value
+     * means higher confidence. Order matches the Ids.
+     * 
+ * + * repeated float confidences = 3; + * + * @return The count of confidences. + */ + public int getConfidencesCount() { + return confidences_.size(); + } + /** + * + * + *
+     * The Model's confidences in correctness of the predicted IDs, higher value
+     * means higher confidence. Order matches the Ids.
+     * 
+ * + * repeated float confidences = 3; + * + * @param index The index of the element to return. + * @return The confidences at the given index. + */ + public float getConfidences(int index) { + return confidences_.getFloat(index); + } + /** + * + * + *
+     * The Model's confidences in correctness of the predicted IDs, higher value
+     * means higher confidence. Order matches the Ids.
+     * 
+ * + * repeated float confidences = 3; + * + * @param index The index to set the value at. + * @param value The confidences to set. + * @return This builder for chaining. + */ + public Builder setConfidences(int index, float value) { + + ensureConfidencesIsMutable(); + confidences_.setFloat(index, value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * The Model's confidences in correctness of the predicted IDs, higher value
+     * means higher confidence. Order matches the Ids.
+     * 
+ * + * repeated float confidences = 3; + * + * @param value The confidences to add. + * @return This builder for chaining. + */ + public Builder addConfidences(float value) { + + ensureConfidencesIsMutable(); + confidences_.addFloat(value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * The Model's confidences in correctness of the predicted IDs, higher value
+     * means higher confidence. Order matches the Ids.
+     * 
+ * + * repeated float confidences = 3; + * + * @param values The confidences to add. + * @return This builder for chaining. + */ + public Builder addAllConfidences(java.lang.Iterable values) { + ensureConfidencesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, confidences_); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * The Model's confidences in correctness of the predicted IDs, higher value
+     * means higher confidence. Order matches the Ids.
+     * 
+ * + * repeated float confidences = 3; + * + * @return This builder for chaining. + */ + public Builder clearConfidences() { + confidences_ = emptyFloatList(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + private java.util.List bboxes_ = + java.util.Collections.emptyList(); + + private void ensureBboxesIsMutable() { + if (!((bitField0_ & 0x00000008) != 0)) { + bboxes_ = new java.util.ArrayList(bboxes_); + bitField0_ |= 0x00000008; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.protobuf.ListValue, + com.google.protobuf.ListValue.Builder, + com.google.protobuf.ListValueOrBuilder> + bboxesBuilder_; + + /** + * + * + *
+     * Bounding boxes, i.e. the rectangles over the image, that pinpoint
+     * the found AnnotationSpecs. Given in order that matches the IDs. Each
+     * bounding box is an array of 4 numbers `xMin`, `xMax`, `yMin`, and
+     * `yMax`, which represent the extremal coordinates of the box. They are
+     * relative to the image size, and the point 0,0 is in the top left
+     * of the image.
+     * 
+ * + * repeated .google.protobuf.ListValue bboxes = 4; + */ + public java.util.List getBboxesList() { + if (bboxesBuilder_ == null) { + return java.util.Collections.unmodifiableList(bboxes_); + } else { + return bboxesBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Bounding boxes, i.e. the rectangles over the image, that pinpoint
+     * the found AnnotationSpecs. Given in order that matches the IDs. Each
+     * bounding box is an array of 4 numbers `xMin`, `xMax`, `yMin`, and
+     * `yMax`, which represent the extremal coordinates of the box. They are
+     * relative to the image size, and the point 0,0 is in the top left
+     * of the image.
+     * 
+ * + * repeated .google.protobuf.ListValue bboxes = 4; + */ + public int getBboxesCount() { + if (bboxesBuilder_ == null) { + return bboxes_.size(); + } else { + return bboxesBuilder_.getCount(); + } + } + /** + * + * + *
+     * Bounding boxes, i.e. the rectangles over the image, that pinpoint
+     * the found AnnotationSpecs. Given in order that matches the IDs. Each
+     * bounding box is an array of 4 numbers `xMin`, `xMax`, `yMin`, and
+     * `yMax`, which represent the extremal coordinates of the box. They are
+     * relative to the image size, and the point 0,0 is in the top left
+     * of the image.
+     * 
+ * + * repeated .google.protobuf.ListValue bboxes = 4; + */ + public com.google.protobuf.ListValue getBboxes(int index) { + if (bboxesBuilder_ == null) { + return bboxes_.get(index); + } else { + return bboxesBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Bounding boxes, i.e. the rectangles over the image, that pinpoint
+     * the found AnnotationSpecs. Given in order that matches the IDs. Each
+     * bounding box is an array of 4 numbers `xMin`, `xMax`, `yMin`, and
+     * `yMax`, which represent the extremal coordinates of the box. They are
+     * relative to the image size, and the point 0,0 is in the top left
+     * of the image.
+     * 
+ * + * repeated .google.protobuf.ListValue bboxes = 4; + */ + public Builder setBboxes(int index, com.google.protobuf.ListValue value) { + if (bboxesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBboxesIsMutable(); + bboxes_.set(index, value); + onChanged(); + } else { + bboxesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Bounding boxes, i.e. the rectangles over the image, that pinpoint
+     * the found AnnotationSpecs. Given in order that matches the IDs. Each
+     * bounding box is an array of 4 numbers `xMin`, `xMax`, `yMin`, and
+     * `yMax`, which represent the extremal coordinates of the box. They are
+     * relative to the image size, and the point 0,0 is in the top left
+     * of the image.
+     * 
+ * + * repeated .google.protobuf.ListValue bboxes = 4; + */ + public Builder setBboxes(int index, com.google.protobuf.ListValue.Builder builderForValue) { + if (bboxesBuilder_ == null) { + ensureBboxesIsMutable(); + bboxes_.set(index, builderForValue.build()); + onChanged(); + } else { + bboxesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Bounding boxes, i.e. the rectangles over the image, that pinpoint
+     * the found AnnotationSpecs. Given in order that matches the IDs. Each
+     * bounding box is an array of 4 numbers `xMin`, `xMax`, `yMin`, and
+     * `yMax`, which represent the extremal coordinates of the box. They are
+     * relative to the image size, and the point 0,0 is in the top left
+     * of the image.
+     * 
+ * + * repeated .google.protobuf.ListValue bboxes = 4; + */ + public Builder addBboxes(com.google.protobuf.ListValue value) { + if (bboxesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBboxesIsMutable(); + bboxes_.add(value); + onChanged(); + } else { + bboxesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Bounding boxes, i.e. the rectangles over the image, that pinpoint
+     * the found AnnotationSpecs. Given in order that matches the IDs. Each
+     * bounding box is an array of 4 numbers `xMin`, `xMax`, `yMin`, and
+     * `yMax`, which represent the extremal coordinates of the box. They are
+     * relative to the image size, and the point 0,0 is in the top left
+     * of the image.
+     * 
+ * + * repeated .google.protobuf.ListValue bboxes = 4; + */ + public Builder addBboxes(int index, com.google.protobuf.ListValue value) { + if (bboxesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBboxesIsMutable(); + bboxes_.add(index, value); + onChanged(); + } else { + bboxesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Bounding boxes, i.e. the rectangles over the image, that pinpoint
+     * the found AnnotationSpecs. Given in order that matches the IDs. Each
+     * bounding box is an array of 4 numbers `xMin`, `xMax`, `yMin`, and
+     * `yMax`, which represent the extremal coordinates of the box. They are
+     * relative to the image size, and the point 0,0 is in the top left
+     * of the image.
+     * 
+ * + * repeated .google.protobuf.ListValue bboxes = 4; + */ + public Builder addBboxes(com.google.protobuf.ListValue.Builder builderForValue) { + if (bboxesBuilder_ == null) { + ensureBboxesIsMutable(); + bboxes_.add(builderForValue.build()); + onChanged(); + } else { + bboxesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Bounding boxes, i.e. the rectangles over the image, that pinpoint
+     * the found AnnotationSpecs. Given in order that matches the IDs. Each
+     * bounding box is an array of 4 numbers `xMin`, `xMax`, `yMin`, and
+     * `yMax`, which represent the extremal coordinates of the box. They are
+     * relative to the image size, and the point 0,0 is in the top left
+     * of the image.
+     * 
+ * + * repeated .google.protobuf.ListValue bboxes = 4; + */ + public Builder addBboxes(int index, com.google.protobuf.ListValue.Builder builderForValue) { + if (bboxesBuilder_ == null) { + ensureBboxesIsMutable(); + bboxes_.add(index, builderForValue.build()); + onChanged(); + } else { + bboxesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Bounding boxes, i.e. the rectangles over the image, that pinpoint
+     * the found AnnotationSpecs. Given in order that matches the IDs. Each
+     * bounding box is an array of 4 numbers `xMin`, `xMax`, `yMin`, and
+     * `yMax`, which represent the extremal coordinates of the box. They are
+     * relative to the image size, and the point 0,0 is in the top left
+     * of the image.
+     * 
+ * + * repeated .google.protobuf.ListValue bboxes = 4; + */ + public Builder addAllBboxes( + java.lang.Iterable values) { + if (bboxesBuilder_ == null) { + ensureBboxesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, bboxes_); + onChanged(); + } else { + bboxesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Bounding boxes, i.e. the rectangles over the image, that pinpoint
+     * the found AnnotationSpecs. Given in order that matches the IDs. Each
+     * bounding box is an array of 4 numbers `xMin`, `xMax`, `yMin`, and
+     * `yMax`, which represent the extremal coordinates of the box. They are
+     * relative to the image size, and the point 0,0 is in the top left
+     * of the image.
+     * 
+ * + * repeated .google.protobuf.ListValue bboxes = 4; + */ + public Builder clearBboxes() { + if (bboxesBuilder_ == null) { + bboxes_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + } else { + bboxesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Bounding boxes, i.e. the rectangles over the image, that pinpoint
+     * the found AnnotationSpecs. Given in order that matches the IDs. Each
+     * bounding box is an array of 4 numbers `xMin`, `xMax`, `yMin`, and
+     * `yMax`, which represent the extremal coordinates of the box. They are
+     * relative to the image size, and the point 0,0 is in the top left
+     * of the image.
+     * 
+ * + * repeated .google.protobuf.ListValue bboxes = 4; + */ + public Builder removeBboxes(int index) { + if (bboxesBuilder_ == null) { + ensureBboxesIsMutable(); + bboxes_.remove(index); + onChanged(); + } else { + bboxesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Bounding boxes, i.e. the rectangles over the image, that pinpoint
+     * the found AnnotationSpecs. Given in order that matches the IDs. Each
+     * bounding box is an array of 4 numbers `xMin`, `xMax`, `yMin`, and
+     * `yMax`, which represent the extremal coordinates of the box. They are
+     * relative to the image size, and the point 0,0 is in the top left
+     * of the image.
+     * 
+ * + * repeated .google.protobuf.ListValue bboxes = 4; + */ + public com.google.protobuf.ListValue.Builder getBboxesBuilder(int index) { + return getBboxesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Bounding boxes, i.e. the rectangles over the image, that pinpoint
+     * the found AnnotationSpecs. Given in order that matches the IDs. Each
+     * bounding box is an array of 4 numbers `xMin`, `xMax`, `yMin`, and
+     * `yMax`, which represent the extremal coordinates of the box. They are
+     * relative to the image size, and the point 0,0 is in the top left
+     * of the image.
+     * 
+ * + * repeated .google.protobuf.ListValue bboxes = 4; + */ + public com.google.protobuf.ListValueOrBuilder getBboxesOrBuilder(int index) { + if (bboxesBuilder_ == null) { + return bboxes_.get(index); + } else { + return bboxesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Bounding boxes, i.e. the rectangles over the image, that pinpoint
+     * the found AnnotationSpecs. Given in order that matches the IDs. Each
+     * bounding box is an array of 4 numbers `xMin`, `xMax`, `yMin`, and
+     * `yMax`, which represent the extremal coordinates of the box. They are
+     * relative to the image size, and the point 0,0 is in the top left
+     * of the image.
+     * 
+ * + * repeated .google.protobuf.ListValue bboxes = 4; + */ + public java.util.List + getBboxesOrBuilderList() { + if (bboxesBuilder_ != null) { + return bboxesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(bboxes_); + } + } + /** + * + * + *
+     * Bounding boxes, i.e. the rectangles over the image, that pinpoint
+     * the found AnnotationSpecs. Given in order that matches the IDs. Each
+     * bounding box is an array of 4 numbers `xMin`, `xMax`, `yMin`, and
+     * `yMax`, which represent the extremal coordinates of the box. They are
+     * relative to the image size, and the point 0,0 is in the top left
+     * of the image.
+     * 
+ * + * repeated .google.protobuf.ListValue bboxes = 4; + */ + public com.google.protobuf.ListValue.Builder addBboxesBuilder() { + return getBboxesFieldBuilder().addBuilder(com.google.protobuf.ListValue.getDefaultInstance()); + } + /** + * + * + *
+     * Bounding boxes, i.e. the rectangles over the image, that pinpoint
+     * the found AnnotationSpecs. Given in order that matches the IDs. Each
+     * bounding box is an array of 4 numbers `xMin`, `xMax`, `yMin`, and
+     * `yMax`, which represent the extremal coordinates of the box. They are
+     * relative to the image size, and the point 0,0 is in the top left
+     * of the image.
+     * 
+ * + * repeated .google.protobuf.ListValue bboxes = 4; + */ + public com.google.protobuf.ListValue.Builder addBboxesBuilder(int index) { + return getBboxesFieldBuilder() + .addBuilder(index, com.google.protobuf.ListValue.getDefaultInstance()); + } + /** + * + * + *
+     * Bounding boxes, i.e. the rectangles over the image, that pinpoint
+     * the found AnnotationSpecs. Given in order that matches the IDs. Each
+     * bounding box is an array of 4 numbers `xMin`, `xMax`, `yMin`, and
+     * `yMax`, which represent the extremal coordinates of the box. They are
+     * relative to the image size, and the point 0,0 is in the top left
+     * of the image.
+     * 
+ * + * repeated .google.protobuf.ListValue bboxes = 4; + */ + public java.util.List getBboxesBuilderList() { + return getBboxesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.protobuf.ListValue, + com.google.protobuf.ListValue.Builder, + com.google.protobuf.ListValueOrBuilder> + getBboxesFieldBuilder() { + if (bboxesBuilder_ == null) { + bboxesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.protobuf.ListValue, + com.google.protobuf.ListValue.Builder, + com.google.protobuf.ListValueOrBuilder>( + bboxes_, ((bitField0_ & 0x00000008) != 0), getParentForChildren(), isClean()); + bboxes_ = null; + } + return bboxesBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.ImageObjectDetectionPredictionResult) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.ImageObjectDetectionPredictionResult) + private static final com.google.cloud.visionai.v1.ImageObjectDetectionPredictionResult + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.ImageObjectDetectionPredictionResult(); + } + + public static com.google.cloud.visionai.v1.ImageObjectDetectionPredictionResult + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ImageObjectDetectionPredictionResult parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.ImageObjectDetectionPredictionResult + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ImageObjectDetectionPredictionResultOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ImageObjectDetectionPredictionResultOrBuilder.java new file mode 100644 index 000000000000..994a6416d47c --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ImageObjectDetectionPredictionResultOrBuilder.java @@ -0,0 +1,242 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/annotations.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface ImageObjectDetectionPredictionResultOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.ImageObjectDetectionPredictionResult) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The resource IDs of the AnnotationSpecs that had been identified, ordered
+   * by the confidence score descendingly. It is the id segment instead of full
+   * resource name.
+   * 
+ * + * repeated int64 ids = 1; + * + * @return A list containing the ids. + */ + java.util.List getIdsList(); + /** + * + * + *
+   * The resource IDs of the AnnotationSpecs that had been identified, ordered
+   * by the confidence score descendingly. It is the id segment instead of full
+   * resource name.
+   * 
+ * + * repeated int64 ids = 1; + * + * @return The count of ids. + */ + int getIdsCount(); + /** + * + * + *
+   * The resource IDs of the AnnotationSpecs that had been identified, ordered
+   * by the confidence score descendingly. It is the id segment instead of full
+   * resource name.
+   * 
+ * + * repeated int64 ids = 1; + * + * @param index The index of the element to return. + * @return The ids at the given index. + */ + long getIds(int index); + + /** + * + * + *
+   * The display names of the AnnotationSpecs that had been identified, order
+   * matches the IDs.
+   * 
+ * + * repeated string display_names = 2; + * + * @return A list containing the displayNames. + */ + java.util.List getDisplayNamesList(); + /** + * + * + *
+   * The display names of the AnnotationSpecs that had been identified, order
+   * matches the IDs.
+   * 
+ * + * repeated string display_names = 2; + * + * @return The count of displayNames. + */ + int getDisplayNamesCount(); + /** + * + * + *
+   * The display names of the AnnotationSpecs that had been identified, order
+   * matches the IDs.
+   * 
+ * + * repeated string display_names = 2; + * + * @param index The index of the element to return. + * @return The displayNames at the given index. + */ + java.lang.String getDisplayNames(int index); + /** + * + * + *
+   * The display names of the AnnotationSpecs that had been identified, order
+   * matches the IDs.
+   * 
+ * + * repeated string display_names = 2; + * + * @param index The index of the value to return. + * @return The bytes of the displayNames at the given index. + */ + com.google.protobuf.ByteString getDisplayNamesBytes(int index); + + /** + * + * + *
+   * The Model's confidences in correctness of the predicted IDs, higher value
+   * means higher confidence. Order matches the Ids.
+   * 
+ * + * repeated float confidences = 3; + * + * @return A list containing the confidences. + */ + java.util.List getConfidencesList(); + /** + * + * + *
+   * The Model's confidences in correctness of the predicted IDs, higher value
+   * means higher confidence. Order matches the Ids.
+   * 
+ * + * repeated float confidences = 3; + * + * @return The count of confidences. + */ + int getConfidencesCount(); + /** + * + * + *
+   * The Model's confidences in correctness of the predicted IDs, higher value
+   * means higher confidence. Order matches the Ids.
+   * 
+ * + * repeated float confidences = 3; + * + * @param index The index of the element to return. + * @return The confidences at the given index. + */ + float getConfidences(int index); + + /** + * + * + *
+   * Bounding boxes, i.e. the rectangles over the image, that pinpoint
+   * the found AnnotationSpecs. Given in order that matches the IDs. Each
+   * bounding box is an array of 4 numbers `xMin`, `xMax`, `yMin`, and
+   * `yMax`, which represent the extremal coordinates of the box. They are
+   * relative to the image size, and the point 0,0 is in the top left
+   * of the image.
+   * 
+ * + * repeated .google.protobuf.ListValue bboxes = 4; + */ + java.util.List getBboxesList(); + /** + * + * + *
+   * Bounding boxes, i.e. the rectangles over the image, that pinpoint
+   * the found AnnotationSpecs. Given in order that matches the IDs. Each
+   * bounding box is an array of 4 numbers `xMin`, `xMax`, `yMin`, and
+   * `yMax`, which represent the extremal coordinates of the box. They are
+   * relative to the image size, and the point 0,0 is in the top left
+   * of the image.
+   * 
+ * + * repeated .google.protobuf.ListValue bboxes = 4; + */ + com.google.protobuf.ListValue getBboxes(int index); + /** + * + * + *
+   * Bounding boxes, i.e. the rectangles over the image, that pinpoint
+   * the found AnnotationSpecs. Given in order that matches the IDs. Each
+   * bounding box is an array of 4 numbers `xMin`, `xMax`, `yMin`, and
+   * `yMax`, which represent the extremal coordinates of the box. They are
+   * relative to the image size, and the point 0,0 is in the top left
+   * of the image.
+   * 
+ * + * repeated .google.protobuf.ListValue bboxes = 4; + */ + int getBboxesCount(); + /** + * + * + *
+   * Bounding boxes, i.e. the rectangles over the image, that pinpoint
+   * the found AnnotationSpecs. Given in order that matches the IDs. Each
+   * bounding box is an array of 4 numbers `xMin`, `xMax`, `yMin`, and
+   * `yMax`, which represent the extremal coordinates of the box. They are
+   * relative to the image size, and the point 0,0 is in the top left
+   * of the image.
+   * 
+ * + * repeated .google.protobuf.ListValue bboxes = 4; + */ + java.util.List getBboxesOrBuilderList(); + /** + * + * + *
+   * Bounding boxes, i.e. the rectangles over the image, that pinpoint
+   * the found AnnotationSpecs. Given in order that matches the IDs. Each
+   * bounding box is an array of 4 numbers `xMin`, `xMax`, `yMin`, and
+   * `yMax`, which represent the extremal coordinates of the box. They are
+   * relative to the image size, and the point 0,0 is in the top left
+   * of the image.
+   * 
+ * + * repeated .google.protobuf.ListValue bboxes = 4; + */ + com.google.protobuf.ListValueOrBuilder getBboxesOrBuilder(int index); +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ImageQuery.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ImageQuery.java new file mode 100644 index 000000000000..a86cca5813a2 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ImageQuery.java @@ -0,0 +1,908 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/warehouse.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * Image query for search endpoint request.
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.ImageQuery} + */ +public final class ImageQuery extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.ImageQuery) + ImageQueryOrBuilder { + private static final long serialVersionUID = 0L; + // Use ImageQuery.newBuilder() to construct. + private ImageQuery(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ImageQuery() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ImageQuery(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_ImageQuery_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_ImageQuery_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.ImageQuery.class, + com.google.cloud.visionai.v1.ImageQuery.Builder.class); + } + + private int imageCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object image_; + + public enum ImageCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + INPUT_IMAGE(1), + ASSET(2), + IMAGE_NOT_SET(0); + private final int value; + + private ImageCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static ImageCase valueOf(int value) { + return forNumber(value); + } + + public static ImageCase forNumber(int value) { + switch (value) { + case 1: + return INPUT_IMAGE; + case 2: + return ASSET; + case 0: + return IMAGE_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public ImageCase getImageCase() { + return ImageCase.forNumber(imageCase_); + } + + public static final int INPUT_IMAGE_FIELD_NUMBER = 1; + /** + * + * + *
+   * Input image in raw bytes.
+   * 
+ * + * bytes input_image = 1; + * + * @return Whether the inputImage field is set. + */ + @java.lang.Override + public boolean hasInputImage() { + return imageCase_ == 1; + } + /** + * + * + *
+   * Input image in raw bytes.
+   * 
+ * + * bytes input_image = 1; + * + * @return The inputImage. + */ + @java.lang.Override + public com.google.protobuf.ByteString getInputImage() { + if (imageCase_ == 1) { + return (com.google.protobuf.ByteString) image_; + } + return com.google.protobuf.ByteString.EMPTY; + } + + public static final int ASSET_FIELD_NUMBER = 2; + /** + * + * + *
+   * Resource name of the asset. Only supported in IMAGE corpus type.
+   * Format:
+   * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/assets/{asset_id}`
+   * 
+ * + * string asset = 2 [(.google.api.resource_reference) = { ... } + * + * @return Whether the asset field is set. + */ + public boolean hasAsset() { + return imageCase_ == 2; + } + /** + * + * + *
+   * Resource name of the asset. Only supported in IMAGE corpus type.
+   * Format:
+   * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/assets/{asset_id}`
+   * 
+ * + * string asset = 2 [(.google.api.resource_reference) = { ... } + * + * @return The asset. + */ + public java.lang.String getAsset() { + java.lang.Object ref = ""; + if (imageCase_ == 2) { + ref = image_; + } + 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(); + if (imageCase_ == 2) { + image_ = s; + } + return s; + } + } + /** + * + * + *
+   * Resource name of the asset. Only supported in IMAGE corpus type.
+   * Format:
+   * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/assets/{asset_id}`
+   * 
+ * + * string asset = 2 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for asset. + */ + public com.google.protobuf.ByteString getAssetBytes() { + java.lang.Object ref = ""; + if (imageCase_ == 2) { + ref = image_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (imageCase_ == 2) { + image_ = 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 (imageCase_ == 1) { + output.writeBytes(1, (com.google.protobuf.ByteString) image_); + } + if (imageCase_ == 2) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, image_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (imageCase_ == 1) { + size += + com.google.protobuf.CodedOutputStream.computeBytesSize( + 1, (com.google.protobuf.ByteString) image_); + } + if (imageCase_ == 2) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, image_); + } + size += getUnknownFields().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.visionai.v1.ImageQuery)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.ImageQuery other = (com.google.cloud.visionai.v1.ImageQuery) obj; + + if (!getImageCase().equals(other.getImageCase())) return false; + switch (imageCase_) { + case 1: + if (!getInputImage().equals(other.getInputImage())) return false; + break; + case 2: + if (!getAsset().equals(other.getAsset())) return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + switch (imageCase_) { + case 1: + hash = (37 * hash) + INPUT_IMAGE_FIELD_NUMBER; + hash = (53 * hash) + getInputImage().hashCode(); + break; + case 2: + hash = (37 * hash) + ASSET_FIELD_NUMBER; + hash = (53 * hash) + getAsset().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.ImageQuery parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ImageQuery 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.visionai.v1.ImageQuery parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ImageQuery 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.visionai.v1.ImageQuery parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ImageQuery parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.ImageQuery parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ImageQuery 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.visionai.v1.ImageQuery parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ImageQuery 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.visionai.v1.ImageQuery parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ImageQuery 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.visionai.v1.ImageQuery 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; + } + /** + * + * + *
+   * Image query for search endpoint request.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.ImageQuery} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.ImageQuery) + com.google.cloud.visionai.v1.ImageQueryOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_ImageQuery_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_ImageQuery_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.ImageQuery.class, + com.google.cloud.visionai.v1.ImageQuery.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.ImageQuery.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + imageCase_ = 0; + image_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_ImageQuery_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ImageQuery getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.ImageQuery.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ImageQuery build() { + com.google.cloud.visionai.v1.ImageQuery result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ImageQuery buildPartial() { + com.google.cloud.visionai.v1.ImageQuery result = + new com.google.cloud.visionai.v1.ImageQuery(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.visionai.v1.ImageQuery result) { + int from_bitField0_ = bitField0_; + } + + private void buildPartialOneofs(com.google.cloud.visionai.v1.ImageQuery result) { + result.imageCase_ = imageCase_; + result.image_ = this.image_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.ImageQuery) { + return mergeFrom((com.google.cloud.visionai.v1.ImageQuery) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.ImageQuery other) { + if (other == com.google.cloud.visionai.v1.ImageQuery.getDefaultInstance()) return this; + switch (other.getImageCase()) { + case INPUT_IMAGE: + { + setInputImage(other.getInputImage()); + break; + } + case ASSET: + { + imageCase_ = 2; + image_ = other.image_; + onChanged(); + break; + } + case IMAGE_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + image_ = input.readBytes(); + imageCase_ = 1; + break; + } // case 10 + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + imageCase_ = 2; + image_ = s; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int imageCase_ = 0; + private java.lang.Object image_; + + public ImageCase getImageCase() { + return ImageCase.forNumber(imageCase_); + } + + public Builder clearImage() { + imageCase_ = 0; + image_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + /** + * + * + *
+     * Input image in raw bytes.
+     * 
+ * + * bytes input_image = 1; + * + * @return Whether the inputImage field is set. + */ + public boolean hasInputImage() { + return imageCase_ == 1; + } + /** + * + * + *
+     * Input image in raw bytes.
+     * 
+ * + * bytes input_image = 1; + * + * @return The inputImage. + */ + public com.google.protobuf.ByteString getInputImage() { + if (imageCase_ == 1) { + return (com.google.protobuf.ByteString) image_; + } + return com.google.protobuf.ByteString.EMPTY; + } + /** + * + * + *
+     * Input image in raw bytes.
+     * 
+ * + * bytes input_image = 1; + * + * @param value The inputImage to set. + * @return This builder for chaining. + */ + public Builder setInputImage(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + imageCase_ = 1; + image_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Input image in raw bytes.
+     * 
+ * + * bytes input_image = 1; + * + * @return This builder for chaining. + */ + public Builder clearInputImage() { + if (imageCase_ == 1) { + imageCase_ = 0; + image_ = null; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Resource name of the asset. Only supported in IMAGE corpus type.
+     * Format:
+     * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/assets/{asset_id}`
+     * 
+ * + * string asset = 2 [(.google.api.resource_reference) = { ... } + * + * @return Whether the asset field is set. + */ + @java.lang.Override + public boolean hasAsset() { + return imageCase_ == 2; + } + /** + * + * + *
+     * Resource name of the asset. Only supported in IMAGE corpus type.
+     * Format:
+     * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/assets/{asset_id}`
+     * 
+ * + * string asset = 2 [(.google.api.resource_reference) = { ... } + * + * @return The asset. + */ + @java.lang.Override + public java.lang.String getAsset() { + java.lang.Object ref = ""; + if (imageCase_ == 2) { + ref = image_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (imageCase_ == 2) { + image_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Resource name of the asset. Only supported in IMAGE corpus type.
+     * Format:
+     * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/assets/{asset_id}`
+     * 
+ * + * string asset = 2 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for asset. + */ + @java.lang.Override + public com.google.protobuf.ByteString getAssetBytes() { + java.lang.Object ref = ""; + if (imageCase_ == 2) { + ref = image_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (imageCase_ == 2) { + image_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Resource name of the asset. Only supported in IMAGE corpus type.
+     * Format:
+     * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/assets/{asset_id}`
+     * 
+ * + * string asset = 2 [(.google.api.resource_reference) = { ... } + * + * @param value The asset to set. + * @return This builder for chaining. + */ + public Builder setAsset(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + imageCase_ = 2; + image_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Resource name of the asset. Only supported in IMAGE corpus type.
+     * Format:
+     * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/assets/{asset_id}`
+     * 
+ * + * string asset = 2 [(.google.api.resource_reference) = { ... } + * + * @return This builder for chaining. + */ + public Builder clearAsset() { + if (imageCase_ == 2) { + imageCase_ = 0; + image_ = null; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Resource name of the asset. Only supported in IMAGE corpus type.
+     * Format:
+     * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/assets/{asset_id}`
+     * 
+ * + * string asset = 2 [(.google.api.resource_reference) = { ... } + * + * @param value The bytes for asset to set. + * @return This builder for chaining. + */ + public Builder setAssetBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + imageCase_ = 2; + image_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.ImageQuery) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.ImageQuery) + private static final com.google.cloud.visionai.v1.ImageQuery DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.ImageQuery(); + } + + public static com.google.cloud.visionai.v1.ImageQuery getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ImageQuery parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.ImageQuery getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ImageQueryOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ImageQueryOrBuilder.java new file mode 100644 index 000000000000..93beca8b0e0c --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ImageQueryOrBuilder.java @@ -0,0 +1,96 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/warehouse.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface ImageQueryOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.ImageQuery) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Input image in raw bytes.
+   * 
+ * + * bytes input_image = 1; + * + * @return Whether the inputImage field is set. + */ + boolean hasInputImage(); + /** + * + * + *
+   * Input image in raw bytes.
+   * 
+ * + * bytes input_image = 1; + * + * @return The inputImage. + */ + com.google.protobuf.ByteString getInputImage(); + + /** + * + * + *
+   * Resource name of the asset. Only supported in IMAGE corpus type.
+   * Format:
+   * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/assets/{asset_id}`
+   * 
+ * + * string asset = 2 [(.google.api.resource_reference) = { ... } + * + * @return Whether the asset field is set. + */ + boolean hasAsset(); + /** + * + * + *
+   * Resource name of the asset. Only supported in IMAGE corpus type.
+   * Format:
+   * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/assets/{asset_id}`
+   * 
+ * + * string asset = 2 [(.google.api.resource_reference) = { ... } + * + * @return The asset. + */ + java.lang.String getAsset(); + /** + * + * + *
+   * Resource name of the asset. Only supported in IMAGE corpus type.
+   * Format:
+   * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/assets/{asset_id}`
+   * 
+ * + * string asset = 2 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for asset. + */ + com.google.protobuf.ByteString getAssetBytes(); + + com.google.cloud.visionai.v1.ImageQuery.ImageCase getImageCase(); +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ImageSegmentationPredictionResult.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ImageSegmentationPredictionResult.java new file mode 100644 index 000000000000..128e257328aa --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ImageSegmentationPredictionResult.java @@ -0,0 +1,878 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/annotations.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * Prediction output format for Image Segmentation.
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.ImageSegmentationPredictionResult} + */ +public final class ImageSegmentationPredictionResult extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.ImageSegmentationPredictionResult) + ImageSegmentationPredictionResultOrBuilder { + private static final long serialVersionUID = 0L; + // Use ImageSegmentationPredictionResult.newBuilder() to construct. + private ImageSegmentationPredictionResult( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ImageSegmentationPredictionResult() { + categoryMask_ = ""; + confidenceMask_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ImageSegmentationPredictionResult(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.AnnotationsProto + .internal_static_google_cloud_visionai_v1_ImageSegmentationPredictionResult_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.AnnotationsProto + .internal_static_google_cloud_visionai_v1_ImageSegmentationPredictionResult_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.ImageSegmentationPredictionResult.class, + com.google.cloud.visionai.v1.ImageSegmentationPredictionResult.Builder.class); + } + + public static final int CATEGORY_MASK_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object categoryMask_ = ""; + /** + * + * + *
+   * A PNG image where each pixel in the mask represents the category in which
+   * the pixel in the original image was predicted to belong to. The size of
+   * this image will be the same as the original image. The mapping between the
+   * AnntoationSpec and the color can be found in model's metadata. The model
+   * will choose the most likely category and if none of the categories reach
+   * the confidence threshold, the pixel will be marked as background.
+   * 
+ * + * string category_mask = 1; + * + * @return The categoryMask. + */ + @java.lang.Override + public java.lang.String getCategoryMask() { + java.lang.Object ref = categoryMask_; + 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(); + categoryMask_ = s; + return s; + } + } + /** + * + * + *
+   * A PNG image where each pixel in the mask represents the category in which
+   * the pixel in the original image was predicted to belong to. The size of
+   * this image will be the same as the original image. The mapping between the
+   * AnntoationSpec and the color can be found in model's metadata. The model
+   * will choose the most likely category and if none of the categories reach
+   * the confidence threshold, the pixel will be marked as background.
+   * 
+ * + * string category_mask = 1; + * + * @return The bytes for categoryMask. + */ + @java.lang.Override + public com.google.protobuf.ByteString getCategoryMaskBytes() { + java.lang.Object ref = categoryMask_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + categoryMask_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CONFIDENCE_MASK_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object confidenceMask_ = ""; + /** + * + * + *
+   * A one channel image which is encoded as an 8bit lossless PNG. The size of
+   * the image will be the same as the original image. For a specific pixel,
+   * darker color means less confidence in correctness of the cateogry in the
+   * categoryMask for the corresponding pixel. Black means no confidence and
+   * white means complete confidence.
+   * 
+ * + * string confidence_mask = 2; + * + * @return The confidenceMask. + */ + @java.lang.Override + public java.lang.String getConfidenceMask() { + java.lang.Object ref = confidenceMask_; + 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(); + confidenceMask_ = s; + return s; + } + } + /** + * + * + *
+   * A one channel image which is encoded as an 8bit lossless PNG. The size of
+   * the image will be the same as the original image. For a specific pixel,
+   * darker color means less confidence in correctness of the cateogry in the
+   * categoryMask for the corresponding pixel. Black means no confidence and
+   * white means complete confidence.
+   * 
+ * + * string confidence_mask = 2; + * + * @return The bytes for confidenceMask. + */ + @java.lang.Override + public com.google.protobuf.ByteString getConfidenceMaskBytes() { + java.lang.Object ref = confidenceMask_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + confidenceMask_ = 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(categoryMask_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, categoryMask_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(confidenceMask_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, confidenceMask_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(categoryMask_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, categoryMask_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(confidenceMask_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, confidenceMask_); + } + size += getUnknownFields().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.visionai.v1.ImageSegmentationPredictionResult)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.ImageSegmentationPredictionResult other = + (com.google.cloud.visionai.v1.ImageSegmentationPredictionResult) obj; + + if (!getCategoryMask().equals(other.getCategoryMask())) return false; + if (!getConfidenceMask().equals(other.getConfidenceMask())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + CATEGORY_MASK_FIELD_NUMBER; + hash = (53 * hash) + getCategoryMask().hashCode(); + hash = (37 * hash) + CONFIDENCE_MASK_FIELD_NUMBER; + hash = (53 * hash) + getConfidenceMask().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.ImageSegmentationPredictionResult parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ImageSegmentationPredictionResult 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.visionai.v1.ImageSegmentationPredictionResult parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ImageSegmentationPredictionResult 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.visionai.v1.ImageSegmentationPredictionResult parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ImageSegmentationPredictionResult parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.ImageSegmentationPredictionResult parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ImageSegmentationPredictionResult 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.visionai.v1.ImageSegmentationPredictionResult parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ImageSegmentationPredictionResult 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.visionai.v1.ImageSegmentationPredictionResult parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ImageSegmentationPredictionResult 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.visionai.v1.ImageSegmentationPredictionResult 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; + } + /** + * + * + *
+   * Prediction output format for Image Segmentation.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.ImageSegmentationPredictionResult} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.ImageSegmentationPredictionResult) + com.google.cloud.visionai.v1.ImageSegmentationPredictionResultOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.AnnotationsProto + .internal_static_google_cloud_visionai_v1_ImageSegmentationPredictionResult_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.AnnotationsProto + .internal_static_google_cloud_visionai_v1_ImageSegmentationPredictionResult_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.ImageSegmentationPredictionResult.class, + com.google.cloud.visionai.v1.ImageSegmentationPredictionResult.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.ImageSegmentationPredictionResult.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + categoryMask_ = ""; + confidenceMask_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.AnnotationsProto + .internal_static_google_cloud_visionai_v1_ImageSegmentationPredictionResult_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ImageSegmentationPredictionResult + getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.ImageSegmentationPredictionResult.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ImageSegmentationPredictionResult build() { + com.google.cloud.visionai.v1.ImageSegmentationPredictionResult result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ImageSegmentationPredictionResult buildPartial() { + com.google.cloud.visionai.v1.ImageSegmentationPredictionResult result = + new com.google.cloud.visionai.v1.ImageSegmentationPredictionResult(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.visionai.v1.ImageSegmentationPredictionResult result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.categoryMask_ = categoryMask_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.confidenceMask_ = confidenceMask_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.ImageSegmentationPredictionResult) { + return mergeFrom((com.google.cloud.visionai.v1.ImageSegmentationPredictionResult) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.ImageSegmentationPredictionResult other) { + if (other + == com.google.cloud.visionai.v1.ImageSegmentationPredictionResult.getDefaultInstance()) + return this; + if (!other.getCategoryMask().isEmpty()) { + categoryMask_ = other.categoryMask_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getConfidenceMask().isEmpty()) { + confidenceMask_ = other.confidenceMask_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + categoryMask_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + confidenceMask_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object categoryMask_ = ""; + /** + * + * + *
+     * A PNG image where each pixel in the mask represents the category in which
+     * the pixel in the original image was predicted to belong to. The size of
+     * this image will be the same as the original image. The mapping between the
+     * AnntoationSpec and the color can be found in model's metadata. The model
+     * will choose the most likely category and if none of the categories reach
+     * the confidence threshold, the pixel will be marked as background.
+     * 
+ * + * string category_mask = 1; + * + * @return The categoryMask. + */ + public java.lang.String getCategoryMask() { + java.lang.Object ref = categoryMask_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + categoryMask_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A PNG image where each pixel in the mask represents the category in which
+     * the pixel in the original image was predicted to belong to. The size of
+     * this image will be the same as the original image. The mapping between the
+     * AnntoationSpec and the color can be found in model's metadata. The model
+     * will choose the most likely category and if none of the categories reach
+     * the confidence threshold, the pixel will be marked as background.
+     * 
+ * + * string category_mask = 1; + * + * @return The bytes for categoryMask. + */ + public com.google.protobuf.ByteString getCategoryMaskBytes() { + java.lang.Object ref = categoryMask_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + categoryMask_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A PNG image where each pixel in the mask represents the category in which
+     * the pixel in the original image was predicted to belong to. The size of
+     * this image will be the same as the original image. The mapping between the
+     * AnntoationSpec and the color can be found in model's metadata. The model
+     * will choose the most likely category and if none of the categories reach
+     * the confidence threshold, the pixel will be marked as background.
+     * 
+ * + * string category_mask = 1; + * + * @param value The categoryMask to set. + * @return This builder for chaining. + */ + public Builder setCategoryMask(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + categoryMask_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * A PNG image where each pixel in the mask represents the category in which
+     * the pixel in the original image was predicted to belong to. The size of
+     * this image will be the same as the original image. The mapping between the
+     * AnntoationSpec and the color can be found in model's metadata. The model
+     * will choose the most likely category and if none of the categories reach
+     * the confidence threshold, the pixel will be marked as background.
+     * 
+ * + * string category_mask = 1; + * + * @return This builder for chaining. + */ + public Builder clearCategoryMask() { + categoryMask_ = getDefaultInstance().getCategoryMask(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * A PNG image where each pixel in the mask represents the category in which
+     * the pixel in the original image was predicted to belong to. The size of
+     * this image will be the same as the original image. The mapping between the
+     * AnntoationSpec and the color can be found in model's metadata. The model
+     * will choose the most likely category and if none of the categories reach
+     * the confidence threshold, the pixel will be marked as background.
+     * 
+ * + * string category_mask = 1; + * + * @param value The bytes for categoryMask to set. + * @return This builder for chaining. + */ + public Builder setCategoryMaskBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + categoryMask_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object confidenceMask_ = ""; + /** + * + * + *
+     * A one channel image which is encoded as an 8bit lossless PNG. The size of
+     * the image will be the same as the original image. For a specific pixel,
+     * darker color means less confidence in correctness of the cateogry in the
+     * categoryMask for the corresponding pixel. Black means no confidence and
+     * white means complete confidence.
+     * 
+ * + * string confidence_mask = 2; + * + * @return The confidenceMask. + */ + public java.lang.String getConfidenceMask() { + java.lang.Object ref = confidenceMask_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + confidenceMask_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A one channel image which is encoded as an 8bit lossless PNG. The size of
+     * the image will be the same as the original image. For a specific pixel,
+     * darker color means less confidence in correctness of the cateogry in the
+     * categoryMask for the corresponding pixel. Black means no confidence and
+     * white means complete confidence.
+     * 
+ * + * string confidence_mask = 2; + * + * @return The bytes for confidenceMask. + */ + public com.google.protobuf.ByteString getConfidenceMaskBytes() { + java.lang.Object ref = confidenceMask_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + confidenceMask_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A one channel image which is encoded as an 8bit lossless PNG. The size of
+     * the image will be the same as the original image. For a specific pixel,
+     * darker color means less confidence in correctness of the cateogry in the
+     * categoryMask for the corresponding pixel. Black means no confidence and
+     * white means complete confidence.
+     * 
+ * + * string confidence_mask = 2; + * + * @param value The confidenceMask to set. + * @return This builder for chaining. + */ + public Builder setConfidenceMask(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + confidenceMask_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * A one channel image which is encoded as an 8bit lossless PNG. The size of
+     * the image will be the same as the original image. For a specific pixel,
+     * darker color means less confidence in correctness of the cateogry in the
+     * categoryMask for the corresponding pixel. Black means no confidence and
+     * white means complete confidence.
+     * 
+ * + * string confidence_mask = 2; + * + * @return This builder for chaining. + */ + public Builder clearConfidenceMask() { + confidenceMask_ = getDefaultInstance().getConfidenceMask(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * A one channel image which is encoded as an 8bit lossless PNG. The size of
+     * the image will be the same as the original image. For a specific pixel,
+     * darker color means less confidence in correctness of the cateogry in the
+     * categoryMask for the corresponding pixel. Black means no confidence and
+     * white means complete confidence.
+     * 
+ * + * string confidence_mask = 2; + * + * @param value The bytes for confidenceMask to set. + * @return This builder for chaining. + */ + public Builder setConfidenceMaskBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + confidenceMask_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.ImageSegmentationPredictionResult) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.ImageSegmentationPredictionResult) + private static final com.google.cloud.visionai.v1.ImageSegmentationPredictionResult + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.ImageSegmentationPredictionResult(); + } + + public static com.google.cloud.visionai.v1.ImageSegmentationPredictionResult + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ImageSegmentationPredictionResult parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.ImageSegmentationPredictionResult + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ImageSegmentationPredictionResultOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ImageSegmentationPredictionResultOrBuilder.java new file mode 100644 index 000000000000..9b39ccf15c58 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ImageSegmentationPredictionResultOrBuilder.java @@ -0,0 +1,94 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/annotations.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface ImageSegmentationPredictionResultOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.ImageSegmentationPredictionResult) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * A PNG image where each pixel in the mask represents the category in which
+   * the pixel in the original image was predicted to belong to. The size of
+   * this image will be the same as the original image. The mapping between the
+   * AnntoationSpec and the color can be found in model's metadata. The model
+   * will choose the most likely category and if none of the categories reach
+   * the confidence threshold, the pixel will be marked as background.
+   * 
+ * + * string category_mask = 1; + * + * @return The categoryMask. + */ + java.lang.String getCategoryMask(); + /** + * + * + *
+   * A PNG image where each pixel in the mask represents the category in which
+   * the pixel in the original image was predicted to belong to. The size of
+   * this image will be the same as the original image. The mapping between the
+   * AnntoationSpec and the color can be found in model's metadata. The model
+   * will choose the most likely category and if none of the categories reach
+   * the confidence threshold, the pixel will be marked as background.
+   * 
+ * + * string category_mask = 1; + * + * @return The bytes for categoryMask. + */ + com.google.protobuf.ByteString getCategoryMaskBytes(); + + /** + * + * + *
+   * A one channel image which is encoded as an 8bit lossless PNG. The size of
+   * the image will be the same as the original image. For a specific pixel,
+   * darker color means less confidence in correctness of the cateogry in the
+   * categoryMask for the corresponding pixel. Black means no confidence and
+   * white means complete confidence.
+   * 
+ * + * string confidence_mask = 2; + * + * @return The confidenceMask. + */ + java.lang.String getConfidenceMask(); + /** + * + * + *
+   * A one channel image which is encoded as an 8bit lossless PNG. The size of
+   * the image will be the same as the original image. For a specific pixel,
+   * darker color means less confidence in correctness of the cateogry in the
+   * categoryMask for the corresponding pixel. Black means no confidence and
+   * white means complete confidence.
+   * 
+ * + * string confidence_mask = 2; + * + * @return The bytes for confidenceMask. + */ + com.google.protobuf.ByteString getConfidenceMaskBytes(); +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ImportAssetsMetadata.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ImportAssetsMetadata.java new file mode 100644 index 000000000000..643b88fc7770 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ImportAssetsMetadata.java @@ -0,0 +1,722 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/warehouse.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * The metadata message for ImportAssets LRO.
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.ImportAssetsMetadata} + */ +public final class ImportAssetsMetadata extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.ImportAssetsMetadata) + ImportAssetsMetadataOrBuilder { + private static final long serialVersionUID = 0L; + // Use ImportAssetsMetadata.newBuilder() to construct. + private ImportAssetsMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ImportAssetsMetadata() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ImportAssetsMetadata(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_ImportAssetsMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_ImportAssetsMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.ImportAssetsMetadata.class, + com.google.cloud.visionai.v1.ImportAssetsMetadata.Builder.class); + } + + private int bitField0_; + public static final int METADATA_FIELD_NUMBER = 1; + private com.google.cloud.visionai.v1.OperationMetadata metadata_; + /** + * + * + *
+   * The metadata of the operation.
+   * 
+ * + * .google.cloud.visionai.v1.OperationMetadata metadata = 1; + * + * @return Whether the metadata field is set. + */ + @java.lang.Override + public boolean hasMetadata() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * The metadata of the operation.
+   * 
+ * + * .google.cloud.visionai.v1.OperationMetadata metadata = 1; + * + * @return The metadata. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.OperationMetadata getMetadata() { + return metadata_ == null + ? com.google.cloud.visionai.v1.OperationMetadata.getDefaultInstance() + : metadata_; + } + /** + * + * + *
+   * The metadata of the operation.
+   * 
+ * + * .google.cloud.visionai.v1.OperationMetadata metadata = 1; + */ + @java.lang.Override + public com.google.cloud.visionai.v1.OperationMetadataOrBuilder getMetadataOrBuilder() { + return metadata_ == null + ? com.google.cloud.visionai.v1.OperationMetadata.getDefaultInstance() + : metadata_; + } + + 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 (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getMetadata()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getMetadata()); + } + size += getUnknownFields().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.visionai.v1.ImportAssetsMetadata)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.ImportAssetsMetadata other = + (com.google.cloud.visionai.v1.ImportAssetsMetadata) obj; + + if (hasMetadata() != other.hasMetadata()) return false; + if (hasMetadata()) { + if (!getMetadata().equals(other.getMetadata())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasMetadata()) { + hash = (37 * hash) + METADATA_FIELD_NUMBER; + hash = (53 * hash) + getMetadata().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.ImportAssetsMetadata parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ImportAssetsMetadata 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.visionai.v1.ImportAssetsMetadata parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ImportAssetsMetadata 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.visionai.v1.ImportAssetsMetadata parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ImportAssetsMetadata parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.ImportAssetsMetadata parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ImportAssetsMetadata 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.visionai.v1.ImportAssetsMetadata parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ImportAssetsMetadata 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.visionai.v1.ImportAssetsMetadata parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ImportAssetsMetadata 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.visionai.v1.ImportAssetsMetadata 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 metadata message for ImportAssets LRO.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.ImportAssetsMetadata} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.ImportAssetsMetadata) + com.google.cloud.visionai.v1.ImportAssetsMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_ImportAssetsMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_ImportAssetsMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.ImportAssetsMetadata.class, + com.google.cloud.visionai.v1.ImportAssetsMetadata.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.ImportAssetsMetadata.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getMetadataFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + metadata_ = null; + if (metadataBuilder_ != null) { + metadataBuilder_.dispose(); + metadataBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_ImportAssetsMetadata_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ImportAssetsMetadata getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.ImportAssetsMetadata.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ImportAssetsMetadata build() { + com.google.cloud.visionai.v1.ImportAssetsMetadata result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ImportAssetsMetadata buildPartial() { + com.google.cloud.visionai.v1.ImportAssetsMetadata result = + new com.google.cloud.visionai.v1.ImportAssetsMetadata(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.visionai.v1.ImportAssetsMetadata result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.metadata_ = metadataBuilder_ == null ? metadata_ : metadataBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.ImportAssetsMetadata) { + return mergeFrom((com.google.cloud.visionai.v1.ImportAssetsMetadata) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.ImportAssetsMetadata other) { + if (other == com.google.cloud.visionai.v1.ImportAssetsMetadata.getDefaultInstance()) + return this; + if (other.hasMetadata()) { + mergeMetadata(other.getMetadata()); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getMetadataFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.cloud.visionai.v1.OperationMetadata metadata_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.OperationMetadata, + com.google.cloud.visionai.v1.OperationMetadata.Builder, + com.google.cloud.visionai.v1.OperationMetadataOrBuilder> + metadataBuilder_; + /** + * + * + *
+     * The metadata of the operation.
+     * 
+ * + * .google.cloud.visionai.v1.OperationMetadata metadata = 1; + * + * @return Whether the metadata field is set. + */ + public boolean hasMetadata() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * The metadata of the operation.
+     * 
+ * + * .google.cloud.visionai.v1.OperationMetadata metadata = 1; + * + * @return The metadata. + */ + public com.google.cloud.visionai.v1.OperationMetadata getMetadata() { + if (metadataBuilder_ == null) { + return metadata_ == null + ? com.google.cloud.visionai.v1.OperationMetadata.getDefaultInstance() + : metadata_; + } else { + return metadataBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The metadata of the operation.
+     * 
+ * + * .google.cloud.visionai.v1.OperationMetadata metadata = 1; + */ + public Builder setMetadata(com.google.cloud.visionai.v1.OperationMetadata value) { + if (metadataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + metadata_ = value; + } else { + metadataBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The metadata of the operation.
+     * 
+ * + * .google.cloud.visionai.v1.OperationMetadata metadata = 1; + */ + public Builder setMetadata( + com.google.cloud.visionai.v1.OperationMetadata.Builder builderForValue) { + if (metadataBuilder_ == null) { + metadata_ = builderForValue.build(); + } else { + metadataBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The metadata of the operation.
+     * 
+ * + * .google.cloud.visionai.v1.OperationMetadata metadata = 1; + */ + public Builder mergeMetadata(com.google.cloud.visionai.v1.OperationMetadata value) { + if (metadataBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && metadata_ != null + && metadata_ != com.google.cloud.visionai.v1.OperationMetadata.getDefaultInstance()) { + getMetadataBuilder().mergeFrom(value); + } else { + metadata_ = value; + } + } else { + metadataBuilder_.mergeFrom(value); + } + if (metadata_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + /** + * + * + *
+     * The metadata of the operation.
+     * 
+ * + * .google.cloud.visionai.v1.OperationMetadata metadata = 1; + */ + public Builder clearMetadata() { + bitField0_ = (bitField0_ & ~0x00000001); + metadata_ = null; + if (metadataBuilder_ != null) { + metadataBuilder_.dispose(); + metadataBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * The metadata of the operation.
+     * 
+ * + * .google.cloud.visionai.v1.OperationMetadata metadata = 1; + */ + public com.google.cloud.visionai.v1.OperationMetadata.Builder getMetadataBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getMetadataFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The metadata of the operation.
+     * 
+ * + * .google.cloud.visionai.v1.OperationMetadata metadata = 1; + */ + public com.google.cloud.visionai.v1.OperationMetadataOrBuilder getMetadataOrBuilder() { + if (metadataBuilder_ != null) { + return metadataBuilder_.getMessageOrBuilder(); + } else { + return metadata_ == null + ? com.google.cloud.visionai.v1.OperationMetadata.getDefaultInstance() + : metadata_; + } + } + /** + * + * + *
+     * The metadata of the operation.
+     * 
+ * + * .google.cloud.visionai.v1.OperationMetadata metadata = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.OperationMetadata, + com.google.cloud.visionai.v1.OperationMetadata.Builder, + com.google.cloud.visionai.v1.OperationMetadataOrBuilder> + getMetadataFieldBuilder() { + if (metadataBuilder_ == null) { + metadataBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.OperationMetadata, + com.google.cloud.visionai.v1.OperationMetadata.Builder, + com.google.cloud.visionai.v1.OperationMetadataOrBuilder>( + getMetadata(), getParentForChildren(), isClean()); + metadata_ = null; + } + return metadataBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.ImportAssetsMetadata) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.ImportAssetsMetadata) + private static final com.google.cloud.visionai.v1.ImportAssetsMetadata DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.ImportAssetsMetadata(); + } + + public static com.google.cloud.visionai.v1.ImportAssetsMetadata getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ImportAssetsMetadata parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.ImportAssetsMetadata getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ImportAssetsMetadataOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ImportAssetsMetadataOrBuilder.java new file mode 100644 index 000000000000..1dd908bdadc4 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ImportAssetsMetadataOrBuilder.java @@ -0,0 +1,61 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/warehouse.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface ImportAssetsMetadataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.ImportAssetsMetadata) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The metadata of the operation.
+   * 
+ * + * .google.cloud.visionai.v1.OperationMetadata metadata = 1; + * + * @return Whether the metadata field is set. + */ + boolean hasMetadata(); + /** + * + * + *
+   * The metadata of the operation.
+   * 
+ * + * .google.cloud.visionai.v1.OperationMetadata metadata = 1; + * + * @return The metadata. + */ + com.google.cloud.visionai.v1.OperationMetadata getMetadata(); + /** + * + * + *
+   * The metadata of the operation.
+   * 
+ * + * .google.cloud.visionai.v1.OperationMetadata metadata = 1; + */ + com.google.cloud.visionai.v1.OperationMetadataOrBuilder getMetadataOrBuilder(); +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ImportAssetsRequest.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ImportAssetsRequest.java new file mode 100644 index 000000000000..96fbef6b4fa0 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ImportAssetsRequest.java @@ -0,0 +1,994 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/warehouse.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * The request message for ImportAssets.
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.ImportAssetsRequest} + */ +public final class ImportAssetsRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.ImportAssetsRequest) + ImportAssetsRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ImportAssetsRequest.newBuilder() to construct. + private ImportAssetsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ImportAssetsRequest() { + parent_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ImportAssetsRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_ImportAssetsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_ImportAssetsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.ImportAssetsRequest.class, + com.google.cloud.visionai.v1.ImportAssetsRequest.Builder.class); + } + + private int sourceCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object source_; + + public enum SourceCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + ASSETS_GCS_URI(2), + SOURCE_NOT_SET(0); + private final int value; + + private SourceCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static SourceCase valueOf(int value) { + return forNumber(value); + } + + public static SourceCase forNumber(int value) { + switch (value) { + case 2: + return ASSETS_GCS_URI; + case 0: + return SOURCE_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public SourceCase getSourceCase() { + return SourceCase.forNumber(sourceCase_); + } + + public static final int ASSETS_GCS_URI_FIELD_NUMBER = 2; + /** + * + * + *
+   * The file contains all assets information to be imported.
+   * * The file is in JSONL format.
+   * * Each line corresponding to one asset.
+   * * Each line will be converted into InputImageAsset proto.
+   * 
+ * + * string assets_gcs_uri = 2; + * + * @return Whether the assetsGcsUri field is set. + */ + public boolean hasAssetsGcsUri() { + return sourceCase_ == 2; + } + /** + * + * + *
+   * The file contains all assets information to be imported.
+   * * The file is in JSONL format.
+   * * Each line corresponding to one asset.
+   * * Each line will be converted into InputImageAsset proto.
+   * 
+ * + * string assets_gcs_uri = 2; + * + * @return The assetsGcsUri. + */ + public java.lang.String getAssetsGcsUri() { + java.lang.Object ref = ""; + if (sourceCase_ == 2) { + ref = source_; + } + 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(); + if (sourceCase_ == 2) { + source_ = s; + } + return s; + } + } + /** + * + * + *
+   * The file contains all assets information to be imported.
+   * * The file is in JSONL format.
+   * * Each line corresponding to one asset.
+   * * Each line will be converted into InputImageAsset proto.
+   * 
+ * + * string assets_gcs_uri = 2; + * + * @return The bytes for assetsGcsUri. + */ + public com.google.protobuf.ByteString getAssetsGcsUriBytes() { + java.lang.Object ref = ""; + if (sourceCase_ == 2) { + ref = source_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (sourceCase_ == 2) { + source_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + /** + * + * + *
+   * Required. The parent corpus resource where the assets will be imported.
+   * Format:
+   * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + 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(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The parent corpus resource where the assets will be imported.
+   * Format:
+   * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (sourceCase_ == 2) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, source_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (sourceCase_ == 2) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, source_); + } + size += getUnknownFields().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.visionai.v1.ImportAssetsRequest)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.ImportAssetsRequest other = + (com.google.cloud.visionai.v1.ImportAssetsRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (!getSourceCase().equals(other.getSourceCase())) return false; + switch (sourceCase_) { + case 2: + if (!getAssetsGcsUri().equals(other.getAssetsGcsUri())) return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + switch (sourceCase_) { + case 2: + hash = (37 * hash) + ASSETS_GCS_URI_FIELD_NUMBER; + hash = (53 * hash) + getAssetsGcsUri().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.ImportAssetsRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ImportAssetsRequest 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.visionai.v1.ImportAssetsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ImportAssetsRequest 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.visionai.v1.ImportAssetsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ImportAssetsRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.ImportAssetsRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ImportAssetsRequest 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.visionai.v1.ImportAssetsRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ImportAssetsRequest 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.visionai.v1.ImportAssetsRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ImportAssetsRequest 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.visionai.v1.ImportAssetsRequest 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 request message for ImportAssets.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.ImportAssetsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.ImportAssetsRequest) + com.google.cloud.visionai.v1.ImportAssetsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_ImportAssetsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_ImportAssetsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.ImportAssetsRequest.class, + com.google.cloud.visionai.v1.ImportAssetsRequest.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.ImportAssetsRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + sourceCase_ = 0; + source_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_ImportAssetsRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ImportAssetsRequest getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.ImportAssetsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ImportAssetsRequest build() { + com.google.cloud.visionai.v1.ImportAssetsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ImportAssetsRequest buildPartial() { + com.google.cloud.visionai.v1.ImportAssetsRequest result = + new com.google.cloud.visionai.v1.ImportAssetsRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.visionai.v1.ImportAssetsRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.parent_ = parent_; + } + } + + private void buildPartialOneofs(com.google.cloud.visionai.v1.ImportAssetsRequest result) { + result.sourceCase_ = sourceCase_; + result.source_ = this.source_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.ImportAssetsRequest) { + return mergeFrom((com.google.cloud.visionai.v1.ImportAssetsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.ImportAssetsRequest other) { + if (other == com.google.cloud.visionai.v1.ImportAssetsRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000002; + onChanged(); + } + switch (other.getSourceCase()) { + case ASSETS_GCS_URI: + { + sourceCase_ = 2; + source_ = other.source_; + onChanged(); + break; + } + case SOURCE_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 10 + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + sourceCase_ = 2; + source_ = s; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int sourceCase_ = 0; + private java.lang.Object source_; + + public SourceCase getSourceCase() { + return SourceCase.forNumber(sourceCase_); + } + + public Builder clearSource() { + sourceCase_ = 0; + source_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + /** + * + * + *
+     * The file contains all assets information to be imported.
+     * * The file is in JSONL format.
+     * * Each line corresponding to one asset.
+     * * Each line will be converted into InputImageAsset proto.
+     * 
+ * + * string assets_gcs_uri = 2; + * + * @return Whether the assetsGcsUri field is set. + */ + @java.lang.Override + public boolean hasAssetsGcsUri() { + return sourceCase_ == 2; + } + /** + * + * + *
+     * The file contains all assets information to be imported.
+     * * The file is in JSONL format.
+     * * Each line corresponding to one asset.
+     * * Each line will be converted into InputImageAsset proto.
+     * 
+ * + * string assets_gcs_uri = 2; + * + * @return The assetsGcsUri. + */ + @java.lang.Override + public java.lang.String getAssetsGcsUri() { + java.lang.Object ref = ""; + if (sourceCase_ == 2) { + ref = source_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (sourceCase_ == 2) { + source_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The file contains all assets information to be imported.
+     * * The file is in JSONL format.
+     * * Each line corresponding to one asset.
+     * * Each line will be converted into InputImageAsset proto.
+     * 
+ * + * string assets_gcs_uri = 2; + * + * @return The bytes for assetsGcsUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getAssetsGcsUriBytes() { + java.lang.Object ref = ""; + if (sourceCase_ == 2) { + ref = source_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (sourceCase_ == 2) { + source_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The file contains all assets information to be imported.
+     * * The file is in JSONL format.
+     * * Each line corresponding to one asset.
+     * * Each line will be converted into InputImageAsset proto.
+     * 
+ * + * string assets_gcs_uri = 2; + * + * @param value The assetsGcsUri to set. + * @return This builder for chaining. + */ + public Builder setAssetsGcsUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + sourceCase_ = 2; + source_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The file contains all assets information to be imported.
+     * * The file is in JSONL format.
+     * * Each line corresponding to one asset.
+     * * Each line will be converted into InputImageAsset proto.
+     * 
+ * + * string assets_gcs_uri = 2; + * + * @return This builder for chaining. + */ + public Builder clearAssetsGcsUri() { + if (sourceCase_ == 2) { + sourceCase_ = 0; + source_ = null; + onChanged(); + } + return this; + } + /** + * + * + *
+     * The file contains all assets information to be imported.
+     * * The file is in JSONL format.
+     * * Each line corresponding to one asset.
+     * * Each line will be converted into InputImageAsset proto.
+     * 
+ * + * string assets_gcs_uri = 2; + * + * @param value The bytes for assetsGcsUri to set. + * @return This builder for chaining. + */ + public Builder setAssetsGcsUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + sourceCase_ = 2; + source_ = value; + onChanged(); + return this; + } + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The parent corpus resource where the assets will be imported.
+     * Format:
+     * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The parent corpus resource where the assets will be imported.
+     * Format:
+     * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The parent corpus resource where the assets will be imported.
+     * Format:
+     * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + parent_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The parent corpus resource where the assets will be imported.
+     * Format:
+     * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The parent corpus resource where the assets will be imported.
+     * Format:
+     * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.ImportAssetsRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.ImportAssetsRequest) + private static final com.google.cloud.visionai.v1.ImportAssetsRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.ImportAssetsRequest(); + } + + public static com.google.cloud.visionai.v1.ImportAssetsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ImportAssetsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.ImportAssetsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ImportAssetsRequestOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ImportAssetsRequestOrBuilder.java new file mode 100644 index 000000000000..4e5c8234b005 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ImportAssetsRequestOrBuilder.java @@ -0,0 +1,107 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/warehouse.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface ImportAssetsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.ImportAssetsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The file contains all assets information to be imported.
+   * * The file is in JSONL format.
+   * * Each line corresponding to one asset.
+   * * Each line will be converted into InputImageAsset proto.
+   * 
+ * + * string assets_gcs_uri = 2; + * + * @return Whether the assetsGcsUri field is set. + */ + boolean hasAssetsGcsUri(); + /** + * + * + *
+   * The file contains all assets information to be imported.
+   * * The file is in JSONL format.
+   * * Each line corresponding to one asset.
+   * * Each line will be converted into InputImageAsset proto.
+   * 
+ * + * string assets_gcs_uri = 2; + * + * @return The assetsGcsUri. + */ + java.lang.String getAssetsGcsUri(); + /** + * + * + *
+   * The file contains all assets information to be imported.
+   * * The file is in JSONL format.
+   * * Each line corresponding to one asset.
+   * * Each line will be converted into InputImageAsset proto.
+   * 
+ * + * string assets_gcs_uri = 2; + * + * @return The bytes for assetsGcsUri. + */ + com.google.protobuf.ByteString getAssetsGcsUriBytes(); + + /** + * + * + *
+   * Required. The parent corpus resource where the assets will be imported.
+   * Format:
+   * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The parent corpus resource where the assets will be imported.
+   * Format:
+   * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + com.google.cloud.visionai.v1.ImportAssetsRequest.SourceCase getSourceCase(); +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ImportAssetsResponse.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ImportAssetsResponse.java new file mode 100644 index 000000000000..1656732956ba --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ImportAssetsResponse.java @@ -0,0 +1,432 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/warehouse.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * The response message for ImportAssets LRO.
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.ImportAssetsResponse} + */ +public final class ImportAssetsResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.ImportAssetsResponse) + ImportAssetsResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ImportAssetsResponse.newBuilder() to construct. + private ImportAssetsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ImportAssetsResponse() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ImportAssetsResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_ImportAssetsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_ImportAssetsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.ImportAssetsResponse.class, + com.google.cloud.visionai.v1.ImportAssetsResponse.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 { + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += getUnknownFields().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.visionai.v1.ImportAssetsResponse)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.ImportAssetsResponse other = + (com.google.cloud.visionai.v1.ImportAssetsResponse) obj; + + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.ImportAssetsResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ImportAssetsResponse 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.visionai.v1.ImportAssetsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ImportAssetsResponse 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.visionai.v1.ImportAssetsResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ImportAssetsResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.ImportAssetsResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ImportAssetsResponse 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.visionai.v1.ImportAssetsResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ImportAssetsResponse 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.visionai.v1.ImportAssetsResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ImportAssetsResponse 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.visionai.v1.ImportAssetsResponse 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 response message for ImportAssets LRO.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.ImportAssetsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.ImportAssetsResponse) + com.google.cloud.visionai.v1.ImportAssetsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_ImportAssetsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_ImportAssetsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.ImportAssetsResponse.class, + com.google.cloud.visionai.v1.ImportAssetsResponse.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.ImportAssetsResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_ImportAssetsResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ImportAssetsResponse getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.ImportAssetsResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ImportAssetsResponse build() { + com.google.cloud.visionai.v1.ImportAssetsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ImportAssetsResponse buildPartial() { + com.google.cloud.visionai.v1.ImportAssetsResponse result = + new com.google.cloud.visionai.v1.ImportAssetsResponse(this); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.ImportAssetsResponse) { + return mergeFrom((com.google.cloud.visionai.v1.ImportAssetsResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.ImportAssetsResponse other) { + if (other == com.google.cloud.visionai.v1.ImportAssetsResponse.getDefaultInstance()) + return this; + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.ImportAssetsResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.ImportAssetsResponse) + private static final com.google.cloud.visionai.v1.ImportAssetsResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.ImportAssetsResponse(); + } + + public static com.google.cloud.visionai.v1.ImportAssetsResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ImportAssetsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.ImportAssetsResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ImportAssetsResponseOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ImportAssetsResponseOrBuilder.java new file mode 100644 index 000000000000..8be92f69572a --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ImportAssetsResponseOrBuilder.java @@ -0,0 +1,25 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/warehouse.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface ImportAssetsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.ImportAssetsResponse) + com.google.protobuf.MessageOrBuilder {} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/Index.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/Index.java new file mode 100644 index 000000000000..b4bae10b85b1 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/Index.java @@ -0,0 +1,2741 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/warehouse.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * An Index is a resource in Corpus. It contains an indexed version of the
+ * assets and annotations. When deployed to an endpoint, it will allow users to
+ * search the Index.
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.Index} + */ +public final class Index extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.Index) + IndexOrBuilder { + private static final long serialVersionUID = 0L; + // Use Index.newBuilder() to construct. + private Index(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Index() { + name_ = ""; + displayName_ = ""; + description_ = ""; + state_ = 0; + deployedIndexes_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Index(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_Index_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_Index_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.Index.class, + com.google.cloud.visionai.v1.Index.Builder.class); + } + + /** + * + * + *
+   * Enum representing the different states through which an Index might cycle
+   * during its lifetime.
+   * 
+ * + * Protobuf enum {@code google.cloud.visionai.v1.Index.State} + */ + public enum State implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * The default value. Should not be used.
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + STATE_UNSPECIFIED(0), + /** + * + * + *
+     * State CREATING.
+     * 
+ * + * CREATING = 1; + */ + CREATING(1), + /** + * + * + *
+     * State CREATED.
+     * 
+ * + * CREATED = 2; + */ + CREATED(2), + /** + * + * + *
+     * State UPDATING.
+     * 
+ * + * UPDATING = 3; + */ + UPDATING(3), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * The default value. Should not be used.
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + public static final int STATE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * State CREATING.
+     * 
+ * + * CREATING = 1; + */ + public static final int CREATING_VALUE = 1; + /** + * + * + *
+     * State CREATED.
+     * 
+ * + * CREATED = 2; + */ + public static final int CREATED_VALUE = 2; + /** + * + * + *
+     * State UPDATING.
+     * 
+ * + * UPDATING = 3; + */ + public static final int UPDATING_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; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static State valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static State forNumber(int value) { + switch (value) { + case 0: + return STATE_UNSPECIFIED; + case 1: + return CREATING; + case 2: + return CREATED; + case 3: + return UPDATING; + 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 State findValueByNumber(int number) { + return State.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + 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.visionai.v1.Index.getDescriptor().getEnumTypes().get(0); + } + + private static final State[] VALUES = values(); + + public static State 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 State(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.visionai.v1.Index.State) + } + + private int bitField0_; + private int assetFilterCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object assetFilter_; + + public enum AssetFilterCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + ENTIRE_CORPUS(9), + ASSETFILTER_NOT_SET(0); + private final int value; + + private AssetFilterCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static AssetFilterCase valueOf(int value) { + return forNumber(value); + } + + public static AssetFilterCase forNumber(int value) { + switch (value) { + case 9: + return ENTIRE_CORPUS; + case 0: + return ASSETFILTER_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public AssetFilterCase getAssetFilterCase() { + return AssetFilterCase.forNumber(assetFilterCase_); + } + + public static final int ENTIRE_CORPUS_FIELD_NUMBER = 9; + /** + * + * + *
+   * Include all assets under the corpus.
+   * 
+ * + * bool entire_corpus = 9; + * + * @return Whether the entireCorpus field is set. + */ + @java.lang.Override + public boolean hasEntireCorpus() { + return assetFilterCase_ == 9; + } + /** + * + * + *
+   * Include all assets under the corpus.
+   * 
+ * + * bool entire_corpus = 9; + * + * @return The entireCorpus. + */ + @java.lang.Override + public boolean getEntireCorpus() { + if (assetFilterCase_ == 9) { + return (java.lang.Boolean) assetFilter_; + } + return false; + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Output only. Resource name of the Index resource.
+   * Format:
+   * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/indexes/{index_id}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + 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(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. Resource name of the Index resource.
+   * Format:
+   * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/indexes/{index_id}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DISPLAY_NAME_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object displayName_ = ""; + /** + * + * + *
+   * Optional. Optional user-specified display name of the index.
+   * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The displayName. + */ + @java.lang.Override + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + 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(); + displayName_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. Optional user-specified display name of the index.
+   * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for displayName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DESCRIPTION_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object description_ = ""; + /** + * + * + *
+   * Optional. Optional description of the index.
+   * 
+ * + * string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The description. + */ + @java.lang.Override + 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; + } + } + /** + * + * + *
+   * Optional. Optional description of the index.
+   * 
+ * + * string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for description. + */ + @java.lang.Override + 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 STATE_FIELD_NUMBER = 4; + private int state_ = 0; + /** + * + * + *
+   * Output only. State of the index.
+   * 
+ * + * + * .google.cloud.visionai.v1.Index.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + /** + * + * + *
+   * Output only. State of the index.
+   * 
+ * + * + * .google.cloud.visionai.v1.Index.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.Index.State getState() { + com.google.cloud.visionai.v1.Index.State result = + com.google.cloud.visionai.v1.Index.State.forNumber(state_); + return result == null ? com.google.cloud.visionai.v1.Index.State.UNRECOGNIZED : result; + } + + public static final int CREATE_TIME_FIELD_NUMBER = 5; + private com.google.protobuf.Timestamp createTime_; + /** + * + * + *
+   * Output only. The create timestamp.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * Output only. The create timestamp.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + /** + * + * + *
+   * Output only. The create timestamp.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + + public static final int UPDATE_TIME_FIELD_NUMBER = 6; + private com.google.protobuf.Timestamp updateTime_; + /** + * + * + *
+   * Output only. The update timestamp.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + @java.lang.Override + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+   * Output only. The update timestamp.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getUpdateTime() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + /** + * + * + *
+   * Output only. The update timestamp.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + + public static final int DEPLOYED_INDEXES_FIELD_NUMBER = 8; + + @SuppressWarnings("serial") + private java.util.List deployedIndexes_; + /** + * + * + *
+   * Output only. References to the deployed index instance.
+   * Index of VIDEO_ON_DEMAND corpus can have at most one deployed index.
+   * Index of IMAGE corpus can have multiple deployed indexes.
+   * 
+ * + * + * repeated .google.cloud.visionai.v1.DeployedIndexReference deployed_indexes = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.util.List + getDeployedIndexesList() { + return deployedIndexes_; + } + /** + * + * + *
+   * Output only. References to the deployed index instance.
+   * Index of VIDEO_ON_DEMAND corpus can have at most one deployed index.
+   * Index of IMAGE corpus can have multiple deployed indexes.
+   * 
+ * + * + * repeated .google.cloud.visionai.v1.DeployedIndexReference deployed_indexes = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.util.List + getDeployedIndexesOrBuilderList() { + return deployedIndexes_; + } + /** + * + * + *
+   * Output only. References to the deployed index instance.
+   * Index of VIDEO_ON_DEMAND corpus can have at most one deployed index.
+   * Index of IMAGE corpus can have multiple deployed indexes.
+   * 
+ * + * + * repeated .google.cloud.visionai.v1.DeployedIndexReference deployed_indexes = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public int getDeployedIndexesCount() { + return deployedIndexes_.size(); + } + /** + * + * + *
+   * Output only. References to the deployed index instance.
+   * Index of VIDEO_ON_DEMAND corpus can have at most one deployed index.
+   * Index of IMAGE corpus can have multiple deployed indexes.
+   * 
+ * + * + * repeated .google.cloud.visionai.v1.DeployedIndexReference deployed_indexes = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.visionai.v1.DeployedIndexReference getDeployedIndexes(int index) { + return deployedIndexes_.get(index); + } + /** + * + * + *
+   * Output only. References to the deployed index instance.
+   * Index of VIDEO_ON_DEMAND corpus can have at most one deployed index.
+   * Index of IMAGE corpus can have multiple deployed indexes.
+   * 
+ * + * + * repeated .google.cloud.visionai.v1.DeployedIndexReference deployed_indexes = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.visionai.v1.DeployedIndexReferenceOrBuilder getDeployedIndexesOrBuilder( + int index) { + return deployedIndexes_.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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, displayName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, description_); + } + if (state_ != com.google.cloud.visionai.v1.Index.State.STATE_UNSPECIFIED.getNumber()) { + output.writeEnum(4, state_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(5, getCreateTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(6, getUpdateTime()); + } + for (int i = 0; i < deployedIndexes_.size(); i++) { + output.writeMessage(8, deployedIndexes_.get(i)); + } + if (assetFilterCase_ == 9) { + output.writeBool(9, (boolean) ((java.lang.Boolean) assetFilter_)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, displayName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, description_); + } + if (state_ != com.google.cloud.visionai.v1.Index.State.STATE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(4, state_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getCreateTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getUpdateTime()); + } + for (int i = 0; i < deployedIndexes_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(8, deployedIndexes_.get(i)); + } + if (assetFilterCase_ == 9) { + size += + com.google.protobuf.CodedOutputStream.computeBoolSize( + 9, (boolean) ((java.lang.Boolean) assetFilter_)); + } + size += getUnknownFields().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.visionai.v1.Index)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.Index other = (com.google.cloud.visionai.v1.Index) obj; + + if (!getName().equals(other.getName())) return false; + if (!getDisplayName().equals(other.getDisplayName())) return false; + if (!getDescription().equals(other.getDescription())) return false; + if (state_ != other.state_) return false; + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime().equals(other.getCreateTime())) return false; + } + if (hasUpdateTime() != other.hasUpdateTime()) return false; + if (hasUpdateTime()) { + if (!getUpdateTime().equals(other.getUpdateTime())) return false; + } + if (!getDeployedIndexesList().equals(other.getDeployedIndexesList())) return false; + if (!getAssetFilterCase().equals(other.getAssetFilterCase())) return false; + switch (assetFilterCase_) { + case 9: + if (getEntireCorpus() != other.getEntireCorpus()) return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDisplayName().hashCode(); + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + hash = (37 * hash) + STATE_FIELD_NUMBER; + hash = (53 * hash) + state_; + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasUpdateTime()) { + hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getUpdateTime().hashCode(); + } + if (getDeployedIndexesCount() > 0) { + hash = (37 * hash) + DEPLOYED_INDEXES_FIELD_NUMBER; + hash = (53 * hash) + getDeployedIndexesList().hashCode(); + } + switch (assetFilterCase_) { + case 9: + hash = (37 * hash) + ENTIRE_CORPUS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getEntireCorpus()); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.Index parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.Index 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.visionai.v1.Index parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.Index 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.visionai.v1.Index parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.Index parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.Index parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.Index 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.visionai.v1.Index parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.Index 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.visionai.v1.Index parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.Index 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.visionai.v1.Index 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; + } + /** + * + * + *
+   * An Index is a resource in Corpus. It contains an indexed version of the
+   * assets and annotations. When deployed to an endpoint, it will allow users to
+   * search the Index.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.Index} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.Index) + com.google.cloud.visionai.v1.IndexOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_Index_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_Index_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.Index.class, + com.google.cloud.visionai.v1.Index.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.Index.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getCreateTimeFieldBuilder(); + getUpdateTimeFieldBuilder(); + getDeployedIndexesFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + displayName_ = ""; + description_ = ""; + state_ = 0; + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + if (deployedIndexesBuilder_ == null) { + deployedIndexes_ = java.util.Collections.emptyList(); + } else { + deployedIndexes_ = null; + deployedIndexesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000080); + assetFilterCase_ = 0; + assetFilter_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_Index_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.Index getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.Index.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.Index build() { + com.google.cloud.visionai.v1.Index result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.Index buildPartial() { + com.google.cloud.visionai.v1.Index result = new com.google.cloud.visionai.v1.Index(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.google.cloud.visionai.v1.Index result) { + if (deployedIndexesBuilder_ == null) { + if (((bitField0_ & 0x00000080) != 0)) { + deployedIndexes_ = java.util.Collections.unmodifiableList(deployedIndexes_); + bitField0_ = (bitField0_ & ~0x00000080); + } + result.deployedIndexes_ = deployedIndexes_; + } else { + result.deployedIndexes_ = deployedIndexesBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.visionai.v1.Index result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.displayName_ = displayName_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.description_ = description_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.state_ = state_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000020) != 0)) { + result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.updateTime_ = updateTimeBuilder_ == null ? updateTime_ : updateTimeBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + result.bitField0_ |= to_bitField0_; + } + + private void buildPartialOneofs(com.google.cloud.visionai.v1.Index result) { + result.assetFilterCase_ = assetFilterCase_; + result.assetFilter_ = this.assetFilter_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.Index) { + return mergeFrom((com.google.cloud.visionai.v1.Index) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.Index other) { + if (other == com.google.cloud.visionai.v1.Index.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getDisplayName().isEmpty()) { + displayName_ = other.displayName_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (other.state_ != 0) { + setStateValue(other.getStateValue()); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + if (deployedIndexesBuilder_ == null) { + if (!other.deployedIndexes_.isEmpty()) { + if (deployedIndexes_.isEmpty()) { + deployedIndexes_ = other.deployedIndexes_; + bitField0_ = (bitField0_ & ~0x00000080); + } else { + ensureDeployedIndexesIsMutable(); + deployedIndexes_.addAll(other.deployedIndexes_); + } + onChanged(); + } + } else { + if (!other.deployedIndexes_.isEmpty()) { + if (deployedIndexesBuilder_.isEmpty()) { + deployedIndexesBuilder_.dispose(); + deployedIndexesBuilder_ = null; + deployedIndexes_ = other.deployedIndexes_; + bitField0_ = (bitField0_ & ~0x00000080); + deployedIndexesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getDeployedIndexesFieldBuilder() + : null; + } else { + deployedIndexesBuilder_.addAllMessages(other.deployedIndexes_); + } + } + } + switch (other.getAssetFilterCase()) { + case ENTIRE_CORPUS: + { + setEntireCorpus(other.getEntireCorpus()); + break; + } + case ASSETFILTER_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 10 + case 18: + { + displayName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 18 + case 26: + { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 26 + case 32: + { + state_ = input.readEnum(); + bitField0_ |= 0x00000010; + break; + } // case 32 + case 42: + { + input.readMessage(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000020; + break; + } // case 42 + case 50: + { + input.readMessage(getUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000040; + break; + } // case 50 + case 66: + { + com.google.cloud.visionai.v1.DeployedIndexReference m = + input.readMessage( + com.google.cloud.visionai.v1.DeployedIndexReference.parser(), + extensionRegistry); + if (deployedIndexesBuilder_ == null) { + ensureDeployedIndexesIsMutable(); + deployedIndexes_.add(m); + } else { + deployedIndexesBuilder_.addMessage(m); + } + break; + } // case 66 + case 72: + { + assetFilter_ = input.readBool(); + assetFilterCase_ = 9; + break; + } // case 72 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int assetFilterCase_ = 0; + private java.lang.Object assetFilter_; + + public AssetFilterCase getAssetFilterCase() { + return AssetFilterCase.forNumber(assetFilterCase_); + } + + public Builder clearAssetFilter() { + assetFilterCase_ = 0; + assetFilter_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + /** + * + * + *
+     * Include all assets under the corpus.
+     * 
+ * + * bool entire_corpus = 9; + * + * @return Whether the entireCorpus field is set. + */ + public boolean hasEntireCorpus() { + return assetFilterCase_ == 9; + } + /** + * + * + *
+     * Include all assets under the corpus.
+     * 
+ * + * bool entire_corpus = 9; + * + * @return The entireCorpus. + */ + public boolean getEntireCorpus() { + if (assetFilterCase_ == 9) { + return (java.lang.Boolean) assetFilter_; + } + return false; + } + /** + * + * + *
+     * Include all assets under the corpus.
+     * 
+ * + * bool entire_corpus = 9; + * + * @param value The entireCorpus to set. + * @return This builder for chaining. + */ + public Builder setEntireCorpus(boolean value) { + + assetFilterCase_ = 9; + assetFilter_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Include all assets under the corpus.
+     * 
+ * + * bool entire_corpus = 9; + * + * @return This builder for chaining. + */ + public Builder clearEntireCorpus() { + if (assetFilterCase_ == 9) { + assetFilterCase_ = 0; + assetFilter_ = null; + onChanged(); + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Output only. Resource name of the Index resource.
+     * Format:
+     * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/indexes/{index_id}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. Resource name of the Index resource.
+     * Format:
+     * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/indexes/{index_id}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. Resource name of the Index resource.
+     * Format:
+     * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/indexes/{index_id}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Resource name of the Index resource.
+     * Format:
+     * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/indexes/{index_id}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Resource name of the Index resource.
+     * Format:
+     * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/indexes/{index_id}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object displayName_ = ""; + /** + * + * + *
+     * Optional. Optional user-specified display name of the index.
+     * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The displayName. + */ + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. Optional user-specified display name of the index.
+     * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for displayName. + */ + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. Optional user-specified display name of the index.
+     * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + displayName_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Optional user-specified display name of the index.
+     * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearDisplayName() { + displayName_ = getDefaultInstance().getDisplayName(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Optional user-specified display name of the index.
+     * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + displayName_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object description_ = ""; + /** + * + * + *
+     * Optional. Optional description of the index.
+     * 
+ * + * string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The description. + */ + 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; + } + } + /** + * + * + *
+     * Optional. Optional description of the index.
+     * 
+ * + * string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for description. + */ + 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; + } + } + /** + * + * + *
+     * Optional. Optional description of the index.
+     * 
+ * + * string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The description to set. + * @return This builder for chaining. + */ + public Builder setDescription(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + description_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Optional description of the index.
+     * 
+ * + * string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearDescription() { + description_ = getDefaultInstance().getDescription(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Optional description of the index.
+     * 
+ * + * string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for description to set. + * @return This builder for chaining. + */ + public Builder setDescriptionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + description_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private int state_ = 0; + /** + * + * + *
+     * Output only. State of the index.
+     * 
+ * + * + * .google.cloud.visionai.v1.Index.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + /** + * + * + *
+     * Output only. State of the index.
+     * 
+ * + * + * .google.cloud.visionai.v1.Index.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The enum numeric value on the wire for state to set. + * @return This builder for chaining. + */ + public Builder setStateValue(int value) { + state_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. State of the index.
+     * 
+ * + * + * .google.cloud.visionai.v1.Index.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.Index.State getState() { + com.google.cloud.visionai.v1.Index.State result = + com.google.cloud.visionai.v1.Index.State.forNumber(state_); + return result == null ? com.google.cloud.visionai.v1.Index.State.UNRECOGNIZED : result; + } + /** + * + * + *
+     * Output only. State of the index.
+     * 
+ * + * + * .google.cloud.visionai.v1.Index.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The state to set. + * @return This builder for chaining. + */ + public Builder setState(com.google.cloud.visionai.v1.Index.State value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000010; + state_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. State of the index.
+     * 
+ * + * + * .google.cloud.visionai.v1.Index.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearState() { + bitField0_ = (bitField0_ & ~0x00000010); + state_ = 0; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + createTimeBuilder_; + /** + * + * + *
+     * Output only. The create timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000020) != 0); + } + /** + * + * + *
+     * Output only. The create timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. The create timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + } else { + createTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The create timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The create timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (((bitField0_ & 0x00000020) != 0) + && createTime_ != null + && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getCreateTimeBuilder().mergeFrom(value); + } else { + createTime_ = value; + } + } else { + createTimeBuilder_.mergeFrom(value); + } + if (createTime_ != null) { + bitField0_ |= 0x00000020; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Output only. The create timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearCreateTime() { + bitField0_ = (bitField0_ & ~0x00000020); + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The create timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + bitField0_ |= 0x00000020; + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. The create timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } + } + /** + * + * + *
+     * Output only. The create timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), getParentForChildren(), isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private com.google.protobuf.Timestamp updateTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + updateTimeBuilder_; + /** + * + * + *
+     * Output only. The update timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000040) != 0); + } + /** + * + * + *
+     * Output only. The update timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + public com.google.protobuf.Timestamp getUpdateTime() { + if (updateTimeBuilder_ == null) { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } else { + return updateTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. The update timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateTime_ = value; + } else { + updateTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The update timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (updateTimeBuilder_ == null) { + updateTime_ = builderForValue.build(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The update timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (((bitField0_ & 0x00000040) != 0) + && updateTime_ != null + && updateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getUpdateTimeBuilder().mergeFrom(value); + } else { + updateTime_ = value; + } + } else { + updateTimeBuilder_.mergeFrom(value); + } + if (updateTime_ != null) { + bitField0_ |= 0x00000040; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Output only. The update timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearUpdateTime() { + bitField0_ = (bitField0_ & ~0x00000040); + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The update timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + bitField0_ |= 0x00000040; + onChanged(); + return getUpdateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. The update timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + if (updateTimeBuilder_ != null) { + return updateTimeBuilder_.getMessageOrBuilder(); + } else { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } + } + /** + * + * + *
+     * Output only. The update timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + 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_; + } + + private java.util.List deployedIndexes_ = + java.util.Collections.emptyList(); + + private void ensureDeployedIndexesIsMutable() { + if (!((bitField0_ & 0x00000080) != 0)) { + deployedIndexes_ = + new java.util.ArrayList( + deployedIndexes_); + bitField0_ |= 0x00000080; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.visionai.v1.DeployedIndexReference, + com.google.cloud.visionai.v1.DeployedIndexReference.Builder, + com.google.cloud.visionai.v1.DeployedIndexReferenceOrBuilder> + deployedIndexesBuilder_; + + /** + * + * + *
+     * Output only. References to the deployed index instance.
+     * Index of VIDEO_ON_DEMAND corpus can have at most one deployed index.
+     * Index of IMAGE corpus can have multiple deployed indexes.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.DeployedIndexReference deployed_indexes = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List + getDeployedIndexesList() { + if (deployedIndexesBuilder_ == null) { + return java.util.Collections.unmodifiableList(deployedIndexes_); + } else { + return deployedIndexesBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Output only. References to the deployed index instance.
+     * Index of VIDEO_ON_DEMAND corpus can have at most one deployed index.
+     * Index of IMAGE corpus can have multiple deployed indexes.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.DeployedIndexReference deployed_indexes = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public int getDeployedIndexesCount() { + if (deployedIndexesBuilder_ == null) { + return deployedIndexes_.size(); + } else { + return deployedIndexesBuilder_.getCount(); + } + } + /** + * + * + *
+     * Output only. References to the deployed index instance.
+     * Index of VIDEO_ON_DEMAND corpus can have at most one deployed index.
+     * Index of IMAGE corpus can have multiple deployed indexes.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.DeployedIndexReference deployed_indexes = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.visionai.v1.DeployedIndexReference getDeployedIndexes(int index) { + if (deployedIndexesBuilder_ == null) { + return deployedIndexes_.get(index); + } else { + return deployedIndexesBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Output only. References to the deployed index instance.
+     * Index of VIDEO_ON_DEMAND corpus can have at most one deployed index.
+     * Index of IMAGE corpus can have multiple deployed indexes.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.DeployedIndexReference deployed_indexes = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setDeployedIndexes( + int index, com.google.cloud.visionai.v1.DeployedIndexReference value) { + if (deployedIndexesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDeployedIndexesIsMutable(); + deployedIndexes_.set(index, value); + onChanged(); + } else { + deployedIndexesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Output only. References to the deployed index instance.
+     * Index of VIDEO_ON_DEMAND corpus can have at most one deployed index.
+     * Index of IMAGE corpus can have multiple deployed indexes.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.DeployedIndexReference deployed_indexes = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setDeployedIndexes( + int index, com.google.cloud.visionai.v1.DeployedIndexReference.Builder builderForValue) { + if (deployedIndexesBuilder_ == null) { + ensureDeployedIndexesIsMutable(); + deployedIndexes_.set(index, builderForValue.build()); + onChanged(); + } else { + deployedIndexesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Output only. References to the deployed index instance.
+     * Index of VIDEO_ON_DEMAND corpus can have at most one deployed index.
+     * Index of IMAGE corpus can have multiple deployed indexes.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.DeployedIndexReference deployed_indexes = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addDeployedIndexes(com.google.cloud.visionai.v1.DeployedIndexReference value) { + if (deployedIndexesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDeployedIndexesIsMutable(); + deployedIndexes_.add(value); + onChanged(); + } else { + deployedIndexesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Output only. References to the deployed index instance.
+     * Index of VIDEO_ON_DEMAND corpus can have at most one deployed index.
+     * Index of IMAGE corpus can have multiple deployed indexes.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.DeployedIndexReference deployed_indexes = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addDeployedIndexes( + int index, com.google.cloud.visionai.v1.DeployedIndexReference value) { + if (deployedIndexesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDeployedIndexesIsMutable(); + deployedIndexes_.add(index, value); + onChanged(); + } else { + deployedIndexesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Output only. References to the deployed index instance.
+     * Index of VIDEO_ON_DEMAND corpus can have at most one deployed index.
+     * Index of IMAGE corpus can have multiple deployed indexes.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.DeployedIndexReference deployed_indexes = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addDeployedIndexes( + com.google.cloud.visionai.v1.DeployedIndexReference.Builder builderForValue) { + if (deployedIndexesBuilder_ == null) { + ensureDeployedIndexesIsMutable(); + deployedIndexes_.add(builderForValue.build()); + onChanged(); + } else { + deployedIndexesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Output only. References to the deployed index instance.
+     * Index of VIDEO_ON_DEMAND corpus can have at most one deployed index.
+     * Index of IMAGE corpus can have multiple deployed indexes.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.DeployedIndexReference deployed_indexes = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addDeployedIndexes( + int index, com.google.cloud.visionai.v1.DeployedIndexReference.Builder builderForValue) { + if (deployedIndexesBuilder_ == null) { + ensureDeployedIndexesIsMutable(); + deployedIndexes_.add(index, builderForValue.build()); + onChanged(); + } else { + deployedIndexesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Output only. References to the deployed index instance.
+     * Index of VIDEO_ON_DEMAND corpus can have at most one deployed index.
+     * Index of IMAGE corpus can have multiple deployed indexes.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.DeployedIndexReference deployed_indexes = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addAllDeployedIndexes( + java.lang.Iterable values) { + if (deployedIndexesBuilder_ == null) { + ensureDeployedIndexesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, deployedIndexes_); + onChanged(); + } else { + deployedIndexesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Output only. References to the deployed index instance.
+     * Index of VIDEO_ON_DEMAND corpus can have at most one deployed index.
+     * Index of IMAGE corpus can have multiple deployed indexes.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.DeployedIndexReference deployed_indexes = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearDeployedIndexes() { + if (deployedIndexesBuilder_ == null) { + deployedIndexes_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000080); + onChanged(); + } else { + deployedIndexesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Output only. References to the deployed index instance.
+     * Index of VIDEO_ON_DEMAND corpus can have at most one deployed index.
+     * Index of IMAGE corpus can have multiple deployed indexes.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.DeployedIndexReference deployed_indexes = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder removeDeployedIndexes(int index) { + if (deployedIndexesBuilder_ == null) { + ensureDeployedIndexesIsMutable(); + deployedIndexes_.remove(index); + onChanged(); + } else { + deployedIndexesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Output only. References to the deployed index instance.
+     * Index of VIDEO_ON_DEMAND corpus can have at most one deployed index.
+     * Index of IMAGE corpus can have multiple deployed indexes.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.DeployedIndexReference deployed_indexes = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.visionai.v1.DeployedIndexReference.Builder getDeployedIndexesBuilder( + int index) { + return getDeployedIndexesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Output only. References to the deployed index instance.
+     * Index of VIDEO_ON_DEMAND corpus can have at most one deployed index.
+     * Index of IMAGE corpus can have multiple deployed indexes.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.DeployedIndexReference deployed_indexes = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.visionai.v1.DeployedIndexReferenceOrBuilder getDeployedIndexesOrBuilder( + int index) { + if (deployedIndexesBuilder_ == null) { + return deployedIndexes_.get(index); + } else { + return deployedIndexesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Output only. References to the deployed index instance.
+     * Index of VIDEO_ON_DEMAND corpus can have at most one deployed index.
+     * Index of IMAGE corpus can have multiple deployed indexes.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.DeployedIndexReference deployed_indexes = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List + getDeployedIndexesOrBuilderList() { + if (deployedIndexesBuilder_ != null) { + return deployedIndexesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(deployedIndexes_); + } + } + /** + * + * + *
+     * Output only. References to the deployed index instance.
+     * Index of VIDEO_ON_DEMAND corpus can have at most one deployed index.
+     * Index of IMAGE corpus can have multiple deployed indexes.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.DeployedIndexReference deployed_indexes = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.visionai.v1.DeployedIndexReference.Builder addDeployedIndexesBuilder() { + return getDeployedIndexesFieldBuilder() + .addBuilder(com.google.cloud.visionai.v1.DeployedIndexReference.getDefaultInstance()); + } + /** + * + * + *
+     * Output only. References to the deployed index instance.
+     * Index of VIDEO_ON_DEMAND corpus can have at most one deployed index.
+     * Index of IMAGE corpus can have multiple deployed indexes.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.DeployedIndexReference deployed_indexes = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.visionai.v1.DeployedIndexReference.Builder addDeployedIndexesBuilder( + int index) { + return getDeployedIndexesFieldBuilder() + .addBuilder( + index, com.google.cloud.visionai.v1.DeployedIndexReference.getDefaultInstance()); + } + /** + * + * + *
+     * Output only. References to the deployed index instance.
+     * Index of VIDEO_ON_DEMAND corpus can have at most one deployed index.
+     * Index of IMAGE corpus can have multiple deployed indexes.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.DeployedIndexReference deployed_indexes = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List + getDeployedIndexesBuilderList() { + return getDeployedIndexesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.visionai.v1.DeployedIndexReference, + com.google.cloud.visionai.v1.DeployedIndexReference.Builder, + com.google.cloud.visionai.v1.DeployedIndexReferenceOrBuilder> + getDeployedIndexesFieldBuilder() { + if (deployedIndexesBuilder_ == null) { + deployedIndexesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.visionai.v1.DeployedIndexReference, + com.google.cloud.visionai.v1.DeployedIndexReference.Builder, + com.google.cloud.visionai.v1.DeployedIndexReferenceOrBuilder>( + deployedIndexes_, + ((bitField0_ & 0x00000080) != 0), + getParentForChildren(), + isClean()); + deployedIndexes_ = null; + } + return deployedIndexesBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.Index) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.Index) + private static final com.google.cloud.visionai.v1.Index DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.Index(); + } + + public static com.google.cloud.visionai.v1.Index getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Index parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.Index getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/IndexAssetMetadata.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/IndexAssetMetadata.java new file mode 100644 index 000000000000..aec5404ca7af --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/IndexAssetMetadata.java @@ -0,0 +1,1245 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/warehouse.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * Metadata for IndexAsset.
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.IndexAssetMetadata} + */ +public final class IndexAssetMetadata extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.IndexAssetMetadata) + IndexAssetMetadataOrBuilder { + private static final long serialVersionUID = 0L; + // Use IndexAssetMetadata.newBuilder() to construct. + private IndexAssetMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private IndexAssetMetadata() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new IndexAssetMetadata(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_IndexAssetMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_IndexAssetMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.IndexAssetMetadata.class, + com.google.cloud.visionai.v1.IndexAssetMetadata.Builder.class); + } + + private int bitField0_; + public static final int STATUS_FIELD_NUMBER = 4; + private com.google.cloud.visionai.v1.IndexingStatus status_; + /** + * + * + *
+   * The status of indexing this asset.
+   * 
+ * + * .google.cloud.visionai.v1.IndexingStatus status = 4; + * + * @return Whether the status field is set. + */ + @java.lang.Override + public boolean hasStatus() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * The status of indexing this asset.
+   * 
+ * + * .google.cloud.visionai.v1.IndexingStatus status = 4; + * + * @return The status. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.IndexingStatus getStatus() { + return status_ == null + ? com.google.cloud.visionai.v1.IndexingStatus.getDefaultInstance() + : status_; + } + /** + * + * + *
+   * The status of indexing this asset.
+   * 
+ * + * .google.cloud.visionai.v1.IndexingStatus status = 4; + */ + @java.lang.Override + public com.google.cloud.visionai.v1.IndexingStatusOrBuilder getStatusOrBuilder() { + return status_ == null + ? com.google.cloud.visionai.v1.IndexingStatus.getDefaultInstance() + : status_; + } + + public static final int START_TIME_FIELD_NUMBER = 2; + private com.google.protobuf.Timestamp startTime_; + /** + * + * + *
+   * The start time of the operation.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 2; + * + * @return Whether the startTime field is set. + */ + @java.lang.Override + public boolean hasStartTime() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+   * The start time of the operation.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 2; + * + * @return The startTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getStartTime() { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } + /** + * + * + *
+   * The start time of the operation.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 2; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } + + public static final int UPDATE_TIME_FIELD_NUMBER = 3; + private com.google.protobuf.Timestamp updateTime_; + /** + * + * + *
+   * The update time of the operation.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3; + * + * @return Whether the updateTime field is set. + */ + @java.lang.Override + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+   * The update time of the operation.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3; + * + * @return The updateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getUpdateTime() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + /** + * + * + *
+   * The update time of the operation.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + + 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 (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(2, getStartTime()); + } + if (((bitField0_ & 0x00000004) != 0)) { + output.writeMessage(3, getUpdateTime()); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(4, getStatus()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getStartTime()); + } + if (((bitField0_ & 0x00000004) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getUpdateTime()); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getStatus()); + } + size += getUnknownFields().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.visionai.v1.IndexAssetMetadata)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.IndexAssetMetadata other = + (com.google.cloud.visionai.v1.IndexAssetMetadata) obj; + + if (hasStatus() != other.hasStatus()) return false; + if (hasStatus()) { + if (!getStatus().equals(other.getStatus())) return false; + } + if (hasStartTime() != other.hasStartTime()) return false; + if (hasStartTime()) { + if (!getStartTime().equals(other.getStartTime())) return false; + } + if (hasUpdateTime() != other.hasUpdateTime()) return false; + if (hasUpdateTime()) { + if (!getUpdateTime().equals(other.getUpdateTime())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasStatus()) { + hash = (37 * hash) + STATUS_FIELD_NUMBER; + hash = (53 * hash) + getStatus().hashCode(); + } + 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) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.IndexAssetMetadata parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.IndexAssetMetadata 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.visionai.v1.IndexAssetMetadata parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.IndexAssetMetadata 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.visionai.v1.IndexAssetMetadata parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.IndexAssetMetadata parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.IndexAssetMetadata parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.IndexAssetMetadata 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.visionai.v1.IndexAssetMetadata parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.IndexAssetMetadata 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.visionai.v1.IndexAssetMetadata parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.IndexAssetMetadata 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.visionai.v1.IndexAssetMetadata 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; + } + /** + * + * + *
+   * Metadata for IndexAsset.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.IndexAssetMetadata} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.IndexAssetMetadata) + com.google.cloud.visionai.v1.IndexAssetMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_IndexAssetMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_IndexAssetMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.IndexAssetMetadata.class, + com.google.cloud.visionai.v1.IndexAssetMetadata.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.IndexAssetMetadata.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getStatusFieldBuilder(); + getStartTimeFieldBuilder(); + getUpdateTimeFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + status_ = null; + if (statusBuilder_ != null) { + statusBuilder_.dispose(); + statusBuilder_ = null; + } + startTime_ = null; + if (startTimeBuilder_ != null) { + startTimeBuilder_.dispose(); + startTimeBuilder_ = null; + } + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_IndexAssetMetadata_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.IndexAssetMetadata getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.IndexAssetMetadata.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.IndexAssetMetadata build() { + com.google.cloud.visionai.v1.IndexAssetMetadata result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.IndexAssetMetadata buildPartial() { + com.google.cloud.visionai.v1.IndexAssetMetadata result = + new com.google.cloud.visionai.v1.IndexAssetMetadata(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.visionai.v1.IndexAssetMetadata result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.status_ = statusBuilder_ == null ? status_ : statusBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.startTime_ = startTimeBuilder_ == null ? startTime_ : startTimeBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.updateTime_ = updateTimeBuilder_ == null ? updateTime_ : updateTimeBuilder_.build(); + to_bitField0_ |= 0x00000004; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.IndexAssetMetadata) { + return mergeFrom((com.google.cloud.visionai.v1.IndexAssetMetadata) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.IndexAssetMetadata other) { + if (other == com.google.cloud.visionai.v1.IndexAssetMetadata.getDefaultInstance()) + return this; + if (other.hasStatus()) { + mergeStatus(other.getStatus()); + } + if (other.hasStartTime()) { + mergeStartTime(other.getStartTime()); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 18: + { + input.readMessage(getStartTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage(getUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + input.readMessage(getStatusFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 34 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.cloud.visionai.v1.IndexingStatus status_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.IndexingStatus, + com.google.cloud.visionai.v1.IndexingStatus.Builder, + com.google.cloud.visionai.v1.IndexingStatusOrBuilder> + statusBuilder_; + /** + * + * + *
+     * The status of indexing this asset.
+     * 
+ * + * .google.cloud.visionai.v1.IndexingStatus status = 4; + * + * @return Whether the status field is set. + */ + public boolean hasStatus() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * The status of indexing this asset.
+     * 
+ * + * .google.cloud.visionai.v1.IndexingStatus status = 4; + * + * @return The status. + */ + public com.google.cloud.visionai.v1.IndexingStatus getStatus() { + if (statusBuilder_ == null) { + return status_ == null + ? com.google.cloud.visionai.v1.IndexingStatus.getDefaultInstance() + : status_; + } else { + return statusBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The status of indexing this asset.
+     * 
+ * + * .google.cloud.visionai.v1.IndexingStatus status = 4; + */ + public Builder setStatus(com.google.cloud.visionai.v1.IndexingStatus value) { + if (statusBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + status_ = value; + } else { + statusBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The status of indexing this asset.
+     * 
+ * + * .google.cloud.visionai.v1.IndexingStatus status = 4; + */ + public Builder setStatus(com.google.cloud.visionai.v1.IndexingStatus.Builder builderForValue) { + if (statusBuilder_ == null) { + status_ = builderForValue.build(); + } else { + statusBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The status of indexing this asset.
+     * 
+ * + * .google.cloud.visionai.v1.IndexingStatus status = 4; + */ + public Builder mergeStatus(com.google.cloud.visionai.v1.IndexingStatus value) { + if (statusBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && status_ != null + && status_ != com.google.cloud.visionai.v1.IndexingStatus.getDefaultInstance()) { + getStatusBuilder().mergeFrom(value); + } else { + status_ = value; + } + } else { + statusBuilder_.mergeFrom(value); + } + if (status_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + /** + * + * + *
+     * The status of indexing this asset.
+     * 
+ * + * .google.cloud.visionai.v1.IndexingStatus status = 4; + */ + public Builder clearStatus() { + bitField0_ = (bitField0_ & ~0x00000001); + status_ = null; + if (statusBuilder_ != null) { + statusBuilder_.dispose(); + statusBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * The status of indexing this asset.
+     * 
+ * + * .google.cloud.visionai.v1.IndexingStatus status = 4; + */ + public com.google.cloud.visionai.v1.IndexingStatus.Builder getStatusBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getStatusFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The status of indexing this asset.
+     * 
+ * + * .google.cloud.visionai.v1.IndexingStatus status = 4; + */ + public com.google.cloud.visionai.v1.IndexingStatusOrBuilder getStatusOrBuilder() { + if (statusBuilder_ != null) { + return statusBuilder_.getMessageOrBuilder(); + } else { + return status_ == null + ? com.google.cloud.visionai.v1.IndexingStatus.getDefaultInstance() + : status_; + } + } + /** + * + * + *
+     * The status of indexing this asset.
+     * 
+ * + * .google.cloud.visionai.v1.IndexingStatus status = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.IndexingStatus, + com.google.cloud.visionai.v1.IndexingStatus.Builder, + com.google.cloud.visionai.v1.IndexingStatusOrBuilder> + getStatusFieldBuilder() { + if (statusBuilder_ == null) { + statusBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.IndexingStatus, + com.google.cloud.visionai.v1.IndexingStatus.Builder, + com.google.cloud.visionai.v1.IndexingStatusOrBuilder>( + getStatus(), getParentForChildren(), isClean()); + status_ = null; + } + return statusBuilder_; + } + + private com.google.protobuf.Timestamp startTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + startTimeBuilder_; + /** + * + * + *
+     * The start time of the operation.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 2; + * + * @return Whether the startTime field is set. + */ + public boolean hasStartTime() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * The start time of the operation.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 2; + * + * @return The startTime. + */ + public com.google.protobuf.Timestamp getStartTime() { + if (startTimeBuilder_ == null) { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } else { + return startTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The start time of the operation.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 2; + */ + public Builder setStartTime(com.google.protobuf.Timestamp value) { + if (startTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + startTime_ = value; + } else { + startTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * The start time of the operation.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 2; + */ + public Builder setStartTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (startTimeBuilder_ == null) { + startTime_ = builderForValue.build(); + } else { + startTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * The start time of the operation.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 2; + */ + public Builder mergeStartTime(com.google.protobuf.Timestamp value) { + if (startTimeBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && startTime_ != null + && startTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getStartTimeBuilder().mergeFrom(value); + } else { + startTime_ = value; + } + } else { + startTimeBuilder_.mergeFrom(value); + } + if (startTime_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + /** + * + * + *
+     * The start time of the operation.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 2; + */ + public Builder clearStartTime() { + bitField0_ = (bitField0_ & ~0x00000002); + startTime_ = null; + if (startTimeBuilder_ != null) { + startTimeBuilder_.dispose(); + startTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * The start time of the operation.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 2; + */ + public com.google.protobuf.Timestamp.Builder getStartTimeBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getStartTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The start time of the operation.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 2; + */ + public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { + if (startTimeBuilder_ != null) { + return startTimeBuilder_.getMessageOrBuilder(); + } else { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } + } + /** + * + * + *
+     * The start time of the operation.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 2; + */ + 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_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + updateTimeBuilder_; + /** + * + * + *
+     * The update time of the operation.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 3; + * + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+     * The update time of the operation.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 3; + * + * @return The updateTime. + */ + public com.google.protobuf.Timestamp getUpdateTime() { + if (updateTimeBuilder_ == null) { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } else { + return updateTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The update time of the operation.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 3; + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateTime_ = value; + } else { + updateTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * The update time of the operation.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 3; + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (updateTimeBuilder_ == null) { + updateTime_ = builderForValue.build(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * The update time of the operation.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 3; + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && updateTime_ != null + && updateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getUpdateTimeBuilder().mergeFrom(value); + } else { + updateTime_ = value; + } + } else { + updateTimeBuilder_.mergeFrom(value); + } + if (updateTime_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + /** + * + * + *
+     * The update time of the operation.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 3; + */ + public Builder clearUpdateTime() { + bitField0_ = (bitField0_ & ~0x00000004); + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * The update time of the operation.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 3; + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getUpdateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The update time of the operation.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 3; + */ + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + if (updateTimeBuilder_ != null) { + return updateTimeBuilder_.getMessageOrBuilder(); + } else { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } + } + /** + * + * + *
+     * The update time of the operation.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 3; + */ + 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.setUnknownFields(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.visionai.v1.IndexAssetMetadata) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.IndexAssetMetadata) + private static final com.google.cloud.visionai.v1.IndexAssetMetadata DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.IndexAssetMetadata(); + } + + public static com.google.cloud.visionai.v1.IndexAssetMetadata getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public IndexAssetMetadata parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.IndexAssetMetadata getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/IndexAssetMetadataOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/IndexAssetMetadataOrBuilder.java new file mode 100644 index 000000000000..1921962eebe0 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/IndexAssetMetadataOrBuilder.java @@ -0,0 +1,131 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/warehouse.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface IndexAssetMetadataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.IndexAssetMetadata) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The status of indexing this asset.
+   * 
+ * + * .google.cloud.visionai.v1.IndexingStatus status = 4; + * + * @return Whether the status field is set. + */ + boolean hasStatus(); + /** + * + * + *
+   * The status of indexing this asset.
+   * 
+ * + * .google.cloud.visionai.v1.IndexingStatus status = 4; + * + * @return The status. + */ + com.google.cloud.visionai.v1.IndexingStatus getStatus(); + /** + * + * + *
+   * The status of indexing this asset.
+   * 
+ * + * .google.cloud.visionai.v1.IndexingStatus status = 4; + */ + com.google.cloud.visionai.v1.IndexingStatusOrBuilder getStatusOrBuilder(); + + /** + * + * + *
+   * The start time of the operation.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 2; + * + * @return Whether the startTime field is set. + */ + boolean hasStartTime(); + /** + * + * + *
+   * The start time of the operation.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 2; + * + * @return The startTime. + */ + com.google.protobuf.Timestamp getStartTime(); + /** + * + * + *
+   * The start time of the operation.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 2; + */ + com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder(); + + /** + * + * + *
+   * The update time of the operation.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3; + * + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + /** + * + * + *
+   * The update time of the operation.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3; + * + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + /** + * + * + *
+   * The update time of the operation.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3; + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/IndexAssetRequest.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/IndexAssetRequest.java new file mode 100644 index 000000000000..291ef2e03428 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/IndexAssetRequest.java @@ -0,0 +1,862 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/warehouse.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * Request message for IndexAsset.
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.IndexAssetRequest} + */ +public final class IndexAssetRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.IndexAssetRequest) + IndexAssetRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use IndexAssetRequest.newBuilder() to construct. + private IndexAssetRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private IndexAssetRequest() { + name_ = ""; + index_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new IndexAssetRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_IndexAssetRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_IndexAssetRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.IndexAssetRequest.class, + com.google.cloud.visionai.v1.IndexAssetRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Required. The resource name of the asset to index.
+   * Format:
+   * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/assets/{asset_id}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + 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(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The resource name of the asset to index.
+   * Format:
+   * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/assets/{asset_id}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int INDEX_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object index_ = ""; + /** + * + * + *
+   * Optional. The name of the index.
+   * Format:
+   * `projects/{project_number}/locations/{location}/corpora/{corpus}/indexes/{index}`
+   * 
+ * + * + * string index = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The index. + */ + @java.lang.Override + public java.lang.String getIndex() { + java.lang.Object ref = index_; + 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(); + index_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. The name of the index.
+   * Format:
+   * `projects/{project_number}/locations/{location}/corpora/{corpus}/indexes/{index}`
+   * 
+ * + * + * string index = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for index. + */ + @java.lang.Override + public com.google.protobuf.ByteString getIndexBytes() { + java.lang.Object ref = index_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + index_ = 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(index_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, index_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(index_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, index_); + } + size += getUnknownFields().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.visionai.v1.IndexAssetRequest)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.IndexAssetRequest other = + (com.google.cloud.visionai.v1.IndexAssetRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getIndex().equals(other.getIndex())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + INDEX_FIELD_NUMBER; + hash = (53 * hash) + getIndex().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.IndexAssetRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.IndexAssetRequest 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.visionai.v1.IndexAssetRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.IndexAssetRequest 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.visionai.v1.IndexAssetRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.IndexAssetRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.IndexAssetRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.IndexAssetRequest 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.visionai.v1.IndexAssetRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.IndexAssetRequest 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.visionai.v1.IndexAssetRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.IndexAssetRequest 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.visionai.v1.IndexAssetRequest 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; + } + /** + * + * + *
+   * Request message for IndexAsset.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.IndexAssetRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.IndexAssetRequest) + com.google.cloud.visionai.v1.IndexAssetRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_IndexAssetRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_IndexAssetRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.IndexAssetRequest.class, + com.google.cloud.visionai.v1.IndexAssetRequest.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.IndexAssetRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + index_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_IndexAssetRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.IndexAssetRequest getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.IndexAssetRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.IndexAssetRequest build() { + com.google.cloud.visionai.v1.IndexAssetRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.IndexAssetRequest buildPartial() { + com.google.cloud.visionai.v1.IndexAssetRequest result = + new com.google.cloud.visionai.v1.IndexAssetRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.visionai.v1.IndexAssetRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.index_ = index_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.IndexAssetRequest) { + return mergeFrom((com.google.cloud.visionai.v1.IndexAssetRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.IndexAssetRequest other) { + if (other == com.google.cloud.visionai.v1.IndexAssetRequest.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getIndex().isEmpty()) { + index_ = other.index_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + index_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. The resource name of the asset to index.
+     * Format:
+     * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/assets/{asset_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The resource name of the asset to index.
+     * Format:
+     * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/assets/{asset_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The resource name of the asset to index.
+     * Format:
+     * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/assets/{asset_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the asset to index.
+     * Format:
+     * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/assets/{asset_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the asset to index.
+     * Format:
+     * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/assets/{asset_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object index_ = ""; + /** + * + * + *
+     * Optional. The name of the index.
+     * Format:
+     * `projects/{project_number}/locations/{location}/corpora/{corpus}/indexes/{index}`
+     * 
+ * + * + * string index = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The index. + */ + public java.lang.String getIndex() { + java.lang.Object ref = index_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + index_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. The name of the index.
+     * Format:
+     * `projects/{project_number}/locations/{location}/corpora/{corpus}/indexes/{index}`
+     * 
+ * + * + * string index = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for index. + */ + public com.google.protobuf.ByteString getIndexBytes() { + java.lang.Object ref = index_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + index_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. The name of the index.
+     * Format:
+     * `projects/{project_number}/locations/{location}/corpora/{corpus}/indexes/{index}`
+     * 
+ * + * + * string index = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @param value The index to set. + * @return This builder for chaining. + */ + public Builder setIndex(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + index_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The name of the index.
+     * Format:
+     * `projects/{project_number}/locations/{location}/corpora/{corpus}/indexes/{index}`
+     * 
+ * + * + * string index = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearIndex() { + index_ = getDefaultInstance().getIndex(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The name of the index.
+     * Format:
+     * `projects/{project_number}/locations/{location}/corpora/{corpus}/indexes/{index}`
+     * 
+ * + * + * string index = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for index to set. + * @return This builder for chaining. + */ + public Builder setIndexBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + index_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.IndexAssetRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.IndexAssetRequest) + private static final com.google.cloud.visionai.v1.IndexAssetRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.IndexAssetRequest(); + } + + public static com.google.cloud.visionai.v1.IndexAssetRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public IndexAssetRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.IndexAssetRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/IndexAssetRequestOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/IndexAssetRequestOrBuilder.java new file mode 100644 index 000000000000..6d0acc35bfaa --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/IndexAssetRequestOrBuilder.java @@ -0,0 +1,92 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/warehouse.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface IndexAssetRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.IndexAssetRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The resource name of the asset to index.
+   * Format:
+   * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/assets/{asset_id}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The resource name of the asset to index.
+   * Format:
+   * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/assets/{asset_id}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Optional. The name of the index.
+   * Format:
+   * `projects/{project_number}/locations/{location}/corpora/{corpus}/indexes/{index}`
+   * 
+ * + * + * string index = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The index. + */ + java.lang.String getIndex(); + /** + * + * + *
+   * Optional. The name of the index.
+   * Format:
+   * `projects/{project_number}/locations/{location}/corpora/{corpus}/indexes/{index}`
+   * 
+ * + * + * string index = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for index. + */ + com.google.protobuf.ByteString getIndexBytes(); +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/IndexAssetResponse.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/IndexAssetResponse.java new file mode 100644 index 000000000000..8c6790e60f93 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/IndexAssetResponse.java @@ -0,0 +1,432 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/warehouse.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * Response message for IndexAsset.
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.IndexAssetResponse} + */ +public final class IndexAssetResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.IndexAssetResponse) + IndexAssetResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use IndexAssetResponse.newBuilder() to construct. + private IndexAssetResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private IndexAssetResponse() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new IndexAssetResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_IndexAssetResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_IndexAssetResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.IndexAssetResponse.class, + com.google.cloud.visionai.v1.IndexAssetResponse.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 { + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += getUnknownFields().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.visionai.v1.IndexAssetResponse)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.IndexAssetResponse other = + (com.google.cloud.visionai.v1.IndexAssetResponse) obj; + + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.IndexAssetResponse parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.IndexAssetResponse 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.visionai.v1.IndexAssetResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.IndexAssetResponse 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.visionai.v1.IndexAssetResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.IndexAssetResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.IndexAssetResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.IndexAssetResponse 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.visionai.v1.IndexAssetResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.IndexAssetResponse 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.visionai.v1.IndexAssetResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.IndexAssetResponse 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.visionai.v1.IndexAssetResponse 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; + } + /** + * + * + *
+   * Response message for IndexAsset.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.IndexAssetResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.IndexAssetResponse) + com.google.cloud.visionai.v1.IndexAssetResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_IndexAssetResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_IndexAssetResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.IndexAssetResponse.class, + com.google.cloud.visionai.v1.IndexAssetResponse.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.IndexAssetResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_IndexAssetResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.IndexAssetResponse getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.IndexAssetResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.IndexAssetResponse build() { + com.google.cloud.visionai.v1.IndexAssetResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.IndexAssetResponse buildPartial() { + com.google.cloud.visionai.v1.IndexAssetResponse result = + new com.google.cloud.visionai.v1.IndexAssetResponse(this); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.IndexAssetResponse) { + return mergeFrom((com.google.cloud.visionai.v1.IndexAssetResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.IndexAssetResponse other) { + if (other == com.google.cloud.visionai.v1.IndexAssetResponse.getDefaultInstance()) + return this; + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.IndexAssetResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.IndexAssetResponse) + private static final com.google.cloud.visionai.v1.IndexAssetResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.IndexAssetResponse(); + } + + public static com.google.cloud.visionai.v1.IndexAssetResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public IndexAssetResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.IndexAssetResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/IndexAssetResponseOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/IndexAssetResponseOrBuilder.java new file mode 100644 index 000000000000..20e4eda302d1 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/IndexAssetResponseOrBuilder.java @@ -0,0 +1,25 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/warehouse.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface IndexAssetResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.IndexAssetResponse) + com.google.protobuf.MessageOrBuilder {} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/IndexEndpoint.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/IndexEndpoint.java new file mode 100644 index 000000000000..23099fa4acf7 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/IndexEndpoint.java @@ -0,0 +1,2778 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/warehouse.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * Message representing IndexEndpoint resource. Indexes are deployed into it.
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.IndexEndpoint} + */ +public final class IndexEndpoint extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.IndexEndpoint) + IndexEndpointOrBuilder { + private static final long serialVersionUID = 0L; + // Use IndexEndpoint.newBuilder() to construct. + private IndexEndpoint(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private IndexEndpoint() { + name_ = ""; + displayName_ = ""; + description_ = ""; + state_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new IndexEndpoint(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_IndexEndpoint_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 6: + return internalGetLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_IndexEndpoint_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.IndexEndpoint.class, + com.google.cloud.visionai.v1.IndexEndpoint.Builder.class); + } + + /** + * + * + *
+   * IndexEndpoint stage.
+   * 
+ * + * Protobuf enum {@code google.cloud.visionai.v1.IndexEndpoint.State} + */ + public enum State implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * The default value. Should not be used.
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + STATE_UNSPECIFIED(0), + /** + * + * + *
+     * State CREATING.
+     * 
+ * + * CREATING = 1; + */ + CREATING(1), + /** + * + * + *
+     * State CREATED.
+     * 
+ * + * CREATED = 2; + */ + CREATED(2), + /** + * + * + *
+     * State UPDATING.
+     * 
+ * + * UPDATING = 3; + */ + UPDATING(3), + /** + * + * + *
+     * State FAILED.
+     * 
+ * + * FAILED = 4; + */ + FAILED(4), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * The default value. Should not be used.
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + public static final int STATE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * State CREATING.
+     * 
+ * + * CREATING = 1; + */ + public static final int CREATING_VALUE = 1; + /** + * + * + *
+     * State CREATED.
+     * 
+ * + * CREATED = 2; + */ + public static final int CREATED_VALUE = 2; + /** + * + * + *
+     * State UPDATING.
+     * 
+ * + * UPDATING = 3; + */ + public static final int UPDATING_VALUE = 3; + /** + * + * + *
+     * State FAILED.
+     * 
+ * + * FAILED = 4; + */ + public static final int FAILED_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; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static State valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static State forNumber(int value) { + switch (value) { + case 0: + return STATE_UNSPECIFIED; + case 1: + return CREATING; + case 2: + return CREATED; + case 3: + return UPDATING; + case 4: + return FAILED; + 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 State findValueByNumber(int number) { + return State.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + 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.visionai.v1.IndexEndpoint.getDescriptor().getEnumTypes().get(0); + } + + private static final State[] VALUES = values(); + + public static State 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 State(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.visionai.v1.IndexEndpoint.State) + } + + private int bitField0_; + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Output only. Resource name of the IndexEndpoint.
+   * Format:
+   * `projects/{project}/locations/{location}/indexEndpoints/{index_endpoint_id}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + 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(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. Resource name of the IndexEndpoint.
+   * Format:
+   * `projects/{project}/locations/{location}/indexEndpoints/{index_endpoint_id}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DISPLAY_NAME_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object displayName_ = ""; + /** + * + * + *
+   * Optional. Display name of the IndexEndpoint. Can be up to 32 characters
+   * long.
+   * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The displayName. + */ + @java.lang.Override + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + 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(); + displayName_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. Display name of the IndexEndpoint. Can be up to 32 characters
+   * long.
+   * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for displayName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DESCRIPTION_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object description_ = ""; + /** + * + * + *
+   * Optional. Description of the IndexEndpoint. Can be up to 25000 characters
+   * long.
+   * 
+ * + * string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The description. + */ + @java.lang.Override + 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; + } + } + /** + * + * + *
+   * Optional. Description of the IndexEndpoint. Can be up to 25000 characters
+   * long.
+   * 
+ * + * string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for description. + */ + @java.lang.Override + 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 DEPLOYED_INDEX_FIELD_NUMBER = 9; + private com.google.cloud.visionai.v1.DeployedIndex deployedIndex_; + /** + * + * + *
+   * Output only. The Index deployed in this IndexEndpoint.
+   * 
+ * + * + * .google.cloud.visionai.v1.DeployedIndex deployed_index = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the deployedIndex field is set. + */ + @java.lang.Override + public boolean hasDeployedIndex() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * Output only. The Index deployed in this IndexEndpoint.
+   * 
+ * + * + * .google.cloud.visionai.v1.DeployedIndex deployed_index = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The deployedIndex. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.DeployedIndex getDeployedIndex() { + return deployedIndex_ == null + ? com.google.cloud.visionai.v1.DeployedIndex.getDefaultInstance() + : deployedIndex_; + } + /** + * + * + *
+   * Output only. The Index deployed in this IndexEndpoint.
+   * 
+ * + * + * .google.cloud.visionai.v1.DeployedIndex deployed_index = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.visionai.v1.DeployedIndexOrBuilder getDeployedIndexOrBuilder() { + return deployedIndex_ == null + ? com.google.cloud.visionai.v1.DeployedIndex.getDefaultInstance() + : deployedIndex_; + } + + public static final int STATE_FIELD_NUMBER = 5; + private int state_ = 0; + /** + * + * + *
+   * Output only. IndexEndpoint state.
+   * 
+ * + * + * .google.cloud.visionai.v1.IndexEndpoint.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + /** + * + * + *
+   * Output only. IndexEndpoint state.
+   * 
+ * + * + * .google.cloud.visionai.v1.IndexEndpoint.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.IndexEndpoint.State getState() { + com.google.cloud.visionai.v1.IndexEndpoint.State result = + com.google.cloud.visionai.v1.IndexEndpoint.State.forNumber(state_); + return result == null ? com.google.cloud.visionai.v1.IndexEndpoint.State.UNRECOGNIZED : result; + } + + public static final int LABELS_FIELD_NUMBER = 6; + + private static final class LabelsDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_IndexEndpoint_LabelsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + + @SuppressWarnings("serial") + private com.google.protobuf.MapField labels_; + + private com.google.protobuf.MapField internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + /** + * + * + *
+   * Optional. The labels applied to a resource must meet the following
+   * requirements:
+   *
+   * * Each resource can have multiple labels, up to a maximum of 64.
+   * * Each label must be a key-value pair.
+   * * Keys have a minimum length of 1 character and a maximum length of 63
+   *   characters and cannot be empty. Values can be empty and have a maximum
+   *   length of 63 characters.
+   * * Keys and values can contain only lowercase letters, numeric characters,
+   *   underscores, and dashes. All characters must use UTF-8 encoding, and
+   *   international characters are allowed.
+   * * The key portion of a label must be unique. However, you can use the same
+   *   key with multiple resources.
+   * * Keys must start with a lowercase letter or international character.
+   *
+   * See [Google Cloud
+   * Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements)
+   * for more details.
+   * 
+ * + * map<string, string> labels = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public boolean containsLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetLabels().getMap().containsKey(key); + } + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + /** + * + * + *
+   * Optional. The labels applied to a resource must meet the following
+   * requirements:
+   *
+   * * Each resource can have multiple labels, up to a maximum of 64.
+   * * Each label must be a key-value pair.
+   * * Keys have a minimum length of 1 character and a maximum length of 63
+   *   characters and cannot be empty. Values can be empty and have a maximum
+   *   length of 63 characters.
+   * * Keys and values can contain only lowercase letters, numeric characters,
+   *   underscores, and dashes. All characters must use UTF-8 encoding, and
+   *   international characters are allowed.
+   * * The key portion of a label must be unique. However, you can use the same
+   *   key with multiple resources.
+   * * Keys must start with a lowercase letter or international character.
+   *
+   * See [Google Cloud
+   * Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements)
+   * for more details.
+   * 
+ * + * map<string, string> labels = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + * + * + *
+   * Optional. The labels applied to a resource must meet the following
+   * requirements:
+   *
+   * * Each resource can have multiple labels, up to a maximum of 64.
+   * * Each label must be a key-value pair.
+   * * Keys have a minimum length of 1 character and a maximum length of 63
+   *   characters and cannot be empty. Values can be empty and have a maximum
+   *   length of 63 characters.
+   * * Keys and values can contain only lowercase letters, numeric characters,
+   *   underscores, and dashes. All characters must use UTF-8 encoding, and
+   *   international characters are allowed.
+   * * The key portion of a label must be unique. However, you can use the same
+   *   key with multiple resources.
+   * * Keys must start with a lowercase letter or international character.
+   *
+   * See [Google Cloud
+   * Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements)
+   * for more details.
+   * 
+ * + * map<string, string> labels = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public /* nullable */ java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+   * Optional. The labels applied to a resource must meet the following
+   * requirements:
+   *
+   * * Each resource can have multiple labels, up to a maximum of 64.
+   * * Each label must be a key-value pair.
+   * * Keys have a minimum length of 1 character and a maximum length of 63
+   *   characters and cannot be empty. Values can be empty and have a maximum
+   *   length of 63 characters.
+   * * Keys and values can contain only lowercase letters, numeric characters,
+   *   underscores, and dashes. All characters must use UTF-8 encoding, and
+   *   international characters are allowed.
+   * * The key portion of a label must be unique. However, you can use the same
+   *   key with multiple resources.
+   * * Keys must start with a lowercase letter or international character.
+   *
+   * See [Google Cloud
+   * Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements)
+   * for more details.
+   * 
+ * + * map<string, string> labels = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.lang.String getLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int CREATE_TIME_FIELD_NUMBER = 7; + private com.google.protobuf.Timestamp createTime_; + /** + * + * + *
+   * Output only. Create timestamp.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+   * Output only. Create timestamp.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + /** + * + * + *
+   * Output only. Create timestamp.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + + public static final int UPDATE_TIME_FIELD_NUMBER = 8; + private com.google.protobuf.Timestamp updateTime_; + /** + * + * + *
+   * Output only. Update timestamp.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + @java.lang.Override + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+   * Output only. Update timestamp.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getUpdateTime() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + /** + * + * + *
+   * Output only. Update timestamp.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + + 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, displayName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, description_); + } + if (state_ != com.google.cloud.visionai.v1.IndexEndpoint.State.STATE_UNSPECIFIED.getNumber()) { + output.writeEnum(5, state_); + } + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 6); + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(7, getCreateTime()); + } + if (((bitField0_ & 0x00000004) != 0)) { + output.writeMessage(8, getUpdateTime()); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(9, getDeployedIndex()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, displayName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, description_); + } + if (state_ != com.google.cloud.visionai.v1.IndexEndpoint.State.STATE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(5, state_); + } + for (java.util.Map.Entry entry : + internalGetLabels().getMap().entrySet()) { + com.google.protobuf.MapEntry labels__ = + LabelsDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, labels__); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getCreateTime()); + } + if (((bitField0_ & 0x00000004) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(8, getUpdateTime()); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(9, getDeployedIndex()); + } + size += getUnknownFields().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.visionai.v1.IndexEndpoint)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.IndexEndpoint other = + (com.google.cloud.visionai.v1.IndexEndpoint) obj; + + if (!getName().equals(other.getName())) return false; + if (!getDisplayName().equals(other.getDisplayName())) return false; + if (!getDescription().equals(other.getDescription())) return false; + if (hasDeployedIndex() != other.hasDeployedIndex()) return false; + if (hasDeployedIndex()) { + if (!getDeployedIndex().equals(other.getDeployedIndex())) return false; + } + if (state_ != other.state_) return false; + if (!internalGetLabels().equals(other.internalGetLabels())) return false; + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime().equals(other.getCreateTime())) return false; + } + if (hasUpdateTime() != other.hasUpdateTime()) return false; + if (hasUpdateTime()) { + if (!getUpdateTime().equals(other.getUpdateTime())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDisplayName().hashCode(); + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + if (hasDeployedIndex()) { + hash = (37 * hash) + DEPLOYED_INDEX_FIELD_NUMBER; + hash = (53 * hash) + getDeployedIndex().hashCode(); + } + hash = (37 * hash) + STATE_FIELD_NUMBER; + hash = (53 * hash) + state_; + if (!internalGetLabels().getMap().isEmpty()) { + hash = (37 * hash) + LABELS_FIELD_NUMBER; + hash = (53 * hash) + internalGetLabels().hashCode(); + } + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasUpdateTime()) { + hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getUpdateTime().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.IndexEndpoint parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.IndexEndpoint 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.visionai.v1.IndexEndpoint parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.IndexEndpoint 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.visionai.v1.IndexEndpoint parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.IndexEndpoint parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.IndexEndpoint parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.IndexEndpoint 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.visionai.v1.IndexEndpoint parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.IndexEndpoint 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.visionai.v1.IndexEndpoint parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.IndexEndpoint 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.visionai.v1.IndexEndpoint 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; + } + /** + * + * + *
+   * Message representing IndexEndpoint resource. Indexes are deployed into it.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.IndexEndpoint} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.IndexEndpoint) + com.google.cloud.visionai.v1.IndexEndpointOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_IndexEndpoint_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 6: + return internalGetLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( + int number) { + switch (number) { + case 6: + return internalGetMutableLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_IndexEndpoint_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.IndexEndpoint.class, + com.google.cloud.visionai.v1.IndexEndpoint.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.IndexEndpoint.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getDeployedIndexFieldBuilder(); + getCreateTimeFieldBuilder(); + getUpdateTimeFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + displayName_ = ""; + description_ = ""; + deployedIndex_ = null; + if (deployedIndexBuilder_ != null) { + deployedIndexBuilder_.dispose(); + deployedIndexBuilder_ = null; + } + state_ = 0; + internalGetMutableLabels().clear(); + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_IndexEndpoint_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.IndexEndpoint getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.IndexEndpoint.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.IndexEndpoint build() { + com.google.cloud.visionai.v1.IndexEndpoint result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.IndexEndpoint buildPartial() { + com.google.cloud.visionai.v1.IndexEndpoint result = + new com.google.cloud.visionai.v1.IndexEndpoint(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.visionai.v1.IndexEndpoint result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.displayName_ = displayName_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.description_ = description_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000008) != 0)) { + result.deployedIndex_ = + deployedIndexBuilder_ == null ? deployedIndex_ : deployedIndexBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.state_ = state_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.labels_ = internalGetLabels(); + result.labels_.makeImmutable(); + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.updateTime_ = updateTimeBuilder_ == null ? updateTime_ : updateTimeBuilder_.build(); + to_bitField0_ |= 0x00000004; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.IndexEndpoint) { + return mergeFrom((com.google.cloud.visionai.v1.IndexEndpoint) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.IndexEndpoint other) { + if (other == com.google.cloud.visionai.v1.IndexEndpoint.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getDisplayName().isEmpty()) { + displayName_ = other.displayName_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (other.hasDeployedIndex()) { + mergeDeployedIndex(other.getDeployedIndex()); + } + if (other.state_ != 0) { + setStateValue(other.getStateValue()); + } + internalGetMutableLabels().mergeFrom(other.internalGetLabels()); + bitField0_ |= 0x00000020; + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + displayName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 40: + { + state_ = input.readEnum(); + bitField0_ |= 0x00000010; + break; + } // case 40 + case 50: + { + com.google.protobuf.MapEntry labels__ = + input.readMessage( + LabelsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableLabels() + .getMutableMap() + .put(labels__.getKey(), labels__.getValue()); + bitField0_ |= 0x00000020; + break; + } // case 50 + case 58: + { + input.readMessage(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000040; + break; + } // case 58 + case 66: + { + input.readMessage(getUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000080; + break; + } // case 66 + case 74: + { + input.readMessage(getDeployedIndexFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 74 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Output only. Resource name of the IndexEndpoint.
+     * Format:
+     * `projects/{project}/locations/{location}/indexEndpoints/{index_endpoint_id}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. Resource name of the IndexEndpoint.
+     * Format:
+     * `projects/{project}/locations/{location}/indexEndpoints/{index_endpoint_id}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. Resource name of the IndexEndpoint.
+     * Format:
+     * `projects/{project}/locations/{location}/indexEndpoints/{index_endpoint_id}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Resource name of the IndexEndpoint.
+     * Format:
+     * `projects/{project}/locations/{location}/indexEndpoints/{index_endpoint_id}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Resource name of the IndexEndpoint.
+     * Format:
+     * `projects/{project}/locations/{location}/indexEndpoints/{index_endpoint_id}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object displayName_ = ""; + /** + * + * + *
+     * Optional. Display name of the IndexEndpoint. Can be up to 32 characters
+     * long.
+     * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The displayName. + */ + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. Display name of the IndexEndpoint. Can be up to 32 characters
+     * long.
+     * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for displayName. + */ + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. Display name of the IndexEndpoint. Can be up to 32 characters
+     * long.
+     * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + displayName_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Display name of the IndexEndpoint. Can be up to 32 characters
+     * long.
+     * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearDisplayName() { + displayName_ = getDefaultInstance().getDisplayName(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Display name of the IndexEndpoint. Can be up to 32 characters
+     * long.
+     * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + displayName_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object description_ = ""; + /** + * + * + *
+     * Optional. Description of the IndexEndpoint. Can be up to 25000 characters
+     * long.
+     * 
+ * + * string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The description. + */ + 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; + } + } + /** + * + * + *
+     * Optional. Description of the IndexEndpoint. Can be up to 25000 characters
+     * long.
+     * 
+ * + * string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for description. + */ + 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; + } + } + /** + * + * + *
+     * Optional. Description of the IndexEndpoint. Can be up to 25000 characters
+     * long.
+     * 
+ * + * string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The description to set. + * @return This builder for chaining. + */ + public Builder setDescription(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + description_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Description of the IndexEndpoint. Can be up to 25000 characters
+     * long.
+     * 
+ * + * string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearDescription() { + description_ = getDefaultInstance().getDescription(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Description of the IndexEndpoint. Can be up to 25000 characters
+     * long.
+     * 
+ * + * string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for description to set. + * @return This builder for chaining. + */ + public Builder setDescriptionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + description_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private com.google.cloud.visionai.v1.DeployedIndex deployedIndex_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.DeployedIndex, + com.google.cloud.visionai.v1.DeployedIndex.Builder, + com.google.cloud.visionai.v1.DeployedIndexOrBuilder> + deployedIndexBuilder_; + /** + * + * + *
+     * Output only. The Index deployed in this IndexEndpoint.
+     * 
+ * + * + * .google.cloud.visionai.v1.DeployedIndex deployed_index = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the deployedIndex field is set. + */ + public boolean hasDeployedIndex() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + * + * + *
+     * Output only. The Index deployed in this IndexEndpoint.
+     * 
+ * + * + * .google.cloud.visionai.v1.DeployedIndex deployed_index = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The deployedIndex. + */ + public com.google.cloud.visionai.v1.DeployedIndex getDeployedIndex() { + if (deployedIndexBuilder_ == null) { + return deployedIndex_ == null + ? com.google.cloud.visionai.v1.DeployedIndex.getDefaultInstance() + : deployedIndex_; + } else { + return deployedIndexBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. The Index deployed in this IndexEndpoint.
+     * 
+ * + * + * .google.cloud.visionai.v1.DeployedIndex deployed_index = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setDeployedIndex(com.google.cloud.visionai.v1.DeployedIndex value) { + if (deployedIndexBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + deployedIndex_ = value; + } else { + deployedIndexBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The Index deployed in this IndexEndpoint.
+     * 
+ * + * + * .google.cloud.visionai.v1.DeployedIndex deployed_index = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setDeployedIndex( + com.google.cloud.visionai.v1.DeployedIndex.Builder builderForValue) { + if (deployedIndexBuilder_ == null) { + deployedIndex_ = builderForValue.build(); + } else { + deployedIndexBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The Index deployed in this IndexEndpoint.
+     * 
+ * + * + * .google.cloud.visionai.v1.DeployedIndex deployed_index = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeDeployedIndex(com.google.cloud.visionai.v1.DeployedIndex value) { + if (deployedIndexBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) + && deployedIndex_ != null + && deployedIndex_ != com.google.cloud.visionai.v1.DeployedIndex.getDefaultInstance()) { + getDeployedIndexBuilder().mergeFrom(value); + } else { + deployedIndex_ = value; + } + } else { + deployedIndexBuilder_.mergeFrom(value); + } + if (deployedIndex_ != null) { + bitField0_ |= 0x00000008; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Output only. The Index deployed in this IndexEndpoint.
+     * 
+ * + * + * .google.cloud.visionai.v1.DeployedIndex deployed_index = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearDeployedIndex() { + bitField0_ = (bitField0_ & ~0x00000008); + deployedIndex_ = null; + if (deployedIndexBuilder_ != null) { + deployedIndexBuilder_.dispose(); + deployedIndexBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The Index deployed in this IndexEndpoint.
+     * 
+ * + * + * .google.cloud.visionai.v1.DeployedIndex deployed_index = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.visionai.v1.DeployedIndex.Builder getDeployedIndexBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return getDeployedIndexFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. The Index deployed in this IndexEndpoint.
+     * 
+ * + * + * .google.cloud.visionai.v1.DeployedIndex deployed_index = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.visionai.v1.DeployedIndexOrBuilder getDeployedIndexOrBuilder() { + if (deployedIndexBuilder_ != null) { + return deployedIndexBuilder_.getMessageOrBuilder(); + } else { + return deployedIndex_ == null + ? com.google.cloud.visionai.v1.DeployedIndex.getDefaultInstance() + : deployedIndex_; + } + } + /** + * + * + *
+     * Output only. The Index deployed in this IndexEndpoint.
+     * 
+ * + * + * .google.cloud.visionai.v1.DeployedIndex deployed_index = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.DeployedIndex, + com.google.cloud.visionai.v1.DeployedIndex.Builder, + com.google.cloud.visionai.v1.DeployedIndexOrBuilder> + getDeployedIndexFieldBuilder() { + if (deployedIndexBuilder_ == null) { + deployedIndexBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.DeployedIndex, + com.google.cloud.visionai.v1.DeployedIndex.Builder, + com.google.cloud.visionai.v1.DeployedIndexOrBuilder>( + getDeployedIndex(), getParentForChildren(), isClean()); + deployedIndex_ = null; + } + return deployedIndexBuilder_; + } + + private int state_ = 0; + /** + * + * + *
+     * Output only. IndexEndpoint state.
+     * 
+ * + * + * .google.cloud.visionai.v1.IndexEndpoint.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + /** + * + * + *
+     * Output only. IndexEndpoint state.
+     * 
+ * + * + * .google.cloud.visionai.v1.IndexEndpoint.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The enum numeric value on the wire for state to set. + * @return This builder for chaining. + */ + public Builder setStateValue(int value) { + state_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. IndexEndpoint state.
+     * 
+ * + * + * .google.cloud.visionai.v1.IndexEndpoint.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.IndexEndpoint.State getState() { + com.google.cloud.visionai.v1.IndexEndpoint.State result = + com.google.cloud.visionai.v1.IndexEndpoint.State.forNumber(state_); + return result == null + ? com.google.cloud.visionai.v1.IndexEndpoint.State.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Output only. IndexEndpoint state.
+     * 
+ * + * + * .google.cloud.visionai.v1.IndexEndpoint.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The state to set. + * @return This builder for chaining. + */ + public Builder setState(com.google.cloud.visionai.v1.IndexEndpoint.State value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000010; + state_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. IndexEndpoint state.
+     * 
+ * + * + * .google.cloud.visionai.v1.IndexEndpoint.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearState() { + bitField0_ = (bitField0_ & ~0x00000010); + state_ = 0; + onChanged(); + return this; + } + + private com.google.protobuf.MapField labels_; + + private com.google.protobuf.MapField internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + + private com.google.protobuf.MapField + internalGetMutableLabels() { + if (labels_ == null) { + labels_ = com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry); + } + if (!labels_.isMutable()) { + labels_ = labels_.copy(); + } + bitField0_ |= 0x00000020; + onChanged(); + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + /** + * + * + *
+     * Optional. The labels applied to a resource must meet the following
+     * requirements:
+     *
+     * * Each resource can have multiple labels, up to a maximum of 64.
+     * * Each label must be a key-value pair.
+     * * Keys have a minimum length of 1 character and a maximum length of 63
+     *   characters and cannot be empty. Values can be empty and have a maximum
+     *   length of 63 characters.
+     * * Keys and values can contain only lowercase letters, numeric characters,
+     *   underscores, and dashes. All characters must use UTF-8 encoding, and
+     *   international characters are allowed.
+     * * The key portion of a label must be unique. However, you can use the same
+     *   key with multiple resources.
+     * * Keys must start with a lowercase letter or international character.
+     *
+     * See [Google Cloud
+     * Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements)
+     * for more details.
+     * 
+ * + * map<string, string> labels = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public boolean containsLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetLabels().getMap().containsKey(key); + } + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + /** + * + * + *
+     * Optional. The labels applied to a resource must meet the following
+     * requirements:
+     *
+     * * Each resource can have multiple labels, up to a maximum of 64.
+     * * Each label must be a key-value pair.
+     * * Keys have a minimum length of 1 character and a maximum length of 63
+     *   characters and cannot be empty. Values can be empty and have a maximum
+     *   length of 63 characters.
+     * * Keys and values can contain only lowercase letters, numeric characters,
+     *   underscores, and dashes. All characters must use UTF-8 encoding, and
+     *   international characters are allowed.
+     * * The key portion of a label must be unique. However, you can use the same
+     *   key with multiple resources.
+     * * Keys must start with a lowercase letter or international character.
+     *
+     * See [Google Cloud
+     * Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements)
+     * for more details.
+     * 
+ * + * map<string, string> labels = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + * + * + *
+     * Optional. The labels applied to a resource must meet the following
+     * requirements:
+     *
+     * * Each resource can have multiple labels, up to a maximum of 64.
+     * * Each label must be a key-value pair.
+     * * Keys have a minimum length of 1 character and a maximum length of 63
+     *   characters and cannot be empty. Values can be empty and have a maximum
+     *   length of 63 characters.
+     * * Keys and values can contain only lowercase letters, numeric characters,
+     *   underscores, and dashes. All characters must use UTF-8 encoding, and
+     *   international characters are allowed.
+     * * The key portion of a label must be unique. However, you can use the same
+     *   key with multiple resources.
+     * * Keys must start with a lowercase letter or international character.
+     *
+     * See [Google Cloud
+     * Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements)
+     * for more details.
+     * 
+ * + * map<string, string> labels = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public /* nullable */ java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+     * Optional. The labels applied to a resource must meet the following
+     * requirements:
+     *
+     * * Each resource can have multiple labels, up to a maximum of 64.
+     * * Each label must be a key-value pair.
+     * * Keys have a minimum length of 1 character and a maximum length of 63
+     *   characters and cannot be empty. Values can be empty and have a maximum
+     *   length of 63 characters.
+     * * Keys and values can contain only lowercase letters, numeric characters,
+     *   underscores, and dashes. All characters must use UTF-8 encoding, and
+     *   international characters are allowed.
+     * * The key portion of a label must be unique. However, you can use the same
+     *   key with multiple resources.
+     * * Keys must start with a lowercase letter or international character.
+     *
+     * See [Google Cloud
+     * Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements)
+     * for more details.
+     * 
+ * + * map<string, string> labels = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.lang.String getLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearLabels() { + bitField0_ = (bitField0_ & ~0x00000020); + internalGetMutableLabels().getMutableMap().clear(); + return this; + } + /** + * + * + *
+     * Optional. The labels applied to a resource must meet the following
+     * requirements:
+     *
+     * * Each resource can have multiple labels, up to a maximum of 64.
+     * * Each label must be a key-value pair.
+     * * Keys have a minimum length of 1 character and a maximum length of 63
+     *   characters and cannot be empty. Values can be empty and have a maximum
+     *   length of 63 characters.
+     * * Keys and values can contain only lowercase letters, numeric characters,
+     *   underscores, and dashes. All characters must use UTF-8 encoding, and
+     *   international characters are allowed.
+     * * The key portion of a label must be unique. However, you can use the same
+     *   key with multiple resources.
+     * * Keys must start with a lowercase letter or international character.
+     *
+     * See [Google Cloud
+     * Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements)
+     * for more details.
+     * 
+ * + * map<string, string> labels = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder removeLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + internalGetMutableLabels().getMutableMap().remove(key); + return this; + } + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableLabels() { + bitField0_ |= 0x00000020; + return internalGetMutableLabels().getMutableMap(); + } + /** + * + * + *
+     * Optional. The labels applied to a resource must meet the following
+     * requirements:
+     *
+     * * Each resource can have multiple labels, up to a maximum of 64.
+     * * Each label must be a key-value pair.
+     * * Keys have a minimum length of 1 character and a maximum length of 63
+     *   characters and cannot be empty. Values can be empty and have a maximum
+     *   length of 63 characters.
+     * * Keys and values can contain only lowercase letters, numeric characters,
+     *   underscores, and dashes. All characters must use UTF-8 encoding, and
+     *   international characters are allowed.
+     * * The key portion of a label must be unique. However, you can use the same
+     *   key with multiple resources.
+     * * Keys must start with a lowercase letter or international character.
+     *
+     * See [Google Cloud
+     * Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements)
+     * for more details.
+     * 
+ * + * map<string, string> labels = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder putLabels(java.lang.String key, java.lang.String value) { + if (key == null) { + throw new NullPointerException("map key"); + } + if (value == null) { + throw new NullPointerException("map value"); + } + internalGetMutableLabels().getMutableMap().put(key, value); + bitField0_ |= 0x00000020; + return this; + } + /** + * + * + *
+     * Optional. The labels applied to a resource must meet the following
+     * requirements:
+     *
+     * * Each resource can have multiple labels, up to a maximum of 64.
+     * * Each label must be a key-value pair.
+     * * Keys have a minimum length of 1 character and a maximum length of 63
+     *   characters and cannot be empty. Values can be empty and have a maximum
+     *   length of 63 characters.
+     * * Keys and values can contain only lowercase letters, numeric characters,
+     *   underscores, and dashes. All characters must use UTF-8 encoding, and
+     *   international characters are allowed.
+     * * The key portion of a label must be unique. However, you can use the same
+     *   key with multiple resources.
+     * * Keys must start with a lowercase letter or international character.
+     *
+     * See [Google Cloud
+     * Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements)
+     * for more details.
+     * 
+ * + * map<string, string> labels = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder putAllLabels(java.util.Map values) { + internalGetMutableLabels().getMutableMap().putAll(values); + bitField0_ |= 0x00000020; + return this; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + createTimeBuilder_; + /** + * + * + *
+     * Output only. Create timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000040) != 0); + } + /** + * + * + *
+     * Output only. Create timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Create timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + } else { + createTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Create timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Create timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (((bitField0_ & 0x00000040) != 0) + && createTime_ != null + && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getCreateTimeBuilder().mergeFrom(value); + } else { + createTime_ = value; + } + } else { + createTimeBuilder_.mergeFrom(value); + } + if (createTime_ != null) { + bitField0_ |= 0x00000040; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Output only. Create timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearCreateTime() { + bitField0_ = (bitField0_ & ~0x00000040); + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Create timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + bitField0_ |= 0x00000040; + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Create timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } + } + /** + * + * + *
+     * Output only. Create timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), getParentForChildren(), isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private com.google.protobuf.Timestamp updateTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + updateTimeBuilder_; + /** + * + * + *
+     * Output only. Update timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000080) != 0); + } + /** + * + * + *
+     * Output only. Update timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + public com.google.protobuf.Timestamp getUpdateTime() { + if (updateTimeBuilder_ == null) { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } else { + return updateTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Update timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateTime_ = value; + } else { + updateTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Update timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (updateTimeBuilder_ == null) { + updateTime_ = builderForValue.build(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Update timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (((bitField0_ & 0x00000080) != 0) + && updateTime_ != null + && updateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getUpdateTimeBuilder().mergeFrom(value); + } else { + updateTime_ = value; + } + } else { + updateTimeBuilder_.mergeFrom(value); + } + if (updateTime_ != null) { + bitField0_ |= 0x00000080; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Output only. Update timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearUpdateTime() { + bitField0_ = (bitField0_ & ~0x00000080); + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Update timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + bitField0_ |= 0x00000080; + onChanged(); + return getUpdateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Update timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + if (updateTimeBuilder_ != null) { + return updateTimeBuilder_.getMessageOrBuilder(); + } else { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } + } + /** + * + * + *
+     * Output only. Update timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + 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.setUnknownFields(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.visionai.v1.IndexEndpoint) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.IndexEndpoint) + private static final com.google.cloud.visionai.v1.IndexEndpoint DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.IndexEndpoint(); + } + + public static com.google.cloud.visionai.v1.IndexEndpoint getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public IndexEndpoint parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.IndexEndpoint getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/IndexEndpointName.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/IndexEndpointName.java new file mode 100644 index 000000000000..cfa504ca9280 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/IndexEndpointName.java @@ -0,0 +1,227 @@ +/* + * Copyright 2024 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.visionai.v1; + +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") +public class IndexEndpointName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION_INDEX_ENDPOINT = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/indexEndpoints/{index_endpoint}"); + private volatile Map fieldValuesMap; + private final String project; + private final String location; + private final String indexEndpoint; + + @Deprecated + protected IndexEndpointName() { + project = null; + location = null; + indexEndpoint = null; + } + + private IndexEndpointName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + indexEndpoint = Preconditions.checkNotNull(builder.getIndexEndpoint()); + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getIndexEndpoint() { + return indexEndpoint; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static IndexEndpointName of(String project, String location, String indexEndpoint) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setIndexEndpoint(indexEndpoint) + .build(); + } + + public static String format(String project, String location, String indexEndpoint) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setIndexEndpoint(indexEndpoint) + .build() + .toString(); + } + + public static IndexEndpointName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION_INDEX_ENDPOINT.validatedMatch( + formattedString, "IndexEndpointName.parse: formattedString not in valid format"); + return of(matchMap.get("project"), matchMap.get("location"), matchMap.get("index_endpoint")); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List values) { + List list = new ArrayList<>(values.size()); + for (IndexEndpointName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION_INDEX_ENDPOINT.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (project != null) { + fieldMapBuilder.put("project", project); + } + if (location != null) { + fieldMapBuilder.put("location", location); + } + if (indexEndpoint != null) { + fieldMapBuilder.put("index_endpoint", indexEndpoint); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION_INDEX_ENDPOINT.instantiate( + "project", project, "location", location, "index_endpoint", indexEndpoint); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null && getClass() == o.getClass()) { + IndexEndpointName that = ((IndexEndpointName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location) + && Objects.equals(this.indexEndpoint, that.indexEndpoint); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(project); + h *= 1000003; + h ^= Objects.hashCode(location); + h *= 1000003; + h ^= Objects.hashCode(indexEndpoint); + return h; + } + + /** Builder for projects/{project}/locations/{location}/indexEndpoints/{index_endpoint}. */ + public static class Builder { + private String project; + private String location; + private String indexEndpoint; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getIndexEndpoint() { + return indexEndpoint; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setIndexEndpoint(String indexEndpoint) { + this.indexEndpoint = indexEndpoint; + return this; + } + + private Builder(IndexEndpointName indexEndpointName) { + this.project = indexEndpointName.project; + this.location = indexEndpointName.location; + this.indexEndpoint = indexEndpointName.indexEndpoint; + } + + public IndexEndpointName build() { + return new IndexEndpointName(this); + } + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/IndexEndpointOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/IndexEndpointOrBuilder.java new file mode 100644 index 000000000000..cebba3d60319 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/IndexEndpointOrBuilder.java @@ -0,0 +1,398 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/warehouse.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface IndexEndpointOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.IndexEndpoint) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. Resource name of the IndexEndpoint.
+   * Format:
+   * `projects/{project}/locations/{location}/indexEndpoints/{index_endpoint_id}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Output only. Resource name of the IndexEndpoint.
+   * Format:
+   * `projects/{project}/locations/{location}/indexEndpoints/{index_endpoint_id}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Optional. Display name of the IndexEndpoint. Can be up to 32 characters
+   * long.
+   * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The displayName. + */ + java.lang.String getDisplayName(); + /** + * + * + *
+   * Optional. Display name of the IndexEndpoint. Can be up to 32 characters
+   * long.
+   * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for displayName. + */ + com.google.protobuf.ByteString getDisplayNameBytes(); + + /** + * + * + *
+   * Optional. Description of the IndexEndpoint. Can be up to 25000 characters
+   * long.
+   * 
+ * + * string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The description. + */ + java.lang.String getDescription(); + /** + * + * + *
+   * Optional. Description of the IndexEndpoint. Can be up to 25000 characters
+   * long.
+   * 
+ * + * string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for description. + */ + com.google.protobuf.ByteString getDescriptionBytes(); + + /** + * + * + *
+   * Output only. The Index deployed in this IndexEndpoint.
+   * 
+ * + * + * .google.cloud.visionai.v1.DeployedIndex deployed_index = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the deployedIndex field is set. + */ + boolean hasDeployedIndex(); + /** + * + * + *
+   * Output only. The Index deployed in this IndexEndpoint.
+   * 
+ * + * + * .google.cloud.visionai.v1.DeployedIndex deployed_index = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The deployedIndex. + */ + com.google.cloud.visionai.v1.DeployedIndex getDeployedIndex(); + /** + * + * + *
+   * Output only. The Index deployed in this IndexEndpoint.
+   * 
+ * + * + * .google.cloud.visionai.v1.DeployedIndex deployed_index = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.visionai.v1.DeployedIndexOrBuilder getDeployedIndexOrBuilder(); + + /** + * + * + *
+   * Output only. IndexEndpoint state.
+   * 
+ * + * + * .google.cloud.visionai.v1.IndexEndpoint.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + int getStateValue(); + /** + * + * + *
+   * Output only. IndexEndpoint state.
+   * 
+ * + * + * .google.cloud.visionai.v1.IndexEndpoint.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + com.google.cloud.visionai.v1.IndexEndpoint.State getState(); + + /** + * + * + *
+   * Optional. The labels applied to a resource must meet the following
+   * requirements:
+   *
+   * * Each resource can have multiple labels, up to a maximum of 64.
+   * * Each label must be a key-value pair.
+   * * Keys have a minimum length of 1 character and a maximum length of 63
+   *   characters and cannot be empty. Values can be empty and have a maximum
+   *   length of 63 characters.
+   * * Keys and values can contain only lowercase letters, numeric characters,
+   *   underscores, and dashes. All characters must use UTF-8 encoding, and
+   *   international characters are allowed.
+   * * The key portion of a label must be unique. However, you can use the same
+   *   key with multiple resources.
+   * * Keys must start with a lowercase letter or international character.
+   *
+   * See [Google Cloud
+   * Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements)
+   * for more details.
+   * 
+ * + * map<string, string> labels = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + int getLabelsCount(); + /** + * + * + *
+   * Optional. The labels applied to a resource must meet the following
+   * requirements:
+   *
+   * * Each resource can have multiple labels, up to a maximum of 64.
+   * * Each label must be a key-value pair.
+   * * Keys have a minimum length of 1 character and a maximum length of 63
+   *   characters and cannot be empty. Values can be empty and have a maximum
+   *   length of 63 characters.
+   * * Keys and values can contain only lowercase letters, numeric characters,
+   *   underscores, and dashes. All characters must use UTF-8 encoding, and
+   *   international characters are allowed.
+   * * The key portion of a label must be unique. However, you can use the same
+   *   key with multiple resources.
+   * * Keys must start with a lowercase letter or international character.
+   *
+   * See [Google Cloud
+   * Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements)
+   * for more details.
+   * 
+ * + * map<string, string> labels = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + boolean containsLabels(java.lang.String key); + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Deprecated + java.util.Map getLabels(); + /** + * + * + *
+   * Optional. The labels applied to a resource must meet the following
+   * requirements:
+   *
+   * * Each resource can have multiple labels, up to a maximum of 64.
+   * * Each label must be a key-value pair.
+   * * Keys have a minimum length of 1 character and a maximum length of 63
+   *   characters and cannot be empty. Values can be empty and have a maximum
+   *   length of 63 characters.
+   * * Keys and values can contain only lowercase letters, numeric characters,
+   *   underscores, and dashes. All characters must use UTF-8 encoding, and
+   *   international characters are allowed.
+   * * The key portion of a label must be unique. However, you can use the same
+   *   key with multiple resources.
+   * * Keys must start with a lowercase letter or international character.
+   *
+   * See [Google Cloud
+   * Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements)
+   * for more details.
+   * 
+ * + * map<string, string> labels = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + java.util.Map getLabelsMap(); + /** + * + * + *
+   * Optional. The labels applied to a resource must meet the following
+   * requirements:
+   *
+   * * Each resource can have multiple labels, up to a maximum of 64.
+   * * Each label must be a key-value pair.
+   * * Keys have a minimum length of 1 character and a maximum length of 63
+   *   characters and cannot be empty. Values can be empty and have a maximum
+   *   length of 63 characters.
+   * * Keys and values can contain only lowercase letters, numeric characters,
+   *   underscores, and dashes. All characters must use UTF-8 encoding, and
+   *   international characters are allowed.
+   * * The key portion of a label must be unique. However, you can use the same
+   *   key with multiple resources.
+   * * Keys must start with a lowercase letter or international character.
+   *
+   * See [Google Cloud
+   * Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements)
+   * for more details.
+   * 
+ * + * map<string, string> labels = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + /* nullable */ + java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue); + /** + * + * + *
+   * Optional. The labels applied to a resource must meet the following
+   * requirements:
+   *
+   * * Each resource can have multiple labels, up to a maximum of 64.
+   * * Each label must be a key-value pair.
+   * * Keys have a minimum length of 1 character and a maximum length of 63
+   *   characters and cannot be empty. Values can be empty and have a maximum
+   *   length of 63 characters.
+   * * Keys and values can contain only lowercase letters, numeric characters,
+   *   underscores, and dashes. All characters must use UTF-8 encoding, and
+   *   international characters are allowed.
+   * * The key portion of a label must be unique. However, you can use the same
+   *   key with multiple resources.
+   * * Keys must start with a lowercase letter or international character.
+   *
+   * See [Google Cloud
+   * Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements)
+   * for more details.
+   * 
+ * + * map<string, string> labels = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + java.lang.String getLabelsOrThrow(java.lang.String key); + + /** + * + * + *
+   * Output only. Create timestamp.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + /** + * + * + *
+   * Output only. Create timestamp.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + * + * + *
+   * Output only. Create timestamp.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. Update timestamp.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + /** + * + * + *
+   * Output only. Update timestamp.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + /** + * + * + *
+   * Output only. Update timestamp.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/IndexName.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/IndexName.java new file mode 100644 index 000000000000..911f7ec8059d --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/IndexName.java @@ -0,0 +1,259 @@ +/* + * Copyright 2024 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.visionai.v1; + +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") +public class IndexName implements ResourceName { + private static final PathTemplate PROJECT_NUMBER_LOCATION_CORPUS_INDEX = + PathTemplate.createWithoutUrlEncoding( + "projects/{project_number}/locations/{location}/corpora/{corpus}/indexes/{index}"); + private volatile Map fieldValuesMap; + private final String projectNumber; + private final String location; + private final String corpus; + private final String index; + + @Deprecated + protected IndexName() { + projectNumber = null; + location = null; + corpus = null; + index = null; + } + + private IndexName(Builder builder) { + projectNumber = Preconditions.checkNotNull(builder.getProjectNumber()); + location = Preconditions.checkNotNull(builder.getLocation()); + corpus = Preconditions.checkNotNull(builder.getCorpus()); + index = Preconditions.checkNotNull(builder.getIndex()); + } + + public String getProjectNumber() { + return projectNumber; + } + + public String getLocation() { + return location; + } + + public String getCorpus() { + return corpus; + } + + public String getIndex() { + return index; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static IndexName of(String projectNumber, String location, String corpus, String index) { + return newBuilder() + .setProjectNumber(projectNumber) + .setLocation(location) + .setCorpus(corpus) + .setIndex(index) + .build(); + } + + public static String format(String projectNumber, String location, String corpus, String index) { + return newBuilder() + .setProjectNumber(projectNumber) + .setLocation(location) + .setCorpus(corpus) + .setIndex(index) + .build() + .toString(); + } + + public static IndexName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_NUMBER_LOCATION_CORPUS_INDEX.validatedMatch( + formattedString, "IndexName.parse: formattedString not in valid format"); + return of( + matchMap.get("project_number"), + matchMap.get("location"), + matchMap.get("corpus"), + matchMap.get("index")); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List values) { + List list = new ArrayList<>(values.size()); + for (IndexName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_NUMBER_LOCATION_CORPUS_INDEX.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (projectNumber != null) { + fieldMapBuilder.put("project_number", projectNumber); + } + if (location != null) { + fieldMapBuilder.put("location", location); + } + if (corpus != null) { + fieldMapBuilder.put("corpus", corpus); + } + if (index != null) { + fieldMapBuilder.put("index", index); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_NUMBER_LOCATION_CORPUS_INDEX.instantiate( + "project_number", projectNumber, "location", location, "corpus", corpus, "index", index); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null && getClass() == o.getClass()) { + IndexName that = ((IndexName) o); + return Objects.equals(this.projectNumber, that.projectNumber) + && Objects.equals(this.location, that.location) + && Objects.equals(this.corpus, that.corpus) + && Objects.equals(this.index, that.index); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(projectNumber); + h *= 1000003; + h ^= Objects.hashCode(location); + h *= 1000003; + h ^= Objects.hashCode(corpus); + h *= 1000003; + h ^= Objects.hashCode(index); + return h; + } + + /** + * Builder for projects/{project_number}/locations/{location}/corpora/{corpus}/indexes/{index}. + */ + public static class Builder { + private String projectNumber; + private String location; + private String corpus; + private String index; + + protected Builder() {} + + public String getProjectNumber() { + return projectNumber; + } + + public String getLocation() { + return location; + } + + public String getCorpus() { + return corpus; + } + + public String getIndex() { + return index; + } + + public Builder setProjectNumber(String projectNumber) { + this.projectNumber = projectNumber; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setCorpus(String corpus) { + this.corpus = corpus; + return this; + } + + public Builder setIndex(String index) { + this.index = index; + return this; + } + + private Builder(IndexName indexName) { + this.projectNumber = indexName.projectNumber; + this.location = indexName.location; + this.corpus = indexName.corpus; + this.index = indexName.index; + } + + public IndexName build() { + return new IndexName(this); + } + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/IndexOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/IndexOrBuilder.java new file mode 100644 index 000000000000..1d6930fcfa9a --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/IndexOrBuilder.java @@ -0,0 +1,310 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/warehouse.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface IndexOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.Index) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Include all assets under the corpus.
+   * 
+ * + * bool entire_corpus = 9; + * + * @return Whether the entireCorpus field is set. + */ + boolean hasEntireCorpus(); + /** + * + * + *
+   * Include all assets under the corpus.
+   * 
+ * + * bool entire_corpus = 9; + * + * @return The entireCorpus. + */ + boolean getEntireCorpus(); + + /** + * + * + *
+   * Output only. Resource name of the Index resource.
+   * Format:
+   * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/indexes/{index_id}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Output only. Resource name of the Index resource.
+   * Format:
+   * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/indexes/{index_id}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Optional. Optional user-specified display name of the index.
+   * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The displayName. + */ + java.lang.String getDisplayName(); + /** + * + * + *
+   * Optional. Optional user-specified display name of the index.
+   * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for displayName. + */ + com.google.protobuf.ByteString getDisplayNameBytes(); + + /** + * + * + *
+   * Optional. Optional description of the index.
+   * 
+ * + * string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The description. + */ + java.lang.String getDescription(); + /** + * + * + *
+   * Optional. Optional description of the index.
+   * 
+ * + * string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for description. + */ + com.google.protobuf.ByteString getDescriptionBytes(); + + /** + * + * + *
+   * Output only. State of the index.
+   * 
+ * + * + * .google.cloud.visionai.v1.Index.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + int getStateValue(); + /** + * + * + *
+   * Output only. State of the index.
+   * 
+ * + * + * .google.cloud.visionai.v1.Index.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + com.google.cloud.visionai.v1.Index.State getState(); + + /** + * + * + *
+   * Output only. The create timestamp.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + /** + * + * + *
+   * Output only. The create timestamp.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + * + * + *
+   * Output only. The create timestamp.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. The update timestamp.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + /** + * + * + *
+   * Output only. The update timestamp.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + /** + * + * + *
+   * Output only. The update timestamp.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. References to the deployed index instance.
+   * Index of VIDEO_ON_DEMAND corpus can have at most one deployed index.
+   * Index of IMAGE corpus can have multiple deployed indexes.
+   * 
+ * + * + * repeated .google.cloud.visionai.v1.DeployedIndexReference deployed_indexes = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + java.util.List getDeployedIndexesList(); + /** + * + * + *
+   * Output only. References to the deployed index instance.
+   * Index of VIDEO_ON_DEMAND corpus can have at most one deployed index.
+   * Index of IMAGE corpus can have multiple deployed indexes.
+   * 
+ * + * + * repeated .google.cloud.visionai.v1.DeployedIndexReference deployed_indexes = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.visionai.v1.DeployedIndexReference getDeployedIndexes(int index); + /** + * + * + *
+   * Output only. References to the deployed index instance.
+   * Index of VIDEO_ON_DEMAND corpus can have at most one deployed index.
+   * Index of IMAGE corpus can have multiple deployed indexes.
+   * 
+ * + * + * repeated .google.cloud.visionai.v1.DeployedIndexReference deployed_indexes = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + int getDeployedIndexesCount(); + /** + * + * + *
+   * Output only. References to the deployed index instance.
+   * Index of VIDEO_ON_DEMAND corpus can have at most one deployed index.
+   * Index of IMAGE corpus can have multiple deployed indexes.
+   * 
+ * + * + * repeated .google.cloud.visionai.v1.DeployedIndexReference deployed_indexes = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + java.util.List + getDeployedIndexesOrBuilderList(); + /** + * + * + *
+   * Output only. References to the deployed index instance.
+   * Index of VIDEO_ON_DEMAND corpus can have at most one deployed index.
+   * Index of IMAGE corpus can have multiple deployed indexes.
+   * 
+ * + * + * repeated .google.cloud.visionai.v1.DeployedIndexReference deployed_indexes = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.visionai.v1.DeployedIndexReferenceOrBuilder getDeployedIndexesOrBuilder( + int index); + + com.google.cloud.visionai.v1.Index.AssetFilterCase getAssetFilterCase(); +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/IndexedAsset.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/IndexedAsset.java new file mode 100644 index 000000000000..15c9c940475c --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/IndexedAsset.java @@ -0,0 +1,1443 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/warehouse.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * An IndexedAsset is an asset that the index is built upon.
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.IndexedAsset} + */ +public final class IndexedAsset extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.IndexedAsset) + IndexedAssetOrBuilder { + private static final long serialVersionUID = 0L; + // Use IndexedAsset.newBuilder() to construct. + private IndexedAsset(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private IndexedAsset() { + index_ = ""; + asset_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new IndexedAsset(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_IndexedAsset_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_IndexedAsset_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.IndexedAsset.class, + com.google.cloud.visionai.v1.IndexedAsset.Builder.class); + } + + private int bitField0_; + public static final int INDEX_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object index_ = ""; + /** + * + * + *
+   * Required. The index that this indexed asset belongs to.
+   * Format:
+   * `projects/{project_number}/locations/{location}/corpora/{corpus}/indexes/{index}`
+   * 
+ * + * + * string index = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The index. + */ + @java.lang.Override + public java.lang.String getIndex() { + java.lang.Object ref = index_; + 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(); + index_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The index that this indexed asset belongs to.
+   * Format:
+   * `projects/{project_number}/locations/{location}/corpora/{corpus}/indexes/{index}`
+   * 
+ * + * + * string index = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for index. + */ + @java.lang.Override + public com.google.protobuf.ByteString getIndexBytes() { + java.lang.Object ref = index_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + index_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ASSET_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object asset_ = ""; + /** + * + * + *
+   * Required. The resource name of the asset.
+   * Format:
+   * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/assets/{asset_id}`
+   * 
+ * + * + * string asset = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The asset. + */ + @java.lang.Override + public java.lang.String getAsset() { + java.lang.Object ref = asset_; + 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(); + asset_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The resource name of the asset.
+   * Format:
+   * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/assets/{asset_id}`
+   * 
+ * + * + * string asset = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for asset. + */ + @java.lang.Override + public com.google.protobuf.ByteString getAssetBytes() { + java.lang.Object ref = asset_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + asset_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CREATE_TIME_FIELD_NUMBER = 3; + private com.google.protobuf.Timestamp createTime_; + /** + * + * + *
+   * Output only. The create timestamp.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * Output only. The create timestamp.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + /** + * + * + *
+   * Output only. The create timestamp.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + + public static final int UPDATE_TIME_FIELD_NUMBER = 4; + private com.google.protobuf.Timestamp updateTime_; + /** + * + * + *
+   * Output only. The update timestamp.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + @java.lang.Override + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+   * Output only. The update timestamp.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getUpdateTime() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + /** + * + * + *
+   * Output only. The update timestamp.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + + 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(index_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, index_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(asset_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, asset_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(3, getCreateTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(4, getUpdateTime()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(index_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, index_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(asset_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, asset_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getCreateTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getUpdateTime()); + } + size += getUnknownFields().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.visionai.v1.IndexedAsset)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.IndexedAsset other = + (com.google.cloud.visionai.v1.IndexedAsset) obj; + + if (!getIndex().equals(other.getIndex())) return false; + if (!getAsset().equals(other.getAsset())) return false; + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime().equals(other.getCreateTime())) return false; + } + if (hasUpdateTime() != other.hasUpdateTime()) return false; + if (hasUpdateTime()) { + if (!getUpdateTime().equals(other.getUpdateTime())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + INDEX_FIELD_NUMBER; + hash = (53 * hash) + getIndex().hashCode(); + hash = (37 * hash) + ASSET_FIELD_NUMBER; + hash = (53 * hash) + getAsset().hashCode(); + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasUpdateTime()) { + hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getUpdateTime().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.IndexedAsset parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.IndexedAsset 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.visionai.v1.IndexedAsset parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.IndexedAsset 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.visionai.v1.IndexedAsset parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.IndexedAsset parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.IndexedAsset parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.IndexedAsset 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.visionai.v1.IndexedAsset parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.IndexedAsset 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.visionai.v1.IndexedAsset parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.IndexedAsset 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.visionai.v1.IndexedAsset 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; + } + /** + * + * + *
+   * An IndexedAsset is an asset that the index is built upon.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.IndexedAsset} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.IndexedAsset) + com.google.cloud.visionai.v1.IndexedAssetOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_IndexedAsset_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_IndexedAsset_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.IndexedAsset.class, + com.google.cloud.visionai.v1.IndexedAsset.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.IndexedAsset.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getCreateTimeFieldBuilder(); + getUpdateTimeFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + index_ = ""; + asset_ = ""; + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_IndexedAsset_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.IndexedAsset getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.IndexedAsset.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.IndexedAsset build() { + com.google.cloud.visionai.v1.IndexedAsset result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.IndexedAsset buildPartial() { + com.google.cloud.visionai.v1.IndexedAsset result = + new com.google.cloud.visionai.v1.IndexedAsset(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.visionai.v1.IndexedAsset result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.index_ = index_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.asset_ = asset_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.updateTime_ = updateTimeBuilder_ == null ? updateTime_ : updateTimeBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.IndexedAsset) { + return mergeFrom((com.google.cloud.visionai.v1.IndexedAsset) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.IndexedAsset other) { + if (other == com.google.cloud.visionai.v1.IndexedAsset.getDefaultInstance()) return this; + if (!other.getIndex().isEmpty()) { + index_ = other.index_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getAsset().isEmpty()) { + asset_ = other.asset_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + index_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + asset_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + input.readMessage(getUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 34 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object index_ = ""; + /** + * + * + *
+     * Required. The index that this indexed asset belongs to.
+     * Format:
+     * `projects/{project_number}/locations/{location}/corpora/{corpus}/indexes/{index}`
+     * 
+ * + * + * string index = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The index. + */ + public java.lang.String getIndex() { + java.lang.Object ref = index_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + index_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The index that this indexed asset belongs to.
+     * Format:
+     * `projects/{project_number}/locations/{location}/corpora/{corpus}/indexes/{index}`
+     * 
+ * + * + * string index = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for index. + */ + public com.google.protobuf.ByteString getIndexBytes() { + java.lang.Object ref = index_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + index_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The index that this indexed asset belongs to.
+     * Format:
+     * `projects/{project_number}/locations/{location}/corpora/{corpus}/indexes/{index}`
+     * 
+ * + * + * string index = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The index to set. + * @return This builder for chaining. + */ + public Builder setIndex(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + index_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The index that this indexed asset belongs to.
+     * Format:
+     * `projects/{project_number}/locations/{location}/corpora/{corpus}/indexes/{index}`
+     * 
+ * + * + * string index = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearIndex() { + index_ = getDefaultInstance().getIndex(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The index that this indexed asset belongs to.
+     * Format:
+     * `projects/{project_number}/locations/{location}/corpora/{corpus}/indexes/{index}`
+     * 
+ * + * + * string index = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for index to set. + * @return This builder for chaining. + */ + public Builder setIndexBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + index_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object asset_ = ""; + /** + * + * + *
+     * Required. The resource name of the asset.
+     * Format:
+     * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/assets/{asset_id}`
+     * 
+ * + * + * string asset = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The asset. + */ + public java.lang.String getAsset() { + java.lang.Object ref = asset_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + asset_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The resource name of the asset.
+     * Format:
+     * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/assets/{asset_id}`
+     * 
+ * + * + * string asset = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for asset. + */ + public com.google.protobuf.ByteString getAssetBytes() { + java.lang.Object ref = asset_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + asset_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The resource name of the asset.
+     * Format:
+     * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/assets/{asset_id}`
+     * 
+ * + * + * string asset = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The asset to set. + * @return This builder for chaining. + */ + public Builder setAsset(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + asset_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the asset.
+     * Format:
+     * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/assets/{asset_id}`
+     * 
+ * + * + * string asset = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearAsset() { + asset_ = getDefaultInstance().getAsset(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the asset.
+     * Format:
+     * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/assets/{asset_id}`
+     * 
+ * + * + * string asset = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for asset to set. + * @return This builder for chaining. + */ + public Builder setAssetBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + asset_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + createTimeBuilder_; + /** + * + * + *
+     * Output only. The create timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+     * Output only. The create timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. The create timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + } else { + createTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The create timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The create timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && createTime_ != null + && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getCreateTimeBuilder().mergeFrom(value); + } else { + createTime_ = value; + } + } else { + createTimeBuilder_.mergeFrom(value); + } + if (createTime_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Output only. The create timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearCreateTime() { + bitField0_ = (bitField0_ & ~0x00000004); + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The create timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. The create timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } + } + /** + * + * + *
+     * Output only. The create timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), getParentForChildren(), isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private com.google.protobuf.Timestamp updateTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + updateTimeBuilder_; + /** + * + * + *
+     * Output only. The update timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + * + * + *
+     * Output only. The update timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + public com.google.protobuf.Timestamp getUpdateTime() { + if (updateTimeBuilder_ == null) { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } else { + return updateTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. The update timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateTime_ = value; + } else { + updateTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The update timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (updateTimeBuilder_ == null) { + updateTime_ = builderForValue.build(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The update timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) + && updateTime_ != null + && updateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getUpdateTimeBuilder().mergeFrom(value); + } else { + updateTime_ = value; + } + } else { + updateTimeBuilder_.mergeFrom(value); + } + if (updateTime_ != null) { + bitField0_ |= 0x00000008; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Output only. The update timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearUpdateTime() { + bitField0_ = (bitField0_ & ~0x00000008); + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The update timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return getUpdateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. The update timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + if (updateTimeBuilder_ != null) { + return updateTimeBuilder_.getMessageOrBuilder(); + } else { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } + } + /** + * + * + *
+     * Output only. The update timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + 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.setUnknownFields(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.visionai.v1.IndexedAsset) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.IndexedAsset) + private static final com.google.cloud.visionai.v1.IndexedAsset DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.IndexedAsset(); + } + + public static com.google.cloud.visionai.v1.IndexedAsset getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public IndexedAsset parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.IndexedAsset getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/IndexedAssetOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/IndexedAssetOrBuilder.java new file mode 100644 index 000000000000..f30cffa7decc --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/IndexedAssetOrBuilder.java @@ -0,0 +1,168 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/warehouse.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface IndexedAssetOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.IndexedAsset) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The index that this indexed asset belongs to.
+   * Format:
+   * `projects/{project_number}/locations/{location}/corpora/{corpus}/indexes/{index}`
+   * 
+ * + * + * string index = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The index. + */ + java.lang.String getIndex(); + /** + * + * + *
+   * Required. The index that this indexed asset belongs to.
+   * Format:
+   * `projects/{project_number}/locations/{location}/corpora/{corpus}/indexes/{index}`
+   * 
+ * + * + * string index = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for index. + */ + com.google.protobuf.ByteString getIndexBytes(); + + /** + * + * + *
+   * Required. The resource name of the asset.
+   * Format:
+   * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/assets/{asset_id}`
+   * 
+ * + * + * string asset = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The asset. + */ + java.lang.String getAsset(); + /** + * + * + *
+   * Required. The resource name of the asset.
+   * Format:
+   * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/assets/{asset_id}`
+   * 
+ * + * + * string asset = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for asset. + */ + com.google.protobuf.ByteString getAssetBytes(); + + /** + * + * + *
+   * Output only. The create timestamp.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + /** + * + * + *
+   * Output only. The create timestamp.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + * + * + *
+   * Output only. The create timestamp.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. The update timestamp.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + /** + * + * + *
+   * Output only. The update timestamp.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + /** + * + * + *
+   * Output only. The update timestamp.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/IndexingStatus.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/IndexingStatus.java new file mode 100644 index 000000000000..18c614b5e011 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/IndexingStatus.java @@ -0,0 +1,967 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/warehouse.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * The status of indexing for the asset.
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.IndexingStatus} + */ +public final class IndexingStatus extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.IndexingStatus) + IndexingStatusOrBuilder { + private static final long serialVersionUID = 0L; + // Use IndexingStatus.newBuilder() to construct. + private IndexingStatus(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private IndexingStatus() { + state_ = 0; + statusMessage_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new IndexingStatus(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_IndexingStatus_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_IndexingStatus_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.IndexingStatus.class, + com.google.cloud.visionai.v1.IndexingStatus.Builder.class); + } + + /** + * + * + *
+   * State enum for this asset's indexing.
+   * 
+ * + * Protobuf enum {@code google.cloud.visionai.v1.IndexingStatus.State} + */ + public enum State implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * The default process state should never happen.
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + STATE_UNSPECIFIED(0), + /** + * + * + *
+     * The indexing is in progress.
+     * 
+ * + * IN_PROGRESS = 1; + */ + IN_PROGRESS(1), + /** + * + * + *
+     * The process is successfully done.
+     * 
+ * + * SUCCEEDED = 2; + */ + SUCCEEDED(2), + /** + * + * + *
+     * The process failed.
+     * 
+ * + * FAILED = 3; + */ + FAILED(3), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * The default process state should never happen.
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + public static final int STATE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * The indexing is in progress.
+     * 
+ * + * IN_PROGRESS = 1; + */ + public static final int IN_PROGRESS_VALUE = 1; + /** + * + * + *
+     * The process is successfully done.
+     * 
+ * + * SUCCEEDED = 2; + */ + public static final int SUCCEEDED_VALUE = 2; + /** + * + * + *
+     * The process failed.
+     * 
+ * + * FAILED = 3; + */ + public static final int FAILED_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; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static State valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static State forNumber(int value) { + switch (value) { + case 0: + return STATE_UNSPECIFIED; + case 1: + return IN_PROGRESS; + case 2: + return SUCCEEDED; + case 3: + return FAILED; + 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 State findValueByNumber(int number) { + return State.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + 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.visionai.v1.IndexingStatus.getDescriptor().getEnumTypes().get(0); + } + + private static final State[] VALUES = values(); + + public static State 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 State(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.visionai.v1.IndexingStatus.State) + } + + public static final int STATE_FIELD_NUMBER = 2; + private int state_ = 0; + /** + * + * + *
+   * Output only. State of this asset's indexing.
+   * 
+ * + * + * .google.cloud.visionai.v1.IndexingStatus.State state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + /** + * + * + *
+   * Output only. State of this asset's indexing.
+   * 
+ * + * + * .google.cloud.visionai.v1.IndexingStatus.State state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.IndexingStatus.State getState() { + com.google.cloud.visionai.v1.IndexingStatus.State result = + com.google.cloud.visionai.v1.IndexingStatus.State.forNumber(state_); + return result == null ? com.google.cloud.visionai.v1.IndexingStatus.State.UNRECOGNIZED : result; + } + + public static final int STATUS_MESSAGE_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object statusMessage_ = ""; + /** + * + * + *
+   * Detailed message describing the state.
+   * 
+ * + * string status_message = 3; + * + * @return The statusMessage. + */ + @java.lang.Override + public java.lang.String getStatusMessage() { + java.lang.Object ref = statusMessage_; + 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(); + statusMessage_ = s; + return s; + } + } + /** + * + * + *
+   * Detailed message describing the state.
+   * 
+ * + * string status_message = 3; + * + * @return The bytes for statusMessage. + */ + @java.lang.Override + public com.google.protobuf.ByteString getStatusMessageBytes() { + java.lang.Object ref = statusMessage_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + statusMessage_ = 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 (state_ != com.google.cloud.visionai.v1.IndexingStatus.State.STATE_UNSPECIFIED.getNumber()) { + output.writeEnum(2, state_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(statusMessage_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, statusMessage_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (state_ != com.google.cloud.visionai.v1.IndexingStatus.State.STATE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, state_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(statusMessage_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, statusMessage_); + } + size += getUnknownFields().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.visionai.v1.IndexingStatus)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.IndexingStatus other = + (com.google.cloud.visionai.v1.IndexingStatus) obj; + + if (state_ != other.state_) return false; + if (!getStatusMessage().equals(other.getStatusMessage())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + STATE_FIELD_NUMBER; + hash = (53 * hash) + state_; + hash = (37 * hash) + STATUS_MESSAGE_FIELD_NUMBER; + hash = (53 * hash) + getStatusMessage().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.IndexingStatus parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.IndexingStatus 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.visionai.v1.IndexingStatus parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.IndexingStatus 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.visionai.v1.IndexingStatus parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.IndexingStatus parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.IndexingStatus parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.IndexingStatus 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.visionai.v1.IndexingStatus parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.IndexingStatus 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.visionai.v1.IndexingStatus parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.IndexingStatus 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.visionai.v1.IndexingStatus 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 status of indexing for the asset.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.IndexingStatus} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.IndexingStatus) + com.google.cloud.visionai.v1.IndexingStatusOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_IndexingStatus_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_IndexingStatus_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.IndexingStatus.class, + com.google.cloud.visionai.v1.IndexingStatus.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.IndexingStatus.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + state_ = 0; + statusMessage_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_IndexingStatus_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.IndexingStatus getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.IndexingStatus.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.IndexingStatus build() { + com.google.cloud.visionai.v1.IndexingStatus result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.IndexingStatus buildPartial() { + com.google.cloud.visionai.v1.IndexingStatus result = + new com.google.cloud.visionai.v1.IndexingStatus(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.visionai.v1.IndexingStatus result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.state_ = state_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.statusMessage_ = statusMessage_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.IndexingStatus) { + return mergeFrom((com.google.cloud.visionai.v1.IndexingStatus) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.IndexingStatus other) { + if (other == com.google.cloud.visionai.v1.IndexingStatus.getDefaultInstance()) return this; + if (other.state_ != 0) { + setStateValue(other.getStateValue()); + } + if (!other.getStatusMessage().isEmpty()) { + statusMessage_ = other.statusMessage_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 16: + { + state_ = input.readEnum(); + bitField0_ |= 0x00000001; + break; + } // case 16 + case 26: + { + statusMessage_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private int state_ = 0; + /** + * + * + *
+     * Output only. State of this asset's indexing.
+     * 
+ * + * + * .google.cloud.visionai.v1.IndexingStatus.State state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + /** + * + * + *
+     * Output only. State of this asset's indexing.
+     * 
+ * + * + * .google.cloud.visionai.v1.IndexingStatus.State state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The enum numeric value on the wire for state to set. + * @return This builder for chaining. + */ + public Builder setStateValue(int value) { + state_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. State of this asset's indexing.
+     * 
+ * + * + * .google.cloud.visionai.v1.IndexingStatus.State state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.IndexingStatus.State getState() { + com.google.cloud.visionai.v1.IndexingStatus.State result = + com.google.cloud.visionai.v1.IndexingStatus.State.forNumber(state_); + return result == null + ? com.google.cloud.visionai.v1.IndexingStatus.State.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Output only. State of this asset's indexing.
+     * 
+ * + * + * .google.cloud.visionai.v1.IndexingStatus.State state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The state to set. + * @return This builder for chaining. + */ + public Builder setState(com.google.cloud.visionai.v1.IndexingStatus.State value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + state_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. State of this asset's indexing.
+     * 
+ * + * + * .google.cloud.visionai.v1.IndexingStatus.State state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearState() { + bitField0_ = (bitField0_ & ~0x00000001); + state_ = 0; + onChanged(); + return this; + } + + private java.lang.Object statusMessage_ = ""; + /** + * + * + *
+     * Detailed message describing the state.
+     * 
+ * + * string status_message = 3; + * + * @return The statusMessage. + */ + public java.lang.String getStatusMessage() { + java.lang.Object ref = statusMessage_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + statusMessage_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Detailed message describing the state.
+     * 
+ * + * string status_message = 3; + * + * @return The bytes for statusMessage. + */ + public com.google.protobuf.ByteString getStatusMessageBytes() { + java.lang.Object ref = statusMessage_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + statusMessage_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Detailed message describing the state.
+     * 
+ * + * string status_message = 3; + * + * @param value The statusMessage to set. + * @return This builder for chaining. + */ + public Builder setStatusMessage(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + statusMessage_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Detailed message describing the state.
+     * 
+ * + * string status_message = 3; + * + * @return This builder for chaining. + */ + public Builder clearStatusMessage() { + statusMessage_ = getDefaultInstance().getStatusMessage(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Detailed message describing the state.
+     * 
+ * + * string status_message = 3; + * + * @param value The bytes for statusMessage to set. + * @return This builder for chaining. + */ + public Builder setStatusMessageBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + statusMessage_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.IndexingStatus) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.IndexingStatus) + private static final com.google.cloud.visionai.v1.IndexingStatus DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.IndexingStatus(); + } + + public static com.google.cloud.visionai.v1.IndexingStatus getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public IndexingStatus parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.IndexingStatus getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/IndexingStatusOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/IndexingStatusOrBuilder.java new file mode 100644 index 000000000000..5f9af1809a29 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/IndexingStatusOrBuilder.java @@ -0,0 +1,80 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/warehouse.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface IndexingStatusOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.IndexingStatus) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. State of this asset's indexing.
+   * 
+ * + * + * .google.cloud.visionai.v1.IndexingStatus.State state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + int getStateValue(); + /** + * + * + *
+   * Output only. State of this asset's indexing.
+   * 
+ * + * + * .google.cloud.visionai.v1.IndexingStatus.State state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + com.google.cloud.visionai.v1.IndexingStatus.State getState(); + + /** + * + * + *
+   * Detailed message describing the state.
+   * 
+ * + * string status_message = 3; + * + * @return The statusMessage. + */ + java.lang.String getStatusMessage(); + /** + * + * + *
+   * Detailed message describing the state.
+   * 
+ * + * string status_message = 3; + * + * @return The bytes for statusMessage. + */ + com.google.protobuf.ByteString getStatusMessageBytes(); +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/IngestAssetRequest.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/IngestAssetRequest.java new file mode 100644 index 000000000000..262ba9a142bf --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/IngestAssetRequest.java @@ -0,0 +1,3941 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/warehouse.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * Request message for IngestAsset API.
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.IngestAssetRequest} + */ +public final class IngestAssetRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.IngestAssetRequest) + IngestAssetRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use IngestAssetRequest.newBuilder() to construct. + private IngestAssetRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private IngestAssetRequest() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new IngestAssetRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_IngestAssetRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_IngestAssetRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.IngestAssetRequest.class, + com.google.cloud.visionai.v1.IngestAssetRequest.Builder.class); + } + + public interface ConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.IngestAssetRequest.Config) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Type information for video data.
+     * 
+ * + * .google.cloud.visionai.v1.IngestAssetRequest.Config.VideoType video_type = 2; + * + * @return Whether the videoType field is set. + */ + boolean hasVideoType(); + /** + * + * + *
+     * Type information for video data.
+     * 
+ * + * .google.cloud.visionai.v1.IngestAssetRequest.Config.VideoType video_type = 2; + * + * @return The videoType. + */ + com.google.cloud.visionai.v1.IngestAssetRequest.Config.VideoType getVideoType(); + /** + * + * + *
+     * Type information for video data.
+     * 
+ * + * .google.cloud.visionai.v1.IngestAssetRequest.Config.VideoType video_type = 2; + */ + com.google.cloud.visionai.v1.IngestAssetRequest.Config.VideoTypeOrBuilder + getVideoTypeOrBuilder(); + + /** + * + * + *
+     * Required. The resource name of the asset that the ingested data belongs
+     * to.
+     * 
+ * + * + * string asset = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The asset. + */ + java.lang.String getAsset(); + /** + * + * + *
+     * Required. The resource name of the asset that the ingested data belongs
+     * to.
+     * 
+ * + * + * string asset = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for asset. + */ + com.google.protobuf.ByteString getAssetBytes(); + + com.google.cloud.visionai.v1.IngestAssetRequest.Config.DataTypeCase getDataTypeCase(); + } + /** + * + * + *
+   * Configuration for the data.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.IngestAssetRequest.Config} + */ + public static final class Config extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.IngestAssetRequest.Config) + ConfigOrBuilder { + private static final long serialVersionUID = 0L; + // Use Config.newBuilder() to construct. + private Config(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Config() { + asset_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Config(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_IngestAssetRequest_Config_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_IngestAssetRequest_Config_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.IngestAssetRequest.Config.class, + com.google.cloud.visionai.v1.IngestAssetRequest.Config.Builder.class); + } + + public interface VideoTypeOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.IngestAssetRequest.Config.VideoType) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+       * Container format of the video data.
+       * 
+ * + * + * .google.cloud.visionai.v1.IngestAssetRequest.Config.VideoType.ContainerFormat container_format = 1; + * + * + * @return The enum numeric value on the wire for containerFormat. + */ + int getContainerFormatValue(); + /** + * + * + *
+       * Container format of the video data.
+       * 
+ * + * + * .google.cloud.visionai.v1.IngestAssetRequest.Config.VideoType.ContainerFormat container_format = 1; + * + * + * @return The containerFormat. + */ + com.google.cloud.visionai.v1.IngestAssetRequest.Config.VideoType.ContainerFormat + getContainerFormat(); + } + /** + * + * + *
+     * Type information for video data.
+     * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.IngestAssetRequest.Config.VideoType} + */ + public static final class VideoType extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.IngestAssetRequest.Config.VideoType) + VideoTypeOrBuilder { + private static final long serialVersionUID = 0L; + // Use VideoType.newBuilder() to construct. + private VideoType(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private VideoType() { + containerFormat_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new VideoType(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_IngestAssetRequest_Config_VideoType_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_IngestAssetRequest_Config_VideoType_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.IngestAssetRequest.Config.VideoType.class, + com.google.cloud.visionai.v1.IngestAssetRequest.Config.VideoType.Builder.class); + } + + /** + * + * + *
+       * Container format of the video.
+       * 
+ * + * Protobuf enum {@code + * google.cloud.visionai.v1.IngestAssetRequest.Config.VideoType.ContainerFormat} + */ + public enum ContainerFormat implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+         * The default type, not supposed to be used.
+         * 
+ * + * CONTAINER_FORMAT_UNSPECIFIED = 0; + */ + CONTAINER_FORMAT_UNSPECIFIED(0), + /** + * + * + *
+         * Mp4 container format.
+         * 
+ * + * CONTAINER_FORMAT_MP4 = 1; + */ + CONTAINER_FORMAT_MP4(1), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+         * The default type, not supposed to be used.
+         * 
+ * + * CONTAINER_FORMAT_UNSPECIFIED = 0; + */ + public static final int CONTAINER_FORMAT_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+         * Mp4 container format.
+         * 
+ * + * CONTAINER_FORMAT_MP4 = 1; + */ + public static final int CONTAINER_FORMAT_MP4_VALUE = 1; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static ContainerFormat valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static ContainerFormat forNumber(int value) { + switch (value) { + case 0: + return CONTAINER_FORMAT_UNSPECIFIED; + case 1: + return CONTAINER_FORMAT_MP4; + 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 ContainerFormat findValueByNumber(int number) { + return ContainerFormat.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + 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.visionai.v1.IngestAssetRequest.Config.VideoType.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final ContainerFormat[] VALUES = values(); + + public static ContainerFormat 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 ContainerFormat(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.visionai.v1.IngestAssetRequest.Config.VideoType.ContainerFormat) + } + + public static final int CONTAINER_FORMAT_FIELD_NUMBER = 1; + private int containerFormat_ = 0; + /** + * + * + *
+       * Container format of the video data.
+       * 
+ * + * + * .google.cloud.visionai.v1.IngestAssetRequest.Config.VideoType.ContainerFormat container_format = 1; + * + * + * @return The enum numeric value on the wire for containerFormat. + */ + @java.lang.Override + public int getContainerFormatValue() { + return containerFormat_; + } + /** + * + * + *
+       * Container format of the video data.
+       * 
+ * + * + * .google.cloud.visionai.v1.IngestAssetRequest.Config.VideoType.ContainerFormat container_format = 1; + * + * + * @return The containerFormat. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.IngestAssetRequest.Config.VideoType.ContainerFormat + getContainerFormat() { + com.google.cloud.visionai.v1.IngestAssetRequest.Config.VideoType.ContainerFormat result = + com.google.cloud.visionai.v1.IngestAssetRequest.Config.VideoType.ContainerFormat + .forNumber(containerFormat_); + return result == null + ? com.google.cloud.visionai.v1.IngestAssetRequest.Config.VideoType.ContainerFormat + .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 (containerFormat_ + != com.google.cloud.visionai.v1.IngestAssetRequest.Config.VideoType.ContainerFormat + .CONTAINER_FORMAT_UNSPECIFIED + .getNumber()) { + output.writeEnum(1, containerFormat_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (containerFormat_ + != com.google.cloud.visionai.v1.IngestAssetRequest.Config.VideoType.ContainerFormat + .CONTAINER_FORMAT_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, containerFormat_); + } + size += getUnknownFields().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.visionai.v1.IngestAssetRequest.Config.VideoType)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.IngestAssetRequest.Config.VideoType other = + (com.google.cloud.visionai.v1.IngestAssetRequest.Config.VideoType) obj; + + if (containerFormat_ != other.containerFormat_) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + CONTAINER_FORMAT_FIELD_NUMBER; + hash = (53 * hash) + containerFormat_; + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.IngestAssetRequest.Config.VideoType parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.IngestAssetRequest.Config.VideoType 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.visionai.v1.IngestAssetRequest.Config.VideoType parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.IngestAssetRequest.Config.VideoType 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.visionai.v1.IngestAssetRequest.Config.VideoType parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.IngestAssetRequest.Config.VideoType parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.IngestAssetRequest.Config.VideoType parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.IngestAssetRequest.Config.VideoType 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.visionai.v1.IngestAssetRequest.Config.VideoType + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.IngestAssetRequest.Config.VideoType + 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.visionai.v1.IngestAssetRequest.Config.VideoType parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.IngestAssetRequest.Config.VideoType 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.visionai.v1.IngestAssetRequest.Config.VideoType 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; + } + /** + * + * + *
+       * Type information for video data.
+       * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.IngestAssetRequest.Config.VideoType} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.IngestAssetRequest.Config.VideoType) + com.google.cloud.visionai.v1.IngestAssetRequest.Config.VideoTypeOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_IngestAssetRequest_Config_VideoType_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_IngestAssetRequest_Config_VideoType_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.IngestAssetRequest.Config.VideoType.class, + com.google.cloud.visionai.v1.IngestAssetRequest.Config.VideoType.Builder.class); + } + + // Construct using + // com.google.cloud.visionai.v1.IngestAssetRequest.Config.VideoType.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + containerFormat_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_IngestAssetRequest_Config_VideoType_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.IngestAssetRequest.Config.VideoType + getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.IngestAssetRequest.Config.VideoType + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.IngestAssetRequest.Config.VideoType build() { + com.google.cloud.visionai.v1.IngestAssetRequest.Config.VideoType result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.IngestAssetRequest.Config.VideoType buildPartial() { + com.google.cloud.visionai.v1.IngestAssetRequest.Config.VideoType result = + new com.google.cloud.visionai.v1.IngestAssetRequest.Config.VideoType(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.visionai.v1.IngestAssetRequest.Config.VideoType result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.containerFormat_ = containerFormat_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.IngestAssetRequest.Config.VideoType) { + return mergeFrom( + (com.google.cloud.visionai.v1.IngestAssetRequest.Config.VideoType) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.visionai.v1.IngestAssetRequest.Config.VideoType other) { + if (other + == com.google.cloud.visionai.v1.IngestAssetRequest.Config.VideoType + .getDefaultInstance()) return this; + if (other.containerFormat_ != 0) { + setContainerFormatValue(other.getContainerFormatValue()); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + containerFormat_ = input.readEnum(); + bitField0_ |= 0x00000001; + break; + } // case 8 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private int containerFormat_ = 0; + /** + * + * + *
+         * Container format of the video data.
+         * 
+ * + * + * .google.cloud.visionai.v1.IngestAssetRequest.Config.VideoType.ContainerFormat container_format = 1; + * + * + * @return The enum numeric value on the wire for containerFormat. + */ + @java.lang.Override + public int getContainerFormatValue() { + return containerFormat_; + } + /** + * + * + *
+         * Container format of the video data.
+         * 
+ * + * + * .google.cloud.visionai.v1.IngestAssetRequest.Config.VideoType.ContainerFormat container_format = 1; + * + * + * @param value The enum numeric value on the wire for containerFormat to set. + * @return This builder for chaining. + */ + public Builder setContainerFormatValue(int value) { + containerFormat_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+         * Container format of the video data.
+         * 
+ * + * + * .google.cloud.visionai.v1.IngestAssetRequest.Config.VideoType.ContainerFormat container_format = 1; + * + * + * @return The containerFormat. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.IngestAssetRequest.Config.VideoType.ContainerFormat + getContainerFormat() { + com.google.cloud.visionai.v1.IngestAssetRequest.Config.VideoType.ContainerFormat result = + com.google.cloud.visionai.v1.IngestAssetRequest.Config.VideoType.ContainerFormat + .forNumber(containerFormat_); + return result == null + ? com.google.cloud.visionai.v1.IngestAssetRequest.Config.VideoType.ContainerFormat + .UNRECOGNIZED + : result; + } + /** + * + * + *
+         * Container format of the video data.
+         * 
+ * + * + * .google.cloud.visionai.v1.IngestAssetRequest.Config.VideoType.ContainerFormat container_format = 1; + * + * + * @param value The containerFormat to set. + * @return This builder for chaining. + */ + public Builder setContainerFormat( + com.google.cloud.visionai.v1.IngestAssetRequest.Config.VideoType.ContainerFormat + value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + containerFormat_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+         * Container format of the video data.
+         * 
+ * + * + * .google.cloud.visionai.v1.IngestAssetRequest.Config.VideoType.ContainerFormat container_format = 1; + * + * + * @return This builder for chaining. + */ + public Builder clearContainerFormat() { + bitField0_ = (bitField0_ & ~0x00000001); + containerFormat_ = 0; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.IngestAssetRequest.Config.VideoType) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.IngestAssetRequest.Config.VideoType) + private static final com.google.cloud.visionai.v1.IngestAssetRequest.Config.VideoType + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.IngestAssetRequest.Config.VideoType(); + } + + public static com.google.cloud.visionai.v1.IngestAssetRequest.Config.VideoType + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public VideoType parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.IngestAssetRequest.Config.VideoType + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int dataTypeCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object dataType_; + + public enum DataTypeCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + VIDEO_TYPE(2), + DATATYPE_NOT_SET(0); + private final int value; + + private DataTypeCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static DataTypeCase valueOf(int value) { + return forNumber(value); + } + + public static DataTypeCase forNumber(int value) { + switch (value) { + case 2: + return VIDEO_TYPE; + case 0: + return DATATYPE_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public DataTypeCase getDataTypeCase() { + return DataTypeCase.forNumber(dataTypeCase_); + } + + public static final int VIDEO_TYPE_FIELD_NUMBER = 2; + /** + * + * + *
+     * Type information for video data.
+     * 
+ * + * .google.cloud.visionai.v1.IngestAssetRequest.Config.VideoType video_type = 2; + * + * @return Whether the videoType field is set. + */ + @java.lang.Override + public boolean hasVideoType() { + return dataTypeCase_ == 2; + } + /** + * + * + *
+     * Type information for video data.
+     * 
+ * + * .google.cloud.visionai.v1.IngestAssetRequest.Config.VideoType video_type = 2; + * + * @return The videoType. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.IngestAssetRequest.Config.VideoType getVideoType() { + if (dataTypeCase_ == 2) { + return (com.google.cloud.visionai.v1.IngestAssetRequest.Config.VideoType) dataType_; + } + return com.google.cloud.visionai.v1.IngestAssetRequest.Config.VideoType.getDefaultInstance(); + } + /** + * + * + *
+     * Type information for video data.
+     * 
+ * + * .google.cloud.visionai.v1.IngestAssetRequest.Config.VideoType video_type = 2; + */ + @java.lang.Override + public com.google.cloud.visionai.v1.IngestAssetRequest.Config.VideoTypeOrBuilder + getVideoTypeOrBuilder() { + if (dataTypeCase_ == 2) { + return (com.google.cloud.visionai.v1.IngestAssetRequest.Config.VideoType) dataType_; + } + return com.google.cloud.visionai.v1.IngestAssetRequest.Config.VideoType.getDefaultInstance(); + } + + public static final int ASSET_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object asset_ = ""; + /** + * + * + *
+     * Required. The resource name of the asset that the ingested data belongs
+     * to.
+     * 
+ * + * + * string asset = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The asset. + */ + @java.lang.Override + public java.lang.String getAsset() { + java.lang.Object ref = asset_; + 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(); + asset_ = s; + return s; + } + } + /** + * + * + *
+     * Required. The resource name of the asset that the ingested data belongs
+     * to.
+     * 
+ * + * + * string asset = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for asset. + */ + @java.lang.Override + public com.google.protobuf.ByteString getAssetBytes() { + java.lang.Object ref = asset_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + asset_ = 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(asset_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, asset_); + } + if (dataTypeCase_ == 2) { + output.writeMessage( + 2, (com.google.cloud.visionai.v1.IngestAssetRequest.Config.VideoType) dataType_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(asset_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, asset_); + } + if (dataTypeCase_ == 2) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 2, (com.google.cloud.visionai.v1.IngestAssetRequest.Config.VideoType) dataType_); + } + size += getUnknownFields().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.visionai.v1.IngestAssetRequest.Config)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.IngestAssetRequest.Config other = + (com.google.cloud.visionai.v1.IngestAssetRequest.Config) obj; + + if (!getAsset().equals(other.getAsset())) return false; + if (!getDataTypeCase().equals(other.getDataTypeCase())) return false; + switch (dataTypeCase_) { + case 2: + if (!getVideoType().equals(other.getVideoType())) return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ASSET_FIELD_NUMBER; + hash = (53 * hash) + getAsset().hashCode(); + switch (dataTypeCase_) { + case 2: + hash = (37 * hash) + VIDEO_TYPE_FIELD_NUMBER; + hash = (53 * hash) + getVideoType().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.IngestAssetRequest.Config parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.IngestAssetRequest.Config 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.visionai.v1.IngestAssetRequest.Config parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.IngestAssetRequest.Config 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.visionai.v1.IngestAssetRequest.Config parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.IngestAssetRequest.Config parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.IngestAssetRequest.Config parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.IngestAssetRequest.Config 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.visionai.v1.IngestAssetRequest.Config parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.IngestAssetRequest.Config 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.visionai.v1.IngestAssetRequest.Config parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.IngestAssetRequest.Config 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.visionai.v1.IngestAssetRequest.Config 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; + } + /** + * + * + *
+     * Configuration for the data.
+     * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.IngestAssetRequest.Config} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.IngestAssetRequest.Config) + com.google.cloud.visionai.v1.IngestAssetRequest.ConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_IngestAssetRequest_Config_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_IngestAssetRequest_Config_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.IngestAssetRequest.Config.class, + com.google.cloud.visionai.v1.IngestAssetRequest.Config.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.IngestAssetRequest.Config.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (videoTypeBuilder_ != null) { + videoTypeBuilder_.clear(); + } + asset_ = ""; + dataTypeCase_ = 0; + dataType_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_IngestAssetRequest_Config_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.IngestAssetRequest.Config getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.IngestAssetRequest.Config.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.IngestAssetRequest.Config build() { + com.google.cloud.visionai.v1.IngestAssetRequest.Config result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.IngestAssetRequest.Config buildPartial() { + com.google.cloud.visionai.v1.IngestAssetRequest.Config result = + new com.google.cloud.visionai.v1.IngestAssetRequest.Config(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.visionai.v1.IngestAssetRequest.Config result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.asset_ = asset_; + } + } + + private void buildPartialOneofs( + com.google.cloud.visionai.v1.IngestAssetRequest.Config result) { + result.dataTypeCase_ = dataTypeCase_; + result.dataType_ = this.dataType_; + if (dataTypeCase_ == 2 && videoTypeBuilder_ != null) { + result.dataType_ = videoTypeBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.IngestAssetRequest.Config) { + return mergeFrom((com.google.cloud.visionai.v1.IngestAssetRequest.Config) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.IngestAssetRequest.Config other) { + if (other == com.google.cloud.visionai.v1.IngestAssetRequest.Config.getDefaultInstance()) + return this; + if (!other.getAsset().isEmpty()) { + asset_ = other.asset_; + bitField0_ |= 0x00000002; + onChanged(); + } + switch (other.getDataTypeCase()) { + case VIDEO_TYPE: + { + mergeVideoType(other.getVideoType()); + break; + } + case DATATYPE_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + asset_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 10 + case 18: + { + input.readMessage(getVideoTypeFieldBuilder().getBuilder(), extensionRegistry); + dataTypeCase_ = 2; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int dataTypeCase_ = 0; + private java.lang.Object dataType_; + + public DataTypeCase getDataTypeCase() { + return DataTypeCase.forNumber(dataTypeCase_); + } + + public Builder clearDataType() { + dataTypeCase_ = 0; + dataType_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.IngestAssetRequest.Config.VideoType, + com.google.cloud.visionai.v1.IngestAssetRequest.Config.VideoType.Builder, + com.google.cloud.visionai.v1.IngestAssetRequest.Config.VideoTypeOrBuilder> + videoTypeBuilder_; + /** + * + * + *
+       * Type information for video data.
+       * 
+ * + * .google.cloud.visionai.v1.IngestAssetRequest.Config.VideoType video_type = 2; + * + * @return Whether the videoType field is set. + */ + @java.lang.Override + public boolean hasVideoType() { + return dataTypeCase_ == 2; + } + /** + * + * + *
+       * Type information for video data.
+       * 
+ * + * .google.cloud.visionai.v1.IngestAssetRequest.Config.VideoType video_type = 2; + * + * @return The videoType. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.IngestAssetRequest.Config.VideoType getVideoType() { + if (videoTypeBuilder_ == null) { + if (dataTypeCase_ == 2) { + return (com.google.cloud.visionai.v1.IngestAssetRequest.Config.VideoType) dataType_; + } + return com.google.cloud.visionai.v1.IngestAssetRequest.Config.VideoType + .getDefaultInstance(); + } else { + if (dataTypeCase_ == 2) { + return videoTypeBuilder_.getMessage(); + } + return com.google.cloud.visionai.v1.IngestAssetRequest.Config.VideoType + .getDefaultInstance(); + } + } + /** + * + * + *
+       * Type information for video data.
+       * 
+ * + * .google.cloud.visionai.v1.IngestAssetRequest.Config.VideoType video_type = 2; + */ + public Builder setVideoType( + com.google.cloud.visionai.v1.IngestAssetRequest.Config.VideoType value) { + if (videoTypeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + dataType_ = value; + onChanged(); + } else { + videoTypeBuilder_.setMessage(value); + } + dataTypeCase_ = 2; + return this; + } + /** + * + * + *
+       * Type information for video data.
+       * 
+ * + * .google.cloud.visionai.v1.IngestAssetRequest.Config.VideoType video_type = 2; + */ + public Builder setVideoType( + com.google.cloud.visionai.v1.IngestAssetRequest.Config.VideoType.Builder + builderForValue) { + if (videoTypeBuilder_ == null) { + dataType_ = builderForValue.build(); + onChanged(); + } else { + videoTypeBuilder_.setMessage(builderForValue.build()); + } + dataTypeCase_ = 2; + return this; + } + /** + * + * + *
+       * Type information for video data.
+       * 
+ * + * .google.cloud.visionai.v1.IngestAssetRequest.Config.VideoType video_type = 2; + */ + public Builder mergeVideoType( + com.google.cloud.visionai.v1.IngestAssetRequest.Config.VideoType value) { + if (videoTypeBuilder_ == null) { + if (dataTypeCase_ == 2 + && dataType_ + != com.google.cloud.visionai.v1.IngestAssetRequest.Config.VideoType + .getDefaultInstance()) { + dataType_ = + com.google.cloud.visionai.v1.IngestAssetRequest.Config.VideoType.newBuilder( + (com.google.cloud.visionai.v1.IngestAssetRequest.Config.VideoType) + dataType_) + .mergeFrom(value) + .buildPartial(); + } else { + dataType_ = value; + } + onChanged(); + } else { + if (dataTypeCase_ == 2) { + videoTypeBuilder_.mergeFrom(value); + } else { + videoTypeBuilder_.setMessage(value); + } + } + dataTypeCase_ = 2; + return this; + } + /** + * + * + *
+       * Type information for video data.
+       * 
+ * + * .google.cloud.visionai.v1.IngestAssetRequest.Config.VideoType video_type = 2; + */ + public Builder clearVideoType() { + if (videoTypeBuilder_ == null) { + if (dataTypeCase_ == 2) { + dataTypeCase_ = 0; + dataType_ = null; + onChanged(); + } + } else { + if (dataTypeCase_ == 2) { + dataTypeCase_ = 0; + dataType_ = null; + } + videoTypeBuilder_.clear(); + } + return this; + } + /** + * + * + *
+       * Type information for video data.
+       * 
+ * + * .google.cloud.visionai.v1.IngestAssetRequest.Config.VideoType video_type = 2; + */ + public com.google.cloud.visionai.v1.IngestAssetRequest.Config.VideoType.Builder + getVideoTypeBuilder() { + return getVideoTypeFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Type information for video data.
+       * 
+ * + * .google.cloud.visionai.v1.IngestAssetRequest.Config.VideoType video_type = 2; + */ + @java.lang.Override + public com.google.cloud.visionai.v1.IngestAssetRequest.Config.VideoTypeOrBuilder + getVideoTypeOrBuilder() { + if ((dataTypeCase_ == 2) && (videoTypeBuilder_ != null)) { + return videoTypeBuilder_.getMessageOrBuilder(); + } else { + if (dataTypeCase_ == 2) { + return (com.google.cloud.visionai.v1.IngestAssetRequest.Config.VideoType) dataType_; + } + return com.google.cloud.visionai.v1.IngestAssetRequest.Config.VideoType + .getDefaultInstance(); + } + } + /** + * + * + *
+       * Type information for video data.
+       * 
+ * + * .google.cloud.visionai.v1.IngestAssetRequest.Config.VideoType video_type = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.IngestAssetRequest.Config.VideoType, + com.google.cloud.visionai.v1.IngestAssetRequest.Config.VideoType.Builder, + com.google.cloud.visionai.v1.IngestAssetRequest.Config.VideoTypeOrBuilder> + getVideoTypeFieldBuilder() { + if (videoTypeBuilder_ == null) { + if (!(dataTypeCase_ == 2)) { + dataType_ = + com.google.cloud.visionai.v1.IngestAssetRequest.Config.VideoType + .getDefaultInstance(); + } + videoTypeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.IngestAssetRequest.Config.VideoType, + com.google.cloud.visionai.v1.IngestAssetRequest.Config.VideoType.Builder, + com.google.cloud.visionai.v1.IngestAssetRequest.Config.VideoTypeOrBuilder>( + (com.google.cloud.visionai.v1.IngestAssetRequest.Config.VideoType) dataType_, + getParentForChildren(), + isClean()); + dataType_ = null; + } + dataTypeCase_ = 2; + onChanged(); + return videoTypeBuilder_; + } + + private java.lang.Object asset_ = ""; + /** + * + * + *
+       * Required. The resource name of the asset that the ingested data belongs
+       * to.
+       * 
+ * + * + * string asset = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The asset. + */ + public java.lang.String getAsset() { + java.lang.Object ref = asset_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + asset_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * Required. The resource name of the asset that the ingested data belongs
+       * to.
+       * 
+ * + * + * string asset = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for asset. + */ + public com.google.protobuf.ByteString getAssetBytes() { + java.lang.Object ref = asset_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + asset_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * Required. The resource name of the asset that the ingested data belongs
+       * to.
+       * 
+ * + * + * string asset = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The asset to set. + * @return This builder for chaining. + */ + public Builder setAsset(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + asset_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * Required. The resource name of the asset that the ingested data belongs
+       * to.
+       * 
+ * + * + * string asset = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearAsset() { + asset_ = getDefaultInstance().getAsset(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+       * Required. The resource name of the asset that the ingested data belongs
+       * to.
+       * 
+ * + * + * string asset = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for asset to set. + * @return This builder for chaining. + */ + public Builder setAssetBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + asset_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.IngestAssetRequest.Config) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.IngestAssetRequest.Config) + private static final com.google.cloud.visionai.v1.IngestAssetRequest.Config DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.IngestAssetRequest.Config(); + } + + public static com.google.cloud.visionai.v1.IngestAssetRequest.Config getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Config parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.IngestAssetRequest.Config getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface TimeIndexedDataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.IngestAssetRequest.TimeIndexedData) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Data to be ingested.
+     * 
+ * + * bytes data = 1; + * + * @return The data. + */ + com.google.protobuf.ByteString getData(); + + /** + * + * + *
+     * Time range of the data.
+     * 
+ * + * .google.cloud.visionai.v1.Partition.TemporalPartition temporal_partition = 2; + * + * @return Whether the temporalPartition field is set. + */ + boolean hasTemporalPartition(); + /** + * + * + *
+     * Time range of the data.
+     * 
+ * + * .google.cloud.visionai.v1.Partition.TemporalPartition temporal_partition = 2; + * + * @return The temporalPartition. + */ + com.google.cloud.visionai.v1.Partition.TemporalPartition getTemporalPartition(); + /** + * + * + *
+     * Time range of the data.
+     * 
+ * + * .google.cloud.visionai.v1.Partition.TemporalPartition temporal_partition = 2; + */ + com.google.cloud.visionai.v1.Partition.TemporalPartitionOrBuilder + getTemporalPartitionOrBuilder(); + } + /** + * + * + *
+   * Contains the data and the corresponding time range this data is for.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.IngestAssetRequest.TimeIndexedData} + */ + public static final class TimeIndexedData extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.IngestAssetRequest.TimeIndexedData) + TimeIndexedDataOrBuilder { + private static final long serialVersionUID = 0L; + // Use TimeIndexedData.newBuilder() to construct. + private TimeIndexedData(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private TimeIndexedData() { + data_ = com.google.protobuf.ByteString.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new TimeIndexedData(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_IngestAssetRequest_TimeIndexedData_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_IngestAssetRequest_TimeIndexedData_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.IngestAssetRequest.TimeIndexedData.class, + com.google.cloud.visionai.v1.IngestAssetRequest.TimeIndexedData.Builder.class); + } + + private int bitField0_; + public static final int DATA_FIELD_NUMBER = 1; + private com.google.protobuf.ByteString data_ = com.google.protobuf.ByteString.EMPTY; + /** + * + * + *
+     * Data to be ingested.
+     * 
+ * + * bytes data = 1; + * + * @return The data. + */ + @java.lang.Override + public com.google.protobuf.ByteString getData() { + return data_; + } + + public static final int TEMPORAL_PARTITION_FIELD_NUMBER = 2; + private com.google.cloud.visionai.v1.Partition.TemporalPartition temporalPartition_; + /** + * + * + *
+     * Time range of the data.
+     * 
+ * + * .google.cloud.visionai.v1.Partition.TemporalPartition temporal_partition = 2; + * + * @return Whether the temporalPartition field is set. + */ + @java.lang.Override + public boolean hasTemporalPartition() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * Time range of the data.
+     * 
+ * + * .google.cloud.visionai.v1.Partition.TemporalPartition temporal_partition = 2; + * + * @return The temporalPartition. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.Partition.TemporalPartition getTemporalPartition() { + return temporalPartition_ == null + ? com.google.cloud.visionai.v1.Partition.TemporalPartition.getDefaultInstance() + : temporalPartition_; + } + /** + * + * + *
+     * Time range of the data.
+     * 
+ * + * .google.cloud.visionai.v1.Partition.TemporalPartition temporal_partition = 2; + */ + @java.lang.Override + public com.google.cloud.visionai.v1.Partition.TemporalPartitionOrBuilder + getTemporalPartitionOrBuilder() { + return temporalPartition_ == null + ? com.google.cloud.visionai.v1.Partition.TemporalPartition.getDefaultInstance() + : temporalPartition_; + } + + 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 (!data_.isEmpty()) { + output.writeBytes(1, data_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getTemporalPartition()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!data_.isEmpty()) { + size += com.google.protobuf.CodedOutputStream.computeBytesSize(1, data_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getTemporalPartition()); + } + size += getUnknownFields().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.visionai.v1.IngestAssetRequest.TimeIndexedData)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.IngestAssetRequest.TimeIndexedData other = + (com.google.cloud.visionai.v1.IngestAssetRequest.TimeIndexedData) obj; + + if (!getData().equals(other.getData())) return false; + if (hasTemporalPartition() != other.hasTemporalPartition()) return false; + if (hasTemporalPartition()) { + if (!getTemporalPartition().equals(other.getTemporalPartition())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + DATA_FIELD_NUMBER; + hash = (53 * hash) + getData().hashCode(); + if (hasTemporalPartition()) { + hash = (37 * hash) + TEMPORAL_PARTITION_FIELD_NUMBER; + hash = (53 * hash) + getTemporalPartition().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.IngestAssetRequest.TimeIndexedData parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.IngestAssetRequest.TimeIndexedData 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.visionai.v1.IngestAssetRequest.TimeIndexedData parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.IngestAssetRequest.TimeIndexedData 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.visionai.v1.IngestAssetRequest.TimeIndexedData parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.IngestAssetRequest.TimeIndexedData parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.IngestAssetRequest.TimeIndexedData parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.IngestAssetRequest.TimeIndexedData 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.visionai.v1.IngestAssetRequest.TimeIndexedData + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.IngestAssetRequest.TimeIndexedData + 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.visionai.v1.IngestAssetRequest.TimeIndexedData parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.IngestAssetRequest.TimeIndexedData 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.visionai.v1.IngestAssetRequest.TimeIndexedData 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; + } + /** + * + * + *
+     * Contains the data and the corresponding time range this data is for.
+     * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.IngestAssetRequest.TimeIndexedData} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.IngestAssetRequest.TimeIndexedData) + com.google.cloud.visionai.v1.IngestAssetRequest.TimeIndexedDataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_IngestAssetRequest_TimeIndexedData_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_IngestAssetRequest_TimeIndexedData_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.IngestAssetRequest.TimeIndexedData.class, + com.google.cloud.visionai.v1.IngestAssetRequest.TimeIndexedData.Builder.class); + } + + // Construct using + // com.google.cloud.visionai.v1.IngestAssetRequest.TimeIndexedData.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getTemporalPartitionFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + data_ = com.google.protobuf.ByteString.EMPTY; + temporalPartition_ = null; + if (temporalPartitionBuilder_ != null) { + temporalPartitionBuilder_.dispose(); + temporalPartitionBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_IngestAssetRequest_TimeIndexedData_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.IngestAssetRequest.TimeIndexedData + getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.IngestAssetRequest.TimeIndexedData.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.IngestAssetRequest.TimeIndexedData build() { + com.google.cloud.visionai.v1.IngestAssetRequest.TimeIndexedData result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.IngestAssetRequest.TimeIndexedData buildPartial() { + com.google.cloud.visionai.v1.IngestAssetRequest.TimeIndexedData result = + new com.google.cloud.visionai.v1.IngestAssetRequest.TimeIndexedData(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.visionai.v1.IngestAssetRequest.TimeIndexedData result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.data_ = data_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.temporalPartition_ = + temporalPartitionBuilder_ == null + ? temporalPartition_ + : temporalPartitionBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.IngestAssetRequest.TimeIndexedData) { + return mergeFrom((com.google.cloud.visionai.v1.IngestAssetRequest.TimeIndexedData) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.visionai.v1.IngestAssetRequest.TimeIndexedData other) { + if (other + == com.google.cloud.visionai.v1.IngestAssetRequest.TimeIndexedData.getDefaultInstance()) + return this; + if (other.getData() != com.google.protobuf.ByteString.EMPTY) { + setData(other.getData()); + } + if (other.hasTemporalPartition()) { + mergeTemporalPartition(other.getTemporalPartition()); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + data_ = input.readBytes(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage( + getTemporalPartitionFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.protobuf.ByteString data_ = com.google.protobuf.ByteString.EMPTY; + /** + * + * + *
+       * Data to be ingested.
+       * 
+ * + * bytes data = 1; + * + * @return The data. + */ + @java.lang.Override + public com.google.protobuf.ByteString getData() { + return data_; + } + /** + * + * + *
+       * Data to be ingested.
+       * 
+ * + * bytes data = 1; + * + * @param value The data to set. + * @return This builder for chaining. + */ + public Builder setData(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + data_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * Data to be ingested.
+       * 
+ * + * bytes data = 1; + * + * @return This builder for chaining. + */ + public Builder clearData() { + bitField0_ = (bitField0_ & ~0x00000001); + data_ = getDefaultInstance().getData(); + onChanged(); + return this; + } + + private com.google.cloud.visionai.v1.Partition.TemporalPartition temporalPartition_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.Partition.TemporalPartition, + com.google.cloud.visionai.v1.Partition.TemporalPartition.Builder, + com.google.cloud.visionai.v1.Partition.TemporalPartitionOrBuilder> + temporalPartitionBuilder_; + /** + * + * + *
+       * Time range of the data.
+       * 
+ * + * .google.cloud.visionai.v1.Partition.TemporalPartition temporal_partition = 2; + * + * @return Whether the temporalPartition field is set. + */ + public boolean hasTemporalPartition() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+       * Time range of the data.
+       * 
+ * + * .google.cloud.visionai.v1.Partition.TemporalPartition temporal_partition = 2; + * + * @return The temporalPartition. + */ + public com.google.cloud.visionai.v1.Partition.TemporalPartition getTemporalPartition() { + if (temporalPartitionBuilder_ == null) { + return temporalPartition_ == null + ? com.google.cloud.visionai.v1.Partition.TemporalPartition.getDefaultInstance() + : temporalPartition_; + } else { + return temporalPartitionBuilder_.getMessage(); + } + } + /** + * + * + *
+       * Time range of the data.
+       * 
+ * + * .google.cloud.visionai.v1.Partition.TemporalPartition temporal_partition = 2; + */ + public Builder setTemporalPartition( + com.google.cloud.visionai.v1.Partition.TemporalPartition value) { + if (temporalPartitionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + temporalPartition_ = value; + } else { + temporalPartitionBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * Time range of the data.
+       * 
+ * + * .google.cloud.visionai.v1.Partition.TemporalPartition temporal_partition = 2; + */ + public Builder setTemporalPartition( + com.google.cloud.visionai.v1.Partition.TemporalPartition.Builder builderForValue) { + if (temporalPartitionBuilder_ == null) { + temporalPartition_ = builderForValue.build(); + } else { + temporalPartitionBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * Time range of the data.
+       * 
+ * + * .google.cloud.visionai.v1.Partition.TemporalPartition temporal_partition = 2; + */ + public Builder mergeTemporalPartition( + com.google.cloud.visionai.v1.Partition.TemporalPartition value) { + if (temporalPartitionBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && temporalPartition_ != null + && temporalPartition_ + != com.google.cloud.visionai.v1.Partition.TemporalPartition + .getDefaultInstance()) { + getTemporalPartitionBuilder().mergeFrom(value); + } else { + temporalPartition_ = value; + } + } else { + temporalPartitionBuilder_.mergeFrom(value); + } + if (temporalPartition_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + /** + * + * + *
+       * Time range of the data.
+       * 
+ * + * .google.cloud.visionai.v1.Partition.TemporalPartition temporal_partition = 2; + */ + public Builder clearTemporalPartition() { + bitField0_ = (bitField0_ & ~0x00000002); + temporalPartition_ = null; + if (temporalPartitionBuilder_ != null) { + temporalPartitionBuilder_.dispose(); + temporalPartitionBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+       * Time range of the data.
+       * 
+ * + * .google.cloud.visionai.v1.Partition.TemporalPartition temporal_partition = 2; + */ + public com.google.cloud.visionai.v1.Partition.TemporalPartition.Builder + getTemporalPartitionBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getTemporalPartitionFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Time range of the data.
+       * 
+ * + * .google.cloud.visionai.v1.Partition.TemporalPartition temporal_partition = 2; + */ + public com.google.cloud.visionai.v1.Partition.TemporalPartitionOrBuilder + getTemporalPartitionOrBuilder() { + if (temporalPartitionBuilder_ != null) { + return temporalPartitionBuilder_.getMessageOrBuilder(); + } else { + return temporalPartition_ == null + ? com.google.cloud.visionai.v1.Partition.TemporalPartition.getDefaultInstance() + : temporalPartition_; + } + } + /** + * + * + *
+       * Time range of the data.
+       * 
+ * + * .google.cloud.visionai.v1.Partition.TemporalPartition temporal_partition = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.Partition.TemporalPartition, + com.google.cloud.visionai.v1.Partition.TemporalPartition.Builder, + com.google.cloud.visionai.v1.Partition.TemporalPartitionOrBuilder> + getTemporalPartitionFieldBuilder() { + if (temporalPartitionBuilder_ == null) { + temporalPartitionBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.Partition.TemporalPartition, + com.google.cloud.visionai.v1.Partition.TemporalPartition.Builder, + com.google.cloud.visionai.v1.Partition.TemporalPartitionOrBuilder>( + getTemporalPartition(), getParentForChildren(), isClean()); + temporalPartition_ = null; + } + return temporalPartitionBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.IngestAssetRequest.TimeIndexedData) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.IngestAssetRequest.TimeIndexedData) + private static final com.google.cloud.visionai.v1.IngestAssetRequest.TimeIndexedData + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.IngestAssetRequest.TimeIndexedData(); + } + + public static com.google.cloud.visionai.v1.IngestAssetRequest.TimeIndexedData + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public TimeIndexedData parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.IngestAssetRequest.TimeIndexedData + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int streamingRequestCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object streamingRequest_; + + public enum StreamingRequestCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + CONFIG(1), + TIME_INDEXED_DATA(2), + STREAMINGREQUEST_NOT_SET(0); + private final int value; + + private StreamingRequestCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @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 CONFIG; + case 2: + return TIME_INDEXED_DATA; + 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 CONFIG_FIELD_NUMBER = 1; + /** + * + * + *
+   * Provides information for the data and the asset resource name that the
+   * data belongs to. The first `IngestAssetRequest` message must only contain
+   * a `Config` message.
+   * 
+ * + * .google.cloud.visionai.v1.IngestAssetRequest.Config config = 1; + * + * @return Whether the config field is set. + */ + @java.lang.Override + public boolean hasConfig() { + return streamingRequestCase_ == 1; + } + /** + * + * + *
+   * Provides information for the data and the asset resource name that the
+   * data belongs to. The first `IngestAssetRequest` message must only contain
+   * a `Config` message.
+   * 
+ * + * .google.cloud.visionai.v1.IngestAssetRequest.Config config = 1; + * + * @return The config. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.IngestAssetRequest.Config getConfig() { + if (streamingRequestCase_ == 1) { + return (com.google.cloud.visionai.v1.IngestAssetRequest.Config) streamingRequest_; + } + return com.google.cloud.visionai.v1.IngestAssetRequest.Config.getDefaultInstance(); + } + /** + * + * + *
+   * Provides information for the data and the asset resource name that the
+   * data belongs to. The first `IngestAssetRequest` message must only contain
+   * a `Config` message.
+   * 
+ * + * .google.cloud.visionai.v1.IngestAssetRequest.Config config = 1; + */ + @java.lang.Override + public com.google.cloud.visionai.v1.IngestAssetRequest.ConfigOrBuilder getConfigOrBuilder() { + if (streamingRequestCase_ == 1) { + return (com.google.cloud.visionai.v1.IngestAssetRequest.Config) streamingRequest_; + } + return com.google.cloud.visionai.v1.IngestAssetRequest.Config.getDefaultInstance(); + } + + public static final int TIME_INDEXED_DATA_FIELD_NUMBER = 2; + /** + * + * + *
+   * Data to be ingested.
+   * 
+ * + * .google.cloud.visionai.v1.IngestAssetRequest.TimeIndexedData time_indexed_data = 2; + * + * + * @return Whether the timeIndexedData field is set. + */ + @java.lang.Override + public boolean hasTimeIndexedData() { + return streamingRequestCase_ == 2; + } + /** + * + * + *
+   * Data to be ingested.
+   * 
+ * + * .google.cloud.visionai.v1.IngestAssetRequest.TimeIndexedData time_indexed_data = 2; + * + * + * @return The timeIndexedData. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.IngestAssetRequest.TimeIndexedData getTimeIndexedData() { + if (streamingRequestCase_ == 2) { + return (com.google.cloud.visionai.v1.IngestAssetRequest.TimeIndexedData) streamingRequest_; + } + return com.google.cloud.visionai.v1.IngestAssetRequest.TimeIndexedData.getDefaultInstance(); + } + /** + * + * + *
+   * Data to be ingested.
+   * 
+ * + * .google.cloud.visionai.v1.IngestAssetRequest.TimeIndexedData time_indexed_data = 2; + * + */ + @java.lang.Override + public com.google.cloud.visionai.v1.IngestAssetRequest.TimeIndexedDataOrBuilder + getTimeIndexedDataOrBuilder() { + if (streamingRequestCase_ == 2) { + return (com.google.cloud.visionai.v1.IngestAssetRequest.TimeIndexedData) streamingRequest_; + } + return com.google.cloud.visionai.v1.IngestAssetRequest.TimeIndexedData.getDefaultInstance(); + } + + 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.visionai.v1.IngestAssetRequest.Config) streamingRequest_); + } + if (streamingRequestCase_ == 2) { + output.writeMessage( + 2, (com.google.cloud.visionai.v1.IngestAssetRequest.TimeIndexedData) streamingRequest_); + } + getUnknownFields().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.visionai.v1.IngestAssetRequest.Config) streamingRequest_); + } + if (streamingRequestCase_ == 2) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 2, + (com.google.cloud.visionai.v1.IngestAssetRequest.TimeIndexedData) streamingRequest_); + } + size += getUnknownFields().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.visionai.v1.IngestAssetRequest)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.IngestAssetRequest other = + (com.google.cloud.visionai.v1.IngestAssetRequest) obj; + + if (!getStreamingRequestCase().equals(other.getStreamingRequestCase())) return false; + switch (streamingRequestCase_) { + case 1: + if (!getConfig().equals(other.getConfig())) return false; + break; + case 2: + if (!getTimeIndexedData().equals(other.getTimeIndexedData())) return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @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) + CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getConfig().hashCode(); + break; + case 2: + hash = (37 * hash) + TIME_INDEXED_DATA_FIELD_NUMBER; + hash = (53 * hash) + getTimeIndexedData().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.IngestAssetRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.IngestAssetRequest 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.visionai.v1.IngestAssetRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.IngestAssetRequest 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.visionai.v1.IngestAssetRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.IngestAssetRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.IngestAssetRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.IngestAssetRequest 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.visionai.v1.IngestAssetRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.IngestAssetRequest 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.visionai.v1.IngestAssetRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.IngestAssetRequest 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.visionai.v1.IngestAssetRequest 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; + } + /** + * + * + *
+   * Request message for IngestAsset API.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.IngestAssetRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.IngestAssetRequest) + com.google.cloud.visionai.v1.IngestAssetRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_IngestAssetRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_IngestAssetRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.IngestAssetRequest.class, + com.google.cloud.visionai.v1.IngestAssetRequest.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.IngestAssetRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (configBuilder_ != null) { + configBuilder_.clear(); + } + if (timeIndexedDataBuilder_ != null) { + timeIndexedDataBuilder_.clear(); + } + streamingRequestCase_ = 0; + streamingRequest_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_IngestAssetRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.IngestAssetRequest getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.IngestAssetRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.IngestAssetRequest build() { + com.google.cloud.visionai.v1.IngestAssetRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.IngestAssetRequest buildPartial() { + com.google.cloud.visionai.v1.IngestAssetRequest result = + new com.google.cloud.visionai.v1.IngestAssetRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.visionai.v1.IngestAssetRequest result) { + int from_bitField0_ = bitField0_; + } + + private void buildPartialOneofs(com.google.cloud.visionai.v1.IngestAssetRequest result) { + result.streamingRequestCase_ = streamingRequestCase_; + result.streamingRequest_ = this.streamingRequest_; + if (streamingRequestCase_ == 1 && configBuilder_ != null) { + result.streamingRequest_ = configBuilder_.build(); + } + if (streamingRequestCase_ == 2 && timeIndexedDataBuilder_ != null) { + result.streamingRequest_ = timeIndexedDataBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.IngestAssetRequest) { + return mergeFrom((com.google.cloud.visionai.v1.IngestAssetRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.IngestAssetRequest other) { + if (other == com.google.cloud.visionai.v1.IngestAssetRequest.getDefaultInstance()) + return this; + switch (other.getStreamingRequestCase()) { + case CONFIG: + { + mergeConfig(other.getConfig()); + break; + } + case TIME_INDEXED_DATA: + { + mergeTimeIndexedData(other.getTimeIndexedData()); + break; + } + case STREAMINGREQUEST_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getConfigFieldBuilder().getBuilder(), extensionRegistry); + streamingRequestCase_ = 1; + break; + } // case 10 + case 18: + { + input.readMessage(getTimeIndexedDataFieldBuilder().getBuilder(), extensionRegistry); + streamingRequestCase_ = 2; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + 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 int bitField0_; + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.IngestAssetRequest.Config, + com.google.cloud.visionai.v1.IngestAssetRequest.Config.Builder, + com.google.cloud.visionai.v1.IngestAssetRequest.ConfigOrBuilder> + configBuilder_; + /** + * + * + *
+     * Provides information for the data and the asset resource name that the
+     * data belongs to. The first `IngestAssetRequest` message must only contain
+     * a `Config` message.
+     * 
+ * + * .google.cloud.visionai.v1.IngestAssetRequest.Config config = 1; + * + * @return Whether the config field is set. + */ + @java.lang.Override + public boolean hasConfig() { + return streamingRequestCase_ == 1; + } + /** + * + * + *
+     * Provides information for the data and the asset resource name that the
+     * data belongs to. The first `IngestAssetRequest` message must only contain
+     * a `Config` message.
+     * 
+ * + * .google.cloud.visionai.v1.IngestAssetRequest.Config config = 1; + * + * @return The config. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.IngestAssetRequest.Config getConfig() { + if (configBuilder_ == null) { + if (streamingRequestCase_ == 1) { + return (com.google.cloud.visionai.v1.IngestAssetRequest.Config) streamingRequest_; + } + return com.google.cloud.visionai.v1.IngestAssetRequest.Config.getDefaultInstance(); + } else { + if (streamingRequestCase_ == 1) { + return configBuilder_.getMessage(); + } + return com.google.cloud.visionai.v1.IngestAssetRequest.Config.getDefaultInstance(); + } + } + /** + * + * + *
+     * Provides information for the data and the asset resource name that the
+     * data belongs to. The first `IngestAssetRequest` message must only contain
+     * a `Config` message.
+     * 
+ * + * .google.cloud.visionai.v1.IngestAssetRequest.Config config = 1; + */ + public Builder setConfig(com.google.cloud.visionai.v1.IngestAssetRequest.Config value) { + if (configBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + streamingRequest_ = value; + onChanged(); + } else { + configBuilder_.setMessage(value); + } + streamingRequestCase_ = 1; + return this; + } + /** + * + * + *
+     * Provides information for the data and the asset resource name that the
+     * data belongs to. The first `IngestAssetRequest` message must only contain
+     * a `Config` message.
+     * 
+ * + * .google.cloud.visionai.v1.IngestAssetRequest.Config config = 1; + */ + public Builder setConfig( + com.google.cloud.visionai.v1.IngestAssetRequest.Config.Builder builderForValue) { + if (configBuilder_ == null) { + streamingRequest_ = builderForValue.build(); + onChanged(); + } else { + configBuilder_.setMessage(builderForValue.build()); + } + streamingRequestCase_ = 1; + return this; + } + /** + * + * + *
+     * Provides information for the data and the asset resource name that the
+     * data belongs to. The first `IngestAssetRequest` message must only contain
+     * a `Config` message.
+     * 
+ * + * .google.cloud.visionai.v1.IngestAssetRequest.Config config = 1; + */ + public Builder mergeConfig(com.google.cloud.visionai.v1.IngestAssetRequest.Config value) { + if (configBuilder_ == null) { + if (streamingRequestCase_ == 1 + && streamingRequest_ + != com.google.cloud.visionai.v1.IngestAssetRequest.Config.getDefaultInstance()) { + streamingRequest_ = + com.google.cloud.visionai.v1.IngestAssetRequest.Config.newBuilder( + (com.google.cloud.visionai.v1.IngestAssetRequest.Config) streamingRequest_) + .mergeFrom(value) + .buildPartial(); + } else { + streamingRequest_ = value; + } + onChanged(); + } else { + if (streamingRequestCase_ == 1) { + configBuilder_.mergeFrom(value); + } else { + configBuilder_.setMessage(value); + } + } + streamingRequestCase_ = 1; + return this; + } + /** + * + * + *
+     * Provides information for the data and the asset resource name that the
+     * data belongs to. The first `IngestAssetRequest` message must only contain
+     * a `Config` message.
+     * 
+ * + * .google.cloud.visionai.v1.IngestAssetRequest.Config config = 1; + */ + public Builder clearConfig() { + if (configBuilder_ == null) { + if (streamingRequestCase_ == 1) { + streamingRequestCase_ = 0; + streamingRequest_ = null; + onChanged(); + } + } else { + if (streamingRequestCase_ == 1) { + streamingRequestCase_ = 0; + streamingRequest_ = null; + } + configBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Provides information for the data and the asset resource name that the
+     * data belongs to. The first `IngestAssetRequest` message must only contain
+     * a `Config` message.
+     * 
+ * + * .google.cloud.visionai.v1.IngestAssetRequest.Config config = 1; + */ + public com.google.cloud.visionai.v1.IngestAssetRequest.Config.Builder getConfigBuilder() { + return getConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Provides information for the data and the asset resource name that the
+     * data belongs to. The first `IngestAssetRequest` message must only contain
+     * a `Config` message.
+     * 
+ * + * .google.cloud.visionai.v1.IngestAssetRequest.Config config = 1; + */ + @java.lang.Override + public com.google.cloud.visionai.v1.IngestAssetRequest.ConfigOrBuilder getConfigOrBuilder() { + if ((streamingRequestCase_ == 1) && (configBuilder_ != null)) { + return configBuilder_.getMessageOrBuilder(); + } else { + if (streamingRequestCase_ == 1) { + return (com.google.cloud.visionai.v1.IngestAssetRequest.Config) streamingRequest_; + } + return com.google.cloud.visionai.v1.IngestAssetRequest.Config.getDefaultInstance(); + } + } + /** + * + * + *
+     * Provides information for the data and the asset resource name that the
+     * data belongs to. The first `IngestAssetRequest` message must only contain
+     * a `Config` message.
+     * 
+ * + * .google.cloud.visionai.v1.IngestAssetRequest.Config config = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.IngestAssetRequest.Config, + com.google.cloud.visionai.v1.IngestAssetRequest.Config.Builder, + com.google.cloud.visionai.v1.IngestAssetRequest.ConfigOrBuilder> + getConfigFieldBuilder() { + if (configBuilder_ == null) { + if (!(streamingRequestCase_ == 1)) { + streamingRequest_ = + com.google.cloud.visionai.v1.IngestAssetRequest.Config.getDefaultInstance(); + } + configBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.IngestAssetRequest.Config, + com.google.cloud.visionai.v1.IngestAssetRequest.Config.Builder, + com.google.cloud.visionai.v1.IngestAssetRequest.ConfigOrBuilder>( + (com.google.cloud.visionai.v1.IngestAssetRequest.Config) streamingRequest_, + getParentForChildren(), + isClean()); + streamingRequest_ = null; + } + streamingRequestCase_ = 1; + onChanged(); + return configBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.IngestAssetRequest.TimeIndexedData, + com.google.cloud.visionai.v1.IngestAssetRequest.TimeIndexedData.Builder, + com.google.cloud.visionai.v1.IngestAssetRequest.TimeIndexedDataOrBuilder> + timeIndexedDataBuilder_; + /** + * + * + *
+     * Data to be ingested.
+     * 
+ * + * .google.cloud.visionai.v1.IngestAssetRequest.TimeIndexedData time_indexed_data = 2; + * + * + * @return Whether the timeIndexedData field is set. + */ + @java.lang.Override + public boolean hasTimeIndexedData() { + return streamingRequestCase_ == 2; + } + /** + * + * + *
+     * Data to be ingested.
+     * 
+ * + * .google.cloud.visionai.v1.IngestAssetRequest.TimeIndexedData time_indexed_data = 2; + * + * + * @return The timeIndexedData. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.IngestAssetRequest.TimeIndexedData getTimeIndexedData() { + if (timeIndexedDataBuilder_ == null) { + if (streamingRequestCase_ == 2) { + return (com.google.cloud.visionai.v1.IngestAssetRequest.TimeIndexedData) + streamingRequest_; + } + return com.google.cloud.visionai.v1.IngestAssetRequest.TimeIndexedData.getDefaultInstance(); + } else { + if (streamingRequestCase_ == 2) { + return timeIndexedDataBuilder_.getMessage(); + } + return com.google.cloud.visionai.v1.IngestAssetRequest.TimeIndexedData.getDefaultInstance(); + } + } + /** + * + * + *
+     * Data to be ingested.
+     * 
+ * + * .google.cloud.visionai.v1.IngestAssetRequest.TimeIndexedData time_indexed_data = 2; + * + */ + public Builder setTimeIndexedData( + com.google.cloud.visionai.v1.IngestAssetRequest.TimeIndexedData value) { + if (timeIndexedDataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + streamingRequest_ = value; + onChanged(); + } else { + timeIndexedDataBuilder_.setMessage(value); + } + streamingRequestCase_ = 2; + return this; + } + /** + * + * + *
+     * Data to be ingested.
+     * 
+ * + * .google.cloud.visionai.v1.IngestAssetRequest.TimeIndexedData time_indexed_data = 2; + * + */ + public Builder setTimeIndexedData( + com.google.cloud.visionai.v1.IngestAssetRequest.TimeIndexedData.Builder builderForValue) { + if (timeIndexedDataBuilder_ == null) { + streamingRequest_ = builderForValue.build(); + onChanged(); + } else { + timeIndexedDataBuilder_.setMessage(builderForValue.build()); + } + streamingRequestCase_ = 2; + return this; + } + /** + * + * + *
+     * Data to be ingested.
+     * 
+ * + * .google.cloud.visionai.v1.IngestAssetRequest.TimeIndexedData time_indexed_data = 2; + * + */ + public Builder mergeTimeIndexedData( + com.google.cloud.visionai.v1.IngestAssetRequest.TimeIndexedData value) { + if (timeIndexedDataBuilder_ == null) { + if (streamingRequestCase_ == 2 + && streamingRequest_ + != com.google.cloud.visionai.v1.IngestAssetRequest.TimeIndexedData + .getDefaultInstance()) { + streamingRequest_ = + com.google.cloud.visionai.v1.IngestAssetRequest.TimeIndexedData.newBuilder( + (com.google.cloud.visionai.v1.IngestAssetRequest.TimeIndexedData) + streamingRequest_) + .mergeFrom(value) + .buildPartial(); + } else { + streamingRequest_ = value; + } + onChanged(); + } else { + if (streamingRequestCase_ == 2) { + timeIndexedDataBuilder_.mergeFrom(value); + } else { + timeIndexedDataBuilder_.setMessage(value); + } + } + streamingRequestCase_ = 2; + return this; + } + /** + * + * + *
+     * Data to be ingested.
+     * 
+ * + * .google.cloud.visionai.v1.IngestAssetRequest.TimeIndexedData time_indexed_data = 2; + * + */ + public Builder clearTimeIndexedData() { + if (timeIndexedDataBuilder_ == null) { + if (streamingRequestCase_ == 2) { + streamingRequestCase_ = 0; + streamingRequest_ = null; + onChanged(); + } + } else { + if (streamingRequestCase_ == 2) { + streamingRequestCase_ = 0; + streamingRequest_ = null; + } + timeIndexedDataBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Data to be ingested.
+     * 
+ * + * .google.cloud.visionai.v1.IngestAssetRequest.TimeIndexedData time_indexed_data = 2; + * + */ + public com.google.cloud.visionai.v1.IngestAssetRequest.TimeIndexedData.Builder + getTimeIndexedDataBuilder() { + return getTimeIndexedDataFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Data to be ingested.
+     * 
+ * + * .google.cloud.visionai.v1.IngestAssetRequest.TimeIndexedData time_indexed_data = 2; + * + */ + @java.lang.Override + public com.google.cloud.visionai.v1.IngestAssetRequest.TimeIndexedDataOrBuilder + getTimeIndexedDataOrBuilder() { + if ((streamingRequestCase_ == 2) && (timeIndexedDataBuilder_ != null)) { + return timeIndexedDataBuilder_.getMessageOrBuilder(); + } else { + if (streamingRequestCase_ == 2) { + return (com.google.cloud.visionai.v1.IngestAssetRequest.TimeIndexedData) + streamingRequest_; + } + return com.google.cloud.visionai.v1.IngestAssetRequest.TimeIndexedData.getDefaultInstance(); + } + } + /** + * + * + *
+     * Data to be ingested.
+     * 
+ * + * .google.cloud.visionai.v1.IngestAssetRequest.TimeIndexedData time_indexed_data = 2; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.IngestAssetRequest.TimeIndexedData, + com.google.cloud.visionai.v1.IngestAssetRequest.TimeIndexedData.Builder, + com.google.cloud.visionai.v1.IngestAssetRequest.TimeIndexedDataOrBuilder> + getTimeIndexedDataFieldBuilder() { + if (timeIndexedDataBuilder_ == null) { + if (!(streamingRequestCase_ == 2)) { + streamingRequest_ = + com.google.cloud.visionai.v1.IngestAssetRequest.TimeIndexedData.getDefaultInstance(); + } + timeIndexedDataBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.IngestAssetRequest.TimeIndexedData, + com.google.cloud.visionai.v1.IngestAssetRequest.TimeIndexedData.Builder, + com.google.cloud.visionai.v1.IngestAssetRequest.TimeIndexedDataOrBuilder>( + (com.google.cloud.visionai.v1.IngestAssetRequest.TimeIndexedData) streamingRequest_, + getParentForChildren(), + isClean()); + streamingRequest_ = null; + } + streamingRequestCase_ = 2; + onChanged(); + return timeIndexedDataBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.IngestAssetRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.IngestAssetRequest) + private static final com.google.cloud.visionai.v1.IngestAssetRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.IngestAssetRequest(); + } + + public static com.google.cloud.visionai.v1.IngestAssetRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public IngestAssetRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.IngestAssetRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/IngestAssetRequestOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/IngestAssetRequestOrBuilder.java new file mode 100644 index 000000000000..5adea3db6d6c --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/IngestAssetRequestOrBuilder.java @@ -0,0 +1,108 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/warehouse.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface IngestAssetRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.IngestAssetRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Provides information for the data and the asset resource name that the
+   * data belongs to. The first `IngestAssetRequest` message must only contain
+   * a `Config` message.
+   * 
+ * + * .google.cloud.visionai.v1.IngestAssetRequest.Config config = 1; + * + * @return Whether the config field is set. + */ + boolean hasConfig(); + /** + * + * + *
+   * Provides information for the data and the asset resource name that the
+   * data belongs to. The first `IngestAssetRequest` message must only contain
+   * a `Config` message.
+   * 
+ * + * .google.cloud.visionai.v1.IngestAssetRequest.Config config = 1; + * + * @return The config. + */ + com.google.cloud.visionai.v1.IngestAssetRequest.Config getConfig(); + /** + * + * + *
+   * Provides information for the data and the asset resource name that the
+   * data belongs to. The first `IngestAssetRequest` message must only contain
+   * a `Config` message.
+   * 
+ * + * .google.cloud.visionai.v1.IngestAssetRequest.Config config = 1; + */ + com.google.cloud.visionai.v1.IngestAssetRequest.ConfigOrBuilder getConfigOrBuilder(); + + /** + * + * + *
+   * Data to be ingested.
+   * 
+ * + * .google.cloud.visionai.v1.IngestAssetRequest.TimeIndexedData time_indexed_data = 2; + * + * + * @return Whether the timeIndexedData field is set. + */ + boolean hasTimeIndexedData(); + /** + * + * + *
+   * Data to be ingested.
+   * 
+ * + * .google.cloud.visionai.v1.IngestAssetRequest.TimeIndexedData time_indexed_data = 2; + * + * + * @return The timeIndexedData. + */ + com.google.cloud.visionai.v1.IngestAssetRequest.TimeIndexedData getTimeIndexedData(); + /** + * + * + *
+   * Data to be ingested.
+   * 
+ * + * .google.cloud.visionai.v1.IngestAssetRequest.TimeIndexedData time_indexed_data = 2; + * + */ + com.google.cloud.visionai.v1.IngestAssetRequest.TimeIndexedDataOrBuilder + getTimeIndexedDataOrBuilder(); + + com.google.cloud.visionai.v1.IngestAssetRequest.StreamingRequestCase getStreamingRequestCase(); +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/IngestAssetResponse.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/IngestAssetResponse.java new file mode 100644 index 000000000000..91669f2e4083 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/IngestAssetResponse.java @@ -0,0 +1,762 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/warehouse.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * Response message for IngestAsset API.
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.IngestAssetResponse} + */ +public final class IngestAssetResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.IngestAssetResponse) + IngestAssetResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use IngestAssetResponse.newBuilder() to construct. + private IngestAssetResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private IngestAssetResponse() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new IngestAssetResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_IngestAssetResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_IngestAssetResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.IngestAssetResponse.class, + com.google.cloud.visionai.v1.IngestAssetResponse.Builder.class); + } + + private int bitField0_; + public static final int SUCCESSFULLY_INGESTED_PARTITION_FIELD_NUMBER = 1; + private com.google.cloud.visionai.v1.Partition.TemporalPartition successfullyIngestedPartition_; + /** + * + * + *
+   * Time range of the data that has been successfully ingested.
+   * 
+ * + * + * .google.cloud.visionai.v1.Partition.TemporalPartition successfully_ingested_partition = 1; + * + * + * @return Whether the successfullyIngestedPartition field is set. + */ + @java.lang.Override + public boolean hasSuccessfullyIngestedPartition() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * Time range of the data that has been successfully ingested.
+   * 
+ * + * + * .google.cloud.visionai.v1.Partition.TemporalPartition successfully_ingested_partition = 1; + * + * + * @return The successfullyIngestedPartition. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.Partition.TemporalPartition + getSuccessfullyIngestedPartition() { + return successfullyIngestedPartition_ == null + ? com.google.cloud.visionai.v1.Partition.TemporalPartition.getDefaultInstance() + : successfullyIngestedPartition_; + } + /** + * + * + *
+   * Time range of the data that has been successfully ingested.
+   * 
+ * + * + * .google.cloud.visionai.v1.Partition.TemporalPartition successfully_ingested_partition = 1; + * + */ + @java.lang.Override + public com.google.cloud.visionai.v1.Partition.TemporalPartitionOrBuilder + getSuccessfullyIngestedPartitionOrBuilder() { + return successfullyIngestedPartition_ == null + ? com.google.cloud.visionai.v1.Partition.TemporalPartition.getDefaultInstance() + : successfullyIngestedPartition_; + } + + 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 (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getSuccessfullyIngestedPartition()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 1, getSuccessfullyIngestedPartition()); + } + size += getUnknownFields().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.visionai.v1.IngestAssetResponse)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.IngestAssetResponse other = + (com.google.cloud.visionai.v1.IngestAssetResponse) obj; + + if (hasSuccessfullyIngestedPartition() != other.hasSuccessfullyIngestedPartition()) + return false; + if (hasSuccessfullyIngestedPartition()) { + if (!getSuccessfullyIngestedPartition().equals(other.getSuccessfullyIngestedPartition())) + return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasSuccessfullyIngestedPartition()) { + hash = (37 * hash) + SUCCESSFULLY_INGESTED_PARTITION_FIELD_NUMBER; + hash = (53 * hash) + getSuccessfullyIngestedPartition().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.IngestAssetResponse parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.IngestAssetResponse 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.visionai.v1.IngestAssetResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.IngestAssetResponse 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.visionai.v1.IngestAssetResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.IngestAssetResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.IngestAssetResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.IngestAssetResponse 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.visionai.v1.IngestAssetResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.IngestAssetResponse 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.visionai.v1.IngestAssetResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.IngestAssetResponse 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.visionai.v1.IngestAssetResponse 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; + } + /** + * + * + *
+   * Response message for IngestAsset API.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.IngestAssetResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.IngestAssetResponse) + com.google.cloud.visionai.v1.IngestAssetResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_IngestAssetResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_IngestAssetResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.IngestAssetResponse.class, + com.google.cloud.visionai.v1.IngestAssetResponse.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.IngestAssetResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getSuccessfullyIngestedPartitionFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + successfullyIngestedPartition_ = null; + if (successfullyIngestedPartitionBuilder_ != null) { + successfullyIngestedPartitionBuilder_.dispose(); + successfullyIngestedPartitionBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_IngestAssetResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.IngestAssetResponse getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.IngestAssetResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.IngestAssetResponse build() { + com.google.cloud.visionai.v1.IngestAssetResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.IngestAssetResponse buildPartial() { + com.google.cloud.visionai.v1.IngestAssetResponse result = + new com.google.cloud.visionai.v1.IngestAssetResponse(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.visionai.v1.IngestAssetResponse result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.successfullyIngestedPartition_ = + successfullyIngestedPartitionBuilder_ == null + ? successfullyIngestedPartition_ + : successfullyIngestedPartitionBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.IngestAssetResponse) { + return mergeFrom((com.google.cloud.visionai.v1.IngestAssetResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.IngestAssetResponse other) { + if (other == com.google.cloud.visionai.v1.IngestAssetResponse.getDefaultInstance()) + return this; + if (other.hasSuccessfullyIngestedPartition()) { + mergeSuccessfullyIngestedPartition(other.getSuccessfullyIngestedPartition()); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage( + getSuccessfullyIngestedPartitionFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.cloud.visionai.v1.Partition.TemporalPartition successfullyIngestedPartition_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.Partition.TemporalPartition, + com.google.cloud.visionai.v1.Partition.TemporalPartition.Builder, + com.google.cloud.visionai.v1.Partition.TemporalPartitionOrBuilder> + successfullyIngestedPartitionBuilder_; + /** + * + * + *
+     * Time range of the data that has been successfully ingested.
+     * 
+ * + * + * .google.cloud.visionai.v1.Partition.TemporalPartition successfully_ingested_partition = 1; + * + * + * @return Whether the successfullyIngestedPartition field is set. + */ + public boolean hasSuccessfullyIngestedPartition() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * Time range of the data that has been successfully ingested.
+     * 
+ * + * + * .google.cloud.visionai.v1.Partition.TemporalPartition successfully_ingested_partition = 1; + * + * + * @return The successfullyIngestedPartition. + */ + public com.google.cloud.visionai.v1.Partition.TemporalPartition + getSuccessfullyIngestedPartition() { + if (successfullyIngestedPartitionBuilder_ == null) { + return successfullyIngestedPartition_ == null + ? com.google.cloud.visionai.v1.Partition.TemporalPartition.getDefaultInstance() + : successfullyIngestedPartition_; + } else { + return successfullyIngestedPartitionBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Time range of the data that has been successfully ingested.
+     * 
+ * + * + * .google.cloud.visionai.v1.Partition.TemporalPartition successfully_ingested_partition = 1; + * + */ + public Builder setSuccessfullyIngestedPartition( + com.google.cloud.visionai.v1.Partition.TemporalPartition value) { + if (successfullyIngestedPartitionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + successfullyIngestedPartition_ = value; + } else { + successfullyIngestedPartitionBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Time range of the data that has been successfully ingested.
+     * 
+ * + * + * .google.cloud.visionai.v1.Partition.TemporalPartition successfully_ingested_partition = 1; + * + */ + public Builder setSuccessfullyIngestedPartition( + com.google.cloud.visionai.v1.Partition.TemporalPartition.Builder builderForValue) { + if (successfullyIngestedPartitionBuilder_ == null) { + successfullyIngestedPartition_ = builderForValue.build(); + } else { + successfullyIngestedPartitionBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Time range of the data that has been successfully ingested.
+     * 
+ * + * + * .google.cloud.visionai.v1.Partition.TemporalPartition successfully_ingested_partition = 1; + * + */ + public Builder mergeSuccessfullyIngestedPartition( + com.google.cloud.visionai.v1.Partition.TemporalPartition value) { + if (successfullyIngestedPartitionBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && successfullyIngestedPartition_ != null + && successfullyIngestedPartition_ + != com.google.cloud.visionai.v1.Partition.TemporalPartition.getDefaultInstance()) { + getSuccessfullyIngestedPartitionBuilder().mergeFrom(value); + } else { + successfullyIngestedPartition_ = value; + } + } else { + successfullyIngestedPartitionBuilder_.mergeFrom(value); + } + if (successfullyIngestedPartition_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Time range of the data that has been successfully ingested.
+     * 
+ * + * + * .google.cloud.visionai.v1.Partition.TemporalPartition successfully_ingested_partition = 1; + * + */ + public Builder clearSuccessfullyIngestedPartition() { + bitField0_ = (bitField0_ & ~0x00000001); + successfullyIngestedPartition_ = null; + if (successfullyIngestedPartitionBuilder_ != null) { + successfullyIngestedPartitionBuilder_.dispose(); + successfullyIngestedPartitionBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Time range of the data that has been successfully ingested.
+     * 
+ * + * + * .google.cloud.visionai.v1.Partition.TemporalPartition successfully_ingested_partition = 1; + * + */ + public com.google.cloud.visionai.v1.Partition.TemporalPartition.Builder + getSuccessfullyIngestedPartitionBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getSuccessfullyIngestedPartitionFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Time range of the data that has been successfully ingested.
+     * 
+ * + * + * .google.cloud.visionai.v1.Partition.TemporalPartition successfully_ingested_partition = 1; + * + */ + public com.google.cloud.visionai.v1.Partition.TemporalPartitionOrBuilder + getSuccessfullyIngestedPartitionOrBuilder() { + if (successfullyIngestedPartitionBuilder_ != null) { + return successfullyIngestedPartitionBuilder_.getMessageOrBuilder(); + } else { + return successfullyIngestedPartition_ == null + ? com.google.cloud.visionai.v1.Partition.TemporalPartition.getDefaultInstance() + : successfullyIngestedPartition_; + } + } + /** + * + * + *
+     * Time range of the data that has been successfully ingested.
+     * 
+ * + * + * .google.cloud.visionai.v1.Partition.TemporalPartition successfully_ingested_partition = 1; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.Partition.TemporalPartition, + com.google.cloud.visionai.v1.Partition.TemporalPartition.Builder, + com.google.cloud.visionai.v1.Partition.TemporalPartitionOrBuilder> + getSuccessfullyIngestedPartitionFieldBuilder() { + if (successfullyIngestedPartitionBuilder_ == null) { + successfullyIngestedPartitionBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.Partition.TemporalPartition, + com.google.cloud.visionai.v1.Partition.TemporalPartition.Builder, + com.google.cloud.visionai.v1.Partition.TemporalPartitionOrBuilder>( + getSuccessfullyIngestedPartition(), getParentForChildren(), isClean()); + successfullyIngestedPartition_ = null; + } + return successfullyIngestedPartitionBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.IngestAssetResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.IngestAssetResponse) + private static final com.google.cloud.visionai.v1.IngestAssetResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.IngestAssetResponse(); + } + + public static com.google.cloud.visionai.v1.IngestAssetResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public IngestAssetResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.IngestAssetResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/IngestAssetResponseOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/IngestAssetResponseOrBuilder.java new file mode 100644 index 000000000000..1cfb42a27695 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/IngestAssetResponseOrBuilder.java @@ -0,0 +1,68 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/warehouse.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface IngestAssetResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.IngestAssetResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Time range of the data that has been successfully ingested.
+   * 
+ * + * + * .google.cloud.visionai.v1.Partition.TemporalPartition successfully_ingested_partition = 1; + * + * + * @return Whether the successfullyIngestedPartition field is set. + */ + boolean hasSuccessfullyIngestedPartition(); + /** + * + * + *
+   * Time range of the data that has been successfully ingested.
+   * 
+ * + * + * .google.cloud.visionai.v1.Partition.TemporalPartition successfully_ingested_partition = 1; + * + * + * @return The successfullyIngestedPartition. + */ + com.google.cloud.visionai.v1.Partition.TemporalPartition getSuccessfullyIngestedPartition(); + /** + * + * + *
+   * Time range of the data that has been successfully ingested.
+   * 
+ * + * + * .google.cloud.visionai.v1.Partition.TemporalPartition successfully_ingested_partition = 1; + * + */ + com.google.cloud.visionai.v1.Partition.TemporalPartitionOrBuilder + getSuccessfullyIngestedPartitionOrBuilder(); +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/Instance.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/Instance.java new file mode 100644 index 000000000000..14bdbe842301 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/Instance.java @@ -0,0 +1,7367 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/platform.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * Message describing Instance object
+ * Next ID: 12
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.Instance} + */ +public final class Instance extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.Instance) + InstanceOrBuilder { + private static final long serialVersionUID = 0L; + // Use Instance.newBuilder() to construct. + private Instance(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Instance() { + name_ = ""; + displayName_ = ""; + description_ = ""; + instanceType_ = 0; + inputResources_ = java.util.Collections.emptyList(); + outputResources_ = java.util.Collections.emptyList(); + state_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Instance(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_Instance_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 3: + return internalGetLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_Instance_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.Instance.class, + com.google.cloud.visionai.v1.Instance.Builder.class); + } + + /** + * + * + *
+   * All the supported instance types.
+   * 
+ * + * Protobuf enum {@code google.cloud.visionai.v1.Instance.InstanceType} + */ + public enum InstanceType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Unspecified instance type.
+     * If the instance type is not specified, the default one is
+     * STREAMING_PREDICTION.
+     * 
+ * + * INSTANCE_TYPE_UNSPECIFIED = 0; + */ + INSTANCE_TYPE_UNSPECIFIED(0), + /** + * + * + *
+     * Instance type for streaming prediction.
+     * 
+ * + * STREAMING_PREDICTION = 1; + */ + STREAMING_PREDICTION(1), + /** + * + * + *
+     * Instance type for batch prediction.
+     * 
+ * + * BATCH_PREDICTION = 2; + */ + BATCH_PREDICTION(2), + /** + * + * + *
+     * Instance type for online prediction.
+     * 
+ * + * ONLINE_PREDICTION = 3; + */ + ONLINE_PREDICTION(3), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Unspecified instance type.
+     * If the instance type is not specified, the default one is
+     * STREAMING_PREDICTION.
+     * 
+ * + * INSTANCE_TYPE_UNSPECIFIED = 0; + */ + public static final int INSTANCE_TYPE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * Instance type for streaming prediction.
+     * 
+ * + * STREAMING_PREDICTION = 1; + */ + public static final int STREAMING_PREDICTION_VALUE = 1; + /** + * + * + *
+     * Instance type for batch prediction.
+     * 
+ * + * BATCH_PREDICTION = 2; + */ + public static final int BATCH_PREDICTION_VALUE = 2; + /** + * + * + *
+     * Instance type for online prediction.
+     * 
+ * + * ONLINE_PREDICTION = 3; + */ + public static final int ONLINE_PREDICTION_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; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static InstanceType valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static InstanceType forNumber(int value) { + switch (value) { + case 0: + return INSTANCE_TYPE_UNSPECIFIED; + case 1: + return STREAMING_PREDICTION; + case 2: + return BATCH_PREDICTION; + case 3: + return ONLINE_PREDICTION; + 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 InstanceType findValueByNumber(int number) { + return InstanceType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + 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.visionai.v1.Instance.getDescriptor().getEnumTypes().get(0); + } + + private static final InstanceType[] VALUES = values(); + + public static InstanceType 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 InstanceType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.visionai.v1.Instance.InstanceType) + } + + /** + * + * + *
+   * State of the Instance
+   * 
+ * + * Protobuf enum {@code google.cloud.visionai.v1.Instance.State} + */ + public enum State implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * The default value. This value is used if the state is omitted.
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + STATE_UNSPECIFIED(0), + /** + * + * + *
+     * State CREATING.
+     * 
+ * + * CREATING = 1; + */ + CREATING(1), + /** + * + * + *
+     * State CREATED.
+     * 
+ * + * CREATED = 2; + */ + CREATED(2), + /** + * + * + *
+     * State DEPLOYING.
+     * 
+ * + * DEPLOYING = 3; + */ + DEPLOYING(3), + /** + * + * + *
+     * State DEPLOYED.
+     * 
+ * + * DEPLOYED = 4; + */ + DEPLOYED(4), + /** + * + * + *
+     * State UNDEPLOYING.
+     * 
+ * + * UNDEPLOYING = 5; + */ + UNDEPLOYING(5), + /** + * + * + *
+     * State DELETED.
+     * 
+ * + * DELETED = 6; + */ + DELETED(6), + /** + * + * + *
+     * State ERROR.
+     * 
+ * + * ERROR = 7; + */ + ERROR(7), + /** + * + * + *
+     * State Updating
+     * 
+ * + * UPDATING = 8; + */ + UPDATING(8), + /** + * + * + *
+     * State Deleting.
+     * 
+ * + * DELETING = 9; + */ + DELETING(9), + /** + * + * + *
+     * State Fixing.
+     * 
+ * + * FIXING = 10; + */ + FIXING(10), + /** + * + * + *
+     * State Finished.
+     * 
+ * + * FINISHED = 11; + */ + FINISHED(11), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * The default value. This value is used if the state is omitted.
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + public static final int STATE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * State CREATING.
+     * 
+ * + * CREATING = 1; + */ + public static final int CREATING_VALUE = 1; + /** + * + * + *
+     * State CREATED.
+     * 
+ * + * CREATED = 2; + */ + public static final int CREATED_VALUE = 2; + /** + * + * + *
+     * State DEPLOYING.
+     * 
+ * + * DEPLOYING = 3; + */ + public static final int DEPLOYING_VALUE = 3; + /** + * + * + *
+     * State DEPLOYED.
+     * 
+ * + * DEPLOYED = 4; + */ + public static final int DEPLOYED_VALUE = 4; + /** + * + * + *
+     * State UNDEPLOYING.
+     * 
+ * + * UNDEPLOYING = 5; + */ + public static final int UNDEPLOYING_VALUE = 5; + /** + * + * + *
+     * State DELETED.
+     * 
+ * + * DELETED = 6; + */ + public static final int DELETED_VALUE = 6; + /** + * + * + *
+     * State ERROR.
+     * 
+ * + * ERROR = 7; + */ + public static final int ERROR_VALUE = 7; + /** + * + * + *
+     * State Updating
+     * 
+ * + * UPDATING = 8; + */ + public static final int UPDATING_VALUE = 8; + /** + * + * + *
+     * State Deleting.
+     * 
+ * + * DELETING = 9; + */ + public static final int DELETING_VALUE = 9; + /** + * + * + *
+     * State Fixing.
+     * 
+ * + * FIXING = 10; + */ + public static final int FIXING_VALUE = 10; + /** + * + * + *
+     * State Finished.
+     * 
+ * + * FINISHED = 11; + */ + public static final int FINISHED_VALUE = 11; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static State valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static State forNumber(int value) { + switch (value) { + case 0: + return STATE_UNSPECIFIED; + case 1: + return CREATING; + case 2: + return CREATED; + case 3: + return DEPLOYING; + case 4: + return DEPLOYED; + case 5: + return UNDEPLOYING; + case 6: + return DELETED; + case 7: + return ERROR; + case 8: + return UPDATING; + case 9: + return DELETING; + case 10: + return FIXING; + case 11: + return FINISHED; + 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 State findValueByNumber(int number) { + return State.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + 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.visionai.v1.Instance.getDescriptor().getEnumTypes().get(1); + } + + private static final State[] VALUES = values(); + + public static State 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 State(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.visionai.v1.Instance.State) + } + + public interface InputResourceOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.Instance.InputResource) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * The direct input resource name.
+     * If the instance type is STREAMING_PREDICTION, the input resource is in
+     * format of
+     * "projects/123/locations/us-central1/clusters/456/streams/stream-a".
+     * If the instance type is BATCH_PREDICTION from Cloud Storage input
+     * container, the input resource is in format of "gs://bucket-a".
+     * 
+ * + * string input_resource = 1; + * + * @return Whether the inputResource field is set. + */ + boolean hasInputResource(); + /** + * + * + *
+     * The direct input resource name.
+     * If the instance type is STREAMING_PREDICTION, the input resource is in
+     * format of
+     * "projects/123/locations/us-central1/clusters/456/streams/stream-a".
+     * If the instance type is BATCH_PREDICTION from Cloud Storage input
+     * container, the input resource is in format of "gs://bucket-a".
+     * 
+ * + * string input_resource = 1; + * + * @return The inputResource. + */ + java.lang.String getInputResource(); + /** + * + * + *
+     * The direct input resource name.
+     * If the instance type is STREAMING_PREDICTION, the input resource is in
+     * format of
+     * "projects/123/locations/us-central1/clusters/456/streams/stream-a".
+     * If the instance type is BATCH_PREDICTION from Cloud Storage input
+     * container, the input resource is in format of "gs://bucket-a".
+     * 
+ * + * string input_resource = 1; + * + * @return The bytes for inputResource. + */ + com.google.protobuf.ByteString getInputResourceBytes(); + + /** + * + * + *
+     * If the input resource is VisionAI Stream, the associated annotations
+     * can be specified using annotated_stream instead.
+     * 
+ * + * + * .google.cloud.visionai.v1.StreamWithAnnotation annotated_stream = 4 [deprecated = true]; + * + * + * @deprecated google.cloud.visionai.v1.Instance.InputResource.annotated_stream is deprecated. + * See google/cloud/visionai/v1/platform.proto;l=1508 + * @return Whether the annotatedStream field is set. + */ + @java.lang.Deprecated + boolean hasAnnotatedStream(); + /** + * + * + *
+     * If the input resource is VisionAI Stream, the associated annotations
+     * can be specified using annotated_stream instead.
+     * 
+ * + * + * .google.cloud.visionai.v1.StreamWithAnnotation annotated_stream = 4 [deprecated = true]; + * + * + * @deprecated google.cloud.visionai.v1.Instance.InputResource.annotated_stream is deprecated. + * See google/cloud/visionai/v1/platform.proto;l=1508 + * @return The annotatedStream. + */ + @java.lang.Deprecated + com.google.cloud.visionai.v1.StreamWithAnnotation getAnnotatedStream(); + /** + * + * + *
+     * If the input resource is VisionAI Stream, the associated annotations
+     * can be specified using annotated_stream instead.
+     * 
+ * + * + * .google.cloud.visionai.v1.StreamWithAnnotation annotated_stream = 4 [deprecated = true]; + * + */ + @java.lang.Deprecated + com.google.cloud.visionai.v1.StreamWithAnnotationOrBuilder getAnnotatedStreamOrBuilder(); + + /** + * + * + *
+     * Data type for the current input resource.
+     * 
+ * + * .google.cloud.visionai.v1.DataType data_type = 6; + * + * @return The enum numeric value on the wire for dataType. + */ + int getDataTypeValue(); + /** + * + * + *
+     * Data type for the current input resource.
+     * 
+ * + * .google.cloud.visionai.v1.DataType data_type = 6; + * + * @return The dataType. + */ + com.google.cloud.visionai.v1.DataType getDataType(); + + /** + * + * + *
+     * The name of graph node who receives the input resource.
+     * For example:
+     * input_resource:
+     * visionai.googleapis.com/v1/projects/123/locations/us-central1/clusters/456/streams/input-stream-a
+     * consumer_node: stream-input
+     * 
+ * + * string consumer_node = 2; + * + * @return The consumerNode. + */ + java.lang.String getConsumerNode(); + /** + * + * + *
+     * The name of graph node who receives the input resource.
+     * For example:
+     * input_resource:
+     * visionai.googleapis.com/v1/projects/123/locations/us-central1/clusters/456/streams/input-stream-a
+     * consumer_node: stream-input
+     * 
+ * + * string consumer_node = 2; + * + * @return The bytes for consumerNode. + */ + com.google.protobuf.ByteString getConsumerNodeBytes(); + + /** + * + * + *
+     * The specific input resource binding which will consume the current Input
+     * Resource, can be ignored is there is only 1 input binding.
+     * 
+ * + * string input_resource_binding = 3; + * + * @return The inputResourceBinding. + */ + java.lang.String getInputResourceBinding(); + /** + * + * + *
+     * The specific input resource binding which will consume the current Input
+     * Resource, can be ignored is there is only 1 input binding.
+     * 
+ * + * string input_resource_binding = 3; + * + * @return The bytes for inputResourceBinding. + */ + com.google.protobuf.ByteString getInputResourceBindingBytes(); + + /** + * + * + *
+     * Contains resource annotations.
+     * 
+ * + * .google.cloud.visionai.v1.ResourceAnnotations annotations = 5; + * + * @return Whether the annotations field is set. + */ + boolean hasAnnotations(); + /** + * + * + *
+     * Contains resource annotations.
+     * 
+ * + * .google.cloud.visionai.v1.ResourceAnnotations annotations = 5; + * + * @return The annotations. + */ + com.google.cloud.visionai.v1.ResourceAnnotations getAnnotations(); + /** + * + * + *
+     * Contains resource annotations.
+     * 
+ * + * .google.cloud.visionai.v1.ResourceAnnotations annotations = 5; + */ + com.google.cloud.visionai.v1.ResourceAnnotationsOrBuilder getAnnotationsOrBuilder(); + + com.google.cloud.visionai.v1.Instance.InputResource.InputResourceInformationCase + getInputResourceInformationCase(); + } + /** + * + * + *
+   * Message of input resource used in one application instance.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.Instance.InputResource} + */ + public static final class InputResource extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.Instance.InputResource) + InputResourceOrBuilder { + private static final long serialVersionUID = 0L; + // Use InputResource.newBuilder() to construct. + private InputResource(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private InputResource() { + dataType_ = 0; + consumerNode_ = ""; + inputResourceBinding_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new InputResource(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_Instance_InputResource_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_Instance_InputResource_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.Instance.InputResource.class, + com.google.cloud.visionai.v1.Instance.InputResource.Builder.class); + } + + private int bitField0_; + private int inputResourceInformationCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object inputResourceInformation_; + + public enum InputResourceInformationCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + INPUT_RESOURCE(1), + @java.lang.Deprecated + ANNOTATED_STREAM(4), + INPUTRESOURCEINFORMATION_NOT_SET(0); + private final int value; + + private InputResourceInformationCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static InputResourceInformationCase valueOf(int value) { + return forNumber(value); + } + + public static InputResourceInformationCase forNumber(int value) { + switch (value) { + case 1: + return INPUT_RESOURCE; + case 4: + return ANNOTATED_STREAM; + case 0: + return INPUTRESOURCEINFORMATION_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public InputResourceInformationCase getInputResourceInformationCase() { + return InputResourceInformationCase.forNumber(inputResourceInformationCase_); + } + + public static final int INPUT_RESOURCE_FIELD_NUMBER = 1; + /** + * + * + *
+     * The direct input resource name.
+     * If the instance type is STREAMING_PREDICTION, the input resource is in
+     * format of
+     * "projects/123/locations/us-central1/clusters/456/streams/stream-a".
+     * If the instance type is BATCH_PREDICTION from Cloud Storage input
+     * container, the input resource is in format of "gs://bucket-a".
+     * 
+ * + * string input_resource = 1; + * + * @return Whether the inputResource field is set. + */ + public boolean hasInputResource() { + return inputResourceInformationCase_ == 1; + } + /** + * + * + *
+     * The direct input resource name.
+     * If the instance type is STREAMING_PREDICTION, the input resource is in
+     * format of
+     * "projects/123/locations/us-central1/clusters/456/streams/stream-a".
+     * If the instance type is BATCH_PREDICTION from Cloud Storage input
+     * container, the input resource is in format of "gs://bucket-a".
+     * 
+ * + * string input_resource = 1; + * + * @return The inputResource. + */ + public java.lang.String getInputResource() { + java.lang.Object ref = ""; + if (inputResourceInformationCase_ == 1) { + ref = inputResourceInformation_; + } + 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(); + if (inputResourceInformationCase_ == 1) { + inputResourceInformation_ = s; + } + return s; + } + } + /** + * + * + *
+     * The direct input resource name.
+     * If the instance type is STREAMING_PREDICTION, the input resource is in
+     * format of
+     * "projects/123/locations/us-central1/clusters/456/streams/stream-a".
+     * If the instance type is BATCH_PREDICTION from Cloud Storage input
+     * container, the input resource is in format of "gs://bucket-a".
+     * 
+ * + * string input_resource = 1; + * + * @return The bytes for inputResource. + */ + public com.google.protobuf.ByteString getInputResourceBytes() { + java.lang.Object ref = ""; + if (inputResourceInformationCase_ == 1) { + ref = inputResourceInformation_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (inputResourceInformationCase_ == 1) { + inputResourceInformation_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ANNOTATED_STREAM_FIELD_NUMBER = 4; + /** + * + * + *
+     * If the input resource is VisionAI Stream, the associated annotations
+     * can be specified using annotated_stream instead.
+     * 
+ * + * + * .google.cloud.visionai.v1.StreamWithAnnotation annotated_stream = 4 [deprecated = true]; + * + * + * @deprecated google.cloud.visionai.v1.Instance.InputResource.annotated_stream is deprecated. + * See google/cloud/visionai/v1/platform.proto;l=1508 + * @return Whether the annotatedStream field is set. + */ + @java.lang.Override + @java.lang.Deprecated + public boolean hasAnnotatedStream() { + return inputResourceInformationCase_ == 4; + } + /** + * + * + *
+     * If the input resource is VisionAI Stream, the associated annotations
+     * can be specified using annotated_stream instead.
+     * 
+ * + * + * .google.cloud.visionai.v1.StreamWithAnnotation annotated_stream = 4 [deprecated = true]; + * + * + * @deprecated google.cloud.visionai.v1.Instance.InputResource.annotated_stream is deprecated. + * See google/cloud/visionai/v1/platform.proto;l=1508 + * @return The annotatedStream. + */ + @java.lang.Override + @java.lang.Deprecated + public com.google.cloud.visionai.v1.StreamWithAnnotation getAnnotatedStream() { + if (inputResourceInformationCase_ == 4) { + return (com.google.cloud.visionai.v1.StreamWithAnnotation) inputResourceInformation_; + } + return com.google.cloud.visionai.v1.StreamWithAnnotation.getDefaultInstance(); + } + /** + * + * + *
+     * If the input resource is VisionAI Stream, the associated annotations
+     * can be specified using annotated_stream instead.
+     * 
+ * + * + * .google.cloud.visionai.v1.StreamWithAnnotation annotated_stream = 4 [deprecated = true]; + * + */ + @java.lang.Override + @java.lang.Deprecated + public com.google.cloud.visionai.v1.StreamWithAnnotationOrBuilder + getAnnotatedStreamOrBuilder() { + if (inputResourceInformationCase_ == 4) { + return (com.google.cloud.visionai.v1.StreamWithAnnotation) inputResourceInformation_; + } + return com.google.cloud.visionai.v1.StreamWithAnnotation.getDefaultInstance(); + } + + public static final int DATA_TYPE_FIELD_NUMBER = 6; + private int dataType_ = 0; + /** + * + * + *
+     * Data type for the current input resource.
+     * 
+ * + * .google.cloud.visionai.v1.DataType data_type = 6; + * + * @return The enum numeric value on the wire for dataType. + */ + @java.lang.Override + public int getDataTypeValue() { + return dataType_; + } + /** + * + * + *
+     * Data type for the current input resource.
+     * 
+ * + * .google.cloud.visionai.v1.DataType data_type = 6; + * + * @return The dataType. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.DataType getDataType() { + com.google.cloud.visionai.v1.DataType result = + com.google.cloud.visionai.v1.DataType.forNumber(dataType_); + return result == null ? com.google.cloud.visionai.v1.DataType.UNRECOGNIZED : result; + } + + public static final int CONSUMER_NODE_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object consumerNode_ = ""; + /** + * + * + *
+     * The name of graph node who receives the input resource.
+     * For example:
+     * input_resource:
+     * visionai.googleapis.com/v1/projects/123/locations/us-central1/clusters/456/streams/input-stream-a
+     * consumer_node: stream-input
+     * 
+ * + * string consumer_node = 2; + * + * @return The consumerNode. + */ + @java.lang.Override + public java.lang.String getConsumerNode() { + java.lang.Object ref = consumerNode_; + 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(); + consumerNode_ = s; + return s; + } + } + /** + * + * + *
+     * The name of graph node who receives the input resource.
+     * For example:
+     * input_resource:
+     * visionai.googleapis.com/v1/projects/123/locations/us-central1/clusters/456/streams/input-stream-a
+     * consumer_node: stream-input
+     * 
+ * + * string consumer_node = 2; + * + * @return The bytes for consumerNode. + */ + @java.lang.Override + public com.google.protobuf.ByteString getConsumerNodeBytes() { + java.lang.Object ref = consumerNode_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + consumerNode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int INPUT_RESOURCE_BINDING_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object inputResourceBinding_ = ""; + /** + * + * + *
+     * The specific input resource binding which will consume the current Input
+     * Resource, can be ignored is there is only 1 input binding.
+     * 
+ * + * string input_resource_binding = 3; + * + * @return The inputResourceBinding. + */ + @java.lang.Override + public java.lang.String getInputResourceBinding() { + java.lang.Object ref = inputResourceBinding_; + 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(); + inputResourceBinding_ = s; + return s; + } + } + /** + * + * + *
+     * The specific input resource binding which will consume the current Input
+     * Resource, can be ignored is there is only 1 input binding.
+     * 
+ * + * string input_resource_binding = 3; + * + * @return The bytes for inputResourceBinding. + */ + @java.lang.Override + public com.google.protobuf.ByteString getInputResourceBindingBytes() { + java.lang.Object ref = inputResourceBinding_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + inputResourceBinding_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ANNOTATIONS_FIELD_NUMBER = 5; + private com.google.cloud.visionai.v1.ResourceAnnotations annotations_; + /** + * + * + *
+     * Contains resource annotations.
+     * 
+ * + * .google.cloud.visionai.v1.ResourceAnnotations annotations = 5; + * + * @return Whether the annotations field is set. + */ + @java.lang.Override + public boolean hasAnnotations() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * Contains resource annotations.
+     * 
+ * + * .google.cloud.visionai.v1.ResourceAnnotations annotations = 5; + * + * @return The annotations. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.ResourceAnnotations getAnnotations() { + return annotations_ == null + ? com.google.cloud.visionai.v1.ResourceAnnotations.getDefaultInstance() + : annotations_; + } + /** + * + * + *
+     * Contains resource annotations.
+     * 
+ * + * .google.cloud.visionai.v1.ResourceAnnotations annotations = 5; + */ + @java.lang.Override + public com.google.cloud.visionai.v1.ResourceAnnotationsOrBuilder getAnnotationsOrBuilder() { + return annotations_ == null + ? com.google.cloud.visionai.v1.ResourceAnnotations.getDefaultInstance() + : annotations_; + } + + 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 (inputResourceInformationCase_ == 1) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, inputResourceInformation_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(consumerNode_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, consumerNode_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(inputResourceBinding_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, inputResourceBinding_); + } + if (inputResourceInformationCase_ == 4) { + output.writeMessage( + 4, (com.google.cloud.visionai.v1.StreamWithAnnotation) inputResourceInformation_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(5, getAnnotations()); + } + if (dataType_ != com.google.cloud.visionai.v1.DataType.DATA_TYPE_UNSPECIFIED.getNumber()) { + output.writeEnum(6, dataType_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (inputResourceInformationCase_ == 1) { + size += + com.google.protobuf.GeneratedMessageV3.computeStringSize(1, inputResourceInformation_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(consumerNode_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, consumerNode_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(inputResourceBinding_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, inputResourceBinding_); + } + if (inputResourceInformationCase_ == 4) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 4, (com.google.cloud.visionai.v1.StreamWithAnnotation) inputResourceInformation_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getAnnotations()); + } + if (dataType_ != com.google.cloud.visionai.v1.DataType.DATA_TYPE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(6, dataType_); + } + size += getUnknownFields().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.visionai.v1.Instance.InputResource)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.Instance.InputResource other = + (com.google.cloud.visionai.v1.Instance.InputResource) obj; + + if (dataType_ != other.dataType_) return false; + if (!getConsumerNode().equals(other.getConsumerNode())) return false; + if (!getInputResourceBinding().equals(other.getInputResourceBinding())) return false; + if (hasAnnotations() != other.hasAnnotations()) return false; + if (hasAnnotations()) { + if (!getAnnotations().equals(other.getAnnotations())) return false; + } + if (!getInputResourceInformationCase().equals(other.getInputResourceInformationCase())) + return false; + switch (inputResourceInformationCase_) { + case 1: + if (!getInputResource().equals(other.getInputResource())) return false; + break; + case 4: + if (!getAnnotatedStream().equals(other.getAnnotatedStream())) return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + DATA_TYPE_FIELD_NUMBER; + hash = (53 * hash) + dataType_; + hash = (37 * hash) + CONSUMER_NODE_FIELD_NUMBER; + hash = (53 * hash) + getConsumerNode().hashCode(); + hash = (37 * hash) + INPUT_RESOURCE_BINDING_FIELD_NUMBER; + hash = (53 * hash) + getInputResourceBinding().hashCode(); + if (hasAnnotations()) { + hash = (37 * hash) + ANNOTATIONS_FIELD_NUMBER; + hash = (53 * hash) + getAnnotations().hashCode(); + } + switch (inputResourceInformationCase_) { + case 1: + hash = (37 * hash) + INPUT_RESOURCE_FIELD_NUMBER; + hash = (53 * hash) + getInputResource().hashCode(); + break; + case 4: + hash = (37 * hash) + ANNOTATED_STREAM_FIELD_NUMBER; + hash = (53 * hash) + getAnnotatedStream().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.Instance.InputResource parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.Instance.InputResource 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.visionai.v1.Instance.InputResource parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.Instance.InputResource 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.visionai.v1.Instance.InputResource parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.Instance.InputResource parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.Instance.InputResource parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.Instance.InputResource 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.visionai.v1.Instance.InputResource parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.Instance.InputResource 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.visionai.v1.Instance.InputResource parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.Instance.InputResource 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.visionai.v1.Instance.InputResource 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; + } + /** + * + * + *
+     * Message of input resource used in one application instance.
+     * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.Instance.InputResource} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.Instance.InputResource) + com.google.cloud.visionai.v1.Instance.InputResourceOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_Instance_InputResource_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_Instance_InputResource_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.Instance.InputResource.class, + com.google.cloud.visionai.v1.Instance.InputResource.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.Instance.InputResource.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getAnnotationsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (annotatedStreamBuilder_ != null) { + annotatedStreamBuilder_.clear(); + } + dataType_ = 0; + consumerNode_ = ""; + inputResourceBinding_ = ""; + annotations_ = null; + if (annotationsBuilder_ != null) { + annotationsBuilder_.dispose(); + annotationsBuilder_ = null; + } + inputResourceInformationCase_ = 0; + inputResourceInformation_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_Instance_InputResource_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.Instance.InputResource getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.Instance.InputResource.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.Instance.InputResource build() { + com.google.cloud.visionai.v1.Instance.InputResource result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.Instance.InputResource buildPartial() { + com.google.cloud.visionai.v1.Instance.InputResource result = + new com.google.cloud.visionai.v1.Instance.InputResource(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.visionai.v1.Instance.InputResource result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.dataType_ = dataType_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.consumerNode_ = consumerNode_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.inputResourceBinding_ = inputResourceBinding_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000020) != 0)) { + result.annotations_ = + annotationsBuilder_ == null ? annotations_ : annotationsBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + private void buildPartialOneofs(com.google.cloud.visionai.v1.Instance.InputResource result) { + result.inputResourceInformationCase_ = inputResourceInformationCase_; + result.inputResourceInformation_ = this.inputResourceInformation_; + if (inputResourceInformationCase_ == 4 && annotatedStreamBuilder_ != null) { + result.inputResourceInformation_ = annotatedStreamBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.Instance.InputResource) { + return mergeFrom((com.google.cloud.visionai.v1.Instance.InputResource) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.Instance.InputResource other) { + if (other == com.google.cloud.visionai.v1.Instance.InputResource.getDefaultInstance()) + return this; + if (other.dataType_ != 0) { + setDataTypeValue(other.getDataTypeValue()); + } + if (!other.getConsumerNode().isEmpty()) { + consumerNode_ = other.consumerNode_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (!other.getInputResourceBinding().isEmpty()) { + inputResourceBinding_ = other.inputResourceBinding_; + bitField0_ |= 0x00000010; + onChanged(); + } + if (other.hasAnnotations()) { + mergeAnnotations(other.getAnnotations()); + } + switch (other.getInputResourceInformationCase()) { + case INPUT_RESOURCE: + { + inputResourceInformationCase_ = 1; + inputResourceInformation_ = other.inputResourceInformation_; + onChanged(); + break; + } + case ANNOTATED_STREAM: + { + mergeAnnotatedStream(other.getAnnotatedStream()); + break; + } + case INPUTRESOURCEINFORMATION_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + 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(); + inputResourceInformationCase_ = 1; + inputResourceInformation_ = s; + break; + } // case 10 + case 18: + { + consumerNode_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 18 + case 26: + { + inputResourceBinding_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 26 + case 34: + { + input.readMessage( + getAnnotatedStreamFieldBuilder().getBuilder(), extensionRegistry); + inputResourceInformationCase_ = 4; + break; + } // case 34 + case 42: + { + input.readMessage(getAnnotationsFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000020; + break; + } // case 42 + case 48: + { + dataType_ = input.readEnum(); + bitField0_ |= 0x00000004; + break; + } // case 48 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int inputResourceInformationCase_ = 0; + private java.lang.Object inputResourceInformation_; + + public InputResourceInformationCase getInputResourceInformationCase() { + return InputResourceInformationCase.forNumber(inputResourceInformationCase_); + } + + public Builder clearInputResourceInformation() { + inputResourceInformationCase_ = 0; + inputResourceInformation_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + /** + * + * + *
+       * The direct input resource name.
+       * If the instance type is STREAMING_PREDICTION, the input resource is in
+       * format of
+       * "projects/123/locations/us-central1/clusters/456/streams/stream-a".
+       * If the instance type is BATCH_PREDICTION from Cloud Storage input
+       * container, the input resource is in format of "gs://bucket-a".
+       * 
+ * + * string input_resource = 1; + * + * @return Whether the inputResource field is set. + */ + @java.lang.Override + public boolean hasInputResource() { + return inputResourceInformationCase_ == 1; + } + /** + * + * + *
+       * The direct input resource name.
+       * If the instance type is STREAMING_PREDICTION, the input resource is in
+       * format of
+       * "projects/123/locations/us-central1/clusters/456/streams/stream-a".
+       * If the instance type is BATCH_PREDICTION from Cloud Storage input
+       * container, the input resource is in format of "gs://bucket-a".
+       * 
+ * + * string input_resource = 1; + * + * @return The inputResource. + */ + @java.lang.Override + public java.lang.String getInputResource() { + java.lang.Object ref = ""; + if (inputResourceInformationCase_ == 1) { + ref = inputResourceInformation_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (inputResourceInformationCase_ == 1) { + inputResourceInformation_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * The direct input resource name.
+       * If the instance type is STREAMING_PREDICTION, the input resource is in
+       * format of
+       * "projects/123/locations/us-central1/clusters/456/streams/stream-a".
+       * If the instance type is BATCH_PREDICTION from Cloud Storage input
+       * container, the input resource is in format of "gs://bucket-a".
+       * 
+ * + * string input_resource = 1; + * + * @return The bytes for inputResource. + */ + @java.lang.Override + public com.google.protobuf.ByteString getInputResourceBytes() { + java.lang.Object ref = ""; + if (inputResourceInformationCase_ == 1) { + ref = inputResourceInformation_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (inputResourceInformationCase_ == 1) { + inputResourceInformation_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * The direct input resource name.
+       * If the instance type is STREAMING_PREDICTION, the input resource is in
+       * format of
+       * "projects/123/locations/us-central1/clusters/456/streams/stream-a".
+       * If the instance type is BATCH_PREDICTION from Cloud Storage input
+       * container, the input resource is in format of "gs://bucket-a".
+       * 
+ * + * string input_resource = 1; + * + * @param value The inputResource to set. + * @return This builder for chaining. + */ + public Builder setInputResource(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + inputResourceInformationCase_ = 1; + inputResourceInformation_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * The direct input resource name.
+       * If the instance type is STREAMING_PREDICTION, the input resource is in
+       * format of
+       * "projects/123/locations/us-central1/clusters/456/streams/stream-a".
+       * If the instance type is BATCH_PREDICTION from Cloud Storage input
+       * container, the input resource is in format of "gs://bucket-a".
+       * 
+ * + * string input_resource = 1; + * + * @return This builder for chaining. + */ + public Builder clearInputResource() { + if (inputResourceInformationCase_ == 1) { + inputResourceInformationCase_ = 0; + inputResourceInformation_ = null; + onChanged(); + } + return this; + } + /** + * + * + *
+       * The direct input resource name.
+       * If the instance type is STREAMING_PREDICTION, the input resource is in
+       * format of
+       * "projects/123/locations/us-central1/clusters/456/streams/stream-a".
+       * If the instance type is BATCH_PREDICTION from Cloud Storage input
+       * container, the input resource is in format of "gs://bucket-a".
+       * 
+ * + * string input_resource = 1; + * + * @param value The bytes for inputResource to set. + * @return This builder for chaining. + */ + public Builder setInputResourceBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + inputResourceInformationCase_ = 1; + inputResourceInformation_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.StreamWithAnnotation, + com.google.cloud.visionai.v1.StreamWithAnnotation.Builder, + com.google.cloud.visionai.v1.StreamWithAnnotationOrBuilder> + annotatedStreamBuilder_; + /** + * + * + *
+       * If the input resource is VisionAI Stream, the associated annotations
+       * can be specified using annotated_stream instead.
+       * 
+ * + * + * .google.cloud.visionai.v1.StreamWithAnnotation annotated_stream = 4 [deprecated = true]; + * + * + * @deprecated google.cloud.visionai.v1.Instance.InputResource.annotated_stream is deprecated. + * See google/cloud/visionai/v1/platform.proto;l=1508 + * @return Whether the annotatedStream field is set. + */ + @java.lang.Override + @java.lang.Deprecated + public boolean hasAnnotatedStream() { + return inputResourceInformationCase_ == 4; + } + /** + * + * + *
+       * If the input resource is VisionAI Stream, the associated annotations
+       * can be specified using annotated_stream instead.
+       * 
+ * + * + * .google.cloud.visionai.v1.StreamWithAnnotation annotated_stream = 4 [deprecated = true]; + * + * + * @deprecated google.cloud.visionai.v1.Instance.InputResource.annotated_stream is deprecated. + * See google/cloud/visionai/v1/platform.proto;l=1508 + * @return The annotatedStream. + */ + @java.lang.Override + @java.lang.Deprecated + public com.google.cloud.visionai.v1.StreamWithAnnotation getAnnotatedStream() { + if (annotatedStreamBuilder_ == null) { + if (inputResourceInformationCase_ == 4) { + return (com.google.cloud.visionai.v1.StreamWithAnnotation) inputResourceInformation_; + } + return com.google.cloud.visionai.v1.StreamWithAnnotation.getDefaultInstance(); + } else { + if (inputResourceInformationCase_ == 4) { + return annotatedStreamBuilder_.getMessage(); + } + return com.google.cloud.visionai.v1.StreamWithAnnotation.getDefaultInstance(); + } + } + /** + * + * + *
+       * If the input resource is VisionAI Stream, the associated annotations
+       * can be specified using annotated_stream instead.
+       * 
+ * + * + * .google.cloud.visionai.v1.StreamWithAnnotation annotated_stream = 4 [deprecated = true]; + * + */ + @java.lang.Deprecated + public Builder setAnnotatedStream(com.google.cloud.visionai.v1.StreamWithAnnotation value) { + if (annotatedStreamBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + inputResourceInformation_ = value; + onChanged(); + } else { + annotatedStreamBuilder_.setMessage(value); + } + inputResourceInformationCase_ = 4; + return this; + } + /** + * + * + *
+       * If the input resource is VisionAI Stream, the associated annotations
+       * can be specified using annotated_stream instead.
+       * 
+ * + * + * .google.cloud.visionai.v1.StreamWithAnnotation annotated_stream = 4 [deprecated = true]; + * + */ + @java.lang.Deprecated + public Builder setAnnotatedStream( + com.google.cloud.visionai.v1.StreamWithAnnotation.Builder builderForValue) { + if (annotatedStreamBuilder_ == null) { + inputResourceInformation_ = builderForValue.build(); + onChanged(); + } else { + annotatedStreamBuilder_.setMessage(builderForValue.build()); + } + inputResourceInformationCase_ = 4; + return this; + } + /** + * + * + *
+       * If the input resource is VisionAI Stream, the associated annotations
+       * can be specified using annotated_stream instead.
+       * 
+ * + * + * .google.cloud.visionai.v1.StreamWithAnnotation annotated_stream = 4 [deprecated = true]; + * + */ + @java.lang.Deprecated + public Builder mergeAnnotatedStream(com.google.cloud.visionai.v1.StreamWithAnnotation value) { + if (annotatedStreamBuilder_ == null) { + if (inputResourceInformationCase_ == 4 + && inputResourceInformation_ + != com.google.cloud.visionai.v1.StreamWithAnnotation.getDefaultInstance()) { + inputResourceInformation_ = + com.google.cloud.visionai.v1.StreamWithAnnotation.newBuilder( + (com.google.cloud.visionai.v1.StreamWithAnnotation) + inputResourceInformation_) + .mergeFrom(value) + .buildPartial(); + } else { + inputResourceInformation_ = value; + } + onChanged(); + } else { + if (inputResourceInformationCase_ == 4) { + annotatedStreamBuilder_.mergeFrom(value); + } else { + annotatedStreamBuilder_.setMessage(value); + } + } + inputResourceInformationCase_ = 4; + return this; + } + /** + * + * + *
+       * If the input resource is VisionAI Stream, the associated annotations
+       * can be specified using annotated_stream instead.
+       * 
+ * + * + * .google.cloud.visionai.v1.StreamWithAnnotation annotated_stream = 4 [deprecated = true]; + * + */ + @java.lang.Deprecated + public Builder clearAnnotatedStream() { + if (annotatedStreamBuilder_ == null) { + if (inputResourceInformationCase_ == 4) { + inputResourceInformationCase_ = 0; + inputResourceInformation_ = null; + onChanged(); + } + } else { + if (inputResourceInformationCase_ == 4) { + inputResourceInformationCase_ = 0; + inputResourceInformation_ = null; + } + annotatedStreamBuilder_.clear(); + } + return this; + } + /** + * + * + *
+       * If the input resource is VisionAI Stream, the associated annotations
+       * can be specified using annotated_stream instead.
+       * 
+ * + * + * .google.cloud.visionai.v1.StreamWithAnnotation annotated_stream = 4 [deprecated = true]; + * + */ + @java.lang.Deprecated + public com.google.cloud.visionai.v1.StreamWithAnnotation.Builder getAnnotatedStreamBuilder() { + return getAnnotatedStreamFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * If the input resource is VisionAI Stream, the associated annotations
+       * can be specified using annotated_stream instead.
+       * 
+ * + * + * .google.cloud.visionai.v1.StreamWithAnnotation annotated_stream = 4 [deprecated = true]; + * + */ + @java.lang.Override + @java.lang.Deprecated + public com.google.cloud.visionai.v1.StreamWithAnnotationOrBuilder + getAnnotatedStreamOrBuilder() { + if ((inputResourceInformationCase_ == 4) && (annotatedStreamBuilder_ != null)) { + return annotatedStreamBuilder_.getMessageOrBuilder(); + } else { + if (inputResourceInformationCase_ == 4) { + return (com.google.cloud.visionai.v1.StreamWithAnnotation) inputResourceInformation_; + } + return com.google.cloud.visionai.v1.StreamWithAnnotation.getDefaultInstance(); + } + } + /** + * + * + *
+       * If the input resource is VisionAI Stream, the associated annotations
+       * can be specified using annotated_stream instead.
+       * 
+ * + * + * .google.cloud.visionai.v1.StreamWithAnnotation annotated_stream = 4 [deprecated = true]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.StreamWithAnnotation, + com.google.cloud.visionai.v1.StreamWithAnnotation.Builder, + com.google.cloud.visionai.v1.StreamWithAnnotationOrBuilder> + getAnnotatedStreamFieldBuilder() { + if (annotatedStreamBuilder_ == null) { + if (!(inputResourceInformationCase_ == 4)) { + inputResourceInformation_ = + com.google.cloud.visionai.v1.StreamWithAnnotation.getDefaultInstance(); + } + annotatedStreamBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.StreamWithAnnotation, + com.google.cloud.visionai.v1.StreamWithAnnotation.Builder, + com.google.cloud.visionai.v1.StreamWithAnnotationOrBuilder>( + (com.google.cloud.visionai.v1.StreamWithAnnotation) inputResourceInformation_, + getParentForChildren(), + isClean()); + inputResourceInformation_ = null; + } + inputResourceInformationCase_ = 4; + onChanged(); + return annotatedStreamBuilder_; + } + + private int dataType_ = 0; + /** + * + * + *
+       * Data type for the current input resource.
+       * 
+ * + * .google.cloud.visionai.v1.DataType data_type = 6; + * + * @return The enum numeric value on the wire for dataType. + */ + @java.lang.Override + public int getDataTypeValue() { + return dataType_; + } + /** + * + * + *
+       * Data type for the current input resource.
+       * 
+ * + * .google.cloud.visionai.v1.DataType data_type = 6; + * + * @param value The enum numeric value on the wire for dataType to set. + * @return This builder for chaining. + */ + public Builder setDataTypeValue(int value) { + dataType_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+       * Data type for the current input resource.
+       * 
+ * + * .google.cloud.visionai.v1.DataType data_type = 6; + * + * @return The dataType. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.DataType getDataType() { + com.google.cloud.visionai.v1.DataType result = + com.google.cloud.visionai.v1.DataType.forNumber(dataType_); + return result == null ? com.google.cloud.visionai.v1.DataType.UNRECOGNIZED : result; + } + /** + * + * + *
+       * Data type for the current input resource.
+       * 
+ * + * .google.cloud.visionai.v1.DataType data_type = 6; + * + * @param value The dataType to set. + * @return This builder for chaining. + */ + public Builder setDataType(com.google.cloud.visionai.v1.DataType value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000004; + dataType_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+       * Data type for the current input resource.
+       * 
+ * + * .google.cloud.visionai.v1.DataType data_type = 6; + * + * @return This builder for chaining. + */ + public Builder clearDataType() { + bitField0_ = (bitField0_ & ~0x00000004); + dataType_ = 0; + onChanged(); + return this; + } + + private java.lang.Object consumerNode_ = ""; + /** + * + * + *
+       * The name of graph node who receives the input resource.
+       * For example:
+       * input_resource:
+       * visionai.googleapis.com/v1/projects/123/locations/us-central1/clusters/456/streams/input-stream-a
+       * consumer_node: stream-input
+       * 
+ * + * string consumer_node = 2; + * + * @return The consumerNode. + */ + public java.lang.String getConsumerNode() { + java.lang.Object ref = consumerNode_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + consumerNode_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * The name of graph node who receives the input resource.
+       * For example:
+       * input_resource:
+       * visionai.googleapis.com/v1/projects/123/locations/us-central1/clusters/456/streams/input-stream-a
+       * consumer_node: stream-input
+       * 
+ * + * string consumer_node = 2; + * + * @return The bytes for consumerNode. + */ + public com.google.protobuf.ByteString getConsumerNodeBytes() { + java.lang.Object ref = consumerNode_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + consumerNode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * The name of graph node who receives the input resource.
+       * For example:
+       * input_resource:
+       * visionai.googleapis.com/v1/projects/123/locations/us-central1/clusters/456/streams/input-stream-a
+       * consumer_node: stream-input
+       * 
+ * + * string consumer_node = 2; + * + * @param value The consumerNode to set. + * @return This builder for chaining. + */ + public Builder setConsumerNode(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + consumerNode_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+       * The name of graph node who receives the input resource.
+       * For example:
+       * input_resource:
+       * visionai.googleapis.com/v1/projects/123/locations/us-central1/clusters/456/streams/input-stream-a
+       * consumer_node: stream-input
+       * 
+ * + * string consumer_node = 2; + * + * @return This builder for chaining. + */ + public Builder clearConsumerNode() { + consumerNode_ = getDefaultInstance().getConsumerNode(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+       * The name of graph node who receives the input resource.
+       * For example:
+       * input_resource:
+       * visionai.googleapis.com/v1/projects/123/locations/us-central1/clusters/456/streams/input-stream-a
+       * consumer_node: stream-input
+       * 
+ * + * string consumer_node = 2; + * + * @param value The bytes for consumerNode to set. + * @return This builder for chaining. + */ + public Builder setConsumerNodeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + consumerNode_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private java.lang.Object inputResourceBinding_ = ""; + /** + * + * + *
+       * The specific input resource binding which will consume the current Input
+       * Resource, can be ignored is there is only 1 input binding.
+       * 
+ * + * string input_resource_binding = 3; + * + * @return The inputResourceBinding. + */ + public java.lang.String getInputResourceBinding() { + java.lang.Object ref = inputResourceBinding_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + inputResourceBinding_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * The specific input resource binding which will consume the current Input
+       * Resource, can be ignored is there is only 1 input binding.
+       * 
+ * + * string input_resource_binding = 3; + * + * @return The bytes for inputResourceBinding. + */ + public com.google.protobuf.ByteString getInputResourceBindingBytes() { + java.lang.Object ref = inputResourceBinding_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + inputResourceBinding_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * The specific input resource binding which will consume the current Input
+       * Resource, can be ignored is there is only 1 input binding.
+       * 
+ * + * string input_resource_binding = 3; + * + * @param value The inputResourceBinding to set. + * @return This builder for chaining. + */ + public Builder setInputResourceBinding(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + inputResourceBinding_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+       * The specific input resource binding which will consume the current Input
+       * Resource, can be ignored is there is only 1 input binding.
+       * 
+ * + * string input_resource_binding = 3; + * + * @return This builder for chaining. + */ + public Builder clearInputResourceBinding() { + inputResourceBinding_ = getDefaultInstance().getInputResourceBinding(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + /** + * + * + *
+       * The specific input resource binding which will consume the current Input
+       * Resource, can be ignored is there is only 1 input binding.
+       * 
+ * + * string input_resource_binding = 3; + * + * @param value The bytes for inputResourceBinding to set. + * @return This builder for chaining. + */ + public Builder setInputResourceBindingBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + inputResourceBinding_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + private com.google.cloud.visionai.v1.ResourceAnnotations annotations_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.ResourceAnnotations, + com.google.cloud.visionai.v1.ResourceAnnotations.Builder, + com.google.cloud.visionai.v1.ResourceAnnotationsOrBuilder> + annotationsBuilder_; + /** + * + * + *
+       * Contains resource annotations.
+       * 
+ * + * .google.cloud.visionai.v1.ResourceAnnotations annotations = 5; + * + * @return Whether the annotations field is set. + */ + public boolean hasAnnotations() { + return ((bitField0_ & 0x00000020) != 0); + } + /** + * + * + *
+       * Contains resource annotations.
+       * 
+ * + * .google.cloud.visionai.v1.ResourceAnnotations annotations = 5; + * + * @return The annotations. + */ + public com.google.cloud.visionai.v1.ResourceAnnotations getAnnotations() { + if (annotationsBuilder_ == null) { + return annotations_ == null + ? com.google.cloud.visionai.v1.ResourceAnnotations.getDefaultInstance() + : annotations_; + } else { + return annotationsBuilder_.getMessage(); + } + } + /** + * + * + *
+       * Contains resource annotations.
+       * 
+ * + * .google.cloud.visionai.v1.ResourceAnnotations annotations = 5; + */ + public Builder setAnnotations(com.google.cloud.visionai.v1.ResourceAnnotations value) { + if (annotationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + annotations_ = value; + } else { + annotationsBuilder_.setMessage(value); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+       * Contains resource annotations.
+       * 
+ * + * .google.cloud.visionai.v1.ResourceAnnotations annotations = 5; + */ + public Builder setAnnotations( + com.google.cloud.visionai.v1.ResourceAnnotations.Builder builderForValue) { + if (annotationsBuilder_ == null) { + annotations_ = builderForValue.build(); + } else { + annotationsBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+       * Contains resource annotations.
+       * 
+ * + * .google.cloud.visionai.v1.ResourceAnnotations annotations = 5; + */ + public Builder mergeAnnotations(com.google.cloud.visionai.v1.ResourceAnnotations value) { + if (annotationsBuilder_ == null) { + if (((bitField0_ & 0x00000020) != 0) + && annotations_ != null + && annotations_ + != com.google.cloud.visionai.v1.ResourceAnnotations.getDefaultInstance()) { + getAnnotationsBuilder().mergeFrom(value); + } else { + annotations_ = value; + } + } else { + annotationsBuilder_.mergeFrom(value); + } + if (annotations_ != null) { + bitField0_ |= 0x00000020; + onChanged(); + } + return this; + } + /** + * + * + *
+       * Contains resource annotations.
+       * 
+ * + * .google.cloud.visionai.v1.ResourceAnnotations annotations = 5; + */ + public Builder clearAnnotations() { + bitField0_ = (bitField0_ & ~0x00000020); + annotations_ = null; + if (annotationsBuilder_ != null) { + annotationsBuilder_.dispose(); + annotationsBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+       * Contains resource annotations.
+       * 
+ * + * .google.cloud.visionai.v1.ResourceAnnotations annotations = 5; + */ + public com.google.cloud.visionai.v1.ResourceAnnotations.Builder getAnnotationsBuilder() { + bitField0_ |= 0x00000020; + onChanged(); + return getAnnotationsFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Contains resource annotations.
+       * 
+ * + * .google.cloud.visionai.v1.ResourceAnnotations annotations = 5; + */ + public com.google.cloud.visionai.v1.ResourceAnnotationsOrBuilder getAnnotationsOrBuilder() { + if (annotationsBuilder_ != null) { + return annotationsBuilder_.getMessageOrBuilder(); + } else { + return annotations_ == null + ? com.google.cloud.visionai.v1.ResourceAnnotations.getDefaultInstance() + : annotations_; + } + } + /** + * + * + *
+       * Contains resource annotations.
+       * 
+ * + * .google.cloud.visionai.v1.ResourceAnnotations annotations = 5; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.ResourceAnnotations, + com.google.cloud.visionai.v1.ResourceAnnotations.Builder, + com.google.cloud.visionai.v1.ResourceAnnotationsOrBuilder> + getAnnotationsFieldBuilder() { + if (annotationsBuilder_ == null) { + annotationsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.ResourceAnnotations, + com.google.cloud.visionai.v1.ResourceAnnotations.Builder, + com.google.cloud.visionai.v1.ResourceAnnotationsOrBuilder>( + getAnnotations(), getParentForChildren(), isClean()); + annotations_ = null; + } + return annotationsBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.Instance.InputResource) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.Instance.InputResource) + private static final com.google.cloud.visionai.v1.Instance.InputResource DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.Instance.InputResource(); + } + + public static com.google.cloud.visionai.v1.Instance.InputResource getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public InputResource parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.Instance.InputResource getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface OutputResourceOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.Instance.OutputResource) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * The output resource name for the current application instance.
+     * 
+ * + * string output_resource = 1; + * + * @return The outputResource. + */ + java.lang.String getOutputResource(); + /** + * + * + *
+     * The output resource name for the current application instance.
+     * 
+ * + * string output_resource = 1; + * + * @return The bytes for outputResource. + */ + com.google.protobuf.ByteString getOutputResourceBytes(); + + /** + * + * + *
+     * The name of graph node who produces the output resource name.
+     * For example:
+     * output_resource:
+     * /projects/123/locations/us-central1/clusters/456/streams/output-application-789-stream-a-occupancy-counting
+     * producer_node: occupancy-counting
+     * 
+ * + * string producer_node = 2; + * + * @return The producerNode. + */ + java.lang.String getProducerNode(); + /** + * + * + *
+     * The name of graph node who produces the output resource name.
+     * For example:
+     * output_resource:
+     * /projects/123/locations/us-central1/clusters/456/streams/output-application-789-stream-a-occupancy-counting
+     * producer_node: occupancy-counting
+     * 
+ * + * string producer_node = 2; + * + * @return The bytes for producerNode. + */ + com.google.protobuf.ByteString getProducerNodeBytes(); + + /** + * + * + *
+     * The specific output resource binding which produces the current
+     * OutputResource.
+     * 
+ * + * string output_resource_binding = 4; + * + * @return The outputResourceBinding. + */ + java.lang.String getOutputResourceBinding(); + /** + * + * + *
+     * The specific output resource binding which produces the current
+     * OutputResource.
+     * 
+ * + * string output_resource_binding = 4; + * + * @return The bytes for outputResourceBinding. + */ + com.google.protobuf.ByteString getOutputResourceBindingBytes(); + + /** + * + * + *
+     * Output only. Whether the output resource is temporary which means the
+     * resource is generated during the deployment of the application. Temporary
+     * resource will be deleted during the undeployment of the application.
+     * 
+ * + * bool is_temporary = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The isTemporary. + */ + boolean getIsTemporary(); + + /** + * + * + *
+     * Output only. Whether the output resource is created automatically by the
+     * Vision AI App Platform.
+     * 
+ * + * bool autogen = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The autogen. + */ + boolean getAutogen(); + } + /** + * + * + *
+   * Message of output resource used in one application instance.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.Instance.OutputResource} + */ + public static final class OutputResource extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.Instance.OutputResource) + OutputResourceOrBuilder { + private static final long serialVersionUID = 0L; + // Use OutputResource.newBuilder() to construct. + private OutputResource(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private OutputResource() { + outputResource_ = ""; + producerNode_ = ""; + outputResourceBinding_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new OutputResource(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_Instance_OutputResource_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_Instance_OutputResource_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.Instance.OutputResource.class, + com.google.cloud.visionai.v1.Instance.OutputResource.Builder.class); + } + + public static final int OUTPUT_RESOURCE_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object outputResource_ = ""; + /** + * + * + *
+     * The output resource name for the current application instance.
+     * 
+ * + * string output_resource = 1; + * + * @return The outputResource. + */ + @java.lang.Override + public java.lang.String getOutputResource() { + java.lang.Object ref = outputResource_; + 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(); + outputResource_ = s; + return s; + } + } + /** + * + * + *
+     * The output resource name for the current application instance.
+     * 
+ * + * string output_resource = 1; + * + * @return The bytes for outputResource. + */ + @java.lang.Override + public com.google.protobuf.ByteString getOutputResourceBytes() { + java.lang.Object ref = outputResource_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + outputResource_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PRODUCER_NODE_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object producerNode_ = ""; + /** + * + * + *
+     * The name of graph node who produces the output resource name.
+     * For example:
+     * output_resource:
+     * /projects/123/locations/us-central1/clusters/456/streams/output-application-789-stream-a-occupancy-counting
+     * producer_node: occupancy-counting
+     * 
+ * + * string producer_node = 2; + * + * @return The producerNode. + */ + @java.lang.Override + public java.lang.String getProducerNode() { + java.lang.Object ref = producerNode_; + 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(); + producerNode_ = s; + return s; + } + } + /** + * + * + *
+     * The name of graph node who produces the output resource name.
+     * For example:
+     * output_resource:
+     * /projects/123/locations/us-central1/clusters/456/streams/output-application-789-stream-a-occupancy-counting
+     * producer_node: occupancy-counting
+     * 
+ * + * string producer_node = 2; + * + * @return The bytes for producerNode. + */ + @java.lang.Override + public com.google.protobuf.ByteString getProducerNodeBytes() { + java.lang.Object ref = producerNode_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + producerNode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int OUTPUT_RESOURCE_BINDING_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object outputResourceBinding_ = ""; + /** + * + * + *
+     * The specific output resource binding which produces the current
+     * OutputResource.
+     * 
+ * + * string output_resource_binding = 4; + * + * @return The outputResourceBinding. + */ + @java.lang.Override + public java.lang.String getOutputResourceBinding() { + java.lang.Object ref = outputResourceBinding_; + 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(); + outputResourceBinding_ = s; + return s; + } + } + /** + * + * + *
+     * The specific output resource binding which produces the current
+     * OutputResource.
+     * 
+ * + * string output_resource_binding = 4; + * + * @return The bytes for outputResourceBinding. + */ + @java.lang.Override + public com.google.protobuf.ByteString getOutputResourceBindingBytes() { + java.lang.Object ref = outputResourceBinding_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + outputResourceBinding_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int IS_TEMPORARY_FIELD_NUMBER = 3; + private boolean isTemporary_ = false; + /** + * + * + *
+     * Output only. Whether the output resource is temporary which means the
+     * resource is generated during the deployment of the application. Temporary
+     * resource will be deleted during the undeployment of the application.
+     * 
+ * + * bool is_temporary = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The isTemporary. + */ + @java.lang.Override + public boolean getIsTemporary() { + return isTemporary_; + } + + public static final int AUTOGEN_FIELD_NUMBER = 5; + private boolean autogen_ = false; + /** + * + * + *
+     * Output only. Whether the output resource is created automatically by the
+     * Vision AI App Platform.
+     * 
+ * + * bool autogen = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The autogen. + */ + @java.lang.Override + public boolean getAutogen() { + return autogen_; + } + + 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(outputResource_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, outputResource_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(producerNode_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, producerNode_); + } + if (isTemporary_ != false) { + output.writeBool(3, isTemporary_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(outputResourceBinding_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, outputResourceBinding_); + } + if (autogen_ != false) { + output.writeBool(5, autogen_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(outputResource_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, outputResource_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(producerNode_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, producerNode_); + } + if (isTemporary_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(3, isTemporary_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(outputResourceBinding_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, outputResourceBinding_); + } + if (autogen_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(5, autogen_); + } + size += getUnknownFields().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.visionai.v1.Instance.OutputResource)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.Instance.OutputResource other = + (com.google.cloud.visionai.v1.Instance.OutputResource) obj; + + if (!getOutputResource().equals(other.getOutputResource())) return false; + if (!getProducerNode().equals(other.getProducerNode())) return false; + if (!getOutputResourceBinding().equals(other.getOutputResourceBinding())) return false; + if (getIsTemporary() != other.getIsTemporary()) return false; + if (getAutogen() != other.getAutogen()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + OUTPUT_RESOURCE_FIELD_NUMBER; + hash = (53 * hash) + getOutputResource().hashCode(); + hash = (37 * hash) + PRODUCER_NODE_FIELD_NUMBER; + hash = (53 * hash) + getProducerNode().hashCode(); + hash = (37 * hash) + OUTPUT_RESOURCE_BINDING_FIELD_NUMBER; + hash = (53 * hash) + getOutputResourceBinding().hashCode(); + hash = (37 * hash) + IS_TEMPORARY_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getIsTemporary()); + hash = (37 * hash) + AUTOGEN_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getAutogen()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.Instance.OutputResource parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.Instance.OutputResource 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.visionai.v1.Instance.OutputResource parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.Instance.OutputResource 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.visionai.v1.Instance.OutputResource parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.Instance.OutputResource parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.Instance.OutputResource parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.Instance.OutputResource 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.visionai.v1.Instance.OutputResource parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.Instance.OutputResource 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.visionai.v1.Instance.OutputResource parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.Instance.OutputResource 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.visionai.v1.Instance.OutputResource 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; + } + /** + * + * + *
+     * Message of output resource used in one application instance.
+     * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.Instance.OutputResource} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.Instance.OutputResource) + com.google.cloud.visionai.v1.Instance.OutputResourceOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_Instance_OutputResource_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_Instance_OutputResource_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.Instance.OutputResource.class, + com.google.cloud.visionai.v1.Instance.OutputResource.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.Instance.OutputResource.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + outputResource_ = ""; + producerNode_ = ""; + outputResourceBinding_ = ""; + isTemporary_ = false; + autogen_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_Instance_OutputResource_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.Instance.OutputResource getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.Instance.OutputResource.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.Instance.OutputResource build() { + com.google.cloud.visionai.v1.Instance.OutputResource result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.Instance.OutputResource buildPartial() { + com.google.cloud.visionai.v1.Instance.OutputResource result = + new com.google.cloud.visionai.v1.Instance.OutputResource(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.visionai.v1.Instance.OutputResource result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.outputResource_ = outputResource_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.producerNode_ = producerNode_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.outputResourceBinding_ = outputResourceBinding_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.isTemporary_ = isTemporary_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.autogen_ = autogen_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.Instance.OutputResource) { + return mergeFrom((com.google.cloud.visionai.v1.Instance.OutputResource) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.Instance.OutputResource other) { + if (other == com.google.cloud.visionai.v1.Instance.OutputResource.getDefaultInstance()) + return this; + if (!other.getOutputResource().isEmpty()) { + outputResource_ = other.outputResource_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getProducerNode().isEmpty()) { + producerNode_ = other.producerNode_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getOutputResourceBinding().isEmpty()) { + outputResourceBinding_ = other.outputResourceBinding_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (other.getIsTemporary() != false) { + setIsTemporary(other.getIsTemporary()); + } + if (other.getAutogen() != false) { + setAutogen(other.getAutogen()); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + outputResource_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + producerNode_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 24: + { + isTemporary_ = input.readBool(); + bitField0_ |= 0x00000008; + break; + } // case 24 + case 34: + { + outputResourceBinding_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 34 + case 40: + { + autogen_ = input.readBool(); + bitField0_ |= 0x00000010; + break; + } // case 40 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object outputResource_ = ""; + /** + * + * + *
+       * The output resource name for the current application instance.
+       * 
+ * + * string output_resource = 1; + * + * @return The outputResource. + */ + public java.lang.String getOutputResource() { + java.lang.Object ref = outputResource_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + outputResource_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * The output resource name for the current application instance.
+       * 
+ * + * string output_resource = 1; + * + * @return The bytes for outputResource. + */ + public com.google.protobuf.ByteString getOutputResourceBytes() { + java.lang.Object ref = outputResource_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + outputResource_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * The output resource name for the current application instance.
+       * 
+ * + * string output_resource = 1; + * + * @param value The outputResource to set. + * @return This builder for chaining. + */ + public Builder setOutputResource(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + outputResource_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * The output resource name for the current application instance.
+       * 
+ * + * string output_resource = 1; + * + * @return This builder for chaining. + */ + public Builder clearOutputResource() { + outputResource_ = getDefaultInstance().getOutputResource(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+       * The output resource name for the current application instance.
+       * 
+ * + * string output_resource = 1; + * + * @param value The bytes for outputResource to set. + * @return This builder for chaining. + */ + public Builder setOutputResourceBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + outputResource_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object producerNode_ = ""; + /** + * + * + *
+       * The name of graph node who produces the output resource name.
+       * For example:
+       * output_resource:
+       * /projects/123/locations/us-central1/clusters/456/streams/output-application-789-stream-a-occupancy-counting
+       * producer_node: occupancy-counting
+       * 
+ * + * string producer_node = 2; + * + * @return The producerNode. + */ + public java.lang.String getProducerNode() { + java.lang.Object ref = producerNode_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + producerNode_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * The name of graph node who produces the output resource name.
+       * For example:
+       * output_resource:
+       * /projects/123/locations/us-central1/clusters/456/streams/output-application-789-stream-a-occupancy-counting
+       * producer_node: occupancy-counting
+       * 
+ * + * string producer_node = 2; + * + * @return The bytes for producerNode. + */ + public com.google.protobuf.ByteString getProducerNodeBytes() { + java.lang.Object ref = producerNode_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + producerNode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * The name of graph node who produces the output resource name.
+       * For example:
+       * output_resource:
+       * /projects/123/locations/us-central1/clusters/456/streams/output-application-789-stream-a-occupancy-counting
+       * producer_node: occupancy-counting
+       * 
+ * + * string producer_node = 2; + * + * @param value The producerNode to set. + * @return This builder for chaining. + */ + public Builder setProducerNode(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + producerNode_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * The name of graph node who produces the output resource name.
+       * For example:
+       * output_resource:
+       * /projects/123/locations/us-central1/clusters/456/streams/output-application-789-stream-a-occupancy-counting
+       * producer_node: occupancy-counting
+       * 
+ * + * string producer_node = 2; + * + * @return This builder for chaining. + */ + public Builder clearProducerNode() { + producerNode_ = getDefaultInstance().getProducerNode(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+       * The name of graph node who produces the output resource name.
+       * For example:
+       * output_resource:
+       * /projects/123/locations/us-central1/clusters/456/streams/output-application-789-stream-a-occupancy-counting
+       * producer_node: occupancy-counting
+       * 
+ * + * string producer_node = 2; + * + * @param value The bytes for producerNode to set. + * @return This builder for chaining. + */ + public Builder setProducerNodeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + producerNode_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object outputResourceBinding_ = ""; + /** + * + * + *
+       * The specific output resource binding which produces the current
+       * OutputResource.
+       * 
+ * + * string output_resource_binding = 4; + * + * @return The outputResourceBinding. + */ + public java.lang.String getOutputResourceBinding() { + java.lang.Object ref = outputResourceBinding_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + outputResourceBinding_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * The specific output resource binding which produces the current
+       * OutputResource.
+       * 
+ * + * string output_resource_binding = 4; + * + * @return The bytes for outputResourceBinding. + */ + public com.google.protobuf.ByteString getOutputResourceBindingBytes() { + java.lang.Object ref = outputResourceBinding_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + outputResourceBinding_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * The specific output resource binding which produces the current
+       * OutputResource.
+       * 
+ * + * string output_resource_binding = 4; + * + * @param value The outputResourceBinding to set. + * @return This builder for chaining. + */ + public Builder setOutputResourceBinding(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + outputResourceBinding_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+       * The specific output resource binding which produces the current
+       * OutputResource.
+       * 
+ * + * string output_resource_binding = 4; + * + * @return This builder for chaining. + */ + public Builder clearOutputResourceBinding() { + outputResourceBinding_ = getDefaultInstance().getOutputResourceBinding(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+       * The specific output resource binding which produces the current
+       * OutputResource.
+       * 
+ * + * string output_resource_binding = 4; + * + * @param value The bytes for outputResourceBinding to set. + * @return This builder for chaining. + */ + public Builder setOutputResourceBindingBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + outputResourceBinding_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private boolean isTemporary_; + /** + * + * + *
+       * Output only. Whether the output resource is temporary which means the
+       * resource is generated during the deployment of the application. Temporary
+       * resource will be deleted during the undeployment of the application.
+       * 
+ * + * bool is_temporary = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The isTemporary. + */ + @java.lang.Override + public boolean getIsTemporary() { + return isTemporary_; + } + /** + * + * + *
+       * Output only. Whether the output resource is temporary which means the
+       * resource is generated during the deployment of the application. Temporary
+       * resource will be deleted during the undeployment of the application.
+       * 
+ * + * bool is_temporary = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The isTemporary to set. + * @return This builder for chaining. + */ + public Builder setIsTemporary(boolean value) { + + isTemporary_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+       * Output only. Whether the output resource is temporary which means the
+       * resource is generated during the deployment of the application. Temporary
+       * resource will be deleted during the undeployment of the application.
+       * 
+ * + * bool is_temporary = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearIsTemporary() { + bitField0_ = (bitField0_ & ~0x00000008); + isTemporary_ = false; + onChanged(); + return this; + } + + private boolean autogen_; + /** + * + * + *
+       * Output only. Whether the output resource is created automatically by the
+       * Vision AI App Platform.
+       * 
+ * + * bool autogen = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The autogen. + */ + @java.lang.Override + public boolean getAutogen() { + return autogen_; + } + /** + * + * + *
+       * Output only. Whether the output resource is created automatically by the
+       * Vision AI App Platform.
+       * 
+ * + * bool autogen = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The autogen to set. + * @return This builder for chaining. + */ + public Builder setAutogen(boolean value) { + + autogen_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+       * Output only. Whether the output resource is created automatically by the
+       * Vision AI App Platform.
+       * 
+ * + * bool autogen = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearAutogen() { + bitField0_ = (bitField0_ & ~0x00000010); + autogen_ = false; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.Instance.OutputResource) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.Instance.OutputResource) + private static final com.google.cloud.visionai.v1.Instance.OutputResource DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.Instance.OutputResource(); + } + + public static com.google.cloud.visionai.v1.Instance.OutputResource getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public OutputResource parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.Instance.OutputResource getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int bitField0_; + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Output only. name of resource
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + 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(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. name of resource
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CREATE_TIME_FIELD_NUMBER = 2; + private com.google.protobuf.Timestamp createTime_; + /** + * + * + *
+   * Output only. [Output only] Create timestamp
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * Output only. [Output only] Create timestamp
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + /** + * + * + *
+   * Output only. [Output only] Create timestamp
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + + public static final int UPDATE_TIME_FIELD_NUMBER = 8; + private com.google.protobuf.Timestamp updateTime_; + /** + * + * + *
+   * Output only. [Output only] Update timestamp
+   * 
+ * + * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + @java.lang.Override + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+   * Output only. [Output only] Update timestamp
+   * 
+ * + * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getUpdateTime() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + /** + * + * + *
+   * Output only. [Output only] Update timestamp
+   * 
+ * + * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + + public static final int LABELS_FIELD_NUMBER = 3; + + private static final class LabelsDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_Instance_LabelsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + + @SuppressWarnings("serial") + private com.google.protobuf.MapField labels_; + + private com.google.protobuf.MapField internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + /** + * + * + *
+   * Labels as key value pairs
+   * 
+ * + * map<string, string> labels = 3; + */ + @java.lang.Override + public boolean containsLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetLabels().getMap().containsKey(key); + } + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + /** + * + * + *
+   * Labels as key value pairs
+   * 
+ * + * map<string, string> labels = 3; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + * + * + *
+   * Labels as key value pairs
+   * 
+ * + * map<string, string> labels = 3; + */ + @java.lang.Override + public /* nullable */ java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+   * Labels as key value pairs
+   * 
+ * + * map<string, string> labels = 3; + */ + @java.lang.Override + public java.lang.String getLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int DISPLAY_NAME_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object displayName_ = ""; + /** + * + * + *
+   * Required. A user friendly display name for the solution.
+   * 
+ * + * string display_name = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The displayName. + */ + @java.lang.Override + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + 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(); + displayName_ = s; + return s; + } + } + /** + * + * + *
+   * Required. A user friendly display name for the solution.
+   * 
+ * + * string display_name = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for displayName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DESCRIPTION_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object description_ = ""; + /** + * + * + *
+   * A description for this instance.
+   * 
+ * + * string description = 5; + * + * @return The description. + */ + @java.lang.Override + 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; + } + } + /** + * + * + *
+   * A description for this instance.
+   * 
+ * + * string description = 5; + * + * @return The bytes for description. + */ + @java.lang.Override + 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 INSTANCE_TYPE_FIELD_NUMBER = 10; + private int instanceType_ = 0; + /** + * + * + *
+   * The instance type for the current instance.
+   * 
+ * + * .google.cloud.visionai.v1.Instance.InstanceType instance_type = 10; + * + * @return The enum numeric value on the wire for instanceType. + */ + @java.lang.Override + public int getInstanceTypeValue() { + return instanceType_; + } + /** + * + * + *
+   * The instance type for the current instance.
+   * 
+ * + * .google.cloud.visionai.v1.Instance.InstanceType instance_type = 10; + * + * @return The instanceType. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.Instance.InstanceType getInstanceType() { + com.google.cloud.visionai.v1.Instance.InstanceType result = + com.google.cloud.visionai.v1.Instance.InstanceType.forNumber(instanceType_); + return result == null + ? com.google.cloud.visionai.v1.Instance.InstanceType.UNRECOGNIZED + : result; + } + + public static final int INPUT_RESOURCES_FIELD_NUMBER = 6; + + @SuppressWarnings("serial") + private java.util.List inputResources_; + /** + * + * + *
+   * The input resources for the current application instance.
+   * For example:
+   * input_resources:
+   * visionai.googleapis.com/v1/projects/123/locations/us-central1/clusters/456/streams/stream-a
+   * 
+ * + * repeated .google.cloud.visionai.v1.Instance.InputResource input_resources = 6; + */ + @java.lang.Override + public java.util.List + getInputResourcesList() { + return inputResources_; + } + /** + * + * + *
+   * The input resources for the current application instance.
+   * For example:
+   * input_resources:
+   * visionai.googleapis.com/v1/projects/123/locations/us-central1/clusters/456/streams/stream-a
+   * 
+ * + * repeated .google.cloud.visionai.v1.Instance.InputResource input_resources = 6; + */ + @java.lang.Override + public java.util.List + getInputResourcesOrBuilderList() { + return inputResources_; + } + /** + * + * + *
+   * The input resources for the current application instance.
+   * For example:
+   * input_resources:
+   * visionai.googleapis.com/v1/projects/123/locations/us-central1/clusters/456/streams/stream-a
+   * 
+ * + * repeated .google.cloud.visionai.v1.Instance.InputResource input_resources = 6; + */ + @java.lang.Override + public int getInputResourcesCount() { + return inputResources_.size(); + } + /** + * + * + *
+   * The input resources for the current application instance.
+   * For example:
+   * input_resources:
+   * visionai.googleapis.com/v1/projects/123/locations/us-central1/clusters/456/streams/stream-a
+   * 
+ * + * repeated .google.cloud.visionai.v1.Instance.InputResource input_resources = 6; + */ + @java.lang.Override + public com.google.cloud.visionai.v1.Instance.InputResource getInputResources(int index) { + return inputResources_.get(index); + } + /** + * + * + *
+   * The input resources for the current application instance.
+   * For example:
+   * input_resources:
+   * visionai.googleapis.com/v1/projects/123/locations/us-central1/clusters/456/streams/stream-a
+   * 
+ * + * repeated .google.cloud.visionai.v1.Instance.InputResource input_resources = 6; + */ + @java.lang.Override + public com.google.cloud.visionai.v1.Instance.InputResourceOrBuilder getInputResourcesOrBuilder( + int index) { + return inputResources_.get(index); + } + + public static final int OUTPUT_RESOURCES_FIELD_NUMBER = 7; + + @SuppressWarnings("serial") + private java.util.List outputResources_; + /** + * + * + *
+   * All the output resources associated to one application instance.
+   * 
+ * + * repeated .google.cloud.visionai.v1.Instance.OutputResource output_resources = 7; + */ + @java.lang.Override + public java.util.List + getOutputResourcesList() { + return outputResources_; + } + /** + * + * + *
+   * All the output resources associated to one application instance.
+   * 
+ * + * repeated .google.cloud.visionai.v1.Instance.OutputResource output_resources = 7; + */ + @java.lang.Override + public java.util.List + getOutputResourcesOrBuilderList() { + return outputResources_; + } + /** + * + * + *
+   * All the output resources associated to one application instance.
+   * 
+ * + * repeated .google.cloud.visionai.v1.Instance.OutputResource output_resources = 7; + */ + @java.lang.Override + public int getOutputResourcesCount() { + return outputResources_.size(); + } + /** + * + * + *
+   * All the output resources associated to one application instance.
+   * 
+ * + * repeated .google.cloud.visionai.v1.Instance.OutputResource output_resources = 7; + */ + @java.lang.Override + public com.google.cloud.visionai.v1.Instance.OutputResource getOutputResources(int index) { + return outputResources_.get(index); + } + /** + * + * + *
+   * All the output resources associated to one application instance.
+   * 
+ * + * repeated .google.cloud.visionai.v1.Instance.OutputResource output_resources = 7; + */ + @java.lang.Override + public com.google.cloud.visionai.v1.Instance.OutputResourceOrBuilder getOutputResourcesOrBuilder( + int index) { + return outputResources_.get(index); + } + + public static final int STATE_FIELD_NUMBER = 9; + private int state_ = 0; + /** + * + * + *
+   * State of the instance.
+   * 
+ * + * .google.cloud.visionai.v1.Instance.State state = 9; + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + /** + * + * + *
+   * State of the instance.
+   * 
+ * + * .google.cloud.visionai.v1.Instance.State state = 9; + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.Instance.State getState() { + com.google.cloud.visionai.v1.Instance.State result = + com.google.cloud.visionai.v1.Instance.State.forNumber(state_); + return result == null ? com.google.cloud.visionai.v1.Instance.State.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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getCreateTime()); + } + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 3); + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, displayName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, description_); + } + for (int i = 0; i < inputResources_.size(); i++) { + output.writeMessage(6, inputResources_.get(i)); + } + for (int i = 0; i < outputResources_.size(); i++) { + output.writeMessage(7, outputResources_.get(i)); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(8, getUpdateTime()); + } + if (state_ != com.google.cloud.visionai.v1.Instance.State.STATE_UNSPECIFIED.getNumber()) { + output.writeEnum(9, state_); + } + if (instanceType_ + != com.google.cloud.visionai.v1.Instance.InstanceType.INSTANCE_TYPE_UNSPECIFIED + .getNumber()) { + output.writeEnum(10, instanceType_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getCreateTime()); + } + for (java.util.Map.Entry entry : + internalGetLabels().getMap().entrySet()) { + com.google.protobuf.MapEntry labels__ = + LabelsDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, labels__); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, displayName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, description_); + } + for (int i = 0; i < inputResources_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, inputResources_.get(i)); + } + for (int i = 0; i < outputResources_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, outputResources_.get(i)); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(8, getUpdateTime()); + } + if (state_ != com.google.cloud.visionai.v1.Instance.State.STATE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(9, state_); + } + if (instanceType_ + != com.google.cloud.visionai.v1.Instance.InstanceType.INSTANCE_TYPE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(10, instanceType_); + } + size += getUnknownFields().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.visionai.v1.Instance)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.Instance other = (com.google.cloud.visionai.v1.Instance) obj; + + if (!getName().equals(other.getName())) return false; + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime().equals(other.getCreateTime())) return false; + } + if (hasUpdateTime() != other.hasUpdateTime()) return false; + if (hasUpdateTime()) { + if (!getUpdateTime().equals(other.getUpdateTime())) return false; + } + if (!internalGetLabels().equals(other.internalGetLabels())) return false; + if (!getDisplayName().equals(other.getDisplayName())) return false; + if (!getDescription().equals(other.getDescription())) return false; + if (instanceType_ != other.instanceType_) return false; + if (!getInputResourcesList().equals(other.getInputResourcesList())) return false; + if (!getOutputResourcesList().equals(other.getOutputResourcesList())) return false; + if (state_ != other.state_) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasUpdateTime()) { + hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getUpdateTime().hashCode(); + } + if (!internalGetLabels().getMap().isEmpty()) { + hash = (37 * hash) + LABELS_FIELD_NUMBER; + hash = (53 * hash) + internalGetLabels().hashCode(); + } + hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDisplayName().hashCode(); + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + hash = (37 * hash) + INSTANCE_TYPE_FIELD_NUMBER; + hash = (53 * hash) + instanceType_; + if (getInputResourcesCount() > 0) { + hash = (37 * hash) + INPUT_RESOURCES_FIELD_NUMBER; + hash = (53 * hash) + getInputResourcesList().hashCode(); + } + if (getOutputResourcesCount() > 0) { + hash = (37 * hash) + OUTPUT_RESOURCES_FIELD_NUMBER; + hash = (53 * hash) + getOutputResourcesList().hashCode(); + } + hash = (37 * hash) + STATE_FIELD_NUMBER; + hash = (53 * hash) + state_; + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.Instance parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.Instance 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.visionai.v1.Instance parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.Instance 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.visionai.v1.Instance parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.Instance parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.Instance parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.Instance 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.visionai.v1.Instance parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.Instance 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.visionai.v1.Instance parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.Instance 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.visionai.v1.Instance 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; + } + /** + * + * + *
+   * Message describing Instance object
+   * Next ID: 12
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.Instance} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.Instance) + com.google.cloud.visionai.v1.InstanceOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_Instance_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 3: + return internalGetLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( + int number) { + switch (number) { + case 3: + return internalGetMutableLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_Instance_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.Instance.class, + com.google.cloud.visionai.v1.Instance.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.Instance.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getCreateTimeFieldBuilder(); + getUpdateTimeFieldBuilder(); + getInputResourcesFieldBuilder(); + getOutputResourcesFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + internalGetMutableLabels().clear(); + displayName_ = ""; + description_ = ""; + instanceType_ = 0; + if (inputResourcesBuilder_ == null) { + inputResources_ = java.util.Collections.emptyList(); + } else { + inputResources_ = null; + inputResourcesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000080); + if (outputResourcesBuilder_ == null) { + outputResources_ = java.util.Collections.emptyList(); + } else { + outputResources_ = null; + outputResourcesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000100); + state_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_Instance_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.Instance getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.Instance.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.Instance build() { + com.google.cloud.visionai.v1.Instance result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.Instance buildPartial() { + com.google.cloud.visionai.v1.Instance result = + new com.google.cloud.visionai.v1.Instance(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.google.cloud.visionai.v1.Instance result) { + if (inputResourcesBuilder_ == null) { + if (((bitField0_ & 0x00000080) != 0)) { + inputResources_ = java.util.Collections.unmodifiableList(inputResources_); + bitField0_ = (bitField0_ & ~0x00000080); + } + result.inputResources_ = inputResources_; + } else { + result.inputResources_ = inputResourcesBuilder_.build(); + } + if (outputResourcesBuilder_ == null) { + if (((bitField0_ & 0x00000100) != 0)) { + outputResources_ = java.util.Collections.unmodifiableList(outputResources_); + bitField0_ = (bitField0_ & ~0x00000100); + } + result.outputResources_ = outputResources_; + } else { + result.outputResources_ = outputResourcesBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.visionai.v1.Instance result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.updateTime_ = updateTimeBuilder_ == null ? updateTime_ : updateTimeBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.labels_ = internalGetLabels(); + result.labels_.makeImmutable(); + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.displayName_ = displayName_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.description_ = description_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.instanceType_ = instanceType_; + } + if (((from_bitField0_ & 0x00000200) != 0)) { + result.state_ = state_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.Instance) { + return mergeFrom((com.google.cloud.visionai.v1.Instance) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.Instance other) { + if (other == com.google.cloud.visionai.v1.Instance.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + internalGetMutableLabels().mergeFrom(other.internalGetLabels()); + bitField0_ |= 0x00000008; + if (!other.getDisplayName().isEmpty()) { + displayName_ = other.displayName_; + bitField0_ |= 0x00000010; + onChanged(); + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + bitField0_ |= 0x00000020; + onChanged(); + } + if (other.instanceType_ != 0) { + setInstanceTypeValue(other.getInstanceTypeValue()); + } + if (inputResourcesBuilder_ == null) { + if (!other.inputResources_.isEmpty()) { + if (inputResources_.isEmpty()) { + inputResources_ = other.inputResources_; + bitField0_ = (bitField0_ & ~0x00000080); + } else { + ensureInputResourcesIsMutable(); + inputResources_.addAll(other.inputResources_); + } + onChanged(); + } + } else { + if (!other.inputResources_.isEmpty()) { + if (inputResourcesBuilder_.isEmpty()) { + inputResourcesBuilder_.dispose(); + inputResourcesBuilder_ = null; + inputResources_ = other.inputResources_; + bitField0_ = (bitField0_ & ~0x00000080); + inputResourcesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getInputResourcesFieldBuilder() + : null; + } else { + inputResourcesBuilder_.addAllMessages(other.inputResources_); + } + } + } + if (outputResourcesBuilder_ == null) { + if (!other.outputResources_.isEmpty()) { + if (outputResources_.isEmpty()) { + outputResources_ = other.outputResources_; + bitField0_ = (bitField0_ & ~0x00000100); + } else { + ensureOutputResourcesIsMutable(); + outputResources_.addAll(other.outputResources_); + } + onChanged(); + } + } else { + if (!other.outputResources_.isEmpty()) { + if (outputResourcesBuilder_.isEmpty()) { + outputResourcesBuilder_.dispose(); + outputResourcesBuilder_ = null; + outputResources_ = other.outputResources_; + bitField0_ = (bitField0_ & ~0x00000100); + outputResourcesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getOutputResourcesFieldBuilder() + : null; + } else { + outputResourcesBuilder_.addAllMessages(other.outputResources_); + } + } + } + if (other.state_ != 0) { + setStateValue(other.getStateValue()); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + com.google.protobuf.MapEntry labels__ = + input.readMessage( + LabelsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableLabels() + .getMutableMap() + .put(labels__.getKey(), labels__.getValue()); + bitField0_ |= 0x00000008; + break; + } // case 26 + case 34: + { + displayName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 34 + case 42: + { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case 42 + case 50: + { + com.google.cloud.visionai.v1.Instance.InputResource m = + input.readMessage( + com.google.cloud.visionai.v1.Instance.InputResource.parser(), + extensionRegistry); + if (inputResourcesBuilder_ == null) { + ensureInputResourcesIsMutable(); + inputResources_.add(m); + } else { + inputResourcesBuilder_.addMessage(m); + } + break; + } // case 50 + case 58: + { + com.google.cloud.visionai.v1.Instance.OutputResource m = + input.readMessage( + com.google.cloud.visionai.v1.Instance.OutputResource.parser(), + extensionRegistry); + if (outputResourcesBuilder_ == null) { + ensureOutputResourcesIsMutable(); + outputResources_.add(m); + } else { + outputResourcesBuilder_.addMessage(m); + } + break; + } // case 58 + case 66: + { + input.readMessage(getUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 66 + case 72: + { + state_ = input.readEnum(); + bitField0_ |= 0x00000200; + break; + } // case 72 + case 80: + { + instanceType_ = input.readEnum(); + bitField0_ |= 0x00000040; + break; + } // case 80 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Output only. name of resource
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. name of resource
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. name of resource
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. name of resource
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. name of resource
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + createTimeBuilder_; + /** + * + * + *
+     * Output only. [Output only] Create timestamp
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * Output only. [Output only] Create timestamp
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. [Output only] Create timestamp
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + } else { + createTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. [Output only] Create timestamp
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. [Output only] Create timestamp
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && createTime_ != null + && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getCreateTimeBuilder().mergeFrom(value); + } else { + createTime_ = value; + } + } else { + createTimeBuilder_.mergeFrom(value); + } + if (createTime_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Output only. [Output only] Create timestamp
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearCreateTime() { + bitField0_ = (bitField0_ & ~0x00000002); + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. [Output only] Create timestamp
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. [Output only] Create timestamp
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } + } + /** + * + * + *
+     * Output only. [Output only] Create timestamp
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), getParentForChildren(), isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private com.google.protobuf.Timestamp updateTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + updateTimeBuilder_; + /** + * + * + *
+     * Output only. [Output only] Update timestamp
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+     * Output only. [Output only] Update timestamp
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + public com.google.protobuf.Timestamp getUpdateTime() { + if (updateTimeBuilder_ == null) { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } else { + return updateTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. [Output only] Update timestamp
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateTime_ = value; + } else { + updateTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. [Output only] Update timestamp
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (updateTimeBuilder_ == null) { + updateTime_ = builderForValue.build(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. [Output only] Update timestamp
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && updateTime_ != null + && updateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getUpdateTimeBuilder().mergeFrom(value); + } else { + updateTime_ = value; + } + } else { + updateTimeBuilder_.mergeFrom(value); + } + if (updateTime_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Output only. [Output only] Update timestamp
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearUpdateTime() { + bitField0_ = (bitField0_ & ~0x00000004); + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. [Output only] Update timestamp
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getUpdateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. [Output only] Update timestamp
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + if (updateTimeBuilder_ != null) { + return updateTimeBuilder_.getMessageOrBuilder(); + } else { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } + } + /** + * + * + *
+     * Output only. [Output only] Update timestamp
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + 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_; + } + + private com.google.protobuf.MapField labels_; + + private com.google.protobuf.MapField internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + + private com.google.protobuf.MapField + internalGetMutableLabels() { + if (labels_ == null) { + labels_ = com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry); + } + if (!labels_.isMutable()) { + labels_ = labels_.copy(); + } + bitField0_ |= 0x00000008; + onChanged(); + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + /** + * + * + *
+     * Labels as key value pairs
+     * 
+ * + * map<string, string> labels = 3; + */ + @java.lang.Override + public boolean containsLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetLabels().getMap().containsKey(key); + } + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + /** + * + * + *
+     * Labels as key value pairs
+     * 
+ * + * map<string, string> labels = 3; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + * + * + *
+     * Labels as key value pairs
+     * 
+ * + * map<string, string> labels = 3; + */ + @java.lang.Override + public /* nullable */ java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+     * Labels as key value pairs
+     * 
+ * + * map<string, string> labels = 3; + */ + @java.lang.Override + public java.lang.String getLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearLabels() { + bitField0_ = (bitField0_ & ~0x00000008); + internalGetMutableLabels().getMutableMap().clear(); + return this; + } + /** + * + * + *
+     * Labels as key value pairs
+     * 
+ * + * map<string, string> labels = 3; + */ + public Builder removeLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + internalGetMutableLabels().getMutableMap().remove(key); + return this; + } + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableLabels() { + bitField0_ |= 0x00000008; + return internalGetMutableLabels().getMutableMap(); + } + /** + * + * + *
+     * Labels as key value pairs
+     * 
+ * + * map<string, string> labels = 3; + */ + public Builder putLabels(java.lang.String key, java.lang.String value) { + if (key == null) { + throw new NullPointerException("map key"); + } + if (value == null) { + throw new NullPointerException("map value"); + } + internalGetMutableLabels().getMutableMap().put(key, value); + bitField0_ |= 0x00000008; + return this; + } + /** + * + * + *
+     * Labels as key value pairs
+     * 
+ * + * map<string, string> labels = 3; + */ + public Builder putAllLabels(java.util.Map values) { + internalGetMutableLabels().getMutableMap().putAll(values); + bitField0_ |= 0x00000008; + return this; + } + + private java.lang.Object displayName_ = ""; + /** + * + * + *
+     * Required. A user friendly display name for the solution.
+     * 
+ * + * string display_name = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The displayName. + */ + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. A user friendly display name for the solution.
+     * 
+ * + * string display_name = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for displayName. + */ + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. A user friendly display name for the solution.
+     * 
+ * + * string display_name = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + displayName_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. A user friendly display name for the solution.
+     * 
+ * + * string display_name = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearDisplayName() { + displayName_ = getDefaultInstance().getDisplayName(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. A user friendly display name for the solution.
+     * 
+ * + * string display_name = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + displayName_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + private java.lang.Object description_ = ""; + /** + * + * + *
+     * A description for this instance.
+     * 
+ * + * string description = 5; + * + * @return The description. + */ + 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; + } + } + /** + * + * + *
+     * A description for this instance.
+     * 
+ * + * string description = 5; + * + * @return The bytes for description. + */ + 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; + } + } + /** + * + * + *
+     * A description for this instance.
+     * 
+ * + * string description = 5; + * + * @param value The description to set. + * @return This builder for chaining. + */ + public Builder setDescription(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + description_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * A description for this instance.
+     * 
+ * + * string description = 5; + * + * @return This builder for chaining. + */ + public Builder clearDescription() { + description_ = getDefaultInstance().getDescription(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + return this; + } + /** + * + * + *
+     * A description for this instance.
+     * 
+ * + * string description = 5; + * + * @param value The bytes for description to set. + * @return This builder for chaining. + */ + public Builder setDescriptionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + description_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + private int instanceType_ = 0; + /** + * + * + *
+     * The instance type for the current instance.
+     * 
+ * + * .google.cloud.visionai.v1.Instance.InstanceType instance_type = 10; + * + * @return The enum numeric value on the wire for instanceType. + */ + @java.lang.Override + public int getInstanceTypeValue() { + return instanceType_; + } + /** + * + * + *
+     * The instance type for the current instance.
+     * 
+ * + * .google.cloud.visionai.v1.Instance.InstanceType instance_type = 10; + * + * @param value The enum numeric value on the wire for instanceType to set. + * @return This builder for chaining. + */ + public Builder setInstanceTypeValue(int value) { + instanceType_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * + * + *
+     * The instance type for the current instance.
+     * 
+ * + * .google.cloud.visionai.v1.Instance.InstanceType instance_type = 10; + * + * @return The instanceType. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.Instance.InstanceType getInstanceType() { + com.google.cloud.visionai.v1.Instance.InstanceType result = + com.google.cloud.visionai.v1.Instance.InstanceType.forNumber(instanceType_); + return result == null + ? com.google.cloud.visionai.v1.Instance.InstanceType.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * The instance type for the current instance.
+     * 
+ * + * .google.cloud.visionai.v1.Instance.InstanceType instance_type = 10; + * + * @param value The instanceType to set. + * @return This builder for chaining. + */ + public Builder setInstanceType(com.google.cloud.visionai.v1.Instance.InstanceType value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000040; + instanceType_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * The instance type for the current instance.
+     * 
+ * + * .google.cloud.visionai.v1.Instance.InstanceType instance_type = 10; + * + * @return This builder for chaining. + */ + public Builder clearInstanceType() { + bitField0_ = (bitField0_ & ~0x00000040); + instanceType_ = 0; + onChanged(); + return this; + } + + private java.util.List inputResources_ = + java.util.Collections.emptyList(); + + private void ensureInputResourcesIsMutable() { + if (!((bitField0_ & 0x00000080) != 0)) { + inputResources_ = + new java.util.ArrayList( + inputResources_); + bitField0_ |= 0x00000080; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.visionai.v1.Instance.InputResource, + com.google.cloud.visionai.v1.Instance.InputResource.Builder, + com.google.cloud.visionai.v1.Instance.InputResourceOrBuilder> + inputResourcesBuilder_; + + /** + * + * + *
+     * The input resources for the current application instance.
+     * For example:
+     * input_resources:
+     * visionai.googleapis.com/v1/projects/123/locations/us-central1/clusters/456/streams/stream-a
+     * 
+ * + * repeated .google.cloud.visionai.v1.Instance.InputResource input_resources = 6; + */ + public java.util.List + getInputResourcesList() { + if (inputResourcesBuilder_ == null) { + return java.util.Collections.unmodifiableList(inputResources_); + } else { + return inputResourcesBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * The input resources for the current application instance.
+     * For example:
+     * input_resources:
+     * visionai.googleapis.com/v1/projects/123/locations/us-central1/clusters/456/streams/stream-a
+     * 
+ * + * repeated .google.cloud.visionai.v1.Instance.InputResource input_resources = 6; + */ + public int getInputResourcesCount() { + if (inputResourcesBuilder_ == null) { + return inputResources_.size(); + } else { + return inputResourcesBuilder_.getCount(); + } + } + /** + * + * + *
+     * The input resources for the current application instance.
+     * For example:
+     * input_resources:
+     * visionai.googleapis.com/v1/projects/123/locations/us-central1/clusters/456/streams/stream-a
+     * 
+ * + * repeated .google.cloud.visionai.v1.Instance.InputResource input_resources = 6; + */ + public com.google.cloud.visionai.v1.Instance.InputResource getInputResources(int index) { + if (inputResourcesBuilder_ == null) { + return inputResources_.get(index); + } else { + return inputResourcesBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * The input resources for the current application instance.
+     * For example:
+     * input_resources:
+     * visionai.googleapis.com/v1/projects/123/locations/us-central1/clusters/456/streams/stream-a
+     * 
+ * + * repeated .google.cloud.visionai.v1.Instance.InputResource input_resources = 6; + */ + public Builder setInputResources( + int index, com.google.cloud.visionai.v1.Instance.InputResource value) { + if (inputResourcesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureInputResourcesIsMutable(); + inputResources_.set(index, value); + onChanged(); + } else { + inputResourcesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The input resources for the current application instance.
+     * For example:
+     * input_resources:
+     * visionai.googleapis.com/v1/projects/123/locations/us-central1/clusters/456/streams/stream-a
+     * 
+ * + * repeated .google.cloud.visionai.v1.Instance.InputResource input_resources = 6; + */ + public Builder setInputResources( + int index, com.google.cloud.visionai.v1.Instance.InputResource.Builder builderForValue) { + if (inputResourcesBuilder_ == null) { + ensureInputResourcesIsMutable(); + inputResources_.set(index, builderForValue.build()); + onChanged(); + } else { + inputResourcesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The input resources for the current application instance.
+     * For example:
+     * input_resources:
+     * visionai.googleapis.com/v1/projects/123/locations/us-central1/clusters/456/streams/stream-a
+     * 
+ * + * repeated .google.cloud.visionai.v1.Instance.InputResource input_resources = 6; + */ + public Builder addInputResources(com.google.cloud.visionai.v1.Instance.InputResource value) { + if (inputResourcesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureInputResourcesIsMutable(); + inputResources_.add(value); + onChanged(); + } else { + inputResourcesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * The input resources for the current application instance.
+     * For example:
+     * input_resources:
+     * visionai.googleapis.com/v1/projects/123/locations/us-central1/clusters/456/streams/stream-a
+     * 
+ * + * repeated .google.cloud.visionai.v1.Instance.InputResource input_resources = 6; + */ + public Builder addInputResources( + int index, com.google.cloud.visionai.v1.Instance.InputResource value) { + if (inputResourcesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureInputResourcesIsMutable(); + inputResources_.add(index, value); + onChanged(); + } else { + inputResourcesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The input resources for the current application instance.
+     * For example:
+     * input_resources:
+     * visionai.googleapis.com/v1/projects/123/locations/us-central1/clusters/456/streams/stream-a
+     * 
+ * + * repeated .google.cloud.visionai.v1.Instance.InputResource input_resources = 6; + */ + public Builder addInputResources( + com.google.cloud.visionai.v1.Instance.InputResource.Builder builderForValue) { + if (inputResourcesBuilder_ == null) { + ensureInputResourcesIsMutable(); + inputResources_.add(builderForValue.build()); + onChanged(); + } else { + inputResourcesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The input resources for the current application instance.
+     * For example:
+     * input_resources:
+     * visionai.googleapis.com/v1/projects/123/locations/us-central1/clusters/456/streams/stream-a
+     * 
+ * + * repeated .google.cloud.visionai.v1.Instance.InputResource input_resources = 6; + */ + public Builder addInputResources( + int index, com.google.cloud.visionai.v1.Instance.InputResource.Builder builderForValue) { + if (inputResourcesBuilder_ == null) { + ensureInputResourcesIsMutable(); + inputResources_.add(index, builderForValue.build()); + onChanged(); + } else { + inputResourcesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The input resources for the current application instance.
+     * For example:
+     * input_resources:
+     * visionai.googleapis.com/v1/projects/123/locations/us-central1/clusters/456/streams/stream-a
+     * 
+ * + * repeated .google.cloud.visionai.v1.Instance.InputResource input_resources = 6; + */ + public Builder addAllInputResources( + java.lang.Iterable values) { + if (inputResourcesBuilder_ == null) { + ensureInputResourcesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, inputResources_); + onChanged(); + } else { + inputResourcesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * The input resources for the current application instance.
+     * For example:
+     * input_resources:
+     * visionai.googleapis.com/v1/projects/123/locations/us-central1/clusters/456/streams/stream-a
+     * 
+ * + * repeated .google.cloud.visionai.v1.Instance.InputResource input_resources = 6; + */ + public Builder clearInputResources() { + if (inputResourcesBuilder_ == null) { + inputResources_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000080); + onChanged(); + } else { + inputResourcesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The input resources for the current application instance.
+     * For example:
+     * input_resources:
+     * visionai.googleapis.com/v1/projects/123/locations/us-central1/clusters/456/streams/stream-a
+     * 
+ * + * repeated .google.cloud.visionai.v1.Instance.InputResource input_resources = 6; + */ + public Builder removeInputResources(int index) { + if (inputResourcesBuilder_ == null) { + ensureInputResourcesIsMutable(); + inputResources_.remove(index); + onChanged(); + } else { + inputResourcesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * The input resources for the current application instance.
+     * For example:
+     * input_resources:
+     * visionai.googleapis.com/v1/projects/123/locations/us-central1/clusters/456/streams/stream-a
+     * 
+ * + * repeated .google.cloud.visionai.v1.Instance.InputResource input_resources = 6; + */ + public com.google.cloud.visionai.v1.Instance.InputResource.Builder getInputResourcesBuilder( + int index) { + return getInputResourcesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * The input resources for the current application instance.
+     * For example:
+     * input_resources:
+     * visionai.googleapis.com/v1/projects/123/locations/us-central1/clusters/456/streams/stream-a
+     * 
+ * + * repeated .google.cloud.visionai.v1.Instance.InputResource input_resources = 6; + */ + public com.google.cloud.visionai.v1.Instance.InputResourceOrBuilder getInputResourcesOrBuilder( + int index) { + if (inputResourcesBuilder_ == null) { + return inputResources_.get(index); + } else { + return inputResourcesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * The input resources for the current application instance.
+     * For example:
+     * input_resources:
+     * visionai.googleapis.com/v1/projects/123/locations/us-central1/clusters/456/streams/stream-a
+     * 
+ * + * repeated .google.cloud.visionai.v1.Instance.InputResource input_resources = 6; + */ + public java.util.List + getInputResourcesOrBuilderList() { + if (inputResourcesBuilder_ != null) { + return inputResourcesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(inputResources_); + } + } + /** + * + * + *
+     * The input resources for the current application instance.
+     * For example:
+     * input_resources:
+     * visionai.googleapis.com/v1/projects/123/locations/us-central1/clusters/456/streams/stream-a
+     * 
+ * + * repeated .google.cloud.visionai.v1.Instance.InputResource input_resources = 6; + */ + public com.google.cloud.visionai.v1.Instance.InputResource.Builder addInputResourcesBuilder() { + return getInputResourcesFieldBuilder() + .addBuilder(com.google.cloud.visionai.v1.Instance.InputResource.getDefaultInstance()); + } + /** + * + * + *
+     * The input resources for the current application instance.
+     * For example:
+     * input_resources:
+     * visionai.googleapis.com/v1/projects/123/locations/us-central1/clusters/456/streams/stream-a
+     * 
+ * + * repeated .google.cloud.visionai.v1.Instance.InputResource input_resources = 6; + */ + public com.google.cloud.visionai.v1.Instance.InputResource.Builder addInputResourcesBuilder( + int index) { + return getInputResourcesFieldBuilder() + .addBuilder( + index, com.google.cloud.visionai.v1.Instance.InputResource.getDefaultInstance()); + } + /** + * + * + *
+     * The input resources for the current application instance.
+     * For example:
+     * input_resources:
+     * visionai.googleapis.com/v1/projects/123/locations/us-central1/clusters/456/streams/stream-a
+     * 
+ * + * repeated .google.cloud.visionai.v1.Instance.InputResource input_resources = 6; + */ + public java.util.List + getInputResourcesBuilderList() { + return getInputResourcesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.visionai.v1.Instance.InputResource, + com.google.cloud.visionai.v1.Instance.InputResource.Builder, + com.google.cloud.visionai.v1.Instance.InputResourceOrBuilder> + getInputResourcesFieldBuilder() { + if (inputResourcesBuilder_ == null) { + inputResourcesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.visionai.v1.Instance.InputResource, + com.google.cloud.visionai.v1.Instance.InputResource.Builder, + com.google.cloud.visionai.v1.Instance.InputResourceOrBuilder>( + inputResources_, + ((bitField0_ & 0x00000080) != 0), + getParentForChildren(), + isClean()); + inputResources_ = null; + } + return inputResourcesBuilder_; + } + + private java.util.List outputResources_ = + java.util.Collections.emptyList(); + + private void ensureOutputResourcesIsMutable() { + if (!((bitField0_ & 0x00000100) != 0)) { + outputResources_ = + new java.util.ArrayList( + outputResources_); + bitField0_ |= 0x00000100; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.visionai.v1.Instance.OutputResource, + com.google.cloud.visionai.v1.Instance.OutputResource.Builder, + com.google.cloud.visionai.v1.Instance.OutputResourceOrBuilder> + outputResourcesBuilder_; + + /** + * + * + *
+     * All the output resources associated to one application instance.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Instance.OutputResource output_resources = 7; + */ + public java.util.List + getOutputResourcesList() { + if (outputResourcesBuilder_ == null) { + return java.util.Collections.unmodifiableList(outputResources_); + } else { + return outputResourcesBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * All the output resources associated to one application instance.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Instance.OutputResource output_resources = 7; + */ + public int getOutputResourcesCount() { + if (outputResourcesBuilder_ == null) { + return outputResources_.size(); + } else { + return outputResourcesBuilder_.getCount(); + } + } + /** + * + * + *
+     * All the output resources associated to one application instance.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Instance.OutputResource output_resources = 7; + */ + public com.google.cloud.visionai.v1.Instance.OutputResource getOutputResources(int index) { + if (outputResourcesBuilder_ == null) { + return outputResources_.get(index); + } else { + return outputResourcesBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * All the output resources associated to one application instance.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Instance.OutputResource output_resources = 7; + */ + public Builder setOutputResources( + int index, com.google.cloud.visionai.v1.Instance.OutputResource value) { + if (outputResourcesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureOutputResourcesIsMutable(); + outputResources_.set(index, value); + onChanged(); + } else { + outputResourcesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * All the output resources associated to one application instance.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Instance.OutputResource output_resources = 7; + */ + public Builder setOutputResources( + int index, com.google.cloud.visionai.v1.Instance.OutputResource.Builder builderForValue) { + if (outputResourcesBuilder_ == null) { + ensureOutputResourcesIsMutable(); + outputResources_.set(index, builderForValue.build()); + onChanged(); + } else { + outputResourcesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * All the output resources associated to one application instance.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Instance.OutputResource output_resources = 7; + */ + public Builder addOutputResources(com.google.cloud.visionai.v1.Instance.OutputResource value) { + if (outputResourcesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureOutputResourcesIsMutable(); + outputResources_.add(value); + onChanged(); + } else { + outputResourcesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * All the output resources associated to one application instance.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Instance.OutputResource output_resources = 7; + */ + public Builder addOutputResources( + int index, com.google.cloud.visionai.v1.Instance.OutputResource value) { + if (outputResourcesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureOutputResourcesIsMutable(); + outputResources_.add(index, value); + onChanged(); + } else { + outputResourcesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * All the output resources associated to one application instance.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Instance.OutputResource output_resources = 7; + */ + public Builder addOutputResources( + com.google.cloud.visionai.v1.Instance.OutputResource.Builder builderForValue) { + if (outputResourcesBuilder_ == null) { + ensureOutputResourcesIsMutable(); + outputResources_.add(builderForValue.build()); + onChanged(); + } else { + outputResourcesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * All the output resources associated to one application instance.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Instance.OutputResource output_resources = 7; + */ + public Builder addOutputResources( + int index, com.google.cloud.visionai.v1.Instance.OutputResource.Builder builderForValue) { + if (outputResourcesBuilder_ == null) { + ensureOutputResourcesIsMutable(); + outputResources_.add(index, builderForValue.build()); + onChanged(); + } else { + outputResourcesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * All the output resources associated to one application instance.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Instance.OutputResource output_resources = 7; + */ + public Builder addAllOutputResources( + java.lang.Iterable values) { + if (outputResourcesBuilder_ == null) { + ensureOutputResourcesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, outputResources_); + onChanged(); + } else { + outputResourcesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * All the output resources associated to one application instance.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Instance.OutputResource output_resources = 7; + */ + public Builder clearOutputResources() { + if (outputResourcesBuilder_ == null) { + outputResources_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000100); + onChanged(); + } else { + outputResourcesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * All the output resources associated to one application instance.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Instance.OutputResource output_resources = 7; + */ + public Builder removeOutputResources(int index) { + if (outputResourcesBuilder_ == null) { + ensureOutputResourcesIsMutable(); + outputResources_.remove(index); + onChanged(); + } else { + outputResourcesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * All the output resources associated to one application instance.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Instance.OutputResource output_resources = 7; + */ + public com.google.cloud.visionai.v1.Instance.OutputResource.Builder getOutputResourcesBuilder( + int index) { + return getOutputResourcesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * All the output resources associated to one application instance.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Instance.OutputResource output_resources = 7; + */ + public com.google.cloud.visionai.v1.Instance.OutputResourceOrBuilder + getOutputResourcesOrBuilder(int index) { + if (outputResourcesBuilder_ == null) { + return outputResources_.get(index); + } else { + return outputResourcesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * All the output resources associated to one application instance.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Instance.OutputResource output_resources = 7; + */ + public java.util.List + getOutputResourcesOrBuilderList() { + if (outputResourcesBuilder_ != null) { + return outputResourcesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(outputResources_); + } + } + /** + * + * + *
+     * All the output resources associated to one application instance.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Instance.OutputResource output_resources = 7; + */ + public com.google.cloud.visionai.v1.Instance.OutputResource.Builder + addOutputResourcesBuilder() { + return getOutputResourcesFieldBuilder() + .addBuilder(com.google.cloud.visionai.v1.Instance.OutputResource.getDefaultInstance()); + } + /** + * + * + *
+     * All the output resources associated to one application instance.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Instance.OutputResource output_resources = 7; + */ + public com.google.cloud.visionai.v1.Instance.OutputResource.Builder addOutputResourcesBuilder( + int index) { + return getOutputResourcesFieldBuilder() + .addBuilder( + index, com.google.cloud.visionai.v1.Instance.OutputResource.getDefaultInstance()); + } + /** + * + * + *
+     * All the output resources associated to one application instance.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Instance.OutputResource output_resources = 7; + */ + public java.util.List + getOutputResourcesBuilderList() { + return getOutputResourcesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.visionai.v1.Instance.OutputResource, + com.google.cloud.visionai.v1.Instance.OutputResource.Builder, + com.google.cloud.visionai.v1.Instance.OutputResourceOrBuilder> + getOutputResourcesFieldBuilder() { + if (outputResourcesBuilder_ == null) { + outputResourcesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.visionai.v1.Instance.OutputResource, + com.google.cloud.visionai.v1.Instance.OutputResource.Builder, + com.google.cloud.visionai.v1.Instance.OutputResourceOrBuilder>( + outputResources_, + ((bitField0_ & 0x00000100) != 0), + getParentForChildren(), + isClean()); + outputResources_ = null; + } + return outputResourcesBuilder_; + } + + private int state_ = 0; + /** + * + * + *
+     * State of the instance.
+     * 
+ * + * .google.cloud.visionai.v1.Instance.State state = 9; + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + /** + * + * + *
+     * State of the instance.
+     * 
+ * + * .google.cloud.visionai.v1.Instance.State state = 9; + * + * @param value The enum numeric value on the wire for state to set. + * @return This builder for chaining. + */ + public Builder setStateValue(int value) { + state_ = value; + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + /** + * + * + *
+     * State of the instance.
+     * 
+ * + * .google.cloud.visionai.v1.Instance.State state = 9; + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.Instance.State getState() { + com.google.cloud.visionai.v1.Instance.State result = + com.google.cloud.visionai.v1.Instance.State.forNumber(state_); + return result == null ? com.google.cloud.visionai.v1.Instance.State.UNRECOGNIZED : result; + } + /** + * + * + *
+     * State of the instance.
+     * 
+ * + * .google.cloud.visionai.v1.Instance.State state = 9; + * + * @param value The state to set. + * @return This builder for chaining. + */ + public Builder setState(com.google.cloud.visionai.v1.Instance.State value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000200; + state_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * State of the instance.
+     * 
+ * + * .google.cloud.visionai.v1.Instance.State state = 9; + * + * @return This builder for chaining. + */ + public Builder clearState() { + bitField0_ = (bitField0_ & ~0x00000200); + state_ = 0; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.Instance) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.Instance) + private static final com.google.cloud.visionai.v1.Instance DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.Instance(); + } + + public static com.google.cloud.visionai.v1.Instance getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Instance parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.Instance getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/InstanceName.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/InstanceName.java new file mode 100644 index 000000000000..983ebe901c3e --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/InstanceName.java @@ -0,0 +1,262 @@ +/* + * Copyright 2024 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.visionai.v1; + +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") +public class InstanceName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION_APPLICATION_INSTANCE = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/applications/{application}/instances/{instance}"); + private volatile Map fieldValuesMap; + private final String project; + private final String location; + private final String application; + private final String instance; + + @Deprecated + protected InstanceName() { + project = null; + location = null; + application = null; + instance = null; + } + + private InstanceName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + application = Preconditions.checkNotNull(builder.getApplication()); + instance = Preconditions.checkNotNull(builder.getInstance()); + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getApplication() { + return application; + } + + public String getInstance() { + return instance; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static InstanceName of( + String project, String location, String application, String instance) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setApplication(application) + .setInstance(instance) + .build(); + } + + public static String format( + String project, String location, String application, String instance) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setApplication(application) + .setInstance(instance) + .build() + .toString(); + } + + public static InstanceName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION_APPLICATION_INSTANCE.validatedMatch( + formattedString, "InstanceName.parse: formattedString not in valid format"); + return of( + matchMap.get("project"), + matchMap.get("location"), + matchMap.get("application"), + matchMap.get("instance")); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List values) { + List list = new ArrayList<>(values.size()); + for (InstanceName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION_APPLICATION_INSTANCE.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (project != null) { + fieldMapBuilder.put("project", project); + } + if (location != null) { + fieldMapBuilder.put("location", location); + } + if (application != null) { + fieldMapBuilder.put("application", application); + } + if (instance != null) { + fieldMapBuilder.put("instance", instance); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION_APPLICATION_INSTANCE.instantiate( + "project", project, "location", location, "application", application, "instance", instance); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null && getClass() == o.getClass()) { + InstanceName that = ((InstanceName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location) + && Objects.equals(this.application, that.application) + && Objects.equals(this.instance, that.instance); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(project); + h *= 1000003; + h ^= Objects.hashCode(location); + h *= 1000003; + h ^= Objects.hashCode(application); + h *= 1000003; + h ^= Objects.hashCode(instance); + return h; + } + + /** + * Builder for + * projects/{project}/locations/{location}/applications/{application}/instances/{instance}. + */ + public static class Builder { + private String project; + private String location; + private String application; + private String instance; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getApplication() { + return application; + } + + public String getInstance() { + return instance; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setApplication(String application) { + this.application = application; + return this; + } + + public Builder setInstance(String instance) { + this.instance = instance; + return this; + } + + private Builder(InstanceName instanceName) { + this.project = instanceName.project; + this.location = instanceName.location; + this.application = instanceName.application; + this.instance = instanceName.instance; + } + + public InstanceName build() { + return new InstanceName(this); + } + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/InstanceOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/InstanceOrBuilder.java new file mode 100644 index 000000000000..97e696cebcbb --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/InstanceOrBuilder.java @@ -0,0 +1,406 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/platform.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface InstanceOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.Instance) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. name of resource
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Output only. name of resource
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Output only. [Output only] Create timestamp
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + /** + * + * + *
+   * Output only. [Output only] Create timestamp
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + * + * + *
+   * Output only. [Output only] Create timestamp
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. [Output only] Update timestamp
+   * 
+ * + * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + /** + * + * + *
+   * Output only. [Output only] Update timestamp
+   * 
+ * + * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + /** + * + * + *
+   * Output only. [Output only] Update timestamp
+   * 
+ * + * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); + + /** + * + * + *
+   * Labels as key value pairs
+   * 
+ * + * map<string, string> labels = 3; + */ + int getLabelsCount(); + /** + * + * + *
+   * Labels as key value pairs
+   * 
+ * + * map<string, string> labels = 3; + */ + boolean containsLabels(java.lang.String key); + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Deprecated + java.util.Map getLabels(); + /** + * + * + *
+   * Labels as key value pairs
+   * 
+ * + * map<string, string> labels = 3; + */ + java.util.Map getLabelsMap(); + /** + * + * + *
+   * Labels as key value pairs
+   * 
+ * + * map<string, string> labels = 3; + */ + /* nullable */ + java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue); + /** + * + * + *
+   * Labels as key value pairs
+   * 
+ * + * map<string, string> labels = 3; + */ + java.lang.String getLabelsOrThrow(java.lang.String key); + + /** + * + * + *
+   * Required. A user friendly display name for the solution.
+   * 
+ * + * string display_name = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The displayName. + */ + java.lang.String getDisplayName(); + /** + * + * + *
+   * Required. A user friendly display name for the solution.
+   * 
+ * + * string display_name = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for displayName. + */ + com.google.protobuf.ByteString getDisplayNameBytes(); + + /** + * + * + *
+   * A description for this instance.
+   * 
+ * + * string description = 5; + * + * @return The description. + */ + java.lang.String getDescription(); + /** + * + * + *
+   * A description for this instance.
+   * 
+ * + * string description = 5; + * + * @return The bytes for description. + */ + com.google.protobuf.ByteString getDescriptionBytes(); + + /** + * + * + *
+   * The instance type for the current instance.
+   * 
+ * + * .google.cloud.visionai.v1.Instance.InstanceType instance_type = 10; + * + * @return The enum numeric value on the wire for instanceType. + */ + int getInstanceTypeValue(); + /** + * + * + *
+   * The instance type for the current instance.
+   * 
+ * + * .google.cloud.visionai.v1.Instance.InstanceType instance_type = 10; + * + * @return The instanceType. + */ + com.google.cloud.visionai.v1.Instance.InstanceType getInstanceType(); + + /** + * + * + *
+   * The input resources for the current application instance.
+   * For example:
+   * input_resources:
+   * visionai.googleapis.com/v1/projects/123/locations/us-central1/clusters/456/streams/stream-a
+   * 
+ * + * repeated .google.cloud.visionai.v1.Instance.InputResource input_resources = 6; + */ + java.util.List getInputResourcesList(); + /** + * + * + *
+   * The input resources for the current application instance.
+   * For example:
+   * input_resources:
+   * visionai.googleapis.com/v1/projects/123/locations/us-central1/clusters/456/streams/stream-a
+   * 
+ * + * repeated .google.cloud.visionai.v1.Instance.InputResource input_resources = 6; + */ + com.google.cloud.visionai.v1.Instance.InputResource getInputResources(int index); + /** + * + * + *
+   * The input resources for the current application instance.
+   * For example:
+   * input_resources:
+   * visionai.googleapis.com/v1/projects/123/locations/us-central1/clusters/456/streams/stream-a
+   * 
+ * + * repeated .google.cloud.visionai.v1.Instance.InputResource input_resources = 6; + */ + int getInputResourcesCount(); + /** + * + * + *
+   * The input resources for the current application instance.
+   * For example:
+   * input_resources:
+   * visionai.googleapis.com/v1/projects/123/locations/us-central1/clusters/456/streams/stream-a
+   * 
+ * + * repeated .google.cloud.visionai.v1.Instance.InputResource input_resources = 6; + */ + java.util.List + getInputResourcesOrBuilderList(); + /** + * + * + *
+   * The input resources for the current application instance.
+   * For example:
+   * input_resources:
+   * visionai.googleapis.com/v1/projects/123/locations/us-central1/clusters/456/streams/stream-a
+   * 
+ * + * repeated .google.cloud.visionai.v1.Instance.InputResource input_resources = 6; + */ + com.google.cloud.visionai.v1.Instance.InputResourceOrBuilder getInputResourcesOrBuilder( + int index); + + /** + * + * + *
+   * All the output resources associated to one application instance.
+   * 
+ * + * repeated .google.cloud.visionai.v1.Instance.OutputResource output_resources = 7; + */ + java.util.List getOutputResourcesList(); + /** + * + * + *
+   * All the output resources associated to one application instance.
+   * 
+ * + * repeated .google.cloud.visionai.v1.Instance.OutputResource output_resources = 7; + */ + com.google.cloud.visionai.v1.Instance.OutputResource getOutputResources(int index); + /** + * + * + *
+   * All the output resources associated to one application instance.
+   * 
+ * + * repeated .google.cloud.visionai.v1.Instance.OutputResource output_resources = 7; + */ + int getOutputResourcesCount(); + /** + * + * + *
+   * All the output resources associated to one application instance.
+   * 
+ * + * repeated .google.cloud.visionai.v1.Instance.OutputResource output_resources = 7; + */ + java.util.List + getOutputResourcesOrBuilderList(); + /** + * + * + *
+   * All the output resources associated to one application instance.
+   * 
+ * + * repeated .google.cloud.visionai.v1.Instance.OutputResource output_resources = 7; + */ + com.google.cloud.visionai.v1.Instance.OutputResourceOrBuilder getOutputResourcesOrBuilder( + int index); + + /** + * + * + *
+   * State of the instance.
+   * 
+ * + * .google.cloud.visionai.v1.Instance.State state = 9; + * + * @return The enum numeric value on the wire for state. + */ + int getStateValue(); + /** + * + * + *
+   * State of the instance.
+   * 
+ * + * .google.cloud.visionai.v1.Instance.State state = 9; + * + * @return The state. + */ + com.google.cloud.visionai.v1.Instance.State getState(); +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/IntRange.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/IntRange.java new file mode 100644 index 000000000000..7d7ce195a768 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/IntRange.java @@ -0,0 +1,700 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/warehouse.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * Integer range type.
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.IntRange} + */ +public final class IntRange extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.IntRange) + IntRangeOrBuilder { + private static final long serialVersionUID = 0L; + // Use IntRange.newBuilder() to construct. + private IntRange(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private IntRange() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new IntRange(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_IntRange_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_IntRange_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.IntRange.class, + com.google.cloud.visionai.v1.IntRange.Builder.class); + } + + private int bitField0_; + public static final int START_FIELD_NUMBER = 1; + private long start_ = 0L; + /** + * + * + *
+   * Start of the int range.
+   * 
+ * + * optional int64 start = 1; + * + * @return Whether the start field is set. + */ + @java.lang.Override + public boolean hasStart() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * Start of the int range.
+   * 
+ * + * optional int64 start = 1; + * + * @return The start. + */ + @java.lang.Override + public long getStart() { + return start_; + } + + public static final int END_FIELD_NUMBER = 2; + private long end_ = 0L; + /** + * + * + *
+   * End of the int range.
+   * 
+ * + * optional int64 end = 2; + * + * @return Whether the end field is set. + */ + @java.lang.Override + public boolean hasEnd() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+   * End of the int range.
+   * 
+ * + * optional int64 end = 2; + * + * @return The end. + */ + @java.lang.Override + public long getEnd() { + return end_; + } + + 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 (((bitField0_ & 0x00000001) != 0)) { + output.writeInt64(1, start_); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeInt64(2, end_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(1, start_); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(2, end_); + } + size += getUnknownFields().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.visionai.v1.IntRange)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.IntRange other = (com.google.cloud.visionai.v1.IntRange) obj; + + if (hasStart() != other.hasStart()) return false; + if (hasStart()) { + if (getStart() != other.getStart()) return false; + } + if (hasEnd() != other.hasEnd()) return false; + if (hasEnd()) { + if (getEnd() != other.getEnd()) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasStart()) { + hash = (37 * hash) + START_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getStart()); + } + if (hasEnd()) { + hash = (37 * hash) + END_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getEnd()); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.IntRange parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.IntRange 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.visionai.v1.IntRange parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.IntRange 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.visionai.v1.IntRange parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.IntRange parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.IntRange parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.IntRange 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.visionai.v1.IntRange parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.IntRange 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.visionai.v1.IntRange parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.IntRange 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.visionai.v1.IntRange 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; + } + /** + * + * + *
+   * Integer range type.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.IntRange} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.IntRange) + com.google.cloud.visionai.v1.IntRangeOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_IntRange_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_IntRange_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.IntRange.class, + com.google.cloud.visionai.v1.IntRange.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.IntRange.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + start_ = 0L; + end_ = 0L; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_IntRange_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.IntRange getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.IntRange.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.IntRange build() { + com.google.cloud.visionai.v1.IntRange result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.IntRange buildPartial() { + com.google.cloud.visionai.v1.IntRange result = + new com.google.cloud.visionai.v1.IntRange(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.visionai.v1.IntRange result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.start_ = start_; + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.end_ = end_; + to_bitField0_ |= 0x00000002; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.IntRange) { + return mergeFrom((com.google.cloud.visionai.v1.IntRange) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.IntRange other) { + if (other == com.google.cloud.visionai.v1.IntRange.getDefaultInstance()) return this; + if (other.hasStart()) { + setStart(other.getStart()); + } + if (other.hasEnd()) { + setEnd(other.getEnd()); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + start_ = input.readInt64(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 16: + { + end_ = input.readInt64(); + bitField0_ |= 0x00000002; + break; + } // case 16 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private long start_; + /** + * + * + *
+     * Start of the int range.
+     * 
+ * + * optional int64 start = 1; + * + * @return Whether the start field is set. + */ + @java.lang.Override + public boolean hasStart() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * Start of the int range.
+     * 
+ * + * optional int64 start = 1; + * + * @return The start. + */ + @java.lang.Override + public long getStart() { + return start_; + } + /** + * + * + *
+     * Start of the int range.
+     * 
+ * + * optional int64 start = 1; + * + * @param value The start to set. + * @return This builder for chaining. + */ + public Builder setStart(long value) { + + start_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Start of the int range.
+     * 
+ * + * optional int64 start = 1; + * + * @return This builder for chaining. + */ + public Builder clearStart() { + bitField0_ = (bitField0_ & ~0x00000001); + start_ = 0L; + onChanged(); + return this; + } + + private long end_; + /** + * + * + *
+     * End of the int range.
+     * 
+ * + * optional int64 end = 2; + * + * @return Whether the end field is set. + */ + @java.lang.Override + public boolean hasEnd() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * End of the int range.
+     * 
+ * + * optional int64 end = 2; + * + * @return The end. + */ + @java.lang.Override + public long getEnd() { + return end_; + } + /** + * + * + *
+     * End of the int range.
+     * 
+ * + * optional int64 end = 2; + * + * @param value The end to set. + * @return This builder for chaining. + */ + public Builder setEnd(long value) { + + end_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * End of the int range.
+     * 
+ * + * optional int64 end = 2; + * + * @return This builder for chaining. + */ + public Builder clearEnd() { + bitField0_ = (bitField0_ & ~0x00000002); + end_ = 0L; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.IntRange) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.IntRange) + private static final com.google.cloud.visionai.v1.IntRange DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.IntRange(); + } + + public static com.google.cloud.visionai.v1.IntRange getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public IntRange parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.IntRange getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/IntRangeArray.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/IntRangeArray.java new file mode 100644 index 000000000000..fe654d0a2b96 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/IntRangeArray.java @@ -0,0 +1,933 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/warehouse.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * A list of integer range values.
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.IntRangeArray} + */ +public final class IntRangeArray extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.IntRangeArray) + IntRangeArrayOrBuilder { + private static final long serialVersionUID = 0L; + // Use IntRangeArray.newBuilder() to construct. + private IntRangeArray(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private IntRangeArray() { + intRanges_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new IntRangeArray(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_IntRangeArray_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_IntRangeArray_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.IntRangeArray.class, + com.google.cloud.visionai.v1.IntRangeArray.Builder.class); + } + + public static final int INT_RANGES_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List intRanges_; + /** + * + * + *
+   * Int range values.
+   * 
+ * + * repeated .google.cloud.visionai.v1.IntRange int_ranges = 1; + */ + @java.lang.Override + public java.util.List getIntRangesList() { + return intRanges_; + } + /** + * + * + *
+   * Int range values.
+   * 
+ * + * repeated .google.cloud.visionai.v1.IntRange int_ranges = 1; + */ + @java.lang.Override + public java.util.List + getIntRangesOrBuilderList() { + return intRanges_; + } + /** + * + * + *
+   * Int range values.
+   * 
+ * + * repeated .google.cloud.visionai.v1.IntRange int_ranges = 1; + */ + @java.lang.Override + public int getIntRangesCount() { + return intRanges_.size(); + } + /** + * + * + *
+   * Int range values.
+   * 
+ * + * repeated .google.cloud.visionai.v1.IntRange int_ranges = 1; + */ + @java.lang.Override + public com.google.cloud.visionai.v1.IntRange getIntRanges(int index) { + return intRanges_.get(index); + } + /** + * + * + *
+   * Int range values.
+   * 
+ * + * repeated .google.cloud.visionai.v1.IntRange int_ranges = 1; + */ + @java.lang.Override + public com.google.cloud.visionai.v1.IntRangeOrBuilder getIntRangesOrBuilder(int index) { + return intRanges_.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 < intRanges_.size(); i++) { + output.writeMessage(1, intRanges_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < intRanges_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, intRanges_.get(i)); + } + size += getUnknownFields().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.visionai.v1.IntRangeArray)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.IntRangeArray other = + (com.google.cloud.visionai.v1.IntRangeArray) obj; + + if (!getIntRangesList().equals(other.getIntRangesList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getIntRangesCount() > 0) { + hash = (37 * hash) + INT_RANGES_FIELD_NUMBER; + hash = (53 * hash) + getIntRangesList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.IntRangeArray parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.IntRangeArray 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.visionai.v1.IntRangeArray parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.IntRangeArray 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.visionai.v1.IntRangeArray parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.IntRangeArray parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.IntRangeArray parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.IntRangeArray 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.visionai.v1.IntRangeArray parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.IntRangeArray 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.visionai.v1.IntRangeArray parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.IntRangeArray 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.visionai.v1.IntRangeArray 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 list of integer range values.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.IntRangeArray} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.IntRangeArray) + com.google.cloud.visionai.v1.IntRangeArrayOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_IntRangeArray_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_IntRangeArray_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.IntRangeArray.class, + com.google.cloud.visionai.v1.IntRangeArray.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.IntRangeArray.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (intRangesBuilder_ == null) { + intRanges_ = java.util.Collections.emptyList(); + } else { + intRanges_ = null; + intRangesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_IntRangeArray_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.IntRangeArray getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.IntRangeArray.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.IntRangeArray build() { + com.google.cloud.visionai.v1.IntRangeArray result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.IntRangeArray buildPartial() { + com.google.cloud.visionai.v1.IntRangeArray result = + new com.google.cloud.visionai.v1.IntRangeArray(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.google.cloud.visionai.v1.IntRangeArray result) { + if (intRangesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + intRanges_ = java.util.Collections.unmodifiableList(intRanges_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.intRanges_ = intRanges_; + } else { + result.intRanges_ = intRangesBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.visionai.v1.IntRangeArray result) { + int from_bitField0_ = bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.IntRangeArray) { + return mergeFrom((com.google.cloud.visionai.v1.IntRangeArray) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.IntRangeArray other) { + if (other == com.google.cloud.visionai.v1.IntRangeArray.getDefaultInstance()) return this; + if (intRangesBuilder_ == null) { + if (!other.intRanges_.isEmpty()) { + if (intRanges_.isEmpty()) { + intRanges_ = other.intRanges_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureIntRangesIsMutable(); + intRanges_.addAll(other.intRanges_); + } + onChanged(); + } + } else { + if (!other.intRanges_.isEmpty()) { + if (intRangesBuilder_.isEmpty()) { + intRangesBuilder_.dispose(); + intRangesBuilder_ = null; + intRanges_ = other.intRanges_; + bitField0_ = (bitField0_ & ~0x00000001); + intRangesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getIntRangesFieldBuilder() + : null; + } else { + intRangesBuilder_.addAllMessages(other.intRanges_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.visionai.v1.IntRange m = + input.readMessage( + com.google.cloud.visionai.v1.IntRange.parser(), extensionRegistry); + if (intRangesBuilder_ == null) { + ensureIntRangesIsMutable(); + intRanges_.add(m); + } else { + intRangesBuilder_.addMessage(m); + } + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List intRanges_ = + java.util.Collections.emptyList(); + + private void ensureIntRangesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + intRanges_ = new java.util.ArrayList(intRanges_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.visionai.v1.IntRange, + com.google.cloud.visionai.v1.IntRange.Builder, + com.google.cloud.visionai.v1.IntRangeOrBuilder> + intRangesBuilder_; + + /** + * + * + *
+     * Int range values.
+     * 
+ * + * repeated .google.cloud.visionai.v1.IntRange int_ranges = 1; + */ + public java.util.List getIntRangesList() { + if (intRangesBuilder_ == null) { + return java.util.Collections.unmodifiableList(intRanges_); + } else { + return intRangesBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Int range values.
+     * 
+ * + * repeated .google.cloud.visionai.v1.IntRange int_ranges = 1; + */ + public int getIntRangesCount() { + if (intRangesBuilder_ == null) { + return intRanges_.size(); + } else { + return intRangesBuilder_.getCount(); + } + } + /** + * + * + *
+     * Int range values.
+     * 
+ * + * repeated .google.cloud.visionai.v1.IntRange int_ranges = 1; + */ + public com.google.cloud.visionai.v1.IntRange getIntRanges(int index) { + if (intRangesBuilder_ == null) { + return intRanges_.get(index); + } else { + return intRangesBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Int range values.
+     * 
+ * + * repeated .google.cloud.visionai.v1.IntRange int_ranges = 1; + */ + public Builder setIntRanges(int index, com.google.cloud.visionai.v1.IntRange value) { + if (intRangesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureIntRangesIsMutable(); + intRanges_.set(index, value); + onChanged(); + } else { + intRangesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Int range values.
+     * 
+ * + * repeated .google.cloud.visionai.v1.IntRange int_ranges = 1; + */ + public Builder setIntRanges( + int index, com.google.cloud.visionai.v1.IntRange.Builder builderForValue) { + if (intRangesBuilder_ == null) { + ensureIntRangesIsMutable(); + intRanges_.set(index, builderForValue.build()); + onChanged(); + } else { + intRangesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Int range values.
+     * 
+ * + * repeated .google.cloud.visionai.v1.IntRange int_ranges = 1; + */ + public Builder addIntRanges(com.google.cloud.visionai.v1.IntRange value) { + if (intRangesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureIntRangesIsMutable(); + intRanges_.add(value); + onChanged(); + } else { + intRangesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Int range values.
+     * 
+ * + * repeated .google.cloud.visionai.v1.IntRange int_ranges = 1; + */ + public Builder addIntRanges(int index, com.google.cloud.visionai.v1.IntRange value) { + if (intRangesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureIntRangesIsMutable(); + intRanges_.add(index, value); + onChanged(); + } else { + intRangesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Int range values.
+     * 
+ * + * repeated .google.cloud.visionai.v1.IntRange int_ranges = 1; + */ + public Builder addIntRanges(com.google.cloud.visionai.v1.IntRange.Builder builderForValue) { + if (intRangesBuilder_ == null) { + ensureIntRangesIsMutable(); + intRanges_.add(builderForValue.build()); + onChanged(); + } else { + intRangesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Int range values.
+     * 
+ * + * repeated .google.cloud.visionai.v1.IntRange int_ranges = 1; + */ + public Builder addIntRanges( + int index, com.google.cloud.visionai.v1.IntRange.Builder builderForValue) { + if (intRangesBuilder_ == null) { + ensureIntRangesIsMutable(); + intRanges_.add(index, builderForValue.build()); + onChanged(); + } else { + intRangesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Int range values.
+     * 
+ * + * repeated .google.cloud.visionai.v1.IntRange int_ranges = 1; + */ + public Builder addAllIntRanges( + java.lang.Iterable values) { + if (intRangesBuilder_ == null) { + ensureIntRangesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, intRanges_); + onChanged(); + } else { + intRangesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Int range values.
+     * 
+ * + * repeated .google.cloud.visionai.v1.IntRange int_ranges = 1; + */ + public Builder clearIntRanges() { + if (intRangesBuilder_ == null) { + intRanges_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + intRangesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Int range values.
+     * 
+ * + * repeated .google.cloud.visionai.v1.IntRange int_ranges = 1; + */ + public Builder removeIntRanges(int index) { + if (intRangesBuilder_ == null) { + ensureIntRangesIsMutable(); + intRanges_.remove(index); + onChanged(); + } else { + intRangesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Int range values.
+     * 
+ * + * repeated .google.cloud.visionai.v1.IntRange int_ranges = 1; + */ + public com.google.cloud.visionai.v1.IntRange.Builder getIntRangesBuilder(int index) { + return getIntRangesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Int range values.
+     * 
+ * + * repeated .google.cloud.visionai.v1.IntRange int_ranges = 1; + */ + public com.google.cloud.visionai.v1.IntRangeOrBuilder getIntRangesOrBuilder(int index) { + if (intRangesBuilder_ == null) { + return intRanges_.get(index); + } else { + return intRangesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Int range values.
+     * 
+ * + * repeated .google.cloud.visionai.v1.IntRange int_ranges = 1; + */ + public java.util.List + getIntRangesOrBuilderList() { + if (intRangesBuilder_ != null) { + return intRangesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(intRanges_); + } + } + /** + * + * + *
+     * Int range values.
+     * 
+ * + * repeated .google.cloud.visionai.v1.IntRange int_ranges = 1; + */ + public com.google.cloud.visionai.v1.IntRange.Builder addIntRangesBuilder() { + return getIntRangesFieldBuilder() + .addBuilder(com.google.cloud.visionai.v1.IntRange.getDefaultInstance()); + } + /** + * + * + *
+     * Int range values.
+     * 
+ * + * repeated .google.cloud.visionai.v1.IntRange int_ranges = 1; + */ + public com.google.cloud.visionai.v1.IntRange.Builder addIntRangesBuilder(int index) { + return getIntRangesFieldBuilder() + .addBuilder(index, com.google.cloud.visionai.v1.IntRange.getDefaultInstance()); + } + /** + * + * + *
+     * Int range values.
+     * 
+ * + * repeated .google.cloud.visionai.v1.IntRange int_ranges = 1; + */ + public java.util.List getIntRangesBuilderList() { + return getIntRangesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.visionai.v1.IntRange, + com.google.cloud.visionai.v1.IntRange.Builder, + com.google.cloud.visionai.v1.IntRangeOrBuilder> + getIntRangesFieldBuilder() { + if (intRangesBuilder_ == null) { + intRangesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.visionai.v1.IntRange, + com.google.cloud.visionai.v1.IntRange.Builder, + com.google.cloud.visionai.v1.IntRangeOrBuilder>( + intRanges_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + intRanges_ = null; + } + return intRangesBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.IntRangeArray) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.IntRangeArray) + private static final com.google.cloud.visionai.v1.IntRangeArray DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.IntRangeArray(); + } + + public static com.google.cloud.visionai.v1.IntRangeArray getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public IntRangeArray parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.IntRangeArray getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/IntRangeArrayOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/IntRangeArrayOrBuilder.java new file mode 100644 index 000000000000..5cd9812ad73b --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/IntRangeArrayOrBuilder.java @@ -0,0 +1,78 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/warehouse.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface IntRangeArrayOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.IntRangeArray) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Int range values.
+   * 
+ * + * repeated .google.cloud.visionai.v1.IntRange int_ranges = 1; + */ + java.util.List getIntRangesList(); + /** + * + * + *
+   * Int range values.
+   * 
+ * + * repeated .google.cloud.visionai.v1.IntRange int_ranges = 1; + */ + com.google.cloud.visionai.v1.IntRange getIntRanges(int index); + /** + * + * + *
+   * Int range values.
+   * 
+ * + * repeated .google.cloud.visionai.v1.IntRange int_ranges = 1; + */ + int getIntRangesCount(); + /** + * + * + *
+   * Int range values.
+   * 
+ * + * repeated .google.cloud.visionai.v1.IntRange int_ranges = 1; + */ + java.util.List + getIntRangesOrBuilderList(); + /** + * + * + *
+   * Int range values.
+   * 
+ * + * repeated .google.cloud.visionai.v1.IntRange int_ranges = 1; + */ + com.google.cloud.visionai.v1.IntRangeOrBuilder getIntRangesOrBuilder(int index); +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/IntRangeOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/IntRangeOrBuilder.java new file mode 100644 index 000000000000..2735adea69da --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/IntRangeOrBuilder.java @@ -0,0 +1,76 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/warehouse.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface IntRangeOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.IntRange) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Start of the int range.
+   * 
+ * + * optional int64 start = 1; + * + * @return Whether the start field is set. + */ + boolean hasStart(); + /** + * + * + *
+   * Start of the int range.
+   * 
+ * + * optional int64 start = 1; + * + * @return The start. + */ + long getStart(); + + /** + * + * + *
+   * End of the int range.
+   * 
+ * + * optional int64 end = 2; + * + * @return Whether the end field is set. + */ + boolean hasEnd(); + /** + * + * + *
+   * End of the int range.
+   * 
+ * + * optional int64 end = 2; + * + * @return The end. + */ + long getEnd(); +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/Lease.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/Lease.java new file mode 100644 index 000000000000..bb4d1c97d338 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/Lease.java @@ -0,0 +1,1408 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/streaming_service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * The lease message.
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.Lease} + */ +public final class Lease extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.Lease) + LeaseOrBuilder { + private static final long serialVersionUID = 0L; + // Use Lease.newBuilder() to construct. + private Lease(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Lease() { + id_ = ""; + series_ = ""; + owner_ = ""; + leaseType_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Lease(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.StreamingServiceProto + .internal_static_google_cloud_visionai_v1_Lease_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.StreamingServiceProto + .internal_static_google_cloud_visionai_v1_Lease_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.Lease.class, + com.google.cloud.visionai.v1.Lease.Builder.class); + } + + private int bitField0_; + public static final int ID_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object id_ = ""; + /** + * + * + *
+   * The lease id.
+   * 
+ * + * string id = 1; + * + * @return The id. + */ + @java.lang.Override + public java.lang.String getId() { + java.lang.Object ref = id_; + 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(); + id_ = s; + return s; + } + } + /** + * + * + *
+   * The lease id.
+   * 
+ * + * string id = 1; + * + * @return The bytes for id. + */ + @java.lang.Override + public com.google.protobuf.ByteString getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SERIES_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object series_ = ""; + /** + * + * + *
+   * The series name.
+   * 
+ * + * string series = 2; + * + * @return The series. + */ + @java.lang.Override + public java.lang.String getSeries() { + java.lang.Object ref = series_; + 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(); + series_ = s; + return s; + } + } + /** + * + * + *
+   * The series name.
+   * 
+ * + * string series = 2; + * + * @return The bytes for series. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSeriesBytes() { + java.lang.Object ref = series_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + series_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int OWNER_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object owner_ = ""; + /** + * + * + *
+   * The owner name.
+   * 
+ * + * string owner = 3; + * + * @return The owner. + */ + @java.lang.Override + public java.lang.String getOwner() { + java.lang.Object ref = owner_; + 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(); + owner_ = s; + return s; + } + } + /** + * + * + *
+   * The owner name.
+   * 
+ * + * string owner = 3; + * + * @return The bytes for owner. + */ + @java.lang.Override + public com.google.protobuf.ByteString getOwnerBytes() { + java.lang.Object ref = owner_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + owner_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int EXPIRE_TIME_FIELD_NUMBER = 4; + private com.google.protobuf.Timestamp expireTime_; + /** + * + * + *
+   * The lease expire time.
+   * 
+ * + * .google.protobuf.Timestamp expire_time = 4; + * + * @return Whether the expireTime field is set. + */ + @java.lang.Override + public boolean hasExpireTime() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * The lease expire time.
+   * 
+ * + * .google.protobuf.Timestamp expire_time = 4; + * + * @return The expireTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getExpireTime() { + return expireTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : expireTime_; + } + /** + * + * + *
+   * The lease expire time.
+   * 
+ * + * .google.protobuf.Timestamp expire_time = 4; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getExpireTimeOrBuilder() { + return expireTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : expireTime_; + } + + public static final int LEASE_TYPE_FIELD_NUMBER = 5; + private int leaseType_ = 0; + /** + * + * + *
+   * The lease type.
+   * 
+ * + * .google.cloud.visionai.v1.LeaseType lease_type = 5; + * + * @return The enum numeric value on the wire for leaseType. + */ + @java.lang.Override + public int getLeaseTypeValue() { + return leaseType_; + } + /** + * + * + *
+   * The lease type.
+   * 
+ * + * .google.cloud.visionai.v1.LeaseType lease_type = 5; + * + * @return The leaseType. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.LeaseType getLeaseType() { + com.google.cloud.visionai.v1.LeaseType result = + com.google.cloud.visionai.v1.LeaseType.forNumber(leaseType_); + return result == null ? com.google.cloud.visionai.v1.LeaseType.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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, id_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(series_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, series_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(owner_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, owner_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(4, getExpireTime()); + } + if (leaseType_ != com.google.cloud.visionai.v1.LeaseType.LEASE_TYPE_UNSPECIFIED.getNumber()) { + output.writeEnum(5, leaseType_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, id_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(series_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, series_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(owner_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, owner_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getExpireTime()); + } + if (leaseType_ != com.google.cloud.visionai.v1.LeaseType.LEASE_TYPE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(5, leaseType_); + } + size += getUnknownFields().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.visionai.v1.Lease)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.Lease other = (com.google.cloud.visionai.v1.Lease) obj; + + if (!getId().equals(other.getId())) return false; + if (!getSeries().equals(other.getSeries())) return false; + if (!getOwner().equals(other.getOwner())) return false; + if (hasExpireTime() != other.hasExpireTime()) return false; + if (hasExpireTime()) { + if (!getExpireTime().equals(other.getExpireTime())) return false; + } + if (leaseType_ != other.leaseType_) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ID_FIELD_NUMBER; + hash = (53 * hash) + getId().hashCode(); + hash = (37 * hash) + SERIES_FIELD_NUMBER; + hash = (53 * hash) + getSeries().hashCode(); + hash = (37 * hash) + OWNER_FIELD_NUMBER; + hash = (53 * hash) + getOwner().hashCode(); + if (hasExpireTime()) { + hash = (37 * hash) + EXPIRE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getExpireTime().hashCode(); + } + hash = (37 * hash) + LEASE_TYPE_FIELD_NUMBER; + hash = (53 * hash) + leaseType_; + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.Lease parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.Lease 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.visionai.v1.Lease parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.Lease 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.visionai.v1.Lease parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.Lease parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.Lease parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.Lease 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.visionai.v1.Lease parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.Lease 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.visionai.v1.Lease parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.Lease 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.visionai.v1.Lease 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 lease message.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.Lease} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.Lease) + com.google.cloud.visionai.v1.LeaseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.StreamingServiceProto + .internal_static_google_cloud_visionai_v1_Lease_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.StreamingServiceProto + .internal_static_google_cloud_visionai_v1_Lease_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.Lease.class, + com.google.cloud.visionai.v1.Lease.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.Lease.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getExpireTimeFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + id_ = ""; + series_ = ""; + owner_ = ""; + expireTime_ = null; + if (expireTimeBuilder_ != null) { + expireTimeBuilder_.dispose(); + expireTimeBuilder_ = null; + } + leaseType_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.StreamingServiceProto + .internal_static_google_cloud_visionai_v1_Lease_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.Lease getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.Lease.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.Lease build() { + com.google.cloud.visionai.v1.Lease result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.Lease buildPartial() { + com.google.cloud.visionai.v1.Lease result = new com.google.cloud.visionai.v1.Lease(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.visionai.v1.Lease result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.id_ = id_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.series_ = series_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.owner_ = owner_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000008) != 0)) { + result.expireTime_ = expireTimeBuilder_ == null ? expireTime_ : expireTimeBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.leaseType_ = leaseType_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.Lease) { + return mergeFrom((com.google.cloud.visionai.v1.Lease) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.Lease other) { + if (other == com.google.cloud.visionai.v1.Lease.getDefaultInstance()) return this; + if (!other.getId().isEmpty()) { + id_ = other.id_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getSeries().isEmpty()) { + series_ = other.series_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getOwner().isEmpty()) { + owner_ = other.owner_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (other.hasExpireTime()) { + mergeExpireTime(other.getExpireTime()); + } + if (other.leaseType_ != 0) { + setLeaseTypeValue(other.getLeaseTypeValue()); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + id_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + series_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + owner_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + input.readMessage(getExpireTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 40: + { + leaseType_ = input.readEnum(); + bitField0_ |= 0x00000010; + break; + } // case 40 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object id_ = ""; + /** + * + * + *
+     * The lease id.
+     * 
+ * + * string id = 1; + * + * @return The id. + */ + public java.lang.String getId() { + java.lang.Object ref = id_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + id_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The lease id.
+     * 
+ * + * string id = 1; + * + * @return The bytes for id. + */ + public com.google.protobuf.ByteString getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The lease id.
+     * 
+ * + * string id = 1; + * + * @param value The id to set. + * @return This builder for chaining. + */ + public Builder setId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + id_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The lease id.
+     * 
+ * + * string id = 1; + * + * @return This builder for chaining. + */ + public Builder clearId() { + id_ = getDefaultInstance().getId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * The lease id.
+     * 
+ * + * string id = 1; + * + * @param value The bytes for id to set. + * @return This builder for chaining. + */ + public Builder setIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + id_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object series_ = ""; + /** + * + * + *
+     * The series name.
+     * 
+ * + * string series = 2; + * + * @return The series. + */ + public java.lang.String getSeries() { + java.lang.Object ref = series_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + series_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The series name.
+     * 
+ * + * string series = 2; + * + * @return The bytes for series. + */ + public com.google.protobuf.ByteString getSeriesBytes() { + java.lang.Object ref = series_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + series_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The series name.
+     * 
+ * + * string series = 2; + * + * @param value The series to set. + * @return This builder for chaining. + */ + public Builder setSeries(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + series_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * The series name.
+     * 
+ * + * string series = 2; + * + * @return This builder for chaining. + */ + public Builder clearSeries() { + series_ = getDefaultInstance().getSeries(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * The series name.
+     * 
+ * + * string series = 2; + * + * @param value The bytes for series to set. + * @return This builder for chaining. + */ + public Builder setSeriesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + series_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object owner_ = ""; + /** + * + * + *
+     * The owner name.
+     * 
+ * + * string owner = 3; + * + * @return The owner. + */ + public java.lang.String getOwner() { + java.lang.Object ref = owner_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + owner_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The owner name.
+     * 
+ * + * string owner = 3; + * + * @return The bytes for owner. + */ + public com.google.protobuf.ByteString getOwnerBytes() { + java.lang.Object ref = owner_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + owner_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The owner name.
+     * 
+ * + * string owner = 3; + * + * @param value The owner to set. + * @return This builder for chaining. + */ + public Builder setOwner(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + owner_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * The owner name.
+     * 
+ * + * string owner = 3; + * + * @return This builder for chaining. + */ + public Builder clearOwner() { + owner_ = getDefaultInstance().getOwner(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * The owner name.
+     * 
+ * + * string owner = 3; + * + * @param value The bytes for owner to set. + * @return This builder for chaining. + */ + public Builder setOwnerBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + owner_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp expireTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + expireTimeBuilder_; + /** + * + * + *
+     * The lease expire time.
+     * 
+ * + * .google.protobuf.Timestamp expire_time = 4; + * + * @return Whether the expireTime field is set. + */ + public boolean hasExpireTime() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + * + * + *
+     * The lease expire time.
+     * 
+ * + * .google.protobuf.Timestamp expire_time = 4; + * + * @return The expireTime. + */ + public com.google.protobuf.Timestamp getExpireTime() { + if (expireTimeBuilder_ == null) { + return expireTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : expireTime_; + } else { + return expireTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The lease expire time.
+     * 
+ * + * .google.protobuf.Timestamp expire_time = 4; + */ + public Builder setExpireTime(com.google.protobuf.Timestamp value) { + if (expireTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + expireTime_ = value; + } else { + expireTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * The lease expire time.
+     * 
+ * + * .google.protobuf.Timestamp expire_time = 4; + */ + public Builder setExpireTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (expireTimeBuilder_ == null) { + expireTime_ = builderForValue.build(); + } else { + expireTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * The lease expire time.
+     * 
+ * + * .google.protobuf.Timestamp expire_time = 4; + */ + public Builder mergeExpireTime(com.google.protobuf.Timestamp value) { + if (expireTimeBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) + && expireTime_ != null + && expireTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getExpireTimeBuilder().mergeFrom(value); + } else { + expireTime_ = value; + } + } else { + expireTimeBuilder_.mergeFrom(value); + } + if (expireTime_ != null) { + bitField0_ |= 0x00000008; + onChanged(); + } + return this; + } + /** + * + * + *
+     * The lease expire time.
+     * 
+ * + * .google.protobuf.Timestamp expire_time = 4; + */ + public Builder clearExpireTime() { + bitField0_ = (bitField0_ & ~0x00000008); + expireTime_ = null; + if (expireTimeBuilder_ != null) { + expireTimeBuilder_.dispose(); + expireTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * The lease expire time.
+     * 
+ * + * .google.protobuf.Timestamp expire_time = 4; + */ + public com.google.protobuf.Timestamp.Builder getExpireTimeBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return getExpireTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The lease expire time.
+     * 
+ * + * .google.protobuf.Timestamp expire_time = 4; + */ + public com.google.protobuf.TimestampOrBuilder getExpireTimeOrBuilder() { + if (expireTimeBuilder_ != null) { + return expireTimeBuilder_.getMessageOrBuilder(); + } else { + return expireTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : expireTime_; + } + } + /** + * + * + *
+     * The lease expire time.
+     * 
+ * + * .google.protobuf.Timestamp expire_time = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getExpireTimeFieldBuilder() { + if (expireTimeBuilder_ == null) { + expireTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getExpireTime(), getParentForChildren(), isClean()); + expireTime_ = null; + } + return expireTimeBuilder_; + } + + private int leaseType_ = 0; + /** + * + * + *
+     * The lease type.
+     * 
+ * + * .google.cloud.visionai.v1.LeaseType lease_type = 5; + * + * @return The enum numeric value on the wire for leaseType. + */ + @java.lang.Override + public int getLeaseTypeValue() { + return leaseType_; + } + /** + * + * + *
+     * The lease type.
+     * 
+ * + * .google.cloud.visionai.v1.LeaseType lease_type = 5; + * + * @param value The enum numeric value on the wire for leaseType to set. + * @return This builder for chaining. + */ + public Builder setLeaseTypeValue(int value) { + leaseType_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * The lease type.
+     * 
+ * + * .google.cloud.visionai.v1.LeaseType lease_type = 5; + * + * @return The leaseType. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.LeaseType getLeaseType() { + com.google.cloud.visionai.v1.LeaseType result = + com.google.cloud.visionai.v1.LeaseType.forNumber(leaseType_); + return result == null ? com.google.cloud.visionai.v1.LeaseType.UNRECOGNIZED : result; + } + /** + * + * + *
+     * The lease type.
+     * 
+ * + * .google.cloud.visionai.v1.LeaseType lease_type = 5; + * + * @param value The leaseType to set. + * @return This builder for chaining. + */ + public Builder setLeaseType(com.google.cloud.visionai.v1.LeaseType value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000010; + leaseType_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * The lease type.
+     * 
+ * + * .google.cloud.visionai.v1.LeaseType lease_type = 5; + * + * @return This builder for chaining. + */ + public Builder clearLeaseType() { + bitField0_ = (bitField0_ & ~0x00000010); + leaseType_ = 0; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.Lease) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.Lease) + private static final com.google.cloud.visionai.v1.Lease DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.Lease(); + } + + public static com.google.cloud.visionai.v1.Lease getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Lease parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.Lease getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/LeaseOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/LeaseOrBuilder.java new file mode 100644 index 000000000000..154a7f5ed78a --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/LeaseOrBuilder.java @@ -0,0 +1,161 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/streaming_service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface LeaseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.Lease) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The lease id.
+   * 
+ * + * string id = 1; + * + * @return The id. + */ + java.lang.String getId(); + /** + * + * + *
+   * The lease id.
+   * 
+ * + * string id = 1; + * + * @return The bytes for id. + */ + com.google.protobuf.ByteString getIdBytes(); + + /** + * + * + *
+   * The series name.
+   * 
+ * + * string series = 2; + * + * @return The series. + */ + java.lang.String getSeries(); + /** + * + * + *
+   * The series name.
+   * 
+ * + * string series = 2; + * + * @return The bytes for series. + */ + com.google.protobuf.ByteString getSeriesBytes(); + + /** + * + * + *
+   * The owner name.
+   * 
+ * + * string owner = 3; + * + * @return The owner. + */ + java.lang.String getOwner(); + /** + * + * + *
+   * The owner name.
+   * 
+ * + * string owner = 3; + * + * @return The bytes for owner. + */ + com.google.protobuf.ByteString getOwnerBytes(); + + /** + * + * + *
+   * The lease expire time.
+   * 
+ * + * .google.protobuf.Timestamp expire_time = 4; + * + * @return Whether the expireTime field is set. + */ + boolean hasExpireTime(); + /** + * + * + *
+   * The lease expire time.
+   * 
+ * + * .google.protobuf.Timestamp expire_time = 4; + * + * @return The expireTime. + */ + com.google.protobuf.Timestamp getExpireTime(); + /** + * + * + *
+   * The lease expire time.
+   * 
+ * + * .google.protobuf.Timestamp expire_time = 4; + */ + com.google.protobuf.TimestampOrBuilder getExpireTimeOrBuilder(); + + /** + * + * + *
+   * The lease type.
+   * 
+ * + * .google.cloud.visionai.v1.LeaseType lease_type = 5; + * + * @return The enum numeric value on the wire for leaseType. + */ + int getLeaseTypeValue(); + /** + * + * + *
+   * The lease type.
+   * 
+ * + * .google.cloud.visionai.v1.LeaseType lease_type = 5; + * + * @return The leaseType. + */ + com.google.cloud.visionai.v1.LeaseType getLeaseType(); +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/LeaseType.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/LeaseType.java new file mode 100644 index 000000000000..a4a3c71e1c43 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/LeaseType.java @@ -0,0 +1,177 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/streaming_service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * The lease type.
+ * 
+ * + * Protobuf enum {@code google.cloud.visionai.v1.LeaseType} + */ +public enum LeaseType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+   * Lease type unspecified.
+   * 
+ * + * LEASE_TYPE_UNSPECIFIED = 0; + */ + LEASE_TYPE_UNSPECIFIED(0), + /** + * + * + *
+   * Lease for stream reader.
+   * 
+ * + * LEASE_TYPE_READER = 1; + */ + LEASE_TYPE_READER(1), + /** + * + * + *
+   * Lease for stream writer.
+   * 
+ * + * LEASE_TYPE_WRITER = 2; + */ + LEASE_TYPE_WRITER(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+   * Lease type unspecified.
+   * 
+ * + * LEASE_TYPE_UNSPECIFIED = 0; + */ + public static final int LEASE_TYPE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+   * Lease for stream reader.
+   * 
+ * + * LEASE_TYPE_READER = 1; + */ + public static final int LEASE_TYPE_READER_VALUE = 1; + /** + * + * + *
+   * Lease for stream writer.
+   * 
+ * + * LEASE_TYPE_WRITER = 2; + */ + public static final int LEASE_TYPE_WRITER_VALUE = 2; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static LeaseType valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static LeaseType forNumber(int value) { + switch (value) { + case 0: + return LEASE_TYPE_UNSPECIFIED; + case 1: + return LEASE_TYPE_READER; + case 2: + return LEASE_TYPE_WRITER; + 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 LeaseType findValueByNumber(int number) { + return LeaseType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + 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.visionai.v1.StreamingServiceProto.getDescriptor().getEnumTypes().get(0); + } + + private static final LeaseType[] VALUES = values(); + + public static LeaseType 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 LeaseType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.visionai.v1.LeaseType) +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListAnalysesRequest.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListAnalysesRequest.java new file mode 100644 index 000000000000..d3e238fa56a7 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListAnalysesRequest.java @@ -0,0 +1,1282 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/lva_service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * Message for requesting list of Analyses
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.ListAnalysesRequest} + */ +public final class ListAnalysesRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.ListAnalysesRequest) + ListAnalysesRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListAnalysesRequest.newBuilder() to construct. + private ListAnalysesRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListAnalysesRequest() { + parent_ = ""; + pageToken_ = ""; + filter_ = ""; + orderBy_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListAnalysesRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.LvaServiceProto + .internal_static_google_cloud_visionai_v1_ListAnalysesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.LvaServiceProto + .internal_static_google_cloud_visionai_v1_ListAnalysesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.ListAnalysesRequest.class, + com.google.cloud.visionai.v1.ListAnalysesRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + /** + * + * + *
+   * Required. Parent value for ListAnalysesRequest
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + 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(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Parent value for ListAnalysesRequest
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 2; + private int pageSize_ = 0; + /** + * + * + *
+   * Requested page size. Server may return fewer items than requested.
+   * If unspecified, server will pick an appropriate default.
+   * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object pageToken_ = ""; + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + 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(); + pageToken_ = s; + return s; + } + } + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FILTER_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object filter_ = ""; + /** + * + * + *
+   * Filtering results
+   * 
+ * + * string filter = 4; + * + * @return The filter. + */ + @java.lang.Override + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + 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(); + filter_ = s; + return s; + } + } + /** + * + * + *
+   * Filtering results
+   * 
+ * + * string filter = 4; + * + * @return The bytes for filter. + */ + @java.lang.Override + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ORDER_BY_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object orderBy_ = ""; + /** + * + * + *
+   * Hint for how to order the results
+   * 
+ * + * string order_by = 5; + * + * @return The orderBy. + */ + @java.lang.Override + public java.lang.String getOrderBy() { + java.lang.Object ref = orderBy_; + 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(); + orderBy_ = s; + return s; + } + } + /** + * + * + *
+   * Hint for how to order the results
+   * 
+ * + * string order_by = 5; + * + * @return The bytes for orderBy. + */ + @java.lang.Override + public com.google.protobuf.ByteString getOrderByBytes() { + java.lang.Object ref = orderBy_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + orderBy_ = 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, filter_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(orderBy_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, orderBy_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, filter_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(orderBy_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, orderBy_); + } + size += getUnknownFields().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.visionai.v1.ListAnalysesRequest)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.ListAnalysesRequest other = + (com.google.cloud.visionai.v1.ListAnalysesRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (!getFilter().equals(other.getFilter())) return false; + if (!getOrderBy().equals(other.getOrderBy())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + hash = (37 * hash) + FILTER_FIELD_NUMBER; + hash = (53 * hash) + getFilter().hashCode(); + hash = (37 * hash) + ORDER_BY_FIELD_NUMBER; + hash = (53 * hash) + getOrderBy().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.ListAnalysesRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ListAnalysesRequest 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.visionai.v1.ListAnalysesRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ListAnalysesRequest 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.visionai.v1.ListAnalysesRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ListAnalysesRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.ListAnalysesRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ListAnalysesRequest 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.visionai.v1.ListAnalysesRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ListAnalysesRequest 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.visionai.v1.ListAnalysesRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ListAnalysesRequest 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.visionai.v1.ListAnalysesRequest 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; + } + /** + * + * + *
+   * Message for requesting list of Analyses
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.ListAnalysesRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.ListAnalysesRequest) + com.google.cloud.visionai.v1.ListAnalysesRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.LvaServiceProto + .internal_static_google_cloud_visionai_v1_ListAnalysesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.LvaServiceProto + .internal_static_google_cloud_visionai_v1_ListAnalysesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.ListAnalysesRequest.class, + com.google.cloud.visionai.v1.ListAnalysesRequest.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.ListAnalysesRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + pageSize_ = 0; + pageToken_ = ""; + filter_ = ""; + orderBy_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.LvaServiceProto + .internal_static_google_cloud_visionai_v1_ListAnalysesRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ListAnalysesRequest getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.ListAnalysesRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ListAnalysesRequest build() { + com.google.cloud.visionai.v1.ListAnalysesRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ListAnalysesRequest buildPartial() { + com.google.cloud.visionai.v1.ListAnalysesRequest result = + new com.google.cloud.visionai.v1.ListAnalysesRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.visionai.v1.ListAnalysesRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.pageSize_ = pageSize_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.pageToken_ = pageToken_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.filter_ = filter_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.orderBy_ = orderBy_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.ListAnalysesRequest) { + return mergeFrom((com.google.cloud.visionai.v1.ListAnalysesRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.ListAnalysesRequest other) { + if (other == com.google.cloud.visionai.v1.ListAnalysesRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getFilter().isEmpty()) { + filter_ = other.filter_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (!other.getOrderBy().isEmpty()) { + orderBy_ = other.orderBy_; + bitField0_ |= 0x00000010; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + pageSize_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + orderBy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 42 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. Parent value for ListAnalysesRequest
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Parent value for ListAnalysesRequest
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Parent value for ListAnalysesRequest
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Parent value for ListAnalysesRequest
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Parent value for ListAnalysesRequest
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private int pageSize_; + /** + * + * + *
+     * Requested page size. Server may return fewer items than requested.
+     * If unspecified, server will pick an appropriate default.
+     * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + * + * + *
+     * Requested page size. Server may return fewer items than requested.
+     * If unspecified, server will pick an appropriate default.
+     * 
+ * + * int32 page_size = 2; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Requested page size. Server may return fewer items than requested.
+     * If unspecified, server will pick an appropriate default.
+     * 
+ * + * int32 page_size = 2; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + bitField0_ = (bitField0_ & ~0x00000002); + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string page_token = 3; + * + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + pageToken_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string page_token = 3; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + pageToken_ = getDefaultInstance().getPageToken(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string page_token = 3; + * + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + pageToken_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object filter_ = ""; + /** + * + * + *
+     * Filtering results
+     * 
+ * + * string filter = 4; + * + * @return The filter. + */ + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Filtering results
+     * 
+ * + * string filter = 4; + * + * @return The bytes for filter. + */ + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Filtering results
+     * 
+ * + * string filter = 4; + * + * @param value The filter to set. + * @return This builder for chaining. + */ + public Builder setFilter(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + filter_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Filtering results
+     * 
+ * + * string filter = 4; + * + * @return This builder for chaining. + */ + public Builder clearFilter() { + filter_ = getDefaultInstance().getFilter(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+     * Filtering results
+     * 
+ * + * string filter = 4; + * + * @param value The bytes for filter to set. + * @return This builder for chaining. + */ + public Builder setFilterBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + filter_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private java.lang.Object orderBy_ = ""; + /** + * + * + *
+     * Hint for how to order the results
+     * 
+ * + * string order_by = 5; + * + * @return The orderBy. + */ + public java.lang.String getOrderBy() { + java.lang.Object ref = orderBy_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + orderBy_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Hint for how to order the results
+     * 
+ * + * string order_by = 5; + * + * @return The bytes for orderBy. + */ + public com.google.protobuf.ByteString getOrderByBytes() { + java.lang.Object ref = orderBy_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + orderBy_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Hint for how to order the results
+     * 
+ * + * string order_by = 5; + * + * @param value The orderBy to set. + * @return This builder for chaining. + */ + public Builder setOrderBy(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + orderBy_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Hint for how to order the results
+     * 
+ * + * string order_by = 5; + * + * @return This builder for chaining. + */ + public Builder clearOrderBy() { + orderBy_ = getDefaultInstance().getOrderBy(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + /** + * + * + *
+     * Hint for how to order the results
+     * 
+ * + * string order_by = 5; + * + * @param value The bytes for orderBy to set. + * @return This builder for chaining. + */ + public Builder setOrderByBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + orderBy_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.ListAnalysesRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.ListAnalysesRequest) + private static final com.google.cloud.visionai.v1.ListAnalysesRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.ListAnalysesRequest(); + } + + public static com.google.cloud.visionai.v1.ListAnalysesRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListAnalysesRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.ListAnalysesRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListAnalysesRequestOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListAnalysesRequestOrBuilder.java new file mode 100644 index 000000000000..e4608318f81c --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListAnalysesRequestOrBuilder.java @@ -0,0 +1,144 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/lva_service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface ListAnalysesRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.ListAnalysesRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Parent value for ListAnalysesRequest
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. Parent value for ListAnalysesRequest
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Requested page size. Server may return fewer items than requested.
+   * If unspecified, server will pick an appropriate default.
+   * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); + + /** + * + * + *
+   * Filtering results
+   * 
+ * + * string filter = 4; + * + * @return The filter. + */ + java.lang.String getFilter(); + /** + * + * + *
+   * Filtering results
+   * 
+ * + * string filter = 4; + * + * @return The bytes for filter. + */ + com.google.protobuf.ByteString getFilterBytes(); + + /** + * + * + *
+   * Hint for how to order the results
+   * 
+ * + * string order_by = 5; + * + * @return The orderBy. + */ + java.lang.String getOrderBy(); + /** + * + * + *
+   * Hint for how to order the results
+   * 
+ * + * string order_by = 5; + * + * @return The bytes for orderBy. + */ + com.google.protobuf.ByteString getOrderByBytes(); +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListAnalysesResponse.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListAnalysesResponse.java new file mode 100644 index 000000000000..7e0dcb516665 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListAnalysesResponse.java @@ -0,0 +1,1394 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/lva_service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * Message for response to listing Analyses
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.ListAnalysesResponse} + */ +public final class ListAnalysesResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.ListAnalysesResponse) + ListAnalysesResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListAnalysesResponse.newBuilder() to construct. + private ListAnalysesResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListAnalysesResponse() { + analyses_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + unreachable_ = com.google.protobuf.LazyStringArrayList.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListAnalysesResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.LvaServiceProto + .internal_static_google_cloud_visionai_v1_ListAnalysesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.LvaServiceProto + .internal_static_google_cloud_visionai_v1_ListAnalysesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.ListAnalysesResponse.class, + com.google.cloud.visionai.v1.ListAnalysesResponse.Builder.class); + } + + public static final int ANALYSES_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List analyses_; + /** + * + * + *
+   * The list of Analysis
+   * 
+ * + * repeated .google.cloud.visionai.v1.Analysis analyses = 1; + */ + @java.lang.Override + public java.util.List getAnalysesList() { + return analyses_; + } + /** + * + * + *
+   * The list of Analysis
+   * 
+ * + * repeated .google.cloud.visionai.v1.Analysis analyses = 1; + */ + @java.lang.Override + public java.util.List + getAnalysesOrBuilderList() { + return analyses_; + } + /** + * + * + *
+   * The list of Analysis
+   * 
+ * + * repeated .google.cloud.visionai.v1.Analysis analyses = 1; + */ + @java.lang.Override + public int getAnalysesCount() { + return analyses_.size(); + } + /** + * + * + *
+   * The list of Analysis
+   * 
+ * + * repeated .google.cloud.visionai.v1.Analysis analyses = 1; + */ + @java.lang.Override + public com.google.cloud.visionai.v1.Analysis getAnalyses(int index) { + return analyses_.get(index); + } + /** + * + * + *
+   * The list of Analysis
+   * 
+ * + * repeated .google.cloud.visionai.v1.Analysis analyses = 1; + */ + @java.lang.Override + public com.google.cloud.visionai.v1.AnalysisOrBuilder getAnalysesOrBuilder(int index) { + return analyses_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + 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(); + nextPageToken_ = s; + return s; + } + } + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int UNREACHABLE_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList unreachable_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @return A list containing the unreachable. + */ + public com.google.protobuf.ProtocolStringList getUnreachableList() { + return unreachable_; + } + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @return The count of unreachable. + */ + public int getUnreachableCount() { + return unreachable_.size(); + } + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + public java.lang.String getUnreachable(int index) { + return unreachable_.get(index); + } + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the value to return. + * @return The bytes of the unreachable at the given index. + */ + public com.google.protobuf.ByteString getUnreachableBytes(int index) { + return unreachable_.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 < analyses_.size(); i++) { + output.writeMessage(1, analyses_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + } + for (int i = 0; i < unreachable_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, unreachable_.getRaw(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < analyses_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, analyses_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + } + { + int dataSize = 0; + for (int i = 0; i < unreachable_.size(); i++) { + dataSize += computeStringSizeNoTag(unreachable_.getRaw(i)); + } + size += dataSize; + size += 1 * getUnreachableList().size(); + } + size += getUnknownFields().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.visionai.v1.ListAnalysesResponse)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.ListAnalysesResponse other = + (com.google.cloud.visionai.v1.ListAnalysesResponse) obj; + + if (!getAnalysesList().equals(other.getAnalysesList())) return false; + if (!getNextPageToken().equals(other.getNextPageToken())) return false; + if (!getUnreachableList().equals(other.getUnreachableList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getAnalysesCount() > 0) { + hash = (37 * hash) + ANALYSES_FIELD_NUMBER; + hash = (53 * hash) + getAnalysesList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + if (getUnreachableCount() > 0) { + hash = (37 * hash) + UNREACHABLE_FIELD_NUMBER; + hash = (53 * hash) + getUnreachableList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.ListAnalysesResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ListAnalysesResponse 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.visionai.v1.ListAnalysesResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ListAnalysesResponse 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.visionai.v1.ListAnalysesResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ListAnalysesResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.ListAnalysesResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ListAnalysesResponse 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.visionai.v1.ListAnalysesResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ListAnalysesResponse 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.visionai.v1.ListAnalysesResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ListAnalysesResponse 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.visionai.v1.ListAnalysesResponse 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; + } + /** + * + * + *
+   * Message for response to listing Analyses
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.ListAnalysesResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.ListAnalysesResponse) + com.google.cloud.visionai.v1.ListAnalysesResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.LvaServiceProto + .internal_static_google_cloud_visionai_v1_ListAnalysesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.LvaServiceProto + .internal_static_google_cloud_visionai_v1_ListAnalysesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.ListAnalysesResponse.class, + com.google.cloud.visionai.v1.ListAnalysesResponse.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.ListAnalysesResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (analysesBuilder_ == null) { + analyses_ = java.util.Collections.emptyList(); + } else { + analyses_ = null; + analysesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + nextPageToken_ = ""; + unreachable_ = com.google.protobuf.LazyStringArrayList.emptyList(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.LvaServiceProto + .internal_static_google_cloud_visionai_v1_ListAnalysesResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ListAnalysesResponse getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.ListAnalysesResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ListAnalysesResponse build() { + com.google.cloud.visionai.v1.ListAnalysesResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ListAnalysesResponse buildPartial() { + com.google.cloud.visionai.v1.ListAnalysesResponse result = + new com.google.cloud.visionai.v1.ListAnalysesResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.visionai.v1.ListAnalysesResponse result) { + if (analysesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + analyses_ = java.util.Collections.unmodifiableList(analyses_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.analyses_ = analyses_; + } else { + result.analyses_ = analysesBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.visionai.v1.ListAnalysesResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.nextPageToken_ = nextPageToken_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + unreachable_.makeImmutable(); + result.unreachable_ = unreachable_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.ListAnalysesResponse) { + return mergeFrom((com.google.cloud.visionai.v1.ListAnalysesResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.ListAnalysesResponse other) { + if (other == com.google.cloud.visionai.v1.ListAnalysesResponse.getDefaultInstance()) + return this; + if (analysesBuilder_ == null) { + if (!other.analyses_.isEmpty()) { + if (analyses_.isEmpty()) { + analyses_ = other.analyses_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureAnalysesIsMutable(); + analyses_.addAll(other.analyses_); + } + onChanged(); + } + } else { + if (!other.analyses_.isEmpty()) { + if (analysesBuilder_.isEmpty()) { + analysesBuilder_.dispose(); + analysesBuilder_ = null; + analyses_ = other.analyses_; + bitField0_ = (bitField0_ & ~0x00000001); + analysesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getAnalysesFieldBuilder() + : null; + } else { + analysesBuilder_.addAllMessages(other.analyses_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.unreachable_.isEmpty()) { + if (unreachable_.isEmpty()) { + unreachable_ = other.unreachable_; + bitField0_ |= 0x00000004; + } else { + ensureUnreachableIsMutable(); + unreachable_.addAll(other.unreachable_); + } + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.visionai.v1.Analysis m = + input.readMessage( + com.google.cloud.visionai.v1.Analysis.parser(), extensionRegistry); + if (analysesBuilder_ == null) { + ensureAnalysesIsMutable(); + analyses_.add(m); + } else { + analysesBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureUnreachableIsMutable(); + unreachable_.add(s); + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List analyses_ = + java.util.Collections.emptyList(); + + private void ensureAnalysesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + analyses_ = new java.util.ArrayList(analyses_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.visionai.v1.Analysis, + com.google.cloud.visionai.v1.Analysis.Builder, + com.google.cloud.visionai.v1.AnalysisOrBuilder> + analysesBuilder_; + + /** + * + * + *
+     * The list of Analysis
+     * 
+ * + * repeated .google.cloud.visionai.v1.Analysis analyses = 1; + */ + public java.util.List getAnalysesList() { + if (analysesBuilder_ == null) { + return java.util.Collections.unmodifiableList(analyses_); + } else { + return analysesBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * The list of Analysis
+     * 
+ * + * repeated .google.cloud.visionai.v1.Analysis analyses = 1; + */ + public int getAnalysesCount() { + if (analysesBuilder_ == null) { + return analyses_.size(); + } else { + return analysesBuilder_.getCount(); + } + } + /** + * + * + *
+     * The list of Analysis
+     * 
+ * + * repeated .google.cloud.visionai.v1.Analysis analyses = 1; + */ + public com.google.cloud.visionai.v1.Analysis getAnalyses(int index) { + if (analysesBuilder_ == null) { + return analyses_.get(index); + } else { + return analysesBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * The list of Analysis
+     * 
+ * + * repeated .google.cloud.visionai.v1.Analysis analyses = 1; + */ + public Builder setAnalyses(int index, com.google.cloud.visionai.v1.Analysis value) { + if (analysesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAnalysesIsMutable(); + analyses_.set(index, value); + onChanged(); + } else { + analysesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The list of Analysis
+     * 
+ * + * repeated .google.cloud.visionai.v1.Analysis analyses = 1; + */ + public Builder setAnalyses( + int index, com.google.cloud.visionai.v1.Analysis.Builder builderForValue) { + if (analysesBuilder_ == null) { + ensureAnalysesIsMutable(); + analyses_.set(index, builderForValue.build()); + onChanged(); + } else { + analysesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of Analysis
+     * 
+ * + * repeated .google.cloud.visionai.v1.Analysis analyses = 1; + */ + public Builder addAnalyses(com.google.cloud.visionai.v1.Analysis value) { + if (analysesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAnalysesIsMutable(); + analyses_.add(value); + onChanged(); + } else { + analysesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * The list of Analysis
+     * 
+ * + * repeated .google.cloud.visionai.v1.Analysis analyses = 1; + */ + public Builder addAnalyses(int index, com.google.cloud.visionai.v1.Analysis value) { + if (analysesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAnalysesIsMutable(); + analyses_.add(index, value); + onChanged(); + } else { + analysesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The list of Analysis
+     * 
+ * + * repeated .google.cloud.visionai.v1.Analysis analyses = 1; + */ + public Builder addAnalyses(com.google.cloud.visionai.v1.Analysis.Builder builderForValue) { + if (analysesBuilder_ == null) { + ensureAnalysesIsMutable(); + analyses_.add(builderForValue.build()); + onChanged(); + } else { + analysesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of Analysis
+     * 
+ * + * repeated .google.cloud.visionai.v1.Analysis analyses = 1; + */ + public Builder addAnalyses( + int index, com.google.cloud.visionai.v1.Analysis.Builder builderForValue) { + if (analysesBuilder_ == null) { + ensureAnalysesIsMutable(); + analyses_.add(index, builderForValue.build()); + onChanged(); + } else { + analysesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of Analysis
+     * 
+ * + * repeated .google.cloud.visionai.v1.Analysis analyses = 1; + */ + public Builder addAllAnalyses( + java.lang.Iterable values) { + if (analysesBuilder_ == null) { + ensureAnalysesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, analyses_); + onChanged(); + } else { + analysesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * The list of Analysis
+     * 
+ * + * repeated .google.cloud.visionai.v1.Analysis analyses = 1; + */ + public Builder clearAnalyses() { + if (analysesBuilder_ == null) { + analyses_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + analysesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The list of Analysis
+     * 
+ * + * repeated .google.cloud.visionai.v1.Analysis analyses = 1; + */ + public Builder removeAnalyses(int index) { + if (analysesBuilder_ == null) { + ensureAnalysesIsMutable(); + analyses_.remove(index); + onChanged(); + } else { + analysesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * The list of Analysis
+     * 
+ * + * repeated .google.cloud.visionai.v1.Analysis analyses = 1; + */ + public com.google.cloud.visionai.v1.Analysis.Builder getAnalysesBuilder(int index) { + return getAnalysesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * The list of Analysis
+     * 
+ * + * repeated .google.cloud.visionai.v1.Analysis analyses = 1; + */ + public com.google.cloud.visionai.v1.AnalysisOrBuilder getAnalysesOrBuilder(int index) { + if (analysesBuilder_ == null) { + return analyses_.get(index); + } else { + return analysesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * The list of Analysis
+     * 
+ * + * repeated .google.cloud.visionai.v1.Analysis analyses = 1; + */ + public java.util.List + getAnalysesOrBuilderList() { + if (analysesBuilder_ != null) { + return analysesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(analyses_); + } + } + /** + * + * + *
+     * The list of Analysis
+     * 
+ * + * repeated .google.cloud.visionai.v1.Analysis analyses = 1; + */ + public com.google.cloud.visionai.v1.Analysis.Builder addAnalysesBuilder() { + return getAnalysesFieldBuilder() + .addBuilder(com.google.cloud.visionai.v1.Analysis.getDefaultInstance()); + } + /** + * + * + *
+     * The list of Analysis
+     * 
+ * + * repeated .google.cloud.visionai.v1.Analysis analyses = 1; + */ + public com.google.cloud.visionai.v1.Analysis.Builder addAnalysesBuilder(int index) { + return getAnalysesFieldBuilder() + .addBuilder(index, com.google.cloud.visionai.v1.Analysis.getDefaultInstance()); + } + /** + * + * + *
+     * The list of Analysis
+     * 
+ * + * repeated .google.cloud.visionai.v1.Analysis analyses = 1; + */ + public java.util.List getAnalysesBuilderList() { + return getAnalysesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.visionai.v1.Analysis, + com.google.cloud.visionai.v1.Analysis.Builder, + com.google.cloud.visionai.v1.AnalysisOrBuilder> + getAnalysesFieldBuilder() { + if (analysesBuilder_ == null) { + analysesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.visionai.v1.Analysis, + com.google.cloud.visionai.v1.Analysis.Builder, + com.google.cloud.visionai.v1.AnalysisOrBuilder>( + analyses_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + analyses_ = null; + } + return analysesBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + nextPageToken_ = getDefaultInstance().getNextPageToken(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList unreachable_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureUnreachableIsMutable() { + if (!unreachable_.isModifiable()) { + unreachable_ = new com.google.protobuf.LazyStringArrayList(unreachable_); + } + bitField0_ |= 0x00000004; + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @return A list containing the unreachable. + */ + public com.google.protobuf.ProtocolStringList getUnreachableList() { + unreachable_.makeImmutable(); + return unreachable_; + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @return The count of unreachable. + */ + public int getUnreachableCount() { + return unreachable_.size(); + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + public java.lang.String getUnreachable(int index) { + return unreachable_.get(index); + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the value to return. + * @return The bytes of the unreachable at the given index. + */ + public com.google.protobuf.ByteString getUnreachableBytes(int index) { + return unreachable_.getByteString(index); + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param index The index to set the value at. + * @param value The unreachable to set. + * @return This builder for chaining. + */ + public Builder setUnreachable(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureUnreachableIsMutable(); + unreachable_.set(index, value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param value The unreachable to add. + * @return This builder for chaining. + */ + public Builder addUnreachable(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureUnreachableIsMutable(); + unreachable_.add(value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param values The unreachable to add. + * @return This builder for chaining. + */ + public Builder addAllUnreachable(java.lang.Iterable values) { + ensureUnreachableIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, unreachable_); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @return This builder for chaining. + */ + public Builder clearUnreachable() { + unreachable_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + ; + onChanged(); + return this; + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param value The bytes of the unreachable to add. + * @return This builder for chaining. + */ + public Builder addUnreachableBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureUnreachableIsMutable(); + unreachable_.add(value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.ListAnalysesResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.ListAnalysesResponse) + private static final com.google.cloud.visionai.v1.ListAnalysesResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.ListAnalysesResponse(); + } + + public static com.google.cloud.visionai.v1.ListAnalysesResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListAnalysesResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.ListAnalysesResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListAnalysesResponseOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListAnalysesResponseOrBuilder.java new file mode 100644 index 000000000000..83f18426a156 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListAnalysesResponseOrBuilder.java @@ -0,0 +1,154 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/lva_service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface ListAnalysesResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.ListAnalysesResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The list of Analysis
+   * 
+ * + * repeated .google.cloud.visionai.v1.Analysis analyses = 1; + */ + java.util.List getAnalysesList(); + /** + * + * + *
+   * The list of Analysis
+   * 
+ * + * repeated .google.cloud.visionai.v1.Analysis analyses = 1; + */ + com.google.cloud.visionai.v1.Analysis getAnalyses(int index); + /** + * + * + *
+   * The list of Analysis
+   * 
+ * + * repeated .google.cloud.visionai.v1.Analysis analyses = 1; + */ + int getAnalysesCount(); + /** + * + * + *
+   * The list of Analysis
+   * 
+ * + * repeated .google.cloud.visionai.v1.Analysis analyses = 1; + */ + java.util.List + getAnalysesOrBuilderList(); + /** + * + * + *
+   * The list of Analysis
+   * 
+ * + * repeated .google.cloud.visionai.v1.Analysis analyses = 1; + */ + com.google.cloud.visionai.v1.AnalysisOrBuilder getAnalysesOrBuilder(int index); + + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); + + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @return A list containing the unreachable. + */ + java.util.List getUnreachableList(); + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @return The count of unreachable. + */ + int getUnreachableCount(); + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + java.lang.String getUnreachable(int index); + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the value to return. + * @return The bytes of the unreachable at the given index. + */ + com.google.protobuf.ByteString getUnreachableBytes(int index); +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListAnnotationsRequest.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListAnnotationsRequest.java new file mode 100644 index 000000000000..1ea690c91941 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListAnnotationsRequest.java @@ -0,0 +1,1230 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/warehouse.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * Request message for GetAnnotation API.
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.ListAnnotationsRequest} + */ +public final class ListAnnotationsRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.ListAnnotationsRequest) + ListAnnotationsRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListAnnotationsRequest.newBuilder() to construct. + private ListAnnotationsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListAnnotationsRequest() { + parent_ = ""; + pageToken_ = ""; + filter_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListAnnotationsRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_ListAnnotationsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_ListAnnotationsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.ListAnnotationsRequest.class, + com.google.cloud.visionai.v1.ListAnnotationsRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + /** + * + * + *
+   * The parent, which owns this collection of annotations.
+   * Format:
+   * `projects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset}`
+   * 
+ * + * string parent = 1 [(.google.api.resource_reference) = { ... } + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + 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(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * The parent, which owns this collection of annotations.
+   * Format:
+   * `projects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset}`
+   * 
+ * + * string parent = 1 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 2; + private int pageSize_ = 0; + /** + * + * + *
+   * The maximum number of annotations to return. The service may return fewer
+   * than this value. If unspecified, at most 50 annotations will be returned.
+   * The maximum value is 1000; values above 1000 will be coerced to 1000.
+   * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object pageToken_ = ""; + /** + * + * + *
+   * A page token, received from a previous `ListAnnotations` call.
+   * Provide this to retrieve the subsequent page.
+   *
+   * When paginating, all other parameters provided to `ListAnnotations` must
+   * match the call that provided the page token.
+   * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + 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(); + pageToken_ = s; + return s; + } + } + /** + * + * + *
+   * A page token, received from a previous `ListAnnotations` call.
+   * Provide this to retrieve the subsequent page.
+   *
+   * When paginating, all other parameters provided to `ListAnnotations` must
+   * match the call that provided the page token.
+   * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FILTER_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object filter_ = ""; + /** + * + * + *
+   * The filter applied to the returned list.
+   * We only support filtering for the following fields:
+   * For corpus of STREAM_VIDEO type:
+   * `partition.temporal_partition.start_time`,
+   * `partition.temporal_partition.end_time`, and `key`.
+   * For corpus of VIDEO_ON_DEMAND type,
+   * `partition.relative_temporal_partition.start_offset`,
+   * `partition.relative_temporal_partition.end_offset`, and `key`.
+   * For corpus of IMAGE type, only `key` is supported.
+   * Timestamps are specified in the RFC-3339 format, and only one restriction
+   * may be applied per field, joined by conjunctions.
+   * Format:
+   * "partition.temporal_partition.start_time > "2012-04-21T11:30:00-04:00" AND
+   * partition.temporal_partition.end_time < "2012-04-22T11:30:00-04:00" AND
+   * key = "example_key""
+   * 
+ * + * string filter = 4; + * + * @return The filter. + */ + @java.lang.Override + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + 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(); + filter_ = s; + return s; + } + } + /** + * + * + *
+   * The filter applied to the returned list.
+   * We only support filtering for the following fields:
+   * For corpus of STREAM_VIDEO type:
+   * `partition.temporal_partition.start_time`,
+   * `partition.temporal_partition.end_time`, and `key`.
+   * For corpus of VIDEO_ON_DEMAND type,
+   * `partition.relative_temporal_partition.start_offset`,
+   * `partition.relative_temporal_partition.end_offset`, and `key`.
+   * For corpus of IMAGE type, only `key` is supported.
+   * Timestamps are specified in the RFC-3339 format, and only one restriction
+   * may be applied per field, joined by conjunctions.
+   * Format:
+   * "partition.temporal_partition.start_time > "2012-04-21T11:30:00-04:00" AND
+   * partition.temporal_partition.end_time < "2012-04-22T11:30:00-04:00" AND
+   * key = "example_key""
+   * 
+ * + * string filter = 4; + * + * @return The bytes for filter. + */ + @java.lang.Override + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, filter_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, filter_); + } + size += getUnknownFields().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.visionai.v1.ListAnnotationsRequest)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.ListAnnotationsRequest other = + (com.google.cloud.visionai.v1.ListAnnotationsRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (!getFilter().equals(other.getFilter())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + hash = (37 * hash) + FILTER_FIELD_NUMBER; + hash = (53 * hash) + getFilter().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.ListAnnotationsRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ListAnnotationsRequest 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.visionai.v1.ListAnnotationsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ListAnnotationsRequest 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.visionai.v1.ListAnnotationsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ListAnnotationsRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.ListAnnotationsRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ListAnnotationsRequest 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.visionai.v1.ListAnnotationsRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ListAnnotationsRequest 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.visionai.v1.ListAnnotationsRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ListAnnotationsRequest 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.visionai.v1.ListAnnotationsRequest 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; + } + /** + * + * + *
+   * Request message for GetAnnotation API.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.ListAnnotationsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.ListAnnotationsRequest) + com.google.cloud.visionai.v1.ListAnnotationsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_ListAnnotationsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_ListAnnotationsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.ListAnnotationsRequest.class, + com.google.cloud.visionai.v1.ListAnnotationsRequest.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.ListAnnotationsRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + pageSize_ = 0; + pageToken_ = ""; + filter_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_ListAnnotationsRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ListAnnotationsRequest getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.ListAnnotationsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ListAnnotationsRequest build() { + com.google.cloud.visionai.v1.ListAnnotationsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ListAnnotationsRequest buildPartial() { + com.google.cloud.visionai.v1.ListAnnotationsRequest result = + new com.google.cloud.visionai.v1.ListAnnotationsRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.visionai.v1.ListAnnotationsRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.pageSize_ = pageSize_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.pageToken_ = pageToken_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.filter_ = filter_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.ListAnnotationsRequest) { + return mergeFrom((com.google.cloud.visionai.v1.ListAnnotationsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.ListAnnotationsRequest other) { + if (other == com.google.cloud.visionai.v1.ListAnnotationsRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getFilter().isEmpty()) { + filter_ = other.filter_; + bitField0_ |= 0x00000008; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + pageSize_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * The parent, which owns this collection of annotations.
+     * Format:
+     * `projects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset}`
+     * 
+ * + * string parent = 1 [(.google.api.resource_reference) = { ... } + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The parent, which owns this collection of annotations.
+     * Format:
+     * `projects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset}`
+     * 
+ * + * string parent = 1 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The parent, which owns this collection of annotations.
+     * Format:
+     * `projects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset}`
+     * 
+ * + * string parent = 1 [(.google.api.resource_reference) = { ... } + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The parent, which owns this collection of annotations.
+     * Format:
+     * `projects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset}`
+     * 
+ * + * string parent = 1 [(.google.api.resource_reference) = { ... } + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * The parent, which owns this collection of annotations.
+     * Format:
+     * `projects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset}`
+     * 
+ * + * string parent = 1 [(.google.api.resource_reference) = { ... } + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private int pageSize_; + /** + * + * + *
+     * The maximum number of annotations to return. The service may return fewer
+     * than this value. If unspecified, at most 50 annotations will be returned.
+     * The maximum value is 1000; values above 1000 will be coerced to 1000.
+     * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + * + * + *
+     * The maximum number of annotations to return. The service may return fewer
+     * than this value. If unspecified, at most 50 annotations will be returned.
+     * The maximum value is 1000; values above 1000 will be coerced to 1000.
+     * 
+ * + * int32 page_size = 2; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * The maximum number of annotations to return. The service may return fewer
+     * than this value. If unspecified, at most 50 annotations will be returned.
+     * The maximum value is 1000; values above 1000 will be coerced to 1000.
+     * 
+ * + * int32 page_size = 2; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + bitField0_ = (bitField0_ & ~0x00000002); + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + * + * + *
+     * A page token, received from a previous `ListAnnotations` call.
+     * Provide this to retrieve the subsequent page.
+     *
+     * When paginating, all other parameters provided to `ListAnnotations` must
+     * match the call that provided the page token.
+     * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A page token, received from a previous `ListAnnotations` call.
+     * Provide this to retrieve the subsequent page.
+     *
+     * When paginating, all other parameters provided to `ListAnnotations` must
+     * match the call that provided the page token.
+     * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A page token, received from a previous `ListAnnotations` call.
+     * Provide this to retrieve the subsequent page.
+     *
+     * When paginating, all other parameters provided to `ListAnnotations` must
+     * match the call that provided the page token.
+     * 
+ * + * string page_token = 3; + * + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + pageToken_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * A page token, received from a previous `ListAnnotations` call.
+     * Provide this to retrieve the subsequent page.
+     *
+     * When paginating, all other parameters provided to `ListAnnotations` must
+     * match the call that provided the page token.
+     * 
+ * + * string page_token = 3; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + pageToken_ = getDefaultInstance().getPageToken(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * A page token, received from a previous `ListAnnotations` call.
+     * Provide this to retrieve the subsequent page.
+     *
+     * When paginating, all other parameters provided to `ListAnnotations` must
+     * match the call that provided the page token.
+     * 
+ * + * string page_token = 3; + * + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + pageToken_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object filter_ = ""; + /** + * + * + *
+     * The filter applied to the returned list.
+     * We only support filtering for the following fields:
+     * For corpus of STREAM_VIDEO type:
+     * `partition.temporal_partition.start_time`,
+     * `partition.temporal_partition.end_time`, and `key`.
+     * For corpus of VIDEO_ON_DEMAND type,
+     * `partition.relative_temporal_partition.start_offset`,
+     * `partition.relative_temporal_partition.end_offset`, and `key`.
+     * For corpus of IMAGE type, only `key` is supported.
+     * Timestamps are specified in the RFC-3339 format, and only one restriction
+     * may be applied per field, joined by conjunctions.
+     * Format:
+     * "partition.temporal_partition.start_time > "2012-04-21T11:30:00-04:00" AND
+     * partition.temporal_partition.end_time < "2012-04-22T11:30:00-04:00" AND
+     * key = "example_key""
+     * 
+ * + * string filter = 4; + * + * @return The filter. + */ + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The filter applied to the returned list.
+     * We only support filtering for the following fields:
+     * For corpus of STREAM_VIDEO type:
+     * `partition.temporal_partition.start_time`,
+     * `partition.temporal_partition.end_time`, and `key`.
+     * For corpus of VIDEO_ON_DEMAND type,
+     * `partition.relative_temporal_partition.start_offset`,
+     * `partition.relative_temporal_partition.end_offset`, and `key`.
+     * For corpus of IMAGE type, only `key` is supported.
+     * Timestamps are specified in the RFC-3339 format, and only one restriction
+     * may be applied per field, joined by conjunctions.
+     * Format:
+     * "partition.temporal_partition.start_time > "2012-04-21T11:30:00-04:00" AND
+     * partition.temporal_partition.end_time < "2012-04-22T11:30:00-04:00" AND
+     * key = "example_key""
+     * 
+ * + * string filter = 4; + * + * @return The bytes for filter. + */ + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The filter applied to the returned list.
+     * We only support filtering for the following fields:
+     * For corpus of STREAM_VIDEO type:
+     * `partition.temporal_partition.start_time`,
+     * `partition.temporal_partition.end_time`, and `key`.
+     * For corpus of VIDEO_ON_DEMAND type,
+     * `partition.relative_temporal_partition.start_offset`,
+     * `partition.relative_temporal_partition.end_offset`, and `key`.
+     * For corpus of IMAGE type, only `key` is supported.
+     * Timestamps are specified in the RFC-3339 format, and only one restriction
+     * may be applied per field, joined by conjunctions.
+     * Format:
+     * "partition.temporal_partition.start_time > "2012-04-21T11:30:00-04:00" AND
+     * partition.temporal_partition.end_time < "2012-04-22T11:30:00-04:00" AND
+     * key = "example_key""
+     * 
+ * + * string filter = 4; + * + * @param value The filter to set. + * @return This builder for chaining. + */ + public Builder setFilter(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + filter_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * The filter applied to the returned list.
+     * We only support filtering for the following fields:
+     * For corpus of STREAM_VIDEO type:
+     * `partition.temporal_partition.start_time`,
+     * `partition.temporal_partition.end_time`, and `key`.
+     * For corpus of VIDEO_ON_DEMAND type,
+     * `partition.relative_temporal_partition.start_offset`,
+     * `partition.relative_temporal_partition.end_offset`, and `key`.
+     * For corpus of IMAGE type, only `key` is supported.
+     * Timestamps are specified in the RFC-3339 format, and only one restriction
+     * may be applied per field, joined by conjunctions.
+     * Format:
+     * "partition.temporal_partition.start_time > "2012-04-21T11:30:00-04:00" AND
+     * partition.temporal_partition.end_time < "2012-04-22T11:30:00-04:00" AND
+     * key = "example_key""
+     * 
+ * + * string filter = 4; + * + * @return This builder for chaining. + */ + public Builder clearFilter() { + filter_ = getDefaultInstance().getFilter(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+     * The filter applied to the returned list.
+     * We only support filtering for the following fields:
+     * For corpus of STREAM_VIDEO type:
+     * `partition.temporal_partition.start_time`,
+     * `partition.temporal_partition.end_time`, and `key`.
+     * For corpus of VIDEO_ON_DEMAND type,
+     * `partition.relative_temporal_partition.start_offset`,
+     * `partition.relative_temporal_partition.end_offset`, and `key`.
+     * For corpus of IMAGE type, only `key` is supported.
+     * Timestamps are specified in the RFC-3339 format, and only one restriction
+     * may be applied per field, joined by conjunctions.
+     * Format:
+     * "partition.temporal_partition.start_time > "2012-04-21T11:30:00-04:00" AND
+     * partition.temporal_partition.end_time < "2012-04-22T11:30:00-04:00" AND
+     * key = "example_key""
+     * 
+ * + * string filter = 4; + * + * @param value The bytes for filter to set. + * @return This builder for chaining. + */ + public Builder setFilterBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + filter_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.ListAnnotationsRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.ListAnnotationsRequest) + private static final com.google.cloud.visionai.v1.ListAnnotationsRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.ListAnnotationsRequest(); + } + + public static com.google.cloud.visionai.v1.ListAnnotationsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListAnnotationsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.ListAnnotationsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListAnnotationsRequestOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListAnnotationsRequestOrBuilder.java new file mode 100644 index 000000000000..294701901c85 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListAnnotationsRequestOrBuilder.java @@ -0,0 +1,156 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/warehouse.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface ListAnnotationsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.ListAnnotationsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The parent, which owns this collection of annotations.
+   * Format:
+   * `projects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset}`
+   * 
+ * + * string parent = 1 [(.google.api.resource_reference) = { ... } + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * The parent, which owns this collection of annotations.
+   * Format:
+   * `projects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset}`
+   * 
+ * + * string parent = 1 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * The maximum number of annotations to return. The service may return fewer
+   * than this value. If unspecified, at most 50 annotations will be returned.
+   * The maximum value is 1000; values above 1000 will be coerced to 1000.
+   * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * A page token, received from a previous `ListAnnotations` call.
+   * Provide this to retrieve the subsequent page.
+   *
+   * When paginating, all other parameters provided to `ListAnnotations` must
+   * match the call that provided the page token.
+   * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + * + * + *
+   * A page token, received from a previous `ListAnnotations` call.
+   * Provide this to retrieve the subsequent page.
+   *
+   * When paginating, all other parameters provided to `ListAnnotations` must
+   * match the call that provided the page token.
+   * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); + + /** + * + * + *
+   * The filter applied to the returned list.
+   * We only support filtering for the following fields:
+   * For corpus of STREAM_VIDEO type:
+   * `partition.temporal_partition.start_time`,
+   * `partition.temporal_partition.end_time`, and `key`.
+   * For corpus of VIDEO_ON_DEMAND type,
+   * `partition.relative_temporal_partition.start_offset`,
+   * `partition.relative_temporal_partition.end_offset`, and `key`.
+   * For corpus of IMAGE type, only `key` is supported.
+   * Timestamps are specified in the RFC-3339 format, and only one restriction
+   * may be applied per field, joined by conjunctions.
+   * Format:
+   * "partition.temporal_partition.start_time > "2012-04-21T11:30:00-04:00" AND
+   * partition.temporal_partition.end_time < "2012-04-22T11:30:00-04:00" AND
+   * key = "example_key""
+   * 
+ * + * string filter = 4; + * + * @return The filter. + */ + java.lang.String getFilter(); + /** + * + * + *
+   * The filter applied to the returned list.
+   * We only support filtering for the following fields:
+   * For corpus of STREAM_VIDEO type:
+   * `partition.temporal_partition.start_time`,
+   * `partition.temporal_partition.end_time`, and `key`.
+   * For corpus of VIDEO_ON_DEMAND type,
+   * `partition.relative_temporal_partition.start_offset`,
+   * `partition.relative_temporal_partition.end_offset`, and `key`.
+   * For corpus of IMAGE type, only `key` is supported.
+   * Timestamps are specified in the RFC-3339 format, and only one restriction
+   * may be applied per field, joined by conjunctions.
+   * Format:
+   * "partition.temporal_partition.start_time > "2012-04-21T11:30:00-04:00" AND
+   * partition.temporal_partition.end_time < "2012-04-22T11:30:00-04:00" AND
+   * key = "example_key""
+   * 
+ * + * string filter = 4; + * + * @return The bytes for filter. + */ + com.google.protobuf.ByteString getFilterBytes(); +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListAnnotationsResponse.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListAnnotationsResponse.java new file mode 100644 index 000000000000..e4b637c7a885 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListAnnotationsResponse.java @@ -0,0 +1,1126 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/warehouse.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * Request message for ListAnnotations API.
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.ListAnnotationsResponse} + */ +public final class ListAnnotationsResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.ListAnnotationsResponse) + ListAnnotationsResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListAnnotationsResponse.newBuilder() to construct. + private ListAnnotationsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListAnnotationsResponse() { + annotations_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListAnnotationsResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_ListAnnotationsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_ListAnnotationsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.ListAnnotationsResponse.class, + com.google.cloud.visionai.v1.ListAnnotationsResponse.Builder.class); + } + + public static final int ANNOTATIONS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List annotations_; + /** + * + * + *
+   * The annotations from the specified asset.
+   * 
+ * + * repeated .google.cloud.visionai.v1.Annotation annotations = 1; + */ + @java.lang.Override + public java.util.List getAnnotationsList() { + return annotations_; + } + /** + * + * + *
+   * The annotations from the specified asset.
+   * 
+ * + * repeated .google.cloud.visionai.v1.Annotation annotations = 1; + */ + @java.lang.Override + public java.util.List + getAnnotationsOrBuilderList() { + return annotations_; + } + /** + * + * + *
+   * The annotations from the specified asset.
+   * 
+ * + * repeated .google.cloud.visionai.v1.Annotation annotations = 1; + */ + @java.lang.Override + public int getAnnotationsCount() { + return annotations_.size(); + } + /** + * + * + *
+   * The annotations from the specified asset.
+   * 
+ * + * repeated .google.cloud.visionai.v1.Annotation annotations = 1; + */ + @java.lang.Override + public com.google.cloud.visionai.v1.Annotation getAnnotations(int index) { + return annotations_.get(index); + } + /** + * + * + *
+   * The annotations from the specified asset.
+   * 
+ * + * repeated .google.cloud.visionai.v1.Annotation annotations = 1; + */ + @java.lang.Override + public com.google.cloud.visionai.v1.AnnotationOrBuilder getAnnotationsOrBuilder(int index) { + return annotations_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+   * A token, which can be sent as `page_token` to retrieve the next page.
+   * If this field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + 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(); + nextPageToken_ = s; + return s; + } + } + /** + * + * + *
+   * A token, which can be sent as `page_token` to retrieve the next page.
+   * If this field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = 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 { + for (int i = 0; i < annotations_.size(); i++) { + output.writeMessage(1, annotations_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < annotations_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, annotations_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + } + size += getUnknownFields().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.visionai.v1.ListAnnotationsResponse)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.ListAnnotationsResponse other = + (com.google.cloud.visionai.v1.ListAnnotationsResponse) obj; + + if (!getAnnotationsList().equals(other.getAnnotationsList())) return false; + if (!getNextPageToken().equals(other.getNextPageToken())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getAnnotationsCount() > 0) { + hash = (37 * hash) + ANNOTATIONS_FIELD_NUMBER; + hash = (53 * hash) + getAnnotationsList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.ListAnnotationsResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ListAnnotationsResponse 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.visionai.v1.ListAnnotationsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ListAnnotationsResponse 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.visionai.v1.ListAnnotationsResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ListAnnotationsResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.ListAnnotationsResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ListAnnotationsResponse 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.visionai.v1.ListAnnotationsResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ListAnnotationsResponse 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.visionai.v1.ListAnnotationsResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ListAnnotationsResponse 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.visionai.v1.ListAnnotationsResponse 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; + } + /** + * + * + *
+   * Request message for ListAnnotations API.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.ListAnnotationsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.ListAnnotationsResponse) + com.google.cloud.visionai.v1.ListAnnotationsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_ListAnnotationsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_ListAnnotationsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.ListAnnotationsResponse.class, + com.google.cloud.visionai.v1.ListAnnotationsResponse.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.ListAnnotationsResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (annotationsBuilder_ == null) { + annotations_ = java.util.Collections.emptyList(); + } else { + annotations_ = null; + annotationsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + nextPageToken_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_ListAnnotationsResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ListAnnotationsResponse getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.ListAnnotationsResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ListAnnotationsResponse build() { + com.google.cloud.visionai.v1.ListAnnotationsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ListAnnotationsResponse buildPartial() { + com.google.cloud.visionai.v1.ListAnnotationsResponse result = + new com.google.cloud.visionai.v1.ListAnnotationsResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.visionai.v1.ListAnnotationsResponse result) { + if (annotationsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + annotations_ = java.util.Collections.unmodifiableList(annotations_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.annotations_ = annotations_; + } else { + result.annotations_ = annotationsBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.visionai.v1.ListAnnotationsResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.nextPageToken_ = nextPageToken_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.ListAnnotationsResponse) { + return mergeFrom((com.google.cloud.visionai.v1.ListAnnotationsResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.ListAnnotationsResponse other) { + if (other == com.google.cloud.visionai.v1.ListAnnotationsResponse.getDefaultInstance()) + return this; + if (annotationsBuilder_ == null) { + if (!other.annotations_.isEmpty()) { + if (annotations_.isEmpty()) { + annotations_ = other.annotations_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureAnnotationsIsMutable(); + annotations_.addAll(other.annotations_); + } + onChanged(); + } + } else { + if (!other.annotations_.isEmpty()) { + if (annotationsBuilder_.isEmpty()) { + annotationsBuilder_.dispose(); + annotationsBuilder_ = null; + annotations_ = other.annotations_; + bitField0_ = (bitField0_ & ~0x00000001); + annotationsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getAnnotationsFieldBuilder() + : null; + } else { + annotationsBuilder_.addAllMessages(other.annotations_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.visionai.v1.Annotation m = + input.readMessage( + com.google.cloud.visionai.v1.Annotation.parser(), extensionRegistry); + if (annotationsBuilder_ == null) { + ensureAnnotationsIsMutable(); + annotations_.add(m); + } else { + annotationsBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List annotations_ = + java.util.Collections.emptyList(); + + private void ensureAnnotationsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + annotations_ = + new java.util.ArrayList(annotations_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.visionai.v1.Annotation, + com.google.cloud.visionai.v1.Annotation.Builder, + com.google.cloud.visionai.v1.AnnotationOrBuilder> + annotationsBuilder_; + + /** + * + * + *
+     * The annotations from the specified asset.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Annotation annotations = 1; + */ + public java.util.List getAnnotationsList() { + if (annotationsBuilder_ == null) { + return java.util.Collections.unmodifiableList(annotations_); + } else { + return annotationsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * The annotations from the specified asset.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Annotation annotations = 1; + */ + public int getAnnotationsCount() { + if (annotationsBuilder_ == null) { + return annotations_.size(); + } else { + return annotationsBuilder_.getCount(); + } + } + /** + * + * + *
+     * The annotations from the specified asset.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Annotation annotations = 1; + */ + public com.google.cloud.visionai.v1.Annotation getAnnotations(int index) { + if (annotationsBuilder_ == null) { + return annotations_.get(index); + } else { + return annotationsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * The annotations from the specified asset.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Annotation annotations = 1; + */ + public Builder setAnnotations(int index, com.google.cloud.visionai.v1.Annotation value) { + if (annotationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAnnotationsIsMutable(); + annotations_.set(index, value); + onChanged(); + } else { + annotationsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The annotations from the specified asset.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Annotation annotations = 1; + */ + public Builder setAnnotations( + int index, com.google.cloud.visionai.v1.Annotation.Builder builderForValue) { + if (annotationsBuilder_ == null) { + ensureAnnotationsIsMutable(); + annotations_.set(index, builderForValue.build()); + onChanged(); + } else { + annotationsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The annotations from the specified asset.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Annotation annotations = 1; + */ + public Builder addAnnotations(com.google.cloud.visionai.v1.Annotation value) { + if (annotationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAnnotationsIsMutable(); + annotations_.add(value); + onChanged(); + } else { + annotationsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * The annotations from the specified asset.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Annotation annotations = 1; + */ + public Builder addAnnotations(int index, com.google.cloud.visionai.v1.Annotation value) { + if (annotationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAnnotationsIsMutable(); + annotations_.add(index, value); + onChanged(); + } else { + annotationsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The annotations from the specified asset.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Annotation annotations = 1; + */ + public Builder addAnnotations(com.google.cloud.visionai.v1.Annotation.Builder builderForValue) { + if (annotationsBuilder_ == null) { + ensureAnnotationsIsMutable(); + annotations_.add(builderForValue.build()); + onChanged(); + } else { + annotationsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The annotations from the specified asset.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Annotation annotations = 1; + */ + public Builder addAnnotations( + int index, com.google.cloud.visionai.v1.Annotation.Builder builderForValue) { + if (annotationsBuilder_ == null) { + ensureAnnotationsIsMutable(); + annotations_.add(index, builderForValue.build()); + onChanged(); + } else { + annotationsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The annotations from the specified asset.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Annotation annotations = 1; + */ + public Builder addAllAnnotations( + java.lang.Iterable values) { + if (annotationsBuilder_ == null) { + ensureAnnotationsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, annotations_); + onChanged(); + } else { + annotationsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * The annotations from the specified asset.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Annotation annotations = 1; + */ + public Builder clearAnnotations() { + if (annotationsBuilder_ == null) { + annotations_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + annotationsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The annotations from the specified asset.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Annotation annotations = 1; + */ + public Builder removeAnnotations(int index) { + if (annotationsBuilder_ == null) { + ensureAnnotationsIsMutable(); + annotations_.remove(index); + onChanged(); + } else { + annotationsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * The annotations from the specified asset.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Annotation annotations = 1; + */ + public com.google.cloud.visionai.v1.Annotation.Builder getAnnotationsBuilder(int index) { + return getAnnotationsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * The annotations from the specified asset.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Annotation annotations = 1; + */ + public com.google.cloud.visionai.v1.AnnotationOrBuilder getAnnotationsOrBuilder(int index) { + if (annotationsBuilder_ == null) { + return annotations_.get(index); + } else { + return annotationsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * The annotations from the specified asset.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Annotation annotations = 1; + */ + public java.util.List + getAnnotationsOrBuilderList() { + if (annotationsBuilder_ != null) { + return annotationsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(annotations_); + } + } + /** + * + * + *
+     * The annotations from the specified asset.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Annotation annotations = 1; + */ + public com.google.cloud.visionai.v1.Annotation.Builder addAnnotationsBuilder() { + return getAnnotationsFieldBuilder() + .addBuilder(com.google.cloud.visionai.v1.Annotation.getDefaultInstance()); + } + /** + * + * + *
+     * The annotations from the specified asset.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Annotation annotations = 1; + */ + public com.google.cloud.visionai.v1.Annotation.Builder addAnnotationsBuilder(int index) { + return getAnnotationsFieldBuilder() + .addBuilder(index, com.google.cloud.visionai.v1.Annotation.getDefaultInstance()); + } + /** + * + * + *
+     * The annotations from the specified asset.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Annotation annotations = 1; + */ + public java.util.List + getAnnotationsBuilderList() { + return getAnnotationsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.visionai.v1.Annotation, + com.google.cloud.visionai.v1.Annotation.Builder, + com.google.cloud.visionai.v1.AnnotationOrBuilder> + getAnnotationsFieldBuilder() { + if (annotationsBuilder_ == null) { + annotationsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.visionai.v1.Annotation, + com.google.cloud.visionai.v1.Annotation.Builder, + com.google.cloud.visionai.v1.AnnotationOrBuilder>( + annotations_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + annotations_ = null; + } + return annotationsBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+     * A token, which can be sent as `page_token` to retrieve the next page.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A token, which can be sent as `page_token` to retrieve the next page.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A token, which can be sent as `page_token` to retrieve the next page.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * A token, which can be sent as `page_token` to retrieve the next page.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + nextPageToken_ = getDefaultInstance().getNextPageToken(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * A token, which can be sent as `page_token` to retrieve the next page.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.ListAnnotationsResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.ListAnnotationsResponse) + private static final com.google.cloud.visionai.v1.ListAnnotationsResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.ListAnnotationsResponse(); + } + + public static com.google.cloud.visionai.v1.ListAnnotationsResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListAnnotationsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.ListAnnotationsResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListAnnotationsResponseOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListAnnotationsResponseOrBuilder.java new file mode 100644 index 000000000000..8c6025e03b7c --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListAnnotationsResponseOrBuilder.java @@ -0,0 +1,105 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/warehouse.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface ListAnnotationsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.ListAnnotationsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The annotations from the specified asset.
+   * 
+ * + * repeated .google.cloud.visionai.v1.Annotation annotations = 1; + */ + java.util.List getAnnotationsList(); + /** + * + * + *
+   * The annotations from the specified asset.
+   * 
+ * + * repeated .google.cloud.visionai.v1.Annotation annotations = 1; + */ + com.google.cloud.visionai.v1.Annotation getAnnotations(int index); + /** + * + * + *
+   * The annotations from the specified asset.
+   * 
+ * + * repeated .google.cloud.visionai.v1.Annotation annotations = 1; + */ + int getAnnotationsCount(); + /** + * + * + *
+   * The annotations from the specified asset.
+   * 
+ * + * repeated .google.cloud.visionai.v1.Annotation annotations = 1; + */ + java.util.List + getAnnotationsOrBuilderList(); + /** + * + * + *
+   * The annotations from the specified asset.
+   * 
+ * + * repeated .google.cloud.visionai.v1.Annotation annotations = 1; + */ + com.google.cloud.visionai.v1.AnnotationOrBuilder getAnnotationsOrBuilder(int index); + + /** + * + * + *
+   * A token, which can be sent as `page_token` to retrieve the next page.
+   * If this field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + * + * + *
+   * A token, which can be sent as `page_token` to retrieve the next page.
+   * If this field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListApplicationsRequest.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListApplicationsRequest.java new file mode 100644 index 000000000000..3b3ae80dce28 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListApplicationsRequest.java @@ -0,0 +1,1282 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/platform.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * Message for requesting list of Applications.
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.ListApplicationsRequest} + */ +public final class ListApplicationsRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.ListApplicationsRequest) + ListApplicationsRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListApplicationsRequest.newBuilder() to construct. + private ListApplicationsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListApplicationsRequest() { + parent_ = ""; + pageToken_ = ""; + filter_ = ""; + orderBy_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListApplicationsRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_ListApplicationsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_ListApplicationsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.ListApplicationsRequest.class, + com.google.cloud.visionai.v1.ListApplicationsRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + /** + * + * + *
+   * Required. Parent value for ListApplicationsRequest.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + 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(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Parent value for ListApplicationsRequest.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 2; + private int pageSize_ = 0; + /** + * + * + *
+   * Requested page size. Server may return fewer items than requested.
+   * If unspecified, server will pick an appropriate default.
+   * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object pageToken_ = ""; + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + 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(); + pageToken_ = s; + return s; + } + } + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FILTER_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object filter_ = ""; + /** + * + * + *
+   * Filtering results.
+   * 
+ * + * string filter = 4; + * + * @return The filter. + */ + @java.lang.Override + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + 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(); + filter_ = s; + return s; + } + } + /** + * + * + *
+   * Filtering results.
+   * 
+ * + * string filter = 4; + * + * @return The bytes for filter. + */ + @java.lang.Override + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ORDER_BY_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object orderBy_ = ""; + /** + * + * + *
+   * Hint for how to order the results.
+   * 
+ * + * string order_by = 5; + * + * @return The orderBy. + */ + @java.lang.Override + public java.lang.String getOrderBy() { + java.lang.Object ref = orderBy_; + 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(); + orderBy_ = s; + return s; + } + } + /** + * + * + *
+   * Hint for how to order the results.
+   * 
+ * + * string order_by = 5; + * + * @return The bytes for orderBy. + */ + @java.lang.Override + public com.google.protobuf.ByteString getOrderByBytes() { + java.lang.Object ref = orderBy_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + orderBy_ = 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, filter_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(orderBy_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, orderBy_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, filter_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(orderBy_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, orderBy_); + } + size += getUnknownFields().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.visionai.v1.ListApplicationsRequest)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.ListApplicationsRequest other = + (com.google.cloud.visionai.v1.ListApplicationsRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (!getFilter().equals(other.getFilter())) return false; + if (!getOrderBy().equals(other.getOrderBy())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + hash = (37 * hash) + FILTER_FIELD_NUMBER; + hash = (53 * hash) + getFilter().hashCode(); + hash = (37 * hash) + ORDER_BY_FIELD_NUMBER; + hash = (53 * hash) + getOrderBy().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.ListApplicationsRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ListApplicationsRequest 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.visionai.v1.ListApplicationsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ListApplicationsRequest 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.visionai.v1.ListApplicationsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ListApplicationsRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.ListApplicationsRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ListApplicationsRequest 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.visionai.v1.ListApplicationsRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ListApplicationsRequest 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.visionai.v1.ListApplicationsRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ListApplicationsRequest 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.visionai.v1.ListApplicationsRequest 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; + } + /** + * + * + *
+   * Message for requesting list of Applications.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.ListApplicationsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.ListApplicationsRequest) + com.google.cloud.visionai.v1.ListApplicationsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_ListApplicationsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_ListApplicationsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.ListApplicationsRequest.class, + com.google.cloud.visionai.v1.ListApplicationsRequest.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.ListApplicationsRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + pageSize_ = 0; + pageToken_ = ""; + filter_ = ""; + orderBy_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_ListApplicationsRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ListApplicationsRequest getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.ListApplicationsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ListApplicationsRequest build() { + com.google.cloud.visionai.v1.ListApplicationsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ListApplicationsRequest buildPartial() { + com.google.cloud.visionai.v1.ListApplicationsRequest result = + new com.google.cloud.visionai.v1.ListApplicationsRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.visionai.v1.ListApplicationsRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.pageSize_ = pageSize_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.pageToken_ = pageToken_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.filter_ = filter_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.orderBy_ = orderBy_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.ListApplicationsRequest) { + return mergeFrom((com.google.cloud.visionai.v1.ListApplicationsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.ListApplicationsRequest other) { + if (other == com.google.cloud.visionai.v1.ListApplicationsRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getFilter().isEmpty()) { + filter_ = other.filter_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (!other.getOrderBy().isEmpty()) { + orderBy_ = other.orderBy_; + bitField0_ |= 0x00000010; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + pageSize_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + orderBy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 42 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. Parent value for ListApplicationsRequest.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Parent value for ListApplicationsRequest.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Parent value for ListApplicationsRequest.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Parent value for ListApplicationsRequest.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Parent value for ListApplicationsRequest.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private int pageSize_; + /** + * + * + *
+     * Requested page size. Server may return fewer items than requested.
+     * If unspecified, server will pick an appropriate default.
+     * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + * + * + *
+     * Requested page size. Server may return fewer items than requested.
+     * If unspecified, server will pick an appropriate default.
+     * 
+ * + * int32 page_size = 2; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Requested page size. Server may return fewer items than requested.
+     * If unspecified, server will pick an appropriate default.
+     * 
+ * + * int32 page_size = 2; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + bitField0_ = (bitField0_ & ~0x00000002); + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string page_token = 3; + * + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + pageToken_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string page_token = 3; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + pageToken_ = getDefaultInstance().getPageToken(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string page_token = 3; + * + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + pageToken_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object filter_ = ""; + /** + * + * + *
+     * Filtering results.
+     * 
+ * + * string filter = 4; + * + * @return The filter. + */ + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Filtering results.
+     * 
+ * + * string filter = 4; + * + * @return The bytes for filter. + */ + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Filtering results.
+     * 
+ * + * string filter = 4; + * + * @param value The filter to set. + * @return This builder for chaining. + */ + public Builder setFilter(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + filter_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Filtering results.
+     * 
+ * + * string filter = 4; + * + * @return This builder for chaining. + */ + public Builder clearFilter() { + filter_ = getDefaultInstance().getFilter(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+     * Filtering results.
+     * 
+ * + * string filter = 4; + * + * @param value The bytes for filter to set. + * @return This builder for chaining. + */ + public Builder setFilterBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + filter_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private java.lang.Object orderBy_ = ""; + /** + * + * + *
+     * Hint for how to order the results.
+     * 
+ * + * string order_by = 5; + * + * @return The orderBy. + */ + public java.lang.String getOrderBy() { + java.lang.Object ref = orderBy_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + orderBy_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Hint for how to order the results.
+     * 
+ * + * string order_by = 5; + * + * @return The bytes for orderBy. + */ + public com.google.protobuf.ByteString getOrderByBytes() { + java.lang.Object ref = orderBy_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + orderBy_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Hint for how to order the results.
+     * 
+ * + * string order_by = 5; + * + * @param value The orderBy to set. + * @return This builder for chaining. + */ + public Builder setOrderBy(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + orderBy_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Hint for how to order the results.
+     * 
+ * + * string order_by = 5; + * + * @return This builder for chaining. + */ + public Builder clearOrderBy() { + orderBy_ = getDefaultInstance().getOrderBy(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + /** + * + * + *
+     * Hint for how to order the results.
+     * 
+ * + * string order_by = 5; + * + * @param value The bytes for orderBy to set. + * @return This builder for chaining. + */ + public Builder setOrderByBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + orderBy_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.ListApplicationsRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.ListApplicationsRequest) + private static final com.google.cloud.visionai.v1.ListApplicationsRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.ListApplicationsRequest(); + } + + public static com.google.cloud.visionai.v1.ListApplicationsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListApplicationsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.ListApplicationsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListApplicationsRequestOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListApplicationsRequestOrBuilder.java new file mode 100644 index 000000000000..924acfad8fcc --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListApplicationsRequestOrBuilder.java @@ -0,0 +1,144 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/platform.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface ListApplicationsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.ListApplicationsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Parent value for ListApplicationsRequest.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. Parent value for ListApplicationsRequest.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Requested page size. Server may return fewer items than requested.
+   * If unspecified, server will pick an appropriate default.
+   * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); + + /** + * + * + *
+   * Filtering results.
+   * 
+ * + * string filter = 4; + * + * @return The filter. + */ + java.lang.String getFilter(); + /** + * + * + *
+   * Filtering results.
+   * 
+ * + * string filter = 4; + * + * @return The bytes for filter. + */ + com.google.protobuf.ByteString getFilterBytes(); + + /** + * + * + *
+   * Hint for how to order the results.
+   * 
+ * + * string order_by = 5; + * + * @return The orderBy. + */ + java.lang.String getOrderBy(); + /** + * + * + *
+   * Hint for how to order the results.
+   * 
+ * + * string order_by = 5; + * + * @return The bytes for orderBy. + */ + com.google.protobuf.ByteString getOrderByBytes(); +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListApplicationsResponse.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListApplicationsResponse.java new file mode 100644 index 000000000000..84a51309001d --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListApplicationsResponse.java @@ -0,0 +1,1398 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/platform.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * Message for response to listing Applications.
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.ListApplicationsResponse} + */ +public final class ListApplicationsResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.ListApplicationsResponse) + ListApplicationsResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListApplicationsResponse.newBuilder() to construct. + private ListApplicationsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListApplicationsResponse() { + applications_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + unreachable_ = com.google.protobuf.LazyStringArrayList.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListApplicationsResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_ListApplicationsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_ListApplicationsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.ListApplicationsResponse.class, + com.google.cloud.visionai.v1.ListApplicationsResponse.Builder.class); + } + + public static final int APPLICATIONS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List applications_; + /** + * + * + *
+   * The list of Application.
+   * 
+ * + * repeated .google.cloud.visionai.v1.Application applications = 1; + */ + @java.lang.Override + public java.util.List getApplicationsList() { + return applications_; + } + /** + * + * + *
+   * The list of Application.
+   * 
+ * + * repeated .google.cloud.visionai.v1.Application applications = 1; + */ + @java.lang.Override + public java.util.List + getApplicationsOrBuilderList() { + return applications_; + } + /** + * + * + *
+   * The list of Application.
+   * 
+ * + * repeated .google.cloud.visionai.v1.Application applications = 1; + */ + @java.lang.Override + public int getApplicationsCount() { + return applications_.size(); + } + /** + * + * + *
+   * The list of Application.
+   * 
+ * + * repeated .google.cloud.visionai.v1.Application applications = 1; + */ + @java.lang.Override + public com.google.cloud.visionai.v1.Application getApplications(int index) { + return applications_.get(index); + } + /** + * + * + *
+   * The list of Application.
+   * 
+ * + * repeated .google.cloud.visionai.v1.Application applications = 1; + */ + @java.lang.Override + public com.google.cloud.visionai.v1.ApplicationOrBuilder getApplicationsOrBuilder(int index) { + return applications_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + 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(); + nextPageToken_ = s; + return s; + } + } + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int UNREACHABLE_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList unreachable_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @return A list containing the unreachable. + */ + public com.google.protobuf.ProtocolStringList getUnreachableList() { + return unreachable_; + } + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @return The count of unreachable. + */ + public int getUnreachableCount() { + return unreachable_.size(); + } + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + public java.lang.String getUnreachable(int index) { + return unreachable_.get(index); + } + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the value to return. + * @return The bytes of the unreachable at the given index. + */ + public com.google.protobuf.ByteString getUnreachableBytes(int index) { + return unreachable_.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 < applications_.size(); i++) { + output.writeMessage(1, applications_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + } + for (int i = 0; i < unreachable_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, unreachable_.getRaw(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < applications_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, applications_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + } + { + int dataSize = 0; + for (int i = 0; i < unreachable_.size(); i++) { + dataSize += computeStringSizeNoTag(unreachable_.getRaw(i)); + } + size += dataSize; + size += 1 * getUnreachableList().size(); + } + size += getUnknownFields().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.visionai.v1.ListApplicationsResponse)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.ListApplicationsResponse other = + (com.google.cloud.visionai.v1.ListApplicationsResponse) obj; + + if (!getApplicationsList().equals(other.getApplicationsList())) return false; + if (!getNextPageToken().equals(other.getNextPageToken())) return false; + if (!getUnreachableList().equals(other.getUnreachableList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getApplicationsCount() > 0) { + hash = (37 * hash) + APPLICATIONS_FIELD_NUMBER; + hash = (53 * hash) + getApplicationsList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + if (getUnreachableCount() > 0) { + hash = (37 * hash) + UNREACHABLE_FIELD_NUMBER; + hash = (53 * hash) + getUnreachableList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.ListApplicationsResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ListApplicationsResponse 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.visionai.v1.ListApplicationsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ListApplicationsResponse 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.visionai.v1.ListApplicationsResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ListApplicationsResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.ListApplicationsResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ListApplicationsResponse 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.visionai.v1.ListApplicationsResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ListApplicationsResponse 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.visionai.v1.ListApplicationsResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ListApplicationsResponse 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.visionai.v1.ListApplicationsResponse 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; + } + /** + * + * + *
+   * Message for response to listing Applications.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.ListApplicationsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.ListApplicationsResponse) + com.google.cloud.visionai.v1.ListApplicationsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_ListApplicationsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_ListApplicationsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.ListApplicationsResponse.class, + com.google.cloud.visionai.v1.ListApplicationsResponse.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.ListApplicationsResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (applicationsBuilder_ == null) { + applications_ = java.util.Collections.emptyList(); + } else { + applications_ = null; + applicationsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + nextPageToken_ = ""; + unreachable_ = com.google.protobuf.LazyStringArrayList.emptyList(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_ListApplicationsResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ListApplicationsResponse getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.ListApplicationsResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ListApplicationsResponse build() { + com.google.cloud.visionai.v1.ListApplicationsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ListApplicationsResponse buildPartial() { + com.google.cloud.visionai.v1.ListApplicationsResponse result = + new com.google.cloud.visionai.v1.ListApplicationsResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.visionai.v1.ListApplicationsResponse result) { + if (applicationsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + applications_ = java.util.Collections.unmodifiableList(applications_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.applications_ = applications_; + } else { + result.applications_ = applicationsBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.visionai.v1.ListApplicationsResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.nextPageToken_ = nextPageToken_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + unreachable_.makeImmutable(); + result.unreachable_ = unreachable_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.ListApplicationsResponse) { + return mergeFrom((com.google.cloud.visionai.v1.ListApplicationsResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.ListApplicationsResponse other) { + if (other == com.google.cloud.visionai.v1.ListApplicationsResponse.getDefaultInstance()) + return this; + if (applicationsBuilder_ == null) { + if (!other.applications_.isEmpty()) { + if (applications_.isEmpty()) { + applications_ = other.applications_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureApplicationsIsMutable(); + applications_.addAll(other.applications_); + } + onChanged(); + } + } else { + if (!other.applications_.isEmpty()) { + if (applicationsBuilder_.isEmpty()) { + applicationsBuilder_.dispose(); + applicationsBuilder_ = null; + applications_ = other.applications_; + bitField0_ = (bitField0_ & ~0x00000001); + applicationsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getApplicationsFieldBuilder() + : null; + } else { + applicationsBuilder_.addAllMessages(other.applications_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.unreachable_.isEmpty()) { + if (unreachable_.isEmpty()) { + unreachable_ = other.unreachable_; + bitField0_ |= 0x00000004; + } else { + ensureUnreachableIsMutable(); + unreachable_.addAll(other.unreachable_); + } + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.visionai.v1.Application m = + input.readMessage( + com.google.cloud.visionai.v1.Application.parser(), extensionRegistry); + if (applicationsBuilder_ == null) { + ensureApplicationsIsMutable(); + applications_.add(m); + } else { + applicationsBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureUnreachableIsMutable(); + unreachable_.add(s); + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List applications_ = + java.util.Collections.emptyList(); + + private void ensureApplicationsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + applications_ = + new java.util.ArrayList(applications_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.visionai.v1.Application, + com.google.cloud.visionai.v1.Application.Builder, + com.google.cloud.visionai.v1.ApplicationOrBuilder> + applicationsBuilder_; + + /** + * + * + *
+     * The list of Application.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Application applications = 1; + */ + public java.util.List getApplicationsList() { + if (applicationsBuilder_ == null) { + return java.util.Collections.unmodifiableList(applications_); + } else { + return applicationsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * The list of Application.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Application applications = 1; + */ + public int getApplicationsCount() { + if (applicationsBuilder_ == null) { + return applications_.size(); + } else { + return applicationsBuilder_.getCount(); + } + } + /** + * + * + *
+     * The list of Application.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Application applications = 1; + */ + public com.google.cloud.visionai.v1.Application getApplications(int index) { + if (applicationsBuilder_ == null) { + return applications_.get(index); + } else { + return applicationsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * The list of Application.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Application applications = 1; + */ + public Builder setApplications(int index, com.google.cloud.visionai.v1.Application value) { + if (applicationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureApplicationsIsMutable(); + applications_.set(index, value); + onChanged(); + } else { + applicationsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The list of Application.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Application applications = 1; + */ + public Builder setApplications( + int index, com.google.cloud.visionai.v1.Application.Builder builderForValue) { + if (applicationsBuilder_ == null) { + ensureApplicationsIsMutable(); + applications_.set(index, builderForValue.build()); + onChanged(); + } else { + applicationsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of Application.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Application applications = 1; + */ + public Builder addApplications(com.google.cloud.visionai.v1.Application value) { + if (applicationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureApplicationsIsMutable(); + applications_.add(value); + onChanged(); + } else { + applicationsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * The list of Application.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Application applications = 1; + */ + public Builder addApplications(int index, com.google.cloud.visionai.v1.Application value) { + if (applicationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureApplicationsIsMutable(); + applications_.add(index, value); + onChanged(); + } else { + applicationsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The list of Application.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Application applications = 1; + */ + public Builder addApplications( + com.google.cloud.visionai.v1.Application.Builder builderForValue) { + if (applicationsBuilder_ == null) { + ensureApplicationsIsMutable(); + applications_.add(builderForValue.build()); + onChanged(); + } else { + applicationsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of Application.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Application applications = 1; + */ + public Builder addApplications( + int index, com.google.cloud.visionai.v1.Application.Builder builderForValue) { + if (applicationsBuilder_ == null) { + ensureApplicationsIsMutable(); + applications_.add(index, builderForValue.build()); + onChanged(); + } else { + applicationsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of Application.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Application applications = 1; + */ + public Builder addAllApplications( + java.lang.Iterable values) { + if (applicationsBuilder_ == null) { + ensureApplicationsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, applications_); + onChanged(); + } else { + applicationsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * The list of Application.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Application applications = 1; + */ + public Builder clearApplications() { + if (applicationsBuilder_ == null) { + applications_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + applicationsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The list of Application.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Application applications = 1; + */ + public Builder removeApplications(int index) { + if (applicationsBuilder_ == null) { + ensureApplicationsIsMutable(); + applications_.remove(index); + onChanged(); + } else { + applicationsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * The list of Application.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Application applications = 1; + */ + public com.google.cloud.visionai.v1.Application.Builder getApplicationsBuilder(int index) { + return getApplicationsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * The list of Application.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Application applications = 1; + */ + public com.google.cloud.visionai.v1.ApplicationOrBuilder getApplicationsOrBuilder(int index) { + if (applicationsBuilder_ == null) { + return applications_.get(index); + } else { + return applicationsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * The list of Application.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Application applications = 1; + */ + public java.util.List + getApplicationsOrBuilderList() { + if (applicationsBuilder_ != null) { + return applicationsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(applications_); + } + } + /** + * + * + *
+     * The list of Application.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Application applications = 1; + */ + public com.google.cloud.visionai.v1.Application.Builder addApplicationsBuilder() { + return getApplicationsFieldBuilder() + .addBuilder(com.google.cloud.visionai.v1.Application.getDefaultInstance()); + } + /** + * + * + *
+     * The list of Application.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Application applications = 1; + */ + public com.google.cloud.visionai.v1.Application.Builder addApplicationsBuilder(int index) { + return getApplicationsFieldBuilder() + .addBuilder(index, com.google.cloud.visionai.v1.Application.getDefaultInstance()); + } + /** + * + * + *
+     * The list of Application.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Application applications = 1; + */ + public java.util.List + getApplicationsBuilderList() { + return getApplicationsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.visionai.v1.Application, + com.google.cloud.visionai.v1.Application.Builder, + com.google.cloud.visionai.v1.ApplicationOrBuilder> + getApplicationsFieldBuilder() { + if (applicationsBuilder_ == null) { + applicationsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.visionai.v1.Application, + com.google.cloud.visionai.v1.Application.Builder, + com.google.cloud.visionai.v1.ApplicationOrBuilder>( + applications_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + applications_ = null; + } + return applicationsBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + nextPageToken_ = getDefaultInstance().getNextPageToken(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList unreachable_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureUnreachableIsMutable() { + if (!unreachable_.isModifiable()) { + unreachable_ = new com.google.protobuf.LazyStringArrayList(unreachable_); + } + bitField0_ |= 0x00000004; + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @return A list containing the unreachable. + */ + public com.google.protobuf.ProtocolStringList getUnreachableList() { + unreachable_.makeImmutable(); + return unreachable_; + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @return The count of unreachable. + */ + public int getUnreachableCount() { + return unreachable_.size(); + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + public java.lang.String getUnreachable(int index) { + return unreachable_.get(index); + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the value to return. + * @return The bytes of the unreachable at the given index. + */ + public com.google.protobuf.ByteString getUnreachableBytes(int index) { + return unreachable_.getByteString(index); + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param index The index to set the value at. + * @param value The unreachable to set. + * @return This builder for chaining. + */ + public Builder setUnreachable(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureUnreachableIsMutable(); + unreachable_.set(index, value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param value The unreachable to add. + * @return This builder for chaining. + */ + public Builder addUnreachable(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureUnreachableIsMutable(); + unreachable_.add(value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param values The unreachable to add. + * @return This builder for chaining. + */ + public Builder addAllUnreachable(java.lang.Iterable values) { + ensureUnreachableIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, unreachable_); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @return This builder for chaining. + */ + public Builder clearUnreachable() { + unreachable_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + ; + onChanged(); + return this; + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param value The bytes of the unreachable to add. + * @return This builder for chaining. + */ + public Builder addUnreachableBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureUnreachableIsMutable(); + unreachable_.add(value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.ListApplicationsResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.ListApplicationsResponse) + private static final com.google.cloud.visionai.v1.ListApplicationsResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.ListApplicationsResponse(); + } + + public static com.google.cloud.visionai.v1.ListApplicationsResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListApplicationsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.ListApplicationsResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListApplicationsResponseOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListApplicationsResponseOrBuilder.java new file mode 100644 index 000000000000..ec4571e5f1a8 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListApplicationsResponseOrBuilder.java @@ -0,0 +1,154 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/platform.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface ListApplicationsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.ListApplicationsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The list of Application.
+   * 
+ * + * repeated .google.cloud.visionai.v1.Application applications = 1; + */ + java.util.List getApplicationsList(); + /** + * + * + *
+   * The list of Application.
+   * 
+ * + * repeated .google.cloud.visionai.v1.Application applications = 1; + */ + com.google.cloud.visionai.v1.Application getApplications(int index); + /** + * + * + *
+   * The list of Application.
+   * 
+ * + * repeated .google.cloud.visionai.v1.Application applications = 1; + */ + int getApplicationsCount(); + /** + * + * + *
+   * The list of Application.
+   * 
+ * + * repeated .google.cloud.visionai.v1.Application applications = 1; + */ + java.util.List + getApplicationsOrBuilderList(); + /** + * + * + *
+   * The list of Application.
+   * 
+ * + * repeated .google.cloud.visionai.v1.Application applications = 1; + */ + com.google.cloud.visionai.v1.ApplicationOrBuilder getApplicationsOrBuilder(int index); + + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); + + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @return A list containing the unreachable. + */ + java.util.List getUnreachableList(); + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @return The count of unreachable. + */ + int getUnreachableCount(); + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + java.lang.String getUnreachable(int index); + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the value to return. + * @return The bytes of the unreachable at the given index. + */ + com.google.protobuf.ByteString getUnreachableBytes(int index); +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListAssetsRequest.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListAssetsRequest.java new file mode 100644 index 000000000000..c0974c97e5b2 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListAssetsRequest.java @@ -0,0 +1,1170 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/warehouse.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * Request message for ListAssets.
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.ListAssetsRequest} + */ +public final class ListAssetsRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.ListAssetsRequest) + ListAssetsRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListAssetsRequest.newBuilder() to construct. + private ListAssetsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListAssetsRequest() { + parent_ = ""; + pageToken_ = ""; + filter_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListAssetsRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_ListAssetsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_ListAssetsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.ListAssetsRequest.class, + com.google.cloud.visionai.v1.ListAssetsRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + /** + * + * + *
+   * Required. The parent, which owns this collection of assets.
+   * Format:
+   * `projects/{project_number}/locations/{location}/corpora/{corpus}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + 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(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The parent, which owns this collection of assets.
+   * Format:
+   * `projects/{project_number}/locations/{location}/corpora/{corpus}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 2; + private int pageSize_ = 0; + /** + * + * + *
+   * The maximum number of assets to return. The service may return fewer than
+   * this value.
+   * If unspecified, at most 50 assets will be returned.
+   * The maximum value is 1000; values above 1000 will be coerced to 1000.
+   * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object pageToken_ = ""; + /** + * + * + *
+   * A page token, received from a previous `ListAssets` call.
+   * Provide this to retrieve the subsequent page.
+   *
+   * When paginating, all other parameters provided to `ListAssets` must match
+   * the call that provided the page token.
+   * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + 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(); + pageToken_ = s; + return s; + } + } + /** + * + * + *
+   * A page token, received from a previous `ListAssets` call.
+   * Provide this to retrieve the subsequent page.
+   *
+   * When paginating, all other parameters provided to `ListAssets` must match
+   * the call that provided the page token.
+   * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FILTER_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object filter_ = ""; + /** + * + * + *
+   * The filter applied to the returned list.
+   * Only the following filterings are supported:
+   * "assets_with_contents = true", which returns assets with contents uploaded;
+   * "assets_with_contents = false", which returns assets without contents.
+   * 
+ * + * string filter = 5; + * + * @return The filter. + */ + @java.lang.Override + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + 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(); + filter_ = s; + return s; + } + } + /** + * + * + *
+   * The filter applied to the returned list.
+   * Only the following filterings are supported:
+   * "assets_with_contents = true", which returns assets with contents uploaded;
+   * "assets_with_contents = false", which returns assets without contents.
+   * 
+ * + * string filter = 5; + * + * @return The bytes for filter. + */ + @java.lang.Override + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, filter_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, filter_); + } + size += getUnknownFields().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.visionai.v1.ListAssetsRequest)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.ListAssetsRequest other = + (com.google.cloud.visionai.v1.ListAssetsRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (!getFilter().equals(other.getFilter())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + hash = (37 * hash) + FILTER_FIELD_NUMBER; + hash = (53 * hash) + getFilter().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.ListAssetsRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ListAssetsRequest 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.visionai.v1.ListAssetsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ListAssetsRequest 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.visionai.v1.ListAssetsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ListAssetsRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.ListAssetsRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ListAssetsRequest 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.visionai.v1.ListAssetsRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ListAssetsRequest 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.visionai.v1.ListAssetsRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ListAssetsRequest 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.visionai.v1.ListAssetsRequest 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; + } + /** + * + * + *
+   * Request message for ListAssets.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.ListAssetsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.ListAssetsRequest) + com.google.cloud.visionai.v1.ListAssetsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_ListAssetsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_ListAssetsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.ListAssetsRequest.class, + com.google.cloud.visionai.v1.ListAssetsRequest.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.ListAssetsRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + pageSize_ = 0; + pageToken_ = ""; + filter_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_ListAssetsRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ListAssetsRequest getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.ListAssetsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ListAssetsRequest build() { + com.google.cloud.visionai.v1.ListAssetsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ListAssetsRequest buildPartial() { + com.google.cloud.visionai.v1.ListAssetsRequest result = + new com.google.cloud.visionai.v1.ListAssetsRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.visionai.v1.ListAssetsRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.pageSize_ = pageSize_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.pageToken_ = pageToken_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.filter_ = filter_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.ListAssetsRequest) { + return mergeFrom((com.google.cloud.visionai.v1.ListAssetsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.ListAssetsRequest other) { + if (other == com.google.cloud.visionai.v1.ListAssetsRequest.getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getFilter().isEmpty()) { + filter_ = other.filter_; + bitField0_ |= 0x00000008; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + pageSize_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 42: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 42 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The parent, which owns this collection of assets.
+     * Format:
+     * `projects/{project_number}/locations/{location}/corpora/{corpus}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The parent, which owns this collection of assets.
+     * Format:
+     * `projects/{project_number}/locations/{location}/corpora/{corpus}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The parent, which owns this collection of assets.
+     * Format:
+     * `projects/{project_number}/locations/{location}/corpora/{corpus}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The parent, which owns this collection of assets.
+     * Format:
+     * `projects/{project_number}/locations/{location}/corpora/{corpus}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The parent, which owns this collection of assets.
+     * Format:
+     * `projects/{project_number}/locations/{location}/corpora/{corpus}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private int pageSize_; + /** + * + * + *
+     * The maximum number of assets to return. The service may return fewer than
+     * this value.
+     * If unspecified, at most 50 assets will be returned.
+     * The maximum value is 1000; values above 1000 will be coerced to 1000.
+     * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + * + * + *
+     * The maximum number of assets to return. The service may return fewer than
+     * this value.
+     * If unspecified, at most 50 assets will be returned.
+     * The maximum value is 1000; values above 1000 will be coerced to 1000.
+     * 
+ * + * int32 page_size = 2; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * The maximum number of assets to return. The service may return fewer than
+     * this value.
+     * If unspecified, at most 50 assets will be returned.
+     * The maximum value is 1000; values above 1000 will be coerced to 1000.
+     * 
+ * + * int32 page_size = 2; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + bitField0_ = (bitField0_ & ~0x00000002); + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + * + * + *
+     * A page token, received from a previous `ListAssets` call.
+     * Provide this to retrieve the subsequent page.
+     *
+     * When paginating, all other parameters provided to `ListAssets` must match
+     * the call that provided the page token.
+     * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A page token, received from a previous `ListAssets` call.
+     * Provide this to retrieve the subsequent page.
+     *
+     * When paginating, all other parameters provided to `ListAssets` must match
+     * the call that provided the page token.
+     * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A page token, received from a previous `ListAssets` call.
+     * Provide this to retrieve the subsequent page.
+     *
+     * When paginating, all other parameters provided to `ListAssets` must match
+     * the call that provided the page token.
+     * 
+ * + * string page_token = 3; + * + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + pageToken_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * A page token, received from a previous `ListAssets` call.
+     * Provide this to retrieve the subsequent page.
+     *
+     * When paginating, all other parameters provided to `ListAssets` must match
+     * the call that provided the page token.
+     * 
+ * + * string page_token = 3; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + pageToken_ = getDefaultInstance().getPageToken(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * A page token, received from a previous `ListAssets` call.
+     * Provide this to retrieve the subsequent page.
+     *
+     * When paginating, all other parameters provided to `ListAssets` must match
+     * the call that provided the page token.
+     * 
+ * + * string page_token = 3; + * + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + pageToken_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object filter_ = ""; + /** + * + * + *
+     * The filter applied to the returned list.
+     * Only the following filterings are supported:
+     * "assets_with_contents = true", which returns assets with contents uploaded;
+     * "assets_with_contents = false", which returns assets without contents.
+     * 
+ * + * string filter = 5; + * + * @return The filter. + */ + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The filter applied to the returned list.
+     * Only the following filterings are supported:
+     * "assets_with_contents = true", which returns assets with contents uploaded;
+     * "assets_with_contents = false", which returns assets without contents.
+     * 
+ * + * string filter = 5; + * + * @return The bytes for filter. + */ + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The filter applied to the returned list.
+     * Only the following filterings are supported:
+     * "assets_with_contents = true", which returns assets with contents uploaded;
+     * "assets_with_contents = false", which returns assets without contents.
+     * 
+ * + * string filter = 5; + * + * @param value The filter to set. + * @return This builder for chaining. + */ + public Builder setFilter(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + filter_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * The filter applied to the returned list.
+     * Only the following filterings are supported:
+     * "assets_with_contents = true", which returns assets with contents uploaded;
+     * "assets_with_contents = false", which returns assets without contents.
+     * 
+ * + * string filter = 5; + * + * @return This builder for chaining. + */ + public Builder clearFilter() { + filter_ = getDefaultInstance().getFilter(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+     * The filter applied to the returned list.
+     * Only the following filterings are supported:
+     * "assets_with_contents = true", which returns assets with contents uploaded;
+     * "assets_with_contents = false", which returns assets without contents.
+     * 
+ * + * string filter = 5; + * + * @param value The bytes for filter to set. + * @return This builder for chaining. + */ + public Builder setFilterBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + filter_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.ListAssetsRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.ListAssetsRequest) + private static final com.google.cloud.visionai.v1.ListAssetsRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.ListAssetsRequest(); + } + + public static com.google.cloud.visionai.v1.ListAssetsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListAssetsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.ListAssetsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListAssetsRequestOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListAssetsRequestOrBuilder.java new file mode 100644 index 000000000000..d481c160359f --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListAssetsRequestOrBuilder.java @@ -0,0 +1,139 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/warehouse.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface ListAssetsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.ListAssetsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The parent, which owns this collection of assets.
+   * Format:
+   * `projects/{project_number}/locations/{location}/corpora/{corpus}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The parent, which owns this collection of assets.
+   * Format:
+   * `projects/{project_number}/locations/{location}/corpora/{corpus}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * The maximum number of assets to return. The service may return fewer than
+   * this value.
+   * If unspecified, at most 50 assets will be returned.
+   * The maximum value is 1000; values above 1000 will be coerced to 1000.
+   * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * A page token, received from a previous `ListAssets` call.
+   * Provide this to retrieve the subsequent page.
+   *
+   * When paginating, all other parameters provided to `ListAssets` must match
+   * the call that provided the page token.
+   * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + * + * + *
+   * A page token, received from a previous `ListAssets` call.
+   * Provide this to retrieve the subsequent page.
+   *
+   * When paginating, all other parameters provided to `ListAssets` must match
+   * the call that provided the page token.
+   * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); + + /** + * + * + *
+   * The filter applied to the returned list.
+   * Only the following filterings are supported:
+   * "assets_with_contents = true", which returns assets with contents uploaded;
+   * "assets_with_contents = false", which returns assets without contents.
+   * 
+ * + * string filter = 5; + * + * @return The filter. + */ + java.lang.String getFilter(); + /** + * + * + *
+   * The filter applied to the returned list.
+   * Only the following filterings are supported:
+   * "assets_with_contents = true", which returns assets with contents uploaded;
+   * "assets_with_contents = false", which returns assets without contents.
+   * 
+ * + * string filter = 5; + * + * @return The bytes for filter. + */ + com.google.protobuf.ByteString getFilterBytes(); +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListAssetsResponse.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListAssetsResponse.java new file mode 100644 index 000000000000..d21c79940d42 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListAssetsResponse.java @@ -0,0 +1,1124 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/warehouse.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * Response message for ListAssets.
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.ListAssetsResponse} + */ +public final class ListAssetsResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.ListAssetsResponse) + ListAssetsResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListAssetsResponse.newBuilder() to construct. + private ListAssetsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListAssetsResponse() { + assets_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListAssetsResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_ListAssetsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_ListAssetsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.ListAssetsResponse.class, + com.google.cloud.visionai.v1.ListAssetsResponse.Builder.class); + } + + public static final int ASSETS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List assets_; + /** + * + * + *
+   * The assets from the specified corpus.
+   * 
+ * + * repeated .google.cloud.visionai.v1.Asset assets = 1; + */ + @java.lang.Override + public java.util.List getAssetsList() { + return assets_; + } + /** + * + * + *
+   * The assets from the specified corpus.
+   * 
+ * + * repeated .google.cloud.visionai.v1.Asset assets = 1; + */ + @java.lang.Override + public java.util.List + getAssetsOrBuilderList() { + return assets_; + } + /** + * + * + *
+   * The assets from the specified corpus.
+   * 
+ * + * repeated .google.cloud.visionai.v1.Asset assets = 1; + */ + @java.lang.Override + public int getAssetsCount() { + return assets_.size(); + } + /** + * + * + *
+   * The assets from the specified corpus.
+   * 
+ * + * repeated .google.cloud.visionai.v1.Asset assets = 1; + */ + @java.lang.Override + public com.google.cloud.visionai.v1.Asset getAssets(int index) { + return assets_.get(index); + } + /** + * + * + *
+   * The assets from the specified corpus.
+   * 
+ * + * repeated .google.cloud.visionai.v1.Asset assets = 1; + */ + @java.lang.Override + public com.google.cloud.visionai.v1.AssetOrBuilder getAssetsOrBuilder(int index) { + return assets_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+   * A token, which can be sent as `page_token` to retrieve the next page.
+   * If this field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + 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(); + nextPageToken_ = s; + return s; + } + } + /** + * + * + *
+   * A token, which can be sent as `page_token` to retrieve the next page.
+   * If this field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = 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 { + for (int i = 0; i < assets_.size(); i++) { + output.writeMessage(1, assets_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < assets_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, assets_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + } + size += getUnknownFields().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.visionai.v1.ListAssetsResponse)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.ListAssetsResponse other = + (com.google.cloud.visionai.v1.ListAssetsResponse) obj; + + if (!getAssetsList().equals(other.getAssetsList())) return false; + if (!getNextPageToken().equals(other.getNextPageToken())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getAssetsCount() > 0) { + hash = (37 * hash) + ASSETS_FIELD_NUMBER; + hash = (53 * hash) + getAssetsList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.ListAssetsResponse parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ListAssetsResponse 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.visionai.v1.ListAssetsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ListAssetsResponse 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.visionai.v1.ListAssetsResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ListAssetsResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.ListAssetsResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ListAssetsResponse 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.visionai.v1.ListAssetsResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ListAssetsResponse 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.visionai.v1.ListAssetsResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ListAssetsResponse 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.visionai.v1.ListAssetsResponse 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; + } + /** + * + * + *
+   * Response message for ListAssets.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.ListAssetsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.ListAssetsResponse) + com.google.cloud.visionai.v1.ListAssetsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_ListAssetsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_ListAssetsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.ListAssetsResponse.class, + com.google.cloud.visionai.v1.ListAssetsResponse.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.ListAssetsResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (assetsBuilder_ == null) { + assets_ = java.util.Collections.emptyList(); + } else { + assets_ = null; + assetsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + nextPageToken_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_ListAssetsResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ListAssetsResponse getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.ListAssetsResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ListAssetsResponse build() { + com.google.cloud.visionai.v1.ListAssetsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ListAssetsResponse buildPartial() { + com.google.cloud.visionai.v1.ListAssetsResponse result = + new com.google.cloud.visionai.v1.ListAssetsResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.visionai.v1.ListAssetsResponse result) { + if (assetsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + assets_ = java.util.Collections.unmodifiableList(assets_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.assets_ = assets_; + } else { + result.assets_ = assetsBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.visionai.v1.ListAssetsResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.nextPageToken_ = nextPageToken_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.ListAssetsResponse) { + return mergeFrom((com.google.cloud.visionai.v1.ListAssetsResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.ListAssetsResponse other) { + if (other == com.google.cloud.visionai.v1.ListAssetsResponse.getDefaultInstance()) + return this; + if (assetsBuilder_ == null) { + if (!other.assets_.isEmpty()) { + if (assets_.isEmpty()) { + assets_ = other.assets_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureAssetsIsMutable(); + assets_.addAll(other.assets_); + } + onChanged(); + } + } else { + if (!other.assets_.isEmpty()) { + if (assetsBuilder_.isEmpty()) { + assetsBuilder_.dispose(); + assetsBuilder_ = null; + assets_ = other.assets_; + bitField0_ = (bitField0_ & ~0x00000001); + assetsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getAssetsFieldBuilder() + : null; + } else { + assetsBuilder_.addAllMessages(other.assets_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.visionai.v1.Asset m = + input.readMessage( + com.google.cloud.visionai.v1.Asset.parser(), extensionRegistry); + if (assetsBuilder_ == null) { + ensureAssetsIsMutable(); + assets_.add(m); + } else { + assetsBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List assets_ = + java.util.Collections.emptyList(); + + private void ensureAssetsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + assets_ = new java.util.ArrayList(assets_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.visionai.v1.Asset, + com.google.cloud.visionai.v1.Asset.Builder, + com.google.cloud.visionai.v1.AssetOrBuilder> + assetsBuilder_; + + /** + * + * + *
+     * The assets from the specified corpus.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Asset assets = 1; + */ + public java.util.List getAssetsList() { + if (assetsBuilder_ == null) { + return java.util.Collections.unmodifiableList(assets_); + } else { + return assetsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * The assets from the specified corpus.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Asset assets = 1; + */ + public int getAssetsCount() { + if (assetsBuilder_ == null) { + return assets_.size(); + } else { + return assetsBuilder_.getCount(); + } + } + /** + * + * + *
+     * The assets from the specified corpus.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Asset assets = 1; + */ + public com.google.cloud.visionai.v1.Asset getAssets(int index) { + if (assetsBuilder_ == null) { + return assets_.get(index); + } else { + return assetsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * The assets from the specified corpus.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Asset assets = 1; + */ + public Builder setAssets(int index, com.google.cloud.visionai.v1.Asset value) { + if (assetsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAssetsIsMutable(); + assets_.set(index, value); + onChanged(); + } else { + assetsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The assets from the specified corpus.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Asset assets = 1; + */ + public Builder setAssets( + int index, com.google.cloud.visionai.v1.Asset.Builder builderForValue) { + if (assetsBuilder_ == null) { + ensureAssetsIsMutable(); + assets_.set(index, builderForValue.build()); + onChanged(); + } else { + assetsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The assets from the specified corpus.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Asset assets = 1; + */ + public Builder addAssets(com.google.cloud.visionai.v1.Asset value) { + if (assetsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAssetsIsMutable(); + assets_.add(value); + onChanged(); + } else { + assetsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * The assets from the specified corpus.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Asset assets = 1; + */ + public Builder addAssets(int index, com.google.cloud.visionai.v1.Asset value) { + if (assetsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAssetsIsMutable(); + assets_.add(index, value); + onChanged(); + } else { + assetsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The assets from the specified corpus.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Asset assets = 1; + */ + public Builder addAssets(com.google.cloud.visionai.v1.Asset.Builder builderForValue) { + if (assetsBuilder_ == null) { + ensureAssetsIsMutable(); + assets_.add(builderForValue.build()); + onChanged(); + } else { + assetsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The assets from the specified corpus.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Asset assets = 1; + */ + public Builder addAssets( + int index, com.google.cloud.visionai.v1.Asset.Builder builderForValue) { + if (assetsBuilder_ == null) { + ensureAssetsIsMutable(); + assets_.add(index, builderForValue.build()); + onChanged(); + } else { + assetsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The assets from the specified corpus.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Asset assets = 1; + */ + public Builder addAllAssets( + java.lang.Iterable values) { + if (assetsBuilder_ == null) { + ensureAssetsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, assets_); + onChanged(); + } else { + assetsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * The assets from the specified corpus.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Asset assets = 1; + */ + public Builder clearAssets() { + if (assetsBuilder_ == null) { + assets_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + assetsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The assets from the specified corpus.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Asset assets = 1; + */ + public Builder removeAssets(int index) { + if (assetsBuilder_ == null) { + ensureAssetsIsMutable(); + assets_.remove(index); + onChanged(); + } else { + assetsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * The assets from the specified corpus.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Asset assets = 1; + */ + public com.google.cloud.visionai.v1.Asset.Builder getAssetsBuilder(int index) { + return getAssetsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * The assets from the specified corpus.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Asset assets = 1; + */ + public com.google.cloud.visionai.v1.AssetOrBuilder getAssetsOrBuilder(int index) { + if (assetsBuilder_ == null) { + return assets_.get(index); + } else { + return assetsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * The assets from the specified corpus.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Asset assets = 1; + */ + public java.util.List + getAssetsOrBuilderList() { + if (assetsBuilder_ != null) { + return assetsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(assets_); + } + } + /** + * + * + *
+     * The assets from the specified corpus.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Asset assets = 1; + */ + public com.google.cloud.visionai.v1.Asset.Builder addAssetsBuilder() { + return getAssetsFieldBuilder() + .addBuilder(com.google.cloud.visionai.v1.Asset.getDefaultInstance()); + } + /** + * + * + *
+     * The assets from the specified corpus.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Asset assets = 1; + */ + public com.google.cloud.visionai.v1.Asset.Builder addAssetsBuilder(int index) { + return getAssetsFieldBuilder() + .addBuilder(index, com.google.cloud.visionai.v1.Asset.getDefaultInstance()); + } + /** + * + * + *
+     * The assets from the specified corpus.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Asset assets = 1; + */ + public java.util.List getAssetsBuilderList() { + return getAssetsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.visionai.v1.Asset, + com.google.cloud.visionai.v1.Asset.Builder, + com.google.cloud.visionai.v1.AssetOrBuilder> + getAssetsFieldBuilder() { + if (assetsBuilder_ == null) { + assetsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.visionai.v1.Asset, + com.google.cloud.visionai.v1.Asset.Builder, + com.google.cloud.visionai.v1.AssetOrBuilder>( + assets_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + assets_ = null; + } + return assetsBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+     * A token, which can be sent as `page_token` to retrieve the next page.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A token, which can be sent as `page_token` to retrieve the next page.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A token, which can be sent as `page_token` to retrieve the next page.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * A token, which can be sent as `page_token` to retrieve the next page.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + nextPageToken_ = getDefaultInstance().getNextPageToken(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * A token, which can be sent as `page_token` to retrieve the next page.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.ListAssetsResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.ListAssetsResponse) + private static final com.google.cloud.visionai.v1.ListAssetsResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.ListAssetsResponse(); + } + + public static com.google.cloud.visionai.v1.ListAssetsResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListAssetsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.ListAssetsResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListAssetsResponseOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListAssetsResponseOrBuilder.java new file mode 100644 index 000000000000..edf85c918a9f --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListAssetsResponseOrBuilder.java @@ -0,0 +1,104 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/warehouse.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface ListAssetsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.ListAssetsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The assets from the specified corpus.
+   * 
+ * + * repeated .google.cloud.visionai.v1.Asset assets = 1; + */ + java.util.List getAssetsList(); + /** + * + * + *
+   * The assets from the specified corpus.
+   * 
+ * + * repeated .google.cloud.visionai.v1.Asset assets = 1; + */ + com.google.cloud.visionai.v1.Asset getAssets(int index); + /** + * + * + *
+   * The assets from the specified corpus.
+   * 
+ * + * repeated .google.cloud.visionai.v1.Asset assets = 1; + */ + int getAssetsCount(); + /** + * + * + *
+   * The assets from the specified corpus.
+   * 
+ * + * repeated .google.cloud.visionai.v1.Asset assets = 1; + */ + java.util.List getAssetsOrBuilderList(); + /** + * + * + *
+   * The assets from the specified corpus.
+   * 
+ * + * repeated .google.cloud.visionai.v1.Asset assets = 1; + */ + com.google.cloud.visionai.v1.AssetOrBuilder getAssetsOrBuilder(int index); + + /** + * + * + *
+   * A token, which can be sent as `page_token` to retrieve the next page.
+   * If this field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + * + * + *
+   * A token, which can be sent as `page_token` to retrieve the next page.
+   * If this field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListClustersRequest.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListClustersRequest.java new file mode 100644 index 000000000000..25b023fbd555 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListClustersRequest.java @@ -0,0 +1,1282 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/streams_service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * Message for requesting list of Clusters.
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.ListClustersRequest} + */ +public final class ListClustersRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.ListClustersRequest) + ListClustersRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListClustersRequest.newBuilder() to construct. + private ListClustersRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListClustersRequest() { + parent_ = ""; + pageToken_ = ""; + filter_ = ""; + orderBy_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListClustersRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.StreamsServiceProto + .internal_static_google_cloud_visionai_v1_ListClustersRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.StreamsServiceProto + .internal_static_google_cloud_visionai_v1_ListClustersRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.ListClustersRequest.class, + com.google.cloud.visionai.v1.ListClustersRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + /** + * + * + *
+   * Required. Parent value for ListClustersRequest.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + 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(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Parent value for ListClustersRequest.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 2; + private int pageSize_ = 0; + /** + * + * + *
+   * Requested page size. Server may return fewer items than requested.
+   * If unspecified, server will pick an appropriate default.
+   * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object pageToken_ = ""; + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + 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(); + pageToken_ = s; + return s; + } + } + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FILTER_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object filter_ = ""; + /** + * + * + *
+   * Filtering results.
+   * 
+ * + * string filter = 4; + * + * @return The filter. + */ + @java.lang.Override + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + 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(); + filter_ = s; + return s; + } + } + /** + * + * + *
+   * Filtering results.
+   * 
+ * + * string filter = 4; + * + * @return The bytes for filter. + */ + @java.lang.Override + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ORDER_BY_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object orderBy_ = ""; + /** + * + * + *
+   * Hint for how to order the results.
+   * 
+ * + * string order_by = 5; + * + * @return The orderBy. + */ + @java.lang.Override + public java.lang.String getOrderBy() { + java.lang.Object ref = orderBy_; + 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(); + orderBy_ = s; + return s; + } + } + /** + * + * + *
+   * Hint for how to order the results.
+   * 
+ * + * string order_by = 5; + * + * @return The bytes for orderBy. + */ + @java.lang.Override + public com.google.protobuf.ByteString getOrderByBytes() { + java.lang.Object ref = orderBy_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + orderBy_ = 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, filter_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(orderBy_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, orderBy_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, filter_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(orderBy_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, orderBy_); + } + size += getUnknownFields().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.visionai.v1.ListClustersRequest)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.ListClustersRequest other = + (com.google.cloud.visionai.v1.ListClustersRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (!getFilter().equals(other.getFilter())) return false; + if (!getOrderBy().equals(other.getOrderBy())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + hash = (37 * hash) + FILTER_FIELD_NUMBER; + hash = (53 * hash) + getFilter().hashCode(); + hash = (37 * hash) + ORDER_BY_FIELD_NUMBER; + hash = (53 * hash) + getOrderBy().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.ListClustersRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ListClustersRequest 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.visionai.v1.ListClustersRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ListClustersRequest 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.visionai.v1.ListClustersRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ListClustersRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.ListClustersRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ListClustersRequest 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.visionai.v1.ListClustersRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ListClustersRequest 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.visionai.v1.ListClustersRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ListClustersRequest 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.visionai.v1.ListClustersRequest 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; + } + /** + * + * + *
+   * Message for requesting list of Clusters.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.ListClustersRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.ListClustersRequest) + com.google.cloud.visionai.v1.ListClustersRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.StreamsServiceProto + .internal_static_google_cloud_visionai_v1_ListClustersRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.StreamsServiceProto + .internal_static_google_cloud_visionai_v1_ListClustersRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.ListClustersRequest.class, + com.google.cloud.visionai.v1.ListClustersRequest.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.ListClustersRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + pageSize_ = 0; + pageToken_ = ""; + filter_ = ""; + orderBy_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.StreamsServiceProto + .internal_static_google_cloud_visionai_v1_ListClustersRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ListClustersRequest getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.ListClustersRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ListClustersRequest build() { + com.google.cloud.visionai.v1.ListClustersRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ListClustersRequest buildPartial() { + com.google.cloud.visionai.v1.ListClustersRequest result = + new com.google.cloud.visionai.v1.ListClustersRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.visionai.v1.ListClustersRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.pageSize_ = pageSize_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.pageToken_ = pageToken_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.filter_ = filter_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.orderBy_ = orderBy_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.ListClustersRequest) { + return mergeFrom((com.google.cloud.visionai.v1.ListClustersRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.ListClustersRequest other) { + if (other == com.google.cloud.visionai.v1.ListClustersRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getFilter().isEmpty()) { + filter_ = other.filter_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (!other.getOrderBy().isEmpty()) { + orderBy_ = other.orderBy_; + bitField0_ |= 0x00000010; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + pageSize_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + orderBy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 42 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. Parent value for ListClustersRequest.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Parent value for ListClustersRequest.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Parent value for ListClustersRequest.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Parent value for ListClustersRequest.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Parent value for ListClustersRequest.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private int pageSize_; + /** + * + * + *
+     * Requested page size. Server may return fewer items than requested.
+     * If unspecified, server will pick an appropriate default.
+     * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + * + * + *
+     * Requested page size. Server may return fewer items than requested.
+     * If unspecified, server will pick an appropriate default.
+     * 
+ * + * int32 page_size = 2; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Requested page size. Server may return fewer items than requested.
+     * If unspecified, server will pick an appropriate default.
+     * 
+ * + * int32 page_size = 2; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + bitField0_ = (bitField0_ & ~0x00000002); + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string page_token = 3; + * + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + pageToken_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string page_token = 3; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + pageToken_ = getDefaultInstance().getPageToken(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string page_token = 3; + * + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + pageToken_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object filter_ = ""; + /** + * + * + *
+     * Filtering results.
+     * 
+ * + * string filter = 4; + * + * @return The filter. + */ + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Filtering results.
+     * 
+ * + * string filter = 4; + * + * @return The bytes for filter. + */ + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Filtering results.
+     * 
+ * + * string filter = 4; + * + * @param value The filter to set. + * @return This builder for chaining. + */ + public Builder setFilter(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + filter_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Filtering results.
+     * 
+ * + * string filter = 4; + * + * @return This builder for chaining. + */ + public Builder clearFilter() { + filter_ = getDefaultInstance().getFilter(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+     * Filtering results.
+     * 
+ * + * string filter = 4; + * + * @param value The bytes for filter to set. + * @return This builder for chaining. + */ + public Builder setFilterBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + filter_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private java.lang.Object orderBy_ = ""; + /** + * + * + *
+     * Hint for how to order the results.
+     * 
+ * + * string order_by = 5; + * + * @return The orderBy. + */ + public java.lang.String getOrderBy() { + java.lang.Object ref = orderBy_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + orderBy_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Hint for how to order the results.
+     * 
+ * + * string order_by = 5; + * + * @return The bytes for orderBy. + */ + public com.google.protobuf.ByteString getOrderByBytes() { + java.lang.Object ref = orderBy_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + orderBy_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Hint for how to order the results.
+     * 
+ * + * string order_by = 5; + * + * @param value The orderBy to set. + * @return This builder for chaining. + */ + public Builder setOrderBy(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + orderBy_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Hint for how to order the results.
+     * 
+ * + * string order_by = 5; + * + * @return This builder for chaining. + */ + public Builder clearOrderBy() { + orderBy_ = getDefaultInstance().getOrderBy(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + /** + * + * + *
+     * Hint for how to order the results.
+     * 
+ * + * string order_by = 5; + * + * @param value The bytes for orderBy to set. + * @return This builder for chaining. + */ + public Builder setOrderByBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + orderBy_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.ListClustersRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.ListClustersRequest) + private static final com.google.cloud.visionai.v1.ListClustersRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.ListClustersRequest(); + } + + public static com.google.cloud.visionai.v1.ListClustersRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListClustersRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.ListClustersRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListClustersRequestOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListClustersRequestOrBuilder.java new file mode 100644 index 000000000000..fcf2eb7025b5 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListClustersRequestOrBuilder.java @@ -0,0 +1,144 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/streams_service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface ListClustersRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.ListClustersRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Parent value for ListClustersRequest.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. Parent value for ListClustersRequest.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Requested page size. Server may return fewer items than requested.
+   * If unspecified, server will pick an appropriate default.
+   * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); + + /** + * + * + *
+   * Filtering results.
+   * 
+ * + * string filter = 4; + * + * @return The filter. + */ + java.lang.String getFilter(); + /** + * + * + *
+   * Filtering results.
+   * 
+ * + * string filter = 4; + * + * @return The bytes for filter. + */ + com.google.protobuf.ByteString getFilterBytes(); + + /** + * + * + *
+   * Hint for how to order the results.
+   * 
+ * + * string order_by = 5; + * + * @return The orderBy. + */ + java.lang.String getOrderBy(); + /** + * + * + *
+   * Hint for how to order the results.
+   * 
+ * + * string order_by = 5; + * + * @return The bytes for orderBy. + */ + com.google.protobuf.ByteString getOrderByBytes(); +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListClustersResponse.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListClustersResponse.java new file mode 100644 index 000000000000..acf26b3b9ad2 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListClustersResponse.java @@ -0,0 +1,1394 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/streams_service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * Message for response to listing Clusters.
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.ListClustersResponse} + */ +public final class ListClustersResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.ListClustersResponse) + ListClustersResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListClustersResponse.newBuilder() to construct. + private ListClustersResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListClustersResponse() { + clusters_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + unreachable_ = com.google.protobuf.LazyStringArrayList.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListClustersResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.StreamsServiceProto + .internal_static_google_cloud_visionai_v1_ListClustersResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.StreamsServiceProto + .internal_static_google_cloud_visionai_v1_ListClustersResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.ListClustersResponse.class, + com.google.cloud.visionai.v1.ListClustersResponse.Builder.class); + } + + public static final int CLUSTERS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List clusters_; + /** + * + * + *
+   * The list of Cluster.
+   * 
+ * + * repeated .google.cloud.visionai.v1.Cluster clusters = 1; + */ + @java.lang.Override + public java.util.List getClustersList() { + return clusters_; + } + /** + * + * + *
+   * The list of Cluster.
+   * 
+ * + * repeated .google.cloud.visionai.v1.Cluster clusters = 1; + */ + @java.lang.Override + public java.util.List + getClustersOrBuilderList() { + return clusters_; + } + /** + * + * + *
+   * The list of Cluster.
+   * 
+ * + * repeated .google.cloud.visionai.v1.Cluster clusters = 1; + */ + @java.lang.Override + public int getClustersCount() { + return clusters_.size(); + } + /** + * + * + *
+   * The list of Cluster.
+   * 
+ * + * repeated .google.cloud.visionai.v1.Cluster clusters = 1; + */ + @java.lang.Override + public com.google.cloud.visionai.v1.Cluster getClusters(int index) { + return clusters_.get(index); + } + /** + * + * + *
+   * The list of Cluster.
+   * 
+ * + * repeated .google.cloud.visionai.v1.Cluster clusters = 1; + */ + @java.lang.Override + public com.google.cloud.visionai.v1.ClusterOrBuilder getClustersOrBuilder(int index) { + return clusters_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + 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(); + nextPageToken_ = s; + return s; + } + } + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int UNREACHABLE_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList unreachable_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @return A list containing the unreachable. + */ + public com.google.protobuf.ProtocolStringList getUnreachableList() { + return unreachable_; + } + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @return The count of unreachable. + */ + public int getUnreachableCount() { + return unreachable_.size(); + } + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + public java.lang.String getUnreachable(int index) { + return unreachable_.get(index); + } + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the value to return. + * @return The bytes of the unreachable at the given index. + */ + public com.google.protobuf.ByteString getUnreachableBytes(int index) { + return unreachable_.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 < clusters_.size(); i++) { + output.writeMessage(1, clusters_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + } + for (int i = 0; i < unreachable_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, unreachable_.getRaw(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < clusters_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, clusters_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + } + { + int dataSize = 0; + for (int i = 0; i < unreachable_.size(); i++) { + dataSize += computeStringSizeNoTag(unreachable_.getRaw(i)); + } + size += dataSize; + size += 1 * getUnreachableList().size(); + } + size += getUnknownFields().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.visionai.v1.ListClustersResponse)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.ListClustersResponse other = + (com.google.cloud.visionai.v1.ListClustersResponse) obj; + + if (!getClustersList().equals(other.getClustersList())) return false; + if (!getNextPageToken().equals(other.getNextPageToken())) return false; + if (!getUnreachableList().equals(other.getUnreachableList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getClustersCount() > 0) { + hash = (37 * hash) + CLUSTERS_FIELD_NUMBER; + hash = (53 * hash) + getClustersList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + if (getUnreachableCount() > 0) { + hash = (37 * hash) + UNREACHABLE_FIELD_NUMBER; + hash = (53 * hash) + getUnreachableList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.ListClustersResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ListClustersResponse 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.visionai.v1.ListClustersResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ListClustersResponse 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.visionai.v1.ListClustersResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ListClustersResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.ListClustersResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ListClustersResponse 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.visionai.v1.ListClustersResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ListClustersResponse 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.visionai.v1.ListClustersResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ListClustersResponse 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.visionai.v1.ListClustersResponse 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; + } + /** + * + * + *
+   * Message for response to listing Clusters.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.ListClustersResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.ListClustersResponse) + com.google.cloud.visionai.v1.ListClustersResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.StreamsServiceProto + .internal_static_google_cloud_visionai_v1_ListClustersResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.StreamsServiceProto + .internal_static_google_cloud_visionai_v1_ListClustersResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.ListClustersResponse.class, + com.google.cloud.visionai.v1.ListClustersResponse.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.ListClustersResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (clustersBuilder_ == null) { + clusters_ = java.util.Collections.emptyList(); + } else { + clusters_ = null; + clustersBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + nextPageToken_ = ""; + unreachable_ = com.google.protobuf.LazyStringArrayList.emptyList(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.StreamsServiceProto + .internal_static_google_cloud_visionai_v1_ListClustersResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ListClustersResponse getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.ListClustersResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ListClustersResponse build() { + com.google.cloud.visionai.v1.ListClustersResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ListClustersResponse buildPartial() { + com.google.cloud.visionai.v1.ListClustersResponse result = + new com.google.cloud.visionai.v1.ListClustersResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.visionai.v1.ListClustersResponse result) { + if (clustersBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + clusters_ = java.util.Collections.unmodifiableList(clusters_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.clusters_ = clusters_; + } else { + result.clusters_ = clustersBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.visionai.v1.ListClustersResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.nextPageToken_ = nextPageToken_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + unreachable_.makeImmutable(); + result.unreachable_ = unreachable_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.ListClustersResponse) { + return mergeFrom((com.google.cloud.visionai.v1.ListClustersResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.ListClustersResponse other) { + if (other == com.google.cloud.visionai.v1.ListClustersResponse.getDefaultInstance()) + return this; + if (clustersBuilder_ == null) { + if (!other.clusters_.isEmpty()) { + if (clusters_.isEmpty()) { + clusters_ = other.clusters_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureClustersIsMutable(); + clusters_.addAll(other.clusters_); + } + onChanged(); + } + } else { + if (!other.clusters_.isEmpty()) { + if (clustersBuilder_.isEmpty()) { + clustersBuilder_.dispose(); + clustersBuilder_ = null; + clusters_ = other.clusters_; + bitField0_ = (bitField0_ & ~0x00000001); + clustersBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getClustersFieldBuilder() + : null; + } else { + clustersBuilder_.addAllMessages(other.clusters_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.unreachable_.isEmpty()) { + if (unreachable_.isEmpty()) { + unreachable_ = other.unreachable_; + bitField0_ |= 0x00000004; + } else { + ensureUnreachableIsMutable(); + unreachable_.addAll(other.unreachable_); + } + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.visionai.v1.Cluster m = + input.readMessage( + com.google.cloud.visionai.v1.Cluster.parser(), extensionRegistry); + if (clustersBuilder_ == null) { + ensureClustersIsMutable(); + clusters_.add(m); + } else { + clustersBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureUnreachableIsMutable(); + unreachable_.add(s); + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List clusters_ = + java.util.Collections.emptyList(); + + private void ensureClustersIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + clusters_ = new java.util.ArrayList(clusters_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.visionai.v1.Cluster, + com.google.cloud.visionai.v1.Cluster.Builder, + com.google.cloud.visionai.v1.ClusterOrBuilder> + clustersBuilder_; + + /** + * + * + *
+     * The list of Cluster.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Cluster clusters = 1; + */ + public java.util.List getClustersList() { + if (clustersBuilder_ == null) { + return java.util.Collections.unmodifiableList(clusters_); + } else { + return clustersBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * The list of Cluster.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Cluster clusters = 1; + */ + public int getClustersCount() { + if (clustersBuilder_ == null) { + return clusters_.size(); + } else { + return clustersBuilder_.getCount(); + } + } + /** + * + * + *
+     * The list of Cluster.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Cluster clusters = 1; + */ + public com.google.cloud.visionai.v1.Cluster getClusters(int index) { + if (clustersBuilder_ == null) { + return clusters_.get(index); + } else { + return clustersBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * The list of Cluster.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Cluster clusters = 1; + */ + public Builder setClusters(int index, com.google.cloud.visionai.v1.Cluster value) { + if (clustersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureClustersIsMutable(); + clusters_.set(index, value); + onChanged(); + } else { + clustersBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The list of Cluster.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Cluster clusters = 1; + */ + public Builder setClusters( + int index, com.google.cloud.visionai.v1.Cluster.Builder builderForValue) { + if (clustersBuilder_ == null) { + ensureClustersIsMutable(); + clusters_.set(index, builderForValue.build()); + onChanged(); + } else { + clustersBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of Cluster.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Cluster clusters = 1; + */ + public Builder addClusters(com.google.cloud.visionai.v1.Cluster value) { + if (clustersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureClustersIsMutable(); + clusters_.add(value); + onChanged(); + } else { + clustersBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * The list of Cluster.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Cluster clusters = 1; + */ + public Builder addClusters(int index, com.google.cloud.visionai.v1.Cluster value) { + if (clustersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureClustersIsMutable(); + clusters_.add(index, value); + onChanged(); + } else { + clustersBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The list of Cluster.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Cluster clusters = 1; + */ + public Builder addClusters(com.google.cloud.visionai.v1.Cluster.Builder builderForValue) { + if (clustersBuilder_ == null) { + ensureClustersIsMutable(); + clusters_.add(builderForValue.build()); + onChanged(); + } else { + clustersBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of Cluster.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Cluster clusters = 1; + */ + public Builder addClusters( + int index, com.google.cloud.visionai.v1.Cluster.Builder builderForValue) { + if (clustersBuilder_ == null) { + ensureClustersIsMutable(); + clusters_.add(index, builderForValue.build()); + onChanged(); + } else { + clustersBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of Cluster.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Cluster clusters = 1; + */ + public Builder addAllClusters( + java.lang.Iterable values) { + if (clustersBuilder_ == null) { + ensureClustersIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, clusters_); + onChanged(); + } else { + clustersBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * The list of Cluster.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Cluster clusters = 1; + */ + public Builder clearClusters() { + if (clustersBuilder_ == null) { + clusters_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + clustersBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The list of Cluster.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Cluster clusters = 1; + */ + public Builder removeClusters(int index) { + if (clustersBuilder_ == null) { + ensureClustersIsMutable(); + clusters_.remove(index); + onChanged(); + } else { + clustersBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * The list of Cluster.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Cluster clusters = 1; + */ + public com.google.cloud.visionai.v1.Cluster.Builder getClustersBuilder(int index) { + return getClustersFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * The list of Cluster.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Cluster clusters = 1; + */ + public com.google.cloud.visionai.v1.ClusterOrBuilder getClustersOrBuilder(int index) { + if (clustersBuilder_ == null) { + return clusters_.get(index); + } else { + return clustersBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * The list of Cluster.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Cluster clusters = 1; + */ + public java.util.List + getClustersOrBuilderList() { + if (clustersBuilder_ != null) { + return clustersBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(clusters_); + } + } + /** + * + * + *
+     * The list of Cluster.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Cluster clusters = 1; + */ + public com.google.cloud.visionai.v1.Cluster.Builder addClustersBuilder() { + return getClustersFieldBuilder() + .addBuilder(com.google.cloud.visionai.v1.Cluster.getDefaultInstance()); + } + /** + * + * + *
+     * The list of Cluster.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Cluster clusters = 1; + */ + public com.google.cloud.visionai.v1.Cluster.Builder addClustersBuilder(int index) { + return getClustersFieldBuilder() + .addBuilder(index, com.google.cloud.visionai.v1.Cluster.getDefaultInstance()); + } + /** + * + * + *
+     * The list of Cluster.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Cluster clusters = 1; + */ + public java.util.List getClustersBuilderList() { + return getClustersFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.visionai.v1.Cluster, + com.google.cloud.visionai.v1.Cluster.Builder, + com.google.cloud.visionai.v1.ClusterOrBuilder> + getClustersFieldBuilder() { + if (clustersBuilder_ == null) { + clustersBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.visionai.v1.Cluster, + com.google.cloud.visionai.v1.Cluster.Builder, + com.google.cloud.visionai.v1.ClusterOrBuilder>( + clusters_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + clusters_ = null; + } + return clustersBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + nextPageToken_ = getDefaultInstance().getNextPageToken(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList unreachable_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureUnreachableIsMutable() { + if (!unreachable_.isModifiable()) { + unreachable_ = new com.google.protobuf.LazyStringArrayList(unreachable_); + } + bitField0_ |= 0x00000004; + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @return A list containing the unreachable. + */ + public com.google.protobuf.ProtocolStringList getUnreachableList() { + unreachable_.makeImmutable(); + return unreachable_; + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @return The count of unreachable. + */ + public int getUnreachableCount() { + return unreachable_.size(); + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + public java.lang.String getUnreachable(int index) { + return unreachable_.get(index); + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the value to return. + * @return The bytes of the unreachable at the given index. + */ + public com.google.protobuf.ByteString getUnreachableBytes(int index) { + return unreachable_.getByteString(index); + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param index The index to set the value at. + * @param value The unreachable to set. + * @return This builder for chaining. + */ + public Builder setUnreachable(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureUnreachableIsMutable(); + unreachable_.set(index, value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param value The unreachable to add. + * @return This builder for chaining. + */ + public Builder addUnreachable(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureUnreachableIsMutable(); + unreachable_.add(value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param values The unreachable to add. + * @return This builder for chaining. + */ + public Builder addAllUnreachable(java.lang.Iterable values) { + ensureUnreachableIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, unreachable_); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @return This builder for chaining. + */ + public Builder clearUnreachable() { + unreachable_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + ; + onChanged(); + return this; + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param value The bytes of the unreachable to add. + * @return This builder for chaining. + */ + public Builder addUnreachableBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureUnreachableIsMutable(); + unreachable_.add(value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.ListClustersResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.ListClustersResponse) + private static final com.google.cloud.visionai.v1.ListClustersResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.ListClustersResponse(); + } + + public static com.google.cloud.visionai.v1.ListClustersResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListClustersResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.ListClustersResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListClustersResponseOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListClustersResponseOrBuilder.java new file mode 100644 index 000000000000..5bd1a56388b2 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListClustersResponseOrBuilder.java @@ -0,0 +1,154 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/streams_service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface ListClustersResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.ListClustersResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The list of Cluster.
+   * 
+ * + * repeated .google.cloud.visionai.v1.Cluster clusters = 1; + */ + java.util.List getClustersList(); + /** + * + * + *
+   * The list of Cluster.
+   * 
+ * + * repeated .google.cloud.visionai.v1.Cluster clusters = 1; + */ + com.google.cloud.visionai.v1.Cluster getClusters(int index); + /** + * + * + *
+   * The list of Cluster.
+   * 
+ * + * repeated .google.cloud.visionai.v1.Cluster clusters = 1; + */ + int getClustersCount(); + /** + * + * + *
+   * The list of Cluster.
+   * 
+ * + * repeated .google.cloud.visionai.v1.Cluster clusters = 1; + */ + java.util.List + getClustersOrBuilderList(); + /** + * + * + *
+   * The list of Cluster.
+   * 
+ * + * repeated .google.cloud.visionai.v1.Cluster clusters = 1; + */ + com.google.cloud.visionai.v1.ClusterOrBuilder getClustersOrBuilder(int index); + + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); + + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @return A list containing the unreachable. + */ + java.util.List getUnreachableList(); + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @return The count of unreachable. + */ + int getUnreachableCount(); + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + java.lang.String getUnreachable(int index); + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the value to return. + * @return The bytes of the unreachable at the given index. + */ + com.google.protobuf.ByteString getUnreachableBytes(int index); +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListCollectionsRequest.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListCollectionsRequest.java new file mode 100644 index 000000000000..55e298a48cf5 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListCollectionsRequest.java @@ -0,0 +1,957 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/warehouse.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * Request message for ListCollections.
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.ListCollectionsRequest} + */ +public final class ListCollectionsRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.ListCollectionsRequest) + ListCollectionsRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListCollectionsRequest.newBuilder() to construct. + private ListCollectionsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListCollectionsRequest() { + parent_ = ""; + pageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListCollectionsRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_ListCollectionsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_ListCollectionsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.ListCollectionsRequest.class, + com.google.cloud.visionai.v1.ListCollectionsRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + /** + * + * + *
+   * Required. The parent corpus. Format:
+   * `projects/{project_number}/locations/{location}/corpora/{corpus}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + 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(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The parent corpus. Format:
+   * `projects/{project_number}/locations/{location}/corpora/{corpus}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 2; + private int pageSize_ = 0; + /** + * + * + *
+   * The maximum number of collections to return. The service may return fewer
+   * than this value. If unspecified, at most 50 collections will be returned.
+   * The maximum value is 1000; values above 1000 will be coerced to 1000.
+   * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object pageToken_ = ""; + /** + * + * + *
+   * A page token, received from a previous `ListCollectionsRequest` call.
+   * Provide this to retrieve the subsequent page.
+   *
+   * When paginating, all other parameters provided to `ListCollectionsRequest`
+   * must match the call that provided the page token.
+   * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + 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(); + pageToken_ = s; + return s; + } + } + /** + * + * + *
+   * A page token, received from a previous `ListCollectionsRequest` call.
+   * Provide this to retrieve the subsequent page.
+   *
+   * When paginating, all other parameters provided to `ListCollectionsRequest`
+   * must match the call that provided the page token.
+   * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); + } + size += getUnknownFields().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.visionai.v1.ListCollectionsRequest)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.ListCollectionsRequest other = + (com.google.cloud.visionai.v1.ListCollectionsRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.ListCollectionsRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ListCollectionsRequest 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.visionai.v1.ListCollectionsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ListCollectionsRequest 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.visionai.v1.ListCollectionsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ListCollectionsRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.ListCollectionsRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ListCollectionsRequest 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.visionai.v1.ListCollectionsRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ListCollectionsRequest 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.visionai.v1.ListCollectionsRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ListCollectionsRequest 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.visionai.v1.ListCollectionsRequest 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; + } + /** + * + * + *
+   * Request message for ListCollections.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.ListCollectionsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.ListCollectionsRequest) + com.google.cloud.visionai.v1.ListCollectionsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_ListCollectionsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_ListCollectionsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.ListCollectionsRequest.class, + com.google.cloud.visionai.v1.ListCollectionsRequest.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.ListCollectionsRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + pageSize_ = 0; + pageToken_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_ListCollectionsRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ListCollectionsRequest getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.ListCollectionsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ListCollectionsRequest build() { + com.google.cloud.visionai.v1.ListCollectionsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ListCollectionsRequest buildPartial() { + com.google.cloud.visionai.v1.ListCollectionsRequest result = + new com.google.cloud.visionai.v1.ListCollectionsRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.visionai.v1.ListCollectionsRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.pageSize_ = pageSize_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.pageToken_ = pageToken_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.ListCollectionsRequest) { + return mergeFrom((com.google.cloud.visionai.v1.ListCollectionsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.ListCollectionsRequest other) { + if (other == com.google.cloud.visionai.v1.ListCollectionsRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + bitField0_ |= 0x00000004; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + pageSize_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The parent corpus. Format:
+     * `projects/{project_number}/locations/{location}/corpora/{corpus}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The parent corpus. Format:
+     * `projects/{project_number}/locations/{location}/corpora/{corpus}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The parent corpus. Format:
+     * `projects/{project_number}/locations/{location}/corpora/{corpus}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The parent corpus. Format:
+     * `projects/{project_number}/locations/{location}/corpora/{corpus}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The parent corpus. Format:
+     * `projects/{project_number}/locations/{location}/corpora/{corpus}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private int pageSize_; + /** + * + * + *
+     * The maximum number of collections to return. The service may return fewer
+     * than this value. If unspecified, at most 50 collections will be returned.
+     * The maximum value is 1000; values above 1000 will be coerced to 1000.
+     * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + * + * + *
+     * The maximum number of collections to return. The service may return fewer
+     * than this value. If unspecified, at most 50 collections will be returned.
+     * The maximum value is 1000; values above 1000 will be coerced to 1000.
+     * 
+ * + * int32 page_size = 2; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * The maximum number of collections to return. The service may return fewer
+     * than this value. If unspecified, at most 50 collections will be returned.
+     * The maximum value is 1000; values above 1000 will be coerced to 1000.
+     * 
+ * + * int32 page_size = 2; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + bitField0_ = (bitField0_ & ~0x00000002); + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + * + * + *
+     * A page token, received from a previous `ListCollectionsRequest` call.
+     * Provide this to retrieve the subsequent page.
+     *
+     * When paginating, all other parameters provided to `ListCollectionsRequest`
+     * must match the call that provided the page token.
+     * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A page token, received from a previous `ListCollectionsRequest` call.
+     * Provide this to retrieve the subsequent page.
+     *
+     * When paginating, all other parameters provided to `ListCollectionsRequest`
+     * must match the call that provided the page token.
+     * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A page token, received from a previous `ListCollectionsRequest` call.
+     * Provide this to retrieve the subsequent page.
+     *
+     * When paginating, all other parameters provided to `ListCollectionsRequest`
+     * must match the call that provided the page token.
+     * 
+ * + * string page_token = 3; + * + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + pageToken_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * A page token, received from a previous `ListCollectionsRequest` call.
+     * Provide this to retrieve the subsequent page.
+     *
+     * When paginating, all other parameters provided to `ListCollectionsRequest`
+     * must match the call that provided the page token.
+     * 
+ * + * string page_token = 3; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + pageToken_ = getDefaultInstance().getPageToken(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * A page token, received from a previous `ListCollectionsRequest` call.
+     * Provide this to retrieve the subsequent page.
+     *
+     * When paginating, all other parameters provided to `ListCollectionsRequest`
+     * must match the call that provided the page token.
+     * 
+ * + * string page_token = 3; + * + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + pageToken_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.ListCollectionsRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.ListCollectionsRequest) + private static final com.google.cloud.visionai.v1.ListCollectionsRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.ListCollectionsRequest(); + } + + public static com.google.cloud.visionai.v1.ListCollectionsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListCollectionsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.ListCollectionsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListCollectionsRequestOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListCollectionsRequestOrBuilder.java new file mode 100644 index 000000000000..6c1df6170189 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListCollectionsRequestOrBuilder.java @@ -0,0 +1,105 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/warehouse.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface ListCollectionsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.ListCollectionsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The parent corpus. Format:
+   * `projects/{project_number}/locations/{location}/corpora/{corpus}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The parent corpus. Format:
+   * `projects/{project_number}/locations/{location}/corpora/{corpus}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * The maximum number of collections to return. The service may return fewer
+   * than this value. If unspecified, at most 50 collections will be returned.
+   * The maximum value is 1000; values above 1000 will be coerced to 1000.
+   * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * A page token, received from a previous `ListCollectionsRequest` call.
+   * Provide this to retrieve the subsequent page.
+   *
+   * When paginating, all other parameters provided to `ListCollectionsRequest`
+   * must match the call that provided the page token.
+   * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + * + * + *
+   * A page token, received from a previous `ListCollectionsRequest` call.
+   * Provide this to retrieve the subsequent page.
+   *
+   * When paginating, all other parameters provided to `ListCollectionsRequest`
+   * must match the call that provided the page token.
+   * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListCollectionsResponse.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListCollectionsResponse.java new file mode 100644 index 000000000000..683ea20d1322 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListCollectionsResponse.java @@ -0,0 +1,1126 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/warehouse.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * Response message for ListCollections.
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.ListCollectionsResponse} + */ +public final class ListCollectionsResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.ListCollectionsResponse) + ListCollectionsResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListCollectionsResponse.newBuilder() to construct. + private ListCollectionsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListCollectionsResponse() { + collections_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListCollectionsResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_ListCollectionsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_ListCollectionsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.ListCollectionsResponse.class, + com.google.cloud.visionai.v1.ListCollectionsResponse.Builder.class); + } + + public static final int COLLECTIONS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List collections_; + /** + * + * + *
+   * The collections from the specified corpus.
+   * 
+ * + * repeated .google.cloud.visionai.v1.Collection collections = 1; + */ + @java.lang.Override + public java.util.List getCollectionsList() { + return collections_; + } + /** + * + * + *
+   * The collections from the specified corpus.
+   * 
+ * + * repeated .google.cloud.visionai.v1.Collection collections = 1; + */ + @java.lang.Override + public java.util.List + getCollectionsOrBuilderList() { + return collections_; + } + /** + * + * + *
+   * The collections from the specified corpus.
+   * 
+ * + * repeated .google.cloud.visionai.v1.Collection collections = 1; + */ + @java.lang.Override + public int getCollectionsCount() { + return collections_.size(); + } + /** + * + * + *
+   * The collections from the specified corpus.
+   * 
+ * + * repeated .google.cloud.visionai.v1.Collection collections = 1; + */ + @java.lang.Override + public com.google.cloud.visionai.v1.Collection getCollections(int index) { + return collections_.get(index); + } + /** + * + * + *
+   * The collections from the specified corpus.
+   * 
+ * + * repeated .google.cloud.visionai.v1.Collection collections = 1; + */ + @java.lang.Override + public com.google.cloud.visionai.v1.CollectionOrBuilder getCollectionsOrBuilder(int index) { + return collections_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+   * A token, which can be sent as `page_token` to retrieve the next page.
+   * If this field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + 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(); + nextPageToken_ = s; + return s; + } + } + /** + * + * + *
+   * A token, which can be sent as `page_token` to retrieve the next page.
+   * If this field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = 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 { + for (int i = 0; i < collections_.size(); i++) { + output.writeMessage(1, collections_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < collections_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, collections_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + } + size += getUnknownFields().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.visionai.v1.ListCollectionsResponse)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.ListCollectionsResponse other = + (com.google.cloud.visionai.v1.ListCollectionsResponse) obj; + + if (!getCollectionsList().equals(other.getCollectionsList())) return false; + if (!getNextPageToken().equals(other.getNextPageToken())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getCollectionsCount() > 0) { + hash = (37 * hash) + COLLECTIONS_FIELD_NUMBER; + hash = (53 * hash) + getCollectionsList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.ListCollectionsResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ListCollectionsResponse 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.visionai.v1.ListCollectionsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ListCollectionsResponse 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.visionai.v1.ListCollectionsResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ListCollectionsResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.ListCollectionsResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ListCollectionsResponse 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.visionai.v1.ListCollectionsResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ListCollectionsResponse 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.visionai.v1.ListCollectionsResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ListCollectionsResponse 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.visionai.v1.ListCollectionsResponse 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; + } + /** + * + * + *
+   * Response message for ListCollections.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.ListCollectionsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.ListCollectionsResponse) + com.google.cloud.visionai.v1.ListCollectionsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_ListCollectionsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_ListCollectionsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.ListCollectionsResponse.class, + com.google.cloud.visionai.v1.ListCollectionsResponse.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.ListCollectionsResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (collectionsBuilder_ == null) { + collections_ = java.util.Collections.emptyList(); + } else { + collections_ = null; + collectionsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + nextPageToken_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_ListCollectionsResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ListCollectionsResponse getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.ListCollectionsResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ListCollectionsResponse build() { + com.google.cloud.visionai.v1.ListCollectionsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ListCollectionsResponse buildPartial() { + com.google.cloud.visionai.v1.ListCollectionsResponse result = + new com.google.cloud.visionai.v1.ListCollectionsResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.visionai.v1.ListCollectionsResponse result) { + if (collectionsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + collections_ = java.util.Collections.unmodifiableList(collections_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.collections_ = collections_; + } else { + result.collections_ = collectionsBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.visionai.v1.ListCollectionsResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.nextPageToken_ = nextPageToken_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.ListCollectionsResponse) { + return mergeFrom((com.google.cloud.visionai.v1.ListCollectionsResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.ListCollectionsResponse other) { + if (other == com.google.cloud.visionai.v1.ListCollectionsResponse.getDefaultInstance()) + return this; + if (collectionsBuilder_ == null) { + if (!other.collections_.isEmpty()) { + if (collections_.isEmpty()) { + collections_ = other.collections_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureCollectionsIsMutable(); + collections_.addAll(other.collections_); + } + onChanged(); + } + } else { + if (!other.collections_.isEmpty()) { + if (collectionsBuilder_.isEmpty()) { + collectionsBuilder_.dispose(); + collectionsBuilder_ = null; + collections_ = other.collections_; + bitField0_ = (bitField0_ & ~0x00000001); + collectionsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getCollectionsFieldBuilder() + : null; + } else { + collectionsBuilder_.addAllMessages(other.collections_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.visionai.v1.Collection m = + input.readMessage( + com.google.cloud.visionai.v1.Collection.parser(), extensionRegistry); + if (collectionsBuilder_ == null) { + ensureCollectionsIsMutable(); + collections_.add(m); + } else { + collectionsBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List collections_ = + java.util.Collections.emptyList(); + + private void ensureCollectionsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + collections_ = + new java.util.ArrayList(collections_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.visionai.v1.Collection, + com.google.cloud.visionai.v1.Collection.Builder, + com.google.cloud.visionai.v1.CollectionOrBuilder> + collectionsBuilder_; + + /** + * + * + *
+     * The collections from the specified corpus.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Collection collections = 1; + */ + public java.util.List getCollectionsList() { + if (collectionsBuilder_ == null) { + return java.util.Collections.unmodifiableList(collections_); + } else { + return collectionsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * The collections from the specified corpus.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Collection collections = 1; + */ + public int getCollectionsCount() { + if (collectionsBuilder_ == null) { + return collections_.size(); + } else { + return collectionsBuilder_.getCount(); + } + } + /** + * + * + *
+     * The collections from the specified corpus.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Collection collections = 1; + */ + public com.google.cloud.visionai.v1.Collection getCollections(int index) { + if (collectionsBuilder_ == null) { + return collections_.get(index); + } else { + return collectionsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * The collections from the specified corpus.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Collection collections = 1; + */ + public Builder setCollections(int index, com.google.cloud.visionai.v1.Collection value) { + if (collectionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureCollectionsIsMutable(); + collections_.set(index, value); + onChanged(); + } else { + collectionsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The collections from the specified corpus.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Collection collections = 1; + */ + public Builder setCollections( + int index, com.google.cloud.visionai.v1.Collection.Builder builderForValue) { + if (collectionsBuilder_ == null) { + ensureCollectionsIsMutable(); + collections_.set(index, builderForValue.build()); + onChanged(); + } else { + collectionsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The collections from the specified corpus.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Collection collections = 1; + */ + public Builder addCollections(com.google.cloud.visionai.v1.Collection value) { + if (collectionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureCollectionsIsMutable(); + collections_.add(value); + onChanged(); + } else { + collectionsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * The collections from the specified corpus.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Collection collections = 1; + */ + public Builder addCollections(int index, com.google.cloud.visionai.v1.Collection value) { + if (collectionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureCollectionsIsMutable(); + collections_.add(index, value); + onChanged(); + } else { + collectionsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The collections from the specified corpus.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Collection collections = 1; + */ + public Builder addCollections(com.google.cloud.visionai.v1.Collection.Builder builderForValue) { + if (collectionsBuilder_ == null) { + ensureCollectionsIsMutable(); + collections_.add(builderForValue.build()); + onChanged(); + } else { + collectionsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The collections from the specified corpus.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Collection collections = 1; + */ + public Builder addCollections( + int index, com.google.cloud.visionai.v1.Collection.Builder builderForValue) { + if (collectionsBuilder_ == null) { + ensureCollectionsIsMutable(); + collections_.add(index, builderForValue.build()); + onChanged(); + } else { + collectionsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The collections from the specified corpus.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Collection collections = 1; + */ + public Builder addAllCollections( + java.lang.Iterable values) { + if (collectionsBuilder_ == null) { + ensureCollectionsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, collections_); + onChanged(); + } else { + collectionsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * The collections from the specified corpus.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Collection collections = 1; + */ + public Builder clearCollections() { + if (collectionsBuilder_ == null) { + collections_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + collectionsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The collections from the specified corpus.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Collection collections = 1; + */ + public Builder removeCollections(int index) { + if (collectionsBuilder_ == null) { + ensureCollectionsIsMutable(); + collections_.remove(index); + onChanged(); + } else { + collectionsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * The collections from the specified corpus.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Collection collections = 1; + */ + public com.google.cloud.visionai.v1.Collection.Builder getCollectionsBuilder(int index) { + return getCollectionsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * The collections from the specified corpus.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Collection collections = 1; + */ + public com.google.cloud.visionai.v1.CollectionOrBuilder getCollectionsOrBuilder(int index) { + if (collectionsBuilder_ == null) { + return collections_.get(index); + } else { + return collectionsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * The collections from the specified corpus.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Collection collections = 1; + */ + public java.util.List + getCollectionsOrBuilderList() { + if (collectionsBuilder_ != null) { + return collectionsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(collections_); + } + } + /** + * + * + *
+     * The collections from the specified corpus.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Collection collections = 1; + */ + public com.google.cloud.visionai.v1.Collection.Builder addCollectionsBuilder() { + return getCollectionsFieldBuilder() + .addBuilder(com.google.cloud.visionai.v1.Collection.getDefaultInstance()); + } + /** + * + * + *
+     * The collections from the specified corpus.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Collection collections = 1; + */ + public com.google.cloud.visionai.v1.Collection.Builder addCollectionsBuilder(int index) { + return getCollectionsFieldBuilder() + .addBuilder(index, com.google.cloud.visionai.v1.Collection.getDefaultInstance()); + } + /** + * + * + *
+     * The collections from the specified corpus.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Collection collections = 1; + */ + public java.util.List + getCollectionsBuilderList() { + return getCollectionsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.visionai.v1.Collection, + com.google.cloud.visionai.v1.Collection.Builder, + com.google.cloud.visionai.v1.CollectionOrBuilder> + getCollectionsFieldBuilder() { + if (collectionsBuilder_ == null) { + collectionsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.visionai.v1.Collection, + com.google.cloud.visionai.v1.Collection.Builder, + com.google.cloud.visionai.v1.CollectionOrBuilder>( + collections_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + collections_ = null; + } + return collectionsBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+     * A token, which can be sent as `page_token` to retrieve the next page.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A token, which can be sent as `page_token` to retrieve the next page.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A token, which can be sent as `page_token` to retrieve the next page.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * A token, which can be sent as `page_token` to retrieve the next page.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + nextPageToken_ = getDefaultInstance().getNextPageToken(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * A token, which can be sent as `page_token` to retrieve the next page.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.ListCollectionsResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.ListCollectionsResponse) + private static final com.google.cloud.visionai.v1.ListCollectionsResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.ListCollectionsResponse(); + } + + public static com.google.cloud.visionai.v1.ListCollectionsResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListCollectionsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.ListCollectionsResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListCollectionsResponseOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListCollectionsResponseOrBuilder.java new file mode 100644 index 000000000000..a0e39dbcb8d9 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListCollectionsResponseOrBuilder.java @@ -0,0 +1,105 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/warehouse.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface ListCollectionsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.ListCollectionsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The collections from the specified corpus.
+   * 
+ * + * repeated .google.cloud.visionai.v1.Collection collections = 1; + */ + java.util.List getCollectionsList(); + /** + * + * + *
+   * The collections from the specified corpus.
+   * 
+ * + * repeated .google.cloud.visionai.v1.Collection collections = 1; + */ + com.google.cloud.visionai.v1.Collection getCollections(int index); + /** + * + * + *
+   * The collections from the specified corpus.
+   * 
+ * + * repeated .google.cloud.visionai.v1.Collection collections = 1; + */ + int getCollectionsCount(); + /** + * + * + *
+   * The collections from the specified corpus.
+   * 
+ * + * repeated .google.cloud.visionai.v1.Collection collections = 1; + */ + java.util.List + getCollectionsOrBuilderList(); + /** + * + * + *
+   * The collections from the specified corpus.
+   * 
+ * + * repeated .google.cloud.visionai.v1.Collection collections = 1; + */ + com.google.cloud.visionai.v1.CollectionOrBuilder getCollectionsOrBuilder(int index); + + /** + * + * + *
+   * A token, which can be sent as `page_token` to retrieve the next page.
+   * If this field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + * + * + *
+   * A token, which can be sent as `page_token` to retrieve the next page.
+   * If this field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListCorporaRequest.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListCorporaRequest.java new file mode 100644 index 000000000000..677affeac6f8 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListCorporaRequest.java @@ -0,0 +1,1154 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/warehouse.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * Request message for ListCorpora.
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.ListCorporaRequest} + */ +public final class ListCorporaRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.ListCorporaRequest) + ListCorporaRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListCorporaRequest.newBuilder() to construct. + private ListCorporaRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListCorporaRequest() { + parent_ = ""; + pageToken_ = ""; + filter_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListCorporaRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_ListCorporaRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_ListCorporaRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.ListCorporaRequest.class, + com.google.cloud.visionai.v1.ListCorporaRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + /** + * + * + *
+   * Required. The resource name of the project from which to list corpora.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + 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(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The resource name of the project from which to list corpora.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 2; + private int pageSize_ = 0; + /** + * + * + *
+   * Requested page size. API may return fewer results than requested.
+   * If negative, INVALID_ARGUMENT error will be returned.
+   * If unspecified or 0, API will pick a default size, which is 10.
+   * If the requested page size is larger than the maximum size, API will pick
+   * use the maximum size, which is 20.
+   * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object pageToken_ = ""; + /** + * + * + *
+   * A token identifying a page of results for the server to return.
+   * Typically obtained via
+   * [ListCorporaResponse.next_page_token][google.cloud.visionai.v1.ListCorporaResponse.next_page_token]
+   * of the previous
+   * [Warehouse.ListCorpora][google.cloud.visionai.v1.Warehouse.ListCorpora]
+   * call.
+   * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + 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(); + pageToken_ = s; + return s; + } + } + /** + * + * + *
+   * A token identifying a page of results for the server to return.
+   * Typically obtained via
+   * [ListCorporaResponse.next_page_token][google.cloud.visionai.v1.ListCorporaResponse.next_page_token]
+   * of the previous
+   * [Warehouse.ListCorpora][google.cloud.visionai.v1.Warehouse.ListCorpora]
+   * call.
+   * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FILTER_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object filter_ = ""; + /** + * + * + *
+   * The filter applied to the returned corpora list.
+   * Only the following restrictions are supported:
+   * `type=<Corpus.Type>`,
+   * `type!=<Corpus.Type>`.
+   * 
+ * + * string filter = 5; + * + * @return The filter. + */ + @java.lang.Override + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + 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(); + filter_ = s; + return s; + } + } + /** + * + * + *
+   * The filter applied to the returned corpora list.
+   * Only the following restrictions are supported:
+   * `type=<Corpus.Type>`,
+   * `type!=<Corpus.Type>`.
+   * 
+ * + * string filter = 5; + * + * @return The bytes for filter. + */ + @java.lang.Override + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, filter_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, filter_); + } + size += getUnknownFields().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.visionai.v1.ListCorporaRequest)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.ListCorporaRequest other = + (com.google.cloud.visionai.v1.ListCorporaRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (!getFilter().equals(other.getFilter())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + hash = (37 * hash) + FILTER_FIELD_NUMBER; + hash = (53 * hash) + getFilter().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.ListCorporaRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ListCorporaRequest 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.visionai.v1.ListCorporaRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ListCorporaRequest 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.visionai.v1.ListCorporaRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ListCorporaRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.ListCorporaRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ListCorporaRequest 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.visionai.v1.ListCorporaRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ListCorporaRequest 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.visionai.v1.ListCorporaRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ListCorporaRequest 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.visionai.v1.ListCorporaRequest 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; + } + /** + * + * + *
+   * Request message for ListCorpora.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.ListCorporaRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.ListCorporaRequest) + com.google.cloud.visionai.v1.ListCorporaRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_ListCorporaRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_ListCorporaRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.ListCorporaRequest.class, + com.google.cloud.visionai.v1.ListCorporaRequest.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.ListCorporaRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + pageSize_ = 0; + pageToken_ = ""; + filter_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_ListCorporaRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ListCorporaRequest getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.ListCorporaRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ListCorporaRequest build() { + com.google.cloud.visionai.v1.ListCorporaRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ListCorporaRequest buildPartial() { + com.google.cloud.visionai.v1.ListCorporaRequest result = + new com.google.cloud.visionai.v1.ListCorporaRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.visionai.v1.ListCorporaRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.pageSize_ = pageSize_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.pageToken_ = pageToken_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.filter_ = filter_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.ListCorporaRequest) { + return mergeFrom((com.google.cloud.visionai.v1.ListCorporaRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.ListCorporaRequest other) { + if (other == com.google.cloud.visionai.v1.ListCorporaRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getFilter().isEmpty()) { + filter_ = other.filter_; + bitField0_ |= 0x00000008; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + pageSize_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 42: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 42 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The resource name of the project from which to list corpora.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The resource name of the project from which to list corpora.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The resource name of the project from which to list corpora.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the project from which to list corpora.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the project from which to list corpora.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private int pageSize_; + /** + * + * + *
+     * Requested page size. API may return fewer results than requested.
+     * If negative, INVALID_ARGUMENT error will be returned.
+     * If unspecified or 0, API will pick a default size, which is 10.
+     * If the requested page size is larger than the maximum size, API will pick
+     * use the maximum size, which is 20.
+     * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + * + * + *
+     * Requested page size. API may return fewer results than requested.
+     * If negative, INVALID_ARGUMENT error will be returned.
+     * If unspecified or 0, API will pick a default size, which is 10.
+     * If the requested page size is larger than the maximum size, API will pick
+     * use the maximum size, which is 20.
+     * 
+ * + * int32 page_size = 2; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Requested page size. API may return fewer results than requested.
+     * If negative, INVALID_ARGUMENT error will be returned.
+     * If unspecified or 0, API will pick a default size, which is 10.
+     * If the requested page size is larger than the maximum size, API will pick
+     * use the maximum size, which is 20.
+     * 
+ * + * int32 page_size = 2; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + bitField0_ = (bitField0_ & ~0x00000002); + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + * + * + *
+     * A token identifying a page of results for the server to return.
+     * Typically obtained via
+     * [ListCorporaResponse.next_page_token][google.cloud.visionai.v1.ListCorporaResponse.next_page_token]
+     * of the previous
+     * [Warehouse.ListCorpora][google.cloud.visionai.v1.Warehouse.ListCorpora]
+     * call.
+     * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A token identifying a page of results for the server to return.
+     * Typically obtained via
+     * [ListCorporaResponse.next_page_token][google.cloud.visionai.v1.ListCorporaResponse.next_page_token]
+     * of the previous
+     * [Warehouse.ListCorpora][google.cloud.visionai.v1.Warehouse.ListCorpora]
+     * call.
+     * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A token identifying a page of results for the server to return.
+     * Typically obtained via
+     * [ListCorporaResponse.next_page_token][google.cloud.visionai.v1.ListCorporaResponse.next_page_token]
+     * of the previous
+     * [Warehouse.ListCorpora][google.cloud.visionai.v1.Warehouse.ListCorpora]
+     * call.
+     * 
+ * + * string page_token = 3; + * + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + pageToken_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * A token identifying a page of results for the server to return.
+     * Typically obtained via
+     * [ListCorporaResponse.next_page_token][google.cloud.visionai.v1.ListCorporaResponse.next_page_token]
+     * of the previous
+     * [Warehouse.ListCorpora][google.cloud.visionai.v1.Warehouse.ListCorpora]
+     * call.
+     * 
+ * + * string page_token = 3; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + pageToken_ = getDefaultInstance().getPageToken(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * A token identifying a page of results for the server to return.
+     * Typically obtained via
+     * [ListCorporaResponse.next_page_token][google.cloud.visionai.v1.ListCorporaResponse.next_page_token]
+     * of the previous
+     * [Warehouse.ListCorpora][google.cloud.visionai.v1.Warehouse.ListCorpora]
+     * call.
+     * 
+ * + * string page_token = 3; + * + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + pageToken_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object filter_ = ""; + /** + * + * + *
+     * The filter applied to the returned corpora list.
+     * Only the following restrictions are supported:
+     * `type=<Corpus.Type>`,
+     * `type!=<Corpus.Type>`.
+     * 
+ * + * string filter = 5; + * + * @return The filter. + */ + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The filter applied to the returned corpora list.
+     * Only the following restrictions are supported:
+     * `type=<Corpus.Type>`,
+     * `type!=<Corpus.Type>`.
+     * 
+ * + * string filter = 5; + * + * @return The bytes for filter. + */ + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The filter applied to the returned corpora list.
+     * Only the following restrictions are supported:
+     * `type=<Corpus.Type>`,
+     * `type!=<Corpus.Type>`.
+     * 
+ * + * string filter = 5; + * + * @param value The filter to set. + * @return This builder for chaining. + */ + public Builder setFilter(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + filter_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * The filter applied to the returned corpora list.
+     * Only the following restrictions are supported:
+     * `type=<Corpus.Type>`,
+     * `type!=<Corpus.Type>`.
+     * 
+ * + * string filter = 5; + * + * @return This builder for chaining. + */ + public Builder clearFilter() { + filter_ = getDefaultInstance().getFilter(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+     * The filter applied to the returned corpora list.
+     * Only the following restrictions are supported:
+     * `type=<Corpus.Type>`,
+     * `type!=<Corpus.Type>`.
+     * 
+ * + * string filter = 5; + * + * @param value The bytes for filter to set. + * @return This builder for chaining. + */ + public Builder setFilterBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + filter_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.ListCorporaRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.ListCorporaRequest) + private static final com.google.cloud.visionai.v1.ListCorporaRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.ListCorporaRequest(); + } + + public static com.google.cloud.visionai.v1.ListCorporaRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListCorporaRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.ListCorporaRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListCorporaRequestOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListCorporaRequestOrBuilder.java new file mode 100644 index 000000000000..26eea1ed2cf7 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListCorporaRequestOrBuilder.java @@ -0,0 +1,134 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/warehouse.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface ListCorporaRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.ListCorporaRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The resource name of the project from which to list corpora.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The resource name of the project from which to list corpora.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Requested page size. API may return fewer results than requested.
+   * If negative, INVALID_ARGUMENT error will be returned.
+   * If unspecified or 0, API will pick a default size, which is 10.
+   * If the requested page size is larger than the maximum size, API will pick
+   * use the maximum size, which is 20.
+   * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * A token identifying a page of results for the server to return.
+   * Typically obtained via
+   * [ListCorporaResponse.next_page_token][google.cloud.visionai.v1.ListCorporaResponse.next_page_token]
+   * of the previous
+   * [Warehouse.ListCorpora][google.cloud.visionai.v1.Warehouse.ListCorpora]
+   * call.
+   * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + * + * + *
+   * A token identifying a page of results for the server to return.
+   * Typically obtained via
+   * [ListCorporaResponse.next_page_token][google.cloud.visionai.v1.ListCorporaResponse.next_page_token]
+   * of the previous
+   * [Warehouse.ListCorpora][google.cloud.visionai.v1.Warehouse.ListCorpora]
+   * call.
+   * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); + + /** + * + * + *
+   * The filter applied to the returned corpora list.
+   * Only the following restrictions are supported:
+   * `type=<Corpus.Type>`,
+   * `type!=<Corpus.Type>`.
+   * 
+ * + * string filter = 5; + * + * @return The filter. + */ + java.lang.String getFilter(); + /** + * + * + *
+   * The filter applied to the returned corpora list.
+   * Only the following restrictions are supported:
+   * `type=<Corpus.Type>`,
+   * `type!=<Corpus.Type>`.
+   * 
+ * + * string filter = 5; + * + * @return The bytes for filter. + */ + com.google.protobuf.ByteString getFilterBytes(); +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListCorporaResponse.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListCorporaResponse.java new file mode 100644 index 000000000000..d665f273d7a9 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListCorporaResponse.java @@ -0,0 +1,1138 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/warehouse.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * Response message for ListCorpora.
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.ListCorporaResponse} + */ +public final class ListCorporaResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.ListCorporaResponse) + ListCorporaResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListCorporaResponse.newBuilder() to construct. + private ListCorporaResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListCorporaResponse() { + corpora_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListCorporaResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_ListCorporaResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_ListCorporaResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.ListCorporaResponse.class, + com.google.cloud.visionai.v1.ListCorporaResponse.Builder.class); + } + + public static final int CORPORA_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List corpora_; + /** + * + * + *
+   * The corpora in the project.
+   * 
+ * + * repeated .google.cloud.visionai.v1.Corpus corpora = 1; + */ + @java.lang.Override + public java.util.List getCorporaList() { + return corpora_; + } + /** + * + * + *
+   * The corpora in the project.
+   * 
+ * + * repeated .google.cloud.visionai.v1.Corpus corpora = 1; + */ + @java.lang.Override + public java.util.List + getCorporaOrBuilderList() { + return corpora_; + } + /** + * + * + *
+   * The corpora in the project.
+   * 
+ * + * repeated .google.cloud.visionai.v1.Corpus corpora = 1; + */ + @java.lang.Override + public int getCorporaCount() { + return corpora_.size(); + } + /** + * + * + *
+   * The corpora in the project.
+   * 
+ * + * repeated .google.cloud.visionai.v1.Corpus corpora = 1; + */ + @java.lang.Override + public com.google.cloud.visionai.v1.Corpus getCorpora(int index) { + return corpora_.get(index); + } + /** + * + * + *
+   * The corpora in the project.
+   * 
+ * + * repeated .google.cloud.visionai.v1.Corpus corpora = 1; + */ + @java.lang.Override + public com.google.cloud.visionai.v1.CorpusOrBuilder getCorporaOrBuilder(int index) { + return corpora_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+   * A token to retrieve next page of results.
+   * Pass to
+   * [ListCorporaRequest.page_token][google.cloud.visionai.v1.ListCorporaRequest.page_token]
+   * to obtain that page.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + 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(); + nextPageToken_ = s; + return s; + } + } + /** + * + * + *
+   * A token to retrieve next page of results.
+   * Pass to
+   * [ListCorporaRequest.page_token][google.cloud.visionai.v1.ListCorporaRequest.page_token]
+   * to obtain that page.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = 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 { + for (int i = 0; i < corpora_.size(); i++) { + output.writeMessage(1, corpora_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < corpora_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, corpora_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + } + size += getUnknownFields().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.visionai.v1.ListCorporaResponse)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.ListCorporaResponse other = + (com.google.cloud.visionai.v1.ListCorporaResponse) obj; + + if (!getCorporaList().equals(other.getCorporaList())) return false; + if (!getNextPageToken().equals(other.getNextPageToken())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getCorporaCount() > 0) { + hash = (37 * hash) + CORPORA_FIELD_NUMBER; + hash = (53 * hash) + getCorporaList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.ListCorporaResponse parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ListCorporaResponse 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.visionai.v1.ListCorporaResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ListCorporaResponse 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.visionai.v1.ListCorporaResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ListCorporaResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.ListCorporaResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ListCorporaResponse 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.visionai.v1.ListCorporaResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ListCorporaResponse 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.visionai.v1.ListCorporaResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ListCorporaResponse 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.visionai.v1.ListCorporaResponse 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; + } + /** + * + * + *
+   * Response message for ListCorpora.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.ListCorporaResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.ListCorporaResponse) + com.google.cloud.visionai.v1.ListCorporaResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_ListCorporaResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_ListCorporaResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.ListCorporaResponse.class, + com.google.cloud.visionai.v1.ListCorporaResponse.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.ListCorporaResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (corporaBuilder_ == null) { + corpora_ = java.util.Collections.emptyList(); + } else { + corpora_ = null; + corporaBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + nextPageToken_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_ListCorporaResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ListCorporaResponse getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.ListCorporaResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ListCorporaResponse build() { + com.google.cloud.visionai.v1.ListCorporaResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ListCorporaResponse buildPartial() { + com.google.cloud.visionai.v1.ListCorporaResponse result = + new com.google.cloud.visionai.v1.ListCorporaResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.visionai.v1.ListCorporaResponse result) { + if (corporaBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + corpora_ = java.util.Collections.unmodifiableList(corpora_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.corpora_ = corpora_; + } else { + result.corpora_ = corporaBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.visionai.v1.ListCorporaResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.nextPageToken_ = nextPageToken_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.ListCorporaResponse) { + return mergeFrom((com.google.cloud.visionai.v1.ListCorporaResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.ListCorporaResponse other) { + if (other == com.google.cloud.visionai.v1.ListCorporaResponse.getDefaultInstance()) + return this; + if (corporaBuilder_ == null) { + if (!other.corpora_.isEmpty()) { + if (corpora_.isEmpty()) { + corpora_ = other.corpora_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureCorporaIsMutable(); + corpora_.addAll(other.corpora_); + } + onChanged(); + } + } else { + if (!other.corpora_.isEmpty()) { + if (corporaBuilder_.isEmpty()) { + corporaBuilder_.dispose(); + corporaBuilder_ = null; + corpora_ = other.corpora_; + bitField0_ = (bitField0_ & ~0x00000001); + corporaBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getCorporaFieldBuilder() + : null; + } else { + corporaBuilder_.addAllMessages(other.corpora_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.visionai.v1.Corpus m = + input.readMessage( + com.google.cloud.visionai.v1.Corpus.parser(), extensionRegistry); + if (corporaBuilder_ == null) { + ensureCorporaIsMutable(); + corpora_.add(m); + } else { + corporaBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List corpora_ = + java.util.Collections.emptyList(); + + private void ensureCorporaIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + corpora_ = new java.util.ArrayList(corpora_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.visionai.v1.Corpus, + com.google.cloud.visionai.v1.Corpus.Builder, + com.google.cloud.visionai.v1.CorpusOrBuilder> + corporaBuilder_; + + /** + * + * + *
+     * The corpora in the project.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Corpus corpora = 1; + */ + public java.util.List getCorporaList() { + if (corporaBuilder_ == null) { + return java.util.Collections.unmodifiableList(corpora_); + } else { + return corporaBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * The corpora in the project.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Corpus corpora = 1; + */ + public int getCorporaCount() { + if (corporaBuilder_ == null) { + return corpora_.size(); + } else { + return corporaBuilder_.getCount(); + } + } + /** + * + * + *
+     * The corpora in the project.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Corpus corpora = 1; + */ + public com.google.cloud.visionai.v1.Corpus getCorpora(int index) { + if (corporaBuilder_ == null) { + return corpora_.get(index); + } else { + return corporaBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * The corpora in the project.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Corpus corpora = 1; + */ + public Builder setCorpora(int index, com.google.cloud.visionai.v1.Corpus value) { + if (corporaBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureCorporaIsMutable(); + corpora_.set(index, value); + onChanged(); + } else { + corporaBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The corpora in the project.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Corpus corpora = 1; + */ + public Builder setCorpora( + int index, com.google.cloud.visionai.v1.Corpus.Builder builderForValue) { + if (corporaBuilder_ == null) { + ensureCorporaIsMutable(); + corpora_.set(index, builderForValue.build()); + onChanged(); + } else { + corporaBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The corpora in the project.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Corpus corpora = 1; + */ + public Builder addCorpora(com.google.cloud.visionai.v1.Corpus value) { + if (corporaBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureCorporaIsMutable(); + corpora_.add(value); + onChanged(); + } else { + corporaBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * The corpora in the project.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Corpus corpora = 1; + */ + public Builder addCorpora(int index, com.google.cloud.visionai.v1.Corpus value) { + if (corporaBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureCorporaIsMutable(); + corpora_.add(index, value); + onChanged(); + } else { + corporaBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The corpora in the project.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Corpus corpora = 1; + */ + public Builder addCorpora(com.google.cloud.visionai.v1.Corpus.Builder builderForValue) { + if (corporaBuilder_ == null) { + ensureCorporaIsMutable(); + corpora_.add(builderForValue.build()); + onChanged(); + } else { + corporaBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The corpora in the project.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Corpus corpora = 1; + */ + public Builder addCorpora( + int index, com.google.cloud.visionai.v1.Corpus.Builder builderForValue) { + if (corporaBuilder_ == null) { + ensureCorporaIsMutable(); + corpora_.add(index, builderForValue.build()); + onChanged(); + } else { + corporaBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The corpora in the project.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Corpus corpora = 1; + */ + public Builder addAllCorpora( + java.lang.Iterable values) { + if (corporaBuilder_ == null) { + ensureCorporaIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, corpora_); + onChanged(); + } else { + corporaBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * The corpora in the project.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Corpus corpora = 1; + */ + public Builder clearCorpora() { + if (corporaBuilder_ == null) { + corpora_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + corporaBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The corpora in the project.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Corpus corpora = 1; + */ + public Builder removeCorpora(int index) { + if (corporaBuilder_ == null) { + ensureCorporaIsMutable(); + corpora_.remove(index); + onChanged(); + } else { + corporaBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * The corpora in the project.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Corpus corpora = 1; + */ + public com.google.cloud.visionai.v1.Corpus.Builder getCorporaBuilder(int index) { + return getCorporaFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * The corpora in the project.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Corpus corpora = 1; + */ + public com.google.cloud.visionai.v1.CorpusOrBuilder getCorporaOrBuilder(int index) { + if (corporaBuilder_ == null) { + return corpora_.get(index); + } else { + return corporaBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * The corpora in the project.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Corpus corpora = 1; + */ + public java.util.List + getCorporaOrBuilderList() { + if (corporaBuilder_ != null) { + return corporaBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(corpora_); + } + } + /** + * + * + *
+     * The corpora in the project.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Corpus corpora = 1; + */ + public com.google.cloud.visionai.v1.Corpus.Builder addCorporaBuilder() { + return getCorporaFieldBuilder() + .addBuilder(com.google.cloud.visionai.v1.Corpus.getDefaultInstance()); + } + /** + * + * + *
+     * The corpora in the project.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Corpus corpora = 1; + */ + public com.google.cloud.visionai.v1.Corpus.Builder addCorporaBuilder(int index) { + return getCorporaFieldBuilder() + .addBuilder(index, com.google.cloud.visionai.v1.Corpus.getDefaultInstance()); + } + /** + * + * + *
+     * The corpora in the project.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Corpus corpora = 1; + */ + public java.util.List getCorporaBuilderList() { + return getCorporaFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.visionai.v1.Corpus, + com.google.cloud.visionai.v1.Corpus.Builder, + com.google.cloud.visionai.v1.CorpusOrBuilder> + getCorporaFieldBuilder() { + if (corporaBuilder_ == null) { + corporaBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.visionai.v1.Corpus, + com.google.cloud.visionai.v1.Corpus.Builder, + com.google.cloud.visionai.v1.CorpusOrBuilder>( + corpora_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + corpora_ = null; + } + return corporaBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+     * A token to retrieve next page of results.
+     * Pass to
+     * [ListCorporaRequest.page_token][google.cloud.visionai.v1.ListCorporaRequest.page_token]
+     * to obtain that page.
+     * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A token to retrieve next page of results.
+     * Pass to
+     * [ListCorporaRequest.page_token][google.cloud.visionai.v1.ListCorporaRequest.page_token]
+     * to obtain that page.
+     * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A token to retrieve next page of results.
+     * Pass to
+     * [ListCorporaRequest.page_token][google.cloud.visionai.v1.ListCorporaRequest.page_token]
+     * to obtain that page.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * A token to retrieve next page of results.
+     * Pass to
+     * [ListCorporaRequest.page_token][google.cloud.visionai.v1.ListCorporaRequest.page_token]
+     * to obtain that page.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + nextPageToken_ = getDefaultInstance().getNextPageToken(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * A token to retrieve next page of results.
+     * Pass to
+     * [ListCorporaRequest.page_token][google.cloud.visionai.v1.ListCorporaRequest.page_token]
+     * to obtain that page.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.ListCorporaResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.ListCorporaResponse) + private static final com.google.cloud.visionai.v1.ListCorporaResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.ListCorporaResponse(); + } + + public static com.google.cloud.visionai.v1.ListCorporaResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListCorporaResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.ListCorporaResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListCorporaResponseOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListCorporaResponseOrBuilder.java new file mode 100644 index 000000000000..98b9ebc36500 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListCorporaResponseOrBuilder.java @@ -0,0 +1,108 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/warehouse.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface ListCorporaResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.ListCorporaResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The corpora in the project.
+   * 
+ * + * repeated .google.cloud.visionai.v1.Corpus corpora = 1; + */ + java.util.List getCorporaList(); + /** + * + * + *
+   * The corpora in the project.
+   * 
+ * + * repeated .google.cloud.visionai.v1.Corpus corpora = 1; + */ + com.google.cloud.visionai.v1.Corpus getCorpora(int index); + /** + * + * + *
+   * The corpora in the project.
+   * 
+ * + * repeated .google.cloud.visionai.v1.Corpus corpora = 1; + */ + int getCorporaCount(); + /** + * + * + *
+   * The corpora in the project.
+   * 
+ * + * repeated .google.cloud.visionai.v1.Corpus corpora = 1; + */ + java.util.List getCorporaOrBuilderList(); + /** + * + * + *
+   * The corpora in the project.
+   * 
+ * + * repeated .google.cloud.visionai.v1.Corpus corpora = 1; + */ + com.google.cloud.visionai.v1.CorpusOrBuilder getCorporaOrBuilder(int index); + + /** + * + * + *
+   * A token to retrieve next page of results.
+   * Pass to
+   * [ListCorporaRequest.page_token][google.cloud.visionai.v1.ListCorporaRequest.page_token]
+   * to obtain that page.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + * + * + *
+   * A token to retrieve next page of results.
+   * Pass to
+   * [ListCorporaRequest.page_token][google.cloud.visionai.v1.ListCorporaRequest.page_token]
+   * to obtain that page.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListDataSchemasRequest.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListDataSchemasRequest.java new file mode 100644 index 000000000000..b377633ea531 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListDataSchemasRequest.java @@ -0,0 +1,964 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/warehouse.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * Request message for ListDataSchemas.
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.ListDataSchemasRequest} + */ +public final class ListDataSchemasRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.ListDataSchemasRequest) + ListDataSchemasRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListDataSchemasRequest.newBuilder() to construct. + private ListDataSchemasRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListDataSchemasRequest() { + parent_ = ""; + pageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListDataSchemasRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_ListDataSchemasRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_ListDataSchemasRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.ListDataSchemasRequest.class, + com.google.cloud.visionai.v1.ListDataSchemasRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + /** + * + * + *
+   * Required. The parent, which owns this collection of data schemas.
+   * Format:
+   * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + 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(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The parent, which owns this collection of data schemas.
+   * Format:
+   * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 2; + private int pageSize_ = 0; + /** + * + * + *
+   * The maximum number of data schemas to return. The service may return fewer
+   * than this value. If unspecified, at most 50 data schemas will be returned.
+   * The maximum value is 1000; values above 1000 will be coerced to 1000.
+   * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object pageToken_ = ""; + /** + * + * + *
+   * A page token, received from a previous `ListDataSchemas` call.
+   * Provide this to retrieve the subsequent page.
+   *
+   * When paginating, all other parameters provided to `ListDataSchemas` must
+   * match the call that provided the page token.
+   * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + 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(); + pageToken_ = s; + return s; + } + } + /** + * + * + *
+   * A page token, received from a previous `ListDataSchemas` call.
+   * Provide this to retrieve the subsequent page.
+   *
+   * When paginating, all other parameters provided to `ListDataSchemas` must
+   * match the call that provided the page token.
+   * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); + } + size += getUnknownFields().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.visionai.v1.ListDataSchemasRequest)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.ListDataSchemasRequest other = + (com.google.cloud.visionai.v1.ListDataSchemasRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.ListDataSchemasRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ListDataSchemasRequest 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.visionai.v1.ListDataSchemasRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ListDataSchemasRequest 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.visionai.v1.ListDataSchemasRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ListDataSchemasRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.ListDataSchemasRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ListDataSchemasRequest 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.visionai.v1.ListDataSchemasRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ListDataSchemasRequest 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.visionai.v1.ListDataSchemasRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ListDataSchemasRequest 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.visionai.v1.ListDataSchemasRequest 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; + } + /** + * + * + *
+   * Request message for ListDataSchemas.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.ListDataSchemasRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.ListDataSchemasRequest) + com.google.cloud.visionai.v1.ListDataSchemasRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_ListDataSchemasRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_ListDataSchemasRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.ListDataSchemasRequest.class, + com.google.cloud.visionai.v1.ListDataSchemasRequest.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.ListDataSchemasRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + pageSize_ = 0; + pageToken_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_ListDataSchemasRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ListDataSchemasRequest getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.ListDataSchemasRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ListDataSchemasRequest build() { + com.google.cloud.visionai.v1.ListDataSchemasRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ListDataSchemasRequest buildPartial() { + com.google.cloud.visionai.v1.ListDataSchemasRequest result = + new com.google.cloud.visionai.v1.ListDataSchemasRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.visionai.v1.ListDataSchemasRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.pageSize_ = pageSize_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.pageToken_ = pageToken_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.ListDataSchemasRequest) { + return mergeFrom((com.google.cloud.visionai.v1.ListDataSchemasRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.ListDataSchemasRequest other) { + if (other == com.google.cloud.visionai.v1.ListDataSchemasRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + bitField0_ |= 0x00000004; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + pageSize_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The parent, which owns this collection of data schemas.
+     * Format:
+     * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The parent, which owns this collection of data schemas.
+     * Format:
+     * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The parent, which owns this collection of data schemas.
+     * Format:
+     * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The parent, which owns this collection of data schemas.
+     * Format:
+     * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The parent, which owns this collection of data schemas.
+     * Format:
+     * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private int pageSize_; + /** + * + * + *
+     * The maximum number of data schemas to return. The service may return fewer
+     * than this value. If unspecified, at most 50 data schemas will be returned.
+     * The maximum value is 1000; values above 1000 will be coerced to 1000.
+     * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + * + * + *
+     * The maximum number of data schemas to return. The service may return fewer
+     * than this value. If unspecified, at most 50 data schemas will be returned.
+     * The maximum value is 1000; values above 1000 will be coerced to 1000.
+     * 
+ * + * int32 page_size = 2; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * The maximum number of data schemas to return. The service may return fewer
+     * than this value. If unspecified, at most 50 data schemas will be returned.
+     * The maximum value is 1000; values above 1000 will be coerced to 1000.
+     * 
+ * + * int32 page_size = 2; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + bitField0_ = (bitField0_ & ~0x00000002); + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + * + * + *
+     * A page token, received from a previous `ListDataSchemas` call.
+     * Provide this to retrieve the subsequent page.
+     *
+     * When paginating, all other parameters provided to `ListDataSchemas` must
+     * match the call that provided the page token.
+     * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A page token, received from a previous `ListDataSchemas` call.
+     * Provide this to retrieve the subsequent page.
+     *
+     * When paginating, all other parameters provided to `ListDataSchemas` must
+     * match the call that provided the page token.
+     * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A page token, received from a previous `ListDataSchemas` call.
+     * Provide this to retrieve the subsequent page.
+     *
+     * When paginating, all other parameters provided to `ListDataSchemas` must
+     * match the call that provided the page token.
+     * 
+ * + * string page_token = 3; + * + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + pageToken_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * A page token, received from a previous `ListDataSchemas` call.
+     * Provide this to retrieve the subsequent page.
+     *
+     * When paginating, all other parameters provided to `ListDataSchemas` must
+     * match the call that provided the page token.
+     * 
+ * + * string page_token = 3; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + pageToken_ = getDefaultInstance().getPageToken(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * A page token, received from a previous `ListDataSchemas` call.
+     * Provide this to retrieve the subsequent page.
+     *
+     * When paginating, all other parameters provided to `ListDataSchemas` must
+     * match the call that provided the page token.
+     * 
+ * + * string page_token = 3; + * + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + pageToken_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.ListDataSchemasRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.ListDataSchemasRequest) + private static final com.google.cloud.visionai.v1.ListDataSchemasRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.ListDataSchemasRequest(); + } + + public static com.google.cloud.visionai.v1.ListDataSchemasRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListDataSchemasRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.ListDataSchemasRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListDataSchemasRequestOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListDataSchemasRequestOrBuilder.java new file mode 100644 index 000000000000..6748bb23ae1b --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListDataSchemasRequestOrBuilder.java @@ -0,0 +1,107 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/warehouse.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface ListDataSchemasRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.ListDataSchemasRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The parent, which owns this collection of data schemas.
+   * Format:
+   * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The parent, which owns this collection of data schemas.
+   * Format:
+   * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * The maximum number of data schemas to return. The service may return fewer
+   * than this value. If unspecified, at most 50 data schemas will be returned.
+   * The maximum value is 1000; values above 1000 will be coerced to 1000.
+   * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * A page token, received from a previous `ListDataSchemas` call.
+   * Provide this to retrieve the subsequent page.
+   *
+   * When paginating, all other parameters provided to `ListDataSchemas` must
+   * match the call that provided the page token.
+   * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + * + * + *
+   * A page token, received from a previous `ListDataSchemas` call.
+   * Provide this to retrieve the subsequent page.
+   *
+   * When paginating, all other parameters provided to `ListDataSchemas` must
+   * match the call that provided the page token.
+   * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListDataSchemasResponse.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListDataSchemasResponse.java new file mode 100644 index 000000000000..31305e3851dd --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListDataSchemasResponse.java @@ -0,0 +1,1126 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/warehouse.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * Response message for ListDataSchemas.
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.ListDataSchemasResponse} + */ +public final class ListDataSchemasResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.ListDataSchemasResponse) + ListDataSchemasResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListDataSchemasResponse.newBuilder() to construct. + private ListDataSchemasResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListDataSchemasResponse() { + dataSchemas_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListDataSchemasResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_ListDataSchemasResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_ListDataSchemasResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.ListDataSchemasResponse.class, + com.google.cloud.visionai.v1.ListDataSchemasResponse.Builder.class); + } + + public static final int DATA_SCHEMAS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List dataSchemas_; + /** + * + * + *
+   * The data schemas from the specified corpus.
+   * 
+ * + * repeated .google.cloud.visionai.v1.DataSchema data_schemas = 1; + */ + @java.lang.Override + public java.util.List getDataSchemasList() { + return dataSchemas_; + } + /** + * + * + *
+   * The data schemas from the specified corpus.
+   * 
+ * + * repeated .google.cloud.visionai.v1.DataSchema data_schemas = 1; + */ + @java.lang.Override + public java.util.List + getDataSchemasOrBuilderList() { + return dataSchemas_; + } + /** + * + * + *
+   * The data schemas from the specified corpus.
+   * 
+ * + * repeated .google.cloud.visionai.v1.DataSchema data_schemas = 1; + */ + @java.lang.Override + public int getDataSchemasCount() { + return dataSchemas_.size(); + } + /** + * + * + *
+   * The data schemas from the specified corpus.
+   * 
+ * + * repeated .google.cloud.visionai.v1.DataSchema data_schemas = 1; + */ + @java.lang.Override + public com.google.cloud.visionai.v1.DataSchema getDataSchemas(int index) { + return dataSchemas_.get(index); + } + /** + * + * + *
+   * The data schemas from the specified corpus.
+   * 
+ * + * repeated .google.cloud.visionai.v1.DataSchema data_schemas = 1; + */ + @java.lang.Override + public com.google.cloud.visionai.v1.DataSchemaOrBuilder getDataSchemasOrBuilder(int index) { + return dataSchemas_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+   * A token, which can be sent as `page_token` to retrieve the next page.
+   * If this field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + 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(); + nextPageToken_ = s; + return s; + } + } + /** + * + * + *
+   * A token, which can be sent as `page_token` to retrieve the next page.
+   * If this field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = 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 { + for (int i = 0; i < dataSchemas_.size(); i++) { + output.writeMessage(1, dataSchemas_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < dataSchemas_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, dataSchemas_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + } + size += getUnknownFields().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.visionai.v1.ListDataSchemasResponse)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.ListDataSchemasResponse other = + (com.google.cloud.visionai.v1.ListDataSchemasResponse) obj; + + if (!getDataSchemasList().equals(other.getDataSchemasList())) return false; + if (!getNextPageToken().equals(other.getNextPageToken())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getDataSchemasCount() > 0) { + hash = (37 * hash) + DATA_SCHEMAS_FIELD_NUMBER; + hash = (53 * hash) + getDataSchemasList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.ListDataSchemasResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ListDataSchemasResponse 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.visionai.v1.ListDataSchemasResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ListDataSchemasResponse 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.visionai.v1.ListDataSchemasResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ListDataSchemasResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.ListDataSchemasResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ListDataSchemasResponse 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.visionai.v1.ListDataSchemasResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ListDataSchemasResponse 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.visionai.v1.ListDataSchemasResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ListDataSchemasResponse 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.visionai.v1.ListDataSchemasResponse 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; + } + /** + * + * + *
+   * Response message for ListDataSchemas.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.ListDataSchemasResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.ListDataSchemasResponse) + com.google.cloud.visionai.v1.ListDataSchemasResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_ListDataSchemasResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_ListDataSchemasResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.ListDataSchemasResponse.class, + com.google.cloud.visionai.v1.ListDataSchemasResponse.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.ListDataSchemasResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (dataSchemasBuilder_ == null) { + dataSchemas_ = java.util.Collections.emptyList(); + } else { + dataSchemas_ = null; + dataSchemasBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + nextPageToken_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_ListDataSchemasResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ListDataSchemasResponse getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.ListDataSchemasResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ListDataSchemasResponse build() { + com.google.cloud.visionai.v1.ListDataSchemasResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ListDataSchemasResponse buildPartial() { + com.google.cloud.visionai.v1.ListDataSchemasResponse result = + new com.google.cloud.visionai.v1.ListDataSchemasResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.visionai.v1.ListDataSchemasResponse result) { + if (dataSchemasBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + dataSchemas_ = java.util.Collections.unmodifiableList(dataSchemas_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.dataSchemas_ = dataSchemas_; + } else { + result.dataSchemas_ = dataSchemasBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.visionai.v1.ListDataSchemasResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.nextPageToken_ = nextPageToken_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.ListDataSchemasResponse) { + return mergeFrom((com.google.cloud.visionai.v1.ListDataSchemasResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.ListDataSchemasResponse other) { + if (other == com.google.cloud.visionai.v1.ListDataSchemasResponse.getDefaultInstance()) + return this; + if (dataSchemasBuilder_ == null) { + if (!other.dataSchemas_.isEmpty()) { + if (dataSchemas_.isEmpty()) { + dataSchemas_ = other.dataSchemas_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureDataSchemasIsMutable(); + dataSchemas_.addAll(other.dataSchemas_); + } + onChanged(); + } + } else { + if (!other.dataSchemas_.isEmpty()) { + if (dataSchemasBuilder_.isEmpty()) { + dataSchemasBuilder_.dispose(); + dataSchemasBuilder_ = null; + dataSchemas_ = other.dataSchemas_; + bitField0_ = (bitField0_ & ~0x00000001); + dataSchemasBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getDataSchemasFieldBuilder() + : null; + } else { + dataSchemasBuilder_.addAllMessages(other.dataSchemas_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.visionai.v1.DataSchema m = + input.readMessage( + com.google.cloud.visionai.v1.DataSchema.parser(), extensionRegistry); + if (dataSchemasBuilder_ == null) { + ensureDataSchemasIsMutable(); + dataSchemas_.add(m); + } else { + dataSchemasBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List dataSchemas_ = + java.util.Collections.emptyList(); + + private void ensureDataSchemasIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + dataSchemas_ = + new java.util.ArrayList(dataSchemas_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.visionai.v1.DataSchema, + com.google.cloud.visionai.v1.DataSchema.Builder, + com.google.cloud.visionai.v1.DataSchemaOrBuilder> + dataSchemasBuilder_; + + /** + * + * + *
+     * The data schemas from the specified corpus.
+     * 
+ * + * repeated .google.cloud.visionai.v1.DataSchema data_schemas = 1; + */ + public java.util.List getDataSchemasList() { + if (dataSchemasBuilder_ == null) { + return java.util.Collections.unmodifiableList(dataSchemas_); + } else { + return dataSchemasBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * The data schemas from the specified corpus.
+     * 
+ * + * repeated .google.cloud.visionai.v1.DataSchema data_schemas = 1; + */ + public int getDataSchemasCount() { + if (dataSchemasBuilder_ == null) { + return dataSchemas_.size(); + } else { + return dataSchemasBuilder_.getCount(); + } + } + /** + * + * + *
+     * The data schemas from the specified corpus.
+     * 
+ * + * repeated .google.cloud.visionai.v1.DataSchema data_schemas = 1; + */ + public com.google.cloud.visionai.v1.DataSchema getDataSchemas(int index) { + if (dataSchemasBuilder_ == null) { + return dataSchemas_.get(index); + } else { + return dataSchemasBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * The data schemas from the specified corpus.
+     * 
+ * + * repeated .google.cloud.visionai.v1.DataSchema data_schemas = 1; + */ + public Builder setDataSchemas(int index, com.google.cloud.visionai.v1.DataSchema value) { + if (dataSchemasBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDataSchemasIsMutable(); + dataSchemas_.set(index, value); + onChanged(); + } else { + dataSchemasBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The data schemas from the specified corpus.
+     * 
+ * + * repeated .google.cloud.visionai.v1.DataSchema data_schemas = 1; + */ + public Builder setDataSchemas( + int index, com.google.cloud.visionai.v1.DataSchema.Builder builderForValue) { + if (dataSchemasBuilder_ == null) { + ensureDataSchemasIsMutable(); + dataSchemas_.set(index, builderForValue.build()); + onChanged(); + } else { + dataSchemasBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The data schemas from the specified corpus.
+     * 
+ * + * repeated .google.cloud.visionai.v1.DataSchema data_schemas = 1; + */ + public Builder addDataSchemas(com.google.cloud.visionai.v1.DataSchema value) { + if (dataSchemasBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDataSchemasIsMutable(); + dataSchemas_.add(value); + onChanged(); + } else { + dataSchemasBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * The data schemas from the specified corpus.
+     * 
+ * + * repeated .google.cloud.visionai.v1.DataSchema data_schemas = 1; + */ + public Builder addDataSchemas(int index, com.google.cloud.visionai.v1.DataSchema value) { + if (dataSchemasBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDataSchemasIsMutable(); + dataSchemas_.add(index, value); + onChanged(); + } else { + dataSchemasBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The data schemas from the specified corpus.
+     * 
+ * + * repeated .google.cloud.visionai.v1.DataSchema data_schemas = 1; + */ + public Builder addDataSchemas(com.google.cloud.visionai.v1.DataSchema.Builder builderForValue) { + if (dataSchemasBuilder_ == null) { + ensureDataSchemasIsMutable(); + dataSchemas_.add(builderForValue.build()); + onChanged(); + } else { + dataSchemasBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The data schemas from the specified corpus.
+     * 
+ * + * repeated .google.cloud.visionai.v1.DataSchema data_schemas = 1; + */ + public Builder addDataSchemas( + int index, com.google.cloud.visionai.v1.DataSchema.Builder builderForValue) { + if (dataSchemasBuilder_ == null) { + ensureDataSchemasIsMutable(); + dataSchemas_.add(index, builderForValue.build()); + onChanged(); + } else { + dataSchemasBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The data schemas from the specified corpus.
+     * 
+ * + * repeated .google.cloud.visionai.v1.DataSchema data_schemas = 1; + */ + public Builder addAllDataSchemas( + java.lang.Iterable values) { + if (dataSchemasBuilder_ == null) { + ensureDataSchemasIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, dataSchemas_); + onChanged(); + } else { + dataSchemasBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * The data schemas from the specified corpus.
+     * 
+ * + * repeated .google.cloud.visionai.v1.DataSchema data_schemas = 1; + */ + public Builder clearDataSchemas() { + if (dataSchemasBuilder_ == null) { + dataSchemas_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + dataSchemasBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The data schemas from the specified corpus.
+     * 
+ * + * repeated .google.cloud.visionai.v1.DataSchema data_schemas = 1; + */ + public Builder removeDataSchemas(int index) { + if (dataSchemasBuilder_ == null) { + ensureDataSchemasIsMutable(); + dataSchemas_.remove(index); + onChanged(); + } else { + dataSchemasBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * The data schemas from the specified corpus.
+     * 
+ * + * repeated .google.cloud.visionai.v1.DataSchema data_schemas = 1; + */ + public com.google.cloud.visionai.v1.DataSchema.Builder getDataSchemasBuilder(int index) { + return getDataSchemasFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * The data schemas from the specified corpus.
+     * 
+ * + * repeated .google.cloud.visionai.v1.DataSchema data_schemas = 1; + */ + public com.google.cloud.visionai.v1.DataSchemaOrBuilder getDataSchemasOrBuilder(int index) { + if (dataSchemasBuilder_ == null) { + return dataSchemas_.get(index); + } else { + return dataSchemasBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * The data schemas from the specified corpus.
+     * 
+ * + * repeated .google.cloud.visionai.v1.DataSchema data_schemas = 1; + */ + public java.util.List + getDataSchemasOrBuilderList() { + if (dataSchemasBuilder_ != null) { + return dataSchemasBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(dataSchemas_); + } + } + /** + * + * + *
+     * The data schemas from the specified corpus.
+     * 
+ * + * repeated .google.cloud.visionai.v1.DataSchema data_schemas = 1; + */ + public com.google.cloud.visionai.v1.DataSchema.Builder addDataSchemasBuilder() { + return getDataSchemasFieldBuilder() + .addBuilder(com.google.cloud.visionai.v1.DataSchema.getDefaultInstance()); + } + /** + * + * + *
+     * The data schemas from the specified corpus.
+     * 
+ * + * repeated .google.cloud.visionai.v1.DataSchema data_schemas = 1; + */ + public com.google.cloud.visionai.v1.DataSchema.Builder addDataSchemasBuilder(int index) { + return getDataSchemasFieldBuilder() + .addBuilder(index, com.google.cloud.visionai.v1.DataSchema.getDefaultInstance()); + } + /** + * + * + *
+     * The data schemas from the specified corpus.
+     * 
+ * + * repeated .google.cloud.visionai.v1.DataSchema data_schemas = 1; + */ + public java.util.List + getDataSchemasBuilderList() { + return getDataSchemasFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.visionai.v1.DataSchema, + com.google.cloud.visionai.v1.DataSchema.Builder, + com.google.cloud.visionai.v1.DataSchemaOrBuilder> + getDataSchemasFieldBuilder() { + if (dataSchemasBuilder_ == null) { + dataSchemasBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.visionai.v1.DataSchema, + com.google.cloud.visionai.v1.DataSchema.Builder, + com.google.cloud.visionai.v1.DataSchemaOrBuilder>( + dataSchemas_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + dataSchemas_ = null; + } + return dataSchemasBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+     * A token, which can be sent as `page_token` to retrieve the next page.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A token, which can be sent as `page_token` to retrieve the next page.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A token, which can be sent as `page_token` to retrieve the next page.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * A token, which can be sent as `page_token` to retrieve the next page.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + nextPageToken_ = getDefaultInstance().getNextPageToken(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * A token, which can be sent as `page_token` to retrieve the next page.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.ListDataSchemasResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.ListDataSchemasResponse) + private static final com.google.cloud.visionai.v1.ListDataSchemasResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.ListDataSchemasResponse(); + } + + public static com.google.cloud.visionai.v1.ListDataSchemasResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListDataSchemasResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.ListDataSchemasResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListDataSchemasResponseOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListDataSchemasResponseOrBuilder.java new file mode 100644 index 000000000000..07d0df784a81 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListDataSchemasResponseOrBuilder.java @@ -0,0 +1,105 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/warehouse.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface ListDataSchemasResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.ListDataSchemasResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The data schemas from the specified corpus.
+   * 
+ * + * repeated .google.cloud.visionai.v1.DataSchema data_schemas = 1; + */ + java.util.List getDataSchemasList(); + /** + * + * + *
+   * The data schemas from the specified corpus.
+   * 
+ * + * repeated .google.cloud.visionai.v1.DataSchema data_schemas = 1; + */ + com.google.cloud.visionai.v1.DataSchema getDataSchemas(int index); + /** + * + * + *
+   * The data schemas from the specified corpus.
+   * 
+ * + * repeated .google.cloud.visionai.v1.DataSchema data_schemas = 1; + */ + int getDataSchemasCount(); + /** + * + * + *
+   * The data schemas from the specified corpus.
+   * 
+ * + * repeated .google.cloud.visionai.v1.DataSchema data_schemas = 1; + */ + java.util.List + getDataSchemasOrBuilderList(); + /** + * + * + *
+   * The data schemas from the specified corpus.
+   * 
+ * + * repeated .google.cloud.visionai.v1.DataSchema data_schemas = 1; + */ + com.google.cloud.visionai.v1.DataSchemaOrBuilder getDataSchemasOrBuilder(int index); + + /** + * + * + *
+   * A token, which can be sent as `page_token` to retrieve the next page.
+   * If this field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + * + * + *
+   * A token, which can be sent as `page_token` to retrieve the next page.
+   * If this field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListDraftsRequest.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListDraftsRequest.java new file mode 100644 index 000000000000..32ef52f60cd8 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListDraftsRequest.java @@ -0,0 +1,1281 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/platform.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * Message for requesting list of Drafts.
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.ListDraftsRequest} + */ +public final class ListDraftsRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.ListDraftsRequest) + ListDraftsRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListDraftsRequest.newBuilder() to construct. + private ListDraftsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListDraftsRequest() { + parent_ = ""; + pageToken_ = ""; + filter_ = ""; + orderBy_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListDraftsRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_ListDraftsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_ListDraftsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.ListDraftsRequest.class, + com.google.cloud.visionai.v1.ListDraftsRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + /** + * + * + *
+   * Required. Parent value for ListDraftsRequest.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + 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(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Parent value for ListDraftsRequest.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 2; + private int pageSize_ = 0; + /** + * + * + *
+   * Requested page size. Server may return fewer items than requested.
+   * If unspecified, server will pick an appropriate default.
+   * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object pageToken_ = ""; + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + 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(); + pageToken_ = s; + return s; + } + } + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FILTER_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object filter_ = ""; + /** + * + * + *
+   * Filtering results.
+   * 
+ * + * string filter = 4; + * + * @return The filter. + */ + @java.lang.Override + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + 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(); + filter_ = s; + return s; + } + } + /** + * + * + *
+   * Filtering results.
+   * 
+ * + * string filter = 4; + * + * @return The bytes for filter. + */ + @java.lang.Override + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ORDER_BY_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object orderBy_ = ""; + /** + * + * + *
+   * Hint for how to order the results.
+   * 
+ * + * string order_by = 5; + * + * @return The orderBy. + */ + @java.lang.Override + public java.lang.String getOrderBy() { + java.lang.Object ref = orderBy_; + 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(); + orderBy_ = s; + return s; + } + } + /** + * + * + *
+   * Hint for how to order the results.
+   * 
+ * + * string order_by = 5; + * + * @return The bytes for orderBy. + */ + @java.lang.Override + public com.google.protobuf.ByteString getOrderByBytes() { + java.lang.Object ref = orderBy_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + orderBy_ = 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, filter_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(orderBy_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, orderBy_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, filter_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(orderBy_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, orderBy_); + } + size += getUnknownFields().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.visionai.v1.ListDraftsRequest)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.ListDraftsRequest other = + (com.google.cloud.visionai.v1.ListDraftsRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (!getFilter().equals(other.getFilter())) return false; + if (!getOrderBy().equals(other.getOrderBy())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + hash = (37 * hash) + FILTER_FIELD_NUMBER; + hash = (53 * hash) + getFilter().hashCode(); + hash = (37 * hash) + ORDER_BY_FIELD_NUMBER; + hash = (53 * hash) + getOrderBy().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.ListDraftsRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ListDraftsRequest 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.visionai.v1.ListDraftsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ListDraftsRequest 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.visionai.v1.ListDraftsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ListDraftsRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.ListDraftsRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ListDraftsRequest 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.visionai.v1.ListDraftsRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ListDraftsRequest 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.visionai.v1.ListDraftsRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ListDraftsRequest 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.visionai.v1.ListDraftsRequest 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; + } + /** + * + * + *
+   * Message for requesting list of Drafts.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.ListDraftsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.ListDraftsRequest) + com.google.cloud.visionai.v1.ListDraftsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_ListDraftsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_ListDraftsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.ListDraftsRequest.class, + com.google.cloud.visionai.v1.ListDraftsRequest.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.ListDraftsRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + pageSize_ = 0; + pageToken_ = ""; + filter_ = ""; + orderBy_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_ListDraftsRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ListDraftsRequest getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.ListDraftsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ListDraftsRequest build() { + com.google.cloud.visionai.v1.ListDraftsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ListDraftsRequest buildPartial() { + com.google.cloud.visionai.v1.ListDraftsRequest result = + new com.google.cloud.visionai.v1.ListDraftsRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.visionai.v1.ListDraftsRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.pageSize_ = pageSize_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.pageToken_ = pageToken_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.filter_ = filter_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.orderBy_ = orderBy_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.ListDraftsRequest) { + return mergeFrom((com.google.cloud.visionai.v1.ListDraftsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.ListDraftsRequest other) { + if (other == com.google.cloud.visionai.v1.ListDraftsRequest.getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getFilter().isEmpty()) { + filter_ = other.filter_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (!other.getOrderBy().isEmpty()) { + orderBy_ = other.orderBy_; + bitField0_ |= 0x00000010; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + pageSize_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + orderBy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 42 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. Parent value for ListDraftsRequest.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Parent value for ListDraftsRequest.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Parent value for ListDraftsRequest.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Parent value for ListDraftsRequest.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Parent value for ListDraftsRequest.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private int pageSize_; + /** + * + * + *
+     * Requested page size. Server may return fewer items than requested.
+     * If unspecified, server will pick an appropriate default.
+     * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + * + * + *
+     * Requested page size. Server may return fewer items than requested.
+     * If unspecified, server will pick an appropriate default.
+     * 
+ * + * int32 page_size = 2; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Requested page size. Server may return fewer items than requested.
+     * If unspecified, server will pick an appropriate default.
+     * 
+ * + * int32 page_size = 2; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + bitField0_ = (bitField0_ & ~0x00000002); + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string page_token = 3; + * + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + pageToken_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string page_token = 3; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + pageToken_ = getDefaultInstance().getPageToken(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string page_token = 3; + * + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + pageToken_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object filter_ = ""; + /** + * + * + *
+     * Filtering results.
+     * 
+ * + * string filter = 4; + * + * @return The filter. + */ + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Filtering results.
+     * 
+ * + * string filter = 4; + * + * @return The bytes for filter. + */ + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Filtering results.
+     * 
+ * + * string filter = 4; + * + * @param value The filter to set. + * @return This builder for chaining. + */ + public Builder setFilter(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + filter_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Filtering results.
+     * 
+ * + * string filter = 4; + * + * @return This builder for chaining. + */ + public Builder clearFilter() { + filter_ = getDefaultInstance().getFilter(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+     * Filtering results.
+     * 
+ * + * string filter = 4; + * + * @param value The bytes for filter to set. + * @return This builder for chaining. + */ + public Builder setFilterBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + filter_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private java.lang.Object orderBy_ = ""; + /** + * + * + *
+     * Hint for how to order the results.
+     * 
+ * + * string order_by = 5; + * + * @return The orderBy. + */ + public java.lang.String getOrderBy() { + java.lang.Object ref = orderBy_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + orderBy_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Hint for how to order the results.
+     * 
+ * + * string order_by = 5; + * + * @return The bytes for orderBy. + */ + public com.google.protobuf.ByteString getOrderByBytes() { + java.lang.Object ref = orderBy_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + orderBy_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Hint for how to order the results.
+     * 
+ * + * string order_by = 5; + * + * @param value The orderBy to set. + * @return This builder for chaining. + */ + public Builder setOrderBy(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + orderBy_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Hint for how to order the results.
+     * 
+ * + * string order_by = 5; + * + * @return This builder for chaining. + */ + public Builder clearOrderBy() { + orderBy_ = getDefaultInstance().getOrderBy(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + /** + * + * + *
+     * Hint for how to order the results.
+     * 
+ * + * string order_by = 5; + * + * @param value The bytes for orderBy to set. + * @return This builder for chaining. + */ + public Builder setOrderByBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + orderBy_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.ListDraftsRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.ListDraftsRequest) + private static final com.google.cloud.visionai.v1.ListDraftsRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.ListDraftsRequest(); + } + + public static com.google.cloud.visionai.v1.ListDraftsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListDraftsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.ListDraftsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListDraftsRequestOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListDraftsRequestOrBuilder.java new file mode 100644 index 000000000000..d12688dd1ce6 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListDraftsRequestOrBuilder.java @@ -0,0 +1,144 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/platform.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface ListDraftsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.ListDraftsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Parent value for ListDraftsRequest.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. Parent value for ListDraftsRequest.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Requested page size. Server may return fewer items than requested.
+   * If unspecified, server will pick an appropriate default.
+   * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); + + /** + * + * + *
+   * Filtering results.
+   * 
+ * + * string filter = 4; + * + * @return The filter. + */ + java.lang.String getFilter(); + /** + * + * + *
+   * Filtering results.
+   * 
+ * + * string filter = 4; + * + * @return The bytes for filter. + */ + com.google.protobuf.ByteString getFilterBytes(); + + /** + * + * + *
+   * Hint for how to order the results.
+   * 
+ * + * string order_by = 5; + * + * @return The orderBy. + */ + java.lang.String getOrderBy(); + /** + * + * + *
+   * Hint for how to order the results.
+   * 
+ * + * string order_by = 5; + * + * @return The bytes for orderBy. + */ + com.google.protobuf.ByteString getOrderByBytes(); +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListDraftsResponse.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListDraftsResponse.java new file mode 100644 index 000000000000..ab50e3e44b66 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListDraftsResponse.java @@ -0,0 +1,1394 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/platform.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * Message for response to listing Drafts.
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.ListDraftsResponse} + */ +public final class ListDraftsResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.ListDraftsResponse) + ListDraftsResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListDraftsResponse.newBuilder() to construct. + private ListDraftsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListDraftsResponse() { + drafts_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + unreachable_ = com.google.protobuf.LazyStringArrayList.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListDraftsResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_ListDraftsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_ListDraftsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.ListDraftsResponse.class, + com.google.cloud.visionai.v1.ListDraftsResponse.Builder.class); + } + + public static final int DRAFTS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List drafts_; + /** + * + * + *
+   * The list of Draft.
+   * 
+ * + * repeated .google.cloud.visionai.v1.Draft drafts = 1; + */ + @java.lang.Override + public java.util.List getDraftsList() { + return drafts_; + } + /** + * + * + *
+   * The list of Draft.
+   * 
+ * + * repeated .google.cloud.visionai.v1.Draft drafts = 1; + */ + @java.lang.Override + public java.util.List + getDraftsOrBuilderList() { + return drafts_; + } + /** + * + * + *
+   * The list of Draft.
+   * 
+ * + * repeated .google.cloud.visionai.v1.Draft drafts = 1; + */ + @java.lang.Override + public int getDraftsCount() { + return drafts_.size(); + } + /** + * + * + *
+   * The list of Draft.
+   * 
+ * + * repeated .google.cloud.visionai.v1.Draft drafts = 1; + */ + @java.lang.Override + public com.google.cloud.visionai.v1.Draft getDrafts(int index) { + return drafts_.get(index); + } + /** + * + * + *
+   * The list of Draft.
+   * 
+ * + * repeated .google.cloud.visionai.v1.Draft drafts = 1; + */ + @java.lang.Override + public com.google.cloud.visionai.v1.DraftOrBuilder getDraftsOrBuilder(int index) { + return drafts_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + 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(); + nextPageToken_ = s; + return s; + } + } + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int UNREACHABLE_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList unreachable_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @return A list containing the unreachable. + */ + public com.google.protobuf.ProtocolStringList getUnreachableList() { + return unreachable_; + } + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @return The count of unreachable. + */ + public int getUnreachableCount() { + return unreachable_.size(); + } + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + public java.lang.String getUnreachable(int index) { + return unreachable_.get(index); + } + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the value to return. + * @return The bytes of the unreachable at the given index. + */ + public com.google.protobuf.ByteString getUnreachableBytes(int index) { + return unreachable_.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 < drafts_.size(); i++) { + output.writeMessage(1, drafts_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + } + for (int i = 0; i < unreachable_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, unreachable_.getRaw(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < drafts_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, drafts_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + } + { + int dataSize = 0; + for (int i = 0; i < unreachable_.size(); i++) { + dataSize += computeStringSizeNoTag(unreachable_.getRaw(i)); + } + size += dataSize; + size += 1 * getUnreachableList().size(); + } + size += getUnknownFields().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.visionai.v1.ListDraftsResponse)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.ListDraftsResponse other = + (com.google.cloud.visionai.v1.ListDraftsResponse) obj; + + if (!getDraftsList().equals(other.getDraftsList())) return false; + if (!getNextPageToken().equals(other.getNextPageToken())) return false; + if (!getUnreachableList().equals(other.getUnreachableList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getDraftsCount() > 0) { + hash = (37 * hash) + DRAFTS_FIELD_NUMBER; + hash = (53 * hash) + getDraftsList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + if (getUnreachableCount() > 0) { + hash = (37 * hash) + UNREACHABLE_FIELD_NUMBER; + hash = (53 * hash) + getUnreachableList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.ListDraftsResponse parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ListDraftsResponse 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.visionai.v1.ListDraftsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ListDraftsResponse 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.visionai.v1.ListDraftsResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ListDraftsResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.ListDraftsResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ListDraftsResponse 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.visionai.v1.ListDraftsResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ListDraftsResponse 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.visionai.v1.ListDraftsResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ListDraftsResponse 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.visionai.v1.ListDraftsResponse 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; + } + /** + * + * + *
+   * Message for response to listing Drafts.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.ListDraftsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.ListDraftsResponse) + com.google.cloud.visionai.v1.ListDraftsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_ListDraftsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_ListDraftsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.ListDraftsResponse.class, + com.google.cloud.visionai.v1.ListDraftsResponse.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.ListDraftsResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (draftsBuilder_ == null) { + drafts_ = java.util.Collections.emptyList(); + } else { + drafts_ = null; + draftsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + nextPageToken_ = ""; + unreachable_ = com.google.protobuf.LazyStringArrayList.emptyList(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_ListDraftsResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ListDraftsResponse getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.ListDraftsResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ListDraftsResponse build() { + com.google.cloud.visionai.v1.ListDraftsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ListDraftsResponse buildPartial() { + com.google.cloud.visionai.v1.ListDraftsResponse result = + new com.google.cloud.visionai.v1.ListDraftsResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.visionai.v1.ListDraftsResponse result) { + if (draftsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + drafts_ = java.util.Collections.unmodifiableList(drafts_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.drafts_ = drafts_; + } else { + result.drafts_ = draftsBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.visionai.v1.ListDraftsResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.nextPageToken_ = nextPageToken_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + unreachable_.makeImmutable(); + result.unreachable_ = unreachable_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.ListDraftsResponse) { + return mergeFrom((com.google.cloud.visionai.v1.ListDraftsResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.ListDraftsResponse other) { + if (other == com.google.cloud.visionai.v1.ListDraftsResponse.getDefaultInstance()) + return this; + if (draftsBuilder_ == null) { + if (!other.drafts_.isEmpty()) { + if (drafts_.isEmpty()) { + drafts_ = other.drafts_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureDraftsIsMutable(); + drafts_.addAll(other.drafts_); + } + onChanged(); + } + } else { + if (!other.drafts_.isEmpty()) { + if (draftsBuilder_.isEmpty()) { + draftsBuilder_.dispose(); + draftsBuilder_ = null; + drafts_ = other.drafts_; + bitField0_ = (bitField0_ & ~0x00000001); + draftsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getDraftsFieldBuilder() + : null; + } else { + draftsBuilder_.addAllMessages(other.drafts_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.unreachable_.isEmpty()) { + if (unreachable_.isEmpty()) { + unreachable_ = other.unreachable_; + bitField0_ |= 0x00000004; + } else { + ensureUnreachableIsMutable(); + unreachable_.addAll(other.unreachable_); + } + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.visionai.v1.Draft m = + input.readMessage( + com.google.cloud.visionai.v1.Draft.parser(), extensionRegistry); + if (draftsBuilder_ == null) { + ensureDraftsIsMutable(); + drafts_.add(m); + } else { + draftsBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureUnreachableIsMutable(); + unreachable_.add(s); + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List drafts_ = + java.util.Collections.emptyList(); + + private void ensureDraftsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + drafts_ = new java.util.ArrayList(drafts_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.visionai.v1.Draft, + com.google.cloud.visionai.v1.Draft.Builder, + com.google.cloud.visionai.v1.DraftOrBuilder> + draftsBuilder_; + + /** + * + * + *
+     * The list of Draft.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Draft drafts = 1; + */ + public java.util.List getDraftsList() { + if (draftsBuilder_ == null) { + return java.util.Collections.unmodifiableList(drafts_); + } else { + return draftsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * The list of Draft.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Draft drafts = 1; + */ + public int getDraftsCount() { + if (draftsBuilder_ == null) { + return drafts_.size(); + } else { + return draftsBuilder_.getCount(); + } + } + /** + * + * + *
+     * The list of Draft.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Draft drafts = 1; + */ + public com.google.cloud.visionai.v1.Draft getDrafts(int index) { + if (draftsBuilder_ == null) { + return drafts_.get(index); + } else { + return draftsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * The list of Draft.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Draft drafts = 1; + */ + public Builder setDrafts(int index, com.google.cloud.visionai.v1.Draft value) { + if (draftsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDraftsIsMutable(); + drafts_.set(index, value); + onChanged(); + } else { + draftsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The list of Draft.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Draft drafts = 1; + */ + public Builder setDrafts( + int index, com.google.cloud.visionai.v1.Draft.Builder builderForValue) { + if (draftsBuilder_ == null) { + ensureDraftsIsMutable(); + drafts_.set(index, builderForValue.build()); + onChanged(); + } else { + draftsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of Draft.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Draft drafts = 1; + */ + public Builder addDrafts(com.google.cloud.visionai.v1.Draft value) { + if (draftsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDraftsIsMutable(); + drafts_.add(value); + onChanged(); + } else { + draftsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * The list of Draft.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Draft drafts = 1; + */ + public Builder addDrafts(int index, com.google.cloud.visionai.v1.Draft value) { + if (draftsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDraftsIsMutable(); + drafts_.add(index, value); + onChanged(); + } else { + draftsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The list of Draft.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Draft drafts = 1; + */ + public Builder addDrafts(com.google.cloud.visionai.v1.Draft.Builder builderForValue) { + if (draftsBuilder_ == null) { + ensureDraftsIsMutable(); + drafts_.add(builderForValue.build()); + onChanged(); + } else { + draftsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of Draft.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Draft drafts = 1; + */ + public Builder addDrafts( + int index, com.google.cloud.visionai.v1.Draft.Builder builderForValue) { + if (draftsBuilder_ == null) { + ensureDraftsIsMutable(); + drafts_.add(index, builderForValue.build()); + onChanged(); + } else { + draftsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of Draft.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Draft drafts = 1; + */ + public Builder addAllDrafts( + java.lang.Iterable values) { + if (draftsBuilder_ == null) { + ensureDraftsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, drafts_); + onChanged(); + } else { + draftsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * The list of Draft.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Draft drafts = 1; + */ + public Builder clearDrafts() { + if (draftsBuilder_ == null) { + drafts_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + draftsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The list of Draft.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Draft drafts = 1; + */ + public Builder removeDrafts(int index) { + if (draftsBuilder_ == null) { + ensureDraftsIsMutable(); + drafts_.remove(index); + onChanged(); + } else { + draftsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * The list of Draft.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Draft drafts = 1; + */ + public com.google.cloud.visionai.v1.Draft.Builder getDraftsBuilder(int index) { + return getDraftsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * The list of Draft.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Draft drafts = 1; + */ + public com.google.cloud.visionai.v1.DraftOrBuilder getDraftsOrBuilder(int index) { + if (draftsBuilder_ == null) { + return drafts_.get(index); + } else { + return draftsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * The list of Draft.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Draft drafts = 1; + */ + public java.util.List + getDraftsOrBuilderList() { + if (draftsBuilder_ != null) { + return draftsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(drafts_); + } + } + /** + * + * + *
+     * The list of Draft.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Draft drafts = 1; + */ + public com.google.cloud.visionai.v1.Draft.Builder addDraftsBuilder() { + return getDraftsFieldBuilder() + .addBuilder(com.google.cloud.visionai.v1.Draft.getDefaultInstance()); + } + /** + * + * + *
+     * The list of Draft.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Draft drafts = 1; + */ + public com.google.cloud.visionai.v1.Draft.Builder addDraftsBuilder(int index) { + return getDraftsFieldBuilder() + .addBuilder(index, com.google.cloud.visionai.v1.Draft.getDefaultInstance()); + } + /** + * + * + *
+     * The list of Draft.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Draft drafts = 1; + */ + public java.util.List getDraftsBuilderList() { + return getDraftsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.visionai.v1.Draft, + com.google.cloud.visionai.v1.Draft.Builder, + com.google.cloud.visionai.v1.DraftOrBuilder> + getDraftsFieldBuilder() { + if (draftsBuilder_ == null) { + draftsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.visionai.v1.Draft, + com.google.cloud.visionai.v1.Draft.Builder, + com.google.cloud.visionai.v1.DraftOrBuilder>( + drafts_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + drafts_ = null; + } + return draftsBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + nextPageToken_ = getDefaultInstance().getNextPageToken(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList unreachable_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureUnreachableIsMutable() { + if (!unreachable_.isModifiable()) { + unreachable_ = new com.google.protobuf.LazyStringArrayList(unreachable_); + } + bitField0_ |= 0x00000004; + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @return A list containing the unreachable. + */ + public com.google.protobuf.ProtocolStringList getUnreachableList() { + unreachable_.makeImmutable(); + return unreachable_; + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @return The count of unreachable. + */ + public int getUnreachableCount() { + return unreachable_.size(); + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + public java.lang.String getUnreachable(int index) { + return unreachable_.get(index); + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the value to return. + * @return The bytes of the unreachable at the given index. + */ + public com.google.protobuf.ByteString getUnreachableBytes(int index) { + return unreachable_.getByteString(index); + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param index The index to set the value at. + * @param value The unreachable to set. + * @return This builder for chaining. + */ + public Builder setUnreachable(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureUnreachableIsMutable(); + unreachable_.set(index, value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param value The unreachable to add. + * @return This builder for chaining. + */ + public Builder addUnreachable(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureUnreachableIsMutable(); + unreachable_.add(value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param values The unreachable to add. + * @return This builder for chaining. + */ + public Builder addAllUnreachable(java.lang.Iterable values) { + ensureUnreachableIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, unreachable_); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @return This builder for chaining. + */ + public Builder clearUnreachable() { + unreachable_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + ; + onChanged(); + return this; + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param value The bytes of the unreachable to add. + * @return This builder for chaining. + */ + public Builder addUnreachableBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureUnreachableIsMutable(); + unreachable_.add(value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.ListDraftsResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.ListDraftsResponse) + private static final com.google.cloud.visionai.v1.ListDraftsResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.ListDraftsResponse(); + } + + public static com.google.cloud.visionai.v1.ListDraftsResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListDraftsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.ListDraftsResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListDraftsResponseOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListDraftsResponseOrBuilder.java new file mode 100644 index 000000000000..16d4558c048e --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListDraftsResponseOrBuilder.java @@ -0,0 +1,153 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/platform.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface ListDraftsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.ListDraftsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The list of Draft.
+   * 
+ * + * repeated .google.cloud.visionai.v1.Draft drafts = 1; + */ + java.util.List getDraftsList(); + /** + * + * + *
+   * The list of Draft.
+   * 
+ * + * repeated .google.cloud.visionai.v1.Draft drafts = 1; + */ + com.google.cloud.visionai.v1.Draft getDrafts(int index); + /** + * + * + *
+   * The list of Draft.
+   * 
+ * + * repeated .google.cloud.visionai.v1.Draft drafts = 1; + */ + int getDraftsCount(); + /** + * + * + *
+   * The list of Draft.
+   * 
+ * + * repeated .google.cloud.visionai.v1.Draft drafts = 1; + */ + java.util.List getDraftsOrBuilderList(); + /** + * + * + *
+   * The list of Draft.
+   * 
+ * + * repeated .google.cloud.visionai.v1.Draft drafts = 1; + */ + com.google.cloud.visionai.v1.DraftOrBuilder getDraftsOrBuilder(int index); + + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); + + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @return A list containing the unreachable. + */ + java.util.List getUnreachableList(); + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @return The count of unreachable. + */ + int getUnreachableCount(); + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + java.lang.String getUnreachable(int index); + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the value to return. + * @return The bytes of the unreachable at the given index. + */ + com.google.protobuf.ByteString getUnreachableBytes(int index); +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListEventsRequest.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListEventsRequest.java new file mode 100644 index 000000000000..5b1bbf06fab0 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListEventsRequest.java @@ -0,0 +1,1281 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/streams_service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * Message for requesting list of Events.
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.ListEventsRequest} + */ +public final class ListEventsRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.ListEventsRequest) + ListEventsRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListEventsRequest.newBuilder() to construct. + private ListEventsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListEventsRequest() { + parent_ = ""; + pageToken_ = ""; + filter_ = ""; + orderBy_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListEventsRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.StreamsServiceProto + .internal_static_google_cloud_visionai_v1_ListEventsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.StreamsServiceProto + .internal_static_google_cloud_visionai_v1_ListEventsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.ListEventsRequest.class, + com.google.cloud.visionai.v1.ListEventsRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + /** + * + * + *
+   * Required. Parent value for ListEventsRequest.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + 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(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Parent value for ListEventsRequest.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 2; + private int pageSize_ = 0; + /** + * + * + *
+   * Requested page size. Server may return fewer items than requested.
+   * If unspecified, server will pick an appropriate default.
+   * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object pageToken_ = ""; + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + 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(); + pageToken_ = s; + return s; + } + } + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FILTER_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object filter_ = ""; + /** + * + * + *
+   * Filtering results.
+   * 
+ * + * string filter = 4; + * + * @return The filter. + */ + @java.lang.Override + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + 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(); + filter_ = s; + return s; + } + } + /** + * + * + *
+   * Filtering results.
+   * 
+ * + * string filter = 4; + * + * @return The bytes for filter. + */ + @java.lang.Override + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ORDER_BY_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object orderBy_ = ""; + /** + * + * + *
+   * Hint for how to order the results.
+   * 
+ * + * string order_by = 5; + * + * @return The orderBy. + */ + @java.lang.Override + public java.lang.String getOrderBy() { + java.lang.Object ref = orderBy_; + 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(); + orderBy_ = s; + return s; + } + } + /** + * + * + *
+   * Hint for how to order the results.
+   * 
+ * + * string order_by = 5; + * + * @return The bytes for orderBy. + */ + @java.lang.Override + public com.google.protobuf.ByteString getOrderByBytes() { + java.lang.Object ref = orderBy_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + orderBy_ = 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, filter_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(orderBy_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, orderBy_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, filter_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(orderBy_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, orderBy_); + } + size += getUnknownFields().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.visionai.v1.ListEventsRequest)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.ListEventsRequest other = + (com.google.cloud.visionai.v1.ListEventsRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (!getFilter().equals(other.getFilter())) return false; + if (!getOrderBy().equals(other.getOrderBy())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + hash = (37 * hash) + FILTER_FIELD_NUMBER; + hash = (53 * hash) + getFilter().hashCode(); + hash = (37 * hash) + ORDER_BY_FIELD_NUMBER; + hash = (53 * hash) + getOrderBy().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.ListEventsRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ListEventsRequest 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.visionai.v1.ListEventsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ListEventsRequest 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.visionai.v1.ListEventsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ListEventsRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.ListEventsRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ListEventsRequest 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.visionai.v1.ListEventsRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ListEventsRequest 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.visionai.v1.ListEventsRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ListEventsRequest 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.visionai.v1.ListEventsRequest 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; + } + /** + * + * + *
+   * Message for requesting list of Events.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.ListEventsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.ListEventsRequest) + com.google.cloud.visionai.v1.ListEventsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.StreamsServiceProto + .internal_static_google_cloud_visionai_v1_ListEventsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.StreamsServiceProto + .internal_static_google_cloud_visionai_v1_ListEventsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.ListEventsRequest.class, + com.google.cloud.visionai.v1.ListEventsRequest.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.ListEventsRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + pageSize_ = 0; + pageToken_ = ""; + filter_ = ""; + orderBy_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.StreamsServiceProto + .internal_static_google_cloud_visionai_v1_ListEventsRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ListEventsRequest getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.ListEventsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ListEventsRequest build() { + com.google.cloud.visionai.v1.ListEventsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ListEventsRequest buildPartial() { + com.google.cloud.visionai.v1.ListEventsRequest result = + new com.google.cloud.visionai.v1.ListEventsRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.visionai.v1.ListEventsRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.pageSize_ = pageSize_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.pageToken_ = pageToken_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.filter_ = filter_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.orderBy_ = orderBy_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.ListEventsRequest) { + return mergeFrom((com.google.cloud.visionai.v1.ListEventsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.ListEventsRequest other) { + if (other == com.google.cloud.visionai.v1.ListEventsRequest.getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getFilter().isEmpty()) { + filter_ = other.filter_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (!other.getOrderBy().isEmpty()) { + orderBy_ = other.orderBy_; + bitField0_ |= 0x00000010; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + pageSize_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + orderBy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 42 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. Parent value for ListEventsRequest.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Parent value for ListEventsRequest.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Parent value for ListEventsRequest.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Parent value for ListEventsRequest.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Parent value for ListEventsRequest.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private int pageSize_; + /** + * + * + *
+     * Requested page size. Server may return fewer items than requested.
+     * If unspecified, server will pick an appropriate default.
+     * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + * + * + *
+     * Requested page size. Server may return fewer items than requested.
+     * If unspecified, server will pick an appropriate default.
+     * 
+ * + * int32 page_size = 2; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Requested page size. Server may return fewer items than requested.
+     * If unspecified, server will pick an appropriate default.
+     * 
+ * + * int32 page_size = 2; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + bitField0_ = (bitField0_ & ~0x00000002); + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string page_token = 3; + * + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + pageToken_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string page_token = 3; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + pageToken_ = getDefaultInstance().getPageToken(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string page_token = 3; + * + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + pageToken_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object filter_ = ""; + /** + * + * + *
+     * Filtering results.
+     * 
+ * + * string filter = 4; + * + * @return The filter. + */ + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Filtering results.
+     * 
+ * + * string filter = 4; + * + * @return The bytes for filter. + */ + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Filtering results.
+     * 
+ * + * string filter = 4; + * + * @param value The filter to set. + * @return This builder for chaining. + */ + public Builder setFilter(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + filter_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Filtering results.
+     * 
+ * + * string filter = 4; + * + * @return This builder for chaining. + */ + public Builder clearFilter() { + filter_ = getDefaultInstance().getFilter(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+     * Filtering results.
+     * 
+ * + * string filter = 4; + * + * @param value The bytes for filter to set. + * @return This builder for chaining. + */ + public Builder setFilterBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + filter_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private java.lang.Object orderBy_ = ""; + /** + * + * + *
+     * Hint for how to order the results.
+     * 
+ * + * string order_by = 5; + * + * @return The orderBy. + */ + public java.lang.String getOrderBy() { + java.lang.Object ref = orderBy_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + orderBy_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Hint for how to order the results.
+     * 
+ * + * string order_by = 5; + * + * @return The bytes for orderBy. + */ + public com.google.protobuf.ByteString getOrderByBytes() { + java.lang.Object ref = orderBy_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + orderBy_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Hint for how to order the results.
+     * 
+ * + * string order_by = 5; + * + * @param value The orderBy to set. + * @return This builder for chaining. + */ + public Builder setOrderBy(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + orderBy_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Hint for how to order the results.
+     * 
+ * + * string order_by = 5; + * + * @return This builder for chaining. + */ + public Builder clearOrderBy() { + orderBy_ = getDefaultInstance().getOrderBy(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + /** + * + * + *
+     * Hint for how to order the results.
+     * 
+ * + * string order_by = 5; + * + * @param value The bytes for orderBy to set. + * @return This builder for chaining. + */ + public Builder setOrderByBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + orderBy_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.ListEventsRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.ListEventsRequest) + private static final com.google.cloud.visionai.v1.ListEventsRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.ListEventsRequest(); + } + + public static com.google.cloud.visionai.v1.ListEventsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListEventsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.ListEventsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListEventsRequestOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListEventsRequestOrBuilder.java new file mode 100644 index 000000000000..9f422f44c766 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListEventsRequestOrBuilder.java @@ -0,0 +1,144 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/streams_service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface ListEventsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.ListEventsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Parent value for ListEventsRequest.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. Parent value for ListEventsRequest.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Requested page size. Server may return fewer items than requested.
+   * If unspecified, server will pick an appropriate default.
+   * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); + + /** + * + * + *
+   * Filtering results.
+   * 
+ * + * string filter = 4; + * + * @return The filter. + */ + java.lang.String getFilter(); + /** + * + * + *
+   * Filtering results.
+   * 
+ * + * string filter = 4; + * + * @return The bytes for filter. + */ + com.google.protobuf.ByteString getFilterBytes(); + + /** + * + * + *
+   * Hint for how to order the results.
+   * 
+ * + * string order_by = 5; + * + * @return The orderBy. + */ + java.lang.String getOrderBy(); + /** + * + * + *
+   * Hint for how to order the results.
+   * 
+ * + * string order_by = 5; + * + * @return The bytes for orderBy. + */ + com.google.protobuf.ByteString getOrderByBytes(); +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListEventsResponse.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListEventsResponse.java new file mode 100644 index 000000000000..22ac38b3277b --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListEventsResponse.java @@ -0,0 +1,1394 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/streams_service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * Message for response to listing Events.
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.ListEventsResponse} + */ +public final class ListEventsResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.ListEventsResponse) + ListEventsResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListEventsResponse.newBuilder() to construct. + private ListEventsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListEventsResponse() { + events_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + unreachable_ = com.google.protobuf.LazyStringArrayList.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListEventsResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.StreamsServiceProto + .internal_static_google_cloud_visionai_v1_ListEventsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.StreamsServiceProto + .internal_static_google_cloud_visionai_v1_ListEventsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.ListEventsResponse.class, + com.google.cloud.visionai.v1.ListEventsResponse.Builder.class); + } + + public static final int EVENTS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List events_; + /** + * + * + *
+   * The list of Event.
+   * 
+ * + * repeated .google.cloud.visionai.v1.Event events = 1; + */ + @java.lang.Override + public java.util.List getEventsList() { + return events_; + } + /** + * + * + *
+   * The list of Event.
+   * 
+ * + * repeated .google.cloud.visionai.v1.Event events = 1; + */ + @java.lang.Override + public java.util.List + getEventsOrBuilderList() { + return events_; + } + /** + * + * + *
+   * The list of Event.
+   * 
+ * + * repeated .google.cloud.visionai.v1.Event events = 1; + */ + @java.lang.Override + public int getEventsCount() { + return events_.size(); + } + /** + * + * + *
+   * The list of Event.
+   * 
+ * + * repeated .google.cloud.visionai.v1.Event events = 1; + */ + @java.lang.Override + public com.google.cloud.visionai.v1.Event getEvents(int index) { + return events_.get(index); + } + /** + * + * + *
+   * The list of Event.
+   * 
+ * + * repeated .google.cloud.visionai.v1.Event events = 1; + */ + @java.lang.Override + public com.google.cloud.visionai.v1.EventOrBuilder getEventsOrBuilder(int index) { + return events_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + 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(); + nextPageToken_ = s; + return s; + } + } + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int UNREACHABLE_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList unreachable_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @return A list containing the unreachable. + */ + public com.google.protobuf.ProtocolStringList getUnreachableList() { + return unreachable_; + } + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @return The count of unreachable. + */ + public int getUnreachableCount() { + return unreachable_.size(); + } + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + public java.lang.String getUnreachable(int index) { + return unreachable_.get(index); + } + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the value to return. + * @return The bytes of the unreachable at the given index. + */ + public com.google.protobuf.ByteString getUnreachableBytes(int index) { + return unreachable_.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 < events_.size(); i++) { + output.writeMessage(1, events_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + } + for (int i = 0; i < unreachable_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, unreachable_.getRaw(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < events_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, events_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + } + { + int dataSize = 0; + for (int i = 0; i < unreachable_.size(); i++) { + dataSize += computeStringSizeNoTag(unreachable_.getRaw(i)); + } + size += dataSize; + size += 1 * getUnreachableList().size(); + } + size += getUnknownFields().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.visionai.v1.ListEventsResponse)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.ListEventsResponse other = + (com.google.cloud.visionai.v1.ListEventsResponse) obj; + + if (!getEventsList().equals(other.getEventsList())) return false; + if (!getNextPageToken().equals(other.getNextPageToken())) return false; + if (!getUnreachableList().equals(other.getUnreachableList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getEventsCount() > 0) { + hash = (37 * hash) + EVENTS_FIELD_NUMBER; + hash = (53 * hash) + getEventsList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + if (getUnreachableCount() > 0) { + hash = (37 * hash) + UNREACHABLE_FIELD_NUMBER; + hash = (53 * hash) + getUnreachableList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.ListEventsResponse parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ListEventsResponse 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.visionai.v1.ListEventsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ListEventsResponse 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.visionai.v1.ListEventsResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ListEventsResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.ListEventsResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ListEventsResponse 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.visionai.v1.ListEventsResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ListEventsResponse 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.visionai.v1.ListEventsResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ListEventsResponse 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.visionai.v1.ListEventsResponse 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; + } + /** + * + * + *
+   * Message for response to listing Events.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.ListEventsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.ListEventsResponse) + com.google.cloud.visionai.v1.ListEventsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.StreamsServiceProto + .internal_static_google_cloud_visionai_v1_ListEventsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.StreamsServiceProto + .internal_static_google_cloud_visionai_v1_ListEventsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.ListEventsResponse.class, + com.google.cloud.visionai.v1.ListEventsResponse.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.ListEventsResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (eventsBuilder_ == null) { + events_ = java.util.Collections.emptyList(); + } else { + events_ = null; + eventsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + nextPageToken_ = ""; + unreachable_ = com.google.protobuf.LazyStringArrayList.emptyList(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.StreamsServiceProto + .internal_static_google_cloud_visionai_v1_ListEventsResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ListEventsResponse getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.ListEventsResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ListEventsResponse build() { + com.google.cloud.visionai.v1.ListEventsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ListEventsResponse buildPartial() { + com.google.cloud.visionai.v1.ListEventsResponse result = + new com.google.cloud.visionai.v1.ListEventsResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.visionai.v1.ListEventsResponse result) { + if (eventsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + events_ = java.util.Collections.unmodifiableList(events_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.events_ = events_; + } else { + result.events_ = eventsBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.visionai.v1.ListEventsResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.nextPageToken_ = nextPageToken_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + unreachable_.makeImmutable(); + result.unreachable_ = unreachable_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.ListEventsResponse) { + return mergeFrom((com.google.cloud.visionai.v1.ListEventsResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.ListEventsResponse other) { + if (other == com.google.cloud.visionai.v1.ListEventsResponse.getDefaultInstance()) + return this; + if (eventsBuilder_ == null) { + if (!other.events_.isEmpty()) { + if (events_.isEmpty()) { + events_ = other.events_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureEventsIsMutable(); + events_.addAll(other.events_); + } + onChanged(); + } + } else { + if (!other.events_.isEmpty()) { + if (eventsBuilder_.isEmpty()) { + eventsBuilder_.dispose(); + eventsBuilder_ = null; + events_ = other.events_; + bitField0_ = (bitField0_ & ~0x00000001); + eventsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getEventsFieldBuilder() + : null; + } else { + eventsBuilder_.addAllMessages(other.events_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.unreachable_.isEmpty()) { + if (unreachable_.isEmpty()) { + unreachable_ = other.unreachable_; + bitField0_ |= 0x00000004; + } else { + ensureUnreachableIsMutable(); + unreachable_.addAll(other.unreachable_); + } + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.visionai.v1.Event m = + input.readMessage( + com.google.cloud.visionai.v1.Event.parser(), extensionRegistry); + if (eventsBuilder_ == null) { + ensureEventsIsMutable(); + events_.add(m); + } else { + eventsBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureUnreachableIsMutable(); + unreachable_.add(s); + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List events_ = + java.util.Collections.emptyList(); + + private void ensureEventsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + events_ = new java.util.ArrayList(events_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.visionai.v1.Event, + com.google.cloud.visionai.v1.Event.Builder, + com.google.cloud.visionai.v1.EventOrBuilder> + eventsBuilder_; + + /** + * + * + *
+     * The list of Event.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Event events = 1; + */ + public java.util.List getEventsList() { + if (eventsBuilder_ == null) { + return java.util.Collections.unmodifiableList(events_); + } else { + return eventsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * The list of Event.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Event events = 1; + */ + public int getEventsCount() { + if (eventsBuilder_ == null) { + return events_.size(); + } else { + return eventsBuilder_.getCount(); + } + } + /** + * + * + *
+     * The list of Event.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Event events = 1; + */ + public com.google.cloud.visionai.v1.Event getEvents(int index) { + if (eventsBuilder_ == null) { + return events_.get(index); + } else { + return eventsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * The list of Event.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Event events = 1; + */ + public Builder setEvents(int index, com.google.cloud.visionai.v1.Event value) { + if (eventsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureEventsIsMutable(); + events_.set(index, value); + onChanged(); + } else { + eventsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The list of Event.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Event events = 1; + */ + public Builder setEvents( + int index, com.google.cloud.visionai.v1.Event.Builder builderForValue) { + if (eventsBuilder_ == null) { + ensureEventsIsMutable(); + events_.set(index, builderForValue.build()); + onChanged(); + } else { + eventsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of Event.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Event events = 1; + */ + public Builder addEvents(com.google.cloud.visionai.v1.Event value) { + if (eventsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureEventsIsMutable(); + events_.add(value); + onChanged(); + } else { + eventsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * The list of Event.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Event events = 1; + */ + public Builder addEvents(int index, com.google.cloud.visionai.v1.Event value) { + if (eventsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureEventsIsMutable(); + events_.add(index, value); + onChanged(); + } else { + eventsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The list of Event.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Event events = 1; + */ + public Builder addEvents(com.google.cloud.visionai.v1.Event.Builder builderForValue) { + if (eventsBuilder_ == null) { + ensureEventsIsMutable(); + events_.add(builderForValue.build()); + onChanged(); + } else { + eventsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of Event.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Event events = 1; + */ + public Builder addEvents( + int index, com.google.cloud.visionai.v1.Event.Builder builderForValue) { + if (eventsBuilder_ == null) { + ensureEventsIsMutable(); + events_.add(index, builderForValue.build()); + onChanged(); + } else { + eventsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of Event.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Event events = 1; + */ + public Builder addAllEvents( + java.lang.Iterable values) { + if (eventsBuilder_ == null) { + ensureEventsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, events_); + onChanged(); + } else { + eventsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * The list of Event.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Event events = 1; + */ + public Builder clearEvents() { + if (eventsBuilder_ == null) { + events_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + eventsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The list of Event.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Event events = 1; + */ + public Builder removeEvents(int index) { + if (eventsBuilder_ == null) { + ensureEventsIsMutable(); + events_.remove(index); + onChanged(); + } else { + eventsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * The list of Event.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Event events = 1; + */ + public com.google.cloud.visionai.v1.Event.Builder getEventsBuilder(int index) { + return getEventsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * The list of Event.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Event events = 1; + */ + public com.google.cloud.visionai.v1.EventOrBuilder getEventsOrBuilder(int index) { + if (eventsBuilder_ == null) { + return events_.get(index); + } else { + return eventsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * The list of Event.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Event events = 1; + */ + public java.util.List + getEventsOrBuilderList() { + if (eventsBuilder_ != null) { + return eventsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(events_); + } + } + /** + * + * + *
+     * The list of Event.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Event events = 1; + */ + public com.google.cloud.visionai.v1.Event.Builder addEventsBuilder() { + return getEventsFieldBuilder() + .addBuilder(com.google.cloud.visionai.v1.Event.getDefaultInstance()); + } + /** + * + * + *
+     * The list of Event.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Event events = 1; + */ + public com.google.cloud.visionai.v1.Event.Builder addEventsBuilder(int index) { + return getEventsFieldBuilder() + .addBuilder(index, com.google.cloud.visionai.v1.Event.getDefaultInstance()); + } + /** + * + * + *
+     * The list of Event.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Event events = 1; + */ + public java.util.List getEventsBuilderList() { + return getEventsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.visionai.v1.Event, + com.google.cloud.visionai.v1.Event.Builder, + com.google.cloud.visionai.v1.EventOrBuilder> + getEventsFieldBuilder() { + if (eventsBuilder_ == null) { + eventsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.visionai.v1.Event, + com.google.cloud.visionai.v1.Event.Builder, + com.google.cloud.visionai.v1.EventOrBuilder>( + events_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + events_ = null; + } + return eventsBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + nextPageToken_ = getDefaultInstance().getNextPageToken(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList unreachable_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureUnreachableIsMutable() { + if (!unreachable_.isModifiable()) { + unreachable_ = new com.google.protobuf.LazyStringArrayList(unreachable_); + } + bitField0_ |= 0x00000004; + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @return A list containing the unreachable. + */ + public com.google.protobuf.ProtocolStringList getUnreachableList() { + unreachable_.makeImmutable(); + return unreachable_; + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @return The count of unreachable. + */ + public int getUnreachableCount() { + return unreachable_.size(); + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + public java.lang.String getUnreachable(int index) { + return unreachable_.get(index); + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the value to return. + * @return The bytes of the unreachable at the given index. + */ + public com.google.protobuf.ByteString getUnreachableBytes(int index) { + return unreachable_.getByteString(index); + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param index The index to set the value at. + * @param value The unreachable to set. + * @return This builder for chaining. + */ + public Builder setUnreachable(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureUnreachableIsMutable(); + unreachable_.set(index, value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param value The unreachable to add. + * @return This builder for chaining. + */ + public Builder addUnreachable(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureUnreachableIsMutable(); + unreachable_.add(value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param values The unreachable to add. + * @return This builder for chaining. + */ + public Builder addAllUnreachable(java.lang.Iterable values) { + ensureUnreachableIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, unreachable_); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @return This builder for chaining. + */ + public Builder clearUnreachable() { + unreachable_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + ; + onChanged(); + return this; + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param value The bytes of the unreachable to add. + * @return This builder for chaining. + */ + public Builder addUnreachableBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureUnreachableIsMutable(); + unreachable_.add(value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.ListEventsResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.ListEventsResponse) + private static final com.google.cloud.visionai.v1.ListEventsResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.ListEventsResponse(); + } + + public static com.google.cloud.visionai.v1.ListEventsResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListEventsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.ListEventsResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListEventsResponseOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListEventsResponseOrBuilder.java new file mode 100644 index 000000000000..f38cd2d95830 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListEventsResponseOrBuilder.java @@ -0,0 +1,153 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/streams_service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface ListEventsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.ListEventsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The list of Event.
+   * 
+ * + * repeated .google.cloud.visionai.v1.Event events = 1; + */ + java.util.List getEventsList(); + /** + * + * + *
+   * The list of Event.
+   * 
+ * + * repeated .google.cloud.visionai.v1.Event events = 1; + */ + com.google.cloud.visionai.v1.Event getEvents(int index); + /** + * + * + *
+   * The list of Event.
+   * 
+ * + * repeated .google.cloud.visionai.v1.Event events = 1; + */ + int getEventsCount(); + /** + * + * + *
+   * The list of Event.
+   * 
+ * + * repeated .google.cloud.visionai.v1.Event events = 1; + */ + java.util.List getEventsOrBuilderList(); + /** + * + * + *
+   * The list of Event.
+   * 
+ * + * repeated .google.cloud.visionai.v1.Event events = 1; + */ + com.google.cloud.visionai.v1.EventOrBuilder getEventsOrBuilder(int index); + + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); + + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @return A list containing the unreachable. + */ + java.util.List getUnreachableList(); + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @return The count of unreachable. + */ + int getUnreachableCount(); + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + java.lang.String getUnreachable(int index); + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the value to return. + * @return The bytes of the unreachable at the given index. + */ + com.google.protobuf.ByteString getUnreachableBytes(int index); +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListIndexEndpointsRequest.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListIndexEndpointsRequest.java new file mode 100644 index 000000000000..6aa5660b8b2d --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListIndexEndpointsRequest.java @@ -0,0 +1,1179 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/warehouse.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * Request message for ListIndexEndpoints.
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.ListIndexEndpointsRequest} + */ +public final class ListIndexEndpointsRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.ListIndexEndpointsRequest) + ListIndexEndpointsRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListIndexEndpointsRequest.newBuilder() to construct. + private ListIndexEndpointsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListIndexEndpointsRequest() { + parent_ = ""; + pageToken_ = ""; + filter_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListIndexEndpointsRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_ListIndexEndpointsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_ListIndexEndpointsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.ListIndexEndpointsRequest.class, + com.google.cloud.visionai.v1.ListIndexEndpointsRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + /** + * + * + *
+   * Required. Format: `projects/{project}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + 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(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Format: `projects/{project}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 2; + private int pageSize_ = 0; + /** + * + * + *
+   * Optional. Requested page size. Server may return fewer items than
+   * requested. The service may return fewer than this value. If unspecified, a
+   * page size of 50 will be used. The maximum value is 1000; values above 1000
+   * will be coerced to 1000.
+   * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object pageToken_ = ""; + /** + * + * + *
+   * Optional. A token identifying a page of results the server should return.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + 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(); + pageToken_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. A token identifying a page of results the server should return.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FILTER_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object filter_ = ""; + /** + * + * + *
+   * Optional. The filter applied to the returned list.
+   * We only support filtering for the `deployed_image_index.image_index` field.
+   * However, to filter by a corpus instead of an image index, simply use
+   * `deployed_image_index.corpus`, which will return all endpoints with
+   * `deployed_image_index.image_index` inside of the given corpus.
+   * A basic filter on image index would look like:
+   *   deployed_image_index.image_index =
+   *     "projects/123/locations/us-central1/corpora/my_corpus/imageIndexes/my_image_index"
+   * A basic filter on corpus would look like:
+   *   deployed_image_index.corpus =
+   *     "projects/123/locations/us-central1/corpora/my_corpus"
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The filter. + */ + @java.lang.Override + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + 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(); + filter_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. The filter applied to the returned list.
+   * We only support filtering for the `deployed_image_index.image_index` field.
+   * However, to filter by a corpus instead of an image index, simply use
+   * `deployed_image_index.corpus`, which will return all endpoints with
+   * `deployed_image_index.image_index` inside of the given corpus.
+   * A basic filter on image index would look like:
+   *   deployed_image_index.image_index =
+   *     "projects/123/locations/us-central1/corpora/my_corpus/imageIndexes/my_image_index"
+   * A basic filter on corpus would look like:
+   *   deployed_image_index.corpus =
+   *     "projects/123/locations/us-central1/corpora/my_corpus"
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for filter. + */ + @java.lang.Override + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, filter_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, filter_); + } + size += getUnknownFields().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.visionai.v1.ListIndexEndpointsRequest)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.ListIndexEndpointsRequest other = + (com.google.cloud.visionai.v1.ListIndexEndpointsRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (!getFilter().equals(other.getFilter())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + hash = (37 * hash) + FILTER_FIELD_NUMBER; + hash = (53 * hash) + getFilter().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.ListIndexEndpointsRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ListIndexEndpointsRequest 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.visionai.v1.ListIndexEndpointsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ListIndexEndpointsRequest 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.visionai.v1.ListIndexEndpointsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ListIndexEndpointsRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.ListIndexEndpointsRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ListIndexEndpointsRequest 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.visionai.v1.ListIndexEndpointsRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ListIndexEndpointsRequest 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.visionai.v1.ListIndexEndpointsRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ListIndexEndpointsRequest 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.visionai.v1.ListIndexEndpointsRequest 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; + } + /** + * + * + *
+   * Request message for ListIndexEndpoints.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.ListIndexEndpointsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.ListIndexEndpointsRequest) + com.google.cloud.visionai.v1.ListIndexEndpointsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_ListIndexEndpointsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_ListIndexEndpointsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.ListIndexEndpointsRequest.class, + com.google.cloud.visionai.v1.ListIndexEndpointsRequest.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.ListIndexEndpointsRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + pageSize_ = 0; + pageToken_ = ""; + filter_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_ListIndexEndpointsRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ListIndexEndpointsRequest getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.ListIndexEndpointsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ListIndexEndpointsRequest build() { + com.google.cloud.visionai.v1.ListIndexEndpointsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ListIndexEndpointsRequest buildPartial() { + com.google.cloud.visionai.v1.ListIndexEndpointsRequest result = + new com.google.cloud.visionai.v1.ListIndexEndpointsRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.visionai.v1.ListIndexEndpointsRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.pageSize_ = pageSize_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.pageToken_ = pageToken_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.filter_ = filter_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.ListIndexEndpointsRequest) { + return mergeFrom((com.google.cloud.visionai.v1.ListIndexEndpointsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.ListIndexEndpointsRequest other) { + if (other == com.google.cloud.visionai.v1.ListIndexEndpointsRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getFilter().isEmpty()) { + filter_ = other.filter_; + bitField0_ |= 0x00000008; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + pageSize_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. Format: `projects/{project}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Format: `projects/{project}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Format: `projects/{project}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Format: `projects/{project}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Format: `projects/{project}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private int pageSize_; + /** + * + * + *
+     * Optional. Requested page size. Server may return fewer items than
+     * requested. The service may return fewer than this value. If unspecified, a
+     * page size of 50 will be used. The maximum value is 1000; values above 1000
+     * will be coerced to 1000.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + * + * + *
+     * Optional. Requested page size. Server may return fewer items than
+     * requested. The service may return fewer than this value. If unspecified, a
+     * page size of 50 will be used. The maximum value is 1000; values above 1000
+     * will be coerced to 1000.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Requested page size. Server may return fewer items than
+     * requested. The service may return fewer than this value. If unspecified, a
+     * page size of 50 will be used. The maximum value is 1000; values above 1000
+     * will be coerced to 1000.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + bitField0_ = (bitField0_ & ~0x00000002); + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + * + * + *
+     * Optional. A token identifying a page of results the server should return.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. A token identifying a page of results the server should return.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. A token identifying a page of results the server should return.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + pageToken_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. A token identifying a page of results the server should return.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + pageToken_ = getDefaultInstance().getPageToken(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. A token identifying a page of results the server should return.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + pageToken_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object filter_ = ""; + /** + * + * + *
+     * Optional. The filter applied to the returned list.
+     * We only support filtering for the `deployed_image_index.image_index` field.
+     * However, to filter by a corpus instead of an image index, simply use
+     * `deployed_image_index.corpus`, which will return all endpoints with
+     * `deployed_image_index.image_index` inside of the given corpus.
+     * A basic filter on image index would look like:
+     *   deployed_image_index.image_index =
+     *     "projects/123/locations/us-central1/corpora/my_corpus/imageIndexes/my_image_index"
+     * A basic filter on corpus would look like:
+     *   deployed_image_index.corpus =
+     *     "projects/123/locations/us-central1/corpora/my_corpus"
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The filter. + */ + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. The filter applied to the returned list.
+     * We only support filtering for the `deployed_image_index.image_index` field.
+     * However, to filter by a corpus instead of an image index, simply use
+     * `deployed_image_index.corpus`, which will return all endpoints with
+     * `deployed_image_index.image_index` inside of the given corpus.
+     * A basic filter on image index would look like:
+     *   deployed_image_index.image_index =
+     *     "projects/123/locations/us-central1/corpora/my_corpus/imageIndexes/my_image_index"
+     * A basic filter on corpus would look like:
+     *   deployed_image_index.corpus =
+     *     "projects/123/locations/us-central1/corpora/my_corpus"
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for filter. + */ + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. The filter applied to the returned list.
+     * We only support filtering for the `deployed_image_index.image_index` field.
+     * However, to filter by a corpus instead of an image index, simply use
+     * `deployed_image_index.corpus`, which will return all endpoints with
+     * `deployed_image_index.image_index` inside of the given corpus.
+     * A basic filter on image index would look like:
+     *   deployed_image_index.image_index =
+     *     "projects/123/locations/us-central1/corpora/my_corpus/imageIndexes/my_image_index"
+     * A basic filter on corpus would look like:
+     *   deployed_image_index.corpus =
+     *     "projects/123/locations/us-central1/corpora/my_corpus"
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The filter to set. + * @return This builder for chaining. + */ + public Builder setFilter(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + filter_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The filter applied to the returned list.
+     * We only support filtering for the `deployed_image_index.image_index` field.
+     * However, to filter by a corpus instead of an image index, simply use
+     * `deployed_image_index.corpus`, which will return all endpoints with
+     * `deployed_image_index.image_index` inside of the given corpus.
+     * A basic filter on image index would look like:
+     *   deployed_image_index.image_index =
+     *     "projects/123/locations/us-central1/corpora/my_corpus/imageIndexes/my_image_index"
+     * A basic filter on corpus would look like:
+     *   deployed_image_index.corpus =
+     *     "projects/123/locations/us-central1/corpora/my_corpus"
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearFilter() { + filter_ = getDefaultInstance().getFilter(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The filter applied to the returned list.
+     * We only support filtering for the `deployed_image_index.image_index` field.
+     * However, to filter by a corpus instead of an image index, simply use
+     * `deployed_image_index.corpus`, which will return all endpoints with
+     * `deployed_image_index.image_index` inside of the given corpus.
+     * A basic filter on image index would look like:
+     *   deployed_image_index.image_index =
+     *     "projects/123/locations/us-central1/corpora/my_corpus/imageIndexes/my_image_index"
+     * A basic filter on corpus would look like:
+     *   deployed_image_index.corpus =
+     *     "projects/123/locations/us-central1/corpora/my_corpus"
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for filter to set. + * @return This builder for chaining. + */ + public Builder setFilterBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + filter_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.ListIndexEndpointsRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.ListIndexEndpointsRequest) + private static final com.google.cloud.visionai.v1.ListIndexEndpointsRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.ListIndexEndpointsRequest(); + } + + public static com.google.cloud.visionai.v1.ListIndexEndpointsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListIndexEndpointsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.ListIndexEndpointsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListIndexEndpointsRequestOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListIndexEndpointsRequestOrBuilder.java new file mode 100644 index 000000000000..86db2324f4cb --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListIndexEndpointsRequestOrBuilder.java @@ -0,0 +1,141 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/warehouse.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface ListIndexEndpointsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.ListIndexEndpointsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Format: `projects/{project}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. Format: `projects/{project}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Optional. Requested page size. Server may return fewer items than
+   * requested. The service may return fewer than this value. If unspecified, a
+   * page size of 50 will be used. The maximum value is 1000; values above 1000
+   * will be coerced to 1000.
+   * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * Optional. A token identifying a page of results the server should return.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + * + * + *
+   * Optional. A token identifying a page of results the server should return.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); + + /** + * + * + *
+   * Optional. The filter applied to the returned list.
+   * We only support filtering for the `deployed_image_index.image_index` field.
+   * However, to filter by a corpus instead of an image index, simply use
+   * `deployed_image_index.corpus`, which will return all endpoints with
+   * `deployed_image_index.image_index` inside of the given corpus.
+   * A basic filter on image index would look like:
+   *   deployed_image_index.image_index =
+   *     "projects/123/locations/us-central1/corpora/my_corpus/imageIndexes/my_image_index"
+   * A basic filter on corpus would look like:
+   *   deployed_image_index.corpus =
+   *     "projects/123/locations/us-central1/corpora/my_corpus"
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The filter. + */ + java.lang.String getFilter(); + /** + * + * + *
+   * Optional. The filter applied to the returned list.
+   * We only support filtering for the `deployed_image_index.image_index` field.
+   * However, to filter by a corpus instead of an image index, simply use
+   * `deployed_image_index.corpus`, which will return all endpoints with
+   * `deployed_image_index.image_index` inside of the given corpus.
+   * A basic filter on image index would look like:
+   *   deployed_image_index.image_index =
+   *     "projects/123/locations/us-central1/corpora/my_corpus/imageIndexes/my_image_index"
+   * A basic filter on corpus would look like:
+   *   deployed_image_index.corpus =
+   *     "projects/123/locations/us-central1/corpora/my_corpus"
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for filter. + */ + com.google.protobuf.ByteString getFilterBytes(); +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListIndexEndpointsResponse.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListIndexEndpointsResponse.java new file mode 100644 index 000000000000..0ade9479fe91 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListIndexEndpointsResponse.java @@ -0,0 +1,1125 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/warehouse.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * Response message for ListIndexEndpoints.
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.ListIndexEndpointsResponse} + */ +public final class ListIndexEndpointsResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.ListIndexEndpointsResponse) + ListIndexEndpointsResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListIndexEndpointsResponse.newBuilder() to construct. + private ListIndexEndpointsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListIndexEndpointsResponse() { + indexEndpoints_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListIndexEndpointsResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_ListIndexEndpointsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_ListIndexEndpointsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.ListIndexEndpointsResponse.class, + com.google.cloud.visionai.v1.ListIndexEndpointsResponse.Builder.class); + } + + public static final int INDEX_ENDPOINTS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List indexEndpoints_; + /** + * + * + *
+   * The list of IndexEndpoints.
+   * 
+ * + * repeated .google.cloud.visionai.v1.IndexEndpoint index_endpoints = 1; + */ + @java.lang.Override + public java.util.List getIndexEndpointsList() { + return indexEndpoints_; + } + /** + * + * + *
+   * The list of IndexEndpoints.
+   * 
+ * + * repeated .google.cloud.visionai.v1.IndexEndpoint index_endpoints = 1; + */ + @java.lang.Override + public java.util.List + getIndexEndpointsOrBuilderList() { + return indexEndpoints_; + } + /** + * + * + *
+   * The list of IndexEndpoints.
+   * 
+ * + * repeated .google.cloud.visionai.v1.IndexEndpoint index_endpoints = 1; + */ + @java.lang.Override + public int getIndexEndpointsCount() { + return indexEndpoints_.size(); + } + /** + * + * + *
+   * The list of IndexEndpoints.
+   * 
+ * + * repeated .google.cloud.visionai.v1.IndexEndpoint index_endpoints = 1; + */ + @java.lang.Override + public com.google.cloud.visionai.v1.IndexEndpoint getIndexEndpoints(int index) { + return indexEndpoints_.get(index); + } + /** + * + * + *
+   * The list of IndexEndpoints.
+   * 
+ * + * repeated .google.cloud.visionai.v1.IndexEndpoint index_endpoints = 1; + */ + @java.lang.Override + public com.google.cloud.visionai.v1.IndexEndpointOrBuilder getIndexEndpointsOrBuilder(int index) { + return indexEndpoints_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + 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(); + nextPageToken_ = s; + return s; + } + } + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = 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 { + for (int i = 0; i < indexEndpoints_.size(); i++) { + output.writeMessage(1, indexEndpoints_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < indexEndpoints_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, indexEndpoints_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + } + size += getUnknownFields().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.visionai.v1.ListIndexEndpointsResponse)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.ListIndexEndpointsResponse other = + (com.google.cloud.visionai.v1.ListIndexEndpointsResponse) obj; + + if (!getIndexEndpointsList().equals(other.getIndexEndpointsList())) return false; + if (!getNextPageToken().equals(other.getNextPageToken())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getIndexEndpointsCount() > 0) { + hash = (37 * hash) + INDEX_ENDPOINTS_FIELD_NUMBER; + hash = (53 * hash) + getIndexEndpointsList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.ListIndexEndpointsResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ListIndexEndpointsResponse 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.visionai.v1.ListIndexEndpointsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ListIndexEndpointsResponse 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.visionai.v1.ListIndexEndpointsResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ListIndexEndpointsResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.ListIndexEndpointsResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ListIndexEndpointsResponse 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.visionai.v1.ListIndexEndpointsResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ListIndexEndpointsResponse 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.visionai.v1.ListIndexEndpointsResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ListIndexEndpointsResponse 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.visionai.v1.ListIndexEndpointsResponse 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; + } + /** + * + * + *
+   * Response message for ListIndexEndpoints.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.ListIndexEndpointsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.ListIndexEndpointsResponse) + com.google.cloud.visionai.v1.ListIndexEndpointsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_ListIndexEndpointsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_ListIndexEndpointsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.ListIndexEndpointsResponse.class, + com.google.cloud.visionai.v1.ListIndexEndpointsResponse.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.ListIndexEndpointsResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (indexEndpointsBuilder_ == null) { + indexEndpoints_ = java.util.Collections.emptyList(); + } else { + indexEndpoints_ = null; + indexEndpointsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + nextPageToken_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_ListIndexEndpointsResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ListIndexEndpointsResponse getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.ListIndexEndpointsResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ListIndexEndpointsResponse build() { + com.google.cloud.visionai.v1.ListIndexEndpointsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ListIndexEndpointsResponse buildPartial() { + com.google.cloud.visionai.v1.ListIndexEndpointsResponse result = + new com.google.cloud.visionai.v1.ListIndexEndpointsResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.visionai.v1.ListIndexEndpointsResponse result) { + if (indexEndpointsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + indexEndpoints_ = java.util.Collections.unmodifiableList(indexEndpoints_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.indexEndpoints_ = indexEndpoints_; + } else { + result.indexEndpoints_ = indexEndpointsBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.visionai.v1.ListIndexEndpointsResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.nextPageToken_ = nextPageToken_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.ListIndexEndpointsResponse) { + return mergeFrom((com.google.cloud.visionai.v1.ListIndexEndpointsResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.ListIndexEndpointsResponse other) { + if (other == com.google.cloud.visionai.v1.ListIndexEndpointsResponse.getDefaultInstance()) + return this; + if (indexEndpointsBuilder_ == null) { + if (!other.indexEndpoints_.isEmpty()) { + if (indexEndpoints_.isEmpty()) { + indexEndpoints_ = other.indexEndpoints_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureIndexEndpointsIsMutable(); + indexEndpoints_.addAll(other.indexEndpoints_); + } + onChanged(); + } + } else { + if (!other.indexEndpoints_.isEmpty()) { + if (indexEndpointsBuilder_.isEmpty()) { + indexEndpointsBuilder_.dispose(); + indexEndpointsBuilder_ = null; + indexEndpoints_ = other.indexEndpoints_; + bitField0_ = (bitField0_ & ~0x00000001); + indexEndpointsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getIndexEndpointsFieldBuilder() + : null; + } else { + indexEndpointsBuilder_.addAllMessages(other.indexEndpoints_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.visionai.v1.IndexEndpoint m = + input.readMessage( + com.google.cloud.visionai.v1.IndexEndpoint.parser(), extensionRegistry); + if (indexEndpointsBuilder_ == null) { + ensureIndexEndpointsIsMutable(); + indexEndpoints_.add(m); + } else { + indexEndpointsBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List indexEndpoints_ = + java.util.Collections.emptyList(); + + private void ensureIndexEndpointsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + indexEndpoints_ = + new java.util.ArrayList(indexEndpoints_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.visionai.v1.IndexEndpoint, + com.google.cloud.visionai.v1.IndexEndpoint.Builder, + com.google.cloud.visionai.v1.IndexEndpointOrBuilder> + indexEndpointsBuilder_; + + /** + * + * + *
+     * The list of IndexEndpoints.
+     * 
+ * + * repeated .google.cloud.visionai.v1.IndexEndpoint index_endpoints = 1; + */ + public java.util.List getIndexEndpointsList() { + if (indexEndpointsBuilder_ == null) { + return java.util.Collections.unmodifiableList(indexEndpoints_); + } else { + return indexEndpointsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * The list of IndexEndpoints.
+     * 
+ * + * repeated .google.cloud.visionai.v1.IndexEndpoint index_endpoints = 1; + */ + public int getIndexEndpointsCount() { + if (indexEndpointsBuilder_ == null) { + return indexEndpoints_.size(); + } else { + return indexEndpointsBuilder_.getCount(); + } + } + /** + * + * + *
+     * The list of IndexEndpoints.
+     * 
+ * + * repeated .google.cloud.visionai.v1.IndexEndpoint index_endpoints = 1; + */ + public com.google.cloud.visionai.v1.IndexEndpoint getIndexEndpoints(int index) { + if (indexEndpointsBuilder_ == null) { + return indexEndpoints_.get(index); + } else { + return indexEndpointsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * The list of IndexEndpoints.
+     * 
+ * + * repeated .google.cloud.visionai.v1.IndexEndpoint index_endpoints = 1; + */ + public Builder setIndexEndpoints(int index, com.google.cloud.visionai.v1.IndexEndpoint value) { + if (indexEndpointsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureIndexEndpointsIsMutable(); + indexEndpoints_.set(index, value); + onChanged(); + } else { + indexEndpointsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The list of IndexEndpoints.
+     * 
+ * + * repeated .google.cloud.visionai.v1.IndexEndpoint index_endpoints = 1; + */ + public Builder setIndexEndpoints( + int index, com.google.cloud.visionai.v1.IndexEndpoint.Builder builderForValue) { + if (indexEndpointsBuilder_ == null) { + ensureIndexEndpointsIsMutable(); + indexEndpoints_.set(index, builderForValue.build()); + onChanged(); + } else { + indexEndpointsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of IndexEndpoints.
+     * 
+ * + * repeated .google.cloud.visionai.v1.IndexEndpoint index_endpoints = 1; + */ + public Builder addIndexEndpoints(com.google.cloud.visionai.v1.IndexEndpoint value) { + if (indexEndpointsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureIndexEndpointsIsMutable(); + indexEndpoints_.add(value); + onChanged(); + } else { + indexEndpointsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * The list of IndexEndpoints.
+     * 
+ * + * repeated .google.cloud.visionai.v1.IndexEndpoint index_endpoints = 1; + */ + public Builder addIndexEndpoints(int index, com.google.cloud.visionai.v1.IndexEndpoint value) { + if (indexEndpointsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureIndexEndpointsIsMutable(); + indexEndpoints_.add(index, value); + onChanged(); + } else { + indexEndpointsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The list of IndexEndpoints.
+     * 
+ * + * repeated .google.cloud.visionai.v1.IndexEndpoint index_endpoints = 1; + */ + public Builder addIndexEndpoints( + com.google.cloud.visionai.v1.IndexEndpoint.Builder builderForValue) { + if (indexEndpointsBuilder_ == null) { + ensureIndexEndpointsIsMutable(); + indexEndpoints_.add(builderForValue.build()); + onChanged(); + } else { + indexEndpointsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of IndexEndpoints.
+     * 
+ * + * repeated .google.cloud.visionai.v1.IndexEndpoint index_endpoints = 1; + */ + public Builder addIndexEndpoints( + int index, com.google.cloud.visionai.v1.IndexEndpoint.Builder builderForValue) { + if (indexEndpointsBuilder_ == null) { + ensureIndexEndpointsIsMutable(); + indexEndpoints_.add(index, builderForValue.build()); + onChanged(); + } else { + indexEndpointsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of IndexEndpoints.
+     * 
+ * + * repeated .google.cloud.visionai.v1.IndexEndpoint index_endpoints = 1; + */ + public Builder addAllIndexEndpoints( + java.lang.Iterable values) { + if (indexEndpointsBuilder_ == null) { + ensureIndexEndpointsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, indexEndpoints_); + onChanged(); + } else { + indexEndpointsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * The list of IndexEndpoints.
+     * 
+ * + * repeated .google.cloud.visionai.v1.IndexEndpoint index_endpoints = 1; + */ + public Builder clearIndexEndpoints() { + if (indexEndpointsBuilder_ == null) { + indexEndpoints_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + indexEndpointsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The list of IndexEndpoints.
+     * 
+ * + * repeated .google.cloud.visionai.v1.IndexEndpoint index_endpoints = 1; + */ + public Builder removeIndexEndpoints(int index) { + if (indexEndpointsBuilder_ == null) { + ensureIndexEndpointsIsMutable(); + indexEndpoints_.remove(index); + onChanged(); + } else { + indexEndpointsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * The list of IndexEndpoints.
+     * 
+ * + * repeated .google.cloud.visionai.v1.IndexEndpoint index_endpoints = 1; + */ + public com.google.cloud.visionai.v1.IndexEndpoint.Builder getIndexEndpointsBuilder(int index) { + return getIndexEndpointsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * The list of IndexEndpoints.
+     * 
+ * + * repeated .google.cloud.visionai.v1.IndexEndpoint index_endpoints = 1; + */ + public com.google.cloud.visionai.v1.IndexEndpointOrBuilder getIndexEndpointsOrBuilder( + int index) { + if (indexEndpointsBuilder_ == null) { + return indexEndpoints_.get(index); + } else { + return indexEndpointsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * The list of IndexEndpoints.
+     * 
+ * + * repeated .google.cloud.visionai.v1.IndexEndpoint index_endpoints = 1; + */ + public java.util.List + getIndexEndpointsOrBuilderList() { + if (indexEndpointsBuilder_ != null) { + return indexEndpointsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(indexEndpoints_); + } + } + /** + * + * + *
+     * The list of IndexEndpoints.
+     * 
+ * + * repeated .google.cloud.visionai.v1.IndexEndpoint index_endpoints = 1; + */ + public com.google.cloud.visionai.v1.IndexEndpoint.Builder addIndexEndpointsBuilder() { + return getIndexEndpointsFieldBuilder() + .addBuilder(com.google.cloud.visionai.v1.IndexEndpoint.getDefaultInstance()); + } + /** + * + * + *
+     * The list of IndexEndpoints.
+     * 
+ * + * repeated .google.cloud.visionai.v1.IndexEndpoint index_endpoints = 1; + */ + public com.google.cloud.visionai.v1.IndexEndpoint.Builder addIndexEndpointsBuilder(int index) { + return getIndexEndpointsFieldBuilder() + .addBuilder(index, com.google.cloud.visionai.v1.IndexEndpoint.getDefaultInstance()); + } + /** + * + * + *
+     * The list of IndexEndpoints.
+     * 
+ * + * repeated .google.cloud.visionai.v1.IndexEndpoint index_endpoints = 1; + */ + public java.util.List + getIndexEndpointsBuilderList() { + return getIndexEndpointsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.visionai.v1.IndexEndpoint, + com.google.cloud.visionai.v1.IndexEndpoint.Builder, + com.google.cloud.visionai.v1.IndexEndpointOrBuilder> + getIndexEndpointsFieldBuilder() { + if (indexEndpointsBuilder_ == null) { + indexEndpointsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.visionai.v1.IndexEndpoint, + com.google.cloud.visionai.v1.IndexEndpoint.Builder, + com.google.cloud.visionai.v1.IndexEndpointOrBuilder>( + indexEndpoints_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + indexEndpoints_ = null; + } + return indexEndpointsBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + nextPageToken_ = getDefaultInstance().getNextPageToken(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.ListIndexEndpointsResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.ListIndexEndpointsResponse) + private static final com.google.cloud.visionai.v1.ListIndexEndpointsResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.ListIndexEndpointsResponse(); + } + + public static com.google.cloud.visionai.v1.ListIndexEndpointsResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListIndexEndpointsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.ListIndexEndpointsResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListIndexEndpointsResponseOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListIndexEndpointsResponseOrBuilder.java new file mode 100644 index 000000000000..f3f6e2fff514 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListIndexEndpointsResponseOrBuilder.java @@ -0,0 +1,103 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/warehouse.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface ListIndexEndpointsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.ListIndexEndpointsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The list of IndexEndpoints.
+   * 
+ * + * repeated .google.cloud.visionai.v1.IndexEndpoint index_endpoints = 1; + */ + java.util.List getIndexEndpointsList(); + /** + * + * + *
+   * The list of IndexEndpoints.
+   * 
+ * + * repeated .google.cloud.visionai.v1.IndexEndpoint index_endpoints = 1; + */ + com.google.cloud.visionai.v1.IndexEndpoint getIndexEndpoints(int index); + /** + * + * + *
+   * The list of IndexEndpoints.
+   * 
+ * + * repeated .google.cloud.visionai.v1.IndexEndpoint index_endpoints = 1; + */ + int getIndexEndpointsCount(); + /** + * + * + *
+   * The list of IndexEndpoints.
+   * 
+ * + * repeated .google.cloud.visionai.v1.IndexEndpoint index_endpoints = 1; + */ + java.util.List + getIndexEndpointsOrBuilderList(); + /** + * + * + *
+   * The list of IndexEndpoints.
+   * 
+ * + * repeated .google.cloud.visionai.v1.IndexEndpoint index_endpoints = 1; + */ + com.google.cloud.visionai.v1.IndexEndpointOrBuilder getIndexEndpointsOrBuilder(int index); + + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListIndexesRequest.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListIndexesRequest.java new file mode 100644 index 000000000000..aa9ccceb659f --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListIndexesRequest.java @@ -0,0 +1,968 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/warehouse.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * Request message for listing Indexes.
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.ListIndexesRequest} + */ +public final class ListIndexesRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.ListIndexesRequest) + ListIndexesRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListIndexesRequest.newBuilder() to construct. + private ListIndexesRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListIndexesRequest() { + parent_ = ""; + pageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListIndexesRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_ListIndexesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_ListIndexesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.ListIndexesRequest.class, + com.google.cloud.visionai.v1.ListIndexesRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + /** + * + * + *
+   * Required. The parent corpus that owns this collection of indexes.
+   * Format:
+   * `projects/{project_number}/locations/{location}/corpora/{corpus}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + 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(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The parent corpus that owns this collection of indexes.
+   * Format:
+   * `projects/{project_number}/locations/{location}/corpora/{corpus}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 2; + private int pageSize_ = 0; + /** + * + * + *
+   * The maximum number of indexes to return. The service may return fewer than
+   * this value.
+   * If unspecified, at most 50 indexes will be returned.
+   * The maximum value is 1000; values above 1000 will be coerced to 1000.
+   * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object pageToken_ = ""; + /** + * + * + *
+   * A page token, received from a previous `ListIndexes` call.
+   * Provide this to retrieve the subsequent page.
+   *
+   * When paginating, all other parameters provided to `ListIndexes` must match
+   * the call that provided the page token.
+   * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + 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(); + pageToken_ = s; + return s; + } + } + /** + * + * + *
+   * A page token, received from a previous `ListIndexes` call.
+   * Provide this to retrieve the subsequent page.
+   *
+   * When paginating, all other parameters provided to `ListIndexes` must match
+   * the call that provided the page token.
+   * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); + } + size += getUnknownFields().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.visionai.v1.ListIndexesRequest)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.ListIndexesRequest other = + (com.google.cloud.visionai.v1.ListIndexesRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.ListIndexesRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ListIndexesRequest 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.visionai.v1.ListIndexesRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ListIndexesRequest 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.visionai.v1.ListIndexesRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ListIndexesRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.ListIndexesRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ListIndexesRequest 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.visionai.v1.ListIndexesRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ListIndexesRequest 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.visionai.v1.ListIndexesRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ListIndexesRequest 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.visionai.v1.ListIndexesRequest 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; + } + /** + * + * + *
+   * Request message for listing Indexes.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.ListIndexesRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.ListIndexesRequest) + com.google.cloud.visionai.v1.ListIndexesRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_ListIndexesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_ListIndexesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.ListIndexesRequest.class, + com.google.cloud.visionai.v1.ListIndexesRequest.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.ListIndexesRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + pageSize_ = 0; + pageToken_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_ListIndexesRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ListIndexesRequest getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.ListIndexesRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ListIndexesRequest build() { + com.google.cloud.visionai.v1.ListIndexesRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ListIndexesRequest buildPartial() { + com.google.cloud.visionai.v1.ListIndexesRequest result = + new com.google.cloud.visionai.v1.ListIndexesRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.visionai.v1.ListIndexesRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.pageSize_ = pageSize_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.pageToken_ = pageToken_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.ListIndexesRequest) { + return mergeFrom((com.google.cloud.visionai.v1.ListIndexesRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.ListIndexesRequest other) { + if (other == com.google.cloud.visionai.v1.ListIndexesRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + bitField0_ |= 0x00000004; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + pageSize_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The parent corpus that owns this collection of indexes.
+     * Format:
+     * `projects/{project_number}/locations/{location}/corpora/{corpus}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The parent corpus that owns this collection of indexes.
+     * Format:
+     * `projects/{project_number}/locations/{location}/corpora/{corpus}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The parent corpus that owns this collection of indexes.
+     * Format:
+     * `projects/{project_number}/locations/{location}/corpora/{corpus}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The parent corpus that owns this collection of indexes.
+     * Format:
+     * `projects/{project_number}/locations/{location}/corpora/{corpus}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The parent corpus that owns this collection of indexes.
+     * Format:
+     * `projects/{project_number}/locations/{location}/corpora/{corpus}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private int pageSize_; + /** + * + * + *
+     * The maximum number of indexes to return. The service may return fewer than
+     * this value.
+     * If unspecified, at most 50 indexes will be returned.
+     * The maximum value is 1000; values above 1000 will be coerced to 1000.
+     * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + * + * + *
+     * The maximum number of indexes to return. The service may return fewer than
+     * this value.
+     * If unspecified, at most 50 indexes will be returned.
+     * The maximum value is 1000; values above 1000 will be coerced to 1000.
+     * 
+ * + * int32 page_size = 2; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * The maximum number of indexes to return. The service may return fewer than
+     * this value.
+     * If unspecified, at most 50 indexes will be returned.
+     * The maximum value is 1000; values above 1000 will be coerced to 1000.
+     * 
+ * + * int32 page_size = 2; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + bitField0_ = (bitField0_ & ~0x00000002); + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + * + * + *
+     * A page token, received from a previous `ListIndexes` call.
+     * Provide this to retrieve the subsequent page.
+     *
+     * When paginating, all other parameters provided to `ListIndexes` must match
+     * the call that provided the page token.
+     * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A page token, received from a previous `ListIndexes` call.
+     * Provide this to retrieve the subsequent page.
+     *
+     * When paginating, all other parameters provided to `ListIndexes` must match
+     * the call that provided the page token.
+     * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A page token, received from a previous `ListIndexes` call.
+     * Provide this to retrieve the subsequent page.
+     *
+     * When paginating, all other parameters provided to `ListIndexes` must match
+     * the call that provided the page token.
+     * 
+ * + * string page_token = 3; + * + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + pageToken_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * A page token, received from a previous `ListIndexes` call.
+     * Provide this to retrieve the subsequent page.
+     *
+     * When paginating, all other parameters provided to `ListIndexes` must match
+     * the call that provided the page token.
+     * 
+ * + * string page_token = 3; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + pageToken_ = getDefaultInstance().getPageToken(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * A page token, received from a previous `ListIndexes` call.
+     * Provide this to retrieve the subsequent page.
+     *
+     * When paginating, all other parameters provided to `ListIndexes` must match
+     * the call that provided the page token.
+     * 
+ * + * string page_token = 3; + * + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + pageToken_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.ListIndexesRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.ListIndexesRequest) + private static final com.google.cloud.visionai.v1.ListIndexesRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.ListIndexesRequest(); + } + + public static com.google.cloud.visionai.v1.ListIndexesRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListIndexesRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.ListIndexesRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListIndexesRequestOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListIndexesRequestOrBuilder.java new file mode 100644 index 000000000000..60c1c2b1f3b0 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListIndexesRequestOrBuilder.java @@ -0,0 +1,108 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/warehouse.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface ListIndexesRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.ListIndexesRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The parent corpus that owns this collection of indexes.
+   * Format:
+   * `projects/{project_number}/locations/{location}/corpora/{corpus}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The parent corpus that owns this collection of indexes.
+   * Format:
+   * `projects/{project_number}/locations/{location}/corpora/{corpus}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * The maximum number of indexes to return. The service may return fewer than
+   * this value.
+   * If unspecified, at most 50 indexes will be returned.
+   * The maximum value is 1000; values above 1000 will be coerced to 1000.
+   * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * A page token, received from a previous `ListIndexes` call.
+   * Provide this to retrieve the subsequent page.
+   *
+   * When paginating, all other parameters provided to `ListIndexes` must match
+   * the call that provided the page token.
+   * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + * + * + *
+   * A page token, received from a previous `ListIndexes` call.
+   * Provide this to retrieve the subsequent page.
+   *
+   * When paginating, all other parameters provided to `ListIndexes` must match
+   * the call that provided the page token.
+   * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListIndexesResponse.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListIndexesResponse.java new file mode 100644 index 000000000000..e1338bb8966c --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListIndexesResponse.java @@ -0,0 +1,1124 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/warehouse.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * Response message for ListIndexes.
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.ListIndexesResponse} + */ +public final class ListIndexesResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.ListIndexesResponse) + ListIndexesResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListIndexesResponse.newBuilder() to construct. + private ListIndexesResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListIndexesResponse() { + indexes_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListIndexesResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_ListIndexesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_ListIndexesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.ListIndexesResponse.class, + com.google.cloud.visionai.v1.ListIndexesResponse.Builder.class); + } + + public static final int INDEXES_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List indexes_; + /** + * + * + *
+   * The indexes under the specified corpus.
+   * 
+ * + * repeated .google.cloud.visionai.v1.Index indexes = 1; + */ + @java.lang.Override + public java.util.List getIndexesList() { + return indexes_; + } + /** + * + * + *
+   * The indexes under the specified corpus.
+   * 
+ * + * repeated .google.cloud.visionai.v1.Index indexes = 1; + */ + @java.lang.Override + public java.util.List + getIndexesOrBuilderList() { + return indexes_; + } + /** + * + * + *
+   * The indexes under the specified corpus.
+   * 
+ * + * repeated .google.cloud.visionai.v1.Index indexes = 1; + */ + @java.lang.Override + public int getIndexesCount() { + return indexes_.size(); + } + /** + * + * + *
+   * The indexes under the specified corpus.
+   * 
+ * + * repeated .google.cloud.visionai.v1.Index indexes = 1; + */ + @java.lang.Override + public com.google.cloud.visionai.v1.Index getIndexes(int index) { + return indexes_.get(index); + } + /** + * + * + *
+   * The indexes under the specified corpus.
+   * 
+ * + * repeated .google.cloud.visionai.v1.Index indexes = 1; + */ + @java.lang.Override + public com.google.cloud.visionai.v1.IndexOrBuilder getIndexesOrBuilder(int index) { + return indexes_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+   * A token, which can be sent as `page_token` to retrieve the next page.
+   * If this field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + 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(); + nextPageToken_ = s; + return s; + } + } + /** + * + * + *
+   * A token, which can be sent as `page_token` to retrieve the next page.
+   * If this field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = 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 { + for (int i = 0; i < indexes_.size(); i++) { + output.writeMessage(1, indexes_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < indexes_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, indexes_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + } + size += getUnknownFields().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.visionai.v1.ListIndexesResponse)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.ListIndexesResponse other = + (com.google.cloud.visionai.v1.ListIndexesResponse) obj; + + if (!getIndexesList().equals(other.getIndexesList())) return false; + if (!getNextPageToken().equals(other.getNextPageToken())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getIndexesCount() > 0) { + hash = (37 * hash) + INDEXES_FIELD_NUMBER; + hash = (53 * hash) + getIndexesList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.ListIndexesResponse parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ListIndexesResponse 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.visionai.v1.ListIndexesResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ListIndexesResponse 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.visionai.v1.ListIndexesResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ListIndexesResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.ListIndexesResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ListIndexesResponse 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.visionai.v1.ListIndexesResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ListIndexesResponse 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.visionai.v1.ListIndexesResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ListIndexesResponse 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.visionai.v1.ListIndexesResponse 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; + } + /** + * + * + *
+   * Response message for ListIndexes.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.ListIndexesResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.ListIndexesResponse) + com.google.cloud.visionai.v1.ListIndexesResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_ListIndexesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_ListIndexesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.ListIndexesResponse.class, + com.google.cloud.visionai.v1.ListIndexesResponse.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.ListIndexesResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (indexesBuilder_ == null) { + indexes_ = java.util.Collections.emptyList(); + } else { + indexes_ = null; + indexesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + nextPageToken_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_ListIndexesResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ListIndexesResponse getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.ListIndexesResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ListIndexesResponse build() { + com.google.cloud.visionai.v1.ListIndexesResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ListIndexesResponse buildPartial() { + com.google.cloud.visionai.v1.ListIndexesResponse result = + new com.google.cloud.visionai.v1.ListIndexesResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.visionai.v1.ListIndexesResponse result) { + if (indexesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + indexes_ = java.util.Collections.unmodifiableList(indexes_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.indexes_ = indexes_; + } else { + result.indexes_ = indexesBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.visionai.v1.ListIndexesResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.nextPageToken_ = nextPageToken_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.ListIndexesResponse) { + return mergeFrom((com.google.cloud.visionai.v1.ListIndexesResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.ListIndexesResponse other) { + if (other == com.google.cloud.visionai.v1.ListIndexesResponse.getDefaultInstance()) + return this; + if (indexesBuilder_ == null) { + if (!other.indexes_.isEmpty()) { + if (indexes_.isEmpty()) { + indexes_ = other.indexes_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureIndexesIsMutable(); + indexes_.addAll(other.indexes_); + } + onChanged(); + } + } else { + if (!other.indexes_.isEmpty()) { + if (indexesBuilder_.isEmpty()) { + indexesBuilder_.dispose(); + indexesBuilder_ = null; + indexes_ = other.indexes_; + bitField0_ = (bitField0_ & ~0x00000001); + indexesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getIndexesFieldBuilder() + : null; + } else { + indexesBuilder_.addAllMessages(other.indexes_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.visionai.v1.Index m = + input.readMessage( + com.google.cloud.visionai.v1.Index.parser(), extensionRegistry); + if (indexesBuilder_ == null) { + ensureIndexesIsMutable(); + indexes_.add(m); + } else { + indexesBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List indexes_ = + java.util.Collections.emptyList(); + + private void ensureIndexesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + indexes_ = new java.util.ArrayList(indexes_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.visionai.v1.Index, + com.google.cloud.visionai.v1.Index.Builder, + com.google.cloud.visionai.v1.IndexOrBuilder> + indexesBuilder_; + + /** + * + * + *
+     * The indexes under the specified corpus.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Index indexes = 1; + */ + public java.util.List getIndexesList() { + if (indexesBuilder_ == null) { + return java.util.Collections.unmodifiableList(indexes_); + } else { + return indexesBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * The indexes under the specified corpus.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Index indexes = 1; + */ + public int getIndexesCount() { + if (indexesBuilder_ == null) { + return indexes_.size(); + } else { + return indexesBuilder_.getCount(); + } + } + /** + * + * + *
+     * The indexes under the specified corpus.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Index indexes = 1; + */ + public com.google.cloud.visionai.v1.Index getIndexes(int index) { + if (indexesBuilder_ == null) { + return indexes_.get(index); + } else { + return indexesBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * The indexes under the specified corpus.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Index indexes = 1; + */ + public Builder setIndexes(int index, com.google.cloud.visionai.v1.Index value) { + if (indexesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureIndexesIsMutable(); + indexes_.set(index, value); + onChanged(); + } else { + indexesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The indexes under the specified corpus.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Index indexes = 1; + */ + public Builder setIndexes( + int index, com.google.cloud.visionai.v1.Index.Builder builderForValue) { + if (indexesBuilder_ == null) { + ensureIndexesIsMutable(); + indexes_.set(index, builderForValue.build()); + onChanged(); + } else { + indexesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The indexes under the specified corpus.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Index indexes = 1; + */ + public Builder addIndexes(com.google.cloud.visionai.v1.Index value) { + if (indexesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureIndexesIsMutable(); + indexes_.add(value); + onChanged(); + } else { + indexesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * The indexes under the specified corpus.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Index indexes = 1; + */ + public Builder addIndexes(int index, com.google.cloud.visionai.v1.Index value) { + if (indexesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureIndexesIsMutable(); + indexes_.add(index, value); + onChanged(); + } else { + indexesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The indexes under the specified corpus.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Index indexes = 1; + */ + public Builder addIndexes(com.google.cloud.visionai.v1.Index.Builder builderForValue) { + if (indexesBuilder_ == null) { + ensureIndexesIsMutable(); + indexes_.add(builderForValue.build()); + onChanged(); + } else { + indexesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The indexes under the specified corpus.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Index indexes = 1; + */ + public Builder addIndexes( + int index, com.google.cloud.visionai.v1.Index.Builder builderForValue) { + if (indexesBuilder_ == null) { + ensureIndexesIsMutable(); + indexes_.add(index, builderForValue.build()); + onChanged(); + } else { + indexesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The indexes under the specified corpus.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Index indexes = 1; + */ + public Builder addAllIndexes( + java.lang.Iterable values) { + if (indexesBuilder_ == null) { + ensureIndexesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, indexes_); + onChanged(); + } else { + indexesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * The indexes under the specified corpus.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Index indexes = 1; + */ + public Builder clearIndexes() { + if (indexesBuilder_ == null) { + indexes_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + indexesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The indexes under the specified corpus.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Index indexes = 1; + */ + public Builder removeIndexes(int index) { + if (indexesBuilder_ == null) { + ensureIndexesIsMutable(); + indexes_.remove(index); + onChanged(); + } else { + indexesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * The indexes under the specified corpus.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Index indexes = 1; + */ + public com.google.cloud.visionai.v1.Index.Builder getIndexesBuilder(int index) { + return getIndexesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * The indexes under the specified corpus.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Index indexes = 1; + */ + public com.google.cloud.visionai.v1.IndexOrBuilder getIndexesOrBuilder(int index) { + if (indexesBuilder_ == null) { + return indexes_.get(index); + } else { + return indexesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * The indexes under the specified corpus.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Index indexes = 1; + */ + public java.util.List + getIndexesOrBuilderList() { + if (indexesBuilder_ != null) { + return indexesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(indexes_); + } + } + /** + * + * + *
+     * The indexes under the specified corpus.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Index indexes = 1; + */ + public com.google.cloud.visionai.v1.Index.Builder addIndexesBuilder() { + return getIndexesFieldBuilder() + .addBuilder(com.google.cloud.visionai.v1.Index.getDefaultInstance()); + } + /** + * + * + *
+     * The indexes under the specified corpus.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Index indexes = 1; + */ + public com.google.cloud.visionai.v1.Index.Builder addIndexesBuilder(int index) { + return getIndexesFieldBuilder() + .addBuilder(index, com.google.cloud.visionai.v1.Index.getDefaultInstance()); + } + /** + * + * + *
+     * The indexes under the specified corpus.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Index indexes = 1; + */ + public java.util.List getIndexesBuilderList() { + return getIndexesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.visionai.v1.Index, + com.google.cloud.visionai.v1.Index.Builder, + com.google.cloud.visionai.v1.IndexOrBuilder> + getIndexesFieldBuilder() { + if (indexesBuilder_ == null) { + indexesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.visionai.v1.Index, + com.google.cloud.visionai.v1.Index.Builder, + com.google.cloud.visionai.v1.IndexOrBuilder>( + indexes_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + indexes_ = null; + } + return indexesBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+     * A token, which can be sent as `page_token` to retrieve the next page.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A token, which can be sent as `page_token` to retrieve the next page.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A token, which can be sent as `page_token` to retrieve the next page.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * A token, which can be sent as `page_token` to retrieve the next page.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + nextPageToken_ = getDefaultInstance().getNextPageToken(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * A token, which can be sent as `page_token` to retrieve the next page.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.ListIndexesResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.ListIndexesResponse) + private static final com.google.cloud.visionai.v1.ListIndexesResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.ListIndexesResponse(); + } + + public static com.google.cloud.visionai.v1.ListIndexesResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListIndexesResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.ListIndexesResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListIndexesResponseOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListIndexesResponseOrBuilder.java new file mode 100644 index 000000000000..ddd56a82c78f --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListIndexesResponseOrBuilder.java @@ -0,0 +1,104 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/warehouse.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface ListIndexesResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.ListIndexesResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The indexes under the specified corpus.
+   * 
+ * + * repeated .google.cloud.visionai.v1.Index indexes = 1; + */ + java.util.List getIndexesList(); + /** + * + * + *
+   * The indexes under the specified corpus.
+   * 
+ * + * repeated .google.cloud.visionai.v1.Index indexes = 1; + */ + com.google.cloud.visionai.v1.Index getIndexes(int index); + /** + * + * + *
+   * The indexes under the specified corpus.
+   * 
+ * + * repeated .google.cloud.visionai.v1.Index indexes = 1; + */ + int getIndexesCount(); + /** + * + * + *
+   * The indexes under the specified corpus.
+   * 
+ * + * repeated .google.cloud.visionai.v1.Index indexes = 1; + */ + java.util.List getIndexesOrBuilderList(); + /** + * + * + *
+   * The indexes under the specified corpus.
+   * 
+ * + * repeated .google.cloud.visionai.v1.Index indexes = 1; + */ + com.google.cloud.visionai.v1.IndexOrBuilder getIndexesOrBuilder(int index); + + /** + * + * + *
+   * A token, which can be sent as `page_token` to retrieve the next page.
+   * If this field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + * + * + *
+   * A token, which can be sent as `page_token` to retrieve the next page.
+   * If this field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListInstancesRequest.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListInstancesRequest.java new file mode 100644 index 000000000000..7d6b44e51aae --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListInstancesRequest.java @@ -0,0 +1,1282 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/platform.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * Message for requesting list of Instances.
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.ListInstancesRequest} + */ +public final class ListInstancesRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.ListInstancesRequest) + ListInstancesRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListInstancesRequest.newBuilder() to construct. + private ListInstancesRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListInstancesRequest() { + parent_ = ""; + pageToken_ = ""; + filter_ = ""; + orderBy_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListInstancesRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_ListInstancesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_ListInstancesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.ListInstancesRequest.class, + com.google.cloud.visionai.v1.ListInstancesRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + /** + * + * + *
+   * Required. Parent value for ListInstancesRequest.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + 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(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Parent value for ListInstancesRequest.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 2; + private int pageSize_ = 0; + /** + * + * + *
+   * Requested page size. Server may return fewer items than requested.
+   * If unspecified, server will pick an appropriate default.
+   * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object pageToken_ = ""; + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + 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(); + pageToken_ = s; + return s; + } + } + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FILTER_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object filter_ = ""; + /** + * + * + *
+   * Filtering results.
+   * 
+ * + * string filter = 4; + * + * @return The filter. + */ + @java.lang.Override + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + 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(); + filter_ = s; + return s; + } + } + /** + * + * + *
+   * Filtering results.
+   * 
+ * + * string filter = 4; + * + * @return The bytes for filter. + */ + @java.lang.Override + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ORDER_BY_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object orderBy_ = ""; + /** + * + * + *
+   * Hint for how to order the results.
+   * 
+ * + * string order_by = 5; + * + * @return The orderBy. + */ + @java.lang.Override + public java.lang.String getOrderBy() { + java.lang.Object ref = orderBy_; + 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(); + orderBy_ = s; + return s; + } + } + /** + * + * + *
+   * Hint for how to order the results.
+   * 
+ * + * string order_by = 5; + * + * @return The bytes for orderBy. + */ + @java.lang.Override + public com.google.protobuf.ByteString getOrderByBytes() { + java.lang.Object ref = orderBy_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + orderBy_ = 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, filter_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(orderBy_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, orderBy_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, filter_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(orderBy_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, orderBy_); + } + size += getUnknownFields().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.visionai.v1.ListInstancesRequest)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.ListInstancesRequest other = + (com.google.cloud.visionai.v1.ListInstancesRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (!getFilter().equals(other.getFilter())) return false; + if (!getOrderBy().equals(other.getOrderBy())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + hash = (37 * hash) + FILTER_FIELD_NUMBER; + hash = (53 * hash) + getFilter().hashCode(); + hash = (37 * hash) + ORDER_BY_FIELD_NUMBER; + hash = (53 * hash) + getOrderBy().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.ListInstancesRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ListInstancesRequest 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.visionai.v1.ListInstancesRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ListInstancesRequest 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.visionai.v1.ListInstancesRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ListInstancesRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.ListInstancesRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ListInstancesRequest 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.visionai.v1.ListInstancesRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ListInstancesRequest 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.visionai.v1.ListInstancesRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ListInstancesRequest 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.visionai.v1.ListInstancesRequest 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; + } + /** + * + * + *
+   * Message for requesting list of Instances.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.ListInstancesRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.ListInstancesRequest) + com.google.cloud.visionai.v1.ListInstancesRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_ListInstancesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_ListInstancesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.ListInstancesRequest.class, + com.google.cloud.visionai.v1.ListInstancesRequest.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.ListInstancesRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + pageSize_ = 0; + pageToken_ = ""; + filter_ = ""; + orderBy_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_ListInstancesRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ListInstancesRequest getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.ListInstancesRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ListInstancesRequest build() { + com.google.cloud.visionai.v1.ListInstancesRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ListInstancesRequest buildPartial() { + com.google.cloud.visionai.v1.ListInstancesRequest result = + new com.google.cloud.visionai.v1.ListInstancesRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.visionai.v1.ListInstancesRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.pageSize_ = pageSize_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.pageToken_ = pageToken_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.filter_ = filter_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.orderBy_ = orderBy_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.ListInstancesRequest) { + return mergeFrom((com.google.cloud.visionai.v1.ListInstancesRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.ListInstancesRequest other) { + if (other == com.google.cloud.visionai.v1.ListInstancesRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getFilter().isEmpty()) { + filter_ = other.filter_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (!other.getOrderBy().isEmpty()) { + orderBy_ = other.orderBy_; + bitField0_ |= 0x00000010; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + pageSize_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + orderBy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 42 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. Parent value for ListInstancesRequest.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Parent value for ListInstancesRequest.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Parent value for ListInstancesRequest.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Parent value for ListInstancesRequest.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Parent value for ListInstancesRequest.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private int pageSize_; + /** + * + * + *
+     * Requested page size. Server may return fewer items than requested.
+     * If unspecified, server will pick an appropriate default.
+     * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + * + * + *
+     * Requested page size. Server may return fewer items than requested.
+     * If unspecified, server will pick an appropriate default.
+     * 
+ * + * int32 page_size = 2; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Requested page size. Server may return fewer items than requested.
+     * If unspecified, server will pick an appropriate default.
+     * 
+ * + * int32 page_size = 2; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + bitField0_ = (bitField0_ & ~0x00000002); + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string page_token = 3; + * + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + pageToken_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string page_token = 3; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + pageToken_ = getDefaultInstance().getPageToken(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string page_token = 3; + * + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + pageToken_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object filter_ = ""; + /** + * + * + *
+     * Filtering results.
+     * 
+ * + * string filter = 4; + * + * @return The filter. + */ + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Filtering results.
+     * 
+ * + * string filter = 4; + * + * @return The bytes for filter. + */ + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Filtering results.
+     * 
+ * + * string filter = 4; + * + * @param value The filter to set. + * @return This builder for chaining. + */ + public Builder setFilter(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + filter_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Filtering results.
+     * 
+ * + * string filter = 4; + * + * @return This builder for chaining. + */ + public Builder clearFilter() { + filter_ = getDefaultInstance().getFilter(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+     * Filtering results.
+     * 
+ * + * string filter = 4; + * + * @param value The bytes for filter to set. + * @return This builder for chaining. + */ + public Builder setFilterBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + filter_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private java.lang.Object orderBy_ = ""; + /** + * + * + *
+     * Hint for how to order the results.
+     * 
+ * + * string order_by = 5; + * + * @return The orderBy. + */ + public java.lang.String getOrderBy() { + java.lang.Object ref = orderBy_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + orderBy_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Hint for how to order the results.
+     * 
+ * + * string order_by = 5; + * + * @return The bytes for orderBy. + */ + public com.google.protobuf.ByteString getOrderByBytes() { + java.lang.Object ref = orderBy_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + orderBy_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Hint for how to order the results.
+     * 
+ * + * string order_by = 5; + * + * @param value The orderBy to set. + * @return This builder for chaining. + */ + public Builder setOrderBy(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + orderBy_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Hint for how to order the results.
+     * 
+ * + * string order_by = 5; + * + * @return This builder for chaining. + */ + public Builder clearOrderBy() { + orderBy_ = getDefaultInstance().getOrderBy(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + /** + * + * + *
+     * Hint for how to order the results.
+     * 
+ * + * string order_by = 5; + * + * @param value The bytes for orderBy to set. + * @return This builder for chaining. + */ + public Builder setOrderByBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + orderBy_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.ListInstancesRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.ListInstancesRequest) + private static final com.google.cloud.visionai.v1.ListInstancesRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.ListInstancesRequest(); + } + + public static com.google.cloud.visionai.v1.ListInstancesRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListInstancesRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.ListInstancesRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListInstancesRequestOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListInstancesRequestOrBuilder.java new file mode 100644 index 000000000000..58e51f1fb08f --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListInstancesRequestOrBuilder.java @@ -0,0 +1,144 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/platform.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface ListInstancesRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.ListInstancesRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Parent value for ListInstancesRequest.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. Parent value for ListInstancesRequest.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Requested page size. Server may return fewer items than requested.
+   * If unspecified, server will pick an appropriate default.
+   * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); + + /** + * + * + *
+   * Filtering results.
+   * 
+ * + * string filter = 4; + * + * @return The filter. + */ + java.lang.String getFilter(); + /** + * + * + *
+   * Filtering results.
+   * 
+ * + * string filter = 4; + * + * @return The bytes for filter. + */ + com.google.protobuf.ByteString getFilterBytes(); + + /** + * + * + *
+   * Hint for how to order the results.
+   * 
+ * + * string order_by = 5; + * + * @return The orderBy. + */ + java.lang.String getOrderBy(); + /** + * + * + *
+   * Hint for how to order the results.
+   * 
+ * + * string order_by = 5; + * + * @return The bytes for orderBy. + */ + com.google.protobuf.ByteString getOrderByBytes(); +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListInstancesResponse.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListInstancesResponse.java new file mode 100644 index 000000000000..6aa7eb3ac56e --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListInstancesResponse.java @@ -0,0 +1,1394 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/platform.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * Message for response to listing Instances.
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.ListInstancesResponse} + */ +public final class ListInstancesResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.ListInstancesResponse) + ListInstancesResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListInstancesResponse.newBuilder() to construct. + private ListInstancesResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListInstancesResponse() { + instances_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + unreachable_ = com.google.protobuf.LazyStringArrayList.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListInstancesResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_ListInstancesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_ListInstancesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.ListInstancesResponse.class, + com.google.cloud.visionai.v1.ListInstancesResponse.Builder.class); + } + + public static final int INSTANCES_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List instances_; + /** + * + * + *
+   * The list of Instance.
+   * 
+ * + * repeated .google.cloud.visionai.v1.Instance instances = 1; + */ + @java.lang.Override + public java.util.List getInstancesList() { + return instances_; + } + /** + * + * + *
+   * The list of Instance.
+   * 
+ * + * repeated .google.cloud.visionai.v1.Instance instances = 1; + */ + @java.lang.Override + public java.util.List + getInstancesOrBuilderList() { + return instances_; + } + /** + * + * + *
+   * The list of Instance.
+   * 
+ * + * repeated .google.cloud.visionai.v1.Instance instances = 1; + */ + @java.lang.Override + public int getInstancesCount() { + return instances_.size(); + } + /** + * + * + *
+   * The list of Instance.
+   * 
+ * + * repeated .google.cloud.visionai.v1.Instance instances = 1; + */ + @java.lang.Override + public com.google.cloud.visionai.v1.Instance getInstances(int index) { + return instances_.get(index); + } + /** + * + * + *
+   * The list of Instance.
+   * 
+ * + * repeated .google.cloud.visionai.v1.Instance instances = 1; + */ + @java.lang.Override + public com.google.cloud.visionai.v1.InstanceOrBuilder getInstancesOrBuilder(int index) { + return instances_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + 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(); + nextPageToken_ = s; + return s; + } + } + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int UNREACHABLE_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList unreachable_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @return A list containing the unreachable. + */ + public com.google.protobuf.ProtocolStringList getUnreachableList() { + return unreachable_; + } + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @return The count of unreachable. + */ + public int getUnreachableCount() { + return unreachable_.size(); + } + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + public java.lang.String getUnreachable(int index) { + return unreachable_.get(index); + } + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the value to return. + * @return The bytes of the unreachable at the given index. + */ + public com.google.protobuf.ByteString getUnreachableBytes(int index) { + return unreachable_.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 < instances_.size(); i++) { + output.writeMessage(1, instances_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + } + for (int i = 0; i < unreachable_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, unreachable_.getRaw(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < instances_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, instances_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + } + { + int dataSize = 0; + for (int i = 0; i < unreachable_.size(); i++) { + dataSize += computeStringSizeNoTag(unreachable_.getRaw(i)); + } + size += dataSize; + size += 1 * getUnreachableList().size(); + } + size += getUnknownFields().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.visionai.v1.ListInstancesResponse)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.ListInstancesResponse other = + (com.google.cloud.visionai.v1.ListInstancesResponse) obj; + + if (!getInstancesList().equals(other.getInstancesList())) return false; + if (!getNextPageToken().equals(other.getNextPageToken())) return false; + if (!getUnreachableList().equals(other.getUnreachableList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getInstancesCount() > 0) { + hash = (37 * hash) + INSTANCES_FIELD_NUMBER; + hash = (53 * hash) + getInstancesList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + if (getUnreachableCount() > 0) { + hash = (37 * hash) + UNREACHABLE_FIELD_NUMBER; + hash = (53 * hash) + getUnreachableList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.ListInstancesResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ListInstancesResponse 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.visionai.v1.ListInstancesResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ListInstancesResponse 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.visionai.v1.ListInstancesResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ListInstancesResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.ListInstancesResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ListInstancesResponse 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.visionai.v1.ListInstancesResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ListInstancesResponse 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.visionai.v1.ListInstancesResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ListInstancesResponse 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.visionai.v1.ListInstancesResponse 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; + } + /** + * + * + *
+   * Message for response to listing Instances.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.ListInstancesResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.ListInstancesResponse) + com.google.cloud.visionai.v1.ListInstancesResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_ListInstancesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_ListInstancesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.ListInstancesResponse.class, + com.google.cloud.visionai.v1.ListInstancesResponse.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.ListInstancesResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (instancesBuilder_ == null) { + instances_ = java.util.Collections.emptyList(); + } else { + instances_ = null; + instancesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + nextPageToken_ = ""; + unreachable_ = com.google.protobuf.LazyStringArrayList.emptyList(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_ListInstancesResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ListInstancesResponse getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.ListInstancesResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ListInstancesResponse build() { + com.google.cloud.visionai.v1.ListInstancesResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ListInstancesResponse buildPartial() { + com.google.cloud.visionai.v1.ListInstancesResponse result = + new com.google.cloud.visionai.v1.ListInstancesResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.visionai.v1.ListInstancesResponse result) { + if (instancesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + instances_ = java.util.Collections.unmodifiableList(instances_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.instances_ = instances_; + } else { + result.instances_ = instancesBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.visionai.v1.ListInstancesResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.nextPageToken_ = nextPageToken_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + unreachable_.makeImmutable(); + result.unreachable_ = unreachable_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.ListInstancesResponse) { + return mergeFrom((com.google.cloud.visionai.v1.ListInstancesResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.ListInstancesResponse other) { + if (other == com.google.cloud.visionai.v1.ListInstancesResponse.getDefaultInstance()) + return this; + if (instancesBuilder_ == null) { + if (!other.instances_.isEmpty()) { + if (instances_.isEmpty()) { + instances_ = other.instances_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureInstancesIsMutable(); + instances_.addAll(other.instances_); + } + onChanged(); + } + } else { + if (!other.instances_.isEmpty()) { + if (instancesBuilder_.isEmpty()) { + instancesBuilder_.dispose(); + instancesBuilder_ = null; + instances_ = other.instances_; + bitField0_ = (bitField0_ & ~0x00000001); + instancesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getInstancesFieldBuilder() + : null; + } else { + instancesBuilder_.addAllMessages(other.instances_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.unreachable_.isEmpty()) { + if (unreachable_.isEmpty()) { + unreachable_ = other.unreachable_; + bitField0_ |= 0x00000004; + } else { + ensureUnreachableIsMutable(); + unreachable_.addAll(other.unreachable_); + } + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.visionai.v1.Instance m = + input.readMessage( + com.google.cloud.visionai.v1.Instance.parser(), extensionRegistry); + if (instancesBuilder_ == null) { + ensureInstancesIsMutable(); + instances_.add(m); + } else { + instancesBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureUnreachableIsMutable(); + unreachable_.add(s); + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List instances_ = + java.util.Collections.emptyList(); + + private void ensureInstancesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + instances_ = new java.util.ArrayList(instances_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.visionai.v1.Instance, + com.google.cloud.visionai.v1.Instance.Builder, + com.google.cloud.visionai.v1.InstanceOrBuilder> + instancesBuilder_; + + /** + * + * + *
+     * The list of Instance.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Instance instances = 1; + */ + public java.util.List getInstancesList() { + if (instancesBuilder_ == null) { + return java.util.Collections.unmodifiableList(instances_); + } else { + return instancesBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * The list of Instance.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Instance instances = 1; + */ + public int getInstancesCount() { + if (instancesBuilder_ == null) { + return instances_.size(); + } else { + return instancesBuilder_.getCount(); + } + } + /** + * + * + *
+     * The list of Instance.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Instance instances = 1; + */ + public com.google.cloud.visionai.v1.Instance getInstances(int index) { + if (instancesBuilder_ == null) { + return instances_.get(index); + } else { + return instancesBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * The list of Instance.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Instance instances = 1; + */ + public Builder setInstances(int index, com.google.cloud.visionai.v1.Instance value) { + if (instancesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureInstancesIsMutable(); + instances_.set(index, value); + onChanged(); + } else { + instancesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The list of Instance.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Instance instances = 1; + */ + public Builder setInstances( + int index, com.google.cloud.visionai.v1.Instance.Builder builderForValue) { + if (instancesBuilder_ == null) { + ensureInstancesIsMutable(); + instances_.set(index, builderForValue.build()); + onChanged(); + } else { + instancesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of Instance.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Instance instances = 1; + */ + public Builder addInstances(com.google.cloud.visionai.v1.Instance value) { + if (instancesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureInstancesIsMutable(); + instances_.add(value); + onChanged(); + } else { + instancesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * The list of Instance.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Instance instances = 1; + */ + public Builder addInstances(int index, com.google.cloud.visionai.v1.Instance value) { + if (instancesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureInstancesIsMutable(); + instances_.add(index, value); + onChanged(); + } else { + instancesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The list of Instance.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Instance instances = 1; + */ + public Builder addInstances(com.google.cloud.visionai.v1.Instance.Builder builderForValue) { + if (instancesBuilder_ == null) { + ensureInstancesIsMutable(); + instances_.add(builderForValue.build()); + onChanged(); + } else { + instancesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of Instance.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Instance instances = 1; + */ + public Builder addInstances( + int index, com.google.cloud.visionai.v1.Instance.Builder builderForValue) { + if (instancesBuilder_ == null) { + ensureInstancesIsMutable(); + instances_.add(index, builderForValue.build()); + onChanged(); + } else { + instancesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of Instance.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Instance instances = 1; + */ + public Builder addAllInstances( + java.lang.Iterable values) { + if (instancesBuilder_ == null) { + ensureInstancesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, instances_); + onChanged(); + } else { + instancesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * The list of Instance.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Instance instances = 1; + */ + public Builder clearInstances() { + if (instancesBuilder_ == null) { + instances_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + instancesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The list of Instance.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Instance instances = 1; + */ + public Builder removeInstances(int index) { + if (instancesBuilder_ == null) { + ensureInstancesIsMutable(); + instances_.remove(index); + onChanged(); + } else { + instancesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * The list of Instance.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Instance instances = 1; + */ + public com.google.cloud.visionai.v1.Instance.Builder getInstancesBuilder(int index) { + return getInstancesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * The list of Instance.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Instance instances = 1; + */ + public com.google.cloud.visionai.v1.InstanceOrBuilder getInstancesOrBuilder(int index) { + if (instancesBuilder_ == null) { + return instances_.get(index); + } else { + return instancesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * The list of Instance.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Instance instances = 1; + */ + public java.util.List + getInstancesOrBuilderList() { + if (instancesBuilder_ != null) { + return instancesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(instances_); + } + } + /** + * + * + *
+     * The list of Instance.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Instance instances = 1; + */ + public com.google.cloud.visionai.v1.Instance.Builder addInstancesBuilder() { + return getInstancesFieldBuilder() + .addBuilder(com.google.cloud.visionai.v1.Instance.getDefaultInstance()); + } + /** + * + * + *
+     * The list of Instance.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Instance instances = 1; + */ + public com.google.cloud.visionai.v1.Instance.Builder addInstancesBuilder(int index) { + return getInstancesFieldBuilder() + .addBuilder(index, com.google.cloud.visionai.v1.Instance.getDefaultInstance()); + } + /** + * + * + *
+     * The list of Instance.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Instance instances = 1; + */ + public java.util.List getInstancesBuilderList() { + return getInstancesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.visionai.v1.Instance, + com.google.cloud.visionai.v1.Instance.Builder, + com.google.cloud.visionai.v1.InstanceOrBuilder> + getInstancesFieldBuilder() { + if (instancesBuilder_ == null) { + instancesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.visionai.v1.Instance, + com.google.cloud.visionai.v1.Instance.Builder, + com.google.cloud.visionai.v1.InstanceOrBuilder>( + instances_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + instances_ = null; + } + return instancesBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + nextPageToken_ = getDefaultInstance().getNextPageToken(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList unreachable_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureUnreachableIsMutable() { + if (!unreachable_.isModifiable()) { + unreachable_ = new com.google.protobuf.LazyStringArrayList(unreachable_); + } + bitField0_ |= 0x00000004; + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @return A list containing the unreachable. + */ + public com.google.protobuf.ProtocolStringList getUnreachableList() { + unreachable_.makeImmutable(); + return unreachable_; + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @return The count of unreachable. + */ + public int getUnreachableCount() { + return unreachable_.size(); + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + public java.lang.String getUnreachable(int index) { + return unreachable_.get(index); + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the value to return. + * @return The bytes of the unreachable at the given index. + */ + public com.google.protobuf.ByteString getUnreachableBytes(int index) { + return unreachable_.getByteString(index); + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param index The index to set the value at. + * @param value The unreachable to set. + * @return This builder for chaining. + */ + public Builder setUnreachable(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureUnreachableIsMutable(); + unreachable_.set(index, value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param value The unreachable to add. + * @return This builder for chaining. + */ + public Builder addUnreachable(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureUnreachableIsMutable(); + unreachable_.add(value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param values The unreachable to add. + * @return This builder for chaining. + */ + public Builder addAllUnreachable(java.lang.Iterable values) { + ensureUnreachableIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, unreachable_); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @return This builder for chaining. + */ + public Builder clearUnreachable() { + unreachable_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + ; + onChanged(); + return this; + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param value The bytes of the unreachable to add. + * @return This builder for chaining. + */ + public Builder addUnreachableBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureUnreachableIsMutable(); + unreachable_.add(value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.ListInstancesResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.ListInstancesResponse) + private static final com.google.cloud.visionai.v1.ListInstancesResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.ListInstancesResponse(); + } + + public static com.google.cloud.visionai.v1.ListInstancesResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListInstancesResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.ListInstancesResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListInstancesResponseOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListInstancesResponseOrBuilder.java new file mode 100644 index 000000000000..3618c04d170b --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListInstancesResponseOrBuilder.java @@ -0,0 +1,154 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/platform.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface ListInstancesResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.ListInstancesResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The list of Instance.
+   * 
+ * + * repeated .google.cloud.visionai.v1.Instance instances = 1; + */ + java.util.List getInstancesList(); + /** + * + * + *
+   * The list of Instance.
+   * 
+ * + * repeated .google.cloud.visionai.v1.Instance instances = 1; + */ + com.google.cloud.visionai.v1.Instance getInstances(int index); + /** + * + * + *
+   * The list of Instance.
+   * 
+ * + * repeated .google.cloud.visionai.v1.Instance instances = 1; + */ + int getInstancesCount(); + /** + * + * + *
+   * The list of Instance.
+   * 
+ * + * repeated .google.cloud.visionai.v1.Instance instances = 1; + */ + java.util.List + getInstancesOrBuilderList(); + /** + * + * + *
+   * The list of Instance.
+   * 
+ * + * repeated .google.cloud.visionai.v1.Instance instances = 1; + */ + com.google.cloud.visionai.v1.InstanceOrBuilder getInstancesOrBuilder(int index); + + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); + + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @return A list containing the unreachable. + */ + java.util.List getUnreachableList(); + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @return The count of unreachable. + */ + int getUnreachableCount(); + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + java.lang.String getUnreachable(int index); + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the value to return. + * @return The bytes of the unreachable at the given index. + */ + com.google.protobuf.ByteString getUnreachableBytes(int index); +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListOperatorsRequest.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListOperatorsRequest.java new file mode 100644 index 000000000000..be2380fd2015 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListOperatorsRequest.java @@ -0,0 +1,1282 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/lva_service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * Message for requesting list of Operators.
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.ListOperatorsRequest} + */ +public final class ListOperatorsRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.ListOperatorsRequest) + ListOperatorsRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListOperatorsRequest.newBuilder() to construct. + private ListOperatorsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListOperatorsRequest() { + parent_ = ""; + pageToken_ = ""; + filter_ = ""; + orderBy_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListOperatorsRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.LvaServiceProto + .internal_static_google_cloud_visionai_v1_ListOperatorsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.LvaServiceProto + .internal_static_google_cloud_visionai_v1_ListOperatorsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.ListOperatorsRequest.class, + com.google.cloud.visionai.v1.ListOperatorsRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + /** + * + * + *
+   * Required. Parent value for ListOperatorsRequest.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + 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(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Parent value for ListOperatorsRequest.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 2; + private int pageSize_ = 0; + /** + * + * + *
+   * Requested page size. Server may return fewer items than requested.
+   * If unspecified, server will pick an appropriate default.
+   * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object pageToken_ = ""; + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + 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(); + pageToken_ = s; + return s; + } + } + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FILTER_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object filter_ = ""; + /** + * + * + *
+   * Filtering results.
+   * 
+ * + * string filter = 4; + * + * @return The filter. + */ + @java.lang.Override + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + 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(); + filter_ = s; + return s; + } + } + /** + * + * + *
+   * Filtering results.
+   * 
+ * + * string filter = 4; + * + * @return The bytes for filter. + */ + @java.lang.Override + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ORDER_BY_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object orderBy_ = ""; + /** + * + * + *
+   * Hint for how to order the results.
+   * 
+ * + * string order_by = 5; + * + * @return The orderBy. + */ + @java.lang.Override + public java.lang.String getOrderBy() { + java.lang.Object ref = orderBy_; + 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(); + orderBy_ = s; + return s; + } + } + /** + * + * + *
+   * Hint for how to order the results.
+   * 
+ * + * string order_by = 5; + * + * @return The bytes for orderBy. + */ + @java.lang.Override + public com.google.protobuf.ByteString getOrderByBytes() { + java.lang.Object ref = orderBy_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + orderBy_ = 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, filter_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(orderBy_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, orderBy_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, filter_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(orderBy_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, orderBy_); + } + size += getUnknownFields().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.visionai.v1.ListOperatorsRequest)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.ListOperatorsRequest other = + (com.google.cloud.visionai.v1.ListOperatorsRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (!getFilter().equals(other.getFilter())) return false; + if (!getOrderBy().equals(other.getOrderBy())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + hash = (37 * hash) + FILTER_FIELD_NUMBER; + hash = (53 * hash) + getFilter().hashCode(); + hash = (37 * hash) + ORDER_BY_FIELD_NUMBER; + hash = (53 * hash) + getOrderBy().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.ListOperatorsRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ListOperatorsRequest 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.visionai.v1.ListOperatorsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ListOperatorsRequest 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.visionai.v1.ListOperatorsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ListOperatorsRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.ListOperatorsRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ListOperatorsRequest 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.visionai.v1.ListOperatorsRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ListOperatorsRequest 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.visionai.v1.ListOperatorsRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ListOperatorsRequest 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.visionai.v1.ListOperatorsRequest 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; + } + /** + * + * + *
+   * Message for requesting list of Operators.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.ListOperatorsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.ListOperatorsRequest) + com.google.cloud.visionai.v1.ListOperatorsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.LvaServiceProto + .internal_static_google_cloud_visionai_v1_ListOperatorsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.LvaServiceProto + .internal_static_google_cloud_visionai_v1_ListOperatorsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.ListOperatorsRequest.class, + com.google.cloud.visionai.v1.ListOperatorsRequest.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.ListOperatorsRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + pageSize_ = 0; + pageToken_ = ""; + filter_ = ""; + orderBy_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.LvaServiceProto + .internal_static_google_cloud_visionai_v1_ListOperatorsRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ListOperatorsRequest getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.ListOperatorsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ListOperatorsRequest build() { + com.google.cloud.visionai.v1.ListOperatorsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ListOperatorsRequest buildPartial() { + com.google.cloud.visionai.v1.ListOperatorsRequest result = + new com.google.cloud.visionai.v1.ListOperatorsRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.visionai.v1.ListOperatorsRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.pageSize_ = pageSize_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.pageToken_ = pageToken_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.filter_ = filter_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.orderBy_ = orderBy_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.ListOperatorsRequest) { + return mergeFrom((com.google.cloud.visionai.v1.ListOperatorsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.ListOperatorsRequest other) { + if (other == com.google.cloud.visionai.v1.ListOperatorsRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getFilter().isEmpty()) { + filter_ = other.filter_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (!other.getOrderBy().isEmpty()) { + orderBy_ = other.orderBy_; + bitField0_ |= 0x00000010; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + pageSize_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + orderBy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 42 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. Parent value for ListOperatorsRequest.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Parent value for ListOperatorsRequest.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Parent value for ListOperatorsRequest.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Parent value for ListOperatorsRequest.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Parent value for ListOperatorsRequest.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private int pageSize_; + /** + * + * + *
+     * Requested page size. Server may return fewer items than requested.
+     * If unspecified, server will pick an appropriate default.
+     * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + * + * + *
+     * Requested page size. Server may return fewer items than requested.
+     * If unspecified, server will pick an appropriate default.
+     * 
+ * + * int32 page_size = 2; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Requested page size. Server may return fewer items than requested.
+     * If unspecified, server will pick an appropriate default.
+     * 
+ * + * int32 page_size = 2; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + bitField0_ = (bitField0_ & ~0x00000002); + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string page_token = 3; + * + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + pageToken_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string page_token = 3; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + pageToken_ = getDefaultInstance().getPageToken(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string page_token = 3; + * + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + pageToken_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object filter_ = ""; + /** + * + * + *
+     * Filtering results.
+     * 
+ * + * string filter = 4; + * + * @return The filter. + */ + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Filtering results.
+     * 
+ * + * string filter = 4; + * + * @return The bytes for filter. + */ + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Filtering results.
+     * 
+ * + * string filter = 4; + * + * @param value The filter to set. + * @return This builder for chaining. + */ + public Builder setFilter(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + filter_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Filtering results.
+     * 
+ * + * string filter = 4; + * + * @return This builder for chaining. + */ + public Builder clearFilter() { + filter_ = getDefaultInstance().getFilter(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+     * Filtering results.
+     * 
+ * + * string filter = 4; + * + * @param value The bytes for filter to set. + * @return This builder for chaining. + */ + public Builder setFilterBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + filter_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private java.lang.Object orderBy_ = ""; + /** + * + * + *
+     * Hint for how to order the results.
+     * 
+ * + * string order_by = 5; + * + * @return The orderBy. + */ + public java.lang.String getOrderBy() { + java.lang.Object ref = orderBy_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + orderBy_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Hint for how to order the results.
+     * 
+ * + * string order_by = 5; + * + * @return The bytes for orderBy. + */ + public com.google.protobuf.ByteString getOrderByBytes() { + java.lang.Object ref = orderBy_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + orderBy_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Hint for how to order the results.
+     * 
+ * + * string order_by = 5; + * + * @param value The orderBy to set. + * @return This builder for chaining. + */ + public Builder setOrderBy(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + orderBy_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Hint for how to order the results.
+     * 
+ * + * string order_by = 5; + * + * @return This builder for chaining. + */ + public Builder clearOrderBy() { + orderBy_ = getDefaultInstance().getOrderBy(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + /** + * + * + *
+     * Hint for how to order the results.
+     * 
+ * + * string order_by = 5; + * + * @param value The bytes for orderBy to set. + * @return This builder for chaining. + */ + public Builder setOrderByBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + orderBy_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.ListOperatorsRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.ListOperatorsRequest) + private static final com.google.cloud.visionai.v1.ListOperatorsRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.ListOperatorsRequest(); + } + + public static com.google.cloud.visionai.v1.ListOperatorsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListOperatorsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.ListOperatorsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListOperatorsRequestOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListOperatorsRequestOrBuilder.java new file mode 100644 index 000000000000..f6fdc937e211 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListOperatorsRequestOrBuilder.java @@ -0,0 +1,144 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/lva_service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface ListOperatorsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.ListOperatorsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Parent value for ListOperatorsRequest.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. Parent value for ListOperatorsRequest.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Requested page size. Server may return fewer items than requested.
+   * If unspecified, server will pick an appropriate default.
+   * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); + + /** + * + * + *
+   * Filtering results.
+   * 
+ * + * string filter = 4; + * + * @return The filter. + */ + java.lang.String getFilter(); + /** + * + * + *
+   * Filtering results.
+   * 
+ * + * string filter = 4; + * + * @return The bytes for filter. + */ + com.google.protobuf.ByteString getFilterBytes(); + + /** + * + * + *
+   * Hint for how to order the results.
+   * 
+ * + * string order_by = 5; + * + * @return The orderBy. + */ + java.lang.String getOrderBy(); + /** + * + * + *
+   * Hint for how to order the results.
+   * 
+ * + * string order_by = 5; + * + * @return The bytes for orderBy. + */ + com.google.protobuf.ByteString getOrderByBytes(); +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListOperatorsResponse.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListOperatorsResponse.java new file mode 100644 index 000000000000..79aecde3b8c3 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListOperatorsResponse.java @@ -0,0 +1,1394 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/lva_service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * Message for response to listing Operators.
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.ListOperatorsResponse} + */ +public final class ListOperatorsResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.ListOperatorsResponse) + ListOperatorsResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListOperatorsResponse.newBuilder() to construct. + private ListOperatorsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListOperatorsResponse() { + operators_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + unreachable_ = com.google.protobuf.LazyStringArrayList.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListOperatorsResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.LvaServiceProto + .internal_static_google_cloud_visionai_v1_ListOperatorsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.LvaServiceProto + .internal_static_google_cloud_visionai_v1_ListOperatorsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.ListOperatorsResponse.class, + com.google.cloud.visionai.v1.ListOperatorsResponse.Builder.class); + } + + public static final int OPERATORS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List operators_; + /** + * + * + *
+   * The list of Operator
+   * 
+ * + * repeated .google.cloud.visionai.v1.Operator operators = 1; + */ + @java.lang.Override + public java.util.List getOperatorsList() { + return operators_; + } + /** + * + * + *
+   * The list of Operator
+   * 
+ * + * repeated .google.cloud.visionai.v1.Operator operators = 1; + */ + @java.lang.Override + public java.util.List + getOperatorsOrBuilderList() { + return operators_; + } + /** + * + * + *
+   * The list of Operator
+   * 
+ * + * repeated .google.cloud.visionai.v1.Operator operators = 1; + */ + @java.lang.Override + public int getOperatorsCount() { + return operators_.size(); + } + /** + * + * + *
+   * The list of Operator
+   * 
+ * + * repeated .google.cloud.visionai.v1.Operator operators = 1; + */ + @java.lang.Override + public com.google.cloud.visionai.v1.Operator getOperators(int index) { + return operators_.get(index); + } + /** + * + * + *
+   * The list of Operator
+   * 
+ * + * repeated .google.cloud.visionai.v1.Operator operators = 1; + */ + @java.lang.Override + public com.google.cloud.visionai.v1.OperatorOrBuilder getOperatorsOrBuilder(int index) { + return operators_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + 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(); + nextPageToken_ = s; + return s; + } + } + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int UNREACHABLE_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList unreachable_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @return A list containing the unreachable. + */ + public com.google.protobuf.ProtocolStringList getUnreachableList() { + return unreachable_; + } + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @return The count of unreachable. + */ + public int getUnreachableCount() { + return unreachable_.size(); + } + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + public java.lang.String getUnreachable(int index) { + return unreachable_.get(index); + } + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the value to return. + * @return The bytes of the unreachable at the given index. + */ + public com.google.protobuf.ByteString getUnreachableBytes(int index) { + return unreachable_.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 < operators_.size(); i++) { + output.writeMessage(1, operators_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + } + for (int i = 0; i < unreachable_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, unreachable_.getRaw(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < operators_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, operators_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + } + { + int dataSize = 0; + for (int i = 0; i < unreachable_.size(); i++) { + dataSize += computeStringSizeNoTag(unreachable_.getRaw(i)); + } + size += dataSize; + size += 1 * getUnreachableList().size(); + } + size += getUnknownFields().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.visionai.v1.ListOperatorsResponse)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.ListOperatorsResponse other = + (com.google.cloud.visionai.v1.ListOperatorsResponse) obj; + + if (!getOperatorsList().equals(other.getOperatorsList())) return false; + if (!getNextPageToken().equals(other.getNextPageToken())) return false; + if (!getUnreachableList().equals(other.getUnreachableList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getOperatorsCount() > 0) { + hash = (37 * hash) + OPERATORS_FIELD_NUMBER; + hash = (53 * hash) + getOperatorsList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + if (getUnreachableCount() > 0) { + hash = (37 * hash) + UNREACHABLE_FIELD_NUMBER; + hash = (53 * hash) + getUnreachableList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.ListOperatorsResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ListOperatorsResponse 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.visionai.v1.ListOperatorsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ListOperatorsResponse 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.visionai.v1.ListOperatorsResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ListOperatorsResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.ListOperatorsResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ListOperatorsResponse 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.visionai.v1.ListOperatorsResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ListOperatorsResponse 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.visionai.v1.ListOperatorsResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ListOperatorsResponse 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.visionai.v1.ListOperatorsResponse 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; + } + /** + * + * + *
+   * Message for response to listing Operators.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.ListOperatorsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.ListOperatorsResponse) + com.google.cloud.visionai.v1.ListOperatorsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.LvaServiceProto + .internal_static_google_cloud_visionai_v1_ListOperatorsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.LvaServiceProto + .internal_static_google_cloud_visionai_v1_ListOperatorsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.ListOperatorsResponse.class, + com.google.cloud.visionai.v1.ListOperatorsResponse.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.ListOperatorsResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (operatorsBuilder_ == null) { + operators_ = java.util.Collections.emptyList(); + } else { + operators_ = null; + operatorsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + nextPageToken_ = ""; + unreachable_ = com.google.protobuf.LazyStringArrayList.emptyList(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.LvaServiceProto + .internal_static_google_cloud_visionai_v1_ListOperatorsResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ListOperatorsResponse getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.ListOperatorsResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ListOperatorsResponse build() { + com.google.cloud.visionai.v1.ListOperatorsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ListOperatorsResponse buildPartial() { + com.google.cloud.visionai.v1.ListOperatorsResponse result = + new com.google.cloud.visionai.v1.ListOperatorsResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.visionai.v1.ListOperatorsResponse result) { + if (operatorsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + operators_ = java.util.Collections.unmodifiableList(operators_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.operators_ = operators_; + } else { + result.operators_ = operatorsBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.visionai.v1.ListOperatorsResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.nextPageToken_ = nextPageToken_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + unreachable_.makeImmutable(); + result.unreachable_ = unreachable_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.ListOperatorsResponse) { + return mergeFrom((com.google.cloud.visionai.v1.ListOperatorsResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.ListOperatorsResponse other) { + if (other == com.google.cloud.visionai.v1.ListOperatorsResponse.getDefaultInstance()) + return this; + if (operatorsBuilder_ == null) { + if (!other.operators_.isEmpty()) { + if (operators_.isEmpty()) { + operators_ = other.operators_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureOperatorsIsMutable(); + operators_.addAll(other.operators_); + } + onChanged(); + } + } else { + if (!other.operators_.isEmpty()) { + if (operatorsBuilder_.isEmpty()) { + operatorsBuilder_.dispose(); + operatorsBuilder_ = null; + operators_ = other.operators_; + bitField0_ = (bitField0_ & ~0x00000001); + operatorsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getOperatorsFieldBuilder() + : null; + } else { + operatorsBuilder_.addAllMessages(other.operators_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.unreachable_.isEmpty()) { + if (unreachable_.isEmpty()) { + unreachable_ = other.unreachable_; + bitField0_ |= 0x00000004; + } else { + ensureUnreachableIsMutable(); + unreachable_.addAll(other.unreachable_); + } + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.visionai.v1.Operator m = + input.readMessage( + com.google.cloud.visionai.v1.Operator.parser(), extensionRegistry); + if (operatorsBuilder_ == null) { + ensureOperatorsIsMutable(); + operators_.add(m); + } else { + operatorsBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureUnreachableIsMutable(); + unreachable_.add(s); + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List operators_ = + java.util.Collections.emptyList(); + + private void ensureOperatorsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + operators_ = new java.util.ArrayList(operators_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.visionai.v1.Operator, + com.google.cloud.visionai.v1.Operator.Builder, + com.google.cloud.visionai.v1.OperatorOrBuilder> + operatorsBuilder_; + + /** + * + * + *
+     * The list of Operator
+     * 
+ * + * repeated .google.cloud.visionai.v1.Operator operators = 1; + */ + public java.util.List getOperatorsList() { + if (operatorsBuilder_ == null) { + return java.util.Collections.unmodifiableList(operators_); + } else { + return operatorsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * The list of Operator
+     * 
+ * + * repeated .google.cloud.visionai.v1.Operator operators = 1; + */ + public int getOperatorsCount() { + if (operatorsBuilder_ == null) { + return operators_.size(); + } else { + return operatorsBuilder_.getCount(); + } + } + /** + * + * + *
+     * The list of Operator
+     * 
+ * + * repeated .google.cloud.visionai.v1.Operator operators = 1; + */ + public com.google.cloud.visionai.v1.Operator getOperators(int index) { + if (operatorsBuilder_ == null) { + return operators_.get(index); + } else { + return operatorsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * The list of Operator
+     * 
+ * + * repeated .google.cloud.visionai.v1.Operator operators = 1; + */ + public Builder setOperators(int index, com.google.cloud.visionai.v1.Operator value) { + if (operatorsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureOperatorsIsMutable(); + operators_.set(index, value); + onChanged(); + } else { + operatorsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The list of Operator
+     * 
+ * + * repeated .google.cloud.visionai.v1.Operator operators = 1; + */ + public Builder setOperators( + int index, com.google.cloud.visionai.v1.Operator.Builder builderForValue) { + if (operatorsBuilder_ == null) { + ensureOperatorsIsMutable(); + operators_.set(index, builderForValue.build()); + onChanged(); + } else { + operatorsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of Operator
+     * 
+ * + * repeated .google.cloud.visionai.v1.Operator operators = 1; + */ + public Builder addOperators(com.google.cloud.visionai.v1.Operator value) { + if (operatorsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureOperatorsIsMutable(); + operators_.add(value); + onChanged(); + } else { + operatorsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * The list of Operator
+     * 
+ * + * repeated .google.cloud.visionai.v1.Operator operators = 1; + */ + public Builder addOperators(int index, com.google.cloud.visionai.v1.Operator value) { + if (operatorsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureOperatorsIsMutable(); + operators_.add(index, value); + onChanged(); + } else { + operatorsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The list of Operator
+     * 
+ * + * repeated .google.cloud.visionai.v1.Operator operators = 1; + */ + public Builder addOperators(com.google.cloud.visionai.v1.Operator.Builder builderForValue) { + if (operatorsBuilder_ == null) { + ensureOperatorsIsMutable(); + operators_.add(builderForValue.build()); + onChanged(); + } else { + operatorsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of Operator
+     * 
+ * + * repeated .google.cloud.visionai.v1.Operator operators = 1; + */ + public Builder addOperators( + int index, com.google.cloud.visionai.v1.Operator.Builder builderForValue) { + if (operatorsBuilder_ == null) { + ensureOperatorsIsMutable(); + operators_.add(index, builderForValue.build()); + onChanged(); + } else { + operatorsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of Operator
+     * 
+ * + * repeated .google.cloud.visionai.v1.Operator operators = 1; + */ + public Builder addAllOperators( + java.lang.Iterable values) { + if (operatorsBuilder_ == null) { + ensureOperatorsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, operators_); + onChanged(); + } else { + operatorsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * The list of Operator
+     * 
+ * + * repeated .google.cloud.visionai.v1.Operator operators = 1; + */ + public Builder clearOperators() { + if (operatorsBuilder_ == null) { + operators_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + operatorsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The list of Operator
+     * 
+ * + * repeated .google.cloud.visionai.v1.Operator operators = 1; + */ + public Builder removeOperators(int index) { + if (operatorsBuilder_ == null) { + ensureOperatorsIsMutable(); + operators_.remove(index); + onChanged(); + } else { + operatorsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * The list of Operator
+     * 
+ * + * repeated .google.cloud.visionai.v1.Operator operators = 1; + */ + public com.google.cloud.visionai.v1.Operator.Builder getOperatorsBuilder(int index) { + return getOperatorsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * The list of Operator
+     * 
+ * + * repeated .google.cloud.visionai.v1.Operator operators = 1; + */ + public com.google.cloud.visionai.v1.OperatorOrBuilder getOperatorsOrBuilder(int index) { + if (operatorsBuilder_ == null) { + return operators_.get(index); + } else { + return operatorsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * The list of Operator
+     * 
+ * + * repeated .google.cloud.visionai.v1.Operator operators = 1; + */ + public java.util.List + getOperatorsOrBuilderList() { + if (operatorsBuilder_ != null) { + return operatorsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(operators_); + } + } + /** + * + * + *
+     * The list of Operator
+     * 
+ * + * repeated .google.cloud.visionai.v1.Operator operators = 1; + */ + public com.google.cloud.visionai.v1.Operator.Builder addOperatorsBuilder() { + return getOperatorsFieldBuilder() + .addBuilder(com.google.cloud.visionai.v1.Operator.getDefaultInstance()); + } + /** + * + * + *
+     * The list of Operator
+     * 
+ * + * repeated .google.cloud.visionai.v1.Operator operators = 1; + */ + public com.google.cloud.visionai.v1.Operator.Builder addOperatorsBuilder(int index) { + return getOperatorsFieldBuilder() + .addBuilder(index, com.google.cloud.visionai.v1.Operator.getDefaultInstance()); + } + /** + * + * + *
+     * The list of Operator
+     * 
+ * + * repeated .google.cloud.visionai.v1.Operator operators = 1; + */ + public java.util.List getOperatorsBuilderList() { + return getOperatorsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.visionai.v1.Operator, + com.google.cloud.visionai.v1.Operator.Builder, + com.google.cloud.visionai.v1.OperatorOrBuilder> + getOperatorsFieldBuilder() { + if (operatorsBuilder_ == null) { + operatorsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.visionai.v1.Operator, + com.google.cloud.visionai.v1.Operator.Builder, + com.google.cloud.visionai.v1.OperatorOrBuilder>( + operators_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + operators_ = null; + } + return operatorsBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + nextPageToken_ = getDefaultInstance().getNextPageToken(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList unreachable_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureUnreachableIsMutable() { + if (!unreachable_.isModifiable()) { + unreachable_ = new com.google.protobuf.LazyStringArrayList(unreachable_); + } + bitField0_ |= 0x00000004; + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @return A list containing the unreachable. + */ + public com.google.protobuf.ProtocolStringList getUnreachableList() { + unreachable_.makeImmutable(); + return unreachable_; + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @return The count of unreachable. + */ + public int getUnreachableCount() { + return unreachable_.size(); + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + public java.lang.String getUnreachable(int index) { + return unreachable_.get(index); + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the value to return. + * @return The bytes of the unreachable at the given index. + */ + public com.google.protobuf.ByteString getUnreachableBytes(int index) { + return unreachable_.getByteString(index); + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param index The index to set the value at. + * @param value The unreachable to set. + * @return This builder for chaining. + */ + public Builder setUnreachable(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureUnreachableIsMutable(); + unreachable_.set(index, value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param value The unreachable to add. + * @return This builder for chaining. + */ + public Builder addUnreachable(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureUnreachableIsMutable(); + unreachable_.add(value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param values The unreachable to add. + * @return This builder for chaining. + */ + public Builder addAllUnreachable(java.lang.Iterable values) { + ensureUnreachableIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, unreachable_); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @return This builder for chaining. + */ + public Builder clearUnreachable() { + unreachable_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + ; + onChanged(); + return this; + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param value The bytes of the unreachable to add. + * @return This builder for chaining. + */ + public Builder addUnreachableBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureUnreachableIsMutable(); + unreachable_.add(value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.ListOperatorsResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.ListOperatorsResponse) + private static final com.google.cloud.visionai.v1.ListOperatorsResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.ListOperatorsResponse(); + } + + public static com.google.cloud.visionai.v1.ListOperatorsResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListOperatorsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.ListOperatorsResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListOperatorsResponseOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListOperatorsResponseOrBuilder.java new file mode 100644 index 000000000000..6cc42339cf76 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListOperatorsResponseOrBuilder.java @@ -0,0 +1,154 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/lva_service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface ListOperatorsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.ListOperatorsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The list of Operator
+   * 
+ * + * repeated .google.cloud.visionai.v1.Operator operators = 1; + */ + java.util.List getOperatorsList(); + /** + * + * + *
+   * The list of Operator
+   * 
+ * + * repeated .google.cloud.visionai.v1.Operator operators = 1; + */ + com.google.cloud.visionai.v1.Operator getOperators(int index); + /** + * + * + *
+   * The list of Operator
+   * 
+ * + * repeated .google.cloud.visionai.v1.Operator operators = 1; + */ + int getOperatorsCount(); + /** + * + * + *
+   * The list of Operator
+   * 
+ * + * repeated .google.cloud.visionai.v1.Operator operators = 1; + */ + java.util.List + getOperatorsOrBuilderList(); + /** + * + * + *
+   * The list of Operator
+   * 
+ * + * repeated .google.cloud.visionai.v1.Operator operators = 1; + */ + com.google.cloud.visionai.v1.OperatorOrBuilder getOperatorsOrBuilder(int index); + + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); + + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @return A list containing the unreachable. + */ + java.util.List getUnreachableList(); + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @return The count of unreachable. + */ + int getUnreachableCount(); + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + java.lang.String getUnreachable(int index); + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the value to return. + * @return The bytes of the unreachable at the given index. + */ + com.google.protobuf.ByteString getUnreachableBytes(int index); +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListPrebuiltProcessorsRequest.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListPrebuiltProcessorsRequest.java new file mode 100644 index 000000000000..f4f0eae61d96 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListPrebuiltProcessorsRequest.java @@ -0,0 +1,640 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/platform.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * Request Message for listing Prebuilt Processors.
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.ListPrebuiltProcessorsRequest} + */ +public final class ListPrebuiltProcessorsRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.ListPrebuiltProcessorsRequest) + ListPrebuiltProcessorsRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListPrebuiltProcessorsRequest.newBuilder() to construct. + private ListPrebuiltProcessorsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListPrebuiltProcessorsRequest() { + parent_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListPrebuiltProcessorsRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_ListPrebuiltProcessorsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_ListPrebuiltProcessorsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.ListPrebuiltProcessorsRequest.class, + com.google.cloud.visionai.v1.ListPrebuiltProcessorsRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + /** + * + * + *
+   * Required. Parent path.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + 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(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Parent path.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + size += getUnknownFields().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.visionai.v1.ListPrebuiltProcessorsRequest)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.ListPrebuiltProcessorsRequest other = + (com.google.cloud.visionai.v1.ListPrebuiltProcessorsRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.ListPrebuiltProcessorsRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ListPrebuiltProcessorsRequest 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.visionai.v1.ListPrebuiltProcessorsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ListPrebuiltProcessorsRequest 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.visionai.v1.ListPrebuiltProcessorsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ListPrebuiltProcessorsRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.ListPrebuiltProcessorsRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ListPrebuiltProcessorsRequest 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.visionai.v1.ListPrebuiltProcessorsRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ListPrebuiltProcessorsRequest 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.visionai.v1.ListPrebuiltProcessorsRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ListPrebuiltProcessorsRequest 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.visionai.v1.ListPrebuiltProcessorsRequest 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; + } + /** + * + * + *
+   * Request Message for listing Prebuilt Processors.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.ListPrebuiltProcessorsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.ListPrebuiltProcessorsRequest) + com.google.cloud.visionai.v1.ListPrebuiltProcessorsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_ListPrebuiltProcessorsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_ListPrebuiltProcessorsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.ListPrebuiltProcessorsRequest.class, + com.google.cloud.visionai.v1.ListPrebuiltProcessorsRequest.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.ListPrebuiltProcessorsRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_ListPrebuiltProcessorsRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ListPrebuiltProcessorsRequest getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.ListPrebuiltProcessorsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ListPrebuiltProcessorsRequest build() { + com.google.cloud.visionai.v1.ListPrebuiltProcessorsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ListPrebuiltProcessorsRequest buildPartial() { + com.google.cloud.visionai.v1.ListPrebuiltProcessorsRequest result = + new com.google.cloud.visionai.v1.ListPrebuiltProcessorsRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.visionai.v1.ListPrebuiltProcessorsRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.ListPrebuiltProcessorsRequest) { + return mergeFrom((com.google.cloud.visionai.v1.ListPrebuiltProcessorsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.ListPrebuiltProcessorsRequest other) { + if (other == com.google.cloud.visionai.v1.ListPrebuiltProcessorsRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. Parent path.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Parent path.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Parent path.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Parent path.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Parent path.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.ListPrebuiltProcessorsRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.ListPrebuiltProcessorsRequest) + private static final com.google.cloud.visionai.v1.ListPrebuiltProcessorsRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.ListPrebuiltProcessorsRequest(); + } + + public static com.google.cloud.visionai.v1.ListPrebuiltProcessorsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListPrebuiltProcessorsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.ListPrebuiltProcessorsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListPrebuiltProcessorsRequestOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListPrebuiltProcessorsRequestOrBuilder.java new file mode 100644 index 000000000000..668855a46d3d --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListPrebuiltProcessorsRequestOrBuilder.java @@ -0,0 +1,55 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/platform.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface ListPrebuiltProcessorsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.ListPrebuiltProcessorsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Parent path.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. Parent path.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListPrebuiltProcessorsResponse.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListPrebuiltProcessorsResponse.java new file mode 100644 index 000000000000..c822ceebc3b0 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListPrebuiltProcessorsResponse.java @@ -0,0 +1,938 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/platform.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * Response Message for listing Prebuilt Processors.
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.ListPrebuiltProcessorsResponse} + */ +public final class ListPrebuiltProcessorsResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.ListPrebuiltProcessorsResponse) + ListPrebuiltProcessorsResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListPrebuiltProcessorsResponse.newBuilder() to construct. + private ListPrebuiltProcessorsResponse( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListPrebuiltProcessorsResponse() { + processors_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListPrebuiltProcessorsResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_ListPrebuiltProcessorsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_ListPrebuiltProcessorsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.ListPrebuiltProcessorsResponse.class, + com.google.cloud.visionai.v1.ListPrebuiltProcessorsResponse.Builder.class); + } + + public static final int PROCESSORS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List processors_; + /** + * + * + *
+   * The list of Processor.
+   * 
+ * + * repeated .google.cloud.visionai.v1.Processor processors = 1; + */ + @java.lang.Override + public java.util.List getProcessorsList() { + return processors_; + } + /** + * + * + *
+   * The list of Processor.
+   * 
+ * + * repeated .google.cloud.visionai.v1.Processor processors = 1; + */ + @java.lang.Override + public java.util.List + getProcessorsOrBuilderList() { + return processors_; + } + /** + * + * + *
+   * The list of Processor.
+   * 
+ * + * repeated .google.cloud.visionai.v1.Processor processors = 1; + */ + @java.lang.Override + public int getProcessorsCount() { + return processors_.size(); + } + /** + * + * + *
+   * The list of Processor.
+   * 
+ * + * repeated .google.cloud.visionai.v1.Processor processors = 1; + */ + @java.lang.Override + public com.google.cloud.visionai.v1.Processor getProcessors(int index) { + return processors_.get(index); + } + /** + * + * + *
+   * The list of Processor.
+   * 
+ * + * repeated .google.cloud.visionai.v1.Processor processors = 1; + */ + @java.lang.Override + public com.google.cloud.visionai.v1.ProcessorOrBuilder getProcessorsOrBuilder(int index) { + return processors_.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 < processors_.size(); i++) { + output.writeMessage(1, processors_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < processors_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, processors_.get(i)); + } + size += getUnknownFields().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.visionai.v1.ListPrebuiltProcessorsResponse)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.ListPrebuiltProcessorsResponse other = + (com.google.cloud.visionai.v1.ListPrebuiltProcessorsResponse) obj; + + if (!getProcessorsList().equals(other.getProcessorsList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getProcessorsCount() > 0) { + hash = (37 * hash) + PROCESSORS_FIELD_NUMBER; + hash = (53 * hash) + getProcessorsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.ListPrebuiltProcessorsResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ListPrebuiltProcessorsResponse 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.visionai.v1.ListPrebuiltProcessorsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ListPrebuiltProcessorsResponse 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.visionai.v1.ListPrebuiltProcessorsResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ListPrebuiltProcessorsResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.ListPrebuiltProcessorsResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ListPrebuiltProcessorsResponse 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.visionai.v1.ListPrebuiltProcessorsResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ListPrebuiltProcessorsResponse 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.visionai.v1.ListPrebuiltProcessorsResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ListPrebuiltProcessorsResponse 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.visionai.v1.ListPrebuiltProcessorsResponse 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; + } + /** + * + * + *
+   * Response Message for listing Prebuilt Processors.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.ListPrebuiltProcessorsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.ListPrebuiltProcessorsResponse) + com.google.cloud.visionai.v1.ListPrebuiltProcessorsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_ListPrebuiltProcessorsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_ListPrebuiltProcessorsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.ListPrebuiltProcessorsResponse.class, + com.google.cloud.visionai.v1.ListPrebuiltProcessorsResponse.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.ListPrebuiltProcessorsResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (processorsBuilder_ == null) { + processors_ = java.util.Collections.emptyList(); + } else { + processors_ = null; + processorsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_ListPrebuiltProcessorsResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ListPrebuiltProcessorsResponse getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.ListPrebuiltProcessorsResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ListPrebuiltProcessorsResponse build() { + com.google.cloud.visionai.v1.ListPrebuiltProcessorsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ListPrebuiltProcessorsResponse buildPartial() { + com.google.cloud.visionai.v1.ListPrebuiltProcessorsResponse result = + new com.google.cloud.visionai.v1.ListPrebuiltProcessorsResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.visionai.v1.ListPrebuiltProcessorsResponse result) { + if (processorsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + processors_ = java.util.Collections.unmodifiableList(processors_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.processors_ = processors_; + } else { + result.processors_ = processorsBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.visionai.v1.ListPrebuiltProcessorsResponse result) { + int from_bitField0_ = bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.ListPrebuiltProcessorsResponse) { + return mergeFrom((com.google.cloud.visionai.v1.ListPrebuiltProcessorsResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.ListPrebuiltProcessorsResponse other) { + if (other == com.google.cloud.visionai.v1.ListPrebuiltProcessorsResponse.getDefaultInstance()) + return this; + if (processorsBuilder_ == null) { + if (!other.processors_.isEmpty()) { + if (processors_.isEmpty()) { + processors_ = other.processors_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureProcessorsIsMutable(); + processors_.addAll(other.processors_); + } + onChanged(); + } + } else { + if (!other.processors_.isEmpty()) { + if (processorsBuilder_.isEmpty()) { + processorsBuilder_.dispose(); + processorsBuilder_ = null; + processors_ = other.processors_; + bitField0_ = (bitField0_ & ~0x00000001); + processorsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getProcessorsFieldBuilder() + : null; + } else { + processorsBuilder_.addAllMessages(other.processors_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.visionai.v1.Processor m = + input.readMessage( + com.google.cloud.visionai.v1.Processor.parser(), extensionRegistry); + if (processorsBuilder_ == null) { + ensureProcessorsIsMutable(); + processors_.add(m); + } else { + processorsBuilder_.addMessage(m); + } + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List processors_ = + java.util.Collections.emptyList(); + + private void ensureProcessorsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + processors_ = new java.util.ArrayList(processors_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.visionai.v1.Processor, + com.google.cloud.visionai.v1.Processor.Builder, + com.google.cloud.visionai.v1.ProcessorOrBuilder> + processorsBuilder_; + + /** + * + * + *
+     * The list of Processor.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Processor processors = 1; + */ + public java.util.List getProcessorsList() { + if (processorsBuilder_ == null) { + return java.util.Collections.unmodifiableList(processors_); + } else { + return processorsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * The list of Processor.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Processor processors = 1; + */ + public int getProcessorsCount() { + if (processorsBuilder_ == null) { + return processors_.size(); + } else { + return processorsBuilder_.getCount(); + } + } + /** + * + * + *
+     * The list of Processor.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Processor processors = 1; + */ + public com.google.cloud.visionai.v1.Processor getProcessors(int index) { + if (processorsBuilder_ == null) { + return processors_.get(index); + } else { + return processorsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * The list of Processor.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Processor processors = 1; + */ + public Builder setProcessors(int index, com.google.cloud.visionai.v1.Processor value) { + if (processorsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureProcessorsIsMutable(); + processors_.set(index, value); + onChanged(); + } else { + processorsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The list of Processor.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Processor processors = 1; + */ + public Builder setProcessors( + int index, com.google.cloud.visionai.v1.Processor.Builder builderForValue) { + if (processorsBuilder_ == null) { + ensureProcessorsIsMutable(); + processors_.set(index, builderForValue.build()); + onChanged(); + } else { + processorsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of Processor.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Processor processors = 1; + */ + public Builder addProcessors(com.google.cloud.visionai.v1.Processor value) { + if (processorsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureProcessorsIsMutable(); + processors_.add(value); + onChanged(); + } else { + processorsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * The list of Processor.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Processor processors = 1; + */ + public Builder addProcessors(int index, com.google.cloud.visionai.v1.Processor value) { + if (processorsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureProcessorsIsMutable(); + processors_.add(index, value); + onChanged(); + } else { + processorsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The list of Processor.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Processor processors = 1; + */ + public Builder addProcessors(com.google.cloud.visionai.v1.Processor.Builder builderForValue) { + if (processorsBuilder_ == null) { + ensureProcessorsIsMutable(); + processors_.add(builderForValue.build()); + onChanged(); + } else { + processorsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of Processor.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Processor processors = 1; + */ + public Builder addProcessors( + int index, com.google.cloud.visionai.v1.Processor.Builder builderForValue) { + if (processorsBuilder_ == null) { + ensureProcessorsIsMutable(); + processors_.add(index, builderForValue.build()); + onChanged(); + } else { + processorsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of Processor.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Processor processors = 1; + */ + public Builder addAllProcessors( + java.lang.Iterable values) { + if (processorsBuilder_ == null) { + ensureProcessorsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, processors_); + onChanged(); + } else { + processorsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * The list of Processor.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Processor processors = 1; + */ + public Builder clearProcessors() { + if (processorsBuilder_ == null) { + processors_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + processorsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The list of Processor.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Processor processors = 1; + */ + public Builder removeProcessors(int index) { + if (processorsBuilder_ == null) { + ensureProcessorsIsMutable(); + processors_.remove(index); + onChanged(); + } else { + processorsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * The list of Processor.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Processor processors = 1; + */ + public com.google.cloud.visionai.v1.Processor.Builder getProcessorsBuilder(int index) { + return getProcessorsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * The list of Processor.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Processor processors = 1; + */ + public com.google.cloud.visionai.v1.ProcessorOrBuilder getProcessorsOrBuilder(int index) { + if (processorsBuilder_ == null) { + return processors_.get(index); + } else { + return processorsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * The list of Processor.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Processor processors = 1; + */ + public java.util.List + getProcessorsOrBuilderList() { + if (processorsBuilder_ != null) { + return processorsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(processors_); + } + } + /** + * + * + *
+     * The list of Processor.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Processor processors = 1; + */ + public com.google.cloud.visionai.v1.Processor.Builder addProcessorsBuilder() { + return getProcessorsFieldBuilder() + .addBuilder(com.google.cloud.visionai.v1.Processor.getDefaultInstance()); + } + /** + * + * + *
+     * The list of Processor.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Processor processors = 1; + */ + public com.google.cloud.visionai.v1.Processor.Builder addProcessorsBuilder(int index) { + return getProcessorsFieldBuilder() + .addBuilder(index, com.google.cloud.visionai.v1.Processor.getDefaultInstance()); + } + /** + * + * + *
+     * The list of Processor.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Processor processors = 1; + */ + public java.util.List + getProcessorsBuilderList() { + return getProcessorsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.visionai.v1.Processor, + com.google.cloud.visionai.v1.Processor.Builder, + com.google.cloud.visionai.v1.ProcessorOrBuilder> + getProcessorsFieldBuilder() { + if (processorsBuilder_ == null) { + processorsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.visionai.v1.Processor, + com.google.cloud.visionai.v1.Processor.Builder, + com.google.cloud.visionai.v1.ProcessorOrBuilder>( + processors_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + processors_ = null; + } + return processorsBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.ListPrebuiltProcessorsResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.ListPrebuiltProcessorsResponse) + private static final com.google.cloud.visionai.v1.ListPrebuiltProcessorsResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.ListPrebuiltProcessorsResponse(); + } + + public static com.google.cloud.visionai.v1.ListPrebuiltProcessorsResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListPrebuiltProcessorsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.ListPrebuiltProcessorsResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListPrebuiltProcessorsResponseOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListPrebuiltProcessorsResponseOrBuilder.java new file mode 100644 index 000000000000..88253d10c848 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListPrebuiltProcessorsResponseOrBuilder.java @@ -0,0 +1,78 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/platform.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface ListPrebuiltProcessorsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.ListPrebuiltProcessorsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The list of Processor.
+   * 
+ * + * repeated .google.cloud.visionai.v1.Processor processors = 1; + */ + java.util.List getProcessorsList(); + /** + * + * + *
+   * The list of Processor.
+   * 
+ * + * repeated .google.cloud.visionai.v1.Processor processors = 1; + */ + com.google.cloud.visionai.v1.Processor getProcessors(int index); + /** + * + * + *
+   * The list of Processor.
+   * 
+ * + * repeated .google.cloud.visionai.v1.Processor processors = 1; + */ + int getProcessorsCount(); + /** + * + * + *
+   * The list of Processor.
+   * 
+ * + * repeated .google.cloud.visionai.v1.Processor processors = 1; + */ + java.util.List + getProcessorsOrBuilderList(); + /** + * + * + *
+   * The list of Processor.
+   * 
+ * + * repeated .google.cloud.visionai.v1.Processor processors = 1; + */ + com.google.cloud.visionai.v1.ProcessorOrBuilder getProcessorsOrBuilder(int index); +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListProcessesRequest.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListProcessesRequest.java new file mode 100644 index 000000000000..294cac4bf8ff --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListProcessesRequest.java @@ -0,0 +1,1282 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/lva_service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * Message for requesting list of Processes.
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.ListProcessesRequest} + */ +public final class ListProcessesRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.ListProcessesRequest) + ListProcessesRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListProcessesRequest.newBuilder() to construct. + private ListProcessesRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListProcessesRequest() { + parent_ = ""; + pageToken_ = ""; + filter_ = ""; + orderBy_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListProcessesRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.LvaServiceProto + .internal_static_google_cloud_visionai_v1_ListProcessesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.LvaServiceProto + .internal_static_google_cloud_visionai_v1_ListProcessesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.ListProcessesRequest.class, + com.google.cloud.visionai.v1.ListProcessesRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + /** + * + * + *
+   * Required. Parent value for ListProcessesRequest.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + 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(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Parent value for ListProcessesRequest.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 2; + private int pageSize_ = 0; + /** + * + * + *
+   * Requested page size. Server may return fewer items than requested.
+   * If unspecified, server will pick an appropriate default.
+   * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object pageToken_ = ""; + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + 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(); + pageToken_ = s; + return s; + } + } + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FILTER_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object filter_ = ""; + /** + * + * + *
+   * Filtering results
+   * 
+ * + * string filter = 4; + * + * @return The filter. + */ + @java.lang.Override + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + 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(); + filter_ = s; + return s; + } + } + /** + * + * + *
+   * Filtering results
+   * 
+ * + * string filter = 4; + * + * @return The bytes for filter. + */ + @java.lang.Override + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ORDER_BY_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object orderBy_ = ""; + /** + * + * + *
+   * Hint for how to order the results
+   * 
+ * + * string order_by = 5; + * + * @return The orderBy. + */ + @java.lang.Override + public java.lang.String getOrderBy() { + java.lang.Object ref = orderBy_; + 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(); + orderBy_ = s; + return s; + } + } + /** + * + * + *
+   * Hint for how to order the results
+   * 
+ * + * string order_by = 5; + * + * @return The bytes for orderBy. + */ + @java.lang.Override + public com.google.protobuf.ByteString getOrderByBytes() { + java.lang.Object ref = orderBy_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + orderBy_ = 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, filter_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(orderBy_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, orderBy_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, filter_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(orderBy_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, orderBy_); + } + size += getUnknownFields().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.visionai.v1.ListProcessesRequest)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.ListProcessesRequest other = + (com.google.cloud.visionai.v1.ListProcessesRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (!getFilter().equals(other.getFilter())) return false; + if (!getOrderBy().equals(other.getOrderBy())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + hash = (37 * hash) + FILTER_FIELD_NUMBER; + hash = (53 * hash) + getFilter().hashCode(); + hash = (37 * hash) + ORDER_BY_FIELD_NUMBER; + hash = (53 * hash) + getOrderBy().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.ListProcessesRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ListProcessesRequest 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.visionai.v1.ListProcessesRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ListProcessesRequest 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.visionai.v1.ListProcessesRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ListProcessesRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.ListProcessesRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ListProcessesRequest 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.visionai.v1.ListProcessesRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ListProcessesRequest 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.visionai.v1.ListProcessesRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ListProcessesRequest 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.visionai.v1.ListProcessesRequest 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; + } + /** + * + * + *
+   * Message for requesting list of Processes.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.ListProcessesRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.ListProcessesRequest) + com.google.cloud.visionai.v1.ListProcessesRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.LvaServiceProto + .internal_static_google_cloud_visionai_v1_ListProcessesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.LvaServiceProto + .internal_static_google_cloud_visionai_v1_ListProcessesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.ListProcessesRequest.class, + com.google.cloud.visionai.v1.ListProcessesRequest.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.ListProcessesRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + pageSize_ = 0; + pageToken_ = ""; + filter_ = ""; + orderBy_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.LvaServiceProto + .internal_static_google_cloud_visionai_v1_ListProcessesRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ListProcessesRequest getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.ListProcessesRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ListProcessesRequest build() { + com.google.cloud.visionai.v1.ListProcessesRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ListProcessesRequest buildPartial() { + com.google.cloud.visionai.v1.ListProcessesRequest result = + new com.google.cloud.visionai.v1.ListProcessesRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.visionai.v1.ListProcessesRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.pageSize_ = pageSize_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.pageToken_ = pageToken_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.filter_ = filter_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.orderBy_ = orderBy_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.ListProcessesRequest) { + return mergeFrom((com.google.cloud.visionai.v1.ListProcessesRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.ListProcessesRequest other) { + if (other == com.google.cloud.visionai.v1.ListProcessesRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getFilter().isEmpty()) { + filter_ = other.filter_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (!other.getOrderBy().isEmpty()) { + orderBy_ = other.orderBy_; + bitField0_ |= 0x00000010; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + pageSize_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + orderBy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 42 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. Parent value for ListProcessesRequest.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Parent value for ListProcessesRequest.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Parent value for ListProcessesRequest.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Parent value for ListProcessesRequest.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Parent value for ListProcessesRequest.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private int pageSize_; + /** + * + * + *
+     * Requested page size. Server may return fewer items than requested.
+     * If unspecified, server will pick an appropriate default.
+     * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + * + * + *
+     * Requested page size. Server may return fewer items than requested.
+     * If unspecified, server will pick an appropriate default.
+     * 
+ * + * int32 page_size = 2; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Requested page size. Server may return fewer items than requested.
+     * If unspecified, server will pick an appropriate default.
+     * 
+ * + * int32 page_size = 2; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + bitField0_ = (bitField0_ & ~0x00000002); + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string page_token = 3; + * + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + pageToken_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string page_token = 3; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + pageToken_ = getDefaultInstance().getPageToken(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string page_token = 3; + * + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + pageToken_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object filter_ = ""; + /** + * + * + *
+     * Filtering results
+     * 
+ * + * string filter = 4; + * + * @return The filter. + */ + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Filtering results
+     * 
+ * + * string filter = 4; + * + * @return The bytes for filter. + */ + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Filtering results
+     * 
+ * + * string filter = 4; + * + * @param value The filter to set. + * @return This builder for chaining. + */ + public Builder setFilter(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + filter_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Filtering results
+     * 
+ * + * string filter = 4; + * + * @return This builder for chaining. + */ + public Builder clearFilter() { + filter_ = getDefaultInstance().getFilter(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+     * Filtering results
+     * 
+ * + * string filter = 4; + * + * @param value The bytes for filter to set. + * @return This builder for chaining. + */ + public Builder setFilterBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + filter_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private java.lang.Object orderBy_ = ""; + /** + * + * + *
+     * Hint for how to order the results
+     * 
+ * + * string order_by = 5; + * + * @return The orderBy. + */ + public java.lang.String getOrderBy() { + java.lang.Object ref = orderBy_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + orderBy_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Hint for how to order the results
+     * 
+ * + * string order_by = 5; + * + * @return The bytes for orderBy. + */ + public com.google.protobuf.ByteString getOrderByBytes() { + java.lang.Object ref = orderBy_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + orderBy_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Hint for how to order the results
+     * 
+ * + * string order_by = 5; + * + * @param value The orderBy to set. + * @return This builder for chaining. + */ + public Builder setOrderBy(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + orderBy_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Hint for how to order the results
+     * 
+ * + * string order_by = 5; + * + * @return This builder for chaining. + */ + public Builder clearOrderBy() { + orderBy_ = getDefaultInstance().getOrderBy(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + /** + * + * + *
+     * Hint for how to order the results
+     * 
+ * + * string order_by = 5; + * + * @param value The bytes for orderBy to set. + * @return This builder for chaining. + */ + public Builder setOrderByBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + orderBy_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.ListProcessesRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.ListProcessesRequest) + private static final com.google.cloud.visionai.v1.ListProcessesRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.ListProcessesRequest(); + } + + public static com.google.cloud.visionai.v1.ListProcessesRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListProcessesRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.ListProcessesRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListProcessesRequestOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListProcessesRequestOrBuilder.java new file mode 100644 index 000000000000..03b9ecc1f1f0 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListProcessesRequestOrBuilder.java @@ -0,0 +1,144 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/lva_service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface ListProcessesRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.ListProcessesRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Parent value for ListProcessesRequest.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. Parent value for ListProcessesRequest.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Requested page size. Server may return fewer items than requested.
+   * If unspecified, server will pick an appropriate default.
+   * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); + + /** + * + * + *
+   * Filtering results
+   * 
+ * + * string filter = 4; + * + * @return The filter. + */ + java.lang.String getFilter(); + /** + * + * + *
+   * Filtering results
+   * 
+ * + * string filter = 4; + * + * @return The bytes for filter. + */ + com.google.protobuf.ByteString getFilterBytes(); + + /** + * + * + *
+   * Hint for how to order the results
+   * 
+ * + * string order_by = 5; + * + * @return The orderBy. + */ + java.lang.String getOrderBy(); + /** + * + * + *
+   * Hint for how to order the results
+   * 
+ * + * string order_by = 5; + * + * @return The bytes for orderBy. + */ + com.google.protobuf.ByteString getOrderByBytes(); +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListProcessesResponse.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListProcessesResponse.java new file mode 100644 index 000000000000..1eaf6ffcb0df --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListProcessesResponse.java @@ -0,0 +1,1394 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/lva_service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * Message for response to listing Processes.
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.ListProcessesResponse} + */ +public final class ListProcessesResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.ListProcessesResponse) + ListProcessesResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListProcessesResponse.newBuilder() to construct. + private ListProcessesResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListProcessesResponse() { + processes_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + unreachable_ = com.google.protobuf.LazyStringArrayList.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListProcessesResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.LvaServiceProto + .internal_static_google_cloud_visionai_v1_ListProcessesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.LvaServiceProto + .internal_static_google_cloud_visionai_v1_ListProcessesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.ListProcessesResponse.class, + com.google.cloud.visionai.v1.ListProcessesResponse.Builder.class); + } + + public static final int PROCESSES_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List processes_; + /** + * + * + *
+   * The list of Processes.
+   * 
+ * + * repeated .google.cloud.visionai.v1.Process processes = 1; + */ + @java.lang.Override + public java.util.List getProcessesList() { + return processes_; + } + /** + * + * + *
+   * The list of Processes.
+   * 
+ * + * repeated .google.cloud.visionai.v1.Process processes = 1; + */ + @java.lang.Override + public java.util.List + getProcessesOrBuilderList() { + return processes_; + } + /** + * + * + *
+   * The list of Processes.
+   * 
+ * + * repeated .google.cloud.visionai.v1.Process processes = 1; + */ + @java.lang.Override + public int getProcessesCount() { + return processes_.size(); + } + /** + * + * + *
+   * The list of Processes.
+   * 
+ * + * repeated .google.cloud.visionai.v1.Process processes = 1; + */ + @java.lang.Override + public com.google.cloud.visionai.v1.Process getProcesses(int index) { + return processes_.get(index); + } + /** + * + * + *
+   * The list of Processes.
+   * 
+ * + * repeated .google.cloud.visionai.v1.Process processes = 1; + */ + @java.lang.Override + public com.google.cloud.visionai.v1.ProcessOrBuilder getProcessesOrBuilder(int index) { + return processes_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + 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(); + nextPageToken_ = s; + return s; + } + } + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int UNREACHABLE_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList unreachable_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @return A list containing the unreachable. + */ + public com.google.protobuf.ProtocolStringList getUnreachableList() { + return unreachable_; + } + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @return The count of unreachable. + */ + public int getUnreachableCount() { + return unreachable_.size(); + } + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + public java.lang.String getUnreachable(int index) { + return unreachable_.get(index); + } + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the value to return. + * @return The bytes of the unreachable at the given index. + */ + public com.google.protobuf.ByteString getUnreachableBytes(int index) { + return unreachable_.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 < processes_.size(); i++) { + output.writeMessage(1, processes_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + } + for (int i = 0; i < unreachable_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, unreachable_.getRaw(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < processes_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, processes_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + } + { + int dataSize = 0; + for (int i = 0; i < unreachable_.size(); i++) { + dataSize += computeStringSizeNoTag(unreachable_.getRaw(i)); + } + size += dataSize; + size += 1 * getUnreachableList().size(); + } + size += getUnknownFields().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.visionai.v1.ListProcessesResponse)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.ListProcessesResponse other = + (com.google.cloud.visionai.v1.ListProcessesResponse) obj; + + if (!getProcessesList().equals(other.getProcessesList())) return false; + if (!getNextPageToken().equals(other.getNextPageToken())) return false; + if (!getUnreachableList().equals(other.getUnreachableList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getProcessesCount() > 0) { + hash = (37 * hash) + PROCESSES_FIELD_NUMBER; + hash = (53 * hash) + getProcessesList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + if (getUnreachableCount() > 0) { + hash = (37 * hash) + UNREACHABLE_FIELD_NUMBER; + hash = (53 * hash) + getUnreachableList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.ListProcessesResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ListProcessesResponse 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.visionai.v1.ListProcessesResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ListProcessesResponse 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.visionai.v1.ListProcessesResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ListProcessesResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.ListProcessesResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ListProcessesResponse 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.visionai.v1.ListProcessesResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ListProcessesResponse 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.visionai.v1.ListProcessesResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ListProcessesResponse 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.visionai.v1.ListProcessesResponse 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; + } + /** + * + * + *
+   * Message for response to listing Processes.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.ListProcessesResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.ListProcessesResponse) + com.google.cloud.visionai.v1.ListProcessesResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.LvaServiceProto + .internal_static_google_cloud_visionai_v1_ListProcessesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.LvaServiceProto + .internal_static_google_cloud_visionai_v1_ListProcessesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.ListProcessesResponse.class, + com.google.cloud.visionai.v1.ListProcessesResponse.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.ListProcessesResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (processesBuilder_ == null) { + processes_ = java.util.Collections.emptyList(); + } else { + processes_ = null; + processesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + nextPageToken_ = ""; + unreachable_ = com.google.protobuf.LazyStringArrayList.emptyList(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.LvaServiceProto + .internal_static_google_cloud_visionai_v1_ListProcessesResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ListProcessesResponse getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.ListProcessesResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ListProcessesResponse build() { + com.google.cloud.visionai.v1.ListProcessesResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ListProcessesResponse buildPartial() { + com.google.cloud.visionai.v1.ListProcessesResponse result = + new com.google.cloud.visionai.v1.ListProcessesResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.visionai.v1.ListProcessesResponse result) { + if (processesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + processes_ = java.util.Collections.unmodifiableList(processes_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.processes_ = processes_; + } else { + result.processes_ = processesBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.visionai.v1.ListProcessesResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.nextPageToken_ = nextPageToken_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + unreachable_.makeImmutable(); + result.unreachable_ = unreachable_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.ListProcessesResponse) { + return mergeFrom((com.google.cloud.visionai.v1.ListProcessesResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.ListProcessesResponse other) { + if (other == com.google.cloud.visionai.v1.ListProcessesResponse.getDefaultInstance()) + return this; + if (processesBuilder_ == null) { + if (!other.processes_.isEmpty()) { + if (processes_.isEmpty()) { + processes_ = other.processes_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureProcessesIsMutable(); + processes_.addAll(other.processes_); + } + onChanged(); + } + } else { + if (!other.processes_.isEmpty()) { + if (processesBuilder_.isEmpty()) { + processesBuilder_.dispose(); + processesBuilder_ = null; + processes_ = other.processes_; + bitField0_ = (bitField0_ & ~0x00000001); + processesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getProcessesFieldBuilder() + : null; + } else { + processesBuilder_.addAllMessages(other.processes_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.unreachable_.isEmpty()) { + if (unreachable_.isEmpty()) { + unreachable_ = other.unreachable_; + bitField0_ |= 0x00000004; + } else { + ensureUnreachableIsMutable(); + unreachable_.addAll(other.unreachable_); + } + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.visionai.v1.Process m = + input.readMessage( + com.google.cloud.visionai.v1.Process.parser(), extensionRegistry); + if (processesBuilder_ == null) { + ensureProcessesIsMutable(); + processes_.add(m); + } else { + processesBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureUnreachableIsMutable(); + unreachable_.add(s); + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List processes_ = + java.util.Collections.emptyList(); + + private void ensureProcessesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + processes_ = new java.util.ArrayList(processes_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.visionai.v1.Process, + com.google.cloud.visionai.v1.Process.Builder, + com.google.cloud.visionai.v1.ProcessOrBuilder> + processesBuilder_; + + /** + * + * + *
+     * The list of Processes.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Process processes = 1; + */ + public java.util.List getProcessesList() { + if (processesBuilder_ == null) { + return java.util.Collections.unmodifiableList(processes_); + } else { + return processesBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * The list of Processes.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Process processes = 1; + */ + public int getProcessesCount() { + if (processesBuilder_ == null) { + return processes_.size(); + } else { + return processesBuilder_.getCount(); + } + } + /** + * + * + *
+     * The list of Processes.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Process processes = 1; + */ + public com.google.cloud.visionai.v1.Process getProcesses(int index) { + if (processesBuilder_ == null) { + return processes_.get(index); + } else { + return processesBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * The list of Processes.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Process processes = 1; + */ + public Builder setProcesses(int index, com.google.cloud.visionai.v1.Process value) { + if (processesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureProcessesIsMutable(); + processes_.set(index, value); + onChanged(); + } else { + processesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The list of Processes.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Process processes = 1; + */ + public Builder setProcesses( + int index, com.google.cloud.visionai.v1.Process.Builder builderForValue) { + if (processesBuilder_ == null) { + ensureProcessesIsMutable(); + processes_.set(index, builderForValue.build()); + onChanged(); + } else { + processesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of Processes.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Process processes = 1; + */ + public Builder addProcesses(com.google.cloud.visionai.v1.Process value) { + if (processesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureProcessesIsMutable(); + processes_.add(value); + onChanged(); + } else { + processesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * The list of Processes.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Process processes = 1; + */ + public Builder addProcesses(int index, com.google.cloud.visionai.v1.Process value) { + if (processesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureProcessesIsMutable(); + processes_.add(index, value); + onChanged(); + } else { + processesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The list of Processes.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Process processes = 1; + */ + public Builder addProcesses(com.google.cloud.visionai.v1.Process.Builder builderForValue) { + if (processesBuilder_ == null) { + ensureProcessesIsMutable(); + processes_.add(builderForValue.build()); + onChanged(); + } else { + processesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of Processes.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Process processes = 1; + */ + public Builder addProcesses( + int index, com.google.cloud.visionai.v1.Process.Builder builderForValue) { + if (processesBuilder_ == null) { + ensureProcessesIsMutable(); + processes_.add(index, builderForValue.build()); + onChanged(); + } else { + processesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of Processes.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Process processes = 1; + */ + public Builder addAllProcesses( + java.lang.Iterable values) { + if (processesBuilder_ == null) { + ensureProcessesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, processes_); + onChanged(); + } else { + processesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * The list of Processes.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Process processes = 1; + */ + public Builder clearProcesses() { + if (processesBuilder_ == null) { + processes_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + processesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The list of Processes.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Process processes = 1; + */ + public Builder removeProcesses(int index) { + if (processesBuilder_ == null) { + ensureProcessesIsMutable(); + processes_.remove(index); + onChanged(); + } else { + processesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * The list of Processes.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Process processes = 1; + */ + public com.google.cloud.visionai.v1.Process.Builder getProcessesBuilder(int index) { + return getProcessesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * The list of Processes.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Process processes = 1; + */ + public com.google.cloud.visionai.v1.ProcessOrBuilder getProcessesOrBuilder(int index) { + if (processesBuilder_ == null) { + return processes_.get(index); + } else { + return processesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * The list of Processes.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Process processes = 1; + */ + public java.util.List + getProcessesOrBuilderList() { + if (processesBuilder_ != null) { + return processesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(processes_); + } + } + /** + * + * + *
+     * The list of Processes.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Process processes = 1; + */ + public com.google.cloud.visionai.v1.Process.Builder addProcessesBuilder() { + return getProcessesFieldBuilder() + .addBuilder(com.google.cloud.visionai.v1.Process.getDefaultInstance()); + } + /** + * + * + *
+     * The list of Processes.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Process processes = 1; + */ + public com.google.cloud.visionai.v1.Process.Builder addProcessesBuilder(int index) { + return getProcessesFieldBuilder() + .addBuilder(index, com.google.cloud.visionai.v1.Process.getDefaultInstance()); + } + /** + * + * + *
+     * The list of Processes.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Process processes = 1; + */ + public java.util.List getProcessesBuilderList() { + return getProcessesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.visionai.v1.Process, + com.google.cloud.visionai.v1.Process.Builder, + com.google.cloud.visionai.v1.ProcessOrBuilder> + getProcessesFieldBuilder() { + if (processesBuilder_ == null) { + processesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.visionai.v1.Process, + com.google.cloud.visionai.v1.Process.Builder, + com.google.cloud.visionai.v1.ProcessOrBuilder>( + processes_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + processes_ = null; + } + return processesBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + nextPageToken_ = getDefaultInstance().getNextPageToken(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList unreachable_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureUnreachableIsMutable() { + if (!unreachable_.isModifiable()) { + unreachable_ = new com.google.protobuf.LazyStringArrayList(unreachable_); + } + bitField0_ |= 0x00000004; + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @return A list containing the unreachable. + */ + public com.google.protobuf.ProtocolStringList getUnreachableList() { + unreachable_.makeImmutable(); + return unreachable_; + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @return The count of unreachable. + */ + public int getUnreachableCount() { + return unreachable_.size(); + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + public java.lang.String getUnreachable(int index) { + return unreachable_.get(index); + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the value to return. + * @return The bytes of the unreachable at the given index. + */ + public com.google.protobuf.ByteString getUnreachableBytes(int index) { + return unreachable_.getByteString(index); + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param index The index to set the value at. + * @param value The unreachable to set. + * @return This builder for chaining. + */ + public Builder setUnreachable(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureUnreachableIsMutable(); + unreachable_.set(index, value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param value The unreachable to add. + * @return This builder for chaining. + */ + public Builder addUnreachable(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureUnreachableIsMutable(); + unreachable_.add(value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param values The unreachable to add. + * @return This builder for chaining. + */ + public Builder addAllUnreachable(java.lang.Iterable values) { + ensureUnreachableIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, unreachable_); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @return This builder for chaining. + */ + public Builder clearUnreachable() { + unreachable_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + ; + onChanged(); + return this; + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param value The bytes of the unreachable to add. + * @return This builder for chaining. + */ + public Builder addUnreachableBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureUnreachableIsMutable(); + unreachable_.add(value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.ListProcessesResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.ListProcessesResponse) + private static final com.google.cloud.visionai.v1.ListProcessesResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.ListProcessesResponse(); + } + + public static com.google.cloud.visionai.v1.ListProcessesResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListProcessesResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.ListProcessesResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListProcessesResponseOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListProcessesResponseOrBuilder.java new file mode 100644 index 000000000000..ef007a4546be --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListProcessesResponseOrBuilder.java @@ -0,0 +1,154 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/lva_service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface ListProcessesResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.ListProcessesResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The list of Processes.
+   * 
+ * + * repeated .google.cloud.visionai.v1.Process processes = 1; + */ + java.util.List getProcessesList(); + /** + * + * + *
+   * The list of Processes.
+   * 
+ * + * repeated .google.cloud.visionai.v1.Process processes = 1; + */ + com.google.cloud.visionai.v1.Process getProcesses(int index); + /** + * + * + *
+   * The list of Processes.
+   * 
+ * + * repeated .google.cloud.visionai.v1.Process processes = 1; + */ + int getProcessesCount(); + /** + * + * + *
+   * The list of Processes.
+   * 
+ * + * repeated .google.cloud.visionai.v1.Process processes = 1; + */ + java.util.List + getProcessesOrBuilderList(); + /** + * + * + *
+   * The list of Processes.
+   * 
+ * + * repeated .google.cloud.visionai.v1.Process processes = 1; + */ + com.google.cloud.visionai.v1.ProcessOrBuilder getProcessesOrBuilder(int index); + + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); + + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @return A list containing the unreachable. + */ + java.util.List getUnreachableList(); + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @return The count of unreachable. + */ + int getUnreachableCount(); + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + java.lang.String getUnreachable(int index); + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the value to return. + * @return The bytes of the unreachable at the given index. + */ + com.google.protobuf.ByteString getUnreachableBytes(int index); +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListProcessorsRequest.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListProcessorsRequest.java new file mode 100644 index 000000000000..97f641ff2879 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListProcessorsRequest.java @@ -0,0 +1,1282 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/platform.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * Message for requesting list of Processors.
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.ListProcessorsRequest} + */ +public final class ListProcessorsRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.ListProcessorsRequest) + ListProcessorsRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListProcessorsRequest.newBuilder() to construct. + private ListProcessorsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListProcessorsRequest() { + parent_ = ""; + pageToken_ = ""; + filter_ = ""; + orderBy_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListProcessorsRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_ListProcessorsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_ListProcessorsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.ListProcessorsRequest.class, + com.google.cloud.visionai.v1.ListProcessorsRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + /** + * + * + *
+   * Required. Parent value for ListProcessorsRequest.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + 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(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Parent value for ListProcessorsRequest.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 2; + private int pageSize_ = 0; + /** + * + * + *
+   * Requested page size. Server may return fewer items than requested.
+   * If unspecified, server will pick an appropriate default.
+   * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object pageToken_ = ""; + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + 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(); + pageToken_ = s; + return s; + } + } + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FILTER_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object filter_ = ""; + /** + * + * + *
+   * Filtering results.
+   * 
+ * + * string filter = 4; + * + * @return The filter. + */ + @java.lang.Override + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + 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(); + filter_ = s; + return s; + } + } + /** + * + * + *
+   * Filtering results.
+   * 
+ * + * string filter = 4; + * + * @return The bytes for filter. + */ + @java.lang.Override + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ORDER_BY_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object orderBy_ = ""; + /** + * + * + *
+   * Hint for how to order the results.
+   * 
+ * + * string order_by = 5; + * + * @return The orderBy. + */ + @java.lang.Override + public java.lang.String getOrderBy() { + java.lang.Object ref = orderBy_; + 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(); + orderBy_ = s; + return s; + } + } + /** + * + * + *
+   * Hint for how to order the results.
+   * 
+ * + * string order_by = 5; + * + * @return The bytes for orderBy. + */ + @java.lang.Override + public com.google.protobuf.ByteString getOrderByBytes() { + java.lang.Object ref = orderBy_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + orderBy_ = 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, filter_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(orderBy_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, orderBy_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, filter_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(orderBy_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, orderBy_); + } + size += getUnknownFields().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.visionai.v1.ListProcessorsRequest)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.ListProcessorsRequest other = + (com.google.cloud.visionai.v1.ListProcessorsRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (!getFilter().equals(other.getFilter())) return false; + if (!getOrderBy().equals(other.getOrderBy())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + hash = (37 * hash) + FILTER_FIELD_NUMBER; + hash = (53 * hash) + getFilter().hashCode(); + hash = (37 * hash) + ORDER_BY_FIELD_NUMBER; + hash = (53 * hash) + getOrderBy().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.ListProcessorsRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ListProcessorsRequest 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.visionai.v1.ListProcessorsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ListProcessorsRequest 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.visionai.v1.ListProcessorsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ListProcessorsRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.ListProcessorsRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ListProcessorsRequest 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.visionai.v1.ListProcessorsRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ListProcessorsRequest 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.visionai.v1.ListProcessorsRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ListProcessorsRequest 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.visionai.v1.ListProcessorsRequest 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; + } + /** + * + * + *
+   * Message for requesting list of Processors.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.ListProcessorsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.ListProcessorsRequest) + com.google.cloud.visionai.v1.ListProcessorsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_ListProcessorsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_ListProcessorsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.ListProcessorsRequest.class, + com.google.cloud.visionai.v1.ListProcessorsRequest.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.ListProcessorsRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + pageSize_ = 0; + pageToken_ = ""; + filter_ = ""; + orderBy_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_ListProcessorsRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ListProcessorsRequest getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.ListProcessorsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ListProcessorsRequest build() { + com.google.cloud.visionai.v1.ListProcessorsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ListProcessorsRequest buildPartial() { + com.google.cloud.visionai.v1.ListProcessorsRequest result = + new com.google.cloud.visionai.v1.ListProcessorsRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.visionai.v1.ListProcessorsRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.pageSize_ = pageSize_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.pageToken_ = pageToken_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.filter_ = filter_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.orderBy_ = orderBy_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.ListProcessorsRequest) { + return mergeFrom((com.google.cloud.visionai.v1.ListProcessorsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.ListProcessorsRequest other) { + if (other == com.google.cloud.visionai.v1.ListProcessorsRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getFilter().isEmpty()) { + filter_ = other.filter_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (!other.getOrderBy().isEmpty()) { + orderBy_ = other.orderBy_; + bitField0_ |= 0x00000010; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + pageSize_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + orderBy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 42 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. Parent value for ListProcessorsRequest.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Parent value for ListProcessorsRequest.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Parent value for ListProcessorsRequest.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Parent value for ListProcessorsRequest.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Parent value for ListProcessorsRequest.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private int pageSize_; + /** + * + * + *
+     * Requested page size. Server may return fewer items than requested.
+     * If unspecified, server will pick an appropriate default.
+     * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + * + * + *
+     * Requested page size. Server may return fewer items than requested.
+     * If unspecified, server will pick an appropriate default.
+     * 
+ * + * int32 page_size = 2; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Requested page size. Server may return fewer items than requested.
+     * If unspecified, server will pick an appropriate default.
+     * 
+ * + * int32 page_size = 2; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + bitField0_ = (bitField0_ & ~0x00000002); + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string page_token = 3; + * + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + pageToken_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string page_token = 3; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + pageToken_ = getDefaultInstance().getPageToken(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string page_token = 3; + * + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + pageToken_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object filter_ = ""; + /** + * + * + *
+     * Filtering results.
+     * 
+ * + * string filter = 4; + * + * @return The filter. + */ + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Filtering results.
+     * 
+ * + * string filter = 4; + * + * @return The bytes for filter. + */ + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Filtering results.
+     * 
+ * + * string filter = 4; + * + * @param value The filter to set. + * @return This builder for chaining. + */ + public Builder setFilter(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + filter_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Filtering results.
+     * 
+ * + * string filter = 4; + * + * @return This builder for chaining. + */ + public Builder clearFilter() { + filter_ = getDefaultInstance().getFilter(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+     * Filtering results.
+     * 
+ * + * string filter = 4; + * + * @param value The bytes for filter to set. + * @return This builder for chaining. + */ + public Builder setFilterBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + filter_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private java.lang.Object orderBy_ = ""; + /** + * + * + *
+     * Hint for how to order the results.
+     * 
+ * + * string order_by = 5; + * + * @return The orderBy. + */ + public java.lang.String getOrderBy() { + java.lang.Object ref = orderBy_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + orderBy_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Hint for how to order the results.
+     * 
+ * + * string order_by = 5; + * + * @return The bytes for orderBy. + */ + public com.google.protobuf.ByteString getOrderByBytes() { + java.lang.Object ref = orderBy_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + orderBy_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Hint for how to order the results.
+     * 
+ * + * string order_by = 5; + * + * @param value The orderBy to set. + * @return This builder for chaining. + */ + public Builder setOrderBy(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + orderBy_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Hint for how to order the results.
+     * 
+ * + * string order_by = 5; + * + * @return This builder for chaining. + */ + public Builder clearOrderBy() { + orderBy_ = getDefaultInstance().getOrderBy(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + /** + * + * + *
+     * Hint for how to order the results.
+     * 
+ * + * string order_by = 5; + * + * @param value The bytes for orderBy to set. + * @return This builder for chaining. + */ + public Builder setOrderByBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + orderBy_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.ListProcessorsRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.ListProcessorsRequest) + private static final com.google.cloud.visionai.v1.ListProcessorsRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.ListProcessorsRequest(); + } + + public static com.google.cloud.visionai.v1.ListProcessorsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListProcessorsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.ListProcessorsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListProcessorsRequestOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListProcessorsRequestOrBuilder.java new file mode 100644 index 000000000000..4bdfb611d853 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListProcessorsRequestOrBuilder.java @@ -0,0 +1,144 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/platform.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface ListProcessorsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.ListProcessorsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Parent value for ListProcessorsRequest.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. Parent value for ListProcessorsRequest.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Requested page size. Server may return fewer items than requested.
+   * If unspecified, server will pick an appropriate default.
+   * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); + + /** + * + * + *
+   * Filtering results.
+   * 
+ * + * string filter = 4; + * + * @return The filter. + */ + java.lang.String getFilter(); + /** + * + * + *
+   * Filtering results.
+   * 
+ * + * string filter = 4; + * + * @return The bytes for filter. + */ + com.google.protobuf.ByteString getFilterBytes(); + + /** + * + * + *
+   * Hint for how to order the results.
+   * 
+ * + * string order_by = 5; + * + * @return The orderBy. + */ + java.lang.String getOrderBy(); + /** + * + * + *
+   * Hint for how to order the results.
+   * 
+ * + * string order_by = 5; + * + * @return The bytes for orderBy. + */ + com.google.protobuf.ByteString getOrderByBytes(); +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListProcessorsResponse.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListProcessorsResponse.java new file mode 100644 index 000000000000..173d71cb2df6 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListProcessorsResponse.java @@ -0,0 +1,1395 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/platform.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * Message for response to listing Processors.
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.ListProcessorsResponse} + */ +public final class ListProcessorsResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.ListProcessorsResponse) + ListProcessorsResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListProcessorsResponse.newBuilder() to construct. + private ListProcessorsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListProcessorsResponse() { + processors_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + unreachable_ = com.google.protobuf.LazyStringArrayList.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListProcessorsResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_ListProcessorsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_ListProcessorsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.ListProcessorsResponse.class, + com.google.cloud.visionai.v1.ListProcessorsResponse.Builder.class); + } + + public static final int PROCESSORS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List processors_; + /** + * + * + *
+   * The list of Processor.
+   * 
+ * + * repeated .google.cloud.visionai.v1.Processor processors = 1; + */ + @java.lang.Override + public java.util.List getProcessorsList() { + return processors_; + } + /** + * + * + *
+   * The list of Processor.
+   * 
+ * + * repeated .google.cloud.visionai.v1.Processor processors = 1; + */ + @java.lang.Override + public java.util.List + getProcessorsOrBuilderList() { + return processors_; + } + /** + * + * + *
+   * The list of Processor.
+   * 
+ * + * repeated .google.cloud.visionai.v1.Processor processors = 1; + */ + @java.lang.Override + public int getProcessorsCount() { + return processors_.size(); + } + /** + * + * + *
+   * The list of Processor.
+   * 
+ * + * repeated .google.cloud.visionai.v1.Processor processors = 1; + */ + @java.lang.Override + public com.google.cloud.visionai.v1.Processor getProcessors(int index) { + return processors_.get(index); + } + /** + * + * + *
+   * The list of Processor.
+   * 
+ * + * repeated .google.cloud.visionai.v1.Processor processors = 1; + */ + @java.lang.Override + public com.google.cloud.visionai.v1.ProcessorOrBuilder getProcessorsOrBuilder(int index) { + return processors_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + 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(); + nextPageToken_ = s; + return s; + } + } + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int UNREACHABLE_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList unreachable_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @return A list containing the unreachable. + */ + public com.google.protobuf.ProtocolStringList getUnreachableList() { + return unreachable_; + } + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @return The count of unreachable. + */ + public int getUnreachableCount() { + return unreachable_.size(); + } + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + public java.lang.String getUnreachable(int index) { + return unreachable_.get(index); + } + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the value to return. + * @return The bytes of the unreachable at the given index. + */ + public com.google.protobuf.ByteString getUnreachableBytes(int index) { + return unreachable_.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 < processors_.size(); i++) { + output.writeMessage(1, processors_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + } + for (int i = 0; i < unreachable_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, unreachable_.getRaw(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < processors_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, processors_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + } + { + int dataSize = 0; + for (int i = 0; i < unreachable_.size(); i++) { + dataSize += computeStringSizeNoTag(unreachable_.getRaw(i)); + } + size += dataSize; + size += 1 * getUnreachableList().size(); + } + size += getUnknownFields().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.visionai.v1.ListProcessorsResponse)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.ListProcessorsResponse other = + (com.google.cloud.visionai.v1.ListProcessorsResponse) obj; + + if (!getProcessorsList().equals(other.getProcessorsList())) return false; + if (!getNextPageToken().equals(other.getNextPageToken())) return false; + if (!getUnreachableList().equals(other.getUnreachableList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getProcessorsCount() > 0) { + hash = (37 * hash) + PROCESSORS_FIELD_NUMBER; + hash = (53 * hash) + getProcessorsList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + if (getUnreachableCount() > 0) { + hash = (37 * hash) + UNREACHABLE_FIELD_NUMBER; + hash = (53 * hash) + getUnreachableList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.ListProcessorsResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ListProcessorsResponse 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.visionai.v1.ListProcessorsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ListProcessorsResponse 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.visionai.v1.ListProcessorsResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ListProcessorsResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.ListProcessorsResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ListProcessorsResponse 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.visionai.v1.ListProcessorsResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ListProcessorsResponse 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.visionai.v1.ListProcessorsResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ListProcessorsResponse 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.visionai.v1.ListProcessorsResponse 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; + } + /** + * + * + *
+   * Message for response to listing Processors.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.ListProcessorsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.ListProcessorsResponse) + com.google.cloud.visionai.v1.ListProcessorsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_ListProcessorsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_ListProcessorsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.ListProcessorsResponse.class, + com.google.cloud.visionai.v1.ListProcessorsResponse.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.ListProcessorsResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (processorsBuilder_ == null) { + processors_ = java.util.Collections.emptyList(); + } else { + processors_ = null; + processorsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + nextPageToken_ = ""; + unreachable_ = com.google.protobuf.LazyStringArrayList.emptyList(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_ListProcessorsResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ListProcessorsResponse getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.ListProcessorsResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ListProcessorsResponse build() { + com.google.cloud.visionai.v1.ListProcessorsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ListProcessorsResponse buildPartial() { + com.google.cloud.visionai.v1.ListProcessorsResponse result = + new com.google.cloud.visionai.v1.ListProcessorsResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.visionai.v1.ListProcessorsResponse result) { + if (processorsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + processors_ = java.util.Collections.unmodifiableList(processors_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.processors_ = processors_; + } else { + result.processors_ = processorsBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.visionai.v1.ListProcessorsResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.nextPageToken_ = nextPageToken_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + unreachable_.makeImmutable(); + result.unreachable_ = unreachable_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.ListProcessorsResponse) { + return mergeFrom((com.google.cloud.visionai.v1.ListProcessorsResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.ListProcessorsResponse other) { + if (other == com.google.cloud.visionai.v1.ListProcessorsResponse.getDefaultInstance()) + return this; + if (processorsBuilder_ == null) { + if (!other.processors_.isEmpty()) { + if (processors_.isEmpty()) { + processors_ = other.processors_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureProcessorsIsMutable(); + processors_.addAll(other.processors_); + } + onChanged(); + } + } else { + if (!other.processors_.isEmpty()) { + if (processorsBuilder_.isEmpty()) { + processorsBuilder_.dispose(); + processorsBuilder_ = null; + processors_ = other.processors_; + bitField0_ = (bitField0_ & ~0x00000001); + processorsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getProcessorsFieldBuilder() + : null; + } else { + processorsBuilder_.addAllMessages(other.processors_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.unreachable_.isEmpty()) { + if (unreachable_.isEmpty()) { + unreachable_ = other.unreachable_; + bitField0_ |= 0x00000004; + } else { + ensureUnreachableIsMutable(); + unreachable_.addAll(other.unreachable_); + } + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.visionai.v1.Processor m = + input.readMessage( + com.google.cloud.visionai.v1.Processor.parser(), extensionRegistry); + if (processorsBuilder_ == null) { + ensureProcessorsIsMutable(); + processors_.add(m); + } else { + processorsBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureUnreachableIsMutable(); + unreachable_.add(s); + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List processors_ = + java.util.Collections.emptyList(); + + private void ensureProcessorsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + processors_ = new java.util.ArrayList(processors_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.visionai.v1.Processor, + com.google.cloud.visionai.v1.Processor.Builder, + com.google.cloud.visionai.v1.ProcessorOrBuilder> + processorsBuilder_; + + /** + * + * + *
+     * The list of Processor.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Processor processors = 1; + */ + public java.util.List getProcessorsList() { + if (processorsBuilder_ == null) { + return java.util.Collections.unmodifiableList(processors_); + } else { + return processorsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * The list of Processor.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Processor processors = 1; + */ + public int getProcessorsCount() { + if (processorsBuilder_ == null) { + return processors_.size(); + } else { + return processorsBuilder_.getCount(); + } + } + /** + * + * + *
+     * The list of Processor.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Processor processors = 1; + */ + public com.google.cloud.visionai.v1.Processor getProcessors(int index) { + if (processorsBuilder_ == null) { + return processors_.get(index); + } else { + return processorsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * The list of Processor.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Processor processors = 1; + */ + public Builder setProcessors(int index, com.google.cloud.visionai.v1.Processor value) { + if (processorsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureProcessorsIsMutable(); + processors_.set(index, value); + onChanged(); + } else { + processorsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The list of Processor.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Processor processors = 1; + */ + public Builder setProcessors( + int index, com.google.cloud.visionai.v1.Processor.Builder builderForValue) { + if (processorsBuilder_ == null) { + ensureProcessorsIsMutable(); + processors_.set(index, builderForValue.build()); + onChanged(); + } else { + processorsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of Processor.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Processor processors = 1; + */ + public Builder addProcessors(com.google.cloud.visionai.v1.Processor value) { + if (processorsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureProcessorsIsMutable(); + processors_.add(value); + onChanged(); + } else { + processorsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * The list of Processor.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Processor processors = 1; + */ + public Builder addProcessors(int index, com.google.cloud.visionai.v1.Processor value) { + if (processorsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureProcessorsIsMutable(); + processors_.add(index, value); + onChanged(); + } else { + processorsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The list of Processor.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Processor processors = 1; + */ + public Builder addProcessors(com.google.cloud.visionai.v1.Processor.Builder builderForValue) { + if (processorsBuilder_ == null) { + ensureProcessorsIsMutable(); + processors_.add(builderForValue.build()); + onChanged(); + } else { + processorsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of Processor.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Processor processors = 1; + */ + public Builder addProcessors( + int index, com.google.cloud.visionai.v1.Processor.Builder builderForValue) { + if (processorsBuilder_ == null) { + ensureProcessorsIsMutable(); + processors_.add(index, builderForValue.build()); + onChanged(); + } else { + processorsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of Processor.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Processor processors = 1; + */ + public Builder addAllProcessors( + java.lang.Iterable values) { + if (processorsBuilder_ == null) { + ensureProcessorsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, processors_); + onChanged(); + } else { + processorsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * The list of Processor.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Processor processors = 1; + */ + public Builder clearProcessors() { + if (processorsBuilder_ == null) { + processors_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + processorsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The list of Processor.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Processor processors = 1; + */ + public Builder removeProcessors(int index) { + if (processorsBuilder_ == null) { + ensureProcessorsIsMutable(); + processors_.remove(index); + onChanged(); + } else { + processorsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * The list of Processor.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Processor processors = 1; + */ + public com.google.cloud.visionai.v1.Processor.Builder getProcessorsBuilder(int index) { + return getProcessorsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * The list of Processor.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Processor processors = 1; + */ + public com.google.cloud.visionai.v1.ProcessorOrBuilder getProcessorsOrBuilder(int index) { + if (processorsBuilder_ == null) { + return processors_.get(index); + } else { + return processorsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * The list of Processor.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Processor processors = 1; + */ + public java.util.List + getProcessorsOrBuilderList() { + if (processorsBuilder_ != null) { + return processorsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(processors_); + } + } + /** + * + * + *
+     * The list of Processor.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Processor processors = 1; + */ + public com.google.cloud.visionai.v1.Processor.Builder addProcessorsBuilder() { + return getProcessorsFieldBuilder() + .addBuilder(com.google.cloud.visionai.v1.Processor.getDefaultInstance()); + } + /** + * + * + *
+     * The list of Processor.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Processor processors = 1; + */ + public com.google.cloud.visionai.v1.Processor.Builder addProcessorsBuilder(int index) { + return getProcessorsFieldBuilder() + .addBuilder(index, com.google.cloud.visionai.v1.Processor.getDefaultInstance()); + } + /** + * + * + *
+     * The list of Processor.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Processor processors = 1; + */ + public java.util.List + getProcessorsBuilderList() { + return getProcessorsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.visionai.v1.Processor, + com.google.cloud.visionai.v1.Processor.Builder, + com.google.cloud.visionai.v1.ProcessorOrBuilder> + getProcessorsFieldBuilder() { + if (processorsBuilder_ == null) { + processorsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.visionai.v1.Processor, + com.google.cloud.visionai.v1.Processor.Builder, + com.google.cloud.visionai.v1.ProcessorOrBuilder>( + processors_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + processors_ = null; + } + return processorsBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + nextPageToken_ = getDefaultInstance().getNextPageToken(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList unreachable_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureUnreachableIsMutable() { + if (!unreachable_.isModifiable()) { + unreachable_ = new com.google.protobuf.LazyStringArrayList(unreachable_); + } + bitField0_ |= 0x00000004; + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @return A list containing the unreachable. + */ + public com.google.protobuf.ProtocolStringList getUnreachableList() { + unreachable_.makeImmutable(); + return unreachable_; + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @return The count of unreachable. + */ + public int getUnreachableCount() { + return unreachable_.size(); + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + public java.lang.String getUnreachable(int index) { + return unreachable_.get(index); + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the value to return. + * @return The bytes of the unreachable at the given index. + */ + public com.google.protobuf.ByteString getUnreachableBytes(int index) { + return unreachable_.getByteString(index); + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param index The index to set the value at. + * @param value The unreachable to set. + * @return This builder for chaining. + */ + public Builder setUnreachable(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureUnreachableIsMutable(); + unreachable_.set(index, value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param value The unreachable to add. + * @return This builder for chaining. + */ + public Builder addUnreachable(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureUnreachableIsMutable(); + unreachable_.add(value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param values The unreachable to add. + * @return This builder for chaining. + */ + public Builder addAllUnreachable(java.lang.Iterable values) { + ensureUnreachableIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, unreachable_); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @return This builder for chaining. + */ + public Builder clearUnreachable() { + unreachable_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + ; + onChanged(); + return this; + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param value The bytes of the unreachable to add. + * @return This builder for chaining. + */ + public Builder addUnreachableBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureUnreachableIsMutable(); + unreachable_.add(value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.ListProcessorsResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.ListProcessorsResponse) + private static final com.google.cloud.visionai.v1.ListProcessorsResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.ListProcessorsResponse(); + } + + public static com.google.cloud.visionai.v1.ListProcessorsResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListProcessorsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.ListProcessorsResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListProcessorsResponseOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListProcessorsResponseOrBuilder.java new file mode 100644 index 000000000000..085c4aeeb680 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListProcessorsResponseOrBuilder.java @@ -0,0 +1,154 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/platform.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface ListProcessorsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.ListProcessorsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The list of Processor.
+   * 
+ * + * repeated .google.cloud.visionai.v1.Processor processors = 1; + */ + java.util.List getProcessorsList(); + /** + * + * + *
+   * The list of Processor.
+   * 
+ * + * repeated .google.cloud.visionai.v1.Processor processors = 1; + */ + com.google.cloud.visionai.v1.Processor getProcessors(int index); + /** + * + * + *
+   * The list of Processor.
+   * 
+ * + * repeated .google.cloud.visionai.v1.Processor processors = 1; + */ + int getProcessorsCount(); + /** + * + * + *
+   * The list of Processor.
+   * 
+ * + * repeated .google.cloud.visionai.v1.Processor processors = 1; + */ + java.util.List + getProcessorsOrBuilderList(); + /** + * + * + *
+   * The list of Processor.
+   * 
+ * + * repeated .google.cloud.visionai.v1.Processor processors = 1; + */ + com.google.cloud.visionai.v1.ProcessorOrBuilder getProcessorsOrBuilder(int index); + + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); + + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @return A list containing the unreachable. + */ + java.util.List getUnreachableList(); + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @return The count of unreachable. + */ + int getUnreachableCount(); + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + java.lang.String getUnreachable(int index); + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the value to return. + * @return The bytes of the unreachable at the given index. + */ + com.google.protobuf.ByteString getUnreachableBytes(int index); +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListPublicOperatorsRequest.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListPublicOperatorsRequest.java new file mode 100644 index 000000000000..95ed8417108c --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListPublicOperatorsRequest.java @@ -0,0 +1,1283 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/lva_service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * Request message of ListPublicOperatorsRequest API.
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.ListPublicOperatorsRequest} + */ +public final class ListPublicOperatorsRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.ListPublicOperatorsRequest) + ListPublicOperatorsRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListPublicOperatorsRequest.newBuilder() to construct. + private ListPublicOperatorsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListPublicOperatorsRequest() { + parent_ = ""; + pageToken_ = ""; + filter_ = ""; + orderBy_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListPublicOperatorsRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.LvaServiceProto + .internal_static_google_cloud_visionai_v1_ListPublicOperatorsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.LvaServiceProto + .internal_static_google_cloud_visionai_v1_ListPublicOperatorsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.ListPublicOperatorsRequest.class, + com.google.cloud.visionai.v1.ListPublicOperatorsRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + /** + * + * + *
+   * Required. Parent value for ListPublicOperatorsRequest.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + 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(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Parent value for ListPublicOperatorsRequest.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 2; + private int pageSize_ = 0; + /** + * + * + *
+   * Requested page size. Server may return fewer items than requested.
+   * If unspecified, server will pick an appropriate default.
+   * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object pageToken_ = ""; + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + 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(); + pageToken_ = s; + return s; + } + } + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FILTER_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object filter_ = ""; + /** + * + * + *
+   * Filtering results.
+   * 
+ * + * string filter = 4; + * + * @return The filter. + */ + @java.lang.Override + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + 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(); + filter_ = s; + return s; + } + } + /** + * + * + *
+   * Filtering results.
+   * 
+ * + * string filter = 4; + * + * @return The bytes for filter. + */ + @java.lang.Override + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ORDER_BY_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object orderBy_ = ""; + /** + * + * + *
+   * Hint for how to order the results.
+   * 
+ * + * string order_by = 5; + * + * @return The orderBy. + */ + @java.lang.Override + public java.lang.String getOrderBy() { + java.lang.Object ref = orderBy_; + 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(); + orderBy_ = s; + return s; + } + } + /** + * + * + *
+   * Hint for how to order the results.
+   * 
+ * + * string order_by = 5; + * + * @return The bytes for orderBy. + */ + @java.lang.Override + public com.google.protobuf.ByteString getOrderByBytes() { + java.lang.Object ref = orderBy_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + orderBy_ = 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, filter_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(orderBy_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, orderBy_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, filter_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(orderBy_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, orderBy_); + } + size += getUnknownFields().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.visionai.v1.ListPublicOperatorsRequest)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.ListPublicOperatorsRequest other = + (com.google.cloud.visionai.v1.ListPublicOperatorsRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (!getFilter().equals(other.getFilter())) return false; + if (!getOrderBy().equals(other.getOrderBy())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + hash = (37 * hash) + FILTER_FIELD_NUMBER; + hash = (53 * hash) + getFilter().hashCode(); + hash = (37 * hash) + ORDER_BY_FIELD_NUMBER; + hash = (53 * hash) + getOrderBy().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.ListPublicOperatorsRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ListPublicOperatorsRequest 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.visionai.v1.ListPublicOperatorsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ListPublicOperatorsRequest 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.visionai.v1.ListPublicOperatorsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ListPublicOperatorsRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.ListPublicOperatorsRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ListPublicOperatorsRequest 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.visionai.v1.ListPublicOperatorsRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ListPublicOperatorsRequest 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.visionai.v1.ListPublicOperatorsRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ListPublicOperatorsRequest 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.visionai.v1.ListPublicOperatorsRequest 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; + } + /** + * + * + *
+   * Request message of ListPublicOperatorsRequest API.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.ListPublicOperatorsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.ListPublicOperatorsRequest) + com.google.cloud.visionai.v1.ListPublicOperatorsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.LvaServiceProto + .internal_static_google_cloud_visionai_v1_ListPublicOperatorsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.LvaServiceProto + .internal_static_google_cloud_visionai_v1_ListPublicOperatorsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.ListPublicOperatorsRequest.class, + com.google.cloud.visionai.v1.ListPublicOperatorsRequest.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.ListPublicOperatorsRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + pageSize_ = 0; + pageToken_ = ""; + filter_ = ""; + orderBy_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.LvaServiceProto + .internal_static_google_cloud_visionai_v1_ListPublicOperatorsRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ListPublicOperatorsRequest getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.ListPublicOperatorsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ListPublicOperatorsRequest build() { + com.google.cloud.visionai.v1.ListPublicOperatorsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ListPublicOperatorsRequest buildPartial() { + com.google.cloud.visionai.v1.ListPublicOperatorsRequest result = + new com.google.cloud.visionai.v1.ListPublicOperatorsRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.visionai.v1.ListPublicOperatorsRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.pageSize_ = pageSize_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.pageToken_ = pageToken_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.filter_ = filter_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.orderBy_ = orderBy_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.ListPublicOperatorsRequest) { + return mergeFrom((com.google.cloud.visionai.v1.ListPublicOperatorsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.ListPublicOperatorsRequest other) { + if (other == com.google.cloud.visionai.v1.ListPublicOperatorsRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getFilter().isEmpty()) { + filter_ = other.filter_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (!other.getOrderBy().isEmpty()) { + orderBy_ = other.orderBy_; + bitField0_ |= 0x00000010; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + pageSize_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + orderBy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 42 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. Parent value for ListPublicOperatorsRequest.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Parent value for ListPublicOperatorsRequest.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Parent value for ListPublicOperatorsRequest.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Parent value for ListPublicOperatorsRequest.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Parent value for ListPublicOperatorsRequest.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private int pageSize_; + /** + * + * + *
+     * Requested page size. Server may return fewer items than requested.
+     * If unspecified, server will pick an appropriate default.
+     * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + * + * + *
+     * Requested page size. Server may return fewer items than requested.
+     * If unspecified, server will pick an appropriate default.
+     * 
+ * + * int32 page_size = 2; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Requested page size. Server may return fewer items than requested.
+     * If unspecified, server will pick an appropriate default.
+     * 
+ * + * int32 page_size = 2; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + bitField0_ = (bitField0_ & ~0x00000002); + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string page_token = 3; + * + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + pageToken_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string page_token = 3; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + pageToken_ = getDefaultInstance().getPageToken(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string page_token = 3; + * + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + pageToken_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object filter_ = ""; + /** + * + * + *
+     * Filtering results.
+     * 
+ * + * string filter = 4; + * + * @return The filter. + */ + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Filtering results.
+     * 
+ * + * string filter = 4; + * + * @return The bytes for filter. + */ + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Filtering results.
+     * 
+ * + * string filter = 4; + * + * @param value The filter to set. + * @return This builder for chaining. + */ + public Builder setFilter(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + filter_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Filtering results.
+     * 
+ * + * string filter = 4; + * + * @return This builder for chaining. + */ + public Builder clearFilter() { + filter_ = getDefaultInstance().getFilter(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+     * Filtering results.
+     * 
+ * + * string filter = 4; + * + * @param value The bytes for filter to set. + * @return This builder for chaining. + */ + public Builder setFilterBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + filter_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private java.lang.Object orderBy_ = ""; + /** + * + * + *
+     * Hint for how to order the results.
+     * 
+ * + * string order_by = 5; + * + * @return The orderBy. + */ + public java.lang.String getOrderBy() { + java.lang.Object ref = orderBy_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + orderBy_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Hint for how to order the results.
+     * 
+ * + * string order_by = 5; + * + * @return The bytes for orderBy. + */ + public com.google.protobuf.ByteString getOrderByBytes() { + java.lang.Object ref = orderBy_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + orderBy_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Hint for how to order the results.
+     * 
+ * + * string order_by = 5; + * + * @param value The orderBy to set. + * @return This builder for chaining. + */ + public Builder setOrderBy(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + orderBy_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Hint for how to order the results.
+     * 
+ * + * string order_by = 5; + * + * @return This builder for chaining. + */ + public Builder clearOrderBy() { + orderBy_ = getDefaultInstance().getOrderBy(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + /** + * + * + *
+     * Hint for how to order the results.
+     * 
+ * + * string order_by = 5; + * + * @param value The bytes for orderBy to set. + * @return This builder for chaining. + */ + public Builder setOrderByBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + orderBy_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.ListPublicOperatorsRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.ListPublicOperatorsRequest) + private static final com.google.cloud.visionai.v1.ListPublicOperatorsRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.ListPublicOperatorsRequest(); + } + + public static com.google.cloud.visionai.v1.ListPublicOperatorsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListPublicOperatorsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.ListPublicOperatorsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListPublicOperatorsRequestOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListPublicOperatorsRequestOrBuilder.java new file mode 100644 index 000000000000..71007866242b --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListPublicOperatorsRequestOrBuilder.java @@ -0,0 +1,144 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/lva_service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface ListPublicOperatorsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.ListPublicOperatorsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Parent value for ListPublicOperatorsRequest.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. Parent value for ListPublicOperatorsRequest.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Requested page size. Server may return fewer items than requested.
+   * If unspecified, server will pick an appropriate default.
+   * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); + + /** + * + * + *
+   * Filtering results.
+   * 
+ * + * string filter = 4; + * + * @return The filter. + */ + java.lang.String getFilter(); + /** + * + * + *
+   * Filtering results.
+   * 
+ * + * string filter = 4; + * + * @return The bytes for filter. + */ + com.google.protobuf.ByteString getFilterBytes(); + + /** + * + * + *
+   * Hint for how to order the results.
+   * 
+ * + * string order_by = 5; + * + * @return The orderBy. + */ + java.lang.String getOrderBy(); + /** + * + * + *
+   * Hint for how to order the results.
+   * 
+ * + * string order_by = 5; + * + * @return The bytes for orderBy. + */ + com.google.protobuf.ByteString getOrderByBytes(); +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListPublicOperatorsResponse.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListPublicOperatorsResponse.java new file mode 100644 index 000000000000..1f1c4ef2caae --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListPublicOperatorsResponse.java @@ -0,0 +1,1118 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/lva_service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * Response message of ListPublicOperators API.
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.ListPublicOperatorsResponse} + */ +public final class ListPublicOperatorsResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.ListPublicOperatorsResponse) + ListPublicOperatorsResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListPublicOperatorsResponse.newBuilder() to construct. + private ListPublicOperatorsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListPublicOperatorsResponse() { + operators_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListPublicOperatorsResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.LvaServiceProto + .internal_static_google_cloud_visionai_v1_ListPublicOperatorsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.LvaServiceProto + .internal_static_google_cloud_visionai_v1_ListPublicOperatorsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.ListPublicOperatorsResponse.class, + com.google.cloud.visionai.v1.ListPublicOperatorsResponse.Builder.class); + } + + public static final int OPERATORS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List operators_; + /** + * + * + *
+   * The list of Operator
+   * 
+ * + * repeated .google.cloud.visionai.v1.Operator operators = 1; + */ + @java.lang.Override + public java.util.List getOperatorsList() { + return operators_; + } + /** + * + * + *
+   * The list of Operator
+   * 
+ * + * repeated .google.cloud.visionai.v1.Operator operators = 1; + */ + @java.lang.Override + public java.util.List + getOperatorsOrBuilderList() { + return operators_; + } + /** + * + * + *
+   * The list of Operator
+   * 
+ * + * repeated .google.cloud.visionai.v1.Operator operators = 1; + */ + @java.lang.Override + public int getOperatorsCount() { + return operators_.size(); + } + /** + * + * + *
+   * The list of Operator
+   * 
+ * + * repeated .google.cloud.visionai.v1.Operator operators = 1; + */ + @java.lang.Override + public com.google.cloud.visionai.v1.Operator getOperators(int index) { + return operators_.get(index); + } + /** + * + * + *
+   * The list of Operator
+   * 
+ * + * repeated .google.cloud.visionai.v1.Operator operators = 1; + */ + @java.lang.Override + public com.google.cloud.visionai.v1.OperatorOrBuilder getOperatorsOrBuilder(int index) { + return operators_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + 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(); + nextPageToken_ = s; + return s; + } + } + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = 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 { + for (int i = 0; i < operators_.size(); i++) { + output.writeMessage(1, operators_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < operators_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, operators_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + } + size += getUnknownFields().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.visionai.v1.ListPublicOperatorsResponse)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.ListPublicOperatorsResponse other = + (com.google.cloud.visionai.v1.ListPublicOperatorsResponse) obj; + + if (!getOperatorsList().equals(other.getOperatorsList())) return false; + if (!getNextPageToken().equals(other.getNextPageToken())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getOperatorsCount() > 0) { + hash = (37 * hash) + OPERATORS_FIELD_NUMBER; + hash = (53 * hash) + getOperatorsList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.ListPublicOperatorsResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ListPublicOperatorsResponse 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.visionai.v1.ListPublicOperatorsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ListPublicOperatorsResponse 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.visionai.v1.ListPublicOperatorsResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ListPublicOperatorsResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.ListPublicOperatorsResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ListPublicOperatorsResponse 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.visionai.v1.ListPublicOperatorsResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ListPublicOperatorsResponse 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.visionai.v1.ListPublicOperatorsResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ListPublicOperatorsResponse 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.visionai.v1.ListPublicOperatorsResponse 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; + } + /** + * + * + *
+   * Response message of ListPublicOperators API.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.ListPublicOperatorsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.ListPublicOperatorsResponse) + com.google.cloud.visionai.v1.ListPublicOperatorsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.LvaServiceProto + .internal_static_google_cloud_visionai_v1_ListPublicOperatorsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.LvaServiceProto + .internal_static_google_cloud_visionai_v1_ListPublicOperatorsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.ListPublicOperatorsResponse.class, + com.google.cloud.visionai.v1.ListPublicOperatorsResponse.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.ListPublicOperatorsResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (operatorsBuilder_ == null) { + operators_ = java.util.Collections.emptyList(); + } else { + operators_ = null; + operatorsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + nextPageToken_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.LvaServiceProto + .internal_static_google_cloud_visionai_v1_ListPublicOperatorsResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ListPublicOperatorsResponse getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.ListPublicOperatorsResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ListPublicOperatorsResponse build() { + com.google.cloud.visionai.v1.ListPublicOperatorsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ListPublicOperatorsResponse buildPartial() { + com.google.cloud.visionai.v1.ListPublicOperatorsResponse result = + new com.google.cloud.visionai.v1.ListPublicOperatorsResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.visionai.v1.ListPublicOperatorsResponse result) { + if (operatorsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + operators_ = java.util.Collections.unmodifiableList(operators_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.operators_ = operators_; + } else { + result.operators_ = operatorsBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.visionai.v1.ListPublicOperatorsResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.nextPageToken_ = nextPageToken_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.ListPublicOperatorsResponse) { + return mergeFrom((com.google.cloud.visionai.v1.ListPublicOperatorsResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.ListPublicOperatorsResponse other) { + if (other == com.google.cloud.visionai.v1.ListPublicOperatorsResponse.getDefaultInstance()) + return this; + if (operatorsBuilder_ == null) { + if (!other.operators_.isEmpty()) { + if (operators_.isEmpty()) { + operators_ = other.operators_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureOperatorsIsMutable(); + operators_.addAll(other.operators_); + } + onChanged(); + } + } else { + if (!other.operators_.isEmpty()) { + if (operatorsBuilder_.isEmpty()) { + operatorsBuilder_.dispose(); + operatorsBuilder_ = null; + operators_ = other.operators_; + bitField0_ = (bitField0_ & ~0x00000001); + operatorsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getOperatorsFieldBuilder() + : null; + } else { + operatorsBuilder_.addAllMessages(other.operators_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.visionai.v1.Operator m = + input.readMessage( + com.google.cloud.visionai.v1.Operator.parser(), extensionRegistry); + if (operatorsBuilder_ == null) { + ensureOperatorsIsMutable(); + operators_.add(m); + } else { + operatorsBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List operators_ = + java.util.Collections.emptyList(); + + private void ensureOperatorsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + operators_ = new java.util.ArrayList(operators_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.visionai.v1.Operator, + com.google.cloud.visionai.v1.Operator.Builder, + com.google.cloud.visionai.v1.OperatorOrBuilder> + operatorsBuilder_; + + /** + * + * + *
+     * The list of Operator
+     * 
+ * + * repeated .google.cloud.visionai.v1.Operator operators = 1; + */ + public java.util.List getOperatorsList() { + if (operatorsBuilder_ == null) { + return java.util.Collections.unmodifiableList(operators_); + } else { + return operatorsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * The list of Operator
+     * 
+ * + * repeated .google.cloud.visionai.v1.Operator operators = 1; + */ + public int getOperatorsCount() { + if (operatorsBuilder_ == null) { + return operators_.size(); + } else { + return operatorsBuilder_.getCount(); + } + } + /** + * + * + *
+     * The list of Operator
+     * 
+ * + * repeated .google.cloud.visionai.v1.Operator operators = 1; + */ + public com.google.cloud.visionai.v1.Operator getOperators(int index) { + if (operatorsBuilder_ == null) { + return operators_.get(index); + } else { + return operatorsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * The list of Operator
+     * 
+ * + * repeated .google.cloud.visionai.v1.Operator operators = 1; + */ + public Builder setOperators(int index, com.google.cloud.visionai.v1.Operator value) { + if (operatorsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureOperatorsIsMutable(); + operators_.set(index, value); + onChanged(); + } else { + operatorsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The list of Operator
+     * 
+ * + * repeated .google.cloud.visionai.v1.Operator operators = 1; + */ + public Builder setOperators( + int index, com.google.cloud.visionai.v1.Operator.Builder builderForValue) { + if (operatorsBuilder_ == null) { + ensureOperatorsIsMutable(); + operators_.set(index, builderForValue.build()); + onChanged(); + } else { + operatorsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of Operator
+     * 
+ * + * repeated .google.cloud.visionai.v1.Operator operators = 1; + */ + public Builder addOperators(com.google.cloud.visionai.v1.Operator value) { + if (operatorsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureOperatorsIsMutable(); + operators_.add(value); + onChanged(); + } else { + operatorsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * The list of Operator
+     * 
+ * + * repeated .google.cloud.visionai.v1.Operator operators = 1; + */ + public Builder addOperators(int index, com.google.cloud.visionai.v1.Operator value) { + if (operatorsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureOperatorsIsMutable(); + operators_.add(index, value); + onChanged(); + } else { + operatorsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The list of Operator
+     * 
+ * + * repeated .google.cloud.visionai.v1.Operator operators = 1; + */ + public Builder addOperators(com.google.cloud.visionai.v1.Operator.Builder builderForValue) { + if (operatorsBuilder_ == null) { + ensureOperatorsIsMutable(); + operators_.add(builderForValue.build()); + onChanged(); + } else { + operatorsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of Operator
+     * 
+ * + * repeated .google.cloud.visionai.v1.Operator operators = 1; + */ + public Builder addOperators( + int index, com.google.cloud.visionai.v1.Operator.Builder builderForValue) { + if (operatorsBuilder_ == null) { + ensureOperatorsIsMutable(); + operators_.add(index, builderForValue.build()); + onChanged(); + } else { + operatorsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of Operator
+     * 
+ * + * repeated .google.cloud.visionai.v1.Operator operators = 1; + */ + public Builder addAllOperators( + java.lang.Iterable values) { + if (operatorsBuilder_ == null) { + ensureOperatorsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, operators_); + onChanged(); + } else { + operatorsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * The list of Operator
+     * 
+ * + * repeated .google.cloud.visionai.v1.Operator operators = 1; + */ + public Builder clearOperators() { + if (operatorsBuilder_ == null) { + operators_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + operatorsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The list of Operator
+     * 
+ * + * repeated .google.cloud.visionai.v1.Operator operators = 1; + */ + public Builder removeOperators(int index) { + if (operatorsBuilder_ == null) { + ensureOperatorsIsMutable(); + operators_.remove(index); + onChanged(); + } else { + operatorsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * The list of Operator
+     * 
+ * + * repeated .google.cloud.visionai.v1.Operator operators = 1; + */ + public com.google.cloud.visionai.v1.Operator.Builder getOperatorsBuilder(int index) { + return getOperatorsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * The list of Operator
+     * 
+ * + * repeated .google.cloud.visionai.v1.Operator operators = 1; + */ + public com.google.cloud.visionai.v1.OperatorOrBuilder getOperatorsOrBuilder(int index) { + if (operatorsBuilder_ == null) { + return operators_.get(index); + } else { + return operatorsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * The list of Operator
+     * 
+ * + * repeated .google.cloud.visionai.v1.Operator operators = 1; + */ + public java.util.List + getOperatorsOrBuilderList() { + if (operatorsBuilder_ != null) { + return operatorsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(operators_); + } + } + /** + * + * + *
+     * The list of Operator
+     * 
+ * + * repeated .google.cloud.visionai.v1.Operator operators = 1; + */ + public com.google.cloud.visionai.v1.Operator.Builder addOperatorsBuilder() { + return getOperatorsFieldBuilder() + .addBuilder(com.google.cloud.visionai.v1.Operator.getDefaultInstance()); + } + /** + * + * + *
+     * The list of Operator
+     * 
+ * + * repeated .google.cloud.visionai.v1.Operator operators = 1; + */ + public com.google.cloud.visionai.v1.Operator.Builder addOperatorsBuilder(int index) { + return getOperatorsFieldBuilder() + .addBuilder(index, com.google.cloud.visionai.v1.Operator.getDefaultInstance()); + } + /** + * + * + *
+     * The list of Operator
+     * 
+ * + * repeated .google.cloud.visionai.v1.Operator operators = 1; + */ + public java.util.List getOperatorsBuilderList() { + return getOperatorsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.visionai.v1.Operator, + com.google.cloud.visionai.v1.Operator.Builder, + com.google.cloud.visionai.v1.OperatorOrBuilder> + getOperatorsFieldBuilder() { + if (operatorsBuilder_ == null) { + operatorsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.visionai.v1.Operator, + com.google.cloud.visionai.v1.Operator.Builder, + com.google.cloud.visionai.v1.OperatorOrBuilder>( + operators_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + operators_ = null; + } + return operatorsBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + nextPageToken_ = getDefaultInstance().getNextPageToken(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.ListPublicOperatorsResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.ListPublicOperatorsResponse) + private static final com.google.cloud.visionai.v1.ListPublicOperatorsResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.ListPublicOperatorsResponse(); + } + + public static com.google.cloud.visionai.v1.ListPublicOperatorsResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListPublicOperatorsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.ListPublicOperatorsResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListPublicOperatorsResponseOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListPublicOperatorsResponseOrBuilder.java new file mode 100644 index 000000000000..c4c9a0c7f551 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListPublicOperatorsResponseOrBuilder.java @@ -0,0 +1,103 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/lva_service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface ListPublicOperatorsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.ListPublicOperatorsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The list of Operator
+   * 
+ * + * repeated .google.cloud.visionai.v1.Operator operators = 1; + */ + java.util.List getOperatorsList(); + /** + * + * + *
+   * The list of Operator
+   * 
+ * + * repeated .google.cloud.visionai.v1.Operator operators = 1; + */ + com.google.cloud.visionai.v1.Operator getOperators(int index); + /** + * + * + *
+   * The list of Operator
+   * 
+ * + * repeated .google.cloud.visionai.v1.Operator operators = 1; + */ + int getOperatorsCount(); + /** + * + * + *
+   * The list of Operator
+   * 
+ * + * repeated .google.cloud.visionai.v1.Operator operators = 1; + */ + java.util.List + getOperatorsOrBuilderList(); + /** + * + * + *
+   * The list of Operator
+   * 
+ * + * repeated .google.cloud.visionai.v1.Operator operators = 1; + */ + com.google.cloud.visionai.v1.OperatorOrBuilder getOperatorsOrBuilder(int index); + + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListSearchConfigsRequest.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListSearchConfigsRequest.java new file mode 100644 index 000000000000..7753b6304cc2 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListSearchConfigsRequest.java @@ -0,0 +1,972 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/warehouse.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * Request message for ListSearchConfigs.
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.ListSearchConfigsRequest} + */ +public final class ListSearchConfigsRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.ListSearchConfigsRequest) + ListSearchConfigsRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListSearchConfigsRequest.newBuilder() to construct. + private ListSearchConfigsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListSearchConfigsRequest() { + parent_ = ""; + pageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListSearchConfigsRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_ListSearchConfigsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_ListSearchConfigsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.ListSearchConfigsRequest.class, + com.google.cloud.visionai.v1.ListSearchConfigsRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + /** + * + * + *
+   * Required. The parent, which owns this collection of search configurations.
+   * Format:
+   * `projects/{project_number}/locations/{location}/corpora/{corpus}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + 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(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The parent, which owns this collection of search configurations.
+   * Format:
+   * `projects/{project_number}/locations/{location}/corpora/{corpus}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 2; + private int pageSize_ = 0; + /** + * + * + *
+   * The maximum number of search configurations to return. The service may
+   * return fewer than this value. If unspecified, a page size of 50 will be
+   * used. The maximum value is 1000; values above 1000 will be coerced to 1000.
+   * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object pageToken_ = ""; + /** + * + * + *
+   * A page token, received from a previous `ListSearchConfigs` call.
+   * Provide this to retrieve the subsequent page.
+   *
+   * When paginating, all other parameters provided to
+   * `ListSearchConfigs` must match the call that provided the page
+   * token.
+   * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + 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(); + pageToken_ = s; + return s; + } + } + /** + * + * + *
+   * A page token, received from a previous `ListSearchConfigs` call.
+   * Provide this to retrieve the subsequent page.
+   *
+   * When paginating, all other parameters provided to
+   * `ListSearchConfigs` must match the call that provided the page
+   * token.
+   * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); + } + size += getUnknownFields().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.visionai.v1.ListSearchConfigsRequest)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.ListSearchConfigsRequest other = + (com.google.cloud.visionai.v1.ListSearchConfigsRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.ListSearchConfigsRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ListSearchConfigsRequest 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.visionai.v1.ListSearchConfigsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ListSearchConfigsRequest 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.visionai.v1.ListSearchConfigsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ListSearchConfigsRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.ListSearchConfigsRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ListSearchConfigsRequest 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.visionai.v1.ListSearchConfigsRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ListSearchConfigsRequest 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.visionai.v1.ListSearchConfigsRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ListSearchConfigsRequest 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.visionai.v1.ListSearchConfigsRequest 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; + } + /** + * + * + *
+   * Request message for ListSearchConfigs.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.ListSearchConfigsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.ListSearchConfigsRequest) + com.google.cloud.visionai.v1.ListSearchConfigsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_ListSearchConfigsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_ListSearchConfigsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.ListSearchConfigsRequest.class, + com.google.cloud.visionai.v1.ListSearchConfigsRequest.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.ListSearchConfigsRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + pageSize_ = 0; + pageToken_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_ListSearchConfigsRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ListSearchConfigsRequest getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.ListSearchConfigsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ListSearchConfigsRequest build() { + com.google.cloud.visionai.v1.ListSearchConfigsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ListSearchConfigsRequest buildPartial() { + com.google.cloud.visionai.v1.ListSearchConfigsRequest result = + new com.google.cloud.visionai.v1.ListSearchConfigsRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.visionai.v1.ListSearchConfigsRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.pageSize_ = pageSize_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.pageToken_ = pageToken_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.ListSearchConfigsRequest) { + return mergeFrom((com.google.cloud.visionai.v1.ListSearchConfigsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.ListSearchConfigsRequest other) { + if (other == com.google.cloud.visionai.v1.ListSearchConfigsRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + bitField0_ |= 0x00000004; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + pageSize_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The parent, which owns this collection of search configurations.
+     * Format:
+     * `projects/{project_number}/locations/{location}/corpora/{corpus}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The parent, which owns this collection of search configurations.
+     * Format:
+     * `projects/{project_number}/locations/{location}/corpora/{corpus}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The parent, which owns this collection of search configurations.
+     * Format:
+     * `projects/{project_number}/locations/{location}/corpora/{corpus}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The parent, which owns this collection of search configurations.
+     * Format:
+     * `projects/{project_number}/locations/{location}/corpora/{corpus}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The parent, which owns this collection of search configurations.
+     * Format:
+     * `projects/{project_number}/locations/{location}/corpora/{corpus}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private int pageSize_; + /** + * + * + *
+     * The maximum number of search configurations to return. The service may
+     * return fewer than this value. If unspecified, a page size of 50 will be
+     * used. The maximum value is 1000; values above 1000 will be coerced to 1000.
+     * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + * + * + *
+     * The maximum number of search configurations to return. The service may
+     * return fewer than this value. If unspecified, a page size of 50 will be
+     * used. The maximum value is 1000; values above 1000 will be coerced to 1000.
+     * 
+ * + * int32 page_size = 2; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * The maximum number of search configurations to return. The service may
+     * return fewer than this value. If unspecified, a page size of 50 will be
+     * used. The maximum value is 1000; values above 1000 will be coerced to 1000.
+     * 
+ * + * int32 page_size = 2; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + bitField0_ = (bitField0_ & ~0x00000002); + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + * + * + *
+     * A page token, received from a previous `ListSearchConfigs` call.
+     * Provide this to retrieve the subsequent page.
+     *
+     * When paginating, all other parameters provided to
+     * `ListSearchConfigs` must match the call that provided the page
+     * token.
+     * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A page token, received from a previous `ListSearchConfigs` call.
+     * Provide this to retrieve the subsequent page.
+     *
+     * When paginating, all other parameters provided to
+     * `ListSearchConfigs` must match the call that provided the page
+     * token.
+     * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A page token, received from a previous `ListSearchConfigs` call.
+     * Provide this to retrieve the subsequent page.
+     *
+     * When paginating, all other parameters provided to
+     * `ListSearchConfigs` must match the call that provided the page
+     * token.
+     * 
+ * + * string page_token = 3; + * + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + pageToken_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * A page token, received from a previous `ListSearchConfigs` call.
+     * Provide this to retrieve the subsequent page.
+     *
+     * When paginating, all other parameters provided to
+     * `ListSearchConfigs` must match the call that provided the page
+     * token.
+     * 
+ * + * string page_token = 3; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + pageToken_ = getDefaultInstance().getPageToken(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * A page token, received from a previous `ListSearchConfigs` call.
+     * Provide this to retrieve the subsequent page.
+     *
+     * When paginating, all other parameters provided to
+     * `ListSearchConfigs` must match the call that provided the page
+     * token.
+     * 
+ * + * string page_token = 3; + * + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + pageToken_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.ListSearchConfigsRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.ListSearchConfigsRequest) + private static final com.google.cloud.visionai.v1.ListSearchConfigsRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.ListSearchConfigsRequest(); + } + + public static com.google.cloud.visionai.v1.ListSearchConfigsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListSearchConfigsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.ListSearchConfigsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListSearchConfigsRequestOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListSearchConfigsRequestOrBuilder.java new file mode 100644 index 000000000000..8b876980d055 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListSearchConfigsRequestOrBuilder.java @@ -0,0 +1,109 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/warehouse.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface ListSearchConfigsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.ListSearchConfigsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The parent, which owns this collection of search configurations.
+   * Format:
+   * `projects/{project_number}/locations/{location}/corpora/{corpus}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The parent, which owns this collection of search configurations.
+   * Format:
+   * `projects/{project_number}/locations/{location}/corpora/{corpus}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * The maximum number of search configurations to return. The service may
+   * return fewer than this value. If unspecified, a page size of 50 will be
+   * used. The maximum value is 1000; values above 1000 will be coerced to 1000.
+   * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * A page token, received from a previous `ListSearchConfigs` call.
+   * Provide this to retrieve the subsequent page.
+   *
+   * When paginating, all other parameters provided to
+   * `ListSearchConfigs` must match the call that provided the page
+   * token.
+   * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + * + * + *
+   * A page token, received from a previous `ListSearchConfigs` call.
+   * Provide this to retrieve the subsequent page.
+   *
+   * When paginating, all other parameters provided to
+   * `ListSearchConfigs` must match the call that provided the page
+   * token.
+   * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListSearchConfigsResponse.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListSearchConfigsResponse.java new file mode 100644 index 000000000000..fd7c90fc6d99 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListSearchConfigsResponse.java @@ -0,0 +1,1131 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/warehouse.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * Response message for ListSearchConfigs.
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.ListSearchConfigsResponse} + */ +public final class ListSearchConfigsResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.ListSearchConfigsResponse) + ListSearchConfigsResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListSearchConfigsResponse.newBuilder() to construct. + private ListSearchConfigsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListSearchConfigsResponse() { + searchConfigs_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListSearchConfigsResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_ListSearchConfigsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_ListSearchConfigsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.ListSearchConfigsResponse.class, + com.google.cloud.visionai.v1.ListSearchConfigsResponse.Builder.class); + } + + public static final int SEARCH_CONFIGS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List searchConfigs_; + /** + * + * + *
+   * The search configurations from the specified corpus.
+   * 
+ * + * repeated .google.cloud.visionai.v1.SearchConfig search_configs = 1; + */ + @java.lang.Override + public java.util.List getSearchConfigsList() { + return searchConfigs_; + } + /** + * + * + *
+   * The search configurations from the specified corpus.
+   * 
+ * + * repeated .google.cloud.visionai.v1.SearchConfig search_configs = 1; + */ + @java.lang.Override + public java.util.List + getSearchConfigsOrBuilderList() { + return searchConfigs_; + } + /** + * + * + *
+   * The search configurations from the specified corpus.
+   * 
+ * + * repeated .google.cloud.visionai.v1.SearchConfig search_configs = 1; + */ + @java.lang.Override + public int getSearchConfigsCount() { + return searchConfigs_.size(); + } + /** + * + * + *
+   * The search configurations from the specified corpus.
+   * 
+ * + * repeated .google.cloud.visionai.v1.SearchConfig search_configs = 1; + */ + @java.lang.Override + public com.google.cloud.visionai.v1.SearchConfig getSearchConfigs(int index) { + return searchConfigs_.get(index); + } + /** + * + * + *
+   * The search configurations from the specified corpus.
+   * 
+ * + * repeated .google.cloud.visionai.v1.SearchConfig search_configs = 1; + */ + @java.lang.Override + public com.google.cloud.visionai.v1.SearchConfigOrBuilder getSearchConfigsOrBuilder(int index) { + return searchConfigs_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+   * A token, which can be sent as `page_token` to retrieve the next page.
+   * If this field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + 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(); + nextPageToken_ = s; + return s; + } + } + /** + * + * + *
+   * A token, which can be sent as `page_token` to retrieve the next page.
+   * If this field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = 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 { + for (int i = 0; i < searchConfigs_.size(); i++) { + output.writeMessage(1, searchConfigs_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < searchConfigs_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, searchConfigs_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + } + size += getUnknownFields().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.visionai.v1.ListSearchConfigsResponse)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.ListSearchConfigsResponse other = + (com.google.cloud.visionai.v1.ListSearchConfigsResponse) obj; + + if (!getSearchConfigsList().equals(other.getSearchConfigsList())) return false; + if (!getNextPageToken().equals(other.getNextPageToken())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getSearchConfigsCount() > 0) { + hash = (37 * hash) + SEARCH_CONFIGS_FIELD_NUMBER; + hash = (53 * hash) + getSearchConfigsList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.ListSearchConfigsResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ListSearchConfigsResponse 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.visionai.v1.ListSearchConfigsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ListSearchConfigsResponse 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.visionai.v1.ListSearchConfigsResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ListSearchConfigsResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.ListSearchConfigsResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ListSearchConfigsResponse 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.visionai.v1.ListSearchConfigsResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ListSearchConfigsResponse 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.visionai.v1.ListSearchConfigsResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ListSearchConfigsResponse 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.visionai.v1.ListSearchConfigsResponse 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; + } + /** + * + * + *
+   * Response message for ListSearchConfigs.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.ListSearchConfigsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.ListSearchConfigsResponse) + com.google.cloud.visionai.v1.ListSearchConfigsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_ListSearchConfigsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_ListSearchConfigsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.ListSearchConfigsResponse.class, + com.google.cloud.visionai.v1.ListSearchConfigsResponse.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.ListSearchConfigsResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (searchConfigsBuilder_ == null) { + searchConfigs_ = java.util.Collections.emptyList(); + } else { + searchConfigs_ = null; + searchConfigsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + nextPageToken_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_ListSearchConfigsResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ListSearchConfigsResponse getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.ListSearchConfigsResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ListSearchConfigsResponse build() { + com.google.cloud.visionai.v1.ListSearchConfigsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ListSearchConfigsResponse buildPartial() { + com.google.cloud.visionai.v1.ListSearchConfigsResponse result = + new com.google.cloud.visionai.v1.ListSearchConfigsResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.visionai.v1.ListSearchConfigsResponse result) { + if (searchConfigsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + searchConfigs_ = java.util.Collections.unmodifiableList(searchConfigs_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.searchConfigs_ = searchConfigs_; + } else { + result.searchConfigs_ = searchConfigsBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.visionai.v1.ListSearchConfigsResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.nextPageToken_ = nextPageToken_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.ListSearchConfigsResponse) { + return mergeFrom((com.google.cloud.visionai.v1.ListSearchConfigsResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.ListSearchConfigsResponse other) { + if (other == com.google.cloud.visionai.v1.ListSearchConfigsResponse.getDefaultInstance()) + return this; + if (searchConfigsBuilder_ == null) { + if (!other.searchConfigs_.isEmpty()) { + if (searchConfigs_.isEmpty()) { + searchConfigs_ = other.searchConfigs_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureSearchConfigsIsMutable(); + searchConfigs_.addAll(other.searchConfigs_); + } + onChanged(); + } + } else { + if (!other.searchConfigs_.isEmpty()) { + if (searchConfigsBuilder_.isEmpty()) { + searchConfigsBuilder_.dispose(); + searchConfigsBuilder_ = null; + searchConfigs_ = other.searchConfigs_; + bitField0_ = (bitField0_ & ~0x00000001); + searchConfigsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getSearchConfigsFieldBuilder() + : null; + } else { + searchConfigsBuilder_.addAllMessages(other.searchConfigs_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.visionai.v1.SearchConfig m = + input.readMessage( + com.google.cloud.visionai.v1.SearchConfig.parser(), extensionRegistry); + if (searchConfigsBuilder_ == null) { + ensureSearchConfigsIsMutable(); + searchConfigs_.add(m); + } else { + searchConfigsBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List searchConfigs_ = + java.util.Collections.emptyList(); + + private void ensureSearchConfigsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + searchConfigs_ = + new java.util.ArrayList(searchConfigs_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.visionai.v1.SearchConfig, + com.google.cloud.visionai.v1.SearchConfig.Builder, + com.google.cloud.visionai.v1.SearchConfigOrBuilder> + searchConfigsBuilder_; + + /** + * + * + *
+     * The search configurations from the specified corpus.
+     * 
+ * + * repeated .google.cloud.visionai.v1.SearchConfig search_configs = 1; + */ + public java.util.List getSearchConfigsList() { + if (searchConfigsBuilder_ == null) { + return java.util.Collections.unmodifiableList(searchConfigs_); + } else { + return searchConfigsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * The search configurations from the specified corpus.
+     * 
+ * + * repeated .google.cloud.visionai.v1.SearchConfig search_configs = 1; + */ + public int getSearchConfigsCount() { + if (searchConfigsBuilder_ == null) { + return searchConfigs_.size(); + } else { + return searchConfigsBuilder_.getCount(); + } + } + /** + * + * + *
+     * The search configurations from the specified corpus.
+     * 
+ * + * repeated .google.cloud.visionai.v1.SearchConfig search_configs = 1; + */ + public com.google.cloud.visionai.v1.SearchConfig getSearchConfigs(int index) { + if (searchConfigsBuilder_ == null) { + return searchConfigs_.get(index); + } else { + return searchConfigsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * The search configurations from the specified corpus.
+     * 
+ * + * repeated .google.cloud.visionai.v1.SearchConfig search_configs = 1; + */ + public Builder setSearchConfigs(int index, com.google.cloud.visionai.v1.SearchConfig value) { + if (searchConfigsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSearchConfigsIsMutable(); + searchConfigs_.set(index, value); + onChanged(); + } else { + searchConfigsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The search configurations from the specified corpus.
+     * 
+ * + * repeated .google.cloud.visionai.v1.SearchConfig search_configs = 1; + */ + public Builder setSearchConfigs( + int index, com.google.cloud.visionai.v1.SearchConfig.Builder builderForValue) { + if (searchConfigsBuilder_ == null) { + ensureSearchConfigsIsMutable(); + searchConfigs_.set(index, builderForValue.build()); + onChanged(); + } else { + searchConfigsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The search configurations from the specified corpus.
+     * 
+ * + * repeated .google.cloud.visionai.v1.SearchConfig search_configs = 1; + */ + public Builder addSearchConfigs(com.google.cloud.visionai.v1.SearchConfig value) { + if (searchConfigsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSearchConfigsIsMutable(); + searchConfigs_.add(value); + onChanged(); + } else { + searchConfigsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * The search configurations from the specified corpus.
+     * 
+ * + * repeated .google.cloud.visionai.v1.SearchConfig search_configs = 1; + */ + public Builder addSearchConfigs(int index, com.google.cloud.visionai.v1.SearchConfig value) { + if (searchConfigsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSearchConfigsIsMutable(); + searchConfigs_.add(index, value); + onChanged(); + } else { + searchConfigsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The search configurations from the specified corpus.
+     * 
+ * + * repeated .google.cloud.visionai.v1.SearchConfig search_configs = 1; + */ + public Builder addSearchConfigs( + com.google.cloud.visionai.v1.SearchConfig.Builder builderForValue) { + if (searchConfigsBuilder_ == null) { + ensureSearchConfigsIsMutable(); + searchConfigs_.add(builderForValue.build()); + onChanged(); + } else { + searchConfigsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The search configurations from the specified corpus.
+     * 
+ * + * repeated .google.cloud.visionai.v1.SearchConfig search_configs = 1; + */ + public Builder addSearchConfigs( + int index, com.google.cloud.visionai.v1.SearchConfig.Builder builderForValue) { + if (searchConfigsBuilder_ == null) { + ensureSearchConfigsIsMutable(); + searchConfigs_.add(index, builderForValue.build()); + onChanged(); + } else { + searchConfigsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The search configurations from the specified corpus.
+     * 
+ * + * repeated .google.cloud.visionai.v1.SearchConfig search_configs = 1; + */ + public Builder addAllSearchConfigs( + java.lang.Iterable values) { + if (searchConfigsBuilder_ == null) { + ensureSearchConfigsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, searchConfigs_); + onChanged(); + } else { + searchConfigsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * The search configurations from the specified corpus.
+     * 
+ * + * repeated .google.cloud.visionai.v1.SearchConfig search_configs = 1; + */ + public Builder clearSearchConfigs() { + if (searchConfigsBuilder_ == null) { + searchConfigs_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + searchConfigsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The search configurations from the specified corpus.
+     * 
+ * + * repeated .google.cloud.visionai.v1.SearchConfig search_configs = 1; + */ + public Builder removeSearchConfigs(int index) { + if (searchConfigsBuilder_ == null) { + ensureSearchConfigsIsMutable(); + searchConfigs_.remove(index); + onChanged(); + } else { + searchConfigsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * The search configurations from the specified corpus.
+     * 
+ * + * repeated .google.cloud.visionai.v1.SearchConfig search_configs = 1; + */ + public com.google.cloud.visionai.v1.SearchConfig.Builder getSearchConfigsBuilder(int index) { + return getSearchConfigsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * The search configurations from the specified corpus.
+     * 
+ * + * repeated .google.cloud.visionai.v1.SearchConfig search_configs = 1; + */ + public com.google.cloud.visionai.v1.SearchConfigOrBuilder getSearchConfigsOrBuilder(int index) { + if (searchConfigsBuilder_ == null) { + return searchConfigs_.get(index); + } else { + return searchConfigsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * The search configurations from the specified corpus.
+     * 
+ * + * repeated .google.cloud.visionai.v1.SearchConfig search_configs = 1; + */ + public java.util.List + getSearchConfigsOrBuilderList() { + if (searchConfigsBuilder_ != null) { + return searchConfigsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(searchConfigs_); + } + } + /** + * + * + *
+     * The search configurations from the specified corpus.
+     * 
+ * + * repeated .google.cloud.visionai.v1.SearchConfig search_configs = 1; + */ + public com.google.cloud.visionai.v1.SearchConfig.Builder addSearchConfigsBuilder() { + return getSearchConfigsFieldBuilder() + .addBuilder(com.google.cloud.visionai.v1.SearchConfig.getDefaultInstance()); + } + /** + * + * + *
+     * The search configurations from the specified corpus.
+     * 
+ * + * repeated .google.cloud.visionai.v1.SearchConfig search_configs = 1; + */ + public com.google.cloud.visionai.v1.SearchConfig.Builder addSearchConfigsBuilder(int index) { + return getSearchConfigsFieldBuilder() + .addBuilder(index, com.google.cloud.visionai.v1.SearchConfig.getDefaultInstance()); + } + /** + * + * + *
+     * The search configurations from the specified corpus.
+     * 
+ * + * repeated .google.cloud.visionai.v1.SearchConfig search_configs = 1; + */ + public java.util.List + getSearchConfigsBuilderList() { + return getSearchConfigsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.visionai.v1.SearchConfig, + com.google.cloud.visionai.v1.SearchConfig.Builder, + com.google.cloud.visionai.v1.SearchConfigOrBuilder> + getSearchConfigsFieldBuilder() { + if (searchConfigsBuilder_ == null) { + searchConfigsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.visionai.v1.SearchConfig, + com.google.cloud.visionai.v1.SearchConfig.Builder, + com.google.cloud.visionai.v1.SearchConfigOrBuilder>( + searchConfigs_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + searchConfigs_ = null; + } + return searchConfigsBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+     * A token, which can be sent as `page_token` to retrieve the next page.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A token, which can be sent as `page_token` to retrieve the next page.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A token, which can be sent as `page_token` to retrieve the next page.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * A token, which can be sent as `page_token` to retrieve the next page.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + nextPageToken_ = getDefaultInstance().getNextPageToken(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * A token, which can be sent as `page_token` to retrieve the next page.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.ListSearchConfigsResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.ListSearchConfigsResponse) + private static final com.google.cloud.visionai.v1.ListSearchConfigsResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.ListSearchConfigsResponse(); + } + + public static com.google.cloud.visionai.v1.ListSearchConfigsResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListSearchConfigsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.ListSearchConfigsResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListSearchConfigsResponseOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListSearchConfigsResponseOrBuilder.java new file mode 100644 index 000000000000..801c56bbf279 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListSearchConfigsResponseOrBuilder.java @@ -0,0 +1,105 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/warehouse.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface ListSearchConfigsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.ListSearchConfigsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The search configurations from the specified corpus.
+   * 
+ * + * repeated .google.cloud.visionai.v1.SearchConfig search_configs = 1; + */ + java.util.List getSearchConfigsList(); + /** + * + * + *
+   * The search configurations from the specified corpus.
+   * 
+ * + * repeated .google.cloud.visionai.v1.SearchConfig search_configs = 1; + */ + com.google.cloud.visionai.v1.SearchConfig getSearchConfigs(int index); + /** + * + * + *
+   * The search configurations from the specified corpus.
+   * 
+ * + * repeated .google.cloud.visionai.v1.SearchConfig search_configs = 1; + */ + int getSearchConfigsCount(); + /** + * + * + *
+   * The search configurations from the specified corpus.
+   * 
+ * + * repeated .google.cloud.visionai.v1.SearchConfig search_configs = 1; + */ + java.util.List + getSearchConfigsOrBuilderList(); + /** + * + * + *
+   * The search configurations from the specified corpus.
+   * 
+ * + * repeated .google.cloud.visionai.v1.SearchConfig search_configs = 1; + */ + com.google.cloud.visionai.v1.SearchConfigOrBuilder getSearchConfigsOrBuilder(int index); + + /** + * + * + *
+   * A token, which can be sent as `page_token` to retrieve the next page.
+   * If this field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + * + * + *
+   * A token, which can be sent as `page_token` to retrieve the next page.
+   * If this field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListSearchHypernymsRequest.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListSearchHypernymsRequest.java new file mode 100644 index 000000000000..b7216b70babd --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListSearchHypernymsRequest.java @@ -0,0 +1,972 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/warehouse.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * Request message for listing SearchHypernyms.
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.ListSearchHypernymsRequest} + */ +public final class ListSearchHypernymsRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.ListSearchHypernymsRequest) + ListSearchHypernymsRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListSearchHypernymsRequest.newBuilder() to construct. + private ListSearchHypernymsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListSearchHypernymsRequest() { + parent_ = ""; + pageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListSearchHypernymsRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_ListSearchHypernymsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_ListSearchHypernymsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.ListSearchHypernymsRequest.class, + com.google.cloud.visionai.v1.ListSearchHypernymsRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + /** + * + * + *
+   * Required. The parent, which owns this collection of SearchHypernyms.
+   * Format:
+   * `projects/{project_number}/locations/{location}/corpora/{corpus}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + 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(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The parent, which owns this collection of SearchHypernyms.
+   * Format:
+   * `projects/{project_number}/locations/{location}/corpora/{corpus}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 2; + private int pageSize_ = 0; + /** + * + * + *
+   * The maximum number of SearchHypernyms returned. The service may
+   * return fewer than this value. If unspecified, a page size of 50 will be
+   * used. The maximum value is 1000; values above 1000 will be coerced to 1000.
+   * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object pageToken_ = ""; + /** + * + * + *
+   * A page token, received from a previous `SearchHypernym` call.
+   * Provide this to retrieve the subsequent page.
+   *
+   * When paginating, all other parameters provided to
+   * `SearchHypernym` must match the call that provided the page
+   * token.
+   * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + 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(); + pageToken_ = s; + return s; + } + } + /** + * + * + *
+   * A page token, received from a previous `SearchHypernym` call.
+   * Provide this to retrieve the subsequent page.
+   *
+   * When paginating, all other parameters provided to
+   * `SearchHypernym` must match the call that provided the page
+   * token.
+   * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); + } + size += getUnknownFields().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.visionai.v1.ListSearchHypernymsRequest)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.ListSearchHypernymsRequest other = + (com.google.cloud.visionai.v1.ListSearchHypernymsRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.ListSearchHypernymsRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ListSearchHypernymsRequest 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.visionai.v1.ListSearchHypernymsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ListSearchHypernymsRequest 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.visionai.v1.ListSearchHypernymsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ListSearchHypernymsRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.ListSearchHypernymsRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ListSearchHypernymsRequest 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.visionai.v1.ListSearchHypernymsRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ListSearchHypernymsRequest 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.visionai.v1.ListSearchHypernymsRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ListSearchHypernymsRequest 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.visionai.v1.ListSearchHypernymsRequest 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; + } + /** + * + * + *
+   * Request message for listing SearchHypernyms.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.ListSearchHypernymsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.ListSearchHypernymsRequest) + com.google.cloud.visionai.v1.ListSearchHypernymsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_ListSearchHypernymsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_ListSearchHypernymsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.ListSearchHypernymsRequest.class, + com.google.cloud.visionai.v1.ListSearchHypernymsRequest.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.ListSearchHypernymsRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + pageSize_ = 0; + pageToken_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_ListSearchHypernymsRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ListSearchHypernymsRequest getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.ListSearchHypernymsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ListSearchHypernymsRequest build() { + com.google.cloud.visionai.v1.ListSearchHypernymsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ListSearchHypernymsRequest buildPartial() { + com.google.cloud.visionai.v1.ListSearchHypernymsRequest result = + new com.google.cloud.visionai.v1.ListSearchHypernymsRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.visionai.v1.ListSearchHypernymsRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.pageSize_ = pageSize_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.pageToken_ = pageToken_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.ListSearchHypernymsRequest) { + return mergeFrom((com.google.cloud.visionai.v1.ListSearchHypernymsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.ListSearchHypernymsRequest other) { + if (other == com.google.cloud.visionai.v1.ListSearchHypernymsRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + bitField0_ |= 0x00000004; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + pageSize_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The parent, which owns this collection of SearchHypernyms.
+     * Format:
+     * `projects/{project_number}/locations/{location}/corpora/{corpus}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The parent, which owns this collection of SearchHypernyms.
+     * Format:
+     * `projects/{project_number}/locations/{location}/corpora/{corpus}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The parent, which owns this collection of SearchHypernyms.
+     * Format:
+     * `projects/{project_number}/locations/{location}/corpora/{corpus}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The parent, which owns this collection of SearchHypernyms.
+     * Format:
+     * `projects/{project_number}/locations/{location}/corpora/{corpus}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The parent, which owns this collection of SearchHypernyms.
+     * Format:
+     * `projects/{project_number}/locations/{location}/corpora/{corpus}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private int pageSize_; + /** + * + * + *
+     * The maximum number of SearchHypernyms returned. The service may
+     * return fewer than this value. If unspecified, a page size of 50 will be
+     * used. The maximum value is 1000; values above 1000 will be coerced to 1000.
+     * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + * + * + *
+     * The maximum number of SearchHypernyms returned. The service may
+     * return fewer than this value. If unspecified, a page size of 50 will be
+     * used. The maximum value is 1000; values above 1000 will be coerced to 1000.
+     * 
+ * + * int32 page_size = 2; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * The maximum number of SearchHypernyms returned. The service may
+     * return fewer than this value. If unspecified, a page size of 50 will be
+     * used. The maximum value is 1000; values above 1000 will be coerced to 1000.
+     * 
+ * + * int32 page_size = 2; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + bitField0_ = (bitField0_ & ~0x00000002); + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + * + * + *
+     * A page token, received from a previous `SearchHypernym` call.
+     * Provide this to retrieve the subsequent page.
+     *
+     * When paginating, all other parameters provided to
+     * `SearchHypernym` must match the call that provided the page
+     * token.
+     * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A page token, received from a previous `SearchHypernym` call.
+     * Provide this to retrieve the subsequent page.
+     *
+     * When paginating, all other parameters provided to
+     * `SearchHypernym` must match the call that provided the page
+     * token.
+     * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A page token, received from a previous `SearchHypernym` call.
+     * Provide this to retrieve the subsequent page.
+     *
+     * When paginating, all other parameters provided to
+     * `SearchHypernym` must match the call that provided the page
+     * token.
+     * 
+ * + * string page_token = 3; + * + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + pageToken_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * A page token, received from a previous `SearchHypernym` call.
+     * Provide this to retrieve the subsequent page.
+     *
+     * When paginating, all other parameters provided to
+     * `SearchHypernym` must match the call that provided the page
+     * token.
+     * 
+ * + * string page_token = 3; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + pageToken_ = getDefaultInstance().getPageToken(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * A page token, received from a previous `SearchHypernym` call.
+     * Provide this to retrieve the subsequent page.
+     *
+     * When paginating, all other parameters provided to
+     * `SearchHypernym` must match the call that provided the page
+     * token.
+     * 
+ * + * string page_token = 3; + * + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + pageToken_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.ListSearchHypernymsRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.ListSearchHypernymsRequest) + private static final com.google.cloud.visionai.v1.ListSearchHypernymsRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.ListSearchHypernymsRequest(); + } + + public static com.google.cloud.visionai.v1.ListSearchHypernymsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListSearchHypernymsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.ListSearchHypernymsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListSearchHypernymsRequestOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListSearchHypernymsRequestOrBuilder.java new file mode 100644 index 000000000000..b5050e77651e --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListSearchHypernymsRequestOrBuilder.java @@ -0,0 +1,109 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/warehouse.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface ListSearchHypernymsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.ListSearchHypernymsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The parent, which owns this collection of SearchHypernyms.
+   * Format:
+   * `projects/{project_number}/locations/{location}/corpora/{corpus}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The parent, which owns this collection of SearchHypernyms.
+   * Format:
+   * `projects/{project_number}/locations/{location}/corpora/{corpus}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * The maximum number of SearchHypernyms returned. The service may
+   * return fewer than this value. If unspecified, a page size of 50 will be
+   * used. The maximum value is 1000; values above 1000 will be coerced to 1000.
+   * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * A page token, received from a previous `SearchHypernym` call.
+   * Provide this to retrieve the subsequent page.
+   *
+   * When paginating, all other parameters provided to
+   * `SearchHypernym` must match the call that provided the page
+   * token.
+   * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + * + * + *
+   * A page token, received from a previous `SearchHypernym` call.
+   * Provide this to retrieve the subsequent page.
+   *
+   * When paginating, all other parameters provided to
+   * `SearchHypernym` must match the call that provided the page
+   * token.
+   * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListSearchHypernymsResponse.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListSearchHypernymsResponse.java new file mode 100644 index 000000000000..cd0d2764401e --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListSearchHypernymsResponse.java @@ -0,0 +1,1137 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/warehouse.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * Response message for listing SearchHypernyms.
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.ListSearchHypernymsResponse} + */ +public final class ListSearchHypernymsResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.ListSearchHypernymsResponse) + ListSearchHypernymsResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListSearchHypernymsResponse.newBuilder() to construct. + private ListSearchHypernymsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListSearchHypernymsResponse() { + searchHypernyms_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListSearchHypernymsResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_ListSearchHypernymsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_ListSearchHypernymsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.ListSearchHypernymsResponse.class, + com.google.cloud.visionai.v1.ListSearchHypernymsResponse.Builder.class); + } + + public static final int SEARCH_HYPERNYMS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List searchHypernyms_; + /** + * + * + *
+   * The SearchHypernyms from the specified corpus.
+   * 
+ * + * repeated .google.cloud.visionai.v1.SearchHypernym search_hypernyms = 1; + */ + @java.lang.Override + public java.util.List getSearchHypernymsList() { + return searchHypernyms_; + } + /** + * + * + *
+   * The SearchHypernyms from the specified corpus.
+   * 
+ * + * repeated .google.cloud.visionai.v1.SearchHypernym search_hypernyms = 1; + */ + @java.lang.Override + public java.util.List + getSearchHypernymsOrBuilderList() { + return searchHypernyms_; + } + /** + * + * + *
+   * The SearchHypernyms from the specified corpus.
+   * 
+ * + * repeated .google.cloud.visionai.v1.SearchHypernym search_hypernyms = 1; + */ + @java.lang.Override + public int getSearchHypernymsCount() { + return searchHypernyms_.size(); + } + /** + * + * + *
+   * The SearchHypernyms from the specified corpus.
+   * 
+ * + * repeated .google.cloud.visionai.v1.SearchHypernym search_hypernyms = 1; + */ + @java.lang.Override + public com.google.cloud.visionai.v1.SearchHypernym getSearchHypernyms(int index) { + return searchHypernyms_.get(index); + } + /** + * + * + *
+   * The SearchHypernyms from the specified corpus.
+   * 
+ * + * repeated .google.cloud.visionai.v1.SearchHypernym search_hypernyms = 1; + */ + @java.lang.Override + public com.google.cloud.visionai.v1.SearchHypernymOrBuilder getSearchHypernymsOrBuilder( + int index) { + return searchHypernyms_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+   * A token, which can be sent as `page_token` to retrieve the next page.
+   * If this field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + 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(); + nextPageToken_ = s; + return s; + } + } + /** + * + * + *
+   * A token, which can be sent as `page_token` to retrieve the next page.
+   * If this field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = 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 { + for (int i = 0; i < searchHypernyms_.size(); i++) { + output.writeMessage(1, searchHypernyms_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < searchHypernyms_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, searchHypernyms_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + } + size += getUnknownFields().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.visionai.v1.ListSearchHypernymsResponse)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.ListSearchHypernymsResponse other = + (com.google.cloud.visionai.v1.ListSearchHypernymsResponse) obj; + + if (!getSearchHypernymsList().equals(other.getSearchHypernymsList())) return false; + if (!getNextPageToken().equals(other.getNextPageToken())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getSearchHypernymsCount() > 0) { + hash = (37 * hash) + SEARCH_HYPERNYMS_FIELD_NUMBER; + hash = (53 * hash) + getSearchHypernymsList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.ListSearchHypernymsResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ListSearchHypernymsResponse 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.visionai.v1.ListSearchHypernymsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ListSearchHypernymsResponse 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.visionai.v1.ListSearchHypernymsResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ListSearchHypernymsResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.ListSearchHypernymsResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ListSearchHypernymsResponse 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.visionai.v1.ListSearchHypernymsResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ListSearchHypernymsResponse 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.visionai.v1.ListSearchHypernymsResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ListSearchHypernymsResponse 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.visionai.v1.ListSearchHypernymsResponse 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; + } + /** + * + * + *
+   * Response message for listing SearchHypernyms.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.ListSearchHypernymsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.ListSearchHypernymsResponse) + com.google.cloud.visionai.v1.ListSearchHypernymsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_ListSearchHypernymsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_ListSearchHypernymsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.ListSearchHypernymsResponse.class, + com.google.cloud.visionai.v1.ListSearchHypernymsResponse.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.ListSearchHypernymsResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (searchHypernymsBuilder_ == null) { + searchHypernyms_ = java.util.Collections.emptyList(); + } else { + searchHypernyms_ = null; + searchHypernymsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + nextPageToken_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_ListSearchHypernymsResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ListSearchHypernymsResponse getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.ListSearchHypernymsResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ListSearchHypernymsResponse build() { + com.google.cloud.visionai.v1.ListSearchHypernymsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ListSearchHypernymsResponse buildPartial() { + com.google.cloud.visionai.v1.ListSearchHypernymsResponse result = + new com.google.cloud.visionai.v1.ListSearchHypernymsResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.visionai.v1.ListSearchHypernymsResponse result) { + if (searchHypernymsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + searchHypernyms_ = java.util.Collections.unmodifiableList(searchHypernyms_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.searchHypernyms_ = searchHypernyms_; + } else { + result.searchHypernyms_ = searchHypernymsBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.visionai.v1.ListSearchHypernymsResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.nextPageToken_ = nextPageToken_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.ListSearchHypernymsResponse) { + return mergeFrom((com.google.cloud.visionai.v1.ListSearchHypernymsResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.ListSearchHypernymsResponse other) { + if (other == com.google.cloud.visionai.v1.ListSearchHypernymsResponse.getDefaultInstance()) + return this; + if (searchHypernymsBuilder_ == null) { + if (!other.searchHypernyms_.isEmpty()) { + if (searchHypernyms_.isEmpty()) { + searchHypernyms_ = other.searchHypernyms_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureSearchHypernymsIsMutable(); + searchHypernyms_.addAll(other.searchHypernyms_); + } + onChanged(); + } + } else { + if (!other.searchHypernyms_.isEmpty()) { + if (searchHypernymsBuilder_.isEmpty()) { + searchHypernymsBuilder_.dispose(); + searchHypernymsBuilder_ = null; + searchHypernyms_ = other.searchHypernyms_; + bitField0_ = (bitField0_ & ~0x00000001); + searchHypernymsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getSearchHypernymsFieldBuilder() + : null; + } else { + searchHypernymsBuilder_.addAllMessages(other.searchHypernyms_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.visionai.v1.SearchHypernym m = + input.readMessage( + com.google.cloud.visionai.v1.SearchHypernym.parser(), extensionRegistry); + if (searchHypernymsBuilder_ == null) { + ensureSearchHypernymsIsMutable(); + searchHypernyms_.add(m); + } else { + searchHypernymsBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List searchHypernyms_ = + java.util.Collections.emptyList(); + + private void ensureSearchHypernymsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + searchHypernyms_ = + new java.util.ArrayList(searchHypernyms_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.visionai.v1.SearchHypernym, + com.google.cloud.visionai.v1.SearchHypernym.Builder, + com.google.cloud.visionai.v1.SearchHypernymOrBuilder> + searchHypernymsBuilder_; + + /** + * + * + *
+     * The SearchHypernyms from the specified corpus.
+     * 
+ * + * repeated .google.cloud.visionai.v1.SearchHypernym search_hypernyms = 1; + */ + public java.util.List getSearchHypernymsList() { + if (searchHypernymsBuilder_ == null) { + return java.util.Collections.unmodifiableList(searchHypernyms_); + } else { + return searchHypernymsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * The SearchHypernyms from the specified corpus.
+     * 
+ * + * repeated .google.cloud.visionai.v1.SearchHypernym search_hypernyms = 1; + */ + public int getSearchHypernymsCount() { + if (searchHypernymsBuilder_ == null) { + return searchHypernyms_.size(); + } else { + return searchHypernymsBuilder_.getCount(); + } + } + /** + * + * + *
+     * The SearchHypernyms from the specified corpus.
+     * 
+ * + * repeated .google.cloud.visionai.v1.SearchHypernym search_hypernyms = 1; + */ + public com.google.cloud.visionai.v1.SearchHypernym getSearchHypernyms(int index) { + if (searchHypernymsBuilder_ == null) { + return searchHypernyms_.get(index); + } else { + return searchHypernymsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * The SearchHypernyms from the specified corpus.
+     * 
+ * + * repeated .google.cloud.visionai.v1.SearchHypernym search_hypernyms = 1; + */ + public Builder setSearchHypernyms( + int index, com.google.cloud.visionai.v1.SearchHypernym value) { + if (searchHypernymsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSearchHypernymsIsMutable(); + searchHypernyms_.set(index, value); + onChanged(); + } else { + searchHypernymsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The SearchHypernyms from the specified corpus.
+     * 
+ * + * repeated .google.cloud.visionai.v1.SearchHypernym search_hypernyms = 1; + */ + public Builder setSearchHypernyms( + int index, com.google.cloud.visionai.v1.SearchHypernym.Builder builderForValue) { + if (searchHypernymsBuilder_ == null) { + ensureSearchHypernymsIsMutable(); + searchHypernyms_.set(index, builderForValue.build()); + onChanged(); + } else { + searchHypernymsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The SearchHypernyms from the specified corpus.
+     * 
+ * + * repeated .google.cloud.visionai.v1.SearchHypernym search_hypernyms = 1; + */ + public Builder addSearchHypernyms(com.google.cloud.visionai.v1.SearchHypernym value) { + if (searchHypernymsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSearchHypernymsIsMutable(); + searchHypernyms_.add(value); + onChanged(); + } else { + searchHypernymsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * The SearchHypernyms from the specified corpus.
+     * 
+ * + * repeated .google.cloud.visionai.v1.SearchHypernym search_hypernyms = 1; + */ + public Builder addSearchHypernyms( + int index, com.google.cloud.visionai.v1.SearchHypernym value) { + if (searchHypernymsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSearchHypernymsIsMutable(); + searchHypernyms_.add(index, value); + onChanged(); + } else { + searchHypernymsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The SearchHypernyms from the specified corpus.
+     * 
+ * + * repeated .google.cloud.visionai.v1.SearchHypernym search_hypernyms = 1; + */ + public Builder addSearchHypernyms( + com.google.cloud.visionai.v1.SearchHypernym.Builder builderForValue) { + if (searchHypernymsBuilder_ == null) { + ensureSearchHypernymsIsMutable(); + searchHypernyms_.add(builderForValue.build()); + onChanged(); + } else { + searchHypernymsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The SearchHypernyms from the specified corpus.
+     * 
+ * + * repeated .google.cloud.visionai.v1.SearchHypernym search_hypernyms = 1; + */ + public Builder addSearchHypernyms( + int index, com.google.cloud.visionai.v1.SearchHypernym.Builder builderForValue) { + if (searchHypernymsBuilder_ == null) { + ensureSearchHypernymsIsMutable(); + searchHypernyms_.add(index, builderForValue.build()); + onChanged(); + } else { + searchHypernymsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The SearchHypernyms from the specified corpus.
+     * 
+ * + * repeated .google.cloud.visionai.v1.SearchHypernym search_hypernyms = 1; + */ + public Builder addAllSearchHypernyms( + java.lang.Iterable values) { + if (searchHypernymsBuilder_ == null) { + ensureSearchHypernymsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, searchHypernyms_); + onChanged(); + } else { + searchHypernymsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * The SearchHypernyms from the specified corpus.
+     * 
+ * + * repeated .google.cloud.visionai.v1.SearchHypernym search_hypernyms = 1; + */ + public Builder clearSearchHypernyms() { + if (searchHypernymsBuilder_ == null) { + searchHypernyms_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + searchHypernymsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The SearchHypernyms from the specified corpus.
+     * 
+ * + * repeated .google.cloud.visionai.v1.SearchHypernym search_hypernyms = 1; + */ + public Builder removeSearchHypernyms(int index) { + if (searchHypernymsBuilder_ == null) { + ensureSearchHypernymsIsMutable(); + searchHypernyms_.remove(index); + onChanged(); + } else { + searchHypernymsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * The SearchHypernyms from the specified corpus.
+     * 
+ * + * repeated .google.cloud.visionai.v1.SearchHypernym search_hypernyms = 1; + */ + public com.google.cloud.visionai.v1.SearchHypernym.Builder getSearchHypernymsBuilder( + int index) { + return getSearchHypernymsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * The SearchHypernyms from the specified corpus.
+     * 
+ * + * repeated .google.cloud.visionai.v1.SearchHypernym search_hypernyms = 1; + */ + public com.google.cloud.visionai.v1.SearchHypernymOrBuilder getSearchHypernymsOrBuilder( + int index) { + if (searchHypernymsBuilder_ == null) { + return searchHypernyms_.get(index); + } else { + return searchHypernymsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * The SearchHypernyms from the specified corpus.
+     * 
+ * + * repeated .google.cloud.visionai.v1.SearchHypernym search_hypernyms = 1; + */ + public java.util.List + getSearchHypernymsOrBuilderList() { + if (searchHypernymsBuilder_ != null) { + return searchHypernymsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(searchHypernyms_); + } + } + /** + * + * + *
+     * The SearchHypernyms from the specified corpus.
+     * 
+ * + * repeated .google.cloud.visionai.v1.SearchHypernym search_hypernyms = 1; + */ + public com.google.cloud.visionai.v1.SearchHypernym.Builder addSearchHypernymsBuilder() { + return getSearchHypernymsFieldBuilder() + .addBuilder(com.google.cloud.visionai.v1.SearchHypernym.getDefaultInstance()); + } + /** + * + * + *
+     * The SearchHypernyms from the specified corpus.
+     * 
+ * + * repeated .google.cloud.visionai.v1.SearchHypernym search_hypernyms = 1; + */ + public com.google.cloud.visionai.v1.SearchHypernym.Builder addSearchHypernymsBuilder( + int index) { + return getSearchHypernymsFieldBuilder() + .addBuilder(index, com.google.cloud.visionai.v1.SearchHypernym.getDefaultInstance()); + } + /** + * + * + *
+     * The SearchHypernyms from the specified corpus.
+     * 
+ * + * repeated .google.cloud.visionai.v1.SearchHypernym search_hypernyms = 1; + */ + public java.util.List + getSearchHypernymsBuilderList() { + return getSearchHypernymsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.visionai.v1.SearchHypernym, + com.google.cloud.visionai.v1.SearchHypernym.Builder, + com.google.cloud.visionai.v1.SearchHypernymOrBuilder> + getSearchHypernymsFieldBuilder() { + if (searchHypernymsBuilder_ == null) { + searchHypernymsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.visionai.v1.SearchHypernym, + com.google.cloud.visionai.v1.SearchHypernym.Builder, + com.google.cloud.visionai.v1.SearchHypernymOrBuilder>( + searchHypernyms_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + searchHypernyms_ = null; + } + return searchHypernymsBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+     * A token, which can be sent as `page_token` to retrieve the next page.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A token, which can be sent as `page_token` to retrieve the next page.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A token, which can be sent as `page_token` to retrieve the next page.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * A token, which can be sent as `page_token` to retrieve the next page.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + nextPageToken_ = getDefaultInstance().getNextPageToken(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * A token, which can be sent as `page_token` to retrieve the next page.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.ListSearchHypernymsResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.ListSearchHypernymsResponse) + private static final com.google.cloud.visionai.v1.ListSearchHypernymsResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.ListSearchHypernymsResponse(); + } + + public static com.google.cloud.visionai.v1.ListSearchHypernymsResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListSearchHypernymsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.ListSearchHypernymsResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListSearchHypernymsResponseOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListSearchHypernymsResponseOrBuilder.java new file mode 100644 index 000000000000..5c1c92f971c7 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListSearchHypernymsResponseOrBuilder.java @@ -0,0 +1,105 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/warehouse.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface ListSearchHypernymsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.ListSearchHypernymsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The SearchHypernyms from the specified corpus.
+   * 
+ * + * repeated .google.cloud.visionai.v1.SearchHypernym search_hypernyms = 1; + */ + java.util.List getSearchHypernymsList(); + /** + * + * + *
+   * The SearchHypernyms from the specified corpus.
+   * 
+ * + * repeated .google.cloud.visionai.v1.SearchHypernym search_hypernyms = 1; + */ + com.google.cloud.visionai.v1.SearchHypernym getSearchHypernyms(int index); + /** + * + * + *
+   * The SearchHypernyms from the specified corpus.
+   * 
+ * + * repeated .google.cloud.visionai.v1.SearchHypernym search_hypernyms = 1; + */ + int getSearchHypernymsCount(); + /** + * + * + *
+   * The SearchHypernyms from the specified corpus.
+   * 
+ * + * repeated .google.cloud.visionai.v1.SearchHypernym search_hypernyms = 1; + */ + java.util.List + getSearchHypernymsOrBuilderList(); + /** + * + * + *
+   * The SearchHypernyms from the specified corpus.
+   * 
+ * + * repeated .google.cloud.visionai.v1.SearchHypernym search_hypernyms = 1; + */ + com.google.cloud.visionai.v1.SearchHypernymOrBuilder getSearchHypernymsOrBuilder(int index); + + /** + * + * + *
+   * A token, which can be sent as `page_token` to retrieve the next page.
+   * If this field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + * + * + *
+   * A token, which can be sent as `page_token` to retrieve the next page.
+   * If this field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListSeriesRequest.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListSeriesRequest.java new file mode 100644 index 000000000000..90ebb1c234fe --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListSeriesRequest.java @@ -0,0 +1,1281 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/streams_service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * Message for requesting list of Series.
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.ListSeriesRequest} + */ +public final class ListSeriesRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.ListSeriesRequest) + ListSeriesRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListSeriesRequest.newBuilder() to construct. + private ListSeriesRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListSeriesRequest() { + parent_ = ""; + pageToken_ = ""; + filter_ = ""; + orderBy_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListSeriesRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.StreamsServiceProto + .internal_static_google_cloud_visionai_v1_ListSeriesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.StreamsServiceProto + .internal_static_google_cloud_visionai_v1_ListSeriesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.ListSeriesRequest.class, + com.google.cloud.visionai.v1.ListSeriesRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + /** + * + * + *
+   * Required. Parent value for ListSeriesRequest.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + 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(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Parent value for ListSeriesRequest.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 2; + private int pageSize_ = 0; + /** + * + * + *
+   * Requested page size. Server may return fewer items than requested.
+   * If unspecified, server will pick an appropriate default.
+   * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object pageToken_ = ""; + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + 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(); + pageToken_ = s; + return s; + } + } + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FILTER_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object filter_ = ""; + /** + * + * + *
+   * Filtering results.
+   * 
+ * + * string filter = 4; + * + * @return The filter. + */ + @java.lang.Override + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + 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(); + filter_ = s; + return s; + } + } + /** + * + * + *
+   * Filtering results.
+   * 
+ * + * string filter = 4; + * + * @return The bytes for filter. + */ + @java.lang.Override + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ORDER_BY_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object orderBy_ = ""; + /** + * + * + *
+   * Hint for how to order the results.
+   * 
+ * + * string order_by = 5; + * + * @return The orderBy. + */ + @java.lang.Override + public java.lang.String getOrderBy() { + java.lang.Object ref = orderBy_; + 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(); + orderBy_ = s; + return s; + } + } + /** + * + * + *
+   * Hint for how to order the results.
+   * 
+ * + * string order_by = 5; + * + * @return The bytes for orderBy. + */ + @java.lang.Override + public com.google.protobuf.ByteString getOrderByBytes() { + java.lang.Object ref = orderBy_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + orderBy_ = 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, filter_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(orderBy_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, orderBy_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, filter_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(orderBy_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, orderBy_); + } + size += getUnknownFields().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.visionai.v1.ListSeriesRequest)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.ListSeriesRequest other = + (com.google.cloud.visionai.v1.ListSeriesRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (!getFilter().equals(other.getFilter())) return false; + if (!getOrderBy().equals(other.getOrderBy())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + hash = (37 * hash) + FILTER_FIELD_NUMBER; + hash = (53 * hash) + getFilter().hashCode(); + hash = (37 * hash) + ORDER_BY_FIELD_NUMBER; + hash = (53 * hash) + getOrderBy().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.ListSeriesRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ListSeriesRequest 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.visionai.v1.ListSeriesRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ListSeriesRequest 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.visionai.v1.ListSeriesRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ListSeriesRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.ListSeriesRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ListSeriesRequest 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.visionai.v1.ListSeriesRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ListSeriesRequest 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.visionai.v1.ListSeriesRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ListSeriesRequest 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.visionai.v1.ListSeriesRequest 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; + } + /** + * + * + *
+   * Message for requesting list of Series.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.ListSeriesRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.ListSeriesRequest) + com.google.cloud.visionai.v1.ListSeriesRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.StreamsServiceProto + .internal_static_google_cloud_visionai_v1_ListSeriesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.StreamsServiceProto + .internal_static_google_cloud_visionai_v1_ListSeriesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.ListSeriesRequest.class, + com.google.cloud.visionai.v1.ListSeriesRequest.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.ListSeriesRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + pageSize_ = 0; + pageToken_ = ""; + filter_ = ""; + orderBy_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.StreamsServiceProto + .internal_static_google_cloud_visionai_v1_ListSeriesRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ListSeriesRequest getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.ListSeriesRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ListSeriesRequest build() { + com.google.cloud.visionai.v1.ListSeriesRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ListSeriesRequest buildPartial() { + com.google.cloud.visionai.v1.ListSeriesRequest result = + new com.google.cloud.visionai.v1.ListSeriesRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.visionai.v1.ListSeriesRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.pageSize_ = pageSize_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.pageToken_ = pageToken_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.filter_ = filter_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.orderBy_ = orderBy_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.ListSeriesRequest) { + return mergeFrom((com.google.cloud.visionai.v1.ListSeriesRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.ListSeriesRequest other) { + if (other == com.google.cloud.visionai.v1.ListSeriesRequest.getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getFilter().isEmpty()) { + filter_ = other.filter_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (!other.getOrderBy().isEmpty()) { + orderBy_ = other.orderBy_; + bitField0_ |= 0x00000010; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + pageSize_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + orderBy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 42 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. Parent value for ListSeriesRequest.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Parent value for ListSeriesRequest.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Parent value for ListSeriesRequest.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Parent value for ListSeriesRequest.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Parent value for ListSeriesRequest.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private int pageSize_; + /** + * + * + *
+     * Requested page size. Server may return fewer items than requested.
+     * If unspecified, server will pick an appropriate default.
+     * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + * + * + *
+     * Requested page size. Server may return fewer items than requested.
+     * If unspecified, server will pick an appropriate default.
+     * 
+ * + * int32 page_size = 2; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Requested page size. Server may return fewer items than requested.
+     * If unspecified, server will pick an appropriate default.
+     * 
+ * + * int32 page_size = 2; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + bitField0_ = (bitField0_ & ~0x00000002); + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string page_token = 3; + * + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + pageToken_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string page_token = 3; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + pageToken_ = getDefaultInstance().getPageToken(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string page_token = 3; + * + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + pageToken_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object filter_ = ""; + /** + * + * + *
+     * Filtering results.
+     * 
+ * + * string filter = 4; + * + * @return The filter. + */ + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Filtering results.
+     * 
+ * + * string filter = 4; + * + * @return The bytes for filter. + */ + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Filtering results.
+     * 
+ * + * string filter = 4; + * + * @param value The filter to set. + * @return This builder for chaining. + */ + public Builder setFilter(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + filter_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Filtering results.
+     * 
+ * + * string filter = 4; + * + * @return This builder for chaining. + */ + public Builder clearFilter() { + filter_ = getDefaultInstance().getFilter(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+     * Filtering results.
+     * 
+ * + * string filter = 4; + * + * @param value The bytes for filter to set. + * @return This builder for chaining. + */ + public Builder setFilterBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + filter_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private java.lang.Object orderBy_ = ""; + /** + * + * + *
+     * Hint for how to order the results.
+     * 
+ * + * string order_by = 5; + * + * @return The orderBy. + */ + public java.lang.String getOrderBy() { + java.lang.Object ref = orderBy_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + orderBy_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Hint for how to order the results.
+     * 
+ * + * string order_by = 5; + * + * @return The bytes for orderBy. + */ + public com.google.protobuf.ByteString getOrderByBytes() { + java.lang.Object ref = orderBy_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + orderBy_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Hint for how to order the results.
+     * 
+ * + * string order_by = 5; + * + * @param value The orderBy to set. + * @return This builder for chaining. + */ + public Builder setOrderBy(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + orderBy_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Hint for how to order the results.
+     * 
+ * + * string order_by = 5; + * + * @return This builder for chaining. + */ + public Builder clearOrderBy() { + orderBy_ = getDefaultInstance().getOrderBy(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + /** + * + * + *
+     * Hint for how to order the results.
+     * 
+ * + * string order_by = 5; + * + * @param value The bytes for orderBy to set. + * @return This builder for chaining. + */ + public Builder setOrderByBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + orderBy_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.ListSeriesRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.ListSeriesRequest) + private static final com.google.cloud.visionai.v1.ListSeriesRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.ListSeriesRequest(); + } + + public static com.google.cloud.visionai.v1.ListSeriesRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListSeriesRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.ListSeriesRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListSeriesRequestOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListSeriesRequestOrBuilder.java new file mode 100644 index 000000000000..6b02d2f48a46 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListSeriesRequestOrBuilder.java @@ -0,0 +1,144 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/streams_service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface ListSeriesRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.ListSeriesRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Parent value for ListSeriesRequest.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. Parent value for ListSeriesRequest.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Requested page size. Server may return fewer items than requested.
+   * If unspecified, server will pick an appropriate default.
+   * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); + + /** + * + * + *
+   * Filtering results.
+   * 
+ * + * string filter = 4; + * + * @return The filter. + */ + java.lang.String getFilter(); + /** + * + * + *
+   * Filtering results.
+   * 
+ * + * string filter = 4; + * + * @return The bytes for filter. + */ + com.google.protobuf.ByteString getFilterBytes(); + + /** + * + * + *
+   * Hint for how to order the results.
+   * 
+ * + * string order_by = 5; + * + * @return The orderBy. + */ + java.lang.String getOrderBy(); + /** + * + * + *
+   * Hint for how to order the results.
+   * 
+ * + * string order_by = 5; + * + * @return The bytes for orderBy. + */ + com.google.protobuf.ByteString getOrderByBytes(); +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListSeriesResponse.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListSeriesResponse.java new file mode 100644 index 000000000000..ed492c4d44c6 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListSeriesResponse.java @@ -0,0 +1,1394 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/streams_service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * Message for response to listing Series.
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.ListSeriesResponse} + */ +public final class ListSeriesResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.ListSeriesResponse) + ListSeriesResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListSeriesResponse.newBuilder() to construct. + private ListSeriesResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListSeriesResponse() { + series_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + unreachable_ = com.google.protobuf.LazyStringArrayList.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListSeriesResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.StreamsServiceProto + .internal_static_google_cloud_visionai_v1_ListSeriesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.StreamsServiceProto + .internal_static_google_cloud_visionai_v1_ListSeriesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.ListSeriesResponse.class, + com.google.cloud.visionai.v1.ListSeriesResponse.Builder.class); + } + + public static final int SERIES_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List series_; + /** + * + * + *
+   * The list of Series.
+   * 
+ * + * repeated .google.cloud.visionai.v1.Series series = 1; + */ + @java.lang.Override + public java.util.List getSeriesList() { + return series_; + } + /** + * + * + *
+   * The list of Series.
+   * 
+ * + * repeated .google.cloud.visionai.v1.Series series = 1; + */ + @java.lang.Override + public java.util.List + getSeriesOrBuilderList() { + return series_; + } + /** + * + * + *
+   * The list of Series.
+   * 
+ * + * repeated .google.cloud.visionai.v1.Series series = 1; + */ + @java.lang.Override + public int getSeriesCount() { + return series_.size(); + } + /** + * + * + *
+   * The list of Series.
+   * 
+ * + * repeated .google.cloud.visionai.v1.Series series = 1; + */ + @java.lang.Override + public com.google.cloud.visionai.v1.Series getSeries(int index) { + return series_.get(index); + } + /** + * + * + *
+   * The list of Series.
+   * 
+ * + * repeated .google.cloud.visionai.v1.Series series = 1; + */ + @java.lang.Override + public com.google.cloud.visionai.v1.SeriesOrBuilder getSeriesOrBuilder(int index) { + return series_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + 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(); + nextPageToken_ = s; + return s; + } + } + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int UNREACHABLE_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList unreachable_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @return A list containing the unreachable. + */ + public com.google.protobuf.ProtocolStringList getUnreachableList() { + return unreachable_; + } + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @return The count of unreachable. + */ + public int getUnreachableCount() { + return unreachable_.size(); + } + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + public java.lang.String getUnreachable(int index) { + return unreachable_.get(index); + } + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the value to return. + * @return The bytes of the unreachable at the given index. + */ + public com.google.protobuf.ByteString getUnreachableBytes(int index) { + return unreachable_.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 < series_.size(); i++) { + output.writeMessage(1, series_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + } + for (int i = 0; i < unreachable_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, unreachable_.getRaw(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < series_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, series_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + } + { + int dataSize = 0; + for (int i = 0; i < unreachable_.size(); i++) { + dataSize += computeStringSizeNoTag(unreachable_.getRaw(i)); + } + size += dataSize; + size += 1 * getUnreachableList().size(); + } + size += getUnknownFields().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.visionai.v1.ListSeriesResponse)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.ListSeriesResponse other = + (com.google.cloud.visionai.v1.ListSeriesResponse) obj; + + if (!getSeriesList().equals(other.getSeriesList())) return false; + if (!getNextPageToken().equals(other.getNextPageToken())) return false; + if (!getUnreachableList().equals(other.getUnreachableList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getSeriesCount() > 0) { + hash = (37 * hash) + SERIES_FIELD_NUMBER; + hash = (53 * hash) + getSeriesList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + if (getUnreachableCount() > 0) { + hash = (37 * hash) + UNREACHABLE_FIELD_NUMBER; + hash = (53 * hash) + getUnreachableList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.ListSeriesResponse parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ListSeriesResponse 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.visionai.v1.ListSeriesResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ListSeriesResponse 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.visionai.v1.ListSeriesResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ListSeriesResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.ListSeriesResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ListSeriesResponse 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.visionai.v1.ListSeriesResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ListSeriesResponse 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.visionai.v1.ListSeriesResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ListSeriesResponse 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.visionai.v1.ListSeriesResponse 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; + } + /** + * + * + *
+   * Message for response to listing Series.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.ListSeriesResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.ListSeriesResponse) + com.google.cloud.visionai.v1.ListSeriesResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.StreamsServiceProto + .internal_static_google_cloud_visionai_v1_ListSeriesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.StreamsServiceProto + .internal_static_google_cloud_visionai_v1_ListSeriesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.ListSeriesResponse.class, + com.google.cloud.visionai.v1.ListSeriesResponse.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.ListSeriesResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (seriesBuilder_ == null) { + series_ = java.util.Collections.emptyList(); + } else { + series_ = null; + seriesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + nextPageToken_ = ""; + unreachable_ = com.google.protobuf.LazyStringArrayList.emptyList(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.StreamsServiceProto + .internal_static_google_cloud_visionai_v1_ListSeriesResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ListSeriesResponse getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.ListSeriesResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ListSeriesResponse build() { + com.google.cloud.visionai.v1.ListSeriesResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ListSeriesResponse buildPartial() { + com.google.cloud.visionai.v1.ListSeriesResponse result = + new com.google.cloud.visionai.v1.ListSeriesResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.visionai.v1.ListSeriesResponse result) { + if (seriesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + series_ = java.util.Collections.unmodifiableList(series_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.series_ = series_; + } else { + result.series_ = seriesBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.visionai.v1.ListSeriesResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.nextPageToken_ = nextPageToken_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + unreachable_.makeImmutable(); + result.unreachable_ = unreachable_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.ListSeriesResponse) { + return mergeFrom((com.google.cloud.visionai.v1.ListSeriesResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.ListSeriesResponse other) { + if (other == com.google.cloud.visionai.v1.ListSeriesResponse.getDefaultInstance()) + return this; + if (seriesBuilder_ == null) { + if (!other.series_.isEmpty()) { + if (series_.isEmpty()) { + series_ = other.series_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureSeriesIsMutable(); + series_.addAll(other.series_); + } + onChanged(); + } + } else { + if (!other.series_.isEmpty()) { + if (seriesBuilder_.isEmpty()) { + seriesBuilder_.dispose(); + seriesBuilder_ = null; + series_ = other.series_; + bitField0_ = (bitField0_ & ~0x00000001); + seriesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getSeriesFieldBuilder() + : null; + } else { + seriesBuilder_.addAllMessages(other.series_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.unreachable_.isEmpty()) { + if (unreachable_.isEmpty()) { + unreachable_ = other.unreachable_; + bitField0_ |= 0x00000004; + } else { + ensureUnreachableIsMutable(); + unreachable_.addAll(other.unreachable_); + } + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.visionai.v1.Series m = + input.readMessage( + com.google.cloud.visionai.v1.Series.parser(), extensionRegistry); + if (seriesBuilder_ == null) { + ensureSeriesIsMutable(); + series_.add(m); + } else { + seriesBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureUnreachableIsMutable(); + unreachable_.add(s); + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List series_ = + java.util.Collections.emptyList(); + + private void ensureSeriesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + series_ = new java.util.ArrayList(series_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.visionai.v1.Series, + com.google.cloud.visionai.v1.Series.Builder, + com.google.cloud.visionai.v1.SeriesOrBuilder> + seriesBuilder_; + + /** + * + * + *
+     * The list of Series.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Series series = 1; + */ + public java.util.List getSeriesList() { + if (seriesBuilder_ == null) { + return java.util.Collections.unmodifiableList(series_); + } else { + return seriesBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * The list of Series.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Series series = 1; + */ + public int getSeriesCount() { + if (seriesBuilder_ == null) { + return series_.size(); + } else { + return seriesBuilder_.getCount(); + } + } + /** + * + * + *
+     * The list of Series.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Series series = 1; + */ + public com.google.cloud.visionai.v1.Series getSeries(int index) { + if (seriesBuilder_ == null) { + return series_.get(index); + } else { + return seriesBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * The list of Series.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Series series = 1; + */ + public Builder setSeries(int index, com.google.cloud.visionai.v1.Series value) { + if (seriesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSeriesIsMutable(); + series_.set(index, value); + onChanged(); + } else { + seriesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The list of Series.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Series series = 1; + */ + public Builder setSeries( + int index, com.google.cloud.visionai.v1.Series.Builder builderForValue) { + if (seriesBuilder_ == null) { + ensureSeriesIsMutable(); + series_.set(index, builderForValue.build()); + onChanged(); + } else { + seriesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of Series.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Series series = 1; + */ + public Builder addSeries(com.google.cloud.visionai.v1.Series value) { + if (seriesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSeriesIsMutable(); + series_.add(value); + onChanged(); + } else { + seriesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * The list of Series.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Series series = 1; + */ + public Builder addSeries(int index, com.google.cloud.visionai.v1.Series value) { + if (seriesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSeriesIsMutable(); + series_.add(index, value); + onChanged(); + } else { + seriesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The list of Series.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Series series = 1; + */ + public Builder addSeries(com.google.cloud.visionai.v1.Series.Builder builderForValue) { + if (seriesBuilder_ == null) { + ensureSeriesIsMutable(); + series_.add(builderForValue.build()); + onChanged(); + } else { + seriesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of Series.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Series series = 1; + */ + public Builder addSeries( + int index, com.google.cloud.visionai.v1.Series.Builder builderForValue) { + if (seriesBuilder_ == null) { + ensureSeriesIsMutable(); + series_.add(index, builderForValue.build()); + onChanged(); + } else { + seriesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of Series.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Series series = 1; + */ + public Builder addAllSeries( + java.lang.Iterable values) { + if (seriesBuilder_ == null) { + ensureSeriesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, series_); + onChanged(); + } else { + seriesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * The list of Series.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Series series = 1; + */ + public Builder clearSeries() { + if (seriesBuilder_ == null) { + series_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + seriesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The list of Series.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Series series = 1; + */ + public Builder removeSeries(int index) { + if (seriesBuilder_ == null) { + ensureSeriesIsMutable(); + series_.remove(index); + onChanged(); + } else { + seriesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * The list of Series.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Series series = 1; + */ + public com.google.cloud.visionai.v1.Series.Builder getSeriesBuilder(int index) { + return getSeriesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * The list of Series.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Series series = 1; + */ + public com.google.cloud.visionai.v1.SeriesOrBuilder getSeriesOrBuilder(int index) { + if (seriesBuilder_ == null) { + return series_.get(index); + } else { + return seriesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * The list of Series.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Series series = 1; + */ + public java.util.List + getSeriesOrBuilderList() { + if (seriesBuilder_ != null) { + return seriesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(series_); + } + } + /** + * + * + *
+     * The list of Series.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Series series = 1; + */ + public com.google.cloud.visionai.v1.Series.Builder addSeriesBuilder() { + return getSeriesFieldBuilder() + .addBuilder(com.google.cloud.visionai.v1.Series.getDefaultInstance()); + } + /** + * + * + *
+     * The list of Series.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Series series = 1; + */ + public com.google.cloud.visionai.v1.Series.Builder addSeriesBuilder(int index) { + return getSeriesFieldBuilder() + .addBuilder(index, com.google.cloud.visionai.v1.Series.getDefaultInstance()); + } + /** + * + * + *
+     * The list of Series.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Series series = 1; + */ + public java.util.List getSeriesBuilderList() { + return getSeriesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.visionai.v1.Series, + com.google.cloud.visionai.v1.Series.Builder, + com.google.cloud.visionai.v1.SeriesOrBuilder> + getSeriesFieldBuilder() { + if (seriesBuilder_ == null) { + seriesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.visionai.v1.Series, + com.google.cloud.visionai.v1.Series.Builder, + com.google.cloud.visionai.v1.SeriesOrBuilder>( + series_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + series_ = null; + } + return seriesBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + nextPageToken_ = getDefaultInstance().getNextPageToken(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList unreachable_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureUnreachableIsMutable() { + if (!unreachable_.isModifiable()) { + unreachable_ = new com.google.protobuf.LazyStringArrayList(unreachable_); + } + bitField0_ |= 0x00000004; + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @return A list containing the unreachable. + */ + public com.google.protobuf.ProtocolStringList getUnreachableList() { + unreachable_.makeImmutable(); + return unreachable_; + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @return The count of unreachable. + */ + public int getUnreachableCount() { + return unreachable_.size(); + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + public java.lang.String getUnreachable(int index) { + return unreachable_.get(index); + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the value to return. + * @return The bytes of the unreachable at the given index. + */ + public com.google.protobuf.ByteString getUnreachableBytes(int index) { + return unreachable_.getByteString(index); + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param index The index to set the value at. + * @param value The unreachable to set. + * @return This builder for chaining. + */ + public Builder setUnreachable(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureUnreachableIsMutable(); + unreachable_.set(index, value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param value The unreachable to add. + * @return This builder for chaining. + */ + public Builder addUnreachable(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureUnreachableIsMutable(); + unreachable_.add(value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param values The unreachable to add. + * @return This builder for chaining. + */ + public Builder addAllUnreachable(java.lang.Iterable values) { + ensureUnreachableIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, unreachable_); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @return This builder for chaining. + */ + public Builder clearUnreachable() { + unreachable_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + ; + onChanged(); + return this; + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param value The bytes of the unreachable to add. + * @return This builder for chaining. + */ + public Builder addUnreachableBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureUnreachableIsMutable(); + unreachable_.add(value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.ListSeriesResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.ListSeriesResponse) + private static final com.google.cloud.visionai.v1.ListSeriesResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.ListSeriesResponse(); + } + + public static com.google.cloud.visionai.v1.ListSeriesResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListSeriesResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.ListSeriesResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListSeriesResponseOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListSeriesResponseOrBuilder.java new file mode 100644 index 000000000000..04089d109383 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListSeriesResponseOrBuilder.java @@ -0,0 +1,153 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/streams_service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface ListSeriesResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.ListSeriesResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The list of Series.
+   * 
+ * + * repeated .google.cloud.visionai.v1.Series series = 1; + */ + java.util.List getSeriesList(); + /** + * + * + *
+   * The list of Series.
+   * 
+ * + * repeated .google.cloud.visionai.v1.Series series = 1; + */ + com.google.cloud.visionai.v1.Series getSeries(int index); + /** + * + * + *
+   * The list of Series.
+   * 
+ * + * repeated .google.cloud.visionai.v1.Series series = 1; + */ + int getSeriesCount(); + /** + * + * + *
+   * The list of Series.
+   * 
+ * + * repeated .google.cloud.visionai.v1.Series series = 1; + */ + java.util.List getSeriesOrBuilderList(); + /** + * + * + *
+   * The list of Series.
+   * 
+ * + * repeated .google.cloud.visionai.v1.Series series = 1; + */ + com.google.cloud.visionai.v1.SeriesOrBuilder getSeriesOrBuilder(int index); + + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); + + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @return A list containing the unreachable. + */ + java.util.List getUnreachableList(); + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @return The count of unreachable. + */ + int getUnreachableCount(); + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + java.lang.String getUnreachable(int index); + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the value to return. + * @return The bytes of the unreachable at the given index. + */ + com.google.protobuf.ByteString getUnreachableBytes(int index); +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListStreamsRequest.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListStreamsRequest.java new file mode 100644 index 000000000000..1c547c6c2c13 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListStreamsRequest.java @@ -0,0 +1,1282 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/streams_service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * Message for requesting list of Streams.
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.ListStreamsRequest} + */ +public final class ListStreamsRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.ListStreamsRequest) + ListStreamsRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListStreamsRequest.newBuilder() to construct. + private ListStreamsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListStreamsRequest() { + parent_ = ""; + pageToken_ = ""; + filter_ = ""; + orderBy_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListStreamsRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.StreamsServiceProto + .internal_static_google_cloud_visionai_v1_ListStreamsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.StreamsServiceProto + .internal_static_google_cloud_visionai_v1_ListStreamsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.ListStreamsRequest.class, + com.google.cloud.visionai.v1.ListStreamsRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + /** + * + * + *
+   * Required. Parent value for ListStreamsRequest.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + 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(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Parent value for ListStreamsRequest.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 2; + private int pageSize_ = 0; + /** + * + * + *
+   * Requested page size. Server may return fewer items than requested.
+   * If unspecified, server will pick an appropriate default.
+   * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object pageToken_ = ""; + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + 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(); + pageToken_ = s; + return s; + } + } + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FILTER_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object filter_ = ""; + /** + * + * + *
+   * Filtering results.
+   * 
+ * + * string filter = 4; + * + * @return The filter. + */ + @java.lang.Override + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + 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(); + filter_ = s; + return s; + } + } + /** + * + * + *
+   * Filtering results.
+   * 
+ * + * string filter = 4; + * + * @return The bytes for filter. + */ + @java.lang.Override + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ORDER_BY_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object orderBy_ = ""; + /** + * + * + *
+   * Hint for how to order the results.
+   * 
+ * + * string order_by = 5; + * + * @return The orderBy. + */ + @java.lang.Override + public java.lang.String getOrderBy() { + java.lang.Object ref = orderBy_; + 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(); + orderBy_ = s; + return s; + } + } + /** + * + * + *
+   * Hint for how to order the results.
+   * 
+ * + * string order_by = 5; + * + * @return The bytes for orderBy. + */ + @java.lang.Override + public com.google.protobuf.ByteString getOrderByBytes() { + java.lang.Object ref = orderBy_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + orderBy_ = 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, filter_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(orderBy_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, orderBy_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, filter_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(orderBy_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, orderBy_); + } + size += getUnknownFields().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.visionai.v1.ListStreamsRequest)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.ListStreamsRequest other = + (com.google.cloud.visionai.v1.ListStreamsRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (!getFilter().equals(other.getFilter())) return false; + if (!getOrderBy().equals(other.getOrderBy())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + hash = (37 * hash) + FILTER_FIELD_NUMBER; + hash = (53 * hash) + getFilter().hashCode(); + hash = (37 * hash) + ORDER_BY_FIELD_NUMBER; + hash = (53 * hash) + getOrderBy().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.ListStreamsRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ListStreamsRequest 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.visionai.v1.ListStreamsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ListStreamsRequest 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.visionai.v1.ListStreamsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ListStreamsRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.ListStreamsRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ListStreamsRequest 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.visionai.v1.ListStreamsRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ListStreamsRequest 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.visionai.v1.ListStreamsRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ListStreamsRequest 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.visionai.v1.ListStreamsRequest 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; + } + /** + * + * + *
+   * Message for requesting list of Streams.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.ListStreamsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.ListStreamsRequest) + com.google.cloud.visionai.v1.ListStreamsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.StreamsServiceProto + .internal_static_google_cloud_visionai_v1_ListStreamsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.StreamsServiceProto + .internal_static_google_cloud_visionai_v1_ListStreamsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.ListStreamsRequest.class, + com.google.cloud.visionai.v1.ListStreamsRequest.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.ListStreamsRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + pageSize_ = 0; + pageToken_ = ""; + filter_ = ""; + orderBy_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.StreamsServiceProto + .internal_static_google_cloud_visionai_v1_ListStreamsRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ListStreamsRequest getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.ListStreamsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ListStreamsRequest build() { + com.google.cloud.visionai.v1.ListStreamsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ListStreamsRequest buildPartial() { + com.google.cloud.visionai.v1.ListStreamsRequest result = + new com.google.cloud.visionai.v1.ListStreamsRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.visionai.v1.ListStreamsRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.pageSize_ = pageSize_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.pageToken_ = pageToken_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.filter_ = filter_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.orderBy_ = orderBy_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.ListStreamsRequest) { + return mergeFrom((com.google.cloud.visionai.v1.ListStreamsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.ListStreamsRequest other) { + if (other == com.google.cloud.visionai.v1.ListStreamsRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getFilter().isEmpty()) { + filter_ = other.filter_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (!other.getOrderBy().isEmpty()) { + orderBy_ = other.orderBy_; + bitField0_ |= 0x00000010; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + pageSize_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + orderBy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 42 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. Parent value for ListStreamsRequest.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Parent value for ListStreamsRequest.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Parent value for ListStreamsRequest.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Parent value for ListStreamsRequest.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Parent value for ListStreamsRequest.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private int pageSize_; + /** + * + * + *
+     * Requested page size. Server may return fewer items than requested.
+     * If unspecified, server will pick an appropriate default.
+     * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + * + * + *
+     * Requested page size. Server may return fewer items than requested.
+     * If unspecified, server will pick an appropriate default.
+     * 
+ * + * int32 page_size = 2; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Requested page size. Server may return fewer items than requested.
+     * If unspecified, server will pick an appropriate default.
+     * 
+ * + * int32 page_size = 2; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + bitField0_ = (bitField0_ & ~0x00000002); + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string page_token = 3; + * + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + pageToken_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string page_token = 3; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + pageToken_ = getDefaultInstance().getPageToken(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string page_token = 3; + * + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + pageToken_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object filter_ = ""; + /** + * + * + *
+     * Filtering results.
+     * 
+ * + * string filter = 4; + * + * @return The filter. + */ + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Filtering results.
+     * 
+ * + * string filter = 4; + * + * @return The bytes for filter. + */ + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Filtering results.
+     * 
+ * + * string filter = 4; + * + * @param value The filter to set. + * @return This builder for chaining. + */ + public Builder setFilter(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + filter_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Filtering results.
+     * 
+ * + * string filter = 4; + * + * @return This builder for chaining. + */ + public Builder clearFilter() { + filter_ = getDefaultInstance().getFilter(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+     * Filtering results.
+     * 
+ * + * string filter = 4; + * + * @param value The bytes for filter to set. + * @return This builder for chaining. + */ + public Builder setFilterBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + filter_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private java.lang.Object orderBy_ = ""; + /** + * + * + *
+     * Hint for how to order the results.
+     * 
+ * + * string order_by = 5; + * + * @return The orderBy. + */ + public java.lang.String getOrderBy() { + java.lang.Object ref = orderBy_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + orderBy_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Hint for how to order the results.
+     * 
+ * + * string order_by = 5; + * + * @return The bytes for orderBy. + */ + public com.google.protobuf.ByteString getOrderByBytes() { + java.lang.Object ref = orderBy_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + orderBy_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Hint for how to order the results.
+     * 
+ * + * string order_by = 5; + * + * @param value The orderBy to set. + * @return This builder for chaining. + */ + public Builder setOrderBy(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + orderBy_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Hint for how to order the results.
+     * 
+ * + * string order_by = 5; + * + * @return This builder for chaining. + */ + public Builder clearOrderBy() { + orderBy_ = getDefaultInstance().getOrderBy(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + /** + * + * + *
+     * Hint for how to order the results.
+     * 
+ * + * string order_by = 5; + * + * @param value The bytes for orderBy to set. + * @return This builder for chaining. + */ + public Builder setOrderByBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + orderBy_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.ListStreamsRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.ListStreamsRequest) + private static final com.google.cloud.visionai.v1.ListStreamsRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.ListStreamsRequest(); + } + + public static com.google.cloud.visionai.v1.ListStreamsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListStreamsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.ListStreamsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListStreamsRequestOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListStreamsRequestOrBuilder.java new file mode 100644 index 000000000000..2d7e12071205 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListStreamsRequestOrBuilder.java @@ -0,0 +1,144 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/streams_service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface ListStreamsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.ListStreamsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Parent value for ListStreamsRequest.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. Parent value for ListStreamsRequest.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Requested page size. Server may return fewer items than requested.
+   * If unspecified, server will pick an appropriate default.
+   * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); + + /** + * + * + *
+   * Filtering results.
+   * 
+ * + * string filter = 4; + * + * @return The filter. + */ + java.lang.String getFilter(); + /** + * + * + *
+   * Filtering results.
+   * 
+ * + * string filter = 4; + * + * @return The bytes for filter. + */ + com.google.protobuf.ByteString getFilterBytes(); + + /** + * + * + *
+   * Hint for how to order the results.
+   * 
+ * + * string order_by = 5; + * + * @return The orderBy. + */ + java.lang.String getOrderBy(); + /** + * + * + *
+   * Hint for how to order the results.
+   * 
+ * + * string order_by = 5; + * + * @return The bytes for orderBy. + */ + com.google.protobuf.ByteString getOrderByBytes(); +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListStreamsResponse.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListStreamsResponse.java new file mode 100644 index 000000000000..aff6cffb875f --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListStreamsResponse.java @@ -0,0 +1,1394 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/streams_service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * Message for response to listing Streams.
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.ListStreamsResponse} + */ +public final class ListStreamsResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.ListStreamsResponse) + ListStreamsResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListStreamsResponse.newBuilder() to construct. + private ListStreamsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListStreamsResponse() { + streams_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + unreachable_ = com.google.protobuf.LazyStringArrayList.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListStreamsResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.StreamsServiceProto + .internal_static_google_cloud_visionai_v1_ListStreamsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.StreamsServiceProto + .internal_static_google_cloud_visionai_v1_ListStreamsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.ListStreamsResponse.class, + com.google.cloud.visionai.v1.ListStreamsResponse.Builder.class); + } + + public static final int STREAMS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List streams_; + /** + * + * + *
+   * The list of Stream.
+   * 
+ * + * repeated .google.cloud.visionai.v1.Stream streams = 1; + */ + @java.lang.Override + public java.util.List getStreamsList() { + return streams_; + } + /** + * + * + *
+   * The list of Stream.
+   * 
+ * + * repeated .google.cloud.visionai.v1.Stream streams = 1; + */ + @java.lang.Override + public java.util.List + getStreamsOrBuilderList() { + return streams_; + } + /** + * + * + *
+   * The list of Stream.
+   * 
+ * + * repeated .google.cloud.visionai.v1.Stream streams = 1; + */ + @java.lang.Override + public int getStreamsCount() { + return streams_.size(); + } + /** + * + * + *
+   * The list of Stream.
+   * 
+ * + * repeated .google.cloud.visionai.v1.Stream streams = 1; + */ + @java.lang.Override + public com.google.cloud.visionai.v1.Stream getStreams(int index) { + return streams_.get(index); + } + /** + * + * + *
+   * The list of Stream.
+   * 
+ * + * repeated .google.cloud.visionai.v1.Stream streams = 1; + */ + @java.lang.Override + public com.google.cloud.visionai.v1.StreamOrBuilder getStreamsOrBuilder(int index) { + return streams_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + 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(); + nextPageToken_ = s; + return s; + } + } + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int UNREACHABLE_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList unreachable_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @return A list containing the unreachable. + */ + public com.google.protobuf.ProtocolStringList getUnreachableList() { + return unreachable_; + } + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @return The count of unreachable. + */ + public int getUnreachableCount() { + return unreachable_.size(); + } + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + public java.lang.String getUnreachable(int index) { + return unreachable_.get(index); + } + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the value to return. + * @return The bytes of the unreachable at the given index. + */ + public com.google.protobuf.ByteString getUnreachableBytes(int index) { + return unreachable_.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 < streams_.size(); i++) { + output.writeMessage(1, streams_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + } + for (int i = 0; i < unreachable_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, unreachable_.getRaw(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < streams_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, streams_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + } + { + int dataSize = 0; + for (int i = 0; i < unreachable_.size(); i++) { + dataSize += computeStringSizeNoTag(unreachable_.getRaw(i)); + } + size += dataSize; + size += 1 * getUnreachableList().size(); + } + size += getUnknownFields().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.visionai.v1.ListStreamsResponse)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.ListStreamsResponse other = + (com.google.cloud.visionai.v1.ListStreamsResponse) obj; + + if (!getStreamsList().equals(other.getStreamsList())) return false; + if (!getNextPageToken().equals(other.getNextPageToken())) return false; + if (!getUnreachableList().equals(other.getUnreachableList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getStreamsCount() > 0) { + hash = (37 * hash) + STREAMS_FIELD_NUMBER; + hash = (53 * hash) + getStreamsList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + if (getUnreachableCount() > 0) { + hash = (37 * hash) + UNREACHABLE_FIELD_NUMBER; + hash = (53 * hash) + getUnreachableList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.ListStreamsResponse parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ListStreamsResponse 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.visionai.v1.ListStreamsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ListStreamsResponse 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.visionai.v1.ListStreamsResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ListStreamsResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.ListStreamsResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ListStreamsResponse 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.visionai.v1.ListStreamsResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ListStreamsResponse 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.visionai.v1.ListStreamsResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ListStreamsResponse 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.visionai.v1.ListStreamsResponse 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; + } + /** + * + * + *
+   * Message for response to listing Streams.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.ListStreamsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.ListStreamsResponse) + com.google.cloud.visionai.v1.ListStreamsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.StreamsServiceProto + .internal_static_google_cloud_visionai_v1_ListStreamsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.StreamsServiceProto + .internal_static_google_cloud_visionai_v1_ListStreamsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.ListStreamsResponse.class, + com.google.cloud.visionai.v1.ListStreamsResponse.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.ListStreamsResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (streamsBuilder_ == null) { + streams_ = java.util.Collections.emptyList(); + } else { + streams_ = null; + streamsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + nextPageToken_ = ""; + unreachable_ = com.google.protobuf.LazyStringArrayList.emptyList(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.StreamsServiceProto + .internal_static_google_cloud_visionai_v1_ListStreamsResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ListStreamsResponse getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.ListStreamsResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ListStreamsResponse build() { + com.google.cloud.visionai.v1.ListStreamsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ListStreamsResponse buildPartial() { + com.google.cloud.visionai.v1.ListStreamsResponse result = + new com.google.cloud.visionai.v1.ListStreamsResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.visionai.v1.ListStreamsResponse result) { + if (streamsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + streams_ = java.util.Collections.unmodifiableList(streams_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.streams_ = streams_; + } else { + result.streams_ = streamsBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.visionai.v1.ListStreamsResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.nextPageToken_ = nextPageToken_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + unreachable_.makeImmutable(); + result.unreachable_ = unreachable_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.ListStreamsResponse) { + return mergeFrom((com.google.cloud.visionai.v1.ListStreamsResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.ListStreamsResponse other) { + if (other == com.google.cloud.visionai.v1.ListStreamsResponse.getDefaultInstance()) + return this; + if (streamsBuilder_ == null) { + if (!other.streams_.isEmpty()) { + if (streams_.isEmpty()) { + streams_ = other.streams_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureStreamsIsMutable(); + streams_.addAll(other.streams_); + } + onChanged(); + } + } else { + if (!other.streams_.isEmpty()) { + if (streamsBuilder_.isEmpty()) { + streamsBuilder_.dispose(); + streamsBuilder_ = null; + streams_ = other.streams_; + bitField0_ = (bitField0_ & ~0x00000001); + streamsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getStreamsFieldBuilder() + : null; + } else { + streamsBuilder_.addAllMessages(other.streams_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.unreachable_.isEmpty()) { + if (unreachable_.isEmpty()) { + unreachable_ = other.unreachable_; + bitField0_ |= 0x00000004; + } else { + ensureUnreachableIsMutable(); + unreachable_.addAll(other.unreachable_); + } + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.visionai.v1.Stream m = + input.readMessage( + com.google.cloud.visionai.v1.Stream.parser(), extensionRegistry); + if (streamsBuilder_ == null) { + ensureStreamsIsMutable(); + streams_.add(m); + } else { + streamsBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureUnreachableIsMutable(); + unreachable_.add(s); + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List streams_ = + java.util.Collections.emptyList(); + + private void ensureStreamsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + streams_ = new java.util.ArrayList(streams_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.visionai.v1.Stream, + com.google.cloud.visionai.v1.Stream.Builder, + com.google.cloud.visionai.v1.StreamOrBuilder> + streamsBuilder_; + + /** + * + * + *
+     * The list of Stream.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Stream streams = 1; + */ + public java.util.List getStreamsList() { + if (streamsBuilder_ == null) { + return java.util.Collections.unmodifiableList(streams_); + } else { + return streamsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * The list of Stream.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Stream streams = 1; + */ + public int getStreamsCount() { + if (streamsBuilder_ == null) { + return streams_.size(); + } else { + return streamsBuilder_.getCount(); + } + } + /** + * + * + *
+     * The list of Stream.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Stream streams = 1; + */ + public com.google.cloud.visionai.v1.Stream getStreams(int index) { + if (streamsBuilder_ == null) { + return streams_.get(index); + } else { + return streamsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * The list of Stream.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Stream streams = 1; + */ + public Builder setStreams(int index, com.google.cloud.visionai.v1.Stream value) { + if (streamsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureStreamsIsMutable(); + streams_.set(index, value); + onChanged(); + } else { + streamsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The list of Stream.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Stream streams = 1; + */ + public Builder setStreams( + int index, com.google.cloud.visionai.v1.Stream.Builder builderForValue) { + if (streamsBuilder_ == null) { + ensureStreamsIsMutable(); + streams_.set(index, builderForValue.build()); + onChanged(); + } else { + streamsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of Stream.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Stream streams = 1; + */ + public Builder addStreams(com.google.cloud.visionai.v1.Stream value) { + if (streamsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureStreamsIsMutable(); + streams_.add(value); + onChanged(); + } else { + streamsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * The list of Stream.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Stream streams = 1; + */ + public Builder addStreams(int index, com.google.cloud.visionai.v1.Stream value) { + if (streamsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureStreamsIsMutable(); + streams_.add(index, value); + onChanged(); + } else { + streamsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The list of Stream.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Stream streams = 1; + */ + public Builder addStreams(com.google.cloud.visionai.v1.Stream.Builder builderForValue) { + if (streamsBuilder_ == null) { + ensureStreamsIsMutable(); + streams_.add(builderForValue.build()); + onChanged(); + } else { + streamsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of Stream.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Stream streams = 1; + */ + public Builder addStreams( + int index, com.google.cloud.visionai.v1.Stream.Builder builderForValue) { + if (streamsBuilder_ == null) { + ensureStreamsIsMutable(); + streams_.add(index, builderForValue.build()); + onChanged(); + } else { + streamsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of Stream.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Stream streams = 1; + */ + public Builder addAllStreams( + java.lang.Iterable values) { + if (streamsBuilder_ == null) { + ensureStreamsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, streams_); + onChanged(); + } else { + streamsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * The list of Stream.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Stream streams = 1; + */ + public Builder clearStreams() { + if (streamsBuilder_ == null) { + streams_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + streamsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The list of Stream.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Stream streams = 1; + */ + public Builder removeStreams(int index) { + if (streamsBuilder_ == null) { + ensureStreamsIsMutable(); + streams_.remove(index); + onChanged(); + } else { + streamsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * The list of Stream.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Stream streams = 1; + */ + public com.google.cloud.visionai.v1.Stream.Builder getStreamsBuilder(int index) { + return getStreamsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * The list of Stream.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Stream streams = 1; + */ + public com.google.cloud.visionai.v1.StreamOrBuilder getStreamsOrBuilder(int index) { + if (streamsBuilder_ == null) { + return streams_.get(index); + } else { + return streamsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * The list of Stream.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Stream streams = 1; + */ + public java.util.List + getStreamsOrBuilderList() { + if (streamsBuilder_ != null) { + return streamsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(streams_); + } + } + /** + * + * + *
+     * The list of Stream.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Stream streams = 1; + */ + public com.google.cloud.visionai.v1.Stream.Builder addStreamsBuilder() { + return getStreamsFieldBuilder() + .addBuilder(com.google.cloud.visionai.v1.Stream.getDefaultInstance()); + } + /** + * + * + *
+     * The list of Stream.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Stream streams = 1; + */ + public com.google.cloud.visionai.v1.Stream.Builder addStreamsBuilder(int index) { + return getStreamsFieldBuilder() + .addBuilder(index, com.google.cloud.visionai.v1.Stream.getDefaultInstance()); + } + /** + * + * + *
+     * The list of Stream.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Stream streams = 1; + */ + public java.util.List getStreamsBuilderList() { + return getStreamsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.visionai.v1.Stream, + com.google.cloud.visionai.v1.Stream.Builder, + com.google.cloud.visionai.v1.StreamOrBuilder> + getStreamsFieldBuilder() { + if (streamsBuilder_ == null) { + streamsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.visionai.v1.Stream, + com.google.cloud.visionai.v1.Stream.Builder, + com.google.cloud.visionai.v1.StreamOrBuilder>( + streams_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + streams_ = null; + } + return streamsBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + nextPageToken_ = getDefaultInstance().getNextPageToken(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList unreachable_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureUnreachableIsMutable() { + if (!unreachable_.isModifiable()) { + unreachable_ = new com.google.protobuf.LazyStringArrayList(unreachable_); + } + bitField0_ |= 0x00000004; + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @return A list containing the unreachable. + */ + public com.google.protobuf.ProtocolStringList getUnreachableList() { + unreachable_.makeImmutable(); + return unreachable_; + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @return The count of unreachable. + */ + public int getUnreachableCount() { + return unreachable_.size(); + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + public java.lang.String getUnreachable(int index) { + return unreachable_.get(index); + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the value to return. + * @return The bytes of the unreachable at the given index. + */ + public com.google.protobuf.ByteString getUnreachableBytes(int index) { + return unreachable_.getByteString(index); + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param index The index to set the value at. + * @param value The unreachable to set. + * @return This builder for chaining. + */ + public Builder setUnreachable(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureUnreachableIsMutable(); + unreachable_.set(index, value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param value The unreachable to add. + * @return This builder for chaining. + */ + public Builder addUnreachable(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureUnreachableIsMutable(); + unreachable_.add(value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param values The unreachable to add. + * @return This builder for chaining. + */ + public Builder addAllUnreachable(java.lang.Iterable values) { + ensureUnreachableIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, unreachable_); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @return This builder for chaining. + */ + public Builder clearUnreachable() { + unreachable_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + ; + onChanged(); + return this; + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param value The bytes of the unreachable to add. + * @return This builder for chaining. + */ + public Builder addUnreachableBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureUnreachableIsMutable(); + unreachable_.add(value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.ListStreamsResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.ListStreamsResponse) + private static final com.google.cloud.visionai.v1.ListStreamsResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.ListStreamsResponse(); + } + + public static com.google.cloud.visionai.v1.ListStreamsResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListStreamsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.ListStreamsResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListStreamsResponseOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListStreamsResponseOrBuilder.java new file mode 100644 index 000000000000..a7213be22347 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ListStreamsResponseOrBuilder.java @@ -0,0 +1,153 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/streams_service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface ListStreamsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.ListStreamsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The list of Stream.
+   * 
+ * + * repeated .google.cloud.visionai.v1.Stream streams = 1; + */ + java.util.List getStreamsList(); + /** + * + * + *
+   * The list of Stream.
+   * 
+ * + * repeated .google.cloud.visionai.v1.Stream streams = 1; + */ + com.google.cloud.visionai.v1.Stream getStreams(int index); + /** + * + * + *
+   * The list of Stream.
+   * 
+ * + * repeated .google.cloud.visionai.v1.Stream streams = 1; + */ + int getStreamsCount(); + /** + * + * + *
+   * The list of Stream.
+   * 
+ * + * repeated .google.cloud.visionai.v1.Stream streams = 1; + */ + java.util.List getStreamsOrBuilderList(); + /** + * + * + *
+   * The list of Stream.
+   * 
+ * + * repeated .google.cloud.visionai.v1.Stream streams = 1; + */ + com.google.cloud.visionai.v1.StreamOrBuilder getStreamsOrBuilder(int index); + + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); + + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @return A list containing the unreachable. + */ + java.util.List getUnreachableList(); + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @return The count of unreachable. + */ + int getUnreachableCount(); + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + java.lang.String getUnreachable(int index); + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the value to return. + * @return The bytes of the unreachable at the given index. + */ + com.google.protobuf.ByteString getUnreachableBytes(int index); +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/LocationName.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/LocationName.java new file mode 100644 index 000000000000..9213e8f81421 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/LocationName.java @@ -0,0 +1,192 @@ +/* + * Copyright 2024 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.visionai.v1; + +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") +public class LocationName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION = + PathTemplate.createWithoutUrlEncoding("projects/{project}/locations/{location}"); + private volatile Map fieldValuesMap; + private final String project; + private final String location; + + @Deprecated + protected LocationName() { + project = null; + location = null; + } + + private LocationName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static LocationName of(String project, String location) { + return newBuilder().setProject(project).setLocation(location).build(); + } + + public static String format(String project, String location) { + return newBuilder().setProject(project).setLocation(location).build().toString(); + } + + public static LocationName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION.validatedMatch( + formattedString, "LocationName.parse: formattedString not in valid format"); + return of(matchMap.get("project"), matchMap.get("location")); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List values) { + List list = new ArrayList<>(values.size()); + for (LocationName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (project != null) { + fieldMapBuilder.put("project", project); + } + if (location != null) { + fieldMapBuilder.put("location", location); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION.instantiate("project", project, "location", location); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null && getClass() == o.getClass()) { + LocationName that = ((LocationName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(project); + h *= 1000003; + h ^= Objects.hashCode(location); + return h; + } + + /** Builder for projects/{project}/locations/{location}. */ + public static class Builder { + private String project; + private String location; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + private Builder(LocationName locationName) { + this.project = locationName.project; + this.location = locationName.location; + } + + public LocationName build() { + return new LocationName(this); + } + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/LvaProto.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/LvaProto.java new file mode 100644 index 000000000000..5a62526b4f40 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/LvaProto.java @@ -0,0 +1,277 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/lva.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public final class LvaProto { + private LvaProto() {} + + 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_visionai_v1_OperatorDefinition_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_visionai_v1_OperatorDefinition_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_visionai_v1_OperatorDefinition_ArgumentDefinition_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_visionai_v1_OperatorDefinition_ArgumentDefinition_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_visionai_v1_OperatorDefinition_AttributeDefinition_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_visionai_v1_OperatorDefinition_AttributeDefinition_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_visionai_v1_ResourceSpecification_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_visionai_v1_ResourceSpecification_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_visionai_v1_AttributeValue_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_visionai_v1_AttributeValue_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_visionai_v1_AnalyzerDefinition_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_visionai_v1_AnalyzerDefinition_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_visionai_v1_AnalyzerDefinition_StreamInput_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_visionai_v1_AnalyzerDefinition_StreamInput_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_visionai_v1_AnalyzerDefinition_DebugOptions_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_visionai_v1_AnalyzerDefinition_DebugOptions_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_visionai_v1_AnalyzerDefinition_DebugOptions_EnvironmentVariablesEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_visionai_v1_AnalyzerDefinition_DebugOptions_EnvironmentVariablesEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_visionai_v1_AnalyzerDefinition_OperatorOption_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_visionai_v1_AnalyzerDefinition_OperatorOption_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_visionai_v1_AnalyzerDefinition_AttrsEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_visionai_v1_AnalyzerDefinition_AttrsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_visionai_v1_AnalysisDefinition_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_visionai_v1_AnalysisDefinition_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_visionai_v1_RunStatus_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_visionai_v1_RunStatus_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n\"google/cloud/visionai/v1/lva.proto\022\030go" + + "ogle.cloud.visionai.v1\"\312\004\n\022OperatorDefin" + + "ition\022\020\n\010operator\030\001 \001(\t\022S\n\ninput_args\030\002 " + + "\003(\0132?.google.cloud.visionai.v1.OperatorD" + + "efinition.ArgumentDefinition\022T\n\013output_a" + + "rgs\030\003 \003(\0132?.google.cloud.visionai.v1.Ope" + + "ratorDefinition.ArgumentDefinition\022T\n\nat" + + "tributes\030\004 \003(\0132@.google.cloud.visionai.v" + + "1.OperatorDefinition.AttributeDefinition" + + "\022B\n\tresources\030\005 \001(\0132/.google.cloud.visio" + + "nai.v1.ResourceSpecification\022\031\n\021short_de" + + "scription\030\006 \001(\t\022\023\n\013description\030\007 \001(\t\0324\n\022" + + "ArgumentDefinition\022\020\n\010argument\030\001 \001(\t\022\014\n\004" + + "type\030\002 \001(\t\032w\n\023AttributeDefinition\022\021\n\tatt" + + "ribute\030\001 \001(\t\022\014\n\004type\030\002 \001(\t\022?\n\rdefault_va" + + "lue\030\003 \001(\0132(.google.cloud.visionai.v1.Att" + + "ributeValue\"\210\001\n\025ResourceSpecification\022\013\n" + + "\003cpu\030\001 \001(\t\022\022\n\ncpu_limits\030\005 \001(\t\022\016\n\006memory" + + "\030\002 \001(\t\022\025\n\rmemory_limits\030\006 \001(\t\022\014\n\004gpus\030\003 " + + "\001(\005\022\031\n\021latency_budget_ms\030\004 \001(\005\"M\n\016Attrib" + + "uteValue\022\013\n\001i\030\001 \001(\003H\000\022\013\n\001f\030\002 \001(\002H\000\022\013\n\001b\030" + + "\003 \001(\010H\000\022\013\n\001s\030\004 \001(\014H\000B\007\n\005value\"\333\005\n\022Analyz" + + "erDefinition\022\020\n\010analyzer\030\001 \001(\t\022\020\n\010operat" + + "or\030\002 \001(\t\022H\n\006inputs\030\003 \003(\01328.google.cloud." + + "visionai.v1.AnalyzerDefinition.StreamInp" + + "ut\022F\n\005attrs\030\004 \003(\01327.google.cloud.visiona" + + "i.v1.AnalyzerDefinition.AttrsEntry\022P\n\rde" + + "bug_options\030\005 \001(\01329.google.cloud.visiona" + + "i.v1.AnalyzerDefinition.DebugOptions\022T\n\017" + + "operator_option\030\006 \001(\0132;.google.cloud.vis" + + "ionai.v1.AnalyzerDefinition.OperatorOpti" + + "on\032\034\n\013StreamInput\022\r\n\005input\030\001 \001(\t\032\277\001\n\014Deb" + + "ugOptions\022r\n\025environment_variables\030\001 \003(\013" + + "2S.google.cloud.visionai.v1.AnalyzerDefi" + + "nition.DebugOptions.EnvironmentVariables" + + "Entry\032;\n\031EnvironmentVariablesEntry\022\013\n\003ke" + + "y\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\032/\n\016OperatorOp" + + "tion\022\013\n\003tag\030\001 \001(\t\022\020\n\010registry\030\002 \001(\t\032V\n\nA" + + "ttrsEntry\022\013\n\003key\030\001 \001(\t\0227\n\005value\030\002 \001(\0132(." + + "google.cloud.visionai.v1.AttributeValue:" + + "\0028\001\"U\n\022AnalysisDefinition\022?\n\tanalyzers\030\001" + + " \003(\0132,.google.cloud.visionai.v1.Analyzer" + + "Definition\"\274\001\n\tRunStatus\0228\n\005state\030\001 \001(\0162" + + ").google.cloud.visionai.v1.RunStatus.Sta" + + "te\022\016\n\006reason\030\002 \001(\t\"e\n\005State\022\025\n\021STATE_UNS" + + "PECIFIED\020\000\022\020\n\014INITIALIZING\020\001\022\013\n\007RUNNING\020" + + "\002\022\r\n\tCOMPLETED\020\003\022\n\n\006FAILED\020\004\022\013\n\007PENDING\020" + + "\005*=\n\007RunMode\022\030\n\024RUN_MODE_UNSPECIFIED\020\000\022\010" + + "\n\004LIVE\020\001\022\016\n\nSUBMISSION\020\002B\270\001\n\034com.google." + + "cloud.visionai.v1B\010LvaProtoP\001Z8cloud.goo" + + "gle.com/go/visionai/apiv1/visionaipb;vis" + + "ionaipb\252\002\030Google.Cloud.VisionAI.V1\312\002\030Goo" + + "gle\\Cloud\\VisionAI\\V1\352\002\033Google::Cloud::V" + + "isionAI::V1b\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] {}); + internal_static_google_cloud_visionai_v1_OperatorDefinition_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_visionai_v1_OperatorDefinition_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_visionai_v1_OperatorDefinition_descriptor, + new java.lang.String[] { + "Operator", + "InputArgs", + "OutputArgs", + "Attributes", + "Resources", + "ShortDescription", + "Description", + }); + internal_static_google_cloud_visionai_v1_OperatorDefinition_ArgumentDefinition_descriptor = + internal_static_google_cloud_visionai_v1_OperatorDefinition_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_visionai_v1_OperatorDefinition_ArgumentDefinition_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_visionai_v1_OperatorDefinition_ArgumentDefinition_descriptor, + new java.lang.String[] { + "Argument", "Type", + }); + internal_static_google_cloud_visionai_v1_OperatorDefinition_AttributeDefinition_descriptor = + internal_static_google_cloud_visionai_v1_OperatorDefinition_descriptor + .getNestedTypes() + .get(1); + internal_static_google_cloud_visionai_v1_OperatorDefinition_AttributeDefinition_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_visionai_v1_OperatorDefinition_AttributeDefinition_descriptor, + new java.lang.String[] { + "Attribute", "Type", "DefaultValue", + }); + internal_static_google_cloud_visionai_v1_ResourceSpecification_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_cloud_visionai_v1_ResourceSpecification_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_visionai_v1_ResourceSpecification_descriptor, + new java.lang.String[] { + "Cpu", "CpuLimits", "Memory", "MemoryLimits", "Gpus", "LatencyBudgetMs", + }); + internal_static_google_cloud_visionai_v1_AttributeValue_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_google_cloud_visionai_v1_AttributeValue_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_visionai_v1_AttributeValue_descriptor, + new java.lang.String[] { + "I", "F", "B", "S", "Value", + }); + internal_static_google_cloud_visionai_v1_AnalyzerDefinition_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_google_cloud_visionai_v1_AnalyzerDefinition_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_visionai_v1_AnalyzerDefinition_descriptor, + new java.lang.String[] { + "Analyzer", "Operator", "Inputs", "Attrs", "DebugOptions", "OperatorOption", + }); + internal_static_google_cloud_visionai_v1_AnalyzerDefinition_StreamInput_descriptor = + internal_static_google_cloud_visionai_v1_AnalyzerDefinition_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_visionai_v1_AnalyzerDefinition_StreamInput_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_visionai_v1_AnalyzerDefinition_StreamInput_descriptor, + new java.lang.String[] { + "Input", + }); + internal_static_google_cloud_visionai_v1_AnalyzerDefinition_DebugOptions_descriptor = + internal_static_google_cloud_visionai_v1_AnalyzerDefinition_descriptor + .getNestedTypes() + .get(1); + internal_static_google_cloud_visionai_v1_AnalyzerDefinition_DebugOptions_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_visionai_v1_AnalyzerDefinition_DebugOptions_descriptor, + new java.lang.String[] { + "EnvironmentVariables", + }); + internal_static_google_cloud_visionai_v1_AnalyzerDefinition_DebugOptions_EnvironmentVariablesEntry_descriptor = + internal_static_google_cloud_visionai_v1_AnalyzerDefinition_DebugOptions_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_visionai_v1_AnalyzerDefinition_DebugOptions_EnvironmentVariablesEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_visionai_v1_AnalyzerDefinition_DebugOptions_EnvironmentVariablesEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); + internal_static_google_cloud_visionai_v1_AnalyzerDefinition_OperatorOption_descriptor = + internal_static_google_cloud_visionai_v1_AnalyzerDefinition_descriptor + .getNestedTypes() + .get(2); + internal_static_google_cloud_visionai_v1_AnalyzerDefinition_OperatorOption_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_visionai_v1_AnalyzerDefinition_OperatorOption_descriptor, + new java.lang.String[] { + "Tag", "Registry", + }); + internal_static_google_cloud_visionai_v1_AnalyzerDefinition_AttrsEntry_descriptor = + internal_static_google_cloud_visionai_v1_AnalyzerDefinition_descriptor + .getNestedTypes() + .get(3); + internal_static_google_cloud_visionai_v1_AnalyzerDefinition_AttrsEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_visionai_v1_AnalyzerDefinition_AttrsEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); + internal_static_google_cloud_visionai_v1_AnalysisDefinition_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_google_cloud_visionai_v1_AnalysisDefinition_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_visionai_v1_AnalysisDefinition_descriptor, + new java.lang.String[] { + "Analyzers", + }); + internal_static_google_cloud_visionai_v1_RunStatus_descriptor = + getDescriptor().getMessageTypes().get(5); + internal_static_google_cloud_visionai_v1_RunStatus_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_visionai_v1_RunStatus_descriptor, + new java.lang.String[] { + "State", "Reason", + }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/LvaResourcesProto.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/LvaResourcesProto.java new file mode 100644 index 000000000000..4334f2b131f0 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/LvaResourcesProto.java @@ -0,0 +1,219 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/lva_resources.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public final class LvaResourcesProto { + private LvaResourcesProto() {} + + 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_visionai_v1_Operator_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_visionai_v1_Operator_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_visionai_v1_Operator_LabelsEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_visionai_v1_Operator_LabelsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_visionai_v1_Analysis_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_visionai_v1_Analysis_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_visionai_v1_Analysis_LabelsEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_visionai_v1_Analysis_LabelsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_visionai_v1_Analysis_InputStreamsMappingEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_visionai_v1_Analysis_InputStreamsMappingEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_visionai_v1_Analysis_OutputStreamsMappingEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_visionai_v1_Analysis_OutputStreamsMappingEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_visionai_v1_Process_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_visionai_v1_Process_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n,google/cloud/visionai/v1/lva_resources" + + ".proto\022\030google.cloud.visionai.v1\032\037google" + + "/api/field_behavior.proto\032\031google/api/re" + + "source.proto\032\"google/cloud/visionai/v1/l" + + "va.proto\032\037google/protobuf/timestamp.prot" + + "o\"\271\003\n\010Operator\022\014\n\004name\030\001 \001(\t\0224\n\013create_t" + + "ime\030\002 \001(\0132\032.google.protobuf.TimestampB\003\340" + + "A\003\0224\n\013update_time\030\003 \001(\0132\032.google.protobu" + + "f.TimestampB\003\340A\003\022>\n\006labels\030\004 \003(\0132..googl" + + "e.cloud.visionai.v1.Operator.LabelsEntry" + + "\022I\n\023operator_definition\030\005 \001(\0132,.google.c" + + "loud.visionai.v1.OperatorDefinition\022\024\n\014d" + + "ocker_image\030\006 \001(\t\032-\n\013LabelsEntry\022\013\n\003key\030" + + "\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001:c\352A`\n visionai." + + "googleapis.com/Operator\022\n\006labels\030\004 \003(\0132..g" + + "oogle.cloud.visionai.v1.Analysis.LabelsE" + + "ntry\022I\n\023analysis_definition\030\005 \001(\0132,.goog" + + "le.cloud.visionai.v1.AnalysisDefinition\022" + + "Z\n\025input_streams_mapping\030\006 \003(\0132;.google." + + "cloud.visionai.v1.Analysis.InputStreamsM" + + "appingEntry\022\\\n\026output_streams_mapping\030\007 " + + "\003(\0132<.google.cloud.visionai.v1.Analysis." + + "OutputStreamsMappingEntry\022\033\n\023disable_eve" + + "nt_watch\030\010 \001(\010\032-\n\013LabelsEntry\022\013\n\003key\030\001 \001" + + "(\t\022\r\n\005value\030\002 \001(\t:\0028\001\032:\n\030InputStreamsMap" + + "pingEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028" + + "\001\032;\n\031OutputStreamsMappingEntry\022\013\n\003key\030\001 " + + "\001(\t\022\r\n\005value\030\002 \001(\t:\0028\001:u\352Ar\n visionai.go" + + "ogleapis.com/Analysis\022Nprojects/{project" + + "}/locations/{location}/clusters/{cluster" + + "}/analyses/{analysis}\"\227\004\n\007Process\022\014\n\004nam" + + "e\030\001 \001(\t\0224\n\013create_time\030\002 \001(\0132\032.google.pr" + + "otobuf.TimestampB\003\340A\003\0224\n\013update_time\030\003 \001" + + "(\0132\032.google.protobuf.TimestampB\003\340A\003\022:\n\010a" + + "nalysis\030\004 \001(\tB(\340A\002\372A\"\n visionai.googleap" + + "is.com/Analysis\022 \n\023attribute_overrides\030\005" + + " \003(\tB\003\340A\001\022<\n\nrun_status\030\006 \001(\0132#.google.c" + + "loud.visionai.v1.RunStatusB\003\340A\001\0228\n\010run_m" + + "ode\030\007 \001(\0162!.google.cloud.visionai.v1.Run" + + "ModeB\003\340A\001\022\025\n\010event_id\030\010 \001(\tB\003\340A\001\022\025\n\010batc" + + "h_id\030\t \001(\tB\003\340A\001\022\030\n\013retry_count\030\n \001(\005B\003\340A" + + "\001:t\352Aq\n\037visionai.googleapis.com/Process\022" + + "Nprojects/{project}/locations/{location}" + + "/clusters/{cluster}/processes/{process}B" + + "\301\001\n\034com.google.cloud.visionai.v1B\021LvaRes" + + "ourcesProtoP\001Z8cloud.google.com/go/visio" + + "nai/apiv1/visionaipb;visionaipb\252\002\030Google" + + ".Cloud.VisionAI.V1\312\002\030Google\\Cloud\\Vision" + + "AI\\V1\352\002\033Google::Cloud::VisionAI::V1b\006pro" + + "to3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.api.ResourceProto.getDescriptor(), + com.google.cloud.visionai.v1.LvaProto.getDescriptor(), + com.google.protobuf.TimestampProto.getDescriptor(), + }); + internal_static_google_cloud_visionai_v1_Operator_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_visionai_v1_Operator_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_visionai_v1_Operator_descriptor, + new java.lang.String[] { + "Name", "CreateTime", "UpdateTime", "Labels", "OperatorDefinition", "DockerImage", + }); + internal_static_google_cloud_visionai_v1_Operator_LabelsEntry_descriptor = + internal_static_google_cloud_visionai_v1_Operator_descriptor.getNestedTypes().get(0); + internal_static_google_cloud_visionai_v1_Operator_LabelsEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_visionai_v1_Operator_LabelsEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); + internal_static_google_cloud_visionai_v1_Analysis_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_cloud_visionai_v1_Analysis_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_visionai_v1_Analysis_descriptor, + new java.lang.String[] { + "Name", + "CreateTime", + "UpdateTime", + "Labels", + "AnalysisDefinition", + "InputStreamsMapping", + "OutputStreamsMapping", + "DisableEventWatch", + }); + internal_static_google_cloud_visionai_v1_Analysis_LabelsEntry_descriptor = + internal_static_google_cloud_visionai_v1_Analysis_descriptor.getNestedTypes().get(0); + internal_static_google_cloud_visionai_v1_Analysis_LabelsEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_visionai_v1_Analysis_LabelsEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); + internal_static_google_cloud_visionai_v1_Analysis_InputStreamsMappingEntry_descriptor = + internal_static_google_cloud_visionai_v1_Analysis_descriptor.getNestedTypes().get(1); + internal_static_google_cloud_visionai_v1_Analysis_InputStreamsMappingEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_visionai_v1_Analysis_InputStreamsMappingEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); + internal_static_google_cloud_visionai_v1_Analysis_OutputStreamsMappingEntry_descriptor = + internal_static_google_cloud_visionai_v1_Analysis_descriptor.getNestedTypes().get(2); + internal_static_google_cloud_visionai_v1_Analysis_OutputStreamsMappingEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_visionai_v1_Analysis_OutputStreamsMappingEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); + internal_static_google_cloud_visionai_v1_Process_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_google_cloud_visionai_v1_Process_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_visionai_v1_Process_descriptor, + new java.lang.String[] { + "Name", + "CreateTime", + "UpdateTime", + "Analysis", + "AttributeOverrides", + "RunStatus", + "RunMode", + "EventId", + "BatchId", + "RetryCount", + }); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + registry.add(com.google.api.ResourceProto.resource); + registry.add(com.google.api.ResourceProto.resourceReference); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.api.ResourceProto.getDescriptor(); + com.google.cloud.visionai.v1.LvaProto.getDescriptor(); + com.google.protobuf.TimestampProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/LvaServiceProto.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/LvaServiceProto.java new file mode 100644 index 000000000000..74b80a86aa98 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/LvaServiceProto.java @@ -0,0 +1,593 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/lva_service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public final class LvaServiceProto { + private LvaServiceProto() {} + + 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_visionai_v1_ListOperatorsRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_visionai_v1_ListOperatorsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_visionai_v1_ListOperatorsResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_visionai_v1_ListOperatorsResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_visionai_v1_GetOperatorRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_visionai_v1_GetOperatorRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_visionai_v1_CreateOperatorRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_visionai_v1_CreateOperatorRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_visionai_v1_UpdateOperatorRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_visionai_v1_UpdateOperatorRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_visionai_v1_DeleteOperatorRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_visionai_v1_DeleteOperatorRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_visionai_v1_ListAnalysesRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_visionai_v1_ListAnalysesRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_visionai_v1_ListAnalysesResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_visionai_v1_ListAnalysesResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_visionai_v1_GetAnalysisRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_visionai_v1_GetAnalysisRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_visionai_v1_CreateAnalysisRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_visionai_v1_CreateAnalysisRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_visionai_v1_UpdateAnalysisRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_visionai_v1_UpdateAnalysisRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_visionai_v1_DeleteAnalysisRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_visionai_v1_DeleteAnalysisRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_visionai_v1_ListProcessesRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_visionai_v1_ListProcessesRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_visionai_v1_ListProcessesResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_visionai_v1_ListProcessesResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_visionai_v1_GetProcessRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_visionai_v1_GetProcessRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_visionai_v1_CreateProcessRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_visionai_v1_CreateProcessRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_visionai_v1_UpdateProcessRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_visionai_v1_UpdateProcessRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_visionai_v1_DeleteProcessRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_visionai_v1_DeleteProcessRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_visionai_v1_BatchRunProcessRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_visionai_v1_BatchRunProcessRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_visionai_v1_BatchRunProcessRequest_BatchRunProcessOptions_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_visionai_v1_BatchRunProcessRequest_BatchRunProcessOptions_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_visionai_v1_BatchRunProcessResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_visionai_v1_BatchRunProcessResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_visionai_v1_ResolveOperatorInfoRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_visionai_v1_ResolveOperatorInfoRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_visionai_v1_OperatorQuery_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_visionai_v1_OperatorQuery_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_visionai_v1_ResolveOperatorInfoResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_visionai_v1_ResolveOperatorInfoResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_visionai_v1_ListPublicOperatorsRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_visionai_v1_ListPublicOperatorsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_visionai_v1_ListPublicOperatorsResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_visionai_v1_ListPublicOperatorsResponse_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n*google/cloud/visionai/v1/lva_service.p" + + "roto\022\030google.cloud.visionai.v1\032\034google/a" + + "pi/annotations.proto\032\027google/api/client." + + "proto\032\037google/api/field_behavior.proto\032\031" + + "google/api/resource.proto\032%google/cloud/" + + "visionai/v1/common.proto\032,google/cloud/v" + + "isionai/v1/lva_resources.proto\032#google/l" + + "ongrunning/operations.proto\032\033google/prot" + + "obuf/empty.proto\032 google/protobuf/field_" + + "mask.proto\"\232\001\n\024ListOperatorsRequest\0229\n\006p" + + "arent\030\001 \001(\tB)\340A\002\372A#\n!locations.googleapi" + + "s.com/Location\022\021\n\tpage_size\030\002 \001(\005\022\022\n\npag" + + "e_token\030\003 \001(\t\022\016\n\006filter\030\004 \001(\t\022\020\n\010order_b" + + "y\030\005 \001(\t\"|\n\025ListOperatorsResponse\0225\n\toper" + + "ators\030\001 \003(\0132\".google.cloud.visionai.v1.O" + + "perator\022\027\n\017next_page_token\030\002 \001(\t\022\023\n\013unre" + + "achable\030\003 \003(\t\"L\n\022GetOperatorRequest\0226\n\004n" + + "ame\030\001 \001(\tB(\340A\002\372A\"\n visionai.googleapis.c" + + "om/Operator\"\300\001\n\025CreateOperatorRequest\0229\n" + + "\006parent\030\001 \001(\tB)\340A\002\372A#\n!locations.googlea" + + "pis.com/Location\022\030\n\013operator_id\030\002 \001(\tB\003\340" + + "A\002\0229\n\010operator\030\003 \001(\0132\".google.cloud.visi" + + "onai.v1.OperatorB\003\340A\002\022\027\n\nrequest_id\030\004 \001(" + + "\tB\003\340A\001\"\241\001\n\025UpdateOperatorRequest\0224\n\013upda" + + "te_mask\030\001 \001(\0132\032.google.protobuf.FieldMas" + + "kB\003\340A\002\0229\n\010operator\030\002 \001(\0132\".google.cloud." + + "visionai.v1.OperatorB\003\340A\002\022\027\n\nrequest_id\030" + + "\003 \001(\tB\003\340A\001\"h\n\025DeleteOperatorRequest\0226\n\004n" + + "ame\030\001 \001(\tB(\340A\002\372A\"\n visionai.googleapis.c" + + "om/Operator\022\027\n\nrequest_id\030\002 \001(\tB\003\340A\001\"\227\001\n" + + "\023ListAnalysesRequest\0227\n\006parent\030\001 \001(\tB\'\340A" + + "\002\372A!\n\037visionai.googleapis.com/Cluster\022\021\n" + + "\tpage_size\030\002 \001(\005\022\022\n\npage_token\030\003 \001(\t\022\016\n\006" + + "filter\030\004 \001(\t\022\020\n\010order_by\030\005 \001(\t\"z\n\024ListAn" + + "alysesResponse\0224\n\010analyses\030\001 \003(\0132\".googl" + + "e.cloud.visionai.v1.Analysis\022\027\n\017next_pag" + + "e_token\030\002 \001(\t\022\023\n\013unreachable\030\003 \003(\t\"L\n\022Ge" + + "tAnalysisRequest\0226\n\004name\030\001 \001(\tB(\340A\002\372A\"\n " + + "visionai.googleapis.com/Analysis\"\276\001\n\025Cre" + + "ateAnalysisRequest\0227\n\006parent\030\001 \001(\tB\'\340A\002\372" + + "A!\n\037visionai.googleapis.com/Cluster\022\030\n\013a" + + "nalysis_id\030\002 \001(\tB\003\340A\002\0229\n\010analysis\030\003 \001(\0132" + + "\".google.cloud.visionai.v1.AnalysisB\003\340A\002" + + "\022\027\n\nrequest_id\030\004 \001(\tB\003\340A\001\"\241\001\n\025UpdateAnal" + + "ysisRequest\0224\n\013update_mask\030\001 \001(\0132\032.googl" + + "e.protobuf.FieldMaskB\003\340A\002\0229\n\010analysis\030\002 " + + "\001(\0132\".google.cloud.visionai.v1.AnalysisB" + + "\003\340A\002\022\027\n\nrequest_id\030\003 \001(\tB\003\340A\001\"h\n\025DeleteA" + + "nalysisRequest\0226\n\004name\030\001 \001(\tB(\340A\002\372A\"\n vi" + + "sionai.googleapis.com/Analysis\022\027\n\nreques" + + "t_id\030\002 \001(\tB\003\340A\001\"\230\001\n\024ListProcessesRequest" + + "\0227\n\006parent\030\001 \001(\tB\'\340A\002\372A!\n\037visionai.googl" + + "eapis.com/Cluster\022\021\n\tpage_size\030\002 \001(\005\022\022\n\n" + + "page_token\030\003 \001(\t\022\016\n\006filter\030\004 \001(\t\022\020\n\010orde" + + "r_by\030\005 \001(\t\"{\n\025ListProcessesResponse\0224\n\tp" + + "rocesses\030\001 \003(\0132!.google.cloud.visionai.v" + + "1.Process\022\027\n\017next_page_token\030\002 \001(\t\022\023\n\013un" + + "reachable\030\003 \003(\t\"J\n\021GetProcessRequest\0225\n\004" + + "name\030\001 \001(\tB\'\340A\002\372A!\n\037visionai.googleapis." + + "com/Process\"\272\001\n\024CreateProcessRequest\0227\n\006" + + "parent\030\001 \001(\tB\'\340A\002\372A!\n\037visionai.googleapi" + + "s.com/Cluster\022\027\n\nprocess_id\030\002 \001(\tB\003\340A\002\0227" + + "\n\007process\030\003 \001(\0132!.google.cloud.visionai." + + "v1.ProcessB\003\340A\002\022\027\n\nrequest_id\030\004 \001(\tB\003\340A\001" + + "\"\236\001\n\024UpdateProcessRequest\0224\n\013update_mask" + + "\030\001 \001(\0132\032.google.protobuf.FieldMaskB\003\340A\002\022" + + "7\n\007process\030\002 \001(\0132!.google.cloud.visionai" + + ".v1.ProcessB\003\340A\002\022\027\n\nrequest_id\030\003 \001(\tB\003\340A" + + "\001\"f\n\024DeleteProcessRequest\0225\n\004name\030\001 \001(\tB" + + "\'\340A\002\372A!\n\037visionai.googleapis.com/Process" + + "\022\027\n\nrequest_id\030\002 \001(\tB\003\340A\001\"\321\002\n\026BatchRunPr" + + "ocessRequest\0227\n\006parent\030\001 \001(\tB\'\340A\002\372A!\n\037vi" + + "sionai.googleapis.com/Cluster\022E\n\010request" + + "s\030\002 \003(\0132..google.cloud.visionai.v1.Creat" + + "eProcessRequestB\003\340A\002\022]\n\007options\030\003 \001(\0132G." + + "google.cloud.visionai.v1.BatchRunProcess" + + "Request.BatchRunProcessOptionsB\003\340A\001\022\025\n\010b" + + "atch_id\030\004 \001(\tB\003\340A\003\032A\n\026BatchRunProcessOpt" + + "ions\022\023\n\013retry_count\030\001 \001(\005\022\022\n\nbatch_size\030" + + "\002 \001(\005\"a\n\027BatchRunProcessResponse\022\020\n\010batc" + + "h_id\030\001 \001(\t\0224\n\tprocesses\030\002 \003(\0132!.google.c" + + "loud.visionai.v1.Process\"\226\001\n\032ResolveOper" + + "atorInfoRequest\0229\n\006parent\030\001 \001(\tB)\340A\002\372A#\n" + + "!locations.googleapis.com/Location\022=\n\007qu" + + "eries\030\002 \003(\0132\'.google.cloud.visionai.v1.O" + + "peratorQueryB\003\340A\002\"s\n\rOperatorQuery\022\025\n\010op" + + "erator\030\001 \001(\tB\003\340A\002\022\020\n\003tag\030\002 \001(\tB\003\340A\001\0229\n\010r" + + "egistry\030\003 \001(\0162\".google.cloud.visionai.v1" + + ".RegistryB\003\340A\001\"T\n\033ResolveOperatorInfoRes" + + "ponse\0225\n\toperators\030\001 \003(\0132\".google.cloud." + + "visionai.v1.Operator\"\240\001\n\032ListPublicOpera" + + "torsRequest\0229\n\006parent\030\001 \001(\tB)\340A\002\372A#\n!loc" + + "ations.googleapis.com/Location\022\021\n\tpage_s" + + "ize\030\002 \001(\005\022\022\n\npage_token\030\003 \001(\t\022\016\n\006filter\030" + + "\004 \001(\t\022\020\n\010order_by\030\005 \001(\t\"m\n\033ListPublicOpe" + + "ratorsResponse\0225\n\toperators\030\001 \003(\0132\".goog" + + "le.cloud.visionai.v1.Operator\022\027\n\017next_pa" + + "ge_token\030\002 \001(\t*=\n\010Registry\022\030\n\024REGISTRY_U" + + "NSPECIFIED\020\000\022\n\n\006PUBLIC\020\001\022\013\n\007PRIVATE\020\0022\215\036" + + "\n\022LiveVideoAnalytics\022\314\001\n\023ListPublicOpera" + + "tors\0224.google.cloud.visionai.v1.ListPubl" + + "icOperatorsRequest\0325.google.cloud.vision" + + "ai.v1.ListPublicOperatorsResponse\"H\332A\006pa" + + "rent\202\323\344\223\0029\0227/v1/{parent=projects/*/locat" + + "ions/*}:listPublicOperators\022\327\001\n\023ResolveO" + + "peratorInfo\0224.google.cloud.visionai.v1.R" + + "esolveOperatorInfoRequest\0325.google.cloud" + + ".visionai.v1.ResolveOperatorInfoResponse" + + "\"S\332A\016parent,queries\202\323\344\223\002<\"7/v1/{parent=p" + + "rojects/*/locations/*}:resolveOperatorIn" + + "fo:\001*\022\260\001\n\rListOperators\022..google.cloud.v" + + "isionai.v1.ListOperatorsRequest\032/.google" + + ".cloud.visionai.v1.ListOperatorsResponse" + + "\">\332A\006parent\202\323\344\223\002/\022-/v1/{parent=projects/" + + "*/locations/*}/operators\022\235\001\n\013GetOperator" + + "\022,.google.cloud.visionai.v1.GetOperatorR" + + "equest\032\".google.cloud.visionai.v1.Operat" + + "or\"<\332A\004name\202\323\344\223\002/\022-/v1/{name=projects/*/" + + "locations/*/operators/*}\022\337\001\n\016CreateOpera" + + "tor\022/.google.cloud.visionai.v1.CreateOpe" + + "ratorRequest\032\035.google.longrunning.Operat" + + "ion\"}\312A\035\n\010Operator\022\021OperationMetadata\332A\033" + + "parent,operator,operator_id\202\323\344\223\0029\"-/v1/{" + + "parent=projects/*/locations/*}/operators" + + ":\010operator\022\341\001\n\016UpdateOperator\022/.google.c" + + "loud.visionai.v1.UpdateOperatorRequest\032\035" + + ".google.longrunning.Operation\"\177\312A\035\n\010Oper" + + "ator\022\021OperationMetadata\332A\024operator,updat" + + "e_mask\202\323\344\223\002B26/v1/{operator.name=project" + + "s/*/locations/*/operators/*}:\010operator\022\313" + + "\001\n\016DeleteOperator\022/.google.cloud.visiona" + + "i.v1.DeleteOperatorRequest\032\035.google.long" + + "running.Operation\"i\312A*\n\025google.protobuf." + + "Empty\022\021OperationMetadata\332A\004name\202\323\344\223\002/*-/" + + "v1/{name=projects/*/locations/*/operator" + + "s/*}\022\267\001\n\014ListAnalyses\022-.google.cloud.vis" + + "ionai.v1.ListAnalysesRequest\032..google.cl" + + "oud.visionai.v1.ListAnalysesResponse\"H\332A" + + "\006parent\202\323\344\223\0029\0227/v1/{parent=projects/*/lo" + + "cations/*/clusters/*}/analyses\022\247\001\n\013GetAn" + + "alysis\022,.google.cloud.visionai.v1.GetAna" + + "lysisRequest\032\".google.cloud.visionai.v1." + + "Analysis\"F\332A\004name\202\323\344\223\0029\0227/v1/{name=proje" + + "cts/*/locations/*/clusters/*/analyses/*}" + + "\022\352\001\n\016CreateAnalysis\022/.google.cloud.visio" + + "nai.v1.CreateAnalysisRequest\032\035.google.lo" + + "ngrunning.Operation\"\207\001\312A\035\n\010Analysis\022\021Ope" + + "rationMetadata\332A\033parent,analysis,analysi" + + "s_id\202\323\344\223\002C\"7/v1/{parent=projects/*/locat" + + "ions/*/clusters/*}/analyses:\010analysis\022\354\001" + + "\n\016UpdateAnalysis\022/.google.cloud.visionai" + + ".v1.UpdateAnalysisRequest\032\035.google.longr" + + "unning.Operation\"\211\001\312A\035\n\010Analysis\022\021Operat" + + "ionMetadata\332A\024analysis,update_mask\202\323\344\223\002L" + + "2@/v1/{analysis.name=projects/*/location" + + "s/*/clusters/*/analyses/*}:\010analysis\022\325\001\n" + + "\016DeleteAnalysis\022/.google.cloud.visionai." + + "v1.DeleteAnalysisRequest\032\035.google.longru" + + "nning.Operation\"s\312A*\n\025google.protobuf.Em" + + "pty\022\021OperationMetadata\332A\004name\202\323\344\223\0029*7/v1" + + "/{name=projects/*/locations/*/clusters/*" + + "/analyses/*}\022\273\001\n\rListProcesses\022..google." + + "cloud.visionai.v1.ListProcessesRequest\032/" + + ".google.cloud.visionai.v1.ListProcessesR" + + "esponse\"I\332A\006parent\202\323\344\223\002:\0228/v1/{parent=pr" + + "ojects/*/locations/*/clusters/*}/process" + + "es\022\245\001\n\nGetProcess\022+.google.cloud.visiona" + + "i.v1.GetProcessRequest\032!.google.cloud.vi" + + "sionai.v1.Process\"G\332A\004name\202\323\344\223\002:\0228/v1/{n" + + "ame=projects/*/locations/*/clusters/*/pr" + + "ocesses/*}\022\345\001\n\rCreateProcess\022..google.cl" + + "oud.visionai.v1.CreateProcessRequest\032\035.g" + + "oogle.longrunning.Operation\"\204\001\312A\034\n\007Proce" + + "ss\022\021OperationMetadata\332A\031parent,process,p" + + "rocess_id\202\323\344\223\002C\"8/v1/{parent=projects/*/" + + "locations/*/clusters/*}/processes:\007proce" + + "ss\022\347\001\n\rUpdateProcess\022..google.cloud.visi" + + "onai.v1.UpdateProcessRequest\032\035.google.lo" + + "ngrunning.Operation\"\206\001\312A\034\n\007Process\022\021Oper" + + "ationMetadata\332A\023process,update_mask\202\323\344\223\002" + + "K2@/v1/{process.name=projects/*/location" + + "s/*/clusters/*/processes/*}:\007process\022\324\001\n" + + "\rDeleteProcess\022..google.cloud.visionai.v" + + "1.DeleteProcessRequest\032\035.google.longrunn" + + "ing.Operation\"t\312A*\n\025google.protobuf.Empt" + + "y\022\021OperationMetadata\332A\004name\202\323\344\223\002:*8/v1/{" + + "name=projects/*/locations/*/clusters/*/p" + + "rocesses/*}\022\362\001\n\017BatchRunProcess\0220.google" + + ".cloud.visionai.v1.BatchRunProcessReques" + + "t\032\035.google.longrunning.Operation\"\215\001\312A,\n\027" + + "BatchRunProcessResponse\022\021OperationMetada" + + "ta\332A\017parent,requests\202\323\344\223\002F\"A/v1/{parent=" + + "projects/*/locations/*/clusters/*}/proce" + + "sses:batchRun:\001*\032K\312A\027visionai.googleapis" + + ".com\322A.https://www.googleapis.com/auth/c" + + "loud-platformB\277\001\n\034com.google.cloud.visio" + + "nai.v1B\017LvaServiceProtoP\001Z8cloud.google." + + "com/go/visionai/apiv1/visionaipb;visiona" + + "ipb\252\002\030Google.Cloud.VisionAI.V1\312\002\030Google\\" + + "Cloud\\VisionAI\\V1\352\002\033Google::Cloud::Visio" + + "nAI::V1b\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.AnnotationsProto.getDescriptor(), + com.google.api.ClientProto.getDescriptor(), + com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.api.ResourceProto.getDescriptor(), + com.google.cloud.visionai.v1.CommonProto.getDescriptor(), + com.google.cloud.visionai.v1.LvaResourcesProto.getDescriptor(), + com.google.longrunning.OperationsProto.getDescriptor(), + com.google.protobuf.EmptyProto.getDescriptor(), + com.google.protobuf.FieldMaskProto.getDescriptor(), + }); + internal_static_google_cloud_visionai_v1_ListOperatorsRequest_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_visionai_v1_ListOperatorsRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_visionai_v1_ListOperatorsRequest_descriptor, + new java.lang.String[] { + "Parent", "PageSize", "PageToken", "Filter", "OrderBy", + }); + internal_static_google_cloud_visionai_v1_ListOperatorsResponse_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_cloud_visionai_v1_ListOperatorsResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_visionai_v1_ListOperatorsResponse_descriptor, + new java.lang.String[] { + "Operators", "NextPageToken", "Unreachable", + }); + internal_static_google_cloud_visionai_v1_GetOperatorRequest_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_google_cloud_visionai_v1_GetOperatorRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_visionai_v1_GetOperatorRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_visionai_v1_CreateOperatorRequest_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_google_cloud_visionai_v1_CreateOperatorRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_visionai_v1_CreateOperatorRequest_descriptor, + new java.lang.String[] { + "Parent", "OperatorId", "Operator", "RequestId", + }); + internal_static_google_cloud_visionai_v1_UpdateOperatorRequest_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_google_cloud_visionai_v1_UpdateOperatorRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_visionai_v1_UpdateOperatorRequest_descriptor, + new java.lang.String[] { + "UpdateMask", "Operator", "RequestId", + }); + internal_static_google_cloud_visionai_v1_DeleteOperatorRequest_descriptor = + getDescriptor().getMessageTypes().get(5); + internal_static_google_cloud_visionai_v1_DeleteOperatorRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_visionai_v1_DeleteOperatorRequest_descriptor, + new java.lang.String[] { + "Name", "RequestId", + }); + internal_static_google_cloud_visionai_v1_ListAnalysesRequest_descriptor = + getDescriptor().getMessageTypes().get(6); + internal_static_google_cloud_visionai_v1_ListAnalysesRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_visionai_v1_ListAnalysesRequest_descriptor, + new java.lang.String[] { + "Parent", "PageSize", "PageToken", "Filter", "OrderBy", + }); + internal_static_google_cloud_visionai_v1_ListAnalysesResponse_descriptor = + getDescriptor().getMessageTypes().get(7); + internal_static_google_cloud_visionai_v1_ListAnalysesResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_visionai_v1_ListAnalysesResponse_descriptor, + new java.lang.String[] { + "Analyses", "NextPageToken", "Unreachable", + }); + internal_static_google_cloud_visionai_v1_GetAnalysisRequest_descriptor = + getDescriptor().getMessageTypes().get(8); + internal_static_google_cloud_visionai_v1_GetAnalysisRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_visionai_v1_GetAnalysisRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_visionai_v1_CreateAnalysisRequest_descriptor = + getDescriptor().getMessageTypes().get(9); + internal_static_google_cloud_visionai_v1_CreateAnalysisRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_visionai_v1_CreateAnalysisRequest_descriptor, + new java.lang.String[] { + "Parent", "AnalysisId", "Analysis", "RequestId", + }); + internal_static_google_cloud_visionai_v1_UpdateAnalysisRequest_descriptor = + getDescriptor().getMessageTypes().get(10); + internal_static_google_cloud_visionai_v1_UpdateAnalysisRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_visionai_v1_UpdateAnalysisRequest_descriptor, + new java.lang.String[] { + "UpdateMask", "Analysis", "RequestId", + }); + internal_static_google_cloud_visionai_v1_DeleteAnalysisRequest_descriptor = + getDescriptor().getMessageTypes().get(11); + internal_static_google_cloud_visionai_v1_DeleteAnalysisRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_visionai_v1_DeleteAnalysisRequest_descriptor, + new java.lang.String[] { + "Name", "RequestId", + }); + internal_static_google_cloud_visionai_v1_ListProcessesRequest_descriptor = + getDescriptor().getMessageTypes().get(12); + internal_static_google_cloud_visionai_v1_ListProcessesRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_visionai_v1_ListProcessesRequest_descriptor, + new java.lang.String[] { + "Parent", "PageSize", "PageToken", "Filter", "OrderBy", + }); + internal_static_google_cloud_visionai_v1_ListProcessesResponse_descriptor = + getDescriptor().getMessageTypes().get(13); + internal_static_google_cloud_visionai_v1_ListProcessesResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_visionai_v1_ListProcessesResponse_descriptor, + new java.lang.String[] { + "Processes", "NextPageToken", "Unreachable", + }); + internal_static_google_cloud_visionai_v1_GetProcessRequest_descriptor = + getDescriptor().getMessageTypes().get(14); + internal_static_google_cloud_visionai_v1_GetProcessRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_visionai_v1_GetProcessRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_visionai_v1_CreateProcessRequest_descriptor = + getDescriptor().getMessageTypes().get(15); + internal_static_google_cloud_visionai_v1_CreateProcessRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_visionai_v1_CreateProcessRequest_descriptor, + new java.lang.String[] { + "Parent", "ProcessId", "Process", "RequestId", + }); + internal_static_google_cloud_visionai_v1_UpdateProcessRequest_descriptor = + getDescriptor().getMessageTypes().get(16); + internal_static_google_cloud_visionai_v1_UpdateProcessRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_visionai_v1_UpdateProcessRequest_descriptor, + new java.lang.String[] { + "UpdateMask", "Process", "RequestId", + }); + internal_static_google_cloud_visionai_v1_DeleteProcessRequest_descriptor = + getDescriptor().getMessageTypes().get(17); + internal_static_google_cloud_visionai_v1_DeleteProcessRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_visionai_v1_DeleteProcessRequest_descriptor, + new java.lang.String[] { + "Name", "RequestId", + }); + internal_static_google_cloud_visionai_v1_BatchRunProcessRequest_descriptor = + getDescriptor().getMessageTypes().get(18); + internal_static_google_cloud_visionai_v1_BatchRunProcessRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_visionai_v1_BatchRunProcessRequest_descriptor, + new java.lang.String[] { + "Parent", "Requests", "Options", "BatchId", + }); + internal_static_google_cloud_visionai_v1_BatchRunProcessRequest_BatchRunProcessOptions_descriptor = + internal_static_google_cloud_visionai_v1_BatchRunProcessRequest_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_visionai_v1_BatchRunProcessRequest_BatchRunProcessOptions_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_visionai_v1_BatchRunProcessRequest_BatchRunProcessOptions_descriptor, + new java.lang.String[] { + "RetryCount", "BatchSize", + }); + internal_static_google_cloud_visionai_v1_BatchRunProcessResponse_descriptor = + getDescriptor().getMessageTypes().get(19); + internal_static_google_cloud_visionai_v1_BatchRunProcessResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_visionai_v1_BatchRunProcessResponse_descriptor, + new java.lang.String[] { + "BatchId", "Processes", + }); + internal_static_google_cloud_visionai_v1_ResolveOperatorInfoRequest_descriptor = + getDescriptor().getMessageTypes().get(20); + internal_static_google_cloud_visionai_v1_ResolveOperatorInfoRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_visionai_v1_ResolveOperatorInfoRequest_descriptor, + new java.lang.String[] { + "Parent", "Queries", + }); + internal_static_google_cloud_visionai_v1_OperatorQuery_descriptor = + getDescriptor().getMessageTypes().get(21); + internal_static_google_cloud_visionai_v1_OperatorQuery_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_visionai_v1_OperatorQuery_descriptor, + new java.lang.String[] { + "Operator", "Tag", "Registry", + }); + internal_static_google_cloud_visionai_v1_ResolveOperatorInfoResponse_descriptor = + getDescriptor().getMessageTypes().get(22); + internal_static_google_cloud_visionai_v1_ResolveOperatorInfoResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_visionai_v1_ResolveOperatorInfoResponse_descriptor, + new java.lang.String[] { + "Operators", + }); + internal_static_google_cloud_visionai_v1_ListPublicOperatorsRequest_descriptor = + getDescriptor().getMessageTypes().get(23); + internal_static_google_cloud_visionai_v1_ListPublicOperatorsRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_visionai_v1_ListPublicOperatorsRequest_descriptor, + new java.lang.String[] { + "Parent", "PageSize", "PageToken", "Filter", "OrderBy", + }); + internal_static_google_cloud_visionai_v1_ListPublicOperatorsResponse_descriptor = + getDescriptor().getMessageTypes().get(24); + internal_static_google_cloud_visionai_v1_ListPublicOperatorsResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_visionai_v1_ListPublicOperatorsResponse_descriptor, + new java.lang.String[] { + "Operators", "NextPageToken", + }); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.ClientProto.defaultHost); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + registry.add(com.google.api.AnnotationsProto.http); + registry.add(com.google.api.ClientProto.methodSignature); + registry.add(com.google.api.ClientProto.oauthScopes); + registry.add(com.google.api.ResourceProto.resourceReference); + registry.add(com.google.longrunning.OperationsProto.operationInfo); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + com.google.api.AnnotationsProto.getDescriptor(); + com.google.api.ClientProto.getDescriptor(); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.api.ResourceProto.getDescriptor(); + com.google.cloud.visionai.v1.CommonProto.getDescriptor(); + com.google.cloud.visionai.v1.LvaResourcesProto.getDescriptor(); + com.google.longrunning.OperationsProto.getDescriptor(); + com.google.protobuf.EmptyProto.getDescriptor(); + com.google.protobuf.FieldMaskProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/MachineSpec.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/MachineSpec.java new file mode 100644 index 000000000000..6a1ebf18150e --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/MachineSpec.java @@ -0,0 +1,964 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/platform.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * Specification of a single machine.
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.MachineSpec} + */ +public final class MachineSpec extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.MachineSpec) + MachineSpecOrBuilder { + private static final long serialVersionUID = 0L; + // Use MachineSpec.newBuilder() to construct. + private MachineSpec(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private MachineSpec() { + machineType_ = ""; + acceleratorType_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new MachineSpec(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_MachineSpec_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_MachineSpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.MachineSpec.class, + com.google.cloud.visionai.v1.MachineSpec.Builder.class); + } + + public static final int MACHINE_TYPE_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object machineType_ = ""; + /** + * + * + *
+   * Immutable. The type of the machine.
+   *
+   * See the [list of machine types supported for
+   * prediction](https://cloud.google.com/vertex-ai/docs/predictions/configure-compute#machine-types)
+   *
+   * See the [list of machine types supported for custom
+   * training](https://cloud.google.com/vertex-ai/docs/training/configure-compute#machine-types).
+   *
+   * For [DeployedModel][] this field is optional, and the default
+   * value is `n1-standard-2`. For [BatchPredictionJob][] or as part of
+   * [WorkerPoolSpec][] this field is required.
+   * 
+ * + * string machine_type = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The machineType. + */ + @java.lang.Override + public java.lang.String getMachineType() { + java.lang.Object ref = machineType_; + 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(); + machineType_ = s; + return s; + } + } + /** + * + * + *
+   * Immutable. The type of the machine.
+   *
+   * See the [list of machine types supported for
+   * prediction](https://cloud.google.com/vertex-ai/docs/predictions/configure-compute#machine-types)
+   *
+   * See the [list of machine types supported for custom
+   * training](https://cloud.google.com/vertex-ai/docs/training/configure-compute#machine-types).
+   *
+   * For [DeployedModel][] this field is optional, and the default
+   * value is `n1-standard-2`. For [BatchPredictionJob][] or as part of
+   * [WorkerPoolSpec][] this field is required.
+   * 
+ * + * string machine_type = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The bytes for machineType. + */ + @java.lang.Override + public com.google.protobuf.ByteString getMachineTypeBytes() { + java.lang.Object ref = machineType_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + machineType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ACCELERATOR_TYPE_FIELD_NUMBER = 2; + private int acceleratorType_ = 0; + /** + * + * + *
+   * Immutable. The type of accelerator(s) that may be attached to the machine
+   * as per
+   * [accelerator_count][google.cloud.visionai.v1.MachineSpec.accelerator_count].
+   * 
+ * + * + * .google.cloud.visionai.v1.AcceleratorType accelerator_type = 2 [(.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The enum numeric value on the wire for acceleratorType. + */ + @java.lang.Override + public int getAcceleratorTypeValue() { + return acceleratorType_; + } + /** + * + * + *
+   * Immutable. The type of accelerator(s) that may be attached to the machine
+   * as per
+   * [accelerator_count][google.cloud.visionai.v1.MachineSpec.accelerator_count].
+   * 
+ * + * + * .google.cloud.visionai.v1.AcceleratorType accelerator_type = 2 [(.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The acceleratorType. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.AcceleratorType getAcceleratorType() { + com.google.cloud.visionai.v1.AcceleratorType result = + com.google.cloud.visionai.v1.AcceleratorType.forNumber(acceleratorType_); + return result == null ? com.google.cloud.visionai.v1.AcceleratorType.UNRECOGNIZED : result; + } + + public static final int ACCELERATOR_COUNT_FIELD_NUMBER = 3; + private int acceleratorCount_ = 0; + /** + * + * + *
+   * The number of accelerators to attach to the machine.
+   * 
+ * + * int32 accelerator_count = 3; + * + * @return The acceleratorCount. + */ + @java.lang.Override + public int getAcceleratorCount() { + return acceleratorCount_; + } + + 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(machineType_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, machineType_); + } + if (acceleratorType_ + != com.google.cloud.visionai.v1.AcceleratorType.ACCELERATOR_TYPE_UNSPECIFIED.getNumber()) { + output.writeEnum(2, acceleratorType_); + } + if (acceleratorCount_ != 0) { + output.writeInt32(3, acceleratorCount_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(machineType_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, machineType_); + } + if (acceleratorType_ + != com.google.cloud.visionai.v1.AcceleratorType.ACCELERATOR_TYPE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, acceleratorType_); + } + if (acceleratorCount_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(3, acceleratorCount_); + } + size += getUnknownFields().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.visionai.v1.MachineSpec)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.MachineSpec other = (com.google.cloud.visionai.v1.MachineSpec) obj; + + if (!getMachineType().equals(other.getMachineType())) return false; + if (acceleratorType_ != other.acceleratorType_) return false; + if (getAcceleratorCount() != other.getAcceleratorCount()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + MACHINE_TYPE_FIELD_NUMBER; + hash = (53 * hash) + getMachineType().hashCode(); + hash = (37 * hash) + ACCELERATOR_TYPE_FIELD_NUMBER; + hash = (53 * hash) + acceleratorType_; + hash = (37 * hash) + ACCELERATOR_COUNT_FIELD_NUMBER; + hash = (53 * hash) + getAcceleratorCount(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.MachineSpec parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.MachineSpec 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.visionai.v1.MachineSpec parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.MachineSpec 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.visionai.v1.MachineSpec parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.MachineSpec parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.MachineSpec parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.MachineSpec 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.visionai.v1.MachineSpec parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.MachineSpec 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.visionai.v1.MachineSpec parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.MachineSpec 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.visionai.v1.MachineSpec 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; + } + /** + * + * + *
+   * Specification of a single machine.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.MachineSpec} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.MachineSpec) + com.google.cloud.visionai.v1.MachineSpecOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_MachineSpec_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_MachineSpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.MachineSpec.class, + com.google.cloud.visionai.v1.MachineSpec.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.MachineSpec.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + machineType_ = ""; + acceleratorType_ = 0; + acceleratorCount_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_MachineSpec_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.MachineSpec getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.MachineSpec.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.MachineSpec build() { + com.google.cloud.visionai.v1.MachineSpec result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.MachineSpec buildPartial() { + com.google.cloud.visionai.v1.MachineSpec result = + new com.google.cloud.visionai.v1.MachineSpec(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.visionai.v1.MachineSpec result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.machineType_ = machineType_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.acceleratorType_ = acceleratorType_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.acceleratorCount_ = acceleratorCount_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.MachineSpec) { + return mergeFrom((com.google.cloud.visionai.v1.MachineSpec) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.MachineSpec other) { + if (other == com.google.cloud.visionai.v1.MachineSpec.getDefaultInstance()) return this; + if (!other.getMachineType().isEmpty()) { + machineType_ = other.machineType_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.acceleratorType_ != 0) { + setAcceleratorTypeValue(other.getAcceleratorTypeValue()); + } + if (other.getAcceleratorCount() != 0) { + setAcceleratorCount(other.getAcceleratorCount()); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + machineType_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + acceleratorType_ = input.readEnum(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 24: + { + acceleratorCount_ = input.readInt32(); + bitField0_ |= 0x00000004; + break; + } // case 24 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object machineType_ = ""; + /** + * + * + *
+     * Immutable. The type of the machine.
+     *
+     * See the [list of machine types supported for
+     * prediction](https://cloud.google.com/vertex-ai/docs/predictions/configure-compute#machine-types)
+     *
+     * See the [list of machine types supported for custom
+     * training](https://cloud.google.com/vertex-ai/docs/training/configure-compute#machine-types).
+     *
+     * For [DeployedModel][] this field is optional, and the default
+     * value is `n1-standard-2`. For [BatchPredictionJob][] or as part of
+     * [WorkerPoolSpec][] this field is required.
+     * 
+ * + * string machine_type = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The machineType. + */ + public java.lang.String getMachineType() { + java.lang.Object ref = machineType_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + machineType_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Immutable. The type of the machine.
+     *
+     * See the [list of machine types supported for
+     * prediction](https://cloud.google.com/vertex-ai/docs/predictions/configure-compute#machine-types)
+     *
+     * See the [list of machine types supported for custom
+     * training](https://cloud.google.com/vertex-ai/docs/training/configure-compute#machine-types).
+     *
+     * For [DeployedModel][] this field is optional, and the default
+     * value is `n1-standard-2`. For [BatchPredictionJob][] or as part of
+     * [WorkerPoolSpec][] this field is required.
+     * 
+ * + * string machine_type = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The bytes for machineType. + */ + public com.google.protobuf.ByteString getMachineTypeBytes() { + java.lang.Object ref = machineType_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + machineType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Immutable. The type of the machine.
+     *
+     * See the [list of machine types supported for
+     * prediction](https://cloud.google.com/vertex-ai/docs/predictions/configure-compute#machine-types)
+     *
+     * See the [list of machine types supported for custom
+     * training](https://cloud.google.com/vertex-ai/docs/training/configure-compute#machine-types).
+     *
+     * For [DeployedModel][] this field is optional, and the default
+     * value is `n1-standard-2`. For [BatchPredictionJob][] or as part of
+     * [WorkerPoolSpec][] this field is required.
+     * 
+ * + * string machine_type = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @param value The machineType to set. + * @return This builder for chaining. + */ + public Builder setMachineType(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + machineType_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Immutable. The type of the machine.
+     *
+     * See the [list of machine types supported for
+     * prediction](https://cloud.google.com/vertex-ai/docs/predictions/configure-compute#machine-types)
+     *
+     * See the [list of machine types supported for custom
+     * training](https://cloud.google.com/vertex-ai/docs/training/configure-compute#machine-types).
+     *
+     * For [DeployedModel][] this field is optional, and the default
+     * value is `n1-standard-2`. For [BatchPredictionJob][] or as part of
+     * [WorkerPoolSpec][] this field is required.
+     * 
+ * + * string machine_type = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return This builder for chaining. + */ + public Builder clearMachineType() { + machineType_ = getDefaultInstance().getMachineType(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Immutable. The type of the machine.
+     *
+     * See the [list of machine types supported for
+     * prediction](https://cloud.google.com/vertex-ai/docs/predictions/configure-compute#machine-types)
+     *
+     * See the [list of machine types supported for custom
+     * training](https://cloud.google.com/vertex-ai/docs/training/configure-compute#machine-types).
+     *
+     * For [DeployedModel][] this field is optional, and the default
+     * value is `n1-standard-2`. For [BatchPredictionJob][] or as part of
+     * [WorkerPoolSpec][] this field is required.
+     * 
+ * + * string machine_type = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @param value The bytes for machineType to set. + * @return This builder for chaining. + */ + public Builder setMachineTypeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + machineType_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private int acceleratorType_ = 0; + /** + * + * + *
+     * Immutable. The type of accelerator(s) that may be attached to the machine
+     * as per
+     * [accelerator_count][google.cloud.visionai.v1.MachineSpec.accelerator_count].
+     * 
+ * + * + * .google.cloud.visionai.v1.AcceleratorType accelerator_type = 2 [(.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The enum numeric value on the wire for acceleratorType. + */ + @java.lang.Override + public int getAcceleratorTypeValue() { + return acceleratorType_; + } + /** + * + * + *
+     * Immutable. The type of accelerator(s) that may be attached to the machine
+     * as per
+     * [accelerator_count][google.cloud.visionai.v1.MachineSpec.accelerator_count].
+     * 
+ * + * + * .google.cloud.visionai.v1.AcceleratorType accelerator_type = 2 [(.google.api.field_behavior) = IMMUTABLE]; + * + * + * @param value The enum numeric value on the wire for acceleratorType to set. + * @return This builder for chaining. + */ + public Builder setAcceleratorTypeValue(int value) { + acceleratorType_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Immutable. The type of accelerator(s) that may be attached to the machine
+     * as per
+     * [accelerator_count][google.cloud.visionai.v1.MachineSpec.accelerator_count].
+     * 
+ * + * + * .google.cloud.visionai.v1.AcceleratorType accelerator_type = 2 [(.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The acceleratorType. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.AcceleratorType getAcceleratorType() { + com.google.cloud.visionai.v1.AcceleratorType result = + com.google.cloud.visionai.v1.AcceleratorType.forNumber(acceleratorType_); + return result == null ? com.google.cloud.visionai.v1.AcceleratorType.UNRECOGNIZED : result; + } + /** + * + * + *
+     * Immutable. The type of accelerator(s) that may be attached to the machine
+     * as per
+     * [accelerator_count][google.cloud.visionai.v1.MachineSpec.accelerator_count].
+     * 
+ * + * + * .google.cloud.visionai.v1.AcceleratorType accelerator_type = 2 [(.google.api.field_behavior) = IMMUTABLE]; + * + * + * @param value The acceleratorType to set. + * @return This builder for chaining. + */ + public Builder setAcceleratorType(com.google.cloud.visionai.v1.AcceleratorType value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + acceleratorType_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Immutable. The type of accelerator(s) that may be attached to the machine
+     * as per
+     * [accelerator_count][google.cloud.visionai.v1.MachineSpec.accelerator_count].
+     * 
+ * + * + * .google.cloud.visionai.v1.AcceleratorType accelerator_type = 2 [(.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return This builder for chaining. + */ + public Builder clearAcceleratorType() { + bitField0_ = (bitField0_ & ~0x00000002); + acceleratorType_ = 0; + onChanged(); + return this; + } + + private int acceleratorCount_; + /** + * + * + *
+     * The number of accelerators to attach to the machine.
+     * 
+ * + * int32 accelerator_count = 3; + * + * @return The acceleratorCount. + */ + @java.lang.Override + public int getAcceleratorCount() { + return acceleratorCount_; + } + /** + * + * + *
+     * The number of accelerators to attach to the machine.
+     * 
+ * + * int32 accelerator_count = 3; + * + * @param value The acceleratorCount to set. + * @return This builder for chaining. + */ + public Builder setAcceleratorCount(int value) { + + acceleratorCount_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * The number of accelerators to attach to the machine.
+     * 
+ * + * int32 accelerator_count = 3; + * + * @return This builder for chaining. + */ + public Builder clearAcceleratorCount() { + bitField0_ = (bitField0_ & ~0x00000004); + acceleratorCount_ = 0; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.MachineSpec) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.MachineSpec) + private static final com.google.cloud.visionai.v1.MachineSpec DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.MachineSpec(); + } + + public static com.google.cloud.visionai.v1.MachineSpec getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public MachineSpec parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.MachineSpec getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/MachineSpecOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/MachineSpecOrBuilder.java new file mode 100644 index 000000000000..fa3c0926b85d --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/MachineSpecOrBuilder.java @@ -0,0 +1,117 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/platform.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface MachineSpecOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.MachineSpec) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Immutable. The type of the machine.
+   *
+   * See the [list of machine types supported for
+   * prediction](https://cloud.google.com/vertex-ai/docs/predictions/configure-compute#machine-types)
+   *
+   * See the [list of machine types supported for custom
+   * training](https://cloud.google.com/vertex-ai/docs/training/configure-compute#machine-types).
+   *
+   * For [DeployedModel][] this field is optional, and the default
+   * value is `n1-standard-2`. For [BatchPredictionJob][] or as part of
+   * [WorkerPoolSpec][] this field is required.
+   * 
+ * + * string machine_type = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The machineType. + */ + java.lang.String getMachineType(); + /** + * + * + *
+   * Immutable. The type of the machine.
+   *
+   * See the [list of machine types supported for
+   * prediction](https://cloud.google.com/vertex-ai/docs/predictions/configure-compute#machine-types)
+   *
+   * See the [list of machine types supported for custom
+   * training](https://cloud.google.com/vertex-ai/docs/training/configure-compute#machine-types).
+   *
+   * For [DeployedModel][] this field is optional, and the default
+   * value is `n1-standard-2`. For [BatchPredictionJob][] or as part of
+   * [WorkerPoolSpec][] this field is required.
+   * 
+ * + * string machine_type = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The bytes for machineType. + */ + com.google.protobuf.ByteString getMachineTypeBytes(); + + /** + * + * + *
+   * Immutable. The type of accelerator(s) that may be attached to the machine
+   * as per
+   * [accelerator_count][google.cloud.visionai.v1.MachineSpec.accelerator_count].
+   * 
+ * + * + * .google.cloud.visionai.v1.AcceleratorType accelerator_type = 2 [(.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The enum numeric value on the wire for acceleratorType. + */ + int getAcceleratorTypeValue(); + /** + * + * + *
+   * Immutable. The type of accelerator(s) that may be attached to the machine
+   * as per
+   * [accelerator_count][google.cloud.visionai.v1.MachineSpec.accelerator_count].
+   * 
+ * + * + * .google.cloud.visionai.v1.AcceleratorType accelerator_type = 2 [(.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The acceleratorType. + */ + com.google.cloud.visionai.v1.AcceleratorType getAcceleratorType(); + + /** + * + * + *
+   * The number of accelerators to attach to the machine.
+   * 
+ * + * int32 accelerator_count = 3; + * + * @return The acceleratorCount. + */ + int getAcceleratorCount(); +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/MaterializeChannelRequest.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/MaterializeChannelRequest.java new file mode 100644 index 000000000000..1ccdb001c82c --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/MaterializeChannelRequest.java @@ -0,0 +1,1384 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/streams_service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * Message for materializing a channel.
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.MaterializeChannelRequest} + */ +public final class MaterializeChannelRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.MaterializeChannelRequest) + MaterializeChannelRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use MaterializeChannelRequest.newBuilder() to construct. + private MaterializeChannelRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private MaterializeChannelRequest() { + parent_ = ""; + channelId_ = ""; + requestId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new MaterializeChannelRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.StreamsServiceProto + .internal_static_google_cloud_visionai_v1_MaterializeChannelRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.StreamsServiceProto + .internal_static_google_cloud_visionai_v1_MaterializeChannelRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.MaterializeChannelRequest.class, + com.google.cloud.visionai.v1.MaterializeChannelRequest.Builder.class); + } + + private int bitField0_; + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + /** + * + * + *
+   * Required. Value for parent.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + 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(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Value for parent.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CHANNEL_ID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object channelId_ = ""; + /** + * + * + *
+   * Required. Id of the channel.
+   * 
+ * + * string channel_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The channelId. + */ + @java.lang.Override + public java.lang.String getChannelId() { + java.lang.Object ref = channelId_; + 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(); + channelId_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Id of the channel.
+   * 
+ * + * string channel_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for channelId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getChannelIdBytes() { + java.lang.Object ref = channelId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + channelId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CHANNEL_FIELD_NUMBER = 3; + private com.google.cloud.visionai.v1.Channel channel_; + /** + * + * + *
+   * Required. The resource being created.
+   * 
+ * + * .google.cloud.visionai.v1.Channel channel = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the channel field is set. + */ + @java.lang.Override + public boolean hasChannel() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * Required. The resource being created.
+   * 
+ * + * .google.cloud.visionai.v1.Channel channel = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The channel. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.Channel getChannel() { + return channel_ == null ? com.google.cloud.visionai.v1.Channel.getDefaultInstance() : channel_; + } + /** + * + * + *
+   * Required. The resource being created.
+   * 
+ * + * .google.cloud.visionai.v1.Channel channel = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.visionai.v1.ChannelOrBuilder getChannelOrBuilder() { + return channel_ == null ? com.google.cloud.visionai.v1.Channel.getDefaultInstance() : channel_; + } + + public static final int REQUEST_ID_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object requestId_ = ""; + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request ID,
+   * the server can check if original operation with the same request ID was
+   * received, and if so, will ignore the second request. This prevents clients
+   * from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + @java.lang.Override + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + 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(); + requestId_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request ID,
+   * the server can check if original operation with the same request ID was
+   * received, and if so, will ignore the second request. This prevents clients
+   * from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(channelId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, channelId_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(3, getChannel()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, requestId_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(channelId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, channelId_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getChannel()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, requestId_); + } + size += getUnknownFields().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.visionai.v1.MaterializeChannelRequest)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.MaterializeChannelRequest other = + (com.google.cloud.visionai.v1.MaterializeChannelRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (!getChannelId().equals(other.getChannelId())) return false; + if (hasChannel() != other.hasChannel()) return false; + if (hasChannel()) { + if (!getChannel().equals(other.getChannel())) return false; + } + if (!getRequestId().equals(other.getRequestId())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + CHANNEL_ID_FIELD_NUMBER; + hash = (53 * hash) + getChannelId().hashCode(); + if (hasChannel()) { + hash = (37 * hash) + CHANNEL_FIELD_NUMBER; + hash = (53 * hash) + getChannel().hashCode(); + } + hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; + hash = (53 * hash) + getRequestId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.MaterializeChannelRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.MaterializeChannelRequest 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.visionai.v1.MaterializeChannelRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.MaterializeChannelRequest 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.visionai.v1.MaterializeChannelRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.MaterializeChannelRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.MaterializeChannelRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.MaterializeChannelRequest 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.visionai.v1.MaterializeChannelRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.MaterializeChannelRequest 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.visionai.v1.MaterializeChannelRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.MaterializeChannelRequest 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.visionai.v1.MaterializeChannelRequest 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; + } + /** + * + * + *
+   * Message for materializing a channel.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.MaterializeChannelRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.MaterializeChannelRequest) + com.google.cloud.visionai.v1.MaterializeChannelRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.StreamsServiceProto + .internal_static_google_cloud_visionai_v1_MaterializeChannelRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.StreamsServiceProto + .internal_static_google_cloud_visionai_v1_MaterializeChannelRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.MaterializeChannelRequest.class, + com.google.cloud.visionai.v1.MaterializeChannelRequest.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.MaterializeChannelRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getChannelFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + channelId_ = ""; + channel_ = null; + if (channelBuilder_ != null) { + channelBuilder_.dispose(); + channelBuilder_ = null; + } + requestId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.StreamsServiceProto + .internal_static_google_cloud_visionai_v1_MaterializeChannelRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.MaterializeChannelRequest getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.MaterializeChannelRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.MaterializeChannelRequest build() { + com.google.cloud.visionai.v1.MaterializeChannelRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.MaterializeChannelRequest buildPartial() { + com.google.cloud.visionai.v1.MaterializeChannelRequest result = + new com.google.cloud.visionai.v1.MaterializeChannelRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.visionai.v1.MaterializeChannelRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.channelId_ = channelId_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.channel_ = channelBuilder_ == null ? channel_ : channelBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.requestId_ = requestId_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.MaterializeChannelRequest) { + return mergeFrom((com.google.cloud.visionai.v1.MaterializeChannelRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.MaterializeChannelRequest other) { + if (other == com.google.cloud.visionai.v1.MaterializeChannelRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getChannelId().isEmpty()) { + channelId_ = other.channelId_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.hasChannel()) { + mergeChannel(other.getChannel()); + } + if (!other.getRequestId().isEmpty()) { + requestId_ = other.requestId_; + bitField0_ |= 0x00000008; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + channelId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage(getChannelFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. Value for parent.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Value for parent.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Value for parent.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Value for parent.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Value for parent.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object channelId_ = ""; + /** + * + * + *
+     * Required. Id of the channel.
+     * 
+ * + * string channel_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The channelId. + */ + public java.lang.String getChannelId() { + java.lang.Object ref = channelId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + channelId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Id of the channel.
+     * 
+ * + * string channel_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for channelId. + */ + public com.google.protobuf.ByteString getChannelIdBytes() { + java.lang.Object ref = channelId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + channelId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Id of the channel.
+     * 
+ * + * string channel_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The channelId to set. + * @return This builder for chaining. + */ + public Builder setChannelId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + channelId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Id of the channel.
+     * 
+ * + * string channel_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearChannelId() { + channelId_ = getDefaultInstance().getChannelId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Id of the channel.
+     * 
+ * + * string channel_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for channelId to set. + * @return This builder for chaining. + */ + public Builder setChannelIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + channelId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.cloud.visionai.v1.Channel channel_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.Channel, + com.google.cloud.visionai.v1.Channel.Builder, + com.google.cloud.visionai.v1.ChannelOrBuilder> + channelBuilder_; + /** + * + * + *
+     * Required. The resource being created.
+     * 
+ * + * + * .google.cloud.visionai.v1.Channel channel = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the channel field is set. + */ + public boolean hasChannel() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+     * Required. The resource being created.
+     * 
+ * + * + * .google.cloud.visionai.v1.Channel channel = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The channel. + */ + public com.google.cloud.visionai.v1.Channel getChannel() { + if (channelBuilder_ == null) { + return channel_ == null + ? com.google.cloud.visionai.v1.Channel.getDefaultInstance() + : channel_; + } else { + return channelBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The resource being created.
+     * 
+ * + * + * .google.cloud.visionai.v1.Channel channel = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setChannel(com.google.cloud.visionai.v1.Channel value) { + if (channelBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + channel_ = value; + } else { + channelBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource being created.
+     * 
+ * + * + * .google.cloud.visionai.v1.Channel channel = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setChannel(com.google.cloud.visionai.v1.Channel.Builder builderForValue) { + if (channelBuilder_ == null) { + channel_ = builderForValue.build(); + } else { + channelBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource being created.
+     * 
+ * + * + * .google.cloud.visionai.v1.Channel channel = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeChannel(com.google.cloud.visionai.v1.Channel value) { + if (channelBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && channel_ != null + && channel_ != com.google.cloud.visionai.v1.Channel.getDefaultInstance()) { + getChannelBuilder().mergeFrom(value); + } else { + channel_ = value; + } + } else { + channelBuilder_.mergeFrom(value); + } + if (channel_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Required. The resource being created.
+     * 
+ * + * + * .google.cloud.visionai.v1.Channel channel = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearChannel() { + bitField0_ = (bitField0_ & ~0x00000004); + channel_ = null; + if (channelBuilder_ != null) { + channelBuilder_.dispose(); + channelBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource being created.
+     * 
+ * + * + * .google.cloud.visionai.v1.Channel channel = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.visionai.v1.Channel.Builder getChannelBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getChannelFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The resource being created.
+     * 
+ * + * + * .google.cloud.visionai.v1.Channel channel = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.visionai.v1.ChannelOrBuilder getChannelOrBuilder() { + if (channelBuilder_ != null) { + return channelBuilder_.getMessageOrBuilder(); + } else { + return channel_ == null + ? com.google.cloud.visionai.v1.Channel.getDefaultInstance() + : channel_; + } + } + /** + * + * + *
+     * Required. The resource being created.
+     * 
+ * + * + * .google.cloud.visionai.v1.Channel channel = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.Channel, + com.google.cloud.visionai.v1.Channel.Builder, + com.google.cloud.visionai.v1.ChannelOrBuilder> + getChannelFieldBuilder() { + if (channelBuilder_ == null) { + channelBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.Channel, + com.google.cloud.visionai.v1.Channel.Builder, + com.google.cloud.visionai.v1.ChannelOrBuilder>( + getChannel(), getParentForChildren(), isClean()); + channel_ = null; + } + return channelBuilder_; + } + + private java.lang.Object requestId_ = ""; + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request ID,
+     * the server can check if original operation with the same request ID was
+     * received, and if so, will ignore the second request. This prevents clients
+     * from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request ID,
+     * the server can check if original operation with the same request ID was
+     * received, and if so, will ignore the second request. This prevents clients
+     * from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request ID,
+     * the server can check if original operation with the same request ID was
+     * received, and if so, will ignore the second request. This prevents clients
+     * from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + requestId_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request ID,
+     * the server can check if original operation with the same request ID was
+     * received, and if so, will ignore the second request. This prevents clients
+     * from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearRequestId() { + requestId_ = getDefaultInstance().getRequestId(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request ID,
+     * the server can check if original operation with the same request ID was
+     * received, and if so, will ignore the second request. This prevents clients
+     * from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + requestId_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.MaterializeChannelRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.MaterializeChannelRequest) + private static final com.google.cloud.visionai.v1.MaterializeChannelRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.MaterializeChannelRequest(); + } + + public static com.google.cloud.visionai.v1.MaterializeChannelRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public MaterializeChannelRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.MaterializeChannelRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/MaterializeChannelRequestOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/MaterializeChannelRequestOrBuilder.java new file mode 100644 index 000000000000..c9fb0fc58a6d --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/MaterializeChannelRequestOrBuilder.java @@ -0,0 +1,167 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/streams_service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface MaterializeChannelRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.MaterializeChannelRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Value for parent.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. Value for parent.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Required. Id of the channel.
+   * 
+ * + * string channel_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The channelId. + */ + java.lang.String getChannelId(); + /** + * + * + *
+   * Required. Id of the channel.
+   * 
+ * + * string channel_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for channelId. + */ + com.google.protobuf.ByteString getChannelIdBytes(); + + /** + * + * + *
+   * Required. The resource being created.
+   * 
+ * + * .google.cloud.visionai.v1.Channel channel = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the channel field is set. + */ + boolean hasChannel(); + /** + * + * + *
+   * Required. The resource being created.
+   * 
+ * + * .google.cloud.visionai.v1.Channel channel = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The channel. + */ + com.google.cloud.visionai.v1.Channel getChannel(); + /** + * + * + *
+   * Required. The resource being created.
+   * 
+ * + * .google.cloud.visionai.v1.Channel channel = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.visionai.v1.ChannelOrBuilder getChannelOrBuilder(); + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request ID,
+   * the server can check if original operation with the same request ID was
+   * received, and if so, will ignore the second request. This prevents clients
+   * from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + java.lang.String getRequestId(); + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request ID,
+   * the server can check if original operation with the same request ID was
+   * received, and if so, will ignore the second request. This prevents clients
+   * from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + com.google.protobuf.ByteString getRequestIdBytes(); +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/MediaWarehouseConfig.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/MediaWarehouseConfig.java new file mode 100644 index 000000000000..b8ce798c8af8 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/MediaWarehouseConfig.java @@ -0,0 +1,1124 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/platform.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * Message describing MediaWarehouseConfig.
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.MediaWarehouseConfig} + */ +public final class MediaWarehouseConfig extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.MediaWarehouseConfig) + MediaWarehouseConfigOrBuilder { + private static final long serialVersionUID = 0L; + // Use MediaWarehouseConfig.newBuilder() to construct. + private MediaWarehouseConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private MediaWarehouseConfig() { + corpus_ = ""; + region_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new MediaWarehouseConfig(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_MediaWarehouseConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_MediaWarehouseConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.MediaWarehouseConfig.class, + com.google.cloud.visionai.v1.MediaWarehouseConfig.Builder.class); + } + + private int bitField0_; + public static final int CORPUS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object corpus_ = ""; + /** + * + * + *
+   * Resource name of the Media Warehouse corpus.
+   * Format:
+   * projects/${project_id}/locations/${location_id}/corpora/${corpus_id}
+   * 
+ * + * string corpus = 1; + * + * @return The corpus. + */ + @java.lang.Override + public java.lang.String getCorpus() { + java.lang.Object ref = corpus_; + 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(); + corpus_ = s; + return s; + } + } + /** + * + * + *
+   * Resource name of the Media Warehouse corpus.
+   * Format:
+   * projects/${project_id}/locations/${location_id}/corpora/${corpus_id}
+   * 
+ * + * string corpus = 1; + * + * @return The bytes for corpus. + */ + @java.lang.Override + public com.google.protobuf.ByteString getCorpusBytes() { + java.lang.Object ref = corpus_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + corpus_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int REGION_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object region_ = ""; + /** + * + * + *
+   * Deprecated.
+   * 
+ * + * string region = 2 [deprecated = true]; + * + * @deprecated google.cloud.visionai.v1.MediaWarehouseConfig.region is deprecated. See + * google/cloud/visionai/v1/platform.proto;l=2056 + * @return The region. + */ + @java.lang.Override + @java.lang.Deprecated + public java.lang.String getRegion() { + java.lang.Object ref = region_; + 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(); + region_ = s; + return s; + } + } + /** + * + * + *
+   * Deprecated.
+   * 
+ * + * string region = 2 [deprecated = true]; + * + * @deprecated google.cloud.visionai.v1.MediaWarehouseConfig.region is deprecated. See + * google/cloud/visionai/v1/platform.proto;l=2056 + * @return The bytes for region. + */ + @java.lang.Override + @java.lang.Deprecated + public com.google.protobuf.ByteString getRegionBytes() { + java.lang.Object ref = region_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + region_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TTL_FIELD_NUMBER = 3; + private com.google.protobuf.Duration ttl_; + /** + * + * + *
+   * The duration for which all media assets, associated metadata, and search
+   * documents can exist.
+   * 
+ * + * .google.protobuf.Duration ttl = 3; + * + * @return Whether the ttl field is set. + */ + @java.lang.Override + public boolean hasTtl() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * The duration for which all media assets, associated metadata, and search
+   * documents can exist.
+   * 
+ * + * .google.protobuf.Duration ttl = 3; + * + * @return The ttl. + */ + @java.lang.Override + public com.google.protobuf.Duration getTtl() { + return ttl_ == null ? com.google.protobuf.Duration.getDefaultInstance() : ttl_; + } + /** + * + * + *
+   * The duration for which all media assets, associated metadata, and search
+   * documents can exist.
+   * 
+ * + * .google.protobuf.Duration ttl = 3; + */ + @java.lang.Override + public com.google.protobuf.DurationOrBuilder getTtlOrBuilder() { + return ttl_ == null ? com.google.protobuf.Duration.getDefaultInstance() : ttl_; + } + + 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(corpus_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, corpus_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(region_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, region_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(3, getTtl()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(corpus_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, corpus_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(region_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, region_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getTtl()); + } + size += getUnknownFields().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.visionai.v1.MediaWarehouseConfig)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.MediaWarehouseConfig other = + (com.google.cloud.visionai.v1.MediaWarehouseConfig) obj; + + if (!getCorpus().equals(other.getCorpus())) return false; + if (!getRegion().equals(other.getRegion())) return false; + if (hasTtl() != other.hasTtl()) return false; + if (hasTtl()) { + if (!getTtl().equals(other.getTtl())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + CORPUS_FIELD_NUMBER; + hash = (53 * hash) + getCorpus().hashCode(); + hash = (37 * hash) + REGION_FIELD_NUMBER; + hash = (53 * hash) + getRegion().hashCode(); + if (hasTtl()) { + hash = (37 * hash) + TTL_FIELD_NUMBER; + hash = (53 * hash) + getTtl().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.MediaWarehouseConfig parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.MediaWarehouseConfig 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.visionai.v1.MediaWarehouseConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.MediaWarehouseConfig 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.visionai.v1.MediaWarehouseConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.MediaWarehouseConfig parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.MediaWarehouseConfig parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.MediaWarehouseConfig 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.visionai.v1.MediaWarehouseConfig parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.MediaWarehouseConfig 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.visionai.v1.MediaWarehouseConfig parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.MediaWarehouseConfig 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.visionai.v1.MediaWarehouseConfig 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; + } + /** + * + * + *
+   * Message describing MediaWarehouseConfig.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.MediaWarehouseConfig} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.MediaWarehouseConfig) + com.google.cloud.visionai.v1.MediaWarehouseConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_MediaWarehouseConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_MediaWarehouseConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.MediaWarehouseConfig.class, + com.google.cloud.visionai.v1.MediaWarehouseConfig.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.MediaWarehouseConfig.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getTtlFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + corpus_ = ""; + region_ = ""; + ttl_ = null; + if (ttlBuilder_ != null) { + ttlBuilder_.dispose(); + ttlBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_MediaWarehouseConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.MediaWarehouseConfig getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.MediaWarehouseConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.MediaWarehouseConfig build() { + com.google.cloud.visionai.v1.MediaWarehouseConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.MediaWarehouseConfig buildPartial() { + com.google.cloud.visionai.v1.MediaWarehouseConfig result = + new com.google.cloud.visionai.v1.MediaWarehouseConfig(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.visionai.v1.MediaWarehouseConfig result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.corpus_ = corpus_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.region_ = region_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.ttl_ = ttlBuilder_ == null ? ttl_ : ttlBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.MediaWarehouseConfig) { + return mergeFrom((com.google.cloud.visionai.v1.MediaWarehouseConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.MediaWarehouseConfig other) { + if (other == com.google.cloud.visionai.v1.MediaWarehouseConfig.getDefaultInstance()) + return this; + if (!other.getCorpus().isEmpty()) { + corpus_ = other.corpus_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getRegion().isEmpty()) { + region_ = other.region_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.hasTtl()) { + mergeTtl(other.getTtl()); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + corpus_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + region_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage(getTtlFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object corpus_ = ""; + /** + * + * + *
+     * Resource name of the Media Warehouse corpus.
+     * Format:
+     * projects/${project_id}/locations/${location_id}/corpora/${corpus_id}
+     * 
+ * + * string corpus = 1; + * + * @return The corpus. + */ + public java.lang.String getCorpus() { + java.lang.Object ref = corpus_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + corpus_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Resource name of the Media Warehouse corpus.
+     * Format:
+     * projects/${project_id}/locations/${location_id}/corpora/${corpus_id}
+     * 
+ * + * string corpus = 1; + * + * @return The bytes for corpus. + */ + public com.google.protobuf.ByteString getCorpusBytes() { + java.lang.Object ref = corpus_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + corpus_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Resource name of the Media Warehouse corpus.
+     * Format:
+     * projects/${project_id}/locations/${location_id}/corpora/${corpus_id}
+     * 
+ * + * string corpus = 1; + * + * @param value The corpus to set. + * @return This builder for chaining. + */ + public Builder setCorpus(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + corpus_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Resource name of the Media Warehouse corpus.
+     * Format:
+     * projects/${project_id}/locations/${location_id}/corpora/${corpus_id}
+     * 
+ * + * string corpus = 1; + * + * @return This builder for chaining. + */ + public Builder clearCorpus() { + corpus_ = getDefaultInstance().getCorpus(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Resource name of the Media Warehouse corpus.
+     * Format:
+     * projects/${project_id}/locations/${location_id}/corpora/${corpus_id}
+     * 
+ * + * string corpus = 1; + * + * @param value The bytes for corpus to set. + * @return This builder for chaining. + */ + public Builder setCorpusBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + corpus_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object region_ = ""; + /** + * + * + *
+     * Deprecated.
+     * 
+ * + * string region = 2 [deprecated = true]; + * + * @deprecated google.cloud.visionai.v1.MediaWarehouseConfig.region is deprecated. See + * google/cloud/visionai/v1/platform.proto;l=2056 + * @return The region. + */ + @java.lang.Deprecated + public java.lang.String getRegion() { + java.lang.Object ref = region_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + region_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Deprecated.
+     * 
+ * + * string region = 2 [deprecated = true]; + * + * @deprecated google.cloud.visionai.v1.MediaWarehouseConfig.region is deprecated. See + * google/cloud/visionai/v1/platform.proto;l=2056 + * @return The bytes for region. + */ + @java.lang.Deprecated + public com.google.protobuf.ByteString getRegionBytes() { + java.lang.Object ref = region_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + region_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Deprecated.
+     * 
+ * + * string region = 2 [deprecated = true]; + * + * @deprecated google.cloud.visionai.v1.MediaWarehouseConfig.region is deprecated. See + * google/cloud/visionai/v1/platform.proto;l=2056 + * @param value The region to set. + * @return This builder for chaining. + */ + @java.lang.Deprecated + public Builder setRegion(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + region_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Deprecated.
+     * 
+ * + * string region = 2 [deprecated = true]; + * + * @deprecated google.cloud.visionai.v1.MediaWarehouseConfig.region is deprecated. See + * google/cloud/visionai/v1/platform.proto;l=2056 + * @return This builder for chaining. + */ + @java.lang.Deprecated + public Builder clearRegion() { + region_ = getDefaultInstance().getRegion(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Deprecated.
+     * 
+ * + * string region = 2 [deprecated = true]; + * + * @deprecated google.cloud.visionai.v1.MediaWarehouseConfig.region is deprecated. See + * google/cloud/visionai/v1/platform.proto;l=2056 + * @param value The bytes for region to set. + * @return This builder for chaining. + */ + @java.lang.Deprecated + public Builder setRegionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + region_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.protobuf.Duration ttl_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + ttlBuilder_; + /** + * + * + *
+     * The duration for which all media assets, associated metadata, and search
+     * documents can exist.
+     * 
+ * + * .google.protobuf.Duration ttl = 3; + * + * @return Whether the ttl field is set. + */ + public boolean hasTtl() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+     * The duration for which all media assets, associated metadata, and search
+     * documents can exist.
+     * 
+ * + * .google.protobuf.Duration ttl = 3; + * + * @return The ttl. + */ + public com.google.protobuf.Duration getTtl() { + if (ttlBuilder_ == null) { + return ttl_ == null ? com.google.protobuf.Duration.getDefaultInstance() : ttl_; + } else { + return ttlBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The duration for which all media assets, associated metadata, and search
+     * documents can exist.
+     * 
+ * + * .google.protobuf.Duration ttl = 3; + */ + public Builder setTtl(com.google.protobuf.Duration value) { + if (ttlBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ttl_ = value; + } else { + ttlBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * The duration for which all media assets, associated metadata, and search
+     * documents can exist.
+     * 
+ * + * .google.protobuf.Duration ttl = 3; + */ + public Builder setTtl(com.google.protobuf.Duration.Builder builderForValue) { + if (ttlBuilder_ == null) { + ttl_ = builderForValue.build(); + } else { + ttlBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * The duration for which all media assets, associated metadata, and search
+     * documents can exist.
+     * 
+ * + * .google.protobuf.Duration ttl = 3; + */ + public Builder mergeTtl(com.google.protobuf.Duration value) { + if (ttlBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && ttl_ != null + && ttl_ != com.google.protobuf.Duration.getDefaultInstance()) { + getTtlBuilder().mergeFrom(value); + } else { + ttl_ = value; + } + } else { + ttlBuilder_.mergeFrom(value); + } + if (ttl_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + /** + * + * + *
+     * The duration for which all media assets, associated metadata, and search
+     * documents can exist.
+     * 
+ * + * .google.protobuf.Duration ttl = 3; + */ + public Builder clearTtl() { + bitField0_ = (bitField0_ & ~0x00000004); + ttl_ = null; + if (ttlBuilder_ != null) { + ttlBuilder_.dispose(); + ttlBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * The duration for which all media assets, associated metadata, and search
+     * documents can exist.
+     * 
+ * + * .google.protobuf.Duration ttl = 3; + */ + public com.google.protobuf.Duration.Builder getTtlBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getTtlFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The duration for which all media assets, associated metadata, and search
+     * documents can exist.
+     * 
+ * + * .google.protobuf.Duration ttl = 3; + */ + public com.google.protobuf.DurationOrBuilder getTtlOrBuilder() { + if (ttlBuilder_ != null) { + return ttlBuilder_.getMessageOrBuilder(); + } else { + return ttl_ == null ? com.google.protobuf.Duration.getDefaultInstance() : ttl_; + } + } + /** + * + * + *
+     * The duration for which all media assets, associated metadata, and search
+     * documents can exist.
+     * 
+ * + * .google.protobuf.Duration ttl = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + getTtlFieldBuilder() { + if (ttlBuilder_ == null) { + ttlBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder>(getTtl(), getParentForChildren(), isClean()); + ttl_ = null; + } + return ttlBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.MediaWarehouseConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.MediaWarehouseConfig) + private static final com.google.cloud.visionai.v1.MediaWarehouseConfig DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.MediaWarehouseConfig(); + } + + public static com.google.cloud.visionai.v1.MediaWarehouseConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public MediaWarehouseConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.MediaWarehouseConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/MediaWarehouseConfigOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/MediaWarehouseConfigOrBuilder.java new file mode 100644 index 000000000000..5963822a75cd --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/MediaWarehouseConfigOrBuilder.java @@ -0,0 +1,124 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/platform.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface MediaWarehouseConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.MediaWarehouseConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Resource name of the Media Warehouse corpus.
+   * Format:
+   * projects/${project_id}/locations/${location_id}/corpora/${corpus_id}
+   * 
+ * + * string corpus = 1; + * + * @return The corpus. + */ + java.lang.String getCorpus(); + /** + * + * + *
+   * Resource name of the Media Warehouse corpus.
+   * Format:
+   * projects/${project_id}/locations/${location_id}/corpora/${corpus_id}
+   * 
+ * + * string corpus = 1; + * + * @return The bytes for corpus. + */ + com.google.protobuf.ByteString getCorpusBytes(); + + /** + * + * + *
+   * Deprecated.
+   * 
+ * + * string region = 2 [deprecated = true]; + * + * @deprecated google.cloud.visionai.v1.MediaWarehouseConfig.region is deprecated. See + * google/cloud/visionai/v1/platform.proto;l=2056 + * @return The region. + */ + @java.lang.Deprecated + java.lang.String getRegion(); + /** + * + * + *
+   * Deprecated.
+   * 
+ * + * string region = 2 [deprecated = true]; + * + * @deprecated google.cloud.visionai.v1.MediaWarehouseConfig.region is deprecated. See + * google/cloud/visionai/v1/platform.proto;l=2056 + * @return The bytes for region. + */ + @java.lang.Deprecated + com.google.protobuf.ByteString getRegionBytes(); + + /** + * + * + *
+   * The duration for which all media assets, associated metadata, and search
+   * documents can exist.
+   * 
+ * + * .google.protobuf.Duration ttl = 3; + * + * @return Whether the ttl field is set. + */ + boolean hasTtl(); + /** + * + * + *
+   * The duration for which all media assets, associated metadata, and search
+   * documents can exist.
+   * 
+ * + * .google.protobuf.Duration ttl = 3; + * + * @return The ttl. + */ + com.google.protobuf.Duration getTtl(); + /** + * + * + *
+   * The duration for which all media assets, associated metadata, and search
+   * documents can exist.
+   * 
+ * + * .google.protobuf.Duration ttl = 3; + */ + com.google.protobuf.DurationOrBuilder getTtlOrBuilder(); +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ModelType.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ModelType.java new file mode 100644 index 000000000000..b5c40cc72926 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ModelType.java @@ -0,0 +1,375 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/platform.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * All the supported model types in Vision AI App Platform.
+ * 
+ * + * Protobuf enum {@code google.cloud.visionai.v1.ModelType} + */ +public enum ModelType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+   * Processor Type UNSPECIFIED.
+   * 
+ * + * MODEL_TYPE_UNSPECIFIED = 0; + */ + MODEL_TYPE_UNSPECIFIED(0), + /** + * + * + *
+   * Model Type Image Classification.
+   * 
+ * + * IMAGE_CLASSIFICATION = 1; + */ + IMAGE_CLASSIFICATION(1), + /** + * + * + *
+   * Model Type Object Detection.
+   * 
+ * + * OBJECT_DETECTION = 2; + */ + OBJECT_DETECTION(2), + /** + * + * + *
+   * Model Type Video Classification.
+   * 
+ * + * VIDEO_CLASSIFICATION = 3; + */ + VIDEO_CLASSIFICATION(3), + /** + * + * + *
+   * Model Type Object Tracking.
+   * 
+ * + * VIDEO_OBJECT_TRACKING = 4; + */ + VIDEO_OBJECT_TRACKING(4), + /** + * + * + *
+   * Model Type Action Recognition.
+   * 
+ * + * VIDEO_ACTION_RECOGNITION = 5; + */ + VIDEO_ACTION_RECOGNITION(5), + /** + * + * + *
+   * Model Type Occupancy Counting.
+   * 
+ * + * OCCUPANCY_COUNTING = 6; + */ + OCCUPANCY_COUNTING(6), + /** + * + * + *
+   * Model Type Person Blur.
+   * 
+ * + * PERSON_BLUR = 7; + */ + PERSON_BLUR(7), + /** + * + * + *
+   * Model Type Vertex Custom.
+   * 
+ * + * VERTEX_CUSTOM = 8; + */ + VERTEX_CUSTOM(8), + /** + * + * + *
+   * Model Type Product Recognizer.
+   * 
+ * + * PRODUCT_RECOGNIZER = 9; + */ + PRODUCT_RECOGNIZER(9), + /** + * + * + *
+   * Model Type Tag Recognizer.
+   * 
+ * + * TAG_RECOGNIZER = 10; + */ + TAG_RECOGNIZER(10), + /** + * + * + *
+   * Model Type SynthID.
+   * 
+ * + * SYNTH_ID = 15; + */ + SYNTH_ID(15), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+   * Processor Type UNSPECIFIED.
+   * 
+ * + * MODEL_TYPE_UNSPECIFIED = 0; + */ + public static final int MODEL_TYPE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+   * Model Type Image Classification.
+   * 
+ * + * IMAGE_CLASSIFICATION = 1; + */ + public static final int IMAGE_CLASSIFICATION_VALUE = 1; + /** + * + * + *
+   * Model Type Object Detection.
+   * 
+ * + * OBJECT_DETECTION = 2; + */ + public static final int OBJECT_DETECTION_VALUE = 2; + /** + * + * + *
+   * Model Type Video Classification.
+   * 
+ * + * VIDEO_CLASSIFICATION = 3; + */ + public static final int VIDEO_CLASSIFICATION_VALUE = 3; + /** + * + * + *
+   * Model Type Object Tracking.
+   * 
+ * + * VIDEO_OBJECT_TRACKING = 4; + */ + public static final int VIDEO_OBJECT_TRACKING_VALUE = 4; + /** + * + * + *
+   * Model Type Action Recognition.
+   * 
+ * + * VIDEO_ACTION_RECOGNITION = 5; + */ + public static final int VIDEO_ACTION_RECOGNITION_VALUE = 5; + /** + * + * + *
+   * Model Type Occupancy Counting.
+   * 
+ * + * OCCUPANCY_COUNTING = 6; + */ + public static final int OCCUPANCY_COUNTING_VALUE = 6; + /** + * + * + *
+   * Model Type Person Blur.
+   * 
+ * + * PERSON_BLUR = 7; + */ + public static final int PERSON_BLUR_VALUE = 7; + /** + * + * + *
+   * Model Type Vertex Custom.
+   * 
+ * + * VERTEX_CUSTOM = 8; + */ + public static final int VERTEX_CUSTOM_VALUE = 8; + /** + * + * + *
+   * Model Type Product Recognizer.
+   * 
+ * + * PRODUCT_RECOGNIZER = 9; + */ + public static final int PRODUCT_RECOGNIZER_VALUE = 9; + /** + * + * + *
+   * Model Type Tag Recognizer.
+   * 
+ * + * TAG_RECOGNIZER = 10; + */ + public static final int TAG_RECOGNIZER_VALUE = 10; + /** + * + * + *
+   * Model Type SynthID.
+   * 
+ * + * SYNTH_ID = 15; + */ + public static final int SYNTH_ID_VALUE = 15; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static ModelType valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static ModelType forNumber(int value) { + switch (value) { + case 0: + return MODEL_TYPE_UNSPECIFIED; + case 1: + return IMAGE_CLASSIFICATION; + case 2: + return OBJECT_DETECTION; + case 3: + return VIDEO_CLASSIFICATION; + case 4: + return VIDEO_OBJECT_TRACKING; + case 5: + return VIDEO_ACTION_RECOGNITION; + case 6: + return OCCUPANCY_COUNTING; + case 7: + return PERSON_BLUR; + case 8: + return VERTEX_CUSTOM; + case 9: + return PRODUCT_RECOGNIZER; + case 10: + return TAG_RECOGNIZER; + case 15: + return SYNTH_ID; + 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 ModelType findValueByNumber(int number) { + return ModelType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + 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.visionai.v1.PlatformProto.getDescriptor().getEnumTypes().get(0); + } + + private static final ModelType[] VALUES = values(); + + public static ModelType 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 ModelType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.visionai.v1.ModelType) +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/Node.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/Node.java new file mode 100644 index 000000000000..abfd23ba1771 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/Node.java @@ -0,0 +1,3189 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/platform.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * Message describing node object.
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.Node} + */ +public final class Node extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.Node) + NodeOrBuilder { + private static final long serialVersionUID = 0L; + // Use Node.newBuilder() to construct. + private Node(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Node() { + name_ = ""; + displayName_ = ""; + processor_ = ""; + parents_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Node(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_Node_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_Node_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.Node.class, + com.google.cloud.visionai.v1.Node.Builder.class); + } + + public interface InputEdgeOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.Node.InputEdge) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * The name of the parent node.
+     * 
+ * + * string parent_node = 1; + * + * @return The parentNode. + */ + java.lang.String getParentNode(); + /** + * + * + *
+     * The name of the parent node.
+     * 
+ * + * string parent_node = 1; + * + * @return The bytes for parentNode. + */ + com.google.protobuf.ByteString getParentNodeBytes(); + + /** + * + * + *
+     * The connected output artifact of the parent node.
+     * It can be omitted if target processor only has 1 output artifact.
+     * 
+ * + * string parent_output_channel = 2; + * + * @return The parentOutputChannel. + */ + java.lang.String getParentOutputChannel(); + /** + * + * + *
+     * The connected output artifact of the parent node.
+     * It can be omitted if target processor only has 1 output artifact.
+     * 
+ * + * string parent_output_channel = 2; + * + * @return The bytes for parentOutputChannel. + */ + com.google.protobuf.ByteString getParentOutputChannelBytes(); + + /** + * + * + *
+     * The connected input channel of the current node's processor.
+     * It can be omitted if target processor only has 1 input channel.
+     * 
+ * + * string connected_input_channel = 3; + * + * @return The connectedInputChannel. + */ + java.lang.String getConnectedInputChannel(); + /** + * + * + *
+     * The connected input channel of the current node's processor.
+     * It can be omitted if target processor only has 1 input channel.
+     * 
+ * + * string connected_input_channel = 3; + * + * @return The bytes for connectedInputChannel. + */ + com.google.protobuf.ByteString getConnectedInputChannelBytes(); + } + /** + * + * + *
+   * Message describing one edge pointing into a node.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.Node.InputEdge} + */ + public static final class InputEdge extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.Node.InputEdge) + InputEdgeOrBuilder { + private static final long serialVersionUID = 0L; + // Use InputEdge.newBuilder() to construct. + private InputEdge(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private InputEdge() { + parentNode_ = ""; + parentOutputChannel_ = ""; + connectedInputChannel_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new InputEdge(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_Node_InputEdge_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_Node_InputEdge_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.Node.InputEdge.class, + com.google.cloud.visionai.v1.Node.InputEdge.Builder.class); + } + + public static final int PARENT_NODE_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parentNode_ = ""; + /** + * + * + *
+     * The name of the parent node.
+     * 
+ * + * string parent_node = 1; + * + * @return The parentNode. + */ + @java.lang.Override + public java.lang.String getParentNode() { + java.lang.Object ref = parentNode_; + 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(); + parentNode_ = s; + return s; + } + } + /** + * + * + *
+     * The name of the parent node.
+     * 
+ * + * string parent_node = 1; + * + * @return The bytes for parentNode. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentNodeBytes() { + java.lang.Object ref = parentNode_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parentNode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PARENT_OUTPUT_CHANNEL_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object parentOutputChannel_ = ""; + /** + * + * + *
+     * The connected output artifact of the parent node.
+     * It can be omitted if target processor only has 1 output artifact.
+     * 
+ * + * string parent_output_channel = 2; + * + * @return The parentOutputChannel. + */ + @java.lang.Override + public java.lang.String getParentOutputChannel() { + java.lang.Object ref = parentOutputChannel_; + 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(); + parentOutputChannel_ = s; + return s; + } + } + /** + * + * + *
+     * The connected output artifact of the parent node.
+     * It can be omitted if target processor only has 1 output artifact.
+     * 
+ * + * string parent_output_channel = 2; + * + * @return The bytes for parentOutputChannel. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentOutputChannelBytes() { + java.lang.Object ref = parentOutputChannel_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parentOutputChannel_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CONNECTED_INPUT_CHANNEL_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object connectedInputChannel_ = ""; + /** + * + * + *
+     * The connected input channel of the current node's processor.
+     * It can be omitted if target processor only has 1 input channel.
+     * 
+ * + * string connected_input_channel = 3; + * + * @return The connectedInputChannel. + */ + @java.lang.Override + public java.lang.String getConnectedInputChannel() { + java.lang.Object ref = connectedInputChannel_; + 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(); + connectedInputChannel_ = s; + return s; + } + } + /** + * + * + *
+     * The connected input channel of the current node's processor.
+     * It can be omitted if target processor only has 1 input channel.
+     * 
+ * + * string connected_input_channel = 3; + * + * @return The bytes for connectedInputChannel. + */ + @java.lang.Override + public com.google.protobuf.ByteString getConnectedInputChannelBytes() { + java.lang.Object ref = connectedInputChannel_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + connectedInputChannel_ = 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parentNode_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parentNode_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parentOutputChannel_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, parentOutputChannel_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(connectedInputChannel_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, connectedInputChannel_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parentNode_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parentNode_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parentOutputChannel_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, parentOutputChannel_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(connectedInputChannel_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, connectedInputChannel_); + } + size += getUnknownFields().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.visionai.v1.Node.InputEdge)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.Node.InputEdge other = + (com.google.cloud.visionai.v1.Node.InputEdge) obj; + + if (!getParentNode().equals(other.getParentNode())) return false; + if (!getParentOutputChannel().equals(other.getParentOutputChannel())) return false; + if (!getConnectedInputChannel().equals(other.getConnectedInputChannel())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_NODE_FIELD_NUMBER; + hash = (53 * hash) + getParentNode().hashCode(); + hash = (37 * hash) + PARENT_OUTPUT_CHANNEL_FIELD_NUMBER; + hash = (53 * hash) + getParentOutputChannel().hashCode(); + hash = (37 * hash) + CONNECTED_INPUT_CHANNEL_FIELD_NUMBER; + hash = (53 * hash) + getConnectedInputChannel().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.Node.InputEdge parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.Node.InputEdge 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.visionai.v1.Node.InputEdge parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.Node.InputEdge 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.visionai.v1.Node.InputEdge parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.Node.InputEdge parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.Node.InputEdge parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.Node.InputEdge 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.visionai.v1.Node.InputEdge parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.Node.InputEdge 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.visionai.v1.Node.InputEdge parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.Node.InputEdge 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.visionai.v1.Node.InputEdge 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; + } + /** + * + * + *
+     * Message describing one edge pointing into a node.
+     * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.Node.InputEdge} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.Node.InputEdge) + com.google.cloud.visionai.v1.Node.InputEdgeOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_Node_InputEdge_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_Node_InputEdge_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.Node.InputEdge.class, + com.google.cloud.visionai.v1.Node.InputEdge.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.Node.InputEdge.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parentNode_ = ""; + parentOutputChannel_ = ""; + connectedInputChannel_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_Node_InputEdge_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.Node.InputEdge getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.Node.InputEdge.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.Node.InputEdge build() { + com.google.cloud.visionai.v1.Node.InputEdge result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.Node.InputEdge buildPartial() { + com.google.cloud.visionai.v1.Node.InputEdge result = + new com.google.cloud.visionai.v1.Node.InputEdge(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.visionai.v1.Node.InputEdge result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parentNode_ = parentNode_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.parentOutputChannel_ = parentOutputChannel_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.connectedInputChannel_ = connectedInputChannel_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.Node.InputEdge) { + return mergeFrom((com.google.cloud.visionai.v1.Node.InputEdge) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.Node.InputEdge other) { + if (other == com.google.cloud.visionai.v1.Node.InputEdge.getDefaultInstance()) return this; + if (!other.getParentNode().isEmpty()) { + parentNode_ = other.parentNode_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getParentOutputChannel().isEmpty()) { + parentOutputChannel_ = other.parentOutputChannel_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getConnectedInputChannel().isEmpty()) { + connectedInputChannel_ = other.connectedInputChannel_; + bitField0_ |= 0x00000004; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parentNode_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + parentOutputChannel_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + connectedInputChannel_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object parentNode_ = ""; + /** + * + * + *
+       * The name of the parent node.
+       * 
+ * + * string parent_node = 1; + * + * @return The parentNode. + */ + public java.lang.String getParentNode() { + java.lang.Object ref = parentNode_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parentNode_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * The name of the parent node.
+       * 
+ * + * string parent_node = 1; + * + * @return The bytes for parentNode. + */ + public com.google.protobuf.ByteString getParentNodeBytes() { + java.lang.Object ref = parentNode_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parentNode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * The name of the parent node.
+       * 
+ * + * string parent_node = 1; + * + * @param value The parentNode to set. + * @return This builder for chaining. + */ + public Builder setParentNode(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + parentNode_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * The name of the parent node.
+       * 
+ * + * string parent_node = 1; + * + * @return This builder for chaining. + */ + public Builder clearParentNode() { + parentNode_ = getDefaultInstance().getParentNode(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+       * The name of the parent node.
+       * 
+ * + * string parent_node = 1; + * + * @param value The bytes for parentNode to set. + * @return This builder for chaining. + */ + public Builder setParentNodeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parentNode_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object parentOutputChannel_ = ""; + /** + * + * + *
+       * The connected output artifact of the parent node.
+       * It can be omitted if target processor only has 1 output artifact.
+       * 
+ * + * string parent_output_channel = 2; + * + * @return The parentOutputChannel. + */ + public java.lang.String getParentOutputChannel() { + java.lang.Object ref = parentOutputChannel_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parentOutputChannel_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * The connected output artifact of the parent node.
+       * It can be omitted if target processor only has 1 output artifact.
+       * 
+ * + * string parent_output_channel = 2; + * + * @return The bytes for parentOutputChannel. + */ + public com.google.protobuf.ByteString getParentOutputChannelBytes() { + java.lang.Object ref = parentOutputChannel_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parentOutputChannel_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * The connected output artifact of the parent node.
+       * It can be omitted if target processor only has 1 output artifact.
+       * 
+ * + * string parent_output_channel = 2; + * + * @param value The parentOutputChannel to set. + * @return This builder for chaining. + */ + public Builder setParentOutputChannel(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + parentOutputChannel_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * The connected output artifact of the parent node.
+       * It can be omitted if target processor only has 1 output artifact.
+       * 
+ * + * string parent_output_channel = 2; + * + * @return This builder for chaining. + */ + public Builder clearParentOutputChannel() { + parentOutputChannel_ = getDefaultInstance().getParentOutputChannel(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+       * The connected output artifact of the parent node.
+       * It can be omitted if target processor only has 1 output artifact.
+       * 
+ * + * string parent_output_channel = 2; + * + * @param value The bytes for parentOutputChannel to set. + * @return This builder for chaining. + */ + public Builder setParentOutputChannelBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parentOutputChannel_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object connectedInputChannel_ = ""; + /** + * + * + *
+       * The connected input channel of the current node's processor.
+       * It can be omitted if target processor only has 1 input channel.
+       * 
+ * + * string connected_input_channel = 3; + * + * @return The connectedInputChannel. + */ + public java.lang.String getConnectedInputChannel() { + java.lang.Object ref = connectedInputChannel_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + connectedInputChannel_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * The connected input channel of the current node's processor.
+       * It can be omitted if target processor only has 1 input channel.
+       * 
+ * + * string connected_input_channel = 3; + * + * @return The bytes for connectedInputChannel. + */ + public com.google.protobuf.ByteString getConnectedInputChannelBytes() { + java.lang.Object ref = connectedInputChannel_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + connectedInputChannel_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * The connected input channel of the current node's processor.
+       * It can be omitted if target processor only has 1 input channel.
+       * 
+ * + * string connected_input_channel = 3; + * + * @param value The connectedInputChannel to set. + * @return This builder for chaining. + */ + public Builder setConnectedInputChannel(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + connectedInputChannel_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+       * The connected input channel of the current node's processor.
+       * It can be omitted if target processor only has 1 input channel.
+       * 
+ * + * string connected_input_channel = 3; + * + * @return This builder for chaining. + */ + public Builder clearConnectedInputChannel() { + connectedInputChannel_ = getDefaultInstance().getConnectedInputChannel(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+       * The connected input channel of the current node's processor.
+       * It can be omitted if target processor only has 1 input channel.
+       * 
+ * + * string connected_input_channel = 3; + * + * @param value The bytes for connectedInputChannel to set. + * @return This builder for chaining. + */ + public Builder setConnectedInputChannelBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + connectedInputChannel_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.Node.InputEdge) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.Node.InputEdge) + private static final com.google.cloud.visionai.v1.Node.InputEdge DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.Node.InputEdge(); + } + + public static com.google.cloud.visionai.v1.Node.InputEdge getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public InputEdge parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.Node.InputEdge getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int bitField0_; + private int streamOutputConfigCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object streamOutputConfig_; + + public enum StreamOutputConfigCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + OUTPUT_ALL_OUTPUT_CHANNELS_TO_STREAM(6), + STREAMOUTPUTCONFIG_NOT_SET(0); + private final int value; + + private StreamOutputConfigCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static StreamOutputConfigCase valueOf(int value) { + return forNumber(value); + } + + public static StreamOutputConfigCase forNumber(int value) { + switch (value) { + case 6: + return OUTPUT_ALL_OUTPUT_CHANNELS_TO_STREAM; + case 0: + return STREAMOUTPUTCONFIG_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public StreamOutputConfigCase getStreamOutputConfigCase() { + return StreamOutputConfigCase.forNumber(streamOutputConfigCase_); + } + + public static final int OUTPUT_ALL_OUTPUT_CHANNELS_TO_STREAM_FIELD_NUMBER = 6; + /** + * + * + *
+   * By default, the output of the node will only be available to downstream
+   * nodes. To consume the direct output from the application node, the output
+   * must be sent to Vision AI Streams at first.
+   *
+   * By setting output_all_output_channels_to_stream to true, App Platform
+   * will automatically send all the outputs of the current node to Vision AI
+   * Stream resources (one stream per output channel). The output stream
+   * resource will be created by App Platform automatically during deployment
+   * and deleted after application un-deployment.
+   * Note that this config applies to all the Application Instances.
+   *
+   * The output stream can be override at instance level by
+   * configuring the `output_resources` section of Instance resource.
+   * `producer_node` should be current node, `output_resource_binding` should
+   * be the output channel name (or leave it blank if there is only 1 output
+   * channel of the processor) and `output_resource` should be the target
+   * output stream.
+   * 
+ * + * bool output_all_output_channels_to_stream = 6; + * + * @return Whether the outputAllOutputChannelsToStream field is set. + */ + @java.lang.Override + public boolean hasOutputAllOutputChannelsToStream() { + return streamOutputConfigCase_ == 6; + } + /** + * + * + *
+   * By default, the output of the node will only be available to downstream
+   * nodes. To consume the direct output from the application node, the output
+   * must be sent to Vision AI Streams at first.
+   *
+   * By setting output_all_output_channels_to_stream to true, App Platform
+   * will automatically send all the outputs of the current node to Vision AI
+   * Stream resources (one stream per output channel). The output stream
+   * resource will be created by App Platform automatically during deployment
+   * and deleted after application un-deployment.
+   * Note that this config applies to all the Application Instances.
+   *
+   * The output stream can be override at instance level by
+   * configuring the `output_resources` section of Instance resource.
+   * `producer_node` should be current node, `output_resource_binding` should
+   * be the output channel name (or leave it blank if there is only 1 output
+   * channel of the processor) and `output_resource` should be the target
+   * output stream.
+   * 
+ * + * bool output_all_output_channels_to_stream = 6; + * + * @return The outputAllOutputChannelsToStream. + */ + @java.lang.Override + public boolean getOutputAllOutputChannelsToStream() { + if (streamOutputConfigCase_ == 6) { + return (java.lang.Boolean) streamOutputConfig_; + } + return false; + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Required. A unique name for the node.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + 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(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. A unique name for the node.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DISPLAY_NAME_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object displayName_ = ""; + /** + * + * + *
+   * A user friendly display name for the node.
+   * 
+ * + * string display_name = 2; + * + * @return The displayName. + */ + @java.lang.Override + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + 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(); + displayName_ = s; + return s; + } + } + /** + * + * + *
+   * A user friendly display name for the node.
+   * 
+ * + * string display_name = 2; + * + * @return The bytes for displayName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int NODE_CONFIG_FIELD_NUMBER = 3; + private com.google.cloud.visionai.v1.ProcessorConfig nodeConfig_; + /** + * + * + *
+   * Node config.
+   * 
+ * + * .google.cloud.visionai.v1.ProcessorConfig node_config = 3; + * + * @return Whether the nodeConfig field is set. + */ + @java.lang.Override + public boolean hasNodeConfig() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * Node config.
+   * 
+ * + * .google.cloud.visionai.v1.ProcessorConfig node_config = 3; + * + * @return The nodeConfig. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.ProcessorConfig getNodeConfig() { + return nodeConfig_ == null + ? com.google.cloud.visionai.v1.ProcessorConfig.getDefaultInstance() + : nodeConfig_; + } + /** + * + * + *
+   * Node config.
+   * 
+ * + * .google.cloud.visionai.v1.ProcessorConfig node_config = 3; + */ + @java.lang.Override + public com.google.cloud.visionai.v1.ProcessorConfigOrBuilder getNodeConfigOrBuilder() { + return nodeConfig_ == null + ? com.google.cloud.visionai.v1.ProcessorConfig.getDefaultInstance() + : nodeConfig_; + } + + public static final int PROCESSOR_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object processor_ = ""; + /** + * + * + *
+   * Processor name refer to the chosen processor resource.
+   * 
+ * + * string processor = 4; + * + * @return The processor. + */ + @java.lang.Override + public java.lang.String getProcessor() { + java.lang.Object ref = processor_; + 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(); + processor_ = s; + return s; + } + } + /** + * + * + *
+   * Processor name refer to the chosen processor resource.
+   * 
+ * + * string processor = 4; + * + * @return The bytes for processor. + */ + @java.lang.Override + public com.google.protobuf.ByteString getProcessorBytes() { + java.lang.Object ref = processor_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + processor_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PARENTS_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private java.util.List parents_; + /** + * + * + *
+   * Parent node. Input node should not have parent node. For V1 Alpha1/Beta
+   * only media warehouse node can have multiple parents, other types of nodes
+   * will only have one parent.
+   * 
+ * + * repeated .google.cloud.visionai.v1.Node.InputEdge parents = 5; + */ + @java.lang.Override + public java.util.List getParentsList() { + return parents_; + } + /** + * + * + *
+   * Parent node. Input node should not have parent node. For V1 Alpha1/Beta
+   * only media warehouse node can have multiple parents, other types of nodes
+   * will only have one parent.
+   * 
+ * + * repeated .google.cloud.visionai.v1.Node.InputEdge parents = 5; + */ + @java.lang.Override + public java.util.List + getParentsOrBuilderList() { + return parents_; + } + /** + * + * + *
+   * Parent node. Input node should not have parent node. For V1 Alpha1/Beta
+   * only media warehouse node can have multiple parents, other types of nodes
+   * will only have one parent.
+   * 
+ * + * repeated .google.cloud.visionai.v1.Node.InputEdge parents = 5; + */ + @java.lang.Override + public int getParentsCount() { + return parents_.size(); + } + /** + * + * + *
+   * Parent node. Input node should not have parent node. For V1 Alpha1/Beta
+   * only media warehouse node can have multiple parents, other types of nodes
+   * will only have one parent.
+   * 
+ * + * repeated .google.cloud.visionai.v1.Node.InputEdge parents = 5; + */ + @java.lang.Override + public com.google.cloud.visionai.v1.Node.InputEdge getParents(int index) { + return parents_.get(index); + } + /** + * + * + *
+   * Parent node. Input node should not have parent node. For V1 Alpha1/Beta
+   * only media warehouse node can have multiple parents, other types of nodes
+   * will only have one parent.
+   * 
+ * + * repeated .google.cloud.visionai.v1.Node.InputEdge parents = 5; + */ + @java.lang.Override + public com.google.cloud.visionai.v1.Node.InputEdgeOrBuilder getParentsOrBuilder(int index) { + return parents_.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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, displayName_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(3, getNodeConfig()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(processor_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, processor_); + } + for (int i = 0; i < parents_.size(); i++) { + output.writeMessage(5, parents_.get(i)); + } + if (streamOutputConfigCase_ == 6) { + output.writeBool(6, (boolean) ((java.lang.Boolean) streamOutputConfig_)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, displayName_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getNodeConfig()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(processor_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, processor_); + } + for (int i = 0; i < parents_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, parents_.get(i)); + } + if (streamOutputConfigCase_ == 6) { + size += + com.google.protobuf.CodedOutputStream.computeBoolSize( + 6, (boolean) ((java.lang.Boolean) streamOutputConfig_)); + } + size += getUnknownFields().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.visionai.v1.Node)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.Node other = (com.google.cloud.visionai.v1.Node) obj; + + if (!getName().equals(other.getName())) return false; + if (!getDisplayName().equals(other.getDisplayName())) return false; + if (hasNodeConfig() != other.hasNodeConfig()) return false; + if (hasNodeConfig()) { + if (!getNodeConfig().equals(other.getNodeConfig())) return false; + } + if (!getProcessor().equals(other.getProcessor())) return false; + if (!getParentsList().equals(other.getParentsList())) return false; + if (!getStreamOutputConfigCase().equals(other.getStreamOutputConfigCase())) return false; + switch (streamOutputConfigCase_) { + case 6: + if (getOutputAllOutputChannelsToStream() != other.getOutputAllOutputChannelsToStream()) + return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDisplayName().hashCode(); + if (hasNodeConfig()) { + hash = (37 * hash) + NODE_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getNodeConfig().hashCode(); + } + hash = (37 * hash) + PROCESSOR_FIELD_NUMBER; + hash = (53 * hash) + getProcessor().hashCode(); + if (getParentsCount() > 0) { + hash = (37 * hash) + PARENTS_FIELD_NUMBER; + hash = (53 * hash) + getParentsList().hashCode(); + } + switch (streamOutputConfigCase_) { + case 6: + hash = (37 * hash) + OUTPUT_ALL_OUTPUT_CHANNELS_TO_STREAM_FIELD_NUMBER; + hash = + (53 * hash) + + com.google.protobuf.Internal.hashBoolean(getOutputAllOutputChannelsToStream()); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.Node parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.Node 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.visionai.v1.Node parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.Node 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.visionai.v1.Node parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.Node parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.Node parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.Node 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.visionai.v1.Node parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.Node 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.visionai.v1.Node parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.Node 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.visionai.v1.Node 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; + } + /** + * + * + *
+   * Message describing node object.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.Node} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.Node) + com.google.cloud.visionai.v1.NodeOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_Node_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_Node_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.Node.class, + com.google.cloud.visionai.v1.Node.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.Node.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getNodeConfigFieldBuilder(); + getParentsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + displayName_ = ""; + nodeConfig_ = null; + if (nodeConfigBuilder_ != null) { + nodeConfigBuilder_.dispose(); + nodeConfigBuilder_ = null; + } + processor_ = ""; + if (parentsBuilder_ == null) { + parents_ = java.util.Collections.emptyList(); + } else { + parents_ = null; + parentsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000020); + streamOutputConfigCase_ = 0; + streamOutputConfig_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_Node_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.Node getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.Node.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.Node build() { + com.google.cloud.visionai.v1.Node result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.Node buildPartial() { + com.google.cloud.visionai.v1.Node result = new com.google.cloud.visionai.v1.Node(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.google.cloud.visionai.v1.Node result) { + if (parentsBuilder_ == null) { + if (((bitField0_ & 0x00000020) != 0)) { + parents_ = java.util.Collections.unmodifiableList(parents_); + bitField0_ = (bitField0_ & ~0x00000020); + } + result.parents_ = parents_; + } else { + result.parents_ = parentsBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.visionai.v1.Node result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.displayName_ = displayName_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000008) != 0)) { + result.nodeConfig_ = nodeConfigBuilder_ == null ? nodeConfig_ : nodeConfigBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.processor_ = processor_; + } + result.bitField0_ |= to_bitField0_; + } + + private void buildPartialOneofs(com.google.cloud.visionai.v1.Node result) { + result.streamOutputConfigCase_ = streamOutputConfigCase_; + result.streamOutputConfig_ = this.streamOutputConfig_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.Node) { + return mergeFrom((com.google.cloud.visionai.v1.Node) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.Node other) { + if (other == com.google.cloud.visionai.v1.Node.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getDisplayName().isEmpty()) { + displayName_ = other.displayName_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (other.hasNodeConfig()) { + mergeNodeConfig(other.getNodeConfig()); + } + if (!other.getProcessor().isEmpty()) { + processor_ = other.processor_; + bitField0_ |= 0x00000010; + onChanged(); + } + if (parentsBuilder_ == null) { + if (!other.parents_.isEmpty()) { + if (parents_.isEmpty()) { + parents_ = other.parents_; + bitField0_ = (bitField0_ & ~0x00000020); + } else { + ensureParentsIsMutable(); + parents_.addAll(other.parents_); + } + onChanged(); + } + } else { + if (!other.parents_.isEmpty()) { + if (parentsBuilder_.isEmpty()) { + parentsBuilder_.dispose(); + parentsBuilder_ = null; + parents_ = other.parents_; + bitField0_ = (bitField0_ & ~0x00000020); + parentsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getParentsFieldBuilder() + : null; + } else { + parentsBuilder_.addAllMessages(other.parents_); + } + } + } + switch (other.getStreamOutputConfigCase()) { + case OUTPUT_ALL_OUTPUT_CHANNELS_TO_STREAM: + { + setOutputAllOutputChannelsToStream(other.getOutputAllOutputChannelsToStream()); + break; + } + case STREAMOUTPUTCONFIG_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 10 + case 18: + { + displayName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 18 + case 26: + { + input.readMessage(getNodeConfigFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 26 + case 34: + { + processor_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 34 + case 42: + { + com.google.cloud.visionai.v1.Node.InputEdge m = + input.readMessage( + com.google.cloud.visionai.v1.Node.InputEdge.parser(), extensionRegistry); + if (parentsBuilder_ == null) { + ensureParentsIsMutable(); + parents_.add(m); + } else { + parentsBuilder_.addMessage(m); + } + break; + } // case 42 + case 48: + { + streamOutputConfig_ = input.readBool(); + streamOutputConfigCase_ = 6; + break; + } // case 48 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int streamOutputConfigCase_ = 0; + private java.lang.Object streamOutputConfig_; + + public StreamOutputConfigCase getStreamOutputConfigCase() { + return StreamOutputConfigCase.forNumber(streamOutputConfigCase_); + } + + public Builder clearStreamOutputConfig() { + streamOutputConfigCase_ = 0; + streamOutputConfig_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + /** + * + * + *
+     * By default, the output of the node will only be available to downstream
+     * nodes. To consume the direct output from the application node, the output
+     * must be sent to Vision AI Streams at first.
+     *
+     * By setting output_all_output_channels_to_stream to true, App Platform
+     * will automatically send all the outputs of the current node to Vision AI
+     * Stream resources (one stream per output channel). The output stream
+     * resource will be created by App Platform automatically during deployment
+     * and deleted after application un-deployment.
+     * Note that this config applies to all the Application Instances.
+     *
+     * The output stream can be override at instance level by
+     * configuring the `output_resources` section of Instance resource.
+     * `producer_node` should be current node, `output_resource_binding` should
+     * be the output channel name (or leave it blank if there is only 1 output
+     * channel of the processor) and `output_resource` should be the target
+     * output stream.
+     * 
+ * + * bool output_all_output_channels_to_stream = 6; + * + * @return Whether the outputAllOutputChannelsToStream field is set. + */ + public boolean hasOutputAllOutputChannelsToStream() { + return streamOutputConfigCase_ == 6; + } + /** + * + * + *
+     * By default, the output of the node will only be available to downstream
+     * nodes. To consume the direct output from the application node, the output
+     * must be sent to Vision AI Streams at first.
+     *
+     * By setting output_all_output_channels_to_stream to true, App Platform
+     * will automatically send all the outputs of the current node to Vision AI
+     * Stream resources (one stream per output channel). The output stream
+     * resource will be created by App Platform automatically during deployment
+     * and deleted after application un-deployment.
+     * Note that this config applies to all the Application Instances.
+     *
+     * The output stream can be override at instance level by
+     * configuring the `output_resources` section of Instance resource.
+     * `producer_node` should be current node, `output_resource_binding` should
+     * be the output channel name (or leave it blank if there is only 1 output
+     * channel of the processor) and `output_resource` should be the target
+     * output stream.
+     * 
+ * + * bool output_all_output_channels_to_stream = 6; + * + * @return The outputAllOutputChannelsToStream. + */ + public boolean getOutputAllOutputChannelsToStream() { + if (streamOutputConfigCase_ == 6) { + return (java.lang.Boolean) streamOutputConfig_; + } + return false; + } + /** + * + * + *
+     * By default, the output of the node will only be available to downstream
+     * nodes. To consume the direct output from the application node, the output
+     * must be sent to Vision AI Streams at first.
+     *
+     * By setting output_all_output_channels_to_stream to true, App Platform
+     * will automatically send all the outputs of the current node to Vision AI
+     * Stream resources (one stream per output channel). The output stream
+     * resource will be created by App Platform automatically during deployment
+     * and deleted after application un-deployment.
+     * Note that this config applies to all the Application Instances.
+     *
+     * The output stream can be override at instance level by
+     * configuring the `output_resources` section of Instance resource.
+     * `producer_node` should be current node, `output_resource_binding` should
+     * be the output channel name (or leave it blank if there is only 1 output
+     * channel of the processor) and `output_resource` should be the target
+     * output stream.
+     * 
+ * + * bool output_all_output_channels_to_stream = 6; + * + * @param value The outputAllOutputChannelsToStream to set. + * @return This builder for chaining. + */ + public Builder setOutputAllOutputChannelsToStream(boolean value) { + + streamOutputConfigCase_ = 6; + streamOutputConfig_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * By default, the output of the node will only be available to downstream
+     * nodes. To consume the direct output from the application node, the output
+     * must be sent to Vision AI Streams at first.
+     *
+     * By setting output_all_output_channels_to_stream to true, App Platform
+     * will automatically send all the outputs of the current node to Vision AI
+     * Stream resources (one stream per output channel). The output stream
+     * resource will be created by App Platform automatically during deployment
+     * and deleted after application un-deployment.
+     * Note that this config applies to all the Application Instances.
+     *
+     * The output stream can be override at instance level by
+     * configuring the `output_resources` section of Instance resource.
+     * `producer_node` should be current node, `output_resource_binding` should
+     * be the output channel name (or leave it blank if there is only 1 output
+     * channel of the processor) and `output_resource` should be the target
+     * output stream.
+     * 
+ * + * bool output_all_output_channels_to_stream = 6; + * + * @return This builder for chaining. + */ + public Builder clearOutputAllOutputChannelsToStream() { + if (streamOutputConfigCase_ == 6) { + streamOutputConfigCase_ = 0; + streamOutputConfig_ = null; + onChanged(); + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. A unique name for the node.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. A unique name for the node.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. A unique name for the node.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. A unique name for the node.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. A unique name for the node.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object displayName_ = ""; + /** + * + * + *
+     * A user friendly display name for the node.
+     * 
+ * + * string display_name = 2; + * + * @return The displayName. + */ + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A user friendly display name for the node.
+     * 
+ * + * string display_name = 2; + * + * @return The bytes for displayName. + */ + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A user friendly display name for the node.
+     * 
+ * + * string display_name = 2; + * + * @param value The displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + displayName_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * A user friendly display name for the node.
+     * 
+ * + * string display_name = 2; + * + * @return This builder for chaining. + */ + public Builder clearDisplayName() { + displayName_ = getDefaultInstance().getDisplayName(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * A user friendly display name for the node.
+     * 
+ * + * string display_name = 2; + * + * @param value The bytes for displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + displayName_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private com.google.cloud.visionai.v1.ProcessorConfig nodeConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.ProcessorConfig, + com.google.cloud.visionai.v1.ProcessorConfig.Builder, + com.google.cloud.visionai.v1.ProcessorConfigOrBuilder> + nodeConfigBuilder_; + /** + * + * + *
+     * Node config.
+     * 
+ * + * .google.cloud.visionai.v1.ProcessorConfig node_config = 3; + * + * @return Whether the nodeConfig field is set. + */ + public boolean hasNodeConfig() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + * + * + *
+     * Node config.
+     * 
+ * + * .google.cloud.visionai.v1.ProcessorConfig node_config = 3; + * + * @return The nodeConfig. + */ + public com.google.cloud.visionai.v1.ProcessorConfig getNodeConfig() { + if (nodeConfigBuilder_ == null) { + return nodeConfig_ == null + ? com.google.cloud.visionai.v1.ProcessorConfig.getDefaultInstance() + : nodeConfig_; + } else { + return nodeConfigBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Node config.
+     * 
+ * + * .google.cloud.visionai.v1.ProcessorConfig node_config = 3; + */ + public Builder setNodeConfig(com.google.cloud.visionai.v1.ProcessorConfig value) { + if (nodeConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + nodeConfig_ = value; + } else { + nodeConfigBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Node config.
+     * 
+ * + * .google.cloud.visionai.v1.ProcessorConfig node_config = 3; + */ + public Builder setNodeConfig( + com.google.cloud.visionai.v1.ProcessorConfig.Builder builderForValue) { + if (nodeConfigBuilder_ == null) { + nodeConfig_ = builderForValue.build(); + } else { + nodeConfigBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Node config.
+     * 
+ * + * .google.cloud.visionai.v1.ProcessorConfig node_config = 3; + */ + public Builder mergeNodeConfig(com.google.cloud.visionai.v1.ProcessorConfig value) { + if (nodeConfigBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) + && nodeConfig_ != null + && nodeConfig_ != com.google.cloud.visionai.v1.ProcessorConfig.getDefaultInstance()) { + getNodeConfigBuilder().mergeFrom(value); + } else { + nodeConfig_ = value; + } + } else { + nodeConfigBuilder_.mergeFrom(value); + } + if (nodeConfig_ != null) { + bitField0_ |= 0x00000008; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Node config.
+     * 
+ * + * .google.cloud.visionai.v1.ProcessorConfig node_config = 3; + */ + public Builder clearNodeConfig() { + bitField0_ = (bitField0_ & ~0x00000008); + nodeConfig_ = null; + if (nodeConfigBuilder_ != null) { + nodeConfigBuilder_.dispose(); + nodeConfigBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Node config.
+     * 
+ * + * .google.cloud.visionai.v1.ProcessorConfig node_config = 3; + */ + public com.google.cloud.visionai.v1.ProcessorConfig.Builder getNodeConfigBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return getNodeConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Node config.
+     * 
+ * + * .google.cloud.visionai.v1.ProcessorConfig node_config = 3; + */ + public com.google.cloud.visionai.v1.ProcessorConfigOrBuilder getNodeConfigOrBuilder() { + if (nodeConfigBuilder_ != null) { + return nodeConfigBuilder_.getMessageOrBuilder(); + } else { + return nodeConfig_ == null + ? com.google.cloud.visionai.v1.ProcessorConfig.getDefaultInstance() + : nodeConfig_; + } + } + /** + * + * + *
+     * Node config.
+     * 
+ * + * .google.cloud.visionai.v1.ProcessorConfig node_config = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.ProcessorConfig, + com.google.cloud.visionai.v1.ProcessorConfig.Builder, + com.google.cloud.visionai.v1.ProcessorConfigOrBuilder> + getNodeConfigFieldBuilder() { + if (nodeConfigBuilder_ == null) { + nodeConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.ProcessorConfig, + com.google.cloud.visionai.v1.ProcessorConfig.Builder, + com.google.cloud.visionai.v1.ProcessorConfigOrBuilder>( + getNodeConfig(), getParentForChildren(), isClean()); + nodeConfig_ = null; + } + return nodeConfigBuilder_; + } + + private java.lang.Object processor_ = ""; + /** + * + * + *
+     * Processor name refer to the chosen processor resource.
+     * 
+ * + * string processor = 4; + * + * @return The processor. + */ + public java.lang.String getProcessor() { + java.lang.Object ref = processor_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + processor_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Processor name refer to the chosen processor resource.
+     * 
+ * + * string processor = 4; + * + * @return The bytes for processor. + */ + public com.google.protobuf.ByteString getProcessorBytes() { + java.lang.Object ref = processor_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + processor_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Processor name refer to the chosen processor resource.
+     * 
+ * + * string processor = 4; + * + * @param value The processor to set. + * @return This builder for chaining. + */ + public Builder setProcessor(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + processor_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Processor name refer to the chosen processor resource.
+     * 
+ * + * string processor = 4; + * + * @return This builder for chaining. + */ + public Builder clearProcessor() { + processor_ = getDefaultInstance().getProcessor(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + /** + * + * + *
+     * Processor name refer to the chosen processor resource.
+     * 
+ * + * string processor = 4; + * + * @param value The bytes for processor to set. + * @return This builder for chaining. + */ + public Builder setProcessorBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + processor_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + private java.util.List parents_ = + java.util.Collections.emptyList(); + + private void ensureParentsIsMutable() { + if (!((bitField0_ & 0x00000020) != 0)) { + parents_ = new java.util.ArrayList(parents_); + bitField0_ |= 0x00000020; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.visionai.v1.Node.InputEdge, + com.google.cloud.visionai.v1.Node.InputEdge.Builder, + com.google.cloud.visionai.v1.Node.InputEdgeOrBuilder> + parentsBuilder_; + + /** + * + * + *
+     * Parent node. Input node should not have parent node. For V1 Alpha1/Beta
+     * only media warehouse node can have multiple parents, other types of nodes
+     * will only have one parent.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Node.InputEdge parents = 5; + */ + public java.util.List getParentsList() { + if (parentsBuilder_ == null) { + return java.util.Collections.unmodifiableList(parents_); + } else { + return parentsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Parent node. Input node should not have parent node. For V1 Alpha1/Beta
+     * only media warehouse node can have multiple parents, other types of nodes
+     * will only have one parent.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Node.InputEdge parents = 5; + */ + public int getParentsCount() { + if (parentsBuilder_ == null) { + return parents_.size(); + } else { + return parentsBuilder_.getCount(); + } + } + /** + * + * + *
+     * Parent node. Input node should not have parent node. For V1 Alpha1/Beta
+     * only media warehouse node can have multiple parents, other types of nodes
+     * will only have one parent.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Node.InputEdge parents = 5; + */ + public com.google.cloud.visionai.v1.Node.InputEdge getParents(int index) { + if (parentsBuilder_ == null) { + return parents_.get(index); + } else { + return parentsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Parent node. Input node should not have parent node. For V1 Alpha1/Beta
+     * only media warehouse node can have multiple parents, other types of nodes
+     * will only have one parent.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Node.InputEdge parents = 5; + */ + public Builder setParents(int index, com.google.cloud.visionai.v1.Node.InputEdge value) { + if (parentsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureParentsIsMutable(); + parents_.set(index, value); + onChanged(); + } else { + parentsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Parent node. Input node should not have parent node. For V1 Alpha1/Beta
+     * only media warehouse node can have multiple parents, other types of nodes
+     * will only have one parent.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Node.InputEdge parents = 5; + */ + public Builder setParents( + int index, com.google.cloud.visionai.v1.Node.InputEdge.Builder builderForValue) { + if (parentsBuilder_ == null) { + ensureParentsIsMutable(); + parents_.set(index, builderForValue.build()); + onChanged(); + } else { + parentsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Parent node. Input node should not have parent node. For V1 Alpha1/Beta
+     * only media warehouse node can have multiple parents, other types of nodes
+     * will only have one parent.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Node.InputEdge parents = 5; + */ + public Builder addParents(com.google.cloud.visionai.v1.Node.InputEdge value) { + if (parentsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureParentsIsMutable(); + parents_.add(value); + onChanged(); + } else { + parentsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Parent node. Input node should not have parent node. For V1 Alpha1/Beta
+     * only media warehouse node can have multiple parents, other types of nodes
+     * will only have one parent.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Node.InputEdge parents = 5; + */ + public Builder addParents(int index, com.google.cloud.visionai.v1.Node.InputEdge value) { + if (parentsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureParentsIsMutable(); + parents_.add(index, value); + onChanged(); + } else { + parentsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Parent node. Input node should not have parent node. For V1 Alpha1/Beta
+     * only media warehouse node can have multiple parents, other types of nodes
+     * will only have one parent.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Node.InputEdge parents = 5; + */ + public Builder addParents(com.google.cloud.visionai.v1.Node.InputEdge.Builder builderForValue) { + if (parentsBuilder_ == null) { + ensureParentsIsMutable(); + parents_.add(builderForValue.build()); + onChanged(); + } else { + parentsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Parent node. Input node should not have parent node. For V1 Alpha1/Beta
+     * only media warehouse node can have multiple parents, other types of nodes
+     * will only have one parent.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Node.InputEdge parents = 5; + */ + public Builder addParents( + int index, com.google.cloud.visionai.v1.Node.InputEdge.Builder builderForValue) { + if (parentsBuilder_ == null) { + ensureParentsIsMutable(); + parents_.add(index, builderForValue.build()); + onChanged(); + } else { + parentsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Parent node. Input node should not have parent node. For V1 Alpha1/Beta
+     * only media warehouse node can have multiple parents, other types of nodes
+     * will only have one parent.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Node.InputEdge parents = 5; + */ + public Builder addAllParents( + java.lang.Iterable values) { + if (parentsBuilder_ == null) { + ensureParentsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, parents_); + onChanged(); + } else { + parentsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Parent node. Input node should not have parent node. For V1 Alpha1/Beta
+     * only media warehouse node can have multiple parents, other types of nodes
+     * will only have one parent.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Node.InputEdge parents = 5; + */ + public Builder clearParents() { + if (parentsBuilder_ == null) { + parents_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + } else { + parentsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Parent node. Input node should not have parent node. For V1 Alpha1/Beta
+     * only media warehouse node can have multiple parents, other types of nodes
+     * will only have one parent.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Node.InputEdge parents = 5; + */ + public Builder removeParents(int index) { + if (parentsBuilder_ == null) { + ensureParentsIsMutable(); + parents_.remove(index); + onChanged(); + } else { + parentsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Parent node. Input node should not have parent node. For V1 Alpha1/Beta
+     * only media warehouse node can have multiple parents, other types of nodes
+     * will only have one parent.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Node.InputEdge parents = 5; + */ + public com.google.cloud.visionai.v1.Node.InputEdge.Builder getParentsBuilder(int index) { + return getParentsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Parent node. Input node should not have parent node. For V1 Alpha1/Beta
+     * only media warehouse node can have multiple parents, other types of nodes
+     * will only have one parent.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Node.InputEdge parents = 5; + */ + public com.google.cloud.visionai.v1.Node.InputEdgeOrBuilder getParentsOrBuilder(int index) { + if (parentsBuilder_ == null) { + return parents_.get(index); + } else { + return parentsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Parent node. Input node should not have parent node. For V1 Alpha1/Beta
+     * only media warehouse node can have multiple parents, other types of nodes
+     * will only have one parent.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Node.InputEdge parents = 5; + */ + public java.util.List + getParentsOrBuilderList() { + if (parentsBuilder_ != null) { + return parentsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(parents_); + } + } + /** + * + * + *
+     * Parent node. Input node should not have parent node. For V1 Alpha1/Beta
+     * only media warehouse node can have multiple parents, other types of nodes
+     * will only have one parent.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Node.InputEdge parents = 5; + */ + public com.google.cloud.visionai.v1.Node.InputEdge.Builder addParentsBuilder() { + return getParentsFieldBuilder() + .addBuilder(com.google.cloud.visionai.v1.Node.InputEdge.getDefaultInstance()); + } + /** + * + * + *
+     * Parent node. Input node should not have parent node. For V1 Alpha1/Beta
+     * only media warehouse node can have multiple parents, other types of nodes
+     * will only have one parent.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Node.InputEdge parents = 5; + */ + public com.google.cloud.visionai.v1.Node.InputEdge.Builder addParentsBuilder(int index) { + return getParentsFieldBuilder() + .addBuilder(index, com.google.cloud.visionai.v1.Node.InputEdge.getDefaultInstance()); + } + /** + * + * + *
+     * Parent node. Input node should not have parent node. For V1 Alpha1/Beta
+     * only media warehouse node can have multiple parents, other types of nodes
+     * will only have one parent.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Node.InputEdge parents = 5; + */ + public java.util.List + getParentsBuilderList() { + return getParentsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.visionai.v1.Node.InputEdge, + com.google.cloud.visionai.v1.Node.InputEdge.Builder, + com.google.cloud.visionai.v1.Node.InputEdgeOrBuilder> + getParentsFieldBuilder() { + if (parentsBuilder_ == null) { + parentsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.visionai.v1.Node.InputEdge, + com.google.cloud.visionai.v1.Node.InputEdge.Builder, + com.google.cloud.visionai.v1.Node.InputEdgeOrBuilder>( + parents_, ((bitField0_ & 0x00000020) != 0), getParentForChildren(), isClean()); + parents_ = null; + } + return parentsBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.Node) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.Node) + private static final com.google.cloud.visionai.v1.Node DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.Node(); + } + + public static com.google.cloud.visionai.v1.Node getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Node parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.Node getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/NodeOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/NodeOrBuilder.java new file mode 100644 index 000000000000..fc8e46fb21f2 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/NodeOrBuilder.java @@ -0,0 +1,257 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/platform.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface NodeOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.Node) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * By default, the output of the node will only be available to downstream
+   * nodes. To consume the direct output from the application node, the output
+   * must be sent to Vision AI Streams at first.
+   *
+   * By setting output_all_output_channels_to_stream to true, App Platform
+   * will automatically send all the outputs of the current node to Vision AI
+   * Stream resources (one stream per output channel). The output stream
+   * resource will be created by App Platform automatically during deployment
+   * and deleted after application un-deployment.
+   * Note that this config applies to all the Application Instances.
+   *
+   * The output stream can be override at instance level by
+   * configuring the `output_resources` section of Instance resource.
+   * `producer_node` should be current node, `output_resource_binding` should
+   * be the output channel name (or leave it blank if there is only 1 output
+   * channel of the processor) and `output_resource` should be the target
+   * output stream.
+   * 
+ * + * bool output_all_output_channels_to_stream = 6; + * + * @return Whether the outputAllOutputChannelsToStream field is set. + */ + boolean hasOutputAllOutputChannelsToStream(); + /** + * + * + *
+   * By default, the output of the node will only be available to downstream
+   * nodes. To consume the direct output from the application node, the output
+   * must be sent to Vision AI Streams at first.
+   *
+   * By setting output_all_output_channels_to_stream to true, App Platform
+   * will automatically send all the outputs of the current node to Vision AI
+   * Stream resources (one stream per output channel). The output stream
+   * resource will be created by App Platform automatically during deployment
+   * and deleted after application un-deployment.
+   * Note that this config applies to all the Application Instances.
+   *
+   * The output stream can be override at instance level by
+   * configuring the `output_resources` section of Instance resource.
+   * `producer_node` should be current node, `output_resource_binding` should
+   * be the output channel name (or leave it blank if there is only 1 output
+   * channel of the processor) and `output_resource` should be the target
+   * output stream.
+   * 
+ * + * bool output_all_output_channels_to_stream = 6; + * + * @return The outputAllOutputChannelsToStream. + */ + boolean getOutputAllOutputChannelsToStream(); + + /** + * + * + *
+   * Required. A unique name for the node.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. A unique name for the node.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * A user friendly display name for the node.
+   * 
+ * + * string display_name = 2; + * + * @return The displayName. + */ + java.lang.String getDisplayName(); + /** + * + * + *
+   * A user friendly display name for the node.
+   * 
+ * + * string display_name = 2; + * + * @return The bytes for displayName. + */ + com.google.protobuf.ByteString getDisplayNameBytes(); + + /** + * + * + *
+   * Node config.
+   * 
+ * + * .google.cloud.visionai.v1.ProcessorConfig node_config = 3; + * + * @return Whether the nodeConfig field is set. + */ + boolean hasNodeConfig(); + /** + * + * + *
+   * Node config.
+   * 
+ * + * .google.cloud.visionai.v1.ProcessorConfig node_config = 3; + * + * @return The nodeConfig. + */ + com.google.cloud.visionai.v1.ProcessorConfig getNodeConfig(); + /** + * + * + *
+   * Node config.
+   * 
+ * + * .google.cloud.visionai.v1.ProcessorConfig node_config = 3; + */ + com.google.cloud.visionai.v1.ProcessorConfigOrBuilder getNodeConfigOrBuilder(); + + /** + * + * + *
+   * Processor name refer to the chosen processor resource.
+   * 
+ * + * string processor = 4; + * + * @return The processor. + */ + java.lang.String getProcessor(); + /** + * + * + *
+   * Processor name refer to the chosen processor resource.
+   * 
+ * + * string processor = 4; + * + * @return The bytes for processor. + */ + com.google.protobuf.ByteString getProcessorBytes(); + + /** + * + * + *
+   * Parent node. Input node should not have parent node. For V1 Alpha1/Beta
+   * only media warehouse node can have multiple parents, other types of nodes
+   * will only have one parent.
+   * 
+ * + * repeated .google.cloud.visionai.v1.Node.InputEdge parents = 5; + */ + java.util.List getParentsList(); + /** + * + * + *
+   * Parent node. Input node should not have parent node. For V1 Alpha1/Beta
+   * only media warehouse node can have multiple parents, other types of nodes
+   * will only have one parent.
+   * 
+ * + * repeated .google.cloud.visionai.v1.Node.InputEdge parents = 5; + */ + com.google.cloud.visionai.v1.Node.InputEdge getParents(int index); + /** + * + * + *
+   * Parent node. Input node should not have parent node. For V1 Alpha1/Beta
+   * only media warehouse node can have multiple parents, other types of nodes
+   * will only have one parent.
+   * 
+ * + * repeated .google.cloud.visionai.v1.Node.InputEdge parents = 5; + */ + int getParentsCount(); + /** + * + * + *
+   * Parent node. Input node should not have parent node. For V1 Alpha1/Beta
+   * only media warehouse node can have multiple parents, other types of nodes
+   * will only have one parent.
+   * 
+ * + * repeated .google.cloud.visionai.v1.Node.InputEdge parents = 5; + */ + java.util.List + getParentsOrBuilderList(); + /** + * + * + *
+   * Parent node. Input node should not have parent node. For V1 Alpha1/Beta
+   * only media warehouse node can have multiple parents, other types of nodes
+   * will only have one parent.
+   * 
+ * + * repeated .google.cloud.visionai.v1.Node.InputEdge parents = 5; + */ + com.google.cloud.visionai.v1.Node.InputEdgeOrBuilder getParentsOrBuilder(int index); + + com.google.cloud.visionai.v1.Node.StreamOutputConfigCase getStreamOutputConfigCase(); +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/NormalizedPolygon.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/NormalizedPolygon.java new file mode 100644 index 000000000000..d510dd487fc2 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/NormalizedPolygon.java @@ -0,0 +1,971 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/annotations.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * Normalized Polygon.
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.NormalizedPolygon} + */ +public final class NormalizedPolygon extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.NormalizedPolygon) + NormalizedPolygonOrBuilder { + private static final long serialVersionUID = 0L; + // Use NormalizedPolygon.newBuilder() to construct. + private NormalizedPolygon(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private NormalizedPolygon() { + normalizedVertices_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new NormalizedPolygon(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.AnnotationsProto + .internal_static_google_cloud_visionai_v1_NormalizedPolygon_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.AnnotationsProto + .internal_static_google_cloud_visionai_v1_NormalizedPolygon_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.NormalizedPolygon.class, + com.google.cloud.visionai.v1.NormalizedPolygon.Builder.class); + } + + public static final int NORMALIZED_VERTICES_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List normalizedVertices_; + /** + * + * + *
+   * The bounding polygon normalized vertices. Top left corner of the image
+   * will be [0, 0].
+   * 
+ * + * repeated .google.cloud.visionai.v1.NormalizedVertex normalized_vertices = 1; + */ + @java.lang.Override + public java.util.List getNormalizedVerticesList() { + return normalizedVertices_; + } + /** + * + * + *
+   * The bounding polygon normalized vertices. Top left corner of the image
+   * will be [0, 0].
+   * 
+ * + * repeated .google.cloud.visionai.v1.NormalizedVertex normalized_vertices = 1; + */ + @java.lang.Override + public java.util.List + getNormalizedVerticesOrBuilderList() { + return normalizedVertices_; + } + /** + * + * + *
+   * The bounding polygon normalized vertices. Top left corner of the image
+   * will be [0, 0].
+   * 
+ * + * repeated .google.cloud.visionai.v1.NormalizedVertex normalized_vertices = 1; + */ + @java.lang.Override + public int getNormalizedVerticesCount() { + return normalizedVertices_.size(); + } + /** + * + * + *
+   * The bounding polygon normalized vertices. Top left corner of the image
+   * will be [0, 0].
+   * 
+ * + * repeated .google.cloud.visionai.v1.NormalizedVertex normalized_vertices = 1; + */ + @java.lang.Override + public com.google.cloud.visionai.v1.NormalizedVertex getNormalizedVertices(int index) { + return normalizedVertices_.get(index); + } + /** + * + * + *
+   * The bounding polygon normalized vertices. Top left corner of the image
+   * will be [0, 0].
+   * 
+ * + * repeated .google.cloud.visionai.v1.NormalizedVertex normalized_vertices = 1; + */ + @java.lang.Override + public com.google.cloud.visionai.v1.NormalizedVertexOrBuilder getNormalizedVerticesOrBuilder( + int index) { + return normalizedVertices_.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 < normalizedVertices_.size(); i++) { + output.writeMessage(1, normalizedVertices_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < normalizedVertices_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(1, normalizedVertices_.get(i)); + } + size += getUnknownFields().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.visionai.v1.NormalizedPolygon)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.NormalizedPolygon other = + (com.google.cloud.visionai.v1.NormalizedPolygon) obj; + + if (!getNormalizedVerticesList().equals(other.getNormalizedVerticesList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getNormalizedVerticesCount() > 0) { + hash = (37 * hash) + NORMALIZED_VERTICES_FIELD_NUMBER; + hash = (53 * hash) + getNormalizedVerticesList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.NormalizedPolygon parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.NormalizedPolygon 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.visionai.v1.NormalizedPolygon parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.NormalizedPolygon 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.visionai.v1.NormalizedPolygon parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.NormalizedPolygon parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.NormalizedPolygon parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.NormalizedPolygon 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.visionai.v1.NormalizedPolygon parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.NormalizedPolygon 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.visionai.v1.NormalizedPolygon parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.NormalizedPolygon 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.visionai.v1.NormalizedPolygon 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 Polygon.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.NormalizedPolygon} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.NormalizedPolygon) + com.google.cloud.visionai.v1.NormalizedPolygonOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.AnnotationsProto + .internal_static_google_cloud_visionai_v1_NormalizedPolygon_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.AnnotationsProto + .internal_static_google_cloud_visionai_v1_NormalizedPolygon_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.NormalizedPolygon.class, + com.google.cloud.visionai.v1.NormalizedPolygon.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.NormalizedPolygon.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (normalizedVerticesBuilder_ == null) { + normalizedVertices_ = java.util.Collections.emptyList(); + } else { + normalizedVertices_ = null; + normalizedVerticesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.AnnotationsProto + .internal_static_google_cloud_visionai_v1_NormalizedPolygon_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.NormalizedPolygon getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.NormalizedPolygon.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.NormalizedPolygon build() { + com.google.cloud.visionai.v1.NormalizedPolygon result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.NormalizedPolygon buildPartial() { + com.google.cloud.visionai.v1.NormalizedPolygon result = + new com.google.cloud.visionai.v1.NormalizedPolygon(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.google.cloud.visionai.v1.NormalizedPolygon result) { + if (normalizedVerticesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + normalizedVertices_ = java.util.Collections.unmodifiableList(normalizedVertices_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.normalizedVertices_ = normalizedVertices_; + } else { + result.normalizedVertices_ = normalizedVerticesBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.visionai.v1.NormalizedPolygon result) { + int from_bitField0_ = bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.NormalizedPolygon) { + return mergeFrom((com.google.cloud.visionai.v1.NormalizedPolygon) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.NormalizedPolygon other) { + if (other == com.google.cloud.visionai.v1.NormalizedPolygon.getDefaultInstance()) return this; + if (normalizedVerticesBuilder_ == null) { + if (!other.normalizedVertices_.isEmpty()) { + if (normalizedVertices_.isEmpty()) { + normalizedVertices_ = other.normalizedVertices_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureNormalizedVerticesIsMutable(); + normalizedVertices_.addAll(other.normalizedVertices_); + } + onChanged(); + } + } else { + if (!other.normalizedVertices_.isEmpty()) { + if (normalizedVerticesBuilder_.isEmpty()) { + normalizedVerticesBuilder_.dispose(); + normalizedVerticesBuilder_ = null; + normalizedVertices_ = other.normalizedVertices_; + bitField0_ = (bitField0_ & ~0x00000001); + normalizedVerticesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getNormalizedVerticesFieldBuilder() + : null; + } else { + normalizedVerticesBuilder_.addAllMessages(other.normalizedVertices_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.visionai.v1.NormalizedVertex m = + input.readMessage( + com.google.cloud.visionai.v1.NormalizedVertex.parser(), extensionRegistry); + if (normalizedVerticesBuilder_ == null) { + ensureNormalizedVerticesIsMutable(); + normalizedVertices_.add(m); + } else { + normalizedVerticesBuilder_.addMessage(m); + } + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List normalizedVertices_ = + java.util.Collections.emptyList(); + + private void ensureNormalizedVerticesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + normalizedVertices_ = + new java.util.ArrayList( + normalizedVertices_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.visionai.v1.NormalizedVertex, + com.google.cloud.visionai.v1.NormalizedVertex.Builder, + com.google.cloud.visionai.v1.NormalizedVertexOrBuilder> + normalizedVerticesBuilder_; + + /** + * + * + *
+     * The bounding polygon normalized vertices. Top left corner of the image
+     * will be [0, 0].
+     * 
+ * + * repeated .google.cloud.visionai.v1.NormalizedVertex normalized_vertices = 1; + */ + public java.util.List + getNormalizedVerticesList() { + if (normalizedVerticesBuilder_ == null) { + return java.util.Collections.unmodifiableList(normalizedVertices_); + } else { + return normalizedVerticesBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * The bounding polygon normalized vertices. Top left corner of the image
+     * will be [0, 0].
+     * 
+ * + * repeated .google.cloud.visionai.v1.NormalizedVertex normalized_vertices = 1; + */ + public int getNormalizedVerticesCount() { + if (normalizedVerticesBuilder_ == null) { + return normalizedVertices_.size(); + } else { + return normalizedVerticesBuilder_.getCount(); + } + } + /** + * + * + *
+     * The bounding polygon normalized vertices. Top left corner of the image
+     * will be [0, 0].
+     * 
+ * + * repeated .google.cloud.visionai.v1.NormalizedVertex normalized_vertices = 1; + */ + public com.google.cloud.visionai.v1.NormalizedVertex getNormalizedVertices(int index) { + if (normalizedVerticesBuilder_ == null) { + return normalizedVertices_.get(index); + } else { + return normalizedVerticesBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * The bounding polygon normalized vertices. Top left corner of the image
+     * will be [0, 0].
+     * 
+ * + * repeated .google.cloud.visionai.v1.NormalizedVertex normalized_vertices = 1; + */ + public Builder setNormalizedVertices( + int index, com.google.cloud.visionai.v1.NormalizedVertex value) { + if (normalizedVerticesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureNormalizedVerticesIsMutable(); + normalizedVertices_.set(index, value); + onChanged(); + } else { + normalizedVerticesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The bounding polygon normalized vertices. Top left corner of the image
+     * will be [0, 0].
+     * 
+ * + * repeated .google.cloud.visionai.v1.NormalizedVertex normalized_vertices = 1; + */ + public Builder setNormalizedVertices( + int index, com.google.cloud.visionai.v1.NormalizedVertex.Builder builderForValue) { + if (normalizedVerticesBuilder_ == null) { + ensureNormalizedVerticesIsMutable(); + normalizedVertices_.set(index, builderForValue.build()); + onChanged(); + } else { + normalizedVerticesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The bounding polygon normalized vertices. Top left corner of the image
+     * will be [0, 0].
+     * 
+ * + * repeated .google.cloud.visionai.v1.NormalizedVertex normalized_vertices = 1; + */ + public Builder addNormalizedVertices(com.google.cloud.visionai.v1.NormalizedVertex value) { + if (normalizedVerticesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureNormalizedVerticesIsMutable(); + normalizedVertices_.add(value); + onChanged(); + } else { + normalizedVerticesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * The bounding polygon normalized vertices. Top left corner of the image
+     * will be [0, 0].
+     * 
+ * + * repeated .google.cloud.visionai.v1.NormalizedVertex normalized_vertices = 1; + */ + public Builder addNormalizedVertices( + int index, com.google.cloud.visionai.v1.NormalizedVertex value) { + if (normalizedVerticesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureNormalizedVerticesIsMutable(); + normalizedVertices_.add(index, value); + onChanged(); + } else { + normalizedVerticesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The bounding polygon normalized vertices. Top left corner of the image
+     * will be [0, 0].
+     * 
+ * + * repeated .google.cloud.visionai.v1.NormalizedVertex normalized_vertices = 1; + */ + public Builder addNormalizedVertices( + com.google.cloud.visionai.v1.NormalizedVertex.Builder builderForValue) { + if (normalizedVerticesBuilder_ == null) { + ensureNormalizedVerticesIsMutable(); + normalizedVertices_.add(builderForValue.build()); + onChanged(); + } else { + normalizedVerticesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The bounding polygon normalized vertices. Top left corner of the image
+     * will be [0, 0].
+     * 
+ * + * repeated .google.cloud.visionai.v1.NormalizedVertex normalized_vertices = 1; + */ + public Builder addNormalizedVertices( + int index, com.google.cloud.visionai.v1.NormalizedVertex.Builder builderForValue) { + if (normalizedVerticesBuilder_ == null) { + ensureNormalizedVerticesIsMutable(); + normalizedVertices_.add(index, builderForValue.build()); + onChanged(); + } else { + normalizedVerticesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The bounding polygon normalized vertices. Top left corner of the image
+     * will be [0, 0].
+     * 
+ * + * repeated .google.cloud.visionai.v1.NormalizedVertex normalized_vertices = 1; + */ + public Builder addAllNormalizedVertices( + java.lang.Iterable values) { + if (normalizedVerticesBuilder_ == null) { + ensureNormalizedVerticesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, normalizedVertices_); + onChanged(); + } else { + normalizedVerticesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * The bounding polygon normalized vertices. Top left corner of the image
+     * will be [0, 0].
+     * 
+ * + * repeated .google.cloud.visionai.v1.NormalizedVertex normalized_vertices = 1; + */ + public Builder clearNormalizedVertices() { + if (normalizedVerticesBuilder_ == null) { + normalizedVertices_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + normalizedVerticesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The bounding polygon normalized vertices. Top left corner of the image
+     * will be [0, 0].
+     * 
+ * + * repeated .google.cloud.visionai.v1.NormalizedVertex normalized_vertices = 1; + */ + public Builder removeNormalizedVertices(int index) { + if (normalizedVerticesBuilder_ == null) { + ensureNormalizedVerticesIsMutable(); + normalizedVertices_.remove(index); + onChanged(); + } else { + normalizedVerticesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * The bounding polygon normalized vertices. Top left corner of the image
+     * will be [0, 0].
+     * 
+ * + * repeated .google.cloud.visionai.v1.NormalizedVertex normalized_vertices = 1; + */ + public com.google.cloud.visionai.v1.NormalizedVertex.Builder getNormalizedVerticesBuilder( + int index) { + return getNormalizedVerticesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * The bounding polygon normalized vertices. Top left corner of the image
+     * will be [0, 0].
+     * 
+ * + * repeated .google.cloud.visionai.v1.NormalizedVertex normalized_vertices = 1; + */ + public com.google.cloud.visionai.v1.NormalizedVertexOrBuilder getNormalizedVerticesOrBuilder( + int index) { + if (normalizedVerticesBuilder_ == null) { + return normalizedVertices_.get(index); + } else { + return normalizedVerticesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * The bounding polygon normalized vertices. Top left corner of the image
+     * will be [0, 0].
+     * 
+ * + * repeated .google.cloud.visionai.v1.NormalizedVertex normalized_vertices = 1; + */ + public java.util.List + getNormalizedVerticesOrBuilderList() { + if (normalizedVerticesBuilder_ != null) { + return normalizedVerticesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(normalizedVertices_); + } + } + /** + * + * + *
+     * The bounding polygon normalized vertices. Top left corner of the image
+     * will be [0, 0].
+     * 
+ * + * repeated .google.cloud.visionai.v1.NormalizedVertex normalized_vertices = 1; + */ + public com.google.cloud.visionai.v1.NormalizedVertex.Builder addNormalizedVerticesBuilder() { + return getNormalizedVerticesFieldBuilder() + .addBuilder(com.google.cloud.visionai.v1.NormalizedVertex.getDefaultInstance()); + } + /** + * + * + *
+     * The bounding polygon normalized vertices. Top left corner of the image
+     * will be [0, 0].
+     * 
+ * + * repeated .google.cloud.visionai.v1.NormalizedVertex normalized_vertices = 1; + */ + public com.google.cloud.visionai.v1.NormalizedVertex.Builder addNormalizedVerticesBuilder( + int index) { + return getNormalizedVerticesFieldBuilder() + .addBuilder(index, com.google.cloud.visionai.v1.NormalizedVertex.getDefaultInstance()); + } + /** + * + * + *
+     * The bounding polygon normalized vertices. Top left corner of the image
+     * will be [0, 0].
+     * 
+ * + * repeated .google.cloud.visionai.v1.NormalizedVertex normalized_vertices = 1; + */ + public java.util.List + getNormalizedVerticesBuilderList() { + return getNormalizedVerticesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.visionai.v1.NormalizedVertex, + com.google.cloud.visionai.v1.NormalizedVertex.Builder, + com.google.cloud.visionai.v1.NormalizedVertexOrBuilder> + getNormalizedVerticesFieldBuilder() { + if (normalizedVerticesBuilder_ == null) { + normalizedVerticesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.visionai.v1.NormalizedVertex, + com.google.cloud.visionai.v1.NormalizedVertex.Builder, + com.google.cloud.visionai.v1.NormalizedVertexOrBuilder>( + normalizedVertices_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + normalizedVertices_ = null; + } + return normalizedVerticesBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.NormalizedPolygon) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.NormalizedPolygon) + private static final com.google.cloud.visionai.v1.NormalizedPolygon DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.NormalizedPolygon(); + } + + public static com.google.cloud.visionai.v1.NormalizedPolygon getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public NormalizedPolygon parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.NormalizedPolygon getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/NormalizedPolygonOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/NormalizedPolygonOrBuilder.java new file mode 100644 index 000000000000..fa5cab19ae96 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/NormalizedPolygonOrBuilder.java @@ -0,0 +1,83 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/annotations.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface NormalizedPolygonOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.NormalizedPolygon) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The bounding polygon normalized vertices. Top left corner of the image
+   * will be [0, 0].
+   * 
+ * + * repeated .google.cloud.visionai.v1.NormalizedVertex normalized_vertices = 1; + */ + java.util.List getNormalizedVerticesList(); + /** + * + * + *
+   * The bounding polygon normalized vertices. Top left corner of the image
+   * will be [0, 0].
+   * 
+ * + * repeated .google.cloud.visionai.v1.NormalizedVertex normalized_vertices = 1; + */ + com.google.cloud.visionai.v1.NormalizedVertex getNormalizedVertices(int index); + /** + * + * + *
+   * The bounding polygon normalized vertices. Top left corner of the image
+   * will be [0, 0].
+   * 
+ * + * repeated .google.cloud.visionai.v1.NormalizedVertex normalized_vertices = 1; + */ + int getNormalizedVerticesCount(); + /** + * + * + *
+   * The bounding polygon normalized vertices. Top left corner of the image
+   * will be [0, 0].
+   * 
+ * + * repeated .google.cloud.visionai.v1.NormalizedVertex normalized_vertices = 1; + */ + java.util.List + getNormalizedVerticesOrBuilderList(); + /** + * + * + *
+   * The bounding polygon normalized vertices. Top left corner of the image
+   * will be [0, 0].
+   * 
+ * + * repeated .google.cloud.visionai.v1.NormalizedVertex normalized_vertices = 1; + */ + com.google.cloud.visionai.v1.NormalizedVertexOrBuilder getNormalizedVerticesOrBuilder(int index); +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/NormalizedPolyline.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/NormalizedPolyline.java new file mode 100644 index 000000000000..97cdfd61bd65 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/NormalizedPolyline.java @@ -0,0 +1,952 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/annotations.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * Normalized Pplyline, which represents a curve consisting of connected
+ * straight-line segments.
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.NormalizedPolyline} + */ +public final class NormalizedPolyline extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.NormalizedPolyline) + NormalizedPolylineOrBuilder { + private static final long serialVersionUID = 0L; + // Use NormalizedPolyline.newBuilder() to construct. + private NormalizedPolyline(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private NormalizedPolyline() { + normalizedVertices_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new NormalizedPolyline(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.AnnotationsProto + .internal_static_google_cloud_visionai_v1_NormalizedPolyline_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.AnnotationsProto + .internal_static_google_cloud_visionai_v1_NormalizedPolyline_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.NormalizedPolyline.class, + com.google.cloud.visionai.v1.NormalizedPolyline.Builder.class); + } + + public static final int NORMALIZED_VERTICES_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List normalizedVertices_; + /** + * + * + *
+   * A sequence of vertices connected by straight lines.
+   * 
+ * + * repeated .google.cloud.visionai.v1.NormalizedVertex normalized_vertices = 1; + */ + @java.lang.Override + public java.util.List getNormalizedVerticesList() { + return normalizedVertices_; + } + /** + * + * + *
+   * A sequence of vertices connected by straight lines.
+   * 
+ * + * repeated .google.cloud.visionai.v1.NormalizedVertex normalized_vertices = 1; + */ + @java.lang.Override + public java.util.List + getNormalizedVerticesOrBuilderList() { + return normalizedVertices_; + } + /** + * + * + *
+   * A sequence of vertices connected by straight lines.
+   * 
+ * + * repeated .google.cloud.visionai.v1.NormalizedVertex normalized_vertices = 1; + */ + @java.lang.Override + public int getNormalizedVerticesCount() { + return normalizedVertices_.size(); + } + /** + * + * + *
+   * A sequence of vertices connected by straight lines.
+   * 
+ * + * repeated .google.cloud.visionai.v1.NormalizedVertex normalized_vertices = 1; + */ + @java.lang.Override + public com.google.cloud.visionai.v1.NormalizedVertex getNormalizedVertices(int index) { + return normalizedVertices_.get(index); + } + /** + * + * + *
+   * A sequence of vertices connected by straight lines.
+   * 
+ * + * repeated .google.cloud.visionai.v1.NormalizedVertex normalized_vertices = 1; + */ + @java.lang.Override + public com.google.cloud.visionai.v1.NormalizedVertexOrBuilder getNormalizedVerticesOrBuilder( + int index) { + return normalizedVertices_.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 < normalizedVertices_.size(); i++) { + output.writeMessage(1, normalizedVertices_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < normalizedVertices_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(1, normalizedVertices_.get(i)); + } + size += getUnknownFields().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.visionai.v1.NormalizedPolyline)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.NormalizedPolyline other = + (com.google.cloud.visionai.v1.NormalizedPolyline) obj; + + if (!getNormalizedVerticesList().equals(other.getNormalizedVerticesList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getNormalizedVerticesCount() > 0) { + hash = (37 * hash) + NORMALIZED_VERTICES_FIELD_NUMBER; + hash = (53 * hash) + getNormalizedVerticesList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.NormalizedPolyline parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.NormalizedPolyline 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.visionai.v1.NormalizedPolyline parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.NormalizedPolyline 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.visionai.v1.NormalizedPolyline parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.NormalizedPolyline parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.NormalizedPolyline parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.NormalizedPolyline 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.visionai.v1.NormalizedPolyline parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.NormalizedPolyline 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.visionai.v1.NormalizedPolyline parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.NormalizedPolyline 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.visionai.v1.NormalizedPolyline 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 Pplyline, which represents a curve consisting of connected
+   * straight-line segments.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.NormalizedPolyline} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.NormalizedPolyline) + com.google.cloud.visionai.v1.NormalizedPolylineOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.AnnotationsProto + .internal_static_google_cloud_visionai_v1_NormalizedPolyline_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.AnnotationsProto + .internal_static_google_cloud_visionai_v1_NormalizedPolyline_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.NormalizedPolyline.class, + com.google.cloud.visionai.v1.NormalizedPolyline.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.NormalizedPolyline.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (normalizedVerticesBuilder_ == null) { + normalizedVertices_ = java.util.Collections.emptyList(); + } else { + normalizedVertices_ = null; + normalizedVerticesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.AnnotationsProto + .internal_static_google_cloud_visionai_v1_NormalizedPolyline_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.NormalizedPolyline getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.NormalizedPolyline.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.NormalizedPolyline build() { + com.google.cloud.visionai.v1.NormalizedPolyline result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.NormalizedPolyline buildPartial() { + com.google.cloud.visionai.v1.NormalizedPolyline result = + new com.google.cloud.visionai.v1.NormalizedPolyline(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.visionai.v1.NormalizedPolyline result) { + if (normalizedVerticesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + normalizedVertices_ = java.util.Collections.unmodifiableList(normalizedVertices_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.normalizedVertices_ = normalizedVertices_; + } else { + result.normalizedVertices_ = normalizedVerticesBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.visionai.v1.NormalizedPolyline result) { + int from_bitField0_ = bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.NormalizedPolyline) { + return mergeFrom((com.google.cloud.visionai.v1.NormalizedPolyline) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.NormalizedPolyline other) { + if (other == com.google.cloud.visionai.v1.NormalizedPolyline.getDefaultInstance()) + return this; + if (normalizedVerticesBuilder_ == null) { + if (!other.normalizedVertices_.isEmpty()) { + if (normalizedVertices_.isEmpty()) { + normalizedVertices_ = other.normalizedVertices_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureNormalizedVerticesIsMutable(); + normalizedVertices_.addAll(other.normalizedVertices_); + } + onChanged(); + } + } else { + if (!other.normalizedVertices_.isEmpty()) { + if (normalizedVerticesBuilder_.isEmpty()) { + normalizedVerticesBuilder_.dispose(); + normalizedVerticesBuilder_ = null; + normalizedVertices_ = other.normalizedVertices_; + bitField0_ = (bitField0_ & ~0x00000001); + normalizedVerticesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getNormalizedVerticesFieldBuilder() + : null; + } else { + normalizedVerticesBuilder_.addAllMessages(other.normalizedVertices_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.visionai.v1.NormalizedVertex m = + input.readMessage( + com.google.cloud.visionai.v1.NormalizedVertex.parser(), extensionRegistry); + if (normalizedVerticesBuilder_ == null) { + ensureNormalizedVerticesIsMutable(); + normalizedVertices_.add(m); + } else { + normalizedVerticesBuilder_.addMessage(m); + } + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List normalizedVertices_ = + java.util.Collections.emptyList(); + + private void ensureNormalizedVerticesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + normalizedVertices_ = + new java.util.ArrayList( + normalizedVertices_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.visionai.v1.NormalizedVertex, + com.google.cloud.visionai.v1.NormalizedVertex.Builder, + com.google.cloud.visionai.v1.NormalizedVertexOrBuilder> + normalizedVerticesBuilder_; + + /** + * + * + *
+     * A sequence of vertices connected by straight lines.
+     * 
+ * + * repeated .google.cloud.visionai.v1.NormalizedVertex normalized_vertices = 1; + */ + public java.util.List + getNormalizedVerticesList() { + if (normalizedVerticesBuilder_ == null) { + return java.util.Collections.unmodifiableList(normalizedVertices_); + } else { + return normalizedVerticesBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * A sequence of vertices connected by straight lines.
+     * 
+ * + * repeated .google.cloud.visionai.v1.NormalizedVertex normalized_vertices = 1; + */ + public int getNormalizedVerticesCount() { + if (normalizedVerticesBuilder_ == null) { + return normalizedVertices_.size(); + } else { + return normalizedVerticesBuilder_.getCount(); + } + } + /** + * + * + *
+     * A sequence of vertices connected by straight lines.
+     * 
+ * + * repeated .google.cloud.visionai.v1.NormalizedVertex normalized_vertices = 1; + */ + public com.google.cloud.visionai.v1.NormalizedVertex getNormalizedVertices(int index) { + if (normalizedVerticesBuilder_ == null) { + return normalizedVertices_.get(index); + } else { + return normalizedVerticesBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * A sequence of vertices connected by straight lines.
+     * 
+ * + * repeated .google.cloud.visionai.v1.NormalizedVertex normalized_vertices = 1; + */ + public Builder setNormalizedVertices( + int index, com.google.cloud.visionai.v1.NormalizedVertex value) { + if (normalizedVerticesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureNormalizedVerticesIsMutable(); + normalizedVertices_.set(index, value); + onChanged(); + } else { + normalizedVerticesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * A sequence of vertices connected by straight lines.
+     * 
+ * + * repeated .google.cloud.visionai.v1.NormalizedVertex normalized_vertices = 1; + */ + public Builder setNormalizedVertices( + int index, com.google.cloud.visionai.v1.NormalizedVertex.Builder builderForValue) { + if (normalizedVerticesBuilder_ == null) { + ensureNormalizedVerticesIsMutable(); + normalizedVertices_.set(index, builderForValue.build()); + onChanged(); + } else { + normalizedVerticesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A sequence of vertices connected by straight lines.
+     * 
+ * + * repeated .google.cloud.visionai.v1.NormalizedVertex normalized_vertices = 1; + */ + public Builder addNormalizedVertices(com.google.cloud.visionai.v1.NormalizedVertex value) { + if (normalizedVerticesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureNormalizedVerticesIsMutable(); + normalizedVertices_.add(value); + onChanged(); + } else { + normalizedVerticesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * A sequence of vertices connected by straight lines.
+     * 
+ * + * repeated .google.cloud.visionai.v1.NormalizedVertex normalized_vertices = 1; + */ + public Builder addNormalizedVertices( + int index, com.google.cloud.visionai.v1.NormalizedVertex value) { + if (normalizedVerticesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureNormalizedVerticesIsMutable(); + normalizedVertices_.add(index, value); + onChanged(); + } else { + normalizedVerticesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * A sequence of vertices connected by straight lines.
+     * 
+ * + * repeated .google.cloud.visionai.v1.NormalizedVertex normalized_vertices = 1; + */ + public Builder addNormalizedVertices( + com.google.cloud.visionai.v1.NormalizedVertex.Builder builderForValue) { + if (normalizedVerticesBuilder_ == null) { + ensureNormalizedVerticesIsMutable(); + normalizedVertices_.add(builderForValue.build()); + onChanged(); + } else { + normalizedVerticesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A sequence of vertices connected by straight lines.
+     * 
+ * + * repeated .google.cloud.visionai.v1.NormalizedVertex normalized_vertices = 1; + */ + public Builder addNormalizedVertices( + int index, com.google.cloud.visionai.v1.NormalizedVertex.Builder builderForValue) { + if (normalizedVerticesBuilder_ == null) { + ensureNormalizedVerticesIsMutable(); + normalizedVertices_.add(index, builderForValue.build()); + onChanged(); + } else { + normalizedVerticesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A sequence of vertices connected by straight lines.
+     * 
+ * + * repeated .google.cloud.visionai.v1.NormalizedVertex normalized_vertices = 1; + */ + public Builder addAllNormalizedVertices( + java.lang.Iterable values) { + if (normalizedVerticesBuilder_ == null) { + ensureNormalizedVerticesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, normalizedVertices_); + onChanged(); + } else { + normalizedVerticesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * A sequence of vertices connected by straight lines.
+     * 
+ * + * repeated .google.cloud.visionai.v1.NormalizedVertex normalized_vertices = 1; + */ + public Builder clearNormalizedVertices() { + if (normalizedVerticesBuilder_ == null) { + normalizedVertices_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + normalizedVerticesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * A sequence of vertices connected by straight lines.
+     * 
+ * + * repeated .google.cloud.visionai.v1.NormalizedVertex normalized_vertices = 1; + */ + public Builder removeNormalizedVertices(int index) { + if (normalizedVerticesBuilder_ == null) { + ensureNormalizedVerticesIsMutable(); + normalizedVertices_.remove(index); + onChanged(); + } else { + normalizedVerticesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * A sequence of vertices connected by straight lines.
+     * 
+ * + * repeated .google.cloud.visionai.v1.NormalizedVertex normalized_vertices = 1; + */ + public com.google.cloud.visionai.v1.NormalizedVertex.Builder getNormalizedVerticesBuilder( + int index) { + return getNormalizedVerticesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * A sequence of vertices connected by straight lines.
+     * 
+ * + * repeated .google.cloud.visionai.v1.NormalizedVertex normalized_vertices = 1; + */ + public com.google.cloud.visionai.v1.NormalizedVertexOrBuilder getNormalizedVerticesOrBuilder( + int index) { + if (normalizedVerticesBuilder_ == null) { + return normalizedVertices_.get(index); + } else { + return normalizedVerticesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * A sequence of vertices connected by straight lines.
+     * 
+ * + * repeated .google.cloud.visionai.v1.NormalizedVertex normalized_vertices = 1; + */ + public java.util.List + getNormalizedVerticesOrBuilderList() { + if (normalizedVerticesBuilder_ != null) { + return normalizedVerticesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(normalizedVertices_); + } + } + /** + * + * + *
+     * A sequence of vertices connected by straight lines.
+     * 
+ * + * repeated .google.cloud.visionai.v1.NormalizedVertex normalized_vertices = 1; + */ + public com.google.cloud.visionai.v1.NormalizedVertex.Builder addNormalizedVerticesBuilder() { + return getNormalizedVerticesFieldBuilder() + .addBuilder(com.google.cloud.visionai.v1.NormalizedVertex.getDefaultInstance()); + } + /** + * + * + *
+     * A sequence of vertices connected by straight lines.
+     * 
+ * + * repeated .google.cloud.visionai.v1.NormalizedVertex normalized_vertices = 1; + */ + public com.google.cloud.visionai.v1.NormalizedVertex.Builder addNormalizedVerticesBuilder( + int index) { + return getNormalizedVerticesFieldBuilder() + .addBuilder(index, com.google.cloud.visionai.v1.NormalizedVertex.getDefaultInstance()); + } + /** + * + * + *
+     * A sequence of vertices connected by straight lines.
+     * 
+ * + * repeated .google.cloud.visionai.v1.NormalizedVertex normalized_vertices = 1; + */ + public java.util.List + getNormalizedVerticesBuilderList() { + return getNormalizedVerticesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.visionai.v1.NormalizedVertex, + com.google.cloud.visionai.v1.NormalizedVertex.Builder, + com.google.cloud.visionai.v1.NormalizedVertexOrBuilder> + getNormalizedVerticesFieldBuilder() { + if (normalizedVerticesBuilder_ == null) { + normalizedVerticesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.visionai.v1.NormalizedVertex, + com.google.cloud.visionai.v1.NormalizedVertex.Builder, + com.google.cloud.visionai.v1.NormalizedVertexOrBuilder>( + normalizedVertices_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + normalizedVertices_ = null; + } + return normalizedVerticesBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.NormalizedPolyline) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.NormalizedPolyline) + private static final com.google.cloud.visionai.v1.NormalizedPolyline DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.NormalizedPolyline(); + } + + public static com.google.cloud.visionai.v1.NormalizedPolyline getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public NormalizedPolyline parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.NormalizedPolyline getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/NormalizedPolylineOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/NormalizedPolylineOrBuilder.java new file mode 100644 index 000000000000..f5638ae24e07 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/NormalizedPolylineOrBuilder.java @@ -0,0 +1,78 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/annotations.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface NormalizedPolylineOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.NormalizedPolyline) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * A sequence of vertices connected by straight lines.
+   * 
+ * + * repeated .google.cloud.visionai.v1.NormalizedVertex normalized_vertices = 1; + */ + java.util.List getNormalizedVerticesList(); + /** + * + * + *
+   * A sequence of vertices connected by straight lines.
+   * 
+ * + * repeated .google.cloud.visionai.v1.NormalizedVertex normalized_vertices = 1; + */ + com.google.cloud.visionai.v1.NormalizedVertex getNormalizedVertices(int index); + /** + * + * + *
+   * A sequence of vertices connected by straight lines.
+   * 
+ * + * repeated .google.cloud.visionai.v1.NormalizedVertex normalized_vertices = 1; + */ + int getNormalizedVerticesCount(); + /** + * + * + *
+   * A sequence of vertices connected by straight lines.
+   * 
+ * + * repeated .google.cloud.visionai.v1.NormalizedVertex normalized_vertices = 1; + */ + java.util.List + getNormalizedVerticesOrBuilderList(); + /** + * + * + *
+   * A sequence of vertices connected by straight lines.
+   * 
+ * + * repeated .google.cloud.visionai.v1.NormalizedVertex normalized_vertices = 1; + */ + com.google.cloud.visionai.v1.NormalizedVertexOrBuilder getNormalizedVerticesOrBuilder(int index); +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/NormalizedVertex.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/NormalizedVertex.java new file mode 100644 index 000000000000..c2c78b1dbba2 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/NormalizedVertex.java @@ -0,0 +1,633 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/annotations.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * 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.visionai.v1.NormalizedVertex} + */ +public final class NormalizedVertex extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.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() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new NormalizedVertex(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.AnnotationsProto + .internal_static_google_cloud_visionai_v1_NormalizedVertex_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.AnnotationsProto + .internal_static_google_cloud_visionai_v1_NormalizedVertex_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.NormalizedVertex.class, + com.google.cloud.visionai.v1.NormalizedVertex.Builder.class); + } + + public static final int X_FIELD_NUMBER = 1; + private float x_ = 0F; + /** + * + * + *
+   * X coordinate.
+   * 
+ * + * float x = 1; + * + * @return The x. + */ + @java.lang.Override + public float getX() { + return x_; + } + + public static final int Y_FIELD_NUMBER = 2; + private float y_ = 0F; + /** + * + * + *
+   * Y coordinate.
+   * 
+ * + * float y = 2; + * + * @return The y. + */ + @java.lang.Override + 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 (java.lang.Float.floatToRawIntBits(x_) != 0) { + output.writeFloat(1, x_); + } + if (java.lang.Float.floatToRawIntBits(y_) != 0) { + output.writeFloat(2, y_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (java.lang.Float.floatToRawIntBits(x_) != 0) { + size += com.google.protobuf.CodedOutputStream.computeFloatSize(1, x_); + } + if (java.lang.Float.floatToRawIntBits(y_) != 0) { + size += com.google.protobuf.CodedOutputStream.computeFloatSize(2, y_); + } + size += getUnknownFields().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.visionai.v1.NormalizedVertex)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.NormalizedVertex other = + (com.google.cloud.visionai.v1.NormalizedVertex) obj; + + if (java.lang.Float.floatToIntBits(getX()) != java.lang.Float.floatToIntBits(other.getX())) + return false; + if (java.lang.Float.floatToIntBits(getY()) != java.lang.Float.floatToIntBits(other.getY())) + return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @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) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.NormalizedVertex parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.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.visionai.v1.NormalizedVertex parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.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.visionai.v1.NormalizedVertex parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.NormalizedVertex parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.NormalizedVertex parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.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.visionai.v1.NormalizedVertex parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.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.visionai.v1.NormalizedVertex parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.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.visionai.v1.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.visionai.v1.NormalizedVertex} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.NormalizedVertex) + com.google.cloud.visionai.v1.NormalizedVertexOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.AnnotationsProto + .internal_static_google_cloud_visionai_v1_NormalizedVertex_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.AnnotationsProto + .internal_static_google_cloud_visionai_v1_NormalizedVertex_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.NormalizedVertex.class, + com.google.cloud.visionai.v1.NormalizedVertex.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.NormalizedVertex.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + x_ = 0F; + y_ = 0F; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.AnnotationsProto + .internal_static_google_cloud_visionai_v1_NormalizedVertex_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.NormalizedVertex getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.NormalizedVertex.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.NormalizedVertex build() { + com.google.cloud.visionai.v1.NormalizedVertex result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.NormalizedVertex buildPartial() { + com.google.cloud.visionai.v1.NormalizedVertex result = + new com.google.cloud.visionai.v1.NormalizedVertex(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.visionai.v1.NormalizedVertex result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.x_ = x_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.y_ = y_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.NormalizedVertex) { + return mergeFrom((com.google.cloud.visionai.v1.NormalizedVertex) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.NormalizedVertex other) { + if (other == com.google.cloud.visionai.v1.NormalizedVertex.getDefaultInstance()) return this; + if (other.getX() != 0F) { + setX(other.getX()); + } + if (other.getY() != 0F) { + setY(other.getY()); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 13: + { + x_ = input.readFloat(); + bitField0_ |= 0x00000001; + break; + } // case 13 + case 21: + { + y_ = input.readFloat(); + bitField0_ |= 0x00000002; + break; + } // case 21 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private float x_; + /** + * + * + *
+     * X coordinate.
+     * 
+ * + * float x = 1; + * + * @return The x. + */ + @java.lang.Override + public float getX() { + return x_; + } + /** + * + * + *
+     * X coordinate.
+     * 
+ * + * float x = 1; + * + * @param value The x to set. + * @return This builder for chaining. + */ + public Builder setX(float value) { + + x_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * X coordinate.
+     * 
+ * + * float x = 1; + * + * @return This builder for chaining. + */ + public Builder clearX() { + bitField0_ = (bitField0_ & ~0x00000001); + x_ = 0F; + onChanged(); + return this; + } + + private float y_; + /** + * + * + *
+     * Y coordinate.
+     * 
+ * + * float y = 2; + * + * @return The y. + */ + @java.lang.Override + public float getY() { + return y_; + } + /** + * + * + *
+     * Y coordinate.
+     * 
+ * + * float y = 2; + * + * @param value The y to set. + * @return This builder for chaining. + */ + public Builder setY(float value) { + + y_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Y coordinate.
+     * 
+ * + * float y = 2; + * + * @return This builder for chaining. + */ + public Builder clearY() { + bitField0_ = (bitField0_ & ~0x00000002); + y_ = 0F; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.NormalizedVertex) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.NormalizedVertex) + private static final com.google.cloud.visionai.v1.NormalizedVertex DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.NormalizedVertex(); + } + + public static com.google.cloud.visionai.v1.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 { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.NormalizedVertex getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/NormalizedVertexOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/NormalizedVertexOrBuilder.java new file mode 100644 index 000000000000..7c248a2bf28f --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/NormalizedVertexOrBuilder.java @@ -0,0 +1,52 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/annotations.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface NormalizedVertexOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.NormalizedVertex) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * X coordinate.
+   * 
+ * + * float x = 1; + * + * @return The x. + */ + float getX(); + + /** + * + * + *
+   * Y coordinate.
+   * 
+ * + * float y = 2; + * + * @return The y. + */ + float getY(); +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ObjectDetectionPredictionResult.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ObjectDetectionPredictionResult.java new file mode 100644 index 000000000000..18d823740894 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ObjectDetectionPredictionResult.java @@ -0,0 +1,4376 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/annotations.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * Prediction output format for Generic Object Detection.
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.ObjectDetectionPredictionResult} + */ +public final class ObjectDetectionPredictionResult extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.ObjectDetectionPredictionResult) + ObjectDetectionPredictionResultOrBuilder { + private static final long serialVersionUID = 0L; + // Use ObjectDetectionPredictionResult.newBuilder() to construct. + private ObjectDetectionPredictionResult( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ObjectDetectionPredictionResult() { + identifiedBoxes_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ObjectDetectionPredictionResult(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.AnnotationsProto + .internal_static_google_cloud_visionai_v1_ObjectDetectionPredictionResult_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.AnnotationsProto + .internal_static_google_cloud_visionai_v1_ObjectDetectionPredictionResult_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.class, + com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.Builder.class); + } + + public interface EntityOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.ObjectDetectionPredictionResult.Entity) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Label id.
+     * 
+ * + * int64 label_id = 1; + * + * @return The labelId. + */ + long getLabelId(); + + /** + * + * + *
+     * Human readable string of the label.
+     * 
+ * + * string label_string = 2; + * + * @return The labelString. + */ + java.lang.String getLabelString(); + /** + * + * + *
+     * Human readable string of the label.
+     * 
+ * + * string label_string = 2; + * + * @return The bytes for labelString. + */ + com.google.protobuf.ByteString getLabelStringBytes(); + } + /** + * + * + *
+   * The entity info for annotations from object detection prediction result.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.ObjectDetectionPredictionResult.Entity} + */ + public static final class Entity extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.ObjectDetectionPredictionResult.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() { + labelString_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Entity(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.AnnotationsProto + .internal_static_google_cloud_visionai_v1_ObjectDetectionPredictionResult_Entity_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.AnnotationsProto + .internal_static_google_cloud_visionai_v1_ObjectDetectionPredictionResult_Entity_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.Entity.class, + com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.Entity.Builder.class); + } + + public static final int LABEL_ID_FIELD_NUMBER = 1; + private long labelId_ = 0L; + /** + * + * + *
+     * Label id.
+     * 
+ * + * int64 label_id = 1; + * + * @return The labelId. + */ + @java.lang.Override + public long getLabelId() { + return labelId_; + } + + public static final int LABEL_STRING_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object labelString_ = ""; + /** + * + * + *
+     * Human readable string of the label.
+     * 
+ * + * string label_string = 2; + * + * @return The labelString. + */ + @java.lang.Override + public java.lang.String getLabelString() { + java.lang.Object ref = labelString_; + 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(); + labelString_ = s; + return s; + } + } + /** + * + * + *
+     * Human readable string of the label.
+     * 
+ * + * string label_string = 2; + * + * @return The bytes for labelString. + */ + @java.lang.Override + public com.google.protobuf.ByteString getLabelStringBytes() { + java.lang.Object ref = labelString_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + labelString_ = 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 (labelId_ != 0L) { + output.writeInt64(1, labelId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(labelString_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, labelString_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (labelId_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(1, labelId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(labelString_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, labelString_); + } + size += getUnknownFields().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.visionai.v1.ObjectDetectionPredictionResult.Entity)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.Entity other = + (com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.Entity) obj; + + if (getLabelId() != other.getLabelId()) return false; + if (!getLabelString().equals(other.getLabelString())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + LABEL_ID_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getLabelId()); + hash = (37 * hash) + LABEL_STRING_FIELD_NUMBER; + hash = (53 * hash) + getLabelString().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.Entity parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.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.visionai.v1.ObjectDetectionPredictionResult.Entity parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.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.visionai.v1.ObjectDetectionPredictionResult.Entity parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.Entity parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.Entity parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.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.visionai.v1.ObjectDetectionPredictionResult.Entity + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.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.visionai.v1.ObjectDetectionPredictionResult.Entity parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.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.visionai.v1.ObjectDetectionPredictionResult.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; + } + /** + * + * + *
+     * The entity info for annotations from object detection prediction result.
+     * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.ObjectDetectionPredictionResult.Entity} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.ObjectDetectionPredictionResult.Entity) + com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.EntityOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.AnnotationsProto + .internal_static_google_cloud_visionai_v1_ObjectDetectionPredictionResult_Entity_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.AnnotationsProto + .internal_static_google_cloud_visionai_v1_ObjectDetectionPredictionResult_Entity_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.Entity.class, + com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.Entity.Builder.class); + } + + // Construct using + // com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.Entity.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + labelId_ = 0L; + labelString_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.AnnotationsProto + .internal_static_google_cloud_visionai_v1_ObjectDetectionPredictionResult_Entity_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.Entity + getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.Entity + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.Entity build() { + com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.Entity result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.Entity buildPartial() { + com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.Entity result = + new com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.Entity(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.Entity result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.labelId_ = labelId_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.labelString_ = labelString_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.Entity) { + return mergeFrom( + (com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.Entity) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.Entity other) { + if (other + == com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.Entity + .getDefaultInstance()) return this; + if (other.getLabelId() != 0L) { + setLabelId(other.getLabelId()); + } + if (!other.getLabelString().isEmpty()) { + labelString_ = other.labelString_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + labelId_ = input.readInt64(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 18: + { + labelString_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private long labelId_; + /** + * + * + *
+       * Label id.
+       * 
+ * + * int64 label_id = 1; + * + * @return The labelId. + */ + @java.lang.Override + public long getLabelId() { + return labelId_; + } + /** + * + * + *
+       * Label id.
+       * 
+ * + * int64 label_id = 1; + * + * @param value The labelId to set. + * @return This builder for chaining. + */ + public Builder setLabelId(long value) { + + labelId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * Label id.
+       * 
+ * + * int64 label_id = 1; + * + * @return This builder for chaining. + */ + public Builder clearLabelId() { + bitField0_ = (bitField0_ & ~0x00000001); + labelId_ = 0L; + onChanged(); + return this; + } + + private java.lang.Object labelString_ = ""; + /** + * + * + *
+       * Human readable string of the label.
+       * 
+ * + * string label_string = 2; + * + * @return The labelString. + */ + public java.lang.String getLabelString() { + java.lang.Object ref = labelString_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + labelString_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * Human readable string of the label.
+       * 
+ * + * string label_string = 2; + * + * @return The bytes for labelString. + */ + public com.google.protobuf.ByteString getLabelStringBytes() { + java.lang.Object ref = labelString_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + labelString_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * Human readable string of the label.
+       * 
+ * + * string label_string = 2; + * + * @param value The labelString to set. + * @return This builder for chaining. + */ + public Builder setLabelString(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + labelString_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * Human readable string of the label.
+       * 
+ * + * string label_string = 2; + * + * @return This builder for chaining. + */ + public Builder clearLabelString() { + labelString_ = getDefaultInstance().getLabelString(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+       * Human readable string of the label.
+       * 
+ * + * string label_string = 2; + * + * @param value The bytes for labelString to set. + * @return This builder for chaining. + */ + public Builder setLabelStringBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + labelString_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.ObjectDetectionPredictionResult.Entity) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.ObjectDetectionPredictionResult.Entity) + private static final com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.Entity + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.Entity(); + } + + public static com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.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 { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.ObjectDetectionPredictionResult.Entity + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface IdentifiedBoxOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * An unique id for this box.
+     * 
+ * + * int64 box_id = 1; + * + * @return The boxId. + */ + long getBoxId(); + + /** + * + * + *
+     * Bounding Box in the normalized coordinates.
+     * 
+ * + * + * .google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox.NormalizedBoundingBox normalized_bounding_box = 2; + * + * + * @return Whether the normalizedBoundingBox field is set. + */ + boolean hasNormalizedBoundingBox(); + /** + * + * + *
+     * Bounding Box in the normalized coordinates.
+     * 
+ * + * + * .google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox.NormalizedBoundingBox normalized_bounding_box = 2; + * + * + * @return The normalizedBoundingBox. + */ + com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox.NormalizedBoundingBox + getNormalizedBoundingBox(); + /** + * + * + *
+     * Bounding Box in the normalized coordinates.
+     * 
+ * + * + * .google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox.NormalizedBoundingBox normalized_bounding_box = 2; + * + */ + com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox + .NormalizedBoundingBoxOrBuilder + getNormalizedBoundingBoxOrBuilder(); + + /** + * + * + *
+     * Confidence score associated with this box.
+     * 
+ * + * float confidence_score = 3; + * + * @return The confidenceScore. + */ + float getConfidenceScore(); + + /** + * + * + *
+     * Entity of this box.
+     * 
+ * + * .google.cloud.visionai.v1.ObjectDetectionPredictionResult.Entity entity = 4; + * + * @return Whether the entity field is set. + */ + boolean hasEntity(); + /** + * + * + *
+     * Entity of this box.
+     * 
+ * + * .google.cloud.visionai.v1.ObjectDetectionPredictionResult.Entity entity = 4; + * + * @return The entity. + */ + com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.Entity getEntity(); + /** + * + * + *
+     * Entity of this box.
+     * 
+ * + * .google.cloud.visionai.v1.ObjectDetectionPredictionResult.Entity entity = 4; + */ + com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.EntityOrBuilder + getEntityOrBuilder(); + } + /** + * + * + *
+   * Identified box contains location and the entity of the object.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox} + */ + public static final class IdentifiedBox extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox) + IdentifiedBoxOrBuilder { + private static final long serialVersionUID = 0L; + // Use IdentifiedBox.newBuilder() to construct. + private IdentifiedBox(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private IdentifiedBox() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new IdentifiedBox(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.AnnotationsProto + .internal_static_google_cloud_visionai_v1_ObjectDetectionPredictionResult_IdentifiedBox_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.AnnotationsProto + .internal_static_google_cloud_visionai_v1_ObjectDetectionPredictionResult_IdentifiedBox_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox.class, + com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox.Builder + .class); + } + + public interface NormalizedBoundingBoxOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox.NormalizedBoundingBox) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+       * Min in x coordinate.
+       * 
+ * + * float xmin = 1; + * + * @return The xmin. + */ + float getXmin(); + + /** + * + * + *
+       * Min in y coordinate.
+       * 
+ * + * float ymin = 2; + * + * @return The ymin. + */ + float getYmin(); + + /** + * + * + *
+       * Width of the bounding box.
+       * 
+ * + * float width = 3; + * + * @return The width. + */ + float getWidth(); + + /** + * + * + *
+       * Height of the bounding box.
+       * 
+ * + * float height = 4; + * + * @return The height. + */ + float getHeight(); + } + /** + * + * + *
+     * Bounding Box in the normalized coordinates.
+     * 
+ * + * Protobuf type {@code + * google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox.NormalizedBoundingBox} + */ + public static final class NormalizedBoundingBox extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox.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() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new NormalizedBoundingBox(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.AnnotationsProto + .internal_static_google_cloud_visionai_v1_ObjectDetectionPredictionResult_IdentifiedBox_NormalizedBoundingBox_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.AnnotationsProto + .internal_static_google_cloud_visionai_v1_ObjectDetectionPredictionResult_IdentifiedBox_NormalizedBoundingBox_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox + .NormalizedBoundingBox.class, + com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox + .NormalizedBoundingBox.Builder.class); + } + + public static final int XMIN_FIELD_NUMBER = 1; + private float xmin_ = 0F; + /** + * + * + *
+       * Min in x coordinate.
+       * 
+ * + * float xmin = 1; + * + * @return The xmin. + */ + @java.lang.Override + public float getXmin() { + return xmin_; + } + + public static final int YMIN_FIELD_NUMBER = 2; + private float ymin_ = 0F; + /** + * + * + *
+       * Min in y coordinate.
+       * 
+ * + * float ymin = 2; + * + * @return The ymin. + */ + @java.lang.Override + public float getYmin() { + return ymin_; + } + + public static final int WIDTH_FIELD_NUMBER = 3; + private float width_ = 0F; + /** + * + * + *
+       * Width of the bounding box.
+       * 
+ * + * float width = 3; + * + * @return The width. + */ + @java.lang.Override + public float getWidth() { + return width_; + } + + public static final int HEIGHT_FIELD_NUMBER = 4; + private float height_ = 0F; + /** + * + * + *
+       * Height of the bounding box.
+       * 
+ * + * float height = 4; + * + * @return The height. + */ + @java.lang.Override + public float getHeight() { + return height_; + } + + 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 (java.lang.Float.floatToRawIntBits(xmin_) != 0) { + output.writeFloat(1, xmin_); + } + if (java.lang.Float.floatToRawIntBits(ymin_) != 0) { + output.writeFloat(2, ymin_); + } + if (java.lang.Float.floatToRawIntBits(width_) != 0) { + output.writeFloat(3, width_); + } + if (java.lang.Float.floatToRawIntBits(height_) != 0) { + output.writeFloat(4, height_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (java.lang.Float.floatToRawIntBits(xmin_) != 0) { + size += com.google.protobuf.CodedOutputStream.computeFloatSize(1, xmin_); + } + if (java.lang.Float.floatToRawIntBits(ymin_) != 0) { + size += com.google.protobuf.CodedOutputStream.computeFloatSize(2, ymin_); + } + if (java.lang.Float.floatToRawIntBits(width_) != 0) { + size += com.google.protobuf.CodedOutputStream.computeFloatSize(3, width_); + } + if (java.lang.Float.floatToRawIntBits(height_) != 0) { + size += com.google.protobuf.CodedOutputStream.computeFloatSize(4, height_); + } + size += getUnknownFields().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.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox + .NormalizedBoundingBox)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox + .NormalizedBoundingBox + other = + (com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox + .NormalizedBoundingBox) + obj; + + if (java.lang.Float.floatToIntBits(getXmin()) + != java.lang.Float.floatToIntBits(other.getXmin())) return false; + if (java.lang.Float.floatToIntBits(getYmin()) + != java.lang.Float.floatToIntBits(other.getYmin())) return false; + if (java.lang.Float.floatToIntBits(getWidth()) + != java.lang.Float.floatToIntBits(other.getWidth())) return false; + if (java.lang.Float.floatToIntBits(getHeight()) + != java.lang.Float.floatToIntBits(other.getHeight())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + XMIN_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits(getXmin()); + hash = (37 * hash) + YMIN_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits(getYmin()); + hash = (37 * hash) + WIDTH_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits(getWidth()); + hash = (37 * hash) + HEIGHT_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits(getHeight()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox + .NormalizedBoundingBox + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox + .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.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox + .NormalizedBoundingBox + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox + .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.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox + .NormalizedBoundingBox + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox + .NormalizedBoundingBox + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox + .NormalizedBoundingBox + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox + .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.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox + .NormalizedBoundingBox + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox + .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.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox + .NormalizedBoundingBox + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox + .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.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox + .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; + } + /** + * + * + *
+       * Bounding Box in the normalized coordinates.
+       * 
+ * + * Protobuf type {@code + * google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox.NormalizedBoundingBox} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox.NormalizedBoundingBox) + com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox + .NormalizedBoundingBoxOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.AnnotationsProto + .internal_static_google_cloud_visionai_v1_ObjectDetectionPredictionResult_IdentifiedBox_NormalizedBoundingBox_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.AnnotationsProto + .internal_static_google_cloud_visionai_v1_ObjectDetectionPredictionResult_IdentifiedBox_NormalizedBoundingBox_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox + .NormalizedBoundingBox.class, + com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox + .NormalizedBoundingBox.Builder.class); + } + + // Construct using + // com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox.NormalizedBoundingBox.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + xmin_ = 0F; + ymin_ = 0F; + width_ = 0F; + height_ = 0F; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.AnnotationsProto + .internal_static_google_cloud_visionai_v1_ObjectDetectionPredictionResult_IdentifiedBox_NormalizedBoundingBox_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox + .NormalizedBoundingBox + getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox + .NormalizedBoundingBox.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox + .NormalizedBoundingBox + build() { + com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox + .NormalizedBoundingBox + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox + .NormalizedBoundingBox + buildPartial() { + com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox + .NormalizedBoundingBox + result = + new com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox + .NormalizedBoundingBox(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox + .NormalizedBoundingBox + result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.xmin_ = xmin_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.ymin_ = ymin_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.width_ = width_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.height_ = height_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox + .NormalizedBoundingBox) { + return mergeFrom( + (com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox + .NormalizedBoundingBox) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox + .NormalizedBoundingBox + other) { + if (other + == com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox + .NormalizedBoundingBox.getDefaultInstance()) return this; + if (other.getXmin() != 0F) { + setXmin(other.getXmin()); + } + if (other.getYmin() != 0F) { + setYmin(other.getYmin()); + } + if (other.getWidth() != 0F) { + setWidth(other.getWidth()); + } + if (other.getHeight() != 0F) { + setHeight(other.getHeight()); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 13: + { + xmin_ = input.readFloat(); + bitField0_ |= 0x00000001; + break; + } // case 13 + case 21: + { + ymin_ = input.readFloat(); + bitField0_ |= 0x00000002; + break; + } // case 21 + case 29: + { + width_ = input.readFloat(); + bitField0_ |= 0x00000004; + break; + } // case 29 + case 37: + { + height_ = input.readFloat(); + bitField0_ |= 0x00000008; + break; + } // case 37 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private float xmin_; + /** + * + * + *
+         * Min in x coordinate.
+         * 
+ * + * float xmin = 1; + * + * @return The xmin. + */ + @java.lang.Override + public float getXmin() { + return xmin_; + } + /** + * + * + *
+         * Min in x coordinate.
+         * 
+ * + * float xmin = 1; + * + * @param value The xmin to set. + * @return This builder for chaining. + */ + public Builder setXmin(float value) { + + xmin_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+         * Min in x coordinate.
+         * 
+ * + * float xmin = 1; + * + * @return This builder for chaining. + */ + public Builder clearXmin() { + bitField0_ = (bitField0_ & ~0x00000001); + xmin_ = 0F; + onChanged(); + return this; + } + + private float ymin_; + /** + * + * + *
+         * Min in y coordinate.
+         * 
+ * + * float ymin = 2; + * + * @return The ymin. + */ + @java.lang.Override + public float getYmin() { + return ymin_; + } + /** + * + * + *
+         * Min in y coordinate.
+         * 
+ * + * float ymin = 2; + * + * @param value The ymin to set. + * @return This builder for chaining. + */ + public Builder setYmin(float value) { + + ymin_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+         * Min in y coordinate.
+         * 
+ * + * float ymin = 2; + * + * @return This builder for chaining. + */ + public Builder clearYmin() { + bitField0_ = (bitField0_ & ~0x00000002); + ymin_ = 0F; + onChanged(); + return this; + } + + private float width_; + /** + * + * + *
+         * Width of the bounding box.
+         * 
+ * + * float width = 3; + * + * @return The width. + */ + @java.lang.Override + public float getWidth() { + return width_; + } + /** + * + * + *
+         * Width of the bounding box.
+         * 
+ * + * float width = 3; + * + * @param value The width to set. + * @return This builder for chaining. + */ + public Builder setWidth(float value) { + + width_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+         * Width of the bounding box.
+         * 
+ * + * float width = 3; + * + * @return This builder for chaining. + */ + public Builder clearWidth() { + bitField0_ = (bitField0_ & ~0x00000004); + width_ = 0F; + onChanged(); + return this; + } + + private float height_; + /** + * + * + *
+         * Height of the bounding box.
+         * 
+ * + * float height = 4; + * + * @return The height. + */ + @java.lang.Override + public float getHeight() { + return height_; + } + /** + * + * + *
+         * Height of the bounding box.
+         * 
+ * + * float height = 4; + * + * @param value The height to set. + * @return This builder for chaining. + */ + public Builder setHeight(float value) { + + height_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+         * Height of the bounding box.
+         * 
+ * + * float height = 4; + * + * @return This builder for chaining. + */ + public Builder clearHeight() { + bitField0_ = (bitField0_ & ~0x00000008); + height_ = 0F; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox.NormalizedBoundingBox) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox.NormalizedBoundingBox) + private static final com.google.cloud.visionai.v1.ObjectDetectionPredictionResult + .IdentifiedBox.NormalizedBoundingBox + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox + .NormalizedBoundingBox(); + } + + public static com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox + .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 { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox + .NormalizedBoundingBox + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int bitField0_; + public static final int BOX_ID_FIELD_NUMBER = 1; + private long boxId_ = 0L; + /** + * + * + *
+     * An unique id for this box.
+     * 
+ * + * int64 box_id = 1; + * + * @return The boxId. + */ + @java.lang.Override + public long getBoxId() { + return boxId_; + } + + public static final int NORMALIZED_BOUNDING_BOX_FIELD_NUMBER = 2; + private com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox + .NormalizedBoundingBox + normalizedBoundingBox_; + /** + * + * + *
+     * Bounding Box in the normalized coordinates.
+     * 
+ * + * + * .google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox.NormalizedBoundingBox normalized_bounding_box = 2; + * + * + * @return Whether the normalizedBoundingBox field is set. + */ + @java.lang.Override + public boolean hasNormalizedBoundingBox() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * Bounding Box in the normalized coordinates.
+     * 
+ * + * + * .google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox.NormalizedBoundingBox normalized_bounding_box = 2; + * + * + * @return The normalizedBoundingBox. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox + .NormalizedBoundingBox + getNormalizedBoundingBox() { + return normalizedBoundingBox_ == null + ? com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox + .NormalizedBoundingBox.getDefaultInstance() + : normalizedBoundingBox_; + } + /** + * + * + *
+     * Bounding Box in the normalized coordinates.
+     * 
+ * + * + * .google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox.NormalizedBoundingBox normalized_bounding_box = 2; + * + */ + @java.lang.Override + public com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox + .NormalizedBoundingBoxOrBuilder + getNormalizedBoundingBoxOrBuilder() { + return normalizedBoundingBox_ == null + ? com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox + .NormalizedBoundingBox.getDefaultInstance() + : normalizedBoundingBox_; + } + + public static final int CONFIDENCE_SCORE_FIELD_NUMBER = 3; + private float confidenceScore_ = 0F; + /** + * + * + *
+     * Confidence score associated with this box.
+     * 
+ * + * float confidence_score = 3; + * + * @return The confidenceScore. + */ + @java.lang.Override + public float getConfidenceScore() { + return confidenceScore_; + } + + public static final int ENTITY_FIELD_NUMBER = 4; + private com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.Entity entity_; + /** + * + * + *
+     * Entity of this box.
+     * 
+ * + * .google.cloud.visionai.v1.ObjectDetectionPredictionResult.Entity entity = 4; + * + * @return Whether the entity field is set. + */ + @java.lang.Override + public boolean hasEntity() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * Entity of this box.
+     * 
+ * + * .google.cloud.visionai.v1.ObjectDetectionPredictionResult.Entity entity = 4; + * + * @return The entity. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.Entity getEntity() { + return entity_ == null + ? com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.Entity.getDefaultInstance() + : entity_; + } + /** + * + * + *
+     * Entity of this box.
+     * 
+ * + * .google.cloud.visionai.v1.ObjectDetectionPredictionResult.Entity entity = 4; + */ + @java.lang.Override + public com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.EntityOrBuilder + getEntityOrBuilder() { + return entity_ == null + ? com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.Entity.getDefaultInstance() + : entity_; + } + + 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 (boxId_ != 0L) { + output.writeInt64(1, boxId_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getNormalizedBoundingBox()); + } + if (java.lang.Float.floatToRawIntBits(confidenceScore_) != 0) { + output.writeFloat(3, confidenceScore_); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(4, getEntity()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (boxId_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(1, boxId_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(2, getNormalizedBoundingBox()); + } + if (java.lang.Float.floatToRawIntBits(confidenceScore_) != 0) { + size += com.google.protobuf.CodedOutputStream.computeFloatSize(3, confidenceScore_); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getEntity()); + } + size += getUnknownFields().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.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox other = + (com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox) obj; + + if (getBoxId() != other.getBoxId()) return false; + if (hasNormalizedBoundingBox() != other.hasNormalizedBoundingBox()) return false; + if (hasNormalizedBoundingBox()) { + if (!getNormalizedBoundingBox().equals(other.getNormalizedBoundingBox())) return false; + } + if (java.lang.Float.floatToIntBits(getConfidenceScore()) + != java.lang.Float.floatToIntBits(other.getConfidenceScore())) return false; + if (hasEntity() != other.hasEntity()) return false; + if (hasEntity()) { + if (!getEntity().equals(other.getEntity())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + BOX_ID_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getBoxId()); + if (hasNormalizedBoundingBox()) { + hash = (37 * hash) + NORMALIZED_BOUNDING_BOX_FIELD_NUMBER; + hash = (53 * hash) + getNormalizedBoundingBox().hashCode(); + } + hash = (37 * hash) + CONFIDENCE_SCORE_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits(getConfidenceScore()); + if (hasEntity()) { + hash = (37 * hash) + ENTITY_FIELD_NUMBER; + hash = (53 * hash) + getEntity().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox + 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.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox + 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.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox + 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.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox + 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.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox + 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.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox 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; + } + /** + * + * + *
+     * Identified box contains location and the entity of the object.
+     * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox) + com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBoxOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.AnnotationsProto + .internal_static_google_cloud_visionai_v1_ObjectDetectionPredictionResult_IdentifiedBox_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.AnnotationsProto + .internal_static_google_cloud_visionai_v1_ObjectDetectionPredictionResult_IdentifiedBox_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox.class, + com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox.Builder + .class); + } + + // Construct using + // com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getNormalizedBoundingBoxFieldBuilder(); + getEntityFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + boxId_ = 0L; + normalizedBoundingBox_ = null; + if (normalizedBoundingBoxBuilder_ != null) { + normalizedBoundingBoxBuilder_.dispose(); + normalizedBoundingBoxBuilder_ = null; + } + confidenceScore_ = 0F; + entity_ = null; + if (entityBuilder_ != null) { + entityBuilder_.dispose(); + entityBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.AnnotationsProto + .internal_static_google_cloud_visionai_v1_ObjectDetectionPredictionResult_IdentifiedBox_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox + getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox build() { + com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox + buildPartial() { + com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox result = + new com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.boxId_ = boxId_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.normalizedBoundingBox_ = + normalizedBoundingBoxBuilder_ == null + ? normalizedBoundingBox_ + : normalizedBoundingBoxBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.confidenceScore_ = confidenceScore_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.entity_ = entityBuilder_ == null ? entity_ : entityBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox) { + return mergeFrom( + (com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox other) { + if (other + == com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox + .getDefaultInstance()) return this; + if (other.getBoxId() != 0L) { + setBoxId(other.getBoxId()); + } + if (other.hasNormalizedBoundingBox()) { + mergeNormalizedBoundingBox(other.getNormalizedBoundingBox()); + } + if (other.getConfidenceScore() != 0F) { + setConfidenceScore(other.getConfidenceScore()); + } + if (other.hasEntity()) { + mergeEntity(other.getEntity()); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + boxId_ = input.readInt64(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 18: + { + input.readMessage( + getNormalizedBoundingBoxFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 29: + { + confidenceScore_ = input.readFloat(); + bitField0_ |= 0x00000004; + break; + } // case 29 + case 34: + { + input.readMessage(getEntityFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 34 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private long boxId_; + /** + * + * + *
+       * An unique id for this box.
+       * 
+ * + * int64 box_id = 1; + * + * @return The boxId. + */ + @java.lang.Override + public long getBoxId() { + return boxId_; + } + /** + * + * + *
+       * An unique id for this box.
+       * 
+ * + * int64 box_id = 1; + * + * @param value The boxId to set. + * @return This builder for chaining. + */ + public Builder setBoxId(long value) { + + boxId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * An unique id for this box.
+       * 
+ * + * int64 box_id = 1; + * + * @return This builder for chaining. + */ + public Builder clearBoxId() { + bitField0_ = (bitField0_ & ~0x00000001); + boxId_ = 0L; + onChanged(); + return this; + } + + private com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox + .NormalizedBoundingBox + normalizedBoundingBox_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox + .NormalizedBoundingBox, + com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox + .NormalizedBoundingBox.Builder, + com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox + .NormalizedBoundingBoxOrBuilder> + normalizedBoundingBoxBuilder_; + /** + * + * + *
+       * Bounding Box in the normalized coordinates.
+       * 
+ * + * + * .google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox.NormalizedBoundingBox normalized_bounding_box = 2; + * + * + * @return Whether the normalizedBoundingBox field is set. + */ + public boolean hasNormalizedBoundingBox() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+       * Bounding Box in the normalized coordinates.
+       * 
+ * + * + * .google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox.NormalizedBoundingBox normalized_bounding_box = 2; + * + * + * @return The normalizedBoundingBox. + */ + public com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox + .NormalizedBoundingBox + getNormalizedBoundingBox() { + if (normalizedBoundingBoxBuilder_ == null) { + return normalizedBoundingBox_ == null + ? com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox + .NormalizedBoundingBox.getDefaultInstance() + : normalizedBoundingBox_; + } else { + return normalizedBoundingBoxBuilder_.getMessage(); + } + } + /** + * + * + *
+       * Bounding Box in the normalized coordinates.
+       * 
+ * + * + * .google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox.NormalizedBoundingBox normalized_bounding_box = 2; + * + */ + public Builder setNormalizedBoundingBox( + com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox + .NormalizedBoundingBox + value) { + if (normalizedBoundingBoxBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + normalizedBoundingBox_ = value; + } else { + normalizedBoundingBoxBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * Bounding Box in the normalized coordinates.
+       * 
+ * + * + * .google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox.NormalizedBoundingBox normalized_bounding_box = 2; + * + */ + public Builder setNormalizedBoundingBox( + com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox + .NormalizedBoundingBox.Builder + builderForValue) { + if (normalizedBoundingBoxBuilder_ == null) { + normalizedBoundingBox_ = builderForValue.build(); + } else { + normalizedBoundingBoxBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * Bounding Box in the normalized coordinates.
+       * 
+ * + * + * .google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox.NormalizedBoundingBox normalized_bounding_box = 2; + * + */ + public Builder mergeNormalizedBoundingBox( + com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox + .NormalizedBoundingBox + value) { + if (normalizedBoundingBoxBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && normalizedBoundingBox_ != null + && normalizedBoundingBox_ + != com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox + .NormalizedBoundingBox.getDefaultInstance()) { + getNormalizedBoundingBoxBuilder().mergeFrom(value); + } else { + normalizedBoundingBox_ = value; + } + } else { + normalizedBoundingBoxBuilder_.mergeFrom(value); + } + if (normalizedBoundingBox_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + /** + * + * + *
+       * Bounding Box in the normalized coordinates.
+       * 
+ * + * + * .google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox.NormalizedBoundingBox normalized_bounding_box = 2; + * + */ + public Builder clearNormalizedBoundingBox() { + bitField0_ = (bitField0_ & ~0x00000002); + normalizedBoundingBox_ = null; + if (normalizedBoundingBoxBuilder_ != null) { + normalizedBoundingBoxBuilder_.dispose(); + normalizedBoundingBoxBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+       * Bounding Box in the normalized coordinates.
+       * 
+ * + * + * .google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox.NormalizedBoundingBox normalized_bounding_box = 2; + * + */ + public com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox + .NormalizedBoundingBox.Builder + getNormalizedBoundingBoxBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getNormalizedBoundingBoxFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Bounding Box in the normalized coordinates.
+       * 
+ * + * + * .google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox.NormalizedBoundingBox normalized_bounding_box = 2; + * + */ + public com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox + .NormalizedBoundingBoxOrBuilder + getNormalizedBoundingBoxOrBuilder() { + if (normalizedBoundingBoxBuilder_ != null) { + return normalizedBoundingBoxBuilder_.getMessageOrBuilder(); + } else { + return normalizedBoundingBox_ == null + ? com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox + .NormalizedBoundingBox.getDefaultInstance() + : normalizedBoundingBox_; + } + } + /** + * + * + *
+       * Bounding Box in the normalized coordinates.
+       * 
+ * + * + * .google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox.NormalizedBoundingBox normalized_bounding_box = 2; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox + .NormalizedBoundingBox, + com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox + .NormalizedBoundingBox.Builder, + com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox + .NormalizedBoundingBoxOrBuilder> + getNormalizedBoundingBoxFieldBuilder() { + if (normalizedBoundingBoxBuilder_ == null) { + normalizedBoundingBoxBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox + .NormalizedBoundingBox, + com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox + .NormalizedBoundingBox.Builder, + com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox + .NormalizedBoundingBoxOrBuilder>( + getNormalizedBoundingBox(), getParentForChildren(), isClean()); + normalizedBoundingBox_ = null; + } + return normalizedBoundingBoxBuilder_; + } + + private float confidenceScore_; + /** + * + * + *
+       * Confidence score associated with this box.
+       * 
+ * + * float confidence_score = 3; + * + * @return The confidenceScore. + */ + @java.lang.Override + public float getConfidenceScore() { + return confidenceScore_; + } + /** + * + * + *
+       * Confidence score associated with this box.
+       * 
+ * + * float confidence_score = 3; + * + * @param value The confidenceScore to set. + * @return This builder for chaining. + */ + public Builder setConfidenceScore(float value) { + + confidenceScore_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+       * Confidence score associated with this box.
+       * 
+ * + * float confidence_score = 3; + * + * @return This builder for chaining. + */ + public Builder clearConfidenceScore() { + bitField0_ = (bitField0_ & ~0x00000004); + confidenceScore_ = 0F; + onChanged(); + return this; + } + + private com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.Entity entity_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.Entity, + com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.Entity.Builder, + com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.EntityOrBuilder> + entityBuilder_; + /** + * + * + *
+       * Entity of this box.
+       * 
+ * + * .google.cloud.visionai.v1.ObjectDetectionPredictionResult.Entity entity = 4; + * + * @return Whether the entity field is set. + */ + public boolean hasEntity() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + * + * + *
+       * Entity of this box.
+       * 
+ * + * .google.cloud.visionai.v1.ObjectDetectionPredictionResult.Entity entity = 4; + * + * @return The entity. + */ + public com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.Entity getEntity() { + if (entityBuilder_ == null) { + return entity_ == null + ? com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.Entity + .getDefaultInstance() + : entity_; + } else { + return entityBuilder_.getMessage(); + } + } + /** + * + * + *
+       * Entity of this box.
+       * 
+ * + * .google.cloud.visionai.v1.ObjectDetectionPredictionResult.Entity entity = 4; + */ + public Builder setEntity( + com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.Entity value) { + if (entityBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + entity_ = value; + } else { + entityBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+       * Entity of this box.
+       * 
+ * + * .google.cloud.visionai.v1.ObjectDetectionPredictionResult.Entity entity = 4; + */ + public Builder setEntity( + com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.Entity.Builder + builderForValue) { + if (entityBuilder_ == null) { + entity_ = builderForValue.build(); + } else { + entityBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+       * Entity of this box.
+       * 
+ * + * .google.cloud.visionai.v1.ObjectDetectionPredictionResult.Entity entity = 4; + */ + public Builder mergeEntity( + com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.Entity value) { + if (entityBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) + && entity_ != null + && entity_ + != com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.Entity + .getDefaultInstance()) { + getEntityBuilder().mergeFrom(value); + } else { + entity_ = value; + } + } else { + entityBuilder_.mergeFrom(value); + } + if (entity_ != null) { + bitField0_ |= 0x00000008; + onChanged(); + } + return this; + } + /** + * + * + *
+       * Entity of this box.
+       * 
+ * + * .google.cloud.visionai.v1.ObjectDetectionPredictionResult.Entity entity = 4; + */ + public Builder clearEntity() { + bitField0_ = (bitField0_ & ~0x00000008); + entity_ = null; + if (entityBuilder_ != null) { + entityBuilder_.dispose(); + entityBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+       * Entity of this box.
+       * 
+ * + * .google.cloud.visionai.v1.ObjectDetectionPredictionResult.Entity entity = 4; + */ + public com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.Entity.Builder + getEntityBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return getEntityFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Entity of this box.
+       * 
+ * + * .google.cloud.visionai.v1.ObjectDetectionPredictionResult.Entity entity = 4; + */ + public com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.EntityOrBuilder + getEntityOrBuilder() { + if (entityBuilder_ != null) { + return entityBuilder_.getMessageOrBuilder(); + } else { + return entity_ == null + ? com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.Entity + .getDefaultInstance() + : entity_; + } + } + /** + * + * + *
+       * Entity of this box.
+       * 
+ * + * .google.cloud.visionai.v1.ObjectDetectionPredictionResult.Entity entity = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.Entity, + com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.Entity.Builder, + com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.EntityOrBuilder> + getEntityFieldBuilder() { + if (entityBuilder_ == null) { + entityBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.Entity, + com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.Entity.Builder, + com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.EntityOrBuilder>( + getEntity(), getParentForChildren(), isClean()); + entity_ = null; + } + return entityBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox) + private static final com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox(); + } + + public static com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public IdentifiedBox parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int bitField0_; + public static final int CURRENT_TIME_FIELD_NUMBER = 1; + private com.google.protobuf.Timestamp currentTime_; + /** + * + * + *
+   * Current timestamp.
+   * 
+ * + * .google.protobuf.Timestamp current_time = 1; + * + * @return Whether the currentTime field is set. + */ + @java.lang.Override + public boolean hasCurrentTime() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * Current timestamp.
+   * 
+ * + * .google.protobuf.Timestamp current_time = 1; + * + * @return The currentTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCurrentTime() { + return currentTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : currentTime_; + } + /** + * + * + *
+   * Current timestamp.
+   * 
+ * + * .google.protobuf.Timestamp current_time = 1; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCurrentTimeOrBuilder() { + return currentTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : currentTime_; + } + + public static final int IDENTIFIED_BOXES_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private java.util.List + identifiedBoxes_; + /** + * + * + *
+   * A list of identified boxes.
+   * 
+ * + * + * repeated .google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox identified_boxes = 2; + * + */ + @java.lang.Override + public java.util.List + getIdentifiedBoxesList() { + return identifiedBoxes_; + } + /** + * + * + *
+   * A list of identified boxes.
+   * 
+ * + * + * repeated .google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox identified_boxes = 2; + * + */ + @java.lang.Override + public java.util.List< + ? extends + com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBoxOrBuilder> + getIdentifiedBoxesOrBuilderList() { + return identifiedBoxes_; + } + /** + * + * + *
+   * A list of identified boxes.
+   * 
+ * + * + * repeated .google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox identified_boxes = 2; + * + */ + @java.lang.Override + public int getIdentifiedBoxesCount() { + return identifiedBoxes_.size(); + } + /** + * + * + *
+   * A list of identified boxes.
+   * 
+ * + * + * repeated .google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox identified_boxes = 2; + * + */ + @java.lang.Override + public com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox + getIdentifiedBoxes(int index) { + return identifiedBoxes_.get(index); + } + /** + * + * + *
+   * A list of identified boxes.
+   * 
+ * + * + * repeated .google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox identified_boxes = 2; + * + */ + @java.lang.Override + public com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBoxOrBuilder + getIdentifiedBoxesOrBuilder(int index) { + return identifiedBoxes_.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 (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getCurrentTime()); + } + for (int i = 0; i < identifiedBoxes_.size(); i++) { + output.writeMessage(2, identifiedBoxes_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getCurrentTime()); + } + for (int i = 0; i < identifiedBoxes_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, identifiedBoxes_.get(i)); + } + size += getUnknownFields().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.visionai.v1.ObjectDetectionPredictionResult)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.ObjectDetectionPredictionResult other = + (com.google.cloud.visionai.v1.ObjectDetectionPredictionResult) obj; + + if (hasCurrentTime() != other.hasCurrentTime()) return false; + if (hasCurrentTime()) { + if (!getCurrentTime().equals(other.getCurrentTime())) return false; + } + if (!getIdentifiedBoxesList().equals(other.getIdentifiedBoxesList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasCurrentTime()) { + hash = (37 * hash) + CURRENT_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCurrentTime().hashCode(); + } + if (getIdentifiedBoxesCount() > 0) { + hash = (37 * hash) + IDENTIFIED_BOXES_FIELD_NUMBER; + hash = (53 * hash) + getIdentifiedBoxesList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.ObjectDetectionPredictionResult parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ObjectDetectionPredictionResult 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.visionai.v1.ObjectDetectionPredictionResult parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ObjectDetectionPredictionResult 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.visionai.v1.ObjectDetectionPredictionResult parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ObjectDetectionPredictionResult parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.ObjectDetectionPredictionResult parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ObjectDetectionPredictionResult 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.visionai.v1.ObjectDetectionPredictionResult parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ObjectDetectionPredictionResult 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.visionai.v1.ObjectDetectionPredictionResult parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ObjectDetectionPredictionResult 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.visionai.v1.ObjectDetectionPredictionResult 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; + } + /** + * + * + *
+   * Prediction output format for Generic Object Detection.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.ObjectDetectionPredictionResult} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.ObjectDetectionPredictionResult) + com.google.cloud.visionai.v1.ObjectDetectionPredictionResultOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.AnnotationsProto + .internal_static_google_cloud_visionai_v1_ObjectDetectionPredictionResult_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.AnnotationsProto + .internal_static_google_cloud_visionai_v1_ObjectDetectionPredictionResult_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.class, + com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getCurrentTimeFieldBuilder(); + getIdentifiedBoxesFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + currentTime_ = null; + if (currentTimeBuilder_ != null) { + currentTimeBuilder_.dispose(); + currentTimeBuilder_ = null; + } + if (identifiedBoxesBuilder_ == null) { + identifiedBoxes_ = java.util.Collections.emptyList(); + } else { + identifiedBoxes_ = null; + identifiedBoxesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.AnnotationsProto + .internal_static_google_cloud_visionai_v1_ObjectDetectionPredictionResult_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ObjectDetectionPredictionResult + getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ObjectDetectionPredictionResult build() { + com.google.cloud.visionai.v1.ObjectDetectionPredictionResult result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ObjectDetectionPredictionResult buildPartial() { + com.google.cloud.visionai.v1.ObjectDetectionPredictionResult result = + new com.google.cloud.visionai.v1.ObjectDetectionPredictionResult(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.visionai.v1.ObjectDetectionPredictionResult result) { + if (identifiedBoxesBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + identifiedBoxes_ = java.util.Collections.unmodifiableList(identifiedBoxes_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.identifiedBoxes_ = identifiedBoxes_; + } else { + result.identifiedBoxes_ = identifiedBoxesBuilder_.build(); + } + } + + private void buildPartial0( + com.google.cloud.visionai.v1.ObjectDetectionPredictionResult result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.currentTime_ = + currentTimeBuilder_ == null ? currentTime_ : currentTimeBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.ObjectDetectionPredictionResult) { + return mergeFrom((com.google.cloud.visionai.v1.ObjectDetectionPredictionResult) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.ObjectDetectionPredictionResult other) { + if (other + == com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.getDefaultInstance()) + return this; + if (other.hasCurrentTime()) { + mergeCurrentTime(other.getCurrentTime()); + } + if (identifiedBoxesBuilder_ == null) { + if (!other.identifiedBoxes_.isEmpty()) { + if (identifiedBoxes_.isEmpty()) { + identifiedBoxes_ = other.identifiedBoxes_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureIdentifiedBoxesIsMutable(); + identifiedBoxes_.addAll(other.identifiedBoxes_); + } + onChanged(); + } + } else { + if (!other.identifiedBoxes_.isEmpty()) { + if (identifiedBoxesBuilder_.isEmpty()) { + identifiedBoxesBuilder_.dispose(); + identifiedBoxesBuilder_ = null; + identifiedBoxes_ = other.identifiedBoxes_; + bitField0_ = (bitField0_ & ~0x00000002); + identifiedBoxesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getIdentifiedBoxesFieldBuilder() + : null; + } else { + identifiedBoxesBuilder_.addAllMessages(other.identifiedBoxes_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getCurrentTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox m = + input.readMessage( + com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox + .parser(), + extensionRegistry); + if (identifiedBoxesBuilder_ == null) { + ensureIdentifiedBoxesIsMutable(); + identifiedBoxes_.add(m); + } else { + identifiedBoxesBuilder_.addMessage(m); + } + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.protobuf.Timestamp currentTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + currentTimeBuilder_; + /** + * + * + *
+     * Current timestamp.
+     * 
+ * + * .google.protobuf.Timestamp current_time = 1; + * + * @return Whether the currentTime field is set. + */ + public boolean hasCurrentTime() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * Current timestamp.
+     * 
+ * + * .google.protobuf.Timestamp current_time = 1; + * + * @return The currentTime. + */ + public com.google.protobuf.Timestamp getCurrentTime() { + if (currentTimeBuilder_ == null) { + return currentTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : currentTime_; + } else { + return currentTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Current timestamp.
+     * 
+ * + * .google.protobuf.Timestamp current_time = 1; + */ + public Builder setCurrentTime(com.google.protobuf.Timestamp value) { + if (currentTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + currentTime_ = value; + } else { + currentTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Current timestamp.
+     * 
+ * + * .google.protobuf.Timestamp current_time = 1; + */ + public Builder setCurrentTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (currentTimeBuilder_ == null) { + currentTime_ = builderForValue.build(); + } else { + currentTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Current timestamp.
+     * 
+ * + * .google.protobuf.Timestamp current_time = 1; + */ + public Builder mergeCurrentTime(com.google.protobuf.Timestamp value) { + if (currentTimeBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && currentTime_ != null + && currentTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getCurrentTimeBuilder().mergeFrom(value); + } else { + currentTime_ = value; + } + } else { + currentTimeBuilder_.mergeFrom(value); + } + if (currentTime_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Current timestamp.
+     * 
+ * + * .google.protobuf.Timestamp current_time = 1; + */ + public Builder clearCurrentTime() { + bitField0_ = (bitField0_ & ~0x00000001); + currentTime_ = null; + if (currentTimeBuilder_ != null) { + currentTimeBuilder_.dispose(); + currentTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Current timestamp.
+     * 
+ * + * .google.protobuf.Timestamp current_time = 1; + */ + public com.google.protobuf.Timestamp.Builder getCurrentTimeBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getCurrentTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Current timestamp.
+     * 
+ * + * .google.protobuf.Timestamp current_time = 1; + */ + public com.google.protobuf.TimestampOrBuilder getCurrentTimeOrBuilder() { + if (currentTimeBuilder_ != null) { + return currentTimeBuilder_.getMessageOrBuilder(); + } else { + return currentTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : currentTime_; + } + } + /** + * + * + *
+     * Current timestamp.
+     * 
+ * + * .google.protobuf.Timestamp current_time = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getCurrentTimeFieldBuilder() { + if (currentTimeBuilder_ == null) { + currentTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getCurrentTime(), getParentForChildren(), isClean()); + currentTime_ = null; + } + return currentTimeBuilder_; + } + + private java.util.List< + com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox> + identifiedBoxes_ = java.util.Collections.emptyList(); + + private void ensureIdentifiedBoxesIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + identifiedBoxes_ = + new java.util.ArrayList< + com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox>( + identifiedBoxes_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox, + com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox.Builder, + com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBoxOrBuilder> + identifiedBoxesBuilder_; + + /** + * + * + *
+     * A list of identified boxes.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox identified_boxes = 2; + * + */ + public java.util.List< + com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox> + getIdentifiedBoxesList() { + if (identifiedBoxesBuilder_ == null) { + return java.util.Collections.unmodifiableList(identifiedBoxes_); + } else { + return identifiedBoxesBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * A list of identified boxes.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox identified_boxes = 2; + * + */ + public int getIdentifiedBoxesCount() { + if (identifiedBoxesBuilder_ == null) { + return identifiedBoxes_.size(); + } else { + return identifiedBoxesBuilder_.getCount(); + } + } + /** + * + * + *
+     * A list of identified boxes.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox identified_boxes = 2; + * + */ + public com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox + getIdentifiedBoxes(int index) { + if (identifiedBoxesBuilder_ == null) { + return identifiedBoxes_.get(index); + } else { + return identifiedBoxesBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * A list of identified boxes.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox identified_boxes = 2; + * + */ + public Builder setIdentifiedBoxes( + int index, + com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox value) { + if (identifiedBoxesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureIdentifiedBoxesIsMutable(); + identifiedBoxes_.set(index, value); + onChanged(); + } else { + identifiedBoxesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * A list of identified boxes.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox identified_boxes = 2; + * + */ + public Builder setIdentifiedBoxes( + int index, + com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox.Builder + builderForValue) { + if (identifiedBoxesBuilder_ == null) { + ensureIdentifiedBoxesIsMutable(); + identifiedBoxes_.set(index, builderForValue.build()); + onChanged(); + } else { + identifiedBoxesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A list of identified boxes.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox identified_boxes = 2; + * + */ + public Builder addIdentifiedBoxes( + com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox value) { + if (identifiedBoxesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureIdentifiedBoxesIsMutable(); + identifiedBoxes_.add(value); + onChanged(); + } else { + identifiedBoxesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * A list of identified boxes.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox identified_boxes = 2; + * + */ + public Builder addIdentifiedBoxes( + int index, + com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox value) { + if (identifiedBoxesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureIdentifiedBoxesIsMutable(); + identifiedBoxes_.add(index, value); + onChanged(); + } else { + identifiedBoxesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * A list of identified boxes.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox identified_boxes = 2; + * + */ + public Builder addIdentifiedBoxes( + com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox.Builder + builderForValue) { + if (identifiedBoxesBuilder_ == null) { + ensureIdentifiedBoxesIsMutable(); + identifiedBoxes_.add(builderForValue.build()); + onChanged(); + } else { + identifiedBoxesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A list of identified boxes.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox identified_boxes = 2; + * + */ + public Builder addIdentifiedBoxes( + int index, + com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox.Builder + builderForValue) { + if (identifiedBoxesBuilder_ == null) { + ensureIdentifiedBoxesIsMutable(); + identifiedBoxes_.add(index, builderForValue.build()); + onChanged(); + } else { + identifiedBoxesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A list of identified boxes.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox identified_boxes = 2; + * + */ + public Builder addAllIdentifiedBoxes( + java.lang.Iterable< + ? extends + com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox> + values) { + if (identifiedBoxesBuilder_ == null) { + ensureIdentifiedBoxesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, identifiedBoxes_); + onChanged(); + } else { + identifiedBoxesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * A list of identified boxes.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox identified_boxes = 2; + * + */ + public Builder clearIdentifiedBoxes() { + if (identifiedBoxesBuilder_ == null) { + identifiedBoxes_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + identifiedBoxesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * A list of identified boxes.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox identified_boxes = 2; + * + */ + public Builder removeIdentifiedBoxes(int index) { + if (identifiedBoxesBuilder_ == null) { + ensureIdentifiedBoxesIsMutable(); + identifiedBoxes_.remove(index); + onChanged(); + } else { + identifiedBoxesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * A list of identified boxes.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox identified_boxes = 2; + * + */ + public com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox.Builder + getIdentifiedBoxesBuilder(int index) { + return getIdentifiedBoxesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * A list of identified boxes.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox identified_boxes = 2; + * + */ + public com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBoxOrBuilder + getIdentifiedBoxesOrBuilder(int index) { + if (identifiedBoxesBuilder_ == null) { + return identifiedBoxes_.get(index); + } else { + return identifiedBoxesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * A list of identified boxes.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox identified_boxes = 2; + * + */ + public java.util.List< + ? extends + com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBoxOrBuilder> + getIdentifiedBoxesOrBuilderList() { + if (identifiedBoxesBuilder_ != null) { + return identifiedBoxesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(identifiedBoxes_); + } + } + /** + * + * + *
+     * A list of identified boxes.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox identified_boxes = 2; + * + */ + public com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox.Builder + addIdentifiedBoxesBuilder() { + return getIdentifiedBoxesFieldBuilder() + .addBuilder( + com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox + .getDefaultInstance()); + } + /** + * + * + *
+     * A list of identified boxes.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox identified_boxes = 2; + * + */ + public com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox.Builder + addIdentifiedBoxesBuilder(int index) { + return getIdentifiedBoxesFieldBuilder() + .addBuilder( + index, + com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox + .getDefaultInstance()); + } + /** + * + * + *
+     * A list of identified boxes.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox identified_boxes = 2; + * + */ + public java.util.List< + com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox.Builder> + getIdentifiedBoxesBuilderList() { + return getIdentifiedBoxesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox, + com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox.Builder, + com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBoxOrBuilder> + getIdentifiedBoxesFieldBuilder() { + if (identifiedBoxesBuilder_ == null) { + identifiedBoxesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox, + com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox.Builder, + com.google.cloud.visionai.v1.ObjectDetectionPredictionResult + .IdentifiedBoxOrBuilder>( + identifiedBoxes_, + ((bitField0_ & 0x00000002) != 0), + getParentForChildren(), + isClean()); + identifiedBoxes_ = null; + } + return identifiedBoxesBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.ObjectDetectionPredictionResult) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.ObjectDetectionPredictionResult) + private static final com.google.cloud.visionai.v1.ObjectDetectionPredictionResult + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.ObjectDetectionPredictionResult(); + } + + public static com.google.cloud.visionai.v1.ObjectDetectionPredictionResult getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ObjectDetectionPredictionResult parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.ObjectDetectionPredictionResult getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ObjectDetectionPredictionResultOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ObjectDetectionPredictionResultOrBuilder.java new file mode 100644 index 000000000000..1b57ac87e366 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ObjectDetectionPredictionResultOrBuilder.java @@ -0,0 +1,128 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/annotations.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface ObjectDetectionPredictionResultOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.ObjectDetectionPredictionResult) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Current timestamp.
+   * 
+ * + * .google.protobuf.Timestamp current_time = 1; + * + * @return Whether the currentTime field is set. + */ + boolean hasCurrentTime(); + /** + * + * + *
+   * Current timestamp.
+   * 
+ * + * .google.protobuf.Timestamp current_time = 1; + * + * @return The currentTime. + */ + com.google.protobuf.Timestamp getCurrentTime(); + /** + * + * + *
+   * Current timestamp.
+   * 
+ * + * .google.protobuf.Timestamp current_time = 1; + */ + com.google.protobuf.TimestampOrBuilder getCurrentTimeOrBuilder(); + + /** + * + * + *
+   * A list of identified boxes.
+   * 
+ * + * + * repeated .google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox identified_boxes = 2; + * + */ + java.util.List + getIdentifiedBoxesList(); + /** + * + * + *
+   * A list of identified boxes.
+   * 
+ * + * + * repeated .google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox identified_boxes = 2; + * + */ + com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox getIdentifiedBoxes( + int index); + /** + * + * + *
+   * A list of identified boxes.
+   * 
+ * + * + * repeated .google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox identified_boxes = 2; + * + */ + int getIdentifiedBoxesCount(); + /** + * + * + *
+   * A list of identified boxes.
+   * 
+ * + * + * repeated .google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox identified_boxes = 2; + * + */ + java.util.List< + ? extends + com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBoxOrBuilder> + getIdentifiedBoxesOrBuilderList(); + /** + * + * + *
+   * A list of identified boxes.
+   * 
+ * + * + * repeated .google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox identified_boxes = 2; + * + */ + com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBoxOrBuilder + getIdentifiedBoxesOrBuilder(int index); +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/OccupancyCountConfig.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/OccupancyCountConfig.java new file mode 100644 index 000000000000..ed4fc4dfd418 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/OccupancyCountConfig.java @@ -0,0 +1,733 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/platform.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * Message describing OccupancyCountConfig.
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.OccupancyCountConfig} + */ +public final class OccupancyCountConfig extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.OccupancyCountConfig) + OccupancyCountConfigOrBuilder { + private static final long serialVersionUID = 0L; + // Use OccupancyCountConfig.newBuilder() to construct. + private OccupancyCountConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private OccupancyCountConfig() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new OccupancyCountConfig(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_OccupancyCountConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_OccupancyCountConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.OccupancyCountConfig.class, + com.google.cloud.visionai.v1.OccupancyCountConfig.Builder.class); + } + + public static final int ENABLE_PEOPLE_COUNTING_FIELD_NUMBER = 1; + private boolean enablePeopleCounting_ = false; + /** + * + * + *
+   * Whether to count the appearances of people, output counts have 'people' as
+   * the key.
+   * 
+ * + * bool enable_people_counting = 1; + * + * @return The enablePeopleCounting. + */ + @java.lang.Override + public boolean getEnablePeopleCounting() { + return enablePeopleCounting_; + } + + public static final int ENABLE_VEHICLE_COUNTING_FIELD_NUMBER = 2; + private boolean enableVehicleCounting_ = false; + /** + * + * + *
+   * Whether to count the appearances of vehicles, output counts will have
+   * 'vehicle' as the key.
+   * 
+ * + * bool enable_vehicle_counting = 2; + * + * @return The enableVehicleCounting. + */ + @java.lang.Override + public boolean getEnableVehicleCounting() { + return enableVehicleCounting_; + } + + public static final int ENABLE_DWELLING_TIME_TRACKING_FIELD_NUMBER = 3; + private boolean enableDwellingTimeTracking_ = false; + /** + * + * + *
+   * Whether to track each invidual object's loitering time inside the scene or
+   * specific zone.
+   * 
+ * + * bool enable_dwelling_time_tracking = 3; + * + * @return The enableDwellingTimeTracking. + */ + @java.lang.Override + public boolean getEnableDwellingTimeTracking() { + return enableDwellingTimeTracking_; + } + + 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 (enablePeopleCounting_ != false) { + output.writeBool(1, enablePeopleCounting_); + } + if (enableVehicleCounting_ != false) { + output.writeBool(2, enableVehicleCounting_); + } + if (enableDwellingTimeTracking_ != false) { + output.writeBool(3, enableDwellingTimeTracking_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (enablePeopleCounting_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(1, enablePeopleCounting_); + } + if (enableVehicleCounting_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(2, enableVehicleCounting_); + } + if (enableDwellingTimeTracking_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(3, enableDwellingTimeTracking_); + } + size += getUnknownFields().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.visionai.v1.OccupancyCountConfig)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.OccupancyCountConfig other = + (com.google.cloud.visionai.v1.OccupancyCountConfig) obj; + + if (getEnablePeopleCounting() != other.getEnablePeopleCounting()) return false; + if (getEnableVehicleCounting() != other.getEnableVehicleCounting()) return false; + if (getEnableDwellingTimeTracking() != other.getEnableDwellingTimeTracking()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ENABLE_PEOPLE_COUNTING_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getEnablePeopleCounting()); + hash = (37 * hash) + ENABLE_VEHICLE_COUNTING_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getEnableVehicleCounting()); + hash = (37 * hash) + ENABLE_DWELLING_TIME_TRACKING_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getEnableDwellingTimeTracking()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.OccupancyCountConfig parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.OccupancyCountConfig 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.visionai.v1.OccupancyCountConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.OccupancyCountConfig 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.visionai.v1.OccupancyCountConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.OccupancyCountConfig parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.OccupancyCountConfig parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.OccupancyCountConfig 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.visionai.v1.OccupancyCountConfig parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.OccupancyCountConfig 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.visionai.v1.OccupancyCountConfig parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.OccupancyCountConfig 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.visionai.v1.OccupancyCountConfig 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; + } + /** + * + * + *
+   * Message describing OccupancyCountConfig.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.OccupancyCountConfig} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.OccupancyCountConfig) + com.google.cloud.visionai.v1.OccupancyCountConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_OccupancyCountConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_OccupancyCountConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.OccupancyCountConfig.class, + com.google.cloud.visionai.v1.OccupancyCountConfig.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.OccupancyCountConfig.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + enablePeopleCounting_ = false; + enableVehicleCounting_ = false; + enableDwellingTimeTracking_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_OccupancyCountConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.OccupancyCountConfig getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.OccupancyCountConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.OccupancyCountConfig build() { + com.google.cloud.visionai.v1.OccupancyCountConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.OccupancyCountConfig buildPartial() { + com.google.cloud.visionai.v1.OccupancyCountConfig result = + new com.google.cloud.visionai.v1.OccupancyCountConfig(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.visionai.v1.OccupancyCountConfig result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.enablePeopleCounting_ = enablePeopleCounting_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.enableVehicleCounting_ = enableVehicleCounting_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.enableDwellingTimeTracking_ = enableDwellingTimeTracking_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.OccupancyCountConfig) { + return mergeFrom((com.google.cloud.visionai.v1.OccupancyCountConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.OccupancyCountConfig other) { + if (other == com.google.cloud.visionai.v1.OccupancyCountConfig.getDefaultInstance()) + return this; + if (other.getEnablePeopleCounting() != false) { + setEnablePeopleCounting(other.getEnablePeopleCounting()); + } + if (other.getEnableVehicleCounting() != false) { + setEnableVehicleCounting(other.getEnableVehicleCounting()); + } + if (other.getEnableDwellingTimeTracking() != false) { + setEnableDwellingTimeTracking(other.getEnableDwellingTimeTracking()); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + enablePeopleCounting_ = input.readBool(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 16: + { + enableVehicleCounting_ = input.readBool(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 24: + { + enableDwellingTimeTracking_ = input.readBool(); + bitField0_ |= 0x00000004; + break; + } // case 24 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private boolean enablePeopleCounting_; + /** + * + * + *
+     * Whether to count the appearances of people, output counts have 'people' as
+     * the key.
+     * 
+ * + * bool enable_people_counting = 1; + * + * @return The enablePeopleCounting. + */ + @java.lang.Override + public boolean getEnablePeopleCounting() { + return enablePeopleCounting_; + } + /** + * + * + *
+     * Whether to count the appearances of people, output counts have 'people' as
+     * the key.
+     * 
+ * + * bool enable_people_counting = 1; + * + * @param value The enablePeopleCounting to set. + * @return This builder for chaining. + */ + public Builder setEnablePeopleCounting(boolean value) { + + enablePeopleCounting_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Whether to count the appearances of people, output counts have 'people' as
+     * the key.
+     * 
+ * + * bool enable_people_counting = 1; + * + * @return This builder for chaining. + */ + public Builder clearEnablePeopleCounting() { + bitField0_ = (bitField0_ & ~0x00000001); + enablePeopleCounting_ = false; + onChanged(); + return this; + } + + private boolean enableVehicleCounting_; + /** + * + * + *
+     * Whether to count the appearances of vehicles, output counts will have
+     * 'vehicle' as the key.
+     * 
+ * + * bool enable_vehicle_counting = 2; + * + * @return The enableVehicleCounting. + */ + @java.lang.Override + public boolean getEnableVehicleCounting() { + return enableVehicleCounting_; + } + /** + * + * + *
+     * Whether to count the appearances of vehicles, output counts will have
+     * 'vehicle' as the key.
+     * 
+ * + * bool enable_vehicle_counting = 2; + * + * @param value The enableVehicleCounting to set. + * @return This builder for chaining. + */ + public Builder setEnableVehicleCounting(boolean value) { + + enableVehicleCounting_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Whether to count the appearances of vehicles, output counts will have
+     * 'vehicle' as the key.
+     * 
+ * + * bool enable_vehicle_counting = 2; + * + * @return This builder for chaining. + */ + public Builder clearEnableVehicleCounting() { + bitField0_ = (bitField0_ & ~0x00000002); + enableVehicleCounting_ = false; + onChanged(); + return this; + } + + private boolean enableDwellingTimeTracking_; + /** + * + * + *
+     * Whether to track each invidual object's loitering time inside the scene or
+     * specific zone.
+     * 
+ * + * bool enable_dwelling_time_tracking = 3; + * + * @return The enableDwellingTimeTracking. + */ + @java.lang.Override + public boolean getEnableDwellingTimeTracking() { + return enableDwellingTimeTracking_; + } + /** + * + * + *
+     * Whether to track each invidual object's loitering time inside the scene or
+     * specific zone.
+     * 
+ * + * bool enable_dwelling_time_tracking = 3; + * + * @param value The enableDwellingTimeTracking to set. + * @return This builder for chaining. + */ + public Builder setEnableDwellingTimeTracking(boolean value) { + + enableDwellingTimeTracking_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Whether to track each invidual object's loitering time inside the scene or
+     * specific zone.
+     * 
+ * + * bool enable_dwelling_time_tracking = 3; + * + * @return This builder for chaining. + */ + public Builder clearEnableDwellingTimeTracking() { + bitField0_ = (bitField0_ & ~0x00000004); + enableDwellingTimeTracking_ = false; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.OccupancyCountConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.OccupancyCountConfig) + private static final com.google.cloud.visionai.v1.OccupancyCountConfig DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.OccupancyCountConfig(); + } + + public static com.google.cloud.visionai.v1.OccupancyCountConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public OccupancyCountConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.OccupancyCountConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/OccupancyCountConfigOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/OccupancyCountConfigOrBuilder.java new file mode 100644 index 000000000000..530b1637994b --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/OccupancyCountConfigOrBuilder.java @@ -0,0 +1,68 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/platform.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface OccupancyCountConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.OccupancyCountConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Whether to count the appearances of people, output counts have 'people' as
+   * the key.
+   * 
+ * + * bool enable_people_counting = 1; + * + * @return The enablePeopleCounting. + */ + boolean getEnablePeopleCounting(); + + /** + * + * + *
+   * Whether to count the appearances of vehicles, output counts will have
+   * 'vehicle' as the key.
+   * 
+ * + * bool enable_vehicle_counting = 2; + * + * @return The enableVehicleCounting. + */ + boolean getEnableVehicleCounting(); + + /** + * + * + *
+   * Whether to track each invidual object's loitering time inside the scene or
+   * specific zone.
+   * 
+ * + * bool enable_dwelling_time_tracking = 3; + * + * @return The enableDwellingTimeTracking. + */ + boolean getEnableDwellingTimeTracking(); +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/OccupancyCountingPredictionResult.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/OccupancyCountingPredictionResult.java new file mode 100644 index 000000000000..ab1f121288ca --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/OccupancyCountingPredictionResult.java @@ -0,0 +1,18191 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/annotations.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * The prediction result proto for occupancy counting.
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.OccupancyCountingPredictionResult} + */ +public final class OccupancyCountingPredictionResult extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.OccupancyCountingPredictionResult) + OccupancyCountingPredictionResultOrBuilder { + private static final long serialVersionUID = 0L; + // Use OccupancyCountingPredictionResult.newBuilder() to construct. + private OccupancyCountingPredictionResult( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private OccupancyCountingPredictionResult() { + identifiedBoxes_ = java.util.Collections.emptyList(); + trackInfo_ = java.util.Collections.emptyList(); + dwellTimeInfo_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new OccupancyCountingPredictionResult(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.AnnotationsProto + .internal_static_google_cloud_visionai_v1_OccupancyCountingPredictionResult_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.AnnotationsProto + .internal_static_google_cloud_visionai_v1_OccupancyCountingPredictionResult_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.class, + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Builder.class); + } + + public interface EntityOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.OccupancyCountingPredictionResult.Entity) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Label id.
+     * 
+ * + * int64 label_id = 1; + * + * @return The labelId. + */ + long getLabelId(); + + /** + * + * + *
+     * Human readable string of the label.
+     * 
+ * + * string label_string = 2; + * + * @return The labelString. + */ + java.lang.String getLabelString(); + /** + * + * + *
+     * Human readable string of the label.
+     * 
+ * + * string label_string = 2; + * + * @return The bytes for labelString. + */ + com.google.protobuf.ByteString getLabelStringBytes(); + } + /** + * + * + *
+   * The entity info for annotations from occupancy counting operator.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.OccupancyCountingPredictionResult.Entity} + */ + public static final class Entity extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.OccupancyCountingPredictionResult.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() { + labelString_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Entity(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.AnnotationsProto + .internal_static_google_cloud_visionai_v1_OccupancyCountingPredictionResult_Entity_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.AnnotationsProto + .internal_static_google_cloud_visionai_v1_OccupancyCountingPredictionResult_Entity_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Entity.class, + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Entity.Builder.class); + } + + public static final int LABEL_ID_FIELD_NUMBER = 1; + private long labelId_ = 0L; + /** + * + * + *
+     * Label id.
+     * 
+ * + * int64 label_id = 1; + * + * @return The labelId. + */ + @java.lang.Override + public long getLabelId() { + return labelId_; + } + + public static final int LABEL_STRING_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object labelString_ = ""; + /** + * + * + *
+     * Human readable string of the label.
+     * 
+ * + * string label_string = 2; + * + * @return The labelString. + */ + @java.lang.Override + public java.lang.String getLabelString() { + java.lang.Object ref = labelString_; + 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(); + labelString_ = s; + return s; + } + } + /** + * + * + *
+     * Human readable string of the label.
+     * 
+ * + * string label_string = 2; + * + * @return The bytes for labelString. + */ + @java.lang.Override + public com.google.protobuf.ByteString getLabelStringBytes() { + java.lang.Object ref = labelString_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + labelString_ = 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 (labelId_ != 0L) { + output.writeInt64(1, labelId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(labelString_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, labelString_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (labelId_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(1, labelId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(labelString_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, labelString_); + } + size += getUnknownFields().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.visionai.v1.OccupancyCountingPredictionResult.Entity)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Entity other = + (com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Entity) obj; + + if (getLabelId() != other.getLabelId()) return false; + if (!getLabelString().equals(other.getLabelString())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + LABEL_ID_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getLabelId()); + hash = (37 * hash) + LABEL_STRING_FIELD_NUMBER; + hash = (53 * hash) + getLabelString().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Entity parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.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.visionai.v1.OccupancyCountingPredictionResult.Entity parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.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.visionai.v1.OccupancyCountingPredictionResult.Entity parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Entity parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Entity parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.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.visionai.v1.OccupancyCountingPredictionResult.Entity + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.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.visionai.v1.OccupancyCountingPredictionResult.Entity parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.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.visionai.v1.OccupancyCountingPredictionResult.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; + } + /** + * + * + *
+     * The entity info for annotations from occupancy counting operator.
+     * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.OccupancyCountingPredictionResult.Entity} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.OccupancyCountingPredictionResult.Entity) + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.EntityOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.AnnotationsProto + .internal_static_google_cloud_visionai_v1_OccupancyCountingPredictionResult_Entity_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.AnnotationsProto + .internal_static_google_cloud_visionai_v1_OccupancyCountingPredictionResult_Entity_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Entity.class, + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Entity.Builder + .class); + } + + // Construct using + // com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Entity.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + labelId_ = 0L; + labelString_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.AnnotationsProto + .internal_static_google_cloud_visionai_v1_OccupancyCountingPredictionResult_Entity_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Entity + getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Entity + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Entity build() { + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Entity result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Entity buildPartial() { + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Entity result = + new com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Entity(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Entity result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.labelId_ = labelId_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.labelString_ = labelString_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Entity) { + return mergeFrom( + (com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Entity) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Entity other) { + if (other + == com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Entity + .getDefaultInstance()) return this; + if (other.getLabelId() != 0L) { + setLabelId(other.getLabelId()); + } + if (!other.getLabelString().isEmpty()) { + labelString_ = other.labelString_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + labelId_ = input.readInt64(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 18: + { + labelString_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private long labelId_; + /** + * + * + *
+       * Label id.
+       * 
+ * + * int64 label_id = 1; + * + * @return The labelId. + */ + @java.lang.Override + public long getLabelId() { + return labelId_; + } + /** + * + * + *
+       * Label id.
+       * 
+ * + * int64 label_id = 1; + * + * @param value The labelId to set. + * @return This builder for chaining. + */ + public Builder setLabelId(long value) { + + labelId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * Label id.
+       * 
+ * + * int64 label_id = 1; + * + * @return This builder for chaining. + */ + public Builder clearLabelId() { + bitField0_ = (bitField0_ & ~0x00000001); + labelId_ = 0L; + onChanged(); + return this; + } + + private java.lang.Object labelString_ = ""; + /** + * + * + *
+       * Human readable string of the label.
+       * 
+ * + * string label_string = 2; + * + * @return The labelString. + */ + public java.lang.String getLabelString() { + java.lang.Object ref = labelString_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + labelString_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * Human readable string of the label.
+       * 
+ * + * string label_string = 2; + * + * @return The bytes for labelString. + */ + public com.google.protobuf.ByteString getLabelStringBytes() { + java.lang.Object ref = labelString_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + labelString_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * Human readable string of the label.
+       * 
+ * + * string label_string = 2; + * + * @param value The labelString to set. + * @return This builder for chaining. + */ + public Builder setLabelString(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + labelString_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * Human readable string of the label.
+       * 
+ * + * string label_string = 2; + * + * @return This builder for chaining. + */ + public Builder clearLabelString() { + labelString_ = getDefaultInstance().getLabelString(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+       * Human readable string of the label.
+       * 
+ * + * string label_string = 2; + * + * @param value The bytes for labelString to set. + * @return This builder for chaining. + */ + public Builder setLabelStringBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + labelString_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.OccupancyCountingPredictionResult.Entity) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.OccupancyCountingPredictionResult.Entity) + private static final com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Entity + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Entity(); + } + + public static com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.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 { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.OccupancyCountingPredictionResult.Entity + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface IdentifiedBoxOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.OccupancyCountingPredictionResult.IdentifiedBox) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * An unique id for this box.
+     * 
+ * + * int64 box_id = 1; + * + * @return The boxId. + */ + long getBoxId(); + + /** + * + * + *
+     * Bounding Box in the normalized coordinates.
+     * 
+ * + * + * .google.cloud.visionai.v1.OccupancyCountingPredictionResult.IdentifiedBox.NormalizedBoundingBox normalized_bounding_box = 2; + * + * + * @return Whether the normalizedBoundingBox field is set. + */ + boolean hasNormalizedBoundingBox(); + /** + * + * + *
+     * Bounding Box in the normalized coordinates.
+     * 
+ * + * + * .google.cloud.visionai.v1.OccupancyCountingPredictionResult.IdentifiedBox.NormalizedBoundingBox normalized_bounding_box = 2; + * + * + * @return The normalizedBoundingBox. + */ + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.IdentifiedBox + .NormalizedBoundingBox + getNormalizedBoundingBox(); + /** + * + * + *
+     * Bounding Box in the normalized coordinates.
+     * 
+ * + * + * .google.cloud.visionai.v1.OccupancyCountingPredictionResult.IdentifiedBox.NormalizedBoundingBox normalized_bounding_box = 2; + * + */ + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.IdentifiedBox + .NormalizedBoundingBoxOrBuilder + getNormalizedBoundingBoxOrBuilder(); + + /** + * + * + *
+     * Confidence score associated with this box.
+     * 
+ * + * float score = 3; + * + * @return The score. + */ + float getScore(); + + /** + * + * + *
+     * Entity of this box.
+     * 
+ * + * .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Entity entity = 4; + * + * @return Whether the entity field is set. + */ + boolean hasEntity(); + /** + * + * + *
+     * Entity of this box.
+     * 
+ * + * .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Entity entity = 4; + * + * @return The entity. + */ + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Entity getEntity(); + /** + * + * + *
+     * Entity of this box.
+     * 
+ * + * .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Entity entity = 4; + */ + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.EntityOrBuilder + getEntityOrBuilder(); + + /** + * + * + *
+     * An unique id to identify a track. It should be consistent across frames.
+     * It only exists if tracking is enabled.
+     * 
+ * + * int64 track_id = 5; + * + * @return The trackId. + */ + long getTrackId(); + } + /** + * + * + *
+   * Identified box contains location and the entity of the object.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.OccupancyCountingPredictionResult.IdentifiedBox} + */ + public static final class IdentifiedBox extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.OccupancyCountingPredictionResult.IdentifiedBox) + IdentifiedBoxOrBuilder { + private static final long serialVersionUID = 0L; + // Use IdentifiedBox.newBuilder() to construct. + private IdentifiedBox(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private IdentifiedBox() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new IdentifiedBox(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.AnnotationsProto + .internal_static_google_cloud_visionai_v1_OccupancyCountingPredictionResult_IdentifiedBox_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.AnnotationsProto + .internal_static_google_cloud_visionai_v1_OccupancyCountingPredictionResult_IdentifiedBox_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.IdentifiedBox.class, + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.IdentifiedBox.Builder + .class); + } + + public interface NormalizedBoundingBoxOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.OccupancyCountingPredictionResult.IdentifiedBox.NormalizedBoundingBox) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+       * Min in x coordinate.
+       * 
+ * + * float xmin = 1; + * + * @return The xmin. + */ + float getXmin(); + + /** + * + * + *
+       * Min in y coordinate.
+       * 
+ * + * float ymin = 2; + * + * @return The ymin. + */ + float getYmin(); + + /** + * + * + *
+       * Width of the bounding box.
+       * 
+ * + * float width = 3; + * + * @return The width. + */ + float getWidth(); + + /** + * + * + *
+       * Height of the bounding box.
+       * 
+ * + * float height = 4; + * + * @return The height. + */ + float getHeight(); + } + /** + * + * + *
+     * Bounding Box in the normalized coordinates.
+     * 
+ * + * Protobuf type {@code + * google.cloud.visionai.v1.OccupancyCountingPredictionResult.IdentifiedBox.NormalizedBoundingBox} + */ + public static final class NormalizedBoundingBox extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.OccupancyCountingPredictionResult.IdentifiedBox.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() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new NormalizedBoundingBox(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.AnnotationsProto + .internal_static_google_cloud_visionai_v1_OccupancyCountingPredictionResult_IdentifiedBox_NormalizedBoundingBox_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.AnnotationsProto + .internal_static_google_cloud_visionai_v1_OccupancyCountingPredictionResult_IdentifiedBox_NormalizedBoundingBox_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.IdentifiedBox + .NormalizedBoundingBox.class, + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.IdentifiedBox + .NormalizedBoundingBox.Builder.class); + } + + public static final int XMIN_FIELD_NUMBER = 1; + private float xmin_ = 0F; + /** + * + * + *
+       * Min in x coordinate.
+       * 
+ * + * float xmin = 1; + * + * @return The xmin. + */ + @java.lang.Override + public float getXmin() { + return xmin_; + } + + public static final int YMIN_FIELD_NUMBER = 2; + private float ymin_ = 0F; + /** + * + * + *
+       * Min in y coordinate.
+       * 
+ * + * float ymin = 2; + * + * @return The ymin. + */ + @java.lang.Override + public float getYmin() { + return ymin_; + } + + public static final int WIDTH_FIELD_NUMBER = 3; + private float width_ = 0F; + /** + * + * + *
+       * Width of the bounding box.
+       * 
+ * + * float width = 3; + * + * @return The width. + */ + @java.lang.Override + public float getWidth() { + return width_; + } + + public static final int HEIGHT_FIELD_NUMBER = 4; + private float height_ = 0F; + /** + * + * + *
+       * Height of the bounding box.
+       * 
+ * + * float height = 4; + * + * @return The height. + */ + @java.lang.Override + public float getHeight() { + return height_; + } + + 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 (java.lang.Float.floatToRawIntBits(xmin_) != 0) { + output.writeFloat(1, xmin_); + } + if (java.lang.Float.floatToRawIntBits(ymin_) != 0) { + output.writeFloat(2, ymin_); + } + if (java.lang.Float.floatToRawIntBits(width_) != 0) { + output.writeFloat(3, width_); + } + if (java.lang.Float.floatToRawIntBits(height_) != 0) { + output.writeFloat(4, height_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (java.lang.Float.floatToRawIntBits(xmin_) != 0) { + size += com.google.protobuf.CodedOutputStream.computeFloatSize(1, xmin_); + } + if (java.lang.Float.floatToRawIntBits(ymin_) != 0) { + size += com.google.protobuf.CodedOutputStream.computeFloatSize(2, ymin_); + } + if (java.lang.Float.floatToRawIntBits(width_) != 0) { + size += com.google.protobuf.CodedOutputStream.computeFloatSize(3, width_); + } + if (java.lang.Float.floatToRawIntBits(height_) != 0) { + size += com.google.protobuf.CodedOutputStream.computeFloatSize(4, height_); + } + size += getUnknownFields().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.visionai.v1.OccupancyCountingPredictionResult.IdentifiedBox + .NormalizedBoundingBox)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.IdentifiedBox + .NormalizedBoundingBox + other = + (com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.IdentifiedBox + .NormalizedBoundingBox) + obj; + + if (java.lang.Float.floatToIntBits(getXmin()) + != java.lang.Float.floatToIntBits(other.getXmin())) return false; + if (java.lang.Float.floatToIntBits(getYmin()) + != java.lang.Float.floatToIntBits(other.getYmin())) return false; + if (java.lang.Float.floatToIntBits(getWidth()) + != java.lang.Float.floatToIntBits(other.getWidth())) return false; + if (java.lang.Float.floatToIntBits(getHeight()) + != java.lang.Float.floatToIntBits(other.getHeight())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + XMIN_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits(getXmin()); + hash = (37 * hash) + YMIN_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits(getYmin()); + hash = (37 * hash) + WIDTH_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits(getWidth()); + hash = (37 * hash) + HEIGHT_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits(getHeight()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.IdentifiedBox + .NormalizedBoundingBox + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.IdentifiedBox + .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.visionai.v1.OccupancyCountingPredictionResult.IdentifiedBox + .NormalizedBoundingBox + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.IdentifiedBox + .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.visionai.v1.OccupancyCountingPredictionResult.IdentifiedBox + .NormalizedBoundingBox + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.IdentifiedBox + .NormalizedBoundingBox + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.IdentifiedBox + .NormalizedBoundingBox + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.IdentifiedBox + .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.visionai.v1.OccupancyCountingPredictionResult.IdentifiedBox + .NormalizedBoundingBox + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.IdentifiedBox + .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.visionai.v1.OccupancyCountingPredictionResult.IdentifiedBox + .NormalizedBoundingBox + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.IdentifiedBox + .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.visionai.v1.OccupancyCountingPredictionResult.IdentifiedBox + .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; + } + /** + * + * + *
+       * Bounding Box in the normalized coordinates.
+       * 
+ * + * Protobuf type {@code + * google.cloud.visionai.v1.OccupancyCountingPredictionResult.IdentifiedBox.NormalizedBoundingBox} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.OccupancyCountingPredictionResult.IdentifiedBox.NormalizedBoundingBox) + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.IdentifiedBox + .NormalizedBoundingBoxOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.AnnotationsProto + .internal_static_google_cloud_visionai_v1_OccupancyCountingPredictionResult_IdentifiedBox_NormalizedBoundingBox_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.AnnotationsProto + .internal_static_google_cloud_visionai_v1_OccupancyCountingPredictionResult_IdentifiedBox_NormalizedBoundingBox_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.IdentifiedBox + .NormalizedBoundingBox.class, + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.IdentifiedBox + .NormalizedBoundingBox.Builder.class); + } + + // Construct using + // com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.IdentifiedBox.NormalizedBoundingBox.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + xmin_ = 0F; + ymin_ = 0F; + width_ = 0F; + height_ = 0F; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.AnnotationsProto + .internal_static_google_cloud_visionai_v1_OccupancyCountingPredictionResult_IdentifiedBox_NormalizedBoundingBox_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.IdentifiedBox + .NormalizedBoundingBox + getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.IdentifiedBox + .NormalizedBoundingBox.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.IdentifiedBox + .NormalizedBoundingBox + build() { + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.IdentifiedBox + .NormalizedBoundingBox + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.IdentifiedBox + .NormalizedBoundingBox + buildPartial() { + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.IdentifiedBox + .NormalizedBoundingBox + result = + new com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.IdentifiedBox + .NormalizedBoundingBox(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.IdentifiedBox + .NormalizedBoundingBox + result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.xmin_ = xmin_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.ymin_ = ymin_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.width_ = width_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.height_ = height_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.IdentifiedBox + .NormalizedBoundingBox) { + return mergeFrom( + (com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.IdentifiedBox + .NormalizedBoundingBox) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.IdentifiedBox + .NormalizedBoundingBox + other) { + if (other + == com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.IdentifiedBox + .NormalizedBoundingBox.getDefaultInstance()) return this; + if (other.getXmin() != 0F) { + setXmin(other.getXmin()); + } + if (other.getYmin() != 0F) { + setYmin(other.getYmin()); + } + if (other.getWidth() != 0F) { + setWidth(other.getWidth()); + } + if (other.getHeight() != 0F) { + setHeight(other.getHeight()); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 13: + { + xmin_ = input.readFloat(); + bitField0_ |= 0x00000001; + break; + } // case 13 + case 21: + { + ymin_ = input.readFloat(); + bitField0_ |= 0x00000002; + break; + } // case 21 + case 29: + { + width_ = input.readFloat(); + bitField0_ |= 0x00000004; + break; + } // case 29 + case 37: + { + height_ = input.readFloat(); + bitField0_ |= 0x00000008; + break; + } // case 37 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private float xmin_; + /** + * + * + *
+         * Min in x coordinate.
+         * 
+ * + * float xmin = 1; + * + * @return The xmin. + */ + @java.lang.Override + public float getXmin() { + return xmin_; + } + /** + * + * + *
+         * Min in x coordinate.
+         * 
+ * + * float xmin = 1; + * + * @param value The xmin to set. + * @return This builder for chaining. + */ + public Builder setXmin(float value) { + + xmin_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+         * Min in x coordinate.
+         * 
+ * + * float xmin = 1; + * + * @return This builder for chaining. + */ + public Builder clearXmin() { + bitField0_ = (bitField0_ & ~0x00000001); + xmin_ = 0F; + onChanged(); + return this; + } + + private float ymin_; + /** + * + * + *
+         * Min in y coordinate.
+         * 
+ * + * float ymin = 2; + * + * @return The ymin. + */ + @java.lang.Override + public float getYmin() { + return ymin_; + } + /** + * + * + *
+         * Min in y coordinate.
+         * 
+ * + * float ymin = 2; + * + * @param value The ymin to set. + * @return This builder for chaining. + */ + public Builder setYmin(float value) { + + ymin_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+         * Min in y coordinate.
+         * 
+ * + * float ymin = 2; + * + * @return This builder for chaining. + */ + public Builder clearYmin() { + bitField0_ = (bitField0_ & ~0x00000002); + ymin_ = 0F; + onChanged(); + return this; + } + + private float width_; + /** + * + * + *
+         * Width of the bounding box.
+         * 
+ * + * float width = 3; + * + * @return The width. + */ + @java.lang.Override + public float getWidth() { + return width_; + } + /** + * + * + *
+         * Width of the bounding box.
+         * 
+ * + * float width = 3; + * + * @param value The width to set. + * @return This builder for chaining. + */ + public Builder setWidth(float value) { + + width_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+         * Width of the bounding box.
+         * 
+ * + * float width = 3; + * + * @return This builder for chaining. + */ + public Builder clearWidth() { + bitField0_ = (bitField0_ & ~0x00000004); + width_ = 0F; + onChanged(); + return this; + } + + private float height_; + /** + * + * + *
+         * Height of the bounding box.
+         * 
+ * + * float height = 4; + * + * @return The height. + */ + @java.lang.Override + public float getHeight() { + return height_; + } + /** + * + * + *
+         * Height of the bounding box.
+         * 
+ * + * float height = 4; + * + * @param value The height to set. + * @return This builder for chaining. + */ + public Builder setHeight(float value) { + + height_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+         * Height of the bounding box.
+         * 
+ * + * float height = 4; + * + * @return This builder for chaining. + */ + public Builder clearHeight() { + bitField0_ = (bitField0_ & ~0x00000008); + height_ = 0F; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.OccupancyCountingPredictionResult.IdentifiedBox.NormalizedBoundingBox) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.OccupancyCountingPredictionResult.IdentifiedBox.NormalizedBoundingBox) + private static final com.google.cloud.visionai.v1.OccupancyCountingPredictionResult + .IdentifiedBox.NormalizedBoundingBox + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.IdentifiedBox + .NormalizedBoundingBox(); + } + + public static com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.IdentifiedBox + .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 { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.OccupancyCountingPredictionResult.IdentifiedBox + .NormalizedBoundingBox + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int bitField0_; + public static final int BOX_ID_FIELD_NUMBER = 1; + private long boxId_ = 0L; + /** + * + * + *
+     * An unique id for this box.
+     * 
+ * + * int64 box_id = 1; + * + * @return The boxId. + */ + @java.lang.Override + public long getBoxId() { + return boxId_; + } + + public static final int NORMALIZED_BOUNDING_BOX_FIELD_NUMBER = 2; + private com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.IdentifiedBox + .NormalizedBoundingBox + normalizedBoundingBox_; + /** + * + * + *
+     * Bounding Box in the normalized coordinates.
+     * 
+ * + * + * .google.cloud.visionai.v1.OccupancyCountingPredictionResult.IdentifiedBox.NormalizedBoundingBox normalized_bounding_box = 2; + * + * + * @return Whether the normalizedBoundingBox field is set. + */ + @java.lang.Override + public boolean hasNormalizedBoundingBox() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * Bounding Box in the normalized coordinates.
+     * 
+ * + * + * .google.cloud.visionai.v1.OccupancyCountingPredictionResult.IdentifiedBox.NormalizedBoundingBox normalized_bounding_box = 2; + * + * + * @return The normalizedBoundingBox. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.IdentifiedBox + .NormalizedBoundingBox + getNormalizedBoundingBox() { + return normalizedBoundingBox_ == null + ? com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.IdentifiedBox + .NormalizedBoundingBox.getDefaultInstance() + : normalizedBoundingBox_; + } + /** + * + * + *
+     * Bounding Box in the normalized coordinates.
+     * 
+ * + * + * .google.cloud.visionai.v1.OccupancyCountingPredictionResult.IdentifiedBox.NormalizedBoundingBox normalized_bounding_box = 2; + * + */ + @java.lang.Override + public com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.IdentifiedBox + .NormalizedBoundingBoxOrBuilder + getNormalizedBoundingBoxOrBuilder() { + return normalizedBoundingBox_ == null + ? com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.IdentifiedBox + .NormalizedBoundingBox.getDefaultInstance() + : normalizedBoundingBox_; + } + + public static final int SCORE_FIELD_NUMBER = 3; + private float score_ = 0F; + /** + * + * + *
+     * Confidence score associated with this box.
+     * 
+ * + * float score = 3; + * + * @return The score. + */ + @java.lang.Override + public float getScore() { + return score_; + } + + public static final int ENTITY_FIELD_NUMBER = 4; + private com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Entity entity_; + /** + * + * + *
+     * Entity of this box.
+     * 
+ * + * .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Entity entity = 4; + * + * @return Whether the entity field is set. + */ + @java.lang.Override + public boolean hasEntity() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * Entity of this box.
+     * 
+ * + * .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Entity entity = 4; + * + * @return The entity. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Entity getEntity() { + return entity_ == null + ? com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Entity + .getDefaultInstance() + : entity_; + } + /** + * + * + *
+     * Entity of this box.
+     * 
+ * + * .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Entity entity = 4; + */ + @java.lang.Override + public com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.EntityOrBuilder + getEntityOrBuilder() { + return entity_ == null + ? com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Entity + .getDefaultInstance() + : entity_; + } + + public static final int TRACK_ID_FIELD_NUMBER = 5; + private long trackId_ = 0L; + /** + * + * + *
+     * An unique id to identify a track. It should be consistent across frames.
+     * It only exists if tracking is enabled.
+     * 
+ * + * int64 track_id = 5; + * + * @return The trackId. + */ + @java.lang.Override + public long getTrackId() { + return trackId_; + } + + 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 (boxId_ != 0L) { + output.writeInt64(1, boxId_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getNormalizedBoundingBox()); + } + if (java.lang.Float.floatToRawIntBits(score_) != 0) { + output.writeFloat(3, score_); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(4, getEntity()); + } + if (trackId_ != 0L) { + output.writeInt64(5, trackId_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (boxId_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(1, boxId_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(2, getNormalizedBoundingBox()); + } + if (java.lang.Float.floatToRawIntBits(score_) != 0) { + size += com.google.protobuf.CodedOutputStream.computeFloatSize(3, score_); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getEntity()); + } + if (trackId_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(5, trackId_); + } + size += getUnknownFields().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.visionai.v1.OccupancyCountingPredictionResult.IdentifiedBox)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.IdentifiedBox other = + (com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.IdentifiedBox) obj; + + if (getBoxId() != other.getBoxId()) return false; + if (hasNormalizedBoundingBox() != other.hasNormalizedBoundingBox()) return false; + if (hasNormalizedBoundingBox()) { + if (!getNormalizedBoundingBox().equals(other.getNormalizedBoundingBox())) return false; + } + if (java.lang.Float.floatToIntBits(getScore()) + != java.lang.Float.floatToIntBits(other.getScore())) return false; + if (hasEntity() != other.hasEntity()) return false; + if (hasEntity()) { + if (!getEntity().equals(other.getEntity())) return false; + } + if (getTrackId() != other.getTrackId()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + BOX_ID_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getBoxId()); + if (hasNormalizedBoundingBox()) { + hash = (37 * hash) + NORMALIZED_BOUNDING_BOX_FIELD_NUMBER; + hash = (53 * hash) + getNormalizedBoundingBox().hashCode(); + } + hash = (37 * hash) + SCORE_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits(getScore()); + if (hasEntity()) { + hash = (37 * hash) + ENTITY_FIELD_NUMBER; + hash = (53 * hash) + getEntity().hashCode(); + } + hash = (37 * hash) + TRACK_ID_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getTrackId()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.IdentifiedBox + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.IdentifiedBox + 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.visionai.v1.OccupancyCountingPredictionResult.IdentifiedBox + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.IdentifiedBox + 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.visionai.v1.OccupancyCountingPredictionResult.IdentifiedBox + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.IdentifiedBox + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.IdentifiedBox + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.IdentifiedBox + 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.visionai.v1.OccupancyCountingPredictionResult.IdentifiedBox + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.IdentifiedBox + 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.visionai.v1.OccupancyCountingPredictionResult.IdentifiedBox + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.IdentifiedBox + 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.visionai.v1.OccupancyCountingPredictionResult.IdentifiedBox 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; + } + /** + * + * + *
+     * Identified box contains location and the entity of the object.
+     * 
+ * + * Protobuf type {@code + * google.cloud.visionai.v1.OccupancyCountingPredictionResult.IdentifiedBox} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.OccupancyCountingPredictionResult.IdentifiedBox) + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.IdentifiedBoxOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.AnnotationsProto + .internal_static_google_cloud_visionai_v1_OccupancyCountingPredictionResult_IdentifiedBox_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.AnnotationsProto + .internal_static_google_cloud_visionai_v1_OccupancyCountingPredictionResult_IdentifiedBox_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.IdentifiedBox.class, + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.IdentifiedBox.Builder + .class); + } + + // Construct using + // com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.IdentifiedBox.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getNormalizedBoundingBoxFieldBuilder(); + getEntityFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + boxId_ = 0L; + normalizedBoundingBox_ = null; + if (normalizedBoundingBoxBuilder_ != null) { + normalizedBoundingBoxBuilder_.dispose(); + normalizedBoundingBoxBuilder_ = null; + } + score_ = 0F; + entity_ = null; + if (entityBuilder_ != null) { + entityBuilder_.dispose(); + entityBuilder_ = null; + } + trackId_ = 0L; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.AnnotationsProto + .internal_static_google_cloud_visionai_v1_OccupancyCountingPredictionResult_IdentifiedBox_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.IdentifiedBox + getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.IdentifiedBox + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.IdentifiedBox build() { + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.IdentifiedBox result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.IdentifiedBox + buildPartial() { + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.IdentifiedBox result = + new com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.IdentifiedBox(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.IdentifiedBox result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.boxId_ = boxId_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.normalizedBoundingBox_ = + normalizedBoundingBoxBuilder_ == null + ? normalizedBoundingBox_ + : normalizedBoundingBoxBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.score_ = score_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.entity_ = entityBuilder_ == null ? entity_ : entityBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.trackId_ = trackId_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.IdentifiedBox) { + return mergeFrom( + (com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.IdentifiedBox) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.IdentifiedBox other) { + if (other + == com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.IdentifiedBox + .getDefaultInstance()) return this; + if (other.getBoxId() != 0L) { + setBoxId(other.getBoxId()); + } + if (other.hasNormalizedBoundingBox()) { + mergeNormalizedBoundingBox(other.getNormalizedBoundingBox()); + } + if (other.getScore() != 0F) { + setScore(other.getScore()); + } + if (other.hasEntity()) { + mergeEntity(other.getEntity()); + } + if (other.getTrackId() != 0L) { + setTrackId(other.getTrackId()); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + boxId_ = input.readInt64(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 18: + { + input.readMessage( + getNormalizedBoundingBoxFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 29: + { + score_ = input.readFloat(); + bitField0_ |= 0x00000004; + break; + } // case 29 + case 34: + { + input.readMessage(getEntityFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 40: + { + trackId_ = input.readInt64(); + bitField0_ |= 0x00000010; + break; + } // case 40 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private long boxId_; + /** + * + * + *
+       * An unique id for this box.
+       * 
+ * + * int64 box_id = 1; + * + * @return The boxId. + */ + @java.lang.Override + public long getBoxId() { + return boxId_; + } + /** + * + * + *
+       * An unique id for this box.
+       * 
+ * + * int64 box_id = 1; + * + * @param value The boxId to set. + * @return This builder for chaining. + */ + public Builder setBoxId(long value) { + + boxId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * An unique id for this box.
+       * 
+ * + * int64 box_id = 1; + * + * @return This builder for chaining. + */ + public Builder clearBoxId() { + bitField0_ = (bitField0_ & ~0x00000001); + boxId_ = 0L; + onChanged(); + return this; + } + + private com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.IdentifiedBox + .NormalizedBoundingBox + normalizedBoundingBox_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.IdentifiedBox + .NormalizedBoundingBox, + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.IdentifiedBox + .NormalizedBoundingBox.Builder, + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.IdentifiedBox + .NormalizedBoundingBoxOrBuilder> + normalizedBoundingBoxBuilder_; + /** + * + * + *
+       * Bounding Box in the normalized coordinates.
+       * 
+ * + * + * .google.cloud.visionai.v1.OccupancyCountingPredictionResult.IdentifiedBox.NormalizedBoundingBox normalized_bounding_box = 2; + * + * + * @return Whether the normalizedBoundingBox field is set. + */ + public boolean hasNormalizedBoundingBox() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+       * Bounding Box in the normalized coordinates.
+       * 
+ * + * + * .google.cloud.visionai.v1.OccupancyCountingPredictionResult.IdentifiedBox.NormalizedBoundingBox normalized_bounding_box = 2; + * + * + * @return The normalizedBoundingBox. + */ + public com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.IdentifiedBox + .NormalizedBoundingBox + getNormalizedBoundingBox() { + if (normalizedBoundingBoxBuilder_ == null) { + return normalizedBoundingBox_ == null + ? com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.IdentifiedBox + .NormalizedBoundingBox.getDefaultInstance() + : normalizedBoundingBox_; + } else { + return normalizedBoundingBoxBuilder_.getMessage(); + } + } + /** + * + * + *
+       * Bounding Box in the normalized coordinates.
+       * 
+ * + * + * .google.cloud.visionai.v1.OccupancyCountingPredictionResult.IdentifiedBox.NormalizedBoundingBox normalized_bounding_box = 2; + * + */ + public Builder setNormalizedBoundingBox( + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.IdentifiedBox + .NormalizedBoundingBox + value) { + if (normalizedBoundingBoxBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + normalizedBoundingBox_ = value; + } else { + normalizedBoundingBoxBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * Bounding Box in the normalized coordinates.
+       * 
+ * + * + * .google.cloud.visionai.v1.OccupancyCountingPredictionResult.IdentifiedBox.NormalizedBoundingBox normalized_bounding_box = 2; + * + */ + public Builder setNormalizedBoundingBox( + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.IdentifiedBox + .NormalizedBoundingBox.Builder + builderForValue) { + if (normalizedBoundingBoxBuilder_ == null) { + normalizedBoundingBox_ = builderForValue.build(); + } else { + normalizedBoundingBoxBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * Bounding Box in the normalized coordinates.
+       * 
+ * + * + * .google.cloud.visionai.v1.OccupancyCountingPredictionResult.IdentifiedBox.NormalizedBoundingBox normalized_bounding_box = 2; + * + */ + public Builder mergeNormalizedBoundingBox( + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.IdentifiedBox + .NormalizedBoundingBox + value) { + if (normalizedBoundingBoxBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && normalizedBoundingBox_ != null + && normalizedBoundingBox_ + != com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.IdentifiedBox + .NormalizedBoundingBox.getDefaultInstance()) { + getNormalizedBoundingBoxBuilder().mergeFrom(value); + } else { + normalizedBoundingBox_ = value; + } + } else { + normalizedBoundingBoxBuilder_.mergeFrom(value); + } + if (normalizedBoundingBox_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + /** + * + * + *
+       * Bounding Box in the normalized coordinates.
+       * 
+ * + * + * .google.cloud.visionai.v1.OccupancyCountingPredictionResult.IdentifiedBox.NormalizedBoundingBox normalized_bounding_box = 2; + * + */ + public Builder clearNormalizedBoundingBox() { + bitField0_ = (bitField0_ & ~0x00000002); + normalizedBoundingBox_ = null; + if (normalizedBoundingBoxBuilder_ != null) { + normalizedBoundingBoxBuilder_.dispose(); + normalizedBoundingBoxBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+       * Bounding Box in the normalized coordinates.
+       * 
+ * + * + * .google.cloud.visionai.v1.OccupancyCountingPredictionResult.IdentifiedBox.NormalizedBoundingBox normalized_bounding_box = 2; + * + */ + public com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.IdentifiedBox + .NormalizedBoundingBox.Builder + getNormalizedBoundingBoxBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getNormalizedBoundingBoxFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Bounding Box in the normalized coordinates.
+       * 
+ * + * + * .google.cloud.visionai.v1.OccupancyCountingPredictionResult.IdentifiedBox.NormalizedBoundingBox normalized_bounding_box = 2; + * + */ + public com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.IdentifiedBox + .NormalizedBoundingBoxOrBuilder + getNormalizedBoundingBoxOrBuilder() { + if (normalizedBoundingBoxBuilder_ != null) { + return normalizedBoundingBoxBuilder_.getMessageOrBuilder(); + } else { + return normalizedBoundingBox_ == null + ? com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.IdentifiedBox + .NormalizedBoundingBox.getDefaultInstance() + : normalizedBoundingBox_; + } + } + /** + * + * + *
+       * Bounding Box in the normalized coordinates.
+       * 
+ * + * + * .google.cloud.visionai.v1.OccupancyCountingPredictionResult.IdentifiedBox.NormalizedBoundingBox normalized_bounding_box = 2; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.IdentifiedBox + .NormalizedBoundingBox, + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.IdentifiedBox + .NormalizedBoundingBox.Builder, + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.IdentifiedBox + .NormalizedBoundingBoxOrBuilder> + getNormalizedBoundingBoxFieldBuilder() { + if (normalizedBoundingBoxBuilder_ == null) { + normalizedBoundingBoxBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.IdentifiedBox + .NormalizedBoundingBox, + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.IdentifiedBox + .NormalizedBoundingBox.Builder, + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.IdentifiedBox + .NormalizedBoundingBoxOrBuilder>( + getNormalizedBoundingBox(), getParentForChildren(), isClean()); + normalizedBoundingBox_ = null; + } + return normalizedBoundingBoxBuilder_; + } + + private float score_; + /** + * + * + *
+       * Confidence score associated with this box.
+       * 
+ * + * float score = 3; + * + * @return The score. + */ + @java.lang.Override + public float getScore() { + return score_; + } + /** + * + * + *
+       * Confidence score associated with this box.
+       * 
+ * + * float score = 3; + * + * @param value The score to set. + * @return This builder for chaining. + */ + public Builder setScore(float value) { + + score_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+       * Confidence score associated with this box.
+       * 
+ * + * float score = 3; + * + * @return This builder for chaining. + */ + public Builder clearScore() { + bitField0_ = (bitField0_ & ~0x00000004); + score_ = 0F; + onChanged(); + return this; + } + + private com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Entity entity_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Entity, + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Entity.Builder, + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.EntityOrBuilder> + entityBuilder_; + /** + * + * + *
+       * Entity of this box.
+       * 
+ * + * .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Entity entity = 4; + * + * @return Whether the entity field is set. + */ + public boolean hasEntity() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + * + * + *
+       * Entity of this box.
+       * 
+ * + * .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Entity entity = 4; + * + * @return The entity. + */ + public com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Entity getEntity() { + if (entityBuilder_ == null) { + return entity_ == null + ? com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Entity + .getDefaultInstance() + : entity_; + } else { + return entityBuilder_.getMessage(); + } + } + /** + * + * + *
+       * Entity of this box.
+       * 
+ * + * .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Entity entity = 4; + */ + public Builder setEntity( + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Entity value) { + if (entityBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + entity_ = value; + } else { + entityBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+       * Entity of this box.
+       * 
+ * + * .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Entity entity = 4; + */ + public Builder setEntity( + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Entity.Builder + builderForValue) { + if (entityBuilder_ == null) { + entity_ = builderForValue.build(); + } else { + entityBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+       * Entity of this box.
+       * 
+ * + * .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Entity entity = 4; + */ + public Builder mergeEntity( + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Entity value) { + if (entityBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) + && entity_ != null + && entity_ + != com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Entity + .getDefaultInstance()) { + getEntityBuilder().mergeFrom(value); + } else { + entity_ = value; + } + } else { + entityBuilder_.mergeFrom(value); + } + if (entity_ != null) { + bitField0_ |= 0x00000008; + onChanged(); + } + return this; + } + /** + * + * + *
+       * Entity of this box.
+       * 
+ * + * .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Entity entity = 4; + */ + public Builder clearEntity() { + bitField0_ = (bitField0_ & ~0x00000008); + entity_ = null; + if (entityBuilder_ != null) { + entityBuilder_.dispose(); + entityBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+       * Entity of this box.
+       * 
+ * + * .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Entity entity = 4; + */ + public com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Entity.Builder + getEntityBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return getEntityFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Entity of this box.
+       * 
+ * + * .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Entity entity = 4; + */ + public com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.EntityOrBuilder + getEntityOrBuilder() { + if (entityBuilder_ != null) { + return entityBuilder_.getMessageOrBuilder(); + } else { + return entity_ == null + ? com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Entity + .getDefaultInstance() + : entity_; + } + } + /** + * + * + *
+       * Entity of this box.
+       * 
+ * + * .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Entity entity = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Entity, + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Entity.Builder, + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.EntityOrBuilder> + getEntityFieldBuilder() { + if (entityBuilder_ == null) { + entityBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Entity, + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Entity.Builder, + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.EntityOrBuilder>( + getEntity(), getParentForChildren(), isClean()); + entity_ = null; + } + return entityBuilder_; + } + + private long trackId_; + /** + * + * + *
+       * An unique id to identify a track. It should be consistent across frames.
+       * It only exists if tracking is enabled.
+       * 
+ * + * int64 track_id = 5; + * + * @return The trackId. + */ + @java.lang.Override + public long getTrackId() { + return trackId_; + } + /** + * + * + *
+       * An unique id to identify a track. It should be consistent across frames.
+       * It only exists if tracking is enabled.
+       * 
+ * + * int64 track_id = 5; + * + * @param value The trackId to set. + * @return This builder for chaining. + */ + public Builder setTrackId(long value) { + + trackId_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+       * An unique id to identify a track. It should be consistent across frames.
+       * It only exists if tracking is enabled.
+       * 
+ * + * int64 track_id = 5; + * + * @return This builder for chaining. + */ + public Builder clearTrackId() { + bitField0_ = (bitField0_ & ~0x00000010); + trackId_ = 0L; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.OccupancyCountingPredictionResult.IdentifiedBox) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.OccupancyCountingPredictionResult.IdentifiedBox) + private static final com.google.cloud.visionai.v1.OccupancyCountingPredictionResult + .IdentifiedBox + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.IdentifiedBox(); + } + + public static com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.IdentifiedBox + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public IdentifiedBox parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.OccupancyCountingPredictionResult.IdentifiedBox + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface StatsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Counts of the full frame.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount full_frame_count = 1; + * + */ + java.util.List + getFullFrameCountList(); + /** + * + * + *
+     * Counts of the full frame.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount full_frame_count = 1; + * + */ + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount + getFullFrameCount(int index); + /** + * + * + *
+     * Counts of the full frame.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount full_frame_count = 1; + * + */ + int getFullFrameCountCount(); + /** + * + * + *
+     * Counts of the full frame.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount full_frame_count = 1; + * + */ + java.util.List< + ? extends + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats + .ObjectCountOrBuilder> + getFullFrameCountOrBuilderList(); + /** + * + * + *
+     * Counts of the full frame.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount full_frame_count = 1; + * + */ + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCountOrBuilder + getFullFrameCountOrBuilder(int index); + + /** + * + * + *
+     * Crossing line counts.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.CrossingLineCount crossing_line_counts = 2; + * + */ + java.util.List< + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.CrossingLineCount> + getCrossingLineCountsList(); + /** + * + * + *
+     * Crossing line counts.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.CrossingLineCount crossing_line_counts = 2; + * + */ + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.CrossingLineCount + getCrossingLineCounts(int index); + /** + * + * + *
+     * Crossing line counts.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.CrossingLineCount crossing_line_counts = 2; + * + */ + int getCrossingLineCountsCount(); + /** + * + * + *
+     * Crossing line counts.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.CrossingLineCount crossing_line_counts = 2; + * + */ + java.util.List< + ? extends + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats + .CrossingLineCountOrBuilder> + getCrossingLineCountsOrBuilderList(); + /** + * + * + *
+     * Crossing line counts.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.CrossingLineCount crossing_line_counts = 2; + * + */ + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.CrossingLineCountOrBuilder + getCrossingLineCountsOrBuilder(int index); + + /** + * + * + *
+     * Active zone counts.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ActiveZoneCount active_zone_counts = 3; + * + */ + java.util.List< + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ActiveZoneCount> + getActiveZoneCountsList(); + /** + * + * + *
+     * Active zone counts.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ActiveZoneCount active_zone_counts = 3; + * + */ + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ActiveZoneCount + getActiveZoneCounts(int index); + /** + * + * + *
+     * Active zone counts.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ActiveZoneCount active_zone_counts = 3; + * + */ + int getActiveZoneCountsCount(); + /** + * + * + *
+     * Active zone counts.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ActiveZoneCount active_zone_counts = 3; + * + */ + java.util.List< + ? extends + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats + .ActiveZoneCountOrBuilder> + getActiveZoneCountsOrBuilderList(); + /** + * + * + *
+     * Active zone counts.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ActiveZoneCount active_zone_counts = 3; + * + */ + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ActiveZoneCountOrBuilder + getActiveZoneCountsOrBuilder(int index); + } + /** + * + * + *
+   * The statistics info for annotations from occupancy counting operator.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats} + */ + public static final class Stats extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats) + StatsOrBuilder { + private static final long serialVersionUID = 0L; + // Use Stats.newBuilder() to construct. + private Stats(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Stats() { + fullFrameCount_ = java.util.Collections.emptyList(); + crossingLineCounts_ = java.util.Collections.emptyList(); + activeZoneCounts_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Stats(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.AnnotationsProto + .internal_static_google_cloud_visionai_v1_OccupancyCountingPredictionResult_Stats_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.AnnotationsProto + .internal_static_google_cloud_visionai_v1_OccupancyCountingPredictionResult_Stats_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.class, + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.Builder.class); + } + + public interface ObjectCountOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+       * Entity of this object.
+       * 
+ * + * .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Entity entity = 1; + * + * @return Whether the entity field is set. + */ + boolean hasEntity(); + /** + * + * + *
+       * Entity of this object.
+       * 
+ * + * .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Entity entity = 1; + * + * @return The entity. + */ + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Entity getEntity(); + /** + * + * + *
+       * Entity of this object.
+       * 
+ * + * .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Entity entity = 1; + */ + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.EntityOrBuilder + getEntityOrBuilder(); + + /** + * + * + *
+       * Count of the object.
+       * 
+ * + * int32 count = 2; + * + * @return The count. + */ + int getCount(); + } + /** + * + * + *
+     * The object info and instant count for annotations from occupancy counting
+     * operator.
+     * 
+ * + * Protobuf type {@code + * google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount} + */ + public static final class ObjectCount extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount) + ObjectCountOrBuilder { + private static final long serialVersionUID = 0L; + // Use ObjectCount.newBuilder() to construct. + private ObjectCount(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ObjectCount() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ObjectCount(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.AnnotationsProto + .internal_static_google_cloud_visionai_v1_OccupancyCountingPredictionResult_Stats_ObjectCount_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.AnnotationsProto + .internal_static_google_cloud_visionai_v1_OccupancyCountingPredictionResult_Stats_ObjectCount_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount + .class, + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount + .Builder.class); + } + + private int bitField0_; + public static final int ENTITY_FIELD_NUMBER = 1; + private com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Entity entity_; + /** + * + * + *
+       * Entity of this object.
+       * 
+ * + * .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Entity entity = 1; + * + * @return Whether the entity field is set. + */ + @java.lang.Override + public boolean hasEntity() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+       * Entity of this object.
+       * 
+ * + * .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Entity entity = 1; + * + * @return The entity. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Entity getEntity() { + return entity_ == null + ? com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Entity + .getDefaultInstance() + : entity_; + } + /** + * + * + *
+       * Entity of this object.
+       * 
+ * + * .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Entity entity = 1; + */ + @java.lang.Override + public com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.EntityOrBuilder + getEntityOrBuilder() { + return entity_ == null + ? com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Entity + .getDefaultInstance() + : entity_; + } + + public static final int COUNT_FIELD_NUMBER = 2; + private int count_ = 0; + /** + * + * + *
+       * Count of the object.
+       * 
+ * + * int32 count = 2; + * + * @return The count. + */ + @java.lang.Override + public int getCount() { + return count_; + } + + 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 (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getEntity()); + } + if (count_ != 0) { + output.writeInt32(2, count_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getEntity()); + } + if (count_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, count_); + } + size += getUnknownFields().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.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount other = + (com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount) obj; + + if (hasEntity() != other.hasEntity()) return false; + if (hasEntity()) { + if (!getEntity().equals(other.getEntity())) return false; + } + if (getCount() != other.getCount()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @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) + COUNT_FIELD_NUMBER; + hash = (53 * hash) + getCount(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount + 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.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount + 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.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount + 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.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount + 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.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount + 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.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount + 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 object info and instant count for annotations from occupancy counting
+       * operator.
+       * 
+ * + * Protobuf type {@code + * google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount) + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats + .ObjectCountOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.AnnotationsProto + .internal_static_google_cloud_visionai_v1_OccupancyCountingPredictionResult_Stats_ObjectCount_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.AnnotationsProto + .internal_static_google_cloud_visionai_v1_OccupancyCountingPredictionResult_Stats_ObjectCount_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount + .class, + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount + .Builder.class); + } + + // Construct using + // com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getEntityFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + entity_ = null; + if (entityBuilder_ != null) { + entityBuilder_.dispose(); + entityBuilder_ = null; + } + count_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.AnnotationsProto + .internal_static_google_cloud_visionai_v1_OccupancyCountingPredictionResult_Stats_ObjectCount_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount + getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount + build() { + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount + buildPartial() { + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount result = + new com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount( + this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount + result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.entity_ = entityBuilder_ == null ? entity_ : entityBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.count_ = count_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount) { + return mergeFrom( + (com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount + other) { + if (other + == com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount + .getDefaultInstance()) return this; + if (other.hasEntity()) { + mergeEntity(other.getEntity()); + } + if (other.getCount() != 0) { + setCount(other.getCount()); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getEntityFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + count_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Entity entity_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Entity, + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Entity.Builder, + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.EntityOrBuilder> + entityBuilder_; + /** + * + * + *
+         * Entity of this object.
+         * 
+ * + * .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Entity entity = 1; + * + * + * @return Whether the entity field is set. + */ + public boolean hasEntity() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+         * Entity of this object.
+         * 
+ * + * .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Entity entity = 1; + * + * + * @return The entity. + */ + public com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Entity getEntity() { + if (entityBuilder_ == null) { + return entity_ == null + ? com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Entity + .getDefaultInstance() + : entity_; + } else { + return entityBuilder_.getMessage(); + } + } + /** + * + * + *
+         * Entity of this object.
+         * 
+ * + * .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Entity entity = 1; + * + */ + public Builder setEntity( + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Entity value) { + if (entityBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + entity_ = value; + } else { + entityBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+         * Entity of this object.
+         * 
+ * + * .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Entity entity = 1; + * + */ + public Builder setEntity( + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Entity.Builder + builderForValue) { + if (entityBuilder_ == null) { + entity_ = builderForValue.build(); + } else { + entityBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+         * Entity of this object.
+         * 
+ * + * .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Entity entity = 1; + * + */ + public Builder mergeEntity( + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Entity value) { + if (entityBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && entity_ != null + && entity_ + != com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Entity + .getDefaultInstance()) { + getEntityBuilder().mergeFrom(value); + } else { + entity_ = value; + } + } else { + entityBuilder_.mergeFrom(value); + } + if (entity_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + /** + * + * + *
+         * Entity of this object.
+         * 
+ * + * .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Entity entity = 1; + * + */ + public Builder clearEntity() { + bitField0_ = (bitField0_ & ~0x00000001); + entity_ = null; + if (entityBuilder_ != null) { + entityBuilder_.dispose(); + entityBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+         * Entity of this object.
+         * 
+ * + * .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Entity entity = 1; + * + */ + public com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Entity.Builder + getEntityBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getEntityFieldBuilder().getBuilder(); + } + /** + * + * + *
+         * Entity of this object.
+         * 
+ * + * .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Entity entity = 1; + * + */ + public com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.EntityOrBuilder + getEntityOrBuilder() { + if (entityBuilder_ != null) { + return entityBuilder_.getMessageOrBuilder(); + } else { + return entity_ == null + ? com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Entity + .getDefaultInstance() + : entity_; + } + } + /** + * + * + *
+         * Entity of this object.
+         * 
+ * + * .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Entity entity = 1; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Entity, + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Entity.Builder, + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.EntityOrBuilder> + getEntityFieldBuilder() { + if (entityBuilder_ == null) { + entityBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Entity, + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Entity.Builder, + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.EntityOrBuilder>( + getEntity(), getParentForChildren(), isClean()); + entity_ = null; + } + return entityBuilder_; + } + + private int count_; + /** + * + * + *
+         * Count of the object.
+         * 
+ * + * int32 count = 2; + * + * @return The count. + */ + @java.lang.Override + public int getCount() { + return count_; + } + /** + * + * + *
+         * Count of the object.
+         * 
+ * + * int32 count = 2; + * + * @param value The count to set. + * @return This builder for chaining. + */ + public Builder setCount(int value) { + + count_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+         * Count of the object.
+         * 
+ * + * int32 count = 2; + * + * @return This builder for chaining. + */ + public Builder clearCount() { + bitField0_ = (bitField0_ & ~0x00000002); + count_ = 0; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount) + private static final com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats + .ObjectCount + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount(); + } + + public static com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ObjectCount parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface AccumulatedObjectCountOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.AccumulatedObjectCount) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+       * The start time of the accumulated count.
+       * 
+ * + * .google.protobuf.Timestamp start_time = 1; + * + * @return Whether the startTime field is set. + */ + boolean hasStartTime(); + /** + * + * + *
+       * The start time of the accumulated count.
+       * 
+ * + * .google.protobuf.Timestamp start_time = 1; + * + * @return The startTime. + */ + com.google.protobuf.Timestamp getStartTime(); + /** + * + * + *
+       * The start time of the accumulated count.
+       * 
+ * + * .google.protobuf.Timestamp start_time = 1; + */ + com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder(); + + /** + * + * + *
+       * The object count for the accumulated count.
+       * 
+ * + * + * .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount object_count = 2; + * + * + * @return Whether the objectCount field is set. + */ + boolean hasObjectCount(); + /** + * + * + *
+       * The object count for the accumulated count.
+       * 
+ * + * + * .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount object_count = 2; + * + * + * @return The objectCount. + */ + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount + getObjectCount(); + /** + * + * + *
+       * The object count for the accumulated count.
+       * 
+ * + * + * .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount object_count = 2; + * + */ + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCountOrBuilder + getObjectCountOrBuilder(); + } + /** + * + * + *
+     * The object info and accumulated count for annotations from occupancy
+     * counting operator.
+     * 
+ * + * Protobuf type {@code + * google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.AccumulatedObjectCount} + */ + public static final class AccumulatedObjectCount extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.AccumulatedObjectCount) + AccumulatedObjectCountOrBuilder { + private static final long serialVersionUID = 0L; + // Use AccumulatedObjectCount.newBuilder() to construct. + private AccumulatedObjectCount(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private AccumulatedObjectCount() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new AccumulatedObjectCount(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.AnnotationsProto + .internal_static_google_cloud_visionai_v1_OccupancyCountingPredictionResult_Stats_AccumulatedObjectCount_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.AnnotationsProto + .internal_static_google_cloud_visionai_v1_OccupancyCountingPredictionResult_Stats_AccumulatedObjectCount_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats + .AccumulatedObjectCount.class, + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats + .AccumulatedObjectCount.Builder.class); + } + + private int bitField0_; + public static final int START_TIME_FIELD_NUMBER = 1; + private com.google.protobuf.Timestamp startTime_; + /** + * + * + *
+       * The start time of the accumulated count.
+       * 
+ * + * .google.protobuf.Timestamp start_time = 1; + * + * @return Whether the startTime field is set. + */ + @java.lang.Override + public boolean hasStartTime() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+       * The start time of the accumulated count.
+       * 
+ * + * .google.protobuf.Timestamp start_time = 1; + * + * @return The startTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getStartTime() { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } + /** + * + * + *
+       * The start time of the accumulated count.
+       * 
+ * + * .google.protobuf.Timestamp start_time = 1; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } + + public static final int OBJECT_COUNT_FIELD_NUMBER = 2; + private com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount + objectCount_; + /** + * + * + *
+       * The object count for the accumulated count.
+       * 
+ * + * + * .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount object_count = 2; + * + * + * @return Whether the objectCount field is set. + */ + @java.lang.Override + public boolean hasObjectCount() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+       * The object count for the accumulated count.
+       * 
+ * + * + * .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount object_count = 2; + * + * + * @return The objectCount. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount + getObjectCount() { + return objectCount_ == null + ? com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount + .getDefaultInstance() + : objectCount_; + } + /** + * + * + *
+       * The object count for the accumulated count.
+       * 
+ * + * + * .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount object_count = 2; + * + */ + @java.lang.Override + public com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats + .ObjectCountOrBuilder + getObjectCountOrBuilder() { + return objectCount_ == null + ? com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount + .getDefaultInstance() + : objectCount_; + } + + 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 (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getStartTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(2, getObjectCount()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getStartTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getObjectCount()); + } + size += getUnknownFields().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.visionai.v1.OccupancyCountingPredictionResult.Stats + .AccumulatedObjectCount)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.AccumulatedObjectCount + other = + (com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats + .AccumulatedObjectCount) + obj; + + if (hasStartTime() != other.hasStartTime()) return false; + if (hasStartTime()) { + if (!getStartTime().equals(other.getStartTime())) return false; + } + if (hasObjectCount() != other.hasObjectCount()) return false; + if (hasObjectCount()) { + if (!getObjectCount().equals(other.getObjectCount())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasStartTime()) { + hash = (37 * hash) + START_TIME_FIELD_NUMBER; + hash = (53 * hash) + getStartTime().hashCode(); + } + if (hasObjectCount()) { + hash = (37 * hash) + OBJECT_COUNT_FIELD_NUMBER; + hash = (53 * hash) + getObjectCount().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats + .AccumulatedObjectCount + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats + .AccumulatedObjectCount + 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.visionai.v1.OccupancyCountingPredictionResult.Stats + .AccumulatedObjectCount + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats + .AccumulatedObjectCount + 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.visionai.v1.OccupancyCountingPredictionResult.Stats + .AccumulatedObjectCount + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats + .AccumulatedObjectCount + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats + .AccumulatedObjectCount + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats + .AccumulatedObjectCount + 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.visionai.v1.OccupancyCountingPredictionResult.Stats + .AccumulatedObjectCount + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats + .AccumulatedObjectCount + 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.visionai.v1.OccupancyCountingPredictionResult.Stats + .AccumulatedObjectCount + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats + .AccumulatedObjectCount + 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.visionai.v1.OccupancyCountingPredictionResult.Stats + .AccumulatedObjectCount + 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 object info and accumulated count for annotations from occupancy
+       * counting operator.
+       * 
+ * + * Protobuf type {@code + * google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.AccumulatedObjectCount} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.AccumulatedObjectCount) + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats + .AccumulatedObjectCountOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.AnnotationsProto + .internal_static_google_cloud_visionai_v1_OccupancyCountingPredictionResult_Stats_AccumulatedObjectCount_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.AnnotationsProto + .internal_static_google_cloud_visionai_v1_OccupancyCountingPredictionResult_Stats_AccumulatedObjectCount_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats + .AccumulatedObjectCount.class, + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats + .AccumulatedObjectCount.Builder.class); + } + + // Construct using + // com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.AccumulatedObjectCount.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getStartTimeFieldBuilder(); + getObjectCountFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + startTime_ = null; + if (startTimeBuilder_ != null) { + startTimeBuilder_.dispose(); + startTimeBuilder_ = null; + } + objectCount_ = null; + if (objectCountBuilder_ != null) { + objectCountBuilder_.dispose(); + objectCountBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.AnnotationsProto + .internal_static_google_cloud_visionai_v1_OccupancyCountingPredictionResult_Stats_AccumulatedObjectCount_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats + .AccumulatedObjectCount + getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats + .AccumulatedObjectCount.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats + .AccumulatedObjectCount + build() { + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats + .AccumulatedObjectCount + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats + .AccumulatedObjectCount + buildPartial() { + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats + .AccumulatedObjectCount + result = + new com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats + .AccumulatedObjectCount(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats + .AccumulatedObjectCount + result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.startTime_ = startTimeBuilder_ == null ? startTime_ : startTimeBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.objectCount_ = + objectCountBuilder_ == null ? objectCount_ : objectCountBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats + .AccumulatedObjectCount) { + return mergeFrom( + (com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats + .AccumulatedObjectCount) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats + .AccumulatedObjectCount + other) { + if (other + == com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats + .AccumulatedObjectCount.getDefaultInstance()) return this; + if (other.hasStartTime()) { + mergeStartTime(other.getStartTime()); + } + if (other.hasObjectCount()) { + mergeObjectCount(other.getObjectCount()); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getStartTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage(getObjectCountFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.protobuf.Timestamp startTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + startTimeBuilder_; + /** + * + * + *
+         * The start time of the accumulated count.
+         * 
+ * + * .google.protobuf.Timestamp start_time = 1; + * + * @return Whether the startTime field is set. + */ + public boolean hasStartTime() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+         * The start time of the accumulated count.
+         * 
+ * + * .google.protobuf.Timestamp start_time = 1; + * + * @return The startTime. + */ + public com.google.protobuf.Timestamp getStartTime() { + if (startTimeBuilder_ == null) { + return startTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : startTime_; + } else { + return startTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+         * The start time of the accumulated count.
+         * 
+ * + * .google.protobuf.Timestamp start_time = 1; + */ + public Builder setStartTime(com.google.protobuf.Timestamp value) { + if (startTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + startTime_ = value; + } else { + startTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+         * The start time of the accumulated count.
+         * 
+ * + * .google.protobuf.Timestamp start_time = 1; + */ + public Builder setStartTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (startTimeBuilder_ == null) { + startTime_ = builderForValue.build(); + } else { + startTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+         * The start time of the accumulated count.
+         * 
+ * + * .google.protobuf.Timestamp start_time = 1; + */ + public Builder mergeStartTime(com.google.protobuf.Timestamp value) { + if (startTimeBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && startTime_ != null + && startTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getStartTimeBuilder().mergeFrom(value); + } else { + startTime_ = value; + } + } else { + startTimeBuilder_.mergeFrom(value); + } + if (startTime_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + /** + * + * + *
+         * The start time of the accumulated count.
+         * 
+ * + * .google.protobuf.Timestamp start_time = 1; + */ + public Builder clearStartTime() { + bitField0_ = (bitField0_ & ~0x00000001); + startTime_ = null; + if (startTimeBuilder_ != null) { + startTimeBuilder_.dispose(); + startTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+         * The start time of the accumulated count.
+         * 
+ * + * .google.protobuf.Timestamp start_time = 1; + */ + public com.google.protobuf.Timestamp.Builder getStartTimeBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getStartTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+         * The start time of the accumulated count.
+         * 
+ * + * .google.protobuf.Timestamp start_time = 1; + */ + public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { + if (startTimeBuilder_ != null) { + return startTimeBuilder_.getMessageOrBuilder(); + } else { + return startTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : startTime_; + } + } + /** + * + * + *
+         * The start time of the accumulated count.
+         * 
+ * + * .google.protobuf.Timestamp start_time = 1; + */ + 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.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount + objectCount_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount, + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount + .Builder, + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats + .ObjectCountOrBuilder> + objectCountBuilder_; + /** + * + * + *
+         * The object count for the accumulated count.
+         * 
+ * + * + * .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount object_count = 2; + * + * + * @return Whether the objectCount field is set. + */ + public boolean hasObjectCount() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+         * The object count for the accumulated count.
+         * 
+ * + * + * .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount object_count = 2; + * + * + * @return The objectCount. + */ + public com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount + getObjectCount() { + if (objectCountBuilder_ == null) { + return objectCount_ == null + ? com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount + .getDefaultInstance() + : objectCount_; + } else { + return objectCountBuilder_.getMessage(); + } + } + /** + * + * + *
+         * The object count for the accumulated count.
+         * 
+ * + * + * .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount object_count = 2; + * + */ + public Builder setObjectCount( + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount + value) { + if (objectCountBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + objectCount_ = value; + } else { + objectCountBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+         * The object count for the accumulated count.
+         * 
+ * + * + * .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount object_count = 2; + * + */ + public Builder setObjectCount( + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount.Builder + builderForValue) { + if (objectCountBuilder_ == null) { + objectCount_ = builderForValue.build(); + } else { + objectCountBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+         * The object count for the accumulated count.
+         * 
+ * + * + * .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount object_count = 2; + * + */ + public Builder mergeObjectCount( + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount + value) { + if (objectCountBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && objectCount_ != null + && objectCount_ + != com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats + .ObjectCount.getDefaultInstance()) { + getObjectCountBuilder().mergeFrom(value); + } else { + objectCount_ = value; + } + } else { + objectCountBuilder_.mergeFrom(value); + } + if (objectCount_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + /** + * + * + *
+         * The object count for the accumulated count.
+         * 
+ * + * + * .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount object_count = 2; + * + */ + public Builder clearObjectCount() { + bitField0_ = (bitField0_ & ~0x00000002); + objectCount_ = null; + if (objectCountBuilder_ != null) { + objectCountBuilder_.dispose(); + objectCountBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+         * The object count for the accumulated count.
+         * 
+ * + * + * .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount object_count = 2; + * + */ + public com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount + .Builder + getObjectCountBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getObjectCountFieldBuilder().getBuilder(); + } + /** + * + * + *
+         * The object count for the accumulated count.
+         * 
+ * + * + * .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount object_count = 2; + * + */ + public com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats + .ObjectCountOrBuilder + getObjectCountOrBuilder() { + if (objectCountBuilder_ != null) { + return objectCountBuilder_.getMessageOrBuilder(); + } else { + return objectCount_ == null + ? com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount + .getDefaultInstance() + : objectCount_; + } + } + /** + * + * + *
+         * The object count for the accumulated count.
+         * 
+ * + * + * .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount object_count = 2; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount, + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount + .Builder, + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats + .ObjectCountOrBuilder> + getObjectCountFieldBuilder() { + if (objectCountBuilder_ == null) { + objectCountBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats + .ObjectCount, + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount + .Builder, + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats + .ObjectCountOrBuilder>(getObjectCount(), getParentForChildren(), isClean()); + objectCount_ = null; + } + return objectCountBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.OccupancyCountingPredictionResult.Stats.AccumulatedObjectCount) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.AccumulatedObjectCount) + private static final com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats + .AccumulatedObjectCount + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats + .AccumulatedObjectCount(); + } + + public static com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats + .AccumulatedObjectCount + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AccumulatedObjectCount parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.OccupancyCountingPredictionResult.Stats + .AccumulatedObjectCount + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface CrossingLineCountOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.CrossingLineCount) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+       * Line annotation from the user.
+       * 
+ * + * .google.cloud.visionai.v1.StreamAnnotation annotation = 1; + * + * @return Whether the annotation field is set. + */ + boolean hasAnnotation(); + /** + * + * + *
+       * Line annotation from the user.
+       * 
+ * + * .google.cloud.visionai.v1.StreamAnnotation annotation = 1; + * + * @return The annotation. + */ + com.google.cloud.visionai.v1.StreamAnnotation getAnnotation(); + /** + * + * + *
+       * Line annotation from the user.
+       * 
+ * + * .google.cloud.visionai.v1.StreamAnnotation annotation = 1; + */ + com.google.cloud.visionai.v1.StreamAnnotationOrBuilder getAnnotationOrBuilder(); + + /** + * + * + *
+       * The direction that follows the right hand rule.
+       * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount positive_direction_counts = 2; + * + */ + java.util.List< + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount> + getPositiveDirectionCountsList(); + /** + * + * + *
+       * The direction that follows the right hand rule.
+       * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount positive_direction_counts = 2; + * + */ + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount + getPositiveDirectionCounts(int index); + /** + * + * + *
+       * The direction that follows the right hand rule.
+       * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount positive_direction_counts = 2; + * + */ + int getPositiveDirectionCountsCount(); + /** + * + * + *
+       * The direction that follows the right hand rule.
+       * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount positive_direction_counts = 2; + * + */ + java.util.List< + ? extends + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats + .ObjectCountOrBuilder> + getPositiveDirectionCountsOrBuilderList(); + /** + * + * + *
+       * The direction that follows the right hand rule.
+       * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount positive_direction_counts = 2; + * + */ + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCountOrBuilder + getPositiveDirectionCountsOrBuilder(int index); + + /** + * + * + *
+       * The direction that is opposite to the right hand rule.
+       * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount negative_direction_counts = 3; + * + */ + java.util.List< + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount> + getNegativeDirectionCountsList(); + /** + * + * + *
+       * The direction that is opposite to the right hand rule.
+       * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount negative_direction_counts = 3; + * + */ + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount + getNegativeDirectionCounts(int index); + /** + * + * + *
+       * The direction that is opposite to the right hand rule.
+       * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount negative_direction_counts = 3; + * + */ + int getNegativeDirectionCountsCount(); + /** + * + * + *
+       * The direction that is opposite to the right hand rule.
+       * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount negative_direction_counts = 3; + * + */ + java.util.List< + ? extends + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats + .ObjectCountOrBuilder> + getNegativeDirectionCountsOrBuilderList(); + /** + * + * + *
+       * The direction that is opposite to the right hand rule.
+       * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount negative_direction_counts = 3; + * + */ + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCountOrBuilder + getNegativeDirectionCountsOrBuilder(int index); + + /** + * + * + *
+       * The accumulated positive count.
+       * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.AccumulatedObjectCount accumulated_positive_direction_counts = 4; + * + */ + java.util.List< + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats + .AccumulatedObjectCount> + getAccumulatedPositiveDirectionCountsList(); + /** + * + * + *
+       * The accumulated positive count.
+       * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.AccumulatedObjectCount accumulated_positive_direction_counts = 4; + * + */ + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.AccumulatedObjectCount + getAccumulatedPositiveDirectionCounts(int index); + /** + * + * + *
+       * The accumulated positive count.
+       * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.AccumulatedObjectCount accumulated_positive_direction_counts = 4; + * + */ + int getAccumulatedPositiveDirectionCountsCount(); + /** + * + * + *
+       * The accumulated positive count.
+       * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.AccumulatedObjectCount accumulated_positive_direction_counts = 4; + * + */ + java.util.List< + ? extends + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats + .AccumulatedObjectCountOrBuilder> + getAccumulatedPositiveDirectionCountsOrBuilderList(); + /** + * + * + *
+       * The accumulated positive count.
+       * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.AccumulatedObjectCount accumulated_positive_direction_counts = 4; + * + */ + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats + .AccumulatedObjectCountOrBuilder + getAccumulatedPositiveDirectionCountsOrBuilder(int index); + + /** + * + * + *
+       * The accumulated negative count.
+       * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.AccumulatedObjectCount accumulated_negative_direction_counts = 5; + * + */ + java.util.List< + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats + .AccumulatedObjectCount> + getAccumulatedNegativeDirectionCountsList(); + /** + * + * + *
+       * The accumulated negative count.
+       * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.AccumulatedObjectCount accumulated_negative_direction_counts = 5; + * + */ + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.AccumulatedObjectCount + getAccumulatedNegativeDirectionCounts(int index); + /** + * + * + *
+       * The accumulated negative count.
+       * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.AccumulatedObjectCount accumulated_negative_direction_counts = 5; + * + */ + int getAccumulatedNegativeDirectionCountsCount(); + /** + * + * + *
+       * The accumulated negative count.
+       * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.AccumulatedObjectCount accumulated_negative_direction_counts = 5; + * + */ + java.util.List< + ? extends + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats + .AccumulatedObjectCountOrBuilder> + getAccumulatedNegativeDirectionCountsOrBuilderList(); + /** + * + * + *
+       * The accumulated negative count.
+       * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.AccumulatedObjectCount accumulated_negative_direction_counts = 5; + * + */ + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats + .AccumulatedObjectCountOrBuilder + getAccumulatedNegativeDirectionCountsOrBuilder(int index); + } + /** + * + * + *
+     * Message for Crossing line count.
+     * 
+ * + * Protobuf type {@code + * google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.CrossingLineCount} + */ + public static final class CrossingLineCount extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.CrossingLineCount) + CrossingLineCountOrBuilder { + private static final long serialVersionUID = 0L; + // Use CrossingLineCount.newBuilder() to construct. + private CrossingLineCount(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CrossingLineCount() { + positiveDirectionCounts_ = java.util.Collections.emptyList(); + negativeDirectionCounts_ = java.util.Collections.emptyList(); + accumulatedPositiveDirectionCounts_ = java.util.Collections.emptyList(); + accumulatedNegativeDirectionCounts_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CrossingLineCount(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.AnnotationsProto + .internal_static_google_cloud_visionai_v1_OccupancyCountingPredictionResult_Stats_CrossingLineCount_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.AnnotationsProto + .internal_static_google_cloud_visionai_v1_OccupancyCountingPredictionResult_Stats_CrossingLineCount_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats + .CrossingLineCount.class, + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats + .CrossingLineCount.Builder.class); + } + + private int bitField0_; + public static final int ANNOTATION_FIELD_NUMBER = 1; + private com.google.cloud.visionai.v1.StreamAnnotation annotation_; + /** + * + * + *
+       * Line annotation from the user.
+       * 
+ * + * .google.cloud.visionai.v1.StreamAnnotation annotation = 1; + * + * @return Whether the annotation field is set. + */ + @java.lang.Override + public boolean hasAnnotation() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+       * Line annotation from the user.
+       * 
+ * + * .google.cloud.visionai.v1.StreamAnnotation annotation = 1; + * + * @return The annotation. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.StreamAnnotation getAnnotation() { + return annotation_ == null + ? com.google.cloud.visionai.v1.StreamAnnotation.getDefaultInstance() + : annotation_; + } + /** + * + * + *
+       * Line annotation from the user.
+       * 
+ * + * .google.cloud.visionai.v1.StreamAnnotation annotation = 1; + */ + @java.lang.Override + public com.google.cloud.visionai.v1.StreamAnnotationOrBuilder getAnnotationOrBuilder() { + return annotation_ == null + ? com.google.cloud.visionai.v1.StreamAnnotation.getDefaultInstance() + : annotation_; + } + + public static final int POSITIVE_DIRECTION_COUNTS_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private java.util.List< + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount> + positiveDirectionCounts_; + /** + * + * + *
+       * The direction that follows the right hand rule.
+       * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount positive_direction_counts = 2; + * + */ + @java.lang.Override + public java.util.List< + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount> + getPositiveDirectionCountsList() { + return positiveDirectionCounts_; + } + /** + * + * + *
+       * The direction that follows the right hand rule.
+       * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount positive_direction_counts = 2; + * + */ + @java.lang.Override + public java.util.List< + ? extends + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats + .ObjectCountOrBuilder> + getPositiveDirectionCountsOrBuilderList() { + return positiveDirectionCounts_; + } + /** + * + * + *
+       * The direction that follows the right hand rule.
+       * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount positive_direction_counts = 2; + * + */ + @java.lang.Override + public int getPositiveDirectionCountsCount() { + return positiveDirectionCounts_.size(); + } + /** + * + * + *
+       * The direction that follows the right hand rule.
+       * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount positive_direction_counts = 2; + * + */ + @java.lang.Override + public com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount + getPositiveDirectionCounts(int index) { + return positiveDirectionCounts_.get(index); + } + /** + * + * + *
+       * The direction that follows the right hand rule.
+       * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount positive_direction_counts = 2; + * + */ + @java.lang.Override + public com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats + .ObjectCountOrBuilder + getPositiveDirectionCountsOrBuilder(int index) { + return positiveDirectionCounts_.get(index); + } + + public static final int NEGATIVE_DIRECTION_COUNTS_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private java.util.List< + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount> + negativeDirectionCounts_; + /** + * + * + *
+       * The direction that is opposite to the right hand rule.
+       * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount negative_direction_counts = 3; + * + */ + @java.lang.Override + public java.util.List< + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount> + getNegativeDirectionCountsList() { + return negativeDirectionCounts_; + } + /** + * + * + *
+       * The direction that is opposite to the right hand rule.
+       * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount negative_direction_counts = 3; + * + */ + @java.lang.Override + public java.util.List< + ? extends + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats + .ObjectCountOrBuilder> + getNegativeDirectionCountsOrBuilderList() { + return negativeDirectionCounts_; + } + /** + * + * + *
+       * The direction that is opposite to the right hand rule.
+       * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount negative_direction_counts = 3; + * + */ + @java.lang.Override + public int getNegativeDirectionCountsCount() { + return negativeDirectionCounts_.size(); + } + /** + * + * + *
+       * The direction that is opposite to the right hand rule.
+       * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount negative_direction_counts = 3; + * + */ + @java.lang.Override + public com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount + getNegativeDirectionCounts(int index) { + return negativeDirectionCounts_.get(index); + } + /** + * + * + *
+       * The direction that is opposite to the right hand rule.
+       * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount negative_direction_counts = 3; + * + */ + @java.lang.Override + public com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats + .ObjectCountOrBuilder + getNegativeDirectionCountsOrBuilder(int index) { + return negativeDirectionCounts_.get(index); + } + + public static final int ACCUMULATED_POSITIVE_DIRECTION_COUNTS_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private java.util.List< + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats + .AccumulatedObjectCount> + accumulatedPositiveDirectionCounts_; + /** + * + * + *
+       * The accumulated positive count.
+       * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.AccumulatedObjectCount accumulated_positive_direction_counts = 4; + * + */ + @java.lang.Override + public java.util.List< + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats + .AccumulatedObjectCount> + getAccumulatedPositiveDirectionCountsList() { + return accumulatedPositiveDirectionCounts_; + } + /** + * + * + *
+       * The accumulated positive count.
+       * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.AccumulatedObjectCount accumulated_positive_direction_counts = 4; + * + */ + @java.lang.Override + public java.util.List< + ? extends + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats + .AccumulatedObjectCountOrBuilder> + getAccumulatedPositiveDirectionCountsOrBuilderList() { + return accumulatedPositiveDirectionCounts_; + } + /** + * + * + *
+       * The accumulated positive count.
+       * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.AccumulatedObjectCount accumulated_positive_direction_counts = 4; + * + */ + @java.lang.Override + public int getAccumulatedPositiveDirectionCountsCount() { + return accumulatedPositiveDirectionCounts_.size(); + } + /** + * + * + *
+       * The accumulated positive count.
+       * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.AccumulatedObjectCount accumulated_positive_direction_counts = 4; + * + */ + @java.lang.Override + public com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats + .AccumulatedObjectCount + getAccumulatedPositiveDirectionCounts(int index) { + return accumulatedPositiveDirectionCounts_.get(index); + } + /** + * + * + *
+       * The accumulated positive count.
+       * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.AccumulatedObjectCount accumulated_positive_direction_counts = 4; + * + */ + @java.lang.Override + public com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats + .AccumulatedObjectCountOrBuilder + getAccumulatedPositiveDirectionCountsOrBuilder(int index) { + return accumulatedPositiveDirectionCounts_.get(index); + } + + public static final int ACCUMULATED_NEGATIVE_DIRECTION_COUNTS_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private java.util.List< + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats + .AccumulatedObjectCount> + accumulatedNegativeDirectionCounts_; + /** + * + * + *
+       * The accumulated negative count.
+       * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.AccumulatedObjectCount accumulated_negative_direction_counts = 5; + * + */ + @java.lang.Override + public java.util.List< + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats + .AccumulatedObjectCount> + getAccumulatedNegativeDirectionCountsList() { + return accumulatedNegativeDirectionCounts_; + } + /** + * + * + *
+       * The accumulated negative count.
+       * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.AccumulatedObjectCount accumulated_negative_direction_counts = 5; + * + */ + @java.lang.Override + public java.util.List< + ? extends + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats + .AccumulatedObjectCountOrBuilder> + getAccumulatedNegativeDirectionCountsOrBuilderList() { + return accumulatedNegativeDirectionCounts_; + } + /** + * + * + *
+       * The accumulated negative count.
+       * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.AccumulatedObjectCount accumulated_negative_direction_counts = 5; + * + */ + @java.lang.Override + public int getAccumulatedNegativeDirectionCountsCount() { + return accumulatedNegativeDirectionCounts_.size(); + } + /** + * + * + *
+       * The accumulated negative count.
+       * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.AccumulatedObjectCount accumulated_negative_direction_counts = 5; + * + */ + @java.lang.Override + public com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats + .AccumulatedObjectCount + getAccumulatedNegativeDirectionCounts(int index) { + return accumulatedNegativeDirectionCounts_.get(index); + } + /** + * + * + *
+       * The accumulated negative count.
+       * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.AccumulatedObjectCount accumulated_negative_direction_counts = 5; + * + */ + @java.lang.Override + public com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats + .AccumulatedObjectCountOrBuilder + getAccumulatedNegativeDirectionCountsOrBuilder(int index) { + return accumulatedNegativeDirectionCounts_.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 (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getAnnotation()); + } + for (int i = 0; i < positiveDirectionCounts_.size(); i++) { + output.writeMessage(2, positiveDirectionCounts_.get(i)); + } + for (int i = 0; i < negativeDirectionCounts_.size(); i++) { + output.writeMessage(3, negativeDirectionCounts_.get(i)); + } + for (int i = 0; i < accumulatedPositiveDirectionCounts_.size(); i++) { + output.writeMessage(4, accumulatedPositiveDirectionCounts_.get(i)); + } + for (int i = 0; i < accumulatedNegativeDirectionCounts_.size(); i++) { + output.writeMessage(5, accumulatedNegativeDirectionCounts_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getAnnotation()); + } + for (int i = 0; i < positiveDirectionCounts_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 2, positiveDirectionCounts_.get(i)); + } + for (int i = 0; i < negativeDirectionCounts_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 3, negativeDirectionCounts_.get(i)); + } + for (int i = 0; i < accumulatedPositiveDirectionCounts_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 4, accumulatedPositiveDirectionCounts_.get(i)); + } + for (int i = 0; i < accumulatedNegativeDirectionCounts_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 5, accumulatedNegativeDirectionCounts_.get(i)); + } + size += getUnknownFields().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.visionai.v1.OccupancyCountingPredictionResult.Stats + .CrossingLineCount)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.CrossingLineCount + other = + (com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats + .CrossingLineCount) + obj; + + if (hasAnnotation() != other.hasAnnotation()) return false; + if (hasAnnotation()) { + if (!getAnnotation().equals(other.getAnnotation())) return false; + } + if (!getPositiveDirectionCountsList().equals(other.getPositiveDirectionCountsList())) + return false; + if (!getNegativeDirectionCountsList().equals(other.getNegativeDirectionCountsList())) + return false; + if (!getAccumulatedPositiveDirectionCountsList() + .equals(other.getAccumulatedPositiveDirectionCountsList())) return false; + if (!getAccumulatedNegativeDirectionCountsList() + .equals(other.getAccumulatedNegativeDirectionCountsList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasAnnotation()) { + hash = (37 * hash) + ANNOTATION_FIELD_NUMBER; + hash = (53 * hash) + getAnnotation().hashCode(); + } + if (getPositiveDirectionCountsCount() > 0) { + hash = (37 * hash) + POSITIVE_DIRECTION_COUNTS_FIELD_NUMBER; + hash = (53 * hash) + getPositiveDirectionCountsList().hashCode(); + } + if (getNegativeDirectionCountsCount() > 0) { + hash = (37 * hash) + NEGATIVE_DIRECTION_COUNTS_FIELD_NUMBER; + hash = (53 * hash) + getNegativeDirectionCountsList().hashCode(); + } + if (getAccumulatedPositiveDirectionCountsCount() > 0) { + hash = (37 * hash) + ACCUMULATED_POSITIVE_DIRECTION_COUNTS_FIELD_NUMBER; + hash = (53 * hash) + getAccumulatedPositiveDirectionCountsList().hashCode(); + } + if (getAccumulatedNegativeDirectionCountsCount() > 0) { + hash = (37 * hash) + ACCUMULATED_NEGATIVE_DIRECTION_COUNTS_FIELD_NUMBER; + hash = (53 * hash) + getAccumulatedNegativeDirectionCountsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats + .CrossingLineCount + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats + .CrossingLineCount + 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.visionai.v1.OccupancyCountingPredictionResult.Stats + .CrossingLineCount + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats + .CrossingLineCount + 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.visionai.v1.OccupancyCountingPredictionResult.Stats + .CrossingLineCount + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats + .CrossingLineCount + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats + .CrossingLineCount + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats + .CrossingLineCount + 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.visionai.v1.OccupancyCountingPredictionResult.Stats + .CrossingLineCount + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats + .CrossingLineCount + 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.visionai.v1.OccupancyCountingPredictionResult.Stats + .CrossingLineCount + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats + .CrossingLineCount + 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.visionai.v1.OccupancyCountingPredictionResult.Stats.CrossingLineCount + 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; + } + /** + * + * + *
+       * Message for Crossing line count.
+       * 
+ * + * Protobuf type {@code + * google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.CrossingLineCount} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.CrossingLineCount) + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats + .CrossingLineCountOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.AnnotationsProto + .internal_static_google_cloud_visionai_v1_OccupancyCountingPredictionResult_Stats_CrossingLineCount_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.AnnotationsProto + .internal_static_google_cloud_visionai_v1_OccupancyCountingPredictionResult_Stats_CrossingLineCount_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats + .CrossingLineCount.class, + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats + .CrossingLineCount.Builder.class); + } + + // Construct using + // com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.CrossingLineCount.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getAnnotationFieldBuilder(); + getPositiveDirectionCountsFieldBuilder(); + getNegativeDirectionCountsFieldBuilder(); + getAccumulatedPositiveDirectionCountsFieldBuilder(); + getAccumulatedNegativeDirectionCountsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + annotation_ = null; + if (annotationBuilder_ != null) { + annotationBuilder_.dispose(); + annotationBuilder_ = null; + } + if (positiveDirectionCountsBuilder_ == null) { + positiveDirectionCounts_ = java.util.Collections.emptyList(); + } else { + positiveDirectionCounts_ = null; + positiveDirectionCountsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + if (negativeDirectionCountsBuilder_ == null) { + negativeDirectionCounts_ = java.util.Collections.emptyList(); + } else { + negativeDirectionCounts_ = null; + negativeDirectionCountsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000004); + if (accumulatedPositiveDirectionCountsBuilder_ == null) { + accumulatedPositiveDirectionCounts_ = java.util.Collections.emptyList(); + } else { + accumulatedPositiveDirectionCounts_ = null; + accumulatedPositiveDirectionCountsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000008); + if (accumulatedNegativeDirectionCountsBuilder_ == null) { + accumulatedNegativeDirectionCounts_ = java.util.Collections.emptyList(); + } else { + accumulatedNegativeDirectionCounts_ = null; + accumulatedNegativeDirectionCountsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000010); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.AnnotationsProto + .internal_static_google_cloud_visionai_v1_OccupancyCountingPredictionResult_Stats_CrossingLineCount_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats + .CrossingLineCount + getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats + .CrossingLineCount.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats + .CrossingLineCount + build() { + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.CrossingLineCount + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats + .CrossingLineCount + buildPartial() { + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.CrossingLineCount + result = + new com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats + .CrossingLineCount(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.CrossingLineCount + result) { + if (positiveDirectionCountsBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + positiveDirectionCounts_ = + java.util.Collections.unmodifiableList(positiveDirectionCounts_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.positiveDirectionCounts_ = positiveDirectionCounts_; + } else { + result.positiveDirectionCounts_ = positiveDirectionCountsBuilder_.build(); + } + if (negativeDirectionCountsBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0)) { + negativeDirectionCounts_ = + java.util.Collections.unmodifiableList(negativeDirectionCounts_); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.negativeDirectionCounts_ = negativeDirectionCounts_; + } else { + result.negativeDirectionCounts_ = negativeDirectionCountsBuilder_.build(); + } + if (accumulatedPositiveDirectionCountsBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0)) { + accumulatedPositiveDirectionCounts_ = + java.util.Collections.unmodifiableList(accumulatedPositiveDirectionCounts_); + bitField0_ = (bitField0_ & ~0x00000008); + } + result.accumulatedPositiveDirectionCounts_ = accumulatedPositiveDirectionCounts_; + } else { + result.accumulatedPositiveDirectionCounts_ = + accumulatedPositiveDirectionCountsBuilder_.build(); + } + if (accumulatedNegativeDirectionCountsBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0)) { + accumulatedNegativeDirectionCounts_ = + java.util.Collections.unmodifiableList(accumulatedNegativeDirectionCounts_); + bitField0_ = (bitField0_ & ~0x00000010); + } + result.accumulatedNegativeDirectionCounts_ = accumulatedNegativeDirectionCounts_; + } else { + result.accumulatedNegativeDirectionCounts_ = + accumulatedNegativeDirectionCountsBuilder_.build(); + } + } + + private void buildPartial0( + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.CrossingLineCount + result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.annotation_ = + annotationBuilder_ == null ? annotation_ : annotationBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats + .CrossingLineCount) { + return mergeFrom( + (com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats + .CrossingLineCount) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.CrossingLineCount + other) { + if (other + == com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats + .CrossingLineCount.getDefaultInstance()) return this; + if (other.hasAnnotation()) { + mergeAnnotation(other.getAnnotation()); + } + if (positiveDirectionCountsBuilder_ == null) { + if (!other.positiveDirectionCounts_.isEmpty()) { + if (positiveDirectionCounts_.isEmpty()) { + positiveDirectionCounts_ = other.positiveDirectionCounts_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensurePositiveDirectionCountsIsMutable(); + positiveDirectionCounts_.addAll(other.positiveDirectionCounts_); + } + onChanged(); + } + } else { + if (!other.positiveDirectionCounts_.isEmpty()) { + if (positiveDirectionCountsBuilder_.isEmpty()) { + positiveDirectionCountsBuilder_.dispose(); + positiveDirectionCountsBuilder_ = null; + positiveDirectionCounts_ = other.positiveDirectionCounts_; + bitField0_ = (bitField0_ & ~0x00000002); + positiveDirectionCountsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getPositiveDirectionCountsFieldBuilder() + : null; + } else { + positiveDirectionCountsBuilder_.addAllMessages(other.positiveDirectionCounts_); + } + } + } + if (negativeDirectionCountsBuilder_ == null) { + if (!other.negativeDirectionCounts_.isEmpty()) { + if (negativeDirectionCounts_.isEmpty()) { + negativeDirectionCounts_ = other.negativeDirectionCounts_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureNegativeDirectionCountsIsMutable(); + negativeDirectionCounts_.addAll(other.negativeDirectionCounts_); + } + onChanged(); + } + } else { + if (!other.negativeDirectionCounts_.isEmpty()) { + if (negativeDirectionCountsBuilder_.isEmpty()) { + negativeDirectionCountsBuilder_.dispose(); + negativeDirectionCountsBuilder_ = null; + negativeDirectionCounts_ = other.negativeDirectionCounts_; + bitField0_ = (bitField0_ & ~0x00000004); + negativeDirectionCountsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getNegativeDirectionCountsFieldBuilder() + : null; + } else { + negativeDirectionCountsBuilder_.addAllMessages(other.negativeDirectionCounts_); + } + } + } + if (accumulatedPositiveDirectionCountsBuilder_ == null) { + if (!other.accumulatedPositiveDirectionCounts_.isEmpty()) { + if (accumulatedPositiveDirectionCounts_.isEmpty()) { + accumulatedPositiveDirectionCounts_ = other.accumulatedPositiveDirectionCounts_; + bitField0_ = (bitField0_ & ~0x00000008); + } else { + ensureAccumulatedPositiveDirectionCountsIsMutable(); + accumulatedPositiveDirectionCounts_.addAll( + other.accumulatedPositiveDirectionCounts_); + } + onChanged(); + } + } else { + if (!other.accumulatedPositiveDirectionCounts_.isEmpty()) { + if (accumulatedPositiveDirectionCountsBuilder_.isEmpty()) { + accumulatedPositiveDirectionCountsBuilder_.dispose(); + accumulatedPositiveDirectionCountsBuilder_ = null; + accumulatedPositiveDirectionCounts_ = other.accumulatedPositiveDirectionCounts_; + bitField0_ = (bitField0_ & ~0x00000008); + accumulatedPositiveDirectionCountsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getAccumulatedPositiveDirectionCountsFieldBuilder() + : null; + } else { + accumulatedPositiveDirectionCountsBuilder_.addAllMessages( + other.accumulatedPositiveDirectionCounts_); + } + } + } + if (accumulatedNegativeDirectionCountsBuilder_ == null) { + if (!other.accumulatedNegativeDirectionCounts_.isEmpty()) { + if (accumulatedNegativeDirectionCounts_.isEmpty()) { + accumulatedNegativeDirectionCounts_ = other.accumulatedNegativeDirectionCounts_; + bitField0_ = (bitField0_ & ~0x00000010); + } else { + ensureAccumulatedNegativeDirectionCountsIsMutable(); + accumulatedNegativeDirectionCounts_.addAll( + other.accumulatedNegativeDirectionCounts_); + } + onChanged(); + } + } else { + if (!other.accumulatedNegativeDirectionCounts_.isEmpty()) { + if (accumulatedNegativeDirectionCountsBuilder_.isEmpty()) { + accumulatedNegativeDirectionCountsBuilder_.dispose(); + accumulatedNegativeDirectionCountsBuilder_ = null; + accumulatedNegativeDirectionCounts_ = other.accumulatedNegativeDirectionCounts_; + bitField0_ = (bitField0_ & ~0x00000010); + accumulatedNegativeDirectionCountsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getAccumulatedNegativeDirectionCountsFieldBuilder() + : null; + } else { + accumulatedNegativeDirectionCountsBuilder_.addAllMessages( + other.accumulatedNegativeDirectionCounts_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getAnnotationFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount + m = + input.readMessage( + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats + .ObjectCount.parser(), + extensionRegistry); + if (positiveDirectionCountsBuilder_ == null) { + ensurePositiveDirectionCountsIsMutable(); + positiveDirectionCounts_.add(m); + } else { + positiveDirectionCountsBuilder_.addMessage(m); + } + break; + } // case 18 + case 26: + { + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount + m = + input.readMessage( + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats + .ObjectCount.parser(), + extensionRegistry); + if (negativeDirectionCountsBuilder_ == null) { + ensureNegativeDirectionCountsIsMutable(); + negativeDirectionCounts_.add(m); + } else { + negativeDirectionCountsBuilder_.addMessage(m); + } + break; + } // case 26 + case 34: + { + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats + .AccumulatedObjectCount + m = + input.readMessage( + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats + .AccumulatedObjectCount.parser(), + extensionRegistry); + if (accumulatedPositiveDirectionCountsBuilder_ == null) { + ensureAccumulatedPositiveDirectionCountsIsMutable(); + accumulatedPositiveDirectionCounts_.add(m); + } else { + accumulatedPositiveDirectionCountsBuilder_.addMessage(m); + } + break; + } // case 34 + case 42: + { + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats + .AccumulatedObjectCount + m = + input.readMessage( + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats + .AccumulatedObjectCount.parser(), + extensionRegistry); + if (accumulatedNegativeDirectionCountsBuilder_ == null) { + ensureAccumulatedNegativeDirectionCountsIsMutable(); + accumulatedNegativeDirectionCounts_.add(m); + } else { + accumulatedNegativeDirectionCountsBuilder_.addMessage(m); + } + break; + } // case 42 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.cloud.visionai.v1.StreamAnnotation annotation_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.StreamAnnotation, + com.google.cloud.visionai.v1.StreamAnnotation.Builder, + com.google.cloud.visionai.v1.StreamAnnotationOrBuilder> + annotationBuilder_; + /** + * + * + *
+         * Line annotation from the user.
+         * 
+ * + * .google.cloud.visionai.v1.StreamAnnotation annotation = 1; + * + * @return Whether the annotation field is set. + */ + public boolean hasAnnotation() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+         * Line annotation from the user.
+         * 
+ * + * .google.cloud.visionai.v1.StreamAnnotation annotation = 1; + * + * @return The annotation. + */ + public com.google.cloud.visionai.v1.StreamAnnotation getAnnotation() { + if (annotationBuilder_ == null) { + return annotation_ == null + ? com.google.cloud.visionai.v1.StreamAnnotation.getDefaultInstance() + : annotation_; + } else { + return annotationBuilder_.getMessage(); + } + } + /** + * + * + *
+         * Line annotation from the user.
+         * 
+ * + * .google.cloud.visionai.v1.StreamAnnotation annotation = 1; + */ + public Builder setAnnotation(com.google.cloud.visionai.v1.StreamAnnotation value) { + if (annotationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + annotation_ = value; + } else { + annotationBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+         * Line annotation from the user.
+         * 
+ * + * .google.cloud.visionai.v1.StreamAnnotation annotation = 1; + */ + public Builder setAnnotation( + com.google.cloud.visionai.v1.StreamAnnotation.Builder builderForValue) { + if (annotationBuilder_ == null) { + annotation_ = builderForValue.build(); + } else { + annotationBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+         * Line annotation from the user.
+         * 
+ * + * .google.cloud.visionai.v1.StreamAnnotation annotation = 1; + */ + public Builder mergeAnnotation(com.google.cloud.visionai.v1.StreamAnnotation value) { + if (annotationBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && annotation_ != null + && annotation_ + != com.google.cloud.visionai.v1.StreamAnnotation.getDefaultInstance()) { + getAnnotationBuilder().mergeFrom(value); + } else { + annotation_ = value; + } + } else { + annotationBuilder_.mergeFrom(value); + } + if (annotation_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + /** + * + * + *
+         * Line annotation from the user.
+         * 
+ * + * .google.cloud.visionai.v1.StreamAnnotation annotation = 1; + */ + public Builder clearAnnotation() { + bitField0_ = (bitField0_ & ~0x00000001); + annotation_ = null; + if (annotationBuilder_ != null) { + annotationBuilder_.dispose(); + annotationBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+         * Line annotation from the user.
+         * 
+ * + * .google.cloud.visionai.v1.StreamAnnotation annotation = 1; + */ + public com.google.cloud.visionai.v1.StreamAnnotation.Builder getAnnotationBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getAnnotationFieldBuilder().getBuilder(); + } + /** + * + * + *
+         * Line annotation from the user.
+         * 
+ * + * .google.cloud.visionai.v1.StreamAnnotation annotation = 1; + */ + public com.google.cloud.visionai.v1.StreamAnnotationOrBuilder getAnnotationOrBuilder() { + if (annotationBuilder_ != null) { + return annotationBuilder_.getMessageOrBuilder(); + } else { + return annotation_ == null + ? com.google.cloud.visionai.v1.StreamAnnotation.getDefaultInstance() + : annotation_; + } + } + /** + * + * + *
+         * Line annotation from the user.
+         * 
+ * + * .google.cloud.visionai.v1.StreamAnnotation annotation = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.StreamAnnotation, + com.google.cloud.visionai.v1.StreamAnnotation.Builder, + com.google.cloud.visionai.v1.StreamAnnotationOrBuilder> + getAnnotationFieldBuilder() { + if (annotationBuilder_ == null) { + annotationBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.StreamAnnotation, + com.google.cloud.visionai.v1.StreamAnnotation.Builder, + com.google.cloud.visionai.v1.StreamAnnotationOrBuilder>( + getAnnotation(), getParentForChildren(), isClean()); + annotation_ = null; + } + return annotationBuilder_; + } + + private java.util.List< + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount> + positiveDirectionCounts_ = java.util.Collections.emptyList(); + + private void ensurePositiveDirectionCountsIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + positiveDirectionCounts_ = + new java.util.ArrayList< + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats + .ObjectCount>(positiveDirectionCounts_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount, + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount + .Builder, + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats + .ObjectCountOrBuilder> + positiveDirectionCountsBuilder_; + + /** + * + * + *
+         * The direction that follows the right hand rule.
+         * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount positive_direction_counts = 2; + * + */ + public java.util.List< + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount> + getPositiveDirectionCountsList() { + if (positiveDirectionCountsBuilder_ == null) { + return java.util.Collections.unmodifiableList(positiveDirectionCounts_); + } else { + return positiveDirectionCountsBuilder_.getMessageList(); + } + } + /** + * + * + *
+         * The direction that follows the right hand rule.
+         * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount positive_direction_counts = 2; + * + */ + public int getPositiveDirectionCountsCount() { + if (positiveDirectionCountsBuilder_ == null) { + return positiveDirectionCounts_.size(); + } else { + return positiveDirectionCountsBuilder_.getCount(); + } + } + /** + * + * + *
+         * The direction that follows the right hand rule.
+         * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount positive_direction_counts = 2; + * + */ + public com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount + getPositiveDirectionCounts(int index) { + if (positiveDirectionCountsBuilder_ == null) { + return positiveDirectionCounts_.get(index); + } else { + return positiveDirectionCountsBuilder_.getMessage(index); + } + } + /** + * + * + *
+         * The direction that follows the right hand rule.
+         * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount positive_direction_counts = 2; + * + */ + public Builder setPositiveDirectionCounts( + int index, + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount + value) { + if (positiveDirectionCountsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePositiveDirectionCountsIsMutable(); + positiveDirectionCounts_.set(index, value); + onChanged(); + } else { + positiveDirectionCountsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+         * The direction that follows the right hand rule.
+         * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount positive_direction_counts = 2; + * + */ + public Builder setPositiveDirectionCounts( + int index, + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount.Builder + builderForValue) { + if (positiveDirectionCountsBuilder_ == null) { + ensurePositiveDirectionCountsIsMutable(); + positiveDirectionCounts_.set(index, builderForValue.build()); + onChanged(); + } else { + positiveDirectionCountsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+         * The direction that follows the right hand rule.
+         * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount positive_direction_counts = 2; + * + */ + public Builder addPositiveDirectionCounts( + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount + value) { + if (positiveDirectionCountsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePositiveDirectionCountsIsMutable(); + positiveDirectionCounts_.add(value); + onChanged(); + } else { + positiveDirectionCountsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+         * The direction that follows the right hand rule.
+         * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount positive_direction_counts = 2; + * + */ + public Builder addPositiveDirectionCounts( + int index, + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount + value) { + if (positiveDirectionCountsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePositiveDirectionCountsIsMutable(); + positiveDirectionCounts_.add(index, value); + onChanged(); + } else { + positiveDirectionCountsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+         * The direction that follows the right hand rule.
+         * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount positive_direction_counts = 2; + * + */ + public Builder addPositiveDirectionCounts( + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount.Builder + builderForValue) { + if (positiveDirectionCountsBuilder_ == null) { + ensurePositiveDirectionCountsIsMutable(); + positiveDirectionCounts_.add(builderForValue.build()); + onChanged(); + } else { + positiveDirectionCountsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+         * The direction that follows the right hand rule.
+         * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount positive_direction_counts = 2; + * + */ + public Builder addPositiveDirectionCounts( + int index, + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount.Builder + builderForValue) { + if (positiveDirectionCountsBuilder_ == null) { + ensurePositiveDirectionCountsIsMutable(); + positiveDirectionCounts_.add(index, builderForValue.build()); + onChanged(); + } else { + positiveDirectionCountsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+         * The direction that follows the right hand rule.
+         * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount positive_direction_counts = 2; + * + */ + public Builder addAllPositiveDirectionCounts( + java.lang.Iterable< + ? extends + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats + .ObjectCount> + values) { + if (positiveDirectionCountsBuilder_ == null) { + ensurePositiveDirectionCountsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, positiveDirectionCounts_); + onChanged(); + } else { + positiveDirectionCountsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+         * The direction that follows the right hand rule.
+         * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount positive_direction_counts = 2; + * + */ + public Builder clearPositiveDirectionCounts() { + if (positiveDirectionCountsBuilder_ == null) { + positiveDirectionCounts_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + positiveDirectionCountsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+         * The direction that follows the right hand rule.
+         * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount positive_direction_counts = 2; + * + */ + public Builder removePositiveDirectionCounts(int index) { + if (positiveDirectionCountsBuilder_ == null) { + ensurePositiveDirectionCountsIsMutable(); + positiveDirectionCounts_.remove(index); + onChanged(); + } else { + positiveDirectionCountsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+         * The direction that follows the right hand rule.
+         * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount positive_direction_counts = 2; + * + */ + public com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount + .Builder + getPositiveDirectionCountsBuilder(int index) { + return getPositiveDirectionCountsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+         * The direction that follows the right hand rule.
+         * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount positive_direction_counts = 2; + * + */ + public com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats + .ObjectCountOrBuilder + getPositiveDirectionCountsOrBuilder(int index) { + if (positiveDirectionCountsBuilder_ == null) { + return positiveDirectionCounts_.get(index); + } else { + return positiveDirectionCountsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+         * The direction that follows the right hand rule.
+         * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount positive_direction_counts = 2; + * + */ + public java.util.List< + ? extends + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats + .ObjectCountOrBuilder> + getPositiveDirectionCountsOrBuilderList() { + if (positiveDirectionCountsBuilder_ != null) { + return positiveDirectionCountsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(positiveDirectionCounts_); + } + } + /** + * + * + *
+         * The direction that follows the right hand rule.
+         * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount positive_direction_counts = 2; + * + */ + public com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount + .Builder + addPositiveDirectionCountsBuilder() { + return getPositiveDirectionCountsFieldBuilder() + .addBuilder( + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount + .getDefaultInstance()); + } + /** + * + * + *
+         * The direction that follows the right hand rule.
+         * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount positive_direction_counts = 2; + * + */ + public com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount + .Builder + addPositiveDirectionCountsBuilder(int index) { + return getPositiveDirectionCountsFieldBuilder() + .addBuilder( + index, + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount + .getDefaultInstance()); + } + /** + * + * + *
+         * The direction that follows the right hand rule.
+         * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount positive_direction_counts = 2; + * + */ + public java.util.List< + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount + .Builder> + getPositiveDirectionCountsBuilderList() { + return getPositiveDirectionCountsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount, + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount + .Builder, + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats + .ObjectCountOrBuilder> + getPositiveDirectionCountsFieldBuilder() { + if (positiveDirectionCountsBuilder_ == null) { + positiveDirectionCountsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats + .ObjectCount, + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount + .Builder, + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats + .ObjectCountOrBuilder>( + positiveDirectionCounts_, + ((bitField0_ & 0x00000002) != 0), + getParentForChildren(), + isClean()); + positiveDirectionCounts_ = null; + } + return positiveDirectionCountsBuilder_; + } + + private java.util.List< + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount> + negativeDirectionCounts_ = java.util.Collections.emptyList(); + + private void ensureNegativeDirectionCountsIsMutable() { + if (!((bitField0_ & 0x00000004) != 0)) { + negativeDirectionCounts_ = + new java.util.ArrayList< + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats + .ObjectCount>(negativeDirectionCounts_); + bitField0_ |= 0x00000004; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount, + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount + .Builder, + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats + .ObjectCountOrBuilder> + negativeDirectionCountsBuilder_; + + /** + * + * + *
+         * The direction that is opposite to the right hand rule.
+         * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount negative_direction_counts = 3; + * + */ + public java.util.List< + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount> + getNegativeDirectionCountsList() { + if (negativeDirectionCountsBuilder_ == null) { + return java.util.Collections.unmodifiableList(negativeDirectionCounts_); + } else { + return negativeDirectionCountsBuilder_.getMessageList(); + } + } + /** + * + * + *
+         * The direction that is opposite to the right hand rule.
+         * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount negative_direction_counts = 3; + * + */ + public int getNegativeDirectionCountsCount() { + if (negativeDirectionCountsBuilder_ == null) { + return negativeDirectionCounts_.size(); + } else { + return negativeDirectionCountsBuilder_.getCount(); + } + } + /** + * + * + *
+         * The direction that is opposite to the right hand rule.
+         * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount negative_direction_counts = 3; + * + */ + public com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount + getNegativeDirectionCounts(int index) { + if (negativeDirectionCountsBuilder_ == null) { + return negativeDirectionCounts_.get(index); + } else { + return negativeDirectionCountsBuilder_.getMessage(index); + } + } + /** + * + * + *
+         * The direction that is opposite to the right hand rule.
+         * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount negative_direction_counts = 3; + * + */ + public Builder setNegativeDirectionCounts( + int index, + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount + value) { + if (negativeDirectionCountsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureNegativeDirectionCountsIsMutable(); + negativeDirectionCounts_.set(index, value); + onChanged(); + } else { + negativeDirectionCountsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+         * The direction that is opposite to the right hand rule.
+         * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount negative_direction_counts = 3; + * + */ + public Builder setNegativeDirectionCounts( + int index, + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount.Builder + builderForValue) { + if (negativeDirectionCountsBuilder_ == null) { + ensureNegativeDirectionCountsIsMutable(); + negativeDirectionCounts_.set(index, builderForValue.build()); + onChanged(); + } else { + negativeDirectionCountsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+         * The direction that is opposite to the right hand rule.
+         * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount negative_direction_counts = 3; + * + */ + public Builder addNegativeDirectionCounts( + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount + value) { + if (negativeDirectionCountsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureNegativeDirectionCountsIsMutable(); + negativeDirectionCounts_.add(value); + onChanged(); + } else { + negativeDirectionCountsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+         * The direction that is opposite to the right hand rule.
+         * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount negative_direction_counts = 3; + * + */ + public Builder addNegativeDirectionCounts( + int index, + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount + value) { + if (negativeDirectionCountsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureNegativeDirectionCountsIsMutable(); + negativeDirectionCounts_.add(index, value); + onChanged(); + } else { + negativeDirectionCountsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+         * The direction that is opposite to the right hand rule.
+         * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount negative_direction_counts = 3; + * + */ + public Builder addNegativeDirectionCounts( + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount.Builder + builderForValue) { + if (negativeDirectionCountsBuilder_ == null) { + ensureNegativeDirectionCountsIsMutable(); + negativeDirectionCounts_.add(builderForValue.build()); + onChanged(); + } else { + negativeDirectionCountsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+         * The direction that is opposite to the right hand rule.
+         * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount negative_direction_counts = 3; + * + */ + public Builder addNegativeDirectionCounts( + int index, + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount.Builder + builderForValue) { + if (negativeDirectionCountsBuilder_ == null) { + ensureNegativeDirectionCountsIsMutable(); + negativeDirectionCounts_.add(index, builderForValue.build()); + onChanged(); + } else { + negativeDirectionCountsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+         * The direction that is opposite to the right hand rule.
+         * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount negative_direction_counts = 3; + * + */ + public Builder addAllNegativeDirectionCounts( + java.lang.Iterable< + ? extends + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats + .ObjectCount> + values) { + if (negativeDirectionCountsBuilder_ == null) { + ensureNegativeDirectionCountsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, negativeDirectionCounts_); + onChanged(); + } else { + negativeDirectionCountsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+         * The direction that is opposite to the right hand rule.
+         * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount negative_direction_counts = 3; + * + */ + public Builder clearNegativeDirectionCounts() { + if (negativeDirectionCountsBuilder_ == null) { + negativeDirectionCounts_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + } else { + negativeDirectionCountsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+         * The direction that is opposite to the right hand rule.
+         * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount negative_direction_counts = 3; + * + */ + public Builder removeNegativeDirectionCounts(int index) { + if (negativeDirectionCountsBuilder_ == null) { + ensureNegativeDirectionCountsIsMutable(); + negativeDirectionCounts_.remove(index); + onChanged(); + } else { + negativeDirectionCountsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+         * The direction that is opposite to the right hand rule.
+         * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount negative_direction_counts = 3; + * + */ + public com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount + .Builder + getNegativeDirectionCountsBuilder(int index) { + return getNegativeDirectionCountsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+         * The direction that is opposite to the right hand rule.
+         * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount negative_direction_counts = 3; + * + */ + public com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats + .ObjectCountOrBuilder + getNegativeDirectionCountsOrBuilder(int index) { + if (negativeDirectionCountsBuilder_ == null) { + return negativeDirectionCounts_.get(index); + } else { + return negativeDirectionCountsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+         * The direction that is opposite to the right hand rule.
+         * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount negative_direction_counts = 3; + * + */ + public java.util.List< + ? extends + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats + .ObjectCountOrBuilder> + getNegativeDirectionCountsOrBuilderList() { + if (negativeDirectionCountsBuilder_ != null) { + return negativeDirectionCountsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(negativeDirectionCounts_); + } + } + /** + * + * + *
+         * The direction that is opposite to the right hand rule.
+         * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount negative_direction_counts = 3; + * + */ + public com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount + .Builder + addNegativeDirectionCountsBuilder() { + return getNegativeDirectionCountsFieldBuilder() + .addBuilder( + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount + .getDefaultInstance()); + } + /** + * + * + *
+         * The direction that is opposite to the right hand rule.
+         * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount negative_direction_counts = 3; + * + */ + public com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount + .Builder + addNegativeDirectionCountsBuilder(int index) { + return getNegativeDirectionCountsFieldBuilder() + .addBuilder( + index, + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount + .getDefaultInstance()); + } + /** + * + * + *
+         * The direction that is opposite to the right hand rule.
+         * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount negative_direction_counts = 3; + * + */ + public java.util.List< + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount + .Builder> + getNegativeDirectionCountsBuilderList() { + return getNegativeDirectionCountsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount, + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount + .Builder, + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats + .ObjectCountOrBuilder> + getNegativeDirectionCountsFieldBuilder() { + if (negativeDirectionCountsBuilder_ == null) { + negativeDirectionCountsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats + .ObjectCount, + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount + .Builder, + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats + .ObjectCountOrBuilder>( + negativeDirectionCounts_, + ((bitField0_ & 0x00000004) != 0), + getParentForChildren(), + isClean()); + negativeDirectionCounts_ = null; + } + return negativeDirectionCountsBuilder_; + } + + private java.util.List< + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats + .AccumulatedObjectCount> + accumulatedPositiveDirectionCounts_ = java.util.Collections.emptyList(); + + private void ensureAccumulatedPositiveDirectionCountsIsMutable() { + if (!((bitField0_ & 0x00000008) != 0)) { + accumulatedPositiveDirectionCounts_ = + new java.util.ArrayList< + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats + .AccumulatedObjectCount>(accumulatedPositiveDirectionCounts_); + bitField0_ |= 0x00000008; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats + .AccumulatedObjectCount, + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats + .AccumulatedObjectCount.Builder, + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats + .AccumulatedObjectCountOrBuilder> + accumulatedPositiveDirectionCountsBuilder_; + + /** + * + * + *
+         * The accumulated positive count.
+         * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.AccumulatedObjectCount accumulated_positive_direction_counts = 4; + * + */ + public java.util.List< + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats + .AccumulatedObjectCount> + getAccumulatedPositiveDirectionCountsList() { + if (accumulatedPositiveDirectionCountsBuilder_ == null) { + return java.util.Collections.unmodifiableList(accumulatedPositiveDirectionCounts_); + } else { + return accumulatedPositiveDirectionCountsBuilder_.getMessageList(); + } + } + /** + * + * + *
+         * The accumulated positive count.
+         * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.AccumulatedObjectCount accumulated_positive_direction_counts = 4; + * + */ + public int getAccumulatedPositiveDirectionCountsCount() { + if (accumulatedPositiveDirectionCountsBuilder_ == null) { + return accumulatedPositiveDirectionCounts_.size(); + } else { + return accumulatedPositiveDirectionCountsBuilder_.getCount(); + } + } + /** + * + * + *
+         * The accumulated positive count.
+         * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.AccumulatedObjectCount accumulated_positive_direction_counts = 4; + * + */ + public com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats + .AccumulatedObjectCount + getAccumulatedPositiveDirectionCounts(int index) { + if (accumulatedPositiveDirectionCountsBuilder_ == null) { + return accumulatedPositiveDirectionCounts_.get(index); + } else { + return accumulatedPositiveDirectionCountsBuilder_.getMessage(index); + } + } + /** + * + * + *
+         * The accumulated positive count.
+         * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.AccumulatedObjectCount accumulated_positive_direction_counts = 4; + * + */ + public Builder setAccumulatedPositiveDirectionCounts( + int index, + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats + .AccumulatedObjectCount + value) { + if (accumulatedPositiveDirectionCountsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAccumulatedPositiveDirectionCountsIsMutable(); + accumulatedPositiveDirectionCounts_.set(index, value); + onChanged(); + } else { + accumulatedPositiveDirectionCountsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+         * The accumulated positive count.
+         * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.AccumulatedObjectCount accumulated_positive_direction_counts = 4; + * + */ + public Builder setAccumulatedPositiveDirectionCounts( + int index, + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats + .AccumulatedObjectCount.Builder + builderForValue) { + if (accumulatedPositiveDirectionCountsBuilder_ == null) { + ensureAccumulatedPositiveDirectionCountsIsMutable(); + accumulatedPositiveDirectionCounts_.set(index, builderForValue.build()); + onChanged(); + } else { + accumulatedPositiveDirectionCountsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+         * The accumulated positive count.
+         * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.AccumulatedObjectCount accumulated_positive_direction_counts = 4; + * + */ + public Builder addAccumulatedPositiveDirectionCounts( + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats + .AccumulatedObjectCount + value) { + if (accumulatedPositiveDirectionCountsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAccumulatedPositiveDirectionCountsIsMutable(); + accumulatedPositiveDirectionCounts_.add(value); + onChanged(); + } else { + accumulatedPositiveDirectionCountsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+         * The accumulated positive count.
+         * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.AccumulatedObjectCount accumulated_positive_direction_counts = 4; + * + */ + public Builder addAccumulatedPositiveDirectionCounts( + int index, + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats + .AccumulatedObjectCount + value) { + if (accumulatedPositiveDirectionCountsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAccumulatedPositiveDirectionCountsIsMutable(); + accumulatedPositiveDirectionCounts_.add(index, value); + onChanged(); + } else { + accumulatedPositiveDirectionCountsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+         * The accumulated positive count.
+         * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.AccumulatedObjectCount accumulated_positive_direction_counts = 4; + * + */ + public Builder addAccumulatedPositiveDirectionCounts( + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats + .AccumulatedObjectCount.Builder + builderForValue) { + if (accumulatedPositiveDirectionCountsBuilder_ == null) { + ensureAccumulatedPositiveDirectionCountsIsMutable(); + accumulatedPositiveDirectionCounts_.add(builderForValue.build()); + onChanged(); + } else { + accumulatedPositiveDirectionCountsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+         * The accumulated positive count.
+         * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.AccumulatedObjectCount accumulated_positive_direction_counts = 4; + * + */ + public Builder addAccumulatedPositiveDirectionCounts( + int index, + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats + .AccumulatedObjectCount.Builder + builderForValue) { + if (accumulatedPositiveDirectionCountsBuilder_ == null) { + ensureAccumulatedPositiveDirectionCountsIsMutable(); + accumulatedPositiveDirectionCounts_.add(index, builderForValue.build()); + onChanged(); + } else { + accumulatedPositiveDirectionCountsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+         * The accumulated positive count.
+         * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.AccumulatedObjectCount accumulated_positive_direction_counts = 4; + * + */ + public Builder addAllAccumulatedPositiveDirectionCounts( + java.lang.Iterable< + ? extends + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats + .AccumulatedObjectCount> + values) { + if (accumulatedPositiveDirectionCountsBuilder_ == null) { + ensureAccumulatedPositiveDirectionCountsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, accumulatedPositiveDirectionCounts_); + onChanged(); + } else { + accumulatedPositiveDirectionCountsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+         * The accumulated positive count.
+         * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.AccumulatedObjectCount accumulated_positive_direction_counts = 4; + * + */ + public Builder clearAccumulatedPositiveDirectionCounts() { + if (accumulatedPositiveDirectionCountsBuilder_ == null) { + accumulatedPositiveDirectionCounts_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + } else { + accumulatedPositiveDirectionCountsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+         * The accumulated positive count.
+         * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.AccumulatedObjectCount accumulated_positive_direction_counts = 4; + * + */ + public Builder removeAccumulatedPositiveDirectionCounts(int index) { + if (accumulatedPositiveDirectionCountsBuilder_ == null) { + ensureAccumulatedPositiveDirectionCountsIsMutable(); + accumulatedPositiveDirectionCounts_.remove(index); + onChanged(); + } else { + accumulatedPositiveDirectionCountsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+         * The accumulated positive count.
+         * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.AccumulatedObjectCount accumulated_positive_direction_counts = 4; + * + */ + public com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats + .AccumulatedObjectCount.Builder + getAccumulatedPositiveDirectionCountsBuilder(int index) { + return getAccumulatedPositiveDirectionCountsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+         * The accumulated positive count.
+         * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.AccumulatedObjectCount accumulated_positive_direction_counts = 4; + * + */ + public com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats + .AccumulatedObjectCountOrBuilder + getAccumulatedPositiveDirectionCountsOrBuilder(int index) { + if (accumulatedPositiveDirectionCountsBuilder_ == null) { + return accumulatedPositiveDirectionCounts_.get(index); + } else { + return accumulatedPositiveDirectionCountsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+         * The accumulated positive count.
+         * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.AccumulatedObjectCount accumulated_positive_direction_counts = 4; + * + */ + public java.util.List< + ? extends + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats + .AccumulatedObjectCountOrBuilder> + getAccumulatedPositiveDirectionCountsOrBuilderList() { + if (accumulatedPositiveDirectionCountsBuilder_ != null) { + return accumulatedPositiveDirectionCountsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(accumulatedPositiveDirectionCounts_); + } + } + /** + * + * + *
+         * The accumulated positive count.
+         * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.AccumulatedObjectCount accumulated_positive_direction_counts = 4; + * + */ + public com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats + .AccumulatedObjectCount.Builder + addAccumulatedPositiveDirectionCountsBuilder() { + return getAccumulatedPositiveDirectionCountsFieldBuilder() + .addBuilder( + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats + .AccumulatedObjectCount.getDefaultInstance()); + } + /** + * + * + *
+         * The accumulated positive count.
+         * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.AccumulatedObjectCount accumulated_positive_direction_counts = 4; + * + */ + public com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats + .AccumulatedObjectCount.Builder + addAccumulatedPositiveDirectionCountsBuilder(int index) { + return getAccumulatedPositiveDirectionCountsFieldBuilder() + .addBuilder( + index, + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats + .AccumulatedObjectCount.getDefaultInstance()); + } + /** + * + * + *
+         * The accumulated positive count.
+         * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.AccumulatedObjectCount accumulated_positive_direction_counts = 4; + * + */ + public java.util.List< + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats + .AccumulatedObjectCount.Builder> + getAccumulatedPositiveDirectionCountsBuilderList() { + return getAccumulatedPositiveDirectionCountsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats + .AccumulatedObjectCount, + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats + .AccumulatedObjectCount.Builder, + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats + .AccumulatedObjectCountOrBuilder> + getAccumulatedPositiveDirectionCountsFieldBuilder() { + if (accumulatedPositiveDirectionCountsBuilder_ == null) { + accumulatedPositiveDirectionCountsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats + .AccumulatedObjectCount, + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats + .AccumulatedObjectCount.Builder, + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats + .AccumulatedObjectCountOrBuilder>( + accumulatedPositiveDirectionCounts_, + ((bitField0_ & 0x00000008) != 0), + getParentForChildren(), + isClean()); + accumulatedPositiveDirectionCounts_ = null; + } + return accumulatedPositiveDirectionCountsBuilder_; + } + + private java.util.List< + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats + .AccumulatedObjectCount> + accumulatedNegativeDirectionCounts_ = java.util.Collections.emptyList(); + + private void ensureAccumulatedNegativeDirectionCountsIsMutable() { + if (!((bitField0_ & 0x00000010) != 0)) { + accumulatedNegativeDirectionCounts_ = + new java.util.ArrayList< + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats + .AccumulatedObjectCount>(accumulatedNegativeDirectionCounts_); + bitField0_ |= 0x00000010; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats + .AccumulatedObjectCount, + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats + .AccumulatedObjectCount.Builder, + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats + .AccumulatedObjectCountOrBuilder> + accumulatedNegativeDirectionCountsBuilder_; + + /** + * + * + *
+         * The accumulated negative count.
+         * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.AccumulatedObjectCount accumulated_negative_direction_counts = 5; + * + */ + public java.util.List< + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats + .AccumulatedObjectCount> + getAccumulatedNegativeDirectionCountsList() { + if (accumulatedNegativeDirectionCountsBuilder_ == null) { + return java.util.Collections.unmodifiableList(accumulatedNegativeDirectionCounts_); + } else { + return accumulatedNegativeDirectionCountsBuilder_.getMessageList(); + } + } + /** + * + * + *
+         * The accumulated negative count.
+         * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.AccumulatedObjectCount accumulated_negative_direction_counts = 5; + * + */ + public int getAccumulatedNegativeDirectionCountsCount() { + if (accumulatedNegativeDirectionCountsBuilder_ == null) { + return accumulatedNegativeDirectionCounts_.size(); + } else { + return accumulatedNegativeDirectionCountsBuilder_.getCount(); + } + } + /** + * + * + *
+         * The accumulated negative count.
+         * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.AccumulatedObjectCount accumulated_negative_direction_counts = 5; + * + */ + public com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats + .AccumulatedObjectCount + getAccumulatedNegativeDirectionCounts(int index) { + if (accumulatedNegativeDirectionCountsBuilder_ == null) { + return accumulatedNegativeDirectionCounts_.get(index); + } else { + return accumulatedNegativeDirectionCountsBuilder_.getMessage(index); + } + } + /** + * + * + *
+         * The accumulated negative count.
+         * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.AccumulatedObjectCount accumulated_negative_direction_counts = 5; + * + */ + public Builder setAccumulatedNegativeDirectionCounts( + int index, + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats + .AccumulatedObjectCount + value) { + if (accumulatedNegativeDirectionCountsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAccumulatedNegativeDirectionCountsIsMutable(); + accumulatedNegativeDirectionCounts_.set(index, value); + onChanged(); + } else { + accumulatedNegativeDirectionCountsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+         * The accumulated negative count.
+         * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.AccumulatedObjectCount accumulated_negative_direction_counts = 5; + * + */ + public Builder setAccumulatedNegativeDirectionCounts( + int index, + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats + .AccumulatedObjectCount.Builder + builderForValue) { + if (accumulatedNegativeDirectionCountsBuilder_ == null) { + ensureAccumulatedNegativeDirectionCountsIsMutable(); + accumulatedNegativeDirectionCounts_.set(index, builderForValue.build()); + onChanged(); + } else { + accumulatedNegativeDirectionCountsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+         * The accumulated negative count.
+         * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.AccumulatedObjectCount accumulated_negative_direction_counts = 5; + * + */ + public Builder addAccumulatedNegativeDirectionCounts( + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats + .AccumulatedObjectCount + value) { + if (accumulatedNegativeDirectionCountsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAccumulatedNegativeDirectionCountsIsMutable(); + accumulatedNegativeDirectionCounts_.add(value); + onChanged(); + } else { + accumulatedNegativeDirectionCountsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+         * The accumulated negative count.
+         * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.AccumulatedObjectCount accumulated_negative_direction_counts = 5; + * + */ + public Builder addAccumulatedNegativeDirectionCounts( + int index, + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats + .AccumulatedObjectCount + value) { + if (accumulatedNegativeDirectionCountsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAccumulatedNegativeDirectionCountsIsMutable(); + accumulatedNegativeDirectionCounts_.add(index, value); + onChanged(); + } else { + accumulatedNegativeDirectionCountsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+         * The accumulated negative count.
+         * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.AccumulatedObjectCount accumulated_negative_direction_counts = 5; + * + */ + public Builder addAccumulatedNegativeDirectionCounts( + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats + .AccumulatedObjectCount.Builder + builderForValue) { + if (accumulatedNegativeDirectionCountsBuilder_ == null) { + ensureAccumulatedNegativeDirectionCountsIsMutable(); + accumulatedNegativeDirectionCounts_.add(builderForValue.build()); + onChanged(); + } else { + accumulatedNegativeDirectionCountsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+         * The accumulated negative count.
+         * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.AccumulatedObjectCount accumulated_negative_direction_counts = 5; + * + */ + public Builder addAccumulatedNegativeDirectionCounts( + int index, + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats + .AccumulatedObjectCount.Builder + builderForValue) { + if (accumulatedNegativeDirectionCountsBuilder_ == null) { + ensureAccumulatedNegativeDirectionCountsIsMutable(); + accumulatedNegativeDirectionCounts_.add(index, builderForValue.build()); + onChanged(); + } else { + accumulatedNegativeDirectionCountsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+         * The accumulated negative count.
+         * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.AccumulatedObjectCount accumulated_negative_direction_counts = 5; + * + */ + public Builder addAllAccumulatedNegativeDirectionCounts( + java.lang.Iterable< + ? extends + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats + .AccumulatedObjectCount> + values) { + if (accumulatedNegativeDirectionCountsBuilder_ == null) { + ensureAccumulatedNegativeDirectionCountsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, accumulatedNegativeDirectionCounts_); + onChanged(); + } else { + accumulatedNegativeDirectionCountsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+         * The accumulated negative count.
+         * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.AccumulatedObjectCount accumulated_negative_direction_counts = 5; + * + */ + public Builder clearAccumulatedNegativeDirectionCounts() { + if (accumulatedNegativeDirectionCountsBuilder_ == null) { + accumulatedNegativeDirectionCounts_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + } else { + accumulatedNegativeDirectionCountsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+         * The accumulated negative count.
+         * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.AccumulatedObjectCount accumulated_negative_direction_counts = 5; + * + */ + public Builder removeAccumulatedNegativeDirectionCounts(int index) { + if (accumulatedNegativeDirectionCountsBuilder_ == null) { + ensureAccumulatedNegativeDirectionCountsIsMutable(); + accumulatedNegativeDirectionCounts_.remove(index); + onChanged(); + } else { + accumulatedNegativeDirectionCountsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+         * The accumulated negative count.
+         * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.AccumulatedObjectCount accumulated_negative_direction_counts = 5; + * + */ + public com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats + .AccumulatedObjectCount.Builder + getAccumulatedNegativeDirectionCountsBuilder(int index) { + return getAccumulatedNegativeDirectionCountsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+         * The accumulated negative count.
+         * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.AccumulatedObjectCount accumulated_negative_direction_counts = 5; + * + */ + public com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats + .AccumulatedObjectCountOrBuilder + getAccumulatedNegativeDirectionCountsOrBuilder(int index) { + if (accumulatedNegativeDirectionCountsBuilder_ == null) { + return accumulatedNegativeDirectionCounts_.get(index); + } else { + return accumulatedNegativeDirectionCountsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+         * The accumulated negative count.
+         * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.AccumulatedObjectCount accumulated_negative_direction_counts = 5; + * + */ + public java.util.List< + ? extends + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats + .AccumulatedObjectCountOrBuilder> + getAccumulatedNegativeDirectionCountsOrBuilderList() { + if (accumulatedNegativeDirectionCountsBuilder_ != null) { + return accumulatedNegativeDirectionCountsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(accumulatedNegativeDirectionCounts_); + } + } + /** + * + * + *
+         * The accumulated negative count.
+         * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.AccumulatedObjectCount accumulated_negative_direction_counts = 5; + * + */ + public com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats + .AccumulatedObjectCount.Builder + addAccumulatedNegativeDirectionCountsBuilder() { + return getAccumulatedNegativeDirectionCountsFieldBuilder() + .addBuilder( + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats + .AccumulatedObjectCount.getDefaultInstance()); + } + /** + * + * + *
+         * The accumulated negative count.
+         * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.AccumulatedObjectCount accumulated_negative_direction_counts = 5; + * + */ + public com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats + .AccumulatedObjectCount.Builder + addAccumulatedNegativeDirectionCountsBuilder(int index) { + return getAccumulatedNegativeDirectionCountsFieldBuilder() + .addBuilder( + index, + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats + .AccumulatedObjectCount.getDefaultInstance()); + } + /** + * + * + *
+         * The accumulated negative count.
+         * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.AccumulatedObjectCount accumulated_negative_direction_counts = 5; + * + */ + public java.util.List< + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats + .AccumulatedObjectCount.Builder> + getAccumulatedNegativeDirectionCountsBuilderList() { + return getAccumulatedNegativeDirectionCountsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats + .AccumulatedObjectCount, + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats + .AccumulatedObjectCount.Builder, + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats + .AccumulatedObjectCountOrBuilder> + getAccumulatedNegativeDirectionCountsFieldBuilder() { + if (accumulatedNegativeDirectionCountsBuilder_ == null) { + accumulatedNegativeDirectionCountsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats + .AccumulatedObjectCount, + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats + .AccumulatedObjectCount.Builder, + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats + .AccumulatedObjectCountOrBuilder>( + accumulatedNegativeDirectionCounts_, + ((bitField0_ & 0x00000010) != 0), + getParentForChildren(), + isClean()); + accumulatedNegativeDirectionCounts_ = null; + } + return accumulatedNegativeDirectionCountsBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.OccupancyCountingPredictionResult.Stats.CrossingLineCount) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.CrossingLineCount) + private static final com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats + .CrossingLineCount + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats + .CrossingLineCount(); + } + + public static com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats + .CrossingLineCount + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CrossingLineCount parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.OccupancyCountingPredictionResult.Stats.CrossingLineCount + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface ActiveZoneCountOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ActiveZoneCount) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+       * Active zone annotation from the user.
+       * 
+ * + * .google.cloud.visionai.v1.StreamAnnotation annotation = 1; + * + * @return Whether the annotation field is set. + */ + boolean hasAnnotation(); + /** + * + * + *
+       * Active zone annotation from the user.
+       * 
+ * + * .google.cloud.visionai.v1.StreamAnnotation annotation = 1; + * + * @return The annotation. + */ + com.google.cloud.visionai.v1.StreamAnnotation getAnnotation(); + /** + * + * + *
+       * Active zone annotation from the user.
+       * 
+ * + * .google.cloud.visionai.v1.StreamAnnotation annotation = 1; + */ + com.google.cloud.visionai.v1.StreamAnnotationOrBuilder getAnnotationOrBuilder(); + + /** + * + * + *
+       * Counts in the zone.
+       * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount counts = 2; + * + */ + java.util.List< + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount> + getCountsList(); + /** + * + * + *
+       * Counts in the zone.
+       * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount counts = 2; + * + */ + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount getCounts( + int index); + /** + * + * + *
+       * Counts in the zone.
+       * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount counts = 2; + * + */ + int getCountsCount(); + /** + * + * + *
+       * Counts in the zone.
+       * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount counts = 2; + * + */ + java.util.List< + ? extends + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats + .ObjectCountOrBuilder> + getCountsOrBuilderList(); + /** + * + * + *
+       * Counts in the zone.
+       * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount counts = 2; + * + */ + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCountOrBuilder + getCountsOrBuilder(int index); + } + /** + * + * + *
+     * Message for the active zone count.
+     * 
+ * + * Protobuf type {@code + * google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ActiveZoneCount} + */ + public static final class ActiveZoneCount extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ActiveZoneCount) + ActiveZoneCountOrBuilder { + private static final long serialVersionUID = 0L; + // Use ActiveZoneCount.newBuilder() to construct. + private ActiveZoneCount(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ActiveZoneCount() { + counts_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ActiveZoneCount(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.AnnotationsProto + .internal_static_google_cloud_visionai_v1_OccupancyCountingPredictionResult_Stats_ActiveZoneCount_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.AnnotationsProto + .internal_static_google_cloud_visionai_v1_OccupancyCountingPredictionResult_Stats_ActiveZoneCount_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ActiveZoneCount + .class, + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ActiveZoneCount + .Builder.class); + } + + private int bitField0_; + public static final int ANNOTATION_FIELD_NUMBER = 1; + private com.google.cloud.visionai.v1.StreamAnnotation annotation_; + /** + * + * + *
+       * Active zone annotation from the user.
+       * 
+ * + * .google.cloud.visionai.v1.StreamAnnotation annotation = 1; + * + * @return Whether the annotation field is set. + */ + @java.lang.Override + public boolean hasAnnotation() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+       * Active zone annotation from the user.
+       * 
+ * + * .google.cloud.visionai.v1.StreamAnnotation annotation = 1; + * + * @return The annotation. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.StreamAnnotation getAnnotation() { + return annotation_ == null + ? com.google.cloud.visionai.v1.StreamAnnotation.getDefaultInstance() + : annotation_; + } + /** + * + * + *
+       * Active zone annotation from the user.
+       * 
+ * + * .google.cloud.visionai.v1.StreamAnnotation annotation = 1; + */ + @java.lang.Override + public com.google.cloud.visionai.v1.StreamAnnotationOrBuilder getAnnotationOrBuilder() { + return annotation_ == null + ? com.google.cloud.visionai.v1.StreamAnnotation.getDefaultInstance() + : annotation_; + } + + public static final int COUNTS_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private java.util.List< + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount> + counts_; + /** + * + * + *
+       * Counts in the zone.
+       * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount counts = 2; + * + */ + @java.lang.Override + public java.util.List< + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount> + getCountsList() { + return counts_; + } + /** + * + * + *
+       * Counts in the zone.
+       * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount counts = 2; + * + */ + @java.lang.Override + public java.util.List< + ? extends + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats + .ObjectCountOrBuilder> + getCountsOrBuilderList() { + return counts_; + } + /** + * + * + *
+       * Counts in the zone.
+       * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount counts = 2; + * + */ + @java.lang.Override + public int getCountsCount() { + return counts_.size(); + } + /** + * + * + *
+       * Counts in the zone.
+       * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount counts = 2; + * + */ + @java.lang.Override + public com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount + getCounts(int index) { + return counts_.get(index); + } + /** + * + * + *
+       * Counts in the zone.
+       * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount counts = 2; + * + */ + @java.lang.Override + public com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats + .ObjectCountOrBuilder + getCountsOrBuilder(int index) { + return counts_.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 (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getAnnotation()); + } + for (int i = 0; i < counts_.size(); i++) { + output.writeMessage(2, counts_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getAnnotation()); + } + for (int i = 0; i < counts_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, counts_.get(i)); + } + size += getUnknownFields().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.visionai.v1.OccupancyCountingPredictionResult.Stats.ActiveZoneCount)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ActiveZoneCount other = + (com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ActiveZoneCount) + obj; + + if (hasAnnotation() != other.hasAnnotation()) return false; + if (hasAnnotation()) { + if (!getAnnotation().equals(other.getAnnotation())) return false; + } + if (!getCountsList().equals(other.getCountsList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasAnnotation()) { + hash = (37 * hash) + ANNOTATION_FIELD_NUMBER; + hash = (53 * hash) + getAnnotation().hashCode(); + } + if (getCountsCount() > 0) { + hash = (37 * hash) + COUNTS_FIELD_NUMBER; + hash = (53 * hash) + getCountsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats + .ActiveZoneCount + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats + .ActiveZoneCount + 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.visionai.v1.OccupancyCountingPredictionResult.Stats + .ActiveZoneCount + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats + .ActiveZoneCount + 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.visionai.v1.OccupancyCountingPredictionResult.Stats + .ActiveZoneCount + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats + .ActiveZoneCount + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats + .ActiveZoneCount + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats + .ActiveZoneCount + 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.visionai.v1.OccupancyCountingPredictionResult.Stats + .ActiveZoneCount + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats + .ActiveZoneCount + 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.visionai.v1.OccupancyCountingPredictionResult.Stats + .ActiveZoneCount + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats + .ActiveZoneCount + 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.visionai.v1.OccupancyCountingPredictionResult.Stats.ActiveZoneCount + 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; + } + /** + * + * + *
+       * Message for the active zone count.
+       * 
+ * + * Protobuf type {@code + * google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ActiveZoneCount} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ActiveZoneCount) + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats + .ActiveZoneCountOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.AnnotationsProto + .internal_static_google_cloud_visionai_v1_OccupancyCountingPredictionResult_Stats_ActiveZoneCount_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.AnnotationsProto + .internal_static_google_cloud_visionai_v1_OccupancyCountingPredictionResult_Stats_ActiveZoneCount_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats + .ActiveZoneCount.class, + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats + .ActiveZoneCount.Builder.class); + } + + // Construct using + // com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ActiveZoneCount.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getAnnotationFieldBuilder(); + getCountsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + annotation_ = null; + if (annotationBuilder_ != null) { + annotationBuilder_.dispose(); + annotationBuilder_ = null; + } + if (countsBuilder_ == null) { + counts_ = java.util.Collections.emptyList(); + } else { + counts_ = null; + countsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.AnnotationsProto + .internal_static_google_cloud_visionai_v1_OccupancyCountingPredictionResult_Stats_ActiveZoneCount_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ActiveZoneCount + getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats + .ActiveZoneCount.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ActiveZoneCount + build() { + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ActiveZoneCount + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ActiveZoneCount + buildPartial() { + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ActiveZoneCount + result = + new com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats + .ActiveZoneCount(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ActiveZoneCount + result) { + if (countsBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + counts_ = java.util.Collections.unmodifiableList(counts_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.counts_ = counts_; + } else { + result.counts_ = countsBuilder_.build(); + } + } + + private void buildPartial0( + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ActiveZoneCount + result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.annotation_ = + annotationBuilder_ == null ? annotation_ : annotationBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats + .ActiveZoneCount) { + return mergeFrom( + (com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats + .ActiveZoneCount) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ActiveZoneCount + other) { + if (other + == com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats + .ActiveZoneCount.getDefaultInstance()) return this; + if (other.hasAnnotation()) { + mergeAnnotation(other.getAnnotation()); + } + if (countsBuilder_ == null) { + if (!other.counts_.isEmpty()) { + if (counts_.isEmpty()) { + counts_ = other.counts_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureCountsIsMutable(); + counts_.addAll(other.counts_); + } + onChanged(); + } + } else { + if (!other.counts_.isEmpty()) { + if (countsBuilder_.isEmpty()) { + countsBuilder_.dispose(); + countsBuilder_ = null; + counts_ = other.counts_; + bitField0_ = (bitField0_ & ~0x00000002); + countsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getCountsFieldBuilder() + : null; + } else { + countsBuilder_.addAllMessages(other.counts_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getAnnotationFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount + m = + input.readMessage( + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats + .ObjectCount.parser(), + extensionRegistry); + if (countsBuilder_ == null) { + ensureCountsIsMutable(); + counts_.add(m); + } else { + countsBuilder_.addMessage(m); + } + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.cloud.visionai.v1.StreamAnnotation annotation_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.StreamAnnotation, + com.google.cloud.visionai.v1.StreamAnnotation.Builder, + com.google.cloud.visionai.v1.StreamAnnotationOrBuilder> + annotationBuilder_; + /** + * + * + *
+         * Active zone annotation from the user.
+         * 
+ * + * .google.cloud.visionai.v1.StreamAnnotation annotation = 1; + * + * @return Whether the annotation field is set. + */ + public boolean hasAnnotation() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+         * Active zone annotation from the user.
+         * 
+ * + * .google.cloud.visionai.v1.StreamAnnotation annotation = 1; + * + * @return The annotation. + */ + public com.google.cloud.visionai.v1.StreamAnnotation getAnnotation() { + if (annotationBuilder_ == null) { + return annotation_ == null + ? com.google.cloud.visionai.v1.StreamAnnotation.getDefaultInstance() + : annotation_; + } else { + return annotationBuilder_.getMessage(); + } + } + /** + * + * + *
+         * Active zone annotation from the user.
+         * 
+ * + * .google.cloud.visionai.v1.StreamAnnotation annotation = 1; + */ + public Builder setAnnotation(com.google.cloud.visionai.v1.StreamAnnotation value) { + if (annotationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + annotation_ = value; + } else { + annotationBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+         * Active zone annotation from the user.
+         * 
+ * + * .google.cloud.visionai.v1.StreamAnnotation annotation = 1; + */ + public Builder setAnnotation( + com.google.cloud.visionai.v1.StreamAnnotation.Builder builderForValue) { + if (annotationBuilder_ == null) { + annotation_ = builderForValue.build(); + } else { + annotationBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+         * Active zone annotation from the user.
+         * 
+ * + * .google.cloud.visionai.v1.StreamAnnotation annotation = 1; + */ + public Builder mergeAnnotation(com.google.cloud.visionai.v1.StreamAnnotation value) { + if (annotationBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && annotation_ != null + && annotation_ + != com.google.cloud.visionai.v1.StreamAnnotation.getDefaultInstance()) { + getAnnotationBuilder().mergeFrom(value); + } else { + annotation_ = value; + } + } else { + annotationBuilder_.mergeFrom(value); + } + if (annotation_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + /** + * + * + *
+         * Active zone annotation from the user.
+         * 
+ * + * .google.cloud.visionai.v1.StreamAnnotation annotation = 1; + */ + public Builder clearAnnotation() { + bitField0_ = (bitField0_ & ~0x00000001); + annotation_ = null; + if (annotationBuilder_ != null) { + annotationBuilder_.dispose(); + annotationBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+         * Active zone annotation from the user.
+         * 
+ * + * .google.cloud.visionai.v1.StreamAnnotation annotation = 1; + */ + public com.google.cloud.visionai.v1.StreamAnnotation.Builder getAnnotationBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getAnnotationFieldBuilder().getBuilder(); + } + /** + * + * + *
+         * Active zone annotation from the user.
+         * 
+ * + * .google.cloud.visionai.v1.StreamAnnotation annotation = 1; + */ + public com.google.cloud.visionai.v1.StreamAnnotationOrBuilder getAnnotationOrBuilder() { + if (annotationBuilder_ != null) { + return annotationBuilder_.getMessageOrBuilder(); + } else { + return annotation_ == null + ? com.google.cloud.visionai.v1.StreamAnnotation.getDefaultInstance() + : annotation_; + } + } + /** + * + * + *
+         * Active zone annotation from the user.
+         * 
+ * + * .google.cloud.visionai.v1.StreamAnnotation annotation = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.StreamAnnotation, + com.google.cloud.visionai.v1.StreamAnnotation.Builder, + com.google.cloud.visionai.v1.StreamAnnotationOrBuilder> + getAnnotationFieldBuilder() { + if (annotationBuilder_ == null) { + annotationBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.StreamAnnotation, + com.google.cloud.visionai.v1.StreamAnnotation.Builder, + com.google.cloud.visionai.v1.StreamAnnotationOrBuilder>( + getAnnotation(), getParentForChildren(), isClean()); + annotation_ = null; + } + return annotationBuilder_; + } + + private java.util.List< + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount> + counts_ = java.util.Collections.emptyList(); + + private void ensureCountsIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + counts_ = + new java.util.ArrayList< + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats + .ObjectCount>(counts_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount, + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount + .Builder, + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats + .ObjectCountOrBuilder> + countsBuilder_; + + /** + * + * + *
+         * Counts in the zone.
+         * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount counts = 2; + * + */ + public java.util.List< + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount> + getCountsList() { + if (countsBuilder_ == null) { + return java.util.Collections.unmodifiableList(counts_); + } else { + return countsBuilder_.getMessageList(); + } + } + /** + * + * + *
+         * Counts in the zone.
+         * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount counts = 2; + * + */ + public int getCountsCount() { + if (countsBuilder_ == null) { + return counts_.size(); + } else { + return countsBuilder_.getCount(); + } + } + /** + * + * + *
+         * Counts in the zone.
+         * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount counts = 2; + * + */ + public com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount + getCounts(int index) { + if (countsBuilder_ == null) { + return counts_.get(index); + } else { + return countsBuilder_.getMessage(index); + } + } + /** + * + * + *
+         * Counts in the zone.
+         * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount counts = 2; + * + */ + public Builder setCounts( + int index, + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount + value) { + if (countsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureCountsIsMutable(); + counts_.set(index, value); + onChanged(); + } else { + countsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+         * Counts in the zone.
+         * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount counts = 2; + * + */ + public Builder setCounts( + int index, + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount.Builder + builderForValue) { + if (countsBuilder_ == null) { + ensureCountsIsMutable(); + counts_.set(index, builderForValue.build()); + onChanged(); + } else { + countsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+         * Counts in the zone.
+         * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount counts = 2; + * + */ + public Builder addCounts( + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount + value) { + if (countsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureCountsIsMutable(); + counts_.add(value); + onChanged(); + } else { + countsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+         * Counts in the zone.
+         * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount counts = 2; + * + */ + public Builder addCounts( + int index, + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount + value) { + if (countsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureCountsIsMutable(); + counts_.add(index, value); + onChanged(); + } else { + countsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+         * Counts in the zone.
+         * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount counts = 2; + * + */ + public Builder addCounts( + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount.Builder + builderForValue) { + if (countsBuilder_ == null) { + ensureCountsIsMutable(); + counts_.add(builderForValue.build()); + onChanged(); + } else { + countsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+         * Counts in the zone.
+         * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount counts = 2; + * + */ + public Builder addCounts( + int index, + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount.Builder + builderForValue) { + if (countsBuilder_ == null) { + ensureCountsIsMutable(); + counts_.add(index, builderForValue.build()); + onChanged(); + } else { + countsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+         * Counts in the zone.
+         * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount counts = 2; + * + */ + public Builder addAllCounts( + java.lang.Iterable< + ? extends + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats + .ObjectCount> + values) { + if (countsBuilder_ == null) { + ensureCountsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, counts_); + onChanged(); + } else { + countsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+         * Counts in the zone.
+         * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount counts = 2; + * + */ + public Builder clearCounts() { + if (countsBuilder_ == null) { + counts_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + countsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+         * Counts in the zone.
+         * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount counts = 2; + * + */ + public Builder removeCounts(int index) { + if (countsBuilder_ == null) { + ensureCountsIsMutable(); + counts_.remove(index); + onChanged(); + } else { + countsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+         * Counts in the zone.
+         * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount counts = 2; + * + */ + public com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount + .Builder + getCountsBuilder(int index) { + return getCountsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+         * Counts in the zone.
+         * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount counts = 2; + * + */ + public com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats + .ObjectCountOrBuilder + getCountsOrBuilder(int index) { + if (countsBuilder_ == null) { + return counts_.get(index); + } else { + return countsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+         * Counts in the zone.
+         * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount counts = 2; + * + */ + public java.util.List< + ? extends + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats + .ObjectCountOrBuilder> + getCountsOrBuilderList() { + if (countsBuilder_ != null) { + return countsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(counts_); + } + } + /** + * + * + *
+         * Counts in the zone.
+         * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount counts = 2; + * + */ + public com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount + .Builder + addCountsBuilder() { + return getCountsFieldBuilder() + .addBuilder( + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount + .getDefaultInstance()); + } + /** + * + * + *
+         * Counts in the zone.
+         * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount counts = 2; + * + */ + public com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount + .Builder + addCountsBuilder(int index) { + return getCountsFieldBuilder() + .addBuilder( + index, + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount + .getDefaultInstance()); + } + /** + * + * + *
+         * Counts in the zone.
+         * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount counts = 2; + * + */ + public java.util.List< + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount + .Builder> + getCountsBuilderList() { + return getCountsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount, + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount + .Builder, + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats + .ObjectCountOrBuilder> + getCountsFieldBuilder() { + if (countsBuilder_ == null) { + countsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats + .ObjectCount, + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount + .Builder, + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats + .ObjectCountOrBuilder>( + counts_, ((bitField0_ & 0x00000002) != 0), getParentForChildren(), isClean()); + counts_ = null; + } + return countsBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.OccupancyCountingPredictionResult.Stats.ActiveZoneCount) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ActiveZoneCount) + private static final com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats + .ActiveZoneCount + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats + .ActiveZoneCount(); + } + + public static com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats + .ActiveZoneCount + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ActiveZoneCount parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.OccupancyCountingPredictionResult.Stats.ActiveZoneCount + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int FULL_FRAME_COUNT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List< + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount> + fullFrameCount_; + /** + * + * + *
+     * Counts of the full frame.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount full_frame_count = 1; + * + */ + @java.lang.Override + public java.util.List< + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount> + getFullFrameCountList() { + return fullFrameCount_; + } + /** + * + * + *
+     * Counts of the full frame.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount full_frame_count = 1; + * + */ + @java.lang.Override + public java.util.List< + ? extends + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats + .ObjectCountOrBuilder> + getFullFrameCountOrBuilderList() { + return fullFrameCount_; + } + /** + * + * + *
+     * Counts of the full frame.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount full_frame_count = 1; + * + */ + @java.lang.Override + public int getFullFrameCountCount() { + return fullFrameCount_.size(); + } + /** + * + * + *
+     * Counts of the full frame.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount full_frame_count = 1; + * + */ + @java.lang.Override + public com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount + getFullFrameCount(int index) { + return fullFrameCount_.get(index); + } + /** + * + * + *
+     * Counts of the full frame.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount full_frame_count = 1; + * + */ + @java.lang.Override + public com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCountOrBuilder + getFullFrameCountOrBuilder(int index) { + return fullFrameCount_.get(index); + } + + public static final int CROSSING_LINE_COUNTS_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private java.util.List< + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.CrossingLineCount> + crossingLineCounts_; + /** + * + * + *
+     * Crossing line counts.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.CrossingLineCount crossing_line_counts = 2; + * + */ + @java.lang.Override + public java.util.List< + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.CrossingLineCount> + getCrossingLineCountsList() { + return crossingLineCounts_; + } + /** + * + * + *
+     * Crossing line counts.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.CrossingLineCount crossing_line_counts = 2; + * + */ + @java.lang.Override + public java.util.List< + ? extends + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats + .CrossingLineCountOrBuilder> + getCrossingLineCountsOrBuilderList() { + return crossingLineCounts_; + } + /** + * + * + *
+     * Crossing line counts.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.CrossingLineCount crossing_line_counts = 2; + * + */ + @java.lang.Override + public int getCrossingLineCountsCount() { + return crossingLineCounts_.size(); + } + /** + * + * + *
+     * Crossing line counts.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.CrossingLineCount crossing_line_counts = 2; + * + */ + @java.lang.Override + public com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.CrossingLineCount + getCrossingLineCounts(int index) { + return crossingLineCounts_.get(index); + } + /** + * + * + *
+     * Crossing line counts.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.CrossingLineCount crossing_line_counts = 2; + * + */ + @java.lang.Override + public com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats + .CrossingLineCountOrBuilder + getCrossingLineCountsOrBuilder(int index) { + return crossingLineCounts_.get(index); + } + + public static final int ACTIVE_ZONE_COUNTS_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private java.util.List< + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ActiveZoneCount> + activeZoneCounts_; + /** + * + * + *
+     * Active zone counts.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ActiveZoneCount active_zone_counts = 3; + * + */ + @java.lang.Override + public java.util.List< + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ActiveZoneCount> + getActiveZoneCountsList() { + return activeZoneCounts_; + } + /** + * + * + *
+     * Active zone counts.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ActiveZoneCount active_zone_counts = 3; + * + */ + @java.lang.Override + public java.util.List< + ? extends + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats + .ActiveZoneCountOrBuilder> + getActiveZoneCountsOrBuilderList() { + return activeZoneCounts_; + } + /** + * + * + *
+     * Active zone counts.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ActiveZoneCount active_zone_counts = 3; + * + */ + @java.lang.Override + public int getActiveZoneCountsCount() { + return activeZoneCounts_.size(); + } + /** + * + * + *
+     * Active zone counts.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ActiveZoneCount active_zone_counts = 3; + * + */ + @java.lang.Override + public com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ActiveZoneCount + getActiveZoneCounts(int index) { + return activeZoneCounts_.get(index); + } + /** + * + * + *
+     * Active zone counts.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ActiveZoneCount active_zone_counts = 3; + * + */ + @java.lang.Override + public com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats + .ActiveZoneCountOrBuilder + getActiveZoneCountsOrBuilder(int index) { + return activeZoneCounts_.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 < fullFrameCount_.size(); i++) { + output.writeMessage(1, fullFrameCount_.get(i)); + } + for (int i = 0; i < crossingLineCounts_.size(); i++) { + output.writeMessage(2, crossingLineCounts_.get(i)); + } + for (int i = 0; i < activeZoneCounts_.size(); i++) { + output.writeMessage(3, activeZoneCounts_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < fullFrameCount_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, fullFrameCount_.get(i)); + } + for (int i = 0; i < crossingLineCounts_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(2, crossingLineCounts_.get(i)); + } + for (int i = 0; i < activeZoneCounts_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(3, activeZoneCounts_.get(i)); + } + size += getUnknownFields().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.visionai.v1.OccupancyCountingPredictionResult.Stats)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats other = + (com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats) obj; + + if (!getFullFrameCountList().equals(other.getFullFrameCountList())) return false; + if (!getCrossingLineCountsList().equals(other.getCrossingLineCountsList())) return false; + if (!getActiveZoneCountsList().equals(other.getActiveZoneCountsList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getFullFrameCountCount() > 0) { + hash = (37 * hash) + FULL_FRAME_COUNT_FIELD_NUMBER; + hash = (53 * hash) + getFullFrameCountList().hashCode(); + } + if (getCrossingLineCountsCount() > 0) { + hash = (37 * hash) + CROSSING_LINE_COUNTS_FIELD_NUMBER; + hash = (53 * hash) + getCrossingLineCountsList().hashCode(); + } + if (getActiveZoneCountsCount() > 0) { + hash = (37 * hash) + ACTIVE_ZONE_COUNTS_FIELD_NUMBER; + hash = (53 * hash) + getActiveZoneCountsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats 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.visionai.v1.OccupancyCountingPredictionResult.Stats parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats 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.visionai.v1.OccupancyCountingPredictionResult.Stats parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats 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.visionai.v1.OccupancyCountingPredictionResult.Stats + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats + 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.visionai.v1.OccupancyCountingPredictionResult.Stats parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats 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.visionai.v1.OccupancyCountingPredictionResult.Stats 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 statistics info for annotations from occupancy counting operator.
+     * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats) + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.StatsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.AnnotationsProto + .internal_static_google_cloud_visionai_v1_OccupancyCountingPredictionResult_Stats_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.AnnotationsProto + .internal_static_google_cloud_visionai_v1_OccupancyCountingPredictionResult_Stats_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.class, + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.Builder.class); + } + + // Construct using + // com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (fullFrameCountBuilder_ == null) { + fullFrameCount_ = java.util.Collections.emptyList(); + } else { + fullFrameCount_ = null; + fullFrameCountBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + if (crossingLineCountsBuilder_ == null) { + crossingLineCounts_ = java.util.Collections.emptyList(); + } else { + crossingLineCounts_ = null; + crossingLineCountsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + if (activeZoneCountsBuilder_ == null) { + activeZoneCounts_ = java.util.Collections.emptyList(); + } else { + activeZoneCounts_ = null; + activeZoneCountsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000004); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.AnnotationsProto + .internal_static_google_cloud_visionai_v1_OccupancyCountingPredictionResult_Stats_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats + getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats build() { + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats buildPartial() { + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats result = + new com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats result) { + if (fullFrameCountBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + fullFrameCount_ = java.util.Collections.unmodifiableList(fullFrameCount_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.fullFrameCount_ = fullFrameCount_; + } else { + result.fullFrameCount_ = fullFrameCountBuilder_.build(); + } + if (crossingLineCountsBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + crossingLineCounts_ = java.util.Collections.unmodifiableList(crossingLineCounts_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.crossingLineCounts_ = crossingLineCounts_; + } else { + result.crossingLineCounts_ = crossingLineCountsBuilder_.build(); + } + if (activeZoneCountsBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0)) { + activeZoneCounts_ = java.util.Collections.unmodifiableList(activeZoneCounts_); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.activeZoneCounts_ = activeZoneCounts_; + } else { + result.activeZoneCounts_ = activeZoneCountsBuilder_.build(); + } + } + + private void buildPartial0( + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats result) { + int from_bitField0_ = bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats) { + return mergeFrom( + (com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats other) { + if (other + == com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats + .getDefaultInstance()) return this; + if (fullFrameCountBuilder_ == null) { + if (!other.fullFrameCount_.isEmpty()) { + if (fullFrameCount_.isEmpty()) { + fullFrameCount_ = other.fullFrameCount_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureFullFrameCountIsMutable(); + fullFrameCount_.addAll(other.fullFrameCount_); + } + onChanged(); + } + } else { + if (!other.fullFrameCount_.isEmpty()) { + if (fullFrameCountBuilder_.isEmpty()) { + fullFrameCountBuilder_.dispose(); + fullFrameCountBuilder_ = null; + fullFrameCount_ = other.fullFrameCount_; + bitField0_ = (bitField0_ & ~0x00000001); + fullFrameCountBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getFullFrameCountFieldBuilder() + : null; + } else { + fullFrameCountBuilder_.addAllMessages(other.fullFrameCount_); + } + } + } + if (crossingLineCountsBuilder_ == null) { + if (!other.crossingLineCounts_.isEmpty()) { + if (crossingLineCounts_.isEmpty()) { + crossingLineCounts_ = other.crossingLineCounts_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureCrossingLineCountsIsMutable(); + crossingLineCounts_.addAll(other.crossingLineCounts_); + } + onChanged(); + } + } else { + if (!other.crossingLineCounts_.isEmpty()) { + if (crossingLineCountsBuilder_.isEmpty()) { + crossingLineCountsBuilder_.dispose(); + crossingLineCountsBuilder_ = null; + crossingLineCounts_ = other.crossingLineCounts_; + bitField0_ = (bitField0_ & ~0x00000002); + crossingLineCountsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getCrossingLineCountsFieldBuilder() + : null; + } else { + crossingLineCountsBuilder_.addAllMessages(other.crossingLineCounts_); + } + } + } + if (activeZoneCountsBuilder_ == null) { + if (!other.activeZoneCounts_.isEmpty()) { + if (activeZoneCounts_.isEmpty()) { + activeZoneCounts_ = other.activeZoneCounts_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureActiveZoneCountsIsMutable(); + activeZoneCounts_.addAll(other.activeZoneCounts_); + } + onChanged(); + } + } else { + if (!other.activeZoneCounts_.isEmpty()) { + if (activeZoneCountsBuilder_.isEmpty()) { + activeZoneCountsBuilder_.dispose(); + activeZoneCountsBuilder_ = null; + activeZoneCounts_ = other.activeZoneCounts_; + bitField0_ = (bitField0_ & ~0x00000004); + activeZoneCountsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getActiveZoneCountsFieldBuilder() + : null; + } else { + activeZoneCountsBuilder_.addAllMessages(other.activeZoneCounts_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount + m = + input.readMessage( + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats + .ObjectCount.parser(), + extensionRegistry); + if (fullFrameCountBuilder_ == null) { + ensureFullFrameCountIsMutable(); + fullFrameCount_.add(m); + } else { + fullFrameCountBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats + .CrossingLineCount + m = + input.readMessage( + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats + .CrossingLineCount.parser(), + extensionRegistry); + if (crossingLineCountsBuilder_ == null) { + ensureCrossingLineCountsIsMutable(); + crossingLineCounts_.add(m); + } else { + crossingLineCountsBuilder_.addMessage(m); + } + break; + } // case 18 + case 26: + { + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats + .ActiveZoneCount + m = + input.readMessage( + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats + .ActiveZoneCount.parser(), + extensionRegistry); + if (activeZoneCountsBuilder_ == null) { + ensureActiveZoneCountsIsMutable(); + activeZoneCounts_.add(m); + } else { + activeZoneCountsBuilder_.addMessage(m); + } + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List< + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount> + fullFrameCount_ = java.util.Collections.emptyList(); + + private void ensureFullFrameCountIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + fullFrameCount_ = + new java.util.ArrayList< + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount>( + fullFrameCount_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount, + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount + .Builder, + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats + .ObjectCountOrBuilder> + fullFrameCountBuilder_; + + /** + * + * + *
+       * Counts of the full frame.
+       * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount full_frame_count = 1; + * + */ + public java.util.List< + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount> + getFullFrameCountList() { + if (fullFrameCountBuilder_ == null) { + return java.util.Collections.unmodifiableList(fullFrameCount_); + } else { + return fullFrameCountBuilder_.getMessageList(); + } + } + /** + * + * + *
+       * Counts of the full frame.
+       * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount full_frame_count = 1; + * + */ + public int getFullFrameCountCount() { + if (fullFrameCountBuilder_ == null) { + return fullFrameCount_.size(); + } else { + return fullFrameCountBuilder_.getCount(); + } + } + /** + * + * + *
+       * Counts of the full frame.
+       * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount full_frame_count = 1; + * + */ + public com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount + getFullFrameCount(int index) { + if (fullFrameCountBuilder_ == null) { + return fullFrameCount_.get(index); + } else { + return fullFrameCountBuilder_.getMessage(index); + } + } + /** + * + * + *
+       * Counts of the full frame.
+       * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount full_frame_count = 1; + * + */ + public Builder setFullFrameCount( + int index, + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount value) { + if (fullFrameCountBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFullFrameCountIsMutable(); + fullFrameCount_.set(index, value); + onChanged(); + } else { + fullFrameCountBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+       * Counts of the full frame.
+       * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount full_frame_count = 1; + * + */ + public Builder setFullFrameCount( + int index, + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount.Builder + builderForValue) { + if (fullFrameCountBuilder_ == null) { + ensureFullFrameCountIsMutable(); + fullFrameCount_.set(index, builderForValue.build()); + onChanged(); + } else { + fullFrameCountBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Counts of the full frame.
+       * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount full_frame_count = 1; + * + */ + public Builder addFullFrameCount( + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount value) { + if (fullFrameCountBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFullFrameCountIsMutable(); + fullFrameCount_.add(value); + onChanged(); + } else { + fullFrameCountBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+       * Counts of the full frame.
+       * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount full_frame_count = 1; + * + */ + public Builder addFullFrameCount( + int index, + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount value) { + if (fullFrameCountBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFullFrameCountIsMutable(); + fullFrameCount_.add(index, value); + onChanged(); + } else { + fullFrameCountBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+       * Counts of the full frame.
+       * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount full_frame_count = 1; + * + */ + public Builder addFullFrameCount( + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount.Builder + builderForValue) { + if (fullFrameCountBuilder_ == null) { + ensureFullFrameCountIsMutable(); + fullFrameCount_.add(builderForValue.build()); + onChanged(); + } else { + fullFrameCountBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Counts of the full frame.
+       * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount full_frame_count = 1; + * + */ + public Builder addFullFrameCount( + int index, + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount.Builder + builderForValue) { + if (fullFrameCountBuilder_ == null) { + ensureFullFrameCountIsMutable(); + fullFrameCount_.add(index, builderForValue.build()); + onChanged(); + } else { + fullFrameCountBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Counts of the full frame.
+       * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount full_frame_count = 1; + * + */ + public Builder addAllFullFrameCount( + java.lang.Iterable< + ? extends + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats + .ObjectCount> + values) { + if (fullFrameCountBuilder_ == null) { + ensureFullFrameCountIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, fullFrameCount_); + onChanged(); + } else { + fullFrameCountBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+       * Counts of the full frame.
+       * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount full_frame_count = 1; + * + */ + public Builder clearFullFrameCount() { + if (fullFrameCountBuilder_ == null) { + fullFrameCount_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + fullFrameCountBuilder_.clear(); + } + return this; + } + /** + * + * + *
+       * Counts of the full frame.
+       * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount full_frame_count = 1; + * + */ + public Builder removeFullFrameCount(int index) { + if (fullFrameCountBuilder_ == null) { + ensureFullFrameCountIsMutable(); + fullFrameCount_.remove(index); + onChanged(); + } else { + fullFrameCountBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+       * Counts of the full frame.
+       * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount full_frame_count = 1; + * + */ + public com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount + .Builder + getFullFrameCountBuilder(int index) { + return getFullFrameCountFieldBuilder().getBuilder(index); + } + /** + * + * + *
+       * Counts of the full frame.
+       * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount full_frame_count = 1; + * + */ + public com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats + .ObjectCountOrBuilder + getFullFrameCountOrBuilder(int index) { + if (fullFrameCountBuilder_ == null) { + return fullFrameCount_.get(index); + } else { + return fullFrameCountBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+       * Counts of the full frame.
+       * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount full_frame_count = 1; + * + */ + public java.util.List< + ? extends + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats + .ObjectCountOrBuilder> + getFullFrameCountOrBuilderList() { + if (fullFrameCountBuilder_ != null) { + return fullFrameCountBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(fullFrameCount_); + } + } + /** + * + * + *
+       * Counts of the full frame.
+       * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount full_frame_count = 1; + * + */ + public com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount + .Builder + addFullFrameCountBuilder() { + return getFullFrameCountFieldBuilder() + .addBuilder( + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount + .getDefaultInstance()); + } + /** + * + * + *
+       * Counts of the full frame.
+       * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount full_frame_count = 1; + * + */ + public com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount + .Builder + addFullFrameCountBuilder(int index) { + return getFullFrameCountFieldBuilder() + .addBuilder( + index, + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount + .getDefaultInstance()); + } + /** + * + * + *
+       * Counts of the full frame.
+       * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount full_frame_count = 1; + * + */ + public java.util.List< + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount + .Builder> + getFullFrameCountBuilderList() { + return getFullFrameCountFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount, + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount + .Builder, + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats + .ObjectCountOrBuilder> + getFullFrameCountFieldBuilder() { + if (fullFrameCountBuilder_ == null) { + fullFrameCountBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount, + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount + .Builder, + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats + .ObjectCountOrBuilder>( + fullFrameCount_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + fullFrameCount_ = null; + } + return fullFrameCountBuilder_; + } + + private java.util.List< + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats + .CrossingLineCount> + crossingLineCounts_ = java.util.Collections.emptyList(); + + private void ensureCrossingLineCountsIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + crossingLineCounts_ = + new java.util.ArrayList< + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats + .CrossingLineCount>(crossingLineCounts_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats + .CrossingLineCount, + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.CrossingLineCount + .Builder, + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats + .CrossingLineCountOrBuilder> + crossingLineCountsBuilder_; + + /** + * + * + *
+       * Crossing line counts.
+       * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.CrossingLineCount crossing_line_counts = 2; + * + */ + public java.util.List< + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats + .CrossingLineCount> + getCrossingLineCountsList() { + if (crossingLineCountsBuilder_ == null) { + return java.util.Collections.unmodifiableList(crossingLineCounts_); + } else { + return crossingLineCountsBuilder_.getMessageList(); + } + } + /** + * + * + *
+       * Crossing line counts.
+       * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.CrossingLineCount crossing_line_counts = 2; + * + */ + public int getCrossingLineCountsCount() { + if (crossingLineCountsBuilder_ == null) { + return crossingLineCounts_.size(); + } else { + return crossingLineCountsBuilder_.getCount(); + } + } + /** + * + * + *
+       * Crossing line counts.
+       * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.CrossingLineCount crossing_line_counts = 2; + * + */ + public com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.CrossingLineCount + getCrossingLineCounts(int index) { + if (crossingLineCountsBuilder_ == null) { + return crossingLineCounts_.get(index); + } else { + return crossingLineCountsBuilder_.getMessage(index); + } + } + /** + * + * + *
+       * Crossing line counts.
+       * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.CrossingLineCount crossing_line_counts = 2; + * + */ + public Builder setCrossingLineCounts( + int index, + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.CrossingLineCount + value) { + if (crossingLineCountsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureCrossingLineCountsIsMutable(); + crossingLineCounts_.set(index, value); + onChanged(); + } else { + crossingLineCountsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+       * Crossing line counts.
+       * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.CrossingLineCount crossing_line_counts = 2; + * + */ + public Builder setCrossingLineCounts( + int index, + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.CrossingLineCount + .Builder + builderForValue) { + if (crossingLineCountsBuilder_ == null) { + ensureCrossingLineCountsIsMutable(); + crossingLineCounts_.set(index, builderForValue.build()); + onChanged(); + } else { + crossingLineCountsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Crossing line counts.
+       * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.CrossingLineCount crossing_line_counts = 2; + * + */ + public Builder addCrossingLineCounts( + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.CrossingLineCount + value) { + if (crossingLineCountsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureCrossingLineCountsIsMutable(); + crossingLineCounts_.add(value); + onChanged(); + } else { + crossingLineCountsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+       * Crossing line counts.
+       * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.CrossingLineCount crossing_line_counts = 2; + * + */ + public Builder addCrossingLineCounts( + int index, + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.CrossingLineCount + value) { + if (crossingLineCountsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureCrossingLineCountsIsMutable(); + crossingLineCounts_.add(index, value); + onChanged(); + } else { + crossingLineCountsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+       * Crossing line counts.
+       * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.CrossingLineCount crossing_line_counts = 2; + * + */ + public Builder addCrossingLineCounts( + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.CrossingLineCount + .Builder + builderForValue) { + if (crossingLineCountsBuilder_ == null) { + ensureCrossingLineCountsIsMutable(); + crossingLineCounts_.add(builderForValue.build()); + onChanged(); + } else { + crossingLineCountsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Crossing line counts.
+       * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.CrossingLineCount crossing_line_counts = 2; + * + */ + public Builder addCrossingLineCounts( + int index, + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.CrossingLineCount + .Builder + builderForValue) { + if (crossingLineCountsBuilder_ == null) { + ensureCrossingLineCountsIsMutable(); + crossingLineCounts_.add(index, builderForValue.build()); + onChanged(); + } else { + crossingLineCountsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Crossing line counts.
+       * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.CrossingLineCount crossing_line_counts = 2; + * + */ + public Builder addAllCrossingLineCounts( + java.lang.Iterable< + ? extends + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats + .CrossingLineCount> + values) { + if (crossingLineCountsBuilder_ == null) { + ensureCrossingLineCountsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, crossingLineCounts_); + onChanged(); + } else { + crossingLineCountsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+       * Crossing line counts.
+       * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.CrossingLineCount crossing_line_counts = 2; + * + */ + public Builder clearCrossingLineCounts() { + if (crossingLineCountsBuilder_ == null) { + crossingLineCounts_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + crossingLineCountsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+       * Crossing line counts.
+       * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.CrossingLineCount crossing_line_counts = 2; + * + */ + public Builder removeCrossingLineCounts(int index) { + if (crossingLineCountsBuilder_ == null) { + ensureCrossingLineCountsIsMutable(); + crossingLineCounts_.remove(index); + onChanged(); + } else { + crossingLineCountsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+       * Crossing line counts.
+       * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.CrossingLineCount crossing_line_counts = 2; + * + */ + public com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.CrossingLineCount + .Builder + getCrossingLineCountsBuilder(int index) { + return getCrossingLineCountsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+       * Crossing line counts.
+       * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.CrossingLineCount crossing_line_counts = 2; + * + */ + public com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats + .CrossingLineCountOrBuilder + getCrossingLineCountsOrBuilder(int index) { + if (crossingLineCountsBuilder_ == null) { + return crossingLineCounts_.get(index); + } else { + return crossingLineCountsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+       * Crossing line counts.
+       * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.CrossingLineCount crossing_line_counts = 2; + * + */ + public java.util.List< + ? extends + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats + .CrossingLineCountOrBuilder> + getCrossingLineCountsOrBuilderList() { + if (crossingLineCountsBuilder_ != null) { + return crossingLineCountsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(crossingLineCounts_); + } + } + /** + * + * + *
+       * Crossing line counts.
+       * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.CrossingLineCount crossing_line_counts = 2; + * + */ + public com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.CrossingLineCount + .Builder + addCrossingLineCountsBuilder() { + return getCrossingLineCountsFieldBuilder() + .addBuilder( + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats + .CrossingLineCount.getDefaultInstance()); + } + /** + * + * + *
+       * Crossing line counts.
+       * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.CrossingLineCount crossing_line_counts = 2; + * + */ + public com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.CrossingLineCount + .Builder + addCrossingLineCountsBuilder(int index) { + return getCrossingLineCountsFieldBuilder() + .addBuilder( + index, + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats + .CrossingLineCount.getDefaultInstance()); + } + /** + * + * + *
+       * Crossing line counts.
+       * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.CrossingLineCount crossing_line_counts = 2; + * + */ + public java.util.List< + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.CrossingLineCount + .Builder> + getCrossingLineCountsBuilderList() { + return getCrossingLineCountsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats + .CrossingLineCount, + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.CrossingLineCount + .Builder, + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats + .CrossingLineCountOrBuilder> + getCrossingLineCountsFieldBuilder() { + if (crossingLineCountsBuilder_ == null) { + crossingLineCountsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats + .CrossingLineCount, + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats + .CrossingLineCount.Builder, + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats + .CrossingLineCountOrBuilder>( + crossingLineCounts_, + ((bitField0_ & 0x00000002) != 0), + getParentForChildren(), + isClean()); + crossingLineCounts_ = null; + } + return crossingLineCountsBuilder_; + } + + private java.util.List< + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ActiveZoneCount> + activeZoneCounts_ = java.util.Collections.emptyList(); + + private void ensureActiveZoneCountsIsMutable() { + if (!((bitField0_ & 0x00000004) != 0)) { + activeZoneCounts_ = + new java.util.ArrayList< + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats + .ActiveZoneCount>(activeZoneCounts_); + bitField0_ |= 0x00000004; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ActiveZoneCount, + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ActiveZoneCount + .Builder, + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats + .ActiveZoneCountOrBuilder> + activeZoneCountsBuilder_; + + /** + * + * + *
+       * Active zone counts.
+       * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ActiveZoneCount active_zone_counts = 3; + * + */ + public java.util.List< + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ActiveZoneCount> + getActiveZoneCountsList() { + if (activeZoneCountsBuilder_ == null) { + return java.util.Collections.unmodifiableList(activeZoneCounts_); + } else { + return activeZoneCountsBuilder_.getMessageList(); + } + } + /** + * + * + *
+       * Active zone counts.
+       * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ActiveZoneCount active_zone_counts = 3; + * + */ + public int getActiveZoneCountsCount() { + if (activeZoneCountsBuilder_ == null) { + return activeZoneCounts_.size(); + } else { + return activeZoneCountsBuilder_.getCount(); + } + } + /** + * + * + *
+       * Active zone counts.
+       * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ActiveZoneCount active_zone_counts = 3; + * + */ + public com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ActiveZoneCount + getActiveZoneCounts(int index) { + if (activeZoneCountsBuilder_ == null) { + return activeZoneCounts_.get(index); + } else { + return activeZoneCountsBuilder_.getMessage(index); + } + } + /** + * + * + *
+       * Active zone counts.
+       * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ActiveZoneCount active_zone_counts = 3; + * + */ + public Builder setActiveZoneCounts( + int index, + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ActiveZoneCount + value) { + if (activeZoneCountsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureActiveZoneCountsIsMutable(); + activeZoneCounts_.set(index, value); + onChanged(); + } else { + activeZoneCountsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+       * Active zone counts.
+       * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ActiveZoneCount active_zone_counts = 3; + * + */ + public Builder setActiveZoneCounts( + int index, + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ActiveZoneCount + .Builder + builderForValue) { + if (activeZoneCountsBuilder_ == null) { + ensureActiveZoneCountsIsMutable(); + activeZoneCounts_.set(index, builderForValue.build()); + onChanged(); + } else { + activeZoneCountsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Active zone counts.
+       * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ActiveZoneCount active_zone_counts = 3; + * + */ + public Builder addActiveZoneCounts( + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ActiveZoneCount + value) { + if (activeZoneCountsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureActiveZoneCountsIsMutable(); + activeZoneCounts_.add(value); + onChanged(); + } else { + activeZoneCountsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+       * Active zone counts.
+       * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ActiveZoneCount active_zone_counts = 3; + * + */ + public Builder addActiveZoneCounts( + int index, + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ActiveZoneCount + value) { + if (activeZoneCountsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureActiveZoneCountsIsMutable(); + activeZoneCounts_.add(index, value); + onChanged(); + } else { + activeZoneCountsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+       * Active zone counts.
+       * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ActiveZoneCount active_zone_counts = 3; + * + */ + public Builder addActiveZoneCounts( + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ActiveZoneCount + .Builder + builderForValue) { + if (activeZoneCountsBuilder_ == null) { + ensureActiveZoneCountsIsMutable(); + activeZoneCounts_.add(builderForValue.build()); + onChanged(); + } else { + activeZoneCountsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Active zone counts.
+       * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ActiveZoneCount active_zone_counts = 3; + * + */ + public Builder addActiveZoneCounts( + int index, + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ActiveZoneCount + .Builder + builderForValue) { + if (activeZoneCountsBuilder_ == null) { + ensureActiveZoneCountsIsMutable(); + activeZoneCounts_.add(index, builderForValue.build()); + onChanged(); + } else { + activeZoneCountsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Active zone counts.
+       * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ActiveZoneCount active_zone_counts = 3; + * + */ + public Builder addAllActiveZoneCounts( + java.lang.Iterable< + ? extends + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats + .ActiveZoneCount> + values) { + if (activeZoneCountsBuilder_ == null) { + ensureActiveZoneCountsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, activeZoneCounts_); + onChanged(); + } else { + activeZoneCountsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+       * Active zone counts.
+       * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ActiveZoneCount active_zone_counts = 3; + * + */ + public Builder clearActiveZoneCounts() { + if (activeZoneCountsBuilder_ == null) { + activeZoneCounts_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + } else { + activeZoneCountsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+       * Active zone counts.
+       * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ActiveZoneCount active_zone_counts = 3; + * + */ + public Builder removeActiveZoneCounts(int index) { + if (activeZoneCountsBuilder_ == null) { + ensureActiveZoneCountsIsMutable(); + activeZoneCounts_.remove(index); + onChanged(); + } else { + activeZoneCountsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+       * Active zone counts.
+       * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ActiveZoneCount active_zone_counts = 3; + * + */ + public com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ActiveZoneCount + .Builder + getActiveZoneCountsBuilder(int index) { + return getActiveZoneCountsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+       * Active zone counts.
+       * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ActiveZoneCount active_zone_counts = 3; + * + */ + public com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats + .ActiveZoneCountOrBuilder + getActiveZoneCountsOrBuilder(int index) { + if (activeZoneCountsBuilder_ == null) { + return activeZoneCounts_.get(index); + } else { + return activeZoneCountsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+       * Active zone counts.
+       * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ActiveZoneCount active_zone_counts = 3; + * + */ + public java.util.List< + ? extends + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats + .ActiveZoneCountOrBuilder> + getActiveZoneCountsOrBuilderList() { + if (activeZoneCountsBuilder_ != null) { + return activeZoneCountsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(activeZoneCounts_); + } + } + /** + * + * + *
+       * Active zone counts.
+       * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ActiveZoneCount active_zone_counts = 3; + * + */ + public com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ActiveZoneCount + .Builder + addActiveZoneCountsBuilder() { + return getActiveZoneCountsFieldBuilder() + .addBuilder( + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ActiveZoneCount + .getDefaultInstance()); + } + /** + * + * + *
+       * Active zone counts.
+       * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ActiveZoneCount active_zone_counts = 3; + * + */ + public com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ActiveZoneCount + .Builder + addActiveZoneCountsBuilder(int index) { + return getActiveZoneCountsFieldBuilder() + .addBuilder( + index, + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ActiveZoneCount + .getDefaultInstance()); + } + /** + * + * + *
+       * Active zone counts.
+       * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ActiveZoneCount active_zone_counts = 3; + * + */ + public java.util.List< + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ActiveZoneCount + .Builder> + getActiveZoneCountsBuilderList() { + return getActiveZoneCountsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ActiveZoneCount, + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ActiveZoneCount + .Builder, + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats + .ActiveZoneCountOrBuilder> + getActiveZoneCountsFieldBuilder() { + if (activeZoneCountsBuilder_ == null) { + activeZoneCountsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats + .ActiveZoneCount, + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats + .ActiveZoneCount.Builder, + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats + .ActiveZoneCountOrBuilder>( + activeZoneCounts_, + ((bitField0_ & 0x00000004) != 0), + getParentForChildren(), + isClean()); + activeZoneCounts_ = null; + } + return activeZoneCountsBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.OccupancyCountingPredictionResult.Stats) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats) + private static final com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats(); + } + + public static com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Stats parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.OccupancyCountingPredictionResult.Stats + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface TrackInfoOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.OccupancyCountingPredictionResult.TrackInfo) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * An unique id to identify a track. It should be consistent across frames.
+     * 
+ * + * string track_id = 1; + * + * @return The trackId. + */ + java.lang.String getTrackId(); + /** + * + * + *
+     * An unique id to identify a track. It should be consistent across frames.
+     * 
+ * + * string track_id = 1; + * + * @return The bytes for trackId. + */ + com.google.protobuf.ByteString getTrackIdBytes(); + + /** + * + * + *
+     * Start timestamp of this track.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 2; + * + * @return Whether the startTime field is set. + */ + boolean hasStartTime(); + /** + * + * + *
+     * Start timestamp of this track.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 2; + * + * @return The startTime. + */ + com.google.protobuf.Timestamp getStartTime(); + /** + * + * + *
+     * Start timestamp of this track.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 2; + */ + com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder(); + } + /** + * + * + *
+   * The track info for annotations from occupancy counting operator.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.OccupancyCountingPredictionResult.TrackInfo} + */ + public static final class TrackInfo extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.OccupancyCountingPredictionResult.TrackInfo) + TrackInfoOrBuilder { + private static final long serialVersionUID = 0L; + // Use TrackInfo.newBuilder() to construct. + private TrackInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private TrackInfo() { + trackId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new TrackInfo(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.AnnotationsProto + .internal_static_google_cloud_visionai_v1_OccupancyCountingPredictionResult_TrackInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.AnnotationsProto + .internal_static_google_cloud_visionai_v1_OccupancyCountingPredictionResult_TrackInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.TrackInfo.class, + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.TrackInfo.Builder + .class); + } + + private int bitField0_; + public static final int TRACK_ID_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object trackId_ = ""; + /** + * + * + *
+     * An unique id to identify a track. It should be consistent across frames.
+     * 
+ * + * string track_id = 1; + * + * @return The trackId. + */ + @java.lang.Override + public java.lang.String getTrackId() { + java.lang.Object ref = trackId_; + 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(); + trackId_ = s; + return s; + } + } + /** + * + * + *
+     * An unique id to identify a track. It should be consistent across frames.
+     * 
+ * + * string track_id = 1; + * + * @return The bytes for trackId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTrackIdBytes() { + java.lang.Object ref = trackId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + trackId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int START_TIME_FIELD_NUMBER = 2; + private com.google.protobuf.Timestamp startTime_; + /** + * + * + *
+     * Start timestamp of this track.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 2; + * + * @return Whether the startTime field is set. + */ + @java.lang.Override + public boolean hasStartTime() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * Start timestamp of this track.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 2; + * + * @return The startTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getStartTime() { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } + /** + * + * + *
+     * Start timestamp of this track.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 2; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } + + 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(trackId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, trackId_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getStartTime()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(trackId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, trackId_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getStartTime()); + } + size += getUnknownFields().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.visionai.v1.OccupancyCountingPredictionResult.TrackInfo)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.TrackInfo other = + (com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.TrackInfo) obj; + + if (!getTrackId().equals(other.getTrackId())) return false; + if (hasStartTime() != other.hasStartTime()) return false; + if (hasStartTime()) { + if (!getStartTime().equals(other.getStartTime())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + TRACK_ID_FIELD_NUMBER; + hash = (53 * hash) + getTrackId().hashCode(); + if (hasStartTime()) { + hash = (37 * hash) + START_TIME_FIELD_NUMBER; + hash = (53 * hash) + getStartTime().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.TrackInfo + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.TrackInfo + 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.visionai.v1.OccupancyCountingPredictionResult.TrackInfo + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.TrackInfo + 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.visionai.v1.OccupancyCountingPredictionResult.TrackInfo + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.TrackInfo + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.TrackInfo + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.TrackInfo + 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.visionai.v1.OccupancyCountingPredictionResult.TrackInfo + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.TrackInfo + 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.visionai.v1.OccupancyCountingPredictionResult.TrackInfo + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.TrackInfo + 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.visionai.v1.OccupancyCountingPredictionResult.TrackInfo 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 track info for annotations from occupancy counting operator.
+     * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.OccupancyCountingPredictionResult.TrackInfo} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.OccupancyCountingPredictionResult.TrackInfo) + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.TrackInfoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.AnnotationsProto + .internal_static_google_cloud_visionai_v1_OccupancyCountingPredictionResult_TrackInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.AnnotationsProto + .internal_static_google_cloud_visionai_v1_OccupancyCountingPredictionResult_TrackInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.TrackInfo.class, + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.TrackInfo.Builder + .class); + } + + // Construct using + // com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.TrackInfo.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getStartTimeFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + trackId_ = ""; + startTime_ = null; + if (startTimeBuilder_ != null) { + startTimeBuilder_.dispose(); + startTimeBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.AnnotationsProto + .internal_static_google_cloud_visionai_v1_OccupancyCountingPredictionResult_TrackInfo_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.TrackInfo + getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.TrackInfo + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.TrackInfo build() { + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.TrackInfo result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.TrackInfo + buildPartial() { + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.TrackInfo result = + new com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.TrackInfo(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.TrackInfo result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.trackId_ = trackId_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.startTime_ = startTimeBuilder_ == null ? startTime_ : startTimeBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.TrackInfo) { + return mergeFrom( + (com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.TrackInfo) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.TrackInfo other) { + if (other + == com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.TrackInfo + .getDefaultInstance()) return this; + if (!other.getTrackId().isEmpty()) { + trackId_ = other.trackId_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasStartTime()) { + mergeStartTime(other.getStartTime()); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + trackId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage(getStartTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object trackId_ = ""; + /** + * + * + *
+       * An unique id to identify a track. It should be consistent across frames.
+       * 
+ * + * string track_id = 1; + * + * @return The trackId. + */ + public java.lang.String getTrackId() { + java.lang.Object ref = trackId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + trackId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * An unique id to identify a track. It should be consistent across frames.
+       * 
+ * + * string track_id = 1; + * + * @return The bytes for trackId. + */ + public com.google.protobuf.ByteString getTrackIdBytes() { + java.lang.Object ref = trackId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + trackId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * An unique id to identify a track. It should be consistent across frames.
+       * 
+ * + * string track_id = 1; + * + * @param value The trackId to set. + * @return This builder for chaining. + */ + public Builder setTrackId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + trackId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * An unique id to identify a track. It should be consistent across frames.
+       * 
+ * + * string track_id = 1; + * + * @return This builder for chaining. + */ + public Builder clearTrackId() { + trackId_ = getDefaultInstance().getTrackId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+       * An unique id to identify a track. It should be consistent across frames.
+       * 
+ * + * string track_id = 1; + * + * @param value The bytes for trackId to set. + * @return This builder for chaining. + */ + public Builder setTrackIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + trackId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp startTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + startTimeBuilder_; + /** + * + * + *
+       * Start timestamp of this track.
+       * 
+ * + * .google.protobuf.Timestamp start_time = 2; + * + * @return Whether the startTime field is set. + */ + public boolean hasStartTime() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+       * Start timestamp of this track.
+       * 
+ * + * .google.protobuf.Timestamp start_time = 2; + * + * @return The startTime. + */ + public com.google.protobuf.Timestamp getStartTime() { + if (startTimeBuilder_ == null) { + return startTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : startTime_; + } else { + return startTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+       * Start timestamp of this track.
+       * 
+ * + * .google.protobuf.Timestamp start_time = 2; + */ + public Builder setStartTime(com.google.protobuf.Timestamp value) { + if (startTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + startTime_ = value; + } else { + startTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * Start timestamp of this track.
+       * 
+ * + * .google.protobuf.Timestamp start_time = 2; + */ + public Builder setStartTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (startTimeBuilder_ == null) { + startTime_ = builderForValue.build(); + } else { + startTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * Start timestamp of this track.
+       * 
+ * + * .google.protobuf.Timestamp start_time = 2; + */ + public Builder mergeStartTime(com.google.protobuf.Timestamp value) { + if (startTimeBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && startTime_ != null + && startTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getStartTimeBuilder().mergeFrom(value); + } else { + startTime_ = value; + } + } else { + startTimeBuilder_.mergeFrom(value); + } + if (startTime_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + /** + * + * + *
+       * Start timestamp of this track.
+       * 
+ * + * .google.protobuf.Timestamp start_time = 2; + */ + public Builder clearStartTime() { + bitField0_ = (bitField0_ & ~0x00000002); + startTime_ = null; + if (startTimeBuilder_ != null) { + startTimeBuilder_.dispose(); + startTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+       * Start timestamp of this track.
+       * 
+ * + * .google.protobuf.Timestamp start_time = 2; + */ + public com.google.protobuf.Timestamp.Builder getStartTimeBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getStartTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Start timestamp of this track.
+       * 
+ * + * .google.protobuf.Timestamp start_time = 2; + */ + public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { + if (startTimeBuilder_ != null) { + return startTimeBuilder_.getMessageOrBuilder(); + } else { + return startTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : startTime_; + } + } + /** + * + * + *
+       * Start timestamp of this track.
+       * 
+ * + * .google.protobuf.Timestamp start_time = 2; + */ + 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_; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.OccupancyCountingPredictionResult.TrackInfo) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.OccupancyCountingPredictionResult.TrackInfo) + private static final com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.TrackInfo + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.TrackInfo(); + } + + public static com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.TrackInfo + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public TrackInfo parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.OccupancyCountingPredictionResult.TrackInfo + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface DwellTimeInfoOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.OccupancyCountingPredictionResult.DwellTimeInfo) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * An unique id to identify a track. It should be consistent across frames.
+     * 
+ * + * string track_id = 1; + * + * @return The trackId. + */ + java.lang.String getTrackId(); + /** + * + * + *
+     * An unique id to identify a track. It should be consistent across frames.
+     * 
+ * + * string track_id = 1; + * + * @return The bytes for trackId. + */ + com.google.protobuf.ByteString getTrackIdBytes(); + + /** + * + * + *
+     * The unique id for the zone in which the object is dwelling/waiting.
+     * 
+ * + * string zone_id = 2; + * + * @return The zoneId. + */ + java.lang.String getZoneId(); + /** + * + * + *
+     * The unique id for the zone in which the object is dwelling/waiting.
+     * 
+ * + * string zone_id = 2; + * + * @return The bytes for zoneId. + */ + com.google.protobuf.ByteString getZoneIdBytes(); + + /** + * + * + *
+     * The beginning time when a dwelling object has been identified in a zone.
+     * 
+ * + * .google.protobuf.Timestamp dwell_start_time = 3; + * + * @return Whether the dwellStartTime field is set. + */ + boolean hasDwellStartTime(); + /** + * + * + *
+     * The beginning time when a dwelling object has been identified in a zone.
+     * 
+ * + * .google.protobuf.Timestamp dwell_start_time = 3; + * + * @return The dwellStartTime. + */ + com.google.protobuf.Timestamp getDwellStartTime(); + /** + * + * + *
+     * The beginning time when a dwelling object has been identified in a zone.
+     * 
+ * + * .google.protobuf.Timestamp dwell_start_time = 3; + */ + com.google.protobuf.TimestampOrBuilder getDwellStartTimeOrBuilder(); + + /** + * + * + *
+     * The end time when a dwelling object has exited in a zone.
+     * 
+ * + * .google.protobuf.Timestamp dwell_end_time = 4; + * + * @return Whether the dwellEndTime field is set. + */ + boolean hasDwellEndTime(); + /** + * + * + *
+     * The end time when a dwelling object has exited in a zone.
+     * 
+ * + * .google.protobuf.Timestamp dwell_end_time = 4; + * + * @return The dwellEndTime. + */ + com.google.protobuf.Timestamp getDwellEndTime(); + /** + * + * + *
+     * The end time when a dwelling object has exited in a zone.
+     * 
+ * + * .google.protobuf.Timestamp dwell_end_time = 4; + */ + com.google.protobuf.TimestampOrBuilder getDwellEndTimeOrBuilder(); + } + /** + * + * + *
+   * The dwell time info for annotations from occupancy counting operator.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.OccupancyCountingPredictionResult.DwellTimeInfo} + */ + public static final class DwellTimeInfo extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.OccupancyCountingPredictionResult.DwellTimeInfo) + DwellTimeInfoOrBuilder { + private static final long serialVersionUID = 0L; + // Use DwellTimeInfo.newBuilder() to construct. + private DwellTimeInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DwellTimeInfo() { + trackId_ = ""; + zoneId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DwellTimeInfo(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.AnnotationsProto + .internal_static_google_cloud_visionai_v1_OccupancyCountingPredictionResult_DwellTimeInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.AnnotationsProto + .internal_static_google_cloud_visionai_v1_OccupancyCountingPredictionResult_DwellTimeInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.DwellTimeInfo.class, + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.DwellTimeInfo.Builder + .class); + } + + private int bitField0_; + public static final int TRACK_ID_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object trackId_ = ""; + /** + * + * + *
+     * An unique id to identify a track. It should be consistent across frames.
+     * 
+ * + * string track_id = 1; + * + * @return The trackId. + */ + @java.lang.Override + public java.lang.String getTrackId() { + java.lang.Object ref = trackId_; + 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(); + trackId_ = s; + return s; + } + } + /** + * + * + *
+     * An unique id to identify a track. It should be consistent across frames.
+     * 
+ * + * string track_id = 1; + * + * @return The bytes for trackId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTrackIdBytes() { + java.lang.Object ref = trackId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + trackId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ZONE_ID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object zoneId_ = ""; + /** + * + * + *
+     * The unique id for the zone in which the object is dwelling/waiting.
+     * 
+ * + * string zone_id = 2; + * + * @return The zoneId. + */ + @java.lang.Override + public java.lang.String getZoneId() { + java.lang.Object ref = zoneId_; + 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(); + zoneId_ = s; + return s; + } + } + /** + * + * + *
+     * The unique id for the zone in which the object is dwelling/waiting.
+     * 
+ * + * string zone_id = 2; + * + * @return The bytes for zoneId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getZoneIdBytes() { + java.lang.Object ref = zoneId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + zoneId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DWELL_START_TIME_FIELD_NUMBER = 3; + private com.google.protobuf.Timestamp dwellStartTime_; + /** + * + * + *
+     * The beginning time when a dwelling object has been identified in a zone.
+     * 
+ * + * .google.protobuf.Timestamp dwell_start_time = 3; + * + * @return Whether the dwellStartTime field is set. + */ + @java.lang.Override + public boolean hasDwellStartTime() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * The beginning time when a dwelling object has been identified in a zone.
+     * 
+ * + * .google.protobuf.Timestamp dwell_start_time = 3; + * + * @return The dwellStartTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getDwellStartTime() { + return dwellStartTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : dwellStartTime_; + } + /** + * + * + *
+     * The beginning time when a dwelling object has been identified in a zone.
+     * 
+ * + * .google.protobuf.Timestamp dwell_start_time = 3; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getDwellStartTimeOrBuilder() { + return dwellStartTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : dwellStartTime_; + } + + public static final int DWELL_END_TIME_FIELD_NUMBER = 4; + private com.google.protobuf.Timestamp dwellEndTime_; + /** + * + * + *
+     * The end time when a dwelling object has exited in a zone.
+     * 
+ * + * .google.protobuf.Timestamp dwell_end_time = 4; + * + * @return Whether the dwellEndTime field is set. + */ + @java.lang.Override + public boolean hasDwellEndTime() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * The end time when a dwelling object has exited in a zone.
+     * 
+ * + * .google.protobuf.Timestamp dwell_end_time = 4; + * + * @return The dwellEndTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getDwellEndTime() { + return dwellEndTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : dwellEndTime_; + } + /** + * + * + *
+     * The end time when a dwelling object has exited in a zone.
+     * 
+ * + * .google.protobuf.Timestamp dwell_end_time = 4; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getDwellEndTimeOrBuilder() { + return dwellEndTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : dwellEndTime_; + } + + 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(trackId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, trackId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(zoneId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, zoneId_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(3, getDwellStartTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(4, getDwellEndTime()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(trackId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, trackId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(zoneId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, zoneId_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getDwellStartTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getDwellEndTime()); + } + size += getUnknownFields().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.visionai.v1.OccupancyCountingPredictionResult.DwellTimeInfo)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.DwellTimeInfo other = + (com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.DwellTimeInfo) obj; + + if (!getTrackId().equals(other.getTrackId())) return false; + if (!getZoneId().equals(other.getZoneId())) return false; + if (hasDwellStartTime() != other.hasDwellStartTime()) return false; + if (hasDwellStartTime()) { + if (!getDwellStartTime().equals(other.getDwellStartTime())) return false; + } + if (hasDwellEndTime() != other.hasDwellEndTime()) return false; + if (hasDwellEndTime()) { + if (!getDwellEndTime().equals(other.getDwellEndTime())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + TRACK_ID_FIELD_NUMBER; + hash = (53 * hash) + getTrackId().hashCode(); + hash = (37 * hash) + ZONE_ID_FIELD_NUMBER; + hash = (53 * hash) + getZoneId().hashCode(); + if (hasDwellStartTime()) { + hash = (37 * hash) + DWELL_START_TIME_FIELD_NUMBER; + hash = (53 * hash) + getDwellStartTime().hashCode(); + } + if (hasDwellEndTime()) { + hash = (37 * hash) + DWELL_END_TIME_FIELD_NUMBER; + hash = (53 * hash) + getDwellEndTime().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.DwellTimeInfo + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.DwellTimeInfo + 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.visionai.v1.OccupancyCountingPredictionResult.DwellTimeInfo + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.DwellTimeInfo + 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.visionai.v1.OccupancyCountingPredictionResult.DwellTimeInfo + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.DwellTimeInfo + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.DwellTimeInfo + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.DwellTimeInfo + 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.visionai.v1.OccupancyCountingPredictionResult.DwellTimeInfo + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.DwellTimeInfo + 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.visionai.v1.OccupancyCountingPredictionResult.DwellTimeInfo + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.DwellTimeInfo + 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.visionai.v1.OccupancyCountingPredictionResult.DwellTimeInfo 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 dwell time info for annotations from occupancy counting operator.
+     * 
+ * + * Protobuf type {@code + * google.cloud.visionai.v1.OccupancyCountingPredictionResult.DwellTimeInfo} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.OccupancyCountingPredictionResult.DwellTimeInfo) + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.DwellTimeInfoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.AnnotationsProto + .internal_static_google_cloud_visionai_v1_OccupancyCountingPredictionResult_DwellTimeInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.AnnotationsProto + .internal_static_google_cloud_visionai_v1_OccupancyCountingPredictionResult_DwellTimeInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.DwellTimeInfo.class, + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.DwellTimeInfo.Builder + .class); + } + + // Construct using + // com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.DwellTimeInfo.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getDwellStartTimeFieldBuilder(); + getDwellEndTimeFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + trackId_ = ""; + zoneId_ = ""; + dwellStartTime_ = null; + if (dwellStartTimeBuilder_ != null) { + dwellStartTimeBuilder_.dispose(); + dwellStartTimeBuilder_ = null; + } + dwellEndTime_ = null; + if (dwellEndTimeBuilder_ != null) { + dwellEndTimeBuilder_.dispose(); + dwellEndTimeBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.AnnotationsProto + .internal_static_google_cloud_visionai_v1_OccupancyCountingPredictionResult_DwellTimeInfo_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.DwellTimeInfo + getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.DwellTimeInfo + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.DwellTimeInfo build() { + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.DwellTimeInfo result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.DwellTimeInfo + buildPartial() { + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.DwellTimeInfo result = + new com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.DwellTimeInfo(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.DwellTimeInfo result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.trackId_ = trackId_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.zoneId_ = zoneId_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.dwellStartTime_ = + dwellStartTimeBuilder_ == null ? dwellStartTime_ : dwellStartTimeBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.dwellEndTime_ = + dwellEndTimeBuilder_ == null ? dwellEndTime_ : dwellEndTimeBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.DwellTimeInfo) { + return mergeFrom( + (com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.DwellTimeInfo) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.DwellTimeInfo other) { + if (other + == com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.DwellTimeInfo + .getDefaultInstance()) return this; + if (!other.getTrackId().isEmpty()) { + trackId_ = other.trackId_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getZoneId().isEmpty()) { + zoneId_ = other.zoneId_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.hasDwellStartTime()) { + mergeDwellStartTime(other.getDwellStartTime()); + } + if (other.hasDwellEndTime()) { + mergeDwellEndTime(other.getDwellEndTime()); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + trackId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + zoneId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage( + getDwellStartTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + input.readMessage(getDwellEndTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 34 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object trackId_ = ""; + /** + * + * + *
+       * An unique id to identify a track. It should be consistent across frames.
+       * 
+ * + * string track_id = 1; + * + * @return The trackId. + */ + public java.lang.String getTrackId() { + java.lang.Object ref = trackId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + trackId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * An unique id to identify a track. It should be consistent across frames.
+       * 
+ * + * string track_id = 1; + * + * @return The bytes for trackId. + */ + public com.google.protobuf.ByteString getTrackIdBytes() { + java.lang.Object ref = trackId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + trackId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * An unique id to identify a track. It should be consistent across frames.
+       * 
+ * + * string track_id = 1; + * + * @param value The trackId to set. + * @return This builder for chaining. + */ + public Builder setTrackId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + trackId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * An unique id to identify a track. It should be consistent across frames.
+       * 
+ * + * string track_id = 1; + * + * @return This builder for chaining. + */ + public Builder clearTrackId() { + trackId_ = getDefaultInstance().getTrackId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+       * An unique id to identify a track. It should be consistent across frames.
+       * 
+ * + * string track_id = 1; + * + * @param value The bytes for trackId to set. + * @return This builder for chaining. + */ + public Builder setTrackIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + trackId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object zoneId_ = ""; + /** + * + * + *
+       * The unique id for the zone in which the object is dwelling/waiting.
+       * 
+ * + * string zone_id = 2; + * + * @return The zoneId. + */ + public java.lang.String getZoneId() { + java.lang.Object ref = zoneId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + zoneId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * The unique id for the zone in which the object is dwelling/waiting.
+       * 
+ * + * string zone_id = 2; + * + * @return The bytes for zoneId. + */ + public com.google.protobuf.ByteString getZoneIdBytes() { + java.lang.Object ref = zoneId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + zoneId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * The unique id for the zone in which the object is dwelling/waiting.
+       * 
+ * + * string zone_id = 2; + * + * @param value The zoneId to set. + * @return This builder for chaining. + */ + public Builder setZoneId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + zoneId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * The unique id for the zone in which the object is dwelling/waiting.
+       * 
+ * + * string zone_id = 2; + * + * @return This builder for chaining. + */ + public Builder clearZoneId() { + zoneId_ = getDefaultInstance().getZoneId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+       * The unique id for the zone in which the object is dwelling/waiting.
+       * 
+ * + * string zone_id = 2; + * + * @param value The bytes for zoneId to set. + * @return This builder for chaining. + */ + public Builder setZoneIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + zoneId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp dwellStartTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + dwellStartTimeBuilder_; + /** + * + * + *
+       * The beginning time when a dwelling object has been identified in a zone.
+       * 
+ * + * .google.protobuf.Timestamp dwell_start_time = 3; + * + * @return Whether the dwellStartTime field is set. + */ + public boolean hasDwellStartTime() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+       * The beginning time when a dwelling object has been identified in a zone.
+       * 
+ * + * .google.protobuf.Timestamp dwell_start_time = 3; + * + * @return The dwellStartTime. + */ + public com.google.protobuf.Timestamp getDwellStartTime() { + if (dwellStartTimeBuilder_ == null) { + return dwellStartTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : dwellStartTime_; + } else { + return dwellStartTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+       * The beginning time when a dwelling object has been identified in a zone.
+       * 
+ * + * .google.protobuf.Timestamp dwell_start_time = 3; + */ + public Builder setDwellStartTime(com.google.protobuf.Timestamp value) { + if (dwellStartTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + dwellStartTime_ = value; + } else { + dwellStartTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+       * The beginning time when a dwelling object has been identified in a zone.
+       * 
+ * + * .google.protobuf.Timestamp dwell_start_time = 3; + */ + public Builder setDwellStartTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (dwellStartTimeBuilder_ == null) { + dwellStartTime_ = builderForValue.build(); + } else { + dwellStartTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+       * The beginning time when a dwelling object has been identified in a zone.
+       * 
+ * + * .google.protobuf.Timestamp dwell_start_time = 3; + */ + public Builder mergeDwellStartTime(com.google.protobuf.Timestamp value) { + if (dwellStartTimeBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && dwellStartTime_ != null + && dwellStartTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getDwellStartTimeBuilder().mergeFrom(value); + } else { + dwellStartTime_ = value; + } + } else { + dwellStartTimeBuilder_.mergeFrom(value); + } + if (dwellStartTime_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + /** + * + * + *
+       * The beginning time when a dwelling object has been identified in a zone.
+       * 
+ * + * .google.protobuf.Timestamp dwell_start_time = 3; + */ + public Builder clearDwellStartTime() { + bitField0_ = (bitField0_ & ~0x00000004); + dwellStartTime_ = null; + if (dwellStartTimeBuilder_ != null) { + dwellStartTimeBuilder_.dispose(); + dwellStartTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+       * The beginning time when a dwelling object has been identified in a zone.
+       * 
+ * + * .google.protobuf.Timestamp dwell_start_time = 3; + */ + public com.google.protobuf.Timestamp.Builder getDwellStartTimeBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getDwellStartTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * The beginning time when a dwelling object has been identified in a zone.
+       * 
+ * + * .google.protobuf.Timestamp dwell_start_time = 3; + */ + public com.google.protobuf.TimestampOrBuilder getDwellStartTimeOrBuilder() { + if (dwellStartTimeBuilder_ != null) { + return dwellStartTimeBuilder_.getMessageOrBuilder(); + } else { + return dwellStartTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : dwellStartTime_; + } + } + /** + * + * + *
+       * The beginning time when a dwelling object has been identified in a zone.
+       * 
+ * + * .google.protobuf.Timestamp dwell_start_time = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getDwellStartTimeFieldBuilder() { + if (dwellStartTimeBuilder_ == null) { + dwellStartTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getDwellStartTime(), getParentForChildren(), isClean()); + dwellStartTime_ = null; + } + return dwellStartTimeBuilder_; + } + + private com.google.protobuf.Timestamp dwellEndTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + dwellEndTimeBuilder_; + /** + * + * + *
+       * The end time when a dwelling object has exited in a zone.
+       * 
+ * + * .google.protobuf.Timestamp dwell_end_time = 4; + * + * @return Whether the dwellEndTime field is set. + */ + public boolean hasDwellEndTime() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + * + * + *
+       * The end time when a dwelling object has exited in a zone.
+       * 
+ * + * .google.protobuf.Timestamp dwell_end_time = 4; + * + * @return The dwellEndTime. + */ + public com.google.protobuf.Timestamp getDwellEndTime() { + if (dwellEndTimeBuilder_ == null) { + return dwellEndTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : dwellEndTime_; + } else { + return dwellEndTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+       * The end time when a dwelling object has exited in a zone.
+       * 
+ * + * .google.protobuf.Timestamp dwell_end_time = 4; + */ + public Builder setDwellEndTime(com.google.protobuf.Timestamp value) { + if (dwellEndTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + dwellEndTime_ = value; + } else { + dwellEndTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+       * The end time when a dwelling object has exited in a zone.
+       * 
+ * + * .google.protobuf.Timestamp dwell_end_time = 4; + */ + public Builder setDwellEndTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (dwellEndTimeBuilder_ == null) { + dwellEndTime_ = builderForValue.build(); + } else { + dwellEndTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+       * The end time when a dwelling object has exited in a zone.
+       * 
+ * + * .google.protobuf.Timestamp dwell_end_time = 4; + */ + public Builder mergeDwellEndTime(com.google.protobuf.Timestamp value) { + if (dwellEndTimeBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) + && dwellEndTime_ != null + && dwellEndTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getDwellEndTimeBuilder().mergeFrom(value); + } else { + dwellEndTime_ = value; + } + } else { + dwellEndTimeBuilder_.mergeFrom(value); + } + if (dwellEndTime_ != null) { + bitField0_ |= 0x00000008; + onChanged(); + } + return this; + } + /** + * + * + *
+       * The end time when a dwelling object has exited in a zone.
+       * 
+ * + * .google.protobuf.Timestamp dwell_end_time = 4; + */ + public Builder clearDwellEndTime() { + bitField0_ = (bitField0_ & ~0x00000008); + dwellEndTime_ = null; + if (dwellEndTimeBuilder_ != null) { + dwellEndTimeBuilder_.dispose(); + dwellEndTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+       * The end time when a dwelling object has exited in a zone.
+       * 
+ * + * .google.protobuf.Timestamp dwell_end_time = 4; + */ + public com.google.protobuf.Timestamp.Builder getDwellEndTimeBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return getDwellEndTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * The end time when a dwelling object has exited in a zone.
+       * 
+ * + * .google.protobuf.Timestamp dwell_end_time = 4; + */ + public com.google.protobuf.TimestampOrBuilder getDwellEndTimeOrBuilder() { + if (dwellEndTimeBuilder_ != null) { + return dwellEndTimeBuilder_.getMessageOrBuilder(); + } else { + return dwellEndTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : dwellEndTime_; + } + } + /** + * + * + *
+       * The end time when a dwelling object has exited in a zone.
+       * 
+ * + * .google.protobuf.Timestamp dwell_end_time = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getDwellEndTimeFieldBuilder() { + if (dwellEndTimeBuilder_ == null) { + dwellEndTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getDwellEndTime(), getParentForChildren(), isClean()); + dwellEndTime_ = null; + } + return dwellEndTimeBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.OccupancyCountingPredictionResult.DwellTimeInfo) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.OccupancyCountingPredictionResult.DwellTimeInfo) + private static final com.google.cloud.visionai.v1.OccupancyCountingPredictionResult + .DwellTimeInfo + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.DwellTimeInfo(); + } + + public static com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.DwellTimeInfo + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DwellTimeInfo parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.OccupancyCountingPredictionResult.DwellTimeInfo + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int bitField0_; + public static final int CURRENT_TIME_FIELD_NUMBER = 1; + private com.google.protobuf.Timestamp currentTime_; + /** + * + * + *
+   * Current timestamp.
+   * 
+ * + * .google.protobuf.Timestamp current_time = 1; + * + * @return Whether the currentTime field is set. + */ + @java.lang.Override + public boolean hasCurrentTime() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * Current timestamp.
+   * 
+ * + * .google.protobuf.Timestamp current_time = 1; + * + * @return The currentTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCurrentTime() { + return currentTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : currentTime_; + } + /** + * + * + *
+   * Current timestamp.
+   * 
+ * + * .google.protobuf.Timestamp current_time = 1; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCurrentTimeOrBuilder() { + return currentTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : currentTime_; + } + + public static final int IDENTIFIED_BOXES_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private java.util.List< + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.IdentifiedBox> + identifiedBoxes_; + /** + * + * + *
+   * A list of identified boxes.
+   * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.IdentifiedBox identified_boxes = 2; + * + */ + @java.lang.Override + public java.util.List< + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.IdentifiedBox> + getIdentifiedBoxesList() { + return identifiedBoxes_; + } + /** + * + * + *
+   * A list of identified boxes.
+   * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.IdentifiedBox identified_boxes = 2; + * + */ + @java.lang.Override + public java.util.List< + ? extends + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.IdentifiedBoxOrBuilder> + getIdentifiedBoxesOrBuilderList() { + return identifiedBoxes_; + } + /** + * + * + *
+   * A list of identified boxes.
+   * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.IdentifiedBox identified_boxes = 2; + * + */ + @java.lang.Override + public int getIdentifiedBoxesCount() { + return identifiedBoxes_.size(); + } + /** + * + * + *
+   * A list of identified boxes.
+   * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.IdentifiedBox identified_boxes = 2; + * + */ + @java.lang.Override + public com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.IdentifiedBox + getIdentifiedBoxes(int index) { + return identifiedBoxes_.get(index); + } + /** + * + * + *
+   * A list of identified boxes.
+   * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.IdentifiedBox identified_boxes = 2; + * + */ + @java.lang.Override + public com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.IdentifiedBoxOrBuilder + getIdentifiedBoxesOrBuilder(int index) { + return identifiedBoxes_.get(index); + } + + public static final int STATS_FIELD_NUMBER = 3; + private com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats stats_; + /** + * + * + *
+   * Detection statistics.
+   * 
+ * + * .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats stats = 3; + * + * @return Whether the stats field is set. + */ + @java.lang.Override + public boolean hasStats() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+   * Detection statistics.
+   * 
+ * + * .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats stats = 3; + * + * @return The stats. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats getStats() { + return stats_ == null + ? com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.getDefaultInstance() + : stats_; + } + /** + * + * + *
+   * Detection statistics.
+   * 
+ * + * .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats stats = 3; + */ + @java.lang.Override + public com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.StatsOrBuilder + getStatsOrBuilder() { + return stats_ == null + ? com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.getDefaultInstance() + : stats_; + } + + public static final int TRACK_INFO_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private java.util.List + trackInfo_; + /** + * + * + *
+   * Track related information. All the tracks that are live at this timestamp.
+   * It only exists if tracking is enabled.
+   * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.TrackInfo track_info = 4; + * + */ + @java.lang.Override + public java.util.List + getTrackInfoList() { + return trackInfo_; + } + /** + * + * + *
+   * Track related information. All the tracks that are live at this timestamp.
+   * It only exists if tracking is enabled.
+   * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.TrackInfo track_info = 4; + * + */ + @java.lang.Override + public java.util.List< + ? extends + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.TrackInfoOrBuilder> + getTrackInfoOrBuilderList() { + return trackInfo_; + } + /** + * + * + *
+   * Track related information. All the tracks that are live at this timestamp.
+   * It only exists if tracking is enabled.
+   * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.TrackInfo track_info = 4; + * + */ + @java.lang.Override + public int getTrackInfoCount() { + return trackInfo_.size(); + } + /** + * + * + *
+   * Track related information. All the tracks that are live at this timestamp.
+   * It only exists if tracking is enabled.
+   * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.TrackInfo track_info = 4; + * + */ + @java.lang.Override + public com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.TrackInfo getTrackInfo( + int index) { + return trackInfo_.get(index); + } + /** + * + * + *
+   * Track related information. All the tracks that are live at this timestamp.
+   * It only exists if tracking is enabled.
+   * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.TrackInfo track_info = 4; + * + */ + @java.lang.Override + public com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.TrackInfoOrBuilder + getTrackInfoOrBuilder(int index) { + return trackInfo_.get(index); + } + + public static final int DWELL_TIME_INFO_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private java.util.List< + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.DwellTimeInfo> + dwellTimeInfo_; + /** + * + * + *
+   * Dwell time related information. All the tracks that are live in a given
+   * zone with a start and end dwell time timestamp
+   * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.DwellTimeInfo dwell_time_info = 5; + * + */ + @java.lang.Override + public java.util.List< + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.DwellTimeInfo> + getDwellTimeInfoList() { + return dwellTimeInfo_; + } + /** + * + * + *
+   * Dwell time related information. All the tracks that are live in a given
+   * zone with a start and end dwell time timestamp
+   * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.DwellTimeInfo dwell_time_info = 5; + * + */ + @java.lang.Override + public java.util.List< + ? extends + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.DwellTimeInfoOrBuilder> + getDwellTimeInfoOrBuilderList() { + return dwellTimeInfo_; + } + /** + * + * + *
+   * Dwell time related information. All the tracks that are live in a given
+   * zone with a start and end dwell time timestamp
+   * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.DwellTimeInfo dwell_time_info = 5; + * + */ + @java.lang.Override + public int getDwellTimeInfoCount() { + return dwellTimeInfo_.size(); + } + /** + * + * + *
+   * Dwell time related information. All the tracks that are live in a given
+   * zone with a start and end dwell time timestamp
+   * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.DwellTimeInfo dwell_time_info = 5; + * + */ + @java.lang.Override + public com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.DwellTimeInfo + getDwellTimeInfo(int index) { + return dwellTimeInfo_.get(index); + } + /** + * + * + *
+   * Dwell time related information. All the tracks that are live in a given
+   * zone with a start and end dwell time timestamp
+   * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.DwellTimeInfo dwell_time_info = 5; + * + */ + @java.lang.Override + public com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.DwellTimeInfoOrBuilder + getDwellTimeInfoOrBuilder(int index) { + return dwellTimeInfo_.get(index); + } + + public static final int PTS_FIELD_NUMBER = 6; + private long pts_ = 0L; + /** + * + * + *
+   * The presentation timestamp of the frame.
+   * 
+ * + * optional int64 pts = 6; + * + * @return Whether the pts field is set. + */ + @java.lang.Override + public boolean hasPts() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+   * The presentation timestamp of the frame.
+   * 
+ * + * optional int64 pts = 6; + * + * @return The pts. + */ + @java.lang.Override + public long getPts() { + return pts_; + } + + 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 (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getCurrentTime()); + } + for (int i = 0; i < identifiedBoxes_.size(); i++) { + output.writeMessage(2, identifiedBoxes_.get(i)); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(3, getStats()); + } + for (int i = 0; i < trackInfo_.size(); i++) { + output.writeMessage(4, trackInfo_.get(i)); + } + for (int i = 0; i < dwellTimeInfo_.size(); i++) { + output.writeMessage(5, dwellTimeInfo_.get(i)); + } + if (((bitField0_ & 0x00000004) != 0)) { + output.writeInt64(6, pts_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getCurrentTime()); + } + for (int i = 0; i < identifiedBoxes_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, identifiedBoxes_.get(i)); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getStats()); + } + for (int i = 0; i < trackInfo_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, trackInfo_.get(i)); + } + for (int i = 0; i < dwellTimeInfo_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, dwellTimeInfo_.get(i)); + } + if (((bitField0_ & 0x00000004) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(6, pts_); + } + size += getUnknownFields().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.visionai.v1.OccupancyCountingPredictionResult)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult other = + (com.google.cloud.visionai.v1.OccupancyCountingPredictionResult) obj; + + if (hasCurrentTime() != other.hasCurrentTime()) return false; + if (hasCurrentTime()) { + if (!getCurrentTime().equals(other.getCurrentTime())) return false; + } + if (!getIdentifiedBoxesList().equals(other.getIdentifiedBoxesList())) return false; + if (hasStats() != other.hasStats()) return false; + if (hasStats()) { + if (!getStats().equals(other.getStats())) return false; + } + if (!getTrackInfoList().equals(other.getTrackInfoList())) return false; + if (!getDwellTimeInfoList().equals(other.getDwellTimeInfoList())) return false; + if (hasPts() != other.hasPts()) return false; + if (hasPts()) { + if (getPts() != other.getPts()) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasCurrentTime()) { + hash = (37 * hash) + CURRENT_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCurrentTime().hashCode(); + } + if (getIdentifiedBoxesCount() > 0) { + hash = (37 * hash) + IDENTIFIED_BOXES_FIELD_NUMBER; + hash = (53 * hash) + getIdentifiedBoxesList().hashCode(); + } + if (hasStats()) { + hash = (37 * hash) + STATS_FIELD_NUMBER; + hash = (53 * hash) + getStats().hashCode(); + } + if (getTrackInfoCount() > 0) { + hash = (37 * hash) + TRACK_INFO_FIELD_NUMBER; + hash = (53 * hash) + getTrackInfoList().hashCode(); + } + if (getDwellTimeInfoCount() > 0) { + hash = (37 * hash) + DWELL_TIME_INFO_FIELD_NUMBER; + hash = (53 * hash) + getDwellTimeInfoList().hashCode(); + } + if (hasPts()) { + hash = (37 * hash) + PTS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getPts()); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.OccupancyCountingPredictionResult parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.OccupancyCountingPredictionResult 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.visionai.v1.OccupancyCountingPredictionResult parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.OccupancyCountingPredictionResult 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.visionai.v1.OccupancyCountingPredictionResult parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.OccupancyCountingPredictionResult parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.OccupancyCountingPredictionResult parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.OccupancyCountingPredictionResult 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.visionai.v1.OccupancyCountingPredictionResult parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.OccupancyCountingPredictionResult 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.visionai.v1.OccupancyCountingPredictionResult parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.OccupancyCountingPredictionResult 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.visionai.v1.OccupancyCountingPredictionResult 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 prediction result proto for occupancy counting.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.OccupancyCountingPredictionResult} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.OccupancyCountingPredictionResult) + com.google.cloud.visionai.v1.OccupancyCountingPredictionResultOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.AnnotationsProto + .internal_static_google_cloud_visionai_v1_OccupancyCountingPredictionResult_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.AnnotationsProto + .internal_static_google_cloud_visionai_v1_OccupancyCountingPredictionResult_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.class, + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getCurrentTimeFieldBuilder(); + getIdentifiedBoxesFieldBuilder(); + getStatsFieldBuilder(); + getTrackInfoFieldBuilder(); + getDwellTimeInfoFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + currentTime_ = null; + if (currentTimeBuilder_ != null) { + currentTimeBuilder_.dispose(); + currentTimeBuilder_ = null; + } + if (identifiedBoxesBuilder_ == null) { + identifiedBoxes_ = java.util.Collections.emptyList(); + } else { + identifiedBoxes_ = null; + identifiedBoxesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + stats_ = null; + if (statsBuilder_ != null) { + statsBuilder_.dispose(); + statsBuilder_ = null; + } + if (trackInfoBuilder_ == null) { + trackInfo_ = java.util.Collections.emptyList(); + } else { + trackInfo_ = null; + trackInfoBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000008); + if (dwellTimeInfoBuilder_ == null) { + dwellTimeInfo_ = java.util.Collections.emptyList(); + } else { + dwellTimeInfo_ = null; + dwellTimeInfoBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000010); + pts_ = 0L; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.AnnotationsProto + .internal_static_google_cloud_visionai_v1_OccupancyCountingPredictionResult_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.OccupancyCountingPredictionResult + getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.OccupancyCountingPredictionResult build() { + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.OccupancyCountingPredictionResult buildPartial() { + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult result = + new com.google.cloud.visionai.v1.OccupancyCountingPredictionResult(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult result) { + if (identifiedBoxesBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + identifiedBoxes_ = java.util.Collections.unmodifiableList(identifiedBoxes_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.identifiedBoxes_ = identifiedBoxes_; + } else { + result.identifiedBoxes_ = identifiedBoxesBuilder_.build(); + } + if (trackInfoBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0)) { + trackInfo_ = java.util.Collections.unmodifiableList(trackInfo_); + bitField0_ = (bitField0_ & ~0x00000008); + } + result.trackInfo_ = trackInfo_; + } else { + result.trackInfo_ = trackInfoBuilder_.build(); + } + if (dwellTimeInfoBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0)) { + dwellTimeInfo_ = java.util.Collections.unmodifiableList(dwellTimeInfo_); + bitField0_ = (bitField0_ & ~0x00000010); + } + result.dwellTimeInfo_ = dwellTimeInfo_; + } else { + result.dwellTimeInfo_ = dwellTimeInfoBuilder_.build(); + } + } + + private void buildPartial0( + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.currentTime_ = + currentTimeBuilder_ == null ? currentTime_ : currentTimeBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.stats_ = statsBuilder_ == null ? stats_ : statsBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.pts_ = pts_; + to_bitField0_ |= 0x00000004; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.OccupancyCountingPredictionResult) { + return mergeFrom((com.google.cloud.visionai.v1.OccupancyCountingPredictionResult) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.OccupancyCountingPredictionResult other) { + if (other + == com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.getDefaultInstance()) + return this; + if (other.hasCurrentTime()) { + mergeCurrentTime(other.getCurrentTime()); + } + if (identifiedBoxesBuilder_ == null) { + if (!other.identifiedBoxes_.isEmpty()) { + if (identifiedBoxes_.isEmpty()) { + identifiedBoxes_ = other.identifiedBoxes_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureIdentifiedBoxesIsMutable(); + identifiedBoxes_.addAll(other.identifiedBoxes_); + } + onChanged(); + } + } else { + if (!other.identifiedBoxes_.isEmpty()) { + if (identifiedBoxesBuilder_.isEmpty()) { + identifiedBoxesBuilder_.dispose(); + identifiedBoxesBuilder_ = null; + identifiedBoxes_ = other.identifiedBoxes_; + bitField0_ = (bitField0_ & ~0x00000002); + identifiedBoxesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getIdentifiedBoxesFieldBuilder() + : null; + } else { + identifiedBoxesBuilder_.addAllMessages(other.identifiedBoxes_); + } + } + } + if (other.hasStats()) { + mergeStats(other.getStats()); + } + if (trackInfoBuilder_ == null) { + if (!other.trackInfo_.isEmpty()) { + if (trackInfo_.isEmpty()) { + trackInfo_ = other.trackInfo_; + bitField0_ = (bitField0_ & ~0x00000008); + } else { + ensureTrackInfoIsMutable(); + trackInfo_.addAll(other.trackInfo_); + } + onChanged(); + } + } else { + if (!other.trackInfo_.isEmpty()) { + if (trackInfoBuilder_.isEmpty()) { + trackInfoBuilder_.dispose(); + trackInfoBuilder_ = null; + trackInfo_ = other.trackInfo_; + bitField0_ = (bitField0_ & ~0x00000008); + trackInfoBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getTrackInfoFieldBuilder() + : null; + } else { + trackInfoBuilder_.addAllMessages(other.trackInfo_); + } + } + } + if (dwellTimeInfoBuilder_ == null) { + if (!other.dwellTimeInfo_.isEmpty()) { + if (dwellTimeInfo_.isEmpty()) { + dwellTimeInfo_ = other.dwellTimeInfo_; + bitField0_ = (bitField0_ & ~0x00000010); + } else { + ensureDwellTimeInfoIsMutable(); + dwellTimeInfo_.addAll(other.dwellTimeInfo_); + } + onChanged(); + } + } else { + if (!other.dwellTimeInfo_.isEmpty()) { + if (dwellTimeInfoBuilder_.isEmpty()) { + dwellTimeInfoBuilder_.dispose(); + dwellTimeInfoBuilder_ = null; + dwellTimeInfo_ = other.dwellTimeInfo_; + bitField0_ = (bitField0_ & ~0x00000010); + dwellTimeInfoBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getDwellTimeInfoFieldBuilder() + : null; + } else { + dwellTimeInfoBuilder_.addAllMessages(other.dwellTimeInfo_); + } + } + } + if (other.hasPts()) { + setPts(other.getPts()); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getCurrentTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.IdentifiedBox m = + input.readMessage( + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.IdentifiedBox + .parser(), + extensionRegistry); + if (identifiedBoxesBuilder_ == null) { + ensureIdentifiedBoxesIsMutable(); + identifiedBoxes_.add(m); + } else { + identifiedBoxesBuilder_.addMessage(m); + } + break; + } // case 18 + case 26: + { + input.readMessage(getStatsFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.TrackInfo m = + input.readMessage( + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.TrackInfo + .parser(), + extensionRegistry); + if (trackInfoBuilder_ == null) { + ensureTrackInfoIsMutable(); + trackInfo_.add(m); + } else { + trackInfoBuilder_.addMessage(m); + } + break; + } // case 34 + case 42: + { + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.DwellTimeInfo m = + input.readMessage( + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.DwellTimeInfo + .parser(), + extensionRegistry); + if (dwellTimeInfoBuilder_ == null) { + ensureDwellTimeInfoIsMutable(); + dwellTimeInfo_.add(m); + } else { + dwellTimeInfoBuilder_.addMessage(m); + } + break; + } // case 42 + case 48: + { + pts_ = input.readInt64(); + bitField0_ |= 0x00000020; + break; + } // case 48 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.protobuf.Timestamp currentTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + currentTimeBuilder_; + /** + * + * + *
+     * Current timestamp.
+     * 
+ * + * .google.protobuf.Timestamp current_time = 1; + * + * @return Whether the currentTime field is set. + */ + public boolean hasCurrentTime() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * Current timestamp.
+     * 
+ * + * .google.protobuf.Timestamp current_time = 1; + * + * @return The currentTime. + */ + public com.google.protobuf.Timestamp getCurrentTime() { + if (currentTimeBuilder_ == null) { + return currentTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : currentTime_; + } else { + return currentTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Current timestamp.
+     * 
+ * + * .google.protobuf.Timestamp current_time = 1; + */ + public Builder setCurrentTime(com.google.protobuf.Timestamp value) { + if (currentTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + currentTime_ = value; + } else { + currentTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Current timestamp.
+     * 
+ * + * .google.protobuf.Timestamp current_time = 1; + */ + public Builder setCurrentTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (currentTimeBuilder_ == null) { + currentTime_ = builderForValue.build(); + } else { + currentTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Current timestamp.
+     * 
+ * + * .google.protobuf.Timestamp current_time = 1; + */ + public Builder mergeCurrentTime(com.google.protobuf.Timestamp value) { + if (currentTimeBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && currentTime_ != null + && currentTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getCurrentTimeBuilder().mergeFrom(value); + } else { + currentTime_ = value; + } + } else { + currentTimeBuilder_.mergeFrom(value); + } + if (currentTime_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Current timestamp.
+     * 
+ * + * .google.protobuf.Timestamp current_time = 1; + */ + public Builder clearCurrentTime() { + bitField0_ = (bitField0_ & ~0x00000001); + currentTime_ = null; + if (currentTimeBuilder_ != null) { + currentTimeBuilder_.dispose(); + currentTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Current timestamp.
+     * 
+ * + * .google.protobuf.Timestamp current_time = 1; + */ + public com.google.protobuf.Timestamp.Builder getCurrentTimeBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getCurrentTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Current timestamp.
+     * 
+ * + * .google.protobuf.Timestamp current_time = 1; + */ + public com.google.protobuf.TimestampOrBuilder getCurrentTimeOrBuilder() { + if (currentTimeBuilder_ != null) { + return currentTimeBuilder_.getMessageOrBuilder(); + } else { + return currentTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : currentTime_; + } + } + /** + * + * + *
+     * Current timestamp.
+     * 
+ * + * .google.protobuf.Timestamp current_time = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getCurrentTimeFieldBuilder() { + if (currentTimeBuilder_ == null) { + currentTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getCurrentTime(), getParentForChildren(), isClean()); + currentTime_ = null; + } + return currentTimeBuilder_; + } + + private java.util.List< + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.IdentifiedBox> + identifiedBoxes_ = java.util.Collections.emptyList(); + + private void ensureIdentifiedBoxesIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + identifiedBoxes_ = + new java.util.ArrayList< + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.IdentifiedBox>( + identifiedBoxes_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.IdentifiedBox, + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.IdentifiedBox.Builder, + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.IdentifiedBoxOrBuilder> + identifiedBoxesBuilder_; + + /** + * + * + *
+     * A list of identified boxes.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.IdentifiedBox identified_boxes = 2; + * + */ + public java.util.List< + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.IdentifiedBox> + getIdentifiedBoxesList() { + if (identifiedBoxesBuilder_ == null) { + return java.util.Collections.unmodifiableList(identifiedBoxes_); + } else { + return identifiedBoxesBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * A list of identified boxes.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.IdentifiedBox identified_boxes = 2; + * + */ + public int getIdentifiedBoxesCount() { + if (identifiedBoxesBuilder_ == null) { + return identifiedBoxes_.size(); + } else { + return identifiedBoxesBuilder_.getCount(); + } + } + /** + * + * + *
+     * A list of identified boxes.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.IdentifiedBox identified_boxes = 2; + * + */ + public com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.IdentifiedBox + getIdentifiedBoxes(int index) { + if (identifiedBoxesBuilder_ == null) { + return identifiedBoxes_.get(index); + } else { + return identifiedBoxesBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * A list of identified boxes.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.IdentifiedBox identified_boxes = 2; + * + */ + public Builder setIdentifiedBoxes( + int index, + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.IdentifiedBox value) { + if (identifiedBoxesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureIdentifiedBoxesIsMutable(); + identifiedBoxes_.set(index, value); + onChanged(); + } else { + identifiedBoxesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * A list of identified boxes.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.IdentifiedBox identified_boxes = 2; + * + */ + public Builder setIdentifiedBoxes( + int index, + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.IdentifiedBox.Builder + builderForValue) { + if (identifiedBoxesBuilder_ == null) { + ensureIdentifiedBoxesIsMutable(); + identifiedBoxes_.set(index, builderForValue.build()); + onChanged(); + } else { + identifiedBoxesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A list of identified boxes.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.IdentifiedBox identified_boxes = 2; + * + */ + public Builder addIdentifiedBoxes( + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.IdentifiedBox value) { + if (identifiedBoxesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureIdentifiedBoxesIsMutable(); + identifiedBoxes_.add(value); + onChanged(); + } else { + identifiedBoxesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * A list of identified boxes.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.IdentifiedBox identified_boxes = 2; + * + */ + public Builder addIdentifiedBoxes( + int index, + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.IdentifiedBox value) { + if (identifiedBoxesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureIdentifiedBoxesIsMutable(); + identifiedBoxes_.add(index, value); + onChanged(); + } else { + identifiedBoxesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * A list of identified boxes.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.IdentifiedBox identified_boxes = 2; + * + */ + public Builder addIdentifiedBoxes( + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.IdentifiedBox.Builder + builderForValue) { + if (identifiedBoxesBuilder_ == null) { + ensureIdentifiedBoxesIsMutable(); + identifiedBoxes_.add(builderForValue.build()); + onChanged(); + } else { + identifiedBoxesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A list of identified boxes.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.IdentifiedBox identified_boxes = 2; + * + */ + public Builder addIdentifiedBoxes( + int index, + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.IdentifiedBox.Builder + builderForValue) { + if (identifiedBoxesBuilder_ == null) { + ensureIdentifiedBoxesIsMutable(); + identifiedBoxes_.add(index, builderForValue.build()); + onChanged(); + } else { + identifiedBoxesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A list of identified boxes.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.IdentifiedBox identified_boxes = 2; + * + */ + public Builder addAllIdentifiedBoxes( + java.lang.Iterable< + ? extends + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.IdentifiedBox> + values) { + if (identifiedBoxesBuilder_ == null) { + ensureIdentifiedBoxesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, identifiedBoxes_); + onChanged(); + } else { + identifiedBoxesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * A list of identified boxes.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.IdentifiedBox identified_boxes = 2; + * + */ + public Builder clearIdentifiedBoxes() { + if (identifiedBoxesBuilder_ == null) { + identifiedBoxes_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + identifiedBoxesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * A list of identified boxes.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.IdentifiedBox identified_boxes = 2; + * + */ + public Builder removeIdentifiedBoxes(int index) { + if (identifiedBoxesBuilder_ == null) { + ensureIdentifiedBoxesIsMutable(); + identifiedBoxes_.remove(index); + onChanged(); + } else { + identifiedBoxesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * A list of identified boxes.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.IdentifiedBox identified_boxes = 2; + * + */ + public com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.IdentifiedBox.Builder + getIdentifiedBoxesBuilder(int index) { + return getIdentifiedBoxesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * A list of identified boxes.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.IdentifiedBox identified_boxes = 2; + * + */ + public com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.IdentifiedBoxOrBuilder + getIdentifiedBoxesOrBuilder(int index) { + if (identifiedBoxesBuilder_ == null) { + return identifiedBoxes_.get(index); + } else { + return identifiedBoxesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * A list of identified boxes.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.IdentifiedBox identified_boxes = 2; + * + */ + public java.util.List< + ? extends + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult + .IdentifiedBoxOrBuilder> + getIdentifiedBoxesOrBuilderList() { + if (identifiedBoxesBuilder_ != null) { + return identifiedBoxesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(identifiedBoxes_); + } + } + /** + * + * + *
+     * A list of identified boxes.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.IdentifiedBox identified_boxes = 2; + * + */ + public com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.IdentifiedBox.Builder + addIdentifiedBoxesBuilder() { + return getIdentifiedBoxesFieldBuilder() + .addBuilder( + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.IdentifiedBox + .getDefaultInstance()); + } + /** + * + * + *
+     * A list of identified boxes.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.IdentifiedBox identified_boxes = 2; + * + */ + public com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.IdentifiedBox.Builder + addIdentifiedBoxesBuilder(int index) { + return getIdentifiedBoxesFieldBuilder() + .addBuilder( + index, + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.IdentifiedBox + .getDefaultInstance()); + } + /** + * + * + *
+     * A list of identified boxes.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.IdentifiedBox identified_boxes = 2; + * + */ + public java.util.List< + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.IdentifiedBox.Builder> + getIdentifiedBoxesBuilderList() { + return getIdentifiedBoxesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.IdentifiedBox, + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.IdentifiedBox.Builder, + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.IdentifiedBoxOrBuilder> + getIdentifiedBoxesFieldBuilder() { + if (identifiedBoxesBuilder_ == null) { + identifiedBoxesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.IdentifiedBox, + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.IdentifiedBox + .Builder, + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult + .IdentifiedBoxOrBuilder>( + identifiedBoxes_, + ((bitField0_ & 0x00000002) != 0), + getParentForChildren(), + isClean()); + identifiedBoxes_ = null; + } + return identifiedBoxesBuilder_; + } + + private com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats stats_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats, + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.Builder, + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.StatsOrBuilder> + statsBuilder_; + /** + * + * + *
+     * Detection statistics.
+     * 
+ * + * .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats stats = 3; + * + * @return Whether the stats field is set. + */ + public boolean hasStats() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+     * Detection statistics.
+     * 
+ * + * .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats stats = 3; + * + * @return The stats. + */ + public com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats getStats() { + if (statsBuilder_ == null) { + return stats_ == null + ? com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats + .getDefaultInstance() + : stats_; + } else { + return statsBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Detection statistics.
+     * 
+ * + * .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats stats = 3; + */ + public Builder setStats( + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats value) { + if (statsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + stats_ = value; + } else { + statsBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Detection statistics.
+     * 
+ * + * .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats stats = 3; + */ + public Builder setStats( + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.Builder + builderForValue) { + if (statsBuilder_ == null) { + stats_ = builderForValue.build(); + } else { + statsBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Detection statistics.
+     * 
+ * + * .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats stats = 3; + */ + public Builder mergeStats( + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats value) { + if (statsBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && stats_ != null + && stats_ + != com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats + .getDefaultInstance()) { + getStatsBuilder().mergeFrom(value); + } else { + stats_ = value; + } + } else { + statsBuilder_.mergeFrom(value); + } + if (stats_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Detection statistics.
+     * 
+ * + * .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats stats = 3; + */ + public Builder clearStats() { + bitField0_ = (bitField0_ & ~0x00000004); + stats_ = null; + if (statsBuilder_ != null) { + statsBuilder_.dispose(); + statsBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Detection statistics.
+     * 
+ * + * .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats stats = 3; + */ + public com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.Builder + getStatsBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getStatsFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Detection statistics.
+     * 
+ * + * .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats stats = 3; + */ + public com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.StatsOrBuilder + getStatsOrBuilder() { + if (statsBuilder_ != null) { + return statsBuilder_.getMessageOrBuilder(); + } else { + return stats_ == null + ? com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats + .getDefaultInstance() + : stats_; + } + } + /** + * + * + *
+     * Detection statistics.
+     * 
+ * + * .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats stats = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats, + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.Builder, + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.StatsOrBuilder> + getStatsFieldBuilder() { + if (statsBuilder_ == null) { + statsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats, + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.Builder, + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.StatsOrBuilder>( + getStats(), getParentForChildren(), isClean()); + stats_ = null; + } + return statsBuilder_; + } + + private java.util.List + trackInfo_ = java.util.Collections.emptyList(); + + private void ensureTrackInfoIsMutable() { + if (!((bitField0_ & 0x00000008) != 0)) { + trackInfo_ = + new java.util.ArrayList< + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.TrackInfo>( + trackInfo_); + bitField0_ |= 0x00000008; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.TrackInfo, + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.TrackInfo.Builder, + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.TrackInfoOrBuilder> + trackInfoBuilder_; + + /** + * + * + *
+     * Track related information. All the tracks that are live at this timestamp.
+     * It only exists if tracking is enabled.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.TrackInfo track_info = 4; + * + */ + public java.util.List + getTrackInfoList() { + if (trackInfoBuilder_ == null) { + return java.util.Collections.unmodifiableList(trackInfo_); + } else { + return trackInfoBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Track related information. All the tracks that are live at this timestamp.
+     * It only exists if tracking is enabled.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.TrackInfo track_info = 4; + * + */ + public int getTrackInfoCount() { + if (trackInfoBuilder_ == null) { + return trackInfo_.size(); + } else { + return trackInfoBuilder_.getCount(); + } + } + /** + * + * + *
+     * Track related information. All the tracks that are live at this timestamp.
+     * It only exists if tracking is enabled.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.TrackInfo track_info = 4; + * + */ + public com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.TrackInfo getTrackInfo( + int index) { + if (trackInfoBuilder_ == null) { + return trackInfo_.get(index); + } else { + return trackInfoBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Track related information. All the tracks that are live at this timestamp.
+     * It only exists if tracking is enabled.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.TrackInfo track_info = 4; + * + */ + public Builder setTrackInfo( + int index, com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.TrackInfo value) { + if (trackInfoBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTrackInfoIsMutable(); + trackInfo_.set(index, value); + onChanged(); + } else { + trackInfoBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Track related information. All the tracks that are live at this timestamp.
+     * It only exists if tracking is enabled.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.TrackInfo track_info = 4; + * + */ + public Builder setTrackInfo( + int index, + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.TrackInfo.Builder + builderForValue) { + if (trackInfoBuilder_ == null) { + ensureTrackInfoIsMutable(); + trackInfo_.set(index, builderForValue.build()); + onChanged(); + } else { + trackInfoBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Track related information. All the tracks that are live at this timestamp.
+     * It only exists if tracking is enabled.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.TrackInfo track_info = 4; + * + */ + public Builder addTrackInfo( + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.TrackInfo value) { + if (trackInfoBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTrackInfoIsMutable(); + trackInfo_.add(value); + onChanged(); + } else { + trackInfoBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Track related information. All the tracks that are live at this timestamp.
+     * It only exists if tracking is enabled.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.TrackInfo track_info = 4; + * + */ + public Builder addTrackInfo( + int index, com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.TrackInfo value) { + if (trackInfoBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTrackInfoIsMutable(); + trackInfo_.add(index, value); + onChanged(); + } else { + trackInfoBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Track related information. All the tracks that are live at this timestamp.
+     * It only exists if tracking is enabled.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.TrackInfo track_info = 4; + * + */ + public Builder addTrackInfo( + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.TrackInfo.Builder + builderForValue) { + if (trackInfoBuilder_ == null) { + ensureTrackInfoIsMutable(); + trackInfo_.add(builderForValue.build()); + onChanged(); + } else { + trackInfoBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Track related information. All the tracks that are live at this timestamp.
+     * It only exists if tracking is enabled.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.TrackInfo track_info = 4; + * + */ + public Builder addTrackInfo( + int index, + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.TrackInfo.Builder + builderForValue) { + if (trackInfoBuilder_ == null) { + ensureTrackInfoIsMutable(); + trackInfo_.add(index, builderForValue.build()); + onChanged(); + } else { + trackInfoBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Track related information. All the tracks that are live at this timestamp.
+     * It only exists if tracking is enabled.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.TrackInfo track_info = 4; + * + */ + public Builder addAllTrackInfo( + java.lang.Iterable< + ? extends com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.TrackInfo> + values) { + if (trackInfoBuilder_ == null) { + ensureTrackInfoIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, trackInfo_); + onChanged(); + } else { + trackInfoBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Track related information. All the tracks that are live at this timestamp.
+     * It only exists if tracking is enabled.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.TrackInfo track_info = 4; + * + */ + public Builder clearTrackInfo() { + if (trackInfoBuilder_ == null) { + trackInfo_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + } else { + trackInfoBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Track related information. All the tracks that are live at this timestamp.
+     * It only exists if tracking is enabled.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.TrackInfo track_info = 4; + * + */ + public Builder removeTrackInfo(int index) { + if (trackInfoBuilder_ == null) { + ensureTrackInfoIsMutable(); + trackInfo_.remove(index); + onChanged(); + } else { + trackInfoBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Track related information. All the tracks that are live at this timestamp.
+     * It only exists if tracking is enabled.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.TrackInfo track_info = 4; + * + */ + public com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.TrackInfo.Builder + getTrackInfoBuilder(int index) { + return getTrackInfoFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Track related information. All the tracks that are live at this timestamp.
+     * It only exists if tracking is enabled.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.TrackInfo track_info = 4; + * + */ + public com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.TrackInfoOrBuilder + getTrackInfoOrBuilder(int index) { + if (trackInfoBuilder_ == null) { + return trackInfo_.get(index); + } else { + return trackInfoBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Track related information. All the tracks that are live at this timestamp.
+     * It only exists if tracking is enabled.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.TrackInfo track_info = 4; + * + */ + public java.util.List< + ? extends + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.TrackInfoOrBuilder> + getTrackInfoOrBuilderList() { + if (trackInfoBuilder_ != null) { + return trackInfoBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(trackInfo_); + } + } + /** + * + * + *
+     * Track related information. All the tracks that are live at this timestamp.
+     * It only exists if tracking is enabled.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.TrackInfo track_info = 4; + * + */ + public com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.TrackInfo.Builder + addTrackInfoBuilder() { + return getTrackInfoFieldBuilder() + .addBuilder( + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.TrackInfo + .getDefaultInstance()); + } + /** + * + * + *
+     * Track related information. All the tracks that are live at this timestamp.
+     * It only exists if tracking is enabled.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.TrackInfo track_info = 4; + * + */ + public com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.TrackInfo.Builder + addTrackInfoBuilder(int index) { + return getTrackInfoFieldBuilder() + .addBuilder( + index, + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.TrackInfo + .getDefaultInstance()); + } + /** + * + * + *
+     * Track related information. All the tracks that are live at this timestamp.
+     * It only exists if tracking is enabled.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.TrackInfo track_info = 4; + * + */ + public java.util.List< + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.TrackInfo.Builder> + getTrackInfoBuilderList() { + return getTrackInfoFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.TrackInfo, + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.TrackInfo.Builder, + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.TrackInfoOrBuilder> + getTrackInfoFieldBuilder() { + if (trackInfoBuilder_ == null) { + trackInfoBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.TrackInfo, + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.TrackInfo.Builder, + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.TrackInfoOrBuilder>( + trackInfo_, ((bitField0_ & 0x00000008) != 0), getParentForChildren(), isClean()); + trackInfo_ = null; + } + return trackInfoBuilder_; + } + + private java.util.List< + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.DwellTimeInfo> + dwellTimeInfo_ = java.util.Collections.emptyList(); + + private void ensureDwellTimeInfoIsMutable() { + if (!((bitField0_ & 0x00000010) != 0)) { + dwellTimeInfo_ = + new java.util.ArrayList< + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.DwellTimeInfo>( + dwellTimeInfo_); + bitField0_ |= 0x00000010; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.DwellTimeInfo, + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.DwellTimeInfo.Builder, + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.DwellTimeInfoOrBuilder> + dwellTimeInfoBuilder_; + + /** + * + * + *
+     * Dwell time related information. All the tracks that are live in a given
+     * zone with a start and end dwell time timestamp
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.DwellTimeInfo dwell_time_info = 5; + * + */ + public java.util.List< + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.DwellTimeInfo> + getDwellTimeInfoList() { + if (dwellTimeInfoBuilder_ == null) { + return java.util.Collections.unmodifiableList(dwellTimeInfo_); + } else { + return dwellTimeInfoBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Dwell time related information. All the tracks that are live in a given
+     * zone with a start and end dwell time timestamp
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.DwellTimeInfo dwell_time_info = 5; + * + */ + public int getDwellTimeInfoCount() { + if (dwellTimeInfoBuilder_ == null) { + return dwellTimeInfo_.size(); + } else { + return dwellTimeInfoBuilder_.getCount(); + } + } + /** + * + * + *
+     * Dwell time related information. All the tracks that are live in a given
+     * zone with a start and end dwell time timestamp
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.DwellTimeInfo dwell_time_info = 5; + * + */ + public com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.DwellTimeInfo + getDwellTimeInfo(int index) { + if (dwellTimeInfoBuilder_ == null) { + return dwellTimeInfo_.get(index); + } else { + return dwellTimeInfoBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Dwell time related information. All the tracks that are live in a given
+     * zone with a start and end dwell time timestamp
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.DwellTimeInfo dwell_time_info = 5; + * + */ + public Builder setDwellTimeInfo( + int index, + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.DwellTimeInfo value) { + if (dwellTimeInfoBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDwellTimeInfoIsMutable(); + dwellTimeInfo_.set(index, value); + onChanged(); + } else { + dwellTimeInfoBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Dwell time related information. All the tracks that are live in a given
+     * zone with a start and end dwell time timestamp
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.DwellTimeInfo dwell_time_info = 5; + * + */ + public Builder setDwellTimeInfo( + int index, + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.DwellTimeInfo.Builder + builderForValue) { + if (dwellTimeInfoBuilder_ == null) { + ensureDwellTimeInfoIsMutable(); + dwellTimeInfo_.set(index, builderForValue.build()); + onChanged(); + } else { + dwellTimeInfoBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Dwell time related information. All the tracks that are live in a given
+     * zone with a start and end dwell time timestamp
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.DwellTimeInfo dwell_time_info = 5; + * + */ + public Builder addDwellTimeInfo( + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.DwellTimeInfo value) { + if (dwellTimeInfoBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDwellTimeInfoIsMutable(); + dwellTimeInfo_.add(value); + onChanged(); + } else { + dwellTimeInfoBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Dwell time related information. All the tracks that are live in a given
+     * zone with a start and end dwell time timestamp
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.DwellTimeInfo dwell_time_info = 5; + * + */ + public Builder addDwellTimeInfo( + int index, + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.DwellTimeInfo value) { + if (dwellTimeInfoBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDwellTimeInfoIsMutable(); + dwellTimeInfo_.add(index, value); + onChanged(); + } else { + dwellTimeInfoBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Dwell time related information. All the tracks that are live in a given
+     * zone with a start and end dwell time timestamp
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.DwellTimeInfo dwell_time_info = 5; + * + */ + public Builder addDwellTimeInfo( + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.DwellTimeInfo.Builder + builderForValue) { + if (dwellTimeInfoBuilder_ == null) { + ensureDwellTimeInfoIsMutable(); + dwellTimeInfo_.add(builderForValue.build()); + onChanged(); + } else { + dwellTimeInfoBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Dwell time related information. All the tracks that are live in a given
+     * zone with a start and end dwell time timestamp
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.DwellTimeInfo dwell_time_info = 5; + * + */ + public Builder addDwellTimeInfo( + int index, + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.DwellTimeInfo.Builder + builderForValue) { + if (dwellTimeInfoBuilder_ == null) { + ensureDwellTimeInfoIsMutable(); + dwellTimeInfo_.add(index, builderForValue.build()); + onChanged(); + } else { + dwellTimeInfoBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Dwell time related information. All the tracks that are live in a given
+     * zone with a start and end dwell time timestamp
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.DwellTimeInfo dwell_time_info = 5; + * + */ + public Builder addAllDwellTimeInfo( + java.lang.Iterable< + ? extends + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.DwellTimeInfo> + values) { + if (dwellTimeInfoBuilder_ == null) { + ensureDwellTimeInfoIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, dwellTimeInfo_); + onChanged(); + } else { + dwellTimeInfoBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Dwell time related information. All the tracks that are live in a given
+     * zone with a start and end dwell time timestamp
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.DwellTimeInfo dwell_time_info = 5; + * + */ + public Builder clearDwellTimeInfo() { + if (dwellTimeInfoBuilder_ == null) { + dwellTimeInfo_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + } else { + dwellTimeInfoBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Dwell time related information. All the tracks that are live in a given
+     * zone with a start and end dwell time timestamp
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.DwellTimeInfo dwell_time_info = 5; + * + */ + public Builder removeDwellTimeInfo(int index) { + if (dwellTimeInfoBuilder_ == null) { + ensureDwellTimeInfoIsMutable(); + dwellTimeInfo_.remove(index); + onChanged(); + } else { + dwellTimeInfoBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Dwell time related information. All the tracks that are live in a given
+     * zone with a start and end dwell time timestamp
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.DwellTimeInfo dwell_time_info = 5; + * + */ + public com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.DwellTimeInfo.Builder + getDwellTimeInfoBuilder(int index) { + return getDwellTimeInfoFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Dwell time related information. All the tracks that are live in a given
+     * zone with a start and end dwell time timestamp
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.DwellTimeInfo dwell_time_info = 5; + * + */ + public com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.DwellTimeInfoOrBuilder + getDwellTimeInfoOrBuilder(int index) { + if (dwellTimeInfoBuilder_ == null) { + return dwellTimeInfo_.get(index); + } else { + return dwellTimeInfoBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Dwell time related information. All the tracks that are live in a given
+     * zone with a start and end dwell time timestamp
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.DwellTimeInfo dwell_time_info = 5; + * + */ + public java.util.List< + ? extends + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult + .DwellTimeInfoOrBuilder> + getDwellTimeInfoOrBuilderList() { + if (dwellTimeInfoBuilder_ != null) { + return dwellTimeInfoBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(dwellTimeInfo_); + } + } + /** + * + * + *
+     * Dwell time related information. All the tracks that are live in a given
+     * zone with a start and end dwell time timestamp
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.DwellTimeInfo dwell_time_info = 5; + * + */ + public com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.DwellTimeInfo.Builder + addDwellTimeInfoBuilder() { + return getDwellTimeInfoFieldBuilder() + .addBuilder( + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.DwellTimeInfo + .getDefaultInstance()); + } + /** + * + * + *
+     * Dwell time related information. All the tracks that are live in a given
+     * zone with a start and end dwell time timestamp
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.DwellTimeInfo dwell_time_info = 5; + * + */ + public com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.DwellTimeInfo.Builder + addDwellTimeInfoBuilder(int index) { + return getDwellTimeInfoFieldBuilder() + .addBuilder( + index, + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.DwellTimeInfo + .getDefaultInstance()); + } + /** + * + * + *
+     * Dwell time related information. All the tracks that are live in a given
+     * zone with a start and end dwell time timestamp
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.DwellTimeInfo dwell_time_info = 5; + * + */ + public java.util.List< + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.DwellTimeInfo.Builder> + getDwellTimeInfoBuilderList() { + return getDwellTimeInfoFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.DwellTimeInfo, + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.DwellTimeInfo.Builder, + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.DwellTimeInfoOrBuilder> + getDwellTimeInfoFieldBuilder() { + if (dwellTimeInfoBuilder_ == null) { + dwellTimeInfoBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.DwellTimeInfo, + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.DwellTimeInfo + .Builder, + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult + .DwellTimeInfoOrBuilder>( + dwellTimeInfo_, + ((bitField0_ & 0x00000010) != 0), + getParentForChildren(), + isClean()); + dwellTimeInfo_ = null; + } + return dwellTimeInfoBuilder_; + } + + private long pts_; + /** + * + * + *
+     * The presentation timestamp of the frame.
+     * 
+ * + * optional int64 pts = 6; + * + * @return Whether the pts field is set. + */ + @java.lang.Override + public boolean hasPts() { + return ((bitField0_ & 0x00000020) != 0); + } + /** + * + * + *
+     * The presentation timestamp of the frame.
+     * 
+ * + * optional int64 pts = 6; + * + * @return The pts. + */ + @java.lang.Override + public long getPts() { + return pts_; + } + /** + * + * + *
+     * The presentation timestamp of the frame.
+     * 
+ * + * optional int64 pts = 6; + * + * @param value The pts to set. + * @return This builder for chaining. + */ + public Builder setPts(long value) { + + pts_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * The presentation timestamp of the frame.
+     * 
+ * + * optional int64 pts = 6; + * + * @return This builder for chaining. + */ + public Builder clearPts() { + bitField0_ = (bitField0_ & ~0x00000020); + pts_ = 0L; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.OccupancyCountingPredictionResult) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.OccupancyCountingPredictionResult) + private static final com.google.cloud.visionai.v1.OccupancyCountingPredictionResult + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.OccupancyCountingPredictionResult(); + } + + public static com.google.cloud.visionai.v1.OccupancyCountingPredictionResult + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public OccupancyCountingPredictionResult parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.OccupancyCountingPredictionResult + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/OccupancyCountingPredictionResultOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/OccupancyCountingPredictionResultOrBuilder.java new file mode 100644 index 000000000000..de9f328c8a8b --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/OccupancyCountingPredictionResultOrBuilder.java @@ -0,0 +1,331 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/annotations.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface OccupancyCountingPredictionResultOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.OccupancyCountingPredictionResult) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Current timestamp.
+   * 
+ * + * .google.protobuf.Timestamp current_time = 1; + * + * @return Whether the currentTime field is set. + */ + boolean hasCurrentTime(); + /** + * + * + *
+   * Current timestamp.
+   * 
+ * + * .google.protobuf.Timestamp current_time = 1; + * + * @return The currentTime. + */ + com.google.protobuf.Timestamp getCurrentTime(); + /** + * + * + *
+   * Current timestamp.
+   * 
+ * + * .google.protobuf.Timestamp current_time = 1; + */ + com.google.protobuf.TimestampOrBuilder getCurrentTimeOrBuilder(); + + /** + * + * + *
+   * A list of identified boxes.
+   * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.IdentifiedBox identified_boxes = 2; + * + */ + java.util.List + getIdentifiedBoxesList(); + /** + * + * + *
+   * A list of identified boxes.
+   * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.IdentifiedBox identified_boxes = 2; + * + */ + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.IdentifiedBox getIdentifiedBoxes( + int index); + /** + * + * + *
+   * A list of identified boxes.
+   * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.IdentifiedBox identified_boxes = 2; + * + */ + int getIdentifiedBoxesCount(); + /** + * + * + *
+   * A list of identified boxes.
+   * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.IdentifiedBox identified_boxes = 2; + * + */ + java.util.List< + ? extends + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.IdentifiedBoxOrBuilder> + getIdentifiedBoxesOrBuilderList(); + /** + * + * + *
+   * A list of identified boxes.
+   * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.IdentifiedBox identified_boxes = 2; + * + */ + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.IdentifiedBoxOrBuilder + getIdentifiedBoxesOrBuilder(int index); + + /** + * + * + *
+   * Detection statistics.
+   * 
+ * + * .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats stats = 3; + * + * @return Whether the stats field is set. + */ + boolean hasStats(); + /** + * + * + *
+   * Detection statistics.
+   * 
+ * + * .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats stats = 3; + * + * @return The stats. + */ + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats getStats(); + /** + * + * + *
+   * Detection statistics.
+   * 
+ * + * .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats stats = 3; + */ + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.StatsOrBuilder getStatsOrBuilder(); + + /** + * + * + *
+   * Track related information. All the tracks that are live at this timestamp.
+   * It only exists if tracking is enabled.
+   * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.TrackInfo track_info = 4; + * + */ + java.util.List + getTrackInfoList(); + /** + * + * + *
+   * Track related information. All the tracks that are live at this timestamp.
+   * It only exists if tracking is enabled.
+   * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.TrackInfo track_info = 4; + * + */ + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.TrackInfo getTrackInfo(int index); + /** + * + * + *
+   * Track related information. All the tracks that are live at this timestamp.
+   * It only exists if tracking is enabled.
+   * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.TrackInfo track_info = 4; + * + */ + int getTrackInfoCount(); + /** + * + * + *
+   * Track related information. All the tracks that are live at this timestamp.
+   * It only exists if tracking is enabled.
+   * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.TrackInfo track_info = 4; + * + */ + java.util.List< + ? extends + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.TrackInfoOrBuilder> + getTrackInfoOrBuilderList(); + /** + * + * + *
+   * Track related information. All the tracks that are live at this timestamp.
+   * It only exists if tracking is enabled.
+   * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.TrackInfo track_info = 4; + * + */ + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.TrackInfoOrBuilder + getTrackInfoOrBuilder(int index); + + /** + * + * + *
+   * Dwell time related information. All the tracks that are live in a given
+   * zone with a start and end dwell time timestamp
+   * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.DwellTimeInfo dwell_time_info = 5; + * + */ + java.util.List + getDwellTimeInfoList(); + /** + * + * + *
+   * Dwell time related information. All the tracks that are live in a given
+   * zone with a start and end dwell time timestamp
+   * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.DwellTimeInfo dwell_time_info = 5; + * + */ + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.DwellTimeInfo getDwellTimeInfo( + int index); + /** + * + * + *
+   * Dwell time related information. All the tracks that are live in a given
+   * zone with a start and end dwell time timestamp
+   * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.DwellTimeInfo dwell_time_info = 5; + * + */ + int getDwellTimeInfoCount(); + /** + * + * + *
+   * Dwell time related information. All the tracks that are live in a given
+   * zone with a start and end dwell time timestamp
+   * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.DwellTimeInfo dwell_time_info = 5; + * + */ + java.util.List< + ? extends + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.DwellTimeInfoOrBuilder> + getDwellTimeInfoOrBuilderList(); + /** + * + * + *
+   * Dwell time related information. All the tracks that are live in a given
+   * zone with a start and end dwell time timestamp
+   * 
+ * + * + * repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.DwellTimeInfo dwell_time_info = 5; + * + */ + com.google.cloud.visionai.v1.OccupancyCountingPredictionResult.DwellTimeInfoOrBuilder + getDwellTimeInfoOrBuilder(int index); + + /** + * + * + *
+   * The presentation timestamp of the frame.
+   * 
+ * + * optional int64 pts = 6; + * + * @return Whether the pts field is set. + */ + boolean hasPts(); + /** + * + * + *
+   * The presentation timestamp of the frame.
+   * 
+ * + * optional int64 pts = 6; + * + * @return The pts. + */ + long getPts(); +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/OperationMetadata.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/OperationMetadata.java new file mode 100644 index 000000000000..ea2a82fa7c4a --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/OperationMetadata.java @@ -0,0 +1,1847 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/common.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * Represents the metadata of the long-running operation.
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.OperationMetadata} + */ +public final class OperationMetadata extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.OperationMetadata) + OperationMetadataOrBuilder { + private static final long serialVersionUID = 0L; + // Use OperationMetadata.newBuilder() to construct. + private OperationMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private OperationMetadata() { + target_ = ""; + verb_ = ""; + statusMessage_ = ""; + apiVersion_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new OperationMetadata(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.CommonProto + .internal_static_google_cloud_visionai_v1_OperationMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.CommonProto + .internal_static_google_cloud_visionai_v1_OperationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.OperationMetadata.class, + com.google.cloud.visionai.v1.OperationMetadata.Builder.class); + } + + private int bitField0_; + public static final int CREATE_TIME_FIELD_NUMBER = 1; + private com.google.protobuf.Timestamp createTime_; + /** + * + * + *
+   * Output only. The time the operation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * Output only. The time the operation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + /** + * + * + *
+   * Output only. The time the operation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + + public static final int END_TIME_FIELD_NUMBER = 2; + private com.google.protobuf.Timestamp endTime_; + /** + * + * + *
+   * Output only. The time the operation finished running.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the endTime field is set. + */ + @java.lang.Override + public boolean hasEndTime() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+   * Output only. The time the operation finished running.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The endTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getEndTime() { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + /** + * + * + *
+   * Output only. The time the operation finished running.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + + public static final int TARGET_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object target_ = ""; + /** + * + * + *
+   * Output only. Server-defined resource path for the target of the operation.
+   * 
+ * + * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The target. + */ + @java.lang.Override + public java.lang.String getTarget() { + java.lang.Object ref = target_; + 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(); + target_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. Server-defined resource path for the target of the operation.
+   * 
+ * + * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for target. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTargetBytes() { + java.lang.Object ref = target_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + target_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VERB_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object verb_ = ""; + /** + * + * + *
+   * Output only. Name of the verb executed by the operation.
+   * 
+ * + * string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The verb. + */ + @java.lang.Override + public java.lang.String getVerb() { + java.lang.Object ref = verb_; + 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(); + verb_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. Name of the verb executed by the operation.
+   * 
+ * + * string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for verb. + */ + @java.lang.Override + public com.google.protobuf.ByteString getVerbBytes() { + java.lang.Object ref = verb_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + verb_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int STATUS_MESSAGE_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object statusMessage_ = ""; + /** + * + * + *
+   * Output only. Human-readable status of the operation, if any.
+   * 
+ * + * string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The statusMessage. + */ + @java.lang.Override + public java.lang.String getStatusMessage() { + java.lang.Object ref = statusMessage_; + 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(); + statusMessage_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. Human-readable status of the operation, if any.
+   * 
+ * + * string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for statusMessage. + */ + @java.lang.Override + public com.google.protobuf.ByteString getStatusMessageBytes() { + java.lang.Object ref = statusMessage_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + statusMessage_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int REQUESTED_CANCELLATION_FIELD_NUMBER = 6; + private boolean requestedCancellation_ = false; + /** + * + * + *
+   * Output only. Identifies whether the user has requested cancellation
+   * of the operation. Operations that have successfully been cancelled
+   * have [Operation.error][] value with a
+   * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to
+   * `Code.CANCELLED`.
+   * 
+ * + * bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The requestedCancellation. + */ + @java.lang.Override + public boolean getRequestedCancellation() { + return requestedCancellation_; + } + + public static final int API_VERSION_FIELD_NUMBER = 7; + + @SuppressWarnings("serial") + private volatile java.lang.Object apiVersion_ = ""; + /** + * + * + *
+   * Output only. API version used to start the operation.
+   * 
+ * + * string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The apiVersion. + */ + @java.lang.Override + public java.lang.String getApiVersion() { + java.lang.Object ref = apiVersion_; + 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(); + apiVersion_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. API version used to start the operation.
+   * 
+ * + * string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for apiVersion. + */ + @java.lang.Override + public com.google.protobuf.ByteString getApiVersionBytes() { + java.lang.Object ref = apiVersion_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + apiVersion_ = 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 (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getCreateTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(2, getEndTime()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(target_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, target_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(verb_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, verb_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(statusMessage_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, statusMessage_); + } + if (requestedCancellation_ != false) { + output.writeBool(6, requestedCancellation_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(apiVersion_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 7, apiVersion_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getCreateTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getEndTime()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(target_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, target_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(verb_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, verb_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(statusMessage_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, statusMessage_); + } + if (requestedCancellation_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(6, requestedCancellation_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(apiVersion_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, apiVersion_); + } + size += getUnknownFields().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.visionai.v1.OperationMetadata)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.OperationMetadata other = + (com.google.cloud.visionai.v1.OperationMetadata) obj; + + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime().equals(other.getCreateTime())) return false; + } + if (hasEndTime() != other.hasEndTime()) return false; + if (hasEndTime()) { + if (!getEndTime().equals(other.getEndTime())) return false; + } + if (!getTarget().equals(other.getTarget())) return false; + if (!getVerb().equals(other.getVerb())) return false; + if (!getStatusMessage().equals(other.getStatusMessage())) return false; + if (getRequestedCancellation() != other.getRequestedCancellation()) return false; + if (!getApiVersion().equals(other.getApiVersion())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasEndTime()) { + hash = (37 * hash) + END_TIME_FIELD_NUMBER; + hash = (53 * hash) + getEndTime().hashCode(); + } + hash = (37 * hash) + TARGET_FIELD_NUMBER; + hash = (53 * hash) + getTarget().hashCode(); + hash = (37 * hash) + VERB_FIELD_NUMBER; + hash = (53 * hash) + getVerb().hashCode(); + hash = (37 * hash) + STATUS_MESSAGE_FIELD_NUMBER; + hash = (53 * hash) + getStatusMessage().hashCode(); + hash = (37 * hash) + REQUESTED_CANCELLATION_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getRequestedCancellation()); + hash = (37 * hash) + API_VERSION_FIELD_NUMBER; + hash = (53 * hash) + getApiVersion().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.OperationMetadata parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.OperationMetadata 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.visionai.v1.OperationMetadata parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.OperationMetadata 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.visionai.v1.OperationMetadata parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.OperationMetadata parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.OperationMetadata parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.OperationMetadata 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.visionai.v1.OperationMetadata parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.OperationMetadata 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.visionai.v1.OperationMetadata parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.OperationMetadata 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.visionai.v1.OperationMetadata 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; + } + /** + * + * + *
+   * Represents the metadata of the long-running operation.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.OperationMetadata} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.OperationMetadata) + com.google.cloud.visionai.v1.OperationMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.CommonProto + .internal_static_google_cloud_visionai_v1_OperationMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.CommonProto + .internal_static_google_cloud_visionai_v1_OperationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.OperationMetadata.class, + com.google.cloud.visionai.v1.OperationMetadata.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.OperationMetadata.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getCreateTimeFieldBuilder(); + getEndTimeFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + endTime_ = null; + if (endTimeBuilder_ != null) { + endTimeBuilder_.dispose(); + endTimeBuilder_ = null; + } + target_ = ""; + verb_ = ""; + statusMessage_ = ""; + requestedCancellation_ = false; + apiVersion_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.CommonProto + .internal_static_google_cloud_visionai_v1_OperationMetadata_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.OperationMetadata getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.OperationMetadata.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.OperationMetadata build() { + com.google.cloud.visionai.v1.OperationMetadata result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.OperationMetadata buildPartial() { + com.google.cloud.visionai.v1.OperationMetadata result = + new com.google.cloud.visionai.v1.OperationMetadata(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.visionai.v1.OperationMetadata result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.endTime_ = endTimeBuilder_ == null ? endTime_ : endTimeBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.target_ = target_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.verb_ = verb_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.statusMessage_ = statusMessage_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.requestedCancellation_ = requestedCancellation_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.apiVersion_ = apiVersion_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.OperationMetadata) { + return mergeFrom((com.google.cloud.visionai.v1.OperationMetadata) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.OperationMetadata other) { + if (other == com.google.cloud.visionai.v1.OperationMetadata.getDefaultInstance()) return this; + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasEndTime()) { + mergeEndTime(other.getEndTime()); + } + if (!other.getTarget().isEmpty()) { + target_ = other.target_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getVerb().isEmpty()) { + verb_ = other.verb_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (!other.getStatusMessage().isEmpty()) { + statusMessage_ = other.statusMessage_; + bitField0_ |= 0x00000010; + onChanged(); + } + if (other.getRequestedCancellation() != false) { + setRequestedCancellation(other.getRequestedCancellation()); + } + if (!other.getApiVersion().isEmpty()) { + apiVersion_ = other.apiVersion_; + bitField0_ |= 0x00000040; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage(getEndTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + target_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + verb_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + statusMessage_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 48: + { + requestedCancellation_ = input.readBool(); + bitField0_ |= 0x00000020; + break; + } // case 48 + case 58: + { + apiVersion_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000040; + break; + } // case 58 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + createTimeBuilder_; + /** + * + * + *
+     * Output only. The time the operation was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * Output only. The time the operation was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. The time the operation was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + } else { + createTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The time the operation was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The time the operation was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && createTime_ != null + && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getCreateTimeBuilder().mergeFrom(value); + } else { + createTime_ = value; + } + } else { + createTimeBuilder_.mergeFrom(value); + } + if (createTime_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Output only. The time the operation was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearCreateTime() { + bitField0_ = (bitField0_ & ~0x00000001); + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The time the operation was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. The time the operation was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } + } + /** + * + * + *
+     * Output only. The time the operation was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), getParentForChildren(), isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private com.google.protobuf.Timestamp endTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + endTimeBuilder_; + /** + * + * + *
+     * Output only. The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the endTime field is set. + */ + public boolean hasEndTime() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * Output only. The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The endTime. + */ + public com.google.protobuf.Timestamp getEndTime() { + if (endTimeBuilder_ == null) { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } else { + return endTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setEndTime(com.google.protobuf.Timestamp value) { + if (endTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + endTime_ = value; + } else { + endTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setEndTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (endTimeBuilder_ == null) { + endTime_ = builderForValue.build(); + } else { + endTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeEndTime(com.google.protobuf.Timestamp value) { + if (endTimeBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && endTime_ != null + && endTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getEndTimeBuilder().mergeFrom(value); + } else { + endTime_ = value; + } + } else { + endTimeBuilder_.mergeFrom(value); + } + if (endTime_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Output only. The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearEndTime() { + bitField0_ = (bitField0_ & ~0x00000002); + endTime_ = null; + if (endTimeBuilder_ != null) { + endTimeBuilder_.dispose(); + endTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getEndTimeBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getEndTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { + if (endTimeBuilder_ != null) { + return endTimeBuilder_.getMessageOrBuilder(); + } else { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + } + /** + * + * + *
+     * Output only. The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getEndTimeFieldBuilder() { + if (endTimeBuilder_ == null) { + endTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getEndTime(), getParentForChildren(), isClean()); + endTime_ = null; + } + return endTimeBuilder_; + } + + private java.lang.Object target_ = ""; + /** + * + * + *
+     * Output only. Server-defined resource path for the target of the operation.
+     * 
+ * + * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The target. + */ + public java.lang.String getTarget() { + java.lang.Object ref = target_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + target_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. Server-defined resource path for the target of the operation.
+     * 
+ * + * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for target. + */ + public com.google.protobuf.ByteString getTargetBytes() { + java.lang.Object ref = target_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + target_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. Server-defined resource path for the target of the operation.
+     * 
+ * + * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The target to set. + * @return This builder for chaining. + */ + public Builder setTarget(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + target_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Server-defined resource path for the target of the operation.
+     * 
+ * + * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearTarget() { + target_ = getDefaultInstance().getTarget(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Server-defined resource path for the target of the operation.
+     * 
+ * + * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for target to set. + * @return This builder for chaining. + */ + public Builder setTargetBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + target_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object verb_ = ""; + /** + * + * + *
+     * Output only. Name of the verb executed by the operation.
+     * 
+ * + * string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The verb. + */ + public java.lang.String getVerb() { + java.lang.Object ref = verb_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + verb_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. Name of the verb executed by the operation.
+     * 
+ * + * string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for verb. + */ + public com.google.protobuf.ByteString getVerbBytes() { + java.lang.Object ref = verb_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + verb_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. Name of the verb executed by the operation.
+     * 
+ * + * string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The verb to set. + * @return This builder for chaining. + */ + public Builder setVerb(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + verb_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Name of the verb executed by the operation.
+     * 
+ * + * string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearVerb() { + verb_ = getDefaultInstance().getVerb(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Name of the verb executed by the operation.
+     * 
+ * + * string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for verb to set. + * @return This builder for chaining. + */ + public Builder setVerbBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + verb_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private java.lang.Object statusMessage_ = ""; + /** + * + * + *
+     * Output only. Human-readable status of the operation, if any.
+     * 
+ * + * string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The statusMessage. + */ + public java.lang.String getStatusMessage() { + java.lang.Object ref = statusMessage_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + statusMessage_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. Human-readable status of the operation, if any.
+     * 
+ * + * string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for statusMessage. + */ + public com.google.protobuf.ByteString getStatusMessageBytes() { + java.lang.Object ref = statusMessage_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + statusMessage_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. Human-readable status of the operation, if any.
+     * 
+ * + * string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The statusMessage to set. + * @return This builder for chaining. + */ + public Builder setStatusMessage(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + statusMessage_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Human-readable status of the operation, if any.
+     * 
+ * + * string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearStatusMessage() { + statusMessage_ = getDefaultInstance().getStatusMessage(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Human-readable status of the operation, if any.
+     * 
+ * + * string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for statusMessage to set. + * @return This builder for chaining. + */ + public Builder setStatusMessageBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + statusMessage_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + private boolean requestedCancellation_; + /** + * + * + *
+     * Output only. Identifies whether the user has requested cancellation
+     * of the operation. Operations that have successfully been cancelled
+     * have [Operation.error][] value with a
+     * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to
+     * `Code.CANCELLED`.
+     * 
+ * + * bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The requestedCancellation. + */ + @java.lang.Override + public boolean getRequestedCancellation() { + return requestedCancellation_; + } + /** + * + * + *
+     * Output only. Identifies whether the user has requested cancellation
+     * of the operation. Operations that have successfully been cancelled
+     * have [Operation.error][] value with a
+     * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to
+     * `Code.CANCELLED`.
+     * 
+ * + * bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The requestedCancellation to set. + * @return This builder for chaining. + */ + public Builder setRequestedCancellation(boolean value) { + + requestedCancellation_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Identifies whether the user has requested cancellation
+     * of the operation. Operations that have successfully been cancelled
+     * have [Operation.error][] value with a
+     * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to
+     * `Code.CANCELLED`.
+     * 
+ * + * bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearRequestedCancellation() { + bitField0_ = (bitField0_ & ~0x00000020); + requestedCancellation_ = false; + onChanged(); + return this; + } + + private java.lang.Object apiVersion_ = ""; + /** + * + * + *
+     * Output only. API version used to start the operation.
+     * 
+ * + * string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The apiVersion. + */ + public java.lang.String getApiVersion() { + java.lang.Object ref = apiVersion_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + apiVersion_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. API version used to start the operation.
+     * 
+ * + * string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for apiVersion. + */ + public com.google.protobuf.ByteString getApiVersionBytes() { + java.lang.Object ref = apiVersion_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + apiVersion_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. API version used to start the operation.
+     * 
+ * + * string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The apiVersion to set. + * @return This builder for chaining. + */ + public Builder setApiVersion(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + apiVersion_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. API version used to start the operation.
+     * 
+ * + * string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearApiVersion() { + apiVersion_ = getDefaultInstance().getApiVersion(); + bitField0_ = (bitField0_ & ~0x00000040); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. API version used to start the operation.
+     * 
+ * + * string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for apiVersion to set. + * @return This builder for chaining. + */ + public Builder setApiVersionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + apiVersion_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.OperationMetadata) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.OperationMetadata) + private static final com.google.cloud.visionai.v1.OperationMetadata DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.OperationMetadata(); + } + + public static com.google.cloud.visionai.v1.OperationMetadata getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public OperationMetadata parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.OperationMetadata getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/OperationMetadataOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/OperationMetadataOrBuilder.java new file mode 100644 index 000000000000..620a52e35b7a --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/OperationMetadataOrBuilder.java @@ -0,0 +1,219 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/common.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface OperationMetadataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.OperationMetadata) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. The time the operation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + /** + * + * + *
+   * Output only. The time the operation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + * + * + *
+   * Output only. The time the operation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. The time the operation finished running.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the endTime field is set. + */ + boolean hasEndTime(); + /** + * + * + *
+   * Output only. The time the operation finished running.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The endTime. + */ + com.google.protobuf.Timestamp getEndTime(); + /** + * + * + *
+   * Output only. The time the operation finished running.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder(); + + /** + * + * + *
+   * Output only. Server-defined resource path for the target of the operation.
+   * 
+ * + * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The target. + */ + java.lang.String getTarget(); + /** + * + * + *
+   * Output only. Server-defined resource path for the target of the operation.
+   * 
+ * + * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for target. + */ + com.google.protobuf.ByteString getTargetBytes(); + + /** + * + * + *
+   * Output only. Name of the verb executed by the operation.
+   * 
+ * + * string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The verb. + */ + java.lang.String getVerb(); + /** + * + * + *
+   * Output only. Name of the verb executed by the operation.
+   * 
+ * + * string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for verb. + */ + com.google.protobuf.ByteString getVerbBytes(); + + /** + * + * + *
+   * Output only. Human-readable status of the operation, if any.
+   * 
+ * + * string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The statusMessage. + */ + java.lang.String getStatusMessage(); + /** + * + * + *
+   * Output only. Human-readable status of the operation, if any.
+   * 
+ * + * string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for statusMessage. + */ + com.google.protobuf.ByteString getStatusMessageBytes(); + + /** + * + * + *
+   * Output only. Identifies whether the user has requested cancellation
+   * of the operation. Operations that have successfully been cancelled
+   * have [Operation.error][] value with a
+   * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to
+   * `Code.CANCELLED`.
+   * 
+ * + * bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The requestedCancellation. + */ + boolean getRequestedCancellation(); + + /** + * + * + *
+   * Output only. API version used to start the operation.
+   * 
+ * + * string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The apiVersion. + */ + java.lang.String getApiVersion(); + /** + * + * + *
+   * Output only. API version used to start the operation.
+   * 
+ * + * string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for apiVersion. + */ + com.google.protobuf.ByteString getApiVersionBytes(); +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/Operator.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/Operator.java new file mode 100644 index 000000000000..1fa0fe0997b1 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/Operator.java @@ -0,0 +1,1995 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/lva_resources.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * Message describing the Operator object.
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.Operator} + */ +public final class Operator extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.Operator) + OperatorOrBuilder { + private static final long serialVersionUID = 0L; + // Use Operator.newBuilder() to construct. + private Operator(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Operator() { + name_ = ""; + dockerImage_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Operator(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.LvaResourcesProto + .internal_static_google_cloud_visionai_v1_Operator_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 4: + return internalGetLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.LvaResourcesProto + .internal_static_google_cloud_visionai_v1_Operator_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.Operator.class, + com.google.cloud.visionai.v1.Operator.Builder.class); + } + + private int bitField0_; + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Name of the resource.
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + 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(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Name of the resource.
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CREATE_TIME_FIELD_NUMBER = 2; + private com.google.protobuf.Timestamp createTime_; + /** + * + * + *
+   * Output only. The create timestamp.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * Output only. The create timestamp.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + /** + * + * + *
+   * Output only. The create timestamp.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + + public static final int UPDATE_TIME_FIELD_NUMBER = 3; + private com.google.protobuf.Timestamp updateTime_; + /** + * + * + *
+   * Output only. The update timestamp.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + @java.lang.Override + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+   * Output only. The update timestamp.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getUpdateTime() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + /** + * + * + *
+   * Output only. The update timestamp.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + + public static final int LABELS_FIELD_NUMBER = 4; + + private static final class LabelsDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.cloud.visionai.v1.LvaResourcesProto + .internal_static_google_cloud_visionai_v1_Operator_LabelsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + + @SuppressWarnings("serial") + private com.google.protobuf.MapField labels_; + + private com.google.protobuf.MapField internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + /** + * + * + *
+   * Labels as key value pairs.
+   * 
+ * + * map<string, string> labels = 4; + */ + @java.lang.Override + public boolean containsLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetLabels().getMap().containsKey(key); + } + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + /** + * + * + *
+   * Labels as key value pairs.
+   * 
+ * + * map<string, string> labels = 4; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + * + * + *
+   * Labels as key value pairs.
+   * 
+ * + * map<string, string> labels = 4; + */ + @java.lang.Override + public /* nullable */ java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+   * Labels as key value pairs.
+   * 
+ * + * map<string, string> labels = 4; + */ + @java.lang.Override + public java.lang.String getLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int OPERATOR_DEFINITION_FIELD_NUMBER = 5; + private com.google.cloud.visionai.v1.OperatorDefinition operatorDefinition_; + /** + * + * + *
+   * The definition of the operator.
+   * 
+ * + * .google.cloud.visionai.v1.OperatorDefinition operator_definition = 5; + * + * @return Whether the operatorDefinition field is set. + */ + @java.lang.Override + public boolean hasOperatorDefinition() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+   * The definition of the operator.
+   * 
+ * + * .google.cloud.visionai.v1.OperatorDefinition operator_definition = 5; + * + * @return The operatorDefinition. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.OperatorDefinition getOperatorDefinition() { + return operatorDefinition_ == null + ? com.google.cloud.visionai.v1.OperatorDefinition.getDefaultInstance() + : operatorDefinition_; + } + /** + * + * + *
+   * The definition of the operator.
+   * 
+ * + * .google.cloud.visionai.v1.OperatorDefinition operator_definition = 5; + */ + @java.lang.Override + public com.google.cloud.visionai.v1.OperatorDefinitionOrBuilder getOperatorDefinitionOrBuilder() { + return operatorDefinition_ == null + ? com.google.cloud.visionai.v1.OperatorDefinition.getDefaultInstance() + : operatorDefinition_; + } + + public static final int DOCKER_IMAGE_FIELD_NUMBER = 6; + + @SuppressWarnings("serial") + private volatile java.lang.Object dockerImage_ = ""; + /** + * + * + *
+   * The link to the docker image of the operator.
+   * 
+ * + * string docker_image = 6; + * + * @return The dockerImage. + */ + @java.lang.Override + public java.lang.String getDockerImage() { + java.lang.Object ref = dockerImage_; + 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(); + dockerImage_ = s; + return s; + } + } + /** + * + * + *
+   * The link to the docker image of the operator.
+   * 
+ * + * string docker_image = 6; + * + * @return The bytes for dockerImage. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDockerImageBytes() { + java.lang.Object ref = dockerImage_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + dockerImage_ = 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getCreateTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(3, getUpdateTime()); + } + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 4); + if (((bitField0_ & 0x00000004) != 0)) { + output.writeMessage(5, getOperatorDefinition()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(dockerImage_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, dockerImage_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getCreateTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getUpdateTime()); + } + for (java.util.Map.Entry entry : + internalGetLabels().getMap().entrySet()) { + com.google.protobuf.MapEntry labels__ = + LabelsDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, labels__); + } + if (((bitField0_ & 0x00000004) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getOperatorDefinition()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(dockerImage_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, dockerImage_); + } + size += getUnknownFields().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.visionai.v1.Operator)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.Operator other = (com.google.cloud.visionai.v1.Operator) obj; + + if (!getName().equals(other.getName())) return false; + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime().equals(other.getCreateTime())) return false; + } + if (hasUpdateTime() != other.hasUpdateTime()) return false; + if (hasUpdateTime()) { + if (!getUpdateTime().equals(other.getUpdateTime())) return false; + } + if (!internalGetLabels().equals(other.internalGetLabels())) return false; + if (hasOperatorDefinition() != other.hasOperatorDefinition()) return false; + if (hasOperatorDefinition()) { + if (!getOperatorDefinition().equals(other.getOperatorDefinition())) return false; + } + if (!getDockerImage().equals(other.getDockerImage())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasUpdateTime()) { + hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getUpdateTime().hashCode(); + } + if (!internalGetLabels().getMap().isEmpty()) { + hash = (37 * hash) + LABELS_FIELD_NUMBER; + hash = (53 * hash) + internalGetLabels().hashCode(); + } + if (hasOperatorDefinition()) { + hash = (37 * hash) + OPERATOR_DEFINITION_FIELD_NUMBER; + hash = (53 * hash) + getOperatorDefinition().hashCode(); + } + hash = (37 * hash) + DOCKER_IMAGE_FIELD_NUMBER; + hash = (53 * hash) + getDockerImage().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.Operator parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.Operator 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.visionai.v1.Operator parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.Operator 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.visionai.v1.Operator parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.Operator parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.Operator parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.Operator 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.visionai.v1.Operator parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.Operator 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.visionai.v1.Operator parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.Operator 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.visionai.v1.Operator 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; + } + /** + * + * + *
+   * Message describing the Operator object.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.Operator} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.Operator) + com.google.cloud.visionai.v1.OperatorOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.LvaResourcesProto + .internal_static_google_cloud_visionai_v1_Operator_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 4: + return internalGetLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( + int number) { + switch (number) { + case 4: + return internalGetMutableLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.LvaResourcesProto + .internal_static_google_cloud_visionai_v1_Operator_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.Operator.class, + com.google.cloud.visionai.v1.Operator.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.Operator.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getCreateTimeFieldBuilder(); + getUpdateTimeFieldBuilder(); + getOperatorDefinitionFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + internalGetMutableLabels().clear(); + operatorDefinition_ = null; + if (operatorDefinitionBuilder_ != null) { + operatorDefinitionBuilder_.dispose(); + operatorDefinitionBuilder_ = null; + } + dockerImage_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.LvaResourcesProto + .internal_static_google_cloud_visionai_v1_Operator_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.Operator getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.Operator.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.Operator build() { + com.google.cloud.visionai.v1.Operator result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.Operator buildPartial() { + com.google.cloud.visionai.v1.Operator result = + new com.google.cloud.visionai.v1.Operator(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.visionai.v1.Operator result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.updateTime_ = updateTimeBuilder_ == null ? updateTime_ : updateTimeBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.labels_ = internalGetLabels(); + result.labels_.makeImmutable(); + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.operatorDefinition_ = + operatorDefinitionBuilder_ == null + ? operatorDefinition_ + : operatorDefinitionBuilder_.build(); + to_bitField0_ |= 0x00000004; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.dockerImage_ = dockerImage_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.Operator) { + return mergeFrom((com.google.cloud.visionai.v1.Operator) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.Operator other) { + if (other == com.google.cloud.visionai.v1.Operator.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + internalGetMutableLabels().mergeFrom(other.internalGetLabels()); + bitField0_ |= 0x00000008; + if (other.hasOperatorDefinition()) { + mergeOperatorDefinition(other.getOperatorDefinition()); + } + if (!other.getDockerImage().isEmpty()) { + dockerImage_ = other.dockerImage_; + bitField0_ |= 0x00000020; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage(getUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + com.google.protobuf.MapEntry labels__ = + input.readMessage( + LabelsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableLabels() + .getMutableMap() + .put(labels__.getKey(), labels__.getValue()); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + input.readMessage( + getOperatorDefinitionFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 50: + { + dockerImage_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case 50 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Name of the resource.
+     * 
+ * + * string name = 1; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Name of the resource.
+     * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Name of the resource.
+     * 
+ * + * string name = 1; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Name of the resource.
+     * 
+ * + * string name = 1; + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Name of the resource.
+     * 
+ * + * string name = 1; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + createTimeBuilder_; + /** + * + * + *
+     * Output only. The create timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * Output only. The create timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. The create timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + } else { + createTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The create timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The create timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && createTime_ != null + && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getCreateTimeBuilder().mergeFrom(value); + } else { + createTime_ = value; + } + } else { + createTimeBuilder_.mergeFrom(value); + } + if (createTime_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Output only. The create timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearCreateTime() { + bitField0_ = (bitField0_ & ~0x00000002); + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The create timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. The create timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } + } + /** + * + * + *
+     * Output only. The create timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), getParentForChildren(), isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private com.google.protobuf.Timestamp updateTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + updateTimeBuilder_; + /** + * + * + *
+     * Output only. The update timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+     * Output only. The update timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + public com.google.protobuf.Timestamp getUpdateTime() { + if (updateTimeBuilder_ == null) { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } else { + return updateTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. The update timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateTime_ = value; + } else { + updateTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The update timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (updateTimeBuilder_ == null) { + updateTime_ = builderForValue.build(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The update timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && updateTime_ != null + && updateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getUpdateTimeBuilder().mergeFrom(value); + } else { + updateTime_ = value; + } + } else { + updateTimeBuilder_.mergeFrom(value); + } + if (updateTime_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Output only. The update timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearUpdateTime() { + bitField0_ = (bitField0_ & ~0x00000004); + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The update timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getUpdateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. The update timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + if (updateTimeBuilder_ != null) { + return updateTimeBuilder_.getMessageOrBuilder(); + } else { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } + } + /** + * + * + *
+     * Output only. The update timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + 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_; + } + + private com.google.protobuf.MapField labels_; + + private com.google.protobuf.MapField internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + + private com.google.protobuf.MapField + internalGetMutableLabels() { + if (labels_ == null) { + labels_ = com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry); + } + if (!labels_.isMutable()) { + labels_ = labels_.copy(); + } + bitField0_ |= 0x00000008; + onChanged(); + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + /** + * + * + *
+     * Labels as key value pairs.
+     * 
+ * + * map<string, string> labels = 4; + */ + @java.lang.Override + public boolean containsLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetLabels().getMap().containsKey(key); + } + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + /** + * + * + *
+     * Labels as key value pairs.
+     * 
+ * + * map<string, string> labels = 4; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + * + * + *
+     * Labels as key value pairs.
+     * 
+ * + * map<string, string> labels = 4; + */ + @java.lang.Override + public /* nullable */ java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+     * Labels as key value pairs.
+     * 
+ * + * map<string, string> labels = 4; + */ + @java.lang.Override + public java.lang.String getLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearLabels() { + bitField0_ = (bitField0_ & ~0x00000008); + internalGetMutableLabels().getMutableMap().clear(); + return this; + } + /** + * + * + *
+     * Labels as key value pairs.
+     * 
+ * + * map<string, string> labels = 4; + */ + public Builder removeLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + internalGetMutableLabels().getMutableMap().remove(key); + return this; + } + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableLabels() { + bitField0_ |= 0x00000008; + return internalGetMutableLabels().getMutableMap(); + } + /** + * + * + *
+     * Labels as key value pairs.
+     * 
+ * + * map<string, string> labels = 4; + */ + public Builder putLabels(java.lang.String key, java.lang.String value) { + if (key == null) { + throw new NullPointerException("map key"); + } + if (value == null) { + throw new NullPointerException("map value"); + } + internalGetMutableLabels().getMutableMap().put(key, value); + bitField0_ |= 0x00000008; + return this; + } + /** + * + * + *
+     * Labels as key value pairs.
+     * 
+ * + * map<string, string> labels = 4; + */ + public Builder putAllLabels(java.util.Map values) { + internalGetMutableLabels().getMutableMap().putAll(values); + bitField0_ |= 0x00000008; + return this; + } + + private com.google.cloud.visionai.v1.OperatorDefinition operatorDefinition_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.OperatorDefinition, + com.google.cloud.visionai.v1.OperatorDefinition.Builder, + com.google.cloud.visionai.v1.OperatorDefinitionOrBuilder> + operatorDefinitionBuilder_; + /** + * + * + *
+     * The definition of the operator.
+     * 
+ * + * .google.cloud.visionai.v1.OperatorDefinition operator_definition = 5; + * + * @return Whether the operatorDefinition field is set. + */ + public boolean hasOperatorDefinition() { + return ((bitField0_ & 0x00000010) != 0); + } + /** + * + * + *
+     * The definition of the operator.
+     * 
+ * + * .google.cloud.visionai.v1.OperatorDefinition operator_definition = 5; + * + * @return The operatorDefinition. + */ + public com.google.cloud.visionai.v1.OperatorDefinition getOperatorDefinition() { + if (operatorDefinitionBuilder_ == null) { + return operatorDefinition_ == null + ? com.google.cloud.visionai.v1.OperatorDefinition.getDefaultInstance() + : operatorDefinition_; + } else { + return operatorDefinitionBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The definition of the operator.
+     * 
+ * + * .google.cloud.visionai.v1.OperatorDefinition operator_definition = 5; + */ + public Builder setOperatorDefinition(com.google.cloud.visionai.v1.OperatorDefinition value) { + if (operatorDefinitionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + operatorDefinition_ = value; + } else { + operatorDefinitionBuilder_.setMessage(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * The definition of the operator.
+     * 
+ * + * .google.cloud.visionai.v1.OperatorDefinition operator_definition = 5; + */ + public Builder setOperatorDefinition( + com.google.cloud.visionai.v1.OperatorDefinition.Builder builderForValue) { + if (operatorDefinitionBuilder_ == null) { + operatorDefinition_ = builderForValue.build(); + } else { + operatorDefinitionBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * The definition of the operator.
+     * 
+ * + * .google.cloud.visionai.v1.OperatorDefinition operator_definition = 5; + */ + public Builder mergeOperatorDefinition(com.google.cloud.visionai.v1.OperatorDefinition value) { + if (operatorDefinitionBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0) + && operatorDefinition_ != null + && operatorDefinition_ + != com.google.cloud.visionai.v1.OperatorDefinition.getDefaultInstance()) { + getOperatorDefinitionBuilder().mergeFrom(value); + } else { + operatorDefinition_ = value; + } + } else { + operatorDefinitionBuilder_.mergeFrom(value); + } + if (operatorDefinition_ != null) { + bitField0_ |= 0x00000010; + onChanged(); + } + return this; + } + /** + * + * + *
+     * The definition of the operator.
+     * 
+ * + * .google.cloud.visionai.v1.OperatorDefinition operator_definition = 5; + */ + public Builder clearOperatorDefinition() { + bitField0_ = (bitField0_ & ~0x00000010); + operatorDefinition_ = null; + if (operatorDefinitionBuilder_ != null) { + operatorDefinitionBuilder_.dispose(); + operatorDefinitionBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * The definition of the operator.
+     * 
+ * + * .google.cloud.visionai.v1.OperatorDefinition operator_definition = 5; + */ + public com.google.cloud.visionai.v1.OperatorDefinition.Builder getOperatorDefinitionBuilder() { + bitField0_ |= 0x00000010; + onChanged(); + return getOperatorDefinitionFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The definition of the operator.
+     * 
+ * + * .google.cloud.visionai.v1.OperatorDefinition operator_definition = 5; + */ + public com.google.cloud.visionai.v1.OperatorDefinitionOrBuilder + getOperatorDefinitionOrBuilder() { + if (operatorDefinitionBuilder_ != null) { + return operatorDefinitionBuilder_.getMessageOrBuilder(); + } else { + return operatorDefinition_ == null + ? com.google.cloud.visionai.v1.OperatorDefinition.getDefaultInstance() + : operatorDefinition_; + } + } + /** + * + * + *
+     * The definition of the operator.
+     * 
+ * + * .google.cloud.visionai.v1.OperatorDefinition operator_definition = 5; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.OperatorDefinition, + com.google.cloud.visionai.v1.OperatorDefinition.Builder, + com.google.cloud.visionai.v1.OperatorDefinitionOrBuilder> + getOperatorDefinitionFieldBuilder() { + if (operatorDefinitionBuilder_ == null) { + operatorDefinitionBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.OperatorDefinition, + com.google.cloud.visionai.v1.OperatorDefinition.Builder, + com.google.cloud.visionai.v1.OperatorDefinitionOrBuilder>( + getOperatorDefinition(), getParentForChildren(), isClean()); + operatorDefinition_ = null; + } + return operatorDefinitionBuilder_; + } + + private java.lang.Object dockerImage_ = ""; + /** + * + * + *
+     * The link to the docker image of the operator.
+     * 
+ * + * string docker_image = 6; + * + * @return The dockerImage. + */ + public java.lang.String getDockerImage() { + java.lang.Object ref = dockerImage_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + dockerImage_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The link to the docker image of the operator.
+     * 
+ * + * string docker_image = 6; + * + * @return The bytes for dockerImage. + */ + public com.google.protobuf.ByteString getDockerImageBytes() { + java.lang.Object ref = dockerImage_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + dockerImage_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The link to the docker image of the operator.
+     * 
+ * + * string docker_image = 6; + * + * @param value The dockerImage to set. + * @return This builder for chaining. + */ + public Builder setDockerImage(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + dockerImage_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * The link to the docker image of the operator.
+     * 
+ * + * string docker_image = 6; + * + * @return This builder for chaining. + */ + public Builder clearDockerImage() { + dockerImage_ = getDefaultInstance().getDockerImage(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + return this; + } + /** + * + * + *
+     * The link to the docker image of the operator.
+     * 
+ * + * string docker_image = 6; + * + * @param value The bytes for dockerImage to set. + * @return This builder for chaining. + */ + public Builder setDockerImageBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + dockerImage_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.Operator) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.Operator) + private static final com.google.cloud.visionai.v1.Operator DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.Operator(); + } + + public static com.google.cloud.visionai.v1.Operator getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Operator parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.Operator getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/OperatorDefinition.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/OperatorDefinition.java new file mode 100644 index 000000000000..cc0fca4413d4 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/OperatorDefinition.java @@ -0,0 +1,5120 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/lva.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * Defines the interface of an Operator.
+ *
+ * Arguments to an operator are input/output streams that are getting
+ * processesed/returned while attributes are fixed configuration parameters.
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.OperatorDefinition} + */ +public final class OperatorDefinition extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.OperatorDefinition) + OperatorDefinitionOrBuilder { + private static final long serialVersionUID = 0L; + // Use OperatorDefinition.newBuilder() to construct. + private OperatorDefinition(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private OperatorDefinition() { + operator_ = ""; + inputArgs_ = java.util.Collections.emptyList(); + outputArgs_ = java.util.Collections.emptyList(); + attributes_ = java.util.Collections.emptyList(); + shortDescription_ = ""; + description_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new OperatorDefinition(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.LvaProto + .internal_static_google_cloud_visionai_v1_OperatorDefinition_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.LvaProto + .internal_static_google_cloud_visionai_v1_OperatorDefinition_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.OperatorDefinition.class, + com.google.cloud.visionai.v1.OperatorDefinition.Builder.class); + } + + public interface ArgumentDefinitionOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.OperatorDefinition.ArgumentDefinition) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * The name of the argument.
+     *
+     * Tentatively [a-z]([_a-z0-9]*[a-z0-9])?, e.g., video, audio,
+     * high_fps_frame.
+     * 
+ * + * string argument = 1; + * + * @return The argument. + */ + java.lang.String getArgument(); + /** + * + * + *
+     * The name of the argument.
+     *
+     * Tentatively [a-z]([_a-z0-9]*[a-z0-9])?, e.g., video, audio,
+     * high_fps_frame.
+     * 
+ * + * string argument = 1; + * + * @return The bytes for argument. + */ + com.google.protobuf.ByteString getArgumentBytes(); + + /** + * + * + *
+     * The data type of the argument.
+     *
+     * This should match the textual representation of a stream/Packet type.
+     * 
+ * + * string type = 2; + * + * @return The type. + */ + java.lang.String getType(); + /** + * + * + *
+     * The data type of the argument.
+     *
+     * This should match the textual representation of a stream/Packet type.
+     * 
+ * + * string type = 2; + * + * @return The bytes for type. + */ + com.google.protobuf.ByteString getTypeBytes(); + } + /** + * + * + *
+   * Defines an argument to an operator.
+   *
+   * Used for both inputs and outputs.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.OperatorDefinition.ArgumentDefinition} + */ + public static final class ArgumentDefinition extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.OperatorDefinition.ArgumentDefinition) + ArgumentDefinitionOrBuilder { + private static final long serialVersionUID = 0L; + // Use ArgumentDefinition.newBuilder() to construct. + private ArgumentDefinition(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ArgumentDefinition() { + argument_ = ""; + type_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ArgumentDefinition(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.LvaProto + .internal_static_google_cloud_visionai_v1_OperatorDefinition_ArgumentDefinition_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.LvaProto + .internal_static_google_cloud_visionai_v1_OperatorDefinition_ArgumentDefinition_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.OperatorDefinition.ArgumentDefinition.class, + com.google.cloud.visionai.v1.OperatorDefinition.ArgumentDefinition.Builder.class); + } + + public static final int ARGUMENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object argument_ = ""; + /** + * + * + *
+     * The name of the argument.
+     *
+     * Tentatively [a-z]([_a-z0-9]*[a-z0-9])?, e.g., video, audio,
+     * high_fps_frame.
+     * 
+ * + * string argument = 1; + * + * @return The argument. + */ + @java.lang.Override + public java.lang.String getArgument() { + java.lang.Object ref = argument_; + 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(); + argument_ = s; + return s; + } + } + /** + * + * + *
+     * The name of the argument.
+     *
+     * Tentatively [a-z]([_a-z0-9]*[a-z0-9])?, e.g., video, audio,
+     * high_fps_frame.
+     * 
+ * + * string argument = 1; + * + * @return The bytes for argument. + */ + @java.lang.Override + public com.google.protobuf.ByteString getArgumentBytes() { + java.lang.Object ref = argument_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + argument_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TYPE_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object type_ = ""; + /** + * + * + *
+     * The data type of the argument.
+     *
+     * This should match the textual representation of a stream/Packet type.
+     * 
+ * + * string type = 2; + * + * @return The type. + */ + @java.lang.Override + public java.lang.String getType() { + java.lang.Object ref = type_; + 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(); + type_ = s; + return s; + } + } + /** + * + * + *
+     * The data type of the argument.
+     *
+     * This should match the textual representation of a stream/Packet type.
+     * 
+ * + * string type = 2; + * + * @return The bytes for type. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTypeBytes() { + java.lang.Object ref = type_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + type_ = 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(argument_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, argument_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(type_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, type_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(argument_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, argument_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(type_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, type_); + } + size += getUnknownFields().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.visionai.v1.OperatorDefinition.ArgumentDefinition)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.OperatorDefinition.ArgumentDefinition other = + (com.google.cloud.visionai.v1.OperatorDefinition.ArgumentDefinition) obj; + + if (!getArgument().equals(other.getArgument())) return false; + if (!getType().equals(other.getType())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ARGUMENT_FIELD_NUMBER; + hash = (53 * hash) + getArgument().hashCode(); + hash = (37 * hash) + TYPE_FIELD_NUMBER; + hash = (53 * hash) + getType().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.OperatorDefinition.ArgumentDefinition parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.OperatorDefinition.ArgumentDefinition 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.visionai.v1.OperatorDefinition.ArgumentDefinition parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.OperatorDefinition.ArgumentDefinition 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.visionai.v1.OperatorDefinition.ArgumentDefinition parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.OperatorDefinition.ArgumentDefinition parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.OperatorDefinition.ArgumentDefinition parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.OperatorDefinition.ArgumentDefinition 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.visionai.v1.OperatorDefinition.ArgumentDefinition + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.OperatorDefinition.ArgumentDefinition + 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.visionai.v1.OperatorDefinition.ArgumentDefinition parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.OperatorDefinition.ArgumentDefinition 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.visionai.v1.OperatorDefinition.ArgumentDefinition 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; + } + /** + * + * + *
+     * Defines an argument to an operator.
+     *
+     * Used for both inputs and outputs.
+     * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.OperatorDefinition.ArgumentDefinition} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.OperatorDefinition.ArgumentDefinition) + com.google.cloud.visionai.v1.OperatorDefinition.ArgumentDefinitionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.LvaProto + .internal_static_google_cloud_visionai_v1_OperatorDefinition_ArgumentDefinition_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.LvaProto + .internal_static_google_cloud_visionai_v1_OperatorDefinition_ArgumentDefinition_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.OperatorDefinition.ArgumentDefinition.class, + com.google.cloud.visionai.v1.OperatorDefinition.ArgumentDefinition.Builder.class); + } + + // Construct using + // com.google.cloud.visionai.v1.OperatorDefinition.ArgumentDefinition.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + argument_ = ""; + type_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.LvaProto + .internal_static_google_cloud_visionai_v1_OperatorDefinition_ArgumentDefinition_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.OperatorDefinition.ArgumentDefinition + getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.OperatorDefinition.ArgumentDefinition + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.OperatorDefinition.ArgumentDefinition build() { + com.google.cloud.visionai.v1.OperatorDefinition.ArgumentDefinition result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.OperatorDefinition.ArgumentDefinition buildPartial() { + com.google.cloud.visionai.v1.OperatorDefinition.ArgumentDefinition result = + new com.google.cloud.visionai.v1.OperatorDefinition.ArgumentDefinition(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.visionai.v1.OperatorDefinition.ArgumentDefinition result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.argument_ = argument_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.type_ = type_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.OperatorDefinition.ArgumentDefinition) { + return mergeFrom( + (com.google.cloud.visionai.v1.OperatorDefinition.ArgumentDefinition) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.visionai.v1.OperatorDefinition.ArgumentDefinition other) { + if (other + == com.google.cloud.visionai.v1.OperatorDefinition.ArgumentDefinition + .getDefaultInstance()) return this; + if (!other.getArgument().isEmpty()) { + argument_ = other.argument_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getType().isEmpty()) { + type_ = other.type_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + argument_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + type_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object argument_ = ""; + /** + * + * + *
+       * The name of the argument.
+       *
+       * Tentatively [a-z]([_a-z0-9]*[a-z0-9])?, e.g., video, audio,
+       * high_fps_frame.
+       * 
+ * + * string argument = 1; + * + * @return The argument. + */ + public java.lang.String getArgument() { + java.lang.Object ref = argument_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + argument_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * The name of the argument.
+       *
+       * Tentatively [a-z]([_a-z0-9]*[a-z0-9])?, e.g., video, audio,
+       * high_fps_frame.
+       * 
+ * + * string argument = 1; + * + * @return The bytes for argument. + */ + public com.google.protobuf.ByteString getArgumentBytes() { + java.lang.Object ref = argument_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + argument_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * The name of the argument.
+       *
+       * Tentatively [a-z]([_a-z0-9]*[a-z0-9])?, e.g., video, audio,
+       * high_fps_frame.
+       * 
+ * + * string argument = 1; + * + * @param value The argument to set. + * @return This builder for chaining. + */ + public Builder setArgument(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + argument_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * The name of the argument.
+       *
+       * Tentatively [a-z]([_a-z0-9]*[a-z0-9])?, e.g., video, audio,
+       * high_fps_frame.
+       * 
+ * + * string argument = 1; + * + * @return This builder for chaining. + */ + public Builder clearArgument() { + argument_ = getDefaultInstance().getArgument(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+       * The name of the argument.
+       *
+       * Tentatively [a-z]([_a-z0-9]*[a-z0-9])?, e.g., video, audio,
+       * high_fps_frame.
+       * 
+ * + * string argument = 1; + * + * @param value The bytes for argument to set. + * @return This builder for chaining. + */ + public Builder setArgumentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + argument_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object type_ = ""; + /** + * + * + *
+       * The data type of the argument.
+       *
+       * This should match the textual representation of a stream/Packet type.
+       * 
+ * + * string type = 2; + * + * @return The type. + */ + public java.lang.String getType() { + java.lang.Object ref = type_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + type_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * The data type of the argument.
+       *
+       * This should match the textual representation of a stream/Packet type.
+       * 
+ * + * string type = 2; + * + * @return The bytes for type. + */ + public com.google.protobuf.ByteString getTypeBytes() { + java.lang.Object ref = type_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + type_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * The data type of the argument.
+       *
+       * This should match the textual representation of a stream/Packet type.
+       * 
+ * + * string type = 2; + * + * @param value The type to set. + * @return This builder for chaining. + */ + public Builder setType(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + type_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * The data type of the argument.
+       *
+       * This should match the textual representation of a stream/Packet type.
+       * 
+ * + * string type = 2; + * + * @return This builder for chaining. + */ + public Builder clearType() { + type_ = getDefaultInstance().getType(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+       * The data type of the argument.
+       *
+       * This should match the textual representation of a stream/Packet type.
+       * 
+ * + * string type = 2; + * + * @param value The bytes for type to set. + * @return This builder for chaining. + */ + public Builder setTypeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + type_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.OperatorDefinition.ArgumentDefinition) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.OperatorDefinition.ArgumentDefinition) + private static final com.google.cloud.visionai.v1.OperatorDefinition.ArgumentDefinition + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.OperatorDefinition.ArgumentDefinition(); + } + + public static com.google.cloud.visionai.v1.OperatorDefinition.ArgumentDefinition + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ArgumentDefinition parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.OperatorDefinition.ArgumentDefinition + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface AttributeDefinitionOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.OperatorDefinition.AttributeDefinition) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * The name of the attribute.
+     *
+     * Tentatively [a-z]([_a-z0-9]*[a-z0-9])?, e.g., max_frames_per_video,
+     * resize_height.
+     * 
+ * + * string attribute = 1; + * + * @return The attribute. + */ + java.lang.String getAttribute(); + /** + * + * + *
+     * The name of the attribute.
+     *
+     * Tentatively [a-z]([_a-z0-9]*[a-z0-9])?, e.g., max_frames_per_video,
+     * resize_height.
+     * 
+ * + * string attribute = 1; + * + * @return The bytes for attribute. + */ + com.google.protobuf.ByteString getAttributeBytes(); + + /** + * + * + *
+     * The type of this attribute.
+     *
+     * See attribute_value.proto for possibilities.
+     * 
+ * + * string type = 2; + * + * @return The type. + */ + java.lang.String getType(); + /** + * + * + *
+     * The type of this attribute.
+     *
+     * See attribute_value.proto for possibilities.
+     * 
+ * + * string type = 2; + * + * @return The bytes for type. + */ + com.google.protobuf.ByteString getTypeBytes(); + + /** + * + * + *
+     * The default value for the attribute.
+     * 
+ * + * .google.cloud.visionai.v1.AttributeValue default_value = 3; + * + * @return Whether the defaultValue field is set. + */ + boolean hasDefaultValue(); + /** + * + * + *
+     * The default value for the attribute.
+     * 
+ * + * .google.cloud.visionai.v1.AttributeValue default_value = 3; + * + * @return The defaultValue. + */ + com.google.cloud.visionai.v1.AttributeValue getDefaultValue(); + /** + * + * + *
+     * The default value for the attribute.
+     * 
+ * + * .google.cloud.visionai.v1.AttributeValue default_value = 3; + */ + com.google.cloud.visionai.v1.AttributeValueOrBuilder getDefaultValueOrBuilder(); + } + /** + * + * + *
+   * Defines an attribute of an operator.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.OperatorDefinition.AttributeDefinition} + */ + public static final class AttributeDefinition extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.OperatorDefinition.AttributeDefinition) + AttributeDefinitionOrBuilder { + private static final long serialVersionUID = 0L; + // Use AttributeDefinition.newBuilder() to construct. + private AttributeDefinition(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private AttributeDefinition() { + attribute_ = ""; + type_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new AttributeDefinition(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.LvaProto + .internal_static_google_cloud_visionai_v1_OperatorDefinition_AttributeDefinition_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.LvaProto + .internal_static_google_cloud_visionai_v1_OperatorDefinition_AttributeDefinition_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.OperatorDefinition.AttributeDefinition.class, + com.google.cloud.visionai.v1.OperatorDefinition.AttributeDefinition.Builder.class); + } + + private int bitField0_; + public static final int ATTRIBUTE_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object attribute_ = ""; + /** + * + * + *
+     * The name of the attribute.
+     *
+     * Tentatively [a-z]([_a-z0-9]*[a-z0-9])?, e.g., max_frames_per_video,
+     * resize_height.
+     * 
+ * + * string attribute = 1; + * + * @return The attribute. + */ + @java.lang.Override + public java.lang.String getAttribute() { + java.lang.Object ref = attribute_; + 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(); + attribute_ = s; + return s; + } + } + /** + * + * + *
+     * The name of the attribute.
+     *
+     * Tentatively [a-z]([_a-z0-9]*[a-z0-9])?, e.g., max_frames_per_video,
+     * resize_height.
+     * 
+ * + * string attribute = 1; + * + * @return The bytes for attribute. + */ + @java.lang.Override + public com.google.protobuf.ByteString getAttributeBytes() { + java.lang.Object ref = attribute_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + attribute_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TYPE_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object type_ = ""; + /** + * + * + *
+     * The type of this attribute.
+     *
+     * See attribute_value.proto for possibilities.
+     * 
+ * + * string type = 2; + * + * @return The type. + */ + @java.lang.Override + public java.lang.String getType() { + java.lang.Object ref = type_; + 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(); + type_ = s; + return s; + } + } + /** + * + * + *
+     * The type of this attribute.
+     *
+     * See attribute_value.proto for possibilities.
+     * 
+ * + * string type = 2; + * + * @return The bytes for type. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTypeBytes() { + java.lang.Object ref = type_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + type_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DEFAULT_VALUE_FIELD_NUMBER = 3; + private com.google.cloud.visionai.v1.AttributeValue defaultValue_; + /** + * + * + *
+     * The default value for the attribute.
+     * 
+ * + * .google.cloud.visionai.v1.AttributeValue default_value = 3; + * + * @return Whether the defaultValue field is set. + */ + @java.lang.Override + public boolean hasDefaultValue() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * The default value for the attribute.
+     * 
+ * + * .google.cloud.visionai.v1.AttributeValue default_value = 3; + * + * @return The defaultValue. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.AttributeValue getDefaultValue() { + return defaultValue_ == null + ? com.google.cloud.visionai.v1.AttributeValue.getDefaultInstance() + : defaultValue_; + } + /** + * + * + *
+     * The default value for the attribute.
+     * 
+ * + * .google.cloud.visionai.v1.AttributeValue default_value = 3; + */ + @java.lang.Override + public com.google.cloud.visionai.v1.AttributeValueOrBuilder getDefaultValueOrBuilder() { + return defaultValue_ == null + ? com.google.cloud.visionai.v1.AttributeValue.getDefaultInstance() + : defaultValue_; + } + + 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(attribute_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, attribute_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(type_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, type_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(3, getDefaultValue()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(attribute_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, attribute_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(type_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, type_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getDefaultValue()); + } + size += getUnknownFields().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.visionai.v1.OperatorDefinition.AttributeDefinition)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.OperatorDefinition.AttributeDefinition other = + (com.google.cloud.visionai.v1.OperatorDefinition.AttributeDefinition) obj; + + if (!getAttribute().equals(other.getAttribute())) return false; + if (!getType().equals(other.getType())) return false; + if (hasDefaultValue() != other.hasDefaultValue()) return false; + if (hasDefaultValue()) { + if (!getDefaultValue().equals(other.getDefaultValue())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ATTRIBUTE_FIELD_NUMBER; + hash = (53 * hash) + getAttribute().hashCode(); + hash = (37 * hash) + TYPE_FIELD_NUMBER; + hash = (53 * hash) + getType().hashCode(); + if (hasDefaultValue()) { + hash = (37 * hash) + DEFAULT_VALUE_FIELD_NUMBER; + hash = (53 * hash) + getDefaultValue().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.OperatorDefinition.AttributeDefinition parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.OperatorDefinition.AttributeDefinition 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.visionai.v1.OperatorDefinition.AttributeDefinition parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.OperatorDefinition.AttributeDefinition 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.visionai.v1.OperatorDefinition.AttributeDefinition parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.OperatorDefinition.AttributeDefinition parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.OperatorDefinition.AttributeDefinition parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.OperatorDefinition.AttributeDefinition 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.visionai.v1.OperatorDefinition.AttributeDefinition + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.OperatorDefinition.AttributeDefinition + 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.visionai.v1.OperatorDefinition.AttributeDefinition parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.OperatorDefinition.AttributeDefinition 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.visionai.v1.OperatorDefinition.AttributeDefinition 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; + } + /** + * + * + *
+     * Defines an attribute of an operator.
+     * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.OperatorDefinition.AttributeDefinition} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.OperatorDefinition.AttributeDefinition) + com.google.cloud.visionai.v1.OperatorDefinition.AttributeDefinitionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.LvaProto + .internal_static_google_cloud_visionai_v1_OperatorDefinition_AttributeDefinition_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.LvaProto + .internal_static_google_cloud_visionai_v1_OperatorDefinition_AttributeDefinition_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.OperatorDefinition.AttributeDefinition.class, + com.google.cloud.visionai.v1.OperatorDefinition.AttributeDefinition.Builder.class); + } + + // Construct using + // com.google.cloud.visionai.v1.OperatorDefinition.AttributeDefinition.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getDefaultValueFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + attribute_ = ""; + type_ = ""; + defaultValue_ = null; + if (defaultValueBuilder_ != null) { + defaultValueBuilder_.dispose(); + defaultValueBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.LvaProto + .internal_static_google_cloud_visionai_v1_OperatorDefinition_AttributeDefinition_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.OperatorDefinition.AttributeDefinition + getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.OperatorDefinition.AttributeDefinition + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.OperatorDefinition.AttributeDefinition build() { + com.google.cloud.visionai.v1.OperatorDefinition.AttributeDefinition result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.OperatorDefinition.AttributeDefinition buildPartial() { + com.google.cloud.visionai.v1.OperatorDefinition.AttributeDefinition result = + new com.google.cloud.visionai.v1.OperatorDefinition.AttributeDefinition(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.visionai.v1.OperatorDefinition.AttributeDefinition result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.attribute_ = attribute_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.type_ = type_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.defaultValue_ = + defaultValueBuilder_ == null ? defaultValue_ : defaultValueBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.OperatorDefinition.AttributeDefinition) { + return mergeFrom( + (com.google.cloud.visionai.v1.OperatorDefinition.AttributeDefinition) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.visionai.v1.OperatorDefinition.AttributeDefinition other) { + if (other + == com.google.cloud.visionai.v1.OperatorDefinition.AttributeDefinition + .getDefaultInstance()) return this; + if (!other.getAttribute().isEmpty()) { + attribute_ = other.attribute_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getType().isEmpty()) { + type_ = other.type_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.hasDefaultValue()) { + mergeDefaultValue(other.getDefaultValue()); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + attribute_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + type_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage(getDefaultValueFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object attribute_ = ""; + /** + * + * + *
+       * The name of the attribute.
+       *
+       * Tentatively [a-z]([_a-z0-9]*[a-z0-9])?, e.g., max_frames_per_video,
+       * resize_height.
+       * 
+ * + * string attribute = 1; + * + * @return The attribute. + */ + public java.lang.String getAttribute() { + java.lang.Object ref = attribute_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + attribute_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * The name of the attribute.
+       *
+       * Tentatively [a-z]([_a-z0-9]*[a-z0-9])?, e.g., max_frames_per_video,
+       * resize_height.
+       * 
+ * + * string attribute = 1; + * + * @return The bytes for attribute. + */ + public com.google.protobuf.ByteString getAttributeBytes() { + java.lang.Object ref = attribute_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + attribute_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * The name of the attribute.
+       *
+       * Tentatively [a-z]([_a-z0-9]*[a-z0-9])?, e.g., max_frames_per_video,
+       * resize_height.
+       * 
+ * + * string attribute = 1; + * + * @param value The attribute to set. + * @return This builder for chaining. + */ + public Builder setAttribute(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + attribute_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * The name of the attribute.
+       *
+       * Tentatively [a-z]([_a-z0-9]*[a-z0-9])?, e.g., max_frames_per_video,
+       * resize_height.
+       * 
+ * + * string attribute = 1; + * + * @return This builder for chaining. + */ + public Builder clearAttribute() { + attribute_ = getDefaultInstance().getAttribute(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+       * The name of the attribute.
+       *
+       * Tentatively [a-z]([_a-z0-9]*[a-z0-9])?, e.g., max_frames_per_video,
+       * resize_height.
+       * 
+ * + * string attribute = 1; + * + * @param value The bytes for attribute to set. + * @return This builder for chaining. + */ + public Builder setAttributeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + attribute_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object type_ = ""; + /** + * + * + *
+       * The type of this attribute.
+       *
+       * See attribute_value.proto for possibilities.
+       * 
+ * + * string type = 2; + * + * @return The type. + */ + public java.lang.String getType() { + java.lang.Object ref = type_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + type_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * The type of this attribute.
+       *
+       * See attribute_value.proto for possibilities.
+       * 
+ * + * string type = 2; + * + * @return The bytes for type. + */ + public com.google.protobuf.ByteString getTypeBytes() { + java.lang.Object ref = type_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + type_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * The type of this attribute.
+       *
+       * See attribute_value.proto for possibilities.
+       * 
+ * + * string type = 2; + * + * @param value The type to set. + * @return This builder for chaining. + */ + public Builder setType(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + type_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * The type of this attribute.
+       *
+       * See attribute_value.proto for possibilities.
+       * 
+ * + * string type = 2; + * + * @return This builder for chaining. + */ + public Builder clearType() { + type_ = getDefaultInstance().getType(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+       * The type of this attribute.
+       *
+       * See attribute_value.proto for possibilities.
+       * 
+ * + * string type = 2; + * + * @param value The bytes for type to set. + * @return This builder for chaining. + */ + public Builder setTypeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + type_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.cloud.visionai.v1.AttributeValue defaultValue_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.AttributeValue, + com.google.cloud.visionai.v1.AttributeValue.Builder, + com.google.cloud.visionai.v1.AttributeValueOrBuilder> + defaultValueBuilder_; + /** + * + * + *
+       * The default value for the attribute.
+       * 
+ * + * .google.cloud.visionai.v1.AttributeValue default_value = 3; + * + * @return Whether the defaultValue field is set. + */ + public boolean hasDefaultValue() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+       * The default value for the attribute.
+       * 
+ * + * .google.cloud.visionai.v1.AttributeValue default_value = 3; + * + * @return The defaultValue. + */ + public com.google.cloud.visionai.v1.AttributeValue getDefaultValue() { + if (defaultValueBuilder_ == null) { + return defaultValue_ == null + ? com.google.cloud.visionai.v1.AttributeValue.getDefaultInstance() + : defaultValue_; + } else { + return defaultValueBuilder_.getMessage(); + } + } + /** + * + * + *
+       * The default value for the attribute.
+       * 
+ * + * .google.cloud.visionai.v1.AttributeValue default_value = 3; + */ + public Builder setDefaultValue(com.google.cloud.visionai.v1.AttributeValue value) { + if (defaultValueBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + defaultValue_ = value; + } else { + defaultValueBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+       * The default value for the attribute.
+       * 
+ * + * .google.cloud.visionai.v1.AttributeValue default_value = 3; + */ + public Builder setDefaultValue( + com.google.cloud.visionai.v1.AttributeValue.Builder builderForValue) { + if (defaultValueBuilder_ == null) { + defaultValue_ = builderForValue.build(); + } else { + defaultValueBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+       * The default value for the attribute.
+       * 
+ * + * .google.cloud.visionai.v1.AttributeValue default_value = 3; + */ + public Builder mergeDefaultValue(com.google.cloud.visionai.v1.AttributeValue value) { + if (defaultValueBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && defaultValue_ != null + && defaultValue_ + != com.google.cloud.visionai.v1.AttributeValue.getDefaultInstance()) { + getDefaultValueBuilder().mergeFrom(value); + } else { + defaultValue_ = value; + } + } else { + defaultValueBuilder_.mergeFrom(value); + } + if (defaultValue_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + /** + * + * + *
+       * The default value for the attribute.
+       * 
+ * + * .google.cloud.visionai.v1.AttributeValue default_value = 3; + */ + public Builder clearDefaultValue() { + bitField0_ = (bitField0_ & ~0x00000004); + defaultValue_ = null; + if (defaultValueBuilder_ != null) { + defaultValueBuilder_.dispose(); + defaultValueBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+       * The default value for the attribute.
+       * 
+ * + * .google.cloud.visionai.v1.AttributeValue default_value = 3; + */ + public com.google.cloud.visionai.v1.AttributeValue.Builder getDefaultValueBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getDefaultValueFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * The default value for the attribute.
+       * 
+ * + * .google.cloud.visionai.v1.AttributeValue default_value = 3; + */ + public com.google.cloud.visionai.v1.AttributeValueOrBuilder getDefaultValueOrBuilder() { + if (defaultValueBuilder_ != null) { + return defaultValueBuilder_.getMessageOrBuilder(); + } else { + return defaultValue_ == null + ? com.google.cloud.visionai.v1.AttributeValue.getDefaultInstance() + : defaultValue_; + } + } + /** + * + * + *
+       * The default value for the attribute.
+       * 
+ * + * .google.cloud.visionai.v1.AttributeValue default_value = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.AttributeValue, + com.google.cloud.visionai.v1.AttributeValue.Builder, + com.google.cloud.visionai.v1.AttributeValueOrBuilder> + getDefaultValueFieldBuilder() { + if (defaultValueBuilder_ == null) { + defaultValueBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.AttributeValue, + com.google.cloud.visionai.v1.AttributeValue.Builder, + com.google.cloud.visionai.v1.AttributeValueOrBuilder>( + getDefaultValue(), getParentForChildren(), isClean()); + defaultValue_ = null; + } + return defaultValueBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.OperatorDefinition.AttributeDefinition) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.OperatorDefinition.AttributeDefinition) + private static final com.google.cloud.visionai.v1.OperatorDefinition.AttributeDefinition + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.OperatorDefinition.AttributeDefinition(); + } + + public static com.google.cloud.visionai.v1.OperatorDefinition.AttributeDefinition + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AttributeDefinition parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.OperatorDefinition.AttributeDefinition + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int bitField0_; + public static final int OPERATOR_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object operator_ = ""; + /** + * + * + *
+   * The name of this operator.
+   *
+   * Tentatively [A-Z][a-zA-Z0-9]*, e.g., BboxCounter, PetDetector,
+   * PetDetector1.
+   * 
+ * + * string operator = 1; + * + * @return The operator. + */ + @java.lang.Override + public java.lang.String getOperator() { + java.lang.Object ref = operator_; + 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(); + operator_ = s; + return s; + } + } + /** + * + * + *
+   * The name of this operator.
+   *
+   * Tentatively [A-Z][a-zA-Z0-9]*, e.g., BboxCounter, PetDetector,
+   * PetDetector1.
+   * 
+ * + * string operator = 1; + * + * @return The bytes for operator. + */ + @java.lang.Override + public com.google.protobuf.ByteString getOperatorBytes() { + java.lang.Object ref = operator_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + operator_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int INPUT_ARGS_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private java.util.List + inputArgs_; + /** + * + * + *
+   * Declares input arguments.
+   * 
+ * + * repeated .google.cloud.visionai.v1.OperatorDefinition.ArgumentDefinition input_args = 2; + * + */ + @java.lang.Override + public java.util.List + getInputArgsList() { + return inputArgs_; + } + /** + * + * + *
+   * Declares input arguments.
+   * 
+ * + * repeated .google.cloud.visionai.v1.OperatorDefinition.ArgumentDefinition input_args = 2; + * + */ + @java.lang.Override + public java.util.List< + ? extends com.google.cloud.visionai.v1.OperatorDefinition.ArgumentDefinitionOrBuilder> + getInputArgsOrBuilderList() { + return inputArgs_; + } + /** + * + * + *
+   * Declares input arguments.
+   * 
+ * + * repeated .google.cloud.visionai.v1.OperatorDefinition.ArgumentDefinition input_args = 2; + * + */ + @java.lang.Override + public int getInputArgsCount() { + return inputArgs_.size(); + } + /** + * + * + *
+   * Declares input arguments.
+   * 
+ * + * repeated .google.cloud.visionai.v1.OperatorDefinition.ArgumentDefinition input_args = 2; + * + */ + @java.lang.Override + public com.google.cloud.visionai.v1.OperatorDefinition.ArgumentDefinition getInputArgs( + int index) { + return inputArgs_.get(index); + } + /** + * + * + *
+   * Declares input arguments.
+   * 
+ * + * repeated .google.cloud.visionai.v1.OperatorDefinition.ArgumentDefinition input_args = 2; + * + */ + @java.lang.Override + public com.google.cloud.visionai.v1.OperatorDefinition.ArgumentDefinitionOrBuilder + getInputArgsOrBuilder(int index) { + return inputArgs_.get(index); + } + + public static final int OUTPUT_ARGS_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private java.util.List + outputArgs_; + /** + * + * + *
+   * Declares output arguments.
+   * 
+ * + * repeated .google.cloud.visionai.v1.OperatorDefinition.ArgumentDefinition output_args = 3; + * + */ + @java.lang.Override + public java.util.List + getOutputArgsList() { + return outputArgs_; + } + /** + * + * + *
+   * Declares output arguments.
+   * 
+ * + * repeated .google.cloud.visionai.v1.OperatorDefinition.ArgumentDefinition output_args = 3; + * + */ + @java.lang.Override + public java.util.List< + ? extends com.google.cloud.visionai.v1.OperatorDefinition.ArgumentDefinitionOrBuilder> + getOutputArgsOrBuilderList() { + return outputArgs_; + } + /** + * + * + *
+   * Declares output arguments.
+   * 
+ * + * repeated .google.cloud.visionai.v1.OperatorDefinition.ArgumentDefinition output_args = 3; + * + */ + @java.lang.Override + public int getOutputArgsCount() { + return outputArgs_.size(); + } + /** + * + * + *
+   * Declares output arguments.
+   * 
+ * + * repeated .google.cloud.visionai.v1.OperatorDefinition.ArgumentDefinition output_args = 3; + * + */ + @java.lang.Override + public com.google.cloud.visionai.v1.OperatorDefinition.ArgumentDefinition getOutputArgs( + int index) { + return outputArgs_.get(index); + } + /** + * + * + *
+   * Declares output arguments.
+   * 
+ * + * repeated .google.cloud.visionai.v1.OperatorDefinition.ArgumentDefinition output_args = 3; + * + */ + @java.lang.Override + public com.google.cloud.visionai.v1.OperatorDefinition.ArgumentDefinitionOrBuilder + getOutputArgsOrBuilder(int index) { + return outputArgs_.get(index); + } + + public static final int ATTRIBUTES_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private java.util.List + attributes_; + /** + * + * + *
+   * Declares the attributes.
+   * 
+ * + * repeated .google.cloud.visionai.v1.OperatorDefinition.AttributeDefinition attributes = 4; + * + */ + @java.lang.Override + public java.util.List + getAttributesList() { + return attributes_; + } + /** + * + * + *
+   * Declares the attributes.
+   * 
+ * + * repeated .google.cloud.visionai.v1.OperatorDefinition.AttributeDefinition attributes = 4; + * + */ + @java.lang.Override + public java.util.List< + ? extends com.google.cloud.visionai.v1.OperatorDefinition.AttributeDefinitionOrBuilder> + getAttributesOrBuilderList() { + return attributes_; + } + /** + * + * + *
+   * Declares the attributes.
+   * 
+ * + * repeated .google.cloud.visionai.v1.OperatorDefinition.AttributeDefinition attributes = 4; + * + */ + @java.lang.Override + public int getAttributesCount() { + return attributes_.size(); + } + /** + * + * + *
+   * Declares the attributes.
+   * 
+ * + * repeated .google.cloud.visionai.v1.OperatorDefinition.AttributeDefinition attributes = 4; + * + */ + @java.lang.Override + public com.google.cloud.visionai.v1.OperatorDefinition.AttributeDefinition getAttributes( + int index) { + return attributes_.get(index); + } + /** + * + * + *
+   * Declares the attributes.
+   * 
+ * + * repeated .google.cloud.visionai.v1.OperatorDefinition.AttributeDefinition attributes = 4; + * + */ + @java.lang.Override + public com.google.cloud.visionai.v1.OperatorDefinition.AttributeDefinitionOrBuilder + getAttributesOrBuilder(int index) { + return attributes_.get(index); + } + + public static final int RESOURCES_FIELD_NUMBER = 5; + private com.google.cloud.visionai.v1.ResourceSpecification resources_; + /** + * + * + *
+   * The resources for running the operator.
+   * 
+ * + * .google.cloud.visionai.v1.ResourceSpecification resources = 5; + * + * @return Whether the resources field is set. + */ + @java.lang.Override + public boolean hasResources() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * The resources for running the operator.
+   * 
+ * + * .google.cloud.visionai.v1.ResourceSpecification resources = 5; + * + * @return The resources. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.ResourceSpecification getResources() { + return resources_ == null + ? com.google.cloud.visionai.v1.ResourceSpecification.getDefaultInstance() + : resources_; + } + /** + * + * + *
+   * The resources for running the operator.
+   * 
+ * + * .google.cloud.visionai.v1.ResourceSpecification resources = 5; + */ + @java.lang.Override + public com.google.cloud.visionai.v1.ResourceSpecificationOrBuilder getResourcesOrBuilder() { + return resources_ == null + ? com.google.cloud.visionai.v1.ResourceSpecification.getDefaultInstance() + : resources_; + } + + public static final int SHORT_DESCRIPTION_FIELD_NUMBER = 6; + + @SuppressWarnings("serial") + private volatile java.lang.Object shortDescription_ = ""; + /** + * + * + *
+   * Short description of the operator.
+   * 
+ * + * string short_description = 6; + * + * @return The shortDescription. + */ + @java.lang.Override + public java.lang.String getShortDescription() { + java.lang.Object ref = shortDescription_; + 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(); + shortDescription_ = s; + return s; + } + } + /** + * + * + *
+   * Short description of the operator.
+   * 
+ * + * string short_description = 6; + * + * @return The bytes for shortDescription. + */ + @java.lang.Override + public com.google.protobuf.ByteString getShortDescriptionBytes() { + java.lang.Object ref = shortDescription_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + shortDescription_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DESCRIPTION_FIELD_NUMBER = 7; + + @SuppressWarnings("serial") + private volatile java.lang.Object description_ = ""; + /** + * + * + *
+   * Full description of the operator.
+   * 
+ * + * string description = 7; + * + * @return The description. + */ + @java.lang.Override + 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; + } + } + /** + * + * + *
+   * Full description of the operator.
+   * 
+ * + * string description = 7; + * + * @return The bytes for description. + */ + @java.lang.Override + 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; + } + } + + 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(operator_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, operator_); + } + for (int i = 0; i < inputArgs_.size(); i++) { + output.writeMessage(2, inputArgs_.get(i)); + } + for (int i = 0; i < outputArgs_.size(); i++) { + output.writeMessage(3, outputArgs_.get(i)); + } + for (int i = 0; i < attributes_.size(); i++) { + output.writeMessage(4, attributes_.get(i)); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(5, getResources()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(shortDescription_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, shortDescription_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 7, description_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(operator_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, operator_); + } + for (int i = 0; i < inputArgs_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, inputArgs_.get(i)); + } + for (int i = 0; i < outputArgs_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, outputArgs_.get(i)); + } + for (int i = 0; i < attributes_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, attributes_.get(i)); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getResources()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(shortDescription_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, shortDescription_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, description_); + } + size += getUnknownFields().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.visionai.v1.OperatorDefinition)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.OperatorDefinition other = + (com.google.cloud.visionai.v1.OperatorDefinition) obj; + + if (!getOperator().equals(other.getOperator())) return false; + if (!getInputArgsList().equals(other.getInputArgsList())) return false; + if (!getOutputArgsList().equals(other.getOutputArgsList())) return false; + if (!getAttributesList().equals(other.getAttributesList())) return false; + if (hasResources() != other.hasResources()) return false; + if (hasResources()) { + if (!getResources().equals(other.getResources())) return false; + } + if (!getShortDescription().equals(other.getShortDescription())) return false; + if (!getDescription().equals(other.getDescription())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + OPERATOR_FIELD_NUMBER; + hash = (53 * hash) + getOperator().hashCode(); + if (getInputArgsCount() > 0) { + hash = (37 * hash) + INPUT_ARGS_FIELD_NUMBER; + hash = (53 * hash) + getInputArgsList().hashCode(); + } + if (getOutputArgsCount() > 0) { + hash = (37 * hash) + OUTPUT_ARGS_FIELD_NUMBER; + hash = (53 * hash) + getOutputArgsList().hashCode(); + } + if (getAttributesCount() > 0) { + hash = (37 * hash) + ATTRIBUTES_FIELD_NUMBER; + hash = (53 * hash) + getAttributesList().hashCode(); + } + if (hasResources()) { + hash = (37 * hash) + RESOURCES_FIELD_NUMBER; + hash = (53 * hash) + getResources().hashCode(); + } + hash = (37 * hash) + SHORT_DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getShortDescription().hashCode(); + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.OperatorDefinition parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.OperatorDefinition 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.visionai.v1.OperatorDefinition parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.OperatorDefinition 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.visionai.v1.OperatorDefinition parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.OperatorDefinition parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.OperatorDefinition parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.OperatorDefinition 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.visionai.v1.OperatorDefinition parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.OperatorDefinition 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.visionai.v1.OperatorDefinition parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.OperatorDefinition 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.visionai.v1.OperatorDefinition 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; + } + /** + * + * + *
+   * Defines the interface of an Operator.
+   *
+   * Arguments to an operator are input/output streams that are getting
+   * processesed/returned while attributes are fixed configuration parameters.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.OperatorDefinition} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.OperatorDefinition) + com.google.cloud.visionai.v1.OperatorDefinitionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.LvaProto + .internal_static_google_cloud_visionai_v1_OperatorDefinition_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.LvaProto + .internal_static_google_cloud_visionai_v1_OperatorDefinition_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.OperatorDefinition.class, + com.google.cloud.visionai.v1.OperatorDefinition.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.OperatorDefinition.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getInputArgsFieldBuilder(); + getOutputArgsFieldBuilder(); + getAttributesFieldBuilder(); + getResourcesFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + operator_ = ""; + if (inputArgsBuilder_ == null) { + inputArgs_ = java.util.Collections.emptyList(); + } else { + inputArgs_ = null; + inputArgsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + if (outputArgsBuilder_ == null) { + outputArgs_ = java.util.Collections.emptyList(); + } else { + outputArgs_ = null; + outputArgsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000004); + if (attributesBuilder_ == null) { + attributes_ = java.util.Collections.emptyList(); + } else { + attributes_ = null; + attributesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000008); + resources_ = null; + if (resourcesBuilder_ != null) { + resourcesBuilder_.dispose(); + resourcesBuilder_ = null; + } + shortDescription_ = ""; + description_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.LvaProto + .internal_static_google_cloud_visionai_v1_OperatorDefinition_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.OperatorDefinition getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.OperatorDefinition.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.OperatorDefinition build() { + com.google.cloud.visionai.v1.OperatorDefinition result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.OperatorDefinition buildPartial() { + com.google.cloud.visionai.v1.OperatorDefinition result = + new com.google.cloud.visionai.v1.OperatorDefinition(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.visionai.v1.OperatorDefinition result) { + if (inputArgsBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + inputArgs_ = java.util.Collections.unmodifiableList(inputArgs_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.inputArgs_ = inputArgs_; + } else { + result.inputArgs_ = inputArgsBuilder_.build(); + } + if (outputArgsBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0)) { + outputArgs_ = java.util.Collections.unmodifiableList(outputArgs_); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.outputArgs_ = outputArgs_; + } else { + result.outputArgs_ = outputArgsBuilder_.build(); + } + if (attributesBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0)) { + attributes_ = java.util.Collections.unmodifiableList(attributes_); + bitField0_ = (bitField0_ & ~0x00000008); + } + result.attributes_ = attributes_; + } else { + result.attributes_ = attributesBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.visionai.v1.OperatorDefinition result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.operator_ = operator_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000010) != 0)) { + result.resources_ = resourcesBuilder_ == null ? resources_ : resourcesBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.shortDescription_ = shortDescription_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.description_ = description_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.OperatorDefinition) { + return mergeFrom((com.google.cloud.visionai.v1.OperatorDefinition) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.OperatorDefinition other) { + if (other == com.google.cloud.visionai.v1.OperatorDefinition.getDefaultInstance()) + return this; + if (!other.getOperator().isEmpty()) { + operator_ = other.operator_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (inputArgsBuilder_ == null) { + if (!other.inputArgs_.isEmpty()) { + if (inputArgs_.isEmpty()) { + inputArgs_ = other.inputArgs_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureInputArgsIsMutable(); + inputArgs_.addAll(other.inputArgs_); + } + onChanged(); + } + } else { + if (!other.inputArgs_.isEmpty()) { + if (inputArgsBuilder_.isEmpty()) { + inputArgsBuilder_.dispose(); + inputArgsBuilder_ = null; + inputArgs_ = other.inputArgs_; + bitField0_ = (bitField0_ & ~0x00000002); + inputArgsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getInputArgsFieldBuilder() + : null; + } else { + inputArgsBuilder_.addAllMessages(other.inputArgs_); + } + } + } + if (outputArgsBuilder_ == null) { + if (!other.outputArgs_.isEmpty()) { + if (outputArgs_.isEmpty()) { + outputArgs_ = other.outputArgs_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureOutputArgsIsMutable(); + outputArgs_.addAll(other.outputArgs_); + } + onChanged(); + } + } else { + if (!other.outputArgs_.isEmpty()) { + if (outputArgsBuilder_.isEmpty()) { + outputArgsBuilder_.dispose(); + outputArgsBuilder_ = null; + outputArgs_ = other.outputArgs_; + bitField0_ = (bitField0_ & ~0x00000004); + outputArgsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getOutputArgsFieldBuilder() + : null; + } else { + outputArgsBuilder_.addAllMessages(other.outputArgs_); + } + } + } + if (attributesBuilder_ == null) { + if (!other.attributes_.isEmpty()) { + if (attributes_.isEmpty()) { + attributes_ = other.attributes_; + bitField0_ = (bitField0_ & ~0x00000008); + } else { + ensureAttributesIsMutable(); + attributes_.addAll(other.attributes_); + } + onChanged(); + } + } else { + if (!other.attributes_.isEmpty()) { + if (attributesBuilder_.isEmpty()) { + attributesBuilder_.dispose(); + attributesBuilder_ = null; + attributes_ = other.attributes_; + bitField0_ = (bitField0_ & ~0x00000008); + attributesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getAttributesFieldBuilder() + : null; + } else { + attributesBuilder_.addAllMessages(other.attributes_); + } + } + } + if (other.hasResources()) { + mergeResources(other.getResources()); + } + if (!other.getShortDescription().isEmpty()) { + shortDescription_ = other.shortDescription_; + bitField0_ |= 0x00000020; + onChanged(); + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + bitField0_ |= 0x00000040; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + operator_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + com.google.cloud.visionai.v1.OperatorDefinition.ArgumentDefinition m = + input.readMessage( + com.google.cloud.visionai.v1.OperatorDefinition.ArgumentDefinition.parser(), + extensionRegistry); + if (inputArgsBuilder_ == null) { + ensureInputArgsIsMutable(); + inputArgs_.add(m); + } else { + inputArgsBuilder_.addMessage(m); + } + break; + } // case 18 + case 26: + { + com.google.cloud.visionai.v1.OperatorDefinition.ArgumentDefinition m = + input.readMessage( + com.google.cloud.visionai.v1.OperatorDefinition.ArgumentDefinition.parser(), + extensionRegistry); + if (outputArgsBuilder_ == null) { + ensureOutputArgsIsMutable(); + outputArgs_.add(m); + } else { + outputArgsBuilder_.addMessage(m); + } + break; + } // case 26 + case 34: + { + com.google.cloud.visionai.v1.OperatorDefinition.AttributeDefinition m = + input.readMessage( + com.google.cloud.visionai.v1.OperatorDefinition.AttributeDefinition + .parser(), + extensionRegistry); + if (attributesBuilder_ == null) { + ensureAttributesIsMutable(); + attributes_.add(m); + } else { + attributesBuilder_.addMessage(m); + } + break; + } // case 34 + case 42: + { + input.readMessage(getResourcesFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 50: + { + shortDescription_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case 50 + case 58: + { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000040; + break; + } // case 58 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object operator_ = ""; + /** + * + * + *
+     * The name of this operator.
+     *
+     * Tentatively [A-Z][a-zA-Z0-9]*, e.g., BboxCounter, PetDetector,
+     * PetDetector1.
+     * 
+ * + * string operator = 1; + * + * @return The operator. + */ + public java.lang.String getOperator() { + java.lang.Object ref = operator_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + operator_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The name of this operator.
+     *
+     * Tentatively [A-Z][a-zA-Z0-9]*, e.g., BboxCounter, PetDetector,
+     * PetDetector1.
+     * 
+ * + * string operator = 1; + * + * @return The bytes for operator. + */ + public com.google.protobuf.ByteString getOperatorBytes() { + java.lang.Object ref = operator_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + operator_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The name of this operator.
+     *
+     * Tentatively [A-Z][a-zA-Z0-9]*, e.g., BboxCounter, PetDetector,
+     * PetDetector1.
+     * 
+ * + * string operator = 1; + * + * @param value The operator to set. + * @return This builder for chaining. + */ + public Builder setOperator(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + operator_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The name of this operator.
+     *
+     * Tentatively [A-Z][a-zA-Z0-9]*, e.g., BboxCounter, PetDetector,
+     * PetDetector1.
+     * 
+ * + * string operator = 1; + * + * @return This builder for chaining. + */ + public Builder clearOperator() { + operator_ = getDefaultInstance().getOperator(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * The name of this operator.
+     *
+     * Tentatively [A-Z][a-zA-Z0-9]*, e.g., BboxCounter, PetDetector,
+     * PetDetector1.
+     * 
+ * + * string operator = 1; + * + * @param value The bytes for operator to set. + * @return This builder for chaining. + */ + public Builder setOperatorBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + operator_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.util.List + inputArgs_ = java.util.Collections.emptyList(); + + private void ensureInputArgsIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + inputArgs_ = + new java.util.ArrayList< + com.google.cloud.visionai.v1.OperatorDefinition.ArgumentDefinition>(inputArgs_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.visionai.v1.OperatorDefinition.ArgumentDefinition, + com.google.cloud.visionai.v1.OperatorDefinition.ArgumentDefinition.Builder, + com.google.cloud.visionai.v1.OperatorDefinition.ArgumentDefinitionOrBuilder> + inputArgsBuilder_; + + /** + * + * + *
+     * Declares input arguments.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.OperatorDefinition.ArgumentDefinition input_args = 2; + * + */ + public java.util.List + getInputArgsList() { + if (inputArgsBuilder_ == null) { + return java.util.Collections.unmodifiableList(inputArgs_); + } else { + return inputArgsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Declares input arguments.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.OperatorDefinition.ArgumentDefinition input_args = 2; + * + */ + public int getInputArgsCount() { + if (inputArgsBuilder_ == null) { + return inputArgs_.size(); + } else { + return inputArgsBuilder_.getCount(); + } + } + /** + * + * + *
+     * Declares input arguments.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.OperatorDefinition.ArgumentDefinition input_args = 2; + * + */ + public com.google.cloud.visionai.v1.OperatorDefinition.ArgumentDefinition getInputArgs( + int index) { + if (inputArgsBuilder_ == null) { + return inputArgs_.get(index); + } else { + return inputArgsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Declares input arguments.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.OperatorDefinition.ArgumentDefinition input_args = 2; + * + */ + public Builder setInputArgs( + int index, com.google.cloud.visionai.v1.OperatorDefinition.ArgumentDefinition value) { + if (inputArgsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureInputArgsIsMutable(); + inputArgs_.set(index, value); + onChanged(); + } else { + inputArgsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Declares input arguments.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.OperatorDefinition.ArgumentDefinition input_args = 2; + * + */ + public Builder setInputArgs( + int index, + com.google.cloud.visionai.v1.OperatorDefinition.ArgumentDefinition.Builder + builderForValue) { + if (inputArgsBuilder_ == null) { + ensureInputArgsIsMutable(); + inputArgs_.set(index, builderForValue.build()); + onChanged(); + } else { + inputArgsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Declares input arguments.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.OperatorDefinition.ArgumentDefinition input_args = 2; + * + */ + public Builder addInputArgs( + com.google.cloud.visionai.v1.OperatorDefinition.ArgumentDefinition value) { + if (inputArgsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureInputArgsIsMutable(); + inputArgs_.add(value); + onChanged(); + } else { + inputArgsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Declares input arguments.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.OperatorDefinition.ArgumentDefinition input_args = 2; + * + */ + public Builder addInputArgs( + int index, com.google.cloud.visionai.v1.OperatorDefinition.ArgumentDefinition value) { + if (inputArgsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureInputArgsIsMutable(); + inputArgs_.add(index, value); + onChanged(); + } else { + inputArgsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Declares input arguments.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.OperatorDefinition.ArgumentDefinition input_args = 2; + * + */ + public Builder addInputArgs( + com.google.cloud.visionai.v1.OperatorDefinition.ArgumentDefinition.Builder + builderForValue) { + if (inputArgsBuilder_ == null) { + ensureInputArgsIsMutable(); + inputArgs_.add(builderForValue.build()); + onChanged(); + } else { + inputArgsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Declares input arguments.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.OperatorDefinition.ArgumentDefinition input_args = 2; + * + */ + public Builder addInputArgs( + int index, + com.google.cloud.visionai.v1.OperatorDefinition.ArgumentDefinition.Builder + builderForValue) { + if (inputArgsBuilder_ == null) { + ensureInputArgsIsMutable(); + inputArgs_.add(index, builderForValue.build()); + onChanged(); + } else { + inputArgsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Declares input arguments.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.OperatorDefinition.ArgumentDefinition input_args = 2; + * + */ + public Builder addAllInputArgs( + java.lang.Iterable< + ? extends com.google.cloud.visionai.v1.OperatorDefinition.ArgumentDefinition> + values) { + if (inputArgsBuilder_ == null) { + ensureInputArgsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, inputArgs_); + onChanged(); + } else { + inputArgsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Declares input arguments.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.OperatorDefinition.ArgumentDefinition input_args = 2; + * + */ + public Builder clearInputArgs() { + if (inputArgsBuilder_ == null) { + inputArgs_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + inputArgsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Declares input arguments.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.OperatorDefinition.ArgumentDefinition input_args = 2; + * + */ + public Builder removeInputArgs(int index) { + if (inputArgsBuilder_ == null) { + ensureInputArgsIsMutable(); + inputArgs_.remove(index); + onChanged(); + } else { + inputArgsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Declares input arguments.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.OperatorDefinition.ArgumentDefinition input_args = 2; + * + */ + public com.google.cloud.visionai.v1.OperatorDefinition.ArgumentDefinition.Builder + getInputArgsBuilder(int index) { + return getInputArgsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Declares input arguments.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.OperatorDefinition.ArgumentDefinition input_args = 2; + * + */ + public com.google.cloud.visionai.v1.OperatorDefinition.ArgumentDefinitionOrBuilder + getInputArgsOrBuilder(int index) { + if (inputArgsBuilder_ == null) { + return inputArgs_.get(index); + } else { + return inputArgsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Declares input arguments.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.OperatorDefinition.ArgumentDefinition input_args = 2; + * + */ + public java.util.List< + ? extends com.google.cloud.visionai.v1.OperatorDefinition.ArgumentDefinitionOrBuilder> + getInputArgsOrBuilderList() { + if (inputArgsBuilder_ != null) { + return inputArgsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(inputArgs_); + } + } + /** + * + * + *
+     * Declares input arguments.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.OperatorDefinition.ArgumentDefinition input_args = 2; + * + */ + public com.google.cloud.visionai.v1.OperatorDefinition.ArgumentDefinition.Builder + addInputArgsBuilder() { + return getInputArgsFieldBuilder() + .addBuilder( + com.google.cloud.visionai.v1.OperatorDefinition.ArgumentDefinition + .getDefaultInstance()); + } + /** + * + * + *
+     * Declares input arguments.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.OperatorDefinition.ArgumentDefinition input_args = 2; + * + */ + public com.google.cloud.visionai.v1.OperatorDefinition.ArgumentDefinition.Builder + addInputArgsBuilder(int index) { + return getInputArgsFieldBuilder() + .addBuilder( + index, + com.google.cloud.visionai.v1.OperatorDefinition.ArgumentDefinition + .getDefaultInstance()); + } + /** + * + * + *
+     * Declares input arguments.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.OperatorDefinition.ArgumentDefinition input_args = 2; + * + */ + public java.util.List< + com.google.cloud.visionai.v1.OperatorDefinition.ArgumentDefinition.Builder> + getInputArgsBuilderList() { + return getInputArgsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.visionai.v1.OperatorDefinition.ArgumentDefinition, + com.google.cloud.visionai.v1.OperatorDefinition.ArgumentDefinition.Builder, + com.google.cloud.visionai.v1.OperatorDefinition.ArgumentDefinitionOrBuilder> + getInputArgsFieldBuilder() { + if (inputArgsBuilder_ == null) { + inputArgsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.visionai.v1.OperatorDefinition.ArgumentDefinition, + com.google.cloud.visionai.v1.OperatorDefinition.ArgumentDefinition.Builder, + com.google.cloud.visionai.v1.OperatorDefinition.ArgumentDefinitionOrBuilder>( + inputArgs_, ((bitField0_ & 0x00000002) != 0), getParentForChildren(), isClean()); + inputArgs_ = null; + } + return inputArgsBuilder_; + } + + private java.util.List + outputArgs_ = java.util.Collections.emptyList(); + + private void ensureOutputArgsIsMutable() { + if (!((bitField0_ & 0x00000004) != 0)) { + outputArgs_ = + new java.util.ArrayList< + com.google.cloud.visionai.v1.OperatorDefinition.ArgumentDefinition>(outputArgs_); + bitField0_ |= 0x00000004; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.visionai.v1.OperatorDefinition.ArgumentDefinition, + com.google.cloud.visionai.v1.OperatorDefinition.ArgumentDefinition.Builder, + com.google.cloud.visionai.v1.OperatorDefinition.ArgumentDefinitionOrBuilder> + outputArgsBuilder_; + + /** + * + * + *
+     * Declares output arguments.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.OperatorDefinition.ArgumentDefinition output_args = 3; + * + */ + public java.util.List + getOutputArgsList() { + if (outputArgsBuilder_ == null) { + return java.util.Collections.unmodifiableList(outputArgs_); + } else { + return outputArgsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Declares output arguments.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.OperatorDefinition.ArgumentDefinition output_args = 3; + * + */ + public int getOutputArgsCount() { + if (outputArgsBuilder_ == null) { + return outputArgs_.size(); + } else { + return outputArgsBuilder_.getCount(); + } + } + /** + * + * + *
+     * Declares output arguments.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.OperatorDefinition.ArgumentDefinition output_args = 3; + * + */ + public com.google.cloud.visionai.v1.OperatorDefinition.ArgumentDefinition getOutputArgs( + int index) { + if (outputArgsBuilder_ == null) { + return outputArgs_.get(index); + } else { + return outputArgsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Declares output arguments.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.OperatorDefinition.ArgumentDefinition output_args = 3; + * + */ + public Builder setOutputArgs( + int index, com.google.cloud.visionai.v1.OperatorDefinition.ArgumentDefinition value) { + if (outputArgsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureOutputArgsIsMutable(); + outputArgs_.set(index, value); + onChanged(); + } else { + outputArgsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Declares output arguments.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.OperatorDefinition.ArgumentDefinition output_args = 3; + * + */ + public Builder setOutputArgs( + int index, + com.google.cloud.visionai.v1.OperatorDefinition.ArgumentDefinition.Builder + builderForValue) { + if (outputArgsBuilder_ == null) { + ensureOutputArgsIsMutable(); + outputArgs_.set(index, builderForValue.build()); + onChanged(); + } else { + outputArgsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Declares output arguments.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.OperatorDefinition.ArgumentDefinition output_args = 3; + * + */ + public Builder addOutputArgs( + com.google.cloud.visionai.v1.OperatorDefinition.ArgumentDefinition value) { + if (outputArgsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureOutputArgsIsMutable(); + outputArgs_.add(value); + onChanged(); + } else { + outputArgsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Declares output arguments.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.OperatorDefinition.ArgumentDefinition output_args = 3; + * + */ + public Builder addOutputArgs( + int index, com.google.cloud.visionai.v1.OperatorDefinition.ArgumentDefinition value) { + if (outputArgsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureOutputArgsIsMutable(); + outputArgs_.add(index, value); + onChanged(); + } else { + outputArgsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Declares output arguments.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.OperatorDefinition.ArgumentDefinition output_args = 3; + * + */ + public Builder addOutputArgs( + com.google.cloud.visionai.v1.OperatorDefinition.ArgumentDefinition.Builder + builderForValue) { + if (outputArgsBuilder_ == null) { + ensureOutputArgsIsMutable(); + outputArgs_.add(builderForValue.build()); + onChanged(); + } else { + outputArgsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Declares output arguments.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.OperatorDefinition.ArgumentDefinition output_args = 3; + * + */ + public Builder addOutputArgs( + int index, + com.google.cloud.visionai.v1.OperatorDefinition.ArgumentDefinition.Builder + builderForValue) { + if (outputArgsBuilder_ == null) { + ensureOutputArgsIsMutable(); + outputArgs_.add(index, builderForValue.build()); + onChanged(); + } else { + outputArgsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Declares output arguments.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.OperatorDefinition.ArgumentDefinition output_args = 3; + * + */ + public Builder addAllOutputArgs( + java.lang.Iterable< + ? extends com.google.cloud.visionai.v1.OperatorDefinition.ArgumentDefinition> + values) { + if (outputArgsBuilder_ == null) { + ensureOutputArgsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, outputArgs_); + onChanged(); + } else { + outputArgsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Declares output arguments.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.OperatorDefinition.ArgumentDefinition output_args = 3; + * + */ + public Builder clearOutputArgs() { + if (outputArgsBuilder_ == null) { + outputArgs_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + } else { + outputArgsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Declares output arguments.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.OperatorDefinition.ArgumentDefinition output_args = 3; + * + */ + public Builder removeOutputArgs(int index) { + if (outputArgsBuilder_ == null) { + ensureOutputArgsIsMutable(); + outputArgs_.remove(index); + onChanged(); + } else { + outputArgsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Declares output arguments.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.OperatorDefinition.ArgumentDefinition output_args = 3; + * + */ + public com.google.cloud.visionai.v1.OperatorDefinition.ArgumentDefinition.Builder + getOutputArgsBuilder(int index) { + return getOutputArgsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Declares output arguments.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.OperatorDefinition.ArgumentDefinition output_args = 3; + * + */ + public com.google.cloud.visionai.v1.OperatorDefinition.ArgumentDefinitionOrBuilder + getOutputArgsOrBuilder(int index) { + if (outputArgsBuilder_ == null) { + return outputArgs_.get(index); + } else { + return outputArgsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Declares output arguments.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.OperatorDefinition.ArgumentDefinition output_args = 3; + * + */ + public java.util.List< + ? extends com.google.cloud.visionai.v1.OperatorDefinition.ArgumentDefinitionOrBuilder> + getOutputArgsOrBuilderList() { + if (outputArgsBuilder_ != null) { + return outputArgsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(outputArgs_); + } + } + /** + * + * + *
+     * Declares output arguments.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.OperatorDefinition.ArgumentDefinition output_args = 3; + * + */ + public com.google.cloud.visionai.v1.OperatorDefinition.ArgumentDefinition.Builder + addOutputArgsBuilder() { + return getOutputArgsFieldBuilder() + .addBuilder( + com.google.cloud.visionai.v1.OperatorDefinition.ArgumentDefinition + .getDefaultInstance()); + } + /** + * + * + *
+     * Declares output arguments.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.OperatorDefinition.ArgumentDefinition output_args = 3; + * + */ + public com.google.cloud.visionai.v1.OperatorDefinition.ArgumentDefinition.Builder + addOutputArgsBuilder(int index) { + return getOutputArgsFieldBuilder() + .addBuilder( + index, + com.google.cloud.visionai.v1.OperatorDefinition.ArgumentDefinition + .getDefaultInstance()); + } + /** + * + * + *
+     * Declares output arguments.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.OperatorDefinition.ArgumentDefinition output_args = 3; + * + */ + public java.util.List< + com.google.cloud.visionai.v1.OperatorDefinition.ArgumentDefinition.Builder> + getOutputArgsBuilderList() { + return getOutputArgsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.visionai.v1.OperatorDefinition.ArgumentDefinition, + com.google.cloud.visionai.v1.OperatorDefinition.ArgumentDefinition.Builder, + com.google.cloud.visionai.v1.OperatorDefinition.ArgumentDefinitionOrBuilder> + getOutputArgsFieldBuilder() { + if (outputArgsBuilder_ == null) { + outputArgsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.visionai.v1.OperatorDefinition.ArgumentDefinition, + com.google.cloud.visionai.v1.OperatorDefinition.ArgumentDefinition.Builder, + com.google.cloud.visionai.v1.OperatorDefinition.ArgumentDefinitionOrBuilder>( + outputArgs_, ((bitField0_ & 0x00000004) != 0), getParentForChildren(), isClean()); + outputArgs_ = null; + } + return outputArgsBuilder_; + } + + private java.util.List + attributes_ = java.util.Collections.emptyList(); + + private void ensureAttributesIsMutable() { + if (!((bitField0_ & 0x00000008) != 0)) { + attributes_ = + new java.util.ArrayList< + com.google.cloud.visionai.v1.OperatorDefinition.AttributeDefinition>(attributes_); + bitField0_ |= 0x00000008; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.visionai.v1.OperatorDefinition.AttributeDefinition, + com.google.cloud.visionai.v1.OperatorDefinition.AttributeDefinition.Builder, + com.google.cloud.visionai.v1.OperatorDefinition.AttributeDefinitionOrBuilder> + attributesBuilder_; + + /** + * + * + *
+     * Declares the attributes.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.OperatorDefinition.AttributeDefinition attributes = 4; + * + */ + public java.util.List + getAttributesList() { + if (attributesBuilder_ == null) { + return java.util.Collections.unmodifiableList(attributes_); + } else { + return attributesBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Declares the attributes.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.OperatorDefinition.AttributeDefinition attributes = 4; + * + */ + public int getAttributesCount() { + if (attributesBuilder_ == null) { + return attributes_.size(); + } else { + return attributesBuilder_.getCount(); + } + } + /** + * + * + *
+     * Declares the attributes.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.OperatorDefinition.AttributeDefinition attributes = 4; + * + */ + public com.google.cloud.visionai.v1.OperatorDefinition.AttributeDefinition getAttributes( + int index) { + if (attributesBuilder_ == null) { + return attributes_.get(index); + } else { + return attributesBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Declares the attributes.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.OperatorDefinition.AttributeDefinition attributes = 4; + * + */ + public Builder setAttributes( + int index, com.google.cloud.visionai.v1.OperatorDefinition.AttributeDefinition value) { + if (attributesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAttributesIsMutable(); + attributes_.set(index, value); + onChanged(); + } else { + attributesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Declares the attributes.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.OperatorDefinition.AttributeDefinition attributes = 4; + * + */ + public Builder setAttributes( + int index, + com.google.cloud.visionai.v1.OperatorDefinition.AttributeDefinition.Builder + builderForValue) { + if (attributesBuilder_ == null) { + ensureAttributesIsMutable(); + attributes_.set(index, builderForValue.build()); + onChanged(); + } else { + attributesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Declares the attributes.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.OperatorDefinition.AttributeDefinition attributes = 4; + * + */ + public Builder addAttributes( + com.google.cloud.visionai.v1.OperatorDefinition.AttributeDefinition value) { + if (attributesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAttributesIsMutable(); + attributes_.add(value); + onChanged(); + } else { + attributesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Declares the attributes.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.OperatorDefinition.AttributeDefinition attributes = 4; + * + */ + public Builder addAttributes( + int index, com.google.cloud.visionai.v1.OperatorDefinition.AttributeDefinition value) { + if (attributesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAttributesIsMutable(); + attributes_.add(index, value); + onChanged(); + } else { + attributesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Declares the attributes.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.OperatorDefinition.AttributeDefinition attributes = 4; + * + */ + public Builder addAttributes( + com.google.cloud.visionai.v1.OperatorDefinition.AttributeDefinition.Builder + builderForValue) { + if (attributesBuilder_ == null) { + ensureAttributesIsMutable(); + attributes_.add(builderForValue.build()); + onChanged(); + } else { + attributesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Declares the attributes.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.OperatorDefinition.AttributeDefinition attributes = 4; + * + */ + public Builder addAttributes( + int index, + com.google.cloud.visionai.v1.OperatorDefinition.AttributeDefinition.Builder + builderForValue) { + if (attributesBuilder_ == null) { + ensureAttributesIsMutable(); + attributes_.add(index, builderForValue.build()); + onChanged(); + } else { + attributesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Declares the attributes.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.OperatorDefinition.AttributeDefinition attributes = 4; + * + */ + public Builder addAllAttributes( + java.lang.Iterable< + ? extends com.google.cloud.visionai.v1.OperatorDefinition.AttributeDefinition> + values) { + if (attributesBuilder_ == null) { + ensureAttributesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, attributes_); + onChanged(); + } else { + attributesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Declares the attributes.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.OperatorDefinition.AttributeDefinition attributes = 4; + * + */ + public Builder clearAttributes() { + if (attributesBuilder_ == null) { + attributes_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + } else { + attributesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Declares the attributes.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.OperatorDefinition.AttributeDefinition attributes = 4; + * + */ + public Builder removeAttributes(int index) { + if (attributesBuilder_ == null) { + ensureAttributesIsMutable(); + attributes_.remove(index); + onChanged(); + } else { + attributesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Declares the attributes.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.OperatorDefinition.AttributeDefinition attributes = 4; + * + */ + public com.google.cloud.visionai.v1.OperatorDefinition.AttributeDefinition.Builder + getAttributesBuilder(int index) { + return getAttributesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Declares the attributes.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.OperatorDefinition.AttributeDefinition attributes = 4; + * + */ + public com.google.cloud.visionai.v1.OperatorDefinition.AttributeDefinitionOrBuilder + getAttributesOrBuilder(int index) { + if (attributesBuilder_ == null) { + return attributes_.get(index); + } else { + return attributesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Declares the attributes.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.OperatorDefinition.AttributeDefinition attributes = 4; + * + */ + public java.util.List< + ? extends com.google.cloud.visionai.v1.OperatorDefinition.AttributeDefinitionOrBuilder> + getAttributesOrBuilderList() { + if (attributesBuilder_ != null) { + return attributesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(attributes_); + } + } + /** + * + * + *
+     * Declares the attributes.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.OperatorDefinition.AttributeDefinition attributes = 4; + * + */ + public com.google.cloud.visionai.v1.OperatorDefinition.AttributeDefinition.Builder + addAttributesBuilder() { + return getAttributesFieldBuilder() + .addBuilder( + com.google.cloud.visionai.v1.OperatorDefinition.AttributeDefinition + .getDefaultInstance()); + } + /** + * + * + *
+     * Declares the attributes.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.OperatorDefinition.AttributeDefinition attributes = 4; + * + */ + public com.google.cloud.visionai.v1.OperatorDefinition.AttributeDefinition.Builder + addAttributesBuilder(int index) { + return getAttributesFieldBuilder() + .addBuilder( + index, + com.google.cloud.visionai.v1.OperatorDefinition.AttributeDefinition + .getDefaultInstance()); + } + /** + * + * + *
+     * Declares the attributes.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.OperatorDefinition.AttributeDefinition attributes = 4; + * + */ + public java.util.List< + com.google.cloud.visionai.v1.OperatorDefinition.AttributeDefinition.Builder> + getAttributesBuilderList() { + return getAttributesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.visionai.v1.OperatorDefinition.AttributeDefinition, + com.google.cloud.visionai.v1.OperatorDefinition.AttributeDefinition.Builder, + com.google.cloud.visionai.v1.OperatorDefinition.AttributeDefinitionOrBuilder> + getAttributesFieldBuilder() { + if (attributesBuilder_ == null) { + attributesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.visionai.v1.OperatorDefinition.AttributeDefinition, + com.google.cloud.visionai.v1.OperatorDefinition.AttributeDefinition.Builder, + com.google.cloud.visionai.v1.OperatorDefinition.AttributeDefinitionOrBuilder>( + attributes_, ((bitField0_ & 0x00000008) != 0), getParentForChildren(), isClean()); + attributes_ = null; + } + return attributesBuilder_; + } + + private com.google.cloud.visionai.v1.ResourceSpecification resources_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.ResourceSpecification, + com.google.cloud.visionai.v1.ResourceSpecification.Builder, + com.google.cloud.visionai.v1.ResourceSpecificationOrBuilder> + resourcesBuilder_; + /** + * + * + *
+     * The resources for running the operator.
+     * 
+ * + * .google.cloud.visionai.v1.ResourceSpecification resources = 5; + * + * @return Whether the resources field is set. + */ + public boolean hasResources() { + return ((bitField0_ & 0x00000010) != 0); + } + /** + * + * + *
+     * The resources for running the operator.
+     * 
+ * + * .google.cloud.visionai.v1.ResourceSpecification resources = 5; + * + * @return The resources. + */ + public com.google.cloud.visionai.v1.ResourceSpecification getResources() { + if (resourcesBuilder_ == null) { + return resources_ == null + ? com.google.cloud.visionai.v1.ResourceSpecification.getDefaultInstance() + : resources_; + } else { + return resourcesBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The resources for running the operator.
+     * 
+ * + * .google.cloud.visionai.v1.ResourceSpecification resources = 5; + */ + public Builder setResources(com.google.cloud.visionai.v1.ResourceSpecification value) { + if (resourcesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + resources_ = value; + } else { + resourcesBuilder_.setMessage(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * The resources for running the operator.
+     * 
+ * + * .google.cloud.visionai.v1.ResourceSpecification resources = 5; + */ + public Builder setResources( + com.google.cloud.visionai.v1.ResourceSpecification.Builder builderForValue) { + if (resourcesBuilder_ == null) { + resources_ = builderForValue.build(); + } else { + resourcesBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * The resources for running the operator.
+     * 
+ * + * .google.cloud.visionai.v1.ResourceSpecification resources = 5; + */ + public Builder mergeResources(com.google.cloud.visionai.v1.ResourceSpecification value) { + if (resourcesBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0) + && resources_ != null + && resources_ + != com.google.cloud.visionai.v1.ResourceSpecification.getDefaultInstance()) { + getResourcesBuilder().mergeFrom(value); + } else { + resources_ = value; + } + } else { + resourcesBuilder_.mergeFrom(value); + } + if (resources_ != null) { + bitField0_ |= 0x00000010; + onChanged(); + } + return this; + } + /** + * + * + *
+     * The resources for running the operator.
+     * 
+ * + * .google.cloud.visionai.v1.ResourceSpecification resources = 5; + */ + public Builder clearResources() { + bitField0_ = (bitField0_ & ~0x00000010); + resources_ = null; + if (resourcesBuilder_ != null) { + resourcesBuilder_.dispose(); + resourcesBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * The resources for running the operator.
+     * 
+ * + * .google.cloud.visionai.v1.ResourceSpecification resources = 5; + */ + public com.google.cloud.visionai.v1.ResourceSpecification.Builder getResourcesBuilder() { + bitField0_ |= 0x00000010; + onChanged(); + return getResourcesFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The resources for running the operator.
+     * 
+ * + * .google.cloud.visionai.v1.ResourceSpecification resources = 5; + */ + public com.google.cloud.visionai.v1.ResourceSpecificationOrBuilder getResourcesOrBuilder() { + if (resourcesBuilder_ != null) { + return resourcesBuilder_.getMessageOrBuilder(); + } else { + return resources_ == null + ? com.google.cloud.visionai.v1.ResourceSpecification.getDefaultInstance() + : resources_; + } + } + /** + * + * + *
+     * The resources for running the operator.
+     * 
+ * + * .google.cloud.visionai.v1.ResourceSpecification resources = 5; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.ResourceSpecification, + com.google.cloud.visionai.v1.ResourceSpecification.Builder, + com.google.cloud.visionai.v1.ResourceSpecificationOrBuilder> + getResourcesFieldBuilder() { + if (resourcesBuilder_ == null) { + resourcesBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.ResourceSpecification, + com.google.cloud.visionai.v1.ResourceSpecification.Builder, + com.google.cloud.visionai.v1.ResourceSpecificationOrBuilder>( + getResources(), getParentForChildren(), isClean()); + resources_ = null; + } + return resourcesBuilder_; + } + + private java.lang.Object shortDescription_ = ""; + /** + * + * + *
+     * Short description of the operator.
+     * 
+ * + * string short_description = 6; + * + * @return The shortDescription. + */ + public java.lang.String getShortDescription() { + java.lang.Object ref = shortDescription_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + shortDescription_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Short description of the operator.
+     * 
+ * + * string short_description = 6; + * + * @return The bytes for shortDescription. + */ + public com.google.protobuf.ByteString getShortDescriptionBytes() { + java.lang.Object ref = shortDescription_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + shortDescription_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Short description of the operator.
+     * 
+ * + * string short_description = 6; + * + * @param value The shortDescription to set. + * @return This builder for chaining. + */ + public Builder setShortDescription(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + shortDescription_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * Short description of the operator.
+     * 
+ * + * string short_description = 6; + * + * @return This builder for chaining. + */ + public Builder clearShortDescription() { + shortDescription_ = getDefaultInstance().getShortDescription(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + return this; + } + /** + * + * + *
+     * Short description of the operator.
+     * 
+ * + * string short_description = 6; + * + * @param value The bytes for shortDescription to set. + * @return This builder for chaining. + */ + public Builder setShortDescriptionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + shortDescription_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + private java.lang.Object description_ = ""; + /** + * + * + *
+     * Full description of the operator.
+     * 
+ * + * string description = 7; + * + * @return The description. + */ + 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; + } + } + /** + * + * + *
+     * Full description of the operator.
+     * 
+ * + * string description = 7; + * + * @return The bytes for description. + */ + 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; + } + } + /** + * + * + *
+     * Full description of the operator.
+     * 
+ * + * string description = 7; + * + * @param value The description to set. + * @return This builder for chaining. + */ + public Builder setDescription(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + description_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * + * + *
+     * Full description of the operator.
+     * 
+ * + * string description = 7; + * + * @return This builder for chaining. + */ + public Builder clearDescription() { + description_ = getDefaultInstance().getDescription(); + bitField0_ = (bitField0_ & ~0x00000040); + onChanged(); + return this; + } + /** + * + * + *
+     * Full description of the operator.
+     * 
+ * + * string description = 7; + * + * @param value The bytes for description to set. + * @return This builder for chaining. + */ + public Builder setDescriptionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + description_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.OperatorDefinition) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.OperatorDefinition) + private static final com.google.cloud.visionai.v1.OperatorDefinition DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.OperatorDefinition(); + } + + public static com.google.cloud.visionai.v1.OperatorDefinition getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public OperatorDefinition parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.OperatorDefinition getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/OperatorDefinitionOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/OperatorDefinitionOrBuilder.java new file mode 100644 index 000000000000..ac5a2b9393f0 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/OperatorDefinitionOrBuilder.java @@ -0,0 +1,322 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/lva.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface OperatorDefinitionOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.OperatorDefinition) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The name of this operator.
+   *
+   * Tentatively [A-Z][a-zA-Z0-9]*, e.g., BboxCounter, PetDetector,
+   * PetDetector1.
+   * 
+ * + * string operator = 1; + * + * @return The operator. + */ + java.lang.String getOperator(); + /** + * + * + *
+   * The name of this operator.
+   *
+   * Tentatively [A-Z][a-zA-Z0-9]*, e.g., BboxCounter, PetDetector,
+   * PetDetector1.
+   * 
+ * + * string operator = 1; + * + * @return The bytes for operator. + */ + com.google.protobuf.ByteString getOperatorBytes(); + + /** + * + * + *
+   * Declares input arguments.
+   * 
+ * + * repeated .google.cloud.visionai.v1.OperatorDefinition.ArgumentDefinition input_args = 2; + * + */ + java.util.List + getInputArgsList(); + /** + * + * + *
+   * Declares input arguments.
+   * 
+ * + * repeated .google.cloud.visionai.v1.OperatorDefinition.ArgumentDefinition input_args = 2; + * + */ + com.google.cloud.visionai.v1.OperatorDefinition.ArgumentDefinition getInputArgs(int index); + /** + * + * + *
+   * Declares input arguments.
+   * 
+ * + * repeated .google.cloud.visionai.v1.OperatorDefinition.ArgumentDefinition input_args = 2; + * + */ + int getInputArgsCount(); + /** + * + * + *
+   * Declares input arguments.
+   * 
+ * + * repeated .google.cloud.visionai.v1.OperatorDefinition.ArgumentDefinition input_args = 2; + * + */ + java.util.List< + ? extends com.google.cloud.visionai.v1.OperatorDefinition.ArgumentDefinitionOrBuilder> + getInputArgsOrBuilderList(); + /** + * + * + *
+   * Declares input arguments.
+   * 
+ * + * repeated .google.cloud.visionai.v1.OperatorDefinition.ArgumentDefinition input_args = 2; + * + */ + com.google.cloud.visionai.v1.OperatorDefinition.ArgumentDefinitionOrBuilder getInputArgsOrBuilder( + int index); + + /** + * + * + *
+   * Declares output arguments.
+   * 
+ * + * repeated .google.cloud.visionai.v1.OperatorDefinition.ArgumentDefinition output_args = 3; + * + */ + java.util.List + getOutputArgsList(); + /** + * + * + *
+   * Declares output arguments.
+   * 
+ * + * repeated .google.cloud.visionai.v1.OperatorDefinition.ArgumentDefinition output_args = 3; + * + */ + com.google.cloud.visionai.v1.OperatorDefinition.ArgumentDefinition getOutputArgs(int index); + /** + * + * + *
+   * Declares output arguments.
+   * 
+ * + * repeated .google.cloud.visionai.v1.OperatorDefinition.ArgumentDefinition output_args = 3; + * + */ + int getOutputArgsCount(); + /** + * + * + *
+   * Declares output arguments.
+   * 
+ * + * repeated .google.cloud.visionai.v1.OperatorDefinition.ArgumentDefinition output_args = 3; + * + */ + java.util.List< + ? extends com.google.cloud.visionai.v1.OperatorDefinition.ArgumentDefinitionOrBuilder> + getOutputArgsOrBuilderList(); + /** + * + * + *
+   * Declares output arguments.
+   * 
+ * + * repeated .google.cloud.visionai.v1.OperatorDefinition.ArgumentDefinition output_args = 3; + * + */ + com.google.cloud.visionai.v1.OperatorDefinition.ArgumentDefinitionOrBuilder + getOutputArgsOrBuilder(int index); + + /** + * + * + *
+   * Declares the attributes.
+   * 
+ * + * repeated .google.cloud.visionai.v1.OperatorDefinition.AttributeDefinition attributes = 4; + * + */ + java.util.List + getAttributesList(); + /** + * + * + *
+   * Declares the attributes.
+   * 
+ * + * repeated .google.cloud.visionai.v1.OperatorDefinition.AttributeDefinition attributes = 4; + * + */ + com.google.cloud.visionai.v1.OperatorDefinition.AttributeDefinition getAttributes(int index); + /** + * + * + *
+   * Declares the attributes.
+   * 
+ * + * repeated .google.cloud.visionai.v1.OperatorDefinition.AttributeDefinition attributes = 4; + * + */ + int getAttributesCount(); + /** + * + * + *
+   * Declares the attributes.
+   * 
+ * + * repeated .google.cloud.visionai.v1.OperatorDefinition.AttributeDefinition attributes = 4; + * + */ + java.util.List< + ? extends com.google.cloud.visionai.v1.OperatorDefinition.AttributeDefinitionOrBuilder> + getAttributesOrBuilderList(); + /** + * + * + *
+   * Declares the attributes.
+   * 
+ * + * repeated .google.cloud.visionai.v1.OperatorDefinition.AttributeDefinition attributes = 4; + * + */ + com.google.cloud.visionai.v1.OperatorDefinition.AttributeDefinitionOrBuilder + getAttributesOrBuilder(int index); + + /** + * + * + *
+   * The resources for running the operator.
+   * 
+ * + * .google.cloud.visionai.v1.ResourceSpecification resources = 5; + * + * @return Whether the resources field is set. + */ + boolean hasResources(); + /** + * + * + *
+   * The resources for running the operator.
+   * 
+ * + * .google.cloud.visionai.v1.ResourceSpecification resources = 5; + * + * @return The resources. + */ + com.google.cloud.visionai.v1.ResourceSpecification getResources(); + /** + * + * + *
+   * The resources for running the operator.
+   * 
+ * + * .google.cloud.visionai.v1.ResourceSpecification resources = 5; + */ + com.google.cloud.visionai.v1.ResourceSpecificationOrBuilder getResourcesOrBuilder(); + + /** + * + * + *
+   * Short description of the operator.
+   * 
+ * + * string short_description = 6; + * + * @return The shortDescription. + */ + java.lang.String getShortDescription(); + /** + * + * + *
+   * Short description of the operator.
+   * 
+ * + * string short_description = 6; + * + * @return The bytes for shortDescription. + */ + com.google.protobuf.ByteString getShortDescriptionBytes(); + + /** + * + * + *
+   * Full description of the operator.
+   * 
+ * + * string description = 7; + * + * @return The description. + */ + java.lang.String getDescription(); + /** + * + * + *
+   * Full description of the operator.
+   * 
+ * + * string description = 7; + * + * @return The bytes for description. + */ + com.google.protobuf.ByteString getDescriptionBytes(); +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/OperatorName.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/OperatorName.java new file mode 100644 index 000000000000..a4d9dae0c924 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/OperatorName.java @@ -0,0 +1,223 @@ +/* + * Copyright 2024 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.visionai.v1; + +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") +public class OperatorName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION_OPERATOR = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/operators/{operator}"); + private volatile Map fieldValuesMap; + private final String project; + private final String location; + private final String operator; + + @Deprecated + protected OperatorName() { + project = null; + location = null; + operator = null; + } + + private OperatorName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + operator = Preconditions.checkNotNull(builder.getOperator()); + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getOperator() { + return operator; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static OperatorName of(String project, String location, String operator) { + return newBuilder().setProject(project).setLocation(location).setOperator(operator).build(); + } + + public static String format(String project, String location, String operator) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setOperator(operator) + .build() + .toString(); + } + + public static OperatorName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION_OPERATOR.validatedMatch( + formattedString, "OperatorName.parse: formattedString not in valid format"); + return of(matchMap.get("project"), matchMap.get("location"), matchMap.get("operator")); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List values) { + List list = new ArrayList<>(values.size()); + for (OperatorName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION_OPERATOR.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (project != null) { + fieldMapBuilder.put("project", project); + } + if (location != null) { + fieldMapBuilder.put("location", location); + } + if (operator != null) { + fieldMapBuilder.put("operator", operator); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION_OPERATOR.instantiate( + "project", project, "location", location, "operator", operator); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null && getClass() == o.getClass()) { + OperatorName that = ((OperatorName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location) + && Objects.equals(this.operator, that.operator); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(project); + h *= 1000003; + h ^= Objects.hashCode(location); + h *= 1000003; + h ^= Objects.hashCode(operator); + return h; + } + + /** Builder for projects/{project}/locations/{location}/operators/{operator}. */ + public static class Builder { + private String project; + private String location; + private String operator; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getOperator() { + return operator; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setOperator(String operator) { + this.operator = operator; + return this; + } + + private Builder(OperatorName operatorName) { + this.project = operatorName.project; + this.location = operatorName.location; + this.operator = operatorName.operator; + } + + public OperatorName build() { + return new OperatorName(this); + } + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/OperatorOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/OperatorOrBuilder.java new file mode 100644 index 000000000000..d78f884c452f --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/OperatorOrBuilder.java @@ -0,0 +1,245 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/lva_resources.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface OperatorOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.Operator) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Name of the resource.
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Name of the resource.
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Output only. The create timestamp.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + /** + * + * + *
+   * Output only. The create timestamp.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + * + * + *
+   * Output only. The create timestamp.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. The update timestamp.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + /** + * + * + *
+   * Output only. The update timestamp.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + /** + * + * + *
+   * Output only. The update timestamp.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); + + /** + * + * + *
+   * Labels as key value pairs.
+   * 
+ * + * map<string, string> labels = 4; + */ + int getLabelsCount(); + /** + * + * + *
+   * Labels as key value pairs.
+   * 
+ * + * map<string, string> labels = 4; + */ + boolean containsLabels(java.lang.String key); + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Deprecated + java.util.Map getLabels(); + /** + * + * + *
+   * Labels as key value pairs.
+   * 
+ * + * map<string, string> labels = 4; + */ + java.util.Map getLabelsMap(); + /** + * + * + *
+   * Labels as key value pairs.
+   * 
+ * + * map<string, string> labels = 4; + */ + /* nullable */ + java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue); + /** + * + * + *
+   * Labels as key value pairs.
+   * 
+ * + * map<string, string> labels = 4; + */ + java.lang.String getLabelsOrThrow(java.lang.String key); + + /** + * + * + *
+   * The definition of the operator.
+   * 
+ * + * .google.cloud.visionai.v1.OperatorDefinition operator_definition = 5; + * + * @return Whether the operatorDefinition field is set. + */ + boolean hasOperatorDefinition(); + /** + * + * + *
+   * The definition of the operator.
+   * 
+ * + * .google.cloud.visionai.v1.OperatorDefinition operator_definition = 5; + * + * @return The operatorDefinition. + */ + com.google.cloud.visionai.v1.OperatorDefinition getOperatorDefinition(); + /** + * + * + *
+   * The definition of the operator.
+   * 
+ * + * .google.cloud.visionai.v1.OperatorDefinition operator_definition = 5; + */ + com.google.cloud.visionai.v1.OperatorDefinitionOrBuilder getOperatorDefinitionOrBuilder(); + + /** + * + * + *
+   * The link to the docker image of the operator.
+   * 
+ * + * string docker_image = 6; + * + * @return The dockerImage. + */ + java.lang.String getDockerImage(); + /** + * + * + *
+   * The link to the docker image of the operator.
+   * 
+ * + * string docker_image = 6; + * + * @return The bytes for dockerImage. + */ + com.google.protobuf.ByteString getDockerImageBytes(); +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/OperatorQuery.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/OperatorQuery.java new file mode 100644 index 000000000000..aedfbe1e5abe --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/OperatorQuery.java @@ -0,0 +1,968 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/lva_service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * OperatorQuery represents one query to a Operator.
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.OperatorQuery} + */ +public final class OperatorQuery extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.OperatorQuery) + OperatorQueryOrBuilder { + private static final long serialVersionUID = 0L; + // Use OperatorQuery.newBuilder() to construct. + private OperatorQuery(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private OperatorQuery() { + operator_ = ""; + tag_ = ""; + registry_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new OperatorQuery(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.LvaServiceProto + .internal_static_google_cloud_visionai_v1_OperatorQuery_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.LvaServiceProto + .internal_static_google_cloud_visionai_v1_OperatorQuery_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.OperatorQuery.class, + com.google.cloud.visionai.v1.OperatorQuery.Builder.class); + } + + public static final int OPERATOR_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object operator_ = ""; + /** + * + * + *
+   * Required. The canonical Name of the operator. e.g. OccupancyCounting.
+   * 
+ * + * string operator = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The operator. + */ + @java.lang.Override + public java.lang.String getOperator() { + java.lang.Object ref = operator_; + 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(); + operator_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The canonical Name of the operator. e.g. OccupancyCounting.
+   * 
+ * + * string operator = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for operator. + */ + @java.lang.Override + public com.google.protobuf.ByteString getOperatorBytes() { + java.lang.Object ref = operator_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + operator_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TAG_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object tag_ = ""; + /** + * + * + *
+   * Optional. Tag of the operator.
+   * 
+ * + * string tag = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The tag. + */ + @java.lang.Override + public java.lang.String getTag() { + java.lang.Object ref = tag_; + 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(); + tag_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. Tag of the operator.
+   * 
+ * + * string tag = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for tag. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTagBytes() { + java.lang.Object ref = tag_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + tag_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int REGISTRY_FIELD_NUMBER = 3; + private int registry_ = 0; + /** + * + * + *
+   * Optional. Registry of the operator.
+   * 
+ * + * + * .google.cloud.visionai.v1.Registry registry = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for registry. + */ + @java.lang.Override + public int getRegistryValue() { + return registry_; + } + /** + * + * + *
+   * Optional. Registry of the operator.
+   * 
+ * + * + * .google.cloud.visionai.v1.Registry registry = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The registry. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.Registry getRegistry() { + com.google.cloud.visionai.v1.Registry result = + com.google.cloud.visionai.v1.Registry.forNumber(registry_); + return result == null ? com.google.cloud.visionai.v1.Registry.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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(operator_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, operator_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(tag_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, tag_); + } + if (registry_ != com.google.cloud.visionai.v1.Registry.REGISTRY_UNSPECIFIED.getNumber()) { + output.writeEnum(3, registry_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(operator_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, operator_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(tag_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, tag_); + } + if (registry_ != com.google.cloud.visionai.v1.Registry.REGISTRY_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(3, registry_); + } + size += getUnknownFields().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.visionai.v1.OperatorQuery)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.OperatorQuery other = + (com.google.cloud.visionai.v1.OperatorQuery) obj; + + if (!getOperator().equals(other.getOperator())) return false; + if (!getTag().equals(other.getTag())) return false; + if (registry_ != other.registry_) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + OPERATOR_FIELD_NUMBER; + hash = (53 * hash) + getOperator().hashCode(); + hash = (37 * hash) + TAG_FIELD_NUMBER; + hash = (53 * hash) + getTag().hashCode(); + hash = (37 * hash) + REGISTRY_FIELD_NUMBER; + hash = (53 * hash) + registry_; + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.OperatorQuery parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.OperatorQuery 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.visionai.v1.OperatorQuery parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.OperatorQuery 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.visionai.v1.OperatorQuery parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.OperatorQuery parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.OperatorQuery parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.OperatorQuery 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.visionai.v1.OperatorQuery parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.OperatorQuery 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.visionai.v1.OperatorQuery parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.OperatorQuery 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.visionai.v1.OperatorQuery 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; + } + /** + * + * + *
+   * OperatorQuery represents one query to a Operator.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.OperatorQuery} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.OperatorQuery) + com.google.cloud.visionai.v1.OperatorQueryOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.LvaServiceProto + .internal_static_google_cloud_visionai_v1_OperatorQuery_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.LvaServiceProto + .internal_static_google_cloud_visionai_v1_OperatorQuery_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.OperatorQuery.class, + com.google.cloud.visionai.v1.OperatorQuery.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.OperatorQuery.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + operator_ = ""; + tag_ = ""; + registry_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.LvaServiceProto + .internal_static_google_cloud_visionai_v1_OperatorQuery_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.OperatorQuery getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.OperatorQuery.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.OperatorQuery build() { + com.google.cloud.visionai.v1.OperatorQuery result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.OperatorQuery buildPartial() { + com.google.cloud.visionai.v1.OperatorQuery result = + new com.google.cloud.visionai.v1.OperatorQuery(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.visionai.v1.OperatorQuery result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.operator_ = operator_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.tag_ = tag_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.registry_ = registry_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.OperatorQuery) { + return mergeFrom((com.google.cloud.visionai.v1.OperatorQuery) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.OperatorQuery other) { + if (other == com.google.cloud.visionai.v1.OperatorQuery.getDefaultInstance()) return this; + if (!other.getOperator().isEmpty()) { + operator_ = other.operator_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getTag().isEmpty()) { + tag_ = other.tag_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.registry_ != 0) { + setRegistryValue(other.getRegistryValue()); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + operator_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + tag_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 24: + { + registry_ = input.readEnum(); + bitField0_ |= 0x00000004; + break; + } // case 24 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object operator_ = ""; + /** + * + * + *
+     * Required. The canonical Name of the operator. e.g. OccupancyCounting.
+     * 
+ * + * string operator = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The operator. + */ + public java.lang.String getOperator() { + java.lang.Object ref = operator_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + operator_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The canonical Name of the operator. e.g. OccupancyCounting.
+     * 
+ * + * string operator = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for operator. + */ + public com.google.protobuf.ByteString getOperatorBytes() { + java.lang.Object ref = operator_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + operator_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The canonical Name of the operator. e.g. OccupancyCounting.
+     * 
+ * + * string operator = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The operator to set. + * @return This builder for chaining. + */ + public Builder setOperator(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + operator_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The canonical Name of the operator. e.g. OccupancyCounting.
+     * 
+ * + * string operator = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearOperator() { + operator_ = getDefaultInstance().getOperator(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The canonical Name of the operator. e.g. OccupancyCounting.
+     * 
+ * + * string operator = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for operator to set. + * @return This builder for chaining. + */ + public Builder setOperatorBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + operator_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object tag_ = ""; + /** + * + * + *
+     * Optional. Tag of the operator.
+     * 
+ * + * string tag = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The tag. + */ + public java.lang.String getTag() { + java.lang.Object ref = tag_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + tag_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. Tag of the operator.
+     * 
+ * + * string tag = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for tag. + */ + public com.google.protobuf.ByteString getTagBytes() { + java.lang.Object ref = tag_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + tag_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. Tag of the operator.
+     * 
+ * + * string tag = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The tag to set. + * @return This builder for chaining. + */ + public Builder setTag(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + tag_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Tag of the operator.
+     * 
+ * + * string tag = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearTag() { + tag_ = getDefaultInstance().getTag(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Tag of the operator.
+     * 
+ * + * string tag = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for tag to set. + * @return This builder for chaining. + */ + public Builder setTagBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + tag_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private int registry_ = 0; + /** + * + * + *
+     * Optional. Registry of the operator.
+     * 
+ * + * + * .google.cloud.visionai.v1.Registry registry = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for registry. + */ + @java.lang.Override + public int getRegistryValue() { + return registry_; + } + /** + * + * + *
+     * Optional. Registry of the operator.
+     * 
+ * + * + * .google.cloud.visionai.v1.Registry registry = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The enum numeric value on the wire for registry to set. + * @return This builder for chaining. + */ + public Builder setRegistryValue(int value) { + registry_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Registry of the operator.
+     * 
+ * + * + * .google.cloud.visionai.v1.Registry registry = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The registry. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.Registry getRegistry() { + com.google.cloud.visionai.v1.Registry result = + com.google.cloud.visionai.v1.Registry.forNumber(registry_); + return result == null ? com.google.cloud.visionai.v1.Registry.UNRECOGNIZED : result; + } + /** + * + * + *
+     * Optional. Registry of the operator.
+     * 
+ * + * + * .google.cloud.visionai.v1.Registry registry = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The registry to set. + * @return This builder for chaining. + */ + public Builder setRegistry(com.google.cloud.visionai.v1.Registry value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000004; + registry_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Registry of the operator.
+     * 
+ * + * + * .google.cloud.visionai.v1.Registry registry = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearRegistry() { + bitField0_ = (bitField0_ & ~0x00000004); + registry_ = 0; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.OperatorQuery) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.OperatorQuery) + private static final com.google.cloud.visionai.v1.OperatorQuery DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.OperatorQuery(); + } + + public static com.google.cloud.visionai.v1.OperatorQuery getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public OperatorQuery parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.OperatorQuery getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/OperatorQueryOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/OperatorQueryOrBuilder.java new file mode 100644 index 000000000000..f6de9410ef7d --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/OperatorQueryOrBuilder.java @@ -0,0 +1,105 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/lva_service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface OperatorQueryOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.OperatorQuery) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The canonical Name of the operator. e.g. OccupancyCounting.
+   * 
+ * + * string operator = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The operator. + */ + java.lang.String getOperator(); + /** + * + * + *
+   * Required. The canonical Name of the operator. e.g. OccupancyCounting.
+   * 
+ * + * string operator = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for operator. + */ + com.google.protobuf.ByteString getOperatorBytes(); + + /** + * + * + *
+   * Optional. Tag of the operator.
+   * 
+ * + * string tag = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The tag. + */ + java.lang.String getTag(); + /** + * + * + *
+   * Optional. Tag of the operator.
+   * 
+ * + * string tag = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for tag. + */ + com.google.protobuf.ByteString getTagBytes(); + + /** + * + * + *
+   * Optional. Registry of the operator.
+   * 
+ * + * + * .google.cloud.visionai.v1.Registry registry = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for registry. + */ + int getRegistryValue(); + /** + * + * + *
+   * Optional. Registry of the operator.
+   * 
+ * + * + * .google.cloud.visionai.v1.Registry registry = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The registry. + */ + com.google.cloud.visionai.v1.Registry getRegistry(); +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/Packet.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/Packet.java new file mode 100644 index 000000000000..3a50c29df29f --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/Packet.java @@ -0,0 +1,814 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/streaming_resources.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * The quanta of datum that the series accepts.
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.Packet} + */ +public final class Packet extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.Packet) + PacketOrBuilder { + private static final long serialVersionUID = 0L; + // Use Packet.newBuilder() to construct. + private Packet(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Packet() { + payload_ = com.google.protobuf.ByteString.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Packet(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.StreamingResourcesProto + .internal_static_google_cloud_visionai_v1_Packet_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.StreamingResourcesProto + .internal_static_google_cloud_visionai_v1_Packet_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.Packet.class, + com.google.cloud.visionai.v1.Packet.Builder.class); + } + + private int bitField0_; + public static final int HEADER_FIELD_NUMBER = 1; + private com.google.cloud.visionai.v1.PacketHeader header_; + /** + * + * + *
+   * The packet header.
+   * 
+ * + * .google.cloud.visionai.v1.PacketHeader header = 1; + * + * @return Whether the header field is set. + */ + @java.lang.Override + public boolean hasHeader() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * The packet header.
+   * 
+ * + * .google.cloud.visionai.v1.PacketHeader header = 1; + * + * @return The header. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.PacketHeader getHeader() { + return header_ == null + ? com.google.cloud.visionai.v1.PacketHeader.getDefaultInstance() + : header_; + } + /** + * + * + *
+   * The packet header.
+   * 
+ * + * .google.cloud.visionai.v1.PacketHeader header = 1; + */ + @java.lang.Override + public com.google.cloud.visionai.v1.PacketHeaderOrBuilder getHeaderOrBuilder() { + return header_ == null + ? com.google.cloud.visionai.v1.PacketHeader.getDefaultInstance() + : header_; + } + + public static final int PAYLOAD_FIELD_NUMBER = 2; + private com.google.protobuf.ByteString payload_ = com.google.protobuf.ByteString.EMPTY; + /** + * + * + *
+   * The payload of the packet.
+   * 
+ * + * bytes payload = 2; + * + * @return The payload. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPayload() { + return payload_; + } + + 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 (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getHeader()); + } + if (!payload_.isEmpty()) { + output.writeBytes(2, payload_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getHeader()); + } + if (!payload_.isEmpty()) { + size += com.google.protobuf.CodedOutputStream.computeBytesSize(2, payload_); + } + size += getUnknownFields().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.visionai.v1.Packet)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.Packet other = (com.google.cloud.visionai.v1.Packet) obj; + + if (hasHeader() != other.hasHeader()) return false; + if (hasHeader()) { + if (!getHeader().equals(other.getHeader())) return false; + } + if (!getPayload().equals(other.getPayload())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasHeader()) { + hash = (37 * hash) + HEADER_FIELD_NUMBER; + hash = (53 * hash) + getHeader().hashCode(); + } + hash = (37 * hash) + PAYLOAD_FIELD_NUMBER; + hash = (53 * hash) + getPayload().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.Packet parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.Packet 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.visionai.v1.Packet parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.Packet 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.visionai.v1.Packet parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.Packet parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.Packet parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.Packet 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.visionai.v1.Packet parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.Packet 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.visionai.v1.Packet parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.Packet 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.visionai.v1.Packet 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 quanta of datum that the series accepts.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.Packet} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.Packet) + com.google.cloud.visionai.v1.PacketOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.StreamingResourcesProto + .internal_static_google_cloud_visionai_v1_Packet_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.StreamingResourcesProto + .internal_static_google_cloud_visionai_v1_Packet_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.Packet.class, + com.google.cloud.visionai.v1.Packet.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.Packet.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getHeaderFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + header_ = null; + if (headerBuilder_ != null) { + headerBuilder_.dispose(); + headerBuilder_ = null; + } + payload_ = com.google.protobuf.ByteString.EMPTY; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.StreamingResourcesProto + .internal_static_google_cloud_visionai_v1_Packet_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.Packet getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.Packet.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.Packet build() { + com.google.cloud.visionai.v1.Packet result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.Packet buildPartial() { + com.google.cloud.visionai.v1.Packet result = new com.google.cloud.visionai.v1.Packet(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.visionai.v1.Packet result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.header_ = headerBuilder_ == null ? header_ : headerBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.payload_ = payload_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.Packet) { + return mergeFrom((com.google.cloud.visionai.v1.Packet) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.Packet other) { + if (other == com.google.cloud.visionai.v1.Packet.getDefaultInstance()) return this; + if (other.hasHeader()) { + mergeHeader(other.getHeader()); + } + if (other.getPayload() != com.google.protobuf.ByteString.EMPTY) { + setPayload(other.getPayload()); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getHeaderFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + payload_ = input.readBytes(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.cloud.visionai.v1.PacketHeader header_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.PacketHeader, + com.google.cloud.visionai.v1.PacketHeader.Builder, + com.google.cloud.visionai.v1.PacketHeaderOrBuilder> + headerBuilder_; + /** + * + * + *
+     * The packet header.
+     * 
+ * + * .google.cloud.visionai.v1.PacketHeader header = 1; + * + * @return Whether the header field is set. + */ + public boolean hasHeader() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * The packet header.
+     * 
+ * + * .google.cloud.visionai.v1.PacketHeader header = 1; + * + * @return The header. + */ + public com.google.cloud.visionai.v1.PacketHeader getHeader() { + if (headerBuilder_ == null) { + return header_ == null + ? com.google.cloud.visionai.v1.PacketHeader.getDefaultInstance() + : header_; + } else { + return headerBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The packet header.
+     * 
+ * + * .google.cloud.visionai.v1.PacketHeader header = 1; + */ + public Builder setHeader(com.google.cloud.visionai.v1.PacketHeader value) { + if (headerBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + header_ = value; + } else { + headerBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The packet header.
+     * 
+ * + * .google.cloud.visionai.v1.PacketHeader header = 1; + */ + public Builder setHeader(com.google.cloud.visionai.v1.PacketHeader.Builder builderForValue) { + if (headerBuilder_ == null) { + header_ = builderForValue.build(); + } else { + headerBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The packet header.
+     * 
+ * + * .google.cloud.visionai.v1.PacketHeader header = 1; + */ + public Builder mergeHeader(com.google.cloud.visionai.v1.PacketHeader value) { + if (headerBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && header_ != null + && header_ != com.google.cloud.visionai.v1.PacketHeader.getDefaultInstance()) { + getHeaderBuilder().mergeFrom(value); + } else { + header_ = value; + } + } else { + headerBuilder_.mergeFrom(value); + } + if (header_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + /** + * + * + *
+     * The packet header.
+     * 
+ * + * .google.cloud.visionai.v1.PacketHeader header = 1; + */ + public Builder clearHeader() { + bitField0_ = (bitField0_ & ~0x00000001); + header_ = null; + if (headerBuilder_ != null) { + headerBuilder_.dispose(); + headerBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * The packet header.
+     * 
+ * + * .google.cloud.visionai.v1.PacketHeader header = 1; + */ + public com.google.cloud.visionai.v1.PacketHeader.Builder getHeaderBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getHeaderFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The packet header.
+     * 
+ * + * .google.cloud.visionai.v1.PacketHeader header = 1; + */ + public com.google.cloud.visionai.v1.PacketHeaderOrBuilder getHeaderOrBuilder() { + if (headerBuilder_ != null) { + return headerBuilder_.getMessageOrBuilder(); + } else { + return header_ == null + ? com.google.cloud.visionai.v1.PacketHeader.getDefaultInstance() + : header_; + } + } + /** + * + * + *
+     * The packet header.
+     * 
+ * + * .google.cloud.visionai.v1.PacketHeader header = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.PacketHeader, + com.google.cloud.visionai.v1.PacketHeader.Builder, + com.google.cloud.visionai.v1.PacketHeaderOrBuilder> + getHeaderFieldBuilder() { + if (headerBuilder_ == null) { + headerBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.PacketHeader, + com.google.cloud.visionai.v1.PacketHeader.Builder, + com.google.cloud.visionai.v1.PacketHeaderOrBuilder>( + getHeader(), getParentForChildren(), isClean()); + header_ = null; + } + return headerBuilder_; + } + + private com.google.protobuf.ByteString payload_ = com.google.protobuf.ByteString.EMPTY; + /** + * + * + *
+     * The payload of the packet.
+     * 
+ * + * bytes payload = 2; + * + * @return The payload. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPayload() { + return payload_; + } + /** + * + * + *
+     * The payload of the packet.
+     * 
+ * + * bytes payload = 2; + * + * @param value The payload to set. + * @return This builder for chaining. + */ + public Builder setPayload(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + payload_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * The payload of the packet.
+     * 
+ * + * bytes payload = 2; + * + * @return This builder for chaining. + */ + public Builder clearPayload() { + bitField0_ = (bitField0_ & ~0x00000002); + payload_ = getDefaultInstance().getPayload(); + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.Packet) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.Packet) + private static final com.google.cloud.visionai.v1.Packet DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.Packet(); + } + + public static com.google.cloud.visionai.v1.Packet getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Packet parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.Packet getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/PacketHeader.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/PacketHeader.java new file mode 100644 index 000000000000..8182a0a46ab2 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/PacketHeader.java @@ -0,0 +1,2263 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/streaming_resources.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * The message that represents packet header.
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.PacketHeader} + */ +public final class PacketHeader extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.PacketHeader) + PacketHeaderOrBuilder { + private static final long serialVersionUID = 0L; + // Use PacketHeader.newBuilder() to construct. + private PacketHeader(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private PacketHeader() { + traceContext_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new PacketHeader(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.StreamingResourcesProto + .internal_static_google_cloud_visionai_v1_PacketHeader_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.StreamingResourcesProto + .internal_static_google_cloud_visionai_v1_PacketHeader_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.PacketHeader.class, + com.google.cloud.visionai.v1.PacketHeader.Builder.class); + } + + private int bitField0_; + public static final int CAPTURE_TIME_FIELD_NUMBER = 1; + private com.google.protobuf.Timestamp captureTime_; + /** + * + * + *
+   * Input only. The capture time of the packet.
+   * 
+ * + * .google.protobuf.Timestamp capture_time = 1 [(.google.api.field_behavior) = INPUT_ONLY]; + * + * + * @return Whether the captureTime field is set. + */ + @java.lang.Override + public boolean hasCaptureTime() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * Input only. The capture time of the packet.
+   * 
+ * + * .google.protobuf.Timestamp capture_time = 1 [(.google.api.field_behavior) = INPUT_ONLY]; + * + * + * @return The captureTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCaptureTime() { + return captureTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : captureTime_; + } + /** + * + * + *
+   * Input only. The capture time of the packet.
+   * 
+ * + * .google.protobuf.Timestamp capture_time = 1 [(.google.api.field_behavior) = INPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCaptureTimeOrBuilder() { + return captureTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : captureTime_; + } + + public static final int TYPE_FIELD_NUMBER = 2; + private com.google.cloud.visionai.v1.PacketType type_; + /** + * + * + *
+   * Input only. Immutable. The type of the payload.
+   * 
+ * + * + * .google.cloud.visionai.v1.PacketType type = 2 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return Whether the type field is set. + */ + @java.lang.Override + public boolean hasType() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+   * Input only. Immutable. The type of the payload.
+   * 
+ * + * + * .google.cloud.visionai.v1.PacketType type = 2 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The type. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.PacketType getType() { + return type_ == null ? com.google.cloud.visionai.v1.PacketType.getDefaultInstance() : type_; + } + /** + * + * + *
+   * Input only. Immutable. The type of the payload.
+   * 
+ * + * + * .google.cloud.visionai.v1.PacketType type = 2 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE]; + * + */ + @java.lang.Override + public com.google.cloud.visionai.v1.PacketTypeOrBuilder getTypeOrBuilder() { + return type_ == null ? com.google.cloud.visionai.v1.PacketType.getDefaultInstance() : type_; + } + + public static final int METADATA_FIELD_NUMBER = 3; + private com.google.protobuf.Struct metadata_; + /** + * + * + *
+   * Input only. This field is for users to attach user managed metadata.
+   * 
+ * + * .google.protobuf.Struct metadata = 3 [(.google.api.field_behavior) = INPUT_ONLY]; + * + * @return Whether the metadata field is set. + */ + @java.lang.Override + public boolean hasMetadata() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+   * Input only. This field is for users to attach user managed metadata.
+   * 
+ * + * .google.protobuf.Struct metadata = 3 [(.google.api.field_behavior) = INPUT_ONLY]; + * + * @return The metadata. + */ + @java.lang.Override + public com.google.protobuf.Struct getMetadata() { + return metadata_ == null ? com.google.protobuf.Struct.getDefaultInstance() : metadata_; + } + /** + * + * + *
+   * Input only. This field is for users to attach user managed metadata.
+   * 
+ * + * .google.protobuf.Struct metadata = 3 [(.google.api.field_behavior) = INPUT_ONLY]; + */ + @java.lang.Override + public com.google.protobuf.StructOrBuilder getMetadataOrBuilder() { + return metadata_ == null ? com.google.protobuf.Struct.getDefaultInstance() : metadata_; + } + + public static final int SERVER_METADATA_FIELD_NUMBER = 4; + private com.google.cloud.visionai.v1.ServerMetadata serverMetadata_; + /** + * + * + *
+   * Output only. Metadata that the server appends to each packet before sending
+   * it to receivers. You don't need to set a value for this field when sending
+   * packets.
+   * 
+ * + * + * .google.cloud.visionai.v1.ServerMetadata server_metadata = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the serverMetadata field is set. + */ + @java.lang.Override + public boolean hasServerMetadata() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + * + * + *
+   * Output only. Metadata that the server appends to each packet before sending
+   * it to receivers. You don't need to set a value for this field when sending
+   * packets.
+   * 
+ * + * + * .google.cloud.visionai.v1.ServerMetadata server_metadata = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The serverMetadata. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.ServerMetadata getServerMetadata() { + return serverMetadata_ == null + ? com.google.cloud.visionai.v1.ServerMetadata.getDefaultInstance() + : serverMetadata_; + } + /** + * + * + *
+   * Output only. Metadata that the server appends to each packet before sending
+   * it to receivers. You don't need to set a value for this field when sending
+   * packets.
+   * 
+ * + * + * .google.cloud.visionai.v1.ServerMetadata server_metadata = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.visionai.v1.ServerMetadataOrBuilder getServerMetadataOrBuilder() { + return serverMetadata_ == null + ? com.google.cloud.visionai.v1.ServerMetadata.getDefaultInstance() + : serverMetadata_; + } + + public static final int SERIES_METADATA_FIELD_NUMBER = 5; + private com.google.cloud.visionai.v1.SeriesMetadata seriesMetadata_; + /** + * + * + *
+   * Input only. Immutable. Metadata that the server needs to know where to
+   * write the packets to. It's only required for the first packet.
+   * 
+ * + * + * .google.cloud.visionai.v1.SeriesMetadata series_metadata = 5 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return Whether the seriesMetadata field is set. + */ + @java.lang.Override + public boolean hasSeriesMetadata() { + return ((bitField0_ & 0x00000010) != 0); + } + /** + * + * + *
+   * Input only. Immutable. Metadata that the server needs to know where to
+   * write the packets to. It's only required for the first packet.
+   * 
+ * + * + * .google.cloud.visionai.v1.SeriesMetadata series_metadata = 5 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The seriesMetadata. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.SeriesMetadata getSeriesMetadata() { + return seriesMetadata_ == null + ? com.google.cloud.visionai.v1.SeriesMetadata.getDefaultInstance() + : seriesMetadata_; + } + /** + * + * + *
+   * Input only. Immutable. Metadata that the server needs to know where to
+   * write the packets to. It's only required for the first packet.
+   * 
+ * + * + * .google.cloud.visionai.v1.SeriesMetadata series_metadata = 5 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE]; + * + */ + @java.lang.Override + public com.google.cloud.visionai.v1.SeriesMetadataOrBuilder getSeriesMetadataOrBuilder() { + return seriesMetadata_ == null + ? com.google.cloud.visionai.v1.SeriesMetadata.getDefaultInstance() + : seriesMetadata_; + } + + public static final int FLAGS_FIELD_NUMBER = 6; + private int flags_ = 0; + /** + * + * + *
+   * Immutable. Packet flag set. SDK will set the flag automatically.
+   * 
+ * + * int32 flags = 6 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The flags. + */ + @java.lang.Override + public int getFlags() { + return flags_; + } + + public static final int TRACE_CONTEXT_FIELD_NUMBER = 7; + + @SuppressWarnings("serial") + private volatile java.lang.Object traceContext_ = ""; + /** + * + * + *
+   * Immutable. Header string for tracing across services. It should be set when
+   * the packet is first arrived in the stream server.
+   *
+   * The input format is a lowercase hex string:
+   *   - version_id: 1 byte, currently must be zero - hex encoded (2 characters)
+   *   - trace_id: 16 bytes (opaque blob) - hex encoded (32 characters)
+   *   - span_id: 8 bytes (opaque blob) - hex encoded (16 characters)
+   *   - trace_options: 1 byte (LSB means tracing enabled) - hex encoded (2
+   *   characters)
+   * Example: "00-404142434445464748494a4b4c4d4e4f-6162636465666768-01"
+   *           v  trace_id                         span_id          options
+   * 
+ * + * string trace_context = 7 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The traceContext. + */ + @java.lang.Override + public java.lang.String getTraceContext() { + java.lang.Object ref = traceContext_; + 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(); + traceContext_ = s; + return s; + } + } + /** + * + * + *
+   * Immutable. Header string for tracing across services. It should be set when
+   * the packet is first arrived in the stream server.
+   *
+   * The input format is a lowercase hex string:
+   *   - version_id: 1 byte, currently must be zero - hex encoded (2 characters)
+   *   - trace_id: 16 bytes (opaque blob) - hex encoded (32 characters)
+   *   - span_id: 8 bytes (opaque blob) - hex encoded (16 characters)
+   *   - trace_options: 1 byte (LSB means tracing enabled) - hex encoded (2
+   *   characters)
+   * Example: "00-404142434445464748494a4b4c4d4e4f-6162636465666768-01"
+   *           v  trace_id                         span_id          options
+   * 
+ * + * string trace_context = 7 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The bytes for traceContext. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTraceContextBytes() { + java.lang.Object ref = traceContext_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + traceContext_ = 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 (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getCaptureTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(2, getType()); + } + if (((bitField0_ & 0x00000004) != 0)) { + output.writeMessage(3, getMetadata()); + } + if (((bitField0_ & 0x00000008) != 0)) { + output.writeMessage(4, getServerMetadata()); + } + if (((bitField0_ & 0x00000010) != 0)) { + output.writeMessage(5, getSeriesMetadata()); + } + if (flags_ != 0) { + output.writeInt32(6, flags_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(traceContext_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 7, traceContext_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getCaptureTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getType()); + } + if (((bitField0_ & 0x00000004) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getMetadata()); + } + if (((bitField0_ & 0x00000008) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getServerMetadata()); + } + if (((bitField0_ & 0x00000010) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getSeriesMetadata()); + } + if (flags_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(6, flags_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(traceContext_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, traceContext_); + } + size += getUnknownFields().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.visionai.v1.PacketHeader)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.PacketHeader other = + (com.google.cloud.visionai.v1.PacketHeader) obj; + + if (hasCaptureTime() != other.hasCaptureTime()) return false; + if (hasCaptureTime()) { + if (!getCaptureTime().equals(other.getCaptureTime())) return false; + } + if (hasType() != other.hasType()) return false; + if (hasType()) { + if (!getType().equals(other.getType())) return false; + } + if (hasMetadata() != other.hasMetadata()) return false; + if (hasMetadata()) { + if (!getMetadata().equals(other.getMetadata())) return false; + } + if (hasServerMetadata() != other.hasServerMetadata()) return false; + if (hasServerMetadata()) { + if (!getServerMetadata().equals(other.getServerMetadata())) return false; + } + if (hasSeriesMetadata() != other.hasSeriesMetadata()) return false; + if (hasSeriesMetadata()) { + if (!getSeriesMetadata().equals(other.getSeriesMetadata())) return false; + } + if (getFlags() != other.getFlags()) return false; + if (!getTraceContext().equals(other.getTraceContext())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasCaptureTime()) { + hash = (37 * hash) + CAPTURE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCaptureTime().hashCode(); + } + if (hasType()) { + hash = (37 * hash) + TYPE_FIELD_NUMBER; + hash = (53 * hash) + getType().hashCode(); + } + if (hasMetadata()) { + hash = (37 * hash) + METADATA_FIELD_NUMBER; + hash = (53 * hash) + getMetadata().hashCode(); + } + if (hasServerMetadata()) { + hash = (37 * hash) + SERVER_METADATA_FIELD_NUMBER; + hash = (53 * hash) + getServerMetadata().hashCode(); + } + if (hasSeriesMetadata()) { + hash = (37 * hash) + SERIES_METADATA_FIELD_NUMBER; + hash = (53 * hash) + getSeriesMetadata().hashCode(); + } + hash = (37 * hash) + FLAGS_FIELD_NUMBER; + hash = (53 * hash) + getFlags(); + hash = (37 * hash) + TRACE_CONTEXT_FIELD_NUMBER; + hash = (53 * hash) + getTraceContext().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.PacketHeader parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.PacketHeader 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.visionai.v1.PacketHeader parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.PacketHeader 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.visionai.v1.PacketHeader parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.PacketHeader parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.PacketHeader parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.PacketHeader 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.visionai.v1.PacketHeader parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.PacketHeader 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.visionai.v1.PacketHeader parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.PacketHeader 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.visionai.v1.PacketHeader 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 message that represents packet header.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.PacketHeader} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.PacketHeader) + com.google.cloud.visionai.v1.PacketHeaderOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.StreamingResourcesProto + .internal_static_google_cloud_visionai_v1_PacketHeader_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.StreamingResourcesProto + .internal_static_google_cloud_visionai_v1_PacketHeader_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.PacketHeader.class, + com.google.cloud.visionai.v1.PacketHeader.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.PacketHeader.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getCaptureTimeFieldBuilder(); + getTypeFieldBuilder(); + getMetadataFieldBuilder(); + getServerMetadataFieldBuilder(); + getSeriesMetadataFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + captureTime_ = null; + if (captureTimeBuilder_ != null) { + captureTimeBuilder_.dispose(); + captureTimeBuilder_ = null; + } + type_ = null; + if (typeBuilder_ != null) { + typeBuilder_.dispose(); + typeBuilder_ = null; + } + metadata_ = null; + if (metadataBuilder_ != null) { + metadataBuilder_.dispose(); + metadataBuilder_ = null; + } + serverMetadata_ = null; + if (serverMetadataBuilder_ != null) { + serverMetadataBuilder_.dispose(); + serverMetadataBuilder_ = null; + } + seriesMetadata_ = null; + if (seriesMetadataBuilder_ != null) { + seriesMetadataBuilder_.dispose(); + seriesMetadataBuilder_ = null; + } + flags_ = 0; + traceContext_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.StreamingResourcesProto + .internal_static_google_cloud_visionai_v1_PacketHeader_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.PacketHeader getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.PacketHeader.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.PacketHeader build() { + com.google.cloud.visionai.v1.PacketHeader result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.PacketHeader buildPartial() { + com.google.cloud.visionai.v1.PacketHeader result = + new com.google.cloud.visionai.v1.PacketHeader(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.visionai.v1.PacketHeader result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.captureTime_ = + captureTimeBuilder_ == null ? captureTime_ : captureTimeBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.type_ = typeBuilder_ == null ? type_ : typeBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.metadata_ = metadataBuilder_ == null ? metadata_ : metadataBuilder_.build(); + to_bitField0_ |= 0x00000004; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.serverMetadata_ = + serverMetadataBuilder_ == null ? serverMetadata_ : serverMetadataBuilder_.build(); + to_bitField0_ |= 0x00000008; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.seriesMetadata_ = + seriesMetadataBuilder_ == null ? seriesMetadata_ : seriesMetadataBuilder_.build(); + to_bitField0_ |= 0x00000010; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.flags_ = flags_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.traceContext_ = traceContext_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.PacketHeader) { + return mergeFrom((com.google.cloud.visionai.v1.PacketHeader) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.PacketHeader other) { + if (other == com.google.cloud.visionai.v1.PacketHeader.getDefaultInstance()) return this; + if (other.hasCaptureTime()) { + mergeCaptureTime(other.getCaptureTime()); + } + if (other.hasType()) { + mergeType(other.getType()); + } + if (other.hasMetadata()) { + mergeMetadata(other.getMetadata()); + } + if (other.hasServerMetadata()) { + mergeServerMetadata(other.getServerMetadata()); + } + if (other.hasSeriesMetadata()) { + mergeSeriesMetadata(other.getSeriesMetadata()); + } + if (other.getFlags() != 0) { + setFlags(other.getFlags()); + } + if (!other.getTraceContext().isEmpty()) { + traceContext_ = other.traceContext_; + bitField0_ |= 0x00000040; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getCaptureTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage(getTypeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage(getMetadataFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + input.readMessage(getServerMetadataFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + input.readMessage(getSeriesMetadataFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 48: + { + flags_ = input.readInt32(); + bitField0_ |= 0x00000020; + break; + } // case 48 + case 58: + { + traceContext_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000040; + break; + } // case 58 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.protobuf.Timestamp captureTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + captureTimeBuilder_; + /** + * + * + *
+     * Input only. The capture time of the packet.
+     * 
+ * + * + * .google.protobuf.Timestamp capture_time = 1 [(.google.api.field_behavior) = INPUT_ONLY]; + * + * + * @return Whether the captureTime field is set. + */ + public boolean hasCaptureTime() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * Input only. The capture time of the packet.
+     * 
+ * + * + * .google.protobuf.Timestamp capture_time = 1 [(.google.api.field_behavior) = INPUT_ONLY]; + * + * + * @return The captureTime. + */ + public com.google.protobuf.Timestamp getCaptureTime() { + if (captureTimeBuilder_ == null) { + return captureTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : captureTime_; + } else { + return captureTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Input only. The capture time of the packet.
+     * 
+ * + * + * .google.protobuf.Timestamp capture_time = 1 [(.google.api.field_behavior) = INPUT_ONLY]; + * + */ + public Builder setCaptureTime(com.google.protobuf.Timestamp value) { + if (captureTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + captureTime_ = value; + } else { + captureTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Input only. The capture time of the packet.
+     * 
+ * + * + * .google.protobuf.Timestamp capture_time = 1 [(.google.api.field_behavior) = INPUT_ONLY]; + * + */ + public Builder setCaptureTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (captureTimeBuilder_ == null) { + captureTime_ = builderForValue.build(); + } else { + captureTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Input only. The capture time of the packet.
+     * 
+ * + * + * .google.protobuf.Timestamp capture_time = 1 [(.google.api.field_behavior) = INPUT_ONLY]; + * + */ + public Builder mergeCaptureTime(com.google.protobuf.Timestamp value) { + if (captureTimeBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && captureTime_ != null + && captureTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getCaptureTimeBuilder().mergeFrom(value); + } else { + captureTime_ = value; + } + } else { + captureTimeBuilder_.mergeFrom(value); + } + if (captureTime_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Input only. The capture time of the packet.
+     * 
+ * + * + * .google.protobuf.Timestamp capture_time = 1 [(.google.api.field_behavior) = INPUT_ONLY]; + * + */ + public Builder clearCaptureTime() { + bitField0_ = (bitField0_ & ~0x00000001); + captureTime_ = null; + if (captureTimeBuilder_ != null) { + captureTimeBuilder_.dispose(); + captureTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Input only. The capture time of the packet.
+     * 
+ * + * + * .google.protobuf.Timestamp capture_time = 1 [(.google.api.field_behavior) = INPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getCaptureTimeBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getCaptureTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Input only. The capture time of the packet.
+     * 
+ * + * + * .google.protobuf.Timestamp capture_time = 1 [(.google.api.field_behavior) = INPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getCaptureTimeOrBuilder() { + if (captureTimeBuilder_ != null) { + return captureTimeBuilder_.getMessageOrBuilder(); + } else { + return captureTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : captureTime_; + } + } + /** + * + * + *
+     * Input only. The capture time of the packet.
+     * 
+ * + * + * .google.protobuf.Timestamp capture_time = 1 [(.google.api.field_behavior) = INPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getCaptureTimeFieldBuilder() { + if (captureTimeBuilder_ == null) { + captureTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getCaptureTime(), getParentForChildren(), isClean()); + captureTime_ = null; + } + return captureTimeBuilder_; + } + + private com.google.cloud.visionai.v1.PacketType type_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.PacketType, + com.google.cloud.visionai.v1.PacketType.Builder, + com.google.cloud.visionai.v1.PacketTypeOrBuilder> + typeBuilder_; + /** + * + * + *
+     * Input only. Immutable. The type of the payload.
+     * 
+ * + * + * .google.cloud.visionai.v1.PacketType type = 2 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return Whether the type field is set. + */ + public boolean hasType() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * Input only. Immutable. The type of the payload.
+     * 
+ * + * + * .google.cloud.visionai.v1.PacketType type = 2 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The type. + */ + public com.google.cloud.visionai.v1.PacketType getType() { + if (typeBuilder_ == null) { + return type_ == null ? com.google.cloud.visionai.v1.PacketType.getDefaultInstance() : type_; + } else { + return typeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Input only. Immutable. The type of the payload.
+     * 
+ * + * + * .google.cloud.visionai.v1.PacketType type = 2 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE]; + * + */ + public Builder setType(com.google.cloud.visionai.v1.PacketType value) { + if (typeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + type_ = value; + } else { + typeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Input only. Immutable. The type of the payload.
+     * 
+ * + * + * .google.cloud.visionai.v1.PacketType type = 2 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE]; + * + */ + public Builder setType(com.google.cloud.visionai.v1.PacketType.Builder builderForValue) { + if (typeBuilder_ == null) { + type_ = builderForValue.build(); + } else { + typeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Input only. Immutable. The type of the payload.
+     * 
+ * + * + * .google.cloud.visionai.v1.PacketType type = 2 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE]; + * + */ + public Builder mergeType(com.google.cloud.visionai.v1.PacketType value) { + if (typeBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && type_ != null + && type_ != com.google.cloud.visionai.v1.PacketType.getDefaultInstance()) { + getTypeBuilder().mergeFrom(value); + } else { + type_ = value; + } + } else { + typeBuilder_.mergeFrom(value); + } + if (type_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Input only. Immutable. The type of the payload.
+     * 
+ * + * + * .google.cloud.visionai.v1.PacketType type = 2 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE]; + * + */ + public Builder clearType() { + bitField0_ = (bitField0_ & ~0x00000002); + type_ = null; + if (typeBuilder_ != null) { + typeBuilder_.dispose(); + typeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Input only. Immutable. The type of the payload.
+     * 
+ * + * + * .google.cloud.visionai.v1.PacketType type = 2 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE]; + * + */ + public com.google.cloud.visionai.v1.PacketType.Builder getTypeBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getTypeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Input only. Immutable. The type of the payload.
+     * 
+ * + * + * .google.cloud.visionai.v1.PacketType type = 2 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE]; + * + */ + public com.google.cloud.visionai.v1.PacketTypeOrBuilder getTypeOrBuilder() { + if (typeBuilder_ != null) { + return typeBuilder_.getMessageOrBuilder(); + } else { + return type_ == null ? com.google.cloud.visionai.v1.PacketType.getDefaultInstance() : type_; + } + } + /** + * + * + *
+     * Input only. Immutable. The type of the payload.
+     * 
+ * + * + * .google.cloud.visionai.v1.PacketType type = 2 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.PacketType, + com.google.cloud.visionai.v1.PacketType.Builder, + com.google.cloud.visionai.v1.PacketTypeOrBuilder> + getTypeFieldBuilder() { + if (typeBuilder_ == null) { + typeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.PacketType, + com.google.cloud.visionai.v1.PacketType.Builder, + com.google.cloud.visionai.v1.PacketTypeOrBuilder>( + getType(), getParentForChildren(), isClean()); + type_ = null; + } + return typeBuilder_; + } + + private com.google.protobuf.Struct metadata_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Struct, + com.google.protobuf.Struct.Builder, + com.google.protobuf.StructOrBuilder> + metadataBuilder_; + /** + * + * + *
+     * Input only. This field is for users to attach user managed metadata.
+     * 
+ * + * .google.protobuf.Struct metadata = 3 [(.google.api.field_behavior) = INPUT_ONLY]; + * + * + * @return Whether the metadata field is set. + */ + public boolean hasMetadata() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+     * Input only. This field is for users to attach user managed metadata.
+     * 
+ * + * .google.protobuf.Struct metadata = 3 [(.google.api.field_behavior) = INPUT_ONLY]; + * + * + * @return The metadata. + */ + public com.google.protobuf.Struct getMetadata() { + if (metadataBuilder_ == null) { + return metadata_ == null ? com.google.protobuf.Struct.getDefaultInstance() : metadata_; + } else { + return metadataBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Input only. This field is for users to attach user managed metadata.
+     * 
+ * + * .google.protobuf.Struct metadata = 3 [(.google.api.field_behavior) = INPUT_ONLY]; + * + */ + public Builder setMetadata(com.google.protobuf.Struct value) { + if (metadataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + metadata_ = value; + } else { + metadataBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Input only. This field is for users to attach user managed metadata.
+     * 
+ * + * .google.protobuf.Struct metadata = 3 [(.google.api.field_behavior) = INPUT_ONLY]; + * + */ + public Builder setMetadata(com.google.protobuf.Struct.Builder builderForValue) { + if (metadataBuilder_ == null) { + metadata_ = builderForValue.build(); + } else { + metadataBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Input only. This field is for users to attach user managed metadata.
+     * 
+ * + * .google.protobuf.Struct metadata = 3 [(.google.api.field_behavior) = INPUT_ONLY]; + * + */ + public Builder mergeMetadata(com.google.protobuf.Struct value) { + if (metadataBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && metadata_ != null + && metadata_ != com.google.protobuf.Struct.getDefaultInstance()) { + getMetadataBuilder().mergeFrom(value); + } else { + metadata_ = value; + } + } else { + metadataBuilder_.mergeFrom(value); + } + if (metadata_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Input only. This field is for users to attach user managed metadata.
+     * 
+ * + * .google.protobuf.Struct metadata = 3 [(.google.api.field_behavior) = INPUT_ONLY]; + * + */ + public Builder clearMetadata() { + bitField0_ = (bitField0_ & ~0x00000004); + metadata_ = null; + if (metadataBuilder_ != null) { + metadataBuilder_.dispose(); + metadataBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Input only. This field is for users to attach user managed metadata.
+     * 
+ * + * .google.protobuf.Struct metadata = 3 [(.google.api.field_behavior) = INPUT_ONLY]; + * + */ + public com.google.protobuf.Struct.Builder getMetadataBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getMetadataFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Input only. This field is for users to attach user managed metadata.
+     * 
+ * + * .google.protobuf.Struct metadata = 3 [(.google.api.field_behavior) = INPUT_ONLY]; + * + */ + public com.google.protobuf.StructOrBuilder getMetadataOrBuilder() { + if (metadataBuilder_ != null) { + return metadataBuilder_.getMessageOrBuilder(); + } else { + return metadata_ == null ? com.google.protobuf.Struct.getDefaultInstance() : metadata_; + } + } + /** + * + * + *
+     * Input only. This field is for users to attach user managed metadata.
+     * 
+ * + * .google.protobuf.Struct metadata = 3 [(.google.api.field_behavior) = INPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Struct, + com.google.protobuf.Struct.Builder, + com.google.protobuf.StructOrBuilder> + getMetadataFieldBuilder() { + if (metadataBuilder_ == null) { + metadataBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Struct, + com.google.protobuf.Struct.Builder, + com.google.protobuf.StructOrBuilder>( + getMetadata(), getParentForChildren(), isClean()); + metadata_ = null; + } + return metadataBuilder_; + } + + private com.google.cloud.visionai.v1.ServerMetadata serverMetadata_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.ServerMetadata, + com.google.cloud.visionai.v1.ServerMetadata.Builder, + com.google.cloud.visionai.v1.ServerMetadataOrBuilder> + serverMetadataBuilder_; + /** + * + * + *
+     * Output only. Metadata that the server appends to each packet before sending
+     * it to receivers. You don't need to set a value for this field when sending
+     * packets.
+     * 
+ * + * + * .google.cloud.visionai.v1.ServerMetadata server_metadata = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the serverMetadata field is set. + */ + public boolean hasServerMetadata() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + * + * + *
+     * Output only. Metadata that the server appends to each packet before sending
+     * it to receivers. You don't need to set a value for this field when sending
+     * packets.
+     * 
+ * + * + * .google.cloud.visionai.v1.ServerMetadata server_metadata = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The serverMetadata. + */ + public com.google.cloud.visionai.v1.ServerMetadata getServerMetadata() { + if (serverMetadataBuilder_ == null) { + return serverMetadata_ == null + ? com.google.cloud.visionai.v1.ServerMetadata.getDefaultInstance() + : serverMetadata_; + } else { + return serverMetadataBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Metadata that the server appends to each packet before sending
+     * it to receivers. You don't need to set a value for this field when sending
+     * packets.
+     * 
+ * + * + * .google.cloud.visionai.v1.ServerMetadata server_metadata = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setServerMetadata(com.google.cloud.visionai.v1.ServerMetadata value) { + if (serverMetadataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + serverMetadata_ = value; + } else { + serverMetadataBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Metadata that the server appends to each packet before sending
+     * it to receivers. You don't need to set a value for this field when sending
+     * packets.
+     * 
+ * + * + * .google.cloud.visionai.v1.ServerMetadata server_metadata = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setServerMetadata( + com.google.cloud.visionai.v1.ServerMetadata.Builder builderForValue) { + if (serverMetadataBuilder_ == null) { + serverMetadata_ = builderForValue.build(); + } else { + serverMetadataBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Metadata that the server appends to each packet before sending
+     * it to receivers. You don't need to set a value for this field when sending
+     * packets.
+     * 
+ * + * + * .google.cloud.visionai.v1.ServerMetadata server_metadata = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeServerMetadata(com.google.cloud.visionai.v1.ServerMetadata value) { + if (serverMetadataBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) + && serverMetadata_ != null + && serverMetadata_ + != com.google.cloud.visionai.v1.ServerMetadata.getDefaultInstance()) { + getServerMetadataBuilder().mergeFrom(value); + } else { + serverMetadata_ = value; + } + } else { + serverMetadataBuilder_.mergeFrom(value); + } + if (serverMetadata_ != null) { + bitField0_ |= 0x00000008; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Output only. Metadata that the server appends to each packet before sending
+     * it to receivers. You don't need to set a value for this field when sending
+     * packets.
+     * 
+ * + * + * .google.cloud.visionai.v1.ServerMetadata server_metadata = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearServerMetadata() { + bitField0_ = (bitField0_ & ~0x00000008); + serverMetadata_ = null; + if (serverMetadataBuilder_ != null) { + serverMetadataBuilder_.dispose(); + serverMetadataBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Metadata that the server appends to each packet before sending
+     * it to receivers. You don't need to set a value for this field when sending
+     * packets.
+     * 
+ * + * + * .google.cloud.visionai.v1.ServerMetadata server_metadata = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.visionai.v1.ServerMetadata.Builder getServerMetadataBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return getServerMetadataFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Metadata that the server appends to each packet before sending
+     * it to receivers. You don't need to set a value for this field when sending
+     * packets.
+     * 
+ * + * + * .google.cloud.visionai.v1.ServerMetadata server_metadata = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.visionai.v1.ServerMetadataOrBuilder getServerMetadataOrBuilder() { + if (serverMetadataBuilder_ != null) { + return serverMetadataBuilder_.getMessageOrBuilder(); + } else { + return serverMetadata_ == null + ? com.google.cloud.visionai.v1.ServerMetadata.getDefaultInstance() + : serverMetadata_; + } + } + /** + * + * + *
+     * Output only. Metadata that the server appends to each packet before sending
+     * it to receivers. You don't need to set a value for this field when sending
+     * packets.
+     * 
+ * + * + * .google.cloud.visionai.v1.ServerMetadata server_metadata = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.ServerMetadata, + com.google.cloud.visionai.v1.ServerMetadata.Builder, + com.google.cloud.visionai.v1.ServerMetadataOrBuilder> + getServerMetadataFieldBuilder() { + if (serverMetadataBuilder_ == null) { + serverMetadataBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.ServerMetadata, + com.google.cloud.visionai.v1.ServerMetadata.Builder, + com.google.cloud.visionai.v1.ServerMetadataOrBuilder>( + getServerMetadata(), getParentForChildren(), isClean()); + serverMetadata_ = null; + } + return serverMetadataBuilder_; + } + + private com.google.cloud.visionai.v1.SeriesMetadata seriesMetadata_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.SeriesMetadata, + com.google.cloud.visionai.v1.SeriesMetadata.Builder, + com.google.cloud.visionai.v1.SeriesMetadataOrBuilder> + seriesMetadataBuilder_; + /** + * + * + *
+     * Input only. Immutable. Metadata that the server needs to know where to
+     * write the packets to. It's only required for the first packet.
+     * 
+ * + * + * .google.cloud.visionai.v1.SeriesMetadata series_metadata = 5 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return Whether the seriesMetadata field is set. + */ + public boolean hasSeriesMetadata() { + return ((bitField0_ & 0x00000010) != 0); + } + /** + * + * + *
+     * Input only. Immutable. Metadata that the server needs to know where to
+     * write the packets to. It's only required for the first packet.
+     * 
+ * + * + * .google.cloud.visionai.v1.SeriesMetadata series_metadata = 5 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The seriesMetadata. + */ + public com.google.cloud.visionai.v1.SeriesMetadata getSeriesMetadata() { + if (seriesMetadataBuilder_ == null) { + return seriesMetadata_ == null + ? com.google.cloud.visionai.v1.SeriesMetadata.getDefaultInstance() + : seriesMetadata_; + } else { + return seriesMetadataBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Input only. Immutable. Metadata that the server needs to know where to
+     * write the packets to. It's only required for the first packet.
+     * 
+ * + * + * .google.cloud.visionai.v1.SeriesMetadata series_metadata = 5 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE]; + * + */ + public Builder setSeriesMetadata(com.google.cloud.visionai.v1.SeriesMetadata value) { + if (seriesMetadataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + seriesMetadata_ = value; + } else { + seriesMetadataBuilder_.setMessage(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Input only. Immutable. Metadata that the server needs to know where to
+     * write the packets to. It's only required for the first packet.
+     * 
+ * + * + * .google.cloud.visionai.v1.SeriesMetadata series_metadata = 5 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE]; + * + */ + public Builder setSeriesMetadata( + com.google.cloud.visionai.v1.SeriesMetadata.Builder builderForValue) { + if (seriesMetadataBuilder_ == null) { + seriesMetadata_ = builderForValue.build(); + } else { + seriesMetadataBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Input only. Immutable. Metadata that the server needs to know where to
+     * write the packets to. It's only required for the first packet.
+     * 
+ * + * + * .google.cloud.visionai.v1.SeriesMetadata series_metadata = 5 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE]; + * + */ + public Builder mergeSeriesMetadata(com.google.cloud.visionai.v1.SeriesMetadata value) { + if (seriesMetadataBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0) + && seriesMetadata_ != null + && seriesMetadata_ + != com.google.cloud.visionai.v1.SeriesMetadata.getDefaultInstance()) { + getSeriesMetadataBuilder().mergeFrom(value); + } else { + seriesMetadata_ = value; + } + } else { + seriesMetadataBuilder_.mergeFrom(value); + } + if (seriesMetadata_ != null) { + bitField0_ |= 0x00000010; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Input only. Immutable. Metadata that the server needs to know where to
+     * write the packets to. It's only required for the first packet.
+     * 
+ * + * + * .google.cloud.visionai.v1.SeriesMetadata series_metadata = 5 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE]; + * + */ + public Builder clearSeriesMetadata() { + bitField0_ = (bitField0_ & ~0x00000010); + seriesMetadata_ = null; + if (seriesMetadataBuilder_ != null) { + seriesMetadataBuilder_.dispose(); + seriesMetadataBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Input only. Immutable. Metadata that the server needs to know where to
+     * write the packets to. It's only required for the first packet.
+     * 
+ * + * + * .google.cloud.visionai.v1.SeriesMetadata series_metadata = 5 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE]; + * + */ + public com.google.cloud.visionai.v1.SeriesMetadata.Builder getSeriesMetadataBuilder() { + bitField0_ |= 0x00000010; + onChanged(); + return getSeriesMetadataFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Input only. Immutable. Metadata that the server needs to know where to
+     * write the packets to. It's only required for the first packet.
+     * 
+ * + * + * .google.cloud.visionai.v1.SeriesMetadata series_metadata = 5 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE]; + * + */ + public com.google.cloud.visionai.v1.SeriesMetadataOrBuilder getSeriesMetadataOrBuilder() { + if (seriesMetadataBuilder_ != null) { + return seriesMetadataBuilder_.getMessageOrBuilder(); + } else { + return seriesMetadata_ == null + ? com.google.cloud.visionai.v1.SeriesMetadata.getDefaultInstance() + : seriesMetadata_; + } + } + /** + * + * + *
+     * Input only. Immutable. Metadata that the server needs to know where to
+     * write the packets to. It's only required for the first packet.
+     * 
+ * + * + * .google.cloud.visionai.v1.SeriesMetadata series_metadata = 5 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.SeriesMetadata, + com.google.cloud.visionai.v1.SeriesMetadata.Builder, + com.google.cloud.visionai.v1.SeriesMetadataOrBuilder> + getSeriesMetadataFieldBuilder() { + if (seriesMetadataBuilder_ == null) { + seriesMetadataBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.SeriesMetadata, + com.google.cloud.visionai.v1.SeriesMetadata.Builder, + com.google.cloud.visionai.v1.SeriesMetadataOrBuilder>( + getSeriesMetadata(), getParentForChildren(), isClean()); + seriesMetadata_ = null; + } + return seriesMetadataBuilder_; + } + + private int flags_; + /** + * + * + *
+     * Immutable. Packet flag set. SDK will set the flag automatically.
+     * 
+ * + * int32 flags = 6 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The flags. + */ + @java.lang.Override + public int getFlags() { + return flags_; + } + /** + * + * + *
+     * Immutable. Packet flag set. SDK will set the flag automatically.
+     * 
+ * + * int32 flags = 6 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @param value The flags to set. + * @return This builder for chaining. + */ + public Builder setFlags(int value) { + + flags_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * Immutable. Packet flag set. SDK will set the flag automatically.
+     * 
+ * + * int32 flags = 6 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return This builder for chaining. + */ + public Builder clearFlags() { + bitField0_ = (bitField0_ & ~0x00000020); + flags_ = 0; + onChanged(); + return this; + } + + private java.lang.Object traceContext_ = ""; + /** + * + * + *
+     * Immutable. Header string for tracing across services. It should be set when
+     * the packet is first arrived in the stream server.
+     *
+     * The input format is a lowercase hex string:
+     *   - version_id: 1 byte, currently must be zero - hex encoded (2 characters)
+     *   - trace_id: 16 bytes (opaque blob) - hex encoded (32 characters)
+     *   - span_id: 8 bytes (opaque blob) - hex encoded (16 characters)
+     *   - trace_options: 1 byte (LSB means tracing enabled) - hex encoded (2
+     *   characters)
+     * Example: "00-404142434445464748494a4b4c4d4e4f-6162636465666768-01"
+     *           v  trace_id                         span_id          options
+     * 
+ * + * string trace_context = 7 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The traceContext. + */ + public java.lang.String getTraceContext() { + java.lang.Object ref = traceContext_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + traceContext_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Immutable. Header string for tracing across services. It should be set when
+     * the packet is first arrived in the stream server.
+     *
+     * The input format is a lowercase hex string:
+     *   - version_id: 1 byte, currently must be zero - hex encoded (2 characters)
+     *   - trace_id: 16 bytes (opaque blob) - hex encoded (32 characters)
+     *   - span_id: 8 bytes (opaque blob) - hex encoded (16 characters)
+     *   - trace_options: 1 byte (LSB means tracing enabled) - hex encoded (2
+     *   characters)
+     * Example: "00-404142434445464748494a4b4c4d4e4f-6162636465666768-01"
+     *           v  trace_id                         span_id          options
+     * 
+ * + * string trace_context = 7 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The bytes for traceContext. + */ + public com.google.protobuf.ByteString getTraceContextBytes() { + java.lang.Object ref = traceContext_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + traceContext_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Immutable. Header string for tracing across services. It should be set when
+     * the packet is first arrived in the stream server.
+     *
+     * The input format is a lowercase hex string:
+     *   - version_id: 1 byte, currently must be zero - hex encoded (2 characters)
+     *   - trace_id: 16 bytes (opaque blob) - hex encoded (32 characters)
+     *   - span_id: 8 bytes (opaque blob) - hex encoded (16 characters)
+     *   - trace_options: 1 byte (LSB means tracing enabled) - hex encoded (2
+     *   characters)
+     * Example: "00-404142434445464748494a4b4c4d4e4f-6162636465666768-01"
+     *           v  trace_id                         span_id          options
+     * 
+ * + * string trace_context = 7 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @param value The traceContext to set. + * @return This builder for chaining. + */ + public Builder setTraceContext(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + traceContext_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * + * + *
+     * Immutable. Header string for tracing across services. It should be set when
+     * the packet is first arrived in the stream server.
+     *
+     * The input format is a lowercase hex string:
+     *   - version_id: 1 byte, currently must be zero - hex encoded (2 characters)
+     *   - trace_id: 16 bytes (opaque blob) - hex encoded (32 characters)
+     *   - span_id: 8 bytes (opaque blob) - hex encoded (16 characters)
+     *   - trace_options: 1 byte (LSB means tracing enabled) - hex encoded (2
+     *   characters)
+     * Example: "00-404142434445464748494a4b4c4d4e4f-6162636465666768-01"
+     *           v  trace_id                         span_id          options
+     * 
+ * + * string trace_context = 7 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return This builder for chaining. + */ + public Builder clearTraceContext() { + traceContext_ = getDefaultInstance().getTraceContext(); + bitField0_ = (bitField0_ & ~0x00000040); + onChanged(); + return this; + } + /** + * + * + *
+     * Immutable. Header string for tracing across services. It should be set when
+     * the packet is first arrived in the stream server.
+     *
+     * The input format is a lowercase hex string:
+     *   - version_id: 1 byte, currently must be zero - hex encoded (2 characters)
+     *   - trace_id: 16 bytes (opaque blob) - hex encoded (32 characters)
+     *   - span_id: 8 bytes (opaque blob) - hex encoded (16 characters)
+     *   - trace_options: 1 byte (LSB means tracing enabled) - hex encoded (2
+     *   characters)
+     * Example: "00-404142434445464748494a4b4c4d4e4f-6162636465666768-01"
+     *           v  trace_id                         span_id          options
+     * 
+ * + * string trace_context = 7 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @param value The bytes for traceContext to set. + * @return This builder for chaining. + */ + public Builder setTraceContextBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + traceContext_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.PacketHeader) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.PacketHeader) + private static final com.google.cloud.visionai.v1.PacketHeader DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.PacketHeader(); + } + + public static com.google.cloud.visionai.v1.PacketHeader getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PacketHeader parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.PacketHeader getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/PacketHeaderOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/PacketHeaderOrBuilder.java new file mode 100644 index 000000000000..75cbdd14a46b --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/PacketHeaderOrBuilder.java @@ -0,0 +1,289 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/streaming_resources.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface PacketHeaderOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.PacketHeader) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Input only. The capture time of the packet.
+   * 
+ * + * .google.protobuf.Timestamp capture_time = 1 [(.google.api.field_behavior) = INPUT_ONLY]; + * + * + * @return Whether the captureTime field is set. + */ + boolean hasCaptureTime(); + /** + * + * + *
+   * Input only. The capture time of the packet.
+   * 
+ * + * .google.protobuf.Timestamp capture_time = 1 [(.google.api.field_behavior) = INPUT_ONLY]; + * + * + * @return The captureTime. + */ + com.google.protobuf.Timestamp getCaptureTime(); + /** + * + * + *
+   * Input only. The capture time of the packet.
+   * 
+ * + * .google.protobuf.Timestamp capture_time = 1 [(.google.api.field_behavior) = INPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getCaptureTimeOrBuilder(); + + /** + * + * + *
+   * Input only. Immutable. The type of the payload.
+   * 
+ * + * + * .google.cloud.visionai.v1.PacketType type = 2 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return Whether the type field is set. + */ + boolean hasType(); + /** + * + * + *
+   * Input only. Immutable. The type of the payload.
+   * 
+ * + * + * .google.cloud.visionai.v1.PacketType type = 2 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The type. + */ + com.google.cloud.visionai.v1.PacketType getType(); + /** + * + * + *
+   * Input only. Immutable. The type of the payload.
+   * 
+ * + * + * .google.cloud.visionai.v1.PacketType type = 2 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE]; + * + */ + com.google.cloud.visionai.v1.PacketTypeOrBuilder getTypeOrBuilder(); + + /** + * + * + *
+   * Input only. This field is for users to attach user managed metadata.
+   * 
+ * + * .google.protobuf.Struct metadata = 3 [(.google.api.field_behavior) = INPUT_ONLY]; + * + * @return Whether the metadata field is set. + */ + boolean hasMetadata(); + /** + * + * + *
+   * Input only. This field is for users to attach user managed metadata.
+   * 
+ * + * .google.protobuf.Struct metadata = 3 [(.google.api.field_behavior) = INPUT_ONLY]; + * + * @return The metadata. + */ + com.google.protobuf.Struct getMetadata(); + /** + * + * + *
+   * Input only. This field is for users to attach user managed metadata.
+   * 
+ * + * .google.protobuf.Struct metadata = 3 [(.google.api.field_behavior) = INPUT_ONLY]; + */ + com.google.protobuf.StructOrBuilder getMetadataOrBuilder(); + + /** + * + * + *
+   * Output only. Metadata that the server appends to each packet before sending
+   * it to receivers. You don't need to set a value for this field when sending
+   * packets.
+   * 
+ * + * + * .google.cloud.visionai.v1.ServerMetadata server_metadata = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the serverMetadata field is set. + */ + boolean hasServerMetadata(); + /** + * + * + *
+   * Output only. Metadata that the server appends to each packet before sending
+   * it to receivers. You don't need to set a value for this field when sending
+   * packets.
+   * 
+ * + * + * .google.cloud.visionai.v1.ServerMetadata server_metadata = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The serverMetadata. + */ + com.google.cloud.visionai.v1.ServerMetadata getServerMetadata(); + /** + * + * + *
+   * Output only. Metadata that the server appends to each packet before sending
+   * it to receivers. You don't need to set a value for this field when sending
+   * packets.
+   * 
+ * + * + * .google.cloud.visionai.v1.ServerMetadata server_metadata = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.visionai.v1.ServerMetadataOrBuilder getServerMetadataOrBuilder(); + + /** + * + * + *
+   * Input only. Immutable. Metadata that the server needs to know where to
+   * write the packets to. It's only required for the first packet.
+   * 
+ * + * + * .google.cloud.visionai.v1.SeriesMetadata series_metadata = 5 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return Whether the seriesMetadata field is set. + */ + boolean hasSeriesMetadata(); + /** + * + * + *
+   * Input only. Immutable. Metadata that the server needs to know where to
+   * write the packets to. It's only required for the first packet.
+   * 
+ * + * + * .google.cloud.visionai.v1.SeriesMetadata series_metadata = 5 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The seriesMetadata. + */ + com.google.cloud.visionai.v1.SeriesMetadata getSeriesMetadata(); + /** + * + * + *
+   * Input only. Immutable. Metadata that the server needs to know where to
+   * write the packets to. It's only required for the first packet.
+   * 
+ * + * + * .google.cloud.visionai.v1.SeriesMetadata series_metadata = 5 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE]; + * + */ + com.google.cloud.visionai.v1.SeriesMetadataOrBuilder getSeriesMetadataOrBuilder(); + + /** + * + * + *
+   * Immutable. Packet flag set. SDK will set the flag automatically.
+   * 
+ * + * int32 flags = 6 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The flags. + */ + int getFlags(); + + /** + * + * + *
+   * Immutable. Header string for tracing across services. It should be set when
+   * the packet is first arrived in the stream server.
+   *
+   * The input format is a lowercase hex string:
+   *   - version_id: 1 byte, currently must be zero - hex encoded (2 characters)
+   *   - trace_id: 16 bytes (opaque blob) - hex encoded (32 characters)
+   *   - span_id: 8 bytes (opaque blob) - hex encoded (16 characters)
+   *   - trace_options: 1 byte (LSB means tracing enabled) - hex encoded (2
+   *   characters)
+   * Example: "00-404142434445464748494a4b4c4d4e4f-6162636465666768-01"
+   *           v  trace_id                         span_id          options
+   * 
+ * + * string trace_context = 7 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The traceContext. + */ + java.lang.String getTraceContext(); + /** + * + * + *
+   * Immutable. Header string for tracing across services. It should be set when
+   * the packet is first arrived in the stream server.
+   *
+   * The input format is a lowercase hex string:
+   *   - version_id: 1 byte, currently must be zero - hex encoded (2 characters)
+   *   - trace_id: 16 bytes (opaque blob) - hex encoded (32 characters)
+   *   - span_id: 8 bytes (opaque blob) - hex encoded (16 characters)
+   *   - trace_options: 1 byte (LSB means tracing enabled) - hex encoded (2
+   *   characters)
+   * Example: "00-404142434445464748494a4b4c4d4e4f-6162636465666768-01"
+   *           v  trace_id                         span_id          options
+   * 
+ * + * string trace_context = 7 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The bytes for traceContext. + */ + com.google.protobuf.ByteString getTraceContextBytes(); +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/PacketOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/PacketOrBuilder.java new file mode 100644 index 000000000000..767ba8c6e616 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/PacketOrBuilder.java @@ -0,0 +1,74 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/streaming_resources.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface PacketOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.Packet) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The packet header.
+   * 
+ * + * .google.cloud.visionai.v1.PacketHeader header = 1; + * + * @return Whether the header field is set. + */ + boolean hasHeader(); + /** + * + * + *
+   * The packet header.
+   * 
+ * + * .google.cloud.visionai.v1.PacketHeader header = 1; + * + * @return The header. + */ + com.google.cloud.visionai.v1.PacketHeader getHeader(); + /** + * + * + *
+   * The packet header.
+   * 
+ * + * .google.cloud.visionai.v1.PacketHeader header = 1; + */ + com.google.cloud.visionai.v1.PacketHeaderOrBuilder getHeaderOrBuilder(); + + /** + * + * + *
+   * The payload of the packet.
+   * 
+ * + * bytes payload = 2; + * + * @return The payload. + */ + com.google.protobuf.ByteString getPayload(); +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/PacketType.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/PacketType.java new file mode 100644 index 000000000000..18699bf0a661 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/PacketType.java @@ -0,0 +1,2414 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/streaming_resources.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * The message that represents the data type of a packet.
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.PacketType} + */ +public final class PacketType extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.PacketType) + PacketTypeOrBuilder { + private static final long serialVersionUID = 0L; + // Use PacketType.newBuilder() to construct. + private PacketType(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private PacketType() { + typeClass_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new PacketType(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.StreamingResourcesProto + .internal_static_google_cloud_visionai_v1_PacketType_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.StreamingResourcesProto + .internal_static_google_cloud_visionai_v1_PacketType_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.PacketType.class, + com.google.cloud.visionai.v1.PacketType.Builder.class); + } + + public interface TypeDescriptorOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.PacketType.TypeDescriptor) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * GstreamerBufferDescriptor is the descriptor for gstreamer buffer type.
+     * 
+ * + * .google.cloud.visionai.v1.GstreamerBufferDescriptor gstreamer_buffer_descriptor = 2; + * + * + * @return Whether the gstreamerBufferDescriptor field is set. + */ + boolean hasGstreamerBufferDescriptor(); + /** + * + * + *
+     * GstreamerBufferDescriptor is the descriptor for gstreamer buffer type.
+     * 
+ * + * .google.cloud.visionai.v1.GstreamerBufferDescriptor gstreamer_buffer_descriptor = 2; + * + * + * @return The gstreamerBufferDescriptor. + */ + com.google.cloud.visionai.v1.GstreamerBufferDescriptor getGstreamerBufferDescriptor(); + /** + * + * + *
+     * GstreamerBufferDescriptor is the descriptor for gstreamer buffer type.
+     * 
+ * + * .google.cloud.visionai.v1.GstreamerBufferDescriptor gstreamer_buffer_descriptor = 2; + * + */ + com.google.cloud.visionai.v1.GstreamerBufferDescriptorOrBuilder + getGstreamerBufferDescriptorOrBuilder(); + + /** + * + * + *
+     * RawImageDescriptor is the descriptor for the raw image type.
+     * 
+ * + * .google.cloud.visionai.v1.RawImageDescriptor raw_image_descriptor = 3; + * + * @return Whether the rawImageDescriptor field is set. + */ + boolean hasRawImageDescriptor(); + /** + * + * + *
+     * RawImageDescriptor is the descriptor for the raw image type.
+     * 
+ * + * .google.cloud.visionai.v1.RawImageDescriptor raw_image_descriptor = 3; + * + * @return The rawImageDescriptor. + */ + com.google.cloud.visionai.v1.RawImageDescriptor getRawImageDescriptor(); + /** + * + * + *
+     * RawImageDescriptor is the descriptor for the raw image type.
+     * 
+ * + * .google.cloud.visionai.v1.RawImageDescriptor raw_image_descriptor = 3; + */ + com.google.cloud.visionai.v1.RawImageDescriptorOrBuilder getRawImageDescriptorOrBuilder(); + + /** + * + * + *
+     * The type of the packet. Its possible values is codec dependent.
+     *
+     * The fully qualified type name is always the concatenation of the
+     * value in `type_class` together with the value in `type`, separated by a
+     * '/'.
+     *
+     * Note that specific codecs can define their own type hierarchy, and so the
+     * type string here can in fact be separated by multiple '/'s of its own.
+     *
+     * Please see the open source SDK for specific codec documentation.
+     * 
+ * + * string type = 1; + * + * @return The type. + */ + java.lang.String getType(); + /** + * + * + *
+     * The type of the packet. Its possible values is codec dependent.
+     *
+     * The fully qualified type name is always the concatenation of the
+     * value in `type_class` together with the value in `type`, separated by a
+     * '/'.
+     *
+     * Note that specific codecs can define their own type hierarchy, and so the
+     * type string here can in fact be separated by multiple '/'s of its own.
+     *
+     * Please see the open source SDK for specific codec documentation.
+     * 
+ * + * string type = 1; + * + * @return The bytes for type. + */ + com.google.protobuf.ByteString getTypeBytes(); + + com.google.cloud.visionai.v1.PacketType.TypeDescriptor.TypeDetailsCase getTypeDetailsCase(); + } + /** + * + * + *
+   * The message that fully specifies the type of the packet.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.PacketType.TypeDescriptor} + */ + public static final class TypeDescriptor extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.PacketType.TypeDescriptor) + TypeDescriptorOrBuilder { + private static final long serialVersionUID = 0L; + // Use TypeDescriptor.newBuilder() to construct. + private TypeDescriptor(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private TypeDescriptor() { + type_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new TypeDescriptor(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.StreamingResourcesProto + .internal_static_google_cloud_visionai_v1_PacketType_TypeDescriptor_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.StreamingResourcesProto + .internal_static_google_cloud_visionai_v1_PacketType_TypeDescriptor_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.PacketType.TypeDescriptor.class, + com.google.cloud.visionai.v1.PacketType.TypeDescriptor.Builder.class); + } + + private int typeDetailsCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object typeDetails_; + + public enum TypeDetailsCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + GSTREAMER_BUFFER_DESCRIPTOR(2), + RAW_IMAGE_DESCRIPTOR(3), + TYPEDETAILS_NOT_SET(0); + private final int value; + + private TypeDetailsCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static TypeDetailsCase valueOf(int value) { + return forNumber(value); + } + + public static TypeDetailsCase forNumber(int value) { + switch (value) { + case 2: + return GSTREAMER_BUFFER_DESCRIPTOR; + case 3: + return RAW_IMAGE_DESCRIPTOR; + case 0: + return TYPEDETAILS_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public TypeDetailsCase getTypeDetailsCase() { + return TypeDetailsCase.forNumber(typeDetailsCase_); + } + + public static final int GSTREAMER_BUFFER_DESCRIPTOR_FIELD_NUMBER = 2; + /** + * + * + *
+     * GstreamerBufferDescriptor is the descriptor for gstreamer buffer type.
+     * 
+ * + * .google.cloud.visionai.v1.GstreamerBufferDescriptor gstreamer_buffer_descriptor = 2; + * + * + * @return Whether the gstreamerBufferDescriptor field is set. + */ + @java.lang.Override + public boolean hasGstreamerBufferDescriptor() { + return typeDetailsCase_ == 2; + } + /** + * + * + *
+     * GstreamerBufferDescriptor is the descriptor for gstreamer buffer type.
+     * 
+ * + * .google.cloud.visionai.v1.GstreamerBufferDescriptor gstreamer_buffer_descriptor = 2; + * + * + * @return The gstreamerBufferDescriptor. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.GstreamerBufferDescriptor getGstreamerBufferDescriptor() { + if (typeDetailsCase_ == 2) { + return (com.google.cloud.visionai.v1.GstreamerBufferDescriptor) typeDetails_; + } + return com.google.cloud.visionai.v1.GstreamerBufferDescriptor.getDefaultInstance(); + } + /** + * + * + *
+     * GstreamerBufferDescriptor is the descriptor for gstreamer buffer type.
+     * 
+ * + * .google.cloud.visionai.v1.GstreamerBufferDescriptor gstreamer_buffer_descriptor = 2; + * + */ + @java.lang.Override + public com.google.cloud.visionai.v1.GstreamerBufferDescriptorOrBuilder + getGstreamerBufferDescriptorOrBuilder() { + if (typeDetailsCase_ == 2) { + return (com.google.cloud.visionai.v1.GstreamerBufferDescriptor) typeDetails_; + } + return com.google.cloud.visionai.v1.GstreamerBufferDescriptor.getDefaultInstance(); + } + + public static final int RAW_IMAGE_DESCRIPTOR_FIELD_NUMBER = 3; + /** + * + * + *
+     * RawImageDescriptor is the descriptor for the raw image type.
+     * 
+ * + * .google.cloud.visionai.v1.RawImageDescriptor raw_image_descriptor = 3; + * + * @return Whether the rawImageDescriptor field is set. + */ + @java.lang.Override + public boolean hasRawImageDescriptor() { + return typeDetailsCase_ == 3; + } + /** + * + * + *
+     * RawImageDescriptor is the descriptor for the raw image type.
+     * 
+ * + * .google.cloud.visionai.v1.RawImageDescriptor raw_image_descriptor = 3; + * + * @return The rawImageDescriptor. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.RawImageDescriptor getRawImageDescriptor() { + if (typeDetailsCase_ == 3) { + return (com.google.cloud.visionai.v1.RawImageDescriptor) typeDetails_; + } + return com.google.cloud.visionai.v1.RawImageDescriptor.getDefaultInstance(); + } + /** + * + * + *
+     * RawImageDescriptor is the descriptor for the raw image type.
+     * 
+ * + * .google.cloud.visionai.v1.RawImageDescriptor raw_image_descriptor = 3; + */ + @java.lang.Override + public com.google.cloud.visionai.v1.RawImageDescriptorOrBuilder + getRawImageDescriptorOrBuilder() { + if (typeDetailsCase_ == 3) { + return (com.google.cloud.visionai.v1.RawImageDescriptor) typeDetails_; + } + return com.google.cloud.visionai.v1.RawImageDescriptor.getDefaultInstance(); + } + + public static final int TYPE_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object type_ = ""; + /** + * + * + *
+     * The type of the packet. Its possible values is codec dependent.
+     *
+     * The fully qualified type name is always the concatenation of the
+     * value in `type_class` together with the value in `type`, separated by a
+     * '/'.
+     *
+     * Note that specific codecs can define their own type hierarchy, and so the
+     * type string here can in fact be separated by multiple '/'s of its own.
+     *
+     * Please see the open source SDK for specific codec documentation.
+     * 
+ * + * string type = 1; + * + * @return The type. + */ + @java.lang.Override + public java.lang.String getType() { + java.lang.Object ref = type_; + 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(); + type_ = s; + return s; + } + } + /** + * + * + *
+     * The type of the packet. Its possible values is codec dependent.
+     *
+     * The fully qualified type name is always the concatenation of the
+     * value in `type_class` together with the value in `type`, separated by a
+     * '/'.
+     *
+     * Note that specific codecs can define their own type hierarchy, and so the
+     * type string here can in fact be separated by multiple '/'s of its own.
+     *
+     * Please see the open source SDK for specific codec documentation.
+     * 
+ * + * string type = 1; + * + * @return The bytes for type. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTypeBytes() { + java.lang.Object ref = type_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + type_ = 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(type_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, type_); + } + if (typeDetailsCase_ == 2) { + output.writeMessage( + 2, (com.google.cloud.visionai.v1.GstreamerBufferDescriptor) typeDetails_); + } + if (typeDetailsCase_ == 3) { + output.writeMessage(3, (com.google.cloud.visionai.v1.RawImageDescriptor) typeDetails_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(type_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, type_); + } + if (typeDetailsCase_ == 2) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 2, (com.google.cloud.visionai.v1.GstreamerBufferDescriptor) typeDetails_); + } + if (typeDetailsCase_ == 3) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 3, (com.google.cloud.visionai.v1.RawImageDescriptor) typeDetails_); + } + size += getUnknownFields().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.visionai.v1.PacketType.TypeDescriptor)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.PacketType.TypeDescriptor other = + (com.google.cloud.visionai.v1.PacketType.TypeDescriptor) obj; + + if (!getType().equals(other.getType())) return false; + if (!getTypeDetailsCase().equals(other.getTypeDetailsCase())) return false; + switch (typeDetailsCase_) { + case 2: + if (!getGstreamerBufferDescriptor().equals(other.getGstreamerBufferDescriptor())) + return false; + break; + case 3: + if (!getRawImageDescriptor().equals(other.getRawImageDescriptor())) return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + TYPE_FIELD_NUMBER; + hash = (53 * hash) + getType().hashCode(); + switch (typeDetailsCase_) { + case 2: + hash = (37 * hash) + GSTREAMER_BUFFER_DESCRIPTOR_FIELD_NUMBER; + hash = (53 * hash) + getGstreamerBufferDescriptor().hashCode(); + break; + case 3: + hash = (37 * hash) + RAW_IMAGE_DESCRIPTOR_FIELD_NUMBER; + hash = (53 * hash) + getRawImageDescriptor().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.PacketType.TypeDescriptor parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.PacketType.TypeDescriptor 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.visionai.v1.PacketType.TypeDescriptor parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.PacketType.TypeDescriptor 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.visionai.v1.PacketType.TypeDescriptor parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.PacketType.TypeDescriptor parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.PacketType.TypeDescriptor parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.PacketType.TypeDescriptor 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.visionai.v1.PacketType.TypeDescriptor parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.PacketType.TypeDescriptor 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.visionai.v1.PacketType.TypeDescriptor parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.PacketType.TypeDescriptor 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.visionai.v1.PacketType.TypeDescriptor 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 message that fully specifies the type of the packet.
+     * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.PacketType.TypeDescriptor} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.PacketType.TypeDescriptor) + com.google.cloud.visionai.v1.PacketType.TypeDescriptorOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.StreamingResourcesProto + .internal_static_google_cloud_visionai_v1_PacketType_TypeDescriptor_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.StreamingResourcesProto + .internal_static_google_cloud_visionai_v1_PacketType_TypeDescriptor_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.PacketType.TypeDescriptor.class, + com.google.cloud.visionai.v1.PacketType.TypeDescriptor.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.PacketType.TypeDescriptor.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (gstreamerBufferDescriptorBuilder_ != null) { + gstreamerBufferDescriptorBuilder_.clear(); + } + if (rawImageDescriptorBuilder_ != null) { + rawImageDescriptorBuilder_.clear(); + } + type_ = ""; + typeDetailsCase_ = 0; + typeDetails_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.StreamingResourcesProto + .internal_static_google_cloud_visionai_v1_PacketType_TypeDescriptor_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.PacketType.TypeDescriptor getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.PacketType.TypeDescriptor.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.PacketType.TypeDescriptor build() { + com.google.cloud.visionai.v1.PacketType.TypeDescriptor result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.PacketType.TypeDescriptor buildPartial() { + com.google.cloud.visionai.v1.PacketType.TypeDescriptor result = + new com.google.cloud.visionai.v1.PacketType.TypeDescriptor(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.visionai.v1.PacketType.TypeDescriptor result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.type_ = type_; + } + } + + private void buildPartialOneofs( + com.google.cloud.visionai.v1.PacketType.TypeDescriptor result) { + result.typeDetailsCase_ = typeDetailsCase_; + result.typeDetails_ = this.typeDetails_; + if (typeDetailsCase_ == 2 && gstreamerBufferDescriptorBuilder_ != null) { + result.typeDetails_ = gstreamerBufferDescriptorBuilder_.build(); + } + if (typeDetailsCase_ == 3 && rawImageDescriptorBuilder_ != null) { + result.typeDetails_ = rawImageDescriptorBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.PacketType.TypeDescriptor) { + return mergeFrom((com.google.cloud.visionai.v1.PacketType.TypeDescriptor) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.PacketType.TypeDescriptor other) { + if (other == com.google.cloud.visionai.v1.PacketType.TypeDescriptor.getDefaultInstance()) + return this; + if (!other.getType().isEmpty()) { + type_ = other.type_; + bitField0_ |= 0x00000004; + onChanged(); + } + switch (other.getTypeDetailsCase()) { + case GSTREAMER_BUFFER_DESCRIPTOR: + { + mergeGstreamerBufferDescriptor(other.getGstreamerBufferDescriptor()); + break; + } + case RAW_IMAGE_DESCRIPTOR: + { + mergeRawImageDescriptor(other.getRawImageDescriptor()); + break; + } + case TYPEDETAILS_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + type_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 10 + case 18: + { + input.readMessage( + getGstreamerBufferDescriptorFieldBuilder().getBuilder(), extensionRegistry); + typeDetailsCase_ = 2; + break; + } // case 18 + case 26: + { + input.readMessage( + getRawImageDescriptorFieldBuilder().getBuilder(), extensionRegistry); + typeDetailsCase_ = 3; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int typeDetailsCase_ = 0; + private java.lang.Object typeDetails_; + + public TypeDetailsCase getTypeDetailsCase() { + return TypeDetailsCase.forNumber(typeDetailsCase_); + } + + public Builder clearTypeDetails() { + typeDetailsCase_ = 0; + typeDetails_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.GstreamerBufferDescriptor, + com.google.cloud.visionai.v1.GstreamerBufferDescriptor.Builder, + com.google.cloud.visionai.v1.GstreamerBufferDescriptorOrBuilder> + gstreamerBufferDescriptorBuilder_; + /** + * + * + *
+       * GstreamerBufferDescriptor is the descriptor for gstreamer buffer type.
+       * 
+ * + * .google.cloud.visionai.v1.GstreamerBufferDescriptor gstreamer_buffer_descriptor = 2; + * + * + * @return Whether the gstreamerBufferDescriptor field is set. + */ + @java.lang.Override + public boolean hasGstreamerBufferDescriptor() { + return typeDetailsCase_ == 2; + } + /** + * + * + *
+       * GstreamerBufferDescriptor is the descriptor for gstreamer buffer type.
+       * 
+ * + * .google.cloud.visionai.v1.GstreamerBufferDescriptor gstreamer_buffer_descriptor = 2; + * + * + * @return The gstreamerBufferDescriptor. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.GstreamerBufferDescriptor getGstreamerBufferDescriptor() { + if (gstreamerBufferDescriptorBuilder_ == null) { + if (typeDetailsCase_ == 2) { + return (com.google.cloud.visionai.v1.GstreamerBufferDescriptor) typeDetails_; + } + return com.google.cloud.visionai.v1.GstreamerBufferDescriptor.getDefaultInstance(); + } else { + if (typeDetailsCase_ == 2) { + return gstreamerBufferDescriptorBuilder_.getMessage(); + } + return com.google.cloud.visionai.v1.GstreamerBufferDescriptor.getDefaultInstance(); + } + } + /** + * + * + *
+       * GstreamerBufferDescriptor is the descriptor for gstreamer buffer type.
+       * 
+ * + * .google.cloud.visionai.v1.GstreamerBufferDescriptor gstreamer_buffer_descriptor = 2; + * + */ + public Builder setGstreamerBufferDescriptor( + com.google.cloud.visionai.v1.GstreamerBufferDescriptor value) { + if (gstreamerBufferDescriptorBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + typeDetails_ = value; + onChanged(); + } else { + gstreamerBufferDescriptorBuilder_.setMessage(value); + } + typeDetailsCase_ = 2; + return this; + } + /** + * + * + *
+       * GstreamerBufferDescriptor is the descriptor for gstreamer buffer type.
+       * 
+ * + * .google.cloud.visionai.v1.GstreamerBufferDescriptor gstreamer_buffer_descriptor = 2; + * + */ + public Builder setGstreamerBufferDescriptor( + com.google.cloud.visionai.v1.GstreamerBufferDescriptor.Builder builderForValue) { + if (gstreamerBufferDescriptorBuilder_ == null) { + typeDetails_ = builderForValue.build(); + onChanged(); + } else { + gstreamerBufferDescriptorBuilder_.setMessage(builderForValue.build()); + } + typeDetailsCase_ = 2; + return this; + } + /** + * + * + *
+       * GstreamerBufferDescriptor is the descriptor for gstreamer buffer type.
+       * 
+ * + * .google.cloud.visionai.v1.GstreamerBufferDescriptor gstreamer_buffer_descriptor = 2; + * + */ + public Builder mergeGstreamerBufferDescriptor( + com.google.cloud.visionai.v1.GstreamerBufferDescriptor value) { + if (gstreamerBufferDescriptorBuilder_ == null) { + if (typeDetailsCase_ == 2 + && typeDetails_ + != com.google.cloud.visionai.v1.GstreamerBufferDescriptor.getDefaultInstance()) { + typeDetails_ = + com.google.cloud.visionai.v1.GstreamerBufferDescriptor.newBuilder( + (com.google.cloud.visionai.v1.GstreamerBufferDescriptor) typeDetails_) + .mergeFrom(value) + .buildPartial(); + } else { + typeDetails_ = value; + } + onChanged(); + } else { + if (typeDetailsCase_ == 2) { + gstreamerBufferDescriptorBuilder_.mergeFrom(value); + } else { + gstreamerBufferDescriptorBuilder_.setMessage(value); + } + } + typeDetailsCase_ = 2; + return this; + } + /** + * + * + *
+       * GstreamerBufferDescriptor is the descriptor for gstreamer buffer type.
+       * 
+ * + * .google.cloud.visionai.v1.GstreamerBufferDescriptor gstreamer_buffer_descriptor = 2; + * + */ + public Builder clearGstreamerBufferDescriptor() { + if (gstreamerBufferDescriptorBuilder_ == null) { + if (typeDetailsCase_ == 2) { + typeDetailsCase_ = 0; + typeDetails_ = null; + onChanged(); + } + } else { + if (typeDetailsCase_ == 2) { + typeDetailsCase_ = 0; + typeDetails_ = null; + } + gstreamerBufferDescriptorBuilder_.clear(); + } + return this; + } + /** + * + * + *
+       * GstreamerBufferDescriptor is the descriptor for gstreamer buffer type.
+       * 
+ * + * .google.cloud.visionai.v1.GstreamerBufferDescriptor gstreamer_buffer_descriptor = 2; + * + */ + public com.google.cloud.visionai.v1.GstreamerBufferDescriptor.Builder + getGstreamerBufferDescriptorBuilder() { + return getGstreamerBufferDescriptorFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * GstreamerBufferDescriptor is the descriptor for gstreamer buffer type.
+       * 
+ * + * .google.cloud.visionai.v1.GstreamerBufferDescriptor gstreamer_buffer_descriptor = 2; + * + */ + @java.lang.Override + public com.google.cloud.visionai.v1.GstreamerBufferDescriptorOrBuilder + getGstreamerBufferDescriptorOrBuilder() { + if ((typeDetailsCase_ == 2) && (gstreamerBufferDescriptorBuilder_ != null)) { + return gstreamerBufferDescriptorBuilder_.getMessageOrBuilder(); + } else { + if (typeDetailsCase_ == 2) { + return (com.google.cloud.visionai.v1.GstreamerBufferDescriptor) typeDetails_; + } + return com.google.cloud.visionai.v1.GstreamerBufferDescriptor.getDefaultInstance(); + } + } + /** + * + * + *
+       * GstreamerBufferDescriptor is the descriptor for gstreamer buffer type.
+       * 
+ * + * .google.cloud.visionai.v1.GstreamerBufferDescriptor gstreamer_buffer_descriptor = 2; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.GstreamerBufferDescriptor, + com.google.cloud.visionai.v1.GstreamerBufferDescriptor.Builder, + com.google.cloud.visionai.v1.GstreamerBufferDescriptorOrBuilder> + getGstreamerBufferDescriptorFieldBuilder() { + if (gstreamerBufferDescriptorBuilder_ == null) { + if (!(typeDetailsCase_ == 2)) { + typeDetails_ = + com.google.cloud.visionai.v1.GstreamerBufferDescriptor.getDefaultInstance(); + } + gstreamerBufferDescriptorBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.GstreamerBufferDescriptor, + com.google.cloud.visionai.v1.GstreamerBufferDescriptor.Builder, + com.google.cloud.visionai.v1.GstreamerBufferDescriptorOrBuilder>( + (com.google.cloud.visionai.v1.GstreamerBufferDescriptor) typeDetails_, + getParentForChildren(), + isClean()); + typeDetails_ = null; + } + typeDetailsCase_ = 2; + onChanged(); + return gstreamerBufferDescriptorBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.RawImageDescriptor, + com.google.cloud.visionai.v1.RawImageDescriptor.Builder, + com.google.cloud.visionai.v1.RawImageDescriptorOrBuilder> + rawImageDescriptorBuilder_; + /** + * + * + *
+       * RawImageDescriptor is the descriptor for the raw image type.
+       * 
+ * + * .google.cloud.visionai.v1.RawImageDescriptor raw_image_descriptor = 3; + * + * @return Whether the rawImageDescriptor field is set. + */ + @java.lang.Override + public boolean hasRawImageDescriptor() { + return typeDetailsCase_ == 3; + } + /** + * + * + *
+       * RawImageDescriptor is the descriptor for the raw image type.
+       * 
+ * + * .google.cloud.visionai.v1.RawImageDescriptor raw_image_descriptor = 3; + * + * @return The rawImageDescriptor. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.RawImageDescriptor getRawImageDescriptor() { + if (rawImageDescriptorBuilder_ == null) { + if (typeDetailsCase_ == 3) { + return (com.google.cloud.visionai.v1.RawImageDescriptor) typeDetails_; + } + return com.google.cloud.visionai.v1.RawImageDescriptor.getDefaultInstance(); + } else { + if (typeDetailsCase_ == 3) { + return rawImageDescriptorBuilder_.getMessage(); + } + return com.google.cloud.visionai.v1.RawImageDescriptor.getDefaultInstance(); + } + } + /** + * + * + *
+       * RawImageDescriptor is the descriptor for the raw image type.
+       * 
+ * + * .google.cloud.visionai.v1.RawImageDescriptor raw_image_descriptor = 3; + */ + public Builder setRawImageDescriptor(com.google.cloud.visionai.v1.RawImageDescriptor value) { + if (rawImageDescriptorBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + typeDetails_ = value; + onChanged(); + } else { + rawImageDescriptorBuilder_.setMessage(value); + } + typeDetailsCase_ = 3; + return this; + } + /** + * + * + *
+       * RawImageDescriptor is the descriptor for the raw image type.
+       * 
+ * + * .google.cloud.visionai.v1.RawImageDescriptor raw_image_descriptor = 3; + */ + public Builder setRawImageDescriptor( + com.google.cloud.visionai.v1.RawImageDescriptor.Builder builderForValue) { + if (rawImageDescriptorBuilder_ == null) { + typeDetails_ = builderForValue.build(); + onChanged(); + } else { + rawImageDescriptorBuilder_.setMessage(builderForValue.build()); + } + typeDetailsCase_ = 3; + return this; + } + /** + * + * + *
+       * RawImageDescriptor is the descriptor for the raw image type.
+       * 
+ * + * .google.cloud.visionai.v1.RawImageDescriptor raw_image_descriptor = 3; + */ + public Builder mergeRawImageDescriptor( + com.google.cloud.visionai.v1.RawImageDescriptor value) { + if (rawImageDescriptorBuilder_ == null) { + if (typeDetailsCase_ == 3 + && typeDetails_ + != com.google.cloud.visionai.v1.RawImageDescriptor.getDefaultInstance()) { + typeDetails_ = + com.google.cloud.visionai.v1.RawImageDescriptor.newBuilder( + (com.google.cloud.visionai.v1.RawImageDescriptor) typeDetails_) + .mergeFrom(value) + .buildPartial(); + } else { + typeDetails_ = value; + } + onChanged(); + } else { + if (typeDetailsCase_ == 3) { + rawImageDescriptorBuilder_.mergeFrom(value); + } else { + rawImageDescriptorBuilder_.setMessage(value); + } + } + typeDetailsCase_ = 3; + return this; + } + /** + * + * + *
+       * RawImageDescriptor is the descriptor for the raw image type.
+       * 
+ * + * .google.cloud.visionai.v1.RawImageDescriptor raw_image_descriptor = 3; + */ + public Builder clearRawImageDescriptor() { + if (rawImageDescriptorBuilder_ == null) { + if (typeDetailsCase_ == 3) { + typeDetailsCase_ = 0; + typeDetails_ = null; + onChanged(); + } + } else { + if (typeDetailsCase_ == 3) { + typeDetailsCase_ = 0; + typeDetails_ = null; + } + rawImageDescriptorBuilder_.clear(); + } + return this; + } + /** + * + * + *
+       * RawImageDescriptor is the descriptor for the raw image type.
+       * 
+ * + * .google.cloud.visionai.v1.RawImageDescriptor raw_image_descriptor = 3; + */ + public com.google.cloud.visionai.v1.RawImageDescriptor.Builder + getRawImageDescriptorBuilder() { + return getRawImageDescriptorFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * RawImageDescriptor is the descriptor for the raw image type.
+       * 
+ * + * .google.cloud.visionai.v1.RawImageDescriptor raw_image_descriptor = 3; + */ + @java.lang.Override + public com.google.cloud.visionai.v1.RawImageDescriptorOrBuilder + getRawImageDescriptorOrBuilder() { + if ((typeDetailsCase_ == 3) && (rawImageDescriptorBuilder_ != null)) { + return rawImageDescriptorBuilder_.getMessageOrBuilder(); + } else { + if (typeDetailsCase_ == 3) { + return (com.google.cloud.visionai.v1.RawImageDescriptor) typeDetails_; + } + return com.google.cloud.visionai.v1.RawImageDescriptor.getDefaultInstance(); + } + } + /** + * + * + *
+       * RawImageDescriptor is the descriptor for the raw image type.
+       * 
+ * + * .google.cloud.visionai.v1.RawImageDescriptor raw_image_descriptor = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.RawImageDescriptor, + com.google.cloud.visionai.v1.RawImageDescriptor.Builder, + com.google.cloud.visionai.v1.RawImageDescriptorOrBuilder> + getRawImageDescriptorFieldBuilder() { + if (rawImageDescriptorBuilder_ == null) { + if (!(typeDetailsCase_ == 3)) { + typeDetails_ = com.google.cloud.visionai.v1.RawImageDescriptor.getDefaultInstance(); + } + rawImageDescriptorBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.RawImageDescriptor, + com.google.cloud.visionai.v1.RawImageDescriptor.Builder, + com.google.cloud.visionai.v1.RawImageDescriptorOrBuilder>( + (com.google.cloud.visionai.v1.RawImageDescriptor) typeDetails_, + getParentForChildren(), + isClean()); + typeDetails_ = null; + } + typeDetailsCase_ = 3; + onChanged(); + return rawImageDescriptorBuilder_; + } + + private java.lang.Object type_ = ""; + /** + * + * + *
+       * The type of the packet. Its possible values is codec dependent.
+       *
+       * The fully qualified type name is always the concatenation of the
+       * value in `type_class` together with the value in `type`, separated by a
+       * '/'.
+       *
+       * Note that specific codecs can define their own type hierarchy, and so the
+       * type string here can in fact be separated by multiple '/'s of its own.
+       *
+       * Please see the open source SDK for specific codec documentation.
+       * 
+ * + * string type = 1; + * + * @return The type. + */ + public java.lang.String getType() { + java.lang.Object ref = type_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + type_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * The type of the packet. Its possible values is codec dependent.
+       *
+       * The fully qualified type name is always the concatenation of the
+       * value in `type_class` together with the value in `type`, separated by a
+       * '/'.
+       *
+       * Note that specific codecs can define their own type hierarchy, and so the
+       * type string here can in fact be separated by multiple '/'s of its own.
+       *
+       * Please see the open source SDK for specific codec documentation.
+       * 
+ * + * string type = 1; + * + * @return The bytes for type. + */ + public com.google.protobuf.ByteString getTypeBytes() { + java.lang.Object ref = type_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + type_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * The type of the packet. Its possible values is codec dependent.
+       *
+       * The fully qualified type name is always the concatenation of the
+       * value in `type_class` together with the value in `type`, separated by a
+       * '/'.
+       *
+       * Note that specific codecs can define their own type hierarchy, and so the
+       * type string here can in fact be separated by multiple '/'s of its own.
+       *
+       * Please see the open source SDK for specific codec documentation.
+       * 
+ * + * string type = 1; + * + * @param value The type to set. + * @return This builder for chaining. + */ + public Builder setType(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + type_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+       * The type of the packet. Its possible values is codec dependent.
+       *
+       * The fully qualified type name is always the concatenation of the
+       * value in `type_class` together with the value in `type`, separated by a
+       * '/'.
+       *
+       * Note that specific codecs can define their own type hierarchy, and so the
+       * type string here can in fact be separated by multiple '/'s of its own.
+       *
+       * Please see the open source SDK for specific codec documentation.
+       * 
+ * + * string type = 1; + * + * @return This builder for chaining. + */ + public Builder clearType() { + type_ = getDefaultInstance().getType(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+       * The type of the packet. Its possible values is codec dependent.
+       *
+       * The fully qualified type name is always the concatenation of the
+       * value in `type_class` together with the value in `type`, separated by a
+       * '/'.
+       *
+       * Note that specific codecs can define their own type hierarchy, and so the
+       * type string here can in fact be separated by multiple '/'s of its own.
+       *
+       * Please see the open source SDK for specific codec documentation.
+       * 
+ * + * string type = 1; + * + * @param value The bytes for type to set. + * @return This builder for chaining. + */ + public Builder setTypeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + type_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.PacketType.TypeDescriptor) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.PacketType.TypeDescriptor) + private static final com.google.cloud.visionai.v1.PacketType.TypeDescriptor DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.PacketType.TypeDescriptor(); + } + + public static com.google.cloud.visionai.v1.PacketType.TypeDescriptor getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public TypeDescriptor parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.PacketType.TypeDescriptor getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int bitField0_; + public static final int TYPE_CLASS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object typeClass_ = ""; + /** + * + * + *
+   * The type class of the packet. Its possible values are:
+   * "gst", "protobuf", and "string".
+   * 
+ * + * string type_class = 1; + * + * @return The typeClass. + */ + @java.lang.Override + public java.lang.String getTypeClass() { + java.lang.Object ref = typeClass_; + 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(); + typeClass_ = s; + return s; + } + } + /** + * + * + *
+   * The type class of the packet. Its possible values are:
+   * "gst", "protobuf", and "string".
+   * 
+ * + * string type_class = 1; + * + * @return The bytes for typeClass. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTypeClassBytes() { + java.lang.Object ref = typeClass_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + typeClass_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TYPE_DESCRIPTOR_FIELD_NUMBER = 2; + private com.google.cloud.visionai.v1.PacketType.TypeDescriptor typeDescriptor_; + /** + * + * + *
+   * The type descriptor.
+   * 
+ * + * .google.cloud.visionai.v1.PacketType.TypeDescriptor type_descriptor = 2; + * + * @return Whether the typeDescriptor field is set. + */ + @java.lang.Override + public boolean hasTypeDescriptor() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * The type descriptor.
+   * 
+ * + * .google.cloud.visionai.v1.PacketType.TypeDescriptor type_descriptor = 2; + * + * @return The typeDescriptor. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.PacketType.TypeDescriptor getTypeDescriptor() { + return typeDescriptor_ == null + ? com.google.cloud.visionai.v1.PacketType.TypeDescriptor.getDefaultInstance() + : typeDescriptor_; + } + /** + * + * + *
+   * The type descriptor.
+   * 
+ * + * .google.cloud.visionai.v1.PacketType.TypeDescriptor type_descriptor = 2; + */ + @java.lang.Override + public com.google.cloud.visionai.v1.PacketType.TypeDescriptorOrBuilder + getTypeDescriptorOrBuilder() { + return typeDescriptor_ == null + ? com.google.cloud.visionai.v1.PacketType.TypeDescriptor.getDefaultInstance() + : typeDescriptor_; + } + + 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(typeClass_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, typeClass_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getTypeDescriptor()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(typeClass_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, typeClass_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getTypeDescriptor()); + } + size += getUnknownFields().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.visionai.v1.PacketType)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.PacketType other = (com.google.cloud.visionai.v1.PacketType) obj; + + if (!getTypeClass().equals(other.getTypeClass())) return false; + if (hasTypeDescriptor() != other.hasTypeDescriptor()) return false; + if (hasTypeDescriptor()) { + if (!getTypeDescriptor().equals(other.getTypeDescriptor())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + TYPE_CLASS_FIELD_NUMBER; + hash = (53 * hash) + getTypeClass().hashCode(); + if (hasTypeDescriptor()) { + hash = (37 * hash) + TYPE_DESCRIPTOR_FIELD_NUMBER; + hash = (53 * hash) + getTypeDescriptor().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.PacketType parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.PacketType 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.visionai.v1.PacketType parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.PacketType 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.visionai.v1.PacketType parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.PacketType parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.PacketType parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.PacketType 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.visionai.v1.PacketType parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.PacketType 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.visionai.v1.PacketType parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.PacketType 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.visionai.v1.PacketType 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 message that represents the data type of a packet.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.PacketType} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.PacketType) + com.google.cloud.visionai.v1.PacketTypeOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.StreamingResourcesProto + .internal_static_google_cloud_visionai_v1_PacketType_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.StreamingResourcesProto + .internal_static_google_cloud_visionai_v1_PacketType_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.PacketType.class, + com.google.cloud.visionai.v1.PacketType.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.PacketType.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getTypeDescriptorFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + typeClass_ = ""; + typeDescriptor_ = null; + if (typeDescriptorBuilder_ != null) { + typeDescriptorBuilder_.dispose(); + typeDescriptorBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.StreamingResourcesProto + .internal_static_google_cloud_visionai_v1_PacketType_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.PacketType getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.PacketType.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.PacketType build() { + com.google.cloud.visionai.v1.PacketType result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.PacketType buildPartial() { + com.google.cloud.visionai.v1.PacketType result = + new com.google.cloud.visionai.v1.PacketType(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.visionai.v1.PacketType result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.typeClass_ = typeClass_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.typeDescriptor_ = + typeDescriptorBuilder_ == null ? typeDescriptor_ : typeDescriptorBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.PacketType) { + return mergeFrom((com.google.cloud.visionai.v1.PacketType) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.PacketType other) { + if (other == com.google.cloud.visionai.v1.PacketType.getDefaultInstance()) return this; + if (!other.getTypeClass().isEmpty()) { + typeClass_ = other.typeClass_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasTypeDescriptor()) { + mergeTypeDescriptor(other.getTypeDescriptor()); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + typeClass_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage(getTypeDescriptorFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object typeClass_ = ""; + /** + * + * + *
+     * The type class of the packet. Its possible values are:
+     * "gst", "protobuf", and "string".
+     * 
+ * + * string type_class = 1; + * + * @return The typeClass. + */ + public java.lang.String getTypeClass() { + java.lang.Object ref = typeClass_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + typeClass_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The type class of the packet. Its possible values are:
+     * "gst", "protobuf", and "string".
+     * 
+ * + * string type_class = 1; + * + * @return The bytes for typeClass. + */ + public com.google.protobuf.ByteString getTypeClassBytes() { + java.lang.Object ref = typeClass_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + typeClass_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The type class of the packet. Its possible values are:
+     * "gst", "protobuf", and "string".
+     * 
+ * + * string type_class = 1; + * + * @param value The typeClass to set. + * @return This builder for chaining. + */ + public Builder setTypeClass(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + typeClass_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The type class of the packet. Its possible values are:
+     * "gst", "protobuf", and "string".
+     * 
+ * + * string type_class = 1; + * + * @return This builder for chaining. + */ + public Builder clearTypeClass() { + typeClass_ = getDefaultInstance().getTypeClass(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * The type class of the packet. Its possible values are:
+     * "gst", "protobuf", and "string".
+     * 
+ * + * string type_class = 1; + * + * @param value The bytes for typeClass to set. + * @return This builder for chaining. + */ + public Builder setTypeClassBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + typeClass_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.cloud.visionai.v1.PacketType.TypeDescriptor typeDescriptor_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.PacketType.TypeDescriptor, + com.google.cloud.visionai.v1.PacketType.TypeDescriptor.Builder, + com.google.cloud.visionai.v1.PacketType.TypeDescriptorOrBuilder> + typeDescriptorBuilder_; + /** + * + * + *
+     * The type descriptor.
+     * 
+ * + * .google.cloud.visionai.v1.PacketType.TypeDescriptor type_descriptor = 2; + * + * @return Whether the typeDescriptor field is set. + */ + public boolean hasTypeDescriptor() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * The type descriptor.
+     * 
+ * + * .google.cloud.visionai.v1.PacketType.TypeDescriptor type_descriptor = 2; + * + * @return The typeDescriptor. + */ + public com.google.cloud.visionai.v1.PacketType.TypeDescriptor getTypeDescriptor() { + if (typeDescriptorBuilder_ == null) { + return typeDescriptor_ == null + ? com.google.cloud.visionai.v1.PacketType.TypeDescriptor.getDefaultInstance() + : typeDescriptor_; + } else { + return typeDescriptorBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The type descriptor.
+     * 
+ * + * .google.cloud.visionai.v1.PacketType.TypeDescriptor type_descriptor = 2; + */ + public Builder setTypeDescriptor(com.google.cloud.visionai.v1.PacketType.TypeDescriptor value) { + if (typeDescriptorBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + typeDescriptor_ = value; + } else { + typeDescriptorBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * The type descriptor.
+     * 
+ * + * .google.cloud.visionai.v1.PacketType.TypeDescriptor type_descriptor = 2; + */ + public Builder setTypeDescriptor( + com.google.cloud.visionai.v1.PacketType.TypeDescriptor.Builder builderForValue) { + if (typeDescriptorBuilder_ == null) { + typeDescriptor_ = builderForValue.build(); + } else { + typeDescriptorBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * The type descriptor.
+     * 
+ * + * .google.cloud.visionai.v1.PacketType.TypeDescriptor type_descriptor = 2; + */ + public Builder mergeTypeDescriptor( + com.google.cloud.visionai.v1.PacketType.TypeDescriptor value) { + if (typeDescriptorBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && typeDescriptor_ != null + && typeDescriptor_ + != com.google.cloud.visionai.v1.PacketType.TypeDescriptor.getDefaultInstance()) { + getTypeDescriptorBuilder().mergeFrom(value); + } else { + typeDescriptor_ = value; + } + } else { + typeDescriptorBuilder_.mergeFrom(value); + } + if (typeDescriptor_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + /** + * + * + *
+     * The type descriptor.
+     * 
+ * + * .google.cloud.visionai.v1.PacketType.TypeDescriptor type_descriptor = 2; + */ + public Builder clearTypeDescriptor() { + bitField0_ = (bitField0_ & ~0x00000002); + typeDescriptor_ = null; + if (typeDescriptorBuilder_ != null) { + typeDescriptorBuilder_.dispose(); + typeDescriptorBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * The type descriptor.
+     * 
+ * + * .google.cloud.visionai.v1.PacketType.TypeDescriptor type_descriptor = 2; + */ + public com.google.cloud.visionai.v1.PacketType.TypeDescriptor.Builder + getTypeDescriptorBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getTypeDescriptorFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The type descriptor.
+     * 
+ * + * .google.cloud.visionai.v1.PacketType.TypeDescriptor type_descriptor = 2; + */ + public com.google.cloud.visionai.v1.PacketType.TypeDescriptorOrBuilder + getTypeDescriptorOrBuilder() { + if (typeDescriptorBuilder_ != null) { + return typeDescriptorBuilder_.getMessageOrBuilder(); + } else { + return typeDescriptor_ == null + ? com.google.cloud.visionai.v1.PacketType.TypeDescriptor.getDefaultInstance() + : typeDescriptor_; + } + } + /** + * + * + *
+     * The type descriptor.
+     * 
+ * + * .google.cloud.visionai.v1.PacketType.TypeDescriptor type_descriptor = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.PacketType.TypeDescriptor, + com.google.cloud.visionai.v1.PacketType.TypeDescriptor.Builder, + com.google.cloud.visionai.v1.PacketType.TypeDescriptorOrBuilder> + getTypeDescriptorFieldBuilder() { + if (typeDescriptorBuilder_ == null) { + typeDescriptorBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.PacketType.TypeDescriptor, + com.google.cloud.visionai.v1.PacketType.TypeDescriptor.Builder, + com.google.cloud.visionai.v1.PacketType.TypeDescriptorOrBuilder>( + getTypeDescriptor(), getParentForChildren(), isClean()); + typeDescriptor_ = null; + } + return typeDescriptorBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.PacketType) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.PacketType) + private static final com.google.cloud.visionai.v1.PacketType DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.PacketType(); + } + + public static com.google.cloud.visionai.v1.PacketType getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PacketType parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.PacketType getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/PacketTypeOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/PacketTypeOrBuilder.java new file mode 100644 index 000000000000..7c1029ed04ed --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/PacketTypeOrBuilder.java @@ -0,0 +1,88 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/streaming_resources.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface PacketTypeOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.PacketType) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The type class of the packet. Its possible values are:
+   * "gst", "protobuf", and "string".
+   * 
+ * + * string type_class = 1; + * + * @return The typeClass. + */ + java.lang.String getTypeClass(); + /** + * + * + *
+   * The type class of the packet. Its possible values are:
+   * "gst", "protobuf", and "string".
+   * 
+ * + * string type_class = 1; + * + * @return The bytes for typeClass. + */ + com.google.protobuf.ByteString getTypeClassBytes(); + + /** + * + * + *
+   * The type descriptor.
+   * 
+ * + * .google.cloud.visionai.v1.PacketType.TypeDescriptor type_descriptor = 2; + * + * @return Whether the typeDescriptor field is set. + */ + boolean hasTypeDescriptor(); + /** + * + * + *
+   * The type descriptor.
+   * 
+ * + * .google.cloud.visionai.v1.PacketType.TypeDescriptor type_descriptor = 2; + * + * @return The typeDescriptor. + */ + com.google.cloud.visionai.v1.PacketType.TypeDescriptor getTypeDescriptor(); + /** + * + * + *
+   * The type descriptor.
+   * 
+ * + * .google.cloud.visionai.v1.PacketType.TypeDescriptor type_descriptor = 2; + */ + com.google.cloud.visionai.v1.PacketType.TypeDescriptorOrBuilder getTypeDescriptorOrBuilder(); +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/Partition.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/Partition.java new file mode 100644 index 000000000000..8cbacd30614b --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/Partition.java @@ -0,0 +1,4475 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/warehouse.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * Partition to specify the partition in time and space for sub-asset level
+ * annotation.
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.Partition} + */ +public final class Partition extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.Partition) + PartitionOrBuilder { + private static final long serialVersionUID = 0L; + // Use Partition.newBuilder() to construct. + private Partition(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Partition() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Partition(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_Partition_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_Partition_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.Partition.class, + com.google.cloud.visionai.v1.Partition.Builder.class); + } + + public interface TemporalPartitionOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.Partition.TemporalPartition) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Start time of the partition.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 1; + * + * @return Whether the startTime field is set. + */ + boolean hasStartTime(); + /** + * + * + *
+     * Start time of the partition.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 1; + * + * @return The startTime. + */ + com.google.protobuf.Timestamp getStartTime(); + /** + * + * + *
+     * Start time of the partition.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 1; + */ + com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder(); + + /** + * + * + *
+     * End time of the partition.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2; + * + * @return Whether the endTime field is set. + */ + boolean hasEndTime(); + /** + * + * + *
+     * End time of the partition.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2; + * + * @return The endTime. + */ + com.google.protobuf.Timestamp getEndTime(); + /** + * + * + *
+     * End time of the partition.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2; + */ + com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder(); + } + /** + * + * + *
+   * Partition of asset in UTC Epoch time. Supported by STREAM_VIDEO corpus
+   * type.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.Partition.TemporalPartition} + */ + public static final class TemporalPartition extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.Partition.TemporalPartition) + TemporalPartitionOrBuilder { + private static final long serialVersionUID = 0L; + // Use TemporalPartition.newBuilder() to construct. + private TemporalPartition(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private TemporalPartition() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new TemporalPartition(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_Partition_TemporalPartition_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_Partition_TemporalPartition_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.Partition.TemporalPartition.class, + com.google.cloud.visionai.v1.Partition.TemporalPartition.Builder.class); + } + + private int bitField0_; + public static final int START_TIME_FIELD_NUMBER = 1; + private com.google.protobuf.Timestamp startTime_; + /** + * + * + *
+     * Start time of the partition.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 1; + * + * @return Whether the startTime field is set. + */ + @java.lang.Override + public boolean hasStartTime() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * Start time of the partition.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 1; + * + * @return The startTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getStartTime() { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } + /** + * + * + *
+     * Start time of the partition.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 1; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } + + public static final int END_TIME_FIELD_NUMBER = 2; + private com.google.protobuf.Timestamp endTime_; + /** + * + * + *
+     * End time of the partition.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2; + * + * @return Whether the endTime field is set. + */ + @java.lang.Override + public boolean hasEndTime() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * End time of the partition.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2; + * + * @return The endTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getEndTime() { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + /** + * + * + *
+     * End time of the partition.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + + 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 (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getStartTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(2, getEndTime()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getStartTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getEndTime()); + } + size += getUnknownFields().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.visionai.v1.Partition.TemporalPartition)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.Partition.TemporalPartition other = + (com.google.cloud.visionai.v1.Partition.TemporalPartition) obj; + + if (hasStartTime() != other.hasStartTime()) return false; + if (hasStartTime()) { + if (!getStartTime().equals(other.getStartTime())) return false; + } + if (hasEndTime() != other.hasEndTime()) return false; + if (hasEndTime()) { + if (!getEndTime().equals(other.getEndTime())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasStartTime()) { + hash = (37 * hash) + START_TIME_FIELD_NUMBER; + hash = (53 * hash) + getStartTime().hashCode(); + } + if (hasEndTime()) { + hash = (37 * hash) + END_TIME_FIELD_NUMBER; + hash = (53 * hash) + getEndTime().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.Partition.TemporalPartition parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.Partition.TemporalPartition 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.visionai.v1.Partition.TemporalPartition parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.Partition.TemporalPartition 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.visionai.v1.Partition.TemporalPartition parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.Partition.TemporalPartition parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.Partition.TemporalPartition parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.Partition.TemporalPartition 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.visionai.v1.Partition.TemporalPartition parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.Partition.TemporalPartition 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.visionai.v1.Partition.TemporalPartition parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.Partition.TemporalPartition 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.visionai.v1.Partition.TemporalPartition 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; + } + /** + * + * + *
+     * Partition of asset in UTC Epoch time. Supported by STREAM_VIDEO corpus
+     * type.
+     * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.Partition.TemporalPartition} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.Partition.TemporalPartition) + com.google.cloud.visionai.v1.Partition.TemporalPartitionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_Partition_TemporalPartition_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_Partition_TemporalPartition_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.Partition.TemporalPartition.class, + com.google.cloud.visionai.v1.Partition.TemporalPartition.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.Partition.TemporalPartition.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getStartTimeFieldBuilder(); + getEndTimeFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + startTime_ = null; + if (startTimeBuilder_ != null) { + startTimeBuilder_.dispose(); + startTimeBuilder_ = null; + } + endTime_ = null; + if (endTimeBuilder_ != null) { + endTimeBuilder_.dispose(); + endTimeBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_Partition_TemporalPartition_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.Partition.TemporalPartition getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.Partition.TemporalPartition.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.Partition.TemporalPartition build() { + com.google.cloud.visionai.v1.Partition.TemporalPartition result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.Partition.TemporalPartition buildPartial() { + com.google.cloud.visionai.v1.Partition.TemporalPartition result = + new com.google.cloud.visionai.v1.Partition.TemporalPartition(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.visionai.v1.Partition.TemporalPartition result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.startTime_ = startTimeBuilder_ == null ? startTime_ : startTimeBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.endTime_ = endTimeBuilder_ == null ? endTime_ : endTimeBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.Partition.TemporalPartition) { + return mergeFrom((com.google.cloud.visionai.v1.Partition.TemporalPartition) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.Partition.TemporalPartition other) { + if (other == com.google.cloud.visionai.v1.Partition.TemporalPartition.getDefaultInstance()) + return this; + if (other.hasStartTime()) { + mergeStartTime(other.getStartTime()); + } + if (other.hasEndTime()) { + mergeEndTime(other.getEndTime()); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getStartTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage(getEndTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.protobuf.Timestamp startTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + startTimeBuilder_; + /** + * + * + *
+       * Start time of the partition.
+       * 
+ * + * .google.protobuf.Timestamp start_time = 1; + * + * @return Whether the startTime field is set. + */ + public boolean hasStartTime() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+       * Start time of the partition.
+       * 
+ * + * .google.protobuf.Timestamp start_time = 1; + * + * @return The startTime. + */ + public com.google.protobuf.Timestamp getStartTime() { + if (startTimeBuilder_ == null) { + return startTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : startTime_; + } else { + return startTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+       * Start time of the partition.
+       * 
+ * + * .google.protobuf.Timestamp start_time = 1; + */ + public Builder setStartTime(com.google.protobuf.Timestamp value) { + if (startTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + startTime_ = value; + } else { + startTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * Start time of the partition.
+       * 
+ * + * .google.protobuf.Timestamp start_time = 1; + */ + public Builder setStartTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (startTimeBuilder_ == null) { + startTime_ = builderForValue.build(); + } else { + startTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * Start time of the partition.
+       * 
+ * + * .google.protobuf.Timestamp start_time = 1; + */ + public Builder mergeStartTime(com.google.protobuf.Timestamp value) { + if (startTimeBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && startTime_ != null + && startTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getStartTimeBuilder().mergeFrom(value); + } else { + startTime_ = value; + } + } else { + startTimeBuilder_.mergeFrom(value); + } + if (startTime_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + /** + * + * + *
+       * Start time of the partition.
+       * 
+ * + * .google.protobuf.Timestamp start_time = 1; + */ + public Builder clearStartTime() { + bitField0_ = (bitField0_ & ~0x00000001); + startTime_ = null; + if (startTimeBuilder_ != null) { + startTimeBuilder_.dispose(); + startTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+       * Start time of the partition.
+       * 
+ * + * .google.protobuf.Timestamp start_time = 1; + */ + public com.google.protobuf.Timestamp.Builder getStartTimeBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getStartTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Start time of the partition.
+       * 
+ * + * .google.protobuf.Timestamp start_time = 1; + */ + public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { + if (startTimeBuilder_ != null) { + return startTimeBuilder_.getMessageOrBuilder(); + } else { + return startTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : startTime_; + } + } + /** + * + * + *
+       * Start time of the partition.
+       * 
+ * + * .google.protobuf.Timestamp start_time = 1; + */ + 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 endTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + endTimeBuilder_; + /** + * + * + *
+       * End time of the partition.
+       * 
+ * + * .google.protobuf.Timestamp end_time = 2; + * + * @return Whether the endTime field is set. + */ + public boolean hasEndTime() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+       * End time of the partition.
+       * 
+ * + * .google.protobuf.Timestamp end_time = 2; + * + * @return The endTime. + */ + public com.google.protobuf.Timestamp getEndTime() { + if (endTimeBuilder_ == null) { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } else { + return endTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+       * End time of the partition.
+       * 
+ * + * .google.protobuf.Timestamp end_time = 2; + */ + public Builder setEndTime(com.google.protobuf.Timestamp value) { + if (endTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + endTime_ = value; + } else { + endTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * End time of the partition.
+       * 
+ * + * .google.protobuf.Timestamp end_time = 2; + */ + public Builder setEndTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (endTimeBuilder_ == null) { + endTime_ = builderForValue.build(); + } else { + endTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * End time of the partition.
+       * 
+ * + * .google.protobuf.Timestamp end_time = 2; + */ + public Builder mergeEndTime(com.google.protobuf.Timestamp value) { + if (endTimeBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && endTime_ != null + && endTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getEndTimeBuilder().mergeFrom(value); + } else { + endTime_ = value; + } + } else { + endTimeBuilder_.mergeFrom(value); + } + if (endTime_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + /** + * + * + *
+       * End time of the partition.
+       * 
+ * + * .google.protobuf.Timestamp end_time = 2; + */ + public Builder clearEndTime() { + bitField0_ = (bitField0_ & ~0x00000002); + endTime_ = null; + if (endTimeBuilder_ != null) { + endTimeBuilder_.dispose(); + endTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+       * End time of the partition.
+       * 
+ * + * .google.protobuf.Timestamp end_time = 2; + */ + public com.google.protobuf.Timestamp.Builder getEndTimeBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getEndTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * End time of the partition.
+       * 
+ * + * .google.protobuf.Timestamp end_time = 2; + */ + public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { + if (endTimeBuilder_ != null) { + return endTimeBuilder_.getMessageOrBuilder(); + } else { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + } + /** + * + * + *
+       * End time of the partition.
+       * 
+ * + * .google.protobuf.Timestamp end_time = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getEndTimeFieldBuilder() { + if (endTimeBuilder_ == null) { + endTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getEndTime(), getParentForChildren(), isClean()); + endTime_ = null; + } + return endTimeBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.Partition.TemporalPartition) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.Partition.TemporalPartition) + private static final com.google.cloud.visionai.v1.Partition.TemporalPartition DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.Partition.TemporalPartition(); + } + + public static com.google.cloud.visionai.v1.Partition.TemporalPartition getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public TemporalPartition parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.Partition.TemporalPartition getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface SpatialPartitionOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.Partition.SpatialPartition) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * The minimum x coordinate value.
+     * 
+ * + * optional int64 x_min = 1; + * + * @return Whether the xMin field is set. + */ + boolean hasXMin(); + /** + * + * + *
+     * The minimum x coordinate value.
+     * 
+ * + * optional int64 x_min = 1; + * + * @return The xMin. + */ + long getXMin(); + + /** + * + * + *
+     * The minimum y coordinate value.
+     * 
+ * + * optional int64 y_min = 2; + * + * @return Whether the yMin field is set. + */ + boolean hasYMin(); + /** + * + * + *
+     * The minimum y coordinate value.
+     * 
+ * + * optional int64 y_min = 2; + * + * @return The yMin. + */ + long getYMin(); + + /** + * + * + *
+     * The maximum x coordinate value.
+     * 
+ * + * optional int64 x_max = 3; + * + * @return Whether the xMax field is set. + */ + boolean hasXMax(); + /** + * + * + *
+     * The maximum x coordinate value.
+     * 
+ * + * optional int64 x_max = 3; + * + * @return The xMax. + */ + long getXMax(); + + /** + * + * + *
+     * The maximum y coordinate value.
+     * 
+ * + * optional int64 y_max = 4; + * + * @return Whether the yMax field is set. + */ + boolean hasYMax(); + /** + * + * + *
+     * The maximum y coordinate value.
+     * 
+ * + * optional int64 y_max = 4; + * + * @return The yMax. + */ + long getYMax(); + } + /** + * + * + *
+   * Partition of asset in space.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.Partition.SpatialPartition} + */ + public static final class SpatialPartition extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.Partition.SpatialPartition) + SpatialPartitionOrBuilder { + private static final long serialVersionUID = 0L; + // Use SpatialPartition.newBuilder() to construct. + private SpatialPartition(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private SpatialPartition() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new SpatialPartition(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_Partition_SpatialPartition_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_Partition_SpatialPartition_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.Partition.SpatialPartition.class, + com.google.cloud.visionai.v1.Partition.SpatialPartition.Builder.class); + } + + private int bitField0_; + public static final int X_MIN_FIELD_NUMBER = 1; + private long xMin_ = 0L; + /** + * + * + *
+     * The minimum x coordinate value.
+     * 
+ * + * optional int64 x_min = 1; + * + * @return Whether the xMin field is set. + */ + @java.lang.Override + public boolean hasXMin() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * The minimum x coordinate value.
+     * 
+ * + * optional int64 x_min = 1; + * + * @return The xMin. + */ + @java.lang.Override + public long getXMin() { + return xMin_; + } + + public static final int Y_MIN_FIELD_NUMBER = 2; + private long yMin_ = 0L; + /** + * + * + *
+     * The minimum y coordinate value.
+     * 
+ * + * optional int64 y_min = 2; + * + * @return Whether the yMin field is set. + */ + @java.lang.Override + public boolean hasYMin() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * The minimum y coordinate value.
+     * 
+ * + * optional int64 y_min = 2; + * + * @return The yMin. + */ + @java.lang.Override + public long getYMin() { + return yMin_; + } + + public static final int X_MAX_FIELD_NUMBER = 3; + private long xMax_ = 0L; + /** + * + * + *
+     * The maximum x coordinate value.
+     * 
+ * + * optional int64 x_max = 3; + * + * @return Whether the xMax field is set. + */ + @java.lang.Override + public boolean hasXMax() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+     * The maximum x coordinate value.
+     * 
+ * + * optional int64 x_max = 3; + * + * @return The xMax. + */ + @java.lang.Override + public long getXMax() { + return xMax_; + } + + public static final int Y_MAX_FIELD_NUMBER = 4; + private long yMax_ = 0L; + /** + * + * + *
+     * The maximum y coordinate value.
+     * 
+ * + * optional int64 y_max = 4; + * + * @return Whether the yMax field is set. + */ + @java.lang.Override + public boolean hasYMax() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + * + * + *
+     * The maximum y coordinate value.
+     * 
+ * + * optional int64 y_max = 4; + * + * @return The yMax. + */ + @java.lang.Override + public long getYMax() { + return yMax_; + } + + 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 (((bitField0_ & 0x00000001) != 0)) { + output.writeInt64(1, xMin_); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeInt64(2, yMin_); + } + if (((bitField0_ & 0x00000004) != 0)) { + output.writeInt64(3, xMax_); + } + if (((bitField0_ & 0x00000008) != 0)) { + output.writeInt64(4, yMax_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(1, xMin_); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(2, yMin_); + } + if (((bitField0_ & 0x00000004) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(3, xMax_); + } + if (((bitField0_ & 0x00000008) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(4, yMax_); + } + size += getUnknownFields().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.visionai.v1.Partition.SpatialPartition)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.Partition.SpatialPartition other = + (com.google.cloud.visionai.v1.Partition.SpatialPartition) obj; + + if (hasXMin() != other.hasXMin()) return false; + if (hasXMin()) { + if (getXMin() != other.getXMin()) return false; + } + if (hasYMin() != other.hasYMin()) return false; + if (hasYMin()) { + if (getYMin() != other.getYMin()) return false; + } + if (hasXMax() != other.hasXMax()) return false; + if (hasXMax()) { + if (getXMax() != other.getXMax()) return false; + } + if (hasYMax() != other.hasYMax()) return false; + if (hasYMax()) { + if (getYMax() != other.getYMax()) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasXMin()) { + hash = (37 * hash) + X_MIN_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getXMin()); + } + if (hasYMin()) { + hash = (37 * hash) + Y_MIN_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getYMin()); + } + if (hasXMax()) { + hash = (37 * hash) + X_MAX_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getXMax()); + } + if (hasYMax()) { + hash = (37 * hash) + Y_MAX_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getYMax()); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.Partition.SpatialPartition parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.Partition.SpatialPartition 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.visionai.v1.Partition.SpatialPartition parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.Partition.SpatialPartition 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.visionai.v1.Partition.SpatialPartition parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.Partition.SpatialPartition parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.Partition.SpatialPartition parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.Partition.SpatialPartition 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.visionai.v1.Partition.SpatialPartition parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.Partition.SpatialPartition 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.visionai.v1.Partition.SpatialPartition parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.Partition.SpatialPartition 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.visionai.v1.Partition.SpatialPartition 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; + } + /** + * + * + *
+     * Partition of asset in space.
+     * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.Partition.SpatialPartition} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.Partition.SpatialPartition) + com.google.cloud.visionai.v1.Partition.SpatialPartitionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_Partition_SpatialPartition_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_Partition_SpatialPartition_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.Partition.SpatialPartition.class, + com.google.cloud.visionai.v1.Partition.SpatialPartition.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.Partition.SpatialPartition.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + xMin_ = 0L; + yMin_ = 0L; + xMax_ = 0L; + yMax_ = 0L; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_Partition_SpatialPartition_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.Partition.SpatialPartition getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.Partition.SpatialPartition.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.Partition.SpatialPartition build() { + com.google.cloud.visionai.v1.Partition.SpatialPartition result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.Partition.SpatialPartition buildPartial() { + com.google.cloud.visionai.v1.Partition.SpatialPartition result = + new com.google.cloud.visionai.v1.Partition.SpatialPartition(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.visionai.v1.Partition.SpatialPartition result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.xMin_ = xMin_; + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.yMin_ = yMin_; + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.xMax_ = xMax_; + to_bitField0_ |= 0x00000004; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.yMax_ = yMax_; + to_bitField0_ |= 0x00000008; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.Partition.SpatialPartition) { + return mergeFrom((com.google.cloud.visionai.v1.Partition.SpatialPartition) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.Partition.SpatialPartition other) { + if (other == com.google.cloud.visionai.v1.Partition.SpatialPartition.getDefaultInstance()) + return this; + if (other.hasXMin()) { + setXMin(other.getXMin()); + } + if (other.hasYMin()) { + setYMin(other.getYMin()); + } + if (other.hasXMax()) { + setXMax(other.getXMax()); + } + if (other.hasYMax()) { + setYMax(other.getYMax()); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + xMin_ = input.readInt64(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 16: + { + yMin_ = input.readInt64(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 24: + { + xMax_ = input.readInt64(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 32: + { + yMax_ = input.readInt64(); + bitField0_ |= 0x00000008; + break; + } // case 32 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private long xMin_; + /** + * + * + *
+       * The minimum x coordinate value.
+       * 
+ * + * optional int64 x_min = 1; + * + * @return Whether the xMin field is set. + */ + @java.lang.Override + public boolean hasXMin() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+       * The minimum x coordinate value.
+       * 
+ * + * optional int64 x_min = 1; + * + * @return The xMin. + */ + @java.lang.Override + public long getXMin() { + return xMin_; + } + /** + * + * + *
+       * The minimum x coordinate value.
+       * 
+ * + * optional int64 x_min = 1; + * + * @param value The xMin to set. + * @return This builder for chaining. + */ + public Builder setXMin(long value) { + + xMin_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * The minimum x coordinate value.
+       * 
+ * + * optional int64 x_min = 1; + * + * @return This builder for chaining. + */ + public Builder clearXMin() { + bitField0_ = (bitField0_ & ~0x00000001); + xMin_ = 0L; + onChanged(); + return this; + } + + private long yMin_; + /** + * + * + *
+       * The minimum y coordinate value.
+       * 
+ * + * optional int64 y_min = 2; + * + * @return Whether the yMin field is set. + */ + @java.lang.Override + public boolean hasYMin() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+       * The minimum y coordinate value.
+       * 
+ * + * optional int64 y_min = 2; + * + * @return The yMin. + */ + @java.lang.Override + public long getYMin() { + return yMin_; + } + /** + * + * + *
+       * The minimum y coordinate value.
+       * 
+ * + * optional int64 y_min = 2; + * + * @param value The yMin to set. + * @return This builder for chaining. + */ + public Builder setYMin(long value) { + + yMin_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * The minimum y coordinate value.
+       * 
+ * + * optional int64 y_min = 2; + * + * @return This builder for chaining. + */ + public Builder clearYMin() { + bitField0_ = (bitField0_ & ~0x00000002); + yMin_ = 0L; + onChanged(); + return this; + } + + private long xMax_; + /** + * + * + *
+       * The maximum x coordinate value.
+       * 
+ * + * optional int64 x_max = 3; + * + * @return Whether the xMax field is set. + */ + @java.lang.Override + public boolean hasXMax() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+       * The maximum x coordinate value.
+       * 
+ * + * optional int64 x_max = 3; + * + * @return The xMax. + */ + @java.lang.Override + public long getXMax() { + return xMax_; + } + /** + * + * + *
+       * The maximum x coordinate value.
+       * 
+ * + * optional int64 x_max = 3; + * + * @param value The xMax to set. + * @return This builder for chaining. + */ + public Builder setXMax(long value) { + + xMax_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+       * The maximum x coordinate value.
+       * 
+ * + * optional int64 x_max = 3; + * + * @return This builder for chaining. + */ + public Builder clearXMax() { + bitField0_ = (bitField0_ & ~0x00000004); + xMax_ = 0L; + onChanged(); + return this; + } + + private long yMax_; + /** + * + * + *
+       * The maximum y coordinate value.
+       * 
+ * + * optional int64 y_max = 4; + * + * @return Whether the yMax field is set. + */ + @java.lang.Override + public boolean hasYMax() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + * + * + *
+       * The maximum y coordinate value.
+       * 
+ * + * optional int64 y_max = 4; + * + * @return The yMax. + */ + @java.lang.Override + public long getYMax() { + return yMax_; + } + /** + * + * + *
+       * The maximum y coordinate value.
+       * 
+ * + * optional int64 y_max = 4; + * + * @param value The yMax to set. + * @return This builder for chaining. + */ + public Builder setYMax(long value) { + + yMax_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+       * The maximum y coordinate value.
+       * 
+ * + * optional int64 y_max = 4; + * + * @return This builder for chaining. + */ + public Builder clearYMax() { + bitField0_ = (bitField0_ & ~0x00000008); + yMax_ = 0L; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.Partition.SpatialPartition) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.Partition.SpatialPartition) + private static final com.google.cloud.visionai.v1.Partition.SpatialPartition DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.Partition.SpatialPartition(); + } + + public static com.google.cloud.visionai.v1.Partition.SpatialPartition getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SpatialPartition parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.Partition.SpatialPartition getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface RelativeTemporalPartitionOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.Partition.RelativeTemporalPartition) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Start time offset of the partition.
+     * 
+ * + * .google.protobuf.Duration start_offset = 1; + * + * @return Whether the startOffset field is set. + */ + boolean hasStartOffset(); + /** + * + * + *
+     * Start time offset of the partition.
+     * 
+ * + * .google.protobuf.Duration start_offset = 1; + * + * @return The startOffset. + */ + com.google.protobuf.Duration getStartOffset(); + /** + * + * + *
+     * Start time offset of the partition.
+     * 
+ * + * .google.protobuf.Duration start_offset = 1; + */ + com.google.protobuf.DurationOrBuilder getStartOffsetOrBuilder(); + + /** + * + * + *
+     * End time offset of the partition.
+     * 
+ * + * .google.protobuf.Duration end_offset = 2; + * + * @return Whether the endOffset field is set. + */ + boolean hasEndOffset(); + /** + * + * + *
+     * End time offset of the partition.
+     * 
+ * + * .google.protobuf.Duration end_offset = 2; + * + * @return The endOffset. + */ + com.google.protobuf.Duration getEndOffset(); + /** + * + * + *
+     * End time offset of the partition.
+     * 
+ * + * .google.protobuf.Duration end_offset = 2; + */ + com.google.protobuf.DurationOrBuilder getEndOffsetOrBuilder(); + } + /** + * + * + *
+   * Partition of asset in relative time. Supported by VIDEO_ON_DEMAND corpus
+   * type.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.Partition.RelativeTemporalPartition} + */ + public static final class RelativeTemporalPartition extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.Partition.RelativeTemporalPartition) + RelativeTemporalPartitionOrBuilder { + private static final long serialVersionUID = 0L; + // Use RelativeTemporalPartition.newBuilder() to construct. + private RelativeTemporalPartition(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private RelativeTemporalPartition() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new RelativeTemporalPartition(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_Partition_RelativeTemporalPartition_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_Partition_RelativeTemporalPartition_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.Partition.RelativeTemporalPartition.class, + com.google.cloud.visionai.v1.Partition.RelativeTemporalPartition.Builder.class); + } + + private int bitField0_; + public static final int START_OFFSET_FIELD_NUMBER = 1; + private com.google.protobuf.Duration startOffset_; + /** + * + * + *
+     * Start time offset of the partition.
+     * 
+ * + * .google.protobuf.Duration start_offset = 1; + * + * @return Whether the startOffset field is set. + */ + @java.lang.Override + public boolean hasStartOffset() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * Start time offset of the partition.
+     * 
+ * + * .google.protobuf.Duration start_offset = 1; + * + * @return The startOffset. + */ + @java.lang.Override + public com.google.protobuf.Duration getStartOffset() { + return startOffset_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : startOffset_; + } + /** + * + * + *
+     * Start time offset of the partition.
+     * 
+ * + * .google.protobuf.Duration start_offset = 1; + */ + @java.lang.Override + public com.google.protobuf.DurationOrBuilder getStartOffsetOrBuilder() { + return startOffset_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : startOffset_; + } + + public static final int END_OFFSET_FIELD_NUMBER = 2; + private com.google.protobuf.Duration endOffset_; + /** + * + * + *
+     * End time offset of the partition.
+     * 
+ * + * .google.protobuf.Duration end_offset = 2; + * + * @return Whether the endOffset field is set. + */ + @java.lang.Override + public boolean hasEndOffset() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * End time offset of the partition.
+     * 
+ * + * .google.protobuf.Duration end_offset = 2; + * + * @return The endOffset. + */ + @java.lang.Override + public com.google.protobuf.Duration getEndOffset() { + return endOffset_ == null ? com.google.protobuf.Duration.getDefaultInstance() : endOffset_; + } + /** + * + * + *
+     * End time offset of the partition.
+     * 
+ * + * .google.protobuf.Duration end_offset = 2; + */ + @java.lang.Override + public com.google.protobuf.DurationOrBuilder getEndOffsetOrBuilder() { + return endOffset_ == null ? com.google.protobuf.Duration.getDefaultInstance() : endOffset_; + } + + 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 (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getStartOffset()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(2, getEndOffset()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getStartOffset()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getEndOffset()); + } + size += getUnknownFields().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.visionai.v1.Partition.RelativeTemporalPartition)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.Partition.RelativeTemporalPartition other = + (com.google.cloud.visionai.v1.Partition.RelativeTemporalPartition) obj; + + if (hasStartOffset() != other.hasStartOffset()) return false; + if (hasStartOffset()) { + if (!getStartOffset().equals(other.getStartOffset())) return false; + } + if (hasEndOffset() != other.hasEndOffset()) return false; + if (hasEndOffset()) { + if (!getEndOffset().equals(other.getEndOffset())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasStartOffset()) { + hash = (37 * hash) + START_OFFSET_FIELD_NUMBER; + hash = (53 * hash) + getStartOffset().hashCode(); + } + if (hasEndOffset()) { + hash = (37 * hash) + END_OFFSET_FIELD_NUMBER; + hash = (53 * hash) + getEndOffset().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.Partition.RelativeTemporalPartition parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.Partition.RelativeTemporalPartition 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.visionai.v1.Partition.RelativeTemporalPartition parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.Partition.RelativeTemporalPartition 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.visionai.v1.Partition.RelativeTemporalPartition parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.Partition.RelativeTemporalPartition parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.Partition.RelativeTemporalPartition parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.Partition.RelativeTemporalPartition 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.visionai.v1.Partition.RelativeTemporalPartition + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.Partition.RelativeTemporalPartition + 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.visionai.v1.Partition.RelativeTemporalPartition parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.Partition.RelativeTemporalPartition 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.visionai.v1.Partition.RelativeTemporalPartition 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; + } + /** + * + * + *
+     * Partition of asset in relative time. Supported by VIDEO_ON_DEMAND corpus
+     * type.
+     * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.Partition.RelativeTemporalPartition} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.Partition.RelativeTemporalPartition) + com.google.cloud.visionai.v1.Partition.RelativeTemporalPartitionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_Partition_RelativeTemporalPartition_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_Partition_RelativeTemporalPartition_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.Partition.RelativeTemporalPartition.class, + com.google.cloud.visionai.v1.Partition.RelativeTemporalPartition.Builder.class); + } + + // Construct using + // com.google.cloud.visionai.v1.Partition.RelativeTemporalPartition.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getStartOffsetFieldBuilder(); + getEndOffsetFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + startOffset_ = null; + if (startOffsetBuilder_ != null) { + startOffsetBuilder_.dispose(); + startOffsetBuilder_ = null; + } + endOffset_ = null; + if (endOffsetBuilder_ != null) { + endOffsetBuilder_.dispose(); + endOffsetBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_Partition_RelativeTemporalPartition_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.Partition.RelativeTemporalPartition + getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.Partition.RelativeTemporalPartition + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.Partition.RelativeTemporalPartition build() { + com.google.cloud.visionai.v1.Partition.RelativeTemporalPartition result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.Partition.RelativeTemporalPartition buildPartial() { + com.google.cloud.visionai.v1.Partition.RelativeTemporalPartition result = + new com.google.cloud.visionai.v1.Partition.RelativeTemporalPartition(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.visionai.v1.Partition.RelativeTemporalPartition result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.startOffset_ = + startOffsetBuilder_ == null ? startOffset_ : startOffsetBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.endOffset_ = endOffsetBuilder_ == null ? endOffset_ : endOffsetBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.Partition.RelativeTemporalPartition) { + return mergeFrom( + (com.google.cloud.visionai.v1.Partition.RelativeTemporalPartition) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.visionai.v1.Partition.RelativeTemporalPartition other) { + if (other + == com.google.cloud.visionai.v1.Partition.RelativeTemporalPartition + .getDefaultInstance()) return this; + if (other.hasStartOffset()) { + mergeStartOffset(other.getStartOffset()); + } + if (other.hasEndOffset()) { + mergeEndOffset(other.getEndOffset()); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getStartOffsetFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage(getEndOffsetFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.protobuf.Duration startOffset_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + startOffsetBuilder_; + /** + * + * + *
+       * Start time offset of the partition.
+       * 
+ * + * .google.protobuf.Duration start_offset = 1; + * + * @return Whether the startOffset field is set. + */ + public boolean hasStartOffset() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+       * Start time offset of the partition.
+       * 
+ * + * .google.protobuf.Duration start_offset = 1; + * + * @return The startOffset. + */ + public com.google.protobuf.Duration getStartOffset() { + if (startOffsetBuilder_ == null) { + return startOffset_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : startOffset_; + } else { + return startOffsetBuilder_.getMessage(); + } + } + /** + * + * + *
+       * Start time offset of the partition.
+       * 
+ * + * .google.protobuf.Duration start_offset = 1; + */ + public Builder setStartOffset(com.google.protobuf.Duration value) { + if (startOffsetBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + startOffset_ = value; + } else { + startOffsetBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * Start time offset of the partition.
+       * 
+ * + * .google.protobuf.Duration start_offset = 1; + */ + public Builder setStartOffset(com.google.protobuf.Duration.Builder builderForValue) { + if (startOffsetBuilder_ == null) { + startOffset_ = builderForValue.build(); + } else { + startOffsetBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * Start time offset of the partition.
+       * 
+ * + * .google.protobuf.Duration start_offset = 1; + */ + public Builder mergeStartOffset(com.google.protobuf.Duration value) { + if (startOffsetBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && startOffset_ != null + && startOffset_ != com.google.protobuf.Duration.getDefaultInstance()) { + getStartOffsetBuilder().mergeFrom(value); + } else { + startOffset_ = value; + } + } else { + startOffsetBuilder_.mergeFrom(value); + } + if (startOffset_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + /** + * + * + *
+       * Start time offset of the partition.
+       * 
+ * + * .google.protobuf.Duration start_offset = 1; + */ + public Builder clearStartOffset() { + bitField0_ = (bitField0_ & ~0x00000001); + startOffset_ = null; + if (startOffsetBuilder_ != null) { + startOffsetBuilder_.dispose(); + startOffsetBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+       * Start time offset of the partition.
+       * 
+ * + * .google.protobuf.Duration start_offset = 1; + */ + public com.google.protobuf.Duration.Builder getStartOffsetBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getStartOffsetFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Start time offset of the partition.
+       * 
+ * + * .google.protobuf.Duration start_offset = 1; + */ + public com.google.protobuf.DurationOrBuilder getStartOffsetOrBuilder() { + if (startOffsetBuilder_ != null) { + return startOffsetBuilder_.getMessageOrBuilder(); + } else { + return startOffset_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : startOffset_; + } + } + /** + * + * + *
+       * Start time offset of the partition.
+       * 
+ * + * .google.protobuf.Duration start_offset = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + getStartOffsetFieldBuilder() { + if (startOffsetBuilder_ == null) { + startOffsetBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder>( + getStartOffset(), getParentForChildren(), isClean()); + startOffset_ = null; + } + return startOffsetBuilder_; + } + + private com.google.protobuf.Duration endOffset_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + endOffsetBuilder_; + /** + * + * + *
+       * End time offset of the partition.
+       * 
+ * + * .google.protobuf.Duration end_offset = 2; + * + * @return Whether the endOffset field is set. + */ + public boolean hasEndOffset() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+       * End time offset of the partition.
+       * 
+ * + * .google.protobuf.Duration end_offset = 2; + * + * @return The endOffset. + */ + public com.google.protobuf.Duration getEndOffset() { + if (endOffsetBuilder_ == null) { + return endOffset_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : endOffset_; + } else { + return endOffsetBuilder_.getMessage(); + } + } + /** + * + * + *
+       * End time offset of the partition.
+       * 
+ * + * .google.protobuf.Duration end_offset = 2; + */ + public Builder setEndOffset(com.google.protobuf.Duration value) { + if (endOffsetBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + endOffset_ = value; + } else { + endOffsetBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * End time offset of the partition.
+       * 
+ * + * .google.protobuf.Duration end_offset = 2; + */ + public Builder setEndOffset(com.google.protobuf.Duration.Builder builderForValue) { + if (endOffsetBuilder_ == null) { + endOffset_ = builderForValue.build(); + } else { + endOffsetBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * End time offset of the partition.
+       * 
+ * + * .google.protobuf.Duration end_offset = 2; + */ + public Builder mergeEndOffset(com.google.protobuf.Duration value) { + if (endOffsetBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && endOffset_ != null + && endOffset_ != com.google.protobuf.Duration.getDefaultInstance()) { + getEndOffsetBuilder().mergeFrom(value); + } else { + endOffset_ = value; + } + } else { + endOffsetBuilder_.mergeFrom(value); + } + if (endOffset_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + /** + * + * + *
+       * End time offset of the partition.
+       * 
+ * + * .google.protobuf.Duration end_offset = 2; + */ + public Builder clearEndOffset() { + bitField0_ = (bitField0_ & ~0x00000002); + endOffset_ = null; + if (endOffsetBuilder_ != null) { + endOffsetBuilder_.dispose(); + endOffsetBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+       * End time offset of the partition.
+       * 
+ * + * .google.protobuf.Duration end_offset = 2; + */ + public com.google.protobuf.Duration.Builder getEndOffsetBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getEndOffsetFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * End time offset of the partition.
+       * 
+ * + * .google.protobuf.Duration end_offset = 2; + */ + public com.google.protobuf.DurationOrBuilder getEndOffsetOrBuilder() { + if (endOffsetBuilder_ != null) { + return endOffsetBuilder_.getMessageOrBuilder(); + } else { + return endOffset_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : endOffset_; + } + } + /** + * + * + *
+       * End time offset of the partition.
+       * 
+ * + * .google.protobuf.Duration end_offset = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + getEndOffsetFieldBuilder() { + if (endOffsetBuilder_ == null) { + endOffsetBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder>( + getEndOffset(), getParentForChildren(), isClean()); + endOffset_ = null; + } + return endOffsetBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.Partition.RelativeTemporalPartition) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.Partition.RelativeTemporalPartition) + private static final com.google.cloud.visionai.v1.Partition.RelativeTemporalPartition + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.Partition.RelativeTemporalPartition(); + } + + public static com.google.cloud.visionai.v1.Partition.RelativeTemporalPartition + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RelativeTemporalPartition parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.Partition.RelativeTemporalPartition + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int bitField0_; + public static final int TEMPORAL_PARTITION_FIELD_NUMBER = 1; + private com.google.cloud.visionai.v1.Partition.TemporalPartition temporalPartition_; + /** + * + * + *
+   * Partition of asset in time.
+   * 
+ * + * .google.cloud.visionai.v1.Partition.TemporalPartition temporal_partition = 1; + * + * @return Whether the temporalPartition field is set. + */ + @java.lang.Override + public boolean hasTemporalPartition() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * Partition of asset in time.
+   * 
+ * + * .google.cloud.visionai.v1.Partition.TemporalPartition temporal_partition = 1; + * + * @return The temporalPartition. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.Partition.TemporalPartition getTemporalPartition() { + return temporalPartition_ == null + ? com.google.cloud.visionai.v1.Partition.TemporalPartition.getDefaultInstance() + : temporalPartition_; + } + /** + * + * + *
+   * Partition of asset in time.
+   * 
+ * + * .google.cloud.visionai.v1.Partition.TemporalPartition temporal_partition = 1; + */ + @java.lang.Override + public com.google.cloud.visionai.v1.Partition.TemporalPartitionOrBuilder + getTemporalPartitionOrBuilder() { + return temporalPartition_ == null + ? com.google.cloud.visionai.v1.Partition.TemporalPartition.getDefaultInstance() + : temporalPartition_; + } + + public static final int SPATIAL_PARTITION_FIELD_NUMBER = 2; + private com.google.cloud.visionai.v1.Partition.SpatialPartition spatialPartition_; + /** + * + * + *
+   * Partition of asset in space.
+   * 
+ * + * .google.cloud.visionai.v1.Partition.SpatialPartition spatial_partition = 2; + * + * @return Whether the spatialPartition field is set. + */ + @java.lang.Override + public boolean hasSpatialPartition() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+   * Partition of asset in space.
+   * 
+ * + * .google.cloud.visionai.v1.Partition.SpatialPartition spatial_partition = 2; + * + * @return The spatialPartition. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.Partition.SpatialPartition getSpatialPartition() { + return spatialPartition_ == null + ? com.google.cloud.visionai.v1.Partition.SpatialPartition.getDefaultInstance() + : spatialPartition_; + } + /** + * + * + *
+   * Partition of asset in space.
+   * 
+ * + * .google.cloud.visionai.v1.Partition.SpatialPartition spatial_partition = 2; + */ + @java.lang.Override + public com.google.cloud.visionai.v1.Partition.SpatialPartitionOrBuilder + getSpatialPartitionOrBuilder() { + return spatialPartition_ == null + ? com.google.cloud.visionai.v1.Partition.SpatialPartition.getDefaultInstance() + : spatialPartition_; + } + + public static final int RELATIVE_TEMPORAL_PARTITION_FIELD_NUMBER = 3; + private com.google.cloud.visionai.v1.Partition.RelativeTemporalPartition + relativeTemporalPartition_; + /** + * + * + *
+   * Partition of asset in time.
+   * 
+ * + * + * .google.cloud.visionai.v1.Partition.RelativeTemporalPartition relative_temporal_partition = 3; + * + * + * @return Whether the relativeTemporalPartition field is set. + */ + @java.lang.Override + public boolean hasRelativeTemporalPartition() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+   * Partition of asset in time.
+   * 
+ * + * + * .google.cloud.visionai.v1.Partition.RelativeTemporalPartition relative_temporal_partition = 3; + * + * + * @return The relativeTemporalPartition. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.Partition.RelativeTemporalPartition + getRelativeTemporalPartition() { + return relativeTemporalPartition_ == null + ? com.google.cloud.visionai.v1.Partition.RelativeTemporalPartition.getDefaultInstance() + : relativeTemporalPartition_; + } + /** + * + * + *
+   * Partition of asset in time.
+   * 
+ * + * + * .google.cloud.visionai.v1.Partition.RelativeTemporalPartition relative_temporal_partition = 3; + * + */ + @java.lang.Override + public com.google.cloud.visionai.v1.Partition.RelativeTemporalPartitionOrBuilder + getRelativeTemporalPartitionOrBuilder() { + return relativeTemporalPartition_ == null + ? com.google.cloud.visionai.v1.Partition.RelativeTemporalPartition.getDefaultInstance() + : relativeTemporalPartition_; + } + + 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 (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getTemporalPartition()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(2, getSpatialPartition()); + } + if (((bitField0_ & 0x00000004) != 0)) { + output.writeMessage(3, getRelativeTemporalPartition()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getTemporalPartition()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getSpatialPartition()); + } + if (((bitField0_ & 0x00000004) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 3, getRelativeTemporalPartition()); + } + size += getUnknownFields().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.visionai.v1.Partition)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.Partition other = (com.google.cloud.visionai.v1.Partition) obj; + + if (hasTemporalPartition() != other.hasTemporalPartition()) return false; + if (hasTemporalPartition()) { + if (!getTemporalPartition().equals(other.getTemporalPartition())) return false; + } + if (hasSpatialPartition() != other.hasSpatialPartition()) return false; + if (hasSpatialPartition()) { + if (!getSpatialPartition().equals(other.getSpatialPartition())) return false; + } + if (hasRelativeTemporalPartition() != other.hasRelativeTemporalPartition()) return false; + if (hasRelativeTemporalPartition()) { + if (!getRelativeTemporalPartition().equals(other.getRelativeTemporalPartition())) + return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasTemporalPartition()) { + hash = (37 * hash) + TEMPORAL_PARTITION_FIELD_NUMBER; + hash = (53 * hash) + getTemporalPartition().hashCode(); + } + if (hasSpatialPartition()) { + hash = (37 * hash) + SPATIAL_PARTITION_FIELD_NUMBER; + hash = (53 * hash) + getSpatialPartition().hashCode(); + } + if (hasRelativeTemporalPartition()) { + hash = (37 * hash) + RELATIVE_TEMPORAL_PARTITION_FIELD_NUMBER; + hash = (53 * hash) + getRelativeTemporalPartition().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.Partition parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.Partition 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.visionai.v1.Partition parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.Partition 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.visionai.v1.Partition parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.Partition parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.Partition parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.Partition 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.visionai.v1.Partition parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.Partition 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.visionai.v1.Partition parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.Partition 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.visionai.v1.Partition 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; + } + /** + * + * + *
+   * Partition to specify the partition in time and space for sub-asset level
+   * annotation.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.Partition} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.Partition) + com.google.cloud.visionai.v1.PartitionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_Partition_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_Partition_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.Partition.class, + com.google.cloud.visionai.v1.Partition.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.Partition.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getTemporalPartitionFieldBuilder(); + getSpatialPartitionFieldBuilder(); + getRelativeTemporalPartitionFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + temporalPartition_ = null; + if (temporalPartitionBuilder_ != null) { + temporalPartitionBuilder_.dispose(); + temporalPartitionBuilder_ = null; + } + spatialPartition_ = null; + if (spatialPartitionBuilder_ != null) { + spatialPartitionBuilder_.dispose(); + spatialPartitionBuilder_ = null; + } + relativeTemporalPartition_ = null; + if (relativeTemporalPartitionBuilder_ != null) { + relativeTemporalPartitionBuilder_.dispose(); + relativeTemporalPartitionBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_Partition_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.Partition getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.Partition.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.Partition build() { + com.google.cloud.visionai.v1.Partition result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.Partition buildPartial() { + com.google.cloud.visionai.v1.Partition result = + new com.google.cloud.visionai.v1.Partition(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.visionai.v1.Partition result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.temporalPartition_ = + temporalPartitionBuilder_ == null + ? temporalPartition_ + : temporalPartitionBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.spatialPartition_ = + spatialPartitionBuilder_ == null ? spatialPartition_ : spatialPartitionBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.relativeTemporalPartition_ = + relativeTemporalPartitionBuilder_ == null + ? relativeTemporalPartition_ + : relativeTemporalPartitionBuilder_.build(); + to_bitField0_ |= 0x00000004; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.Partition) { + return mergeFrom((com.google.cloud.visionai.v1.Partition) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.Partition other) { + if (other == com.google.cloud.visionai.v1.Partition.getDefaultInstance()) return this; + if (other.hasTemporalPartition()) { + mergeTemporalPartition(other.getTemporalPartition()); + } + if (other.hasSpatialPartition()) { + mergeSpatialPartition(other.getSpatialPartition()); + } + if (other.hasRelativeTemporalPartition()) { + mergeRelativeTemporalPartition(other.getRelativeTemporalPartition()); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage( + getTemporalPartitionFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage( + getSpatialPartitionFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage( + getRelativeTemporalPartitionFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.cloud.visionai.v1.Partition.TemporalPartition temporalPartition_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.Partition.TemporalPartition, + com.google.cloud.visionai.v1.Partition.TemporalPartition.Builder, + com.google.cloud.visionai.v1.Partition.TemporalPartitionOrBuilder> + temporalPartitionBuilder_; + /** + * + * + *
+     * Partition of asset in time.
+     * 
+ * + * .google.cloud.visionai.v1.Partition.TemporalPartition temporal_partition = 1; + * + * @return Whether the temporalPartition field is set. + */ + public boolean hasTemporalPartition() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * Partition of asset in time.
+     * 
+ * + * .google.cloud.visionai.v1.Partition.TemporalPartition temporal_partition = 1; + * + * @return The temporalPartition. + */ + public com.google.cloud.visionai.v1.Partition.TemporalPartition getTemporalPartition() { + if (temporalPartitionBuilder_ == null) { + return temporalPartition_ == null + ? com.google.cloud.visionai.v1.Partition.TemporalPartition.getDefaultInstance() + : temporalPartition_; + } else { + return temporalPartitionBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Partition of asset in time.
+     * 
+ * + * .google.cloud.visionai.v1.Partition.TemporalPartition temporal_partition = 1; + */ + public Builder setTemporalPartition( + com.google.cloud.visionai.v1.Partition.TemporalPartition value) { + if (temporalPartitionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + temporalPartition_ = value; + } else { + temporalPartitionBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Partition of asset in time.
+     * 
+ * + * .google.cloud.visionai.v1.Partition.TemporalPartition temporal_partition = 1; + */ + public Builder setTemporalPartition( + com.google.cloud.visionai.v1.Partition.TemporalPartition.Builder builderForValue) { + if (temporalPartitionBuilder_ == null) { + temporalPartition_ = builderForValue.build(); + } else { + temporalPartitionBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Partition of asset in time.
+     * 
+ * + * .google.cloud.visionai.v1.Partition.TemporalPartition temporal_partition = 1; + */ + public Builder mergeTemporalPartition( + com.google.cloud.visionai.v1.Partition.TemporalPartition value) { + if (temporalPartitionBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && temporalPartition_ != null + && temporalPartition_ + != com.google.cloud.visionai.v1.Partition.TemporalPartition.getDefaultInstance()) { + getTemporalPartitionBuilder().mergeFrom(value); + } else { + temporalPartition_ = value; + } + } else { + temporalPartitionBuilder_.mergeFrom(value); + } + if (temporalPartition_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Partition of asset in time.
+     * 
+ * + * .google.cloud.visionai.v1.Partition.TemporalPartition temporal_partition = 1; + */ + public Builder clearTemporalPartition() { + bitField0_ = (bitField0_ & ~0x00000001); + temporalPartition_ = null; + if (temporalPartitionBuilder_ != null) { + temporalPartitionBuilder_.dispose(); + temporalPartitionBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Partition of asset in time.
+     * 
+ * + * .google.cloud.visionai.v1.Partition.TemporalPartition temporal_partition = 1; + */ + public com.google.cloud.visionai.v1.Partition.TemporalPartition.Builder + getTemporalPartitionBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getTemporalPartitionFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Partition of asset in time.
+     * 
+ * + * .google.cloud.visionai.v1.Partition.TemporalPartition temporal_partition = 1; + */ + public com.google.cloud.visionai.v1.Partition.TemporalPartitionOrBuilder + getTemporalPartitionOrBuilder() { + if (temporalPartitionBuilder_ != null) { + return temporalPartitionBuilder_.getMessageOrBuilder(); + } else { + return temporalPartition_ == null + ? com.google.cloud.visionai.v1.Partition.TemporalPartition.getDefaultInstance() + : temporalPartition_; + } + } + /** + * + * + *
+     * Partition of asset in time.
+     * 
+ * + * .google.cloud.visionai.v1.Partition.TemporalPartition temporal_partition = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.Partition.TemporalPartition, + com.google.cloud.visionai.v1.Partition.TemporalPartition.Builder, + com.google.cloud.visionai.v1.Partition.TemporalPartitionOrBuilder> + getTemporalPartitionFieldBuilder() { + if (temporalPartitionBuilder_ == null) { + temporalPartitionBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.Partition.TemporalPartition, + com.google.cloud.visionai.v1.Partition.TemporalPartition.Builder, + com.google.cloud.visionai.v1.Partition.TemporalPartitionOrBuilder>( + getTemporalPartition(), getParentForChildren(), isClean()); + temporalPartition_ = null; + } + return temporalPartitionBuilder_; + } + + private com.google.cloud.visionai.v1.Partition.SpatialPartition spatialPartition_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.Partition.SpatialPartition, + com.google.cloud.visionai.v1.Partition.SpatialPartition.Builder, + com.google.cloud.visionai.v1.Partition.SpatialPartitionOrBuilder> + spatialPartitionBuilder_; + /** + * + * + *
+     * Partition of asset in space.
+     * 
+ * + * .google.cloud.visionai.v1.Partition.SpatialPartition spatial_partition = 2; + * + * @return Whether the spatialPartition field is set. + */ + public boolean hasSpatialPartition() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * Partition of asset in space.
+     * 
+ * + * .google.cloud.visionai.v1.Partition.SpatialPartition spatial_partition = 2; + * + * @return The spatialPartition. + */ + public com.google.cloud.visionai.v1.Partition.SpatialPartition getSpatialPartition() { + if (spatialPartitionBuilder_ == null) { + return spatialPartition_ == null + ? com.google.cloud.visionai.v1.Partition.SpatialPartition.getDefaultInstance() + : spatialPartition_; + } else { + return spatialPartitionBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Partition of asset in space.
+     * 
+ * + * .google.cloud.visionai.v1.Partition.SpatialPartition spatial_partition = 2; + */ + public Builder setSpatialPartition( + com.google.cloud.visionai.v1.Partition.SpatialPartition value) { + if (spatialPartitionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + spatialPartition_ = value; + } else { + spatialPartitionBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Partition of asset in space.
+     * 
+ * + * .google.cloud.visionai.v1.Partition.SpatialPartition spatial_partition = 2; + */ + public Builder setSpatialPartition( + com.google.cloud.visionai.v1.Partition.SpatialPartition.Builder builderForValue) { + if (spatialPartitionBuilder_ == null) { + spatialPartition_ = builderForValue.build(); + } else { + spatialPartitionBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Partition of asset in space.
+     * 
+ * + * .google.cloud.visionai.v1.Partition.SpatialPartition spatial_partition = 2; + */ + public Builder mergeSpatialPartition( + com.google.cloud.visionai.v1.Partition.SpatialPartition value) { + if (spatialPartitionBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && spatialPartition_ != null + && spatialPartition_ + != com.google.cloud.visionai.v1.Partition.SpatialPartition.getDefaultInstance()) { + getSpatialPartitionBuilder().mergeFrom(value); + } else { + spatialPartition_ = value; + } + } else { + spatialPartitionBuilder_.mergeFrom(value); + } + if (spatialPartition_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Partition of asset in space.
+     * 
+ * + * .google.cloud.visionai.v1.Partition.SpatialPartition spatial_partition = 2; + */ + public Builder clearSpatialPartition() { + bitField0_ = (bitField0_ & ~0x00000002); + spatialPartition_ = null; + if (spatialPartitionBuilder_ != null) { + spatialPartitionBuilder_.dispose(); + spatialPartitionBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Partition of asset in space.
+     * 
+ * + * .google.cloud.visionai.v1.Partition.SpatialPartition spatial_partition = 2; + */ + public com.google.cloud.visionai.v1.Partition.SpatialPartition.Builder + getSpatialPartitionBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getSpatialPartitionFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Partition of asset in space.
+     * 
+ * + * .google.cloud.visionai.v1.Partition.SpatialPartition spatial_partition = 2; + */ + public com.google.cloud.visionai.v1.Partition.SpatialPartitionOrBuilder + getSpatialPartitionOrBuilder() { + if (spatialPartitionBuilder_ != null) { + return spatialPartitionBuilder_.getMessageOrBuilder(); + } else { + return spatialPartition_ == null + ? com.google.cloud.visionai.v1.Partition.SpatialPartition.getDefaultInstance() + : spatialPartition_; + } + } + /** + * + * + *
+     * Partition of asset in space.
+     * 
+ * + * .google.cloud.visionai.v1.Partition.SpatialPartition spatial_partition = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.Partition.SpatialPartition, + com.google.cloud.visionai.v1.Partition.SpatialPartition.Builder, + com.google.cloud.visionai.v1.Partition.SpatialPartitionOrBuilder> + getSpatialPartitionFieldBuilder() { + if (spatialPartitionBuilder_ == null) { + spatialPartitionBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.Partition.SpatialPartition, + com.google.cloud.visionai.v1.Partition.SpatialPartition.Builder, + com.google.cloud.visionai.v1.Partition.SpatialPartitionOrBuilder>( + getSpatialPartition(), getParentForChildren(), isClean()); + spatialPartition_ = null; + } + return spatialPartitionBuilder_; + } + + private com.google.cloud.visionai.v1.Partition.RelativeTemporalPartition + relativeTemporalPartition_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.Partition.RelativeTemporalPartition, + com.google.cloud.visionai.v1.Partition.RelativeTemporalPartition.Builder, + com.google.cloud.visionai.v1.Partition.RelativeTemporalPartitionOrBuilder> + relativeTemporalPartitionBuilder_; + /** + * + * + *
+     * Partition of asset in time.
+     * 
+ * + * + * .google.cloud.visionai.v1.Partition.RelativeTemporalPartition relative_temporal_partition = 3; + * + * + * @return Whether the relativeTemporalPartition field is set. + */ + public boolean hasRelativeTemporalPartition() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+     * Partition of asset in time.
+     * 
+ * + * + * .google.cloud.visionai.v1.Partition.RelativeTemporalPartition relative_temporal_partition = 3; + * + * + * @return The relativeTemporalPartition. + */ + public com.google.cloud.visionai.v1.Partition.RelativeTemporalPartition + getRelativeTemporalPartition() { + if (relativeTemporalPartitionBuilder_ == null) { + return relativeTemporalPartition_ == null + ? com.google.cloud.visionai.v1.Partition.RelativeTemporalPartition.getDefaultInstance() + : relativeTemporalPartition_; + } else { + return relativeTemporalPartitionBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Partition of asset in time.
+     * 
+ * + * + * .google.cloud.visionai.v1.Partition.RelativeTemporalPartition relative_temporal_partition = 3; + * + */ + public Builder setRelativeTemporalPartition( + com.google.cloud.visionai.v1.Partition.RelativeTemporalPartition value) { + if (relativeTemporalPartitionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + relativeTemporalPartition_ = value; + } else { + relativeTemporalPartitionBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Partition of asset in time.
+     * 
+ * + * + * .google.cloud.visionai.v1.Partition.RelativeTemporalPartition relative_temporal_partition = 3; + * + */ + public Builder setRelativeTemporalPartition( + com.google.cloud.visionai.v1.Partition.RelativeTemporalPartition.Builder builderForValue) { + if (relativeTemporalPartitionBuilder_ == null) { + relativeTemporalPartition_ = builderForValue.build(); + } else { + relativeTemporalPartitionBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Partition of asset in time.
+     * 
+ * + * + * .google.cloud.visionai.v1.Partition.RelativeTemporalPartition relative_temporal_partition = 3; + * + */ + public Builder mergeRelativeTemporalPartition( + com.google.cloud.visionai.v1.Partition.RelativeTemporalPartition value) { + if (relativeTemporalPartitionBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && relativeTemporalPartition_ != null + && relativeTemporalPartition_ + != com.google.cloud.visionai.v1.Partition.RelativeTemporalPartition + .getDefaultInstance()) { + getRelativeTemporalPartitionBuilder().mergeFrom(value); + } else { + relativeTemporalPartition_ = value; + } + } else { + relativeTemporalPartitionBuilder_.mergeFrom(value); + } + if (relativeTemporalPartition_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Partition of asset in time.
+     * 
+ * + * + * .google.cloud.visionai.v1.Partition.RelativeTemporalPartition relative_temporal_partition = 3; + * + */ + public Builder clearRelativeTemporalPartition() { + bitField0_ = (bitField0_ & ~0x00000004); + relativeTemporalPartition_ = null; + if (relativeTemporalPartitionBuilder_ != null) { + relativeTemporalPartitionBuilder_.dispose(); + relativeTemporalPartitionBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Partition of asset in time.
+     * 
+ * + * + * .google.cloud.visionai.v1.Partition.RelativeTemporalPartition relative_temporal_partition = 3; + * + */ + public com.google.cloud.visionai.v1.Partition.RelativeTemporalPartition.Builder + getRelativeTemporalPartitionBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getRelativeTemporalPartitionFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Partition of asset in time.
+     * 
+ * + * + * .google.cloud.visionai.v1.Partition.RelativeTemporalPartition relative_temporal_partition = 3; + * + */ + public com.google.cloud.visionai.v1.Partition.RelativeTemporalPartitionOrBuilder + getRelativeTemporalPartitionOrBuilder() { + if (relativeTemporalPartitionBuilder_ != null) { + return relativeTemporalPartitionBuilder_.getMessageOrBuilder(); + } else { + return relativeTemporalPartition_ == null + ? com.google.cloud.visionai.v1.Partition.RelativeTemporalPartition.getDefaultInstance() + : relativeTemporalPartition_; + } + } + /** + * + * + *
+     * Partition of asset in time.
+     * 
+ * + * + * .google.cloud.visionai.v1.Partition.RelativeTemporalPartition relative_temporal_partition = 3; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.Partition.RelativeTemporalPartition, + com.google.cloud.visionai.v1.Partition.RelativeTemporalPartition.Builder, + com.google.cloud.visionai.v1.Partition.RelativeTemporalPartitionOrBuilder> + getRelativeTemporalPartitionFieldBuilder() { + if (relativeTemporalPartitionBuilder_ == null) { + relativeTemporalPartitionBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.Partition.RelativeTemporalPartition, + com.google.cloud.visionai.v1.Partition.RelativeTemporalPartition.Builder, + com.google.cloud.visionai.v1.Partition.RelativeTemporalPartitionOrBuilder>( + getRelativeTemporalPartition(), getParentForChildren(), isClean()); + relativeTemporalPartition_ = null; + } + return relativeTemporalPartitionBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.Partition) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.Partition) + private static final com.google.cloud.visionai.v1.Partition DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.Partition(); + } + + public static com.google.cloud.visionai.v1.Partition getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Partition parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.Partition getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/PartitionOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/PartitionOrBuilder.java new file mode 100644 index 000000000000..9613be82e48d --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/PartitionOrBuilder.java @@ -0,0 +1,138 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/warehouse.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface PartitionOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.Partition) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Partition of asset in time.
+   * 
+ * + * .google.cloud.visionai.v1.Partition.TemporalPartition temporal_partition = 1; + * + * @return Whether the temporalPartition field is set. + */ + boolean hasTemporalPartition(); + /** + * + * + *
+   * Partition of asset in time.
+   * 
+ * + * .google.cloud.visionai.v1.Partition.TemporalPartition temporal_partition = 1; + * + * @return The temporalPartition. + */ + com.google.cloud.visionai.v1.Partition.TemporalPartition getTemporalPartition(); + /** + * + * + *
+   * Partition of asset in time.
+   * 
+ * + * .google.cloud.visionai.v1.Partition.TemporalPartition temporal_partition = 1; + */ + com.google.cloud.visionai.v1.Partition.TemporalPartitionOrBuilder getTemporalPartitionOrBuilder(); + + /** + * + * + *
+   * Partition of asset in space.
+   * 
+ * + * .google.cloud.visionai.v1.Partition.SpatialPartition spatial_partition = 2; + * + * @return Whether the spatialPartition field is set. + */ + boolean hasSpatialPartition(); + /** + * + * + *
+   * Partition of asset in space.
+   * 
+ * + * .google.cloud.visionai.v1.Partition.SpatialPartition spatial_partition = 2; + * + * @return The spatialPartition. + */ + com.google.cloud.visionai.v1.Partition.SpatialPartition getSpatialPartition(); + /** + * + * + *
+   * Partition of asset in space.
+   * 
+ * + * .google.cloud.visionai.v1.Partition.SpatialPartition spatial_partition = 2; + */ + com.google.cloud.visionai.v1.Partition.SpatialPartitionOrBuilder getSpatialPartitionOrBuilder(); + + /** + * + * + *
+   * Partition of asset in time.
+   * 
+ * + * + * .google.cloud.visionai.v1.Partition.RelativeTemporalPartition relative_temporal_partition = 3; + * + * + * @return Whether the relativeTemporalPartition field is set. + */ + boolean hasRelativeTemporalPartition(); + /** + * + * + *
+   * Partition of asset in time.
+   * 
+ * + * + * .google.cloud.visionai.v1.Partition.RelativeTemporalPartition relative_temporal_partition = 3; + * + * + * @return The relativeTemporalPartition. + */ + com.google.cloud.visionai.v1.Partition.RelativeTemporalPartition getRelativeTemporalPartition(); + /** + * + * + *
+   * Partition of asset in time.
+   * 
+ * + * + * .google.cloud.visionai.v1.Partition.RelativeTemporalPartition relative_temporal_partition = 3; + * + */ + com.google.cloud.visionai.v1.Partition.RelativeTemporalPartitionOrBuilder + getRelativeTemporalPartitionOrBuilder(); +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/PersonBlurConfig.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/PersonBlurConfig.java new file mode 100644 index 000000000000..854409769a40 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/PersonBlurConfig.java @@ -0,0 +1,849 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/platform.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * Message describing FaceBlurConfig.
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.PersonBlurConfig} + */ +public final class PersonBlurConfig extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.PersonBlurConfig) + PersonBlurConfigOrBuilder { + private static final long serialVersionUID = 0L; + // Use PersonBlurConfig.newBuilder() to construct. + private PersonBlurConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private PersonBlurConfig() { + personBlurType_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new PersonBlurConfig(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_PersonBlurConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_PersonBlurConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.PersonBlurConfig.class, + com.google.cloud.visionai.v1.PersonBlurConfig.Builder.class); + } + + /** + * + * + *
+   * Type of Person Blur
+   * 
+ * + * Protobuf enum {@code google.cloud.visionai.v1.PersonBlurConfig.PersonBlurType} + */ + public enum PersonBlurType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * PersonBlur Type UNSPECIFIED.
+     * 
+ * + * PERSON_BLUR_TYPE_UNSPECIFIED = 0; + */ + PERSON_BLUR_TYPE_UNSPECIFIED(0), + /** + * + * + *
+     * FaceBlur Type full occlusion.
+     * 
+ * + * FULL_OCCULUSION = 1; + */ + FULL_OCCULUSION(1), + /** + * + * + *
+     * FaceBlur Type blur filter.
+     * 
+ * + * BLUR_FILTER = 2; + */ + BLUR_FILTER(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * PersonBlur Type UNSPECIFIED.
+     * 
+ * + * PERSON_BLUR_TYPE_UNSPECIFIED = 0; + */ + public static final int PERSON_BLUR_TYPE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * FaceBlur Type full occlusion.
+     * 
+ * + * FULL_OCCULUSION = 1; + */ + public static final int FULL_OCCULUSION_VALUE = 1; + /** + * + * + *
+     * FaceBlur Type blur filter.
+     * 
+ * + * BLUR_FILTER = 2; + */ + public static final int BLUR_FILTER_VALUE = 2; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static PersonBlurType valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static PersonBlurType forNumber(int value) { + switch (value) { + case 0: + return PERSON_BLUR_TYPE_UNSPECIFIED; + case 1: + return FULL_OCCULUSION; + case 2: + return BLUR_FILTER; + 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 PersonBlurType findValueByNumber(int number) { + return PersonBlurType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + 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.visionai.v1.PersonBlurConfig.getDescriptor().getEnumTypes().get(0); + } + + private static final PersonBlurType[] VALUES = values(); + + public static PersonBlurType 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 PersonBlurType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.visionai.v1.PersonBlurConfig.PersonBlurType) + } + + public static final int PERSON_BLUR_TYPE_FIELD_NUMBER = 1; + private int personBlurType_ = 0; + /** + * + * + *
+   * Person blur type.
+   * 
+ * + * .google.cloud.visionai.v1.PersonBlurConfig.PersonBlurType person_blur_type = 1; + * + * @return The enum numeric value on the wire for personBlurType. + */ + @java.lang.Override + public int getPersonBlurTypeValue() { + return personBlurType_; + } + /** + * + * + *
+   * Person blur type.
+   * 
+ * + * .google.cloud.visionai.v1.PersonBlurConfig.PersonBlurType person_blur_type = 1; + * + * @return The personBlurType. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.PersonBlurConfig.PersonBlurType getPersonBlurType() { + com.google.cloud.visionai.v1.PersonBlurConfig.PersonBlurType result = + com.google.cloud.visionai.v1.PersonBlurConfig.PersonBlurType.forNumber(personBlurType_); + return result == null + ? com.google.cloud.visionai.v1.PersonBlurConfig.PersonBlurType.UNRECOGNIZED + : result; + } + + public static final int FACES_ONLY_FIELD_NUMBER = 2; + private boolean facesOnly_ = false; + /** + * + * + *
+   * Whether only blur faces other than the whole object in the processor.
+   * 
+ * + * bool faces_only = 2; + * + * @return The facesOnly. + */ + @java.lang.Override + public boolean getFacesOnly() { + return facesOnly_; + } + + 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 (personBlurType_ + != com.google.cloud.visionai.v1.PersonBlurConfig.PersonBlurType.PERSON_BLUR_TYPE_UNSPECIFIED + .getNumber()) { + output.writeEnum(1, personBlurType_); + } + if (facesOnly_ != false) { + output.writeBool(2, facesOnly_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (personBlurType_ + != com.google.cloud.visionai.v1.PersonBlurConfig.PersonBlurType.PERSON_BLUR_TYPE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, personBlurType_); + } + if (facesOnly_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(2, facesOnly_); + } + size += getUnknownFields().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.visionai.v1.PersonBlurConfig)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.PersonBlurConfig other = + (com.google.cloud.visionai.v1.PersonBlurConfig) obj; + + if (personBlurType_ != other.personBlurType_) return false; + if (getFacesOnly() != other.getFacesOnly()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PERSON_BLUR_TYPE_FIELD_NUMBER; + hash = (53 * hash) + personBlurType_; + hash = (37 * hash) + FACES_ONLY_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getFacesOnly()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.PersonBlurConfig parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.PersonBlurConfig 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.visionai.v1.PersonBlurConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.PersonBlurConfig 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.visionai.v1.PersonBlurConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.PersonBlurConfig parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.PersonBlurConfig parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.PersonBlurConfig 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.visionai.v1.PersonBlurConfig parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.PersonBlurConfig 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.visionai.v1.PersonBlurConfig parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.PersonBlurConfig 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.visionai.v1.PersonBlurConfig 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; + } + /** + * + * + *
+   * Message describing FaceBlurConfig.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.PersonBlurConfig} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.PersonBlurConfig) + com.google.cloud.visionai.v1.PersonBlurConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_PersonBlurConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_PersonBlurConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.PersonBlurConfig.class, + com.google.cloud.visionai.v1.PersonBlurConfig.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.PersonBlurConfig.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + personBlurType_ = 0; + facesOnly_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_PersonBlurConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.PersonBlurConfig getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.PersonBlurConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.PersonBlurConfig build() { + com.google.cloud.visionai.v1.PersonBlurConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.PersonBlurConfig buildPartial() { + com.google.cloud.visionai.v1.PersonBlurConfig result = + new com.google.cloud.visionai.v1.PersonBlurConfig(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.visionai.v1.PersonBlurConfig result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.personBlurType_ = personBlurType_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.facesOnly_ = facesOnly_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.PersonBlurConfig) { + return mergeFrom((com.google.cloud.visionai.v1.PersonBlurConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.PersonBlurConfig other) { + if (other == com.google.cloud.visionai.v1.PersonBlurConfig.getDefaultInstance()) return this; + if (other.personBlurType_ != 0) { + setPersonBlurTypeValue(other.getPersonBlurTypeValue()); + } + if (other.getFacesOnly() != false) { + setFacesOnly(other.getFacesOnly()); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + personBlurType_ = input.readEnum(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 16: + { + facesOnly_ = input.readBool(); + bitField0_ |= 0x00000002; + break; + } // case 16 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private int personBlurType_ = 0; + /** + * + * + *
+     * Person blur type.
+     * 
+ * + * .google.cloud.visionai.v1.PersonBlurConfig.PersonBlurType person_blur_type = 1; + * + * @return The enum numeric value on the wire for personBlurType. + */ + @java.lang.Override + public int getPersonBlurTypeValue() { + return personBlurType_; + } + /** + * + * + *
+     * Person blur type.
+     * 
+ * + * .google.cloud.visionai.v1.PersonBlurConfig.PersonBlurType person_blur_type = 1; + * + * @param value The enum numeric value on the wire for personBlurType to set. + * @return This builder for chaining. + */ + public Builder setPersonBlurTypeValue(int value) { + personBlurType_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Person blur type.
+     * 
+ * + * .google.cloud.visionai.v1.PersonBlurConfig.PersonBlurType person_blur_type = 1; + * + * @return The personBlurType. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.PersonBlurConfig.PersonBlurType getPersonBlurType() { + com.google.cloud.visionai.v1.PersonBlurConfig.PersonBlurType result = + com.google.cloud.visionai.v1.PersonBlurConfig.PersonBlurType.forNumber(personBlurType_); + return result == null + ? com.google.cloud.visionai.v1.PersonBlurConfig.PersonBlurType.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Person blur type.
+     * 
+ * + * .google.cloud.visionai.v1.PersonBlurConfig.PersonBlurType person_blur_type = 1; + * + * @param value The personBlurType to set. + * @return This builder for chaining. + */ + public Builder setPersonBlurType( + com.google.cloud.visionai.v1.PersonBlurConfig.PersonBlurType value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + personBlurType_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Person blur type.
+     * 
+ * + * .google.cloud.visionai.v1.PersonBlurConfig.PersonBlurType person_blur_type = 1; + * + * @return This builder for chaining. + */ + public Builder clearPersonBlurType() { + bitField0_ = (bitField0_ & ~0x00000001); + personBlurType_ = 0; + onChanged(); + return this; + } + + private boolean facesOnly_; + /** + * + * + *
+     * Whether only blur faces other than the whole object in the processor.
+     * 
+ * + * bool faces_only = 2; + * + * @return The facesOnly. + */ + @java.lang.Override + public boolean getFacesOnly() { + return facesOnly_; + } + /** + * + * + *
+     * Whether only blur faces other than the whole object in the processor.
+     * 
+ * + * bool faces_only = 2; + * + * @param value The facesOnly to set. + * @return This builder for chaining. + */ + public Builder setFacesOnly(boolean value) { + + facesOnly_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Whether only blur faces other than the whole object in the processor.
+     * 
+ * + * bool faces_only = 2; + * + * @return This builder for chaining. + */ + public Builder clearFacesOnly() { + bitField0_ = (bitField0_ & ~0x00000002); + facesOnly_ = false; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.PersonBlurConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.PersonBlurConfig) + private static final com.google.cloud.visionai.v1.PersonBlurConfig DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.PersonBlurConfig(); + } + + public static com.google.cloud.visionai.v1.PersonBlurConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PersonBlurConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.PersonBlurConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/PersonBlurConfigOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/PersonBlurConfigOrBuilder.java new file mode 100644 index 000000000000..d1cf9d256c19 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/PersonBlurConfigOrBuilder.java @@ -0,0 +1,64 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/platform.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface PersonBlurConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.PersonBlurConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Person blur type.
+   * 
+ * + * .google.cloud.visionai.v1.PersonBlurConfig.PersonBlurType person_blur_type = 1; + * + * @return The enum numeric value on the wire for personBlurType. + */ + int getPersonBlurTypeValue(); + /** + * + * + *
+   * Person blur type.
+   * 
+ * + * .google.cloud.visionai.v1.PersonBlurConfig.PersonBlurType person_blur_type = 1; + * + * @return The personBlurType. + */ + com.google.cloud.visionai.v1.PersonBlurConfig.PersonBlurType getPersonBlurType(); + + /** + * + * + *
+   * Whether only blur faces other than the whole object in the processor.
+   * 
+ * + * bool faces_only = 2; + * + * @return The facesOnly. + */ + boolean getFacesOnly(); +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/PersonVehicleDetectionConfig.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/PersonVehicleDetectionConfig.java new file mode 100644 index 000000000000..e4619bee11a9 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/PersonVehicleDetectionConfig.java @@ -0,0 +1,645 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/platform.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * Message describing PersonVehicleDetectionConfig.
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.PersonVehicleDetectionConfig} + */ +public final class PersonVehicleDetectionConfig extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.PersonVehicleDetectionConfig) + PersonVehicleDetectionConfigOrBuilder { + private static final long serialVersionUID = 0L; + // Use PersonVehicleDetectionConfig.newBuilder() to construct. + private PersonVehicleDetectionConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private PersonVehicleDetectionConfig() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new PersonVehicleDetectionConfig(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_PersonVehicleDetectionConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_PersonVehicleDetectionConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.PersonVehicleDetectionConfig.class, + com.google.cloud.visionai.v1.PersonVehicleDetectionConfig.Builder.class); + } + + public static final int ENABLE_PEOPLE_COUNTING_FIELD_NUMBER = 1; + private boolean enablePeopleCounting_ = false; + /** + * + * + *
+   * At least one of enable_people_counting and enable_vehicle_counting fields
+   * must be set to true.
+   * Whether to count the appearances of people, output counts have 'people' as
+   * the key.
+   * 
+ * + * bool enable_people_counting = 1; + * + * @return The enablePeopleCounting. + */ + @java.lang.Override + public boolean getEnablePeopleCounting() { + return enablePeopleCounting_; + } + + public static final int ENABLE_VEHICLE_COUNTING_FIELD_NUMBER = 2; + private boolean enableVehicleCounting_ = false; + /** + * + * + *
+   * Whether to count the appearances of vehicles, output counts will have
+   * 'vehicle' as the key.
+   * 
+ * + * bool enable_vehicle_counting = 2; + * + * @return The enableVehicleCounting. + */ + @java.lang.Override + public boolean getEnableVehicleCounting() { + return enableVehicleCounting_; + } + + 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 (enablePeopleCounting_ != false) { + output.writeBool(1, enablePeopleCounting_); + } + if (enableVehicleCounting_ != false) { + output.writeBool(2, enableVehicleCounting_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (enablePeopleCounting_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(1, enablePeopleCounting_); + } + if (enableVehicleCounting_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(2, enableVehicleCounting_); + } + size += getUnknownFields().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.visionai.v1.PersonVehicleDetectionConfig)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.PersonVehicleDetectionConfig other = + (com.google.cloud.visionai.v1.PersonVehicleDetectionConfig) obj; + + if (getEnablePeopleCounting() != other.getEnablePeopleCounting()) return false; + if (getEnableVehicleCounting() != other.getEnableVehicleCounting()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ENABLE_PEOPLE_COUNTING_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getEnablePeopleCounting()); + hash = (37 * hash) + ENABLE_VEHICLE_COUNTING_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getEnableVehicleCounting()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.PersonVehicleDetectionConfig parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.PersonVehicleDetectionConfig 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.visionai.v1.PersonVehicleDetectionConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.PersonVehicleDetectionConfig 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.visionai.v1.PersonVehicleDetectionConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.PersonVehicleDetectionConfig parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.PersonVehicleDetectionConfig parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.PersonVehicleDetectionConfig 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.visionai.v1.PersonVehicleDetectionConfig parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.PersonVehicleDetectionConfig 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.visionai.v1.PersonVehicleDetectionConfig parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.PersonVehicleDetectionConfig 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.visionai.v1.PersonVehicleDetectionConfig 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; + } + /** + * + * + *
+   * Message describing PersonVehicleDetectionConfig.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.PersonVehicleDetectionConfig} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.PersonVehicleDetectionConfig) + com.google.cloud.visionai.v1.PersonVehicleDetectionConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_PersonVehicleDetectionConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_PersonVehicleDetectionConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.PersonVehicleDetectionConfig.class, + com.google.cloud.visionai.v1.PersonVehicleDetectionConfig.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.PersonVehicleDetectionConfig.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + enablePeopleCounting_ = false; + enableVehicleCounting_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_PersonVehicleDetectionConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.PersonVehicleDetectionConfig getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.PersonVehicleDetectionConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.PersonVehicleDetectionConfig build() { + com.google.cloud.visionai.v1.PersonVehicleDetectionConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.PersonVehicleDetectionConfig buildPartial() { + com.google.cloud.visionai.v1.PersonVehicleDetectionConfig result = + new com.google.cloud.visionai.v1.PersonVehicleDetectionConfig(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.visionai.v1.PersonVehicleDetectionConfig result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.enablePeopleCounting_ = enablePeopleCounting_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.enableVehicleCounting_ = enableVehicleCounting_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.PersonVehicleDetectionConfig) { + return mergeFrom((com.google.cloud.visionai.v1.PersonVehicleDetectionConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.PersonVehicleDetectionConfig other) { + if (other == com.google.cloud.visionai.v1.PersonVehicleDetectionConfig.getDefaultInstance()) + return this; + if (other.getEnablePeopleCounting() != false) { + setEnablePeopleCounting(other.getEnablePeopleCounting()); + } + if (other.getEnableVehicleCounting() != false) { + setEnableVehicleCounting(other.getEnableVehicleCounting()); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + enablePeopleCounting_ = input.readBool(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 16: + { + enableVehicleCounting_ = input.readBool(); + bitField0_ |= 0x00000002; + break; + } // case 16 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private boolean enablePeopleCounting_; + /** + * + * + *
+     * At least one of enable_people_counting and enable_vehicle_counting fields
+     * must be set to true.
+     * Whether to count the appearances of people, output counts have 'people' as
+     * the key.
+     * 
+ * + * bool enable_people_counting = 1; + * + * @return The enablePeopleCounting. + */ + @java.lang.Override + public boolean getEnablePeopleCounting() { + return enablePeopleCounting_; + } + /** + * + * + *
+     * At least one of enable_people_counting and enable_vehicle_counting fields
+     * must be set to true.
+     * Whether to count the appearances of people, output counts have 'people' as
+     * the key.
+     * 
+ * + * bool enable_people_counting = 1; + * + * @param value The enablePeopleCounting to set. + * @return This builder for chaining. + */ + public Builder setEnablePeopleCounting(boolean value) { + + enablePeopleCounting_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * At least one of enable_people_counting and enable_vehicle_counting fields
+     * must be set to true.
+     * Whether to count the appearances of people, output counts have 'people' as
+     * the key.
+     * 
+ * + * bool enable_people_counting = 1; + * + * @return This builder for chaining. + */ + public Builder clearEnablePeopleCounting() { + bitField0_ = (bitField0_ & ~0x00000001); + enablePeopleCounting_ = false; + onChanged(); + return this; + } + + private boolean enableVehicleCounting_; + /** + * + * + *
+     * Whether to count the appearances of vehicles, output counts will have
+     * 'vehicle' as the key.
+     * 
+ * + * bool enable_vehicle_counting = 2; + * + * @return The enableVehicleCounting. + */ + @java.lang.Override + public boolean getEnableVehicleCounting() { + return enableVehicleCounting_; + } + /** + * + * + *
+     * Whether to count the appearances of vehicles, output counts will have
+     * 'vehicle' as the key.
+     * 
+ * + * bool enable_vehicle_counting = 2; + * + * @param value The enableVehicleCounting to set. + * @return This builder for chaining. + */ + public Builder setEnableVehicleCounting(boolean value) { + + enableVehicleCounting_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Whether to count the appearances of vehicles, output counts will have
+     * 'vehicle' as the key.
+     * 
+ * + * bool enable_vehicle_counting = 2; + * + * @return This builder for chaining. + */ + public Builder clearEnableVehicleCounting() { + bitField0_ = (bitField0_ & ~0x00000002); + enableVehicleCounting_ = false; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.PersonVehicleDetectionConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.PersonVehicleDetectionConfig) + private static final com.google.cloud.visionai.v1.PersonVehicleDetectionConfig DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.PersonVehicleDetectionConfig(); + } + + public static com.google.cloud.visionai.v1.PersonVehicleDetectionConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PersonVehicleDetectionConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.PersonVehicleDetectionConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/PersonVehicleDetectionConfigOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/PersonVehicleDetectionConfigOrBuilder.java new file mode 100644 index 000000000000..1290f5391ef0 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/PersonVehicleDetectionConfigOrBuilder.java @@ -0,0 +1,56 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/platform.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface PersonVehicleDetectionConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.PersonVehicleDetectionConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * At least one of enable_people_counting and enable_vehicle_counting fields
+   * must be set to true.
+   * Whether to count the appearances of people, output counts have 'people' as
+   * the key.
+   * 
+ * + * bool enable_people_counting = 1; + * + * @return The enablePeopleCounting. + */ + boolean getEnablePeopleCounting(); + + /** + * + * + *
+   * Whether to count the appearances of vehicles, output counts will have
+   * 'vehicle' as the key.
+   * 
+ * + * bool enable_vehicle_counting = 2; + * + * @return The enableVehicleCounting. + */ + boolean getEnableVehicleCounting(); +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/PersonalProtectiveEquipmentDetectionConfig.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/PersonalProtectiveEquipmentDetectionConfig.java new file mode 100644 index 000000000000..ce8664c6f6b4 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/PersonalProtectiveEquipmentDetectionConfig.java @@ -0,0 +1,745 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/platform.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * Message describing PersonalProtectiveEquipmentDetectionConfig.
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionConfig} + */ +public final class PersonalProtectiveEquipmentDetectionConfig + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionConfig) + PersonalProtectiveEquipmentDetectionConfigOrBuilder { + private static final long serialVersionUID = 0L; + // Use PersonalProtectiveEquipmentDetectionConfig.newBuilder() to construct. + private PersonalProtectiveEquipmentDetectionConfig( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private PersonalProtectiveEquipmentDetectionConfig() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new PersonalProtectiveEquipmentDetectionConfig(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_PersonalProtectiveEquipmentDetectionConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_PersonalProtectiveEquipmentDetectionConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionConfig.class, + com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionConfig.Builder.class); + } + + public static final int ENABLE_FACE_COVERAGE_DETECTION_FIELD_NUMBER = 1; + private boolean enableFaceCoverageDetection_ = false; + /** + * + * + *
+   * Whether to enable face coverage detection.
+   * 
+ * + * bool enable_face_coverage_detection = 1; + * + * @return The enableFaceCoverageDetection. + */ + @java.lang.Override + public boolean getEnableFaceCoverageDetection() { + return enableFaceCoverageDetection_; + } + + public static final int ENABLE_HEAD_COVERAGE_DETECTION_FIELD_NUMBER = 2; + private boolean enableHeadCoverageDetection_ = false; + /** + * + * + *
+   * Whether to enable head coverage detection.
+   * 
+ * + * bool enable_head_coverage_detection = 2; + * + * @return The enableHeadCoverageDetection. + */ + @java.lang.Override + public boolean getEnableHeadCoverageDetection() { + return enableHeadCoverageDetection_; + } + + public static final int ENABLE_HANDS_COVERAGE_DETECTION_FIELD_NUMBER = 3; + private boolean enableHandsCoverageDetection_ = false; + /** + * + * + *
+   * Whether to enable hands coverage detection.
+   * 
+ * + * bool enable_hands_coverage_detection = 3; + * + * @return The enableHandsCoverageDetection. + */ + @java.lang.Override + public boolean getEnableHandsCoverageDetection() { + return enableHandsCoverageDetection_; + } + + 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 (enableFaceCoverageDetection_ != false) { + output.writeBool(1, enableFaceCoverageDetection_); + } + if (enableHeadCoverageDetection_ != false) { + output.writeBool(2, enableHeadCoverageDetection_); + } + if (enableHandsCoverageDetection_ != false) { + output.writeBool(3, enableHandsCoverageDetection_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (enableFaceCoverageDetection_ != false) { + size += + com.google.protobuf.CodedOutputStream.computeBoolSize(1, enableFaceCoverageDetection_); + } + if (enableHeadCoverageDetection_ != false) { + size += + com.google.protobuf.CodedOutputStream.computeBoolSize(2, enableHeadCoverageDetection_); + } + if (enableHandsCoverageDetection_ != false) { + size += + com.google.protobuf.CodedOutputStream.computeBoolSize(3, enableHandsCoverageDetection_); + } + size += getUnknownFields().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.visionai.v1.PersonalProtectiveEquipmentDetectionConfig)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionConfig other = + (com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionConfig) obj; + + if (getEnableFaceCoverageDetection() != other.getEnableFaceCoverageDetection()) return false; + if (getEnableHeadCoverageDetection() != other.getEnableHeadCoverageDetection()) return false; + if (getEnableHandsCoverageDetection() != other.getEnableHandsCoverageDetection()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ENABLE_FACE_COVERAGE_DETECTION_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getEnableFaceCoverageDetection()); + hash = (37 * hash) + ENABLE_HEAD_COVERAGE_DETECTION_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getEnableHeadCoverageDetection()); + hash = (37 * hash) + ENABLE_HANDS_COVERAGE_DETECTION_FIELD_NUMBER; + hash = + (53 * hash) + com.google.protobuf.Internal.hashBoolean(getEnableHandsCoverageDetection()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionConfig parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionConfig 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.visionai.v1.PersonalProtectiveEquipmentDetectionConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionConfig 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.visionai.v1.PersonalProtectiveEquipmentDetectionConfig parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionConfig parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionConfig parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionConfig 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.visionai.v1.PersonalProtectiveEquipmentDetectionConfig + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionConfig + 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.visionai.v1.PersonalProtectiveEquipmentDetectionConfig parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionConfig 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.visionai.v1.PersonalProtectiveEquipmentDetectionConfig 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; + } + /** + * + * + *
+   * Message describing PersonalProtectiveEquipmentDetectionConfig.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionConfig} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionConfig) + com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_PersonalProtectiveEquipmentDetectionConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_PersonalProtectiveEquipmentDetectionConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionConfig.class, + com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionConfig.Builder + .class); + } + + // Construct using + // com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionConfig.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + enableFaceCoverageDetection_ = false; + enableHeadCoverageDetection_ = false; + enableHandsCoverageDetection_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_PersonalProtectiveEquipmentDetectionConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionConfig + getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionConfig + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionConfig build() { + com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionConfig result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionConfig buildPartial() { + com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionConfig result = + new com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionConfig(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionConfig result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.enableFaceCoverageDetection_ = enableFaceCoverageDetection_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.enableHeadCoverageDetection_ = enableHeadCoverageDetection_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.enableHandsCoverageDetection_ = enableHandsCoverageDetection_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionConfig) { + return mergeFrom( + (com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionConfig other) { + if (other + == com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionConfig + .getDefaultInstance()) return this; + if (other.getEnableFaceCoverageDetection() != false) { + setEnableFaceCoverageDetection(other.getEnableFaceCoverageDetection()); + } + if (other.getEnableHeadCoverageDetection() != false) { + setEnableHeadCoverageDetection(other.getEnableHeadCoverageDetection()); + } + if (other.getEnableHandsCoverageDetection() != false) { + setEnableHandsCoverageDetection(other.getEnableHandsCoverageDetection()); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + enableFaceCoverageDetection_ = input.readBool(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 16: + { + enableHeadCoverageDetection_ = input.readBool(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 24: + { + enableHandsCoverageDetection_ = input.readBool(); + bitField0_ |= 0x00000004; + break; + } // case 24 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private boolean enableFaceCoverageDetection_; + /** + * + * + *
+     * Whether to enable face coverage detection.
+     * 
+ * + * bool enable_face_coverage_detection = 1; + * + * @return The enableFaceCoverageDetection. + */ + @java.lang.Override + public boolean getEnableFaceCoverageDetection() { + return enableFaceCoverageDetection_; + } + /** + * + * + *
+     * Whether to enable face coverage detection.
+     * 
+ * + * bool enable_face_coverage_detection = 1; + * + * @param value The enableFaceCoverageDetection to set. + * @return This builder for chaining. + */ + public Builder setEnableFaceCoverageDetection(boolean value) { + + enableFaceCoverageDetection_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Whether to enable face coverage detection.
+     * 
+ * + * bool enable_face_coverage_detection = 1; + * + * @return This builder for chaining. + */ + public Builder clearEnableFaceCoverageDetection() { + bitField0_ = (bitField0_ & ~0x00000001); + enableFaceCoverageDetection_ = false; + onChanged(); + return this; + } + + private boolean enableHeadCoverageDetection_; + /** + * + * + *
+     * Whether to enable head coverage detection.
+     * 
+ * + * bool enable_head_coverage_detection = 2; + * + * @return The enableHeadCoverageDetection. + */ + @java.lang.Override + public boolean getEnableHeadCoverageDetection() { + return enableHeadCoverageDetection_; + } + /** + * + * + *
+     * Whether to enable head coverage detection.
+     * 
+ * + * bool enable_head_coverage_detection = 2; + * + * @param value The enableHeadCoverageDetection to set. + * @return This builder for chaining. + */ + public Builder setEnableHeadCoverageDetection(boolean value) { + + enableHeadCoverageDetection_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Whether to enable head coverage detection.
+     * 
+ * + * bool enable_head_coverage_detection = 2; + * + * @return This builder for chaining. + */ + public Builder clearEnableHeadCoverageDetection() { + bitField0_ = (bitField0_ & ~0x00000002); + enableHeadCoverageDetection_ = false; + onChanged(); + return this; + } + + private boolean enableHandsCoverageDetection_; + /** + * + * + *
+     * Whether to enable hands coverage detection.
+     * 
+ * + * bool enable_hands_coverage_detection = 3; + * + * @return The enableHandsCoverageDetection. + */ + @java.lang.Override + public boolean getEnableHandsCoverageDetection() { + return enableHandsCoverageDetection_; + } + /** + * + * + *
+     * Whether to enable hands coverage detection.
+     * 
+ * + * bool enable_hands_coverage_detection = 3; + * + * @param value The enableHandsCoverageDetection to set. + * @return This builder for chaining. + */ + public Builder setEnableHandsCoverageDetection(boolean value) { + + enableHandsCoverageDetection_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Whether to enable hands coverage detection.
+     * 
+ * + * bool enable_hands_coverage_detection = 3; + * + * @return This builder for chaining. + */ + public Builder clearEnableHandsCoverageDetection() { + bitField0_ = (bitField0_ & ~0x00000004); + enableHandsCoverageDetection_ = false; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.PersonalProtectiveEquipmentDetectionConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionConfig) + private static final com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionConfig + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionConfig(); + } + + public static com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionConfig + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PersonalProtectiveEquipmentDetectionConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.PersonalProtectiveEquipmentDetectionConfig + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/PersonalProtectiveEquipmentDetectionConfigOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/PersonalProtectiveEquipmentDetectionConfigOrBuilder.java new file mode 100644 index 000000000000..274cfa85f4c2 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/PersonalProtectiveEquipmentDetectionConfigOrBuilder.java @@ -0,0 +1,65 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/platform.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface PersonalProtectiveEquipmentDetectionConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Whether to enable face coverage detection.
+   * 
+ * + * bool enable_face_coverage_detection = 1; + * + * @return The enableFaceCoverageDetection. + */ + boolean getEnableFaceCoverageDetection(); + + /** + * + * + *
+   * Whether to enable head coverage detection.
+   * 
+ * + * bool enable_head_coverage_detection = 2; + * + * @return The enableHeadCoverageDetection. + */ + boolean getEnableHeadCoverageDetection(); + + /** + * + * + *
+   * Whether to enable hands coverage detection.
+   * 
+ * + * bool enable_hands_coverage_detection = 3; + * + * @return The enableHandsCoverageDetection. + */ + boolean getEnableHandsCoverageDetection(); +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/PersonalProtectiveEquipmentDetectionOutput.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/PersonalProtectiveEquipmentDetectionOutput.java new file mode 100644 index 000000000000..cf07ff75bc00 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/PersonalProtectiveEquipmentDetectionOutput.java @@ -0,0 +1,9528 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/annotations.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * Output format for Personal Protective Equipment Detection Operator.
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput} + */ +public final class PersonalProtectiveEquipmentDetectionOutput + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput) + PersonalProtectiveEquipmentDetectionOutputOrBuilder { + private static final long serialVersionUID = 0L; + // Use PersonalProtectiveEquipmentDetectionOutput.newBuilder() to construct. + private PersonalProtectiveEquipmentDetectionOutput( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private PersonalProtectiveEquipmentDetectionOutput() { + detectedPersons_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new PersonalProtectiveEquipmentDetectionOutput(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.AnnotationsProto + .internal_static_google_cloud_visionai_v1_PersonalProtectiveEquipmentDetectionOutput_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.AnnotationsProto + .internal_static_google_cloud_visionai_v1_PersonalProtectiveEquipmentDetectionOutput_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.class, + com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.Builder.class); + } + + public interface PersonEntityOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PersonEntity) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Entity id.
+     * 
+ * + * int64 person_entity_id = 1; + * + * @return The personEntityId. + */ + long getPersonEntityId(); + } + /** + * + * + *
+   * The entity info for annotations from person detection prediction result.
+   * 
+ * + * Protobuf type {@code + * google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PersonEntity} + */ + public static final class PersonEntity extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PersonEntity) + PersonEntityOrBuilder { + private static final long serialVersionUID = 0L; + // Use PersonEntity.newBuilder() to construct. + private PersonEntity(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private PersonEntity() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new PersonEntity(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.AnnotationsProto + .internal_static_google_cloud_visionai_v1_PersonalProtectiveEquipmentDetectionOutput_PersonEntity_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.AnnotationsProto + .internal_static_google_cloud_visionai_v1_PersonalProtectiveEquipmentDetectionOutput_PersonEntity_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PersonEntity + .class, + com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PersonEntity + .Builder.class); + } + + public static final int PERSON_ENTITY_ID_FIELD_NUMBER = 1; + private long personEntityId_ = 0L; + /** + * + * + *
+     * Entity id.
+     * 
+ * + * int64 person_entity_id = 1; + * + * @return The personEntityId. + */ + @java.lang.Override + public long getPersonEntityId() { + return personEntityId_; + } + + 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 (personEntityId_ != 0L) { + output.writeInt64(1, personEntityId_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (personEntityId_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(1, personEntityId_); + } + size += getUnknownFields().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.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PersonEntity)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PersonEntity other = + (com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PersonEntity) + obj; + + if (getPersonEntityId() != other.getPersonEntityId()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PERSON_ENTITY_ID_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getPersonEntityId()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .PersonEntity + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .PersonEntity + 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.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .PersonEntity + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .PersonEntity + 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.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .PersonEntity + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .PersonEntity + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .PersonEntity + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .PersonEntity + 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.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .PersonEntity + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .PersonEntity + 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.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .PersonEntity + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .PersonEntity + 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.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PersonEntity + 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 entity info for annotations from person detection prediction result.
+     * 
+ * + * Protobuf type {@code + * google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PersonEntity} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PersonEntity) + com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .PersonEntityOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.AnnotationsProto + .internal_static_google_cloud_visionai_v1_PersonalProtectiveEquipmentDetectionOutput_PersonEntity_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.AnnotationsProto + .internal_static_google_cloud_visionai_v1_PersonalProtectiveEquipmentDetectionOutput_PersonEntity_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PersonEntity + .class, + com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PersonEntity + .Builder.class); + } + + // Construct using + // com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PersonEntity.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + personEntityId_ = 0L; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.AnnotationsProto + .internal_static_google_cloud_visionai_v1_PersonalProtectiveEquipmentDetectionOutput_PersonEntity_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PersonEntity + getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PersonEntity + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PersonEntity + build() { + com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PersonEntity + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PersonEntity + buildPartial() { + com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PersonEntity + result = + new com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .PersonEntity(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PersonEntity + result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.personEntityId_ = personEntityId_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PersonEntity) { + return mergeFrom( + (com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PersonEntity) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PersonEntity + other) { + if (other + == com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PersonEntity + .getDefaultInstance()) return this; + if (other.getPersonEntityId() != 0L) { + setPersonEntityId(other.getPersonEntityId()); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + personEntityId_ = input.readInt64(); + bitField0_ |= 0x00000001; + break; + } // case 8 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private long personEntityId_; + /** + * + * + *
+       * Entity id.
+       * 
+ * + * int64 person_entity_id = 1; + * + * @return The personEntityId. + */ + @java.lang.Override + public long getPersonEntityId() { + return personEntityId_; + } + /** + * + * + *
+       * Entity id.
+       * 
+ * + * int64 person_entity_id = 1; + * + * @param value The personEntityId to set. + * @return This builder for chaining. + */ + public Builder setPersonEntityId(long value) { + + personEntityId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * Entity id.
+       * 
+ * + * int64 person_entity_id = 1; + * + * @return This builder for chaining. + */ + public Builder clearPersonEntityId() { + bitField0_ = (bitField0_ & ~0x00000001); + personEntityId_ = 0L; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PersonEntity) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PersonEntity) + private static final com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .PersonEntity + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .PersonEntity(); + } + + public static com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .PersonEntity + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PersonEntity parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PersonEntity + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface PPEEntityOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PPEEntity) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Label id.
+     * 
+ * + * int64 ppe_label_id = 1; + * + * @return The ppeLabelId. + */ + long getPpeLabelId(); + + /** + * + * + *
+     * Human readable string of the label (Examples: helmet, glove, mask).
+     * 
+ * + * string ppe_label_string = 2; + * + * @return The ppeLabelString. + */ + java.lang.String getPpeLabelString(); + /** + * + * + *
+     * Human readable string of the label (Examples: helmet, glove, mask).
+     * 
+ * + * string ppe_label_string = 2; + * + * @return The bytes for ppeLabelString. + */ + com.google.protobuf.ByteString getPpeLabelStringBytes(); + + /** + * + * + *
+     * Human readable string of the super category label (Examples: head_cover,
+     * hands_cover, face_cover).
+     * 
+ * + * string ppe_supercategory_label_string = 3; + * + * @return The ppeSupercategoryLabelString. + */ + java.lang.String getPpeSupercategoryLabelString(); + /** + * + * + *
+     * Human readable string of the super category label (Examples: head_cover,
+     * hands_cover, face_cover).
+     * 
+ * + * string ppe_supercategory_label_string = 3; + * + * @return The bytes for ppeSupercategoryLabelString. + */ + com.google.protobuf.ByteString getPpeSupercategoryLabelStringBytes(); + + /** + * + * + *
+     * Entity id.
+     * 
+ * + * int64 ppe_entity_id = 4; + * + * @return The ppeEntityId. + */ + long getPpeEntityId(); + } + /** + * + * + *
+   * The entity info for annotations from PPE detection prediction result.
+   * 
+ * + * Protobuf type {@code + * google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PPEEntity} + */ + public static final class PPEEntity extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PPEEntity) + PPEEntityOrBuilder { + private static final long serialVersionUID = 0L; + // Use PPEEntity.newBuilder() to construct. + private PPEEntity(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private PPEEntity() { + ppeLabelString_ = ""; + ppeSupercategoryLabelString_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new PPEEntity(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.AnnotationsProto + .internal_static_google_cloud_visionai_v1_PersonalProtectiveEquipmentDetectionOutput_PPEEntity_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.AnnotationsProto + .internal_static_google_cloud_visionai_v1_PersonalProtectiveEquipmentDetectionOutput_PPEEntity_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PPEEntity + .class, + com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PPEEntity + .Builder.class); + } + + public static final int PPE_LABEL_ID_FIELD_NUMBER = 1; + private long ppeLabelId_ = 0L; + /** + * + * + *
+     * Label id.
+     * 
+ * + * int64 ppe_label_id = 1; + * + * @return The ppeLabelId. + */ + @java.lang.Override + public long getPpeLabelId() { + return ppeLabelId_; + } + + public static final int PPE_LABEL_STRING_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object ppeLabelString_ = ""; + /** + * + * + *
+     * Human readable string of the label (Examples: helmet, glove, mask).
+     * 
+ * + * string ppe_label_string = 2; + * + * @return The ppeLabelString. + */ + @java.lang.Override + public java.lang.String getPpeLabelString() { + java.lang.Object ref = ppeLabelString_; + 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(); + ppeLabelString_ = s; + return s; + } + } + /** + * + * + *
+     * Human readable string of the label (Examples: helmet, glove, mask).
+     * 
+ * + * string ppe_label_string = 2; + * + * @return The bytes for ppeLabelString. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPpeLabelStringBytes() { + java.lang.Object ref = ppeLabelString_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + ppeLabelString_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PPE_SUPERCATEGORY_LABEL_STRING_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object ppeSupercategoryLabelString_ = ""; + /** + * + * + *
+     * Human readable string of the super category label (Examples: head_cover,
+     * hands_cover, face_cover).
+     * 
+ * + * string ppe_supercategory_label_string = 3; + * + * @return The ppeSupercategoryLabelString. + */ + @java.lang.Override + public java.lang.String getPpeSupercategoryLabelString() { + java.lang.Object ref = ppeSupercategoryLabelString_; + 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(); + ppeSupercategoryLabelString_ = s; + return s; + } + } + /** + * + * + *
+     * Human readable string of the super category label (Examples: head_cover,
+     * hands_cover, face_cover).
+     * 
+ * + * string ppe_supercategory_label_string = 3; + * + * @return The bytes for ppeSupercategoryLabelString. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPpeSupercategoryLabelStringBytes() { + java.lang.Object ref = ppeSupercategoryLabelString_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + ppeSupercategoryLabelString_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PPE_ENTITY_ID_FIELD_NUMBER = 4; + private long ppeEntityId_ = 0L; + /** + * + * + *
+     * Entity id.
+     * 
+ * + * int64 ppe_entity_id = 4; + * + * @return The ppeEntityId. + */ + @java.lang.Override + public long getPpeEntityId() { + return ppeEntityId_; + } + + 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 (ppeLabelId_ != 0L) { + output.writeInt64(1, ppeLabelId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(ppeLabelString_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, ppeLabelString_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(ppeSupercategoryLabelString_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, ppeSupercategoryLabelString_); + } + if (ppeEntityId_ != 0L) { + output.writeInt64(4, ppeEntityId_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (ppeLabelId_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(1, ppeLabelId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(ppeLabelString_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, ppeLabelString_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(ppeSupercategoryLabelString_)) { + size += + com.google.protobuf.GeneratedMessageV3.computeStringSize( + 3, ppeSupercategoryLabelString_); + } + if (ppeEntityId_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(4, ppeEntityId_); + } + size += getUnknownFields().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.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PPEEntity)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PPEEntity other = + (com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PPEEntity) obj; + + if (getPpeLabelId() != other.getPpeLabelId()) return false; + if (!getPpeLabelString().equals(other.getPpeLabelString())) return false; + if (!getPpeSupercategoryLabelString().equals(other.getPpeSupercategoryLabelString())) + return false; + if (getPpeEntityId() != other.getPpeEntityId()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PPE_LABEL_ID_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getPpeLabelId()); + hash = (37 * hash) + PPE_LABEL_STRING_FIELD_NUMBER; + hash = (53 * hash) + getPpeLabelString().hashCode(); + hash = (37 * hash) + PPE_SUPERCATEGORY_LABEL_STRING_FIELD_NUMBER; + hash = (53 * hash) + getPpeSupercategoryLabelString().hashCode(); + hash = (37 * hash) + PPE_ENTITY_ID_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getPpeEntityId()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PPEEntity + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PPEEntity + 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.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PPEEntity + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PPEEntity + 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.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PPEEntity + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PPEEntity + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PPEEntity + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PPEEntity + 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.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PPEEntity + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PPEEntity + 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.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PPEEntity + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PPEEntity + 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.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PPEEntity + 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 entity info for annotations from PPE detection prediction result.
+     * 
+ * + * Protobuf type {@code + * google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PPEEntity} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PPEEntity) + com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PPEEntityOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.AnnotationsProto + .internal_static_google_cloud_visionai_v1_PersonalProtectiveEquipmentDetectionOutput_PPEEntity_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.AnnotationsProto + .internal_static_google_cloud_visionai_v1_PersonalProtectiveEquipmentDetectionOutput_PPEEntity_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PPEEntity + .class, + com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PPEEntity + .Builder.class); + } + + // Construct using + // com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PPEEntity.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + ppeLabelId_ = 0L; + ppeLabelString_ = ""; + ppeSupercategoryLabelString_ = ""; + ppeEntityId_ = 0L; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.AnnotationsProto + .internal_static_google_cloud_visionai_v1_PersonalProtectiveEquipmentDetectionOutput_PPEEntity_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PPEEntity + getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PPEEntity + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PPEEntity + build() { + com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PPEEntity result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PPEEntity + buildPartial() { + com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PPEEntity result = + new com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PPEEntity( + this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PPEEntity + result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.ppeLabelId_ = ppeLabelId_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.ppeLabelString_ = ppeLabelString_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.ppeSupercategoryLabelString_ = ppeSupercategoryLabelString_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.ppeEntityId_ = ppeEntityId_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PPEEntity) { + return mergeFrom( + (com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PPEEntity) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PPEEntity other) { + if (other + == com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PPEEntity + .getDefaultInstance()) return this; + if (other.getPpeLabelId() != 0L) { + setPpeLabelId(other.getPpeLabelId()); + } + if (!other.getPpeLabelString().isEmpty()) { + ppeLabelString_ = other.ppeLabelString_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getPpeSupercategoryLabelString().isEmpty()) { + ppeSupercategoryLabelString_ = other.ppeSupercategoryLabelString_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (other.getPpeEntityId() != 0L) { + setPpeEntityId(other.getPpeEntityId()); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + ppeLabelId_ = input.readInt64(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 18: + { + ppeLabelString_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + ppeSupercategoryLabelString_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 32: + { + ppeEntityId_ = input.readInt64(); + bitField0_ |= 0x00000008; + break; + } // case 32 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private long ppeLabelId_; + /** + * + * + *
+       * Label id.
+       * 
+ * + * int64 ppe_label_id = 1; + * + * @return The ppeLabelId. + */ + @java.lang.Override + public long getPpeLabelId() { + return ppeLabelId_; + } + /** + * + * + *
+       * Label id.
+       * 
+ * + * int64 ppe_label_id = 1; + * + * @param value The ppeLabelId to set. + * @return This builder for chaining. + */ + public Builder setPpeLabelId(long value) { + + ppeLabelId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * Label id.
+       * 
+ * + * int64 ppe_label_id = 1; + * + * @return This builder for chaining. + */ + public Builder clearPpeLabelId() { + bitField0_ = (bitField0_ & ~0x00000001); + ppeLabelId_ = 0L; + onChanged(); + return this; + } + + private java.lang.Object ppeLabelString_ = ""; + /** + * + * + *
+       * Human readable string of the label (Examples: helmet, glove, mask).
+       * 
+ * + * string ppe_label_string = 2; + * + * @return The ppeLabelString. + */ + public java.lang.String getPpeLabelString() { + java.lang.Object ref = ppeLabelString_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + ppeLabelString_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * Human readable string of the label (Examples: helmet, glove, mask).
+       * 
+ * + * string ppe_label_string = 2; + * + * @return The bytes for ppeLabelString. + */ + public com.google.protobuf.ByteString getPpeLabelStringBytes() { + java.lang.Object ref = ppeLabelString_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + ppeLabelString_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * Human readable string of the label (Examples: helmet, glove, mask).
+       * 
+ * + * string ppe_label_string = 2; + * + * @param value The ppeLabelString to set. + * @return This builder for chaining. + */ + public Builder setPpeLabelString(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ppeLabelString_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * Human readable string of the label (Examples: helmet, glove, mask).
+       * 
+ * + * string ppe_label_string = 2; + * + * @return This builder for chaining. + */ + public Builder clearPpeLabelString() { + ppeLabelString_ = getDefaultInstance().getPpeLabelString(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+       * Human readable string of the label (Examples: helmet, glove, mask).
+       * 
+ * + * string ppe_label_string = 2; + * + * @param value The bytes for ppeLabelString to set. + * @return This builder for chaining. + */ + public Builder setPpeLabelStringBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ppeLabelString_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object ppeSupercategoryLabelString_ = ""; + /** + * + * + *
+       * Human readable string of the super category label (Examples: head_cover,
+       * hands_cover, face_cover).
+       * 
+ * + * string ppe_supercategory_label_string = 3; + * + * @return The ppeSupercategoryLabelString. + */ + public java.lang.String getPpeSupercategoryLabelString() { + java.lang.Object ref = ppeSupercategoryLabelString_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + ppeSupercategoryLabelString_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * Human readable string of the super category label (Examples: head_cover,
+       * hands_cover, face_cover).
+       * 
+ * + * string ppe_supercategory_label_string = 3; + * + * @return The bytes for ppeSupercategoryLabelString. + */ + public com.google.protobuf.ByteString getPpeSupercategoryLabelStringBytes() { + java.lang.Object ref = ppeSupercategoryLabelString_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + ppeSupercategoryLabelString_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * Human readable string of the super category label (Examples: head_cover,
+       * hands_cover, face_cover).
+       * 
+ * + * string ppe_supercategory_label_string = 3; + * + * @param value The ppeSupercategoryLabelString to set. + * @return This builder for chaining. + */ + public Builder setPpeSupercategoryLabelString(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ppeSupercategoryLabelString_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+       * Human readable string of the super category label (Examples: head_cover,
+       * hands_cover, face_cover).
+       * 
+ * + * string ppe_supercategory_label_string = 3; + * + * @return This builder for chaining. + */ + public Builder clearPpeSupercategoryLabelString() { + ppeSupercategoryLabelString_ = getDefaultInstance().getPpeSupercategoryLabelString(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+       * Human readable string of the super category label (Examples: head_cover,
+       * hands_cover, face_cover).
+       * 
+ * + * string ppe_supercategory_label_string = 3; + * + * @param value The bytes for ppeSupercategoryLabelString to set. + * @return This builder for chaining. + */ + public Builder setPpeSupercategoryLabelStringBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ppeSupercategoryLabelString_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private long ppeEntityId_; + /** + * + * + *
+       * Entity id.
+       * 
+ * + * int64 ppe_entity_id = 4; + * + * @return The ppeEntityId. + */ + @java.lang.Override + public long getPpeEntityId() { + return ppeEntityId_; + } + /** + * + * + *
+       * Entity id.
+       * 
+ * + * int64 ppe_entity_id = 4; + * + * @param value The ppeEntityId to set. + * @return This builder for chaining. + */ + public Builder setPpeEntityId(long value) { + + ppeEntityId_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+       * Entity id.
+       * 
+ * + * int64 ppe_entity_id = 4; + * + * @return This builder for chaining. + */ + public Builder clearPpeEntityId() { + bitField0_ = (bitField0_ & ~0x00000008); + ppeEntityId_ = 0L; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PPEEntity) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PPEEntity) + private static final com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .PPEEntity + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PPEEntity(); + } + + public static com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PPEEntity + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PPEEntity parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PPEEntity + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface NormalizedBoundingBoxOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.NormalizedBoundingBox) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Min in x coordinate.
+     * 
+ * + * float xmin = 1; + * + * @return The xmin. + */ + float getXmin(); + + /** + * + * + *
+     * Min in y coordinate.
+     * 
+ * + * float ymin = 2; + * + * @return The ymin. + */ + float getYmin(); + + /** + * + * + *
+     * Width of the bounding box.
+     * 
+ * + * float width = 3; + * + * @return The width. + */ + float getWidth(); + + /** + * + * + *
+     * Height of the bounding box.
+     * 
+ * + * float height = 4; + * + * @return The height. + */ + float getHeight(); + } + /** + * + * + *
+   * Bounding Box in the normalized coordinates.
+   * 
+ * + * Protobuf type {@code + * google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.NormalizedBoundingBox} + */ + public static final class NormalizedBoundingBox extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.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() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new NormalizedBoundingBox(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.AnnotationsProto + .internal_static_google_cloud_visionai_v1_PersonalProtectiveEquipmentDetectionOutput_NormalizedBoundingBox_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.AnnotationsProto + .internal_static_google_cloud_visionai_v1_PersonalProtectiveEquipmentDetectionOutput_NormalizedBoundingBox_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .NormalizedBoundingBox.class, + com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .NormalizedBoundingBox.Builder.class); + } + + public static final int XMIN_FIELD_NUMBER = 1; + private float xmin_ = 0F; + /** + * + * + *
+     * Min in x coordinate.
+     * 
+ * + * float xmin = 1; + * + * @return The xmin. + */ + @java.lang.Override + public float getXmin() { + return xmin_; + } + + public static final int YMIN_FIELD_NUMBER = 2; + private float ymin_ = 0F; + /** + * + * + *
+     * Min in y coordinate.
+     * 
+ * + * float ymin = 2; + * + * @return The ymin. + */ + @java.lang.Override + public float getYmin() { + return ymin_; + } + + public static final int WIDTH_FIELD_NUMBER = 3; + private float width_ = 0F; + /** + * + * + *
+     * Width of the bounding box.
+     * 
+ * + * float width = 3; + * + * @return The width. + */ + @java.lang.Override + public float getWidth() { + return width_; + } + + public static final int HEIGHT_FIELD_NUMBER = 4; + private float height_ = 0F; + /** + * + * + *
+     * Height of the bounding box.
+     * 
+ * + * float height = 4; + * + * @return The height. + */ + @java.lang.Override + public float getHeight() { + return height_; + } + + 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 (java.lang.Float.floatToRawIntBits(xmin_) != 0) { + output.writeFloat(1, xmin_); + } + if (java.lang.Float.floatToRawIntBits(ymin_) != 0) { + output.writeFloat(2, ymin_); + } + if (java.lang.Float.floatToRawIntBits(width_) != 0) { + output.writeFloat(3, width_); + } + if (java.lang.Float.floatToRawIntBits(height_) != 0) { + output.writeFloat(4, height_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (java.lang.Float.floatToRawIntBits(xmin_) != 0) { + size += com.google.protobuf.CodedOutputStream.computeFloatSize(1, xmin_); + } + if (java.lang.Float.floatToRawIntBits(ymin_) != 0) { + size += com.google.protobuf.CodedOutputStream.computeFloatSize(2, ymin_); + } + if (java.lang.Float.floatToRawIntBits(width_) != 0) { + size += com.google.protobuf.CodedOutputStream.computeFloatSize(3, width_); + } + if (java.lang.Float.floatToRawIntBits(height_) != 0) { + size += com.google.protobuf.CodedOutputStream.computeFloatSize(4, height_); + } + size += getUnknownFields().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.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .NormalizedBoundingBox)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.NormalizedBoundingBox + other = + (com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .NormalizedBoundingBox) + obj; + + if (java.lang.Float.floatToIntBits(getXmin()) + != java.lang.Float.floatToIntBits(other.getXmin())) return false; + if (java.lang.Float.floatToIntBits(getYmin()) + != java.lang.Float.floatToIntBits(other.getYmin())) return false; + if (java.lang.Float.floatToIntBits(getWidth()) + != java.lang.Float.floatToIntBits(other.getWidth())) return false; + if (java.lang.Float.floatToIntBits(getHeight()) + != java.lang.Float.floatToIntBits(other.getHeight())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + XMIN_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits(getXmin()); + hash = (37 * hash) + YMIN_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits(getYmin()); + hash = (37 * hash) + WIDTH_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits(getWidth()); + hash = (37 * hash) + HEIGHT_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits(getHeight()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .NormalizedBoundingBox + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .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.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .NormalizedBoundingBox + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .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.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .NormalizedBoundingBox + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .NormalizedBoundingBox + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .NormalizedBoundingBox + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .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.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .NormalizedBoundingBox + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .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.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .NormalizedBoundingBox + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .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.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .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; + } + /** + * + * + *
+     * Bounding Box in the normalized coordinates.
+     * 
+ * + * Protobuf type {@code + * google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.NormalizedBoundingBox} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.NormalizedBoundingBox) + com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .NormalizedBoundingBoxOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.AnnotationsProto + .internal_static_google_cloud_visionai_v1_PersonalProtectiveEquipmentDetectionOutput_NormalizedBoundingBox_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.AnnotationsProto + .internal_static_google_cloud_visionai_v1_PersonalProtectiveEquipmentDetectionOutput_NormalizedBoundingBox_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .NormalizedBoundingBox.class, + com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .NormalizedBoundingBox.Builder.class); + } + + // Construct using + // com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.NormalizedBoundingBox.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + xmin_ = 0F; + ymin_ = 0F; + width_ = 0F; + height_ = 0F; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.AnnotationsProto + .internal_static_google_cloud_visionai_v1_PersonalProtectiveEquipmentDetectionOutput_NormalizedBoundingBox_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .NormalizedBoundingBox + getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .NormalizedBoundingBox.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .NormalizedBoundingBox + build() { + com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .NormalizedBoundingBox + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .NormalizedBoundingBox + buildPartial() { + com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .NormalizedBoundingBox + result = + new com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .NormalizedBoundingBox(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .NormalizedBoundingBox + result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.xmin_ = xmin_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.ymin_ = ymin_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.width_ = width_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.height_ = height_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .NormalizedBoundingBox) { + return mergeFrom( + (com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .NormalizedBoundingBox) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .NormalizedBoundingBox + other) { + if (other + == com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .NormalizedBoundingBox.getDefaultInstance()) return this; + if (other.getXmin() != 0F) { + setXmin(other.getXmin()); + } + if (other.getYmin() != 0F) { + setYmin(other.getYmin()); + } + if (other.getWidth() != 0F) { + setWidth(other.getWidth()); + } + if (other.getHeight() != 0F) { + setHeight(other.getHeight()); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 13: + { + xmin_ = input.readFloat(); + bitField0_ |= 0x00000001; + break; + } // case 13 + case 21: + { + ymin_ = input.readFloat(); + bitField0_ |= 0x00000002; + break; + } // case 21 + case 29: + { + width_ = input.readFloat(); + bitField0_ |= 0x00000004; + break; + } // case 29 + case 37: + { + height_ = input.readFloat(); + bitField0_ |= 0x00000008; + break; + } // case 37 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private float xmin_; + /** + * + * + *
+       * Min in x coordinate.
+       * 
+ * + * float xmin = 1; + * + * @return The xmin. + */ + @java.lang.Override + public float getXmin() { + return xmin_; + } + /** + * + * + *
+       * Min in x coordinate.
+       * 
+ * + * float xmin = 1; + * + * @param value The xmin to set. + * @return This builder for chaining. + */ + public Builder setXmin(float value) { + + xmin_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * Min in x coordinate.
+       * 
+ * + * float xmin = 1; + * + * @return This builder for chaining. + */ + public Builder clearXmin() { + bitField0_ = (bitField0_ & ~0x00000001); + xmin_ = 0F; + onChanged(); + return this; + } + + private float ymin_; + /** + * + * + *
+       * Min in y coordinate.
+       * 
+ * + * float ymin = 2; + * + * @return The ymin. + */ + @java.lang.Override + public float getYmin() { + return ymin_; + } + /** + * + * + *
+       * Min in y coordinate.
+       * 
+ * + * float ymin = 2; + * + * @param value The ymin to set. + * @return This builder for chaining. + */ + public Builder setYmin(float value) { + + ymin_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * Min in y coordinate.
+       * 
+ * + * float ymin = 2; + * + * @return This builder for chaining. + */ + public Builder clearYmin() { + bitField0_ = (bitField0_ & ~0x00000002); + ymin_ = 0F; + onChanged(); + return this; + } + + private float width_; + /** + * + * + *
+       * Width of the bounding box.
+       * 
+ * + * float width = 3; + * + * @return The width. + */ + @java.lang.Override + public float getWidth() { + return width_; + } + /** + * + * + *
+       * Width of the bounding box.
+       * 
+ * + * float width = 3; + * + * @param value The width to set. + * @return This builder for chaining. + */ + public Builder setWidth(float value) { + + width_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+       * Width of the bounding box.
+       * 
+ * + * float width = 3; + * + * @return This builder for chaining. + */ + public Builder clearWidth() { + bitField0_ = (bitField0_ & ~0x00000004); + width_ = 0F; + onChanged(); + return this; + } + + private float height_; + /** + * + * + *
+       * Height of the bounding box.
+       * 
+ * + * float height = 4; + * + * @return The height. + */ + @java.lang.Override + public float getHeight() { + return height_; + } + /** + * + * + *
+       * Height of the bounding box.
+       * 
+ * + * float height = 4; + * + * @param value The height to set. + * @return This builder for chaining. + */ + public Builder setHeight(float value) { + + height_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+       * Height of the bounding box.
+       * 
+ * + * float height = 4; + * + * @return This builder for chaining. + */ + public Builder clearHeight() { + bitField0_ = (bitField0_ & ~0x00000008); + height_ = 0F; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.NormalizedBoundingBox) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.NormalizedBoundingBox) + private static final com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .NormalizedBoundingBox + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .NormalizedBoundingBox(); + } + + public static com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .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 { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .NormalizedBoundingBox + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface PersonIdentifiedBoxOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PersonIdentifiedBox) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * An unique id for this box.
+     * 
+ * + * int64 box_id = 1; + * + * @return The boxId. + */ + long getBoxId(); + + /** + * + * + *
+     * Bounding Box in the normalized coordinates.
+     * 
+ * + * + * .google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.NormalizedBoundingBox normalized_bounding_box = 2; + * + * + * @return Whether the normalizedBoundingBox field is set. + */ + boolean hasNormalizedBoundingBox(); + /** + * + * + *
+     * Bounding Box in the normalized coordinates.
+     * 
+ * + * + * .google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.NormalizedBoundingBox normalized_bounding_box = 2; + * + * + * @return The normalizedBoundingBox. + */ + com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.NormalizedBoundingBox + getNormalizedBoundingBox(); + /** + * + * + *
+     * Bounding Box in the normalized coordinates.
+     * 
+ * + * + * .google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.NormalizedBoundingBox normalized_bounding_box = 2; + * + */ + com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .NormalizedBoundingBoxOrBuilder + getNormalizedBoundingBoxOrBuilder(); + + /** + * + * + *
+     * Confidence score associated with this box.
+     * 
+ * + * float confidence_score = 3; + * + * @return The confidenceScore. + */ + float getConfidenceScore(); + + /** + * + * + *
+     * Person entity info.
+     * 
+ * + * + * .google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PersonEntity person_entity = 4; + * + * + * @return Whether the personEntity field is set. + */ + boolean hasPersonEntity(); + /** + * + * + *
+     * Person entity info.
+     * 
+ * + * + * .google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PersonEntity person_entity = 4; + * + * + * @return The personEntity. + */ + com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PersonEntity + getPersonEntity(); + /** + * + * + *
+     * Person entity info.
+     * 
+ * + * + * .google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PersonEntity person_entity = 4; + * + */ + com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PersonEntityOrBuilder + getPersonEntityOrBuilder(); + } + /** + * + * + *
+   * PersonIdentified box contains the location and the entity info of the
+   * person.
+   * 
+ * + * Protobuf type {@code + * google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PersonIdentifiedBox} + */ + public static final class PersonIdentifiedBox extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PersonIdentifiedBox) + PersonIdentifiedBoxOrBuilder { + private static final long serialVersionUID = 0L; + // Use PersonIdentifiedBox.newBuilder() to construct. + private PersonIdentifiedBox(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private PersonIdentifiedBox() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new PersonIdentifiedBox(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.AnnotationsProto + .internal_static_google_cloud_visionai_v1_PersonalProtectiveEquipmentDetectionOutput_PersonIdentifiedBox_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.AnnotationsProto + .internal_static_google_cloud_visionai_v1_PersonalProtectiveEquipmentDetectionOutput_PersonIdentifiedBox_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .PersonIdentifiedBox.class, + com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .PersonIdentifiedBox.Builder.class); + } + + private int bitField0_; + public static final int BOX_ID_FIELD_NUMBER = 1; + private long boxId_ = 0L; + /** + * + * + *
+     * An unique id for this box.
+     * 
+ * + * int64 box_id = 1; + * + * @return The boxId. + */ + @java.lang.Override + public long getBoxId() { + return boxId_; + } + + public static final int NORMALIZED_BOUNDING_BOX_FIELD_NUMBER = 2; + private com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .NormalizedBoundingBox + normalizedBoundingBox_; + /** + * + * + *
+     * Bounding Box in the normalized coordinates.
+     * 
+ * + * + * .google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.NormalizedBoundingBox normalized_bounding_box = 2; + * + * + * @return Whether the normalizedBoundingBox field is set. + */ + @java.lang.Override + public boolean hasNormalizedBoundingBox() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * Bounding Box in the normalized coordinates.
+     * 
+ * + * + * .google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.NormalizedBoundingBox normalized_bounding_box = 2; + * + * + * @return The normalizedBoundingBox. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .NormalizedBoundingBox + getNormalizedBoundingBox() { + return normalizedBoundingBox_ == null + ? com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .NormalizedBoundingBox.getDefaultInstance() + : normalizedBoundingBox_; + } + /** + * + * + *
+     * Bounding Box in the normalized coordinates.
+     * 
+ * + * + * .google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.NormalizedBoundingBox normalized_bounding_box = 2; + * + */ + @java.lang.Override + public com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .NormalizedBoundingBoxOrBuilder + getNormalizedBoundingBoxOrBuilder() { + return normalizedBoundingBox_ == null + ? com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .NormalizedBoundingBox.getDefaultInstance() + : normalizedBoundingBox_; + } + + public static final int CONFIDENCE_SCORE_FIELD_NUMBER = 3; + private float confidenceScore_ = 0F; + /** + * + * + *
+     * Confidence score associated with this box.
+     * 
+ * + * float confidence_score = 3; + * + * @return The confidenceScore. + */ + @java.lang.Override + public float getConfidenceScore() { + return confidenceScore_; + } + + public static final int PERSON_ENTITY_FIELD_NUMBER = 4; + private com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PersonEntity + personEntity_; + /** + * + * + *
+     * Person entity info.
+     * 
+ * + * + * .google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PersonEntity person_entity = 4; + * + * + * @return Whether the personEntity field is set. + */ + @java.lang.Override + public boolean hasPersonEntity() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * Person entity info.
+     * 
+ * + * + * .google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PersonEntity person_entity = 4; + * + * + * @return The personEntity. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PersonEntity + getPersonEntity() { + return personEntity_ == null + ? com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PersonEntity + .getDefaultInstance() + : personEntity_; + } + /** + * + * + *
+     * Person entity info.
+     * 
+ * + * + * .google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PersonEntity person_entity = 4; + * + */ + @java.lang.Override + public com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .PersonEntityOrBuilder + getPersonEntityOrBuilder() { + return personEntity_ == null + ? com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PersonEntity + .getDefaultInstance() + : personEntity_; + } + + 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 (boxId_ != 0L) { + output.writeInt64(1, boxId_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getNormalizedBoundingBox()); + } + if (java.lang.Float.floatToRawIntBits(confidenceScore_) != 0) { + output.writeFloat(3, confidenceScore_); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(4, getPersonEntity()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (boxId_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(1, boxId_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(2, getNormalizedBoundingBox()); + } + if (java.lang.Float.floatToRawIntBits(confidenceScore_) != 0) { + size += com.google.protobuf.CodedOutputStream.computeFloatSize(3, confidenceScore_); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getPersonEntity()); + } + size += getUnknownFields().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.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .PersonIdentifiedBox)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PersonIdentifiedBox + other = + (com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .PersonIdentifiedBox) + obj; + + if (getBoxId() != other.getBoxId()) return false; + if (hasNormalizedBoundingBox() != other.hasNormalizedBoundingBox()) return false; + if (hasNormalizedBoundingBox()) { + if (!getNormalizedBoundingBox().equals(other.getNormalizedBoundingBox())) return false; + } + if (java.lang.Float.floatToIntBits(getConfidenceScore()) + != java.lang.Float.floatToIntBits(other.getConfidenceScore())) return false; + if (hasPersonEntity() != other.hasPersonEntity()) return false; + if (hasPersonEntity()) { + if (!getPersonEntity().equals(other.getPersonEntity())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + BOX_ID_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getBoxId()); + if (hasNormalizedBoundingBox()) { + hash = (37 * hash) + NORMALIZED_BOUNDING_BOX_FIELD_NUMBER; + hash = (53 * hash) + getNormalizedBoundingBox().hashCode(); + } + hash = (37 * hash) + CONFIDENCE_SCORE_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits(getConfidenceScore()); + if (hasPersonEntity()) { + hash = (37 * hash) + PERSON_ENTITY_FIELD_NUMBER; + hash = (53 * hash) + getPersonEntity().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .PersonIdentifiedBox + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .PersonIdentifiedBox + 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.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .PersonIdentifiedBox + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .PersonIdentifiedBox + 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.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .PersonIdentifiedBox + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .PersonIdentifiedBox + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .PersonIdentifiedBox + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .PersonIdentifiedBox + 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.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .PersonIdentifiedBox + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .PersonIdentifiedBox + 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.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .PersonIdentifiedBox + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .PersonIdentifiedBox + 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.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PersonIdentifiedBox + 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; + } + /** + * + * + *
+     * PersonIdentified box contains the location and the entity info of the
+     * person.
+     * 
+ * + * Protobuf type {@code + * google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PersonIdentifiedBox} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PersonIdentifiedBox) + com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .PersonIdentifiedBoxOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.AnnotationsProto + .internal_static_google_cloud_visionai_v1_PersonalProtectiveEquipmentDetectionOutput_PersonIdentifiedBox_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.AnnotationsProto + .internal_static_google_cloud_visionai_v1_PersonalProtectiveEquipmentDetectionOutput_PersonIdentifiedBox_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .PersonIdentifiedBox.class, + com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .PersonIdentifiedBox.Builder.class); + } + + // Construct using + // com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PersonIdentifiedBox.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getNormalizedBoundingBoxFieldBuilder(); + getPersonEntityFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + boxId_ = 0L; + normalizedBoundingBox_ = null; + if (normalizedBoundingBoxBuilder_ != null) { + normalizedBoundingBoxBuilder_.dispose(); + normalizedBoundingBoxBuilder_ = null; + } + confidenceScore_ = 0F; + personEntity_ = null; + if (personEntityBuilder_ != null) { + personEntityBuilder_.dispose(); + personEntityBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.AnnotationsProto + .internal_static_google_cloud_visionai_v1_PersonalProtectiveEquipmentDetectionOutput_PersonIdentifiedBox_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .PersonIdentifiedBox + getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .PersonIdentifiedBox.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .PersonIdentifiedBox + build() { + com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PersonIdentifiedBox + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .PersonIdentifiedBox + buildPartial() { + com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PersonIdentifiedBox + result = + new com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .PersonIdentifiedBox(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .PersonIdentifiedBox + result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.boxId_ = boxId_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.normalizedBoundingBox_ = + normalizedBoundingBoxBuilder_ == null + ? normalizedBoundingBox_ + : normalizedBoundingBoxBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.confidenceScore_ = confidenceScore_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.personEntity_ = + personEntityBuilder_ == null ? personEntity_ : personEntityBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .PersonIdentifiedBox) { + return mergeFrom( + (com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .PersonIdentifiedBox) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .PersonIdentifiedBox + other) { + if (other + == com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .PersonIdentifiedBox.getDefaultInstance()) return this; + if (other.getBoxId() != 0L) { + setBoxId(other.getBoxId()); + } + if (other.hasNormalizedBoundingBox()) { + mergeNormalizedBoundingBox(other.getNormalizedBoundingBox()); + } + if (other.getConfidenceScore() != 0F) { + setConfidenceScore(other.getConfidenceScore()); + } + if (other.hasPersonEntity()) { + mergePersonEntity(other.getPersonEntity()); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + boxId_ = input.readInt64(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 18: + { + input.readMessage( + getNormalizedBoundingBoxFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 29: + { + confidenceScore_ = input.readFloat(); + bitField0_ |= 0x00000004; + break; + } // case 29 + case 34: + { + input.readMessage(getPersonEntityFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 34 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private long boxId_; + /** + * + * + *
+       * An unique id for this box.
+       * 
+ * + * int64 box_id = 1; + * + * @return The boxId. + */ + @java.lang.Override + public long getBoxId() { + return boxId_; + } + /** + * + * + *
+       * An unique id for this box.
+       * 
+ * + * int64 box_id = 1; + * + * @param value The boxId to set. + * @return This builder for chaining. + */ + public Builder setBoxId(long value) { + + boxId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * An unique id for this box.
+       * 
+ * + * int64 box_id = 1; + * + * @return This builder for chaining. + */ + public Builder clearBoxId() { + bitField0_ = (bitField0_ & ~0x00000001); + boxId_ = 0L; + onChanged(); + return this; + } + + private com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .NormalizedBoundingBox + normalizedBoundingBox_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .NormalizedBoundingBox, + com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .NormalizedBoundingBox.Builder, + com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .NormalizedBoundingBoxOrBuilder> + normalizedBoundingBoxBuilder_; + /** + * + * + *
+       * Bounding Box in the normalized coordinates.
+       * 
+ * + * + * .google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.NormalizedBoundingBox normalized_bounding_box = 2; + * + * + * @return Whether the normalizedBoundingBox field is set. + */ + public boolean hasNormalizedBoundingBox() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+       * Bounding Box in the normalized coordinates.
+       * 
+ * + * + * .google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.NormalizedBoundingBox normalized_bounding_box = 2; + * + * + * @return The normalizedBoundingBox. + */ + public com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .NormalizedBoundingBox + getNormalizedBoundingBox() { + if (normalizedBoundingBoxBuilder_ == null) { + return normalizedBoundingBox_ == null + ? com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .NormalizedBoundingBox.getDefaultInstance() + : normalizedBoundingBox_; + } else { + return normalizedBoundingBoxBuilder_.getMessage(); + } + } + /** + * + * + *
+       * Bounding Box in the normalized coordinates.
+       * 
+ * + * + * .google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.NormalizedBoundingBox normalized_bounding_box = 2; + * + */ + public Builder setNormalizedBoundingBox( + com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .NormalizedBoundingBox + value) { + if (normalizedBoundingBoxBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + normalizedBoundingBox_ = value; + } else { + normalizedBoundingBoxBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * Bounding Box in the normalized coordinates.
+       * 
+ * + * + * .google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.NormalizedBoundingBox normalized_bounding_box = 2; + * + */ + public Builder setNormalizedBoundingBox( + com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .NormalizedBoundingBox.Builder + builderForValue) { + if (normalizedBoundingBoxBuilder_ == null) { + normalizedBoundingBox_ = builderForValue.build(); + } else { + normalizedBoundingBoxBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * Bounding Box in the normalized coordinates.
+       * 
+ * + * + * .google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.NormalizedBoundingBox normalized_bounding_box = 2; + * + */ + public Builder mergeNormalizedBoundingBox( + com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .NormalizedBoundingBox + value) { + if (normalizedBoundingBoxBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && normalizedBoundingBox_ != null + && normalizedBoundingBox_ + != com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .NormalizedBoundingBox.getDefaultInstance()) { + getNormalizedBoundingBoxBuilder().mergeFrom(value); + } else { + normalizedBoundingBox_ = value; + } + } else { + normalizedBoundingBoxBuilder_.mergeFrom(value); + } + if (normalizedBoundingBox_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + /** + * + * + *
+       * Bounding Box in the normalized coordinates.
+       * 
+ * + * + * .google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.NormalizedBoundingBox normalized_bounding_box = 2; + * + */ + public Builder clearNormalizedBoundingBox() { + bitField0_ = (bitField0_ & ~0x00000002); + normalizedBoundingBox_ = null; + if (normalizedBoundingBoxBuilder_ != null) { + normalizedBoundingBoxBuilder_.dispose(); + normalizedBoundingBoxBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+       * Bounding Box in the normalized coordinates.
+       * 
+ * + * + * .google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.NormalizedBoundingBox normalized_bounding_box = 2; + * + */ + public com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .NormalizedBoundingBox.Builder + getNormalizedBoundingBoxBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getNormalizedBoundingBoxFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Bounding Box in the normalized coordinates.
+       * 
+ * + * + * .google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.NormalizedBoundingBox normalized_bounding_box = 2; + * + */ + public com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .NormalizedBoundingBoxOrBuilder + getNormalizedBoundingBoxOrBuilder() { + if (normalizedBoundingBoxBuilder_ != null) { + return normalizedBoundingBoxBuilder_.getMessageOrBuilder(); + } else { + return normalizedBoundingBox_ == null + ? com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .NormalizedBoundingBox.getDefaultInstance() + : normalizedBoundingBox_; + } + } + /** + * + * + *
+       * Bounding Box in the normalized coordinates.
+       * 
+ * + * + * .google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.NormalizedBoundingBox normalized_bounding_box = 2; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .NormalizedBoundingBox, + com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .NormalizedBoundingBox.Builder, + com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .NormalizedBoundingBoxOrBuilder> + getNormalizedBoundingBoxFieldBuilder() { + if (normalizedBoundingBoxBuilder_ == null) { + normalizedBoundingBoxBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .NormalizedBoundingBox, + com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .NormalizedBoundingBox.Builder, + com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .NormalizedBoundingBoxOrBuilder>( + getNormalizedBoundingBox(), getParentForChildren(), isClean()); + normalizedBoundingBox_ = null; + } + return normalizedBoundingBoxBuilder_; + } + + private float confidenceScore_; + /** + * + * + *
+       * Confidence score associated with this box.
+       * 
+ * + * float confidence_score = 3; + * + * @return The confidenceScore. + */ + @java.lang.Override + public float getConfidenceScore() { + return confidenceScore_; + } + /** + * + * + *
+       * Confidence score associated with this box.
+       * 
+ * + * float confidence_score = 3; + * + * @param value The confidenceScore to set. + * @return This builder for chaining. + */ + public Builder setConfidenceScore(float value) { + + confidenceScore_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+       * Confidence score associated with this box.
+       * 
+ * + * float confidence_score = 3; + * + * @return This builder for chaining. + */ + public Builder clearConfidenceScore() { + bitField0_ = (bitField0_ & ~0x00000004); + confidenceScore_ = 0F; + onChanged(); + return this; + } + + private com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PersonEntity + personEntity_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PersonEntity, + com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PersonEntity + .Builder, + com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .PersonEntityOrBuilder> + personEntityBuilder_; + /** + * + * + *
+       * Person entity info.
+       * 
+ * + * + * .google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PersonEntity person_entity = 4; + * + * + * @return Whether the personEntity field is set. + */ + public boolean hasPersonEntity() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + * + * + *
+       * Person entity info.
+       * 
+ * + * + * .google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PersonEntity person_entity = 4; + * + * + * @return The personEntity. + */ + public com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PersonEntity + getPersonEntity() { + if (personEntityBuilder_ == null) { + return personEntity_ == null + ? com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PersonEntity + .getDefaultInstance() + : personEntity_; + } else { + return personEntityBuilder_.getMessage(); + } + } + /** + * + * + *
+       * Person entity info.
+       * 
+ * + * + * .google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PersonEntity person_entity = 4; + * + */ + public Builder setPersonEntity( + com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PersonEntity + value) { + if (personEntityBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + personEntity_ = value; + } else { + personEntityBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+       * Person entity info.
+       * 
+ * + * + * .google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PersonEntity person_entity = 4; + * + */ + public Builder setPersonEntity( + com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PersonEntity + .Builder + builderForValue) { + if (personEntityBuilder_ == null) { + personEntity_ = builderForValue.build(); + } else { + personEntityBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+       * Person entity info.
+       * 
+ * + * + * .google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PersonEntity person_entity = 4; + * + */ + public Builder mergePersonEntity( + com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PersonEntity + value) { + if (personEntityBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) + && personEntity_ != null + && personEntity_ + != com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .PersonEntity.getDefaultInstance()) { + getPersonEntityBuilder().mergeFrom(value); + } else { + personEntity_ = value; + } + } else { + personEntityBuilder_.mergeFrom(value); + } + if (personEntity_ != null) { + bitField0_ |= 0x00000008; + onChanged(); + } + return this; + } + /** + * + * + *
+       * Person entity info.
+       * 
+ * + * + * .google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PersonEntity person_entity = 4; + * + */ + public Builder clearPersonEntity() { + bitField0_ = (bitField0_ & ~0x00000008); + personEntity_ = null; + if (personEntityBuilder_ != null) { + personEntityBuilder_.dispose(); + personEntityBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+       * Person entity info.
+       * 
+ * + * + * .google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PersonEntity person_entity = 4; + * + */ + public com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PersonEntity + .Builder + getPersonEntityBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return getPersonEntityFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Person entity info.
+       * 
+ * + * + * .google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PersonEntity person_entity = 4; + * + */ + public com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .PersonEntityOrBuilder + getPersonEntityOrBuilder() { + if (personEntityBuilder_ != null) { + return personEntityBuilder_.getMessageOrBuilder(); + } else { + return personEntity_ == null + ? com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PersonEntity + .getDefaultInstance() + : personEntity_; + } + } + /** + * + * + *
+       * Person entity info.
+       * 
+ * + * + * .google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PersonEntity person_entity = 4; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PersonEntity, + com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PersonEntity + .Builder, + com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .PersonEntityOrBuilder> + getPersonEntityFieldBuilder() { + if (personEntityBuilder_ == null) { + personEntityBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .PersonEntity, + com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .PersonEntity.Builder, + com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .PersonEntityOrBuilder>(getPersonEntity(), getParentForChildren(), isClean()); + personEntity_ = null; + } + return personEntityBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PersonIdentifiedBox) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PersonIdentifiedBox) + private static final com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .PersonIdentifiedBox + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .PersonIdentifiedBox(); + } + + public static com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .PersonIdentifiedBox + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PersonIdentifiedBox parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .PersonIdentifiedBox + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface PPEIdentifiedBoxOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PPEIdentifiedBox) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * An unique id for this box.
+     * 
+ * + * int64 box_id = 1; + * + * @return The boxId. + */ + long getBoxId(); + + /** + * + * + *
+     * Bounding Box in the normalized coordinates.
+     * 
+ * + * + * .google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.NormalizedBoundingBox normalized_bounding_box = 2; + * + * + * @return Whether the normalizedBoundingBox field is set. + */ + boolean hasNormalizedBoundingBox(); + /** + * + * + *
+     * Bounding Box in the normalized coordinates.
+     * 
+ * + * + * .google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.NormalizedBoundingBox normalized_bounding_box = 2; + * + * + * @return The normalizedBoundingBox. + */ + com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.NormalizedBoundingBox + getNormalizedBoundingBox(); + /** + * + * + *
+     * Bounding Box in the normalized coordinates.
+     * 
+ * + * + * .google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.NormalizedBoundingBox normalized_bounding_box = 2; + * + */ + com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .NormalizedBoundingBoxOrBuilder + getNormalizedBoundingBoxOrBuilder(); + + /** + * + * + *
+     * Confidence score associated with this box.
+     * 
+ * + * float confidence_score = 3; + * + * @return The confidenceScore. + */ + float getConfidenceScore(); + + /** + * + * + *
+     * PPE entity info.
+     * 
+ * + * + * .google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PPEEntity ppe_entity = 4; + * + * + * @return Whether the ppeEntity field is set. + */ + boolean hasPpeEntity(); + /** + * + * + *
+     * PPE entity info.
+     * 
+ * + * + * .google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PPEEntity ppe_entity = 4; + * + * + * @return The ppeEntity. + */ + com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PPEEntity + getPpeEntity(); + /** + * + * + *
+     * PPE entity info.
+     * 
+ * + * + * .google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PPEEntity ppe_entity = 4; + * + */ + com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PPEEntityOrBuilder + getPpeEntityOrBuilder(); + } + /** + * + * + *
+   * PPEIdentified box contains the location and the entity info of the PPE.
+   * 
+ * + * Protobuf type {@code + * google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PPEIdentifiedBox} + */ + public static final class PPEIdentifiedBox extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PPEIdentifiedBox) + PPEIdentifiedBoxOrBuilder { + private static final long serialVersionUID = 0L; + // Use PPEIdentifiedBox.newBuilder() to construct. + private PPEIdentifiedBox(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private PPEIdentifiedBox() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new PPEIdentifiedBox(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.AnnotationsProto + .internal_static_google_cloud_visionai_v1_PersonalProtectiveEquipmentDetectionOutput_PPEIdentifiedBox_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.AnnotationsProto + .internal_static_google_cloud_visionai_v1_PersonalProtectiveEquipmentDetectionOutput_PPEIdentifiedBox_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .PPEIdentifiedBox.class, + com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .PPEIdentifiedBox.Builder.class); + } + + private int bitField0_; + public static final int BOX_ID_FIELD_NUMBER = 1; + private long boxId_ = 0L; + /** + * + * + *
+     * An unique id for this box.
+     * 
+ * + * int64 box_id = 1; + * + * @return The boxId. + */ + @java.lang.Override + public long getBoxId() { + return boxId_; + } + + public static final int NORMALIZED_BOUNDING_BOX_FIELD_NUMBER = 2; + private com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .NormalizedBoundingBox + normalizedBoundingBox_; + /** + * + * + *
+     * Bounding Box in the normalized coordinates.
+     * 
+ * + * + * .google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.NormalizedBoundingBox normalized_bounding_box = 2; + * + * + * @return Whether the normalizedBoundingBox field is set. + */ + @java.lang.Override + public boolean hasNormalizedBoundingBox() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * Bounding Box in the normalized coordinates.
+     * 
+ * + * + * .google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.NormalizedBoundingBox normalized_bounding_box = 2; + * + * + * @return The normalizedBoundingBox. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .NormalizedBoundingBox + getNormalizedBoundingBox() { + return normalizedBoundingBox_ == null + ? com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .NormalizedBoundingBox.getDefaultInstance() + : normalizedBoundingBox_; + } + /** + * + * + *
+     * Bounding Box in the normalized coordinates.
+     * 
+ * + * + * .google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.NormalizedBoundingBox normalized_bounding_box = 2; + * + */ + @java.lang.Override + public com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .NormalizedBoundingBoxOrBuilder + getNormalizedBoundingBoxOrBuilder() { + return normalizedBoundingBox_ == null + ? com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .NormalizedBoundingBox.getDefaultInstance() + : normalizedBoundingBox_; + } + + public static final int CONFIDENCE_SCORE_FIELD_NUMBER = 3; + private float confidenceScore_ = 0F; + /** + * + * + *
+     * Confidence score associated with this box.
+     * 
+ * + * float confidence_score = 3; + * + * @return The confidenceScore. + */ + @java.lang.Override + public float getConfidenceScore() { + return confidenceScore_; + } + + public static final int PPE_ENTITY_FIELD_NUMBER = 4; + private com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PPEEntity + ppeEntity_; + /** + * + * + *
+     * PPE entity info.
+     * 
+ * + * + * .google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PPEEntity ppe_entity = 4; + * + * + * @return Whether the ppeEntity field is set. + */ + @java.lang.Override + public boolean hasPpeEntity() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * PPE entity info.
+     * 
+ * + * + * .google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PPEEntity ppe_entity = 4; + * + * + * @return The ppeEntity. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PPEEntity + getPpeEntity() { + return ppeEntity_ == null + ? com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PPEEntity + .getDefaultInstance() + : ppeEntity_; + } + /** + * + * + *
+     * PPE entity info.
+     * 
+ * + * + * .google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PPEEntity ppe_entity = 4; + * + */ + @java.lang.Override + public com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .PPEEntityOrBuilder + getPpeEntityOrBuilder() { + return ppeEntity_ == null + ? com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PPEEntity + .getDefaultInstance() + : ppeEntity_; + } + + 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 (boxId_ != 0L) { + output.writeInt64(1, boxId_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getNormalizedBoundingBox()); + } + if (java.lang.Float.floatToRawIntBits(confidenceScore_) != 0) { + output.writeFloat(3, confidenceScore_); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(4, getPpeEntity()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (boxId_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(1, boxId_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(2, getNormalizedBoundingBox()); + } + if (java.lang.Float.floatToRawIntBits(confidenceScore_) != 0) { + size += com.google.protobuf.CodedOutputStream.computeFloatSize(3, confidenceScore_); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getPpeEntity()); + } + size += getUnknownFields().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.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .PPEIdentifiedBox)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PPEIdentifiedBox + other = + (com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .PPEIdentifiedBox) + obj; + + if (getBoxId() != other.getBoxId()) return false; + if (hasNormalizedBoundingBox() != other.hasNormalizedBoundingBox()) return false; + if (hasNormalizedBoundingBox()) { + if (!getNormalizedBoundingBox().equals(other.getNormalizedBoundingBox())) return false; + } + if (java.lang.Float.floatToIntBits(getConfidenceScore()) + != java.lang.Float.floatToIntBits(other.getConfidenceScore())) return false; + if (hasPpeEntity() != other.hasPpeEntity()) return false; + if (hasPpeEntity()) { + if (!getPpeEntity().equals(other.getPpeEntity())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + BOX_ID_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getBoxId()); + if (hasNormalizedBoundingBox()) { + hash = (37 * hash) + NORMALIZED_BOUNDING_BOX_FIELD_NUMBER; + hash = (53 * hash) + getNormalizedBoundingBox().hashCode(); + } + hash = (37 * hash) + CONFIDENCE_SCORE_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits(getConfidenceScore()); + if (hasPpeEntity()) { + hash = (37 * hash) + PPE_ENTITY_FIELD_NUMBER; + hash = (53 * hash) + getPpeEntity().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .PPEIdentifiedBox + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .PPEIdentifiedBox + 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.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .PPEIdentifiedBox + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .PPEIdentifiedBox + 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.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .PPEIdentifiedBox + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .PPEIdentifiedBox + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .PPEIdentifiedBox + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .PPEIdentifiedBox + 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.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .PPEIdentifiedBox + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .PPEIdentifiedBox + 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.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .PPEIdentifiedBox + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .PPEIdentifiedBox + 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.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PPEIdentifiedBox + 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; + } + /** + * + * + *
+     * PPEIdentified box contains the location and the entity info of the PPE.
+     * 
+ * + * Protobuf type {@code + * google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PPEIdentifiedBox} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PPEIdentifiedBox) + com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .PPEIdentifiedBoxOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.AnnotationsProto + .internal_static_google_cloud_visionai_v1_PersonalProtectiveEquipmentDetectionOutput_PPEIdentifiedBox_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.AnnotationsProto + .internal_static_google_cloud_visionai_v1_PersonalProtectiveEquipmentDetectionOutput_PPEIdentifiedBox_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .PPEIdentifiedBox.class, + com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .PPEIdentifiedBox.Builder.class); + } + + // Construct using + // com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PPEIdentifiedBox.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getNormalizedBoundingBoxFieldBuilder(); + getPpeEntityFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + boxId_ = 0L; + normalizedBoundingBox_ = null; + if (normalizedBoundingBoxBuilder_ != null) { + normalizedBoundingBoxBuilder_.dispose(); + normalizedBoundingBoxBuilder_ = null; + } + confidenceScore_ = 0F; + ppeEntity_ = null; + if (ppeEntityBuilder_ != null) { + ppeEntityBuilder_.dispose(); + ppeEntityBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.AnnotationsProto + .internal_static_google_cloud_visionai_v1_PersonalProtectiveEquipmentDetectionOutput_PPEIdentifiedBox_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .PPEIdentifiedBox + getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .PPEIdentifiedBox.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .PPEIdentifiedBox + build() { + com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PPEIdentifiedBox + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .PPEIdentifiedBox + buildPartial() { + com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PPEIdentifiedBox + result = + new com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .PPEIdentifiedBox(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PPEIdentifiedBox + result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.boxId_ = boxId_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.normalizedBoundingBox_ = + normalizedBoundingBoxBuilder_ == null + ? normalizedBoundingBox_ + : normalizedBoundingBoxBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.confidenceScore_ = confidenceScore_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.ppeEntity_ = ppeEntityBuilder_ == null ? ppeEntity_ : ppeEntityBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .PPEIdentifiedBox) { + return mergeFrom( + (com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .PPEIdentifiedBox) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PPEIdentifiedBox + other) { + if (other + == com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .PPEIdentifiedBox.getDefaultInstance()) return this; + if (other.getBoxId() != 0L) { + setBoxId(other.getBoxId()); + } + if (other.hasNormalizedBoundingBox()) { + mergeNormalizedBoundingBox(other.getNormalizedBoundingBox()); + } + if (other.getConfidenceScore() != 0F) { + setConfidenceScore(other.getConfidenceScore()); + } + if (other.hasPpeEntity()) { + mergePpeEntity(other.getPpeEntity()); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + boxId_ = input.readInt64(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 18: + { + input.readMessage( + getNormalizedBoundingBoxFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 29: + { + confidenceScore_ = input.readFloat(); + bitField0_ |= 0x00000004; + break; + } // case 29 + case 34: + { + input.readMessage(getPpeEntityFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 34 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private long boxId_; + /** + * + * + *
+       * An unique id for this box.
+       * 
+ * + * int64 box_id = 1; + * + * @return The boxId. + */ + @java.lang.Override + public long getBoxId() { + return boxId_; + } + /** + * + * + *
+       * An unique id for this box.
+       * 
+ * + * int64 box_id = 1; + * + * @param value The boxId to set. + * @return This builder for chaining. + */ + public Builder setBoxId(long value) { + + boxId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * An unique id for this box.
+       * 
+ * + * int64 box_id = 1; + * + * @return This builder for chaining. + */ + public Builder clearBoxId() { + bitField0_ = (bitField0_ & ~0x00000001); + boxId_ = 0L; + onChanged(); + return this; + } + + private com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .NormalizedBoundingBox + normalizedBoundingBox_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .NormalizedBoundingBox, + com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .NormalizedBoundingBox.Builder, + com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .NormalizedBoundingBoxOrBuilder> + normalizedBoundingBoxBuilder_; + /** + * + * + *
+       * Bounding Box in the normalized coordinates.
+       * 
+ * + * + * .google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.NormalizedBoundingBox normalized_bounding_box = 2; + * + * + * @return Whether the normalizedBoundingBox field is set. + */ + public boolean hasNormalizedBoundingBox() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+       * Bounding Box in the normalized coordinates.
+       * 
+ * + * + * .google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.NormalizedBoundingBox normalized_bounding_box = 2; + * + * + * @return The normalizedBoundingBox. + */ + public com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .NormalizedBoundingBox + getNormalizedBoundingBox() { + if (normalizedBoundingBoxBuilder_ == null) { + return normalizedBoundingBox_ == null + ? com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .NormalizedBoundingBox.getDefaultInstance() + : normalizedBoundingBox_; + } else { + return normalizedBoundingBoxBuilder_.getMessage(); + } + } + /** + * + * + *
+       * Bounding Box in the normalized coordinates.
+       * 
+ * + * + * .google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.NormalizedBoundingBox normalized_bounding_box = 2; + * + */ + public Builder setNormalizedBoundingBox( + com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .NormalizedBoundingBox + value) { + if (normalizedBoundingBoxBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + normalizedBoundingBox_ = value; + } else { + normalizedBoundingBoxBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * Bounding Box in the normalized coordinates.
+       * 
+ * + * + * .google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.NormalizedBoundingBox normalized_bounding_box = 2; + * + */ + public Builder setNormalizedBoundingBox( + com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .NormalizedBoundingBox.Builder + builderForValue) { + if (normalizedBoundingBoxBuilder_ == null) { + normalizedBoundingBox_ = builderForValue.build(); + } else { + normalizedBoundingBoxBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * Bounding Box in the normalized coordinates.
+       * 
+ * + * + * .google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.NormalizedBoundingBox normalized_bounding_box = 2; + * + */ + public Builder mergeNormalizedBoundingBox( + com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .NormalizedBoundingBox + value) { + if (normalizedBoundingBoxBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && normalizedBoundingBox_ != null + && normalizedBoundingBox_ + != com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .NormalizedBoundingBox.getDefaultInstance()) { + getNormalizedBoundingBoxBuilder().mergeFrom(value); + } else { + normalizedBoundingBox_ = value; + } + } else { + normalizedBoundingBoxBuilder_.mergeFrom(value); + } + if (normalizedBoundingBox_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + /** + * + * + *
+       * Bounding Box in the normalized coordinates.
+       * 
+ * + * + * .google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.NormalizedBoundingBox normalized_bounding_box = 2; + * + */ + public Builder clearNormalizedBoundingBox() { + bitField0_ = (bitField0_ & ~0x00000002); + normalizedBoundingBox_ = null; + if (normalizedBoundingBoxBuilder_ != null) { + normalizedBoundingBoxBuilder_.dispose(); + normalizedBoundingBoxBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+       * Bounding Box in the normalized coordinates.
+       * 
+ * + * + * .google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.NormalizedBoundingBox normalized_bounding_box = 2; + * + */ + public com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .NormalizedBoundingBox.Builder + getNormalizedBoundingBoxBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getNormalizedBoundingBoxFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Bounding Box in the normalized coordinates.
+       * 
+ * + * + * .google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.NormalizedBoundingBox normalized_bounding_box = 2; + * + */ + public com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .NormalizedBoundingBoxOrBuilder + getNormalizedBoundingBoxOrBuilder() { + if (normalizedBoundingBoxBuilder_ != null) { + return normalizedBoundingBoxBuilder_.getMessageOrBuilder(); + } else { + return normalizedBoundingBox_ == null + ? com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .NormalizedBoundingBox.getDefaultInstance() + : normalizedBoundingBox_; + } + } + /** + * + * + *
+       * Bounding Box in the normalized coordinates.
+       * 
+ * + * + * .google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.NormalizedBoundingBox normalized_bounding_box = 2; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .NormalizedBoundingBox, + com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .NormalizedBoundingBox.Builder, + com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .NormalizedBoundingBoxOrBuilder> + getNormalizedBoundingBoxFieldBuilder() { + if (normalizedBoundingBoxBuilder_ == null) { + normalizedBoundingBoxBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .NormalizedBoundingBox, + com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .NormalizedBoundingBox.Builder, + com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .NormalizedBoundingBoxOrBuilder>( + getNormalizedBoundingBox(), getParentForChildren(), isClean()); + normalizedBoundingBox_ = null; + } + return normalizedBoundingBoxBuilder_; + } + + private float confidenceScore_; + /** + * + * + *
+       * Confidence score associated with this box.
+       * 
+ * + * float confidence_score = 3; + * + * @return The confidenceScore. + */ + @java.lang.Override + public float getConfidenceScore() { + return confidenceScore_; + } + /** + * + * + *
+       * Confidence score associated with this box.
+       * 
+ * + * float confidence_score = 3; + * + * @param value The confidenceScore to set. + * @return This builder for chaining. + */ + public Builder setConfidenceScore(float value) { + + confidenceScore_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+       * Confidence score associated with this box.
+       * 
+ * + * float confidence_score = 3; + * + * @return This builder for chaining. + */ + public Builder clearConfidenceScore() { + bitField0_ = (bitField0_ & ~0x00000004); + confidenceScore_ = 0F; + onChanged(); + return this; + } + + private com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PPEEntity + ppeEntity_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PPEEntity, + com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PPEEntity + .Builder, + com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .PPEEntityOrBuilder> + ppeEntityBuilder_; + /** + * + * + *
+       * PPE entity info.
+       * 
+ * + * + * .google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PPEEntity ppe_entity = 4; + * + * + * @return Whether the ppeEntity field is set. + */ + public boolean hasPpeEntity() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + * + * + *
+       * PPE entity info.
+       * 
+ * + * + * .google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PPEEntity ppe_entity = 4; + * + * + * @return The ppeEntity. + */ + public com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PPEEntity + getPpeEntity() { + if (ppeEntityBuilder_ == null) { + return ppeEntity_ == null + ? com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PPEEntity + .getDefaultInstance() + : ppeEntity_; + } else { + return ppeEntityBuilder_.getMessage(); + } + } + /** + * + * + *
+       * PPE entity info.
+       * 
+ * + * + * .google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PPEEntity ppe_entity = 4; + * + */ + public Builder setPpeEntity( + com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PPEEntity value) { + if (ppeEntityBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ppeEntity_ = value; + } else { + ppeEntityBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+       * PPE entity info.
+       * 
+ * + * + * .google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PPEEntity ppe_entity = 4; + * + */ + public Builder setPpeEntity( + com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PPEEntity.Builder + builderForValue) { + if (ppeEntityBuilder_ == null) { + ppeEntity_ = builderForValue.build(); + } else { + ppeEntityBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+       * PPE entity info.
+       * 
+ * + * + * .google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PPEEntity ppe_entity = 4; + * + */ + public Builder mergePpeEntity( + com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PPEEntity value) { + if (ppeEntityBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) + && ppeEntity_ != null + && ppeEntity_ + != com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .PPEEntity.getDefaultInstance()) { + getPpeEntityBuilder().mergeFrom(value); + } else { + ppeEntity_ = value; + } + } else { + ppeEntityBuilder_.mergeFrom(value); + } + if (ppeEntity_ != null) { + bitField0_ |= 0x00000008; + onChanged(); + } + return this; + } + /** + * + * + *
+       * PPE entity info.
+       * 
+ * + * + * .google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PPEEntity ppe_entity = 4; + * + */ + public Builder clearPpeEntity() { + bitField0_ = (bitField0_ & ~0x00000008); + ppeEntity_ = null; + if (ppeEntityBuilder_ != null) { + ppeEntityBuilder_.dispose(); + ppeEntityBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+       * PPE entity info.
+       * 
+ * + * + * .google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PPEEntity ppe_entity = 4; + * + */ + public com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PPEEntity + .Builder + getPpeEntityBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return getPpeEntityFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * PPE entity info.
+       * 
+ * + * + * .google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PPEEntity ppe_entity = 4; + * + */ + public com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .PPEEntityOrBuilder + getPpeEntityOrBuilder() { + if (ppeEntityBuilder_ != null) { + return ppeEntityBuilder_.getMessageOrBuilder(); + } else { + return ppeEntity_ == null + ? com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PPEEntity + .getDefaultInstance() + : ppeEntity_; + } + } + /** + * + * + *
+       * PPE entity info.
+       * 
+ * + * + * .google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PPEEntity ppe_entity = 4; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PPEEntity, + com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PPEEntity + .Builder, + com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .PPEEntityOrBuilder> + getPpeEntityFieldBuilder() { + if (ppeEntityBuilder_ == null) { + ppeEntityBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PPEEntity, + com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PPEEntity + .Builder, + com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .PPEEntityOrBuilder>(getPpeEntity(), getParentForChildren(), isClean()); + ppeEntity_ = null; + } + return ppeEntityBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PPEIdentifiedBox) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PPEIdentifiedBox) + private static final com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .PPEIdentifiedBox + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .PPEIdentifiedBox(); + } + + public static com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .PPEIdentifiedBox + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PPEIdentifiedBox parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PPEIdentifiedBox + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface DetectedPersonOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.DetectedPerson) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * The id of detected person.
+     * 
+ * + * int64 person_id = 1; + * + * @return The personId. + */ + long getPersonId(); + + /** + * + * + *
+     * The info of detected person identified box.
+     * 
+ * + * + * .google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PersonIdentifiedBox detected_person_identified_box = 2; + * + * + * @return Whether the detectedPersonIdentifiedBox field is set. + */ + boolean hasDetectedPersonIdentifiedBox(); + /** + * + * + *
+     * The info of detected person identified box.
+     * 
+ * + * + * .google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PersonIdentifiedBox detected_person_identified_box = 2; + * + * + * @return The detectedPersonIdentifiedBox. + */ + com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PersonIdentifiedBox + getDetectedPersonIdentifiedBox(); + /** + * + * + *
+     * The info of detected person identified box.
+     * 
+ * + * + * .google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PersonIdentifiedBox detected_person_identified_box = 2; + * + */ + com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .PersonIdentifiedBoxOrBuilder + getDetectedPersonIdentifiedBoxOrBuilder(); + + /** + * + * + *
+     * The info of detected person associated ppe identified boxes.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PPEIdentifiedBox detected_ppe_identified_boxes = 3; + * + */ + java.util.List< + com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .PPEIdentifiedBox> + getDetectedPpeIdentifiedBoxesList(); + /** + * + * + *
+     * The info of detected person associated ppe identified boxes.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PPEIdentifiedBox detected_ppe_identified_boxes = 3; + * + */ + com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PPEIdentifiedBox + getDetectedPpeIdentifiedBoxes(int index); + /** + * + * + *
+     * The info of detected person associated ppe identified boxes.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PPEIdentifiedBox detected_ppe_identified_boxes = 3; + * + */ + int getDetectedPpeIdentifiedBoxesCount(); + /** + * + * + *
+     * The info of detected person associated ppe identified boxes.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PPEIdentifiedBox detected_ppe_identified_boxes = 3; + * + */ + java.util.List< + ? extends + com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .PPEIdentifiedBoxOrBuilder> + getDetectedPpeIdentifiedBoxesOrBuilderList(); + /** + * + * + *
+     * The info of detected person associated ppe identified boxes.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PPEIdentifiedBox detected_ppe_identified_boxes = 3; + * + */ + com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .PPEIdentifiedBoxOrBuilder + getDetectedPpeIdentifiedBoxesOrBuilder(int index); + + /** + * + * + *
+     * Coverage score for each body part.
+     * Coverage score for face.
+     * 
+ * + * optional float face_coverage_score = 4; + * + * @return Whether the faceCoverageScore field is set. + */ + boolean hasFaceCoverageScore(); + /** + * + * + *
+     * Coverage score for each body part.
+     * Coverage score for face.
+     * 
+ * + * optional float face_coverage_score = 4; + * + * @return The faceCoverageScore. + */ + float getFaceCoverageScore(); + + /** + * + * + *
+     * Coverage score for eyes.
+     * 
+ * + * optional float eyes_coverage_score = 5; + * + * @return Whether the eyesCoverageScore field is set. + */ + boolean hasEyesCoverageScore(); + /** + * + * + *
+     * Coverage score for eyes.
+     * 
+ * + * optional float eyes_coverage_score = 5; + * + * @return The eyesCoverageScore. + */ + float getEyesCoverageScore(); + + /** + * + * + *
+     * Coverage score for head.
+     * 
+ * + * optional float head_coverage_score = 6; + * + * @return Whether the headCoverageScore field is set. + */ + boolean hasHeadCoverageScore(); + /** + * + * + *
+     * Coverage score for head.
+     * 
+ * + * optional float head_coverage_score = 6; + * + * @return The headCoverageScore. + */ + float getHeadCoverageScore(); + + /** + * + * + *
+     * Coverage score for hands.
+     * 
+ * + * optional float hands_coverage_score = 7; + * + * @return Whether the handsCoverageScore field is set. + */ + boolean hasHandsCoverageScore(); + /** + * + * + *
+     * Coverage score for hands.
+     * 
+ * + * optional float hands_coverage_score = 7; + * + * @return The handsCoverageScore. + */ + float getHandsCoverageScore(); + + /** + * + * + *
+     * Coverage score for body.
+     * 
+ * + * optional float body_coverage_score = 8; + * + * @return Whether the bodyCoverageScore field is set. + */ + boolean hasBodyCoverageScore(); + /** + * + * + *
+     * Coverage score for body.
+     * 
+ * + * optional float body_coverage_score = 8; + * + * @return The bodyCoverageScore. + */ + float getBodyCoverageScore(); + + /** + * + * + *
+     * Coverage score for feet.
+     * 
+ * + * optional float feet_coverage_score = 9; + * + * @return Whether the feetCoverageScore field is set. + */ + boolean hasFeetCoverageScore(); + /** + * + * + *
+     * Coverage score for feet.
+     * 
+ * + * optional float feet_coverage_score = 9; + * + * @return The feetCoverageScore. + */ + float getFeetCoverageScore(); + } + /** + * + * + *
+   * Detected Person contains the detected person and their associated
+   * ppes and their protecting information.
+   * 
+ * + * Protobuf type {@code + * google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.DetectedPerson} + */ + public static final class DetectedPerson extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.DetectedPerson) + DetectedPersonOrBuilder { + private static final long serialVersionUID = 0L; + // Use DetectedPerson.newBuilder() to construct. + private DetectedPerson(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DetectedPerson() { + detectedPpeIdentifiedBoxes_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DetectedPerson(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.AnnotationsProto + .internal_static_google_cloud_visionai_v1_PersonalProtectiveEquipmentDetectionOutput_DetectedPerson_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.AnnotationsProto + .internal_static_google_cloud_visionai_v1_PersonalProtectiveEquipmentDetectionOutput_DetectedPerson_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.DetectedPerson + .class, + com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.DetectedPerson + .Builder.class); + } + + private int bitField0_; + public static final int PERSON_ID_FIELD_NUMBER = 1; + private long personId_ = 0L; + /** + * + * + *
+     * The id of detected person.
+     * 
+ * + * int64 person_id = 1; + * + * @return The personId. + */ + @java.lang.Override + public long getPersonId() { + return personId_; + } + + public static final int DETECTED_PERSON_IDENTIFIED_BOX_FIELD_NUMBER = 2; + private com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .PersonIdentifiedBox + detectedPersonIdentifiedBox_; + /** + * + * + *
+     * The info of detected person identified box.
+     * 
+ * + * + * .google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PersonIdentifiedBox detected_person_identified_box = 2; + * + * + * @return Whether the detectedPersonIdentifiedBox field is set. + */ + @java.lang.Override + public boolean hasDetectedPersonIdentifiedBox() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * The info of detected person identified box.
+     * 
+ * + * + * .google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PersonIdentifiedBox detected_person_identified_box = 2; + * + * + * @return The detectedPersonIdentifiedBox. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .PersonIdentifiedBox + getDetectedPersonIdentifiedBox() { + return detectedPersonIdentifiedBox_ == null + ? com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .PersonIdentifiedBox.getDefaultInstance() + : detectedPersonIdentifiedBox_; + } + /** + * + * + *
+     * The info of detected person identified box.
+     * 
+ * + * + * .google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PersonIdentifiedBox detected_person_identified_box = 2; + * + */ + @java.lang.Override + public com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .PersonIdentifiedBoxOrBuilder + getDetectedPersonIdentifiedBoxOrBuilder() { + return detectedPersonIdentifiedBox_ == null + ? com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .PersonIdentifiedBox.getDefaultInstance() + : detectedPersonIdentifiedBox_; + } + + public static final int DETECTED_PPE_IDENTIFIED_BOXES_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private java.util.List< + com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .PPEIdentifiedBox> + detectedPpeIdentifiedBoxes_; + /** + * + * + *
+     * The info of detected person associated ppe identified boxes.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PPEIdentifiedBox detected_ppe_identified_boxes = 3; + * + */ + @java.lang.Override + public java.util.List< + com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .PPEIdentifiedBox> + getDetectedPpeIdentifiedBoxesList() { + return detectedPpeIdentifiedBoxes_; + } + /** + * + * + *
+     * The info of detected person associated ppe identified boxes.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PPEIdentifiedBox detected_ppe_identified_boxes = 3; + * + */ + @java.lang.Override + public java.util.List< + ? extends + com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .PPEIdentifiedBoxOrBuilder> + getDetectedPpeIdentifiedBoxesOrBuilderList() { + return detectedPpeIdentifiedBoxes_; + } + /** + * + * + *
+     * The info of detected person associated ppe identified boxes.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PPEIdentifiedBox detected_ppe_identified_boxes = 3; + * + */ + @java.lang.Override + public int getDetectedPpeIdentifiedBoxesCount() { + return detectedPpeIdentifiedBoxes_.size(); + } + /** + * + * + *
+     * The info of detected person associated ppe identified boxes.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PPEIdentifiedBox detected_ppe_identified_boxes = 3; + * + */ + @java.lang.Override + public com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PPEIdentifiedBox + getDetectedPpeIdentifiedBoxes(int index) { + return detectedPpeIdentifiedBoxes_.get(index); + } + /** + * + * + *
+     * The info of detected person associated ppe identified boxes.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PPEIdentifiedBox detected_ppe_identified_boxes = 3; + * + */ + @java.lang.Override + public com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .PPEIdentifiedBoxOrBuilder + getDetectedPpeIdentifiedBoxesOrBuilder(int index) { + return detectedPpeIdentifiedBoxes_.get(index); + } + + public static final int FACE_COVERAGE_SCORE_FIELD_NUMBER = 4; + private float faceCoverageScore_ = 0F; + /** + * + * + *
+     * Coverage score for each body part.
+     * Coverage score for face.
+     * 
+ * + * optional float face_coverage_score = 4; + * + * @return Whether the faceCoverageScore field is set. + */ + @java.lang.Override + public boolean hasFaceCoverageScore() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * Coverage score for each body part.
+     * Coverage score for face.
+     * 
+ * + * optional float face_coverage_score = 4; + * + * @return The faceCoverageScore. + */ + @java.lang.Override + public float getFaceCoverageScore() { + return faceCoverageScore_; + } + + public static final int EYES_COVERAGE_SCORE_FIELD_NUMBER = 5; + private float eyesCoverageScore_ = 0F; + /** + * + * + *
+     * Coverage score for eyes.
+     * 
+ * + * optional float eyes_coverage_score = 5; + * + * @return Whether the eyesCoverageScore field is set. + */ + @java.lang.Override + public boolean hasEyesCoverageScore() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+     * Coverage score for eyes.
+     * 
+ * + * optional float eyes_coverage_score = 5; + * + * @return The eyesCoverageScore. + */ + @java.lang.Override + public float getEyesCoverageScore() { + return eyesCoverageScore_; + } + + public static final int HEAD_COVERAGE_SCORE_FIELD_NUMBER = 6; + private float headCoverageScore_ = 0F; + /** + * + * + *
+     * Coverage score for head.
+     * 
+ * + * optional float head_coverage_score = 6; + * + * @return Whether the headCoverageScore field is set. + */ + @java.lang.Override + public boolean hasHeadCoverageScore() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + * + * + *
+     * Coverage score for head.
+     * 
+ * + * optional float head_coverage_score = 6; + * + * @return The headCoverageScore. + */ + @java.lang.Override + public float getHeadCoverageScore() { + return headCoverageScore_; + } + + public static final int HANDS_COVERAGE_SCORE_FIELD_NUMBER = 7; + private float handsCoverageScore_ = 0F; + /** + * + * + *
+     * Coverage score for hands.
+     * 
+ * + * optional float hands_coverage_score = 7; + * + * @return Whether the handsCoverageScore field is set. + */ + @java.lang.Override + public boolean hasHandsCoverageScore() { + return ((bitField0_ & 0x00000010) != 0); + } + /** + * + * + *
+     * Coverage score for hands.
+     * 
+ * + * optional float hands_coverage_score = 7; + * + * @return The handsCoverageScore. + */ + @java.lang.Override + public float getHandsCoverageScore() { + return handsCoverageScore_; + } + + public static final int BODY_COVERAGE_SCORE_FIELD_NUMBER = 8; + private float bodyCoverageScore_ = 0F; + /** + * + * + *
+     * Coverage score for body.
+     * 
+ * + * optional float body_coverage_score = 8; + * + * @return Whether the bodyCoverageScore field is set. + */ + @java.lang.Override + public boolean hasBodyCoverageScore() { + return ((bitField0_ & 0x00000020) != 0); + } + /** + * + * + *
+     * Coverage score for body.
+     * 
+ * + * optional float body_coverage_score = 8; + * + * @return The bodyCoverageScore. + */ + @java.lang.Override + public float getBodyCoverageScore() { + return bodyCoverageScore_; + } + + public static final int FEET_COVERAGE_SCORE_FIELD_NUMBER = 9; + private float feetCoverageScore_ = 0F; + /** + * + * + *
+     * Coverage score for feet.
+     * 
+ * + * optional float feet_coverage_score = 9; + * + * @return Whether the feetCoverageScore field is set. + */ + @java.lang.Override + public boolean hasFeetCoverageScore() { + return ((bitField0_ & 0x00000040) != 0); + } + /** + * + * + *
+     * Coverage score for feet.
+     * 
+ * + * optional float feet_coverage_score = 9; + * + * @return The feetCoverageScore. + */ + @java.lang.Override + public float getFeetCoverageScore() { + return feetCoverageScore_; + } + + 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 (personId_ != 0L) { + output.writeInt64(1, personId_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getDetectedPersonIdentifiedBox()); + } + for (int i = 0; i < detectedPpeIdentifiedBoxes_.size(); i++) { + output.writeMessage(3, detectedPpeIdentifiedBoxes_.get(i)); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeFloat(4, faceCoverageScore_); + } + if (((bitField0_ & 0x00000004) != 0)) { + output.writeFloat(5, eyesCoverageScore_); + } + if (((bitField0_ & 0x00000008) != 0)) { + output.writeFloat(6, headCoverageScore_); + } + if (((bitField0_ & 0x00000010) != 0)) { + output.writeFloat(7, handsCoverageScore_); + } + if (((bitField0_ & 0x00000020) != 0)) { + output.writeFloat(8, bodyCoverageScore_); + } + if (((bitField0_ & 0x00000040) != 0)) { + output.writeFloat(9, feetCoverageScore_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (personId_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(1, personId_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 2, getDetectedPersonIdentifiedBox()); + } + for (int i = 0; i < detectedPpeIdentifiedBoxes_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 3, detectedPpeIdentifiedBoxes_.get(i)); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeFloatSize(4, faceCoverageScore_); + } + if (((bitField0_ & 0x00000004) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeFloatSize(5, eyesCoverageScore_); + } + if (((bitField0_ & 0x00000008) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeFloatSize(6, headCoverageScore_); + } + if (((bitField0_ & 0x00000010) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeFloatSize(7, handsCoverageScore_); + } + if (((bitField0_ & 0x00000020) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeFloatSize(8, bodyCoverageScore_); + } + if (((bitField0_ & 0x00000040) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeFloatSize(9, feetCoverageScore_); + } + size += getUnknownFields().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.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.DetectedPerson)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.DetectedPerson other = + (com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.DetectedPerson) + obj; + + if (getPersonId() != other.getPersonId()) return false; + if (hasDetectedPersonIdentifiedBox() != other.hasDetectedPersonIdentifiedBox()) return false; + if (hasDetectedPersonIdentifiedBox()) { + if (!getDetectedPersonIdentifiedBox().equals(other.getDetectedPersonIdentifiedBox())) + return false; + } + if (!getDetectedPpeIdentifiedBoxesList().equals(other.getDetectedPpeIdentifiedBoxesList())) + return false; + if (hasFaceCoverageScore() != other.hasFaceCoverageScore()) return false; + if (hasFaceCoverageScore()) { + if (java.lang.Float.floatToIntBits(getFaceCoverageScore()) + != java.lang.Float.floatToIntBits(other.getFaceCoverageScore())) return false; + } + if (hasEyesCoverageScore() != other.hasEyesCoverageScore()) return false; + if (hasEyesCoverageScore()) { + if (java.lang.Float.floatToIntBits(getEyesCoverageScore()) + != java.lang.Float.floatToIntBits(other.getEyesCoverageScore())) return false; + } + if (hasHeadCoverageScore() != other.hasHeadCoverageScore()) return false; + if (hasHeadCoverageScore()) { + if (java.lang.Float.floatToIntBits(getHeadCoverageScore()) + != java.lang.Float.floatToIntBits(other.getHeadCoverageScore())) return false; + } + if (hasHandsCoverageScore() != other.hasHandsCoverageScore()) return false; + if (hasHandsCoverageScore()) { + if (java.lang.Float.floatToIntBits(getHandsCoverageScore()) + != java.lang.Float.floatToIntBits(other.getHandsCoverageScore())) return false; + } + if (hasBodyCoverageScore() != other.hasBodyCoverageScore()) return false; + if (hasBodyCoverageScore()) { + if (java.lang.Float.floatToIntBits(getBodyCoverageScore()) + != java.lang.Float.floatToIntBits(other.getBodyCoverageScore())) return false; + } + if (hasFeetCoverageScore() != other.hasFeetCoverageScore()) return false; + if (hasFeetCoverageScore()) { + if (java.lang.Float.floatToIntBits(getFeetCoverageScore()) + != java.lang.Float.floatToIntBits(other.getFeetCoverageScore())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PERSON_ID_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getPersonId()); + if (hasDetectedPersonIdentifiedBox()) { + hash = (37 * hash) + DETECTED_PERSON_IDENTIFIED_BOX_FIELD_NUMBER; + hash = (53 * hash) + getDetectedPersonIdentifiedBox().hashCode(); + } + if (getDetectedPpeIdentifiedBoxesCount() > 0) { + hash = (37 * hash) + DETECTED_PPE_IDENTIFIED_BOXES_FIELD_NUMBER; + hash = (53 * hash) + getDetectedPpeIdentifiedBoxesList().hashCode(); + } + if (hasFaceCoverageScore()) { + hash = (37 * hash) + FACE_COVERAGE_SCORE_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits(getFaceCoverageScore()); + } + if (hasEyesCoverageScore()) { + hash = (37 * hash) + EYES_COVERAGE_SCORE_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits(getEyesCoverageScore()); + } + if (hasHeadCoverageScore()) { + hash = (37 * hash) + HEAD_COVERAGE_SCORE_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits(getHeadCoverageScore()); + } + if (hasHandsCoverageScore()) { + hash = (37 * hash) + HANDS_COVERAGE_SCORE_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits(getHandsCoverageScore()); + } + if (hasBodyCoverageScore()) { + hash = (37 * hash) + BODY_COVERAGE_SCORE_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits(getBodyCoverageScore()); + } + if (hasFeetCoverageScore()) { + hash = (37 * hash) + FEET_COVERAGE_SCORE_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits(getFeetCoverageScore()); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .DetectedPerson + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .DetectedPerson + 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.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .DetectedPerson + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .DetectedPerson + 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.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .DetectedPerson + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .DetectedPerson + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .DetectedPerson + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .DetectedPerson + 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.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .DetectedPerson + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .DetectedPerson + 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.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .DetectedPerson + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .DetectedPerson + 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.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.DetectedPerson + 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 Person contains the detected person and their associated
+     * ppes and their protecting information.
+     * 
+ * + * Protobuf type {@code + * google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.DetectedPerson} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.DetectedPerson) + com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .DetectedPersonOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.AnnotationsProto + .internal_static_google_cloud_visionai_v1_PersonalProtectiveEquipmentDetectionOutput_DetectedPerson_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.AnnotationsProto + .internal_static_google_cloud_visionai_v1_PersonalProtectiveEquipmentDetectionOutput_DetectedPerson_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .DetectedPerson.class, + com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .DetectedPerson.Builder.class); + } + + // Construct using + // com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.DetectedPerson.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getDetectedPersonIdentifiedBoxFieldBuilder(); + getDetectedPpeIdentifiedBoxesFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + personId_ = 0L; + detectedPersonIdentifiedBox_ = null; + if (detectedPersonIdentifiedBoxBuilder_ != null) { + detectedPersonIdentifiedBoxBuilder_.dispose(); + detectedPersonIdentifiedBoxBuilder_ = null; + } + if (detectedPpeIdentifiedBoxesBuilder_ == null) { + detectedPpeIdentifiedBoxes_ = java.util.Collections.emptyList(); + } else { + detectedPpeIdentifiedBoxes_ = null; + detectedPpeIdentifiedBoxesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000004); + faceCoverageScore_ = 0F; + eyesCoverageScore_ = 0F; + headCoverageScore_ = 0F; + handsCoverageScore_ = 0F; + bodyCoverageScore_ = 0F; + feetCoverageScore_ = 0F; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.AnnotationsProto + .internal_static_google_cloud_visionai_v1_PersonalProtectiveEquipmentDetectionOutput_DetectedPerson_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.DetectedPerson + getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .DetectedPerson.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.DetectedPerson + build() { + com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.DetectedPerson + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.DetectedPerson + buildPartial() { + com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.DetectedPerson + result = + new com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .DetectedPerson(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.DetectedPerson + result) { + if (detectedPpeIdentifiedBoxesBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0)) { + detectedPpeIdentifiedBoxes_ = + java.util.Collections.unmodifiableList(detectedPpeIdentifiedBoxes_); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.detectedPpeIdentifiedBoxes_ = detectedPpeIdentifiedBoxes_; + } else { + result.detectedPpeIdentifiedBoxes_ = detectedPpeIdentifiedBoxesBuilder_.build(); + } + } + + private void buildPartial0( + com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.DetectedPerson + result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.personId_ = personId_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.detectedPersonIdentifiedBox_ = + detectedPersonIdentifiedBoxBuilder_ == null + ? detectedPersonIdentifiedBox_ + : detectedPersonIdentifiedBoxBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.faceCoverageScore_ = faceCoverageScore_; + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.eyesCoverageScore_ = eyesCoverageScore_; + to_bitField0_ |= 0x00000004; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.headCoverageScore_ = headCoverageScore_; + to_bitField0_ |= 0x00000008; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.handsCoverageScore_ = handsCoverageScore_; + to_bitField0_ |= 0x00000010; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.bodyCoverageScore_ = bodyCoverageScore_; + to_bitField0_ |= 0x00000020; + } + if (((from_bitField0_ & 0x00000100) != 0)) { + result.feetCoverageScore_ = feetCoverageScore_; + to_bitField0_ |= 0x00000040; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .DetectedPerson) { + return mergeFrom( + (com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .DetectedPerson) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.DetectedPerson + other) { + if (other + == com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .DetectedPerson.getDefaultInstance()) return this; + if (other.getPersonId() != 0L) { + setPersonId(other.getPersonId()); + } + if (other.hasDetectedPersonIdentifiedBox()) { + mergeDetectedPersonIdentifiedBox(other.getDetectedPersonIdentifiedBox()); + } + if (detectedPpeIdentifiedBoxesBuilder_ == null) { + if (!other.detectedPpeIdentifiedBoxes_.isEmpty()) { + if (detectedPpeIdentifiedBoxes_.isEmpty()) { + detectedPpeIdentifiedBoxes_ = other.detectedPpeIdentifiedBoxes_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureDetectedPpeIdentifiedBoxesIsMutable(); + detectedPpeIdentifiedBoxes_.addAll(other.detectedPpeIdentifiedBoxes_); + } + onChanged(); + } + } else { + if (!other.detectedPpeIdentifiedBoxes_.isEmpty()) { + if (detectedPpeIdentifiedBoxesBuilder_.isEmpty()) { + detectedPpeIdentifiedBoxesBuilder_.dispose(); + detectedPpeIdentifiedBoxesBuilder_ = null; + detectedPpeIdentifiedBoxes_ = other.detectedPpeIdentifiedBoxes_; + bitField0_ = (bitField0_ & ~0x00000004); + detectedPpeIdentifiedBoxesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getDetectedPpeIdentifiedBoxesFieldBuilder() + : null; + } else { + detectedPpeIdentifiedBoxesBuilder_.addAllMessages(other.detectedPpeIdentifiedBoxes_); + } + } + } + if (other.hasFaceCoverageScore()) { + setFaceCoverageScore(other.getFaceCoverageScore()); + } + if (other.hasEyesCoverageScore()) { + setEyesCoverageScore(other.getEyesCoverageScore()); + } + if (other.hasHeadCoverageScore()) { + setHeadCoverageScore(other.getHeadCoverageScore()); + } + if (other.hasHandsCoverageScore()) { + setHandsCoverageScore(other.getHandsCoverageScore()); + } + if (other.hasBodyCoverageScore()) { + setBodyCoverageScore(other.getBodyCoverageScore()); + } + if (other.hasFeetCoverageScore()) { + setFeetCoverageScore(other.getFeetCoverageScore()); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + personId_ = input.readInt64(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 18: + { + input.readMessage( + getDetectedPersonIdentifiedBoxFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .PPEIdentifiedBox + m = + input.readMessage( + com.google.cloud.visionai.v1 + .PersonalProtectiveEquipmentDetectionOutput.PPEIdentifiedBox + .parser(), + extensionRegistry); + if (detectedPpeIdentifiedBoxesBuilder_ == null) { + ensureDetectedPpeIdentifiedBoxesIsMutable(); + detectedPpeIdentifiedBoxes_.add(m); + } else { + detectedPpeIdentifiedBoxesBuilder_.addMessage(m); + } + break; + } // case 26 + case 37: + { + faceCoverageScore_ = input.readFloat(); + bitField0_ |= 0x00000008; + break; + } // case 37 + case 45: + { + eyesCoverageScore_ = input.readFloat(); + bitField0_ |= 0x00000010; + break; + } // case 45 + case 53: + { + headCoverageScore_ = input.readFloat(); + bitField0_ |= 0x00000020; + break; + } // case 53 + case 61: + { + handsCoverageScore_ = input.readFloat(); + bitField0_ |= 0x00000040; + break; + } // case 61 + case 69: + { + bodyCoverageScore_ = input.readFloat(); + bitField0_ |= 0x00000080; + break; + } // case 69 + case 77: + { + feetCoverageScore_ = input.readFloat(); + bitField0_ |= 0x00000100; + break; + } // case 77 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private long personId_; + /** + * + * + *
+       * The id of detected person.
+       * 
+ * + * int64 person_id = 1; + * + * @return The personId. + */ + @java.lang.Override + public long getPersonId() { + return personId_; + } + /** + * + * + *
+       * The id of detected person.
+       * 
+ * + * int64 person_id = 1; + * + * @param value The personId to set. + * @return This builder for chaining. + */ + public Builder setPersonId(long value) { + + personId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * The id of detected person.
+       * 
+ * + * int64 person_id = 1; + * + * @return This builder for chaining. + */ + public Builder clearPersonId() { + bitField0_ = (bitField0_ & ~0x00000001); + personId_ = 0L; + onChanged(); + return this; + } + + private com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .PersonIdentifiedBox + detectedPersonIdentifiedBox_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .PersonIdentifiedBox, + com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .PersonIdentifiedBox.Builder, + com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .PersonIdentifiedBoxOrBuilder> + detectedPersonIdentifiedBoxBuilder_; + /** + * + * + *
+       * The info of detected person identified box.
+       * 
+ * + * + * .google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PersonIdentifiedBox detected_person_identified_box = 2; + * + * + * @return Whether the detectedPersonIdentifiedBox field is set. + */ + public boolean hasDetectedPersonIdentifiedBox() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+       * The info of detected person identified box.
+       * 
+ * + * + * .google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PersonIdentifiedBox detected_person_identified_box = 2; + * + * + * @return The detectedPersonIdentifiedBox. + */ + public com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .PersonIdentifiedBox + getDetectedPersonIdentifiedBox() { + if (detectedPersonIdentifiedBoxBuilder_ == null) { + return detectedPersonIdentifiedBox_ == null + ? com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .PersonIdentifiedBox.getDefaultInstance() + : detectedPersonIdentifiedBox_; + } else { + return detectedPersonIdentifiedBoxBuilder_.getMessage(); + } + } + /** + * + * + *
+       * The info of detected person identified box.
+       * 
+ * + * + * .google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PersonIdentifiedBox detected_person_identified_box = 2; + * + */ + public Builder setDetectedPersonIdentifiedBox( + com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .PersonIdentifiedBox + value) { + if (detectedPersonIdentifiedBoxBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + detectedPersonIdentifiedBox_ = value; + } else { + detectedPersonIdentifiedBoxBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * The info of detected person identified box.
+       * 
+ * + * + * .google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PersonIdentifiedBox detected_person_identified_box = 2; + * + */ + public Builder setDetectedPersonIdentifiedBox( + com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .PersonIdentifiedBox.Builder + builderForValue) { + if (detectedPersonIdentifiedBoxBuilder_ == null) { + detectedPersonIdentifiedBox_ = builderForValue.build(); + } else { + detectedPersonIdentifiedBoxBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * The info of detected person identified box.
+       * 
+ * + * + * .google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PersonIdentifiedBox detected_person_identified_box = 2; + * + */ + public Builder mergeDetectedPersonIdentifiedBox( + com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .PersonIdentifiedBox + value) { + if (detectedPersonIdentifiedBoxBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && detectedPersonIdentifiedBox_ != null + && detectedPersonIdentifiedBox_ + != com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .PersonIdentifiedBox.getDefaultInstance()) { + getDetectedPersonIdentifiedBoxBuilder().mergeFrom(value); + } else { + detectedPersonIdentifiedBox_ = value; + } + } else { + detectedPersonIdentifiedBoxBuilder_.mergeFrom(value); + } + if (detectedPersonIdentifiedBox_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + /** + * + * + *
+       * The info of detected person identified box.
+       * 
+ * + * + * .google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PersonIdentifiedBox detected_person_identified_box = 2; + * + */ + public Builder clearDetectedPersonIdentifiedBox() { + bitField0_ = (bitField0_ & ~0x00000002); + detectedPersonIdentifiedBox_ = null; + if (detectedPersonIdentifiedBoxBuilder_ != null) { + detectedPersonIdentifiedBoxBuilder_.dispose(); + detectedPersonIdentifiedBoxBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+       * The info of detected person identified box.
+       * 
+ * + * + * .google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PersonIdentifiedBox detected_person_identified_box = 2; + * + */ + public com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .PersonIdentifiedBox.Builder + getDetectedPersonIdentifiedBoxBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getDetectedPersonIdentifiedBoxFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * The info of detected person identified box.
+       * 
+ * + * + * .google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PersonIdentifiedBox detected_person_identified_box = 2; + * + */ + public com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .PersonIdentifiedBoxOrBuilder + getDetectedPersonIdentifiedBoxOrBuilder() { + if (detectedPersonIdentifiedBoxBuilder_ != null) { + return detectedPersonIdentifiedBoxBuilder_.getMessageOrBuilder(); + } else { + return detectedPersonIdentifiedBox_ == null + ? com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .PersonIdentifiedBox.getDefaultInstance() + : detectedPersonIdentifiedBox_; + } + } + /** + * + * + *
+       * The info of detected person identified box.
+       * 
+ * + * + * .google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PersonIdentifiedBox detected_person_identified_box = 2; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .PersonIdentifiedBox, + com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .PersonIdentifiedBox.Builder, + com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .PersonIdentifiedBoxOrBuilder> + getDetectedPersonIdentifiedBoxFieldBuilder() { + if (detectedPersonIdentifiedBoxBuilder_ == null) { + detectedPersonIdentifiedBoxBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .PersonIdentifiedBox, + com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .PersonIdentifiedBox.Builder, + com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .PersonIdentifiedBoxOrBuilder>( + getDetectedPersonIdentifiedBox(), getParentForChildren(), isClean()); + detectedPersonIdentifiedBox_ = null; + } + return detectedPersonIdentifiedBoxBuilder_; + } + + private java.util.List< + com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .PPEIdentifiedBox> + detectedPpeIdentifiedBoxes_ = java.util.Collections.emptyList(); + + private void ensureDetectedPpeIdentifiedBoxesIsMutable() { + if (!((bitField0_ & 0x00000004) != 0)) { + detectedPpeIdentifiedBoxes_ = + new java.util.ArrayList< + com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .PPEIdentifiedBox>(detectedPpeIdentifiedBoxes_); + bitField0_ |= 0x00000004; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .PPEIdentifiedBox, + com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .PPEIdentifiedBox.Builder, + com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .PPEIdentifiedBoxOrBuilder> + detectedPpeIdentifiedBoxesBuilder_; + + /** + * + * + *
+       * The info of detected person associated ppe identified boxes.
+       * 
+ * + * + * repeated .google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PPEIdentifiedBox detected_ppe_identified_boxes = 3; + * + */ + public java.util.List< + com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .PPEIdentifiedBox> + getDetectedPpeIdentifiedBoxesList() { + if (detectedPpeIdentifiedBoxesBuilder_ == null) { + return java.util.Collections.unmodifiableList(detectedPpeIdentifiedBoxes_); + } else { + return detectedPpeIdentifiedBoxesBuilder_.getMessageList(); + } + } + /** + * + * + *
+       * The info of detected person associated ppe identified boxes.
+       * 
+ * + * + * repeated .google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PPEIdentifiedBox detected_ppe_identified_boxes = 3; + * + */ + public int getDetectedPpeIdentifiedBoxesCount() { + if (detectedPpeIdentifiedBoxesBuilder_ == null) { + return detectedPpeIdentifiedBoxes_.size(); + } else { + return detectedPpeIdentifiedBoxesBuilder_.getCount(); + } + } + /** + * + * + *
+       * The info of detected person associated ppe identified boxes.
+       * 
+ * + * + * repeated .google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PPEIdentifiedBox detected_ppe_identified_boxes = 3; + * + */ + public com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .PPEIdentifiedBox + getDetectedPpeIdentifiedBoxes(int index) { + if (detectedPpeIdentifiedBoxesBuilder_ == null) { + return detectedPpeIdentifiedBoxes_.get(index); + } else { + return detectedPpeIdentifiedBoxesBuilder_.getMessage(index); + } + } + /** + * + * + *
+       * The info of detected person associated ppe identified boxes.
+       * 
+ * + * + * repeated .google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PPEIdentifiedBox detected_ppe_identified_boxes = 3; + * + */ + public Builder setDetectedPpeIdentifiedBoxes( + int index, + com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PPEIdentifiedBox + value) { + if (detectedPpeIdentifiedBoxesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDetectedPpeIdentifiedBoxesIsMutable(); + detectedPpeIdentifiedBoxes_.set(index, value); + onChanged(); + } else { + detectedPpeIdentifiedBoxesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+       * The info of detected person associated ppe identified boxes.
+       * 
+ * + * + * repeated .google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PPEIdentifiedBox detected_ppe_identified_boxes = 3; + * + */ + public Builder setDetectedPpeIdentifiedBoxes( + int index, + com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PPEIdentifiedBox + .Builder + builderForValue) { + if (detectedPpeIdentifiedBoxesBuilder_ == null) { + ensureDetectedPpeIdentifiedBoxesIsMutable(); + detectedPpeIdentifiedBoxes_.set(index, builderForValue.build()); + onChanged(); + } else { + detectedPpeIdentifiedBoxesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * The info of detected person associated ppe identified boxes.
+       * 
+ * + * + * repeated .google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PPEIdentifiedBox detected_ppe_identified_boxes = 3; + * + */ + public Builder addDetectedPpeIdentifiedBoxes( + com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PPEIdentifiedBox + value) { + if (detectedPpeIdentifiedBoxesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDetectedPpeIdentifiedBoxesIsMutable(); + detectedPpeIdentifiedBoxes_.add(value); + onChanged(); + } else { + detectedPpeIdentifiedBoxesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+       * The info of detected person associated ppe identified boxes.
+       * 
+ * + * + * repeated .google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PPEIdentifiedBox detected_ppe_identified_boxes = 3; + * + */ + public Builder addDetectedPpeIdentifiedBoxes( + int index, + com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PPEIdentifiedBox + value) { + if (detectedPpeIdentifiedBoxesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDetectedPpeIdentifiedBoxesIsMutable(); + detectedPpeIdentifiedBoxes_.add(index, value); + onChanged(); + } else { + detectedPpeIdentifiedBoxesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+       * The info of detected person associated ppe identified boxes.
+       * 
+ * + * + * repeated .google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PPEIdentifiedBox detected_ppe_identified_boxes = 3; + * + */ + public Builder addDetectedPpeIdentifiedBoxes( + com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PPEIdentifiedBox + .Builder + builderForValue) { + if (detectedPpeIdentifiedBoxesBuilder_ == null) { + ensureDetectedPpeIdentifiedBoxesIsMutable(); + detectedPpeIdentifiedBoxes_.add(builderForValue.build()); + onChanged(); + } else { + detectedPpeIdentifiedBoxesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * The info of detected person associated ppe identified boxes.
+       * 
+ * + * + * repeated .google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PPEIdentifiedBox detected_ppe_identified_boxes = 3; + * + */ + public Builder addDetectedPpeIdentifiedBoxes( + int index, + com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PPEIdentifiedBox + .Builder + builderForValue) { + if (detectedPpeIdentifiedBoxesBuilder_ == null) { + ensureDetectedPpeIdentifiedBoxesIsMutable(); + detectedPpeIdentifiedBoxes_.add(index, builderForValue.build()); + onChanged(); + } else { + detectedPpeIdentifiedBoxesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * The info of detected person associated ppe identified boxes.
+       * 
+ * + * + * repeated .google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PPEIdentifiedBox detected_ppe_identified_boxes = 3; + * + */ + public Builder addAllDetectedPpeIdentifiedBoxes( + java.lang.Iterable< + ? extends + com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .PPEIdentifiedBox> + values) { + if (detectedPpeIdentifiedBoxesBuilder_ == null) { + ensureDetectedPpeIdentifiedBoxesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, detectedPpeIdentifiedBoxes_); + onChanged(); + } else { + detectedPpeIdentifiedBoxesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+       * The info of detected person associated ppe identified boxes.
+       * 
+ * + * + * repeated .google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PPEIdentifiedBox detected_ppe_identified_boxes = 3; + * + */ + public Builder clearDetectedPpeIdentifiedBoxes() { + if (detectedPpeIdentifiedBoxesBuilder_ == null) { + detectedPpeIdentifiedBoxes_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + } else { + detectedPpeIdentifiedBoxesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+       * The info of detected person associated ppe identified boxes.
+       * 
+ * + * + * repeated .google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PPEIdentifiedBox detected_ppe_identified_boxes = 3; + * + */ + public Builder removeDetectedPpeIdentifiedBoxes(int index) { + if (detectedPpeIdentifiedBoxesBuilder_ == null) { + ensureDetectedPpeIdentifiedBoxesIsMutable(); + detectedPpeIdentifiedBoxes_.remove(index); + onChanged(); + } else { + detectedPpeIdentifiedBoxesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+       * The info of detected person associated ppe identified boxes.
+       * 
+ * + * + * repeated .google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PPEIdentifiedBox detected_ppe_identified_boxes = 3; + * + */ + public com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .PPEIdentifiedBox.Builder + getDetectedPpeIdentifiedBoxesBuilder(int index) { + return getDetectedPpeIdentifiedBoxesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+       * The info of detected person associated ppe identified boxes.
+       * 
+ * + * + * repeated .google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PPEIdentifiedBox detected_ppe_identified_boxes = 3; + * + */ + public com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .PPEIdentifiedBoxOrBuilder + getDetectedPpeIdentifiedBoxesOrBuilder(int index) { + if (detectedPpeIdentifiedBoxesBuilder_ == null) { + return detectedPpeIdentifiedBoxes_.get(index); + } else { + return detectedPpeIdentifiedBoxesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+       * The info of detected person associated ppe identified boxes.
+       * 
+ * + * + * repeated .google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PPEIdentifiedBox detected_ppe_identified_boxes = 3; + * + */ + public java.util.List< + ? extends + com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .PPEIdentifiedBoxOrBuilder> + getDetectedPpeIdentifiedBoxesOrBuilderList() { + if (detectedPpeIdentifiedBoxesBuilder_ != null) { + return detectedPpeIdentifiedBoxesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(detectedPpeIdentifiedBoxes_); + } + } + /** + * + * + *
+       * The info of detected person associated ppe identified boxes.
+       * 
+ * + * + * repeated .google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PPEIdentifiedBox detected_ppe_identified_boxes = 3; + * + */ + public com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .PPEIdentifiedBox.Builder + addDetectedPpeIdentifiedBoxesBuilder() { + return getDetectedPpeIdentifiedBoxesFieldBuilder() + .addBuilder( + com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .PPEIdentifiedBox.getDefaultInstance()); + } + /** + * + * + *
+       * The info of detected person associated ppe identified boxes.
+       * 
+ * + * + * repeated .google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PPEIdentifiedBox detected_ppe_identified_boxes = 3; + * + */ + public com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .PPEIdentifiedBox.Builder + addDetectedPpeIdentifiedBoxesBuilder(int index) { + return getDetectedPpeIdentifiedBoxesFieldBuilder() + .addBuilder( + index, + com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .PPEIdentifiedBox.getDefaultInstance()); + } + /** + * + * + *
+       * The info of detected person associated ppe identified boxes.
+       * 
+ * + * + * repeated .google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PPEIdentifiedBox detected_ppe_identified_boxes = 3; + * + */ + public java.util.List< + com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .PPEIdentifiedBox.Builder> + getDetectedPpeIdentifiedBoxesBuilderList() { + return getDetectedPpeIdentifiedBoxesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .PPEIdentifiedBox, + com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .PPEIdentifiedBox.Builder, + com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .PPEIdentifiedBoxOrBuilder> + getDetectedPpeIdentifiedBoxesFieldBuilder() { + if (detectedPpeIdentifiedBoxesBuilder_ == null) { + detectedPpeIdentifiedBoxesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .PPEIdentifiedBox, + com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .PPEIdentifiedBox.Builder, + com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .PPEIdentifiedBoxOrBuilder>( + detectedPpeIdentifiedBoxes_, + ((bitField0_ & 0x00000004) != 0), + getParentForChildren(), + isClean()); + detectedPpeIdentifiedBoxes_ = null; + } + return detectedPpeIdentifiedBoxesBuilder_; + } + + private float faceCoverageScore_; + /** + * + * + *
+       * Coverage score for each body part.
+       * Coverage score for face.
+       * 
+ * + * optional float face_coverage_score = 4; + * + * @return Whether the faceCoverageScore field is set. + */ + @java.lang.Override + public boolean hasFaceCoverageScore() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + * + * + *
+       * Coverage score for each body part.
+       * Coverage score for face.
+       * 
+ * + * optional float face_coverage_score = 4; + * + * @return The faceCoverageScore. + */ + @java.lang.Override + public float getFaceCoverageScore() { + return faceCoverageScore_; + } + /** + * + * + *
+       * Coverage score for each body part.
+       * Coverage score for face.
+       * 
+ * + * optional float face_coverage_score = 4; + * + * @param value The faceCoverageScore to set. + * @return This builder for chaining. + */ + public Builder setFaceCoverageScore(float value) { + + faceCoverageScore_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+       * Coverage score for each body part.
+       * Coverage score for face.
+       * 
+ * + * optional float face_coverage_score = 4; + * + * @return This builder for chaining. + */ + public Builder clearFaceCoverageScore() { + bitField0_ = (bitField0_ & ~0x00000008); + faceCoverageScore_ = 0F; + onChanged(); + return this; + } + + private float eyesCoverageScore_; + /** + * + * + *
+       * Coverage score for eyes.
+       * 
+ * + * optional float eyes_coverage_score = 5; + * + * @return Whether the eyesCoverageScore field is set. + */ + @java.lang.Override + public boolean hasEyesCoverageScore() { + return ((bitField0_ & 0x00000010) != 0); + } + /** + * + * + *
+       * Coverage score for eyes.
+       * 
+ * + * optional float eyes_coverage_score = 5; + * + * @return The eyesCoverageScore. + */ + @java.lang.Override + public float getEyesCoverageScore() { + return eyesCoverageScore_; + } + /** + * + * + *
+       * Coverage score for eyes.
+       * 
+ * + * optional float eyes_coverage_score = 5; + * + * @param value The eyesCoverageScore to set. + * @return This builder for chaining. + */ + public Builder setEyesCoverageScore(float value) { + + eyesCoverageScore_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+       * Coverage score for eyes.
+       * 
+ * + * optional float eyes_coverage_score = 5; + * + * @return This builder for chaining. + */ + public Builder clearEyesCoverageScore() { + bitField0_ = (bitField0_ & ~0x00000010); + eyesCoverageScore_ = 0F; + onChanged(); + return this; + } + + private float headCoverageScore_; + /** + * + * + *
+       * Coverage score for head.
+       * 
+ * + * optional float head_coverage_score = 6; + * + * @return Whether the headCoverageScore field is set. + */ + @java.lang.Override + public boolean hasHeadCoverageScore() { + return ((bitField0_ & 0x00000020) != 0); + } + /** + * + * + *
+       * Coverage score for head.
+       * 
+ * + * optional float head_coverage_score = 6; + * + * @return The headCoverageScore. + */ + @java.lang.Override + public float getHeadCoverageScore() { + return headCoverageScore_; + } + /** + * + * + *
+       * Coverage score for head.
+       * 
+ * + * optional float head_coverage_score = 6; + * + * @param value The headCoverageScore to set. + * @return This builder for chaining. + */ + public Builder setHeadCoverageScore(float value) { + + headCoverageScore_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+       * Coverage score for head.
+       * 
+ * + * optional float head_coverage_score = 6; + * + * @return This builder for chaining. + */ + public Builder clearHeadCoverageScore() { + bitField0_ = (bitField0_ & ~0x00000020); + headCoverageScore_ = 0F; + onChanged(); + return this; + } + + private float handsCoverageScore_; + /** + * + * + *
+       * Coverage score for hands.
+       * 
+ * + * optional float hands_coverage_score = 7; + * + * @return Whether the handsCoverageScore field is set. + */ + @java.lang.Override + public boolean hasHandsCoverageScore() { + return ((bitField0_ & 0x00000040) != 0); + } + /** + * + * + *
+       * Coverage score for hands.
+       * 
+ * + * optional float hands_coverage_score = 7; + * + * @return The handsCoverageScore. + */ + @java.lang.Override + public float getHandsCoverageScore() { + return handsCoverageScore_; + } + /** + * + * + *
+       * Coverage score for hands.
+       * 
+ * + * optional float hands_coverage_score = 7; + * + * @param value The handsCoverageScore to set. + * @return This builder for chaining. + */ + public Builder setHandsCoverageScore(float value) { + + handsCoverageScore_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * + * + *
+       * Coverage score for hands.
+       * 
+ * + * optional float hands_coverage_score = 7; + * + * @return This builder for chaining. + */ + public Builder clearHandsCoverageScore() { + bitField0_ = (bitField0_ & ~0x00000040); + handsCoverageScore_ = 0F; + onChanged(); + return this; + } + + private float bodyCoverageScore_; + /** + * + * + *
+       * Coverage score for body.
+       * 
+ * + * optional float body_coverage_score = 8; + * + * @return Whether the bodyCoverageScore field is set. + */ + @java.lang.Override + public boolean hasBodyCoverageScore() { + return ((bitField0_ & 0x00000080) != 0); + } + /** + * + * + *
+       * Coverage score for body.
+       * 
+ * + * optional float body_coverage_score = 8; + * + * @return The bodyCoverageScore. + */ + @java.lang.Override + public float getBodyCoverageScore() { + return bodyCoverageScore_; + } + /** + * + * + *
+       * Coverage score for body.
+       * 
+ * + * optional float body_coverage_score = 8; + * + * @param value The bodyCoverageScore to set. + * @return This builder for chaining. + */ + public Builder setBodyCoverageScore(float value) { + + bodyCoverageScore_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * + * + *
+       * Coverage score for body.
+       * 
+ * + * optional float body_coverage_score = 8; + * + * @return This builder for chaining. + */ + public Builder clearBodyCoverageScore() { + bitField0_ = (bitField0_ & ~0x00000080); + bodyCoverageScore_ = 0F; + onChanged(); + return this; + } + + private float feetCoverageScore_; + /** + * + * + *
+       * Coverage score for feet.
+       * 
+ * + * optional float feet_coverage_score = 9; + * + * @return Whether the feetCoverageScore field is set. + */ + @java.lang.Override + public boolean hasFeetCoverageScore() { + return ((bitField0_ & 0x00000100) != 0); + } + /** + * + * + *
+       * Coverage score for feet.
+       * 
+ * + * optional float feet_coverage_score = 9; + * + * @return The feetCoverageScore. + */ + @java.lang.Override + public float getFeetCoverageScore() { + return feetCoverageScore_; + } + /** + * + * + *
+       * Coverage score for feet.
+       * 
+ * + * optional float feet_coverage_score = 9; + * + * @param value The feetCoverageScore to set. + * @return This builder for chaining. + */ + public Builder setFeetCoverageScore(float value) { + + feetCoverageScore_ = value; + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + /** + * + * + *
+       * Coverage score for feet.
+       * 
+ * + * optional float feet_coverage_score = 9; + * + * @return This builder for chaining. + */ + public Builder clearFeetCoverageScore() { + bitField0_ = (bitField0_ & ~0x00000100); + feetCoverageScore_ = 0F; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.DetectedPerson) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.DetectedPerson) + private static final com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .DetectedPerson + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .DetectedPerson(); + } + + public static com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .DetectedPerson + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DetectedPerson parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.DetectedPerson + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int bitField0_; + public static final int CURRENT_TIME_FIELD_NUMBER = 1; + private com.google.protobuf.Timestamp currentTime_; + /** + * + * + *
+   * Current timestamp.
+   * 
+ * + * .google.protobuf.Timestamp current_time = 1; + * + * @return Whether the currentTime field is set. + */ + @java.lang.Override + public boolean hasCurrentTime() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * Current timestamp.
+   * 
+ * + * .google.protobuf.Timestamp current_time = 1; + * + * @return The currentTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCurrentTime() { + return currentTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : currentTime_; + } + /** + * + * + *
+   * Current timestamp.
+   * 
+ * + * .google.protobuf.Timestamp current_time = 1; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCurrentTimeOrBuilder() { + return currentTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : currentTime_; + } + + public static final int DETECTED_PERSONS_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private java.util.List< + com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.DetectedPerson> + detectedPersons_; + /** + * + * + *
+   * A list of DetectedPersons.
+   * 
+ * + * + * repeated .google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.DetectedPerson detected_persons = 2; + * + */ + @java.lang.Override + public java.util.List< + com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.DetectedPerson> + getDetectedPersonsList() { + return detectedPersons_; + } + /** + * + * + *
+   * A list of DetectedPersons.
+   * 
+ * + * + * repeated .google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.DetectedPerson detected_persons = 2; + * + */ + @java.lang.Override + public java.util.List< + ? extends + com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .DetectedPersonOrBuilder> + getDetectedPersonsOrBuilderList() { + return detectedPersons_; + } + /** + * + * + *
+   * A list of DetectedPersons.
+   * 
+ * + * + * repeated .google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.DetectedPerson detected_persons = 2; + * + */ + @java.lang.Override + public int getDetectedPersonsCount() { + return detectedPersons_.size(); + } + /** + * + * + *
+   * A list of DetectedPersons.
+   * 
+ * + * + * repeated .google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.DetectedPerson detected_persons = 2; + * + */ + @java.lang.Override + public com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.DetectedPerson + getDetectedPersons(int index) { + return detectedPersons_.get(index); + } + /** + * + * + *
+   * A list of DetectedPersons.
+   * 
+ * + * + * repeated .google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.DetectedPerson detected_persons = 2; + * + */ + @java.lang.Override + public com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .DetectedPersonOrBuilder + getDetectedPersonsOrBuilder(int index) { + return detectedPersons_.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 (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getCurrentTime()); + } + for (int i = 0; i < detectedPersons_.size(); i++) { + output.writeMessage(2, detectedPersons_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getCurrentTime()); + } + for (int i = 0; i < detectedPersons_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, detectedPersons_.get(i)); + } + size += getUnknownFields().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.visionai.v1.PersonalProtectiveEquipmentDetectionOutput)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput other = + (com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput) obj; + + if (hasCurrentTime() != other.hasCurrentTime()) return false; + if (hasCurrentTime()) { + if (!getCurrentTime().equals(other.getCurrentTime())) return false; + } + if (!getDetectedPersonsList().equals(other.getDetectedPersonsList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasCurrentTime()) { + hash = (37 * hash) + CURRENT_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCurrentTime().hashCode(); + } + if (getDetectedPersonsCount() > 0) { + hash = (37 * hash) + DETECTED_PERSONS_FIELD_NUMBER; + hash = (53 * hash) + getDetectedPersonsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput 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.visionai.v1.PersonalProtectiveEquipmentDetectionOutput parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput 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.visionai.v1.PersonalProtectiveEquipmentDetectionOutput parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput 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.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + 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.visionai.v1.PersonalProtectiveEquipmentDetectionOutput parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput 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.visionai.v1.PersonalProtectiveEquipmentDetectionOutput 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; + } + /** + * + * + *
+   * Output format for Personal Protective Equipment Detection Operator.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput) + com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutputOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.AnnotationsProto + .internal_static_google_cloud_visionai_v1_PersonalProtectiveEquipmentDetectionOutput_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.AnnotationsProto + .internal_static_google_cloud_visionai_v1_PersonalProtectiveEquipmentDetectionOutput_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.class, + com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.Builder + .class); + } + + // Construct using + // com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getCurrentTimeFieldBuilder(); + getDetectedPersonsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + currentTime_ = null; + if (currentTimeBuilder_ != null) { + currentTimeBuilder_.dispose(); + currentTimeBuilder_ = null; + } + if (detectedPersonsBuilder_ == null) { + detectedPersons_ = java.util.Collections.emptyList(); + } else { + detectedPersons_ = null; + detectedPersonsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.AnnotationsProto + .internal_static_google_cloud_visionai_v1_PersonalProtectiveEquipmentDetectionOutput_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput build() { + com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput buildPartial() { + com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput result = + new com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput result) { + if (detectedPersonsBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + detectedPersons_ = java.util.Collections.unmodifiableList(detectedPersons_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.detectedPersons_ = detectedPersons_; + } else { + result.detectedPersons_ = detectedPersonsBuilder_.build(); + } + } + + private void buildPartial0( + com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.currentTime_ = + currentTimeBuilder_ == null ? currentTime_ : currentTimeBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput) { + return mergeFrom( + (com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput other) { + if (other + == com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .getDefaultInstance()) return this; + if (other.hasCurrentTime()) { + mergeCurrentTime(other.getCurrentTime()); + } + if (detectedPersonsBuilder_ == null) { + if (!other.detectedPersons_.isEmpty()) { + if (detectedPersons_.isEmpty()) { + detectedPersons_ = other.detectedPersons_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureDetectedPersonsIsMutable(); + detectedPersons_.addAll(other.detectedPersons_); + } + onChanged(); + } + } else { + if (!other.detectedPersons_.isEmpty()) { + if (detectedPersonsBuilder_.isEmpty()) { + detectedPersonsBuilder_.dispose(); + detectedPersonsBuilder_ = null; + detectedPersons_ = other.detectedPersons_; + bitField0_ = (bitField0_ & ~0x00000002); + detectedPersonsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getDetectedPersonsFieldBuilder() + : null; + } else { + detectedPersonsBuilder_.addAllMessages(other.detectedPersons_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getCurrentTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .DetectedPerson + m = + input.readMessage( + com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .DetectedPerson.parser(), + extensionRegistry); + if (detectedPersonsBuilder_ == null) { + ensureDetectedPersonsIsMutable(); + detectedPersons_.add(m); + } else { + detectedPersonsBuilder_.addMessage(m); + } + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.protobuf.Timestamp currentTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + currentTimeBuilder_; + /** + * + * + *
+     * Current timestamp.
+     * 
+ * + * .google.protobuf.Timestamp current_time = 1; + * + * @return Whether the currentTime field is set. + */ + public boolean hasCurrentTime() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * Current timestamp.
+     * 
+ * + * .google.protobuf.Timestamp current_time = 1; + * + * @return The currentTime. + */ + public com.google.protobuf.Timestamp getCurrentTime() { + if (currentTimeBuilder_ == null) { + return currentTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : currentTime_; + } else { + return currentTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Current timestamp.
+     * 
+ * + * .google.protobuf.Timestamp current_time = 1; + */ + public Builder setCurrentTime(com.google.protobuf.Timestamp value) { + if (currentTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + currentTime_ = value; + } else { + currentTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Current timestamp.
+     * 
+ * + * .google.protobuf.Timestamp current_time = 1; + */ + public Builder setCurrentTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (currentTimeBuilder_ == null) { + currentTime_ = builderForValue.build(); + } else { + currentTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Current timestamp.
+     * 
+ * + * .google.protobuf.Timestamp current_time = 1; + */ + public Builder mergeCurrentTime(com.google.protobuf.Timestamp value) { + if (currentTimeBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && currentTime_ != null + && currentTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getCurrentTimeBuilder().mergeFrom(value); + } else { + currentTime_ = value; + } + } else { + currentTimeBuilder_.mergeFrom(value); + } + if (currentTime_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Current timestamp.
+     * 
+ * + * .google.protobuf.Timestamp current_time = 1; + */ + public Builder clearCurrentTime() { + bitField0_ = (bitField0_ & ~0x00000001); + currentTime_ = null; + if (currentTimeBuilder_ != null) { + currentTimeBuilder_.dispose(); + currentTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Current timestamp.
+     * 
+ * + * .google.protobuf.Timestamp current_time = 1; + */ + public com.google.protobuf.Timestamp.Builder getCurrentTimeBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getCurrentTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Current timestamp.
+     * 
+ * + * .google.protobuf.Timestamp current_time = 1; + */ + public com.google.protobuf.TimestampOrBuilder getCurrentTimeOrBuilder() { + if (currentTimeBuilder_ != null) { + return currentTimeBuilder_.getMessageOrBuilder(); + } else { + return currentTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : currentTime_; + } + } + /** + * + * + *
+     * Current timestamp.
+     * 
+ * + * .google.protobuf.Timestamp current_time = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getCurrentTimeFieldBuilder() { + if (currentTimeBuilder_ == null) { + currentTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getCurrentTime(), getParentForChildren(), isClean()); + currentTime_ = null; + } + return currentTimeBuilder_; + } + + private java.util.List< + com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.DetectedPerson> + detectedPersons_ = java.util.Collections.emptyList(); + + private void ensureDetectedPersonsIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + detectedPersons_ = + new java.util.ArrayList< + com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .DetectedPerson>(detectedPersons_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.DetectedPerson, + com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.DetectedPerson + .Builder, + com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .DetectedPersonOrBuilder> + detectedPersonsBuilder_; + + /** + * + * + *
+     * A list of DetectedPersons.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.DetectedPerson detected_persons = 2; + * + */ + public java.util.List< + com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.DetectedPerson> + getDetectedPersonsList() { + if (detectedPersonsBuilder_ == null) { + return java.util.Collections.unmodifiableList(detectedPersons_); + } else { + return detectedPersonsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * A list of DetectedPersons.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.DetectedPerson detected_persons = 2; + * + */ + public int getDetectedPersonsCount() { + if (detectedPersonsBuilder_ == null) { + return detectedPersons_.size(); + } else { + return detectedPersonsBuilder_.getCount(); + } + } + /** + * + * + *
+     * A list of DetectedPersons.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.DetectedPerson detected_persons = 2; + * + */ + public com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.DetectedPerson + getDetectedPersons(int index) { + if (detectedPersonsBuilder_ == null) { + return detectedPersons_.get(index); + } else { + return detectedPersonsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * A list of DetectedPersons.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.DetectedPerson detected_persons = 2; + * + */ + public Builder setDetectedPersons( + int index, + com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.DetectedPerson + value) { + if (detectedPersonsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDetectedPersonsIsMutable(); + detectedPersons_.set(index, value); + onChanged(); + } else { + detectedPersonsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * A list of DetectedPersons.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.DetectedPerson detected_persons = 2; + * + */ + public Builder setDetectedPersons( + int index, + com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.DetectedPerson + .Builder + builderForValue) { + if (detectedPersonsBuilder_ == null) { + ensureDetectedPersonsIsMutable(); + detectedPersons_.set(index, builderForValue.build()); + onChanged(); + } else { + detectedPersonsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A list of DetectedPersons.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.DetectedPerson detected_persons = 2; + * + */ + public Builder addDetectedPersons( + com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.DetectedPerson + value) { + if (detectedPersonsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDetectedPersonsIsMutable(); + detectedPersons_.add(value); + onChanged(); + } else { + detectedPersonsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * A list of DetectedPersons.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.DetectedPerson detected_persons = 2; + * + */ + public Builder addDetectedPersons( + int index, + com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.DetectedPerson + value) { + if (detectedPersonsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDetectedPersonsIsMutable(); + detectedPersons_.add(index, value); + onChanged(); + } else { + detectedPersonsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * A list of DetectedPersons.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.DetectedPerson detected_persons = 2; + * + */ + public Builder addDetectedPersons( + com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.DetectedPerson + .Builder + builderForValue) { + if (detectedPersonsBuilder_ == null) { + ensureDetectedPersonsIsMutable(); + detectedPersons_.add(builderForValue.build()); + onChanged(); + } else { + detectedPersonsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A list of DetectedPersons.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.DetectedPerson detected_persons = 2; + * + */ + public Builder addDetectedPersons( + int index, + com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.DetectedPerson + .Builder + builderForValue) { + if (detectedPersonsBuilder_ == null) { + ensureDetectedPersonsIsMutable(); + detectedPersons_.add(index, builderForValue.build()); + onChanged(); + } else { + detectedPersonsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A list of DetectedPersons.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.DetectedPerson detected_persons = 2; + * + */ + public Builder addAllDetectedPersons( + java.lang.Iterable< + ? extends + com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .DetectedPerson> + values) { + if (detectedPersonsBuilder_ == null) { + ensureDetectedPersonsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, detectedPersons_); + onChanged(); + } else { + detectedPersonsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * A list of DetectedPersons.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.DetectedPerson detected_persons = 2; + * + */ + public Builder clearDetectedPersons() { + if (detectedPersonsBuilder_ == null) { + detectedPersons_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + detectedPersonsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * A list of DetectedPersons.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.DetectedPerson detected_persons = 2; + * + */ + public Builder removeDetectedPersons(int index) { + if (detectedPersonsBuilder_ == null) { + ensureDetectedPersonsIsMutable(); + detectedPersons_.remove(index); + onChanged(); + } else { + detectedPersonsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * A list of DetectedPersons.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.DetectedPerson detected_persons = 2; + * + */ + public com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.DetectedPerson + .Builder + getDetectedPersonsBuilder(int index) { + return getDetectedPersonsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * A list of DetectedPersons.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.DetectedPerson detected_persons = 2; + * + */ + public com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .DetectedPersonOrBuilder + getDetectedPersonsOrBuilder(int index) { + if (detectedPersonsBuilder_ == null) { + return detectedPersons_.get(index); + } else { + return detectedPersonsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * A list of DetectedPersons.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.DetectedPerson detected_persons = 2; + * + */ + public java.util.List< + ? extends + com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .DetectedPersonOrBuilder> + getDetectedPersonsOrBuilderList() { + if (detectedPersonsBuilder_ != null) { + return detectedPersonsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(detectedPersons_); + } + } + /** + * + * + *
+     * A list of DetectedPersons.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.DetectedPerson detected_persons = 2; + * + */ + public com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.DetectedPerson + .Builder + addDetectedPersonsBuilder() { + return getDetectedPersonsFieldBuilder() + .addBuilder( + com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.DetectedPerson + .getDefaultInstance()); + } + /** + * + * + *
+     * A list of DetectedPersons.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.DetectedPerson detected_persons = 2; + * + */ + public com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.DetectedPerson + .Builder + addDetectedPersonsBuilder(int index) { + return getDetectedPersonsFieldBuilder() + .addBuilder( + index, + com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.DetectedPerson + .getDefaultInstance()); + } + /** + * + * + *
+     * A list of DetectedPersons.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.DetectedPerson detected_persons = 2; + * + */ + public java.util.List< + com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.DetectedPerson + .Builder> + getDetectedPersonsBuilderList() { + return getDetectedPersonsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.DetectedPerson, + com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.DetectedPerson + .Builder, + com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .DetectedPersonOrBuilder> + getDetectedPersonsFieldBuilder() { + if (detectedPersonsBuilder_ == null) { + detectedPersonsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .DetectedPerson, + com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .DetectedPerson.Builder, + com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .DetectedPersonOrBuilder>( + detectedPersons_, + ((bitField0_ & 0x00000002) != 0), + getParentForChildren(), + isClean()); + detectedPersons_ = null; + } + return detectedPersonsBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.PersonalProtectiveEquipmentDetectionOutput) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput) + private static final com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput(); + } + + public static com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PersonalProtectiveEquipmentDetectionOutput parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/PersonalProtectiveEquipmentDetectionOutputOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/PersonalProtectiveEquipmentDetectionOutputOrBuilder.java new file mode 100644 index 000000000000..398e39ad5f55 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/PersonalProtectiveEquipmentDetectionOutputOrBuilder.java @@ -0,0 +1,130 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/annotations.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface PersonalProtectiveEquipmentDetectionOutputOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Current timestamp.
+   * 
+ * + * .google.protobuf.Timestamp current_time = 1; + * + * @return Whether the currentTime field is set. + */ + boolean hasCurrentTime(); + /** + * + * + *
+   * Current timestamp.
+   * 
+ * + * .google.protobuf.Timestamp current_time = 1; + * + * @return The currentTime. + */ + com.google.protobuf.Timestamp getCurrentTime(); + /** + * + * + *
+   * Current timestamp.
+   * 
+ * + * .google.protobuf.Timestamp current_time = 1; + */ + com.google.protobuf.TimestampOrBuilder getCurrentTimeOrBuilder(); + + /** + * + * + *
+   * A list of DetectedPersons.
+   * 
+ * + * + * repeated .google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.DetectedPerson detected_persons = 2; + * + */ + java.util.List< + com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.DetectedPerson> + getDetectedPersonsList(); + /** + * + * + *
+   * A list of DetectedPersons.
+   * 
+ * + * + * repeated .google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.DetectedPerson detected_persons = 2; + * + */ + com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.DetectedPerson + getDetectedPersons(int index); + /** + * + * + *
+   * A list of DetectedPersons.
+   * 
+ * + * + * repeated .google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.DetectedPerson detected_persons = 2; + * + */ + int getDetectedPersonsCount(); + /** + * + * + *
+   * A list of DetectedPersons.
+   * 
+ * + * + * repeated .google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.DetectedPerson detected_persons = 2; + * + */ + java.util.List< + ? extends + com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + .DetectedPersonOrBuilder> + getDetectedPersonsOrBuilderList(); + /** + * + * + *
+   * A list of DetectedPersons.
+   * 
+ * + * + * repeated .google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.DetectedPerson detected_persons = 2; + * + */ + com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.DetectedPersonOrBuilder + getDetectedPersonsOrBuilder(int index); +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/PlatformProto.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/PlatformProto.java new file mode 100644 index 000000000000..666759a50947 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/PlatformProto.java @@ -0,0 +1,1932 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/platform.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public final class PlatformProto { + private PlatformProto() {} + + 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_visionai_v1_DeleteApplicationInstancesResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_visionai_v1_DeleteApplicationInstancesResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_visionai_v1_CreateApplicationInstancesResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_visionai_v1_CreateApplicationInstancesResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_visionai_v1_UpdateApplicationInstancesResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_visionai_v1_UpdateApplicationInstancesResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_visionai_v1_CreateApplicationInstancesRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_visionai_v1_CreateApplicationInstancesRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_visionai_v1_DeleteApplicationInstancesRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_visionai_v1_DeleteApplicationInstancesRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_visionai_v1_DeployApplicationResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_visionai_v1_DeployApplicationResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_visionai_v1_UndeployApplicationResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_visionai_v1_UndeployApplicationResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_visionai_v1_RemoveApplicationStreamInputResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_visionai_v1_RemoveApplicationStreamInputResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_visionai_v1_AddApplicationStreamInputResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_visionai_v1_AddApplicationStreamInputResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_visionai_v1_UpdateApplicationStreamInputResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_visionai_v1_UpdateApplicationStreamInputResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_visionai_v1_ListApplicationsRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_visionai_v1_ListApplicationsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_visionai_v1_ListApplicationsResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_visionai_v1_ListApplicationsResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_visionai_v1_GetApplicationRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_visionai_v1_GetApplicationRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_visionai_v1_CreateApplicationRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_visionai_v1_CreateApplicationRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_visionai_v1_UpdateApplicationRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_visionai_v1_UpdateApplicationRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_visionai_v1_DeleteApplicationRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_visionai_v1_DeleteApplicationRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_visionai_v1_DeployApplicationRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_visionai_v1_DeployApplicationRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_visionai_v1_UndeployApplicationRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_visionai_v1_UndeployApplicationRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_visionai_v1_ApplicationStreamInput_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_visionai_v1_ApplicationStreamInput_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_visionai_v1_AddApplicationStreamInputRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_visionai_v1_AddApplicationStreamInputRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_visionai_v1_UpdateApplicationStreamInputRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_visionai_v1_UpdateApplicationStreamInputRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_visionai_v1_RemoveApplicationStreamInputRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_visionai_v1_RemoveApplicationStreamInputRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_visionai_v1_RemoveApplicationStreamInputRequest_TargetStreamInput_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_visionai_v1_RemoveApplicationStreamInputRequest_TargetStreamInput_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_visionai_v1_ListInstancesRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_visionai_v1_ListInstancesRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_visionai_v1_ListInstancesResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_visionai_v1_ListInstancesResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_visionai_v1_GetInstanceRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_visionai_v1_GetInstanceRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_visionai_v1_ListDraftsRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_visionai_v1_ListDraftsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_visionai_v1_ListDraftsResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_visionai_v1_ListDraftsResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_visionai_v1_GetDraftRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_visionai_v1_GetDraftRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_visionai_v1_CreateDraftRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_visionai_v1_CreateDraftRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_visionai_v1_UpdateDraftRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_visionai_v1_UpdateDraftRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_visionai_v1_UpdateApplicationInstancesRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_visionai_v1_UpdateApplicationInstancesRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_visionai_v1_UpdateApplicationInstancesRequest_UpdateApplicationInstance_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_visionai_v1_UpdateApplicationInstancesRequest_UpdateApplicationInstance_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_visionai_v1_DeleteDraftRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_visionai_v1_DeleteDraftRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_visionai_v1_ListProcessorsRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_visionai_v1_ListProcessorsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_visionai_v1_ListProcessorsResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_visionai_v1_ListProcessorsResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_visionai_v1_ListPrebuiltProcessorsRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_visionai_v1_ListPrebuiltProcessorsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_visionai_v1_ListPrebuiltProcessorsResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_visionai_v1_ListPrebuiltProcessorsResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_visionai_v1_GetProcessorRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_visionai_v1_GetProcessorRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_visionai_v1_CreateProcessorRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_visionai_v1_CreateProcessorRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_visionai_v1_UpdateProcessorRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_visionai_v1_UpdateProcessorRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_visionai_v1_DeleteProcessorRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_visionai_v1_DeleteProcessorRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_visionai_v1_Application_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_visionai_v1_Application_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_visionai_v1_Application_ApplicationRuntimeInfo_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_visionai_v1_Application_ApplicationRuntimeInfo_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_visionai_v1_Application_ApplicationRuntimeInfo_GlobalOutputResource_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_visionai_v1_Application_ApplicationRuntimeInfo_GlobalOutputResource_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_visionai_v1_Application_ApplicationRuntimeInfo_MonitoringConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_visionai_v1_Application_ApplicationRuntimeInfo_MonitoringConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_visionai_v1_Application_LabelsEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_visionai_v1_Application_LabelsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_visionai_v1_ApplicationConfigs_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_visionai_v1_ApplicationConfigs_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_visionai_v1_ApplicationConfigs_EventDeliveryConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_visionai_v1_ApplicationConfigs_EventDeliveryConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_visionai_v1_Node_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_visionai_v1_Node_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_visionai_v1_Node_InputEdge_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_visionai_v1_Node_InputEdge_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_visionai_v1_Draft_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_visionai_v1_Draft_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_visionai_v1_Draft_LabelsEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_visionai_v1_Draft_LabelsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_visionai_v1_Instance_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_visionai_v1_Instance_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_visionai_v1_Instance_InputResource_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_visionai_v1_Instance_InputResource_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_visionai_v1_Instance_OutputResource_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_visionai_v1_Instance_OutputResource_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_visionai_v1_Instance_LabelsEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_visionai_v1_Instance_LabelsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_visionai_v1_ApplicationInstance_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_visionai_v1_ApplicationInstance_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_visionai_v1_Processor_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_visionai_v1_Processor_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_visionai_v1_Processor_LabelsEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_visionai_v1_Processor_LabelsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_visionai_v1_ProcessorIOSpec_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_visionai_v1_ProcessorIOSpec_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_visionai_v1_ProcessorIOSpec_GraphInputChannelSpec_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_visionai_v1_ProcessorIOSpec_GraphInputChannelSpec_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_visionai_v1_ProcessorIOSpec_GraphOutputChannelSpec_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_visionai_v1_ProcessorIOSpec_GraphOutputChannelSpec_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_visionai_v1_ProcessorIOSpec_InstanceResourceInputBindingSpec_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_visionai_v1_ProcessorIOSpec_InstanceResourceInputBindingSpec_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_visionai_v1_ProcessorIOSpec_InstanceResourceOutputBindingSpec_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_visionai_v1_ProcessorIOSpec_InstanceResourceOutputBindingSpec_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_visionai_v1_CustomProcessorSourceInfo_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_visionai_v1_CustomProcessorSourceInfo_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_visionai_v1_CustomProcessorSourceInfo_ProductRecognizerArtifact_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_visionai_v1_CustomProcessorSourceInfo_ProductRecognizerArtifact_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_visionai_v1_CustomProcessorSourceInfo_ModelSchema_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_visionai_v1_CustomProcessorSourceInfo_ModelSchema_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_visionai_v1_CustomProcessorSourceInfo_AdditionalInfoEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_visionai_v1_CustomProcessorSourceInfo_AdditionalInfoEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_visionai_v1_ProcessorConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_visionai_v1_ProcessorConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_visionai_v1_StreamWithAnnotation_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_visionai_v1_StreamWithAnnotation_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_visionai_v1_StreamWithAnnotation_NodeAnnotation_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_visionai_v1_StreamWithAnnotation_NodeAnnotation_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_visionai_v1_ApplicationNodeAnnotation_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_visionai_v1_ApplicationNodeAnnotation_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_visionai_v1_ResourceAnnotations_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_visionai_v1_ResourceAnnotations_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_visionai_v1_VideoStreamInputConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_visionai_v1_VideoStreamInputConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_visionai_v1_AIEnabledDevicesInputConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_visionai_v1_AIEnabledDevicesInputConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_visionai_v1_MediaWarehouseConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_visionai_v1_MediaWarehouseConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_visionai_v1_PersonBlurConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_visionai_v1_PersonBlurConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_visionai_v1_OccupancyCountConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_visionai_v1_OccupancyCountConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_visionai_v1_PersonVehicleDetectionConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_visionai_v1_PersonVehicleDetectionConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_visionai_v1_PersonalProtectiveEquipmentDetectionConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_visionai_v1_PersonalProtectiveEquipmentDetectionConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_visionai_v1_GeneralObjectDetectionConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_visionai_v1_GeneralObjectDetectionConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_visionai_v1_BigQueryConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_visionai_v1_BigQueryConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_visionai_v1_BigQueryConfig_CloudFunctionMappingEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_visionai_v1_BigQueryConfig_CloudFunctionMappingEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_visionai_v1_VertexAutoMLVisionConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_visionai_v1_VertexAutoMLVisionConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_visionai_v1_VertexAutoMLVideoConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_visionai_v1_VertexAutoMLVideoConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_visionai_v1_VertexCustomConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_visionai_v1_VertexCustomConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_visionai_v1_GcsOutputConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_visionai_v1_GcsOutputConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_visionai_v1_UniversalInputConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_visionai_v1_UniversalInputConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_visionai_v1_MachineSpec_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_visionai_v1_MachineSpec_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_visionai_v1_AutoscalingMetricSpec_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_visionai_v1_AutoscalingMetricSpec_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_visionai_v1_DedicatedResources_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_visionai_v1_DedicatedResources_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_visionai_v1_ProductRecognizerConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_visionai_v1_ProductRecognizerConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_visionai_v1_TagRecognizerConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_visionai_v1_TagRecognizerConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_visionai_v1_TagParsingConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_visionai_v1_TagParsingConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_visionai_v1_TagParsingConfig_EntityParsingConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_visionai_v1_TagParsingConfig_EntityParsingConfig_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n\'google/cloud/visionai/v1/platform.prot" + + "o\022\030google.cloud.visionai.v1\032\034google/api/" + + "annotations.proto\032\027google/api/client.pro" + + "to\032\037google/api/field_behavior.proto\032\031goo" + + "gle/api/resource.proto\032*google/cloud/vis" + + "ionai/v1/annotations.proto\032%google/cloud" + + "/visionai/v1/common.proto\032#google/longru" + + "nning/operations.proto\032\036google/protobuf/" + + "duration.proto\032\033google/protobuf/empty.pr" + + "oto\032 google/protobuf/field_mask.proto\032\034g" + + "oogle/protobuf/struct.proto\032\037google/prot" + + "obuf/timestamp.proto\"$\n\"DeleteApplicatio" + + "nInstancesResponse\"$\n\"CreateApplicationI" + + "nstancesResponse\"$\n\"UpdateApplicationIns" + + "tancesResponse\"\312\001\n!CreateApplicationInst" + + "ancesRequest\0229\n\004name\030\001 \001(\tB+\340A\002\372A%\n#visi" + + "onai.googleapis.com/Application\022Q\n\025appli" + + "cation_instances\030\002 \003(\0132-.google.cloud.vi" + + "sionai.v1.ApplicationInstanceB\003\340A\002\022\027\n\nre" + + "quest_id\030\004 \001(\tB\003\340A\001\"\267\001\n!DeleteApplicatio" + + "nInstancesRequest\0229\n\004name\030\001 \001(\tB+\340A\002\372A%\n" + + "#visionai.googleapis.com/Application\022>\n\014" + + "instance_ids\030\002 \003(\tB(\340A\002\372A\"\n visionai.goo" + + "gleapis.com/Instance\022\027\n\nrequest_id\030\003 \001(\t" + + "B\003\340A\001\"\033\n\031DeployApplicationResponse\"\035\n\033Un" + + "deployApplicationResponse\"&\n$RemoveAppli" + + "cationStreamInputResponse\"#\n!AddApplicat" + + "ionStreamInputResponse\"&\n$UpdateApplicat" + + "ionStreamInputResponse\"\237\001\n\027ListApplicati" + + "onsRequest\022;\n\006parent\030\001 \001(\tB+\340A\002\372A%\022#visi" + + "onai.googleapis.com/Application\022\021\n\tpage_" + + "size\030\002 \001(\005\022\022\n\npage_token\030\003 \001(\t\022\016\n\006filter" + + "\030\004 \001(\t\022\020\n\010order_by\030\005 \001(\t\"\205\001\n\030ListApplica" + + "tionsResponse\022;\n\014applications\030\001 \003(\0132%.go" + + "ogle.cloud.visionai.v1.Application\022\027\n\017ne" + + "xt_page_token\030\002 \001(\t\022\023\n\013unreachable\030\003 \003(\t" + + "\"R\n\025GetApplicationRequest\0229\n\004name\030\001 \001(\tB" + + "+\340A\002\372A%\n#visionai.googleapis.com/Applica" + + "tion\"\316\001\n\030CreateApplicationRequest\022;\n\006par" + + "ent\030\001 \001(\tB+\340A\002\372A%\022#visionai.googleapis.c" + + "om/Application\022\033\n\016application_id\030\002 \001(\tB\003" + + "\340A\002\022?\n\013application\030\003 \001(\0132%.google.cloud." + + "visionai.v1.ApplicationB\003\340A\002\022\027\n\nrequest_" + + "id\030\004 \001(\tB\003\340A\001\"\252\001\n\030UpdateApplicationReque" + + "st\0224\n\013update_mask\030\001 \001(\0132\032.google.protobu" + + "f.FieldMaskB\003\340A\001\022?\n\013application\030\002 \001(\0132%." + + "google.cloud.visionai.v1.ApplicationB\003\340A" + + "\002\022\027\n\nrequest_id\030\003 \001(\tB\003\340A\001\"\202\001\n\030DeleteApp" + + "licationRequest\0229\n\004name\030\001 \001(\tB+\340A\002\372A%\n#v" + + "isionai.googleapis.com/Application\022\027\n\nre" + + "quest_id\030\002 \001(\tB\003\340A\001\022\022\n\005force\030\003 \001(\010B\003\340A\001\"" + + "\245\001\n\030DeployApplicationRequest\0229\n\004name\030\001 \001" + + "(\tB+\340A\002\372A%\n#visionai.googleapis.com/Appl" + + "ication\022\025\n\rvalidate_only\030\002 \001(\010\022\027\n\nreques" + + "t_id\030\003 \001(\tB\003\340A\001\022\036\n\021enable_monitoring\030\004 \001" + + "(\010B\003\340A\001\"p\n\032UndeployApplicationRequest\0229\n" + + "\004name\030\001 \001(\tB+\340A\002\372A%\n#visionai.googleapis" + + ".com/Application\022\027\n\nrequest_id\030\002 \001(\tB\003\340A" + + "\001\"h\n\026ApplicationStreamInput\022N\n\026stream_wi" + + "th_annotation\030\001 \001(\0132..google.cloud.visio" + + "nai.v1.StreamWithAnnotation\"\313\001\n AddAppli" + + "cationStreamInputRequest\0229\n\004name\030\001 \001(\tB+" + + "\340A\002\372A%\n#visionai.googleapis.com/Applicat" + + "ion\022S\n\031application_stream_inputs\030\002 \003(\01320" + + ".google.cloud.visionai.v1.ApplicationStr" + + "eamInput\022\027\n\nrequest_id\030\003 \001(\tB\003\340A\001\"\345\001\n#Up" + + "dateApplicationStreamInputRequest\0229\n\004nam" + + "e\030\001 \001(\tB+\340A\002\372A%\n#visionai.googleapis.com" + + "/Application\022S\n\031application_stream_input" + + "s\030\002 \003(\01320.google.cloud.visionai.v1.Appli" + + "cationStreamInput\022\027\n\nrequest_id\030\003 \001(\tB\003\340" + + "A\001\022\025\n\rallow_missing\030\004 \001(\010\"\262\002\n#RemoveAppl" + + "icationStreamInputRequest\0229\n\004name\030\001 \001(\tB" + + "+\340A\002\372A%\n#visionai.googleapis.com/Applica" + + "tion\022m\n\024target_stream_inputs\030\002 \003(\0132O.goo" + + "gle.cloud.visionai.v1.RemoveApplicationS" + + "treamInputRequest.TargetStreamInput\022\027\n\nr" + + "equest_id\030\003 \001(\tB\003\340A\001\032H\n\021TargetStreamInpu" + + "t\0223\n\006stream\030\001 \001(\tB#\372A \n\036visionai.googlea" + + "pis.com/Stream\"\231\001\n\024ListInstancesRequest\022" + + "8\n\006parent\030\001 \001(\tB(\340A\002\372A\"\022 visionai.google" + + "apis.com/Instance\022\021\n\tpage_size\030\002 \001(\005\022\022\n\n" + + "page_token\030\003 \001(\t\022\016\n\006filter\030\004 \001(\t\022\020\n\010orde" + + "r_by\030\005 \001(\t\"|\n\025ListInstancesResponse\0225\n\ti" + + "nstances\030\001 \003(\0132\".google.cloud.visionai.v" + + "1.Instance\022\027\n\017next_page_token\030\002 \001(\t\022\023\n\013u" + + "nreachable\030\003 \003(\t\"L\n\022GetInstanceRequest\0226" + + "\n\004name\030\001 \001(\tB(\340A\002\372A\"\n visionai.googleapi" + + "s.com/Instance\"\223\001\n\021ListDraftsRequest\0225\n\006" + + "parent\030\001 \001(\tB%\340A\002\372A\037\022\035visionai.googleapi" + + "s.com/Draft\022\021\n\tpage_size\030\002 \001(\005\022\022\n\npage_t" + + "oken\030\003 \001(\t\022\016\n\006filter\030\004 \001(\t\022\020\n\010order_by\030\005" + + " \001(\t\"s\n\022ListDraftsResponse\022/\n\006drafts\030\001 \003" + + "(\0132\037.google.cloud.visionai.v1.Draft\022\027\n\017n" + + "ext_page_token\030\002 \001(\t\022\023\n\013unreachable\030\003 \003(" + + "\t\"F\n\017GetDraftRequest\0223\n\004name\030\001 \001(\tB%\340A\002\372" + + "A\037\n\035visionai.googleapis.com/Draft\"\260\001\n\022Cr" + + "eateDraftRequest\0225\n\006parent\030\001 \001(\tB%\340A\002\372A\037" + + "\022\035visionai.googleapis.com/Draft\022\025\n\010draft" + + "_id\030\002 \001(\tB\003\340A\002\0223\n\005draft\030\003 \001(\0132\037.google.c" + + "loud.visionai.v1.DraftB\003\340A\002\022\027\n\nrequest_i" + + "d\030\004 \001(\tB\003\340A\001\"\257\001\n\022UpdateDraftRequest\0224\n\013u" + + "pdate_mask\030\001 \001(\0132\032.google.protobuf.Field" + + "MaskB\003\340A\001\0223\n\005draft\030\002 \001(\0132\037.google.cloud." + + "visionai.v1.DraftB\003\340A\002\022\027\n\nrequest_id\030\003 \001" + + "(\tB\003\340A\001\022\025\n\rallow_missing\030\004 \001(\010\"\255\003\n!Updat" + + "eApplicationInstancesRequest\0229\n\004name\030\001 \001" + + "(\tB+\340A\002\372A%\n#visionai.googleapis.com/Appl" + + "ication\022t\n\025application_instances\030\002 \003(\0132U" + + ".google.cloud.visionai.v1.UpdateApplicat" + + "ionInstancesRequest.UpdateApplicationIns" + + "tance\022\027\n\nrequest_id\030\003 \001(\tB\003\340A\001\022\025\n\rallow_" + + "missing\030\004 \001(\010\032\246\001\n\031UpdateApplicationInsta" + + "nce\0224\n\013update_mask\030\001 \001(\0132\032.google.protob" + + "uf.FieldMaskB\003\340A\001\0229\n\010instance\030\002 \001(\0132\".go" + + "ogle.cloud.visionai.v1.InstanceB\003\340A\002\022\030\n\013" + + "instance_id\030\003 \001(\tB\003\340A\002\"b\n\022DeleteDraftReq" + + "uest\0223\n\004name\030\001 \001(\tB%\340A\002\372A\037\n\035visionai.goo" + + "gleapis.com/Draft\022\027\n\nrequest_id\030\002 \001(\tB\003\340" + + "A\001\"\233\001\n\025ListProcessorsRequest\0229\n\006parent\030\001" + + " \001(\tB)\340A\002\372A#\022!visionai.googleapis.com/Pr" + + "ocessor\022\021\n\tpage_size\030\002 \001(\005\022\022\n\npage_token" + + "\030\003 \001(\t\022\016\n\006filter\030\004 \001(\t\022\020\n\010order_by\030\005 \001(\t" + + "\"\177\n\026ListProcessorsResponse\0227\n\nprocessors" + + "\030\001 \003(\0132#.google.cloud.visionai.v1.Proces" + + "sor\022\027\n\017next_page_token\030\002 \001(\t\022\023\n\013unreacha" + + "ble\030\003 \003(\t\"Z\n\035ListPrebuiltProcessorsReque" + + "st\0229\n\006parent\030\001 \001(\tB)\340A\002\372A#\022!visionai.goo" + + "gleapis.com/Processor\"Y\n\036ListPrebuiltPro" + + "cessorsResponse\0227\n\nprocessors\030\001 \003(\0132#.go" + + "ogle.cloud.visionai.v1.Processor\"N\n\023GetP" + + "rocessorRequest\0227\n\004name\030\001 \001(\tB)\340A\002\372A#\n!v" + + "isionai.googleapis.com/Processor\"\304\001\n\026Cre" + + "ateProcessorRequest\0229\n\006parent\030\001 \001(\tB)\340A\002" + + "\372A#\022!visionai.googleapis.com/Processor\022\031" + + "\n\014processor_id\030\002 \001(\tB\003\340A\002\022;\n\tprocessor\030\003" + + " \001(\0132#.google.cloud.visionai.v1.Processo" + + "rB\003\340A\002\022\027\n\nrequest_id\030\004 \001(\tB\003\340A\001\"\244\001\n\026Upda" + + "teProcessorRequest\0224\n\013update_mask\030\001 \001(\0132" + + "\032.google.protobuf.FieldMaskB\003\340A\001\022;\n\tproc" + + "essor\030\002 \001(\0132#.google.cloud.visionai.v1.P" + + "rocessorB\003\340A\002\022\027\n\nrequest_id\030\003 \001(\tB\003\340A\001\"j" + + "\n\026DeleteProcessorRequest\0227\n\004name\030\001 \001(\tB)" + + "\340A\002\372A#\n!visionai.googleapis.com/Processo" + + "r\022\027\n\nrequest_id\030\002 \001(\tB\003\340A\001\"\332\n\n\013Applicati" + + "on\022\014\n\004name\030\001 \001(\t\0224\n\013create_time\030\002 \001(\0132\032." + + "google.protobuf.TimestampB\003\340A\003\0224\n\013update" + + "_time\030\003 \001(\0132\032.google.protobuf.TimestampB" + + "\003\340A\003\022A\n\006labels\030\004 \003(\01321.google.cloud.visi" + + "onai.v1.Application.LabelsEntry\022\031\n\014displ" + + "ay_name\030\005 \001(\tB\003\340A\002\022\023\n\013description\030\006 \001(\t\022" + + "I\n\023application_configs\030\007 \001(\0132,.google.cl" + + "oud.visionai.v1.ApplicationConfigs\022W\n\014ru" + + "ntime_info\030\010 \001(\0132<.google.cloud.visionai" + + ".v1.Application.ApplicationRuntimeInfoB\003" + + "\340A\003\022?\n\005state\030\t \001(\0162+.google.cloud.vision" + + "ai.v1.Application.StateB\003\340A\003\022G\n\014billing_" + + "mode\030\014 \001(\01621.google.cloud.visionai.v1.Ap" + + "plication.BillingMode\032\241\003\n\026ApplicationRun" + + "timeInfo\022/\n\013deploy_time\030\001 \001(\0132\032.google.p" + + "rotobuf.Timestamp\022r\n\027global_output_resou" + + "rces\030\003 \003(\0132Q.google.cloud.visionai.v1.Ap" + + "plication.ApplicationRuntimeInfo.GlobalO" + + "utputResource\022h\n\021monitoring_config\030\004 \001(\013" + + "2M.google.cloud.visionai.v1.Application." + + "ApplicationRuntimeInfo.MonitoringConfig\032" + + "S\n\024GlobalOutputResource\022\027\n\017output_resour" + + "ce\030\001 \001(\t\022\025\n\rproducer_node\030\002 \001(\t\022\013\n\003key\030\003" + + " \001(\t\032#\n\020MonitoringConfig\022\017\n\007enabled\030\001 \001(" + + "\010\032-\n\013LabelsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002" + + " \001(\t:\0028\001\"\247\001\n\005State\022\025\n\021STATE_UNSPECIFIED\020" + + "\000\022\013\n\007CREATED\020\001\022\r\n\tDEPLOYING\020\002\022\014\n\010DEPLOYE" + + "D\020\003\022\017\n\013UNDEPLOYING\020\004\022\013\n\007DELETED\020\005\022\t\n\005ERR" + + "OR\020\006\022\014\n\010CREATING\020\007\022\014\n\010UPDATING\020\010\022\014\n\010DELE" + + "TING\020\t\022\n\n\006FIXING\020\n\"B\n\013BillingMode\022\034\n\030BIL" + + "LING_MODE_UNSPECIFIED\020\000\022\010\n\004PAYG\020\001\022\013\n\007MON" + + "THLY\020\002:o\352Al\n#visionai.googleapis.com/App" + + "lication\022Bprojects/{project}/locations/{" + + "location}/applications/{application}R\001\001\"" + + "\212\002\n\022ApplicationConfigs\022-\n\005nodes\030\001 \003(\0132\036." + + "google.cloud.visionai.v1.Node\022_\n\025event_d" + + "elivery_config\030\003 \001(\0132@.google.cloud.visi" + + "onai.v1.ApplicationConfigs.EventDelivery" + + "Config\032d\n\023EventDeliveryConfig\022\017\n\007channel" + + "\030\001 \001(\t\022<\n\031minimal_delivery_interval\030\002 \001(" + + "\0132\031.google.protobuf.Duration\"\347\002\n\004Node\022.\n" + + "$output_all_output_channels_to_stream\030\006 " + + "\001(\010H\000\022\021\n\004name\030\001 \001(\tB\003\340A\002\022\024\n\014display_name" + + "\030\002 \001(\t\022>\n\013node_config\030\003 \001(\0132).google.clo" + + "ud.visionai.v1.ProcessorConfig\022\021\n\tproces" + + "sor\030\004 \001(\t\0229\n\007parents\030\005 \003(\0132(.google.clou" + + "d.visionai.v1.Node.InputEdge\032`\n\tInputEdg" + + "e\022\023\n\013parent_node\030\001 \001(\t\022\035\n\025parent_output_" + + "channel\030\002 \001(\t\022\037\n\027connected_input_channel" + + "\030\003 \001(\tB\026\n\024stream_output_config\"\350\003\n\005Draft" + + "\022\014\n\004name\030\001 \001(\t\0224\n\013create_time\030\002 \001(\0132\032.go" + + "ogle.protobuf.TimestampB\003\340A\003\0224\n\013update_t" + + "ime\030\007 \001(\0132\032.google.protobuf.TimestampB\003\340" + + "A\003\022;\n\006labels\030\003 \003(\0132+.google.cloud.vision" + + "ai.v1.Draft.LabelsEntry\022\031\n\014display_name\030" + + "\004 \001(\tB\003\340A\002\022\023\n\013description\030\005 \001(\t\022O\n\031draft" + + "_application_configs\030\006 \001(\0132,.google.clou" + + "d.visionai.v1.ApplicationConfigs\032-\n\013Labe" + + "lsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001:" + + "x\352Au\n\035visionai.googleapis.com/Draft\022Qpro" + + "jects/{project}/locations/{location}/app" + + "lications/{application}/drafts/{draft}R\001" + + "\001\"\324\013\n\010Instance\022\021\n\004name\030\001 \001(\tB\003\340A\003\0224\n\013cre" + + "ate_time\030\002 \001(\0132\032.google.protobuf.Timesta" + + "mpB\003\340A\003\0224\n\013update_time\030\010 \001(\0132\032.google.pr" + + "otobuf.TimestampB\003\340A\003\022>\n\006labels\030\003 \003(\0132.." + + "google.cloud.visionai.v1.Instance.Labels" + + "Entry\022\031\n\014display_name\030\004 \001(\tB\003\340A\002\022\023\n\013desc" + + "ription\030\005 \001(\t\022F\n\rinstance_type\030\n \001(\0162/.g" + + "oogle.cloud.visionai.v1.Instance.Instanc" + + "eType\022I\n\017input_resources\030\006 \003(\01320.google." + + "cloud.visionai.v1.Instance.InputResource" + + "\022K\n\020output_resources\030\007 \003(\01321.google.clou" + + "d.visionai.v1.Instance.OutputResource\0227\n" + + "\005state\030\t \001(\0162(.google.cloud.visionai.v1." + + "Instance.State\032\311\002\n\rInputResource\022\030\n\016inpu" + + "t_resource\030\001 \001(\tH\000\022N\n\020annotated_stream\030\004" + + " \001(\0132..google.cloud.visionai.v1.StreamWi" + + "thAnnotationB\002\030\001H\000\0225\n\tdata_type\030\006 \001(\0162\"." + + "google.cloud.visionai.v1.DataType\022\025\n\rcon" + + "sumer_node\030\002 \001(\t\022\036\n\026input_resource_bindi" + + "ng\030\003 \001(\t\022B\n\013annotations\030\005 \001(\0132-.google.c" + + "loud.visionai.v1.ResourceAnnotationsB\034\n\032" + + "input_resource_information\032\222\001\n\016OutputRes" + + "ource\022\027\n\017output_resource\030\001 \001(\t\022\025\n\rproduc" + + "er_node\030\002 \001(\t\022\037\n\027output_resource_binding" + + "\030\004 \001(\t\022\031\n\014is_temporary\030\003 \001(\010B\003\340A\003\022\024\n\007aut" + + "ogen\030\005 \001(\010B\003\340A\003\032-\n\013LabelsEntry\022\013\n\003key\030\001 " + + "\001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"t\n\014InstanceType\022\035" + + "\n\031INSTANCE_TYPE_UNSPECIFIED\020\000\022\030\n\024STREAMI" + + "NG_PREDICTION\020\001\022\024\n\020BATCH_PREDICTION\020\002\022\025\n" + + "\021ONLINE_PREDICTION\020\003\"\265\001\n\005State\022\025\n\021STATE_" + + "UNSPECIFIED\020\000\022\014\n\010CREATING\020\001\022\013\n\007CREATED\020\002" + + "\022\r\n\tDEPLOYING\020\003\022\014\n\010DEPLOYED\020\004\022\017\n\013UNDEPLO" + + "YING\020\005\022\013\n\007DELETED\020\006\022\t\n\005ERROR\020\007\022\014\n\010UPDATI" + + "NG\020\010\022\014\n\010DELETING\020\t\022\n\n\006FIXING\020\n\022\014\n\010FINISH" + + "ED\020\013:\201\001\352A~\n visionai.googleapis.com/Inst" + + "ance\022Wprojects/{project}/locations/{loca" + + "tion}/applications/{application}/instanc" + + "es/{instance}R\001\001\"j\n\023ApplicationInstance\022" + + "\030\n\013instance_id\030\001 \001(\tB\003\340A\002\0229\n\010instance\030\002 " + + "\001(\0132\".google.cloud.visionai.v1.InstanceB" + + "\003\340A\002\"\274\t\n\tProcessor\022\014\n\004name\030\001 \001(\t\0224\n\013crea" + + "te_time\030\002 \001(\0132\032.google.protobuf.Timestam" + + "pB\003\340A\003\0224\n\013update_time\030\003 \001(\0132\032.google.pro" + + "tobuf.TimestampB\003\340A\003\022?\n\006labels\030\004 \003(\0132/.g" + + "oogle.cloud.visionai.v1.Processor.Labels" + + "Entry\022\031\n\014display_name\030\005 \001(\tB\003\340A\002\022\023\n\013desc" + + "ription\030\n \001(\t\022N\n\016processor_type\030\006 \001(\01621." + + "google.cloud.visionai.v1.Processor.Proce" + + "ssorTypeB\003\340A\003\0227\n\nmodel_type\030\r \001(\0162#.goog" + + "le.cloud.visionai.v1.ModelType\022Y\n\034custom" + + "_processor_source_info\030\007 \001(\01323.google.cl" + + "oud.visionai.v1.CustomProcessorSourceInf" + + "o\022F\n\005state\030\010 \001(\01622.google.cloud.visionai" + + ".v1.Processor.ProcessorStateB\003\340A\003\022I\n\021pro" + + "cessor_io_spec\030\013 \001(\0132).google.cloud.visi" + + "onai.v1.ProcessorIOSpecB\003\340A\003\022\"\n\025configur" + + "ation_typeurl\030\016 \001(\tB\003\340A\003\022W\n\032supported_an" + + "notation_types\030\017 \003(\0162..google.cloud.visi" + + "onai.v1.StreamAnnotationTypeB\003\340A\003\022 \n\030sup" + + "ports_post_processing\030\021 \001(\010\022Q\n\030supported" + + "_instance_types\030\022 \003(\0162/.google.cloud.vis" + + "ionai.v1.Instance.InstanceType\032-\n\013Labels" + + "Entry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"Z\n" + + "\rProcessorType\022\036\n\032PROCESSOR_TYPE_UNSPECI" + + "FIED\020\000\022\016\n\nPRETRAINED\020\001\022\n\n\006CUSTOM\020\002\022\r\n\tCO" + + "NNECTOR\020\003\"e\n\016ProcessorState\022\037\n\033PROCESSOR" + + "_STATE_UNSPECIFIED\020\000\022\014\n\010CREATING\020\001\022\n\n\006AC" + + "TIVE\020\002\022\014\n\010DELETING\020\003\022\n\n\006FAILED\020\004:i\352Af\n!v" + + "isionai.googleapis.com/Processor\022>projec" + + "ts/{project}/locations/{location}/proces" + + "sors/{processor}R\001\001\"\326\007\n\017ProcessorIOSpec\022" + + "b\n\031graph_input_channel_specs\030\003 \003(\0132?.goo" + + "gle.cloud.visionai.v1.ProcessorIOSpec.Gr" + + "aphInputChannelSpec\022d\n\032graph_output_chan" + + "nel_specs\030\004 \003(\0132@.google.cloud.visionai." + + "v1.ProcessorIOSpec.GraphOutputChannelSpe" + + "c\022y\n%instance_resource_input_binding_spe" + + "cs\030\005 \003(\0132J.google.cloud.visionai.v1.Proc" + + "essorIOSpec.InstanceResourceInputBinding" + + "Spec\022{\n&instance_resource_output_binding" + + "_specs\030\006 \003(\0132K.google.cloud.visionai.v1." + + "ProcessorIOSpec.InstanceResourceOutputBi" + + "ndingSpec\032\257\001\n\025GraphInputChannelSpec\022\014\n\004n" + + "ame\030\001 \001(\t\0225\n\tdata_type\030\002 \001(\0162\".google.cl" + + "oud.visionai.v1.DataType\022\037\n\027accepted_dat" + + "a_type_uris\030\005 \003(\t\022\020\n\010required\030\003 \001(\010\022\036\n\026m" + + "ax_connection_allowed\030\004 \001(\003\032t\n\026GraphOutp" + + "utChannelSpec\022\014\n\004name\030\001 \001(\t\0225\n\tdata_type" + + "\030\002 \001(\0162\".google.cloud.visionai.v1.DataTy" + + "pe\022\025\n\rdata_type_uri\030\003 \001(\t\032y\n InstanceRes" + + "ourceInputBindingSpec\022\031\n\017config_type_uri" + + "\030\002 \001(\tH\000\022\033\n\021resource_type_uri\030\003 \001(\tH\000\022\014\n" + + "\004name\030\001 \001(\tB\017\n\rresource_type\032^\n!Instance" + + "ResourceOutputBindingSpec\022\014\n\004name\030\001 \001(\t\022" + + "\031\n\021resource_type_uri\030\002 \001(\t\022\020\n\010explicit\030\003" + + " \001(\010\"\244\007\n\031CustomProcessorSourceInfo\022\026\n\014ve" + + "rtex_model\030\002 \001(\tH\000\022t\n\033product_recognizer" + + "_artifact\030\003 \001(\0132M.google.cloud.visionai." + + "v1.CustomProcessorSourceInfo.ProductReco" + + "gnizerArtifactH\000\022S\n\013source_type\030\001 \001(\0162>." + + "google.cloud.visionai.v1.CustomProcessor" + + "SourceInfo.SourceType\022e\n\017additional_info" + + "\030\004 \003(\0132G.google.cloud.visionai.v1.Custom" + + "ProcessorSourceInfo.AdditionalInfoEntryB" + + "\003\340A\003\022U\n\014model_schema\030\005 \001(\0132?.google.clou" + + "d.visionai.v1.CustomProcessorSourceInfo." + + "ModelSchema\032e\n\031ProductRecognizerArtifact" + + "\022-\n retail_product_recognition_index\030\001 \001" + + "(\tB\003\340A\002\022\031\n\014vertex_model\030\002 \001(\tB\003\340A\001\032\315\001\n\013M" + + "odelSchema\022=\n\020instances_schema\030\001 \001(\0132#.g" + + "oogle.cloud.visionai.v1.GcsSource\022>\n\021par" + + "ameters_schema\030\002 \001(\0132#.google.cloud.visi" + + "onai.v1.GcsSource\022?\n\022predictions_schema\030" + + "\003 \001(\0132#.google.cloud.visionai.v1.GcsSour" + + "ce\0325\n\023AdditionalInfoEntry\022\013\n\003key\030\001 \001(\t\022\r" + + "\n\005value\030\002 \001(\t:\0028\001\"g\n\nSourceType\022\033\n\027SOURC" + + "E_TYPE_UNSPECIFIED\020\000\022\021\n\rVERTEX_AUTOML\020\001\022" + + "\021\n\rVERTEX_CUSTOM\020\002\022\026\n\022PRODUCT_RECOGNIZER" + + "\020\003B\017\n\rartifact_path\"\322\013\n\017ProcessorConfig\022" + + "U\n\031video_stream_input_config\030\t \001(\01320.goo" + + "gle.cloud.visionai.v1.VideoStreamInputCo" + + "nfigH\000\022`\n\037ai_enabled_devices_input_confi" + + "g\030\024 \001(\01325.google.cloud.visionai.v1.AIEna" + + "bledDevicesInputConfigH\000\022P\n\026media_wareho" + + "use_config\030\n \001(\0132..google.cloud.visionai" + + ".v1.MediaWarehouseConfigH\000\022H\n\022person_blu" + + "r_config\030\013 \001(\0132*.google.cloud.visionai.v" + + "1.PersonBlurConfigH\000\022P\n\026occupancy_count_" + + "config\030\014 \001(\0132..google.cloud.visionai.v1." + + "OccupancyCountConfigH\000\022a\n\037person_vehicle" + + "_detection_config\030\017 \001(\01326.google.cloud.v" + + "isionai.v1.PersonVehicleDetectionConfigH" + + "\000\022Y\n\033vertex_automl_vision_config\030\r \001(\01322" + + ".google.cloud.visionai.v1.VertexAutoMLVi" + + "sionConfigH\000\022W\n\032vertex_automl_video_conf" + + "ig\030\016 \001(\01321.google.cloud.visionai.v1.Vert" + + "exAutoMLVideoConfigH\000\022L\n\024vertex_custom_c" + + "onfig\030\021 \001(\0132,.google.cloud.visionai.v1.V" + + "ertexCustomConfigH\000\022a\n\037general_object_de" + + "tection_config\030\022 \001(\01326.google.cloud.visi" + + "onai.v1.GeneralObjectDetectionConfigH\000\022D" + + "\n\020big_query_config\030\023 \001(\0132(.google.cloud." + + "visionai.v1.BigQueryConfigH\000\022F\n\021gcs_outp" + + "ut_config\030\033 \001(\0132).google.cloud.visionai." + + "v1.GcsOutputConfigH\000\022V\n\031product_recogniz" + + "er_config\030\025 \001(\01321.google.cloud.visionai." + + "v1.ProductRecognizerConfigH\000\022~\n.personal" + + "_protective_equipment_detection_config\030\026" + + " \001(\0132D.google.cloud.visionai.v1.Personal" + + "ProtectiveEquipmentDetectionConfigH\000\022N\n\025" + + "tag_recognizer_config\030\031 \001(\0132-.google.clo" + + "ud.visionai.v1.TagRecognizerConfigH\000\022P\n\026" + + "universal_input_config\030\034 \001(\0132..google.cl" + + "oud.visionai.v1.UniversalInputConfigH\000\0224" + + "\n\023experimental_config\030\032 \001(\0132\027.google.pro" + + "tobuf.StructB\022\n\020processor_config\"\322\002\n\024Str" + + "eamWithAnnotation\0223\n\006stream\030\001 \001(\tB#\372A \n\036" + + "visionai.googleapis.com/Stream\022K\n\027applic" + + "ation_annotations\030\002 \003(\0132*.google.cloud.v" + + "isionai.v1.StreamAnnotation\022W\n\020node_anno" + + "tations\030\003 \003(\0132=.google.cloud.visionai.v1" + + ".StreamWithAnnotation.NodeAnnotation\032_\n\016" + + "NodeAnnotation\022\014\n\004node\030\001 \001(\t\022?\n\013annotati" + + "ons\030\002 \003(\0132*.google.cloud.visionai.v1.Str" + + "eamAnnotation\"j\n\031ApplicationNodeAnnotati" + + "on\022\014\n\004node\030\001 \001(\t\022?\n\013annotations\030\002 \003(\0132*." + + "google.cloud.visionai.v1.StreamAnnotatio" + + "n\"\261\001\n\023ResourceAnnotations\022K\n\027application" + + "_annotations\030\001 \003(\0132*.google.cloud.vision" + + "ai.v1.StreamAnnotation\022M\n\020node_annotatio" + + "ns\030\002 \003(\01323.google.cloud.visionai.v1.Appl" + + "icationNodeAnnotation\"\202\001\n\026VideoStreamInp" + + "utConfig\022\023\n\007streams\030\001 \003(\tB\002\030\001\022S\n\027streams" + + "_with_annotation\030\002 \003(\0132..google.cloud.vi" + + "sionai.v1.StreamWithAnnotationB\002\030\001\"\035\n\033AI" + + "EnabledDevicesInputConfig\"b\n\024MediaWareho" + + "useConfig\022\016\n\006corpus\030\001 \001(\t\022\022\n\006region\030\002 \001(" + + "\tB\002\030\001\022&\n\003ttl\030\003 \001(\0132\031.google.protobuf.Dur" + + "ation\"\325\001\n\020PersonBlurConfig\022S\n\020person_blu" + + "r_type\030\001 \001(\01629.google.cloud.visionai.v1." + + "PersonBlurConfig.PersonBlurType\022\022\n\nfaces" + + "_only\030\002 \001(\010\"X\n\016PersonBlurType\022 \n\034PERSON_" + + "BLUR_TYPE_UNSPECIFIED\020\000\022\023\n\017FULL_OCCULUSI" + + "ON\020\001\022\017\n\013BLUR_FILTER\020\002\"~\n\024OccupancyCountC" + + "onfig\022\036\n\026enable_people_counting\030\001 \001(\010\022\037\n" + + "\027enable_vehicle_counting\030\002 \001(\010\022%\n\035enable" + + "_dwelling_time_tracking\030\003 \001(\010\"_\n\034PersonV" + + "ehicleDetectionConfig\022\036\n\026enable_people_c" + + "ounting\030\001 \001(\010\022\037\n\027enable_vehicle_counting" + + "\030\002 \001(\010\"\245\001\n*PersonalProtectiveEquipmentDe" + + "tectionConfig\022&\n\036enable_face_coverage_de" + + "tection\030\001 \001(\010\022&\n\036enable_head_coverage_de" + + "tection\030\002 \001(\010\022\'\n\037enable_hands_coverage_d", + "etection\030\003 \001(\010\"\036\n\034GeneralObjectDetection" + + "Config\"\354\001\n\016BigQueryConfig\022\r\n\005table\030\001 \001(\t" + + "\022b\n\026cloud_function_mapping\030\002 \003(\0132B.googl" + + "e.cloud.visionai.v1.BigQueryConfig.Cloud" + + "FunctionMappingEntry\022*\n\"create_default_t" + + "able_if_not_exists\030\003 \001(\010\032;\n\031CloudFunctio" + + "nMappingEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(" + + "\t:\0028\001\"Q\n\030VertexAutoMLVisionConfig\022\034\n\024con" + + "fidence_threshold\030\001 \001(\002\022\027\n\017max_predictio" + + "ns\030\002 \001(\005\"\211\001\n\027VertexAutoMLVideoConfig\022\034\n\024" + + "confidence_threshold\030\001 \001(\002\022\026\n\016blocked_la" + + "bels\030\002 \003(\t\022\027\n\017max_predictions\030\003 \001(\005\022\037\n\027b" + + "ounding_box_size_limit\030\004 \001(\002\"\225\002\n\022VertexC" + + "ustomConfig\022\032\n\022max_prediction_fps\030\001 \001(\005\022" + + "I\n\023dedicated_resources\030\002 \001(\0132,.google.cl" + + "oud.visionai.v1.DedicatedResources\022&\n\036po" + + "st_processing_cloud_function\030\003 \001(\t\022#\n\033at" + + "tach_application_metadata\030\004 \001(\010\022,\n\032dynam" + + "ic_config_input_topic\030\006 \001(\tB\003\340A\001H\000\210\001\001B\035\n" + + "\033_dynamic_config_input_topic\"#\n\017GcsOutpu" + + "tConfig\022\020\n\010gcs_path\030\001 \001(\t\"\026\n\024UniversalIn" + + "putConfig\"\215\001\n\013MachineSpec\022\031\n\014machine_typ" + + "e\030\001 \001(\tB\003\340A\005\022H\n\020accelerator_type\030\002 \001(\0162)" + + ".google.cloud.visionai.v1.AcceleratorTyp" + + "eB\003\340A\005\022\031\n\021accelerator_count\030\003 \001(\005\"A\n\025Aut" + + "oscalingMetricSpec\022\030\n\013metric_name\030\001 \001(\tB" + + "\003\340A\002\022\016\n\006target\030\002 \001(\005\"\364\001\n\022DedicatedResour" + + "ces\022C\n\014machine_spec\030\001 \001(\0132%.google.cloud" + + ".visionai.v1.MachineSpecB\006\340A\002\340A\005\022!\n\021min_" + + "replica_count\030\002 \001(\005B\006\340A\002\340A\005\022\036\n\021max_repli" + + "ca_count\030\003 \001(\005B\003\340A\005\022V\n\030autoscaling_metri" + + "c_specs\030\004 \003(\0132/.google.cloud.visionai.v1" + + ".AutoscalingMetricSpecB\003\340A\005\"\\\n\027ProductRe" + + "cognizerConfig\022\027\n\017retail_endpoint\030\001 \001(\t\022" + + "(\n recognition_confidence_threshold\030\002 \001(" + + "\002\"\214\001\n\023TagRecognizerConfig\022-\n%entity_dete" + + "ction_confidence_threshold\030\001 \001(\002\022F\n\022tag_" + + "parsing_config\030\002 \001(\0132*.google.cloud.visi" + + "onai.v1.TagParsingConfig\"\252\003\n\020TagParsingC" + + "onfig\022^\n\026entity_parsing_configs\030\001 \003(\0132>." + + "google.cloud.visionai.v1.TagParsingConfi" + + "g.EntityParsingConfig\032\265\002\n\023EntityParsingC" + + "onfig\022\031\n\014entity_class\030\001 \001(\tB\003\340A\002\022\022\n\005rege" + + "x\030\002 \001(\tB\003\340A\001\022|\n\030entity_matching_strategy" + + "\030\003 \001(\0162U.google.cloud.visionai.v1.TagPar" + + "singConfig.EntityParsingConfig.EntityMat" + + "chingStrategyB\003\340A\001\"q\n\026EntityMatchingStra" + + "tegy\022(\n$ENTITY_MATCHING_STRATEGY_UNSPECI" + + "FIED\020\000\022\027\n\023MULTI_LINE_MATCHING\020\001\022\024\n\020MAX_O" + + "VERLAP_AREA\020\002*\240\002\n\tModelType\022\032\n\026MODEL_TYP" + + "E_UNSPECIFIED\020\000\022\030\n\024IMAGE_CLASSIFICATION\020" + + "\001\022\024\n\020OBJECT_DETECTION\020\002\022\030\n\024VIDEO_CLASSIF" + + "ICATION\020\003\022\031\n\025VIDEO_OBJECT_TRACKING\020\004\022\034\n\030" + + "VIDEO_ACTION_RECOGNITION\020\005\022\026\n\022OCCUPANCY_" + + "COUNTING\020\006\022\017\n\013PERSON_BLUR\020\007\022\021\n\rVERTEX_CU" + + "STOM\020\010\022\026\n\022PRODUCT_RECOGNIZER\020\t\022\022\n\016TAG_RE" + + "COGNIZER\020\n\022\014\n\010SYNTH_ID\020\017*\320\001\n\017Accelerator" + + "Type\022 \n\034ACCELERATOR_TYPE_UNSPECIFIED\020\000\022\024" + + "\n\020NVIDIA_TESLA_K80\020\001\022\025\n\021NVIDIA_TESLA_P10" + + "0\020\002\022\025\n\021NVIDIA_TESLA_V100\020\003\022\023\n\017NVIDIA_TES" + + "LA_P4\020\004\022\023\n\017NVIDIA_TESLA_T4\020\005\022\025\n\021NVIDIA_T" + + "ESLA_A100\020\010\022\n\n\006TPU_V2\020\006\022\n\n\006TPU_V3\020\007*W\n\010D" + + "ataType\022\031\n\025DATA_TYPE_UNSPECIFIED\020\000\022\t\n\005VI" + + "DEO\020\001\022\t\n\005IMAGE\020\003\022\t\n\005PROTO\020\002\022\017\n\013PLACEHOLD" + + "ER\020\0042\352-\n\013AppPlatform\022\274\001\n\020ListApplication" + + "s\0221.google.cloud.visionai.v1.ListApplica" + + "tionsRequest\0322.google.cloud.visionai.v1." + + "ListApplicationsResponse\"A\332A\006parent\202\323\344\223\002" + + "2\0220/v1/{parent=projects/*/locations/*}/a" + + "pplications\022\251\001\n\016GetApplication\022/.google." + + "cloud.visionai.v1.GetApplicationRequest\032" + + "%.google.cloud.visionai.v1.Application\"?" + + "\332A\004name\202\323\344\223\0022\0220/v1/{name=projects/*/loca" + + "tions/*/applications/*}\022\345\001\n\021CreateApplic" + + "ation\0222.google.cloud.visionai.v1.CreateA" + + "pplicationRequest\032\035.google.longrunning.O" + + "peration\"}\312A \n\013Application\022\021OperationMet" + + "adata\332A\022parent,application\202\323\344\223\002?\"0/v1/{p" + + "arent=projects/*/locations/*}/applicatio" + + "ns:\013application\022\367\001\n\021UpdateApplication\0222." + + "google.cloud.visionai.v1.UpdateApplicati" + + "onRequest\032\035.google.longrunning.Operation" + + "\"\216\001\312A \n\013Application\022\021OperationMetadata\332A" + + "\027application,update_mask\202\323\344\223\002K2\"9/v1/{name=projects/*/locations/*/a" + + "pplications/*}:undeploy:\001*\022\203\002\n\031AddApplic" + + "ationStreamInput\022:.google.cloud.visionai" + + ".v1.AddApplicationStreamInputRequest\032\035.g" + + "oogle.longrunning.Operation\"\212\001\312A6\n!AddAp" + + "plicationStreamInputResponse\022\021OperationM" + + "etadata\332A\004name\202\323\344\223\002D\"?/v1/{name=projects" + + "/*/locations/*/applications/*}:addStream" + + "Input:\001*\022\217\002\n\034RemoveApplicationStreamInpu" + + "t\022=.google.cloud.visionai.v1.RemoveAppli" + + "cationStreamInputRequest\032\035.google.longru" + + "nning.Operation\"\220\001\312A9\n$RemoveApplication" + + "StreamInputResponse\022\021OperationMetadata\332A" + + "\004name\202\323\344\223\002G\"B/v1/{name=projects/*/locati" + + "ons/*/applications/*}:removeStreamInput:" + + "\001*\022\217\002\n\034UpdateApplicationStreamInput\022=.go" + + "ogle.cloud.visionai.v1.UpdateApplication" + + "StreamInputRequest\032\035.google.longrunning." + + "Operation\"\220\001\312A9\n$UpdateApplicationStream" + + "InputResponse\022\021OperationMetadata\332A\004name\202" + + "\323\344\223\002G\"B/v1/{name=projects/*/locations/*/" + + "applications/*}:updateStreamInput:\001*\022\277\001\n" + + "\rListInstances\022..google.cloud.visionai.v" + + "1.ListInstancesRequest\032/.google.cloud.vi" + + "sionai.v1.ListInstancesResponse\"M\332A\006pare" + + "nt\202\323\344\223\002>\022\022 + * Message describing the Process object. + * + * + * Protobuf type {@code google.cloud.visionai.v1.Process} + */ +public final class Process extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.Process) + ProcessOrBuilder { + private static final long serialVersionUID = 0L; + // Use Process.newBuilder() to construct. + private Process(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Process() { + name_ = ""; + analysis_ = ""; + attributeOverrides_ = com.google.protobuf.LazyStringArrayList.emptyList(); + runMode_ = 0; + eventId_ = ""; + batchId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Process(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.LvaResourcesProto + .internal_static_google_cloud_visionai_v1_Process_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.LvaResourcesProto + .internal_static_google_cloud_visionai_v1_Process_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.Process.class, + com.google.cloud.visionai.v1.Process.Builder.class); + } + + private int bitField0_; + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * The name of resource.
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + 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(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * The name of resource.
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CREATE_TIME_FIELD_NUMBER = 2; + private com.google.protobuf.Timestamp createTime_; + /** + * + * + *
+   * Output only. The create timestamp.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * Output only. The create timestamp.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + /** + * + * + *
+   * Output only. The create timestamp.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + + public static final int UPDATE_TIME_FIELD_NUMBER = 3; + private com.google.protobuf.Timestamp updateTime_; + /** + * + * + *
+   * Output only. The update timestamp.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + @java.lang.Override + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+   * Output only. The update timestamp.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getUpdateTime() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + /** + * + * + *
+   * Output only. The update timestamp.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + + public static final int ANALYSIS_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object analysis_ = ""; + /** + * + * + *
+   * Required. Reference to an existing Analysis resource.
+   * 
+ * + * + * string analysis = 4 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The analysis. + */ + @java.lang.Override + public java.lang.String getAnalysis() { + java.lang.Object ref = analysis_; + 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(); + analysis_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Reference to an existing Analysis resource.
+   * 
+ * + * + * string analysis = 4 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for analysis. + */ + @java.lang.Override + public com.google.protobuf.ByteString getAnalysisBytes() { + java.lang.Object ref = analysis_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + analysis_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ATTRIBUTE_OVERRIDES_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList attributeOverrides_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + * + * + *
+   * Optional. Attribute overrides of the Analyzers.
+   * Format for each single override item:
+   * "{analyzer_name}:{attribute_key}={value}"
+   * 
+ * + * repeated string attribute_overrides = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the attributeOverrides. + */ + public com.google.protobuf.ProtocolStringList getAttributeOverridesList() { + return attributeOverrides_; + } + /** + * + * + *
+   * Optional. Attribute overrides of the Analyzers.
+   * Format for each single override item:
+   * "{analyzer_name}:{attribute_key}={value}"
+   * 
+ * + * repeated string attribute_overrides = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of attributeOverrides. + */ + public int getAttributeOverridesCount() { + return attributeOverrides_.size(); + } + /** + * + * + *
+   * Optional. Attribute overrides of the Analyzers.
+   * Format for each single override item:
+   * "{analyzer_name}:{attribute_key}={value}"
+   * 
+ * + * repeated string attribute_overrides = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The attributeOverrides at the given index. + */ + public java.lang.String getAttributeOverrides(int index) { + return attributeOverrides_.get(index); + } + /** + * + * + *
+   * Optional. Attribute overrides of the Analyzers.
+   * Format for each single override item:
+   * "{analyzer_name}:{attribute_key}={value}"
+   * 
+ * + * repeated string attribute_overrides = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the value to return. + * @return The bytes of the attributeOverrides at the given index. + */ + public com.google.protobuf.ByteString getAttributeOverridesBytes(int index) { + return attributeOverrides_.getByteString(index); + } + + public static final int RUN_STATUS_FIELD_NUMBER = 6; + private com.google.cloud.visionai.v1.RunStatus runStatus_; + /** + * + * + *
+   * Optional. Status of the Process.
+   * 
+ * + * + * .google.cloud.visionai.v1.RunStatus run_status = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the runStatus field is set. + */ + @java.lang.Override + public boolean hasRunStatus() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+   * Optional. Status of the Process.
+   * 
+ * + * + * .google.cloud.visionai.v1.RunStatus run_status = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The runStatus. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.RunStatus getRunStatus() { + return runStatus_ == null + ? com.google.cloud.visionai.v1.RunStatus.getDefaultInstance() + : runStatus_; + } + /** + * + * + *
+   * Optional. Status of the Process.
+   * 
+ * + * + * .google.cloud.visionai.v1.RunStatus run_status = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.visionai.v1.RunStatusOrBuilder getRunStatusOrBuilder() { + return runStatus_ == null + ? com.google.cloud.visionai.v1.RunStatus.getDefaultInstance() + : runStatus_; + } + + public static final int RUN_MODE_FIELD_NUMBER = 7; + private int runMode_ = 0; + /** + * + * + *
+   * Optional. Run mode of the Process.
+   * 
+ * + * .google.cloud.visionai.v1.RunMode run_mode = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for runMode. + */ + @java.lang.Override + public int getRunModeValue() { + return runMode_; + } + /** + * + * + *
+   * Optional. Run mode of the Process.
+   * 
+ * + * .google.cloud.visionai.v1.RunMode run_mode = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The runMode. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.RunMode getRunMode() { + com.google.cloud.visionai.v1.RunMode result = + com.google.cloud.visionai.v1.RunMode.forNumber(runMode_); + return result == null ? com.google.cloud.visionai.v1.RunMode.UNRECOGNIZED : result; + } + + public static final int EVENT_ID_FIELD_NUMBER = 8; + + @SuppressWarnings("serial") + private volatile java.lang.Object eventId_ = ""; + /** + * + * + *
+   * Optional. Event ID of the input/output streams.
+   * This is useful when you have a StreamSource/StreamSink operator in the
+   * Analysis, and you want to manually specify the Event to read from/write to.
+   * 
+ * + * string event_id = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The eventId. + */ + @java.lang.Override + public java.lang.String getEventId() { + java.lang.Object ref = eventId_; + 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(); + eventId_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. Event ID of the input/output streams.
+   * This is useful when you have a StreamSource/StreamSink operator in the
+   * Analysis, and you want to manually specify the Event to read from/write to.
+   * 
+ * + * string event_id = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for eventId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getEventIdBytes() { + java.lang.Object ref = eventId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + eventId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int BATCH_ID_FIELD_NUMBER = 9; + + @SuppressWarnings("serial") + private volatile java.lang.Object batchId_ = ""; + /** + * + * + *
+   * Optional. Optional: Batch ID of the Process.
+   * 
+ * + * string batch_id = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The batchId. + */ + @java.lang.Override + public java.lang.String getBatchId() { + java.lang.Object ref = batchId_; + 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(); + batchId_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. Optional: Batch ID of the Process.
+   * 
+ * + * string batch_id = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for batchId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getBatchIdBytes() { + java.lang.Object ref = batchId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + batchId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int RETRY_COUNT_FIELD_NUMBER = 10; + private int retryCount_ = 0; + /** + * + * + *
+   * Optional. Optional: The number of retries for a process in submission mode
+   * the system should try before declaring failure. By default, no retry will
+   * be performed.
+   * 
+ * + * int32 retry_count = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The retryCount. + */ + @java.lang.Override + public int getRetryCount() { + return retryCount_; + } + + 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getCreateTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(3, getUpdateTime()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(analysis_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, analysis_); + } + for (int i = 0; i < attributeOverrides_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, attributeOverrides_.getRaw(i)); + } + if (((bitField0_ & 0x00000004) != 0)) { + output.writeMessage(6, getRunStatus()); + } + if (runMode_ != com.google.cloud.visionai.v1.RunMode.RUN_MODE_UNSPECIFIED.getNumber()) { + output.writeEnum(7, runMode_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(eventId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 8, eventId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(batchId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 9, batchId_); + } + if (retryCount_ != 0) { + output.writeInt32(10, retryCount_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getCreateTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getUpdateTime()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(analysis_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, analysis_); + } + { + int dataSize = 0; + for (int i = 0; i < attributeOverrides_.size(); i++) { + dataSize += computeStringSizeNoTag(attributeOverrides_.getRaw(i)); + } + size += dataSize; + size += 1 * getAttributeOverridesList().size(); + } + if (((bitField0_ & 0x00000004) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getRunStatus()); + } + if (runMode_ != com.google.cloud.visionai.v1.RunMode.RUN_MODE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(7, runMode_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(eventId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, eventId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(batchId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(9, batchId_); + } + if (retryCount_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(10, retryCount_); + } + size += getUnknownFields().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.visionai.v1.Process)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.Process other = (com.google.cloud.visionai.v1.Process) obj; + + if (!getName().equals(other.getName())) return false; + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime().equals(other.getCreateTime())) return false; + } + if (hasUpdateTime() != other.hasUpdateTime()) return false; + if (hasUpdateTime()) { + if (!getUpdateTime().equals(other.getUpdateTime())) return false; + } + if (!getAnalysis().equals(other.getAnalysis())) return false; + if (!getAttributeOverridesList().equals(other.getAttributeOverridesList())) return false; + if (hasRunStatus() != other.hasRunStatus()) return false; + if (hasRunStatus()) { + if (!getRunStatus().equals(other.getRunStatus())) return false; + } + if (runMode_ != other.runMode_) return false; + if (!getEventId().equals(other.getEventId())) return false; + if (!getBatchId().equals(other.getBatchId())) return false; + if (getRetryCount() != other.getRetryCount()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasUpdateTime()) { + hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getUpdateTime().hashCode(); + } + hash = (37 * hash) + ANALYSIS_FIELD_NUMBER; + hash = (53 * hash) + getAnalysis().hashCode(); + if (getAttributeOverridesCount() > 0) { + hash = (37 * hash) + ATTRIBUTE_OVERRIDES_FIELD_NUMBER; + hash = (53 * hash) + getAttributeOverridesList().hashCode(); + } + if (hasRunStatus()) { + hash = (37 * hash) + RUN_STATUS_FIELD_NUMBER; + hash = (53 * hash) + getRunStatus().hashCode(); + } + hash = (37 * hash) + RUN_MODE_FIELD_NUMBER; + hash = (53 * hash) + runMode_; + hash = (37 * hash) + EVENT_ID_FIELD_NUMBER; + hash = (53 * hash) + getEventId().hashCode(); + hash = (37 * hash) + BATCH_ID_FIELD_NUMBER; + hash = (53 * hash) + getBatchId().hashCode(); + hash = (37 * hash) + RETRY_COUNT_FIELD_NUMBER; + hash = (53 * hash) + getRetryCount(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.Process parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.Process 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.visionai.v1.Process parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.Process 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.visionai.v1.Process parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.Process parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.Process parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.Process 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.visionai.v1.Process parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.Process 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.visionai.v1.Process parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.Process 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.visionai.v1.Process 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; + } + /** + * + * + *
+   * Message describing the Process object.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.Process} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.Process) + com.google.cloud.visionai.v1.ProcessOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.LvaResourcesProto + .internal_static_google_cloud_visionai_v1_Process_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.LvaResourcesProto + .internal_static_google_cloud_visionai_v1_Process_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.Process.class, + com.google.cloud.visionai.v1.Process.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.Process.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getCreateTimeFieldBuilder(); + getUpdateTimeFieldBuilder(); + getRunStatusFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + analysis_ = ""; + attributeOverrides_ = com.google.protobuf.LazyStringArrayList.emptyList(); + runStatus_ = null; + if (runStatusBuilder_ != null) { + runStatusBuilder_.dispose(); + runStatusBuilder_ = null; + } + runMode_ = 0; + eventId_ = ""; + batchId_ = ""; + retryCount_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.LvaResourcesProto + .internal_static_google_cloud_visionai_v1_Process_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.Process getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.Process.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.Process build() { + com.google.cloud.visionai.v1.Process result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.Process buildPartial() { + com.google.cloud.visionai.v1.Process result = new com.google.cloud.visionai.v1.Process(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.visionai.v1.Process result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.updateTime_ = updateTimeBuilder_ == null ? updateTime_ : updateTimeBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.analysis_ = analysis_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + attributeOverrides_.makeImmutable(); + result.attributeOverrides_ = attributeOverrides_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.runStatus_ = runStatusBuilder_ == null ? runStatus_ : runStatusBuilder_.build(); + to_bitField0_ |= 0x00000004; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.runMode_ = runMode_; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.eventId_ = eventId_; + } + if (((from_bitField0_ & 0x00000100) != 0)) { + result.batchId_ = batchId_; + } + if (((from_bitField0_ & 0x00000200) != 0)) { + result.retryCount_ = retryCount_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.Process) { + return mergeFrom((com.google.cloud.visionai.v1.Process) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.Process other) { + if (other == com.google.cloud.visionai.v1.Process.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + if (!other.getAnalysis().isEmpty()) { + analysis_ = other.analysis_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (!other.attributeOverrides_.isEmpty()) { + if (attributeOverrides_.isEmpty()) { + attributeOverrides_ = other.attributeOverrides_; + bitField0_ |= 0x00000010; + } else { + ensureAttributeOverridesIsMutable(); + attributeOverrides_.addAll(other.attributeOverrides_); + } + onChanged(); + } + if (other.hasRunStatus()) { + mergeRunStatus(other.getRunStatus()); + } + if (other.runMode_ != 0) { + setRunModeValue(other.getRunModeValue()); + } + if (!other.getEventId().isEmpty()) { + eventId_ = other.eventId_; + bitField0_ |= 0x00000080; + onChanged(); + } + if (!other.getBatchId().isEmpty()) { + batchId_ = other.batchId_; + bitField0_ |= 0x00000100; + onChanged(); + } + if (other.getRetryCount() != 0) { + setRetryCount(other.getRetryCount()); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage(getUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + analysis_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureAttributeOverridesIsMutable(); + attributeOverrides_.add(s); + break; + } // case 42 + case 50: + { + input.readMessage(getRunStatusFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000020; + break; + } // case 50 + case 56: + { + runMode_ = input.readEnum(); + bitField0_ |= 0x00000040; + break; + } // case 56 + case 66: + { + eventId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000080; + break; + } // case 66 + case 74: + { + batchId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000100; + break; + } // case 74 + case 80: + { + retryCount_ = input.readInt32(); + bitField0_ |= 0x00000200; + break; + } // case 80 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * The name of resource.
+     * 
+ * + * string name = 1; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The name of resource.
+     * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The name of resource.
+     * 
+ * + * string name = 1; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The name of resource.
+     * 
+ * + * string name = 1; + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * The name of resource.
+     * 
+ * + * string name = 1; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + createTimeBuilder_; + /** + * + * + *
+     * Output only. The create timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * Output only. The create timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. The create timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + } else { + createTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The create timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The create timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && createTime_ != null + && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getCreateTimeBuilder().mergeFrom(value); + } else { + createTime_ = value; + } + } else { + createTimeBuilder_.mergeFrom(value); + } + if (createTime_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Output only. The create timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearCreateTime() { + bitField0_ = (bitField0_ & ~0x00000002); + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The create timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. The create timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } + } + /** + * + * + *
+     * Output only. The create timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), getParentForChildren(), isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private com.google.protobuf.Timestamp updateTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + updateTimeBuilder_; + /** + * + * + *
+     * Output only. The update timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+     * Output only. The update timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + public com.google.protobuf.Timestamp getUpdateTime() { + if (updateTimeBuilder_ == null) { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } else { + return updateTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. The update timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateTime_ = value; + } else { + updateTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The update timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (updateTimeBuilder_ == null) { + updateTime_ = builderForValue.build(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The update timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && updateTime_ != null + && updateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getUpdateTimeBuilder().mergeFrom(value); + } else { + updateTime_ = value; + } + } else { + updateTimeBuilder_.mergeFrom(value); + } + if (updateTime_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Output only. The update timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearUpdateTime() { + bitField0_ = (bitField0_ & ~0x00000004); + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The update timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getUpdateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. The update timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + if (updateTimeBuilder_ != null) { + return updateTimeBuilder_.getMessageOrBuilder(); + } else { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } + } + /** + * + * + *
+     * Output only. The update timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + 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_; + } + + private java.lang.Object analysis_ = ""; + /** + * + * + *
+     * Required. Reference to an existing Analysis resource.
+     * 
+ * + * + * string analysis = 4 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The analysis. + */ + public java.lang.String getAnalysis() { + java.lang.Object ref = analysis_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + analysis_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Reference to an existing Analysis resource.
+     * 
+ * + * + * string analysis = 4 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for analysis. + */ + public com.google.protobuf.ByteString getAnalysisBytes() { + java.lang.Object ref = analysis_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + analysis_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Reference to an existing Analysis resource.
+     * 
+ * + * + * string analysis = 4 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The analysis to set. + * @return This builder for chaining. + */ + public Builder setAnalysis(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + analysis_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Reference to an existing Analysis resource.
+     * 
+ * + * + * string analysis = 4 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearAnalysis() { + analysis_ = getDefaultInstance().getAnalysis(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Reference to an existing Analysis resource.
+     * 
+ * + * + * string analysis = 4 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for analysis to set. + * @return This builder for chaining. + */ + public Builder setAnalysisBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + analysis_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList attributeOverrides_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureAttributeOverridesIsMutable() { + if (!attributeOverrides_.isModifiable()) { + attributeOverrides_ = new com.google.protobuf.LazyStringArrayList(attributeOverrides_); + } + bitField0_ |= 0x00000010; + } + /** + * + * + *
+     * Optional. Attribute overrides of the Analyzers.
+     * Format for each single override item:
+     * "{analyzer_name}:{attribute_key}={value}"
+     * 
+ * + * repeated string attribute_overrides = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return A list containing the attributeOverrides. + */ + public com.google.protobuf.ProtocolStringList getAttributeOverridesList() { + attributeOverrides_.makeImmutable(); + return attributeOverrides_; + } + /** + * + * + *
+     * Optional. Attribute overrides of the Analyzers.
+     * Format for each single override item:
+     * "{analyzer_name}:{attribute_key}={value}"
+     * 
+ * + * repeated string attribute_overrides = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The count of attributeOverrides. + */ + public int getAttributeOverridesCount() { + return attributeOverrides_.size(); + } + /** + * + * + *
+     * Optional. Attribute overrides of the Analyzers.
+     * Format for each single override item:
+     * "{analyzer_name}:{attribute_key}={value}"
+     * 
+ * + * repeated string attribute_overrides = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the element to return. + * @return The attributeOverrides at the given index. + */ + public java.lang.String getAttributeOverrides(int index) { + return attributeOverrides_.get(index); + } + /** + * + * + *
+     * Optional. Attribute overrides of the Analyzers.
+     * Format for each single override item:
+     * "{analyzer_name}:{attribute_key}={value}"
+     * 
+ * + * repeated string attribute_overrides = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the value to return. + * @return The bytes of the attributeOverrides at the given index. + */ + public com.google.protobuf.ByteString getAttributeOverridesBytes(int index) { + return attributeOverrides_.getByteString(index); + } + /** + * + * + *
+     * Optional. Attribute overrides of the Analyzers.
+     * Format for each single override item:
+     * "{analyzer_name}:{attribute_key}={value}"
+     * 
+ * + * repeated string attribute_overrides = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index to set the value at. + * @param value The attributeOverrides to set. + * @return This builder for chaining. + */ + public Builder setAttributeOverrides(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureAttributeOverridesIsMutable(); + attributeOverrides_.set(index, value); + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Attribute overrides of the Analyzers.
+     * Format for each single override item:
+     * "{analyzer_name}:{attribute_key}={value}"
+     * 
+ * + * repeated string attribute_overrides = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The attributeOverrides to add. + * @return This builder for chaining. + */ + public Builder addAttributeOverrides(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureAttributeOverridesIsMutable(); + attributeOverrides_.add(value); + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Attribute overrides of the Analyzers.
+     * Format for each single override item:
+     * "{analyzer_name}:{attribute_key}={value}"
+     * 
+ * + * repeated string attribute_overrides = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param values The attributeOverrides to add. + * @return This builder for chaining. + */ + public Builder addAllAttributeOverrides(java.lang.Iterable values) { + ensureAttributeOverridesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, attributeOverrides_); + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Attribute overrides of the Analyzers.
+     * Format for each single override item:
+     * "{analyzer_name}:{attribute_key}={value}"
+     * 
+ * + * repeated string attribute_overrides = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearAttributeOverrides() { + attributeOverrides_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000010); + ; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Attribute overrides of the Analyzers.
+     * Format for each single override item:
+     * "{analyzer_name}:{attribute_key}={value}"
+     * 
+ * + * repeated string attribute_overrides = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The bytes of the attributeOverrides to add. + * @return This builder for chaining. + */ + public Builder addAttributeOverridesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureAttributeOverridesIsMutable(); + attributeOverrides_.add(value); + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + private com.google.cloud.visionai.v1.RunStatus runStatus_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.RunStatus, + com.google.cloud.visionai.v1.RunStatus.Builder, + com.google.cloud.visionai.v1.RunStatusOrBuilder> + runStatusBuilder_; + /** + * + * + *
+     * Optional. Status of the Process.
+     * 
+ * + * + * .google.cloud.visionai.v1.RunStatus run_status = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the runStatus field is set. + */ + public boolean hasRunStatus() { + return ((bitField0_ & 0x00000020) != 0); + } + /** + * + * + *
+     * Optional. Status of the Process.
+     * 
+ * + * + * .google.cloud.visionai.v1.RunStatus run_status = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The runStatus. + */ + public com.google.cloud.visionai.v1.RunStatus getRunStatus() { + if (runStatusBuilder_ == null) { + return runStatus_ == null + ? com.google.cloud.visionai.v1.RunStatus.getDefaultInstance() + : runStatus_; + } else { + return runStatusBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Optional. Status of the Process.
+     * 
+ * + * + * .google.cloud.visionai.v1.RunStatus run_status = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setRunStatus(com.google.cloud.visionai.v1.RunStatus value) { + if (runStatusBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + runStatus_ = value; + } else { + runStatusBuilder_.setMessage(value); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Status of the Process.
+     * 
+ * + * + * .google.cloud.visionai.v1.RunStatus run_status = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setRunStatus(com.google.cloud.visionai.v1.RunStatus.Builder builderForValue) { + if (runStatusBuilder_ == null) { + runStatus_ = builderForValue.build(); + } else { + runStatusBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Status of the Process.
+     * 
+ * + * + * .google.cloud.visionai.v1.RunStatus run_status = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeRunStatus(com.google.cloud.visionai.v1.RunStatus value) { + if (runStatusBuilder_ == null) { + if (((bitField0_ & 0x00000020) != 0) + && runStatus_ != null + && runStatus_ != com.google.cloud.visionai.v1.RunStatus.getDefaultInstance()) { + getRunStatusBuilder().mergeFrom(value); + } else { + runStatus_ = value; + } + } else { + runStatusBuilder_.mergeFrom(value); + } + if (runStatus_ != null) { + bitField0_ |= 0x00000020; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Optional. Status of the Process.
+     * 
+ * + * + * .google.cloud.visionai.v1.RunStatus run_status = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearRunStatus() { + bitField0_ = (bitField0_ & ~0x00000020); + runStatus_ = null; + if (runStatusBuilder_ != null) { + runStatusBuilder_.dispose(); + runStatusBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Status of the Process.
+     * 
+ * + * + * .google.cloud.visionai.v1.RunStatus run_status = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.visionai.v1.RunStatus.Builder getRunStatusBuilder() { + bitField0_ |= 0x00000020; + onChanged(); + return getRunStatusFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Optional. Status of the Process.
+     * 
+ * + * + * .google.cloud.visionai.v1.RunStatus run_status = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.visionai.v1.RunStatusOrBuilder getRunStatusOrBuilder() { + if (runStatusBuilder_ != null) { + return runStatusBuilder_.getMessageOrBuilder(); + } else { + return runStatus_ == null + ? com.google.cloud.visionai.v1.RunStatus.getDefaultInstance() + : runStatus_; + } + } + /** + * + * + *
+     * Optional. Status of the Process.
+     * 
+ * + * + * .google.cloud.visionai.v1.RunStatus run_status = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.RunStatus, + com.google.cloud.visionai.v1.RunStatus.Builder, + com.google.cloud.visionai.v1.RunStatusOrBuilder> + getRunStatusFieldBuilder() { + if (runStatusBuilder_ == null) { + runStatusBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.RunStatus, + com.google.cloud.visionai.v1.RunStatus.Builder, + com.google.cloud.visionai.v1.RunStatusOrBuilder>( + getRunStatus(), getParentForChildren(), isClean()); + runStatus_ = null; + } + return runStatusBuilder_; + } + + private int runMode_ = 0; + /** + * + * + *
+     * Optional. Run mode of the Process.
+     * 
+ * + * + * .google.cloud.visionai.v1.RunMode run_mode = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for runMode. + */ + @java.lang.Override + public int getRunModeValue() { + return runMode_; + } + /** + * + * + *
+     * Optional. Run mode of the Process.
+     * 
+ * + * + * .google.cloud.visionai.v1.RunMode run_mode = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The enum numeric value on the wire for runMode to set. + * @return This builder for chaining. + */ + public Builder setRunModeValue(int value) { + runMode_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Run mode of the Process.
+     * 
+ * + * + * .google.cloud.visionai.v1.RunMode run_mode = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The runMode. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.RunMode getRunMode() { + com.google.cloud.visionai.v1.RunMode result = + com.google.cloud.visionai.v1.RunMode.forNumber(runMode_); + return result == null ? com.google.cloud.visionai.v1.RunMode.UNRECOGNIZED : result; + } + /** + * + * + *
+     * Optional. Run mode of the Process.
+     * 
+ * + * + * .google.cloud.visionai.v1.RunMode run_mode = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The runMode to set. + * @return This builder for chaining. + */ + public Builder setRunMode(com.google.cloud.visionai.v1.RunMode value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000040; + runMode_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Run mode of the Process.
+     * 
+ * + * + * .google.cloud.visionai.v1.RunMode run_mode = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearRunMode() { + bitField0_ = (bitField0_ & ~0x00000040); + runMode_ = 0; + onChanged(); + return this; + } + + private java.lang.Object eventId_ = ""; + /** + * + * + *
+     * Optional. Event ID of the input/output streams.
+     * This is useful when you have a StreamSource/StreamSink operator in the
+     * Analysis, and you want to manually specify the Event to read from/write to.
+     * 
+ * + * string event_id = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The eventId. + */ + public java.lang.String getEventId() { + java.lang.Object ref = eventId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + eventId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. Event ID of the input/output streams.
+     * This is useful when you have a StreamSource/StreamSink operator in the
+     * Analysis, and you want to manually specify the Event to read from/write to.
+     * 
+ * + * string event_id = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for eventId. + */ + public com.google.protobuf.ByteString getEventIdBytes() { + java.lang.Object ref = eventId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + eventId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. Event ID of the input/output streams.
+     * This is useful when you have a StreamSource/StreamSink operator in the
+     * Analysis, and you want to manually specify the Event to read from/write to.
+     * 
+ * + * string event_id = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The eventId to set. + * @return This builder for chaining. + */ + public Builder setEventId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + eventId_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Event ID of the input/output streams.
+     * This is useful when you have a StreamSource/StreamSink operator in the
+     * Analysis, and you want to manually specify the Event to read from/write to.
+     * 
+ * + * string event_id = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearEventId() { + eventId_ = getDefaultInstance().getEventId(); + bitField0_ = (bitField0_ & ~0x00000080); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Event ID of the input/output streams.
+     * This is useful when you have a StreamSource/StreamSink operator in the
+     * Analysis, and you want to manually specify the Event to read from/write to.
+     * 
+ * + * string event_id = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for eventId to set. + * @return This builder for chaining. + */ + public Builder setEventIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + eventId_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + + private java.lang.Object batchId_ = ""; + /** + * + * + *
+     * Optional. Optional: Batch ID of the Process.
+     * 
+ * + * string batch_id = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The batchId. + */ + public java.lang.String getBatchId() { + java.lang.Object ref = batchId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + batchId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. Optional: Batch ID of the Process.
+     * 
+ * + * string batch_id = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for batchId. + */ + public com.google.protobuf.ByteString getBatchIdBytes() { + java.lang.Object ref = batchId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + batchId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. Optional: Batch ID of the Process.
+     * 
+ * + * string batch_id = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The batchId to set. + * @return This builder for chaining. + */ + public Builder setBatchId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + batchId_ = value; + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Optional: Batch ID of the Process.
+     * 
+ * + * string batch_id = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearBatchId() { + batchId_ = getDefaultInstance().getBatchId(); + bitField0_ = (bitField0_ & ~0x00000100); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Optional: Batch ID of the Process.
+     * 
+ * + * string batch_id = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for batchId to set. + * @return This builder for chaining. + */ + public Builder setBatchIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + batchId_ = value; + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + + private int retryCount_; + /** + * + * + *
+     * Optional. Optional: The number of retries for a process in submission mode
+     * the system should try before declaring failure. By default, no retry will
+     * be performed.
+     * 
+ * + * int32 retry_count = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The retryCount. + */ + @java.lang.Override + public int getRetryCount() { + return retryCount_; + } + /** + * + * + *
+     * Optional. Optional: The number of retries for a process in submission mode
+     * the system should try before declaring failure. By default, no retry will
+     * be performed.
+     * 
+ * + * int32 retry_count = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The retryCount to set. + * @return This builder for chaining. + */ + public Builder setRetryCount(int value) { + + retryCount_ = value; + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Optional: The number of retries for a process in submission mode
+     * the system should try before declaring failure. By default, no retry will
+     * be performed.
+     * 
+ * + * int32 retry_count = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearRetryCount() { + bitField0_ = (bitField0_ & ~0x00000200); + retryCount_ = 0; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.Process) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.Process) + private static final com.google.cloud.visionai.v1.Process DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.Process(); + } + + public static com.google.cloud.visionai.v1.Process getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Process parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.Process getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ProcessName.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ProcessName.java new file mode 100644 index 000000000000..bd0962694e9f --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ProcessName.java @@ -0,0 +1,257 @@ +/* + * Copyright 2024 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.visionai.v1; + +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") +public class ProcessName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION_CLUSTER_PROCESS = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/clusters/{cluster}/processes/{process}"); + private volatile Map fieldValuesMap; + private final String project; + private final String location; + private final String cluster; + private final String process; + + @Deprecated + protected ProcessName() { + project = null; + location = null; + cluster = null; + process = null; + } + + private ProcessName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + cluster = Preconditions.checkNotNull(builder.getCluster()); + process = Preconditions.checkNotNull(builder.getProcess()); + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getCluster() { + return cluster; + } + + public String getProcess() { + return process; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static ProcessName of(String project, String location, String cluster, String process) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setCluster(cluster) + .setProcess(process) + .build(); + } + + public static String format(String project, String location, String cluster, String process) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setCluster(cluster) + .setProcess(process) + .build() + .toString(); + } + + public static ProcessName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION_CLUSTER_PROCESS.validatedMatch( + formattedString, "ProcessName.parse: formattedString not in valid format"); + return of( + matchMap.get("project"), + matchMap.get("location"), + matchMap.get("cluster"), + matchMap.get("process")); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List values) { + List list = new ArrayList<>(values.size()); + for (ProcessName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION_CLUSTER_PROCESS.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (project != null) { + fieldMapBuilder.put("project", project); + } + if (location != null) { + fieldMapBuilder.put("location", location); + } + if (cluster != null) { + fieldMapBuilder.put("cluster", cluster); + } + if (process != null) { + fieldMapBuilder.put("process", process); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION_CLUSTER_PROCESS.instantiate( + "project", project, "location", location, "cluster", cluster, "process", process); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null && getClass() == o.getClass()) { + ProcessName that = ((ProcessName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location) + && Objects.equals(this.cluster, that.cluster) + && Objects.equals(this.process, that.process); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(project); + h *= 1000003; + h ^= Objects.hashCode(location); + h *= 1000003; + h ^= Objects.hashCode(cluster); + h *= 1000003; + h ^= Objects.hashCode(process); + return h; + } + + /** Builder for projects/{project}/locations/{location}/clusters/{cluster}/processes/{process}. */ + public static class Builder { + private String project; + private String location; + private String cluster; + private String process; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getCluster() { + return cluster; + } + + public String getProcess() { + return process; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setCluster(String cluster) { + this.cluster = cluster; + return this; + } + + public Builder setProcess(String process) { + this.process = process; + return this; + } + + private Builder(ProcessName processName) { + this.project = processName.project; + this.location = processName.location; + this.cluster = processName.cluster; + this.process = processName.process; + } + + public ProcessName build() { + return new ProcessName(this); + } + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ProcessOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ProcessOrBuilder.java new file mode 100644 index 000000000000..3c73e531442a --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ProcessOrBuilder.java @@ -0,0 +1,352 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/lva_resources.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface ProcessOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.Process) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The name of resource.
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * The name of resource.
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Output only. The create timestamp.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + /** + * + * + *
+   * Output only. The create timestamp.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + * + * + *
+   * Output only. The create timestamp.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. The update timestamp.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + /** + * + * + *
+   * Output only. The update timestamp.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + /** + * + * + *
+   * Output only. The update timestamp.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); + + /** + * + * + *
+   * Required. Reference to an existing Analysis resource.
+   * 
+ * + * + * string analysis = 4 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The analysis. + */ + java.lang.String getAnalysis(); + /** + * + * + *
+   * Required. Reference to an existing Analysis resource.
+   * 
+ * + * + * string analysis = 4 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for analysis. + */ + com.google.protobuf.ByteString getAnalysisBytes(); + + /** + * + * + *
+   * Optional. Attribute overrides of the Analyzers.
+   * Format for each single override item:
+   * "{analyzer_name}:{attribute_key}={value}"
+   * 
+ * + * repeated string attribute_overrides = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the attributeOverrides. + */ + java.util.List getAttributeOverridesList(); + /** + * + * + *
+   * Optional. Attribute overrides of the Analyzers.
+   * Format for each single override item:
+   * "{analyzer_name}:{attribute_key}={value}"
+   * 
+ * + * repeated string attribute_overrides = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of attributeOverrides. + */ + int getAttributeOverridesCount(); + /** + * + * + *
+   * Optional. Attribute overrides of the Analyzers.
+   * Format for each single override item:
+   * "{analyzer_name}:{attribute_key}={value}"
+   * 
+ * + * repeated string attribute_overrides = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The attributeOverrides at the given index. + */ + java.lang.String getAttributeOverrides(int index); + /** + * + * + *
+   * Optional. Attribute overrides of the Analyzers.
+   * Format for each single override item:
+   * "{analyzer_name}:{attribute_key}={value}"
+   * 
+ * + * repeated string attribute_overrides = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the value to return. + * @return The bytes of the attributeOverrides at the given index. + */ + com.google.protobuf.ByteString getAttributeOverridesBytes(int index); + + /** + * + * + *
+   * Optional. Status of the Process.
+   * 
+ * + * + * .google.cloud.visionai.v1.RunStatus run_status = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the runStatus field is set. + */ + boolean hasRunStatus(); + /** + * + * + *
+   * Optional. Status of the Process.
+   * 
+ * + * + * .google.cloud.visionai.v1.RunStatus run_status = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The runStatus. + */ + com.google.cloud.visionai.v1.RunStatus getRunStatus(); + /** + * + * + *
+   * Optional. Status of the Process.
+   * 
+ * + * + * .google.cloud.visionai.v1.RunStatus run_status = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.visionai.v1.RunStatusOrBuilder getRunStatusOrBuilder(); + + /** + * + * + *
+   * Optional. Run mode of the Process.
+   * 
+ * + * .google.cloud.visionai.v1.RunMode run_mode = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for runMode. + */ + int getRunModeValue(); + /** + * + * + *
+   * Optional. Run mode of the Process.
+   * 
+ * + * .google.cloud.visionai.v1.RunMode run_mode = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The runMode. + */ + com.google.cloud.visionai.v1.RunMode getRunMode(); + + /** + * + * + *
+   * Optional. Event ID of the input/output streams.
+   * This is useful when you have a StreamSource/StreamSink operator in the
+   * Analysis, and you want to manually specify the Event to read from/write to.
+   * 
+ * + * string event_id = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The eventId. + */ + java.lang.String getEventId(); + /** + * + * + *
+   * Optional. Event ID of the input/output streams.
+   * This is useful when you have a StreamSource/StreamSink operator in the
+   * Analysis, and you want to manually specify the Event to read from/write to.
+   * 
+ * + * string event_id = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for eventId. + */ + com.google.protobuf.ByteString getEventIdBytes(); + + /** + * + * + *
+   * Optional. Optional: Batch ID of the Process.
+   * 
+ * + * string batch_id = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The batchId. + */ + java.lang.String getBatchId(); + /** + * + * + *
+   * Optional. Optional: Batch ID of the Process.
+   * 
+ * + * string batch_id = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for batchId. + */ + com.google.protobuf.ByteString getBatchIdBytes(); + + /** + * + * + *
+   * Optional. Optional: The number of retries for a process in submission mode
+   * the system should try before declaring failure. By default, no retry will
+   * be performed.
+   * 
+ * + * int32 retry_count = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The retryCount. + */ + int getRetryCount(); +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/Processor.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/Processor.java new file mode 100644 index 000000000000..175255e2782f --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/Processor.java @@ -0,0 +1,4436 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/platform.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * Message describing Processor object.
+ * Next ID: 19
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.Processor} + */ +public final class Processor extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.Processor) + ProcessorOrBuilder { + private static final long serialVersionUID = 0L; + // Use Processor.newBuilder() to construct. + private Processor(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Processor() { + name_ = ""; + displayName_ = ""; + description_ = ""; + processorType_ = 0; + modelType_ = 0; + state_ = 0; + configurationTypeurl_ = ""; + supportedAnnotationTypes_ = java.util.Collections.emptyList(); + supportedInstanceTypes_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Processor(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_Processor_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 4: + return internalGetLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_Processor_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.Processor.class, + com.google.cloud.visionai.v1.Processor.Builder.class); + } + + /** + * + * + *
+   * Type
+   * 
+ * + * Protobuf enum {@code google.cloud.visionai.v1.Processor.ProcessorType} + */ + public enum ProcessorType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Processor Type UNSPECIFIED.
+     * 
+ * + * PROCESSOR_TYPE_UNSPECIFIED = 0; + */ + PROCESSOR_TYPE_UNSPECIFIED(0), + /** + * + * + *
+     * Processor Type PRETRAINED.
+     * Pretrained processor is developed by Vision AI App Platform with
+     * state-of-the-art vision data processing functionality, like occupancy
+     * counting or person blur. Pretrained processor is usually publicly
+     * available.
+     * 
+ * + * PRETRAINED = 1; + */ + PRETRAINED(1), + /** + * + * + *
+     * Processor Type CUSTOM.
+     * Custom processors are specialized processors which are either uploaded by
+     * customers or imported from other GCP platform (for example Vertex AI).
+     * Custom processor is only visible to the creator.
+     * 
+ * + * CUSTOM = 2; + */ + CUSTOM(2), + /** + * + * + *
+     * Processor Type CONNECTOR.
+     * Connector processors are special processors which perform I/O for the
+     * application, they do not processing the data but either deliver the data
+     * to other processors or receive data from other processors.
+     * 
+ * + * CONNECTOR = 3; + */ + CONNECTOR(3), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Processor Type UNSPECIFIED.
+     * 
+ * + * PROCESSOR_TYPE_UNSPECIFIED = 0; + */ + public static final int PROCESSOR_TYPE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * Processor Type PRETRAINED.
+     * Pretrained processor is developed by Vision AI App Platform with
+     * state-of-the-art vision data processing functionality, like occupancy
+     * counting or person blur. Pretrained processor is usually publicly
+     * available.
+     * 
+ * + * PRETRAINED = 1; + */ + public static final int PRETRAINED_VALUE = 1; + /** + * + * + *
+     * Processor Type CUSTOM.
+     * Custom processors are specialized processors which are either uploaded by
+     * customers or imported from other GCP platform (for example Vertex AI).
+     * Custom processor is only visible to the creator.
+     * 
+ * + * CUSTOM = 2; + */ + public static final int CUSTOM_VALUE = 2; + /** + * + * + *
+     * Processor Type CONNECTOR.
+     * Connector processors are special processors which perform I/O for the
+     * application, they do not processing the data but either deliver the data
+     * to other processors or receive data from other processors.
+     * 
+ * + * CONNECTOR = 3; + */ + public static final int CONNECTOR_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; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static ProcessorType valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static ProcessorType forNumber(int value) { + switch (value) { + case 0: + return PROCESSOR_TYPE_UNSPECIFIED; + case 1: + return PRETRAINED; + case 2: + return CUSTOM; + case 3: + return CONNECTOR; + 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 ProcessorType findValueByNumber(int number) { + return ProcessorType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + 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.visionai.v1.Processor.getDescriptor().getEnumTypes().get(0); + } + + private static final ProcessorType[] VALUES = values(); + + public static ProcessorType 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 ProcessorType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.visionai.v1.Processor.ProcessorType) + } + + /** Protobuf enum {@code google.cloud.visionai.v1.Processor.ProcessorState} */ + public enum ProcessorState implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Unspecified Processor state.
+     * 
+ * + * PROCESSOR_STATE_UNSPECIFIED = 0; + */ + PROCESSOR_STATE_UNSPECIFIED(0), + /** + * + * + *
+     * Processor is being created (not ready for use).
+     * 
+ * + * CREATING = 1; + */ + CREATING(1), + /** + * + * + *
+     * Processor is and ready for use.
+     * 
+ * + * ACTIVE = 2; + */ + ACTIVE(2), + /** + * + * + *
+     * Processor is being deleted (not ready for use).
+     * 
+ * + * DELETING = 3; + */ + DELETING(3), + /** + * + * + *
+     * Processor deleted or creation failed .
+     * 
+ * + * FAILED = 4; + */ + FAILED(4), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Unspecified Processor state.
+     * 
+ * + * PROCESSOR_STATE_UNSPECIFIED = 0; + */ + public static final int PROCESSOR_STATE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * Processor is being created (not ready for use).
+     * 
+ * + * CREATING = 1; + */ + public static final int CREATING_VALUE = 1; + /** + * + * + *
+     * Processor is and ready for use.
+     * 
+ * + * ACTIVE = 2; + */ + public static final int ACTIVE_VALUE = 2; + /** + * + * + *
+     * Processor is being deleted (not ready for use).
+     * 
+ * + * DELETING = 3; + */ + public static final int DELETING_VALUE = 3; + /** + * + * + *
+     * Processor deleted or creation failed .
+     * 
+ * + * FAILED = 4; + */ + public static final int FAILED_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; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static ProcessorState valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static ProcessorState forNumber(int value) { + switch (value) { + case 0: + return PROCESSOR_STATE_UNSPECIFIED; + case 1: + return CREATING; + case 2: + return ACTIVE; + case 3: + return DELETING; + case 4: + return FAILED; + 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 ProcessorState findValueByNumber(int number) { + return ProcessorState.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + 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.visionai.v1.Processor.getDescriptor().getEnumTypes().get(1); + } + + private static final ProcessorState[] VALUES = values(); + + public static ProcessorState 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 ProcessorState(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.visionai.v1.Processor.ProcessorState) + } + + private int bitField0_; + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * name of resource.
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + 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(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * name of resource.
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CREATE_TIME_FIELD_NUMBER = 2; + private com.google.protobuf.Timestamp createTime_; + /** + * + * + *
+   * Output only. [Output only] Create timestamp.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * Output only. [Output only] Create timestamp.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + /** + * + * + *
+   * Output only. [Output only] Create timestamp.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + + public static final int UPDATE_TIME_FIELD_NUMBER = 3; + private com.google.protobuf.Timestamp updateTime_; + /** + * + * + *
+   * Output only. [Output only] Update timestamp.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + @java.lang.Override + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+   * Output only. [Output only] Update timestamp.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getUpdateTime() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + /** + * + * + *
+   * Output only. [Output only] Update timestamp.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + + public static final int LABELS_FIELD_NUMBER = 4; + + private static final class LabelsDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_Processor_LabelsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + + @SuppressWarnings("serial") + private com.google.protobuf.MapField labels_; + + private com.google.protobuf.MapField internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + /** + * + * + *
+   * Labels as key value pairs.
+   * 
+ * + * map<string, string> labels = 4; + */ + @java.lang.Override + public boolean containsLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetLabels().getMap().containsKey(key); + } + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + /** + * + * + *
+   * Labels as key value pairs.
+   * 
+ * + * map<string, string> labels = 4; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + * + * + *
+   * Labels as key value pairs.
+   * 
+ * + * map<string, string> labels = 4; + */ + @java.lang.Override + public /* nullable */ java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+   * Labels as key value pairs.
+   * 
+ * + * map<string, string> labels = 4; + */ + @java.lang.Override + public java.lang.String getLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int DISPLAY_NAME_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object displayName_ = ""; + /** + * + * + *
+   * Required. A user friendly display name for the processor.
+   * 
+ * + * string display_name = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The displayName. + */ + @java.lang.Override + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + 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(); + displayName_ = s; + return s; + } + } + /** + * + * + *
+   * Required. A user friendly display name for the processor.
+   * 
+ * + * string display_name = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for displayName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DESCRIPTION_FIELD_NUMBER = 10; + + @SuppressWarnings("serial") + private volatile java.lang.Object description_ = ""; + /** + * + * + *
+   * Illustrative sentences for describing the functionality of the processor.
+   * 
+ * + * string description = 10; + * + * @return The description. + */ + @java.lang.Override + 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; + } + } + /** + * + * + *
+   * Illustrative sentences for describing the functionality of the processor.
+   * 
+ * + * string description = 10; + * + * @return The bytes for description. + */ + @java.lang.Override + 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 PROCESSOR_TYPE_FIELD_NUMBER = 6; + private int processorType_ = 0; + /** + * + * + *
+   * Output only. Processor Type.
+   * 
+ * + * + * .google.cloud.visionai.v1.Processor.ProcessorType processor_type = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for processorType. + */ + @java.lang.Override + public int getProcessorTypeValue() { + return processorType_; + } + /** + * + * + *
+   * Output only. Processor Type.
+   * 
+ * + * + * .google.cloud.visionai.v1.Processor.ProcessorType processor_type = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The processorType. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.Processor.ProcessorType getProcessorType() { + com.google.cloud.visionai.v1.Processor.ProcessorType result = + com.google.cloud.visionai.v1.Processor.ProcessorType.forNumber(processorType_); + return result == null + ? com.google.cloud.visionai.v1.Processor.ProcessorType.UNRECOGNIZED + : result; + } + + public static final int MODEL_TYPE_FIELD_NUMBER = 13; + private int modelType_ = 0; + /** + * + * + *
+   * Model Type.
+   * 
+ * + * .google.cloud.visionai.v1.ModelType model_type = 13; + * + * @return The enum numeric value on the wire for modelType. + */ + @java.lang.Override + public int getModelTypeValue() { + return modelType_; + } + /** + * + * + *
+   * Model Type.
+   * 
+ * + * .google.cloud.visionai.v1.ModelType model_type = 13; + * + * @return The modelType. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.ModelType getModelType() { + com.google.cloud.visionai.v1.ModelType result = + com.google.cloud.visionai.v1.ModelType.forNumber(modelType_); + return result == null ? com.google.cloud.visionai.v1.ModelType.UNRECOGNIZED : result; + } + + public static final int CUSTOM_PROCESSOR_SOURCE_INFO_FIELD_NUMBER = 7; + private com.google.cloud.visionai.v1.CustomProcessorSourceInfo customProcessorSourceInfo_; + /** + * + * + *
+   * Source info for customer created processor.
+   * 
+ * + * .google.cloud.visionai.v1.CustomProcessorSourceInfo custom_processor_source_info = 7; + * + * + * @return Whether the customProcessorSourceInfo field is set. + */ + @java.lang.Override + public boolean hasCustomProcessorSourceInfo() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+   * Source info for customer created processor.
+   * 
+ * + * .google.cloud.visionai.v1.CustomProcessorSourceInfo custom_processor_source_info = 7; + * + * + * @return The customProcessorSourceInfo. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.CustomProcessorSourceInfo getCustomProcessorSourceInfo() { + return customProcessorSourceInfo_ == null + ? com.google.cloud.visionai.v1.CustomProcessorSourceInfo.getDefaultInstance() + : customProcessorSourceInfo_; + } + /** + * + * + *
+   * Source info for customer created processor.
+   * 
+ * + * .google.cloud.visionai.v1.CustomProcessorSourceInfo custom_processor_source_info = 7; + * + */ + @java.lang.Override + public com.google.cloud.visionai.v1.CustomProcessorSourceInfoOrBuilder + getCustomProcessorSourceInfoOrBuilder() { + return customProcessorSourceInfo_ == null + ? com.google.cloud.visionai.v1.CustomProcessorSourceInfo.getDefaultInstance() + : customProcessorSourceInfo_; + } + + public static final int STATE_FIELD_NUMBER = 8; + private int state_ = 0; + /** + * + * + *
+   * Output only. State of the Processor.
+   * 
+ * + * + * .google.cloud.visionai.v1.Processor.ProcessorState state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + /** + * + * + *
+   * Output only. State of the Processor.
+   * 
+ * + * + * .google.cloud.visionai.v1.Processor.ProcessorState state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.Processor.ProcessorState getState() { + com.google.cloud.visionai.v1.Processor.ProcessorState result = + com.google.cloud.visionai.v1.Processor.ProcessorState.forNumber(state_); + return result == null + ? com.google.cloud.visionai.v1.Processor.ProcessorState.UNRECOGNIZED + : result; + } + + public static final int PROCESSOR_IO_SPEC_FIELD_NUMBER = 11; + private com.google.cloud.visionai.v1.ProcessorIOSpec processorIoSpec_; + /** + * + * + *
+   * Output only. [Output only] The input / output specifications of a
+   * processor, each type of processor has fixed input / output specs which
+   * cannot be altered by customer.
+   * 
+ * + * + * .google.cloud.visionai.v1.ProcessorIOSpec processor_io_spec = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the processorIoSpec field is set. + */ + @java.lang.Override + public boolean hasProcessorIoSpec() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + * + * + *
+   * Output only. [Output only] The input / output specifications of a
+   * processor, each type of processor has fixed input / output specs which
+   * cannot be altered by customer.
+   * 
+ * + * + * .google.cloud.visionai.v1.ProcessorIOSpec processor_io_spec = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The processorIoSpec. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.ProcessorIOSpec getProcessorIoSpec() { + return processorIoSpec_ == null + ? com.google.cloud.visionai.v1.ProcessorIOSpec.getDefaultInstance() + : processorIoSpec_; + } + /** + * + * + *
+   * Output only. [Output only] The input / output specifications of a
+   * processor, each type of processor has fixed input / output specs which
+   * cannot be altered by customer.
+   * 
+ * + * + * .google.cloud.visionai.v1.ProcessorIOSpec processor_io_spec = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.visionai.v1.ProcessorIOSpecOrBuilder getProcessorIoSpecOrBuilder() { + return processorIoSpec_ == null + ? com.google.cloud.visionai.v1.ProcessorIOSpec.getDefaultInstance() + : processorIoSpec_; + } + + public static final int CONFIGURATION_TYPEURL_FIELD_NUMBER = 14; + + @SuppressWarnings("serial") + private volatile java.lang.Object configurationTypeurl_ = ""; + /** + * + * + *
+   * Output only. The corresponding configuration can be used in the Application
+   * to customize the behavior of the processor.
+   * 
+ * + * string configuration_typeurl = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The configurationTypeurl. + */ + @java.lang.Override + public java.lang.String getConfigurationTypeurl() { + java.lang.Object ref = configurationTypeurl_; + 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(); + configurationTypeurl_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. The corresponding configuration can be used in the Application
+   * to customize the behavior of the processor.
+   * 
+ * + * string configuration_typeurl = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for configurationTypeurl. + */ + @java.lang.Override + public com.google.protobuf.ByteString getConfigurationTypeurlBytes() { + java.lang.Object ref = configurationTypeurl_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + configurationTypeurl_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SUPPORTED_ANNOTATION_TYPES_FIELD_NUMBER = 15; + + @SuppressWarnings("serial") + private java.util.List supportedAnnotationTypes_; + + private static final com.google.protobuf.Internal.ListAdapter.Converter< + java.lang.Integer, com.google.cloud.visionai.v1.StreamAnnotationType> + supportedAnnotationTypes_converter_ = + new com.google.protobuf.Internal.ListAdapter.Converter< + java.lang.Integer, com.google.cloud.visionai.v1.StreamAnnotationType>() { + public com.google.cloud.visionai.v1.StreamAnnotationType convert( + java.lang.Integer from) { + com.google.cloud.visionai.v1.StreamAnnotationType result = + com.google.cloud.visionai.v1.StreamAnnotationType.forNumber(from); + return result == null + ? com.google.cloud.visionai.v1.StreamAnnotationType.UNRECOGNIZED + : result; + } + }; + /** + * + * repeated .google.cloud.visionai.v1.StreamAnnotationType supported_annotation_types = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return A list containing the supportedAnnotationTypes. + */ + @java.lang.Override + public java.util.List + getSupportedAnnotationTypesList() { + return new com.google.protobuf.Internal.ListAdapter< + java.lang.Integer, com.google.cloud.visionai.v1.StreamAnnotationType>( + supportedAnnotationTypes_, supportedAnnotationTypes_converter_); + } + /** + * + * repeated .google.cloud.visionai.v1.StreamAnnotationType supported_annotation_types = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The count of supportedAnnotationTypes. + */ + @java.lang.Override + public int getSupportedAnnotationTypesCount() { + return supportedAnnotationTypes_.size(); + } + /** + * + * repeated .google.cloud.visionai.v1.StreamAnnotationType supported_annotation_types = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param index The index of the element to return. + * @return The supportedAnnotationTypes at the given index. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.StreamAnnotationType getSupportedAnnotationTypes(int index) { + return supportedAnnotationTypes_converter_.convert(supportedAnnotationTypes_.get(index)); + } + /** + * + * repeated .google.cloud.visionai.v1.StreamAnnotationType supported_annotation_types = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return A list containing the enum numeric values on the wire for supportedAnnotationTypes. + */ + @java.lang.Override + public java.util.List getSupportedAnnotationTypesValueList() { + return supportedAnnotationTypes_; + } + /** + * + * repeated .google.cloud.visionai.v1.StreamAnnotationType supported_annotation_types = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param index The index of the value to return. + * @return The enum numeric value on the wire of supportedAnnotationTypes at the given index. + */ + @java.lang.Override + public int getSupportedAnnotationTypesValue(int index) { + return supportedAnnotationTypes_.get(index); + } + + private int supportedAnnotationTypesMemoizedSerializedSize; + + public static final int SUPPORTS_POST_PROCESSING_FIELD_NUMBER = 17; + private boolean supportsPostProcessing_ = false; + /** + * + * + *
+   * Indicates if the processor supports post processing.
+   * 
+ * + * bool supports_post_processing = 17; + * + * @return The supportsPostProcessing. + */ + @java.lang.Override + public boolean getSupportsPostProcessing() { + return supportsPostProcessing_; + } + + public static final int SUPPORTED_INSTANCE_TYPES_FIELD_NUMBER = 18; + + @SuppressWarnings("serial") + private java.util.List supportedInstanceTypes_; + + private static final com.google.protobuf.Internal.ListAdapter.Converter< + java.lang.Integer, com.google.cloud.visionai.v1.Instance.InstanceType> + supportedInstanceTypes_converter_ = + new com.google.protobuf.Internal.ListAdapter.Converter< + java.lang.Integer, com.google.cloud.visionai.v1.Instance.InstanceType>() { + public com.google.cloud.visionai.v1.Instance.InstanceType convert( + java.lang.Integer from) { + com.google.cloud.visionai.v1.Instance.InstanceType result = + com.google.cloud.visionai.v1.Instance.InstanceType.forNumber(from); + return result == null + ? com.google.cloud.visionai.v1.Instance.InstanceType.UNRECOGNIZED + : result; + } + }; + /** + * + * + *
+   * Which instance types this processor supports; if empty, this default to
+   * STREAMING_PREDICTION.
+   * 
+ * + * repeated .google.cloud.visionai.v1.Instance.InstanceType supported_instance_types = 18; + * + * + * @return A list containing the supportedInstanceTypes. + */ + @java.lang.Override + public java.util.List + getSupportedInstanceTypesList() { + return new com.google.protobuf.Internal.ListAdapter< + java.lang.Integer, com.google.cloud.visionai.v1.Instance.InstanceType>( + supportedInstanceTypes_, supportedInstanceTypes_converter_); + } + /** + * + * + *
+   * Which instance types this processor supports; if empty, this default to
+   * STREAMING_PREDICTION.
+   * 
+ * + * repeated .google.cloud.visionai.v1.Instance.InstanceType supported_instance_types = 18; + * + * + * @return The count of supportedInstanceTypes. + */ + @java.lang.Override + public int getSupportedInstanceTypesCount() { + return supportedInstanceTypes_.size(); + } + /** + * + * + *
+   * Which instance types this processor supports; if empty, this default to
+   * STREAMING_PREDICTION.
+   * 
+ * + * repeated .google.cloud.visionai.v1.Instance.InstanceType supported_instance_types = 18; + * + * + * @param index The index of the element to return. + * @return The supportedInstanceTypes at the given index. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.Instance.InstanceType getSupportedInstanceTypes(int index) { + return supportedInstanceTypes_converter_.convert(supportedInstanceTypes_.get(index)); + } + /** + * + * + *
+   * Which instance types this processor supports; if empty, this default to
+   * STREAMING_PREDICTION.
+   * 
+ * + * repeated .google.cloud.visionai.v1.Instance.InstanceType supported_instance_types = 18; + * + * + * @return A list containing the enum numeric values on the wire for supportedInstanceTypes. + */ + @java.lang.Override + public java.util.List getSupportedInstanceTypesValueList() { + return supportedInstanceTypes_; + } + /** + * + * + *
+   * Which instance types this processor supports; if empty, this default to
+   * STREAMING_PREDICTION.
+   * 
+ * + * repeated .google.cloud.visionai.v1.Instance.InstanceType supported_instance_types = 18; + * + * + * @param index The index of the value to return. + * @return The enum numeric value on the wire of supportedInstanceTypes at the given index. + */ + @java.lang.Override + public int getSupportedInstanceTypesValue(int index) { + return supportedInstanceTypes_.get(index); + } + + private int supportedInstanceTypesMemoizedSerializedSize; + + 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getCreateTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(3, getUpdateTime()); + } + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 4); + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, displayName_); + } + if (processorType_ + != com.google.cloud.visionai.v1.Processor.ProcessorType.PROCESSOR_TYPE_UNSPECIFIED + .getNumber()) { + output.writeEnum(6, processorType_); + } + if (((bitField0_ & 0x00000004) != 0)) { + output.writeMessage(7, getCustomProcessorSourceInfo()); + } + if (state_ + != com.google.cloud.visionai.v1.Processor.ProcessorState.PROCESSOR_STATE_UNSPECIFIED + .getNumber()) { + output.writeEnum(8, state_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 10, description_); + } + if (((bitField0_ & 0x00000008) != 0)) { + output.writeMessage(11, getProcessorIoSpec()); + } + if (modelType_ != com.google.cloud.visionai.v1.ModelType.MODEL_TYPE_UNSPECIFIED.getNumber()) { + output.writeEnum(13, modelType_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(configurationTypeurl_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 14, configurationTypeurl_); + } + if (getSupportedAnnotationTypesList().size() > 0) { + output.writeUInt32NoTag(122); + output.writeUInt32NoTag(supportedAnnotationTypesMemoizedSerializedSize); + } + for (int i = 0; i < supportedAnnotationTypes_.size(); i++) { + output.writeEnumNoTag(supportedAnnotationTypes_.get(i)); + } + if (supportsPostProcessing_ != false) { + output.writeBool(17, supportsPostProcessing_); + } + if (getSupportedInstanceTypesList().size() > 0) { + output.writeUInt32NoTag(146); + output.writeUInt32NoTag(supportedInstanceTypesMemoizedSerializedSize); + } + for (int i = 0; i < supportedInstanceTypes_.size(); i++) { + output.writeEnumNoTag(supportedInstanceTypes_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getCreateTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getUpdateTime()); + } + for (java.util.Map.Entry entry : + internalGetLabels().getMap().entrySet()) { + com.google.protobuf.MapEntry labels__ = + LabelsDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, labels__); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, displayName_); + } + if (processorType_ + != com.google.cloud.visionai.v1.Processor.ProcessorType.PROCESSOR_TYPE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(6, processorType_); + } + if (((bitField0_ & 0x00000004) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 7, getCustomProcessorSourceInfo()); + } + if (state_ + != com.google.cloud.visionai.v1.Processor.ProcessorState.PROCESSOR_STATE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(8, state_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(10, description_); + } + if (((bitField0_ & 0x00000008) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(11, getProcessorIoSpec()); + } + if (modelType_ != com.google.cloud.visionai.v1.ModelType.MODEL_TYPE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(13, modelType_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(configurationTypeurl_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(14, configurationTypeurl_); + } + { + int dataSize = 0; + for (int i = 0; i < supportedAnnotationTypes_.size(); i++) { + dataSize += + com.google.protobuf.CodedOutputStream.computeEnumSizeNoTag( + supportedAnnotationTypes_.get(i)); + } + size += dataSize; + if (!getSupportedAnnotationTypesList().isEmpty()) { + size += 1; + size += com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(dataSize); + } + supportedAnnotationTypesMemoizedSerializedSize = dataSize; + } + if (supportsPostProcessing_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(17, supportsPostProcessing_); + } + { + int dataSize = 0; + for (int i = 0; i < supportedInstanceTypes_.size(); i++) { + dataSize += + com.google.protobuf.CodedOutputStream.computeEnumSizeNoTag( + supportedInstanceTypes_.get(i)); + } + size += dataSize; + if (!getSupportedInstanceTypesList().isEmpty()) { + size += 2; + size += com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(dataSize); + } + supportedInstanceTypesMemoizedSerializedSize = dataSize; + } + size += getUnknownFields().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.visionai.v1.Processor)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.Processor other = (com.google.cloud.visionai.v1.Processor) obj; + + if (!getName().equals(other.getName())) return false; + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime().equals(other.getCreateTime())) return false; + } + if (hasUpdateTime() != other.hasUpdateTime()) return false; + if (hasUpdateTime()) { + if (!getUpdateTime().equals(other.getUpdateTime())) return false; + } + if (!internalGetLabels().equals(other.internalGetLabels())) return false; + if (!getDisplayName().equals(other.getDisplayName())) return false; + if (!getDescription().equals(other.getDescription())) return false; + if (processorType_ != other.processorType_) return false; + if (modelType_ != other.modelType_) return false; + if (hasCustomProcessorSourceInfo() != other.hasCustomProcessorSourceInfo()) return false; + if (hasCustomProcessorSourceInfo()) { + if (!getCustomProcessorSourceInfo().equals(other.getCustomProcessorSourceInfo())) + return false; + } + if (state_ != other.state_) return false; + if (hasProcessorIoSpec() != other.hasProcessorIoSpec()) return false; + if (hasProcessorIoSpec()) { + if (!getProcessorIoSpec().equals(other.getProcessorIoSpec())) return false; + } + if (!getConfigurationTypeurl().equals(other.getConfigurationTypeurl())) return false; + if (!supportedAnnotationTypes_.equals(other.supportedAnnotationTypes_)) return false; + if (getSupportsPostProcessing() != other.getSupportsPostProcessing()) return false; + if (!supportedInstanceTypes_.equals(other.supportedInstanceTypes_)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasUpdateTime()) { + hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getUpdateTime().hashCode(); + } + if (!internalGetLabels().getMap().isEmpty()) { + hash = (37 * hash) + LABELS_FIELD_NUMBER; + hash = (53 * hash) + internalGetLabels().hashCode(); + } + hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDisplayName().hashCode(); + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + hash = (37 * hash) + PROCESSOR_TYPE_FIELD_NUMBER; + hash = (53 * hash) + processorType_; + hash = (37 * hash) + MODEL_TYPE_FIELD_NUMBER; + hash = (53 * hash) + modelType_; + if (hasCustomProcessorSourceInfo()) { + hash = (37 * hash) + CUSTOM_PROCESSOR_SOURCE_INFO_FIELD_NUMBER; + hash = (53 * hash) + getCustomProcessorSourceInfo().hashCode(); + } + hash = (37 * hash) + STATE_FIELD_NUMBER; + hash = (53 * hash) + state_; + if (hasProcessorIoSpec()) { + hash = (37 * hash) + PROCESSOR_IO_SPEC_FIELD_NUMBER; + hash = (53 * hash) + getProcessorIoSpec().hashCode(); + } + hash = (37 * hash) + CONFIGURATION_TYPEURL_FIELD_NUMBER; + hash = (53 * hash) + getConfigurationTypeurl().hashCode(); + if (getSupportedAnnotationTypesCount() > 0) { + hash = (37 * hash) + SUPPORTED_ANNOTATION_TYPES_FIELD_NUMBER; + hash = (53 * hash) + supportedAnnotationTypes_.hashCode(); + } + hash = (37 * hash) + SUPPORTS_POST_PROCESSING_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getSupportsPostProcessing()); + if (getSupportedInstanceTypesCount() > 0) { + hash = (37 * hash) + SUPPORTED_INSTANCE_TYPES_FIELD_NUMBER; + hash = (53 * hash) + supportedInstanceTypes_.hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.Processor parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.Processor 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.visionai.v1.Processor parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.Processor 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.visionai.v1.Processor parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.Processor parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.Processor parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.Processor 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.visionai.v1.Processor parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.Processor 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.visionai.v1.Processor parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.Processor 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.visionai.v1.Processor 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; + } + /** + * + * + *
+   * Message describing Processor object.
+   * Next ID: 19
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.Processor} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.Processor) + com.google.cloud.visionai.v1.ProcessorOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_Processor_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 4: + return internalGetLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( + int number) { + switch (number) { + case 4: + return internalGetMutableLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_Processor_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.Processor.class, + com.google.cloud.visionai.v1.Processor.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.Processor.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getCreateTimeFieldBuilder(); + getUpdateTimeFieldBuilder(); + getCustomProcessorSourceInfoFieldBuilder(); + getProcessorIoSpecFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + internalGetMutableLabels().clear(); + displayName_ = ""; + description_ = ""; + processorType_ = 0; + modelType_ = 0; + customProcessorSourceInfo_ = null; + if (customProcessorSourceInfoBuilder_ != null) { + customProcessorSourceInfoBuilder_.dispose(); + customProcessorSourceInfoBuilder_ = null; + } + state_ = 0; + processorIoSpec_ = null; + if (processorIoSpecBuilder_ != null) { + processorIoSpecBuilder_.dispose(); + processorIoSpecBuilder_ = null; + } + configurationTypeurl_ = ""; + supportedAnnotationTypes_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00001000); + supportsPostProcessing_ = false; + supportedInstanceTypes_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00004000); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_Processor_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.Processor getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.Processor.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.Processor build() { + com.google.cloud.visionai.v1.Processor result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.Processor buildPartial() { + com.google.cloud.visionai.v1.Processor result = + new com.google.cloud.visionai.v1.Processor(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.google.cloud.visionai.v1.Processor result) { + if (((bitField0_ & 0x00001000) != 0)) { + supportedAnnotationTypes_ = + java.util.Collections.unmodifiableList(supportedAnnotationTypes_); + bitField0_ = (bitField0_ & ~0x00001000); + } + result.supportedAnnotationTypes_ = supportedAnnotationTypes_; + if (((bitField0_ & 0x00004000) != 0)) { + supportedInstanceTypes_ = java.util.Collections.unmodifiableList(supportedInstanceTypes_); + bitField0_ = (bitField0_ & ~0x00004000); + } + result.supportedInstanceTypes_ = supportedInstanceTypes_; + } + + private void buildPartial0(com.google.cloud.visionai.v1.Processor result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.updateTime_ = updateTimeBuilder_ == null ? updateTime_ : updateTimeBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.labels_ = internalGetLabels(); + result.labels_.makeImmutable(); + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.displayName_ = displayName_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.description_ = description_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.processorType_ = processorType_; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.modelType_ = modelType_; + } + if (((from_bitField0_ & 0x00000100) != 0)) { + result.customProcessorSourceInfo_ = + customProcessorSourceInfoBuilder_ == null + ? customProcessorSourceInfo_ + : customProcessorSourceInfoBuilder_.build(); + to_bitField0_ |= 0x00000004; + } + if (((from_bitField0_ & 0x00000200) != 0)) { + result.state_ = state_; + } + if (((from_bitField0_ & 0x00000400) != 0)) { + result.processorIoSpec_ = + processorIoSpecBuilder_ == null ? processorIoSpec_ : processorIoSpecBuilder_.build(); + to_bitField0_ |= 0x00000008; + } + if (((from_bitField0_ & 0x00000800) != 0)) { + result.configurationTypeurl_ = configurationTypeurl_; + } + if (((from_bitField0_ & 0x00002000) != 0)) { + result.supportsPostProcessing_ = supportsPostProcessing_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.Processor) { + return mergeFrom((com.google.cloud.visionai.v1.Processor) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.Processor other) { + if (other == com.google.cloud.visionai.v1.Processor.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + internalGetMutableLabels().mergeFrom(other.internalGetLabels()); + bitField0_ |= 0x00000008; + if (!other.getDisplayName().isEmpty()) { + displayName_ = other.displayName_; + bitField0_ |= 0x00000010; + onChanged(); + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + bitField0_ |= 0x00000020; + onChanged(); + } + if (other.processorType_ != 0) { + setProcessorTypeValue(other.getProcessorTypeValue()); + } + if (other.modelType_ != 0) { + setModelTypeValue(other.getModelTypeValue()); + } + if (other.hasCustomProcessorSourceInfo()) { + mergeCustomProcessorSourceInfo(other.getCustomProcessorSourceInfo()); + } + if (other.state_ != 0) { + setStateValue(other.getStateValue()); + } + if (other.hasProcessorIoSpec()) { + mergeProcessorIoSpec(other.getProcessorIoSpec()); + } + if (!other.getConfigurationTypeurl().isEmpty()) { + configurationTypeurl_ = other.configurationTypeurl_; + bitField0_ |= 0x00000800; + onChanged(); + } + if (!other.supportedAnnotationTypes_.isEmpty()) { + if (supportedAnnotationTypes_.isEmpty()) { + supportedAnnotationTypes_ = other.supportedAnnotationTypes_; + bitField0_ = (bitField0_ & ~0x00001000); + } else { + ensureSupportedAnnotationTypesIsMutable(); + supportedAnnotationTypes_.addAll(other.supportedAnnotationTypes_); + } + onChanged(); + } + if (other.getSupportsPostProcessing() != false) { + setSupportsPostProcessing(other.getSupportsPostProcessing()); + } + if (!other.supportedInstanceTypes_.isEmpty()) { + if (supportedInstanceTypes_.isEmpty()) { + supportedInstanceTypes_ = other.supportedInstanceTypes_; + bitField0_ = (bitField0_ & ~0x00004000); + } else { + ensureSupportedInstanceTypesIsMutable(); + supportedInstanceTypes_.addAll(other.supportedInstanceTypes_); + } + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage(getUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + com.google.protobuf.MapEntry labels__ = + input.readMessage( + LabelsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableLabels() + .getMutableMap() + .put(labels__.getKey(), labels__.getValue()); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + displayName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 48: + { + processorType_ = input.readEnum(); + bitField0_ |= 0x00000040; + break; + } // case 48 + case 58: + { + input.readMessage( + getCustomProcessorSourceInfoFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000100; + break; + } // case 58 + case 64: + { + state_ = input.readEnum(); + bitField0_ |= 0x00000200; + break; + } // case 64 + case 82: + { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case 82 + case 90: + { + input.readMessage(getProcessorIoSpecFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000400; + break; + } // case 90 + case 104: + { + modelType_ = input.readEnum(); + bitField0_ |= 0x00000080; + break; + } // case 104 + case 114: + { + configurationTypeurl_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000800; + break; + } // case 114 + case 120: + { + int tmpRaw = input.readEnum(); + ensureSupportedAnnotationTypesIsMutable(); + supportedAnnotationTypes_.add(tmpRaw); + break; + } // case 120 + case 122: + { + int length = input.readRawVarint32(); + int oldLimit = input.pushLimit(length); + while (input.getBytesUntilLimit() > 0) { + int tmpRaw = input.readEnum(); + ensureSupportedAnnotationTypesIsMutable(); + supportedAnnotationTypes_.add(tmpRaw); + } + input.popLimit(oldLimit); + break; + } // case 122 + case 136: + { + supportsPostProcessing_ = input.readBool(); + bitField0_ |= 0x00002000; + break; + } // case 136 + case 144: + { + int tmpRaw = input.readEnum(); + ensureSupportedInstanceTypesIsMutable(); + supportedInstanceTypes_.add(tmpRaw); + break; + } // case 144 + case 146: + { + int length = input.readRawVarint32(); + int oldLimit = input.pushLimit(length); + while (input.getBytesUntilLimit() > 0) { + int tmpRaw = input.readEnum(); + ensureSupportedInstanceTypesIsMutable(); + supportedInstanceTypes_.add(tmpRaw); + } + input.popLimit(oldLimit); + break; + } // case 146 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * name of resource.
+     * 
+ * + * string name = 1; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * name of resource.
+     * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * name of resource.
+     * 
+ * + * string name = 1; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * name of resource.
+     * 
+ * + * string name = 1; + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * name of resource.
+     * 
+ * + * string name = 1; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + createTimeBuilder_; + /** + * + * + *
+     * Output only. [Output only] Create timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * Output only. [Output only] Create timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. [Output only] Create timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + } else { + createTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. [Output only] Create timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. [Output only] Create timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && createTime_ != null + && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getCreateTimeBuilder().mergeFrom(value); + } else { + createTime_ = value; + } + } else { + createTimeBuilder_.mergeFrom(value); + } + if (createTime_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Output only. [Output only] Create timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearCreateTime() { + bitField0_ = (bitField0_ & ~0x00000002); + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. [Output only] Create timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. [Output only] Create timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } + } + /** + * + * + *
+     * Output only. [Output only] Create timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), getParentForChildren(), isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private com.google.protobuf.Timestamp updateTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + updateTimeBuilder_; + /** + * + * + *
+     * Output only. [Output only] Update timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+     * Output only. [Output only] Update timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + public com.google.protobuf.Timestamp getUpdateTime() { + if (updateTimeBuilder_ == null) { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } else { + return updateTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. [Output only] Update timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateTime_ = value; + } else { + updateTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. [Output only] Update timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (updateTimeBuilder_ == null) { + updateTime_ = builderForValue.build(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. [Output only] Update timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && updateTime_ != null + && updateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getUpdateTimeBuilder().mergeFrom(value); + } else { + updateTime_ = value; + } + } else { + updateTimeBuilder_.mergeFrom(value); + } + if (updateTime_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Output only. [Output only] Update timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearUpdateTime() { + bitField0_ = (bitField0_ & ~0x00000004); + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. [Output only] Update timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getUpdateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. [Output only] Update timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + if (updateTimeBuilder_ != null) { + return updateTimeBuilder_.getMessageOrBuilder(); + } else { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } + } + /** + * + * + *
+     * Output only. [Output only] Update timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + 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_; + } + + private com.google.protobuf.MapField labels_; + + private com.google.protobuf.MapField internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + + private com.google.protobuf.MapField + internalGetMutableLabels() { + if (labels_ == null) { + labels_ = com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry); + } + if (!labels_.isMutable()) { + labels_ = labels_.copy(); + } + bitField0_ |= 0x00000008; + onChanged(); + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + /** + * + * + *
+     * Labels as key value pairs.
+     * 
+ * + * map<string, string> labels = 4; + */ + @java.lang.Override + public boolean containsLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetLabels().getMap().containsKey(key); + } + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + /** + * + * + *
+     * Labels as key value pairs.
+     * 
+ * + * map<string, string> labels = 4; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + * + * + *
+     * Labels as key value pairs.
+     * 
+ * + * map<string, string> labels = 4; + */ + @java.lang.Override + public /* nullable */ java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+     * Labels as key value pairs.
+     * 
+ * + * map<string, string> labels = 4; + */ + @java.lang.Override + public java.lang.String getLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearLabels() { + bitField0_ = (bitField0_ & ~0x00000008); + internalGetMutableLabels().getMutableMap().clear(); + return this; + } + /** + * + * + *
+     * Labels as key value pairs.
+     * 
+ * + * map<string, string> labels = 4; + */ + public Builder removeLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + internalGetMutableLabels().getMutableMap().remove(key); + return this; + } + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableLabels() { + bitField0_ |= 0x00000008; + return internalGetMutableLabels().getMutableMap(); + } + /** + * + * + *
+     * Labels as key value pairs.
+     * 
+ * + * map<string, string> labels = 4; + */ + public Builder putLabels(java.lang.String key, java.lang.String value) { + if (key == null) { + throw new NullPointerException("map key"); + } + if (value == null) { + throw new NullPointerException("map value"); + } + internalGetMutableLabels().getMutableMap().put(key, value); + bitField0_ |= 0x00000008; + return this; + } + /** + * + * + *
+     * Labels as key value pairs.
+     * 
+ * + * map<string, string> labels = 4; + */ + public Builder putAllLabels(java.util.Map values) { + internalGetMutableLabels().getMutableMap().putAll(values); + bitField0_ |= 0x00000008; + return this; + } + + private java.lang.Object displayName_ = ""; + /** + * + * + *
+     * Required. A user friendly display name for the processor.
+     * 
+ * + * string display_name = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The displayName. + */ + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. A user friendly display name for the processor.
+     * 
+ * + * string display_name = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for displayName. + */ + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. A user friendly display name for the processor.
+     * 
+ * + * string display_name = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + displayName_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. A user friendly display name for the processor.
+     * 
+ * + * string display_name = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearDisplayName() { + displayName_ = getDefaultInstance().getDisplayName(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. A user friendly display name for the processor.
+     * 
+ * + * string display_name = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + displayName_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + private java.lang.Object description_ = ""; + /** + * + * + *
+     * Illustrative sentences for describing the functionality of the processor.
+     * 
+ * + * string description = 10; + * + * @return The description. + */ + 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; + } + } + /** + * + * + *
+     * Illustrative sentences for describing the functionality of the processor.
+     * 
+ * + * string description = 10; + * + * @return The bytes for description. + */ + 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; + } + } + /** + * + * + *
+     * Illustrative sentences for describing the functionality of the processor.
+     * 
+ * + * string description = 10; + * + * @param value The description to set. + * @return This builder for chaining. + */ + public Builder setDescription(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + description_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * Illustrative sentences for describing the functionality of the processor.
+     * 
+ * + * string description = 10; + * + * @return This builder for chaining. + */ + public Builder clearDescription() { + description_ = getDefaultInstance().getDescription(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + return this; + } + /** + * + * + *
+     * Illustrative sentences for describing the functionality of the processor.
+     * 
+ * + * string description = 10; + * + * @param value The bytes for description to set. + * @return This builder for chaining. + */ + public Builder setDescriptionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + description_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + private int processorType_ = 0; + /** + * + * + *
+     * Output only. Processor Type.
+     * 
+ * + * + * .google.cloud.visionai.v1.Processor.ProcessorType processor_type = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for processorType. + */ + @java.lang.Override + public int getProcessorTypeValue() { + return processorType_; + } + /** + * + * + *
+     * Output only. Processor Type.
+     * 
+ * + * + * .google.cloud.visionai.v1.Processor.ProcessorType processor_type = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The enum numeric value on the wire for processorType to set. + * @return This builder for chaining. + */ + public Builder setProcessorTypeValue(int value) { + processorType_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Processor Type.
+     * 
+ * + * + * .google.cloud.visionai.v1.Processor.ProcessorType processor_type = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The processorType. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.Processor.ProcessorType getProcessorType() { + com.google.cloud.visionai.v1.Processor.ProcessorType result = + com.google.cloud.visionai.v1.Processor.ProcessorType.forNumber(processorType_); + return result == null + ? com.google.cloud.visionai.v1.Processor.ProcessorType.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Output only. Processor Type.
+     * 
+ * + * + * .google.cloud.visionai.v1.Processor.ProcessorType processor_type = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The processorType to set. + * @return This builder for chaining. + */ + public Builder setProcessorType(com.google.cloud.visionai.v1.Processor.ProcessorType value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000040; + processorType_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Processor Type.
+     * 
+ * + * + * .google.cloud.visionai.v1.Processor.ProcessorType processor_type = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearProcessorType() { + bitField0_ = (bitField0_ & ~0x00000040); + processorType_ = 0; + onChanged(); + return this; + } + + private int modelType_ = 0; + /** + * + * + *
+     * Model Type.
+     * 
+ * + * .google.cloud.visionai.v1.ModelType model_type = 13; + * + * @return The enum numeric value on the wire for modelType. + */ + @java.lang.Override + public int getModelTypeValue() { + return modelType_; + } + /** + * + * + *
+     * Model Type.
+     * 
+ * + * .google.cloud.visionai.v1.ModelType model_type = 13; + * + * @param value The enum numeric value on the wire for modelType to set. + * @return This builder for chaining. + */ + public Builder setModelTypeValue(int value) { + modelType_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * + * + *
+     * Model Type.
+     * 
+ * + * .google.cloud.visionai.v1.ModelType model_type = 13; + * + * @return The modelType. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.ModelType getModelType() { + com.google.cloud.visionai.v1.ModelType result = + com.google.cloud.visionai.v1.ModelType.forNumber(modelType_); + return result == null ? com.google.cloud.visionai.v1.ModelType.UNRECOGNIZED : result; + } + /** + * + * + *
+     * Model Type.
+     * 
+ * + * .google.cloud.visionai.v1.ModelType model_type = 13; + * + * @param value The modelType to set. + * @return This builder for chaining. + */ + public Builder setModelType(com.google.cloud.visionai.v1.ModelType value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000080; + modelType_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Model Type.
+     * 
+ * + * .google.cloud.visionai.v1.ModelType model_type = 13; + * + * @return This builder for chaining. + */ + public Builder clearModelType() { + bitField0_ = (bitField0_ & ~0x00000080); + modelType_ = 0; + onChanged(); + return this; + } + + private com.google.cloud.visionai.v1.CustomProcessorSourceInfo customProcessorSourceInfo_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.CustomProcessorSourceInfo, + com.google.cloud.visionai.v1.CustomProcessorSourceInfo.Builder, + com.google.cloud.visionai.v1.CustomProcessorSourceInfoOrBuilder> + customProcessorSourceInfoBuilder_; + /** + * + * + *
+     * Source info for customer created processor.
+     * 
+ * + * .google.cloud.visionai.v1.CustomProcessorSourceInfo custom_processor_source_info = 7; + * + * + * @return Whether the customProcessorSourceInfo field is set. + */ + public boolean hasCustomProcessorSourceInfo() { + return ((bitField0_ & 0x00000100) != 0); + } + /** + * + * + *
+     * Source info for customer created processor.
+     * 
+ * + * .google.cloud.visionai.v1.CustomProcessorSourceInfo custom_processor_source_info = 7; + * + * + * @return The customProcessorSourceInfo. + */ + public com.google.cloud.visionai.v1.CustomProcessorSourceInfo getCustomProcessorSourceInfo() { + if (customProcessorSourceInfoBuilder_ == null) { + return customProcessorSourceInfo_ == null + ? com.google.cloud.visionai.v1.CustomProcessorSourceInfo.getDefaultInstance() + : customProcessorSourceInfo_; + } else { + return customProcessorSourceInfoBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Source info for customer created processor.
+     * 
+ * + * .google.cloud.visionai.v1.CustomProcessorSourceInfo custom_processor_source_info = 7; + * + */ + public Builder setCustomProcessorSourceInfo( + com.google.cloud.visionai.v1.CustomProcessorSourceInfo value) { + if (customProcessorSourceInfoBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + customProcessorSourceInfo_ = value; + } else { + customProcessorSourceInfoBuilder_.setMessage(value); + } + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + /** + * + * + *
+     * Source info for customer created processor.
+     * 
+ * + * .google.cloud.visionai.v1.CustomProcessorSourceInfo custom_processor_source_info = 7; + * + */ + public Builder setCustomProcessorSourceInfo( + com.google.cloud.visionai.v1.CustomProcessorSourceInfo.Builder builderForValue) { + if (customProcessorSourceInfoBuilder_ == null) { + customProcessorSourceInfo_ = builderForValue.build(); + } else { + customProcessorSourceInfoBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + /** + * + * + *
+     * Source info for customer created processor.
+     * 
+ * + * .google.cloud.visionai.v1.CustomProcessorSourceInfo custom_processor_source_info = 7; + * + */ + public Builder mergeCustomProcessorSourceInfo( + com.google.cloud.visionai.v1.CustomProcessorSourceInfo value) { + if (customProcessorSourceInfoBuilder_ == null) { + if (((bitField0_ & 0x00000100) != 0) + && customProcessorSourceInfo_ != null + && customProcessorSourceInfo_ + != com.google.cloud.visionai.v1.CustomProcessorSourceInfo.getDefaultInstance()) { + getCustomProcessorSourceInfoBuilder().mergeFrom(value); + } else { + customProcessorSourceInfo_ = value; + } + } else { + customProcessorSourceInfoBuilder_.mergeFrom(value); + } + if (customProcessorSourceInfo_ != null) { + bitField0_ |= 0x00000100; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Source info for customer created processor.
+     * 
+ * + * .google.cloud.visionai.v1.CustomProcessorSourceInfo custom_processor_source_info = 7; + * + */ + public Builder clearCustomProcessorSourceInfo() { + bitField0_ = (bitField0_ & ~0x00000100); + customProcessorSourceInfo_ = null; + if (customProcessorSourceInfoBuilder_ != null) { + customProcessorSourceInfoBuilder_.dispose(); + customProcessorSourceInfoBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Source info for customer created processor.
+     * 
+ * + * .google.cloud.visionai.v1.CustomProcessorSourceInfo custom_processor_source_info = 7; + * + */ + public com.google.cloud.visionai.v1.CustomProcessorSourceInfo.Builder + getCustomProcessorSourceInfoBuilder() { + bitField0_ |= 0x00000100; + onChanged(); + return getCustomProcessorSourceInfoFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Source info for customer created processor.
+     * 
+ * + * .google.cloud.visionai.v1.CustomProcessorSourceInfo custom_processor_source_info = 7; + * + */ + public com.google.cloud.visionai.v1.CustomProcessorSourceInfoOrBuilder + getCustomProcessorSourceInfoOrBuilder() { + if (customProcessorSourceInfoBuilder_ != null) { + return customProcessorSourceInfoBuilder_.getMessageOrBuilder(); + } else { + return customProcessorSourceInfo_ == null + ? com.google.cloud.visionai.v1.CustomProcessorSourceInfo.getDefaultInstance() + : customProcessorSourceInfo_; + } + } + /** + * + * + *
+     * Source info for customer created processor.
+     * 
+ * + * .google.cloud.visionai.v1.CustomProcessorSourceInfo custom_processor_source_info = 7; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.CustomProcessorSourceInfo, + com.google.cloud.visionai.v1.CustomProcessorSourceInfo.Builder, + com.google.cloud.visionai.v1.CustomProcessorSourceInfoOrBuilder> + getCustomProcessorSourceInfoFieldBuilder() { + if (customProcessorSourceInfoBuilder_ == null) { + customProcessorSourceInfoBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.CustomProcessorSourceInfo, + com.google.cloud.visionai.v1.CustomProcessorSourceInfo.Builder, + com.google.cloud.visionai.v1.CustomProcessorSourceInfoOrBuilder>( + getCustomProcessorSourceInfo(), getParentForChildren(), isClean()); + customProcessorSourceInfo_ = null; + } + return customProcessorSourceInfoBuilder_; + } + + private int state_ = 0; + /** + * + * + *
+     * Output only. State of the Processor.
+     * 
+ * + * + * .google.cloud.visionai.v1.Processor.ProcessorState state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + /** + * + * + *
+     * Output only. State of the Processor.
+     * 
+ * + * + * .google.cloud.visionai.v1.Processor.ProcessorState state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The enum numeric value on the wire for state to set. + * @return This builder for chaining. + */ + public Builder setStateValue(int value) { + state_ = value; + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. State of the Processor.
+     * 
+ * + * + * .google.cloud.visionai.v1.Processor.ProcessorState state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.Processor.ProcessorState getState() { + com.google.cloud.visionai.v1.Processor.ProcessorState result = + com.google.cloud.visionai.v1.Processor.ProcessorState.forNumber(state_); + return result == null + ? com.google.cloud.visionai.v1.Processor.ProcessorState.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Output only. State of the Processor.
+     * 
+ * + * + * .google.cloud.visionai.v1.Processor.ProcessorState state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The state to set. + * @return This builder for chaining. + */ + public Builder setState(com.google.cloud.visionai.v1.Processor.ProcessorState value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000200; + state_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. State of the Processor.
+     * 
+ * + * + * .google.cloud.visionai.v1.Processor.ProcessorState state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearState() { + bitField0_ = (bitField0_ & ~0x00000200); + state_ = 0; + onChanged(); + return this; + } + + private com.google.cloud.visionai.v1.ProcessorIOSpec processorIoSpec_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.ProcessorIOSpec, + com.google.cloud.visionai.v1.ProcessorIOSpec.Builder, + com.google.cloud.visionai.v1.ProcessorIOSpecOrBuilder> + processorIoSpecBuilder_; + /** + * + * + *
+     * Output only. [Output only] The input / output specifications of a
+     * processor, each type of processor has fixed input / output specs which
+     * cannot be altered by customer.
+     * 
+ * + * + * .google.cloud.visionai.v1.ProcessorIOSpec processor_io_spec = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the processorIoSpec field is set. + */ + public boolean hasProcessorIoSpec() { + return ((bitField0_ & 0x00000400) != 0); + } + /** + * + * + *
+     * Output only. [Output only] The input / output specifications of a
+     * processor, each type of processor has fixed input / output specs which
+     * cannot be altered by customer.
+     * 
+ * + * + * .google.cloud.visionai.v1.ProcessorIOSpec processor_io_spec = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The processorIoSpec. + */ + public com.google.cloud.visionai.v1.ProcessorIOSpec getProcessorIoSpec() { + if (processorIoSpecBuilder_ == null) { + return processorIoSpec_ == null + ? com.google.cloud.visionai.v1.ProcessorIOSpec.getDefaultInstance() + : processorIoSpec_; + } else { + return processorIoSpecBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. [Output only] The input / output specifications of a
+     * processor, each type of processor has fixed input / output specs which
+     * cannot be altered by customer.
+     * 
+ * + * + * .google.cloud.visionai.v1.ProcessorIOSpec processor_io_spec = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setProcessorIoSpec(com.google.cloud.visionai.v1.ProcessorIOSpec value) { + if (processorIoSpecBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + processorIoSpec_ = value; + } else { + processorIoSpecBuilder_.setMessage(value); + } + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. [Output only] The input / output specifications of a
+     * processor, each type of processor has fixed input / output specs which
+     * cannot be altered by customer.
+     * 
+ * + * + * .google.cloud.visionai.v1.ProcessorIOSpec processor_io_spec = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setProcessorIoSpec( + com.google.cloud.visionai.v1.ProcessorIOSpec.Builder builderForValue) { + if (processorIoSpecBuilder_ == null) { + processorIoSpec_ = builderForValue.build(); + } else { + processorIoSpecBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. [Output only] The input / output specifications of a
+     * processor, each type of processor has fixed input / output specs which
+     * cannot be altered by customer.
+     * 
+ * + * + * .google.cloud.visionai.v1.ProcessorIOSpec processor_io_spec = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeProcessorIoSpec(com.google.cloud.visionai.v1.ProcessorIOSpec value) { + if (processorIoSpecBuilder_ == null) { + if (((bitField0_ & 0x00000400) != 0) + && processorIoSpec_ != null + && processorIoSpec_ + != com.google.cloud.visionai.v1.ProcessorIOSpec.getDefaultInstance()) { + getProcessorIoSpecBuilder().mergeFrom(value); + } else { + processorIoSpec_ = value; + } + } else { + processorIoSpecBuilder_.mergeFrom(value); + } + if (processorIoSpec_ != null) { + bitField0_ |= 0x00000400; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Output only. [Output only] The input / output specifications of a
+     * processor, each type of processor has fixed input / output specs which
+     * cannot be altered by customer.
+     * 
+ * + * + * .google.cloud.visionai.v1.ProcessorIOSpec processor_io_spec = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearProcessorIoSpec() { + bitField0_ = (bitField0_ & ~0x00000400); + processorIoSpec_ = null; + if (processorIoSpecBuilder_ != null) { + processorIoSpecBuilder_.dispose(); + processorIoSpecBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. [Output only] The input / output specifications of a
+     * processor, each type of processor has fixed input / output specs which
+     * cannot be altered by customer.
+     * 
+ * + * + * .google.cloud.visionai.v1.ProcessorIOSpec processor_io_spec = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.visionai.v1.ProcessorIOSpec.Builder getProcessorIoSpecBuilder() { + bitField0_ |= 0x00000400; + onChanged(); + return getProcessorIoSpecFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. [Output only] The input / output specifications of a
+     * processor, each type of processor has fixed input / output specs which
+     * cannot be altered by customer.
+     * 
+ * + * + * .google.cloud.visionai.v1.ProcessorIOSpec processor_io_spec = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.visionai.v1.ProcessorIOSpecOrBuilder getProcessorIoSpecOrBuilder() { + if (processorIoSpecBuilder_ != null) { + return processorIoSpecBuilder_.getMessageOrBuilder(); + } else { + return processorIoSpec_ == null + ? com.google.cloud.visionai.v1.ProcessorIOSpec.getDefaultInstance() + : processorIoSpec_; + } + } + /** + * + * + *
+     * Output only. [Output only] The input / output specifications of a
+     * processor, each type of processor has fixed input / output specs which
+     * cannot be altered by customer.
+     * 
+ * + * + * .google.cloud.visionai.v1.ProcessorIOSpec processor_io_spec = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.ProcessorIOSpec, + com.google.cloud.visionai.v1.ProcessorIOSpec.Builder, + com.google.cloud.visionai.v1.ProcessorIOSpecOrBuilder> + getProcessorIoSpecFieldBuilder() { + if (processorIoSpecBuilder_ == null) { + processorIoSpecBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.ProcessorIOSpec, + com.google.cloud.visionai.v1.ProcessorIOSpec.Builder, + com.google.cloud.visionai.v1.ProcessorIOSpecOrBuilder>( + getProcessorIoSpec(), getParentForChildren(), isClean()); + processorIoSpec_ = null; + } + return processorIoSpecBuilder_; + } + + private java.lang.Object configurationTypeurl_ = ""; + /** + * + * + *
+     * Output only. The corresponding configuration can be used in the Application
+     * to customize the behavior of the processor.
+     * 
+ * + * string configuration_typeurl = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The configurationTypeurl. + */ + public java.lang.String getConfigurationTypeurl() { + java.lang.Object ref = configurationTypeurl_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + configurationTypeurl_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. The corresponding configuration can be used in the Application
+     * to customize the behavior of the processor.
+     * 
+ * + * string configuration_typeurl = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for configurationTypeurl. + */ + public com.google.protobuf.ByteString getConfigurationTypeurlBytes() { + java.lang.Object ref = configurationTypeurl_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + configurationTypeurl_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. The corresponding configuration can be used in the Application
+     * to customize the behavior of the processor.
+     * 
+ * + * string configuration_typeurl = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The configurationTypeurl to set. + * @return This builder for chaining. + */ + public Builder setConfigurationTypeurl(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + configurationTypeurl_ = value; + bitField0_ |= 0x00000800; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The corresponding configuration can be used in the Application
+     * to customize the behavior of the processor.
+     * 
+ * + * string configuration_typeurl = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearConfigurationTypeurl() { + configurationTypeurl_ = getDefaultInstance().getConfigurationTypeurl(); + bitField0_ = (bitField0_ & ~0x00000800); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The corresponding configuration can be used in the Application
+     * to customize the behavior of the processor.
+     * 
+ * + * string configuration_typeurl = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for configurationTypeurl to set. + * @return This builder for chaining. + */ + public Builder setConfigurationTypeurlBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + configurationTypeurl_ = value; + bitField0_ |= 0x00000800; + onChanged(); + return this; + } + + private java.util.List supportedAnnotationTypes_ = + java.util.Collections.emptyList(); + + private void ensureSupportedAnnotationTypesIsMutable() { + if (!((bitField0_ & 0x00001000) != 0)) { + supportedAnnotationTypes_ = + new java.util.ArrayList(supportedAnnotationTypes_); + bitField0_ |= 0x00001000; + } + } + /** + * + * repeated .google.cloud.visionai.v1.StreamAnnotationType supported_annotation_types = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return A list containing the supportedAnnotationTypes. + */ + public java.util.List + getSupportedAnnotationTypesList() { + return new com.google.protobuf.Internal.ListAdapter< + java.lang.Integer, com.google.cloud.visionai.v1.StreamAnnotationType>( + supportedAnnotationTypes_, supportedAnnotationTypes_converter_); + } + /** + * + * repeated .google.cloud.visionai.v1.StreamAnnotationType supported_annotation_types = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The count of supportedAnnotationTypes. + */ + public int getSupportedAnnotationTypesCount() { + return supportedAnnotationTypes_.size(); + } + /** + * + * repeated .google.cloud.visionai.v1.StreamAnnotationType supported_annotation_types = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param index The index of the element to return. + * @return The supportedAnnotationTypes at the given index. + */ + public com.google.cloud.visionai.v1.StreamAnnotationType getSupportedAnnotationTypes( + int index) { + return supportedAnnotationTypes_converter_.convert(supportedAnnotationTypes_.get(index)); + } + /** + * + * repeated .google.cloud.visionai.v1.StreamAnnotationType supported_annotation_types = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param index The index to set the value at. + * @param value The supportedAnnotationTypes to set. + * @return This builder for chaining. + */ + public Builder setSupportedAnnotationTypes( + int index, com.google.cloud.visionai.v1.StreamAnnotationType value) { + if (value == null) { + throw new NullPointerException(); + } + ensureSupportedAnnotationTypesIsMutable(); + supportedAnnotationTypes_.set(index, value.getNumber()); + onChanged(); + return this; + } + /** + * + * repeated .google.cloud.visionai.v1.StreamAnnotationType supported_annotation_types = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The supportedAnnotationTypes to add. + * @return This builder for chaining. + */ + public Builder addSupportedAnnotationTypes( + com.google.cloud.visionai.v1.StreamAnnotationType value) { + if (value == null) { + throw new NullPointerException(); + } + ensureSupportedAnnotationTypesIsMutable(); + supportedAnnotationTypes_.add(value.getNumber()); + onChanged(); + return this; + } + /** + * + * repeated .google.cloud.visionai.v1.StreamAnnotationType supported_annotation_types = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param values The supportedAnnotationTypes to add. + * @return This builder for chaining. + */ + public Builder addAllSupportedAnnotationTypes( + java.lang.Iterable values) { + ensureSupportedAnnotationTypesIsMutable(); + for (com.google.cloud.visionai.v1.StreamAnnotationType value : values) { + supportedAnnotationTypes_.add(value.getNumber()); + } + onChanged(); + return this; + } + /** + * + * repeated .google.cloud.visionai.v1.StreamAnnotationType supported_annotation_types = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearSupportedAnnotationTypes() { + supportedAnnotationTypes_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00001000); + onChanged(); + return this; + } + /** + * + * repeated .google.cloud.visionai.v1.StreamAnnotationType supported_annotation_types = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return A list containing the enum numeric values on the wire for supportedAnnotationTypes. + */ + public java.util.List getSupportedAnnotationTypesValueList() { + return java.util.Collections.unmodifiableList(supportedAnnotationTypes_); + } + /** + * + * repeated .google.cloud.visionai.v1.StreamAnnotationType supported_annotation_types = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param index The index of the value to return. + * @return The enum numeric value on the wire of supportedAnnotationTypes at the given index. + */ + public int getSupportedAnnotationTypesValue(int index) { + return supportedAnnotationTypes_.get(index); + } + /** + * + * repeated .google.cloud.visionai.v1.StreamAnnotationType supported_annotation_types = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param index The index to set the value at. + * @param value The enum numeric value on the wire for supportedAnnotationTypes to set. + * @return This builder for chaining. + */ + public Builder setSupportedAnnotationTypesValue(int index, int value) { + ensureSupportedAnnotationTypesIsMutable(); + supportedAnnotationTypes_.set(index, value); + onChanged(); + return this; + } + /** + * + * repeated .google.cloud.visionai.v1.StreamAnnotationType supported_annotation_types = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The enum numeric value on the wire for supportedAnnotationTypes to add. + * @return This builder for chaining. + */ + public Builder addSupportedAnnotationTypesValue(int value) { + ensureSupportedAnnotationTypesIsMutable(); + supportedAnnotationTypes_.add(value); + onChanged(); + return this; + } + /** + * + * repeated .google.cloud.visionai.v1.StreamAnnotationType supported_annotation_types = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param values The enum numeric values on the wire for supportedAnnotationTypes to add. + * @return This builder for chaining. + */ + public Builder addAllSupportedAnnotationTypesValue( + java.lang.Iterable values) { + ensureSupportedAnnotationTypesIsMutable(); + for (int value : values) { + supportedAnnotationTypes_.add(value); + } + onChanged(); + return this; + } + + private boolean supportsPostProcessing_; + /** + * + * + *
+     * Indicates if the processor supports post processing.
+     * 
+ * + * bool supports_post_processing = 17; + * + * @return The supportsPostProcessing. + */ + @java.lang.Override + public boolean getSupportsPostProcessing() { + return supportsPostProcessing_; + } + /** + * + * + *
+     * Indicates if the processor supports post processing.
+     * 
+ * + * bool supports_post_processing = 17; + * + * @param value The supportsPostProcessing to set. + * @return This builder for chaining. + */ + public Builder setSupportsPostProcessing(boolean value) { + + supportsPostProcessing_ = value; + bitField0_ |= 0x00002000; + onChanged(); + return this; + } + /** + * + * + *
+     * Indicates if the processor supports post processing.
+     * 
+ * + * bool supports_post_processing = 17; + * + * @return This builder for chaining. + */ + public Builder clearSupportsPostProcessing() { + bitField0_ = (bitField0_ & ~0x00002000); + supportsPostProcessing_ = false; + onChanged(); + return this; + } + + private java.util.List supportedInstanceTypes_ = + java.util.Collections.emptyList(); + + private void ensureSupportedInstanceTypesIsMutable() { + if (!((bitField0_ & 0x00004000) != 0)) { + supportedInstanceTypes_ = + new java.util.ArrayList(supportedInstanceTypes_); + bitField0_ |= 0x00004000; + } + } + /** + * + * + *
+     * Which instance types this processor supports; if empty, this default to
+     * STREAMING_PREDICTION.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Instance.InstanceType supported_instance_types = 18; + * + * + * @return A list containing the supportedInstanceTypes. + */ + public java.util.List + getSupportedInstanceTypesList() { + return new com.google.protobuf.Internal.ListAdapter< + java.lang.Integer, com.google.cloud.visionai.v1.Instance.InstanceType>( + supportedInstanceTypes_, supportedInstanceTypes_converter_); + } + /** + * + * + *
+     * Which instance types this processor supports; if empty, this default to
+     * STREAMING_PREDICTION.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Instance.InstanceType supported_instance_types = 18; + * + * + * @return The count of supportedInstanceTypes. + */ + public int getSupportedInstanceTypesCount() { + return supportedInstanceTypes_.size(); + } + /** + * + * + *
+     * Which instance types this processor supports; if empty, this default to
+     * STREAMING_PREDICTION.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Instance.InstanceType supported_instance_types = 18; + * + * + * @param index The index of the element to return. + * @return The supportedInstanceTypes at the given index. + */ + public com.google.cloud.visionai.v1.Instance.InstanceType getSupportedInstanceTypes(int index) { + return supportedInstanceTypes_converter_.convert(supportedInstanceTypes_.get(index)); + } + /** + * + * + *
+     * Which instance types this processor supports; if empty, this default to
+     * STREAMING_PREDICTION.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Instance.InstanceType supported_instance_types = 18; + * + * + * @param index The index to set the value at. + * @param value The supportedInstanceTypes to set. + * @return This builder for chaining. + */ + public Builder setSupportedInstanceTypes( + int index, com.google.cloud.visionai.v1.Instance.InstanceType value) { + if (value == null) { + throw new NullPointerException(); + } + ensureSupportedInstanceTypesIsMutable(); + supportedInstanceTypes_.set(index, value.getNumber()); + onChanged(); + return this; + } + /** + * + * + *
+     * Which instance types this processor supports; if empty, this default to
+     * STREAMING_PREDICTION.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Instance.InstanceType supported_instance_types = 18; + * + * + * @param value The supportedInstanceTypes to add. + * @return This builder for chaining. + */ + public Builder addSupportedInstanceTypes( + com.google.cloud.visionai.v1.Instance.InstanceType value) { + if (value == null) { + throw new NullPointerException(); + } + ensureSupportedInstanceTypesIsMutable(); + supportedInstanceTypes_.add(value.getNumber()); + onChanged(); + return this; + } + /** + * + * + *
+     * Which instance types this processor supports; if empty, this default to
+     * STREAMING_PREDICTION.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Instance.InstanceType supported_instance_types = 18; + * + * + * @param values The supportedInstanceTypes to add. + * @return This builder for chaining. + */ + public Builder addAllSupportedInstanceTypes( + java.lang.Iterable values) { + ensureSupportedInstanceTypesIsMutable(); + for (com.google.cloud.visionai.v1.Instance.InstanceType value : values) { + supportedInstanceTypes_.add(value.getNumber()); + } + onChanged(); + return this; + } + /** + * + * + *
+     * Which instance types this processor supports; if empty, this default to
+     * STREAMING_PREDICTION.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Instance.InstanceType supported_instance_types = 18; + * + * + * @return This builder for chaining. + */ + public Builder clearSupportedInstanceTypes() { + supportedInstanceTypes_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00004000); + onChanged(); + return this; + } + /** + * + * + *
+     * Which instance types this processor supports; if empty, this default to
+     * STREAMING_PREDICTION.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Instance.InstanceType supported_instance_types = 18; + * + * + * @return A list containing the enum numeric values on the wire for supportedInstanceTypes. + */ + public java.util.List getSupportedInstanceTypesValueList() { + return java.util.Collections.unmodifiableList(supportedInstanceTypes_); + } + /** + * + * + *
+     * Which instance types this processor supports; if empty, this default to
+     * STREAMING_PREDICTION.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Instance.InstanceType supported_instance_types = 18; + * + * + * @param index The index of the value to return. + * @return The enum numeric value on the wire of supportedInstanceTypes at the given index. + */ + public int getSupportedInstanceTypesValue(int index) { + return supportedInstanceTypes_.get(index); + } + /** + * + * + *
+     * Which instance types this processor supports; if empty, this default to
+     * STREAMING_PREDICTION.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Instance.InstanceType supported_instance_types = 18; + * + * + * @param index The index to set the value at. + * @param value The enum numeric value on the wire for supportedInstanceTypes to set. + * @return This builder for chaining. + */ + public Builder setSupportedInstanceTypesValue(int index, int value) { + ensureSupportedInstanceTypesIsMutable(); + supportedInstanceTypes_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+     * Which instance types this processor supports; if empty, this default to
+     * STREAMING_PREDICTION.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Instance.InstanceType supported_instance_types = 18; + * + * + * @param value The enum numeric value on the wire for supportedInstanceTypes to add. + * @return This builder for chaining. + */ + public Builder addSupportedInstanceTypesValue(int value) { + ensureSupportedInstanceTypesIsMutable(); + supportedInstanceTypes_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+     * Which instance types this processor supports; if empty, this default to
+     * STREAMING_PREDICTION.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Instance.InstanceType supported_instance_types = 18; + * + * + * @param values The enum numeric values on the wire for supportedInstanceTypes to add. + * @return This builder for chaining. + */ + public Builder addAllSupportedInstanceTypesValue(java.lang.Iterable values) { + ensureSupportedInstanceTypesIsMutable(); + for (int value : values) { + supportedInstanceTypes_.add(value); + } + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.Processor) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.Processor) + private static final com.google.cloud.visionai.v1.Processor DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.Processor(); + } + + public static com.google.cloud.visionai.v1.Processor getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Processor parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.Processor getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ProcessorConfig.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ProcessorConfig.java new file mode 100644 index 000000000000..70c0bf5a2947 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ProcessorConfig.java @@ -0,0 +1,5802 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/platform.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * Next ID: 35
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.ProcessorConfig} + */ +public final class ProcessorConfig extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.ProcessorConfig) + ProcessorConfigOrBuilder { + private static final long serialVersionUID = 0L; + // Use ProcessorConfig.newBuilder() to construct. + private ProcessorConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ProcessorConfig() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ProcessorConfig(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_ProcessorConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_ProcessorConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.ProcessorConfig.class, + com.google.cloud.visionai.v1.ProcessorConfig.Builder.class); + } + + private int bitField0_; + private int processorConfigCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object processorConfig_; + + public enum ProcessorConfigCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + VIDEO_STREAM_INPUT_CONFIG(9), + AI_ENABLED_DEVICES_INPUT_CONFIG(20), + MEDIA_WAREHOUSE_CONFIG(10), + PERSON_BLUR_CONFIG(11), + OCCUPANCY_COUNT_CONFIG(12), + PERSON_VEHICLE_DETECTION_CONFIG(15), + VERTEX_AUTOML_VISION_CONFIG(13), + VERTEX_AUTOML_VIDEO_CONFIG(14), + VERTEX_CUSTOM_CONFIG(17), + GENERAL_OBJECT_DETECTION_CONFIG(18), + BIG_QUERY_CONFIG(19), + GCS_OUTPUT_CONFIG(27), + PRODUCT_RECOGNIZER_CONFIG(21), + PERSONAL_PROTECTIVE_EQUIPMENT_DETECTION_CONFIG(22), + TAG_RECOGNIZER_CONFIG(25), + UNIVERSAL_INPUT_CONFIG(28), + PROCESSORCONFIG_NOT_SET(0); + private final int value; + + private ProcessorConfigCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static ProcessorConfigCase valueOf(int value) { + return forNumber(value); + } + + public static ProcessorConfigCase forNumber(int value) { + switch (value) { + case 9: + return VIDEO_STREAM_INPUT_CONFIG; + case 20: + return AI_ENABLED_DEVICES_INPUT_CONFIG; + case 10: + return MEDIA_WAREHOUSE_CONFIG; + case 11: + return PERSON_BLUR_CONFIG; + case 12: + return OCCUPANCY_COUNT_CONFIG; + case 15: + return PERSON_VEHICLE_DETECTION_CONFIG; + case 13: + return VERTEX_AUTOML_VISION_CONFIG; + case 14: + return VERTEX_AUTOML_VIDEO_CONFIG; + case 17: + return VERTEX_CUSTOM_CONFIG; + case 18: + return GENERAL_OBJECT_DETECTION_CONFIG; + case 19: + return BIG_QUERY_CONFIG; + case 27: + return GCS_OUTPUT_CONFIG; + case 21: + return PRODUCT_RECOGNIZER_CONFIG; + case 22: + return PERSONAL_PROTECTIVE_EQUIPMENT_DETECTION_CONFIG; + case 25: + return TAG_RECOGNIZER_CONFIG; + case 28: + return UNIVERSAL_INPUT_CONFIG; + case 0: + return PROCESSORCONFIG_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public ProcessorConfigCase getProcessorConfigCase() { + return ProcessorConfigCase.forNumber(processorConfigCase_); + } + + public static final int VIDEO_STREAM_INPUT_CONFIG_FIELD_NUMBER = 9; + /** + * + * + *
+   * Configs of stream input processor.
+   * 
+ * + * .google.cloud.visionai.v1.VideoStreamInputConfig video_stream_input_config = 9; + * + * @return Whether the videoStreamInputConfig field is set. + */ + @java.lang.Override + public boolean hasVideoStreamInputConfig() { + return processorConfigCase_ == 9; + } + /** + * + * + *
+   * Configs of stream input processor.
+   * 
+ * + * .google.cloud.visionai.v1.VideoStreamInputConfig video_stream_input_config = 9; + * + * @return The videoStreamInputConfig. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.VideoStreamInputConfig getVideoStreamInputConfig() { + if (processorConfigCase_ == 9) { + return (com.google.cloud.visionai.v1.VideoStreamInputConfig) processorConfig_; + } + return com.google.cloud.visionai.v1.VideoStreamInputConfig.getDefaultInstance(); + } + /** + * + * + *
+   * Configs of stream input processor.
+   * 
+ * + * .google.cloud.visionai.v1.VideoStreamInputConfig video_stream_input_config = 9; + */ + @java.lang.Override + public com.google.cloud.visionai.v1.VideoStreamInputConfigOrBuilder + getVideoStreamInputConfigOrBuilder() { + if (processorConfigCase_ == 9) { + return (com.google.cloud.visionai.v1.VideoStreamInputConfig) processorConfig_; + } + return com.google.cloud.visionai.v1.VideoStreamInputConfig.getDefaultInstance(); + } + + public static final int AI_ENABLED_DEVICES_INPUT_CONFIG_FIELD_NUMBER = 20; + /** + * + * + *
+   * Config of AI-enabled input devices.
+   * 
+ * + * + * .google.cloud.visionai.v1.AIEnabledDevicesInputConfig ai_enabled_devices_input_config = 20; + * + * + * @return Whether the aiEnabledDevicesInputConfig field is set. + */ + @java.lang.Override + public boolean hasAiEnabledDevicesInputConfig() { + return processorConfigCase_ == 20; + } + /** + * + * + *
+   * Config of AI-enabled input devices.
+   * 
+ * + * + * .google.cloud.visionai.v1.AIEnabledDevicesInputConfig ai_enabled_devices_input_config = 20; + * + * + * @return The aiEnabledDevicesInputConfig. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.AIEnabledDevicesInputConfig getAiEnabledDevicesInputConfig() { + if (processorConfigCase_ == 20) { + return (com.google.cloud.visionai.v1.AIEnabledDevicesInputConfig) processorConfig_; + } + return com.google.cloud.visionai.v1.AIEnabledDevicesInputConfig.getDefaultInstance(); + } + /** + * + * + *
+   * Config of AI-enabled input devices.
+   * 
+ * + * + * .google.cloud.visionai.v1.AIEnabledDevicesInputConfig ai_enabled_devices_input_config = 20; + * + */ + @java.lang.Override + public com.google.cloud.visionai.v1.AIEnabledDevicesInputConfigOrBuilder + getAiEnabledDevicesInputConfigOrBuilder() { + if (processorConfigCase_ == 20) { + return (com.google.cloud.visionai.v1.AIEnabledDevicesInputConfig) processorConfig_; + } + return com.google.cloud.visionai.v1.AIEnabledDevicesInputConfig.getDefaultInstance(); + } + + public static final int MEDIA_WAREHOUSE_CONFIG_FIELD_NUMBER = 10; + /** + * + * + *
+   * Configs of media warehouse processor.
+   * 
+ * + * .google.cloud.visionai.v1.MediaWarehouseConfig media_warehouse_config = 10; + * + * @return Whether the mediaWarehouseConfig field is set. + */ + @java.lang.Override + public boolean hasMediaWarehouseConfig() { + return processorConfigCase_ == 10; + } + /** + * + * + *
+   * Configs of media warehouse processor.
+   * 
+ * + * .google.cloud.visionai.v1.MediaWarehouseConfig media_warehouse_config = 10; + * + * @return The mediaWarehouseConfig. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.MediaWarehouseConfig getMediaWarehouseConfig() { + if (processorConfigCase_ == 10) { + return (com.google.cloud.visionai.v1.MediaWarehouseConfig) processorConfig_; + } + return com.google.cloud.visionai.v1.MediaWarehouseConfig.getDefaultInstance(); + } + /** + * + * + *
+   * Configs of media warehouse processor.
+   * 
+ * + * .google.cloud.visionai.v1.MediaWarehouseConfig media_warehouse_config = 10; + */ + @java.lang.Override + public com.google.cloud.visionai.v1.MediaWarehouseConfigOrBuilder + getMediaWarehouseConfigOrBuilder() { + if (processorConfigCase_ == 10) { + return (com.google.cloud.visionai.v1.MediaWarehouseConfig) processorConfig_; + } + return com.google.cloud.visionai.v1.MediaWarehouseConfig.getDefaultInstance(); + } + + public static final int PERSON_BLUR_CONFIG_FIELD_NUMBER = 11; + /** + * + * + *
+   * Configs of person blur processor.
+   * 
+ * + * .google.cloud.visionai.v1.PersonBlurConfig person_blur_config = 11; + * + * @return Whether the personBlurConfig field is set. + */ + @java.lang.Override + public boolean hasPersonBlurConfig() { + return processorConfigCase_ == 11; + } + /** + * + * + *
+   * Configs of person blur processor.
+   * 
+ * + * .google.cloud.visionai.v1.PersonBlurConfig person_blur_config = 11; + * + * @return The personBlurConfig. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.PersonBlurConfig getPersonBlurConfig() { + if (processorConfigCase_ == 11) { + return (com.google.cloud.visionai.v1.PersonBlurConfig) processorConfig_; + } + return com.google.cloud.visionai.v1.PersonBlurConfig.getDefaultInstance(); + } + /** + * + * + *
+   * Configs of person blur processor.
+   * 
+ * + * .google.cloud.visionai.v1.PersonBlurConfig person_blur_config = 11; + */ + @java.lang.Override + public com.google.cloud.visionai.v1.PersonBlurConfigOrBuilder getPersonBlurConfigOrBuilder() { + if (processorConfigCase_ == 11) { + return (com.google.cloud.visionai.v1.PersonBlurConfig) processorConfig_; + } + return com.google.cloud.visionai.v1.PersonBlurConfig.getDefaultInstance(); + } + + public static final int OCCUPANCY_COUNT_CONFIG_FIELD_NUMBER = 12; + /** + * + * + *
+   * Configs of occupancy count processor.
+   * 
+ * + * .google.cloud.visionai.v1.OccupancyCountConfig occupancy_count_config = 12; + * + * @return Whether the occupancyCountConfig field is set. + */ + @java.lang.Override + public boolean hasOccupancyCountConfig() { + return processorConfigCase_ == 12; + } + /** + * + * + *
+   * Configs of occupancy count processor.
+   * 
+ * + * .google.cloud.visionai.v1.OccupancyCountConfig occupancy_count_config = 12; + * + * @return The occupancyCountConfig. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.OccupancyCountConfig getOccupancyCountConfig() { + if (processorConfigCase_ == 12) { + return (com.google.cloud.visionai.v1.OccupancyCountConfig) processorConfig_; + } + return com.google.cloud.visionai.v1.OccupancyCountConfig.getDefaultInstance(); + } + /** + * + * + *
+   * Configs of occupancy count processor.
+   * 
+ * + * .google.cloud.visionai.v1.OccupancyCountConfig occupancy_count_config = 12; + */ + @java.lang.Override + public com.google.cloud.visionai.v1.OccupancyCountConfigOrBuilder + getOccupancyCountConfigOrBuilder() { + if (processorConfigCase_ == 12) { + return (com.google.cloud.visionai.v1.OccupancyCountConfig) processorConfig_; + } + return com.google.cloud.visionai.v1.OccupancyCountConfig.getDefaultInstance(); + } + + public static final int PERSON_VEHICLE_DETECTION_CONFIG_FIELD_NUMBER = 15; + /** + * + * + *
+   * Configs of Person Vehicle Detection processor.
+   * 
+ * + * + * .google.cloud.visionai.v1.PersonVehicleDetectionConfig person_vehicle_detection_config = 15; + * + * + * @return Whether the personVehicleDetectionConfig field is set. + */ + @java.lang.Override + public boolean hasPersonVehicleDetectionConfig() { + return processorConfigCase_ == 15; + } + /** + * + * + *
+   * Configs of Person Vehicle Detection processor.
+   * 
+ * + * + * .google.cloud.visionai.v1.PersonVehicleDetectionConfig person_vehicle_detection_config = 15; + * + * + * @return The personVehicleDetectionConfig. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.PersonVehicleDetectionConfig + getPersonVehicleDetectionConfig() { + if (processorConfigCase_ == 15) { + return (com.google.cloud.visionai.v1.PersonVehicleDetectionConfig) processorConfig_; + } + return com.google.cloud.visionai.v1.PersonVehicleDetectionConfig.getDefaultInstance(); + } + /** + * + * + *
+   * Configs of Person Vehicle Detection processor.
+   * 
+ * + * + * .google.cloud.visionai.v1.PersonVehicleDetectionConfig person_vehicle_detection_config = 15; + * + */ + @java.lang.Override + public com.google.cloud.visionai.v1.PersonVehicleDetectionConfigOrBuilder + getPersonVehicleDetectionConfigOrBuilder() { + if (processorConfigCase_ == 15) { + return (com.google.cloud.visionai.v1.PersonVehicleDetectionConfig) processorConfig_; + } + return com.google.cloud.visionai.v1.PersonVehicleDetectionConfig.getDefaultInstance(); + } + + public static final int VERTEX_AUTOML_VISION_CONFIG_FIELD_NUMBER = 13; + /** + * + * + *
+   * Configs of Vertex AutoML vision processor.
+   * 
+ * + * .google.cloud.visionai.v1.VertexAutoMLVisionConfig vertex_automl_vision_config = 13; + * + * + * @return Whether the vertexAutomlVisionConfig field is set. + */ + @java.lang.Override + public boolean hasVertexAutomlVisionConfig() { + return processorConfigCase_ == 13; + } + /** + * + * + *
+   * Configs of Vertex AutoML vision processor.
+   * 
+ * + * .google.cloud.visionai.v1.VertexAutoMLVisionConfig vertex_automl_vision_config = 13; + * + * + * @return The vertexAutomlVisionConfig. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.VertexAutoMLVisionConfig getVertexAutomlVisionConfig() { + if (processorConfigCase_ == 13) { + return (com.google.cloud.visionai.v1.VertexAutoMLVisionConfig) processorConfig_; + } + return com.google.cloud.visionai.v1.VertexAutoMLVisionConfig.getDefaultInstance(); + } + /** + * + * + *
+   * Configs of Vertex AutoML vision processor.
+   * 
+ * + * .google.cloud.visionai.v1.VertexAutoMLVisionConfig vertex_automl_vision_config = 13; + * + */ + @java.lang.Override + public com.google.cloud.visionai.v1.VertexAutoMLVisionConfigOrBuilder + getVertexAutomlVisionConfigOrBuilder() { + if (processorConfigCase_ == 13) { + return (com.google.cloud.visionai.v1.VertexAutoMLVisionConfig) processorConfig_; + } + return com.google.cloud.visionai.v1.VertexAutoMLVisionConfig.getDefaultInstance(); + } + + public static final int VERTEX_AUTOML_VIDEO_CONFIG_FIELD_NUMBER = 14; + /** + * + * + *
+   * Configs of Vertex AutoML video processor.
+   * 
+ * + * .google.cloud.visionai.v1.VertexAutoMLVideoConfig vertex_automl_video_config = 14; + * + * @return Whether the vertexAutomlVideoConfig field is set. + */ + @java.lang.Override + public boolean hasVertexAutomlVideoConfig() { + return processorConfigCase_ == 14; + } + /** + * + * + *
+   * Configs of Vertex AutoML video processor.
+   * 
+ * + * .google.cloud.visionai.v1.VertexAutoMLVideoConfig vertex_automl_video_config = 14; + * + * @return The vertexAutomlVideoConfig. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.VertexAutoMLVideoConfig getVertexAutomlVideoConfig() { + if (processorConfigCase_ == 14) { + return (com.google.cloud.visionai.v1.VertexAutoMLVideoConfig) processorConfig_; + } + return com.google.cloud.visionai.v1.VertexAutoMLVideoConfig.getDefaultInstance(); + } + /** + * + * + *
+   * Configs of Vertex AutoML video processor.
+   * 
+ * + * .google.cloud.visionai.v1.VertexAutoMLVideoConfig vertex_automl_video_config = 14; + */ + @java.lang.Override + public com.google.cloud.visionai.v1.VertexAutoMLVideoConfigOrBuilder + getVertexAutomlVideoConfigOrBuilder() { + if (processorConfigCase_ == 14) { + return (com.google.cloud.visionai.v1.VertexAutoMLVideoConfig) processorConfig_; + } + return com.google.cloud.visionai.v1.VertexAutoMLVideoConfig.getDefaultInstance(); + } + + public static final int VERTEX_CUSTOM_CONFIG_FIELD_NUMBER = 17; + /** + * + * + *
+   * Configs of Vertex Custom processor.
+   * 
+ * + * .google.cloud.visionai.v1.VertexCustomConfig vertex_custom_config = 17; + * + * @return Whether the vertexCustomConfig field is set. + */ + @java.lang.Override + public boolean hasVertexCustomConfig() { + return processorConfigCase_ == 17; + } + /** + * + * + *
+   * Configs of Vertex Custom processor.
+   * 
+ * + * .google.cloud.visionai.v1.VertexCustomConfig vertex_custom_config = 17; + * + * @return The vertexCustomConfig. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.VertexCustomConfig getVertexCustomConfig() { + if (processorConfigCase_ == 17) { + return (com.google.cloud.visionai.v1.VertexCustomConfig) processorConfig_; + } + return com.google.cloud.visionai.v1.VertexCustomConfig.getDefaultInstance(); + } + /** + * + * + *
+   * Configs of Vertex Custom processor.
+   * 
+ * + * .google.cloud.visionai.v1.VertexCustomConfig vertex_custom_config = 17; + */ + @java.lang.Override + public com.google.cloud.visionai.v1.VertexCustomConfigOrBuilder getVertexCustomConfigOrBuilder() { + if (processorConfigCase_ == 17) { + return (com.google.cloud.visionai.v1.VertexCustomConfig) processorConfig_; + } + return com.google.cloud.visionai.v1.VertexCustomConfig.getDefaultInstance(); + } + + public static final int GENERAL_OBJECT_DETECTION_CONFIG_FIELD_NUMBER = 18; + /** + * + * + *
+   * Configs of General Object Detection processor.
+   * 
+ * + * + * .google.cloud.visionai.v1.GeneralObjectDetectionConfig general_object_detection_config = 18; + * + * + * @return Whether the generalObjectDetectionConfig field is set. + */ + @java.lang.Override + public boolean hasGeneralObjectDetectionConfig() { + return processorConfigCase_ == 18; + } + /** + * + * + *
+   * Configs of General Object Detection processor.
+   * 
+ * + * + * .google.cloud.visionai.v1.GeneralObjectDetectionConfig general_object_detection_config = 18; + * + * + * @return The generalObjectDetectionConfig. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.GeneralObjectDetectionConfig + getGeneralObjectDetectionConfig() { + if (processorConfigCase_ == 18) { + return (com.google.cloud.visionai.v1.GeneralObjectDetectionConfig) processorConfig_; + } + return com.google.cloud.visionai.v1.GeneralObjectDetectionConfig.getDefaultInstance(); + } + /** + * + * + *
+   * Configs of General Object Detection processor.
+   * 
+ * + * + * .google.cloud.visionai.v1.GeneralObjectDetectionConfig general_object_detection_config = 18; + * + */ + @java.lang.Override + public com.google.cloud.visionai.v1.GeneralObjectDetectionConfigOrBuilder + getGeneralObjectDetectionConfigOrBuilder() { + if (processorConfigCase_ == 18) { + return (com.google.cloud.visionai.v1.GeneralObjectDetectionConfig) processorConfig_; + } + return com.google.cloud.visionai.v1.GeneralObjectDetectionConfig.getDefaultInstance(); + } + + public static final int BIG_QUERY_CONFIG_FIELD_NUMBER = 19; + /** + * + * + *
+   * Configs of BigQuery processor.
+   * 
+ * + * .google.cloud.visionai.v1.BigQueryConfig big_query_config = 19; + * + * @return Whether the bigQueryConfig field is set. + */ + @java.lang.Override + public boolean hasBigQueryConfig() { + return processorConfigCase_ == 19; + } + /** + * + * + *
+   * Configs of BigQuery processor.
+   * 
+ * + * .google.cloud.visionai.v1.BigQueryConfig big_query_config = 19; + * + * @return The bigQueryConfig. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.BigQueryConfig getBigQueryConfig() { + if (processorConfigCase_ == 19) { + return (com.google.cloud.visionai.v1.BigQueryConfig) processorConfig_; + } + return com.google.cloud.visionai.v1.BigQueryConfig.getDefaultInstance(); + } + /** + * + * + *
+   * Configs of BigQuery processor.
+   * 
+ * + * .google.cloud.visionai.v1.BigQueryConfig big_query_config = 19; + */ + @java.lang.Override + public com.google.cloud.visionai.v1.BigQueryConfigOrBuilder getBigQueryConfigOrBuilder() { + if (processorConfigCase_ == 19) { + return (com.google.cloud.visionai.v1.BigQueryConfig) processorConfig_; + } + return com.google.cloud.visionai.v1.BigQueryConfig.getDefaultInstance(); + } + + public static final int GCS_OUTPUT_CONFIG_FIELD_NUMBER = 27; + /** + * + * + *
+   * Configs of Cloud Storage output processor.
+   * 
+ * + * .google.cloud.visionai.v1.GcsOutputConfig gcs_output_config = 27; + * + * @return Whether the gcsOutputConfig field is set. + */ + @java.lang.Override + public boolean hasGcsOutputConfig() { + return processorConfigCase_ == 27; + } + /** + * + * + *
+   * Configs of Cloud Storage output processor.
+   * 
+ * + * .google.cloud.visionai.v1.GcsOutputConfig gcs_output_config = 27; + * + * @return The gcsOutputConfig. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.GcsOutputConfig getGcsOutputConfig() { + if (processorConfigCase_ == 27) { + return (com.google.cloud.visionai.v1.GcsOutputConfig) processorConfig_; + } + return com.google.cloud.visionai.v1.GcsOutputConfig.getDefaultInstance(); + } + /** + * + * + *
+   * Configs of Cloud Storage output processor.
+   * 
+ * + * .google.cloud.visionai.v1.GcsOutputConfig gcs_output_config = 27; + */ + @java.lang.Override + public com.google.cloud.visionai.v1.GcsOutputConfigOrBuilder getGcsOutputConfigOrBuilder() { + if (processorConfigCase_ == 27) { + return (com.google.cloud.visionai.v1.GcsOutputConfig) processorConfig_; + } + return com.google.cloud.visionai.v1.GcsOutputConfig.getDefaultInstance(); + } + + public static final int PRODUCT_RECOGNIZER_CONFIG_FIELD_NUMBER = 21; + /** + * + * + *
+   * Runtime configs of Product Recognizer processor.
+   * 
+ * + * .google.cloud.visionai.v1.ProductRecognizerConfig product_recognizer_config = 21; + * + * @return Whether the productRecognizerConfig field is set. + */ + @java.lang.Override + public boolean hasProductRecognizerConfig() { + return processorConfigCase_ == 21; + } + /** + * + * + *
+   * Runtime configs of Product Recognizer processor.
+   * 
+ * + * .google.cloud.visionai.v1.ProductRecognizerConfig product_recognizer_config = 21; + * + * @return The productRecognizerConfig. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.ProductRecognizerConfig getProductRecognizerConfig() { + if (processorConfigCase_ == 21) { + return (com.google.cloud.visionai.v1.ProductRecognizerConfig) processorConfig_; + } + return com.google.cloud.visionai.v1.ProductRecognizerConfig.getDefaultInstance(); + } + /** + * + * + *
+   * Runtime configs of Product Recognizer processor.
+   * 
+ * + * .google.cloud.visionai.v1.ProductRecognizerConfig product_recognizer_config = 21; + */ + @java.lang.Override + public com.google.cloud.visionai.v1.ProductRecognizerConfigOrBuilder + getProductRecognizerConfigOrBuilder() { + if (processorConfigCase_ == 21) { + return (com.google.cloud.visionai.v1.ProductRecognizerConfig) processorConfig_; + } + return com.google.cloud.visionai.v1.ProductRecognizerConfig.getDefaultInstance(); + } + + public static final int PERSONAL_PROTECTIVE_EQUIPMENT_DETECTION_CONFIG_FIELD_NUMBER = 22; + /** + * + * + *
+   * Configs of personal_protective_equipment_detection_config
+   * 
+ * + * + * .google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionConfig personal_protective_equipment_detection_config = 22; + * + * + * @return Whether the personalProtectiveEquipmentDetectionConfig field is set. + */ + @java.lang.Override + public boolean hasPersonalProtectiveEquipmentDetectionConfig() { + return processorConfigCase_ == 22; + } + /** + * + * + *
+   * Configs of personal_protective_equipment_detection_config
+   * 
+ * + * + * .google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionConfig personal_protective_equipment_detection_config = 22; + * + * + * @return The personalProtectiveEquipmentDetectionConfig. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionConfig + getPersonalProtectiveEquipmentDetectionConfig() { + if (processorConfigCase_ == 22) { + return (com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionConfig) + processorConfig_; + } + return com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionConfig + .getDefaultInstance(); + } + /** + * + * + *
+   * Configs of personal_protective_equipment_detection_config
+   * 
+ * + * + * .google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionConfig personal_protective_equipment_detection_config = 22; + * + */ + @java.lang.Override + public com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionConfigOrBuilder + getPersonalProtectiveEquipmentDetectionConfigOrBuilder() { + if (processorConfigCase_ == 22) { + return (com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionConfig) + processorConfig_; + } + return com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionConfig + .getDefaultInstance(); + } + + public static final int TAG_RECOGNIZER_CONFIG_FIELD_NUMBER = 25; + /** + * + * + *
+   * Runtime configs of Tag Recognizer processor.
+   * 
+ * + * .google.cloud.visionai.v1.TagRecognizerConfig tag_recognizer_config = 25; + * + * @return Whether the tagRecognizerConfig field is set. + */ + @java.lang.Override + public boolean hasTagRecognizerConfig() { + return processorConfigCase_ == 25; + } + /** + * + * + *
+   * Runtime configs of Tag Recognizer processor.
+   * 
+ * + * .google.cloud.visionai.v1.TagRecognizerConfig tag_recognizer_config = 25; + * + * @return The tagRecognizerConfig. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.TagRecognizerConfig getTagRecognizerConfig() { + if (processorConfigCase_ == 25) { + return (com.google.cloud.visionai.v1.TagRecognizerConfig) processorConfig_; + } + return com.google.cloud.visionai.v1.TagRecognizerConfig.getDefaultInstance(); + } + /** + * + * + *
+   * Runtime configs of Tag Recognizer processor.
+   * 
+ * + * .google.cloud.visionai.v1.TagRecognizerConfig tag_recognizer_config = 25; + */ + @java.lang.Override + public com.google.cloud.visionai.v1.TagRecognizerConfigOrBuilder + getTagRecognizerConfigOrBuilder() { + if (processorConfigCase_ == 25) { + return (com.google.cloud.visionai.v1.TagRecognizerConfig) processorConfig_; + } + return com.google.cloud.visionai.v1.TagRecognizerConfig.getDefaultInstance(); + } + + public static final int UNIVERSAL_INPUT_CONFIG_FIELD_NUMBER = 28; + /** + * + * + *
+   * Runtime configs of UniversalInput processor.
+   * 
+ * + * .google.cloud.visionai.v1.UniversalInputConfig universal_input_config = 28; + * + * @return Whether the universalInputConfig field is set. + */ + @java.lang.Override + public boolean hasUniversalInputConfig() { + return processorConfigCase_ == 28; + } + /** + * + * + *
+   * Runtime configs of UniversalInput processor.
+   * 
+ * + * .google.cloud.visionai.v1.UniversalInputConfig universal_input_config = 28; + * + * @return The universalInputConfig. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.UniversalInputConfig getUniversalInputConfig() { + if (processorConfigCase_ == 28) { + return (com.google.cloud.visionai.v1.UniversalInputConfig) processorConfig_; + } + return com.google.cloud.visionai.v1.UniversalInputConfig.getDefaultInstance(); + } + /** + * + * + *
+   * Runtime configs of UniversalInput processor.
+   * 
+ * + * .google.cloud.visionai.v1.UniversalInputConfig universal_input_config = 28; + */ + @java.lang.Override + public com.google.cloud.visionai.v1.UniversalInputConfigOrBuilder + getUniversalInputConfigOrBuilder() { + if (processorConfigCase_ == 28) { + return (com.google.cloud.visionai.v1.UniversalInputConfig) processorConfig_; + } + return com.google.cloud.visionai.v1.UniversalInputConfig.getDefaultInstance(); + } + + public static final int EXPERIMENTAL_CONFIG_FIELD_NUMBER = 26; + private com.google.protobuf.Struct experimentalConfig_; + /** + * + * + *
+   * Experimental configurations. Structured object containing not-yet-stable
+   * processor parameters.
+   * 
+ * + * .google.protobuf.Struct experimental_config = 26; + * + * @return Whether the experimentalConfig field is set. + */ + @java.lang.Override + public boolean hasExperimentalConfig() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * Experimental configurations. Structured object containing not-yet-stable
+   * processor parameters.
+   * 
+ * + * .google.protobuf.Struct experimental_config = 26; + * + * @return The experimentalConfig. + */ + @java.lang.Override + public com.google.protobuf.Struct getExperimentalConfig() { + return experimentalConfig_ == null + ? com.google.protobuf.Struct.getDefaultInstance() + : experimentalConfig_; + } + /** + * + * + *
+   * Experimental configurations. Structured object containing not-yet-stable
+   * processor parameters.
+   * 
+ * + * .google.protobuf.Struct experimental_config = 26; + */ + @java.lang.Override + public com.google.protobuf.StructOrBuilder getExperimentalConfigOrBuilder() { + return experimentalConfig_ == null + ? com.google.protobuf.Struct.getDefaultInstance() + : experimentalConfig_; + } + + 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 (processorConfigCase_ == 9) { + output.writeMessage( + 9, (com.google.cloud.visionai.v1.VideoStreamInputConfig) processorConfig_); + } + if (processorConfigCase_ == 10) { + output.writeMessage(10, (com.google.cloud.visionai.v1.MediaWarehouseConfig) processorConfig_); + } + if (processorConfigCase_ == 11) { + output.writeMessage(11, (com.google.cloud.visionai.v1.PersonBlurConfig) processorConfig_); + } + if (processorConfigCase_ == 12) { + output.writeMessage(12, (com.google.cloud.visionai.v1.OccupancyCountConfig) processorConfig_); + } + if (processorConfigCase_ == 13) { + output.writeMessage( + 13, (com.google.cloud.visionai.v1.VertexAutoMLVisionConfig) processorConfig_); + } + if (processorConfigCase_ == 14) { + output.writeMessage( + 14, (com.google.cloud.visionai.v1.VertexAutoMLVideoConfig) processorConfig_); + } + if (processorConfigCase_ == 15) { + output.writeMessage( + 15, (com.google.cloud.visionai.v1.PersonVehicleDetectionConfig) processorConfig_); + } + if (processorConfigCase_ == 17) { + output.writeMessage(17, (com.google.cloud.visionai.v1.VertexCustomConfig) processorConfig_); + } + if (processorConfigCase_ == 18) { + output.writeMessage( + 18, (com.google.cloud.visionai.v1.GeneralObjectDetectionConfig) processorConfig_); + } + if (processorConfigCase_ == 19) { + output.writeMessage(19, (com.google.cloud.visionai.v1.BigQueryConfig) processorConfig_); + } + if (processorConfigCase_ == 20) { + output.writeMessage( + 20, (com.google.cloud.visionai.v1.AIEnabledDevicesInputConfig) processorConfig_); + } + if (processorConfigCase_ == 21) { + output.writeMessage( + 21, (com.google.cloud.visionai.v1.ProductRecognizerConfig) processorConfig_); + } + if (processorConfigCase_ == 22) { + output.writeMessage( + 22, + (com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionConfig) + processorConfig_); + } + if (processorConfigCase_ == 25) { + output.writeMessage(25, (com.google.cloud.visionai.v1.TagRecognizerConfig) processorConfig_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(26, getExperimentalConfig()); + } + if (processorConfigCase_ == 27) { + output.writeMessage(27, (com.google.cloud.visionai.v1.GcsOutputConfig) processorConfig_); + } + if (processorConfigCase_ == 28) { + output.writeMessage(28, (com.google.cloud.visionai.v1.UniversalInputConfig) processorConfig_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (processorConfigCase_ == 9) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 9, (com.google.cloud.visionai.v1.VideoStreamInputConfig) processorConfig_); + } + if (processorConfigCase_ == 10) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 10, (com.google.cloud.visionai.v1.MediaWarehouseConfig) processorConfig_); + } + if (processorConfigCase_ == 11) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 11, (com.google.cloud.visionai.v1.PersonBlurConfig) processorConfig_); + } + if (processorConfigCase_ == 12) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 12, (com.google.cloud.visionai.v1.OccupancyCountConfig) processorConfig_); + } + if (processorConfigCase_ == 13) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 13, (com.google.cloud.visionai.v1.VertexAutoMLVisionConfig) processorConfig_); + } + if (processorConfigCase_ == 14) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 14, (com.google.cloud.visionai.v1.VertexAutoMLVideoConfig) processorConfig_); + } + if (processorConfigCase_ == 15) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 15, (com.google.cloud.visionai.v1.PersonVehicleDetectionConfig) processorConfig_); + } + if (processorConfigCase_ == 17) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 17, (com.google.cloud.visionai.v1.VertexCustomConfig) processorConfig_); + } + if (processorConfigCase_ == 18) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 18, (com.google.cloud.visionai.v1.GeneralObjectDetectionConfig) processorConfig_); + } + if (processorConfigCase_ == 19) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 19, (com.google.cloud.visionai.v1.BigQueryConfig) processorConfig_); + } + if (processorConfigCase_ == 20) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 20, (com.google.cloud.visionai.v1.AIEnabledDevicesInputConfig) processorConfig_); + } + if (processorConfigCase_ == 21) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 21, (com.google.cloud.visionai.v1.ProductRecognizerConfig) processorConfig_); + } + if (processorConfigCase_ == 22) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 22, + (com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionConfig) + processorConfig_); + } + if (processorConfigCase_ == 25) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 25, (com.google.cloud.visionai.v1.TagRecognizerConfig) processorConfig_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(26, getExperimentalConfig()); + } + if (processorConfigCase_ == 27) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 27, (com.google.cloud.visionai.v1.GcsOutputConfig) processorConfig_); + } + if (processorConfigCase_ == 28) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 28, (com.google.cloud.visionai.v1.UniversalInputConfig) processorConfig_); + } + size += getUnknownFields().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.visionai.v1.ProcessorConfig)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.ProcessorConfig other = + (com.google.cloud.visionai.v1.ProcessorConfig) obj; + + if (hasExperimentalConfig() != other.hasExperimentalConfig()) return false; + if (hasExperimentalConfig()) { + if (!getExperimentalConfig().equals(other.getExperimentalConfig())) return false; + } + if (!getProcessorConfigCase().equals(other.getProcessorConfigCase())) return false; + switch (processorConfigCase_) { + case 9: + if (!getVideoStreamInputConfig().equals(other.getVideoStreamInputConfig())) return false; + break; + case 20: + if (!getAiEnabledDevicesInputConfig().equals(other.getAiEnabledDevicesInputConfig())) + return false; + break; + case 10: + if (!getMediaWarehouseConfig().equals(other.getMediaWarehouseConfig())) return false; + break; + case 11: + if (!getPersonBlurConfig().equals(other.getPersonBlurConfig())) return false; + break; + case 12: + if (!getOccupancyCountConfig().equals(other.getOccupancyCountConfig())) return false; + break; + case 15: + if (!getPersonVehicleDetectionConfig().equals(other.getPersonVehicleDetectionConfig())) + return false; + break; + case 13: + if (!getVertexAutomlVisionConfig().equals(other.getVertexAutomlVisionConfig())) + return false; + break; + case 14: + if (!getVertexAutomlVideoConfig().equals(other.getVertexAutomlVideoConfig())) return false; + break; + case 17: + if (!getVertexCustomConfig().equals(other.getVertexCustomConfig())) return false; + break; + case 18: + if (!getGeneralObjectDetectionConfig().equals(other.getGeneralObjectDetectionConfig())) + return false; + break; + case 19: + if (!getBigQueryConfig().equals(other.getBigQueryConfig())) return false; + break; + case 27: + if (!getGcsOutputConfig().equals(other.getGcsOutputConfig())) return false; + break; + case 21: + if (!getProductRecognizerConfig().equals(other.getProductRecognizerConfig())) return false; + break; + case 22: + if (!getPersonalProtectiveEquipmentDetectionConfig() + .equals(other.getPersonalProtectiveEquipmentDetectionConfig())) return false; + break; + case 25: + if (!getTagRecognizerConfig().equals(other.getTagRecognizerConfig())) return false; + break; + case 28: + if (!getUniversalInputConfig().equals(other.getUniversalInputConfig())) return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasExperimentalConfig()) { + hash = (37 * hash) + EXPERIMENTAL_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getExperimentalConfig().hashCode(); + } + switch (processorConfigCase_) { + case 9: + hash = (37 * hash) + VIDEO_STREAM_INPUT_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getVideoStreamInputConfig().hashCode(); + break; + case 20: + hash = (37 * hash) + AI_ENABLED_DEVICES_INPUT_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getAiEnabledDevicesInputConfig().hashCode(); + break; + case 10: + hash = (37 * hash) + MEDIA_WAREHOUSE_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getMediaWarehouseConfig().hashCode(); + break; + case 11: + hash = (37 * hash) + PERSON_BLUR_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getPersonBlurConfig().hashCode(); + break; + case 12: + hash = (37 * hash) + OCCUPANCY_COUNT_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getOccupancyCountConfig().hashCode(); + break; + case 15: + hash = (37 * hash) + PERSON_VEHICLE_DETECTION_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getPersonVehicleDetectionConfig().hashCode(); + break; + case 13: + hash = (37 * hash) + VERTEX_AUTOML_VISION_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getVertexAutomlVisionConfig().hashCode(); + break; + case 14: + hash = (37 * hash) + VERTEX_AUTOML_VIDEO_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getVertexAutomlVideoConfig().hashCode(); + break; + case 17: + hash = (37 * hash) + VERTEX_CUSTOM_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getVertexCustomConfig().hashCode(); + break; + case 18: + hash = (37 * hash) + GENERAL_OBJECT_DETECTION_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getGeneralObjectDetectionConfig().hashCode(); + break; + case 19: + hash = (37 * hash) + BIG_QUERY_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getBigQueryConfig().hashCode(); + break; + case 27: + hash = (37 * hash) + GCS_OUTPUT_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getGcsOutputConfig().hashCode(); + break; + case 21: + hash = (37 * hash) + PRODUCT_RECOGNIZER_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getProductRecognizerConfig().hashCode(); + break; + case 22: + hash = (37 * hash) + PERSONAL_PROTECTIVE_EQUIPMENT_DETECTION_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getPersonalProtectiveEquipmentDetectionConfig().hashCode(); + break; + case 25: + hash = (37 * hash) + TAG_RECOGNIZER_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getTagRecognizerConfig().hashCode(); + break; + case 28: + hash = (37 * hash) + UNIVERSAL_INPUT_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getUniversalInputConfig().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.ProcessorConfig parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ProcessorConfig 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.visionai.v1.ProcessorConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ProcessorConfig 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.visionai.v1.ProcessorConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ProcessorConfig parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.ProcessorConfig parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ProcessorConfig 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.visionai.v1.ProcessorConfig parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ProcessorConfig 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.visionai.v1.ProcessorConfig parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ProcessorConfig 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.visionai.v1.ProcessorConfig 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; + } + /** + * + * + *
+   * Next ID: 35
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.ProcessorConfig} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.ProcessorConfig) + com.google.cloud.visionai.v1.ProcessorConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_ProcessorConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_ProcessorConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.ProcessorConfig.class, + com.google.cloud.visionai.v1.ProcessorConfig.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.ProcessorConfig.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getExperimentalConfigFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (videoStreamInputConfigBuilder_ != null) { + videoStreamInputConfigBuilder_.clear(); + } + if (aiEnabledDevicesInputConfigBuilder_ != null) { + aiEnabledDevicesInputConfigBuilder_.clear(); + } + if (mediaWarehouseConfigBuilder_ != null) { + mediaWarehouseConfigBuilder_.clear(); + } + if (personBlurConfigBuilder_ != null) { + personBlurConfigBuilder_.clear(); + } + if (occupancyCountConfigBuilder_ != null) { + occupancyCountConfigBuilder_.clear(); + } + if (personVehicleDetectionConfigBuilder_ != null) { + personVehicleDetectionConfigBuilder_.clear(); + } + if (vertexAutomlVisionConfigBuilder_ != null) { + vertexAutomlVisionConfigBuilder_.clear(); + } + if (vertexAutomlVideoConfigBuilder_ != null) { + vertexAutomlVideoConfigBuilder_.clear(); + } + if (vertexCustomConfigBuilder_ != null) { + vertexCustomConfigBuilder_.clear(); + } + if (generalObjectDetectionConfigBuilder_ != null) { + generalObjectDetectionConfigBuilder_.clear(); + } + if (bigQueryConfigBuilder_ != null) { + bigQueryConfigBuilder_.clear(); + } + if (gcsOutputConfigBuilder_ != null) { + gcsOutputConfigBuilder_.clear(); + } + if (productRecognizerConfigBuilder_ != null) { + productRecognizerConfigBuilder_.clear(); + } + if (personalProtectiveEquipmentDetectionConfigBuilder_ != null) { + personalProtectiveEquipmentDetectionConfigBuilder_.clear(); + } + if (tagRecognizerConfigBuilder_ != null) { + tagRecognizerConfigBuilder_.clear(); + } + if (universalInputConfigBuilder_ != null) { + universalInputConfigBuilder_.clear(); + } + experimentalConfig_ = null; + if (experimentalConfigBuilder_ != null) { + experimentalConfigBuilder_.dispose(); + experimentalConfigBuilder_ = null; + } + processorConfigCase_ = 0; + processorConfig_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_ProcessorConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ProcessorConfig getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.ProcessorConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ProcessorConfig build() { + com.google.cloud.visionai.v1.ProcessorConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ProcessorConfig buildPartial() { + com.google.cloud.visionai.v1.ProcessorConfig result = + new com.google.cloud.visionai.v1.ProcessorConfig(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.visionai.v1.ProcessorConfig result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00010000) != 0)) { + result.experimentalConfig_ = + experimentalConfigBuilder_ == null + ? experimentalConfig_ + : experimentalConfigBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + private void buildPartialOneofs(com.google.cloud.visionai.v1.ProcessorConfig result) { + result.processorConfigCase_ = processorConfigCase_; + result.processorConfig_ = this.processorConfig_; + if (processorConfigCase_ == 9 && videoStreamInputConfigBuilder_ != null) { + result.processorConfig_ = videoStreamInputConfigBuilder_.build(); + } + if (processorConfigCase_ == 20 && aiEnabledDevicesInputConfigBuilder_ != null) { + result.processorConfig_ = aiEnabledDevicesInputConfigBuilder_.build(); + } + if (processorConfigCase_ == 10 && mediaWarehouseConfigBuilder_ != null) { + result.processorConfig_ = mediaWarehouseConfigBuilder_.build(); + } + if (processorConfigCase_ == 11 && personBlurConfigBuilder_ != null) { + result.processorConfig_ = personBlurConfigBuilder_.build(); + } + if (processorConfigCase_ == 12 && occupancyCountConfigBuilder_ != null) { + result.processorConfig_ = occupancyCountConfigBuilder_.build(); + } + if (processorConfigCase_ == 15 && personVehicleDetectionConfigBuilder_ != null) { + result.processorConfig_ = personVehicleDetectionConfigBuilder_.build(); + } + if (processorConfigCase_ == 13 && vertexAutomlVisionConfigBuilder_ != null) { + result.processorConfig_ = vertexAutomlVisionConfigBuilder_.build(); + } + if (processorConfigCase_ == 14 && vertexAutomlVideoConfigBuilder_ != null) { + result.processorConfig_ = vertexAutomlVideoConfigBuilder_.build(); + } + if (processorConfigCase_ == 17 && vertexCustomConfigBuilder_ != null) { + result.processorConfig_ = vertexCustomConfigBuilder_.build(); + } + if (processorConfigCase_ == 18 && generalObjectDetectionConfigBuilder_ != null) { + result.processorConfig_ = generalObjectDetectionConfigBuilder_.build(); + } + if (processorConfigCase_ == 19 && bigQueryConfigBuilder_ != null) { + result.processorConfig_ = bigQueryConfigBuilder_.build(); + } + if (processorConfigCase_ == 27 && gcsOutputConfigBuilder_ != null) { + result.processorConfig_ = gcsOutputConfigBuilder_.build(); + } + if (processorConfigCase_ == 21 && productRecognizerConfigBuilder_ != null) { + result.processorConfig_ = productRecognizerConfigBuilder_.build(); + } + if (processorConfigCase_ == 22 + && personalProtectiveEquipmentDetectionConfigBuilder_ != null) { + result.processorConfig_ = personalProtectiveEquipmentDetectionConfigBuilder_.build(); + } + if (processorConfigCase_ == 25 && tagRecognizerConfigBuilder_ != null) { + result.processorConfig_ = tagRecognizerConfigBuilder_.build(); + } + if (processorConfigCase_ == 28 && universalInputConfigBuilder_ != null) { + result.processorConfig_ = universalInputConfigBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.ProcessorConfig) { + return mergeFrom((com.google.cloud.visionai.v1.ProcessorConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.ProcessorConfig other) { + if (other == com.google.cloud.visionai.v1.ProcessorConfig.getDefaultInstance()) return this; + if (other.hasExperimentalConfig()) { + mergeExperimentalConfig(other.getExperimentalConfig()); + } + switch (other.getProcessorConfigCase()) { + case VIDEO_STREAM_INPUT_CONFIG: + { + mergeVideoStreamInputConfig(other.getVideoStreamInputConfig()); + break; + } + case AI_ENABLED_DEVICES_INPUT_CONFIG: + { + mergeAiEnabledDevicesInputConfig(other.getAiEnabledDevicesInputConfig()); + break; + } + case MEDIA_WAREHOUSE_CONFIG: + { + mergeMediaWarehouseConfig(other.getMediaWarehouseConfig()); + break; + } + case PERSON_BLUR_CONFIG: + { + mergePersonBlurConfig(other.getPersonBlurConfig()); + break; + } + case OCCUPANCY_COUNT_CONFIG: + { + mergeOccupancyCountConfig(other.getOccupancyCountConfig()); + break; + } + case PERSON_VEHICLE_DETECTION_CONFIG: + { + mergePersonVehicleDetectionConfig(other.getPersonVehicleDetectionConfig()); + break; + } + case VERTEX_AUTOML_VISION_CONFIG: + { + mergeVertexAutomlVisionConfig(other.getVertexAutomlVisionConfig()); + break; + } + case VERTEX_AUTOML_VIDEO_CONFIG: + { + mergeVertexAutomlVideoConfig(other.getVertexAutomlVideoConfig()); + break; + } + case VERTEX_CUSTOM_CONFIG: + { + mergeVertexCustomConfig(other.getVertexCustomConfig()); + break; + } + case GENERAL_OBJECT_DETECTION_CONFIG: + { + mergeGeneralObjectDetectionConfig(other.getGeneralObjectDetectionConfig()); + break; + } + case BIG_QUERY_CONFIG: + { + mergeBigQueryConfig(other.getBigQueryConfig()); + break; + } + case GCS_OUTPUT_CONFIG: + { + mergeGcsOutputConfig(other.getGcsOutputConfig()); + break; + } + case PRODUCT_RECOGNIZER_CONFIG: + { + mergeProductRecognizerConfig(other.getProductRecognizerConfig()); + break; + } + case PERSONAL_PROTECTIVE_EQUIPMENT_DETECTION_CONFIG: + { + mergePersonalProtectiveEquipmentDetectionConfig( + other.getPersonalProtectiveEquipmentDetectionConfig()); + break; + } + case TAG_RECOGNIZER_CONFIG: + { + mergeTagRecognizerConfig(other.getTagRecognizerConfig()); + break; + } + case UNIVERSAL_INPUT_CONFIG: + { + mergeUniversalInputConfig(other.getUniversalInputConfig()); + break; + } + case PROCESSORCONFIG_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 74: + { + input.readMessage( + getVideoStreamInputConfigFieldBuilder().getBuilder(), extensionRegistry); + processorConfigCase_ = 9; + break; + } // case 74 + case 82: + { + input.readMessage( + getMediaWarehouseConfigFieldBuilder().getBuilder(), extensionRegistry); + processorConfigCase_ = 10; + break; + } // case 82 + case 90: + { + input.readMessage( + getPersonBlurConfigFieldBuilder().getBuilder(), extensionRegistry); + processorConfigCase_ = 11; + break; + } // case 90 + case 98: + { + input.readMessage( + getOccupancyCountConfigFieldBuilder().getBuilder(), extensionRegistry); + processorConfigCase_ = 12; + break; + } // case 98 + case 106: + { + input.readMessage( + getVertexAutomlVisionConfigFieldBuilder().getBuilder(), extensionRegistry); + processorConfigCase_ = 13; + break; + } // case 106 + case 114: + { + input.readMessage( + getVertexAutomlVideoConfigFieldBuilder().getBuilder(), extensionRegistry); + processorConfigCase_ = 14; + break; + } // case 114 + case 122: + { + input.readMessage( + getPersonVehicleDetectionConfigFieldBuilder().getBuilder(), extensionRegistry); + processorConfigCase_ = 15; + break; + } // case 122 + case 138: + { + input.readMessage( + getVertexCustomConfigFieldBuilder().getBuilder(), extensionRegistry); + processorConfigCase_ = 17; + break; + } // case 138 + case 146: + { + input.readMessage( + getGeneralObjectDetectionConfigFieldBuilder().getBuilder(), extensionRegistry); + processorConfigCase_ = 18; + break; + } // case 146 + case 154: + { + input.readMessage(getBigQueryConfigFieldBuilder().getBuilder(), extensionRegistry); + processorConfigCase_ = 19; + break; + } // case 154 + case 162: + { + input.readMessage( + getAiEnabledDevicesInputConfigFieldBuilder().getBuilder(), extensionRegistry); + processorConfigCase_ = 20; + break; + } // case 162 + case 170: + { + input.readMessage( + getProductRecognizerConfigFieldBuilder().getBuilder(), extensionRegistry); + processorConfigCase_ = 21; + break; + } // case 170 + case 178: + { + input.readMessage( + getPersonalProtectiveEquipmentDetectionConfigFieldBuilder().getBuilder(), + extensionRegistry); + processorConfigCase_ = 22; + break; + } // case 178 + case 202: + { + input.readMessage( + getTagRecognizerConfigFieldBuilder().getBuilder(), extensionRegistry); + processorConfigCase_ = 25; + break; + } // case 202 + case 210: + { + input.readMessage( + getExperimentalConfigFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00010000; + break; + } // case 210 + case 218: + { + input.readMessage(getGcsOutputConfigFieldBuilder().getBuilder(), extensionRegistry); + processorConfigCase_ = 27; + break; + } // case 218 + case 226: + { + input.readMessage( + getUniversalInputConfigFieldBuilder().getBuilder(), extensionRegistry); + processorConfigCase_ = 28; + break; + } // case 226 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int processorConfigCase_ = 0; + private java.lang.Object processorConfig_; + + public ProcessorConfigCase getProcessorConfigCase() { + return ProcessorConfigCase.forNumber(processorConfigCase_); + } + + public Builder clearProcessorConfig() { + processorConfigCase_ = 0; + processorConfig_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.VideoStreamInputConfig, + com.google.cloud.visionai.v1.VideoStreamInputConfig.Builder, + com.google.cloud.visionai.v1.VideoStreamInputConfigOrBuilder> + videoStreamInputConfigBuilder_; + /** + * + * + *
+     * Configs of stream input processor.
+     * 
+ * + * .google.cloud.visionai.v1.VideoStreamInputConfig video_stream_input_config = 9; + * + * @return Whether the videoStreamInputConfig field is set. + */ + @java.lang.Override + public boolean hasVideoStreamInputConfig() { + return processorConfigCase_ == 9; + } + /** + * + * + *
+     * Configs of stream input processor.
+     * 
+ * + * .google.cloud.visionai.v1.VideoStreamInputConfig video_stream_input_config = 9; + * + * @return The videoStreamInputConfig. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.VideoStreamInputConfig getVideoStreamInputConfig() { + if (videoStreamInputConfigBuilder_ == null) { + if (processorConfigCase_ == 9) { + return (com.google.cloud.visionai.v1.VideoStreamInputConfig) processorConfig_; + } + return com.google.cloud.visionai.v1.VideoStreamInputConfig.getDefaultInstance(); + } else { + if (processorConfigCase_ == 9) { + return videoStreamInputConfigBuilder_.getMessage(); + } + return com.google.cloud.visionai.v1.VideoStreamInputConfig.getDefaultInstance(); + } + } + /** + * + * + *
+     * Configs of stream input processor.
+     * 
+ * + * .google.cloud.visionai.v1.VideoStreamInputConfig video_stream_input_config = 9; + */ + public Builder setVideoStreamInputConfig( + com.google.cloud.visionai.v1.VideoStreamInputConfig value) { + if (videoStreamInputConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + processorConfig_ = value; + onChanged(); + } else { + videoStreamInputConfigBuilder_.setMessage(value); + } + processorConfigCase_ = 9; + return this; + } + /** + * + * + *
+     * Configs of stream input processor.
+     * 
+ * + * .google.cloud.visionai.v1.VideoStreamInputConfig video_stream_input_config = 9; + */ + public Builder setVideoStreamInputConfig( + com.google.cloud.visionai.v1.VideoStreamInputConfig.Builder builderForValue) { + if (videoStreamInputConfigBuilder_ == null) { + processorConfig_ = builderForValue.build(); + onChanged(); + } else { + videoStreamInputConfigBuilder_.setMessage(builderForValue.build()); + } + processorConfigCase_ = 9; + return this; + } + /** + * + * + *
+     * Configs of stream input processor.
+     * 
+ * + * .google.cloud.visionai.v1.VideoStreamInputConfig video_stream_input_config = 9; + */ + public Builder mergeVideoStreamInputConfig( + com.google.cloud.visionai.v1.VideoStreamInputConfig value) { + if (videoStreamInputConfigBuilder_ == null) { + if (processorConfigCase_ == 9 + && processorConfig_ + != com.google.cloud.visionai.v1.VideoStreamInputConfig.getDefaultInstance()) { + processorConfig_ = + com.google.cloud.visionai.v1.VideoStreamInputConfig.newBuilder( + (com.google.cloud.visionai.v1.VideoStreamInputConfig) processorConfig_) + .mergeFrom(value) + .buildPartial(); + } else { + processorConfig_ = value; + } + onChanged(); + } else { + if (processorConfigCase_ == 9) { + videoStreamInputConfigBuilder_.mergeFrom(value); + } else { + videoStreamInputConfigBuilder_.setMessage(value); + } + } + processorConfigCase_ = 9; + return this; + } + /** + * + * + *
+     * Configs of stream input processor.
+     * 
+ * + * .google.cloud.visionai.v1.VideoStreamInputConfig video_stream_input_config = 9; + */ + public Builder clearVideoStreamInputConfig() { + if (videoStreamInputConfigBuilder_ == null) { + if (processorConfigCase_ == 9) { + processorConfigCase_ = 0; + processorConfig_ = null; + onChanged(); + } + } else { + if (processorConfigCase_ == 9) { + processorConfigCase_ = 0; + processorConfig_ = null; + } + videoStreamInputConfigBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Configs of stream input processor.
+     * 
+ * + * .google.cloud.visionai.v1.VideoStreamInputConfig video_stream_input_config = 9; + */ + public com.google.cloud.visionai.v1.VideoStreamInputConfig.Builder + getVideoStreamInputConfigBuilder() { + return getVideoStreamInputConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Configs of stream input processor.
+     * 
+ * + * .google.cloud.visionai.v1.VideoStreamInputConfig video_stream_input_config = 9; + */ + @java.lang.Override + public com.google.cloud.visionai.v1.VideoStreamInputConfigOrBuilder + getVideoStreamInputConfigOrBuilder() { + if ((processorConfigCase_ == 9) && (videoStreamInputConfigBuilder_ != null)) { + return videoStreamInputConfigBuilder_.getMessageOrBuilder(); + } else { + if (processorConfigCase_ == 9) { + return (com.google.cloud.visionai.v1.VideoStreamInputConfig) processorConfig_; + } + return com.google.cloud.visionai.v1.VideoStreamInputConfig.getDefaultInstance(); + } + } + /** + * + * + *
+     * Configs of stream input processor.
+     * 
+ * + * .google.cloud.visionai.v1.VideoStreamInputConfig video_stream_input_config = 9; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.VideoStreamInputConfig, + com.google.cloud.visionai.v1.VideoStreamInputConfig.Builder, + com.google.cloud.visionai.v1.VideoStreamInputConfigOrBuilder> + getVideoStreamInputConfigFieldBuilder() { + if (videoStreamInputConfigBuilder_ == null) { + if (!(processorConfigCase_ == 9)) { + processorConfig_ = + com.google.cloud.visionai.v1.VideoStreamInputConfig.getDefaultInstance(); + } + videoStreamInputConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.VideoStreamInputConfig, + com.google.cloud.visionai.v1.VideoStreamInputConfig.Builder, + com.google.cloud.visionai.v1.VideoStreamInputConfigOrBuilder>( + (com.google.cloud.visionai.v1.VideoStreamInputConfig) processorConfig_, + getParentForChildren(), + isClean()); + processorConfig_ = null; + } + processorConfigCase_ = 9; + onChanged(); + return videoStreamInputConfigBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.AIEnabledDevicesInputConfig, + com.google.cloud.visionai.v1.AIEnabledDevicesInputConfig.Builder, + com.google.cloud.visionai.v1.AIEnabledDevicesInputConfigOrBuilder> + aiEnabledDevicesInputConfigBuilder_; + /** + * + * + *
+     * Config of AI-enabled input devices.
+     * 
+ * + * + * .google.cloud.visionai.v1.AIEnabledDevicesInputConfig ai_enabled_devices_input_config = 20; + * + * + * @return Whether the aiEnabledDevicesInputConfig field is set. + */ + @java.lang.Override + public boolean hasAiEnabledDevicesInputConfig() { + return processorConfigCase_ == 20; + } + /** + * + * + *
+     * Config of AI-enabled input devices.
+     * 
+ * + * + * .google.cloud.visionai.v1.AIEnabledDevicesInputConfig ai_enabled_devices_input_config = 20; + * + * + * @return The aiEnabledDevicesInputConfig. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.AIEnabledDevicesInputConfig + getAiEnabledDevicesInputConfig() { + if (aiEnabledDevicesInputConfigBuilder_ == null) { + if (processorConfigCase_ == 20) { + return (com.google.cloud.visionai.v1.AIEnabledDevicesInputConfig) processorConfig_; + } + return com.google.cloud.visionai.v1.AIEnabledDevicesInputConfig.getDefaultInstance(); + } else { + if (processorConfigCase_ == 20) { + return aiEnabledDevicesInputConfigBuilder_.getMessage(); + } + return com.google.cloud.visionai.v1.AIEnabledDevicesInputConfig.getDefaultInstance(); + } + } + /** + * + * + *
+     * Config of AI-enabled input devices.
+     * 
+ * + * + * .google.cloud.visionai.v1.AIEnabledDevicesInputConfig ai_enabled_devices_input_config = 20; + * + */ + public Builder setAiEnabledDevicesInputConfig( + com.google.cloud.visionai.v1.AIEnabledDevicesInputConfig value) { + if (aiEnabledDevicesInputConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + processorConfig_ = value; + onChanged(); + } else { + aiEnabledDevicesInputConfigBuilder_.setMessage(value); + } + processorConfigCase_ = 20; + return this; + } + /** + * + * + *
+     * Config of AI-enabled input devices.
+     * 
+ * + * + * .google.cloud.visionai.v1.AIEnabledDevicesInputConfig ai_enabled_devices_input_config = 20; + * + */ + public Builder setAiEnabledDevicesInputConfig( + com.google.cloud.visionai.v1.AIEnabledDevicesInputConfig.Builder builderForValue) { + if (aiEnabledDevicesInputConfigBuilder_ == null) { + processorConfig_ = builderForValue.build(); + onChanged(); + } else { + aiEnabledDevicesInputConfigBuilder_.setMessage(builderForValue.build()); + } + processorConfigCase_ = 20; + return this; + } + /** + * + * + *
+     * Config of AI-enabled input devices.
+     * 
+ * + * + * .google.cloud.visionai.v1.AIEnabledDevicesInputConfig ai_enabled_devices_input_config = 20; + * + */ + public Builder mergeAiEnabledDevicesInputConfig( + com.google.cloud.visionai.v1.AIEnabledDevicesInputConfig value) { + if (aiEnabledDevicesInputConfigBuilder_ == null) { + if (processorConfigCase_ == 20 + && processorConfig_ + != com.google.cloud.visionai.v1.AIEnabledDevicesInputConfig.getDefaultInstance()) { + processorConfig_ = + com.google.cloud.visionai.v1.AIEnabledDevicesInputConfig.newBuilder( + (com.google.cloud.visionai.v1.AIEnabledDevicesInputConfig) processorConfig_) + .mergeFrom(value) + .buildPartial(); + } else { + processorConfig_ = value; + } + onChanged(); + } else { + if (processorConfigCase_ == 20) { + aiEnabledDevicesInputConfigBuilder_.mergeFrom(value); + } else { + aiEnabledDevicesInputConfigBuilder_.setMessage(value); + } + } + processorConfigCase_ = 20; + return this; + } + /** + * + * + *
+     * Config of AI-enabled input devices.
+     * 
+ * + * + * .google.cloud.visionai.v1.AIEnabledDevicesInputConfig ai_enabled_devices_input_config = 20; + * + */ + public Builder clearAiEnabledDevicesInputConfig() { + if (aiEnabledDevicesInputConfigBuilder_ == null) { + if (processorConfigCase_ == 20) { + processorConfigCase_ = 0; + processorConfig_ = null; + onChanged(); + } + } else { + if (processorConfigCase_ == 20) { + processorConfigCase_ = 0; + processorConfig_ = null; + } + aiEnabledDevicesInputConfigBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Config of AI-enabled input devices.
+     * 
+ * + * + * .google.cloud.visionai.v1.AIEnabledDevicesInputConfig ai_enabled_devices_input_config = 20; + * + */ + public com.google.cloud.visionai.v1.AIEnabledDevicesInputConfig.Builder + getAiEnabledDevicesInputConfigBuilder() { + return getAiEnabledDevicesInputConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Config of AI-enabled input devices.
+     * 
+ * + * + * .google.cloud.visionai.v1.AIEnabledDevicesInputConfig ai_enabled_devices_input_config = 20; + * + */ + @java.lang.Override + public com.google.cloud.visionai.v1.AIEnabledDevicesInputConfigOrBuilder + getAiEnabledDevicesInputConfigOrBuilder() { + if ((processorConfigCase_ == 20) && (aiEnabledDevicesInputConfigBuilder_ != null)) { + return aiEnabledDevicesInputConfigBuilder_.getMessageOrBuilder(); + } else { + if (processorConfigCase_ == 20) { + return (com.google.cloud.visionai.v1.AIEnabledDevicesInputConfig) processorConfig_; + } + return com.google.cloud.visionai.v1.AIEnabledDevicesInputConfig.getDefaultInstance(); + } + } + /** + * + * + *
+     * Config of AI-enabled input devices.
+     * 
+ * + * + * .google.cloud.visionai.v1.AIEnabledDevicesInputConfig ai_enabled_devices_input_config = 20; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.AIEnabledDevicesInputConfig, + com.google.cloud.visionai.v1.AIEnabledDevicesInputConfig.Builder, + com.google.cloud.visionai.v1.AIEnabledDevicesInputConfigOrBuilder> + getAiEnabledDevicesInputConfigFieldBuilder() { + if (aiEnabledDevicesInputConfigBuilder_ == null) { + if (!(processorConfigCase_ == 20)) { + processorConfig_ = + com.google.cloud.visionai.v1.AIEnabledDevicesInputConfig.getDefaultInstance(); + } + aiEnabledDevicesInputConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.AIEnabledDevicesInputConfig, + com.google.cloud.visionai.v1.AIEnabledDevicesInputConfig.Builder, + com.google.cloud.visionai.v1.AIEnabledDevicesInputConfigOrBuilder>( + (com.google.cloud.visionai.v1.AIEnabledDevicesInputConfig) processorConfig_, + getParentForChildren(), + isClean()); + processorConfig_ = null; + } + processorConfigCase_ = 20; + onChanged(); + return aiEnabledDevicesInputConfigBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.MediaWarehouseConfig, + com.google.cloud.visionai.v1.MediaWarehouseConfig.Builder, + com.google.cloud.visionai.v1.MediaWarehouseConfigOrBuilder> + mediaWarehouseConfigBuilder_; + /** + * + * + *
+     * Configs of media warehouse processor.
+     * 
+ * + * .google.cloud.visionai.v1.MediaWarehouseConfig media_warehouse_config = 10; + * + * @return Whether the mediaWarehouseConfig field is set. + */ + @java.lang.Override + public boolean hasMediaWarehouseConfig() { + return processorConfigCase_ == 10; + } + /** + * + * + *
+     * Configs of media warehouse processor.
+     * 
+ * + * .google.cloud.visionai.v1.MediaWarehouseConfig media_warehouse_config = 10; + * + * @return The mediaWarehouseConfig. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.MediaWarehouseConfig getMediaWarehouseConfig() { + if (mediaWarehouseConfigBuilder_ == null) { + if (processorConfigCase_ == 10) { + return (com.google.cloud.visionai.v1.MediaWarehouseConfig) processorConfig_; + } + return com.google.cloud.visionai.v1.MediaWarehouseConfig.getDefaultInstance(); + } else { + if (processorConfigCase_ == 10) { + return mediaWarehouseConfigBuilder_.getMessage(); + } + return com.google.cloud.visionai.v1.MediaWarehouseConfig.getDefaultInstance(); + } + } + /** + * + * + *
+     * Configs of media warehouse processor.
+     * 
+ * + * .google.cloud.visionai.v1.MediaWarehouseConfig media_warehouse_config = 10; + */ + public Builder setMediaWarehouseConfig( + com.google.cloud.visionai.v1.MediaWarehouseConfig value) { + if (mediaWarehouseConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + processorConfig_ = value; + onChanged(); + } else { + mediaWarehouseConfigBuilder_.setMessage(value); + } + processorConfigCase_ = 10; + return this; + } + /** + * + * + *
+     * Configs of media warehouse processor.
+     * 
+ * + * .google.cloud.visionai.v1.MediaWarehouseConfig media_warehouse_config = 10; + */ + public Builder setMediaWarehouseConfig( + com.google.cloud.visionai.v1.MediaWarehouseConfig.Builder builderForValue) { + if (mediaWarehouseConfigBuilder_ == null) { + processorConfig_ = builderForValue.build(); + onChanged(); + } else { + mediaWarehouseConfigBuilder_.setMessage(builderForValue.build()); + } + processorConfigCase_ = 10; + return this; + } + /** + * + * + *
+     * Configs of media warehouse processor.
+     * 
+ * + * .google.cloud.visionai.v1.MediaWarehouseConfig media_warehouse_config = 10; + */ + public Builder mergeMediaWarehouseConfig( + com.google.cloud.visionai.v1.MediaWarehouseConfig value) { + if (mediaWarehouseConfigBuilder_ == null) { + if (processorConfigCase_ == 10 + && processorConfig_ + != com.google.cloud.visionai.v1.MediaWarehouseConfig.getDefaultInstance()) { + processorConfig_ = + com.google.cloud.visionai.v1.MediaWarehouseConfig.newBuilder( + (com.google.cloud.visionai.v1.MediaWarehouseConfig) processorConfig_) + .mergeFrom(value) + .buildPartial(); + } else { + processorConfig_ = value; + } + onChanged(); + } else { + if (processorConfigCase_ == 10) { + mediaWarehouseConfigBuilder_.mergeFrom(value); + } else { + mediaWarehouseConfigBuilder_.setMessage(value); + } + } + processorConfigCase_ = 10; + return this; + } + /** + * + * + *
+     * Configs of media warehouse processor.
+     * 
+ * + * .google.cloud.visionai.v1.MediaWarehouseConfig media_warehouse_config = 10; + */ + public Builder clearMediaWarehouseConfig() { + if (mediaWarehouseConfigBuilder_ == null) { + if (processorConfigCase_ == 10) { + processorConfigCase_ = 0; + processorConfig_ = null; + onChanged(); + } + } else { + if (processorConfigCase_ == 10) { + processorConfigCase_ = 0; + processorConfig_ = null; + } + mediaWarehouseConfigBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Configs of media warehouse processor.
+     * 
+ * + * .google.cloud.visionai.v1.MediaWarehouseConfig media_warehouse_config = 10; + */ + public com.google.cloud.visionai.v1.MediaWarehouseConfig.Builder + getMediaWarehouseConfigBuilder() { + return getMediaWarehouseConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Configs of media warehouse processor.
+     * 
+ * + * .google.cloud.visionai.v1.MediaWarehouseConfig media_warehouse_config = 10; + */ + @java.lang.Override + public com.google.cloud.visionai.v1.MediaWarehouseConfigOrBuilder + getMediaWarehouseConfigOrBuilder() { + if ((processorConfigCase_ == 10) && (mediaWarehouseConfigBuilder_ != null)) { + return mediaWarehouseConfigBuilder_.getMessageOrBuilder(); + } else { + if (processorConfigCase_ == 10) { + return (com.google.cloud.visionai.v1.MediaWarehouseConfig) processorConfig_; + } + return com.google.cloud.visionai.v1.MediaWarehouseConfig.getDefaultInstance(); + } + } + /** + * + * + *
+     * Configs of media warehouse processor.
+     * 
+ * + * .google.cloud.visionai.v1.MediaWarehouseConfig media_warehouse_config = 10; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.MediaWarehouseConfig, + com.google.cloud.visionai.v1.MediaWarehouseConfig.Builder, + com.google.cloud.visionai.v1.MediaWarehouseConfigOrBuilder> + getMediaWarehouseConfigFieldBuilder() { + if (mediaWarehouseConfigBuilder_ == null) { + if (!(processorConfigCase_ == 10)) { + processorConfig_ = com.google.cloud.visionai.v1.MediaWarehouseConfig.getDefaultInstance(); + } + mediaWarehouseConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.MediaWarehouseConfig, + com.google.cloud.visionai.v1.MediaWarehouseConfig.Builder, + com.google.cloud.visionai.v1.MediaWarehouseConfigOrBuilder>( + (com.google.cloud.visionai.v1.MediaWarehouseConfig) processorConfig_, + getParentForChildren(), + isClean()); + processorConfig_ = null; + } + processorConfigCase_ = 10; + onChanged(); + return mediaWarehouseConfigBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.PersonBlurConfig, + com.google.cloud.visionai.v1.PersonBlurConfig.Builder, + com.google.cloud.visionai.v1.PersonBlurConfigOrBuilder> + personBlurConfigBuilder_; + /** + * + * + *
+     * Configs of person blur processor.
+     * 
+ * + * .google.cloud.visionai.v1.PersonBlurConfig person_blur_config = 11; + * + * @return Whether the personBlurConfig field is set. + */ + @java.lang.Override + public boolean hasPersonBlurConfig() { + return processorConfigCase_ == 11; + } + /** + * + * + *
+     * Configs of person blur processor.
+     * 
+ * + * .google.cloud.visionai.v1.PersonBlurConfig person_blur_config = 11; + * + * @return The personBlurConfig. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.PersonBlurConfig getPersonBlurConfig() { + if (personBlurConfigBuilder_ == null) { + if (processorConfigCase_ == 11) { + return (com.google.cloud.visionai.v1.PersonBlurConfig) processorConfig_; + } + return com.google.cloud.visionai.v1.PersonBlurConfig.getDefaultInstance(); + } else { + if (processorConfigCase_ == 11) { + return personBlurConfigBuilder_.getMessage(); + } + return com.google.cloud.visionai.v1.PersonBlurConfig.getDefaultInstance(); + } + } + /** + * + * + *
+     * Configs of person blur processor.
+     * 
+ * + * .google.cloud.visionai.v1.PersonBlurConfig person_blur_config = 11; + */ + public Builder setPersonBlurConfig(com.google.cloud.visionai.v1.PersonBlurConfig value) { + if (personBlurConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + processorConfig_ = value; + onChanged(); + } else { + personBlurConfigBuilder_.setMessage(value); + } + processorConfigCase_ = 11; + return this; + } + /** + * + * + *
+     * Configs of person blur processor.
+     * 
+ * + * .google.cloud.visionai.v1.PersonBlurConfig person_blur_config = 11; + */ + public Builder setPersonBlurConfig( + com.google.cloud.visionai.v1.PersonBlurConfig.Builder builderForValue) { + if (personBlurConfigBuilder_ == null) { + processorConfig_ = builderForValue.build(); + onChanged(); + } else { + personBlurConfigBuilder_.setMessage(builderForValue.build()); + } + processorConfigCase_ = 11; + return this; + } + /** + * + * + *
+     * Configs of person blur processor.
+     * 
+ * + * .google.cloud.visionai.v1.PersonBlurConfig person_blur_config = 11; + */ + public Builder mergePersonBlurConfig(com.google.cloud.visionai.v1.PersonBlurConfig value) { + if (personBlurConfigBuilder_ == null) { + if (processorConfigCase_ == 11 + && processorConfig_ + != com.google.cloud.visionai.v1.PersonBlurConfig.getDefaultInstance()) { + processorConfig_ = + com.google.cloud.visionai.v1.PersonBlurConfig.newBuilder( + (com.google.cloud.visionai.v1.PersonBlurConfig) processorConfig_) + .mergeFrom(value) + .buildPartial(); + } else { + processorConfig_ = value; + } + onChanged(); + } else { + if (processorConfigCase_ == 11) { + personBlurConfigBuilder_.mergeFrom(value); + } else { + personBlurConfigBuilder_.setMessage(value); + } + } + processorConfigCase_ = 11; + return this; + } + /** + * + * + *
+     * Configs of person blur processor.
+     * 
+ * + * .google.cloud.visionai.v1.PersonBlurConfig person_blur_config = 11; + */ + public Builder clearPersonBlurConfig() { + if (personBlurConfigBuilder_ == null) { + if (processorConfigCase_ == 11) { + processorConfigCase_ = 0; + processorConfig_ = null; + onChanged(); + } + } else { + if (processorConfigCase_ == 11) { + processorConfigCase_ = 0; + processorConfig_ = null; + } + personBlurConfigBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Configs of person blur processor.
+     * 
+ * + * .google.cloud.visionai.v1.PersonBlurConfig person_blur_config = 11; + */ + public com.google.cloud.visionai.v1.PersonBlurConfig.Builder getPersonBlurConfigBuilder() { + return getPersonBlurConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Configs of person blur processor.
+     * 
+ * + * .google.cloud.visionai.v1.PersonBlurConfig person_blur_config = 11; + */ + @java.lang.Override + public com.google.cloud.visionai.v1.PersonBlurConfigOrBuilder getPersonBlurConfigOrBuilder() { + if ((processorConfigCase_ == 11) && (personBlurConfigBuilder_ != null)) { + return personBlurConfigBuilder_.getMessageOrBuilder(); + } else { + if (processorConfigCase_ == 11) { + return (com.google.cloud.visionai.v1.PersonBlurConfig) processorConfig_; + } + return com.google.cloud.visionai.v1.PersonBlurConfig.getDefaultInstance(); + } + } + /** + * + * + *
+     * Configs of person blur processor.
+     * 
+ * + * .google.cloud.visionai.v1.PersonBlurConfig person_blur_config = 11; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.PersonBlurConfig, + com.google.cloud.visionai.v1.PersonBlurConfig.Builder, + com.google.cloud.visionai.v1.PersonBlurConfigOrBuilder> + getPersonBlurConfigFieldBuilder() { + if (personBlurConfigBuilder_ == null) { + if (!(processorConfigCase_ == 11)) { + processorConfig_ = com.google.cloud.visionai.v1.PersonBlurConfig.getDefaultInstance(); + } + personBlurConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.PersonBlurConfig, + com.google.cloud.visionai.v1.PersonBlurConfig.Builder, + com.google.cloud.visionai.v1.PersonBlurConfigOrBuilder>( + (com.google.cloud.visionai.v1.PersonBlurConfig) processorConfig_, + getParentForChildren(), + isClean()); + processorConfig_ = null; + } + processorConfigCase_ = 11; + onChanged(); + return personBlurConfigBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.OccupancyCountConfig, + com.google.cloud.visionai.v1.OccupancyCountConfig.Builder, + com.google.cloud.visionai.v1.OccupancyCountConfigOrBuilder> + occupancyCountConfigBuilder_; + /** + * + * + *
+     * Configs of occupancy count processor.
+     * 
+ * + * .google.cloud.visionai.v1.OccupancyCountConfig occupancy_count_config = 12; + * + * @return Whether the occupancyCountConfig field is set. + */ + @java.lang.Override + public boolean hasOccupancyCountConfig() { + return processorConfigCase_ == 12; + } + /** + * + * + *
+     * Configs of occupancy count processor.
+     * 
+ * + * .google.cloud.visionai.v1.OccupancyCountConfig occupancy_count_config = 12; + * + * @return The occupancyCountConfig. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.OccupancyCountConfig getOccupancyCountConfig() { + if (occupancyCountConfigBuilder_ == null) { + if (processorConfigCase_ == 12) { + return (com.google.cloud.visionai.v1.OccupancyCountConfig) processorConfig_; + } + return com.google.cloud.visionai.v1.OccupancyCountConfig.getDefaultInstance(); + } else { + if (processorConfigCase_ == 12) { + return occupancyCountConfigBuilder_.getMessage(); + } + return com.google.cloud.visionai.v1.OccupancyCountConfig.getDefaultInstance(); + } + } + /** + * + * + *
+     * Configs of occupancy count processor.
+     * 
+ * + * .google.cloud.visionai.v1.OccupancyCountConfig occupancy_count_config = 12; + */ + public Builder setOccupancyCountConfig( + com.google.cloud.visionai.v1.OccupancyCountConfig value) { + if (occupancyCountConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + processorConfig_ = value; + onChanged(); + } else { + occupancyCountConfigBuilder_.setMessage(value); + } + processorConfigCase_ = 12; + return this; + } + /** + * + * + *
+     * Configs of occupancy count processor.
+     * 
+ * + * .google.cloud.visionai.v1.OccupancyCountConfig occupancy_count_config = 12; + */ + public Builder setOccupancyCountConfig( + com.google.cloud.visionai.v1.OccupancyCountConfig.Builder builderForValue) { + if (occupancyCountConfigBuilder_ == null) { + processorConfig_ = builderForValue.build(); + onChanged(); + } else { + occupancyCountConfigBuilder_.setMessage(builderForValue.build()); + } + processorConfigCase_ = 12; + return this; + } + /** + * + * + *
+     * Configs of occupancy count processor.
+     * 
+ * + * .google.cloud.visionai.v1.OccupancyCountConfig occupancy_count_config = 12; + */ + public Builder mergeOccupancyCountConfig( + com.google.cloud.visionai.v1.OccupancyCountConfig value) { + if (occupancyCountConfigBuilder_ == null) { + if (processorConfigCase_ == 12 + && processorConfig_ + != com.google.cloud.visionai.v1.OccupancyCountConfig.getDefaultInstance()) { + processorConfig_ = + com.google.cloud.visionai.v1.OccupancyCountConfig.newBuilder( + (com.google.cloud.visionai.v1.OccupancyCountConfig) processorConfig_) + .mergeFrom(value) + .buildPartial(); + } else { + processorConfig_ = value; + } + onChanged(); + } else { + if (processorConfigCase_ == 12) { + occupancyCountConfigBuilder_.mergeFrom(value); + } else { + occupancyCountConfigBuilder_.setMessage(value); + } + } + processorConfigCase_ = 12; + return this; + } + /** + * + * + *
+     * Configs of occupancy count processor.
+     * 
+ * + * .google.cloud.visionai.v1.OccupancyCountConfig occupancy_count_config = 12; + */ + public Builder clearOccupancyCountConfig() { + if (occupancyCountConfigBuilder_ == null) { + if (processorConfigCase_ == 12) { + processorConfigCase_ = 0; + processorConfig_ = null; + onChanged(); + } + } else { + if (processorConfigCase_ == 12) { + processorConfigCase_ = 0; + processorConfig_ = null; + } + occupancyCountConfigBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Configs of occupancy count processor.
+     * 
+ * + * .google.cloud.visionai.v1.OccupancyCountConfig occupancy_count_config = 12; + */ + public com.google.cloud.visionai.v1.OccupancyCountConfig.Builder + getOccupancyCountConfigBuilder() { + return getOccupancyCountConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Configs of occupancy count processor.
+     * 
+ * + * .google.cloud.visionai.v1.OccupancyCountConfig occupancy_count_config = 12; + */ + @java.lang.Override + public com.google.cloud.visionai.v1.OccupancyCountConfigOrBuilder + getOccupancyCountConfigOrBuilder() { + if ((processorConfigCase_ == 12) && (occupancyCountConfigBuilder_ != null)) { + return occupancyCountConfigBuilder_.getMessageOrBuilder(); + } else { + if (processorConfigCase_ == 12) { + return (com.google.cloud.visionai.v1.OccupancyCountConfig) processorConfig_; + } + return com.google.cloud.visionai.v1.OccupancyCountConfig.getDefaultInstance(); + } + } + /** + * + * + *
+     * Configs of occupancy count processor.
+     * 
+ * + * .google.cloud.visionai.v1.OccupancyCountConfig occupancy_count_config = 12; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.OccupancyCountConfig, + com.google.cloud.visionai.v1.OccupancyCountConfig.Builder, + com.google.cloud.visionai.v1.OccupancyCountConfigOrBuilder> + getOccupancyCountConfigFieldBuilder() { + if (occupancyCountConfigBuilder_ == null) { + if (!(processorConfigCase_ == 12)) { + processorConfig_ = com.google.cloud.visionai.v1.OccupancyCountConfig.getDefaultInstance(); + } + occupancyCountConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.OccupancyCountConfig, + com.google.cloud.visionai.v1.OccupancyCountConfig.Builder, + com.google.cloud.visionai.v1.OccupancyCountConfigOrBuilder>( + (com.google.cloud.visionai.v1.OccupancyCountConfig) processorConfig_, + getParentForChildren(), + isClean()); + processorConfig_ = null; + } + processorConfigCase_ = 12; + onChanged(); + return occupancyCountConfigBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.PersonVehicleDetectionConfig, + com.google.cloud.visionai.v1.PersonVehicleDetectionConfig.Builder, + com.google.cloud.visionai.v1.PersonVehicleDetectionConfigOrBuilder> + personVehicleDetectionConfigBuilder_; + /** + * + * + *
+     * Configs of Person Vehicle Detection processor.
+     * 
+ * + * + * .google.cloud.visionai.v1.PersonVehicleDetectionConfig person_vehicle_detection_config = 15; + * + * + * @return Whether the personVehicleDetectionConfig field is set. + */ + @java.lang.Override + public boolean hasPersonVehicleDetectionConfig() { + return processorConfigCase_ == 15; + } + /** + * + * + *
+     * Configs of Person Vehicle Detection processor.
+     * 
+ * + * + * .google.cloud.visionai.v1.PersonVehicleDetectionConfig person_vehicle_detection_config = 15; + * + * + * @return The personVehicleDetectionConfig. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.PersonVehicleDetectionConfig + getPersonVehicleDetectionConfig() { + if (personVehicleDetectionConfigBuilder_ == null) { + if (processorConfigCase_ == 15) { + return (com.google.cloud.visionai.v1.PersonVehicleDetectionConfig) processorConfig_; + } + return com.google.cloud.visionai.v1.PersonVehicleDetectionConfig.getDefaultInstance(); + } else { + if (processorConfigCase_ == 15) { + return personVehicleDetectionConfigBuilder_.getMessage(); + } + return com.google.cloud.visionai.v1.PersonVehicleDetectionConfig.getDefaultInstance(); + } + } + /** + * + * + *
+     * Configs of Person Vehicle Detection processor.
+     * 
+ * + * + * .google.cloud.visionai.v1.PersonVehicleDetectionConfig person_vehicle_detection_config = 15; + * + */ + public Builder setPersonVehicleDetectionConfig( + com.google.cloud.visionai.v1.PersonVehicleDetectionConfig value) { + if (personVehicleDetectionConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + processorConfig_ = value; + onChanged(); + } else { + personVehicleDetectionConfigBuilder_.setMessage(value); + } + processorConfigCase_ = 15; + return this; + } + /** + * + * + *
+     * Configs of Person Vehicle Detection processor.
+     * 
+ * + * + * .google.cloud.visionai.v1.PersonVehicleDetectionConfig person_vehicle_detection_config = 15; + * + */ + public Builder setPersonVehicleDetectionConfig( + com.google.cloud.visionai.v1.PersonVehicleDetectionConfig.Builder builderForValue) { + if (personVehicleDetectionConfigBuilder_ == null) { + processorConfig_ = builderForValue.build(); + onChanged(); + } else { + personVehicleDetectionConfigBuilder_.setMessage(builderForValue.build()); + } + processorConfigCase_ = 15; + return this; + } + /** + * + * + *
+     * Configs of Person Vehicle Detection processor.
+     * 
+ * + * + * .google.cloud.visionai.v1.PersonVehicleDetectionConfig person_vehicle_detection_config = 15; + * + */ + public Builder mergePersonVehicleDetectionConfig( + com.google.cloud.visionai.v1.PersonVehicleDetectionConfig value) { + if (personVehicleDetectionConfigBuilder_ == null) { + if (processorConfigCase_ == 15 + && processorConfig_ + != com.google.cloud.visionai.v1.PersonVehicleDetectionConfig.getDefaultInstance()) { + processorConfig_ = + com.google.cloud.visionai.v1.PersonVehicleDetectionConfig.newBuilder( + (com.google.cloud.visionai.v1.PersonVehicleDetectionConfig) processorConfig_) + .mergeFrom(value) + .buildPartial(); + } else { + processorConfig_ = value; + } + onChanged(); + } else { + if (processorConfigCase_ == 15) { + personVehicleDetectionConfigBuilder_.mergeFrom(value); + } else { + personVehicleDetectionConfigBuilder_.setMessage(value); + } + } + processorConfigCase_ = 15; + return this; + } + /** + * + * + *
+     * Configs of Person Vehicle Detection processor.
+     * 
+ * + * + * .google.cloud.visionai.v1.PersonVehicleDetectionConfig person_vehicle_detection_config = 15; + * + */ + public Builder clearPersonVehicleDetectionConfig() { + if (personVehicleDetectionConfigBuilder_ == null) { + if (processorConfigCase_ == 15) { + processorConfigCase_ = 0; + processorConfig_ = null; + onChanged(); + } + } else { + if (processorConfigCase_ == 15) { + processorConfigCase_ = 0; + processorConfig_ = null; + } + personVehicleDetectionConfigBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Configs of Person Vehicle Detection processor.
+     * 
+ * + * + * .google.cloud.visionai.v1.PersonVehicleDetectionConfig person_vehicle_detection_config = 15; + * + */ + public com.google.cloud.visionai.v1.PersonVehicleDetectionConfig.Builder + getPersonVehicleDetectionConfigBuilder() { + return getPersonVehicleDetectionConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Configs of Person Vehicle Detection processor.
+     * 
+ * + * + * .google.cloud.visionai.v1.PersonVehicleDetectionConfig person_vehicle_detection_config = 15; + * + */ + @java.lang.Override + public com.google.cloud.visionai.v1.PersonVehicleDetectionConfigOrBuilder + getPersonVehicleDetectionConfigOrBuilder() { + if ((processorConfigCase_ == 15) && (personVehicleDetectionConfigBuilder_ != null)) { + return personVehicleDetectionConfigBuilder_.getMessageOrBuilder(); + } else { + if (processorConfigCase_ == 15) { + return (com.google.cloud.visionai.v1.PersonVehicleDetectionConfig) processorConfig_; + } + return com.google.cloud.visionai.v1.PersonVehicleDetectionConfig.getDefaultInstance(); + } + } + /** + * + * + *
+     * Configs of Person Vehicle Detection processor.
+     * 
+ * + * + * .google.cloud.visionai.v1.PersonVehicleDetectionConfig person_vehicle_detection_config = 15; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.PersonVehicleDetectionConfig, + com.google.cloud.visionai.v1.PersonVehicleDetectionConfig.Builder, + com.google.cloud.visionai.v1.PersonVehicleDetectionConfigOrBuilder> + getPersonVehicleDetectionConfigFieldBuilder() { + if (personVehicleDetectionConfigBuilder_ == null) { + if (!(processorConfigCase_ == 15)) { + processorConfig_ = + com.google.cloud.visionai.v1.PersonVehicleDetectionConfig.getDefaultInstance(); + } + personVehicleDetectionConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.PersonVehicleDetectionConfig, + com.google.cloud.visionai.v1.PersonVehicleDetectionConfig.Builder, + com.google.cloud.visionai.v1.PersonVehicleDetectionConfigOrBuilder>( + (com.google.cloud.visionai.v1.PersonVehicleDetectionConfig) processorConfig_, + getParentForChildren(), + isClean()); + processorConfig_ = null; + } + processorConfigCase_ = 15; + onChanged(); + return personVehicleDetectionConfigBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.VertexAutoMLVisionConfig, + com.google.cloud.visionai.v1.VertexAutoMLVisionConfig.Builder, + com.google.cloud.visionai.v1.VertexAutoMLVisionConfigOrBuilder> + vertexAutomlVisionConfigBuilder_; + /** + * + * + *
+     * Configs of Vertex AutoML vision processor.
+     * 
+ * + * .google.cloud.visionai.v1.VertexAutoMLVisionConfig vertex_automl_vision_config = 13; + * + * + * @return Whether the vertexAutomlVisionConfig field is set. + */ + @java.lang.Override + public boolean hasVertexAutomlVisionConfig() { + return processorConfigCase_ == 13; + } + /** + * + * + *
+     * Configs of Vertex AutoML vision processor.
+     * 
+ * + * .google.cloud.visionai.v1.VertexAutoMLVisionConfig vertex_automl_vision_config = 13; + * + * + * @return The vertexAutomlVisionConfig. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.VertexAutoMLVisionConfig getVertexAutomlVisionConfig() { + if (vertexAutomlVisionConfigBuilder_ == null) { + if (processorConfigCase_ == 13) { + return (com.google.cloud.visionai.v1.VertexAutoMLVisionConfig) processorConfig_; + } + return com.google.cloud.visionai.v1.VertexAutoMLVisionConfig.getDefaultInstance(); + } else { + if (processorConfigCase_ == 13) { + return vertexAutomlVisionConfigBuilder_.getMessage(); + } + return com.google.cloud.visionai.v1.VertexAutoMLVisionConfig.getDefaultInstance(); + } + } + /** + * + * + *
+     * Configs of Vertex AutoML vision processor.
+     * 
+ * + * .google.cloud.visionai.v1.VertexAutoMLVisionConfig vertex_automl_vision_config = 13; + * + */ + public Builder setVertexAutomlVisionConfig( + com.google.cloud.visionai.v1.VertexAutoMLVisionConfig value) { + if (vertexAutomlVisionConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + processorConfig_ = value; + onChanged(); + } else { + vertexAutomlVisionConfigBuilder_.setMessage(value); + } + processorConfigCase_ = 13; + return this; + } + /** + * + * + *
+     * Configs of Vertex AutoML vision processor.
+     * 
+ * + * .google.cloud.visionai.v1.VertexAutoMLVisionConfig vertex_automl_vision_config = 13; + * + */ + public Builder setVertexAutomlVisionConfig( + com.google.cloud.visionai.v1.VertexAutoMLVisionConfig.Builder builderForValue) { + if (vertexAutomlVisionConfigBuilder_ == null) { + processorConfig_ = builderForValue.build(); + onChanged(); + } else { + vertexAutomlVisionConfigBuilder_.setMessage(builderForValue.build()); + } + processorConfigCase_ = 13; + return this; + } + /** + * + * + *
+     * Configs of Vertex AutoML vision processor.
+     * 
+ * + * .google.cloud.visionai.v1.VertexAutoMLVisionConfig vertex_automl_vision_config = 13; + * + */ + public Builder mergeVertexAutomlVisionConfig( + com.google.cloud.visionai.v1.VertexAutoMLVisionConfig value) { + if (vertexAutomlVisionConfigBuilder_ == null) { + if (processorConfigCase_ == 13 + && processorConfig_ + != com.google.cloud.visionai.v1.VertexAutoMLVisionConfig.getDefaultInstance()) { + processorConfig_ = + com.google.cloud.visionai.v1.VertexAutoMLVisionConfig.newBuilder( + (com.google.cloud.visionai.v1.VertexAutoMLVisionConfig) processorConfig_) + .mergeFrom(value) + .buildPartial(); + } else { + processorConfig_ = value; + } + onChanged(); + } else { + if (processorConfigCase_ == 13) { + vertexAutomlVisionConfigBuilder_.mergeFrom(value); + } else { + vertexAutomlVisionConfigBuilder_.setMessage(value); + } + } + processorConfigCase_ = 13; + return this; + } + /** + * + * + *
+     * Configs of Vertex AutoML vision processor.
+     * 
+ * + * .google.cloud.visionai.v1.VertexAutoMLVisionConfig vertex_automl_vision_config = 13; + * + */ + public Builder clearVertexAutomlVisionConfig() { + if (vertexAutomlVisionConfigBuilder_ == null) { + if (processorConfigCase_ == 13) { + processorConfigCase_ = 0; + processorConfig_ = null; + onChanged(); + } + } else { + if (processorConfigCase_ == 13) { + processorConfigCase_ = 0; + processorConfig_ = null; + } + vertexAutomlVisionConfigBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Configs of Vertex AutoML vision processor.
+     * 
+ * + * .google.cloud.visionai.v1.VertexAutoMLVisionConfig vertex_automl_vision_config = 13; + * + */ + public com.google.cloud.visionai.v1.VertexAutoMLVisionConfig.Builder + getVertexAutomlVisionConfigBuilder() { + return getVertexAutomlVisionConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Configs of Vertex AutoML vision processor.
+     * 
+ * + * .google.cloud.visionai.v1.VertexAutoMLVisionConfig vertex_automl_vision_config = 13; + * + */ + @java.lang.Override + public com.google.cloud.visionai.v1.VertexAutoMLVisionConfigOrBuilder + getVertexAutomlVisionConfigOrBuilder() { + if ((processorConfigCase_ == 13) && (vertexAutomlVisionConfigBuilder_ != null)) { + return vertexAutomlVisionConfigBuilder_.getMessageOrBuilder(); + } else { + if (processorConfigCase_ == 13) { + return (com.google.cloud.visionai.v1.VertexAutoMLVisionConfig) processorConfig_; + } + return com.google.cloud.visionai.v1.VertexAutoMLVisionConfig.getDefaultInstance(); + } + } + /** + * + * + *
+     * Configs of Vertex AutoML vision processor.
+     * 
+ * + * .google.cloud.visionai.v1.VertexAutoMLVisionConfig vertex_automl_vision_config = 13; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.VertexAutoMLVisionConfig, + com.google.cloud.visionai.v1.VertexAutoMLVisionConfig.Builder, + com.google.cloud.visionai.v1.VertexAutoMLVisionConfigOrBuilder> + getVertexAutomlVisionConfigFieldBuilder() { + if (vertexAutomlVisionConfigBuilder_ == null) { + if (!(processorConfigCase_ == 13)) { + processorConfig_ = + com.google.cloud.visionai.v1.VertexAutoMLVisionConfig.getDefaultInstance(); + } + vertexAutomlVisionConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.VertexAutoMLVisionConfig, + com.google.cloud.visionai.v1.VertexAutoMLVisionConfig.Builder, + com.google.cloud.visionai.v1.VertexAutoMLVisionConfigOrBuilder>( + (com.google.cloud.visionai.v1.VertexAutoMLVisionConfig) processorConfig_, + getParentForChildren(), + isClean()); + processorConfig_ = null; + } + processorConfigCase_ = 13; + onChanged(); + return vertexAutomlVisionConfigBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.VertexAutoMLVideoConfig, + com.google.cloud.visionai.v1.VertexAutoMLVideoConfig.Builder, + com.google.cloud.visionai.v1.VertexAutoMLVideoConfigOrBuilder> + vertexAutomlVideoConfigBuilder_; + /** + * + * + *
+     * Configs of Vertex AutoML video processor.
+     * 
+ * + * .google.cloud.visionai.v1.VertexAutoMLVideoConfig vertex_automl_video_config = 14; + * + * + * @return Whether the vertexAutomlVideoConfig field is set. + */ + @java.lang.Override + public boolean hasVertexAutomlVideoConfig() { + return processorConfigCase_ == 14; + } + /** + * + * + *
+     * Configs of Vertex AutoML video processor.
+     * 
+ * + * .google.cloud.visionai.v1.VertexAutoMLVideoConfig vertex_automl_video_config = 14; + * + * + * @return The vertexAutomlVideoConfig. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.VertexAutoMLVideoConfig getVertexAutomlVideoConfig() { + if (vertexAutomlVideoConfigBuilder_ == null) { + if (processorConfigCase_ == 14) { + return (com.google.cloud.visionai.v1.VertexAutoMLVideoConfig) processorConfig_; + } + return com.google.cloud.visionai.v1.VertexAutoMLVideoConfig.getDefaultInstance(); + } else { + if (processorConfigCase_ == 14) { + return vertexAutomlVideoConfigBuilder_.getMessage(); + } + return com.google.cloud.visionai.v1.VertexAutoMLVideoConfig.getDefaultInstance(); + } + } + /** + * + * + *
+     * Configs of Vertex AutoML video processor.
+     * 
+ * + * .google.cloud.visionai.v1.VertexAutoMLVideoConfig vertex_automl_video_config = 14; + * + */ + public Builder setVertexAutomlVideoConfig( + com.google.cloud.visionai.v1.VertexAutoMLVideoConfig value) { + if (vertexAutomlVideoConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + processorConfig_ = value; + onChanged(); + } else { + vertexAutomlVideoConfigBuilder_.setMessage(value); + } + processorConfigCase_ = 14; + return this; + } + /** + * + * + *
+     * Configs of Vertex AutoML video processor.
+     * 
+ * + * .google.cloud.visionai.v1.VertexAutoMLVideoConfig vertex_automl_video_config = 14; + * + */ + public Builder setVertexAutomlVideoConfig( + com.google.cloud.visionai.v1.VertexAutoMLVideoConfig.Builder builderForValue) { + if (vertexAutomlVideoConfigBuilder_ == null) { + processorConfig_ = builderForValue.build(); + onChanged(); + } else { + vertexAutomlVideoConfigBuilder_.setMessage(builderForValue.build()); + } + processorConfigCase_ = 14; + return this; + } + /** + * + * + *
+     * Configs of Vertex AutoML video processor.
+     * 
+ * + * .google.cloud.visionai.v1.VertexAutoMLVideoConfig vertex_automl_video_config = 14; + * + */ + public Builder mergeVertexAutomlVideoConfig( + com.google.cloud.visionai.v1.VertexAutoMLVideoConfig value) { + if (vertexAutomlVideoConfigBuilder_ == null) { + if (processorConfigCase_ == 14 + && processorConfig_ + != com.google.cloud.visionai.v1.VertexAutoMLVideoConfig.getDefaultInstance()) { + processorConfig_ = + com.google.cloud.visionai.v1.VertexAutoMLVideoConfig.newBuilder( + (com.google.cloud.visionai.v1.VertexAutoMLVideoConfig) processorConfig_) + .mergeFrom(value) + .buildPartial(); + } else { + processorConfig_ = value; + } + onChanged(); + } else { + if (processorConfigCase_ == 14) { + vertexAutomlVideoConfigBuilder_.mergeFrom(value); + } else { + vertexAutomlVideoConfigBuilder_.setMessage(value); + } + } + processorConfigCase_ = 14; + return this; + } + /** + * + * + *
+     * Configs of Vertex AutoML video processor.
+     * 
+ * + * .google.cloud.visionai.v1.VertexAutoMLVideoConfig vertex_automl_video_config = 14; + * + */ + public Builder clearVertexAutomlVideoConfig() { + if (vertexAutomlVideoConfigBuilder_ == null) { + if (processorConfigCase_ == 14) { + processorConfigCase_ = 0; + processorConfig_ = null; + onChanged(); + } + } else { + if (processorConfigCase_ == 14) { + processorConfigCase_ = 0; + processorConfig_ = null; + } + vertexAutomlVideoConfigBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Configs of Vertex AutoML video processor.
+     * 
+ * + * .google.cloud.visionai.v1.VertexAutoMLVideoConfig vertex_automl_video_config = 14; + * + */ + public com.google.cloud.visionai.v1.VertexAutoMLVideoConfig.Builder + getVertexAutomlVideoConfigBuilder() { + return getVertexAutomlVideoConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Configs of Vertex AutoML video processor.
+     * 
+ * + * .google.cloud.visionai.v1.VertexAutoMLVideoConfig vertex_automl_video_config = 14; + * + */ + @java.lang.Override + public com.google.cloud.visionai.v1.VertexAutoMLVideoConfigOrBuilder + getVertexAutomlVideoConfigOrBuilder() { + if ((processorConfigCase_ == 14) && (vertexAutomlVideoConfigBuilder_ != null)) { + return vertexAutomlVideoConfigBuilder_.getMessageOrBuilder(); + } else { + if (processorConfigCase_ == 14) { + return (com.google.cloud.visionai.v1.VertexAutoMLVideoConfig) processorConfig_; + } + return com.google.cloud.visionai.v1.VertexAutoMLVideoConfig.getDefaultInstance(); + } + } + /** + * + * + *
+     * Configs of Vertex AutoML video processor.
+     * 
+ * + * .google.cloud.visionai.v1.VertexAutoMLVideoConfig vertex_automl_video_config = 14; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.VertexAutoMLVideoConfig, + com.google.cloud.visionai.v1.VertexAutoMLVideoConfig.Builder, + com.google.cloud.visionai.v1.VertexAutoMLVideoConfigOrBuilder> + getVertexAutomlVideoConfigFieldBuilder() { + if (vertexAutomlVideoConfigBuilder_ == null) { + if (!(processorConfigCase_ == 14)) { + processorConfig_ = + com.google.cloud.visionai.v1.VertexAutoMLVideoConfig.getDefaultInstance(); + } + vertexAutomlVideoConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.VertexAutoMLVideoConfig, + com.google.cloud.visionai.v1.VertexAutoMLVideoConfig.Builder, + com.google.cloud.visionai.v1.VertexAutoMLVideoConfigOrBuilder>( + (com.google.cloud.visionai.v1.VertexAutoMLVideoConfig) processorConfig_, + getParentForChildren(), + isClean()); + processorConfig_ = null; + } + processorConfigCase_ = 14; + onChanged(); + return vertexAutomlVideoConfigBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.VertexCustomConfig, + com.google.cloud.visionai.v1.VertexCustomConfig.Builder, + com.google.cloud.visionai.v1.VertexCustomConfigOrBuilder> + vertexCustomConfigBuilder_; + /** + * + * + *
+     * Configs of Vertex Custom processor.
+     * 
+ * + * .google.cloud.visionai.v1.VertexCustomConfig vertex_custom_config = 17; + * + * @return Whether the vertexCustomConfig field is set. + */ + @java.lang.Override + public boolean hasVertexCustomConfig() { + return processorConfigCase_ == 17; + } + /** + * + * + *
+     * Configs of Vertex Custom processor.
+     * 
+ * + * .google.cloud.visionai.v1.VertexCustomConfig vertex_custom_config = 17; + * + * @return The vertexCustomConfig. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.VertexCustomConfig getVertexCustomConfig() { + if (vertexCustomConfigBuilder_ == null) { + if (processorConfigCase_ == 17) { + return (com.google.cloud.visionai.v1.VertexCustomConfig) processorConfig_; + } + return com.google.cloud.visionai.v1.VertexCustomConfig.getDefaultInstance(); + } else { + if (processorConfigCase_ == 17) { + return vertexCustomConfigBuilder_.getMessage(); + } + return com.google.cloud.visionai.v1.VertexCustomConfig.getDefaultInstance(); + } + } + /** + * + * + *
+     * Configs of Vertex Custom processor.
+     * 
+ * + * .google.cloud.visionai.v1.VertexCustomConfig vertex_custom_config = 17; + */ + public Builder setVertexCustomConfig(com.google.cloud.visionai.v1.VertexCustomConfig value) { + if (vertexCustomConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + processorConfig_ = value; + onChanged(); + } else { + vertexCustomConfigBuilder_.setMessage(value); + } + processorConfigCase_ = 17; + return this; + } + /** + * + * + *
+     * Configs of Vertex Custom processor.
+     * 
+ * + * .google.cloud.visionai.v1.VertexCustomConfig vertex_custom_config = 17; + */ + public Builder setVertexCustomConfig( + com.google.cloud.visionai.v1.VertexCustomConfig.Builder builderForValue) { + if (vertexCustomConfigBuilder_ == null) { + processorConfig_ = builderForValue.build(); + onChanged(); + } else { + vertexCustomConfigBuilder_.setMessage(builderForValue.build()); + } + processorConfigCase_ = 17; + return this; + } + /** + * + * + *
+     * Configs of Vertex Custom processor.
+     * 
+ * + * .google.cloud.visionai.v1.VertexCustomConfig vertex_custom_config = 17; + */ + public Builder mergeVertexCustomConfig(com.google.cloud.visionai.v1.VertexCustomConfig value) { + if (vertexCustomConfigBuilder_ == null) { + if (processorConfigCase_ == 17 + && processorConfig_ + != com.google.cloud.visionai.v1.VertexCustomConfig.getDefaultInstance()) { + processorConfig_ = + com.google.cloud.visionai.v1.VertexCustomConfig.newBuilder( + (com.google.cloud.visionai.v1.VertexCustomConfig) processorConfig_) + .mergeFrom(value) + .buildPartial(); + } else { + processorConfig_ = value; + } + onChanged(); + } else { + if (processorConfigCase_ == 17) { + vertexCustomConfigBuilder_.mergeFrom(value); + } else { + vertexCustomConfigBuilder_.setMessage(value); + } + } + processorConfigCase_ = 17; + return this; + } + /** + * + * + *
+     * Configs of Vertex Custom processor.
+     * 
+ * + * .google.cloud.visionai.v1.VertexCustomConfig vertex_custom_config = 17; + */ + public Builder clearVertexCustomConfig() { + if (vertexCustomConfigBuilder_ == null) { + if (processorConfigCase_ == 17) { + processorConfigCase_ = 0; + processorConfig_ = null; + onChanged(); + } + } else { + if (processorConfigCase_ == 17) { + processorConfigCase_ = 0; + processorConfig_ = null; + } + vertexCustomConfigBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Configs of Vertex Custom processor.
+     * 
+ * + * .google.cloud.visionai.v1.VertexCustomConfig vertex_custom_config = 17; + */ + public com.google.cloud.visionai.v1.VertexCustomConfig.Builder getVertexCustomConfigBuilder() { + return getVertexCustomConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Configs of Vertex Custom processor.
+     * 
+ * + * .google.cloud.visionai.v1.VertexCustomConfig vertex_custom_config = 17; + */ + @java.lang.Override + public com.google.cloud.visionai.v1.VertexCustomConfigOrBuilder + getVertexCustomConfigOrBuilder() { + if ((processorConfigCase_ == 17) && (vertexCustomConfigBuilder_ != null)) { + return vertexCustomConfigBuilder_.getMessageOrBuilder(); + } else { + if (processorConfigCase_ == 17) { + return (com.google.cloud.visionai.v1.VertexCustomConfig) processorConfig_; + } + return com.google.cloud.visionai.v1.VertexCustomConfig.getDefaultInstance(); + } + } + /** + * + * + *
+     * Configs of Vertex Custom processor.
+     * 
+ * + * .google.cloud.visionai.v1.VertexCustomConfig vertex_custom_config = 17; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.VertexCustomConfig, + com.google.cloud.visionai.v1.VertexCustomConfig.Builder, + com.google.cloud.visionai.v1.VertexCustomConfigOrBuilder> + getVertexCustomConfigFieldBuilder() { + if (vertexCustomConfigBuilder_ == null) { + if (!(processorConfigCase_ == 17)) { + processorConfig_ = com.google.cloud.visionai.v1.VertexCustomConfig.getDefaultInstance(); + } + vertexCustomConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.VertexCustomConfig, + com.google.cloud.visionai.v1.VertexCustomConfig.Builder, + com.google.cloud.visionai.v1.VertexCustomConfigOrBuilder>( + (com.google.cloud.visionai.v1.VertexCustomConfig) processorConfig_, + getParentForChildren(), + isClean()); + processorConfig_ = null; + } + processorConfigCase_ = 17; + onChanged(); + return vertexCustomConfigBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.GeneralObjectDetectionConfig, + com.google.cloud.visionai.v1.GeneralObjectDetectionConfig.Builder, + com.google.cloud.visionai.v1.GeneralObjectDetectionConfigOrBuilder> + generalObjectDetectionConfigBuilder_; + /** + * + * + *
+     * Configs of General Object Detection processor.
+     * 
+ * + * + * .google.cloud.visionai.v1.GeneralObjectDetectionConfig general_object_detection_config = 18; + * + * + * @return Whether the generalObjectDetectionConfig field is set. + */ + @java.lang.Override + public boolean hasGeneralObjectDetectionConfig() { + return processorConfigCase_ == 18; + } + /** + * + * + *
+     * Configs of General Object Detection processor.
+     * 
+ * + * + * .google.cloud.visionai.v1.GeneralObjectDetectionConfig general_object_detection_config = 18; + * + * + * @return The generalObjectDetectionConfig. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.GeneralObjectDetectionConfig + getGeneralObjectDetectionConfig() { + if (generalObjectDetectionConfigBuilder_ == null) { + if (processorConfigCase_ == 18) { + return (com.google.cloud.visionai.v1.GeneralObjectDetectionConfig) processorConfig_; + } + return com.google.cloud.visionai.v1.GeneralObjectDetectionConfig.getDefaultInstance(); + } else { + if (processorConfigCase_ == 18) { + return generalObjectDetectionConfigBuilder_.getMessage(); + } + return com.google.cloud.visionai.v1.GeneralObjectDetectionConfig.getDefaultInstance(); + } + } + /** + * + * + *
+     * Configs of General Object Detection processor.
+     * 
+ * + * + * .google.cloud.visionai.v1.GeneralObjectDetectionConfig general_object_detection_config = 18; + * + */ + public Builder setGeneralObjectDetectionConfig( + com.google.cloud.visionai.v1.GeneralObjectDetectionConfig value) { + if (generalObjectDetectionConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + processorConfig_ = value; + onChanged(); + } else { + generalObjectDetectionConfigBuilder_.setMessage(value); + } + processorConfigCase_ = 18; + return this; + } + /** + * + * + *
+     * Configs of General Object Detection processor.
+     * 
+ * + * + * .google.cloud.visionai.v1.GeneralObjectDetectionConfig general_object_detection_config = 18; + * + */ + public Builder setGeneralObjectDetectionConfig( + com.google.cloud.visionai.v1.GeneralObjectDetectionConfig.Builder builderForValue) { + if (generalObjectDetectionConfigBuilder_ == null) { + processorConfig_ = builderForValue.build(); + onChanged(); + } else { + generalObjectDetectionConfigBuilder_.setMessage(builderForValue.build()); + } + processorConfigCase_ = 18; + return this; + } + /** + * + * + *
+     * Configs of General Object Detection processor.
+     * 
+ * + * + * .google.cloud.visionai.v1.GeneralObjectDetectionConfig general_object_detection_config = 18; + * + */ + public Builder mergeGeneralObjectDetectionConfig( + com.google.cloud.visionai.v1.GeneralObjectDetectionConfig value) { + if (generalObjectDetectionConfigBuilder_ == null) { + if (processorConfigCase_ == 18 + && processorConfig_ + != com.google.cloud.visionai.v1.GeneralObjectDetectionConfig.getDefaultInstance()) { + processorConfig_ = + com.google.cloud.visionai.v1.GeneralObjectDetectionConfig.newBuilder( + (com.google.cloud.visionai.v1.GeneralObjectDetectionConfig) processorConfig_) + .mergeFrom(value) + .buildPartial(); + } else { + processorConfig_ = value; + } + onChanged(); + } else { + if (processorConfigCase_ == 18) { + generalObjectDetectionConfigBuilder_.mergeFrom(value); + } else { + generalObjectDetectionConfigBuilder_.setMessage(value); + } + } + processorConfigCase_ = 18; + return this; + } + /** + * + * + *
+     * Configs of General Object Detection processor.
+     * 
+ * + * + * .google.cloud.visionai.v1.GeneralObjectDetectionConfig general_object_detection_config = 18; + * + */ + public Builder clearGeneralObjectDetectionConfig() { + if (generalObjectDetectionConfigBuilder_ == null) { + if (processorConfigCase_ == 18) { + processorConfigCase_ = 0; + processorConfig_ = null; + onChanged(); + } + } else { + if (processorConfigCase_ == 18) { + processorConfigCase_ = 0; + processorConfig_ = null; + } + generalObjectDetectionConfigBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Configs of General Object Detection processor.
+     * 
+ * + * + * .google.cloud.visionai.v1.GeneralObjectDetectionConfig general_object_detection_config = 18; + * + */ + public com.google.cloud.visionai.v1.GeneralObjectDetectionConfig.Builder + getGeneralObjectDetectionConfigBuilder() { + return getGeneralObjectDetectionConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Configs of General Object Detection processor.
+     * 
+ * + * + * .google.cloud.visionai.v1.GeneralObjectDetectionConfig general_object_detection_config = 18; + * + */ + @java.lang.Override + public com.google.cloud.visionai.v1.GeneralObjectDetectionConfigOrBuilder + getGeneralObjectDetectionConfigOrBuilder() { + if ((processorConfigCase_ == 18) && (generalObjectDetectionConfigBuilder_ != null)) { + return generalObjectDetectionConfigBuilder_.getMessageOrBuilder(); + } else { + if (processorConfigCase_ == 18) { + return (com.google.cloud.visionai.v1.GeneralObjectDetectionConfig) processorConfig_; + } + return com.google.cloud.visionai.v1.GeneralObjectDetectionConfig.getDefaultInstance(); + } + } + /** + * + * + *
+     * Configs of General Object Detection processor.
+     * 
+ * + * + * .google.cloud.visionai.v1.GeneralObjectDetectionConfig general_object_detection_config = 18; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.GeneralObjectDetectionConfig, + com.google.cloud.visionai.v1.GeneralObjectDetectionConfig.Builder, + com.google.cloud.visionai.v1.GeneralObjectDetectionConfigOrBuilder> + getGeneralObjectDetectionConfigFieldBuilder() { + if (generalObjectDetectionConfigBuilder_ == null) { + if (!(processorConfigCase_ == 18)) { + processorConfig_ = + com.google.cloud.visionai.v1.GeneralObjectDetectionConfig.getDefaultInstance(); + } + generalObjectDetectionConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.GeneralObjectDetectionConfig, + com.google.cloud.visionai.v1.GeneralObjectDetectionConfig.Builder, + com.google.cloud.visionai.v1.GeneralObjectDetectionConfigOrBuilder>( + (com.google.cloud.visionai.v1.GeneralObjectDetectionConfig) processorConfig_, + getParentForChildren(), + isClean()); + processorConfig_ = null; + } + processorConfigCase_ = 18; + onChanged(); + return generalObjectDetectionConfigBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.BigQueryConfig, + com.google.cloud.visionai.v1.BigQueryConfig.Builder, + com.google.cloud.visionai.v1.BigQueryConfigOrBuilder> + bigQueryConfigBuilder_; + /** + * + * + *
+     * Configs of BigQuery processor.
+     * 
+ * + * .google.cloud.visionai.v1.BigQueryConfig big_query_config = 19; + * + * @return Whether the bigQueryConfig field is set. + */ + @java.lang.Override + public boolean hasBigQueryConfig() { + return processorConfigCase_ == 19; + } + /** + * + * + *
+     * Configs of BigQuery processor.
+     * 
+ * + * .google.cloud.visionai.v1.BigQueryConfig big_query_config = 19; + * + * @return The bigQueryConfig. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.BigQueryConfig getBigQueryConfig() { + if (bigQueryConfigBuilder_ == null) { + if (processorConfigCase_ == 19) { + return (com.google.cloud.visionai.v1.BigQueryConfig) processorConfig_; + } + return com.google.cloud.visionai.v1.BigQueryConfig.getDefaultInstance(); + } else { + if (processorConfigCase_ == 19) { + return bigQueryConfigBuilder_.getMessage(); + } + return com.google.cloud.visionai.v1.BigQueryConfig.getDefaultInstance(); + } + } + /** + * + * + *
+     * Configs of BigQuery processor.
+     * 
+ * + * .google.cloud.visionai.v1.BigQueryConfig big_query_config = 19; + */ + public Builder setBigQueryConfig(com.google.cloud.visionai.v1.BigQueryConfig value) { + if (bigQueryConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + processorConfig_ = value; + onChanged(); + } else { + bigQueryConfigBuilder_.setMessage(value); + } + processorConfigCase_ = 19; + return this; + } + /** + * + * + *
+     * Configs of BigQuery processor.
+     * 
+ * + * .google.cloud.visionai.v1.BigQueryConfig big_query_config = 19; + */ + public Builder setBigQueryConfig( + com.google.cloud.visionai.v1.BigQueryConfig.Builder builderForValue) { + if (bigQueryConfigBuilder_ == null) { + processorConfig_ = builderForValue.build(); + onChanged(); + } else { + bigQueryConfigBuilder_.setMessage(builderForValue.build()); + } + processorConfigCase_ = 19; + return this; + } + /** + * + * + *
+     * Configs of BigQuery processor.
+     * 
+ * + * .google.cloud.visionai.v1.BigQueryConfig big_query_config = 19; + */ + public Builder mergeBigQueryConfig(com.google.cloud.visionai.v1.BigQueryConfig value) { + if (bigQueryConfigBuilder_ == null) { + if (processorConfigCase_ == 19 + && processorConfig_ + != com.google.cloud.visionai.v1.BigQueryConfig.getDefaultInstance()) { + processorConfig_ = + com.google.cloud.visionai.v1.BigQueryConfig.newBuilder( + (com.google.cloud.visionai.v1.BigQueryConfig) processorConfig_) + .mergeFrom(value) + .buildPartial(); + } else { + processorConfig_ = value; + } + onChanged(); + } else { + if (processorConfigCase_ == 19) { + bigQueryConfigBuilder_.mergeFrom(value); + } else { + bigQueryConfigBuilder_.setMessage(value); + } + } + processorConfigCase_ = 19; + return this; + } + /** + * + * + *
+     * Configs of BigQuery processor.
+     * 
+ * + * .google.cloud.visionai.v1.BigQueryConfig big_query_config = 19; + */ + public Builder clearBigQueryConfig() { + if (bigQueryConfigBuilder_ == null) { + if (processorConfigCase_ == 19) { + processorConfigCase_ = 0; + processorConfig_ = null; + onChanged(); + } + } else { + if (processorConfigCase_ == 19) { + processorConfigCase_ = 0; + processorConfig_ = null; + } + bigQueryConfigBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Configs of BigQuery processor.
+     * 
+ * + * .google.cloud.visionai.v1.BigQueryConfig big_query_config = 19; + */ + public com.google.cloud.visionai.v1.BigQueryConfig.Builder getBigQueryConfigBuilder() { + return getBigQueryConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Configs of BigQuery processor.
+     * 
+ * + * .google.cloud.visionai.v1.BigQueryConfig big_query_config = 19; + */ + @java.lang.Override + public com.google.cloud.visionai.v1.BigQueryConfigOrBuilder getBigQueryConfigOrBuilder() { + if ((processorConfigCase_ == 19) && (bigQueryConfigBuilder_ != null)) { + return bigQueryConfigBuilder_.getMessageOrBuilder(); + } else { + if (processorConfigCase_ == 19) { + return (com.google.cloud.visionai.v1.BigQueryConfig) processorConfig_; + } + return com.google.cloud.visionai.v1.BigQueryConfig.getDefaultInstance(); + } + } + /** + * + * + *
+     * Configs of BigQuery processor.
+     * 
+ * + * .google.cloud.visionai.v1.BigQueryConfig big_query_config = 19; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.BigQueryConfig, + com.google.cloud.visionai.v1.BigQueryConfig.Builder, + com.google.cloud.visionai.v1.BigQueryConfigOrBuilder> + getBigQueryConfigFieldBuilder() { + if (bigQueryConfigBuilder_ == null) { + if (!(processorConfigCase_ == 19)) { + processorConfig_ = com.google.cloud.visionai.v1.BigQueryConfig.getDefaultInstance(); + } + bigQueryConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.BigQueryConfig, + com.google.cloud.visionai.v1.BigQueryConfig.Builder, + com.google.cloud.visionai.v1.BigQueryConfigOrBuilder>( + (com.google.cloud.visionai.v1.BigQueryConfig) processorConfig_, + getParentForChildren(), + isClean()); + processorConfig_ = null; + } + processorConfigCase_ = 19; + onChanged(); + return bigQueryConfigBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.GcsOutputConfig, + com.google.cloud.visionai.v1.GcsOutputConfig.Builder, + com.google.cloud.visionai.v1.GcsOutputConfigOrBuilder> + gcsOutputConfigBuilder_; + /** + * + * + *
+     * Configs of Cloud Storage output processor.
+     * 
+ * + * .google.cloud.visionai.v1.GcsOutputConfig gcs_output_config = 27; + * + * @return Whether the gcsOutputConfig field is set. + */ + @java.lang.Override + public boolean hasGcsOutputConfig() { + return processorConfigCase_ == 27; + } + /** + * + * + *
+     * Configs of Cloud Storage output processor.
+     * 
+ * + * .google.cloud.visionai.v1.GcsOutputConfig gcs_output_config = 27; + * + * @return The gcsOutputConfig. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.GcsOutputConfig getGcsOutputConfig() { + if (gcsOutputConfigBuilder_ == null) { + if (processorConfigCase_ == 27) { + return (com.google.cloud.visionai.v1.GcsOutputConfig) processorConfig_; + } + return com.google.cloud.visionai.v1.GcsOutputConfig.getDefaultInstance(); + } else { + if (processorConfigCase_ == 27) { + return gcsOutputConfigBuilder_.getMessage(); + } + return com.google.cloud.visionai.v1.GcsOutputConfig.getDefaultInstance(); + } + } + /** + * + * + *
+     * Configs of Cloud Storage output processor.
+     * 
+ * + * .google.cloud.visionai.v1.GcsOutputConfig gcs_output_config = 27; + */ + public Builder setGcsOutputConfig(com.google.cloud.visionai.v1.GcsOutputConfig value) { + if (gcsOutputConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + processorConfig_ = value; + onChanged(); + } else { + gcsOutputConfigBuilder_.setMessage(value); + } + processorConfigCase_ = 27; + return this; + } + /** + * + * + *
+     * Configs of Cloud Storage output processor.
+     * 
+ * + * .google.cloud.visionai.v1.GcsOutputConfig gcs_output_config = 27; + */ + public Builder setGcsOutputConfig( + com.google.cloud.visionai.v1.GcsOutputConfig.Builder builderForValue) { + if (gcsOutputConfigBuilder_ == null) { + processorConfig_ = builderForValue.build(); + onChanged(); + } else { + gcsOutputConfigBuilder_.setMessage(builderForValue.build()); + } + processorConfigCase_ = 27; + return this; + } + /** + * + * + *
+     * Configs of Cloud Storage output processor.
+     * 
+ * + * .google.cloud.visionai.v1.GcsOutputConfig gcs_output_config = 27; + */ + public Builder mergeGcsOutputConfig(com.google.cloud.visionai.v1.GcsOutputConfig value) { + if (gcsOutputConfigBuilder_ == null) { + if (processorConfigCase_ == 27 + && processorConfig_ + != com.google.cloud.visionai.v1.GcsOutputConfig.getDefaultInstance()) { + processorConfig_ = + com.google.cloud.visionai.v1.GcsOutputConfig.newBuilder( + (com.google.cloud.visionai.v1.GcsOutputConfig) processorConfig_) + .mergeFrom(value) + .buildPartial(); + } else { + processorConfig_ = value; + } + onChanged(); + } else { + if (processorConfigCase_ == 27) { + gcsOutputConfigBuilder_.mergeFrom(value); + } else { + gcsOutputConfigBuilder_.setMessage(value); + } + } + processorConfigCase_ = 27; + return this; + } + /** + * + * + *
+     * Configs of Cloud Storage output processor.
+     * 
+ * + * .google.cloud.visionai.v1.GcsOutputConfig gcs_output_config = 27; + */ + public Builder clearGcsOutputConfig() { + if (gcsOutputConfigBuilder_ == null) { + if (processorConfigCase_ == 27) { + processorConfigCase_ = 0; + processorConfig_ = null; + onChanged(); + } + } else { + if (processorConfigCase_ == 27) { + processorConfigCase_ = 0; + processorConfig_ = null; + } + gcsOutputConfigBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Configs of Cloud Storage output processor.
+     * 
+ * + * .google.cloud.visionai.v1.GcsOutputConfig gcs_output_config = 27; + */ + public com.google.cloud.visionai.v1.GcsOutputConfig.Builder getGcsOutputConfigBuilder() { + return getGcsOutputConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Configs of Cloud Storage output processor.
+     * 
+ * + * .google.cloud.visionai.v1.GcsOutputConfig gcs_output_config = 27; + */ + @java.lang.Override + public com.google.cloud.visionai.v1.GcsOutputConfigOrBuilder getGcsOutputConfigOrBuilder() { + if ((processorConfigCase_ == 27) && (gcsOutputConfigBuilder_ != null)) { + return gcsOutputConfigBuilder_.getMessageOrBuilder(); + } else { + if (processorConfigCase_ == 27) { + return (com.google.cloud.visionai.v1.GcsOutputConfig) processorConfig_; + } + return com.google.cloud.visionai.v1.GcsOutputConfig.getDefaultInstance(); + } + } + /** + * + * + *
+     * Configs of Cloud Storage output processor.
+     * 
+ * + * .google.cloud.visionai.v1.GcsOutputConfig gcs_output_config = 27; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.GcsOutputConfig, + com.google.cloud.visionai.v1.GcsOutputConfig.Builder, + com.google.cloud.visionai.v1.GcsOutputConfigOrBuilder> + getGcsOutputConfigFieldBuilder() { + if (gcsOutputConfigBuilder_ == null) { + if (!(processorConfigCase_ == 27)) { + processorConfig_ = com.google.cloud.visionai.v1.GcsOutputConfig.getDefaultInstance(); + } + gcsOutputConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.GcsOutputConfig, + com.google.cloud.visionai.v1.GcsOutputConfig.Builder, + com.google.cloud.visionai.v1.GcsOutputConfigOrBuilder>( + (com.google.cloud.visionai.v1.GcsOutputConfig) processorConfig_, + getParentForChildren(), + isClean()); + processorConfig_ = null; + } + processorConfigCase_ = 27; + onChanged(); + return gcsOutputConfigBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.ProductRecognizerConfig, + com.google.cloud.visionai.v1.ProductRecognizerConfig.Builder, + com.google.cloud.visionai.v1.ProductRecognizerConfigOrBuilder> + productRecognizerConfigBuilder_; + /** + * + * + *
+     * Runtime configs of Product Recognizer processor.
+     * 
+ * + * .google.cloud.visionai.v1.ProductRecognizerConfig product_recognizer_config = 21; + * + * + * @return Whether the productRecognizerConfig field is set. + */ + @java.lang.Override + public boolean hasProductRecognizerConfig() { + return processorConfigCase_ == 21; + } + /** + * + * + *
+     * Runtime configs of Product Recognizer processor.
+     * 
+ * + * .google.cloud.visionai.v1.ProductRecognizerConfig product_recognizer_config = 21; + * + * + * @return The productRecognizerConfig. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.ProductRecognizerConfig getProductRecognizerConfig() { + if (productRecognizerConfigBuilder_ == null) { + if (processorConfigCase_ == 21) { + return (com.google.cloud.visionai.v1.ProductRecognizerConfig) processorConfig_; + } + return com.google.cloud.visionai.v1.ProductRecognizerConfig.getDefaultInstance(); + } else { + if (processorConfigCase_ == 21) { + return productRecognizerConfigBuilder_.getMessage(); + } + return com.google.cloud.visionai.v1.ProductRecognizerConfig.getDefaultInstance(); + } + } + /** + * + * + *
+     * Runtime configs of Product Recognizer processor.
+     * 
+ * + * .google.cloud.visionai.v1.ProductRecognizerConfig product_recognizer_config = 21; + * + */ + public Builder setProductRecognizerConfig( + com.google.cloud.visionai.v1.ProductRecognizerConfig value) { + if (productRecognizerConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + processorConfig_ = value; + onChanged(); + } else { + productRecognizerConfigBuilder_.setMessage(value); + } + processorConfigCase_ = 21; + return this; + } + /** + * + * + *
+     * Runtime configs of Product Recognizer processor.
+     * 
+ * + * .google.cloud.visionai.v1.ProductRecognizerConfig product_recognizer_config = 21; + * + */ + public Builder setProductRecognizerConfig( + com.google.cloud.visionai.v1.ProductRecognizerConfig.Builder builderForValue) { + if (productRecognizerConfigBuilder_ == null) { + processorConfig_ = builderForValue.build(); + onChanged(); + } else { + productRecognizerConfigBuilder_.setMessage(builderForValue.build()); + } + processorConfigCase_ = 21; + return this; + } + /** + * + * + *
+     * Runtime configs of Product Recognizer processor.
+     * 
+ * + * .google.cloud.visionai.v1.ProductRecognizerConfig product_recognizer_config = 21; + * + */ + public Builder mergeProductRecognizerConfig( + com.google.cloud.visionai.v1.ProductRecognizerConfig value) { + if (productRecognizerConfigBuilder_ == null) { + if (processorConfigCase_ == 21 + && processorConfig_ + != com.google.cloud.visionai.v1.ProductRecognizerConfig.getDefaultInstance()) { + processorConfig_ = + com.google.cloud.visionai.v1.ProductRecognizerConfig.newBuilder( + (com.google.cloud.visionai.v1.ProductRecognizerConfig) processorConfig_) + .mergeFrom(value) + .buildPartial(); + } else { + processorConfig_ = value; + } + onChanged(); + } else { + if (processorConfigCase_ == 21) { + productRecognizerConfigBuilder_.mergeFrom(value); + } else { + productRecognizerConfigBuilder_.setMessage(value); + } + } + processorConfigCase_ = 21; + return this; + } + /** + * + * + *
+     * Runtime configs of Product Recognizer processor.
+     * 
+ * + * .google.cloud.visionai.v1.ProductRecognizerConfig product_recognizer_config = 21; + * + */ + public Builder clearProductRecognizerConfig() { + if (productRecognizerConfigBuilder_ == null) { + if (processorConfigCase_ == 21) { + processorConfigCase_ = 0; + processorConfig_ = null; + onChanged(); + } + } else { + if (processorConfigCase_ == 21) { + processorConfigCase_ = 0; + processorConfig_ = null; + } + productRecognizerConfigBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Runtime configs of Product Recognizer processor.
+     * 
+ * + * .google.cloud.visionai.v1.ProductRecognizerConfig product_recognizer_config = 21; + * + */ + public com.google.cloud.visionai.v1.ProductRecognizerConfig.Builder + getProductRecognizerConfigBuilder() { + return getProductRecognizerConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Runtime configs of Product Recognizer processor.
+     * 
+ * + * .google.cloud.visionai.v1.ProductRecognizerConfig product_recognizer_config = 21; + * + */ + @java.lang.Override + public com.google.cloud.visionai.v1.ProductRecognizerConfigOrBuilder + getProductRecognizerConfigOrBuilder() { + if ((processorConfigCase_ == 21) && (productRecognizerConfigBuilder_ != null)) { + return productRecognizerConfigBuilder_.getMessageOrBuilder(); + } else { + if (processorConfigCase_ == 21) { + return (com.google.cloud.visionai.v1.ProductRecognizerConfig) processorConfig_; + } + return com.google.cloud.visionai.v1.ProductRecognizerConfig.getDefaultInstance(); + } + } + /** + * + * + *
+     * Runtime configs of Product Recognizer processor.
+     * 
+ * + * .google.cloud.visionai.v1.ProductRecognizerConfig product_recognizer_config = 21; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.ProductRecognizerConfig, + com.google.cloud.visionai.v1.ProductRecognizerConfig.Builder, + com.google.cloud.visionai.v1.ProductRecognizerConfigOrBuilder> + getProductRecognizerConfigFieldBuilder() { + if (productRecognizerConfigBuilder_ == null) { + if (!(processorConfigCase_ == 21)) { + processorConfig_ = + com.google.cloud.visionai.v1.ProductRecognizerConfig.getDefaultInstance(); + } + productRecognizerConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.ProductRecognizerConfig, + com.google.cloud.visionai.v1.ProductRecognizerConfig.Builder, + com.google.cloud.visionai.v1.ProductRecognizerConfigOrBuilder>( + (com.google.cloud.visionai.v1.ProductRecognizerConfig) processorConfig_, + getParentForChildren(), + isClean()); + processorConfig_ = null; + } + processorConfigCase_ = 21; + onChanged(); + return productRecognizerConfigBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionConfig, + com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionConfig.Builder, + com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionConfigOrBuilder> + personalProtectiveEquipmentDetectionConfigBuilder_; + /** + * + * + *
+     * Configs of personal_protective_equipment_detection_config
+     * 
+ * + * + * .google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionConfig personal_protective_equipment_detection_config = 22; + * + * + * @return Whether the personalProtectiveEquipmentDetectionConfig field is set. + */ + @java.lang.Override + public boolean hasPersonalProtectiveEquipmentDetectionConfig() { + return processorConfigCase_ == 22; + } + /** + * + * + *
+     * Configs of personal_protective_equipment_detection_config
+     * 
+ * + * + * .google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionConfig personal_protective_equipment_detection_config = 22; + * + * + * @return The personalProtectiveEquipmentDetectionConfig. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionConfig + getPersonalProtectiveEquipmentDetectionConfig() { + if (personalProtectiveEquipmentDetectionConfigBuilder_ == null) { + if (processorConfigCase_ == 22) { + return (com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionConfig) + processorConfig_; + } + return com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionConfig + .getDefaultInstance(); + } else { + if (processorConfigCase_ == 22) { + return personalProtectiveEquipmentDetectionConfigBuilder_.getMessage(); + } + return com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionConfig + .getDefaultInstance(); + } + } + /** + * + * + *
+     * Configs of personal_protective_equipment_detection_config
+     * 
+ * + * + * .google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionConfig personal_protective_equipment_detection_config = 22; + * + */ + public Builder setPersonalProtectiveEquipmentDetectionConfig( + com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionConfig value) { + if (personalProtectiveEquipmentDetectionConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + processorConfig_ = value; + onChanged(); + } else { + personalProtectiveEquipmentDetectionConfigBuilder_.setMessage(value); + } + processorConfigCase_ = 22; + return this; + } + /** + * + * + *
+     * Configs of personal_protective_equipment_detection_config
+     * 
+ * + * + * .google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionConfig personal_protective_equipment_detection_config = 22; + * + */ + public Builder setPersonalProtectiveEquipmentDetectionConfig( + com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionConfig.Builder + builderForValue) { + if (personalProtectiveEquipmentDetectionConfigBuilder_ == null) { + processorConfig_ = builderForValue.build(); + onChanged(); + } else { + personalProtectiveEquipmentDetectionConfigBuilder_.setMessage(builderForValue.build()); + } + processorConfigCase_ = 22; + return this; + } + /** + * + * + *
+     * Configs of personal_protective_equipment_detection_config
+     * 
+ * + * + * .google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionConfig personal_protective_equipment_detection_config = 22; + * + */ + public Builder mergePersonalProtectiveEquipmentDetectionConfig( + com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionConfig value) { + if (personalProtectiveEquipmentDetectionConfigBuilder_ == null) { + if (processorConfigCase_ == 22 + && processorConfig_ + != com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionConfig + .getDefaultInstance()) { + processorConfig_ = + com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionConfig.newBuilder( + (com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionConfig) + processorConfig_) + .mergeFrom(value) + .buildPartial(); + } else { + processorConfig_ = value; + } + onChanged(); + } else { + if (processorConfigCase_ == 22) { + personalProtectiveEquipmentDetectionConfigBuilder_.mergeFrom(value); + } else { + personalProtectiveEquipmentDetectionConfigBuilder_.setMessage(value); + } + } + processorConfigCase_ = 22; + return this; + } + /** + * + * + *
+     * Configs of personal_protective_equipment_detection_config
+     * 
+ * + * + * .google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionConfig personal_protective_equipment_detection_config = 22; + * + */ + public Builder clearPersonalProtectiveEquipmentDetectionConfig() { + if (personalProtectiveEquipmentDetectionConfigBuilder_ == null) { + if (processorConfigCase_ == 22) { + processorConfigCase_ = 0; + processorConfig_ = null; + onChanged(); + } + } else { + if (processorConfigCase_ == 22) { + processorConfigCase_ = 0; + processorConfig_ = null; + } + personalProtectiveEquipmentDetectionConfigBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Configs of personal_protective_equipment_detection_config
+     * 
+ * + * + * .google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionConfig personal_protective_equipment_detection_config = 22; + * + */ + public com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionConfig.Builder + getPersonalProtectiveEquipmentDetectionConfigBuilder() { + return getPersonalProtectiveEquipmentDetectionConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Configs of personal_protective_equipment_detection_config
+     * 
+ * + * + * .google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionConfig personal_protective_equipment_detection_config = 22; + * + */ + @java.lang.Override + public com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionConfigOrBuilder + getPersonalProtectiveEquipmentDetectionConfigOrBuilder() { + if ((processorConfigCase_ == 22) + && (personalProtectiveEquipmentDetectionConfigBuilder_ != null)) { + return personalProtectiveEquipmentDetectionConfigBuilder_.getMessageOrBuilder(); + } else { + if (processorConfigCase_ == 22) { + return (com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionConfig) + processorConfig_; + } + return com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionConfig + .getDefaultInstance(); + } + } + /** + * + * + *
+     * Configs of personal_protective_equipment_detection_config
+     * 
+ * + * + * .google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionConfig personal_protective_equipment_detection_config = 22; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionConfig, + com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionConfig.Builder, + com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionConfigOrBuilder> + getPersonalProtectiveEquipmentDetectionConfigFieldBuilder() { + if (personalProtectiveEquipmentDetectionConfigBuilder_ == null) { + if (!(processorConfigCase_ == 22)) { + processorConfig_ = + com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionConfig + .getDefaultInstance(); + } + personalProtectiveEquipmentDetectionConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionConfig, + com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionConfig.Builder, + com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionConfigOrBuilder>( + (com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionConfig) + processorConfig_, + getParentForChildren(), + isClean()); + processorConfig_ = null; + } + processorConfigCase_ = 22; + onChanged(); + return personalProtectiveEquipmentDetectionConfigBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.TagRecognizerConfig, + com.google.cloud.visionai.v1.TagRecognizerConfig.Builder, + com.google.cloud.visionai.v1.TagRecognizerConfigOrBuilder> + tagRecognizerConfigBuilder_; + /** + * + * + *
+     * Runtime configs of Tag Recognizer processor.
+     * 
+ * + * .google.cloud.visionai.v1.TagRecognizerConfig tag_recognizer_config = 25; + * + * @return Whether the tagRecognizerConfig field is set. + */ + @java.lang.Override + public boolean hasTagRecognizerConfig() { + return processorConfigCase_ == 25; + } + /** + * + * + *
+     * Runtime configs of Tag Recognizer processor.
+     * 
+ * + * .google.cloud.visionai.v1.TagRecognizerConfig tag_recognizer_config = 25; + * + * @return The tagRecognizerConfig. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.TagRecognizerConfig getTagRecognizerConfig() { + if (tagRecognizerConfigBuilder_ == null) { + if (processorConfigCase_ == 25) { + return (com.google.cloud.visionai.v1.TagRecognizerConfig) processorConfig_; + } + return com.google.cloud.visionai.v1.TagRecognizerConfig.getDefaultInstance(); + } else { + if (processorConfigCase_ == 25) { + return tagRecognizerConfigBuilder_.getMessage(); + } + return com.google.cloud.visionai.v1.TagRecognizerConfig.getDefaultInstance(); + } + } + /** + * + * + *
+     * Runtime configs of Tag Recognizer processor.
+     * 
+ * + * .google.cloud.visionai.v1.TagRecognizerConfig tag_recognizer_config = 25; + */ + public Builder setTagRecognizerConfig(com.google.cloud.visionai.v1.TagRecognizerConfig value) { + if (tagRecognizerConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + processorConfig_ = value; + onChanged(); + } else { + tagRecognizerConfigBuilder_.setMessage(value); + } + processorConfigCase_ = 25; + return this; + } + /** + * + * + *
+     * Runtime configs of Tag Recognizer processor.
+     * 
+ * + * .google.cloud.visionai.v1.TagRecognizerConfig tag_recognizer_config = 25; + */ + public Builder setTagRecognizerConfig( + com.google.cloud.visionai.v1.TagRecognizerConfig.Builder builderForValue) { + if (tagRecognizerConfigBuilder_ == null) { + processorConfig_ = builderForValue.build(); + onChanged(); + } else { + tagRecognizerConfigBuilder_.setMessage(builderForValue.build()); + } + processorConfigCase_ = 25; + return this; + } + /** + * + * + *
+     * Runtime configs of Tag Recognizer processor.
+     * 
+ * + * .google.cloud.visionai.v1.TagRecognizerConfig tag_recognizer_config = 25; + */ + public Builder mergeTagRecognizerConfig( + com.google.cloud.visionai.v1.TagRecognizerConfig value) { + if (tagRecognizerConfigBuilder_ == null) { + if (processorConfigCase_ == 25 + && processorConfig_ + != com.google.cloud.visionai.v1.TagRecognizerConfig.getDefaultInstance()) { + processorConfig_ = + com.google.cloud.visionai.v1.TagRecognizerConfig.newBuilder( + (com.google.cloud.visionai.v1.TagRecognizerConfig) processorConfig_) + .mergeFrom(value) + .buildPartial(); + } else { + processorConfig_ = value; + } + onChanged(); + } else { + if (processorConfigCase_ == 25) { + tagRecognizerConfigBuilder_.mergeFrom(value); + } else { + tagRecognizerConfigBuilder_.setMessage(value); + } + } + processorConfigCase_ = 25; + return this; + } + /** + * + * + *
+     * Runtime configs of Tag Recognizer processor.
+     * 
+ * + * .google.cloud.visionai.v1.TagRecognizerConfig tag_recognizer_config = 25; + */ + public Builder clearTagRecognizerConfig() { + if (tagRecognizerConfigBuilder_ == null) { + if (processorConfigCase_ == 25) { + processorConfigCase_ = 0; + processorConfig_ = null; + onChanged(); + } + } else { + if (processorConfigCase_ == 25) { + processorConfigCase_ = 0; + processorConfig_ = null; + } + tagRecognizerConfigBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Runtime configs of Tag Recognizer processor.
+     * 
+ * + * .google.cloud.visionai.v1.TagRecognizerConfig tag_recognizer_config = 25; + */ + public com.google.cloud.visionai.v1.TagRecognizerConfig.Builder + getTagRecognizerConfigBuilder() { + return getTagRecognizerConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Runtime configs of Tag Recognizer processor.
+     * 
+ * + * .google.cloud.visionai.v1.TagRecognizerConfig tag_recognizer_config = 25; + */ + @java.lang.Override + public com.google.cloud.visionai.v1.TagRecognizerConfigOrBuilder + getTagRecognizerConfigOrBuilder() { + if ((processorConfigCase_ == 25) && (tagRecognizerConfigBuilder_ != null)) { + return tagRecognizerConfigBuilder_.getMessageOrBuilder(); + } else { + if (processorConfigCase_ == 25) { + return (com.google.cloud.visionai.v1.TagRecognizerConfig) processorConfig_; + } + return com.google.cloud.visionai.v1.TagRecognizerConfig.getDefaultInstance(); + } + } + /** + * + * + *
+     * Runtime configs of Tag Recognizer processor.
+     * 
+ * + * .google.cloud.visionai.v1.TagRecognizerConfig tag_recognizer_config = 25; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.TagRecognizerConfig, + com.google.cloud.visionai.v1.TagRecognizerConfig.Builder, + com.google.cloud.visionai.v1.TagRecognizerConfigOrBuilder> + getTagRecognizerConfigFieldBuilder() { + if (tagRecognizerConfigBuilder_ == null) { + if (!(processorConfigCase_ == 25)) { + processorConfig_ = com.google.cloud.visionai.v1.TagRecognizerConfig.getDefaultInstance(); + } + tagRecognizerConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.TagRecognizerConfig, + com.google.cloud.visionai.v1.TagRecognizerConfig.Builder, + com.google.cloud.visionai.v1.TagRecognizerConfigOrBuilder>( + (com.google.cloud.visionai.v1.TagRecognizerConfig) processorConfig_, + getParentForChildren(), + isClean()); + processorConfig_ = null; + } + processorConfigCase_ = 25; + onChanged(); + return tagRecognizerConfigBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.UniversalInputConfig, + com.google.cloud.visionai.v1.UniversalInputConfig.Builder, + com.google.cloud.visionai.v1.UniversalInputConfigOrBuilder> + universalInputConfigBuilder_; + /** + * + * + *
+     * Runtime configs of UniversalInput processor.
+     * 
+ * + * .google.cloud.visionai.v1.UniversalInputConfig universal_input_config = 28; + * + * @return Whether the universalInputConfig field is set. + */ + @java.lang.Override + public boolean hasUniversalInputConfig() { + return processorConfigCase_ == 28; + } + /** + * + * + *
+     * Runtime configs of UniversalInput processor.
+     * 
+ * + * .google.cloud.visionai.v1.UniversalInputConfig universal_input_config = 28; + * + * @return The universalInputConfig. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.UniversalInputConfig getUniversalInputConfig() { + if (universalInputConfigBuilder_ == null) { + if (processorConfigCase_ == 28) { + return (com.google.cloud.visionai.v1.UniversalInputConfig) processorConfig_; + } + return com.google.cloud.visionai.v1.UniversalInputConfig.getDefaultInstance(); + } else { + if (processorConfigCase_ == 28) { + return universalInputConfigBuilder_.getMessage(); + } + return com.google.cloud.visionai.v1.UniversalInputConfig.getDefaultInstance(); + } + } + /** + * + * + *
+     * Runtime configs of UniversalInput processor.
+     * 
+ * + * .google.cloud.visionai.v1.UniversalInputConfig universal_input_config = 28; + */ + public Builder setUniversalInputConfig( + com.google.cloud.visionai.v1.UniversalInputConfig value) { + if (universalInputConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + processorConfig_ = value; + onChanged(); + } else { + universalInputConfigBuilder_.setMessage(value); + } + processorConfigCase_ = 28; + return this; + } + /** + * + * + *
+     * Runtime configs of UniversalInput processor.
+     * 
+ * + * .google.cloud.visionai.v1.UniversalInputConfig universal_input_config = 28; + */ + public Builder setUniversalInputConfig( + com.google.cloud.visionai.v1.UniversalInputConfig.Builder builderForValue) { + if (universalInputConfigBuilder_ == null) { + processorConfig_ = builderForValue.build(); + onChanged(); + } else { + universalInputConfigBuilder_.setMessage(builderForValue.build()); + } + processorConfigCase_ = 28; + return this; + } + /** + * + * + *
+     * Runtime configs of UniversalInput processor.
+     * 
+ * + * .google.cloud.visionai.v1.UniversalInputConfig universal_input_config = 28; + */ + public Builder mergeUniversalInputConfig( + com.google.cloud.visionai.v1.UniversalInputConfig value) { + if (universalInputConfigBuilder_ == null) { + if (processorConfigCase_ == 28 + && processorConfig_ + != com.google.cloud.visionai.v1.UniversalInputConfig.getDefaultInstance()) { + processorConfig_ = + com.google.cloud.visionai.v1.UniversalInputConfig.newBuilder( + (com.google.cloud.visionai.v1.UniversalInputConfig) processorConfig_) + .mergeFrom(value) + .buildPartial(); + } else { + processorConfig_ = value; + } + onChanged(); + } else { + if (processorConfigCase_ == 28) { + universalInputConfigBuilder_.mergeFrom(value); + } else { + universalInputConfigBuilder_.setMessage(value); + } + } + processorConfigCase_ = 28; + return this; + } + /** + * + * + *
+     * Runtime configs of UniversalInput processor.
+     * 
+ * + * .google.cloud.visionai.v1.UniversalInputConfig universal_input_config = 28; + */ + public Builder clearUniversalInputConfig() { + if (universalInputConfigBuilder_ == null) { + if (processorConfigCase_ == 28) { + processorConfigCase_ = 0; + processorConfig_ = null; + onChanged(); + } + } else { + if (processorConfigCase_ == 28) { + processorConfigCase_ = 0; + processorConfig_ = null; + } + universalInputConfigBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Runtime configs of UniversalInput processor.
+     * 
+ * + * .google.cloud.visionai.v1.UniversalInputConfig universal_input_config = 28; + */ + public com.google.cloud.visionai.v1.UniversalInputConfig.Builder + getUniversalInputConfigBuilder() { + return getUniversalInputConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Runtime configs of UniversalInput processor.
+     * 
+ * + * .google.cloud.visionai.v1.UniversalInputConfig universal_input_config = 28; + */ + @java.lang.Override + public com.google.cloud.visionai.v1.UniversalInputConfigOrBuilder + getUniversalInputConfigOrBuilder() { + if ((processorConfigCase_ == 28) && (universalInputConfigBuilder_ != null)) { + return universalInputConfigBuilder_.getMessageOrBuilder(); + } else { + if (processorConfigCase_ == 28) { + return (com.google.cloud.visionai.v1.UniversalInputConfig) processorConfig_; + } + return com.google.cloud.visionai.v1.UniversalInputConfig.getDefaultInstance(); + } + } + /** + * + * + *
+     * Runtime configs of UniversalInput processor.
+     * 
+ * + * .google.cloud.visionai.v1.UniversalInputConfig universal_input_config = 28; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.UniversalInputConfig, + com.google.cloud.visionai.v1.UniversalInputConfig.Builder, + com.google.cloud.visionai.v1.UniversalInputConfigOrBuilder> + getUniversalInputConfigFieldBuilder() { + if (universalInputConfigBuilder_ == null) { + if (!(processorConfigCase_ == 28)) { + processorConfig_ = com.google.cloud.visionai.v1.UniversalInputConfig.getDefaultInstance(); + } + universalInputConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.UniversalInputConfig, + com.google.cloud.visionai.v1.UniversalInputConfig.Builder, + com.google.cloud.visionai.v1.UniversalInputConfigOrBuilder>( + (com.google.cloud.visionai.v1.UniversalInputConfig) processorConfig_, + getParentForChildren(), + isClean()); + processorConfig_ = null; + } + processorConfigCase_ = 28; + onChanged(); + return universalInputConfigBuilder_; + } + + private com.google.protobuf.Struct experimentalConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Struct, + com.google.protobuf.Struct.Builder, + com.google.protobuf.StructOrBuilder> + experimentalConfigBuilder_; + /** + * + * + *
+     * Experimental configurations. Structured object containing not-yet-stable
+     * processor parameters.
+     * 
+ * + * .google.protobuf.Struct experimental_config = 26; + * + * @return Whether the experimentalConfig field is set. + */ + public boolean hasExperimentalConfig() { + return ((bitField0_ & 0x00010000) != 0); + } + /** + * + * + *
+     * Experimental configurations. Structured object containing not-yet-stable
+     * processor parameters.
+     * 
+ * + * .google.protobuf.Struct experimental_config = 26; + * + * @return The experimentalConfig. + */ + public com.google.protobuf.Struct getExperimentalConfig() { + if (experimentalConfigBuilder_ == null) { + return experimentalConfig_ == null + ? com.google.protobuf.Struct.getDefaultInstance() + : experimentalConfig_; + } else { + return experimentalConfigBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Experimental configurations. Structured object containing not-yet-stable
+     * processor parameters.
+     * 
+ * + * .google.protobuf.Struct experimental_config = 26; + */ + public Builder setExperimentalConfig(com.google.protobuf.Struct value) { + if (experimentalConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + experimentalConfig_ = value; + } else { + experimentalConfigBuilder_.setMessage(value); + } + bitField0_ |= 0x00010000; + onChanged(); + return this; + } + /** + * + * + *
+     * Experimental configurations. Structured object containing not-yet-stable
+     * processor parameters.
+     * 
+ * + * .google.protobuf.Struct experimental_config = 26; + */ + public Builder setExperimentalConfig(com.google.protobuf.Struct.Builder builderForValue) { + if (experimentalConfigBuilder_ == null) { + experimentalConfig_ = builderForValue.build(); + } else { + experimentalConfigBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00010000; + onChanged(); + return this; + } + /** + * + * + *
+     * Experimental configurations. Structured object containing not-yet-stable
+     * processor parameters.
+     * 
+ * + * .google.protobuf.Struct experimental_config = 26; + */ + public Builder mergeExperimentalConfig(com.google.protobuf.Struct value) { + if (experimentalConfigBuilder_ == null) { + if (((bitField0_ & 0x00010000) != 0) + && experimentalConfig_ != null + && experimentalConfig_ != com.google.protobuf.Struct.getDefaultInstance()) { + getExperimentalConfigBuilder().mergeFrom(value); + } else { + experimentalConfig_ = value; + } + } else { + experimentalConfigBuilder_.mergeFrom(value); + } + if (experimentalConfig_ != null) { + bitField0_ |= 0x00010000; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Experimental configurations. Structured object containing not-yet-stable
+     * processor parameters.
+     * 
+ * + * .google.protobuf.Struct experimental_config = 26; + */ + public Builder clearExperimentalConfig() { + bitField0_ = (bitField0_ & ~0x00010000); + experimentalConfig_ = null; + if (experimentalConfigBuilder_ != null) { + experimentalConfigBuilder_.dispose(); + experimentalConfigBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Experimental configurations. Structured object containing not-yet-stable
+     * processor parameters.
+     * 
+ * + * .google.protobuf.Struct experimental_config = 26; + */ + public com.google.protobuf.Struct.Builder getExperimentalConfigBuilder() { + bitField0_ |= 0x00010000; + onChanged(); + return getExperimentalConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Experimental configurations. Structured object containing not-yet-stable
+     * processor parameters.
+     * 
+ * + * .google.protobuf.Struct experimental_config = 26; + */ + public com.google.protobuf.StructOrBuilder getExperimentalConfigOrBuilder() { + if (experimentalConfigBuilder_ != null) { + return experimentalConfigBuilder_.getMessageOrBuilder(); + } else { + return experimentalConfig_ == null + ? com.google.protobuf.Struct.getDefaultInstance() + : experimentalConfig_; + } + } + /** + * + * + *
+     * Experimental configurations. Structured object containing not-yet-stable
+     * processor parameters.
+     * 
+ * + * .google.protobuf.Struct experimental_config = 26; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Struct, + com.google.protobuf.Struct.Builder, + com.google.protobuf.StructOrBuilder> + getExperimentalConfigFieldBuilder() { + if (experimentalConfigBuilder_ == null) { + experimentalConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Struct, + com.google.protobuf.Struct.Builder, + com.google.protobuf.StructOrBuilder>( + getExperimentalConfig(), getParentForChildren(), isClean()); + experimentalConfig_ = null; + } + return experimentalConfigBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.ProcessorConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.ProcessorConfig) + private static final com.google.cloud.visionai.v1.ProcessorConfig DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.ProcessorConfig(); + } + + public static com.google.cloud.visionai.v1.ProcessorConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ProcessorConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.ProcessorConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ProcessorConfigOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ProcessorConfigOrBuilder.java new file mode 100644 index 000000000000..38f70fbe0efa --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ProcessorConfigOrBuilder.java @@ -0,0 +1,661 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/platform.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface ProcessorConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.ProcessorConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Configs of stream input processor.
+   * 
+ * + * .google.cloud.visionai.v1.VideoStreamInputConfig video_stream_input_config = 9; + * + * @return Whether the videoStreamInputConfig field is set. + */ + boolean hasVideoStreamInputConfig(); + /** + * + * + *
+   * Configs of stream input processor.
+   * 
+ * + * .google.cloud.visionai.v1.VideoStreamInputConfig video_stream_input_config = 9; + * + * @return The videoStreamInputConfig. + */ + com.google.cloud.visionai.v1.VideoStreamInputConfig getVideoStreamInputConfig(); + /** + * + * + *
+   * Configs of stream input processor.
+   * 
+ * + * .google.cloud.visionai.v1.VideoStreamInputConfig video_stream_input_config = 9; + */ + com.google.cloud.visionai.v1.VideoStreamInputConfigOrBuilder getVideoStreamInputConfigOrBuilder(); + + /** + * + * + *
+   * Config of AI-enabled input devices.
+   * 
+ * + * + * .google.cloud.visionai.v1.AIEnabledDevicesInputConfig ai_enabled_devices_input_config = 20; + * + * + * @return Whether the aiEnabledDevicesInputConfig field is set. + */ + boolean hasAiEnabledDevicesInputConfig(); + /** + * + * + *
+   * Config of AI-enabled input devices.
+   * 
+ * + * + * .google.cloud.visionai.v1.AIEnabledDevicesInputConfig ai_enabled_devices_input_config = 20; + * + * + * @return The aiEnabledDevicesInputConfig. + */ + com.google.cloud.visionai.v1.AIEnabledDevicesInputConfig getAiEnabledDevicesInputConfig(); + /** + * + * + *
+   * Config of AI-enabled input devices.
+   * 
+ * + * + * .google.cloud.visionai.v1.AIEnabledDevicesInputConfig ai_enabled_devices_input_config = 20; + * + */ + com.google.cloud.visionai.v1.AIEnabledDevicesInputConfigOrBuilder + getAiEnabledDevicesInputConfigOrBuilder(); + + /** + * + * + *
+   * Configs of media warehouse processor.
+   * 
+ * + * .google.cloud.visionai.v1.MediaWarehouseConfig media_warehouse_config = 10; + * + * @return Whether the mediaWarehouseConfig field is set. + */ + boolean hasMediaWarehouseConfig(); + /** + * + * + *
+   * Configs of media warehouse processor.
+   * 
+ * + * .google.cloud.visionai.v1.MediaWarehouseConfig media_warehouse_config = 10; + * + * @return The mediaWarehouseConfig. + */ + com.google.cloud.visionai.v1.MediaWarehouseConfig getMediaWarehouseConfig(); + /** + * + * + *
+   * Configs of media warehouse processor.
+   * 
+ * + * .google.cloud.visionai.v1.MediaWarehouseConfig media_warehouse_config = 10; + */ + com.google.cloud.visionai.v1.MediaWarehouseConfigOrBuilder getMediaWarehouseConfigOrBuilder(); + + /** + * + * + *
+   * Configs of person blur processor.
+   * 
+ * + * .google.cloud.visionai.v1.PersonBlurConfig person_blur_config = 11; + * + * @return Whether the personBlurConfig field is set. + */ + boolean hasPersonBlurConfig(); + /** + * + * + *
+   * Configs of person blur processor.
+   * 
+ * + * .google.cloud.visionai.v1.PersonBlurConfig person_blur_config = 11; + * + * @return The personBlurConfig. + */ + com.google.cloud.visionai.v1.PersonBlurConfig getPersonBlurConfig(); + /** + * + * + *
+   * Configs of person blur processor.
+   * 
+ * + * .google.cloud.visionai.v1.PersonBlurConfig person_blur_config = 11; + */ + com.google.cloud.visionai.v1.PersonBlurConfigOrBuilder getPersonBlurConfigOrBuilder(); + + /** + * + * + *
+   * Configs of occupancy count processor.
+   * 
+ * + * .google.cloud.visionai.v1.OccupancyCountConfig occupancy_count_config = 12; + * + * @return Whether the occupancyCountConfig field is set. + */ + boolean hasOccupancyCountConfig(); + /** + * + * + *
+   * Configs of occupancy count processor.
+   * 
+ * + * .google.cloud.visionai.v1.OccupancyCountConfig occupancy_count_config = 12; + * + * @return The occupancyCountConfig. + */ + com.google.cloud.visionai.v1.OccupancyCountConfig getOccupancyCountConfig(); + /** + * + * + *
+   * Configs of occupancy count processor.
+   * 
+ * + * .google.cloud.visionai.v1.OccupancyCountConfig occupancy_count_config = 12; + */ + com.google.cloud.visionai.v1.OccupancyCountConfigOrBuilder getOccupancyCountConfigOrBuilder(); + + /** + * + * + *
+   * Configs of Person Vehicle Detection processor.
+   * 
+ * + * + * .google.cloud.visionai.v1.PersonVehicleDetectionConfig person_vehicle_detection_config = 15; + * + * + * @return Whether the personVehicleDetectionConfig field is set. + */ + boolean hasPersonVehicleDetectionConfig(); + /** + * + * + *
+   * Configs of Person Vehicle Detection processor.
+   * 
+ * + * + * .google.cloud.visionai.v1.PersonVehicleDetectionConfig person_vehicle_detection_config = 15; + * + * + * @return The personVehicleDetectionConfig. + */ + com.google.cloud.visionai.v1.PersonVehicleDetectionConfig getPersonVehicleDetectionConfig(); + /** + * + * + *
+   * Configs of Person Vehicle Detection processor.
+   * 
+ * + * + * .google.cloud.visionai.v1.PersonVehicleDetectionConfig person_vehicle_detection_config = 15; + * + */ + com.google.cloud.visionai.v1.PersonVehicleDetectionConfigOrBuilder + getPersonVehicleDetectionConfigOrBuilder(); + + /** + * + * + *
+   * Configs of Vertex AutoML vision processor.
+   * 
+ * + * .google.cloud.visionai.v1.VertexAutoMLVisionConfig vertex_automl_vision_config = 13; + * + * + * @return Whether the vertexAutomlVisionConfig field is set. + */ + boolean hasVertexAutomlVisionConfig(); + /** + * + * + *
+   * Configs of Vertex AutoML vision processor.
+   * 
+ * + * .google.cloud.visionai.v1.VertexAutoMLVisionConfig vertex_automl_vision_config = 13; + * + * + * @return The vertexAutomlVisionConfig. + */ + com.google.cloud.visionai.v1.VertexAutoMLVisionConfig getVertexAutomlVisionConfig(); + /** + * + * + *
+   * Configs of Vertex AutoML vision processor.
+   * 
+ * + * .google.cloud.visionai.v1.VertexAutoMLVisionConfig vertex_automl_vision_config = 13; + * + */ + com.google.cloud.visionai.v1.VertexAutoMLVisionConfigOrBuilder + getVertexAutomlVisionConfigOrBuilder(); + + /** + * + * + *
+   * Configs of Vertex AutoML video processor.
+   * 
+ * + * .google.cloud.visionai.v1.VertexAutoMLVideoConfig vertex_automl_video_config = 14; + * + * @return Whether the vertexAutomlVideoConfig field is set. + */ + boolean hasVertexAutomlVideoConfig(); + /** + * + * + *
+   * Configs of Vertex AutoML video processor.
+   * 
+ * + * .google.cloud.visionai.v1.VertexAutoMLVideoConfig vertex_automl_video_config = 14; + * + * @return The vertexAutomlVideoConfig. + */ + com.google.cloud.visionai.v1.VertexAutoMLVideoConfig getVertexAutomlVideoConfig(); + /** + * + * + *
+   * Configs of Vertex AutoML video processor.
+   * 
+ * + * .google.cloud.visionai.v1.VertexAutoMLVideoConfig vertex_automl_video_config = 14; + */ + com.google.cloud.visionai.v1.VertexAutoMLVideoConfigOrBuilder + getVertexAutomlVideoConfigOrBuilder(); + + /** + * + * + *
+   * Configs of Vertex Custom processor.
+   * 
+ * + * .google.cloud.visionai.v1.VertexCustomConfig vertex_custom_config = 17; + * + * @return Whether the vertexCustomConfig field is set. + */ + boolean hasVertexCustomConfig(); + /** + * + * + *
+   * Configs of Vertex Custom processor.
+   * 
+ * + * .google.cloud.visionai.v1.VertexCustomConfig vertex_custom_config = 17; + * + * @return The vertexCustomConfig. + */ + com.google.cloud.visionai.v1.VertexCustomConfig getVertexCustomConfig(); + /** + * + * + *
+   * Configs of Vertex Custom processor.
+   * 
+ * + * .google.cloud.visionai.v1.VertexCustomConfig vertex_custom_config = 17; + */ + com.google.cloud.visionai.v1.VertexCustomConfigOrBuilder getVertexCustomConfigOrBuilder(); + + /** + * + * + *
+   * Configs of General Object Detection processor.
+   * 
+ * + * + * .google.cloud.visionai.v1.GeneralObjectDetectionConfig general_object_detection_config = 18; + * + * + * @return Whether the generalObjectDetectionConfig field is set. + */ + boolean hasGeneralObjectDetectionConfig(); + /** + * + * + *
+   * Configs of General Object Detection processor.
+   * 
+ * + * + * .google.cloud.visionai.v1.GeneralObjectDetectionConfig general_object_detection_config = 18; + * + * + * @return The generalObjectDetectionConfig. + */ + com.google.cloud.visionai.v1.GeneralObjectDetectionConfig getGeneralObjectDetectionConfig(); + /** + * + * + *
+   * Configs of General Object Detection processor.
+   * 
+ * + * + * .google.cloud.visionai.v1.GeneralObjectDetectionConfig general_object_detection_config = 18; + * + */ + com.google.cloud.visionai.v1.GeneralObjectDetectionConfigOrBuilder + getGeneralObjectDetectionConfigOrBuilder(); + + /** + * + * + *
+   * Configs of BigQuery processor.
+   * 
+ * + * .google.cloud.visionai.v1.BigQueryConfig big_query_config = 19; + * + * @return Whether the bigQueryConfig field is set. + */ + boolean hasBigQueryConfig(); + /** + * + * + *
+   * Configs of BigQuery processor.
+   * 
+ * + * .google.cloud.visionai.v1.BigQueryConfig big_query_config = 19; + * + * @return The bigQueryConfig. + */ + com.google.cloud.visionai.v1.BigQueryConfig getBigQueryConfig(); + /** + * + * + *
+   * Configs of BigQuery processor.
+   * 
+ * + * .google.cloud.visionai.v1.BigQueryConfig big_query_config = 19; + */ + com.google.cloud.visionai.v1.BigQueryConfigOrBuilder getBigQueryConfigOrBuilder(); + + /** + * + * + *
+   * Configs of Cloud Storage output processor.
+   * 
+ * + * .google.cloud.visionai.v1.GcsOutputConfig gcs_output_config = 27; + * + * @return Whether the gcsOutputConfig field is set. + */ + boolean hasGcsOutputConfig(); + /** + * + * + *
+   * Configs of Cloud Storage output processor.
+   * 
+ * + * .google.cloud.visionai.v1.GcsOutputConfig gcs_output_config = 27; + * + * @return The gcsOutputConfig. + */ + com.google.cloud.visionai.v1.GcsOutputConfig getGcsOutputConfig(); + /** + * + * + *
+   * Configs of Cloud Storage output processor.
+   * 
+ * + * .google.cloud.visionai.v1.GcsOutputConfig gcs_output_config = 27; + */ + com.google.cloud.visionai.v1.GcsOutputConfigOrBuilder getGcsOutputConfigOrBuilder(); + + /** + * + * + *
+   * Runtime configs of Product Recognizer processor.
+   * 
+ * + * .google.cloud.visionai.v1.ProductRecognizerConfig product_recognizer_config = 21; + * + * @return Whether the productRecognizerConfig field is set. + */ + boolean hasProductRecognizerConfig(); + /** + * + * + *
+   * Runtime configs of Product Recognizer processor.
+   * 
+ * + * .google.cloud.visionai.v1.ProductRecognizerConfig product_recognizer_config = 21; + * + * @return The productRecognizerConfig. + */ + com.google.cloud.visionai.v1.ProductRecognizerConfig getProductRecognizerConfig(); + /** + * + * + *
+   * Runtime configs of Product Recognizer processor.
+   * 
+ * + * .google.cloud.visionai.v1.ProductRecognizerConfig product_recognizer_config = 21; + */ + com.google.cloud.visionai.v1.ProductRecognizerConfigOrBuilder + getProductRecognizerConfigOrBuilder(); + + /** + * + * + *
+   * Configs of personal_protective_equipment_detection_config
+   * 
+ * + * + * .google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionConfig personal_protective_equipment_detection_config = 22; + * + * + * @return Whether the personalProtectiveEquipmentDetectionConfig field is set. + */ + boolean hasPersonalProtectiveEquipmentDetectionConfig(); + /** + * + * + *
+   * Configs of personal_protective_equipment_detection_config
+   * 
+ * + * + * .google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionConfig personal_protective_equipment_detection_config = 22; + * + * + * @return The personalProtectiveEquipmentDetectionConfig. + */ + com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionConfig + getPersonalProtectiveEquipmentDetectionConfig(); + /** + * + * + *
+   * Configs of personal_protective_equipment_detection_config
+   * 
+ * + * + * .google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionConfig personal_protective_equipment_detection_config = 22; + * + */ + com.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionConfigOrBuilder + getPersonalProtectiveEquipmentDetectionConfigOrBuilder(); + + /** + * + * + *
+   * Runtime configs of Tag Recognizer processor.
+   * 
+ * + * .google.cloud.visionai.v1.TagRecognizerConfig tag_recognizer_config = 25; + * + * @return Whether the tagRecognizerConfig field is set. + */ + boolean hasTagRecognizerConfig(); + /** + * + * + *
+   * Runtime configs of Tag Recognizer processor.
+   * 
+ * + * .google.cloud.visionai.v1.TagRecognizerConfig tag_recognizer_config = 25; + * + * @return The tagRecognizerConfig. + */ + com.google.cloud.visionai.v1.TagRecognizerConfig getTagRecognizerConfig(); + /** + * + * + *
+   * Runtime configs of Tag Recognizer processor.
+   * 
+ * + * .google.cloud.visionai.v1.TagRecognizerConfig tag_recognizer_config = 25; + */ + com.google.cloud.visionai.v1.TagRecognizerConfigOrBuilder getTagRecognizerConfigOrBuilder(); + + /** + * + * + *
+   * Runtime configs of UniversalInput processor.
+   * 
+ * + * .google.cloud.visionai.v1.UniversalInputConfig universal_input_config = 28; + * + * @return Whether the universalInputConfig field is set. + */ + boolean hasUniversalInputConfig(); + /** + * + * + *
+   * Runtime configs of UniversalInput processor.
+   * 
+ * + * .google.cloud.visionai.v1.UniversalInputConfig universal_input_config = 28; + * + * @return The universalInputConfig. + */ + com.google.cloud.visionai.v1.UniversalInputConfig getUniversalInputConfig(); + /** + * + * + *
+   * Runtime configs of UniversalInput processor.
+   * 
+ * + * .google.cloud.visionai.v1.UniversalInputConfig universal_input_config = 28; + */ + com.google.cloud.visionai.v1.UniversalInputConfigOrBuilder getUniversalInputConfigOrBuilder(); + + /** + * + * + *
+   * Experimental configurations. Structured object containing not-yet-stable
+   * processor parameters.
+   * 
+ * + * .google.protobuf.Struct experimental_config = 26; + * + * @return Whether the experimentalConfig field is set. + */ + boolean hasExperimentalConfig(); + /** + * + * + *
+   * Experimental configurations. Structured object containing not-yet-stable
+   * processor parameters.
+   * 
+ * + * .google.protobuf.Struct experimental_config = 26; + * + * @return The experimentalConfig. + */ + com.google.protobuf.Struct getExperimentalConfig(); + /** + * + * + *
+   * Experimental configurations. Structured object containing not-yet-stable
+   * processor parameters.
+   * 
+ * + * .google.protobuf.Struct experimental_config = 26; + */ + com.google.protobuf.StructOrBuilder getExperimentalConfigOrBuilder(); + + com.google.cloud.visionai.v1.ProcessorConfig.ProcessorConfigCase getProcessorConfigCase(); +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ProcessorIOSpec.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ProcessorIOSpec.java new file mode 100644 index 000000000000..53ac9fdca518 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ProcessorIOSpec.java @@ -0,0 +1,7597 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/platform.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * Message describing the input / output specifications of a processor.
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.ProcessorIOSpec} + */ +public final class ProcessorIOSpec extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.ProcessorIOSpec) + ProcessorIOSpecOrBuilder { + private static final long serialVersionUID = 0L; + // Use ProcessorIOSpec.newBuilder() to construct. + private ProcessorIOSpec(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ProcessorIOSpec() { + graphInputChannelSpecs_ = java.util.Collections.emptyList(); + graphOutputChannelSpecs_ = java.util.Collections.emptyList(); + instanceResourceInputBindingSpecs_ = java.util.Collections.emptyList(); + instanceResourceOutputBindingSpecs_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ProcessorIOSpec(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_ProcessorIOSpec_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_ProcessorIOSpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.ProcessorIOSpec.class, + com.google.cloud.visionai.v1.ProcessorIOSpec.Builder.class); + } + + public interface GraphInputChannelSpecOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.ProcessorIOSpec.GraphInputChannelSpec) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * The name of the current input channel.
+     * 
+ * + * string name = 1; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+     * The name of the current input channel.
+     * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+     * The data types of the current input channel.
+     * When this field has more than 1 value, it means this input channel can be
+     * connected to either of these different data types.
+     * 
+ * + * .google.cloud.visionai.v1.DataType data_type = 2; + * + * @return The enum numeric value on the wire for dataType. + */ + int getDataTypeValue(); + /** + * + * + *
+     * The data types of the current input channel.
+     * When this field has more than 1 value, it means this input channel can be
+     * connected to either of these different data types.
+     * 
+ * + * .google.cloud.visionai.v1.DataType data_type = 2; + * + * @return The dataType. + */ + com.google.cloud.visionai.v1.DataType getDataType(); + + /** + * + * + *
+     * If specified, only those detailed data types can be connected to the
+     * processor. For example, jpeg stream for MEDIA, or PredictionResult proto
+     * for PROTO type. If unspecified, then any proto is accepted.
+     * 
+ * + * repeated string accepted_data_type_uris = 5; + * + * @return A list containing the acceptedDataTypeUris. + */ + java.util.List getAcceptedDataTypeUrisList(); + /** + * + * + *
+     * If specified, only those detailed data types can be connected to the
+     * processor. For example, jpeg stream for MEDIA, or PredictionResult proto
+     * for PROTO type. If unspecified, then any proto is accepted.
+     * 
+ * + * repeated string accepted_data_type_uris = 5; + * + * @return The count of acceptedDataTypeUris. + */ + int getAcceptedDataTypeUrisCount(); + /** + * + * + *
+     * If specified, only those detailed data types can be connected to the
+     * processor. For example, jpeg stream for MEDIA, or PredictionResult proto
+     * for PROTO type. If unspecified, then any proto is accepted.
+     * 
+ * + * repeated string accepted_data_type_uris = 5; + * + * @param index The index of the element to return. + * @return The acceptedDataTypeUris at the given index. + */ + java.lang.String getAcceptedDataTypeUris(int index); + /** + * + * + *
+     * If specified, only those detailed data types can be connected to the
+     * processor. For example, jpeg stream for MEDIA, or PredictionResult proto
+     * for PROTO type. If unspecified, then any proto is accepted.
+     * 
+ * + * repeated string accepted_data_type_uris = 5; + * + * @param index The index of the value to return. + * @return The bytes of the acceptedDataTypeUris at the given index. + */ + com.google.protobuf.ByteString getAcceptedDataTypeUrisBytes(int index); + + /** + * + * + *
+     * Whether the current input channel is required by the processor.
+     * For example, for a processor with required video input and optional audio
+     * input, if video input is missing, the application will be rejected while
+     * the audio input can be missing as long as the video input exists.
+     * 
+ * + * bool required = 3; + * + * @return The required. + */ + boolean getRequired(); + + /** + * + * + *
+     * How many input edges can be connected to this input channel. 0 means
+     * unlimited.
+     * 
+ * + * int64 max_connection_allowed = 4; + * + * @return The maxConnectionAllowed. + */ + long getMaxConnectionAllowed(); + } + /** + * + * + *
+   * Message for input channel specification.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.ProcessorIOSpec.GraphInputChannelSpec} + */ + public static final class GraphInputChannelSpec extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.ProcessorIOSpec.GraphInputChannelSpec) + GraphInputChannelSpecOrBuilder { + private static final long serialVersionUID = 0L; + // Use GraphInputChannelSpec.newBuilder() to construct. + private GraphInputChannelSpec(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GraphInputChannelSpec() { + name_ = ""; + dataType_ = 0; + acceptedDataTypeUris_ = com.google.protobuf.LazyStringArrayList.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GraphInputChannelSpec(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_ProcessorIOSpec_GraphInputChannelSpec_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_ProcessorIOSpec_GraphInputChannelSpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.ProcessorIOSpec.GraphInputChannelSpec.class, + com.google.cloud.visionai.v1.ProcessorIOSpec.GraphInputChannelSpec.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+     * The name of the current input channel.
+     * 
+ * + * string name = 1; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + 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(); + name_ = s; + return s; + } + } + /** + * + * + *
+     * The name of the current input channel.
+     * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DATA_TYPE_FIELD_NUMBER = 2; + private int dataType_ = 0; + /** + * + * + *
+     * The data types of the current input channel.
+     * When this field has more than 1 value, it means this input channel can be
+     * connected to either of these different data types.
+     * 
+ * + * .google.cloud.visionai.v1.DataType data_type = 2; + * + * @return The enum numeric value on the wire for dataType. + */ + @java.lang.Override + public int getDataTypeValue() { + return dataType_; + } + /** + * + * + *
+     * The data types of the current input channel.
+     * When this field has more than 1 value, it means this input channel can be
+     * connected to either of these different data types.
+     * 
+ * + * .google.cloud.visionai.v1.DataType data_type = 2; + * + * @return The dataType. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.DataType getDataType() { + com.google.cloud.visionai.v1.DataType result = + com.google.cloud.visionai.v1.DataType.forNumber(dataType_); + return result == null ? com.google.cloud.visionai.v1.DataType.UNRECOGNIZED : result; + } + + public static final int ACCEPTED_DATA_TYPE_URIS_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList acceptedDataTypeUris_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + * + * + *
+     * If specified, only those detailed data types can be connected to the
+     * processor. For example, jpeg stream for MEDIA, or PredictionResult proto
+     * for PROTO type. If unspecified, then any proto is accepted.
+     * 
+ * + * repeated string accepted_data_type_uris = 5; + * + * @return A list containing the acceptedDataTypeUris. + */ + public com.google.protobuf.ProtocolStringList getAcceptedDataTypeUrisList() { + return acceptedDataTypeUris_; + } + /** + * + * + *
+     * If specified, only those detailed data types can be connected to the
+     * processor. For example, jpeg stream for MEDIA, or PredictionResult proto
+     * for PROTO type. If unspecified, then any proto is accepted.
+     * 
+ * + * repeated string accepted_data_type_uris = 5; + * + * @return The count of acceptedDataTypeUris. + */ + public int getAcceptedDataTypeUrisCount() { + return acceptedDataTypeUris_.size(); + } + /** + * + * + *
+     * If specified, only those detailed data types can be connected to the
+     * processor. For example, jpeg stream for MEDIA, or PredictionResult proto
+     * for PROTO type. If unspecified, then any proto is accepted.
+     * 
+ * + * repeated string accepted_data_type_uris = 5; + * + * @param index The index of the element to return. + * @return The acceptedDataTypeUris at the given index. + */ + public java.lang.String getAcceptedDataTypeUris(int index) { + return acceptedDataTypeUris_.get(index); + } + /** + * + * + *
+     * If specified, only those detailed data types can be connected to the
+     * processor. For example, jpeg stream for MEDIA, or PredictionResult proto
+     * for PROTO type. If unspecified, then any proto is accepted.
+     * 
+ * + * repeated string accepted_data_type_uris = 5; + * + * @param index The index of the value to return. + * @return The bytes of the acceptedDataTypeUris at the given index. + */ + public com.google.protobuf.ByteString getAcceptedDataTypeUrisBytes(int index) { + return acceptedDataTypeUris_.getByteString(index); + } + + public static final int REQUIRED_FIELD_NUMBER = 3; + private boolean required_ = false; + /** + * + * + *
+     * Whether the current input channel is required by the processor.
+     * For example, for a processor with required video input and optional audio
+     * input, if video input is missing, the application will be rejected while
+     * the audio input can be missing as long as the video input exists.
+     * 
+ * + * bool required = 3; + * + * @return The required. + */ + @java.lang.Override + public boolean getRequired() { + return required_; + } + + public static final int MAX_CONNECTION_ALLOWED_FIELD_NUMBER = 4; + private long maxConnectionAllowed_ = 0L; + /** + * + * + *
+     * How many input edges can be connected to this input channel. 0 means
+     * unlimited.
+     * 
+ * + * int64 max_connection_allowed = 4; + * + * @return The maxConnectionAllowed. + */ + @java.lang.Override + public long getMaxConnectionAllowed() { + return maxConnectionAllowed_; + } + + 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (dataType_ != com.google.cloud.visionai.v1.DataType.DATA_TYPE_UNSPECIFIED.getNumber()) { + output.writeEnum(2, dataType_); + } + if (required_ != false) { + output.writeBool(3, required_); + } + if (maxConnectionAllowed_ != 0L) { + output.writeInt64(4, maxConnectionAllowed_); + } + for (int i = 0; i < acceptedDataTypeUris_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString( + output, 5, acceptedDataTypeUris_.getRaw(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (dataType_ != com.google.cloud.visionai.v1.DataType.DATA_TYPE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, dataType_); + } + if (required_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(3, required_); + } + if (maxConnectionAllowed_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(4, maxConnectionAllowed_); + } + { + int dataSize = 0; + for (int i = 0; i < acceptedDataTypeUris_.size(); i++) { + dataSize += computeStringSizeNoTag(acceptedDataTypeUris_.getRaw(i)); + } + size += dataSize; + size += 1 * getAcceptedDataTypeUrisList().size(); + } + size += getUnknownFields().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.visionai.v1.ProcessorIOSpec.GraphInputChannelSpec)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.ProcessorIOSpec.GraphInputChannelSpec other = + (com.google.cloud.visionai.v1.ProcessorIOSpec.GraphInputChannelSpec) obj; + + if (!getName().equals(other.getName())) return false; + if (dataType_ != other.dataType_) return false; + if (!getAcceptedDataTypeUrisList().equals(other.getAcceptedDataTypeUrisList())) return false; + if (getRequired() != other.getRequired()) return false; + if (getMaxConnectionAllowed() != other.getMaxConnectionAllowed()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + DATA_TYPE_FIELD_NUMBER; + hash = (53 * hash) + dataType_; + if (getAcceptedDataTypeUrisCount() > 0) { + hash = (37 * hash) + ACCEPTED_DATA_TYPE_URIS_FIELD_NUMBER; + hash = (53 * hash) + getAcceptedDataTypeUrisList().hashCode(); + } + hash = (37 * hash) + REQUIRED_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getRequired()); + hash = (37 * hash) + MAX_CONNECTION_ALLOWED_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getMaxConnectionAllowed()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.ProcessorIOSpec.GraphInputChannelSpec parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ProcessorIOSpec.GraphInputChannelSpec 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.visionai.v1.ProcessorIOSpec.GraphInputChannelSpec parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ProcessorIOSpec.GraphInputChannelSpec 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.visionai.v1.ProcessorIOSpec.GraphInputChannelSpec parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ProcessorIOSpec.GraphInputChannelSpec parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.ProcessorIOSpec.GraphInputChannelSpec parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ProcessorIOSpec.GraphInputChannelSpec 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.visionai.v1.ProcessorIOSpec.GraphInputChannelSpec + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ProcessorIOSpec.GraphInputChannelSpec + 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.visionai.v1.ProcessorIOSpec.GraphInputChannelSpec parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ProcessorIOSpec.GraphInputChannelSpec 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.visionai.v1.ProcessorIOSpec.GraphInputChannelSpec 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; + } + /** + * + * + *
+     * Message for input channel specification.
+     * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.ProcessorIOSpec.GraphInputChannelSpec} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.ProcessorIOSpec.GraphInputChannelSpec) + com.google.cloud.visionai.v1.ProcessorIOSpec.GraphInputChannelSpecOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_ProcessorIOSpec_GraphInputChannelSpec_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_ProcessorIOSpec_GraphInputChannelSpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.ProcessorIOSpec.GraphInputChannelSpec.class, + com.google.cloud.visionai.v1.ProcessorIOSpec.GraphInputChannelSpec.Builder.class); + } + + // Construct using + // com.google.cloud.visionai.v1.ProcessorIOSpec.GraphInputChannelSpec.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + dataType_ = 0; + acceptedDataTypeUris_ = com.google.protobuf.LazyStringArrayList.emptyList(); + required_ = false; + maxConnectionAllowed_ = 0L; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_ProcessorIOSpec_GraphInputChannelSpec_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ProcessorIOSpec.GraphInputChannelSpec + getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.ProcessorIOSpec.GraphInputChannelSpec + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ProcessorIOSpec.GraphInputChannelSpec build() { + com.google.cloud.visionai.v1.ProcessorIOSpec.GraphInputChannelSpec result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ProcessorIOSpec.GraphInputChannelSpec buildPartial() { + com.google.cloud.visionai.v1.ProcessorIOSpec.GraphInputChannelSpec result = + new com.google.cloud.visionai.v1.ProcessorIOSpec.GraphInputChannelSpec(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.visionai.v1.ProcessorIOSpec.GraphInputChannelSpec result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.dataType_ = dataType_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + acceptedDataTypeUris_.makeImmutable(); + result.acceptedDataTypeUris_ = acceptedDataTypeUris_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.required_ = required_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.maxConnectionAllowed_ = maxConnectionAllowed_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.ProcessorIOSpec.GraphInputChannelSpec) { + return mergeFrom( + (com.google.cloud.visionai.v1.ProcessorIOSpec.GraphInputChannelSpec) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.visionai.v1.ProcessorIOSpec.GraphInputChannelSpec other) { + if (other + == com.google.cloud.visionai.v1.ProcessorIOSpec.GraphInputChannelSpec + .getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.dataType_ != 0) { + setDataTypeValue(other.getDataTypeValue()); + } + if (!other.acceptedDataTypeUris_.isEmpty()) { + if (acceptedDataTypeUris_.isEmpty()) { + acceptedDataTypeUris_ = other.acceptedDataTypeUris_; + bitField0_ |= 0x00000004; + } else { + ensureAcceptedDataTypeUrisIsMutable(); + acceptedDataTypeUris_.addAll(other.acceptedDataTypeUris_); + } + onChanged(); + } + if (other.getRequired() != false) { + setRequired(other.getRequired()); + } + if (other.getMaxConnectionAllowed() != 0L) { + setMaxConnectionAllowed(other.getMaxConnectionAllowed()); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + dataType_ = input.readEnum(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 24: + { + required_ = input.readBool(); + bitField0_ |= 0x00000008; + break; + } // case 24 + case 32: + { + maxConnectionAllowed_ = input.readInt64(); + bitField0_ |= 0x00000010; + break; + } // case 32 + case 42: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureAcceptedDataTypeUrisIsMutable(); + acceptedDataTypeUris_.add(s); + break; + } // case 42 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+       * The name of the current input channel.
+       * 
+ * + * string name = 1; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * The name of the current input channel.
+       * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * The name of the current input channel.
+       * 
+ * + * string name = 1; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * The name of the current input channel.
+       * 
+ * + * string name = 1; + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+       * The name of the current input channel.
+       * 
+ * + * string name = 1; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private int dataType_ = 0; + /** + * + * + *
+       * The data types of the current input channel.
+       * When this field has more than 1 value, it means this input channel can be
+       * connected to either of these different data types.
+       * 
+ * + * .google.cloud.visionai.v1.DataType data_type = 2; + * + * @return The enum numeric value on the wire for dataType. + */ + @java.lang.Override + public int getDataTypeValue() { + return dataType_; + } + /** + * + * + *
+       * The data types of the current input channel.
+       * When this field has more than 1 value, it means this input channel can be
+       * connected to either of these different data types.
+       * 
+ * + * .google.cloud.visionai.v1.DataType data_type = 2; + * + * @param value The enum numeric value on the wire for dataType to set. + * @return This builder for chaining. + */ + public Builder setDataTypeValue(int value) { + dataType_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * The data types of the current input channel.
+       * When this field has more than 1 value, it means this input channel can be
+       * connected to either of these different data types.
+       * 
+ * + * .google.cloud.visionai.v1.DataType data_type = 2; + * + * @return The dataType. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.DataType getDataType() { + com.google.cloud.visionai.v1.DataType result = + com.google.cloud.visionai.v1.DataType.forNumber(dataType_); + return result == null ? com.google.cloud.visionai.v1.DataType.UNRECOGNIZED : result; + } + /** + * + * + *
+       * The data types of the current input channel.
+       * When this field has more than 1 value, it means this input channel can be
+       * connected to either of these different data types.
+       * 
+ * + * .google.cloud.visionai.v1.DataType data_type = 2; + * + * @param value The dataType to set. + * @return This builder for chaining. + */ + public Builder setDataType(com.google.cloud.visionai.v1.DataType value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + dataType_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+       * The data types of the current input channel.
+       * When this field has more than 1 value, it means this input channel can be
+       * connected to either of these different data types.
+       * 
+ * + * .google.cloud.visionai.v1.DataType data_type = 2; + * + * @return This builder for chaining. + */ + public Builder clearDataType() { + bitField0_ = (bitField0_ & ~0x00000002); + dataType_ = 0; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList acceptedDataTypeUris_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureAcceptedDataTypeUrisIsMutable() { + if (!acceptedDataTypeUris_.isModifiable()) { + acceptedDataTypeUris_ = + new com.google.protobuf.LazyStringArrayList(acceptedDataTypeUris_); + } + bitField0_ |= 0x00000004; + } + /** + * + * + *
+       * If specified, only those detailed data types can be connected to the
+       * processor. For example, jpeg stream for MEDIA, or PredictionResult proto
+       * for PROTO type. If unspecified, then any proto is accepted.
+       * 
+ * + * repeated string accepted_data_type_uris = 5; + * + * @return A list containing the acceptedDataTypeUris. + */ + public com.google.protobuf.ProtocolStringList getAcceptedDataTypeUrisList() { + acceptedDataTypeUris_.makeImmutable(); + return acceptedDataTypeUris_; + } + /** + * + * + *
+       * If specified, only those detailed data types can be connected to the
+       * processor. For example, jpeg stream for MEDIA, or PredictionResult proto
+       * for PROTO type. If unspecified, then any proto is accepted.
+       * 
+ * + * repeated string accepted_data_type_uris = 5; + * + * @return The count of acceptedDataTypeUris. + */ + public int getAcceptedDataTypeUrisCount() { + return acceptedDataTypeUris_.size(); + } + /** + * + * + *
+       * If specified, only those detailed data types can be connected to the
+       * processor. For example, jpeg stream for MEDIA, or PredictionResult proto
+       * for PROTO type. If unspecified, then any proto is accepted.
+       * 
+ * + * repeated string accepted_data_type_uris = 5; + * + * @param index The index of the element to return. + * @return The acceptedDataTypeUris at the given index. + */ + public java.lang.String getAcceptedDataTypeUris(int index) { + return acceptedDataTypeUris_.get(index); + } + /** + * + * + *
+       * If specified, only those detailed data types can be connected to the
+       * processor. For example, jpeg stream for MEDIA, or PredictionResult proto
+       * for PROTO type. If unspecified, then any proto is accepted.
+       * 
+ * + * repeated string accepted_data_type_uris = 5; + * + * @param index The index of the value to return. + * @return The bytes of the acceptedDataTypeUris at the given index. + */ + public com.google.protobuf.ByteString getAcceptedDataTypeUrisBytes(int index) { + return acceptedDataTypeUris_.getByteString(index); + } + /** + * + * + *
+       * If specified, only those detailed data types can be connected to the
+       * processor. For example, jpeg stream for MEDIA, or PredictionResult proto
+       * for PROTO type. If unspecified, then any proto is accepted.
+       * 
+ * + * repeated string accepted_data_type_uris = 5; + * + * @param index The index to set the value at. + * @param value The acceptedDataTypeUris to set. + * @return This builder for chaining. + */ + public Builder setAcceptedDataTypeUris(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureAcceptedDataTypeUrisIsMutable(); + acceptedDataTypeUris_.set(index, value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+       * If specified, only those detailed data types can be connected to the
+       * processor. For example, jpeg stream for MEDIA, or PredictionResult proto
+       * for PROTO type. If unspecified, then any proto is accepted.
+       * 
+ * + * repeated string accepted_data_type_uris = 5; + * + * @param value The acceptedDataTypeUris to add. + * @return This builder for chaining. + */ + public Builder addAcceptedDataTypeUris(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureAcceptedDataTypeUrisIsMutable(); + acceptedDataTypeUris_.add(value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+       * If specified, only those detailed data types can be connected to the
+       * processor. For example, jpeg stream for MEDIA, or PredictionResult proto
+       * for PROTO type. If unspecified, then any proto is accepted.
+       * 
+ * + * repeated string accepted_data_type_uris = 5; + * + * @param values The acceptedDataTypeUris to add. + * @return This builder for chaining. + */ + public Builder addAllAcceptedDataTypeUris(java.lang.Iterable values) { + ensureAcceptedDataTypeUrisIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, acceptedDataTypeUris_); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+       * If specified, only those detailed data types can be connected to the
+       * processor. For example, jpeg stream for MEDIA, or PredictionResult proto
+       * for PROTO type. If unspecified, then any proto is accepted.
+       * 
+ * + * repeated string accepted_data_type_uris = 5; + * + * @return This builder for chaining. + */ + public Builder clearAcceptedDataTypeUris() { + acceptedDataTypeUris_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + ; + onChanged(); + return this; + } + /** + * + * + *
+       * If specified, only those detailed data types can be connected to the
+       * processor. For example, jpeg stream for MEDIA, or PredictionResult proto
+       * for PROTO type. If unspecified, then any proto is accepted.
+       * 
+ * + * repeated string accepted_data_type_uris = 5; + * + * @param value The bytes of the acceptedDataTypeUris to add. + * @return This builder for chaining. + */ + public Builder addAcceptedDataTypeUrisBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureAcceptedDataTypeUrisIsMutable(); + acceptedDataTypeUris_.add(value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private boolean required_; + /** + * + * + *
+       * Whether the current input channel is required by the processor.
+       * For example, for a processor with required video input and optional audio
+       * input, if video input is missing, the application will be rejected while
+       * the audio input can be missing as long as the video input exists.
+       * 
+ * + * bool required = 3; + * + * @return The required. + */ + @java.lang.Override + public boolean getRequired() { + return required_; + } + /** + * + * + *
+       * Whether the current input channel is required by the processor.
+       * For example, for a processor with required video input and optional audio
+       * input, if video input is missing, the application will be rejected while
+       * the audio input can be missing as long as the video input exists.
+       * 
+ * + * bool required = 3; + * + * @param value The required to set. + * @return This builder for chaining. + */ + public Builder setRequired(boolean value) { + + required_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+       * Whether the current input channel is required by the processor.
+       * For example, for a processor with required video input and optional audio
+       * input, if video input is missing, the application will be rejected while
+       * the audio input can be missing as long as the video input exists.
+       * 
+ * + * bool required = 3; + * + * @return This builder for chaining. + */ + public Builder clearRequired() { + bitField0_ = (bitField0_ & ~0x00000008); + required_ = false; + onChanged(); + return this; + } + + private long maxConnectionAllowed_; + /** + * + * + *
+       * How many input edges can be connected to this input channel. 0 means
+       * unlimited.
+       * 
+ * + * int64 max_connection_allowed = 4; + * + * @return The maxConnectionAllowed. + */ + @java.lang.Override + public long getMaxConnectionAllowed() { + return maxConnectionAllowed_; + } + /** + * + * + *
+       * How many input edges can be connected to this input channel. 0 means
+       * unlimited.
+       * 
+ * + * int64 max_connection_allowed = 4; + * + * @param value The maxConnectionAllowed to set. + * @return This builder for chaining. + */ + public Builder setMaxConnectionAllowed(long value) { + + maxConnectionAllowed_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+       * How many input edges can be connected to this input channel. 0 means
+       * unlimited.
+       * 
+ * + * int64 max_connection_allowed = 4; + * + * @return This builder for chaining. + */ + public Builder clearMaxConnectionAllowed() { + bitField0_ = (bitField0_ & ~0x00000010); + maxConnectionAllowed_ = 0L; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.ProcessorIOSpec.GraphInputChannelSpec) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.ProcessorIOSpec.GraphInputChannelSpec) + private static final com.google.cloud.visionai.v1.ProcessorIOSpec.GraphInputChannelSpec + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.ProcessorIOSpec.GraphInputChannelSpec(); + } + + public static com.google.cloud.visionai.v1.ProcessorIOSpec.GraphInputChannelSpec + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GraphInputChannelSpec parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.ProcessorIOSpec.GraphInputChannelSpec + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface GraphOutputChannelSpecOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.ProcessorIOSpec.GraphOutputChannelSpec) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * The name of the current output channel.
+     * 
+ * + * string name = 1; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+     * The name of the current output channel.
+     * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+     * The data type of the current output channel.
+     * 
+ * + * .google.cloud.visionai.v1.DataType data_type = 2; + * + * @return The enum numeric value on the wire for dataType. + */ + int getDataTypeValue(); + /** + * + * + *
+     * The data type of the current output channel.
+     * 
+ * + * .google.cloud.visionai.v1.DataType data_type = 2; + * + * @return The dataType. + */ + com.google.cloud.visionai.v1.DataType getDataType(); + + /** + * string data_type_uri = 3; + * + * @return The dataTypeUri. + */ + java.lang.String getDataTypeUri(); + /** + * string data_type_uri = 3; + * + * @return The bytes for dataTypeUri. + */ + com.google.protobuf.ByteString getDataTypeUriBytes(); + } + /** + * + * + *
+   * Message for output channel specification.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.ProcessorIOSpec.GraphOutputChannelSpec} + */ + public static final class GraphOutputChannelSpec extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.ProcessorIOSpec.GraphOutputChannelSpec) + GraphOutputChannelSpecOrBuilder { + private static final long serialVersionUID = 0L; + // Use GraphOutputChannelSpec.newBuilder() to construct. + private GraphOutputChannelSpec(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GraphOutputChannelSpec() { + name_ = ""; + dataType_ = 0; + dataTypeUri_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GraphOutputChannelSpec(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_ProcessorIOSpec_GraphOutputChannelSpec_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_ProcessorIOSpec_GraphOutputChannelSpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.ProcessorIOSpec.GraphOutputChannelSpec.class, + com.google.cloud.visionai.v1.ProcessorIOSpec.GraphOutputChannelSpec.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+     * The name of the current output channel.
+     * 
+ * + * string name = 1; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + 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(); + name_ = s; + return s; + } + } + /** + * + * + *
+     * The name of the current output channel.
+     * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DATA_TYPE_FIELD_NUMBER = 2; + private int dataType_ = 0; + /** + * + * + *
+     * The data type of the current output channel.
+     * 
+ * + * .google.cloud.visionai.v1.DataType data_type = 2; + * + * @return The enum numeric value on the wire for dataType. + */ + @java.lang.Override + public int getDataTypeValue() { + return dataType_; + } + /** + * + * + *
+     * The data type of the current output channel.
+     * 
+ * + * .google.cloud.visionai.v1.DataType data_type = 2; + * + * @return The dataType. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.DataType getDataType() { + com.google.cloud.visionai.v1.DataType result = + com.google.cloud.visionai.v1.DataType.forNumber(dataType_); + return result == null ? com.google.cloud.visionai.v1.DataType.UNRECOGNIZED : result; + } + + public static final int DATA_TYPE_URI_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object dataTypeUri_ = ""; + /** + * string data_type_uri = 3; + * + * @return The dataTypeUri. + */ + @java.lang.Override + public java.lang.String getDataTypeUri() { + java.lang.Object ref = dataTypeUri_; + 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(); + dataTypeUri_ = s; + return s; + } + } + /** + * string data_type_uri = 3; + * + * @return The bytes for dataTypeUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDataTypeUriBytes() { + java.lang.Object ref = dataTypeUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + dataTypeUri_ = 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (dataType_ != com.google.cloud.visionai.v1.DataType.DATA_TYPE_UNSPECIFIED.getNumber()) { + output.writeEnum(2, dataType_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(dataTypeUri_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, dataTypeUri_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (dataType_ != com.google.cloud.visionai.v1.DataType.DATA_TYPE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, dataType_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(dataTypeUri_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, dataTypeUri_); + } + size += getUnknownFields().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.visionai.v1.ProcessorIOSpec.GraphOutputChannelSpec)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.ProcessorIOSpec.GraphOutputChannelSpec other = + (com.google.cloud.visionai.v1.ProcessorIOSpec.GraphOutputChannelSpec) obj; + + if (!getName().equals(other.getName())) return false; + if (dataType_ != other.dataType_) return false; + if (!getDataTypeUri().equals(other.getDataTypeUri())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + DATA_TYPE_FIELD_NUMBER; + hash = (53 * hash) + dataType_; + hash = (37 * hash) + DATA_TYPE_URI_FIELD_NUMBER; + hash = (53 * hash) + getDataTypeUri().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.ProcessorIOSpec.GraphOutputChannelSpec parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ProcessorIOSpec.GraphOutputChannelSpec 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.visionai.v1.ProcessorIOSpec.GraphOutputChannelSpec parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ProcessorIOSpec.GraphOutputChannelSpec 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.visionai.v1.ProcessorIOSpec.GraphOutputChannelSpec parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ProcessorIOSpec.GraphOutputChannelSpec parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.ProcessorIOSpec.GraphOutputChannelSpec parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ProcessorIOSpec.GraphOutputChannelSpec 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.visionai.v1.ProcessorIOSpec.GraphOutputChannelSpec + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ProcessorIOSpec.GraphOutputChannelSpec + 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.visionai.v1.ProcessorIOSpec.GraphOutputChannelSpec parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ProcessorIOSpec.GraphOutputChannelSpec 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.visionai.v1.ProcessorIOSpec.GraphOutputChannelSpec 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; + } + /** + * + * + *
+     * Message for output channel specification.
+     * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.ProcessorIOSpec.GraphOutputChannelSpec} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.ProcessorIOSpec.GraphOutputChannelSpec) + com.google.cloud.visionai.v1.ProcessorIOSpec.GraphOutputChannelSpecOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_ProcessorIOSpec_GraphOutputChannelSpec_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_ProcessorIOSpec_GraphOutputChannelSpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.ProcessorIOSpec.GraphOutputChannelSpec.class, + com.google.cloud.visionai.v1.ProcessorIOSpec.GraphOutputChannelSpec.Builder.class); + } + + // Construct using + // com.google.cloud.visionai.v1.ProcessorIOSpec.GraphOutputChannelSpec.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + dataType_ = 0; + dataTypeUri_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_ProcessorIOSpec_GraphOutputChannelSpec_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ProcessorIOSpec.GraphOutputChannelSpec + getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.ProcessorIOSpec.GraphOutputChannelSpec + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ProcessorIOSpec.GraphOutputChannelSpec build() { + com.google.cloud.visionai.v1.ProcessorIOSpec.GraphOutputChannelSpec result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ProcessorIOSpec.GraphOutputChannelSpec buildPartial() { + com.google.cloud.visionai.v1.ProcessorIOSpec.GraphOutputChannelSpec result = + new com.google.cloud.visionai.v1.ProcessorIOSpec.GraphOutputChannelSpec(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.visionai.v1.ProcessorIOSpec.GraphOutputChannelSpec result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.dataType_ = dataType_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.dataTypeUri_ = dataTypeUri_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.ProcessorIOSpec.GraphOutputChannelSpec) { + return mergeFrom( + (com.google.cloud.visionai.v1.ProcessorIOSpec.GraphOutputChannelSpec) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.visionai.v1.ProcessorIOSpec.GraphOutputChannelSpec other) { + if (other + == com.google.cloud.visionai.v1.ProcessorIOSpec.GraphOutputChannelSpec + .getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.dataType_ != 0) { + setDataTypeValue(other.getDataTypeValue()); + } + if (!other.getDataTypeUri().isEmpty()) { + dataTypeUri_ = other.dataTypeUri_; + bitField0_ |= 0x00000004; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + dataType_ = input.readEnum(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: + { + dataTypeUri_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+       * The name of the current output channel.
+       * 
+ * + * string name = 1; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * The name of the current output channel.
+       * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * The name of the current output channel.
+       * 
+ * + * string name = 1; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * The name of the current output channel.
+       * 
+ * + * string name = 1; + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+       * The name of the current output channel.
+       * 
+ * + * string name = 1; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private int dataType_ = 0; + /** + * + * + *
+       * The data type of the current output channel.
+       * 
+ * + * .google.cloud.visionai.v1.DataType data_type = 2; + * + * @return The enum numeric value on the wire for dataType. + */ + @java.lang.Override + public int getDataTypeValue() { + return dataType_; + } + /** + * + * + *
+       * The data type of the current output channel.
+       * 
+ * + * .google.cloud.visionai.v1.DataType data_type = 2; + * + * @param value The enum numeric value on the wire for dataType to set. + * @return This builder for chaining. + */ + public Builder setDataTypeValue(int value) { + dataType_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * The data type of the current output channel.
+       * 
+ * + * .google.cloud.visionai.v1.DataType data_type = 2; + * + * @return The dataType. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.DataType getDataType() { + com.google.cloud.visionai.v1.DataType result = + com.google.cloud.visionai.v1.DataType.forNumber(dataType_); + return result == null ? com.google.cloud.visionai.v1.DataType.UNRECOGNIZED : result; + } + /** + * + * + *
+       * The data type of the current output channel.
+       * 
+ * + * .google.cloud.visionai.v1.DataType data_type = 2; + * + * @param value The dataType to set. + * @return This builder for chaining. + */ + public Builder setDataType(com.google.cloud.visionai.v1.DataType value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + dataType_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+       * The data type of the current output channel.
+       * 
+ * + * .google.cloud.visionai.v1.DataType data_type = 2; + * + * @return This builder for chaining. + */ + public Builder clearDataType() { + bitField0_ = (bitField0_ & ~0x00000002); + dataType_ = 0; + onChanged(); + return this; + } + + private java.lang.Object dataTypeUri_ = ""; + /** + * string data_type_uri = 3; + * + * @return The dataTypeUri. + */ + public java.lang.String getDataTypeUri() { + java.lang.Object ref = dataTypeUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + dataTypeUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string data_type_uri = 3; + * + * @return The bytes for dataTypeUri. + */ + public com.google.protobuf.ByteString getDataTypeUriBytes() { + java.lang.Object ref = dataTypeUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + dataTypeUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string data_type_uri = 3; + * + * @param value The dataTypeUri to set. + * @return This builder for chaining. + */ + public Builder setDataTypeUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + dataTypeUri_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * string data_type_uri = 3; + * + * @return This builder for chaining. + */ + public Builder clearDataTypeUri() { + dataTypeUri_ = getDefaultInstance().getDataTypeUri(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * string data_type_uri = 3; + * + * @param value The bytes for dataTypeUri to set. + * @return This builder for chaining. + */ + public Builder setDataTypeUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + dataTypeUri_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.ProcessorIOSpec.GraphOutputChannelSpec) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.ProcessorIOSpec.GraphOutputChannelSpec) + private static final com.google.cloud.visionai.v1.ProcessorIOSpec.GraphOutputChannelSpec + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.ProcessorIOSpec.GraphOutputChannelSpec(); + } + + public static com.google.cloud.visionai.v1.ProcessorIOSpec.GraphOutputChannelSpec + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GraphOutputChannelSpec parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.ProcessorIOSpec.GraphOutputChannelSpec + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface InstanceResourceInputBindingSpecOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.ProcessorIOSpec.InstanceResourceInputBindingSpec) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * The configuration proto that includes the Googleapis resources. I.e.
+     * type.googleapis.com/google.cloud.vision.v1.StreamWithAnnotation
+     * 
+ * + * string config_type_uri = 2; + * + * @return Whether the configTypeUri field is set. + */ + boolean hasConfigTypeUri(); + /** + * + * + *
+     * The configuration proto that includes the Googleapis resources. I.e.
+     * type.googleapis.com/google.cloud.vision.v1.StreamWithAnnotation
+     * 
+ * + * string config_type_uri = 2; + * + * @return The configTypeUri. + */ + java.lang.String getConfigTypeUri(); + /** + * + * + *
+     * The configuration proto that includes the Googleapis resources. I.e.
+     * type.googleapis.com/google.cloud.vision.v1.StreamWithAnnotation
+     * 
+ * + * string config_type_uri = 2; + * + * @return The bytes for configTypeUri. + */ + com.google.protobuf.ByteString getConfigTypeUriBytes(); + + /** + * + * + *
+     * The direct type url of Googleapis resource. i.e.
+     * type.googleapis.com/google.cloud.vision.v1.Asset
+     * 
+ * + * string resource_type_uri = 3; + * + * @return Whether the resourceTypeUri field is set. + */ + boolean hasResourceTypeUri(); + /** + * + * + *
+     * The direct type url of Googleapis resource. i.e.
+     * type.googleapis.com/google.cloud.vision.v1.Asset
+     * 
+ * + * string resource_type_uri = 3; + * + * @return The resourceTypeUri. + */ + java.lang.String getResourceTypeUri(); + /** + * + * + *
+     * The direct type url of Googleapis resource. i.e.
+     * type.googleapis.com/google.cloud.vision.v1.Asset
+     * 
+ * + * string resource_type_uri = 3; + * + * @return The bytes for resourceTypeUri. + */ + com.google.protobuf.ByteString getResourceTypeUriBytes(); + + /** + * + * + *
+     * Name of the input binding, unique within the processor.
+     * 
+ * + * string name = 1; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+     * Name of the input binding, unique within the processor.
+     * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + com.google.cloud.visionai.v1.ProcessorIOSpec.InstanceResourceInputBindingSpec.ResourceTypeCase + getResourceTypeCase(); + } + /** + * + * + *
+   * Message for instance resource channel specification.
+   * External resources are virtual nodes which are not expressed in the
+   * application graph. Each processor expresses its out-graph spec, so customer
+   * is able to override the external source or destinations to the
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.ProcessorIOSpec.InstanceResourceInputBindingSpec} + */ + public static final class InstanceResourceInputBindingSpec + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.ProcessorIOSpec.InstanceResourceInputBindingSpec) + InstanceResourceInputBindingSpecOrBuilder { + private static final long serialVersionUID = 0L; + // Use InstanceResourceInputBindingSpec.newBuilder() to construct. + private InstanceResourceInputBindingSpec( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private InstanceResourceInputBindingSpec() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new InstanceResourceInputBindingSpec(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_ProcessorIOSpec_InstanceResourceInputBindingSpec_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_ProcessorIOSpec_InstanceResourceInputBindingSpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.ProcessorIOSpec.InstanceResourceInputBindingSpec.class, + com.google.cloud.visionai.v1.ProcessorIOSpec.InstanceResourceInputBindingSpec.Builder + .class); + } + + private int resourceTypeCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object resourceType_; + + public enum ResourceTypeCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + CONFIG_TYPE_URI(2), + RESOURCE_TYPE_URI(3), + RESOURCETYPE_NOT_SET(0); + private final int value; + + private ResourceTypeCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static ResourceTypeCase valueOf(int value) { + return forNumber(value); + } + + public static ResourceTypeCase forNumber(int value) { + switch (value) { + case 2: + return CONFIG_TYPE_URI; + case 3: + return RESOURCE_TYPE_URI; + case 0: + return RESOURCETYPE_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public ResourceTypeCase getResourceTypeCase() { + return ResourceTypeCase.forNumber(resourceTypeCase_); + } + + public static final int CONFIG_TYPE_URI_FIELD_NUMBER = 2; + /** + * + * + *
+     * The configuration proto that includes the Googleapis resources. I.e.
+     * type.googleapis.com/google.cloud.vision.v1.StreamWithAnnotation
+     * 
+ * + * string config_type_uri = 2; + * + * @return Whether the configTypeUri field is set. + */ + public boolean hasConfigTypeUri() { + return resourceTypeCase_ == 2; + } + /** + * + * + *
+     * The configuration proto that includes the Googleapis resources. I.e.
+     * type.googleapis.com/google.cloud.vision.v1.StreamWithAnnotation
+     * 
+ * + * string config_type_uri = 2; + * + * @return The configTypeUri. + */ + public java.lang.String getConfigTypeUri() { + java.lang.Object ref = ""; + if (resourceTypeCase_ == 2) { + ref = resourceType_; + } + 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(); + if (resourceTypeCase_ == 2) { + resourceType_ = s; + } + return s; + } + } + /** + * + * + *
+     * The configuration proto that includes the Googleapis resources. I.e.
+     * type.googleapis.com/google.cloud.vision.v1.StreamWithAnnotation
+     * 
+ * + * string config_type_uri = 2; + * + * @return The bytes for configTypeUri. + */ + public com.google.protobuf.ByteString getConfigTypeUriBytes() { + java.lang.Object ref = ""; + if (resourceTypeCase_ == 2) { + ref = resourceType_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (resourceTypeCase_ == 2) { + resourceType_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int RESOURCE_TYPE_URI_FIELD_NUMBER = 3; + /** + * + * + *
+     * The direct type url of Googleapis resource. i.e.
+     * type.googleapis.com/google.cloud.vision.v1.Asset
+     * 
+ * + * string resource_type_uri = 3; + * + * @return Whether the resourceTypeUri field is set. + */ + public boolean hasResourceTypeUri() { + return resourceTypeCase_ == 3; + } + /** + * + * + *
+     * The direct type url of Googleapis resource. i.e.
+     * type.googleapis.com/google.cloud.vision.v1.Asset
+     * 
+ * + * string resource_type_uri = 3; + * + * @return The resourceTypeUri. + */ + public java.lang.String getResourceTypeUri() { + java.lang.Object ref = ""; + if (resourceTypeCase_ == 3) { + ref = resourceType_; + } + 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(); + if (resourceTypeCase_ == 3) { + resourceType_ = s; + } + return s; + } + } + /** + * + * + *
+     * The direct type url of Googleapis resource. i.e.
+     * type.googleapis.com/google.cloud.vision.v1.Asset
+     * 
+ * + * string resource_type_uri = 3; + * + * @return The bytes for resourceTypeUri. + */ + public com.google.protobuf.ByteString getResourceTypeUriBytes() { + java.lang.Object ref = ""; + if (resourceTypeCase_ == 3) { + ref = resourceType_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (resourceTypeCase_ == 3) { + resourceType_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+     * Name of the input binding, unique within the processor.
+     * 
+ * + * string name = 1; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + 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(); + name_ = s; + return s; + } + } + /** + * + * + *
+     * Name of the input binding, unique within the processor.
+     * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (resourceTypeCase_ == 2) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, resourceType_); + } + if (resourceTypeCase_ == 3) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, resourceType_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (resourceTypeCase_ == 2) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, resourceType_); + } + if (resourceTypeCase_ == 3) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, resourceType_); + } + size += getUnknownFields().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.visionai.v1.ProcessorIOSpec.InstanceResourceInputBindingSpec)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.ProcessorIOSpec.InstanceResourceInputBindingSpec other = + (com.google.cloud.visionai.v1.ProcessorIOSpec.InstanceResourceInputBindingSpec) obj; + + if (!getName().equals(other.getName())) return false; + if (!getResourceTypeCase().equals(other.getResourceTypeCase())) return false; + switch (resourceTypeCase_) { + case 2: + if (!getConfigTypeUri().equals(other.getConfigTypeUri())) return false; + break; + case 3: + if (!getResourceTypeUri().equals(other.getResourceTypeUri())) return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + switch (resourceTypeCase_) { + case 2: + hash = (37 * hash) + CONFIG_TYPE_URI_FIELD_NUMBER; + hash = (53 * hash) + getConfigTypeUri().hashCode(); + break; + case 3: + hash = (37 * hash) + RESOURCE_TYPE_URI_FIELD_NUMBER; + hash = (53 * hash) + getResourceTypeUri().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.ProcessorIOSpec.InstanceResourceInputBindingSpec + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ProcessorIOSpec.InstanceResourceInputBindingSpec + 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.visionai.v1.ProcessorIOSpec.InstanceResourceInputBindingSpec + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ProcessorIOSpec.InstanceResourceInputBindingSpec + 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.visionai.v1.ProcessorIOSpec.InstanceResourceInputBindingSpec + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ProcessorIOSpec.InstanceResourceInputBindingSpec + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.ProcessorIOSpec.InstanceResourceInputBindingSpec + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ProcessorIOSpec.InstanceResourceInputBindingSpec + 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.visionai.v1.ProcessorIOSpec.InstanceResourceInputBindingSpec + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ProcessorIOSpec.InstanceResourceInputBindingSpec + 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.visionai.v1.ProcessorIOSpec.InstanceResourceInputBindingSpec + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ProcessorIOSpec.InstanceResourceInputBindingSpec + 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.visionai.v1.ProcessorIOSpec.InstanceResourceInputBindingSpec 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; + } + /** + * + * + *
+     * Message for instance resource channel specification.
+     * External resources are virtual nodes which are not expressed in the
+     * application graph. Each processor expresses its out-graph spec, so customer
+     * is able to override the external source or destinations to the
+     * 
+ * + * Protobuf type {@code + * google.cloud.visionai.v1.ProcessorIOSpec.InstanceResourceInputBindingSpec} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.ProcessorIOSpec.InstanceResourceInputBindingSpec) + com.google.cloud.visionai.v1.ProcessorIOSpec.InstanceResourceInputBindingSpecOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_ProcessorIOSpec_InstanceResourceInputBindingSpec_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_ProcessorIOSpec_InstanceResourceInputBindingSpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.ProcessorIOSpec.InstanceResourceInputBindingSpec.class, + com.google.cloud.visionai.v1.ProcessorIOSpec.InstanceResourceInputBindingSpec + .Builder.class); + } + + // Construct using + // com.google.cloud.visionai.v1.ProcessorIOSpec.InstanceResourceInputBindingSpec.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + resourceTypeCase_ = 0; + resourceType_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_ProcessorIOSpec_InstanceResourceInputBindingSpec_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ProcessorIOSpec.InstanceResourceInputBindingSpec + getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.ProcessorIOSpec.InstanceResourceInputBindingSpec + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ProcessorIOSpec.InstanceResourceInputBindingSpec build() { + com.google.cloud.visionai.v1.ProcessorIOSpec.InstanceResourceInputBindingSpec result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ProcessorIOSpec.InstanceResourceInputBindingSpec + buildPartial() { + com.google.cloud.visionai.v1.ProcessorIOSpec.InstanceResourceInputBindingSpec result = + new com.google.cloud.visionai.v1.ProcessorIOSpec.InstanceResourceInputBindingSpec(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.visionai.v1.ProcessorIOSpec.InstanceResourceInputBindingSpec result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.name_ = name_; + } + } + + private void buildPartialOneofs( + com.google.cloud.visionai.v1.ProcessorIOSpec.InstanceResourceInputBindingSpec result) { + result.resourceTypeCase_ = resourceTypeCase_; + result.resourceType_ = this.resourceType_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.visionai.v1.ProcessorIOSpec.InstanceResourceInputBindingSpec) { + return mergeFrom( + (com.google.cloud.visionai.v1.ProcessorIOSpec.InstanceResourceInputBindingSpec) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.visionai.v1.ProcessorIOSpec.InstanceResourceInputBindingSpec other) { + if (other + == com.google.cloud.visionai.v1.ProcessorIOSpec.InstanceResourceInputBindingSpec + .getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000004; + onChanged(); + } + switch (other.getResourceTypeCase()) { + case CONFIG_TYPE_URI: + { + resourceTypeCase_ = 2; + resourceType_ = other.resourceType_; + onChanged(); + break; + } + case RESOURCE_TYPE_URI: + { + resourceTypeCase_ = 3; + resourceType_ = other.resourceType_; + onChanged(); + break; + } + case RESOURCETYPE_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 10 + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + resourceTypeCase_ = 2; + resourceType_ = s; + break; + } // case 18 + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + resourceTypeCase_ = 3; + resourceType_ = s; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int resourceTypeCase_ = 0; + private java.lang.Object resourceType_; + + public ResourceTypeCase getResourceTypeCase() { + return ResourceTypeCase.forNumber(resourceTypeCase_); + } + + public Builder clearResourceType() { + resourceTypeCase_ = 0; + resourceType_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + /** + * + * + *
+       * The configuration proto that includes the Googleapis resources. I.e.
+       * type.googleapis.com/google.cloud.vision.v1.StreamWithAnnotation
+       * 
+ * + * string config_type_uri = 2; + * + * @return Whether the configTypeUri field is set. + */ + @java.lang.Override + public boolean hasConfigTypeUri() { + return resourceTypeCase_ == 2; + } + /** + * + * + *
+       * The configuration proto that includes the Googleapis resources. I.e.
+       * type.googleapis.com/google.cloud.vision.v1.StreamWithAnnotation
+       * 
+ * + * string config_type_uri = 2; + * + * @return The configTypeUri. + */ + @java.lang.Override + public java.lang.String getConfigTypeUri() { + java.lang.Object ref = ""; + if (resourceTypeCase_ == 2) { + ref = resourceType_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (resourceTypeCase_ == 2) { + resourceType_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * The configuration proto that includes the Googleapis resources. I.e.
+       * type.googleapis.com/google.cloud.vision.v1.StreamWithAnnotation
+       * 
+ * + * string config_type_uri = 2; + * + * @return The bytes for configTypeUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getConfigTypeUriBytes() { + java.lang.Object ref = ""; + if (resourceTypeCase_ == 2) { + ref = resourceType_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (resourceTypeCase_ == 2) { + resourceType_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * The configuration proto that includes the Googleapis resources. I.e.
+       * type.googleapis.com/google.cloud.vision.v1.StreamWithAnnotation
+       * 
+ * + * string config_type_uri = 2; + * + * @param value The configTypeUri to set. + * @return This builder for chaining. + */ + public Builder setConfigTypeUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + resourceTypeCase_ = 2; + resourceType_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * The configuration proto that includes the Googleapis resources. I.e.
+       * type.googleapis.com/google.cloud.vision.v1.StreamWithAnnotation
+       * 
+ * + * string config_type_uri = 2; + * + * @return This builder for chaining. + */ + public Builder clearConfigTypeUri() { + if (resourceTypeCase_ == 2) { + resourceTypeCase_ = 0; + resourceType_ = null; + onChanged(); + } + return this; + } + /** + * + * + *
+       * The configuration proto that includes the Googleapis resources. I.e.
+       * type.googleapis.com/google.cloud.vision.v1.StreamWithAnnotation
+       * 
+ * + * string config_type_uri = 2; + * + * @param value The bytes for configTypeUri to set. + * @return This builder for chaining. + */ + public Builder setConfigTypeUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + resourceTypeCase_ = 2; + resourceType_ = value; + onChanged(); + return this; + } + + /** + * + * + *
+       * The direct type url of Googleapis resource. i.e.
+       * type.googleapis.com/google.cloud.vision.v1.Asset
+       * 
+ * + * string resource_type_uri = 3; + * + * @return Whether the resourceTypeUri field is set. + */ + @java.lang.Override + public boolean hasResourceTypeUri() { + return resourceTypeCase_ == 3; + } + /** + * + * + *
+       * The direct type url of Googleapis resource. i.e.
+       * type.googleapis.com/google.cloud.vision.v1.Asset
+       * 
+ * + * string resource_type_uri = 3; + * + * @return The resourceTypeUri. + */ + @java.lang.Override + public java.lang.String getResourceTypeUri() { + java.lang.Object ref = ""; + if (resourceTypeCase_ == 3) { + ref = resourceType_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (resourceTypeCase_ == 3) { + resourceType_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * The direct type url of Googleapis resource. i.e.
+       * type.googleapis.com/google.cloud.vision.v1.Asset
+       * 
+ * + * string resource_type_uri = 3; + * + * @return The bytes for resourceTypeUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getResourceTypeUriBytes() { + java.lang.Object ref = ""; + if (resourceTypeCase_ == 3) { + ref = resourceType_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (resourceTypeCase_ == 3) { + resourceType_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * The direct type url of Googleapis resource. i.e.
+       * type.googleapis.com/google.cloud.vision.v1.Asset
+       * 
+ * + * string resource_type_uri = 3; + * + * @param value The resourceTypeUri to set. + * @return This builder for chaining. + */ + public Builder setResourceTypeUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + resourceTypeCase_ = 3; + resourceType_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * The direct type url of Googleapis resource. i.e.
+       * type.googleapis.com/google.cloud.vision.v1.Asset
+       * 
+ * + * string resource_type_uri = 3; + * + * @return This builder for chaining. + */ + public Builder clearResourceTypeUri() { + if (resourceTypeCase_ == 3) { + resourceTypeCase_ = 0; + resourceType_ = null; + onChanged(); + } + return this; + } + /** + * + * + *
+       * The direct type url of Googleapis resource. i.e.
+       * type.googleapis.com/google.cloud.vision.v1.Asset
+       * 
+ * + * string resource_type_uri = 3; + * + * @param value The bytes for resourceTypeUri to set. + * @return This builder for chaining. + */ + public Builder setResourceTypeUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + resourceTypeCase_ = 3; + resourceType_ = value; + onChanged(); + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+       * Name of the input binding, unique within the processor.
+       * 
+ * + * string name = 1; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * Name of the input binding, unique within the processor.
+       * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * Name of the input binding, unique within the processor.
+       * 
+ * + * string name = 1; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+       * Name of the input binding, unique within the processor.
+       * 
+ * + * string name = 1; + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+       * Name of the input binding, unique within the processor.
+       * 
+ * + * string name = 1; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.ProcessorIOSpec.InstanceResourceInputBindingSpec) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.ProcessorIOSpec.InstanceResourceInputBindingSpec) + private static final com.google.cloud.visionai.v1.ProcessorIOSpec + .InstanceResourceInputBindingSpec + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.visionai.v1.ProcessorIOSpec.InstanceResourceInputBindingSpec(); + } + + public static com.google.cloud.visionai.v1.ProcessorIOSpec.InstanceResourceInputBindingSpec + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public InstanceResourceInputBindingSpec parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.ProcessorIOSpec.InstanceResourceInputBindingSpec + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface InstanceResourceOutputBindingSpecOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.ProcessorIOSpec.InstanceResourceOutputBindingSpec) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Name of the output binding, unique within the processor.
+     * 
+ * + * string name = 1; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+     * Name of the output binding, unique within the processor.
+     * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+     * The resource type uri of the acceptable output resource.
+     * 
+ * + * string resource_type_uri = 2; + * + * @return The resourceTypeUri. + */ + java.lang.String getResourceTypeUri(); + /** + * + * + *
+     * The resource type uri of the acceptable output resource.
+     * 
+ * + * string resource_type_uri = 2; + * + * @return The bytes for resourceTypeUri. + */ + com.google.protobuf.ByteString getResourceTypeUriBytes(); + + /** + * + * + *
+     * Whether the output resource needs to be explicitly set in the instance.
+     * If it is false, the processor will automatically generate it if required.
+     * 
+ * + * bool explicit = 3; + * + * @return The explicit. + */ + boolean getExplicit(); + } + /** + * Protobuf type {@code + * google.cloud.visionai.v1.ProcessorIOSpec.InstanceResourceOutputBindingSpec} + */ + public static final class InstanceResourceOutputBindingSpec + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.ProcessorIOSpec.InstanceResourceOutputBindingSpec) + InstanceResourceOutputBindingSpecOrBuilder { + private static final long serialVersionUID = 0L; + // Use InstanceResourceOutputBindingSpec.newBuilder() to construct. + private InstanceResourceOutputBindingSpec( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private InstanceResourceOutputBindingSpec() { + name_ = ""; + resourceTypeUri_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new InstanceResourceOutputBindingSpec(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_ProcessorIOSpec_InstanceResourceOutputBindingSpec_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_ProcessorIOSpec_InstanceResourceOutputBindingSpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.ProcessorIOSpec.InstanceResourceOutputBindingSpec.class, + com.google.cloud.visionai.v1.ProcessorIOSpec.InstanceResourceOutputBindingSpec.Builder + .class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+     * Name of the output binding, unique within the processor.
+     * 
+ * + * string name = 1; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + 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(); + name_ = s; + return s; + } + } + /** + * + * + *
+     * Name of the output binding, unique within the processor.
+     * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int RESOURCE_TYPE_URI_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object resourceTypeUri_ = ""; + /** + * + * + *
+     * The resource type uri of the acceptable output resource.
+     * 
+ * + * string resource_type_uri = 2; + * + * @return The resourceTypeUri. + */ + @java.lang.Override + public java.lang.String getResourceTypeUri() { + java.lang.Object ref = resourceTypeUri_; + 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(); + resourceTypeUri_ = s; + return s; + } + } + /** + * + * + *
+     * The resource type uri of the acceptable output resource.
+     * 
+ * + * string resource_type_uri = 2; + * + * @return The bytes for resourceTypeUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getResourceTypeUriBytes() { + java.lang.Object ref = resourceTypeUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + resourceTypeUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int EXPLICIT_FIELD_NUMBER = 3; + private boolean explicit_ = false; + /** + * + * + *
+     * Whether the output resource needs to be explicitly set in the instance.
+     * If it is false, the processor will automatically generate it if required.
+     * 
+ * + * bool explicit = 3; + * + * @return The explicit. + */ + @java.lang.Override + public boolean getExplicit() { + return explicit_; + } + + 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(resourceTypeUri_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, resourceTypeUri_); + } + if (explicit_ != false) { + output.writeBool(3, explicit_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(resourceTypeUri_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, resourceTypeUri_); + } + if (explicit_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(3, explicit_); + } + size += getUnknownFields().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.visionai.v1.ProcessorIOSpec.InstanceResourceOutputBindingSpec)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.ProcessorIOSpec.InstanceResourceOutputBindingSpec other = + (com.google.cloud.visionai.v1.ProcessorIOSpec.InstanceResourceOutputBindingSpec) obj; + + if (!getName().equals(other.getName())) return false; + if (!getResourceTypeUri().equals(other.getResourceTypeUri())) return false; + if (getExplicit() != other.getExplicit()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + RESOURCE_TYPE_URI_FIELD_NUMBER; + hash = (53 * hash) + getResourceTypeUri().hashCode(); + hash = (37 * hash) + EXPLICIT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getExplicit()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.ProcessorIOSpec.InstanceResourceOutputBindingSpec + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ProcessorIOSpec.InstanceResourceOutputBindingSpec + 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.visionai.v1.ProcessorIOSpec.InstanceResourceOutputBindingSpec + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ProcessorIOSpec.InstanceResourceOutputBindingSpec + 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.visionai.v1.ProcessorIOSpec.InstanceResourceOutputBindingSpec + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ProcessorIOSpec.InstanceResourceOutputBindingSpec + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.ProcessorIOSpec.InstanceResourceOutputBindingSpec + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ProcessorIOSpec.InstanceResourceOutputBindingSpec + 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.visionai.v1.ProcessorIOSpec.InstanceResourceOutputBindingSpec + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ProcessorIOSpec.InstanceResourceOutputBindingSpec + 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.visionai.v1.ProcessorIOSpec.InstanceResourceOutputBindingSpec + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ProcessorIOSpec.InstanceResourceOutputBindingSpec + 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.visionai.v1.ProcessorIOSpec.InstanceResourceOutputBindingSpec 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; + } + /** + * Protobuf type {@code + * google.cloud.visionai.v1.ProcessorIOSpec.InstanceResourceOutputBindingSpec} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.ProcessorIOSpec.InstanceResourceOutputBindingSpec) + com.google.cloud.visionai.v1.ProcessorIOSpec.InstanceResourceOutputBindingSpecOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_ProcessorIOSpec_InstanceResourceOutputBindingSpec_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_ProcessorIOSpec_InstanceResourceOutputBindingSpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.ProcessorIOSpec.InstanceResourceOutputBindingSpec + .class, + com.google.cloud.visionai.v1.ProcessorIOSpec.InstanceResourceOutputBindingSpec + .Builder.class); + } + + // Construct using + // com.google.cloud.visionai.v1.ProcessorIOSpec.InstanceResourceOutputBindingSpec.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + resourceTypeUri_ = ""; + explicit_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_ProcessorIOSpec_InstanceResourceOutputBindingSpec_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ProcessorIOSpec.InstanceResourceOutputBindingSpec + getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.ProcessorIOSpec.InstanceResourceOutputBindingSpec + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ProcessorIOSpec.InstanceResourceOutputBindingSpec + build() { + com.google.cloud.visionai.v1.ProcessorIOSpec.InstanceResourceOutputBindingSpec result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ProcessorIOSpec.InstanceResourceOutputBindingSpec + buildPartial() { + com.google.cloud.visionai.v1.ProcessorIOSpec.InstanceResourceOutputBindingSpec result = + new com.google.cloud.visionai.v1.ProcessorIOSpec.InstanceResourceOutputBindingSpec( + this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.visionai.v1.ProcessorIOSpec.InstanceResourceOutputBindingSpec result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.resourceTypeUri_ = resourceTypeUri_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.explicit_ = explicit_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.visionai.v1.ProcessorIOSpec.InstanceResourceOutputBindingSpec) { + return mergeFrom( + (com.google.cloud.visionai.v1.ProcessorIOSpec.InstanceResourceOutputBindingSpec) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.visionai.v1.ProcessorIOSpec.InstanceResourceOutputBindingSpec other) { + if (other + == com.google.cloud.visionai.v1.ProcessorIOSpec.InstanceResourceOutputBindingSpec + .getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getResourceTypeUri().isEmpty()) { + resourceTypeUri_ = other.resourceTypeUri_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.getExplicit() != false) { + setExplicit(other.getExplicit()); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + resourceTypeUri_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 24: + { + explicit_ = input.readBool(); + bitField0_ |= 0x00000004; + break; + } // case 24 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+       * Name of the output binding, unique within the processor.
+       * 
+ * + * string name = 1; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * Name of the output binding, unique within the processor.
+       * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * Name of the output binding, unique within the processor.
+       * 
+ * + * string name = 1; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * Name of the output binding, unique within the processor.
+       * 
+ * + * string name = 1; + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+       * Name of the output binding, unique within the processor.
+       * 
+ * + * string name = 1; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object resourceTypeUri_ = ""; + /** + * + * + *
+       * The resource type uri of the acceptable output resource.
+       * 
+ * + * string resource_type_uri = 2; + * + * @return The resourceTypeUri. + */ + public java.lang.String getResourceTypeUri() { + java.lang.Object ref = resourceTypeUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + resourceTypeUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * The resource type uri of the acceptable output resource.
+       * 
+ * + * string resource_type_uri = 2; + * + * @return The bytes for resourceTypeUri. + */ + public com.google.protobuf.ByteString getResourceTypeUriBytes() { + java.lang.Object ref = resourceTypeUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + resourceTypeUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * The resource type uri of the acceptable output resource.
+       * 
+ * + * string resource_type_uri = 2; + * + * @param value The resourceTypeUri to set. + * @return This builder for chaining. + */ + public Builder setResourceTypeUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + resourceTypeUri_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * The resource type uri of the acceptable output resource.
+       * 
+ * + * string resource_type_uri = 2; + * + * @return This builder for chaining. + */ + public Builder clearResourceTypeUri() { + resourceTypeUri_ = getDefaultInstance().getResourceTypeUri(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+       * The resource type uri of the acceptable output resource.
+       * 
+ * + * string resource_type_uri = 2; + * + * @param value The bytes for resourceTypeUri to set. + * @return This builder for chaining. + */ + public Builder setResourceTypeUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + resourceTypeUri_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private boolean explicit_; + /** + * + * + *
+       * Whether the output resource needs to be explicitly set in the instance.
+       * If it is false, the processor will automatically generate it if required.
+       * 
+ * + * bool explicit = 3; + * + * @return The explicit. + */ + @java.lang.Override + public boolean getExplicit() { + return explicit_; + } + /** + * + * + *
+       * Whether the output resource needs to be explicitly set in the instance.
+       * If it is false, the processor will automatically generate it if required.
+       * 
+ * + * bool explicit = 3; + * + * @param value The explicit to set. + * @return This builder for chaining. + */ + public Builder setExplicit(boolean value) { + + explicit_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+       * Whether the output resource needs to be explicitly set in the instance.
+       * If it is false, the processor will automatically generate it if required.
+       * 
+ * + * bool explicit = 3; + * + * @return This builder for chaining. + */ + public Builder clearExplicit() { + bitField0_ = (bitField0_ & ~0x00000004); + explicit_ = false; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.ProcessorIOSpec.InstanceResourceOutputBindingSpec) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.ProcessorIOSpec.InstanceResourceOutputBindingSpec) + private static final com.google.cloud.visionai.v1.ProcessorIOSpec + .InstanceResourceOutputBindingSpec + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.visionai.v1.ProcessorIOSpec.InstanceResourceOutputBindingSpec(); + } + + public static com.google.cloud.visionai.v1.ProcessorIOSpec.InstanceResourceOutputBindingSpec + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public InstanceResourceOutputBindingSpec parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.ProcessorIOSpec.InstanceResourceOutputBindingSpec + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int GRAPH_INPUT_CHANNEL_SPECS_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private java.util.List + graphInputChannelSpecs_; + /** + * + * + *
+   * For processors with input_channel_specs, the processor must be explicitly
+   * connected to another processor.
+   * 
+ * + * + * repeated .google.cloud.visionai.v1.ProcessorIOSpec.GraphInputChannelSpec graph_input_channel_specs = 3; + * + */ + @java.lang.Override + public java.util.List + getGraphInputChannelSpecsList() { + return graphInputChannelSpecs_; + } + /** + * + * + *
+   * For processors with input_channel_specs, the processor must be explicitly
+   * connected to another processor.
+   * 
+ * + * + * repeated .google.cloud.visionai.v1.ProcessorIOSpec.GraphInputChannelSpec graph_input_channel_specs = 3; + * + */ + @java.lang.Override + public java.util.List< + ? extends com.google.cloud.visionai.v1.ProcessorIOSpec.GraphInputChannelSpecOrBuilder> + getGraphInputChannelSpecsOrBuilderList() { + return graphInputChannelSpecs_; + } + /** + * + * + *
+   * For processors with input_channel_specs, the processor must be explicitly
+   * connected to another processor.
+   * 
+ * + * + * repeated .google.cloud.visionai.v1.ProcessorIOSpec.GraphInputChannelSpec graph_input_channel_specs = 3; + * + */ + @java.lang.Override + public int getGraphInputChannelSpecsCount() { + return graphInputChannelSpecs_.size(); + } + /** + * + * + *
+   * For processors with input_channel_specs, the processor must be explicitly
+   * connected to another processor.
+   * 
+ * + * + * repeated .google.cloud.visionai.v1.ProcessorIOSpec.GraphInputChannelSpec graph_input_channel_specs = 3; + * + */ + @java.lang.Override + public com.google.cloud.visionai.v1.ProcessorIOSpec.GraphInputChannelSpec + getGraphInputChannelSpecs(int index) { + return graphInputChannelSpecs_.get(index); + } + /** + * + * + *
+   * For processors with input_channel_specs, the processor must be explicitly
+   * connected to another processor.
+   * 
+ * + * + * repeated .google.cloud.visionai.v1.ProcessorIOSpec.GraphInputChannelSpec graph_input_channel_specs = 3; + * + */ + @java.lang.Override + public com.google.cloud.visionai.v1.ProcessorIOSpec.GraphInputChannelSpecOrBuilder + getGraphInputChannelSpecsOrBuilder(int index) { + return graphInputChannelSpecs_.get(index); + } + + public static final int GRAPH_OUTPUT_CHANNEL_SPECS_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private java.util.List + graphOutputChannelSpecs_; + /** + * + * + *
+   * The output artifact specifications for the current processor.
+   * 
+ * + * + * repeated .google.cloud.visionai.v1.ProcessorIOSpec.GraphOutputChannelSpec graph_output_channel_specs = 4; + * + */ + @java.lang.Override + public java.util.List + getGraphOutputChannelSpecsList() { + return graphOutputChannelSpecs_; + } + /** + * + * + *
+   * The output artifact specifications for the current processor.
+   * 
+ * + * + * repeated .google.cloud.visionai.v1.ProcessorIOSpec.GraphOutputChannelSpec graph_output_channel_specs = 4; + * + */ + @java.lang.Override + public java.util.List< + ? extends com.google.cloud.visionai.v1.ProcessorIOSpec.GraphOutputChannelSpecOrBuilder> + getGraphOutputChannelSpecsOrBuilderList() { + return graphOutputChannelSpecs_; + } + /** + * + * + *
+   * The output artifact specifications for the current processor.
+   * 
+ * + * + * repeated .google.cloud.visionai.v1.ProcessorIOSpec.GraphOutputChannelSpec graph_output_channel_specs = 4; + * + */ + @java.lang.Override + public int getGraphOutputChannelSpecsCount() { + return graphOutputChannelSpecs_.size(); + } + /** + * + * + *
+   * The output artifact specifications for the current processor.
+   * 
+ * + * + * repeated .google.cloud.visionai.v1.ProcessorIOSpec.GraphOutputChannelSpec graph_output_channel_specs = 4; + * + */ + @java.lang.Override + public com.google.cloud.visionai.v1.ProcessorIOSpec.GraphOutputChannelSpec + getGraphOutputChannelSpecs(int index) { + return graphOutputChannelSpecs_.get(index); + } + /** + * + * + *
+   * The output artifact specifications for the current processor.
+   * 
+ * + * + * repeated .google.cloud.visionai.v1.ProcessorIOSpec.GraphOutputChannelSpec graph_output_channel_specs = 4; + * + */ + @java.lang.Override + public com.google.cloud.visionai.v1.ProcessorIOSpec.GraphOutputChannelSpecOrBuilder + getGraphOutputChannelSpecsOrBuilder(int index) { + return graphOutputChannelSpecs_.get(index); + } + + public static final int INSTANCE_RESOURCE_INPUT_BINDING_SPECS_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private java.util.List< + com.google.cloud.visionai.v1.ProcessorIOSpec.InstanceResourceInputBindingSpec> + instanceResourceInputBindingSpecs_; + /** + * + * + *
+   * The input resource that needs to be fed from the application instance.
+   * 
+ * + * + * repeated .google.cloud.visionai.v1.ProcessorIOSpec.InstanceResourceInputBindingSpec instance_resource_input_binding_specs = 5; + * + */ + @java.lang.Override + public java.util.List< + com.google.cloud.visionai.v1.ProcessorIOSpec.InstanceResourceInputBindingSpec> + getInstanceResourceInputBindingSpecsList() { + return instanceResourceInputBindingSpecs_; + } + /** + * + * + *
+   * The input resource that needs to be fed from the application instance.
+   * 
+ * + * + * repeated .google.cloud.visionai.v1.ProcessorIOSpec.InstanceResourceInputBindingSpec instance_resource_input_binding_specs = 5; + * + */ + @java.lang.Override + public java.util.List< + ? extends + com.google.cloud.visionai.v1.ProcessorIOSpec + .InstanceResourceInputBindingSpecOrBuilder> + getInstanceResourceInputBindingSpecsOrBuilderList() { + return instanceResourceInputBindingSpecs_; + } + /** + * + * + *
+   * The input resource that needs to be fed from the application instance.
+   * 
+ * + * + * repeated .google.cloud.visionai.v1.ProcessorIOSpec.InstanceResourceInputBindingSpec instance_resource_input_binding_specs = 5; + * + */ + @java.lang.Override + public int getInstanceResourceInputBindingSpecsCount() { + return instanceResourceInputBindingSpecs_.size(); + } + /** + * + * + *
+   * The input resource that needs to be fed from the application instance.
+   * 
+ * + * + * repeated .google.cloud.visionai.v1.ProcessorIOSpec.InstanceResourceInputBindingSpec instance_resource_input_binding_specs = 5; + * + */ + @java.lang.Override + public com.google.cloud.visionai.v1.ProcessorIOSpec.InstanceResourceInputBindingSpec + getInstanceResourceInputBindingSpecs(int index) { + return instanceResourceInputBindingSpecs_.get(index); + } + /** + * + * + *
+   * The input resource that needs to be fed from the application instance.
+   * 
+ * + * + * repeated .google.cloud.visionai.v1.ProcessorIOSpec.InstanceResourceInputBindingSpec instance_resource_input_binding_specs = 5; + * + */ + @java.lang.Override + public com.google.cloud.visionai.v1.ProcessorIOSpec.InstanceResourceInputBindingSpecOrBuilder + getInstanceResourceInputBindingSpecsOrBuilder(int index) { + return instanceResourceInputBindingSpecs_.get(index); + } + + public static final int INSTANCE_RESOURCE_OUTPUT_BINDING_SPECS_FIELD_NUMBER = 6; + + @SuppressWarnings("serial") + private java.util.List< + com.google.cloud.visionai.v1.ProcessorIOSpec.InstanceResourceOutputBindingSpec> + instanceResourceOutputBindingSpecs_; + /** + * + * + *
+   * The output resource that the processor will generate per instance.
+   * Other than the explicitly listed output bindings here, all the processors'
+   * GraphOutputChannels can be binded to stream resource. The bind name then is
+   * the same as the GraphOutputChannel's name.
+   * 
+ * + * + * repeated .google.cloud.visionai.v1.ProcessorIOSpec.InstanceResourceOutputBindingSpec instance_resource_output_binding_specs = 6; + * + */ + @java.lang.Override + public java.util.List< + com.google.cloud.visionai.v1.ProcessorIOSpec.InstanceResourceOutputBindingSpec> + getInstanceResourceOutputBindingSpecsList() { + return instanceResourceOutputBindingSpecs_; + } + /** + * + * + *
+   * The output resource that the processor will generate per instance.
+   * Other than the explicitly listed output bindings here, all the processors'
+   * GraphOutputChannels can be binded to stream resource. The bind name then is
+   * the same as the GraphOutputChannel's name.
+   * 
+ * + * + * repeated .google.cloud.visionai.v1.ProcessorIOSpec.InstanceResourceOutputBindingSpec instance_resource_output_binding_specs = 6; + * + */ + @java.lang.Override + public java.util.List< + ? extends + com.google.cloud.visionai.v1.ProcessorIOSpec + .InstanceResourceOutputBindingSpecOrBuilder> + getInstanceResourceOutputBindingSpecsOrBuilderList() { + return instanceResourceOutputBindingSpecs_; + } + /** + * + * + *
+   * The output resource that the processor will generate per instance.
+   * Other than the explicitly listed output bindings here, all the processors'
+   * GraphOutputChannels can be binded to stream resource. The bind name then is
+   * the same as the GraphOutputChannel's name.
+   * 
+ * + * + * repeated .google.cloud.visionai.v1.ProcessorIOSpec.InstanceResourceOutputBindingSpec instance_resource_output_binding_specs = 6; + * + */ + @java.lang.Override + public int getInstanceResourceOutputBindingSpecsCount() { + return instanceResourceOutputBindingSpecs_.size(); + } + /** + * + * + *
+   * The output resource that the processor will generate per instance.
+   * Other than the explicitly listed output bindings here, all the processors'
+   * GraphOutputChannels can be binded to stream resource. The bind name then is
+   * the same as the GraphOutputChannel's name.
+   * 
+ * + * + * repeated .google.cloud.visionai.v1.ProcessorIOSpec.InstanceResourceOutputBindingSpec instance_resource_output_binding_specs = 6; + * + */ + @java.lang.Override + public com.google.cloud.visionai.v1.ProcessorIOSpec.InstanceResourceOutputBindingSpec + getInstanceResourceOutputBindingSpecs(int index) { + return instanceResourceOutputBindingSpecs_.get(index); + } + /** + * + * + *
+   * The output resource that the processor will generate per instance.
+   * Other than the explicitly listed output bindings here, all the processors'
+   * GraphOutputChannels can be binded to stream resource. The bind name then is
+   * the same as the GraphOutputChannel's name.
+   * 
+ * + * + * repeated .google.cloud.visionai.v1.ProcessorIOSpec.InstanceResourceOutputBindingSpec instance_resource_output_binding_specs = 6; + * + */ + @java.lang.Override + public com.google.cloud.visionai.v1.ProcessorIOSpec.InstanceResourceOutputBindingSpecOrBuilder + getInstanceResourceOutputBindingSpecsOrBuilder(int index) { + return instanceResourceOutputBindingSpecs_.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 < graphInputChannelSpecs_.size(); i++) { + output.writeMessage(3, graphInputChannelSpecs_.get(i)); + } + for (int i = 0; i < graphOutputChannelSpecs_.size(); i++) { + output.writeMessage(4, graphOutputChannelSpecs_.get(i)); + } + for (int i = 0; i < instanceResourceInputBindingSpecs_.size(); i++) { + output.writeMessage(5, instanceResourceInputBindingSpecs_.get(i)); + } + for (int i = 0; i < instanceResourceOutputBindingSpecs_.size(); i++) { + output.writeMessage(6, instanceResourceOutputBindingSpecs_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < graphInputChannelSpecs_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 3, graphInputChannelSpecs_.get(i)); + } + for (int i = 0; i < graphOutputChannelSpecs_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 4, graphOutputChannelSpecs_.get(i)); + } + for (int i = 0; i < instanceResourceInputBindingSpecs_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 5, instanceResourceInputBindingSpecs_.get(i)); + } + for (int i = 0; i < instanceResourceOutputBindingSpecs_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 6, instanceResourceOutputBindingSpecs_.get(i)); + } + size += getUnknownFields().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.visionai.v1.ProcessorIOSpec)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.ProcessorIOSpec other = + (com.google.cloud.visionai.v1.ProcessorIOSpec) obj; + + if (!getGraphInputChannelSpecsList().equals(other.getGraphInputChannelSpecsList())) + return false; + if (!getGraphOutputChannelSpecsList().equals(other.getGraphOutputChannelSpecsList())) + return false; + if (!getInstanceResourceInputBindingSpecsList() + .equals(other.getInstanceResourceInputBindingSpecsList())) return false; + if (!getInstanceResourceOutputBindingSpecsList() + .equals(other.getInstanceResourceOutputBindingSpecsList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getGraphInputChannelSpecsCount() > 0) { + hash = (37 * hash) + GRAPH_INPUT_CHANNEL_SPECS_FIELD_NUMBER; + hash = (53 * hash) + getGraphInputChannelSpecsList().hashCode(); + } + if (getGraphOutputChannelSpecsCount() > 0) { + hash = (37 * hash) + GRAPH_OUTPUT_CHANNEL_SPECS_FIELD_NUMBER; + hash = (53 * hash) + getGraphOutputChannelSpecsList().hashCode(); + } + if (getInstanceResourceInputBindingSpecsCount() > 0) { + hash = (37 * hash) + INSTANCE_RESOURCE_INPUT_BINDING_SPECS_FIELD_NUMBER; + hash = (53 * hash) + getInstanceResourceInputBindingSpecsList().hashCode(); + } + if (getInstanceResourceOutputBindingSpecsCount() > 0) { + hash = (37 * hash) + INSTANCE_RESOURCE_OUTPUT_BINDING_SPECS_FIELD_NUMBER; + hash = (53 * hash) + getInstanceResourceOutputBindingSpecsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.ProcessorIOSpec parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ProcessorIOSpec 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.visionai.v1.ProcessorIOSpec parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ProcessorIOSpec 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.visionai.v1.ProcessorIOSpec parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ProcessorIOSpec parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.ProcessorIOSpec parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ProcessorIOSpec 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.visionai.v1.ProcessorIOSpec parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ProcessorIOSpec 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.visionai.v1.ProcessorIOSpec parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ProcessorIOSpec 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.visionai.v1.ProcessorIOSpec 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; + } + /** + * + * + *
+   * Message describing the input / output specifications of a processor.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.ProcessorIOSpec} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.ProcessorIOSpec) + com.google.cloud.visionai.v1.ProcessorIOSpecOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_ProcessorIOSpec_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_ProcessorIOSpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.ProcessorIOSpec.class, + com.google.cloud.visionai.v1.ProcessorIOSpec.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.ProcessorIOSpec.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (graphInputChannelSpecsBuilder_ == null) { + graphInputChannelSpecs_ = java.util.Collections.emptyList(); + } else { + graphInputChannelSpecs_ = null; + graphInputChannelSpecsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + if (graphOutputChannelSpecsBuilder_ == null) { + graphOutputChannelSpecs_ = java.util.Collections.emptyList(); + } else { + graphOutputChannelSpecs_ = null; + graphOutputChannelSpecsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + if (instanceResourceInputBindingSpecsBuilder_ == null) { + instanceResourceInputBindingSpecs_ = java.util.Collections.emptyList(); + } else { + instanceResourceInputBindingSpecs_ = null; + instanceResourceInputBindingSpecsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000004); + if (instanceResourceOutputBindingSpecsBuilder_ == null) { + instanceResourceOutputBindingSpecs_ = java.util.Collections.emptyList(); + } else { + instanceResourceOutputBindingSpecs_ = null; + instanceResourceOutputBindingSpecsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000008); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_ProcessorIOSpec_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ProcessorIOSpec getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.ProcessorIOSpec.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ProcessorIOSpec build() { + com.google.cloud.visionai.v1.ProcessorIOSpec result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ProcessorIOSpec buildPartial() { + com.google.cloud.visionai.v1.ProcessorIOSpec result = + new com.google.cloud.visionai.v1.ProcessorIOSpec(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.google.cloud.visionai.v1.ProcessorIOSpec result) { + if (graphInputChannelSpecsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + graphInputChannelSpecs_ = java.util.Collections.unmodifiableList(graphInputChannelSpecs_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.graphInputChannelSpecs_ = graphInputChannelSpecs_; + } else { + result.graphInputChannelSpecs_ = graphInputChannelSpecsBuilder_.build(); + } + if (graphOutputChannelSpecsBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + graphOutputChannelSpecs_ = + java.util.Collections.unmodifiableList(graphOutputChannelSpecs_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.graphOutputChannelSpecs_ = graphOutputChannelSpecs_; + } else { + result.graphOutputChannelSpecs_ = graphOutputChannelSpecsBuilder_.build(); + } + if (instanceResourceInputBindingSpecsBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0)) { + instanceResourceInputBindingSpecs_ = + java.util.Collections.unmodifiableList(instanceResourceInputBindingSpecs_); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.instanceResourceInputBindingSpecs_ = instanceResourceInputBindingSpecs_; + } else { + result.instanceResourceInputBindingSpecs_ = + instanceResourceInputBindingSpecsBuilder_.build(); + } + if (instanceResourceOutputBindingSpecsBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0)) { + instanceResourceOutputBindingSpecs_ = + java.util.Collections.unmodifiableList(instanceResourceOutputBindingSpecs_); + bitField0_ = (bitField0_ & ~0x00000008); + } + result.instanceResourceOutputBindingSpecs_ = instanceResourceOutputBindingSpecs_; + } else { + result.instanceResourceOutputBindingSpecs_ = + instanceResourceOutputBindingSpecsBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.visionai.v1.ProcessorIOSpec result) { + int from_bitField0_ = bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.ProcessorIOSpec) { + return mergeFrom((com.google.cloud.visionai.v1.ProcessorIOSpec) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.ProcessorIOSpec other) { + if (other == com.google.cloud.visionai.v1.ProcessorIOSpec.getDefaultInstance()) return this; + if (graphInputChannelSpecsBuilder_ == null) { + if (!other.graphInputChannelSpecs_.isEmpty()) { + if (graphInputChannelSpecs_.isEmpty()) { + graphInputChannelSpecs_ = other.graphInputChannelSpecs_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureGraphInputChannelSpecsIsMutable(); + graphInputChannelSpecs_.addAll(other.graphInputChannelSpecs_); + } + onChanged(); + } + } else { + if (!other.graphInputChannelSpecs_.isEmpty()) { + if (graphInputChannelSpecsBuilder_.isEmpty()) { + graphInputChannelSpecsBuilder_.dispose(); + graphInputChannelSpecsBuilder_ = null; + graphInputChannelSpecs_ = other.graphInputChannelSpecs_; + bitField0_ = (bitField0_ & ~0x00000001); + graphInputChannelSpecsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getGraphInputChannelSpecsFieldBuilder() + : null; + } else { + graphInputChannelSpecsBuilder_.addAllMessages(other.graphInputChannelSpecs_); + } + } + } + if (graphOutputChannelSpecsBuilder_ == null) { + if (!other.graphOutputChannelSpecs_.isEmpty()) { + if (graphOutputChannelSpecs_.isEmpty()) { + graphOutputChannelSpecs_ = other.graphOutputChannelSpecs_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureGraphOutputChannelSpecsIsMutable(); + graphOutputChannelSpecs_.addAll(other.graphOutputChannelSpecs_); + } + onChanged(); + } + } else { + if (!other.graphOutputChannelSpecs_.isEmpty()) { + if (graphOutputChannelSpecsBuilder_.isEmpty()) { + graphOutputChannelSpecsBuilder_.dispose(); + graphOutputChannelSpecsBuilder_ = null; + graphOutputChannelSpecs_ = other.graphOutputChannelSpecs_; + bitField0_ = (bitField0_ & ~0x00000002); + graphOutputChannelSpecsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getGraphOutputChannelSpecsFieldBuilder() + : null; + } else { + graphOutputChannelSpecsBuilder_.addAllMessages(other.graphOutputChannelSpecs_); + } + } + } + if (instanceResourceInputBindingSpecsBuilder_ == null) { + if (!other.instanceResourceInputBindingSpecs_.isEmpty()) { + if (instanceResourceInputBindingSpecs_.isEmpty()) { + instanceResourceInputBindingSpecs_ = other.instanceResourceInputBindingSpecs_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureInstanceResourceInputBindingSpecsIsMutable(); + instanceResourceInputBindingSpecs_.addAll(other.instanceResourceInputBindingSpecs_); + } + onChanged(); + } + } else { + if (!other.instanceResourceInputBindingSpecs_.isEmpty()) { + if (instanceResourceInputBindingSpecsBuilder_.isEmpty()) { + instanceResourceInputBindingSpecsBuilder_.dispose(); + instanceResourceInputBindingSpecsBuilder_ = null; + instanceResourceInputBindingSpecs_ = other.instanceResourceInputBindingSpecs_; + bitField0_ = (bitField0_ & ~0x00000004); + instanceResourceInputBindingSpecsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getInstanceResourceInputBindingSpecsFieldBuilder() + : null; + } else { + instanceResourceInputBindingSpecsBuilder_.addAllMessages( + other.instanceResourceInputBindingSpecs_); + } + } + } + if (instanceResourceOutputBindingSpecsBuilder_ == null) { + if (!other.instanceResourceOutputBindingSpecs_.isEmpty()) { + if (instanceResourceOutputBindingSpecs_.isEmpty()) { + instanceResourceOutputBindingSpecs_ = other.instanceResourceOutputBindingSpecs_; + bitField0_ = (bitField0_ & ~0x00000008); + } else { + ensureInstanceResourceOutputBindingSpecsIsMutable(); + instanceResourceOutputBindingSpecs_.addAll(other.instanceResourceOutputBindingSpecs_); + } + onChanged(); + } + } else { + if (!other.instanceResourceOutputBindingSpecs_.isEmpty()) { + if (instanceResourceOutputBindingSpecsBuilder_.isEmpty()) { + instanceResourceOutputBindingSpecsBuilder_.dispose(); + instanceResourceOutputBindingSpecsBuilder_ = null; + instanceResourceOutputBindingSpecs_ = other.instanceResourceOutputBindingSpecs_; + bitField0_ = (bitField0_ & ~0x00000008); + instanceResourceOutputBindingSpecsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getInstanceResourceOutputBindingSpecsFieldBuilder() + : null; + } else { + instanceResourceOutputBindingSpecsBuilder_.addAllMessages( + other.instanceResourceOutputBindingSpecs_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 26: + { + com.google.cloud.visionai.v1.ProcessorIOSpec.GraphInputChannelSpec m = + input.readMessage( + com.google.cloud.visionai.v1.ProcessorIOSpec.GraphInputChannelSpec.parser(), + extensionRegistry); + if (graphInputChannelSpecsBuilder_ == null) { + ensureGraphInputChannelSpecsIsMutable(); + graphInputChannelSpecs_.add(m); + } else { + graphInputChannelSpecsBuilder_.addMessage(m); + } + break; + } // case 26 + case 34: + { + com.google.cloud.visionai.v1.ProcessorIOSpec.GraphOutputChannelSpec m = + input.readMessage( + com.google.cloud.visionai.v1.ProcessorIOSpec.GraphOutputChannelSpec + .parser(), + extensionRegistry); + if (graphOutputChannelSpecsBuilder_ == null) { + ensureGraphOutputChannelSpecsIsMutable(); + graphOutputChannelSpecs_.add(m); + } else { + graphOutputChannelSpecsBuilder_.addMessage(m); + } + break; + } // case 34 + case 42: + { + com.google.cloud.visionai.v1.ProcessorIOSpec.InstanceResourceInputBindingSpec m = + input.readMessage( + com.google.cloud.visionai.v1.ProcessorIOSpec + .InstanceResourceInputBindingSpec.parser(), + extensionRegistry); + if (instanceResourceInputBindingSpecsBuilder_ == null) { + ensureInstanceResourceInputBindingSpecsIsMutable(); + instanceResourceInputBindingSpecs_.add(m); + } else { + instanceResourceInputBindingSpecsBuilder_.addMessage(m); + } + break; + } // case 42 + case 50: + { + com.google.cloud.visionai.v1.ProcessorIOSpec.InstanceResourceOutputBindingSpec m = + input.readMessage( + com.google.cloud.visionai.v1.ProcessorIOSpec + .InstanceResourceOutputBindingSpec.parser(), + extensionRegistry); + if (instanceResourceOutputBindingSpecsBuilder_ == null) { + ensureInstanceResourceOutputBindingSpecsIsMutable(); + instanceResourceOutputBindingSpecs_.add(m); + } else { + instanceResourceOutputBindingSpecsBuilder_.addMessage(m); + } + break; + } // case 50 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List + graphInputChannelSpecs_ = java.util.Collections.emptyList(); + + private void ensureGraphInputChannelSpecsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + graphInputChannelSpecs_ = + new java.util.ArrayList< + com.google.cloud.visionai.v1.ProcessorIOSpec.GraphInputChannelSpec>( + graphInputChannelSpecs_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.visionai.v1.ProcessorIOSpec.GraphInputChannelSpec, + com.google.cloud.visionai.v1.ProcessorIOSpec.GraphInputChannelSpec.Builder, + com.google.cloud.visionai.v1.ProcessorIOSpec.GraphInputChannelSpecOrBuilder> + graphInputChannelSpecsBuilder_; + + /** + * + * + *
+     * For processors with input_channel_specs, the processor must be explicitly
+     * connected to another processor.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.ProcessorIOSpec.GraphInputChannelSpec graph_input_channel_specs = 3; + * + */ + public java.util.List + getGraphInputChannelSpecsList() { + if (graphInputChannelSpecsBuilder_ == null) { + return java.util.Collections.unmodifiableList(graphInputChannelSpecs_); + } else { + return graphInputChannelSpecsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * For processors with input_channel_specs, the processor must be explicitly
+     * connected to another processor.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.ProcessorIOSpec.GraphInputChannelSpec graph_input_channel_specs = 3; + * + */ + public int getGraphInputChannelSpecsCount() { + if (graphInputChannelSpecsBuilder_ == null) { + return graphInputChannelSpecs_.size(); + } else { + return graphInputChannelSpecsBuilder_.getCount(); + } + } + /** + * + * + *
+     * For processors with input_channel_specs, the processor must be explicitly
+     * connected to another processor.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.ProcessorIOSpec.GraphInputChannelSpec graph_input_channel_specs = 3; + * + */ + public com.google.cloud.visionai.v1.ProcessorIOSpec.GraphInputChannelSpec + getGraphInputChannelSpecs(int index) { + if (graphInputChannelSpecsBuilder_ == null) { + return graphInputChannelSpecs_.get(index); + } else { + return graphInputChannelSpecsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * For processors with input_channel_specs, the processor must be explicitly
+     * connected to another processor.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.ProcessorIOSpec.GraphInputChannelSpec graph_input_channel_specs = 3; + * + */ + public Builder setGraphInputChannelSpecs( + int index, com.google.cloud.visionai.v1.ProcessorIOSpec.GraphInputChannelSpec value) { + if (graphInputChannelSpecsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureGraphInputChannelSpecsIsMutable(); + graphInputChannelSpecs_.set(index, value); + onChanged(); + } else { + graphInputChannelSpecsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * For processors with input_channel_specs, the processor must be explicitly
+     * connected to another processor.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.ProcessorIOSpec.GraphInputChannelSpec graph_input_channel_specs = 3; + * + */ + public Builder setGraphInputChannelSpecs( + int index, + com.google.cloud.visionai.v1.ProcessorIOSpec.GraphInputChannelSpec.Builder + builderForValue) { + if (graphInputChannelSpecsBuilder_ == null) { + ensureGraphInputChannelSpecsIsMutable(); + graphInputChannelSpecs_.set(index, builderForValue.build()); + onChanged(); + } else { + graphInputChannelSpecsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * For processors with input_channel_specs, the processor must be explicitly
+     * connected to another processor.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.ProcessorIOSpec.GraphInputChannelSpec graph_input_channel_specs = 3; + * + */ + public Builder addGraphInputChannelSpecs( + com.google.cloud.visionai.v1.ProcessorIOSpec.GraphInputChannelSpec value) { + if (graphInputChannelSpecsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureGraphInputChannelSpecsIsMutable(); + graphInputChannelSpecs_.add(value); + onChanged(); + } else { + graphInputChannelSpecsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * For processors with input_channel_specs, the processor must be explicitly
+     * connected to another processor.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.ProcessorIOSpec.GraphInputChannelSpec graph_input_channel_specs = 3; + * + */ + public Builder addGraphInputChannelSpecs( + int index, com.google.cloud.visionai.v1.ProcessorIOSpec.GraphInputChannelSpec value) { + if (graphInputChannelSpecsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureGraphInputChannelSpecsIsMutable(); + graphInputChannelSpecs_.add(index, value); + onChanged(); + } else { + graphInputChannelSpecsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * For processors with input_channel_specs, the processor must be explicitly
+     * connected to another processor.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.ProcessorIOSpec.GraphInputChannelSpec graph_input_channel_specs = 3; + * + */ + public Builder addGraphInputChannelSpecs( + com.google.cloud.visionai.v1.ProcessorIOSpec.GraphInputChannelSpec.Builder + builderForValue) { + if (graphInputChannelSpecsBuilder_ == null) { + ensureGraphInputChannelSpecsIsMutable(); + graphInputChannelSpecs_.add(builderForValue.build()); + onChanged(); + } else { + graphInputChannelSpecsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * For processors with input_channel_specs, the processor must be explicitly
+     * connected to another processor.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.ProcessorIOSpec.GraphInputChannelSpec graph_input_channel_specs = 3; + * + */ + public Builder addGraphInputChannelSpecs( + int index, + com.google.cloud.visionai.v1.ProcessorIOSpec.GraphInputChannelSpec.Builder + builderForValue) { + if (graphInputChannelSpecsBuilder_ == null) { + ensureGraphInputChannelSpecsIsMutable(); + graphInputChannelSpecs_.add(index, builderForValue.build()); + onChanged(); + } else { + graphInputChannelSpecsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * For processors with input_channel_specs, the processor must be explicitly
+     * connected to another processor.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.ProcessorIOSpec.GraphInputChannelSpec graph_input_channel_specs = 3; + * + */ + public Builder addAllGraphInputChannelSpecs( + java.lang.Iterable< + ? extends com.google.cloud.visionai.v1.ProcessorIOSpec.GraphInputChannelSpec> + values) { + if (graphInputChannelSpecsBuilder_ == null) { + ensureGraphInputChannelSpecsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, graphInputChannelSpecs_); + onChanged(); + } else { + graphInputChannelSpecsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * For processors with input_channel_specs, the processor must be explicitly
+     * connected to another processor.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.ProcessorIOSpec.GraphInputChannelSpec graph_input_channel_specs = 3; + * + */ + public Builder clearGraphInputChannelSpecs() { + if (graphInputChannelSpecsBuilder_ == null) { + graphInputChannelSpecs_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + graphInputChannelSpecsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * For processors with input_channel_specs, the processor must be explicitly
+     * connected to another processor.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.ProcessorIOSpec.GraphInputChannelSpec graph_input_channel_specs = 3; + * + */ + public Builder removeGraphInputChannelSpecs(int index) { + if (graphInputChannelSpecsBuilder_ == null) { + ensureGraphInputChannelSpecsIsMutable(); + graphInputChannelSpecs_.remove(index); + onChanged(); + } else { + graphInputChannelSpecsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * For processors with input_channel_specs, the processor must be explicitly
+     * connected to another processor.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.ProcessorIOSpec.GraphInputChannelSpec graph_input_channel_specs = 3; + * + */ + public com.google.cloud.visionai.v1.ProcessorIOSpec.GraphInputChannelSpec.Builder + getGraphInputChannelSpecsBuilder(int index) { + return getGraphInputChannelSpecsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * For processors with input_channel_specs, the processor must be explicitly
+     * connected to another processor.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.ProcessorIOSpec.GraphInputChannelSpec graph_input_channel_specs = 3; + * + */ + public com.google.cloud.visionai.v1.ProcessorIOSpec.GraphInputChannelSpecOrBuilder + getGraphInputChannelSpecsOrBuilder(int index) { + if (graphInputChannelSpecsBuilder_ == null) { + return graphInputChannelSpecs_.get(index); + } else { + return graphInputChannelSpecsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * For processors with input_channel_specs, the processor must be explicitly
+     * connected to another processor.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.ProcessorIOSpec.GraphInputChannelSpec graph_input_channel_specs = 3; + * + */ + public java.util.List< + ? extends com.google.cloud.visionai.v1.ProcessorIOSpec.GraphInputChannelSpecOrBuilder> + getGraphInputChannelSpecsOrBuilderList() { + if (graphInputChannelSpecsBuilder_ != null) { + return graphInputChannelSpecsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(graphInputChannelSpecs_); + } + } + /** + * + * + *
+     * For processors with input_channel_specs, the processor must be explicitly
+     * connected to another processor.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.ProcessorIOSpec.GraphInputChannelSpec graph_input_channel_specs = 3; + * + */ + public com.google.cloud.visionai.v1.ProcessorIOSpec.GraphInputChannelSpec.Builder + addGraphInputChannelSpecsBuilder() { + return getGraphInputChannelSpecsFieldBuilder() + .addBuilder( + com.google.cloud.visionai.v1.ProcessorIOSpec.GraphInputChannelSpec + .getDefaultInstance()); + } + /** + * + * + *
+     * For processors with input_channel_specs, the processor must be explicitly
+     * connected to another processor.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.ProcessorIOSpec.GraphInputChannelSpec graph_input_channel_specs = 3; + * + */ + public com.google.cloud.visionai.v1.ProcessorIOSpec.GraphInputChannelSpec.Builder + addGraphInputChannelSpecsBuilder(int index) { + return getGraphInputChannelSpecsFieldBuilder() + .addBuilder( + index, + com.google.cloud.visionai.v1.ProcessorIOSpec.GraphInputChannelSpec + .getDefaultInstance()); + } + /** + * + * + *
+     * For processors with input_channel_specs, the processor must be explicitly
+     * connected to another processor.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.ProcessorIOSpec.GraphInputChannelSpec graph_input_channel_specs = 3; + * + */ + public java.util.List< + com.google.cloud.visionai.v1.ProcessorIOSpec.GraphInputChannelSpec.Builder> + getGraphInputChannelSpecsBuilderList() { + return getGraphInputChannelSpecsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.visionai.v1.ProcessorIOSpec.GraphInputChannelSpec, + com.google.cloud.visionai.v1.ProcessorIOSpec.GraphInputChannelSpec.Builder, + com.google.cloud.visionai.v1.ProcessorIOSpec.GraphInputChannelSpecOrBuilder> + getGraphInputChannelSpecsFieldBuilder() { + if (graphInputChannelSpecsBuilder_ == null) { + graphInputChannelSpecsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.visionai.v1.ProcessorIOSpec.GraphInputChannelSpec, + com.google.cloud.visionai.v1.ProcessorIOSpec.GraphInputChannelSpec.Builder, + com.google.cloud.visionai.v1.ProcessorIOSpec.GraphInputChannelSpecOrBuilder>( + graphInputChannelSpecs_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + graphInputChannelSpecs_ = null; + } + return graphInputChannelSpecsBuilder_; + } + + private java.util.List + graphOutputChannelSpecs_ = java.util.Collections.emptyList(); + + private void ensureGraphOutputChannelSpecsIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + graphOutputChannelSpecs_ = + new java.util.ArrayList< + com.google.cloud.visionai.v1.ProcessorIOSpec.GraphOutputChannelSpec>( + graphOutputChannelSpecs_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.visionai.v1.ProcessorIOSpec.GraphOutputChannelSpec, + com.google.cloud.visionai.v1.ProcessorIOSpec.GraphOutputChannelSpec.Builder, + com.google.cloud.visionai.v1.ProcessorIOSpec.GraphOutputChannelSpecOrBuilder> + graphOutputChannelSpecsBuilder_; + + /** + * + * + *
+     * The output artifact specifications for the current processor.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.ProcessorIOSpec.GraphOutputChannelSpec graph_output_channel_specs = 4; + * + */ + public java.util.List + getGraphOutputChannelSpecsList() { + if (graphOutputChannelSpecsBuilder_ == null) { + return java.util.Collections.unmodifiableList(graphOutputChannelSpecs_); + } else { + return graphOutputChannelSpecsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * The output artifact specifications for the current processor.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.ProcessorIOSpec.GraphOutputChannelSpec graph_output_channel_specs = 4; + * + */ + public int getGraphOutputChannelSpecsCount() { + if (graphOutputChannelSpecsBuilder_ == null) { + return graphOutputChannelSpecs_.size(); + } else { + return graphOutputChannelSpecsBuilder_.getCount(); + } + } + /** + * + * + *
+     * The output artifact specifications for the current processor.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.ProcessorIOSpec.GraphOutputChannelSpec graph_output_channel_specs = 4; + * + */ + public com.google.cloud.visionai.v1.ProcessorIOSpec.GraphOutputChannelSpec + getGraphOutputChannelSpecs(int index) { + if (graphOutputChannelSpecsBuilder_ == null) { + return graphOutputChannelSpecs_.get(index); + } else { + return graphOutputChannelSpecsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * The output artifact specifications for the current processor.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.ProcessorIOSpec.GraphOutputChannelSpec graph_output_channel_specs = 4; + * + */ + public Builder setGraphOutputChannelSpecs( + int index, com.google.cloud.visionai.v1.ProcessorIOSpec.GraphOutputChannelSpec value) { + if (graphOutputChannelSpecsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureGraphOutputChannelSpecsIsMutable(); + graphOutputChannelSpecs_.set(index, value); + onChanged(); + } else { + graphOutputChannelSpecsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The output artifact specifications for the current processor.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.ProcessorIOSpec.GraphOutputChannelSpec graph_output_channel_specs = 4; + * + */ + public Builder setGraphOutputChannelSpecs( + int index, + com.google.cloud.visionai.v1.ProcessorIOSpec.GraphOutputChannelSpec.Builder + builderForValue) { + if (graphOutputChannelSpecsBuilder_ == null) { + ensureGraphOutputChannelSpecsIsMutable(); + graphOutputChannelSpecs_.set(index, builderForValue.build()); + onChanged(); + } else { + graphOutputChannelSpecsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The output artifact specifications for the current processor.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.ProcessorIOSpec.GraphOutputChannelSpec graph_output_channel_specs = 4; + * + */ + public Builder addGraphOutputChannelSpecs( + com.google.cloud.visionai.v1.ProcessorIOSpec.GraphOutputChannelSpec value) { + if (graphOutputChannelSpecsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureGraphOutputChannelSpecsIsMutable(); + graphOutputChannelSpecs_.add(value); + onChanged(); + } else { + graphOutputChannelSpecsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * The output artifact specifications for the current processor.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.ProcessorIOSpec.GraphOutputChannelSpec graph_output_channel_specs = 4; + * + */ + public Builder addGraphOutputChannelSpecs( + int index, com.google.cloud.visionai.v1.ProcessorIOSpec.GraphOutputChannelSpec value) { + if (graphOutputChannelSpecsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureGraphOutputChannelSpecsIsMutable(); + graphOutputChannelSpecs_.add(index, value); + onChanged(); + } else { + graphOutputChannelSpecsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The output artifact specifications for the current processor.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.ProcessorIOSpec.GraphOutputChannelSpec graph_output_channel_specs = 4; + * + */ + public Builder addGraphOutputChannelSpecs( + com.google.cloud.visionai.v1.ProcessorIOSpec.GraphOutputChannelSpec.Builder + builderForValue) { + if (graphOutputChannelSpecsBuilder_ == null) { + ensureGraphOutputChannelSpecsIsMutable(); + graphOutputChannelSpecs_.add(builderForValue.build()); + onChanged(); + } else { + graphOutputChannelSpecsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The output artifact specifications for the current processor.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.ProcessorIOSpec.GraphOutputChannelSpec graph_output_channel_specs = 4; + * + */ + public Builder addGraphOutputChannelSpecs( + int index, + com.google.cloud.visionai.v1.ProcessorIOSpec.GraphOutputChannelSpec.Builder + builderForValue) { + if (graphOutputChannelSpecsBuilder_ == null) { + ensureGraphOutputChannelSpecsIsMutable(); + graphOutputChannelSpecs_.add(index, builderForValue.build()); + onChanged(); + } else { + graphOutputChannelSpecsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The output artifact specifications for the current processor.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.ProcessorIOSpec.GraphOutputChannelSpec graph_output_channel_specs = 4; + * + */ + public Builder addAllGraphOutputChannelSpecs( + java.lang.Iterable< + ? extends com.google.cloud.visionai.v1.ProcessorIOSpec.GraphOutputChannelSpec> + values) { + if (graphOutputChannelSpecsBuilder_ == null) { + ensureGraphOutputChannelSpecsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, graphOutputChannelSpecs_); + onChanged(); + } else { + graphOutputChannelSpecsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * The output artifact specifications for the current processor.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.ProcessorIOSpec.GraphOutputChannelSpec graph_output_channel_specs = 4; + * + */ + public Builder clearGraphOutputChannelSpecs() { + if (graphOutputChannelSpecsBuilder_ == null) { + graphOutputChannelSpecs_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + graphOutputChannelSpecsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The output artifact specifications for the current processor.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.ProcessorIOSpec.GraphOutputChannelSpec graph_output_channel_specs = 4; + * + */ + public Builder removeGraphOutputChannelSpecs(int index) { + if (graphOutputChannelSpecsBuilder_ == null) { + ensureGraphOutputChannelSpecsIsMutable(); + graphOutputChannelSpecs_.remove(index); + onChanged(); + } else { + graphOutputChannelSpecsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * The output artifact specifications for the current processor.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.ProcessorIOSpec.GraphOutputChannelSpec graph_output_channel_specs = 4; + * + */ + public com.google.cloud.visionai.v1.ProcessorIOSpec.GraphOutputChannelSpec.Builder + getGraphOutputChannelSpecsBuilder(int index) { + return getGraphOutputChannelSpecsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * The output artifact specifications for the current processor.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.ProcessorIOSpec.GraphOutputChannelSpec graph_output_channel_specs = 4; + * + */ + public com.google.cloud.visionai.v1.ProcessorIOSpec.GraphOutputChannelSpecOrBuilder + getGraphOutputChannelSpecsOrBuilder(int index) { + if (graphOutputChannelSpecsBuilder_ == null) { + return graphOutputChannelSpecs_.get(index); + } else { + return graphOutputChannelSpecsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * The output artifact specifications for the current processor.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.ProcessorIOSpec.GraphOutputChannelSpec graph_output_channel_specs = 4; + * + */ + public java.util.List< + ? extends com.google.cloud.visionai.v1.ProcessorIOSpec.GraphOutputChannelSpecOrBuilder> + getGraphOutputChannelSpecsOrBuilderList() { + if (graphOutputChannelSpecsBuilder_ != null) { + return graphOutputChannelSpecsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(graphOutputChannelSpecs_); + } + } + /** + * + * + *
+     * The output artifact specifications for the current processor.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.ProcessorIOSpec.GraphOutputChannelSpec graph_output_channel_specs = 4; + * + */ + public com.google.cloud.visionai.v1.ProcessorIOSpec.GraphOutputChannelSpec.Builder + addGraphOutputChannelSpecsBuilder() { + return getGraphOutputChannelSpecsFieldBuilder() + .addBuilder( + com.google.cloud.visionai.v1.ProcessorIOSpec.GraphOutputChannelSpec + .getDefaultInstance()); + } + /** + * + * + *
+     * The output artifact specifications for the current processor.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.ProcessorIOSpec.GraphOutputChannelSpec graph_output_channel_specs = 4; + * + */ + public com.google.cloud.visionai.v1.ProcessorIOSpec.GraphOutputChannelSpec.Builder + addGraphOutputChannelSpecsBuilder(int index) { + return getGraphOutputChannelSpecsFieldBuilder() + .addBuilder( + index, + com.google.cloud.visionai.v1.ProcessorIOSpec.GraphOutputChannelSpec + .getDefaultInstance()); + } + /** + * + * + *
+     * The output artifact specifications for the current processor.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.ProcessorIOSpec.GraphOutputChannelSpec graph_output_channel_specs = 4; + * + */ + public java.util.List< + com.google.cloud.visionai.v1.ProcessorIOSpec.GraphOutputChannelSpec.Builder> + getGraphOutputChannelSpecsBuilderList() { + return getGraphOutputChannelSpecsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.visionai.v1.ProcessorIOSpec.GraphOutputChannelSpec, + com.google.cloud.visionai.v1.ProcessorIOSpec.GraphOutputChannelSpec.Builder, + com.google.cloud.visionai.v1.ProcessorIOSpec.GraphOutputChannelSpecOrBuilder> + getGraphOutputChannelSpecsFieldBuilder() { + if (graphOutputChannelSpecsBuilder_ == null) { + graphOutputChannelSpecsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.visionai.v1.ProcessorIOSpec.GraphOutputChannelSpec, + com.google.cloud.visionai.v1.ProcessorIOSpec.GraphOutputChannelSpec.Builder, + com.google.cloud.visionai.v1.ProcessorIOSpec.GraphOutputChannelSpecOrBuilder>( + graphOutputChannelSpecs_, + ((bitField0_ & 0x00000002) != 0), + getParentForChildren(), + isClean()); + graphOutputChannelSpecs_ = null; + } + return graphOutputChannelSpecsBuilder_; + } + + private java.util.List< + com.google.cloud.visionai.v1.ProcessorIOSpec.InstanceResourceInputBindingSpec> + instanceResourceInputBindingSpecs_ = java.util.Collections.emptyList(); + + private void ensureInstanceResourceInputBindingSpecsIsMutable() { + if (!((bitField0_ & 0x00000004) != 0)) { + instanceResourceInputBindingSpecs_ = + new java.util.ArrayList< + com.google.cloud.visionai.v1.ProcessorIOSpec.InstanceResourceInputBindingSpec>( + instanceResourceInputBindingSpecs_); + bitField0_ |= 0x00000004; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.visionai.v1.ProcessorIOSpec.InstanceResourceInputBindingSpec, + com.google.cloud.visionai.v1.ProcessorIOSpec.InstanceResourceInputBindingSpec.Builder, + com.google.cloud.visionai.v1.ProcessorIOSpec.InstanceResourceInputBindingSpecOrBuilder> + instanceResourceInputBindingSpecsBuilder_; + + /** + * + * + *
+     * The input resource that needs to be fed from the application instance.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.ProcessorIOSpec.InstanceResourceInputBindingSpec instance_resource_input_binding_specs = 5; + * + */ + public java.util.List< + com.google.cloud.visionai.v1.ProcessorIOSpec.InstanceResourceInputBindingSpec> + getInstanceResourceInputBindingSpecsList() { + if (instanceResourceInputBindingSpecsBuilder_ == null) { + return java.util.Collections.unmodifiableList(instanceResourceInputBindingSpecs_); + } else { + return instanceResourceInputBindingSpecsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * The input resource that needs to be fed from the application instance.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.ProcessorIOSpec.InstanceResourceInputBindingSpec instance_resource_input_binding_specs = 5; + * + */ + public int getInstanceResourceInputBindingSpecsCount() { + if (instanceResourceInputBindingSpecsBuilder_ == null) { + return instanceResourceInputBindingSpecs_.size(); + } else { + return instanceResourceInputBindingSpecsBuilder_.getCount(); + } + } + /** + * + * + *
+     * The input resource that needs to be fed from the application instance.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.ProcessorIOSpec.InstanceResourceInputBindingSpec instance_resource_input_binding_specs = 5; + * + */ + public com.google.cloud.visionai.v1.ProcessorIOSpec.InstanceResourceInputBindingSpec + getInstanceResourceInputBindingSpecs(int index) { + if (instanceResourceInputBindingSpecsBuilder_ == null) { + return instanceResourceInputBindingSpecs_.get(index); + } else { + return instanceResourceInputBindingSpecsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * The input resource that needs to be fed from the application instance.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.ProcessorIOSpec.InstanceResourceInputBindingSpec instance_resource_input_binding_specs = 5; + * + */ + public Builder setInstanceResourceInputBindingSpecs( + int index, + com.google.cloud.visionai.v1.ProcessorIOSpec.InstanceResourceInputBindingSpec value) { + if (instanceResourceInputBindingSpecsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureInstanceResourceInputBindingSpecsIsMutable(); + instanceResourceInputBindingSpecs_.set(index, value); + onChanged(); + } else { + instanceResourceInputBindingSpecsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The input resource that needs to be fed from the application instance.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.ProcessorIOSpec.InstanceResourceInputBindingSpec instance_resource_input_binding_specs = 5; + * + */ + public Builder setInstanceResourceInputBindingSpecs( + int index, + com.google.cloud.visionai.v1.ProcessorIOSpec.InstanceResourceInputBindingSpec.Builder + builderForValue) { + if (instanceResourceInputBindingSpecsBuilder_ == null) { + ensureInstanceResourceInputBindingSpecsIsMutable(); + instanceResourceInputBindingSpecs_.set(index, builderForValue.build()); + onChanged(); + } else { + instanceResourceInputBindingSpecsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The input resource that needs to be fed from the application instance.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.ProcessorIOSpec.InstanceResourceInputBindingSpec instance_resource_input_binding_specs = 5; + * + */ + public Builder addInstanceResourceInputBindingSpecs( + com.google.cloud.visionai.v1.ProcessorIOSpec.InstanceResourceInputBindingSpec value) { + if (instanceResourceInputBindingSpecsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureInstanceResourceInputBindingSpecsIsMutable(); + instanceResourceInputBindingSpecs_.add(value); + onChanged(); + } else { + instanceResourceInputBindingSpecsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * The input resource that needs to be fed from the application instance.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.ProcessorIOSpec.InstanceResourceInputBindingSpec instance_resource_input_binding_specs = 5; + * + */ + public Builder addInstanceResourceInputBindingSpecs( + int index, + com.google.cloud.visionai.v1.ProcessorIOSpec.InstanceResourceInputBindingSpec value) { + if (instanceResourceInputBindingSpecsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureInstanceResourceInputBindingSpecsIsMutable(); + instanceResourceInputBindingSpecs_.add(index, value); + onChanged(); + } else { + instanceResourceInputBindingSpecsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The input resource that needs to be fed from the application instance.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.ProcessorIOSpec.InstanceResourceInputBindingSpec instance_resource_input_binding_specs = 5; + * + */ + public Builder addInstanceResourceInputBindingSpecs( + com.google.cloud.visionai.v1.ProcessorIOSpec.InstanceResourceInputBindingSpec.Builder + builderForValue) { + if (instanceResourceInputBindingSpecsBuilder_ == null) { + ensureInstanceResourceInputBindingSpecsIsMutable(); + instanceResourceInputBindingSpecs_.add(builderForValue.build()); + onChanged(); + } else { + instanceResourceInputBindingSpecsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The input resource that needs to be fed from the application instance.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.ProcessorIOSpec.InstanceResourceInputBindingSpec instance_resource_input_binding_specs = 5; + * + */ + public Builder addInstanceResourceInputBindingSpecs( + int index, + com.google.cloud.visionai.v1.ProcessorIOSpec.InstanceResourceInputBindingSpec.Builder + builderForValue) { + if (instanceResourceInputBindingSpecsBuilder_ == null) { + ensureInstanceResourceInputBindingSpecsIsMutable(); + instanceResourceInputBindingSpecs_.add(index, builderForValue.build()); + onChanged(); + } else { + instanceResourceInputBindingSpecsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The input resource that needs to be fed from the application instance.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.ProcessorIOSpec.InstanceResourceInputBindingSpec instance_resource_input_binding_specs = 5; + * + */ + public Builder addAllInstanceResourceInputBindingSpecs( + java.lang.Iterable< + ? extends + com.google.cloud.visionai.v1.ProcessorIOSpec.InstanceResourceInputBindingSpec> + values) { + if (instanceResourceInputBindingSpecsBuilder_ == null) { + ensureInstanceResourceInputBindingSpecsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, instanceResourceInputBindingSpecs_); + onChanged(); + } else { + instanceResourceInputBindingSpecsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * The input resource that needs to be fed from the application instance.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.ProcessorIOSpec.InstanceResourceInputBindingSpec instance_resource_input_binding_specs = 5; + * + */ + public Builder clearInstanceResourceInputBindingSpecs() { + if (instanceResourceInputBindingSpecsBuilder_ == null) { + instanceResourceInputBindingSpecs_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + } else { + instanceResourceInputBindingSpecsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The input resource that needs to be fed from the application instance.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.ProcessorIOSpec.InstanceResourceInputBindingSpec instance_resource_input_binding_specs = 5; + * + */ + public Builder removeInstanceResourceInputBindingSpecs(int index) { + if (instanceResourceInputBindingSpecsBuilder_ == null) { + ensureInstanceResourceInputBindingSpecsIsMutable(); + instanceResourceInputBindingSpecs_.remove(index); + onChanged(); + } else { + instanceResourceInputBindingSpecsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * The input resource that needs to be fed from the application instance.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.ProcessorIOSpec.InstanceResourceInputBindingSpec instance_resource_input_binding_specs = 5; + * + */ + public com.google.cloud.visionai.v1.ProcessorIOSpec.InstanceResourceInputBindingSpec.Builder + getInstanceResourceInputBindingSpecsBuilder(int index) { + return getInstanceResourceInputBindingSpecsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * The input resource that needs to be fed from the application instance.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.ProcessorIOSpec.InstanceResourceInputBindingSpec instance_resource_input_binding_specs = 5; + * + */ + public com.google.cloud.visionai.v1.ProcessorIOSpec.InstanceResourceInputBindingSpecOrBuilder + getInstanceResourceInputBindingSpecsOrBuilder(int index) { + if (instanceResourceInputBindingSpecsBuilder_ == null) { + return instanceResourceInputBindingSpecs_.get(index); + } else { + return instanceResourceInputBindingSpecsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * The input resource that needs to be fed from the application instance.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.ProcessorIOSpec.InstanceResourceInputBindingSpec instance_resource_input_binding_specs = 5; + * + */ + public java.util.List< + ? extends + com.google.cloud.visionai.v1.ProcessorIOSpec + .InstanceResourceInputBindingSpecOrBuilder> + getInstanceResourceInputBindingSpecsOrBuilderList() { + if (instanceResourceInputBindingSpecsBuilder_ != null) { + return instanceResourceInputBindingSpecsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(instanceResourceInputBindingSpecs_); + } + } + /** + * + * + *
+     * The input resource that needs to be fed from the application instance.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.ProcessorIOSpec.InstanceResourceInputBindingSpec instance_resource_input_binding_specs = 5; + * + */ + public com.google.cloud.visionai.v1.ProcessorIOSpec.InstanceResourceInputBindingSpec.Builder + addInstanceResourceInputBindingSpecsBuilder() { + return getInstanceResourceInputBindingSpecsFieldBuilder() + .addBuilder( + com.google.cloud.visionai.v1.ProcessorIOSpec.InstanceResourceInputBindingSpec + .getDefaultInstance()); + } + /** + * + * + *
+     * The input resource that needs to be fed from the application instance.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.ProcessorIOSpec.InstanceResourceInputBindingSpec instance_resource_input_binding_specs = 5; + * + */ + public com.google.cloud.visionai.v1.ProcessorIOSpec.InstanceResourceInputBindingSpec.Builder + addInstanceResourceInputBindingSpecsBuilder(int index) { + return getInstanceResourceInputBindingSpecsFieldBuilder() + .addBuilder( + index, + com.google.cloud.visionai.v1.ProcessorIOSpec.InstanceResourceInputBindingSpec + .getDefaultInstance()); + } + /** + * + * + *
+     * The input resource that needs to be fed from the application instance.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.ProcessorIOSpec.InstanceResourceInputBindingSpec instance_resource_input_binding_specs = 5; + * + */ + public java.util.List< + com.google.cloud.visionai.v1.ProcessorIOSpec.InstanceResourceInputBindingSpec.Builder> + getInstanceResourceInputBindingSpecsBuilderList() { + return getInstanceResourceInputBindingSpecsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.visionai.v1.ProcessorIOSpec.InstanceResourceInputBindingSpec, + com.google.cloud.visionai.v1.ProcessorIOSpec.InstanceResourceInputBindingSpec.Builder, + com.google.cloud.visionai.v1.ProcessorIOSpec.InstanceResourceInputBindingSpecOrBuilder> + getInstanceResourceInputBindingSpecsFieldBuilder() { + if (instanceResourceInputBindingSpecsBuilder_ == null) { + instanceResourceInputBindingSpecsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.visionai.v1.ProcessorIOSpec.InstanceResourceInputBindingSpec, + com.google.cloud.visionai.v1.ProcessorIOSpec.InstanceResourceInputBindingSpec + .Builder, + com.google.cloud.visionai.v1.ProcessorIOSpec + .InstanceResourceInputBindingSpecOrBuilder>( + instanceResourceInputBindingSpecs_, + ((bitField0_ & 0x00000004) != 0), + getParentForChildren(), + isClean()); + instanceResourceInputBindingSpecs_ = null; + } + return instanceResourceInputBindingSpecsBuilder_; + } + + private java.util.List< + com.google.cloud.visionai.v1.ProcessorIOSpec.InstanceResourceOutputBindingSpec> + instanceResourceOutputBindingSpecs_ = java.util.Collections.emptyList(); + + private void ensureInstanceResourceOutputBindingSpecsIsMutable() { + if (!((bitField0_ & 0x00000008) != 0)) { + instanceResourceOutputBindingSpecs_ = + new java.util.ArrayList< + com.google.cloud.visionai.v1.ProcessorIOSpec.InstanceResourceOutputBindingSpec>( + instanceResourceOutputBindingSpecs_); + bitField0_ |= 0x00000008; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.visionai.v1.ProcessorIOSpec.InstanceResourceOutputBindingSpec, + com.google.cloud.visionai.v1.ProcessorIOSpec.InstanceResourceOutputBindingSpec.Builder, + com.google.cloud.visionai.v1.ProcessorIOSpec.InstanceResourceOutputBindingSpecOrBuilder> + instanceResourceOutputBindingSpecsBuilder_; + + /** + * + * + *
+     * The output resource that the processor will generate per instance.
+     * Other than the explicitly listed output bindings here, all the processors'
+     * GraphOutputChannels can be binded to stream resource. The bind name then is
+     * the same as the GraphOutputChannel's name.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.ProcessorIOSpec.InstanceResourceOutputBindingSpec instance_resource_output_binding_specs = 6; + * + */ + public java.util.List< + com.google.cloud.visionai.v1.ProcessorIOSpec.InstanceResourceOutputBindingSpec> + getInstanceResourceOutputBindingSpecsList() { + if (instanceResourceOutputBindingSpecsBuilder_ == null) { + return java.util.Collections.unmodifiableList(instanceResourceOutputBindingSpecs_); + } else { + return instanceResourceOutputBindingSpecsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * The output resource that the processor will generate per instance.
+     * Other than the explicitly listed output bindings here, all the processors'
+     * GraphOutputChannels can be binded to stream resource. The bind name then is
+     * the same as the GraphOutputChannel's name.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.ProcessorIOSpec.InstanceResourceOutputBindingSpec instance_resource_output_binding_specs = 6; + * + */ + public int getInstanceResourceOutputBindingSpecsCount() { + if (instanceResourceOutputBindingSpecsBuilder_ == null) { + return instanceResourceOutputBindingSpecs_.size(); + } else { + return instanceResourceOutputBindingSpecsBuilder_.getCount(); + } + } + /** + * + * + *
+     * The output resource that the processor will generate per instance.
+     * Other than the explicitly listed output bindings here, all the processors'
+     * GraphOutputChannels can be binded to stream resource. The bind name then is
+     * the same as the GraphOutputChannel's name.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.ProcessorIOSpec.InstanceResourceOutputBindingSpec instance_resource_output_binding_specs = 6; + * + */ + public com.google.cloud.visionai.v1.ProcessorIOSpec.InstanceResourceOutputBindingSpec + getInstanceResourceOutputBindingSpecs(int index) { + if (instanceResourceOutputBindingSpecsBuilder_ == null) { + return instanceResourceOutputBindingSpecs_.get(index); + } else { + return instanceResourceOutputBindingSpecsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * The output resource that the processor will generate per instance.
+     * Other than the explicitly listed output bindings here, all the processors'
+     * GraphOutputChannels can be binded to stream resource. The bind name then is
+     * the same as the GraphOutputChannel's name.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.ProcessorIOSpec.InstanceResourceOutputBindingSpec instance_resource_output_binding_specs = 6; + * + */ + public Builder setInstanceResourceOutputBindingSpecs( + int index, + com.google.cloud.visionai.v1.ProcessorIOSpec.InstanceResourceOutputBindingSpec value) { + if (instanceResourceOutputBindingSpecsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureInstanceResourceOutputBindingSpecsIsMutable(); + instanceResourceOutputBindingSpecs_.set(index, value); + onChanged(); + } else { + instanceResourceOutputBindingSpecsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The output resource that the processor will generate per instance.
+     * Other than the explicitly listed output bindings here, all the processors'
+     * GraphOutputChannels can be binded to stream resource. The bind name then is
+     * the same as the GraphOutputChannel's name.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.ProcessorIOSpec.InstanceResourceOutputBindingSpec instance_resource_output_binding_specs = 6; + * + */ + public Builder setInstanceResourceOutputBindingSpecs( + int index, + com.google.cloud.visionai.v1.ProcessorIOSpec.InstanceResourceOutputBindingSpec.Builder + builderForValue) { + if (instanceResourceOutputBindingSpecsBuilder_ == null) { + ensureInstanceResourceOutputBindingSpecsIsMutable(); + instanceResourceOutputBindingSpecs_.set(index, builderForValue.build()); + onChanged(); + } else { + instanceResourceOutputBindingSpecsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The output resource that the processor will generate per instance.
+     * Other than the explicitly listed output bindings here, all the processors'
+     * GraphOutputChannels can be binded to stream resource. The bind name then is
+     * the same as the GraphOutputChannel's name.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.ProcessorIOSpec.InstanceResourceOutputBindingSpec instance_resource_output_binding_specs = 6; + * + */ + public Builder addInstanceResourceOutputBindingSpecs( + com.google.cloud.visionai.v1.ProcessorIOSpec.InstanceResourceOutputBindingSpec value) { + if (instanceResourceOutputBindingSpecsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureInstanceResourceOutputBindingSpecsIsMutable(); + instanceResourceOutputBindingSpecs_.add(value); + onChanged(); + } else { + instanceResourceOutputBindingSpecsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * The output resource that the processor will generate per instance.
+     * Other than the explicitly listed output bindings here, all the processors'
+     * GraphOutputChannels can be binded to stream resource. The bind name then is
+     * the same as the GraphOutputChannel's name.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.ProcessorIOSpec.InstanceResourceOutputBindingSpec instance_resource_output_binding_specs = 6; + * + */ + public Builder addInstanceResourceOutputBindingSpecs( + int index, + com.google.cloud.visionai.v1.ProcessorIOSpec.InstanceResourceOutputBindingSpec value) { + if (instanceResourceOutputBindingSpecsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureInstanceResourceOutputBindingSpecsIsMutable(); + instanceResourceOutputBindingSpecs_.add(index, value); + onChanged(); + } else { + instanceResourceOutputBindingSpecsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The output resource that the processor will generate per instance.
+     * Other than the explicitly listed output bindings here, all the processors'
+     * GraphOutputChannels can be binded to stream resource. The bind name then is
+     * the same as the GraphOutputChannel's name.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.ProcessorIOSpec.InstanceResourceOutputBindingSpec instance_resource_output_binding_specs = 6; + * + */ + public Builder addInstanceResourceOutputBindingSpecs( + com.google.cloud.visionai.v1.ProcessorIOSpec.InstanceResourceOutputBindingSpec.Builder + builderForValue) { + if (instanceResourceOutputBindingSpecsBuilder_ == null) { + ensureInstanceResourceOutputBindingSpecsIsMutable(); + instanceResourceOutputBindingSpecs_.add(builderForValue.build()); + onChanged(); + } else { + instanceResourceOutputBindingSpecsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The output resource that the processor will generate per instance.
+     * Other than the explicitly listed output bindings here, all the processors'
+     * GraphOutputChannels can be binded to stream resource. The bind name then is
+     * the same as the GraphOutputChannel's name.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.ProcessorIOSpec.InstanceResourceOutputBindingSpec instance_resource_output_binding_specs = 6; + * + */ + public Builder addInstanceResourceOutputBindingSpecs( + int index, + com.google.cloud.visionai.v1.ProcessorIOSpec.InstanceResourceOutputBindingSpec.Builder + builderForValue) { + if (instanceResourceOutputBindingSpecsBuilder_ == null) { + ensureInstanceResourceOutputBindingSpecsIsMutable(); + instanceResourceOutputBindingSpecs_.add(index, builderForValue.build()); + onChanged(); + } else { + instanceResourceOutputBindingSpecsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The output resource that the processor will generate per instance.
+     * Other than the explicitly listed output bindings here, all the processors'
+     * GraphOutputChannels can be binded to stream resource. The bind name then is
+     * the same as the GraphOutputChannel's name.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.ProcessorIOSpec.InstanceResourceOutputBindingSpec instance_resource_output_binding_specs = 6; + * + */ + public Builder addAllInstanceResourceOutputBindingSpecs( + java.lang.Iterable< + ? extends + com.google.cloud.visionai.v1.ProcessorIOSpec.InstanceResourceOutputBindingSpec> + values) { + if (instanceResourceOutputBindingSpecsBuilder_ == null) { + ensureInstanceResourceOutputBindingSpecsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, instanceResourceOutputBindingSpecs_); + onChanged(); + } else { + instanceResourceOutputBindingSpecsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * The output resource that the processor will generate per instance.
+     * Other than the explicitly listed output bindings here, all the processors'
+     * GraphOutputChannels can be binded to stream resource. The bind name then is
+     * the same as the GraphOutputChannel's name.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.ProcessorIOSpec.InstanceResourceOutputBindingSpec instance_resource_output_binding_specs = 6; + * + */ + public Builder clearInstanceResourceOutputBindingSpecs() { + if (instanceResourceOutputBindingSpecsBuilder_ == null) { + instanceResourceOutputBindingSpecs_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + } else { + instanceResourceOutputBindingSpecsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The output resource that the processor will generate per instance.
+     * Other than the explicitly listed output bindings here, all the processors'
+     * GraphOutputChannels can be binded to stream resource. The bind name then is
+     * the same as the GraphOutputChannel's name.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.ProcessorIOSpec.InstanceResourceOutputBindingSpec instance_resource_output_binding_specs = 6; + * + */ + public Builder removeInstanceResourceOutputBindingSpecs(int index) { + if (instanceResourceOutputBindingSpecsBuilder_ == null) { + ensureInstanceResourceOutputBindingSpecsIsMutable(); + instanceResourceOutputBindingSpecs_.remove(index); + onChanged(); + } else { + instanceResourceOutputBindingSpecsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * The output resource that the processor will generate per instance.
+     * Other than the explicitly listed output bindings here, all the processors'
+     * GraphOutputChannels can be binded to stream resource. The bind name then is
+     * the same as the GraphOutputChannel's name.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.ProcessorIOSpec.InstanceResourceOutputBindingSpec instance_resource_output_binding_specs = 6; + * + */ + public com.google.cloud.visionai.v1.ProcessorIOSpec.InstanceResourceOutputBindingSpec.Builder + getInstanceResourceOutputBindingSpecsBuilder(int index) { + return getInstanceResourceOutputBindingSpecsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * The output resource that the processor will generate per instance.
+     * Other than the explicitly listed output bindings here, all the processors'
+     * GraphOutputChannels can be binded to stream resource. The bind name then is
+     * the same as the GraphOutputChannel's name.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.ProcessorIOSpec.InstanceResourceOutputBindingSpec instance_resource_output_binding_specs = 6; + * + */ + public com.google.cloud.visionai.v1.ProcessorIOSpec.InstanceResourceOutputBindingSpecOrBuilder + getInstanceResourceOutputBindingSpecsOrBuilder(int index) { + if (instanceResourceOutputBindingSpecsBuilder_ == null) { + return instanceResourceOutputBindingSpecs_.get(index); + } else { + return instanceResourceOutputBindingSpecsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * The output resource that the processor will generate per instance.
+     * Other than the explicitly listed output bindings here, all the processors'
+     * GraphOutputChannels can be binded to stream resource. The bind name then is
+     * the same as the GraphOutputChannel's name.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.ProcessorIOSpec.InstanceResourceOutputBindingSpec instance_resource_output_binding_specs = 6; + * + */ + public java.util.List< + ? extends + com.google.cloud.visionai.v1.ProcessorIOSpec + .InstanceResourceOutputBindingSpecOrBuilder> + getInstanceResourceOutputBindingSpecsOrBuilderList() { + if (instanceResourceOutputBindingSpecsBuilder_ != null) { + return instanceResourceOutputBindingSpecsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(instanceResourceOutputBindingSpecs_); + } + } + /** + * + * + *
+     * The output resource that the processor will generate per instance.
+     * Other than the explicitly listed output bindings here, all the processors'
+     * GraphOutputChannels can be binded to stream resource. The bind name then is
+     * the same as the GraphOutputChannel's name.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.ProcessorIOSpec.InstanceResourceOutputBindingSpec instance_resource_output_binding_specs = 6; + * + */ + public com.google.cloud.visionai.v1.ProcessorIOSpec.InstanceResourceOutputBindingSpec.Builder + addInstanceResourceOutputBindingSpecsBuilder() { + return getInstanceResourceOutputBindingSpecsFieldBuilder() + .addBuilder( + com.google.cloud.visionai.v1.ProcessorIOSpec.InstanceResourceOutputBindingSpec + .getDefaultInstance()); + } + /** + * + * + *
+     * The output resource that the processor will generate per instance.
+     * Other than the explicitly listed output bindings here, all the processors'
+     * GraphOutputChannels can be binded to stream resource. The bind name then is
+     * the same as the GraphOutputChannel's name.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.ProcessorIOSpec.InstanceResourceOutputBindingSpec instance_resource_output_binding_specs = 6; + * + */ + public com.google.cloud.visionai.v1.ProcessorIOSpec.InstanceResourceOutputBindingSpec.Builder + addInstanceResourceOutputBindingSpecsBuilder(int index) { + return getInstanceResourceOutputBindingSpecsFieldBuilder() + .addBuilder( + index, + com.google.cloud.visionai.v1.ProcessorIOSpec.InstanceResourceOutputBindingSpec + .getDefaultInstance()); + } + /** + * + * + *
+     * The output resource that the processor will generate per instance.
+     * Other than the explicitly listed output bindings here, all the processors'
+     * GraphOutputChannels can be binded to stream resource. The bind name then is
+     * the same as the GraphOutputChannel's name.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.ProcessorIOSpec.InstanceResourceOutputBindingSpec instance_resource_output_binding_specs = 6; + * + */ + public java.util.List< + com.google.cloud.visionai.v1.ProcessorIOSpec.InstanceResourceOutputBindingSpec.Builder> + getInstanceResourceOutputBindingSpecsBuilderList() { + return getInstanceResourceOutputBindingSpecsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.visionai.v1.ProcessorIOSpec.InstanceResourceOutputBindingSpec, + com.google.cloud.visionai.v1.ProcessorIOSpec.InstanceResourceOutputBindingSpec.Builder, + com.google.cloud.visionai.v1.ProcessorIOSpec.InstanceResourceOutputBindingSpecOrBuilder> + getInstanceResourceOutputBindingSpecsFieldBuilder() { + if (instanceResourceOutputBindingSpecsBuilder_ == null) { + instanceResourceOutputBindingSpecsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.visionai.v1.ProcessorIOSpec.InstanceResourceOutputBindingSpec, + com.google.cloud.visionai.v1.ProcessorIOSpec.InstanceResourceOutputBindingSpec + .Builder, + com.google.cloud.visionai.v1.ProcessorIOSpec + .InstanceResourceOutputBindingSpecOrBuilder>( + instanceResourceOutputBindingSpecs_, + ((bitField0_ & 0x00000008) != 0), + getParentForChildren(), + isClean()); + instanceResourceOutputBindingSpecs_ = null; + } + return instanceResourceOutputBindingSpecsBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.ProcessorIOSpec) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.ProcessorIOSpec) + private static final com.google.cloud.visionai.v1.ProcessorIOSpec DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.ProcessorIOSpec(); + } + + public static com.google.cloud.visionai.v1.ProcessorIOSpec getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ProcessorIOSpec parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.ProcessorIOSpec getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ProcessorIOSpecOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ProcessorIOSpecOrBuilder.java new file mode 100644 index 000000000000..d4170db9d90b --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ProcessorIOSpecOrBuilder.java @@ -0,0 +1,314 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/platform.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface ProcessorIOSpecOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.ProcessorIOSpec) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * For processors with input_channel_specs, the processor must be explicitly
+   * connected to another processor.
+   * 
+ * + * + * repeated .google.cloud.visionai.v1.ProcessorIOSpec.GraphInputChannelSpec graph_input_channel_specs = 3; + * + */ + java.util.List + getGraphInputChannelSpecsList(); + /** + * + * + *
+   * For processors with input_channel_specs, the processor must be explicitly
+   * connected to another processor.
+   * 
+ * + * + * repeated .google.cloud.visionai.v1.ProcessorIOSpec.GraphInputChannelSpec graph_input_channel_specs = 3; + * + */ + com.google.cloud.visionai.v1.ProcessorIOSpec.GraphInputChannelSpec getGraphInputChannelSpecs( + int index); + /** + * + * + *
+   * For processors with input_channel_specs, the processor must be explicitly
+   * connected to another processor.
+   * 
+ * + * + * repeated .google.cloud.visionai.v1.ProcessorIOSpec.GraphInputChannelSpec graph_input_channel_specs = 3; + * + */ + int getGraphInputChannelSpecsCount(); + /** + * + * + *
+   * For processors with input_channel_specs, the processor must be explicitly
+   * connected to another processor.
+   * 
+ * + * + * repeated .google.cloud.visionai.v1.ProcessorIOSpec.GraphInputChannelSpec graph_input_channel_specs = 3; + * + */ + java.util.List< + ? extends com.google.cloud.visionai.v1.ProcessorIOSpec.GraphInputChannelSpecOrBuilder> + getGraphInputChannelSpecsOrBuilderList(); + /** + * + * + *
+   * For processors with input_channel_specs, the processor must be explicitly
+   * connected to another processor.
+   * 
+ * + * + * repeated .google.cloud.visionai.v1.ProcessorIOSpec.GraphInputChannelSpec graph_input_channel_specs = 3; + * + */ + com.google.cloud.visionai.v1.ProcessorIOSpec.GraphInputChannelSpecOrBuilder + getGraphInputChannelSpecsOrBuilder(int index); + + /** + * + * + *
+   * The output artifact specifications for the current processor.
+   * 
+ * + * + * repeated .google.cloud.visionai.v1.ProcessorIOSpec.GraphOutputChannelSpec graph_output_channel_specs = 4; + * + */ + java.util.List + getGraphOutputChannelSpecsList(); + /** + * + * + *
+   * The output artifact specifications for the current processor.
+   * 
+ * + * + * repeated .google.cloud.visionai.v1.ProcessorIOSpec.GraphOutputChannelSpec graph_output_channel_specs = 4; + * + */ + com.google.cloud.visionai.v1.ProcessorIOSpec.GraphOutputChannelSpec getGraphOutputChannelSpecs( + int index); + /** + * + * + *
+   * The output artifact specifications for the current processor.
+   * 
+ * + * + * repeated .google.cloud.visionai.v1.ProcessorIOSpec.GraphOutputChannelSpec graph_output_channel_specs = 4; + * + */ + int getGraphOutputChannelSpecsCount(); + /** + * + * + *
+   * The output artifact specifications for the current processor.
+   * 
+ * + * + * repeated .google.cloud.visionai.v1.ProcessorIOSpec.GraphOutputChannelSpec graph_output_channel_specs = 4; + * + */ + java.util.List< + ? extends com.google.cloud.visionai.v1.ProcessorIOSpec.GraphOutputChannelSpecOrBuilder> + getGraphOutputChannelSpecsOrBuilderList(); + /** + * + * + *
+   * The output artifact specifications for the current processor.
+   * 
+ * + * + * repeated .google.cloud.visionai.v1.ProcessorIOSpec.GraphOutputChannelSpec graph_output_channel_specs = 4; + * + */ + com.google.cloud.visionai.v1.ProcessorIOSpec.GraphOutputChannelSpecOrBuilder + getGraphOutputChannelSpecsOrBuilder(int index); + + /** + * + * + *
+   * The input resource that needs to be fed from the application instance.
+   * 
+ * + * + * repeated .google.cloud.visionai.v1.ProcessorIOSpec.InstanceResourceInputBindingSpec instance_resource_input_binding_specs = 5; + * + */ + java.util.List + getInstanceResourceInputBindingSpecsList(); + /** + * + * + *
+   * The input resource that needs to be fed from the application instance.
+   * 
+ * + * + * repeated .google.cloud.visionai.v1.ProcessorIOSpec.InstanceResourceInputBindingSpec instance_resource_input_binding_specs = 5; + * + */ + com.google.cloud.visionai.v1.ProcessorIOSpec.InstanceResourceInputBindingSpec + getInstanceResourceInputBindingSpecs(int index); + /** + * + * + *
+   * The input resource that needs to be fed from the application instance.
+   * 
+ * + * + * repeated .google.cloud.visionai.v1.ProcessorIOSpec.InstanceResourceInputBindingSpec instance_resource_input_binding_specs = 5; + * + */ + int getInstanceResourceInputBindingSpecsCount(); + /** + * + * + *
+   * The input resource that needs to be fed from the application instance.
+   * 
+ * + * + * repeated .google.cloud.visionai.v1.ProcessorIOSpec.InstanceResourceInputBindingSpec instance_resource_input_binding_specs = 5; + * + */ + java.util.List< + ? extends + com.google.cloud.visionai.v1.ProcessorIOSpec + .InstanceResourceInputBindingSpecOrBuilder> + getInstanceResourceInputBindingSpecsOrBuilderList(); + /** + * + * + *
+   * The input resource that needs to be fed from the application instance.
+   * 
+ * + * + * repeated .google.cloud.visionai.v1.ProcessorIOSpec.InstanceResourceInputBindingSpec instance_resource_input_binding_specs = 5; + * + */ + com.google.cloud.visionai.v1.ProcessorIOSpec.InstanceResourceInputBindingSpecOrBuilder + getInstanceResourceInputBindingSpecsOrBuilder(int index); + + /** + * + * + *
+   * The output resource that the processor will generate per instance.
+   * Other than the explicitly listed output bindings here, all the processors'
+   * GraphOutputChannels can be binded to stream resource. The bind name then is
+   * the same as the GraphOutputChannel's name.
+   * 
+ * + * + * repeated .google.cloud.visionai.v1.ProcessorIOSpec.InstanceResourceOutputBindingSpec instance_resource_output_binding_specs = 6; + * + */ + java.util.List + getInstanceResourceOutputBindingSpecsList(); + /** + * + * + *
+   * The output resource that the processor will generate per instance.
+   * Other than the explicitly listed output bindings here, all the processors'
+   * GraphOutputChannels can be binded to stream resource. The bind name then is
+   * the same as the GraphOutputChannel's name.
+   * 
+ * + * + * repeated .google.cloud.visionai.v1.ProcessorIOSpec.InstanceResourceOutputBindingSpec instance_resource_output_binding_specs = 6; + * + */ + com.google.cloud.visionai.v1.ProcessorIOSpec.InstanceResourceOutputBindingSpec + getInstanceResourceOutputBindingSpecs(int index); + /** + * + * + *
+   * The output resource that the processor will generate per instance.
+   * Other than the explicitly listed output bindings here, all the processors'
+   * GraphOutputChannels can be binded to stream resource. The bind name then is
+   * the same as the GraphOutputChannel's name.
+   * 
+ * + * + * repeated .google.cloud.visionai.v1.ProcessorIOSpec.InstanceResourceOutputBindingSpec instance_resource_output_binding_specs = 6; + * + */ + int getInstanceResourceOutputBindingSpecsCount(); + /** + * + * + *
+   * The output resource that the processor will generate per instance.
+   * Other than the explicitly listed output bindings here, all the processors'
+   * GraphOutputChannels can be binded to stream resource. The bind name then is
+   * the same as the GraphOutputChannel's name.
+   * 
+ * + * + * repeated .google.cloud.visionai.v1.ProcessorIOSpec.InstanceResourceOutputBindingSpec instance_resource_output_binding_specs = 6; + * + */ + java.util.List< + ? extends + com.google.cloud.visionai.v1.ProcessorIOSpec + .InstanceResourceOutputBindingSpecOrBuilder> + getInstanceResourceOutputBindingSpecsOrBuilderList(); + /** + * + * + *
+   * The output resource that the processor will generate per instance.
+   * Other than the explicitly listed output bindings here, all the processors'
+   * GraphOutputChannels can be binded to stream resource. The bind name then is
+   * the same as the GraphOutputChannel's name.
+   * 
+ * + * + * repeated .google.cloud.visionai.v1.ProcessorIOSpec.InstanceResourceOutputBindingSpec instance_resource_output_binding_specs = 6; + * + */ + com.google.cloud.visionai.v1.ProcessorIOSpec.InstanceResourceOutputBindingSpecOrBuilder + getInstanceResourceOutputBindingSpecsOrBuilder(int index); +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ProcessorName.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ProcessorName.java new file mode 100644 index 000000000000..0d308657dfef --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ProcessorName.java @@ -0,0 +1,223 @@ +/* + * Copyright 2024 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.visionai.v1; + +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") +public class ProcessorName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION_PROCESSOR = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/processors/{processor}"); + private volatile Map fieldValuesMap; + private final String project; + private final String location; + private final String processor; + + @Deprecated + protected ProcessorName() { + project = null; + location = null; + processor = null; + } + + private ProcessorName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + processor = Preconditions.checkNotNull(builder.getProcessor()); + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getProcessor() { + return processor; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static ProcessorName of(String project, String location, String processor) { + return newBuilder().setProject(project).setLocation(location).setProcessor(processor).build(); + } + + public static String format(String project, String location, String processor) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setProcessor(processor) + .build() + .toString(); + } + + public static ProcessorName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION_PROCESSOR.validatedMatch( + formattedString, "ProcessorName.parse: formattedString not in valid format"); + return of(matchMap.get("project"), matchMap.get("location"), matchMap.get("processor")); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List values) { + List list = new ArrayList<>(values.size()); + for (ProcessorName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION_PROCESSOR.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (project != null) { + fieldMapBuilder.put("project", project); + } + if (location != null) { + fieldMapBuilder.put("location", location); + } + if (processor != null) { + fieldMapBuilder.put("processor", processor); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION_PROCESSOR.instantiate( + "project", project, "location", location, "processor", processor); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null && getClass() == o.getClass()) { + ProcessorName that = ((ProcessorName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location) + && Objects.equals(this.processor, that.processor); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(project); + h *= 1000003; + h ^= Objects.hashCode(location); + h *= 1000003; + h ^= Objects.hashCode(processor); + return h; + } + + /** Builder for projects/{project}/locations/{location}/processors/{processor}. */ + public static class Builder { + private String project; + private String location; + private String processor; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getProcessor() { + return processor; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setProcessor(String processor) { + this.processor = processor; + return this; + } + + private Builder(ProcessorName processorName) { + this.project = processorName.project; + this.location = processorName.location; + this.processor = processorName.processor; + } + + public ProcessorName build() { + return new ProcessorName(this); + } + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ProcessorOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ProcessorOrBuilder.java new file mode 100644 index 000000000000..e935e8cb62ff --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ProcessorOrBuilder.java @@ -0,0 +1,562 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/platform.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface ProcessorOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.Processor) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * name of resource.
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * name of resource.
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Output only. [Output only] Create timestamp.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + /** + * + * + *
+   * Output only. [Output only] Create timestamp.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + * + * + *
+   * Output only. [Output only] Create timestamp.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. [Output only] Update timestamp.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + /** + * + * + *
+   * Output only. [Output only] Update timestamp.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + /** + * + * + *
+   * Output only. [Output only] Update timestamp.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); + + /** + * + * + *
+   * Labels as key value pairs.
+   * 
+ * + * map<string, string> labels = 4; + */ + int getLabelsCount(); + /** + * + * + *
+   * Labels as key value pairs.
+   * 
+ * + * map<string, string> labels = 4; + */ + boolean containsLabels(java.lang.String key); + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Deprecated + java.util.Map getLabels(); + /** + * + * + *
+   * Labels as key value pairs.
+   * 
+ * + * map<string, string> labels = 4; + */ + java.util.Map getLabelsMap(); + /** + * + * + *
+   * Labels as key value pairs.
+   * 
+ * + * map<string, string> labels = 4; + */ + /* nullable */ + java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue); + /** + * + * + *
+   * Labels as key value pairs.
+   * 
+ * + * map<string, string> labels = 4; + */ + java.lang.String getLabelsOrThrow(java.lang.String key); + + /** + * + * + *
+   * Required. A user friendly display name for the processor.
+   * 
+ * + * string display_name = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The displayName. + */ + java.lang.String getDisplayName(); + /** + * + * + *
+   * Required. A user friendly display name for the processor.
+   * 
+ * + * string display_name = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for displayName. + */ + com.google.protobuf.ByteString getDisplayNameBytes(); + + /** + * + * + *
+   * Illustrative sentences for describing the functionality of the processor.
+   * 
+ * + * string description = 10; + * + * @return The description. + */ + java.lang.String getDescription(); + /** + * + * + *
+   * Illustrative sentences for describing the functionality of the processor.
+   * 
+ * + * string description = 10; + * + * @return The bytes for description. + */ + com.google.protobuf.ByteString getDescriptionBytes(); + + /** + * + * + *
+   * Output only. Processor Type.
+   * 
+ * + * + * .google.cloud.visionai.v1.Processor.ProcessorType processor_type = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for processorType. + */ + int getProcessorTypeValue(); + /** + * + * + *
+   * Output only. Processor Type.
+   * 
+ * + * + * .google.cloud.visionai.v1.Processor.ProcessorType processor_type = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The processorType. + */ + com.google.cloud.visionai.v1.Processor.ProcessorType getProcessorType(); + + /** + * + * + *
+   * Model Type.
+   * 
+ * + * .google.cloud.visionai.v1.ModelType model_type = 13; + * + * @return The enum numeric value on the wire for modelType. + */ + int getModelTypeValue(); + /** + * + * + *
+   * Model Type.
+   * 
+ * + * .google.cloud.visionai.v1.ModelType model_type = 13; + * + * @return The modelType. + */ + com.google.cloud.visionai.v1.ModelType getModelType(); + + /** + * + * + *
+   * Source info for customer created processor.
+   * 
+ * + * .google.cloud.visionai.v1.CustomProcessorSourceInfo custom_processor_source_info = 7; + * + * + * @return Whether the customProcessorSourceInfo field is set. + */ + boolean hasCustomProcessorSourceInfo(); + /** + * + * + *
+   * Source info for customer created processor.
+   * 
+ * + * .google.cloud.visionai.v1.CustomProcessorSourceInfo custom_processor_source_info = 7; + * + * + * @return The customProcessorSourceInfo. + */ + com.google.cloud.visionai.v1.CustomProcessorSourceInfo getCustomProcessorSourceInfo(); + /** + * + * + *
+   * Source info for customer created processor.
+   * 
+ * + * .google.cloud.visionai.v1.CustomProcessorSourceInfo custom_processor_source_info = 7; + * + */ + com.google.cloud.visionai.v1.CustomProcessorSourceInfoOrBuilder + getCustomProcessorSourceInfoOrBuilder(); + + /** + * + * + *
+   * Output only. State of the Processor.
+   * 
+ * + * + * .google.cloud.visionai.v1.Processor.ProcessorState state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + int getStateValue(); + /** + * + * + *
+   * Output only. State of the Processor.
+   * 
+ * + * + * .google.cloud.visionai.v1.Processor.ProcessorState state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + com.google.cloud.visionai.v1.Processor.ProcessorState getState(); + + /** + * + * + *
+   * Output only. [Output only] The input / output specifications of a
+   * processor, each type of processor has fixed input / output specs which
+   * cannot be altered by customer.
+   * 
+ * + * + * .google.cloud.visionai.v1.ProcessorIOSpec processor_io_spec = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the processorIoSpec field is set. + */ + boolean hasProcessorIoSpec(); + /** + * + * + *
+   * Output only. [Output only] The input / output specifications of a
+   * processor, each type of processor has fixed input / output specs which
+   * cannot be altered by customer.
+   * 
+ * + * + * .google.cloud.visionai.v1.ProcessorIOSpec processor_io_spec = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The processorIoSpec. + */ + com.google.cloud.visionai.v1.ProcessorIOSpec getProcessorIoSpec(); + /** + * + * + *
+   * Output only. [Output only] The input / output specifications of a
+   * processor, each type of processor has fixed input / output specs which
+   * cannot be altered by customer.
+   * 
+ * + * + * .google.cloud.visionai.v1.ProcessorIOSpec processor_io_spec = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.visionai.v1.ProcessorIOSpecOrBuilder getProcessorIoSpecOrBuilder(); + + /** + * + * + *
+   * Output only. The corresponding configuration can be used in the Application
+   * to customize the behavior of the processor.
+   * 
+ * + * string configuration_typeurl = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The configurationTypeurl. + */ + java.lang.String getConfigurationTypeurl(); + /** + * + * + *
+   * Output only. The corresponding configuration can be used in the Application
+   * to customize the behavior of the processor.
+   * 
+ * + * string configuration_typeurl = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for configurationTypeurl. + */ + com.google.protobuf.ByteString getConfigurationTypeurlBytes(); + + /** + * + * repeated .google.cloud.visionai.v1.StreamAnnotationType supported_annotation_types = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return A list containing the supportedAnnotationTypes. + */ + java.util.List + getSupportedAnnotationTypesList(); + /** + * + * repeated .google.cloud.visionai.v1.StreamAnnotationType supported_annotation_types = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The count of supportedAnnotationTypes. + */ + int getSupportedAnnotationTypesCount(); + /** + * + * repeated .google.cloud.visionai.v1.StreamAnnotationType supported_annotation_types = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param index The index of the element to return. + * @return The supportedAnnotationTypes at the given index. + */ + com.google.cloud.visionai.v1.StreamAnnotationType getSupportedAnnotationTypes(int index); + /** + * + * repeated .google.cloud.visionai.v1.StreamAnnotationType supported_annotation_types = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return A list containing the enum numeric values on the wire for supportedAnnotationTypes. + */ + java.util.List getSupportedAnnotationTypesValueList(); + /** + * + * repeated .google.cloud.visionai.v1.StreamAnnotationType supported_annotation_types = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param index The index of the value to return. + * @return The enum numeric value on the wire of supportedAnnotationTypes at the given index. + */ + int getSupportedAnnotationTypesValue(int index); + + /** + * + * + *
+   * Indicates if the processor supports post processing.
+   * 
+ * + * bool supports_post_processing = 17; + * + * @return The supportsPostProcessing. + */ + boolean getSupportsPostProcessing(); + + /** + * + * + *
+   * Which instance types this processor supports; if empty, this default to
+   * STREAMING_PREDICTION.
+   * 
+ * + * repeated .google.cloud.visionai.v1.Instance.InstanceType supported_instance_types = 18; + * + * + * @return A list containing the supportedInstanceTypes. + */ + java.util.List + getSupportedInstanceTypesList(); + /** + * + * + *
+   * Which instance types this processor supports; if empty, this default to
+   * STREAMING_PREDICTION.
+   * 
+ * + * repeated .google.cloud.visionai.v1.Instance.InstanceType supported_instance_types = 18; + * + * + * @return The count of supportedInstanceTypes. + */ + int getSupportedInstanceTypesCount(); + /** + * + * + *
+   * Which instance types this processor supports; if empty, this default to
+   * STREAMING_PREDICTION.
+   * 
+ * + * repeated .google.cloud.visionai.v1.Instance.InstanceType supported_instance_types = 18; + * + * + * @param index The index of the element to return. + * @return The supportedInstanceTypes at the given index. + */ + com.google.cloud.visionai.v1.Instance.InstanceType getSupportedInstanceTypes(int index); + /** + * + * + *
+   * Which instance types this processor supports; if empty, this default to
+   * STREAMING_PREDICTION.
+   * 
+ * + * repeated .google.cloud.visionai.v1.Instance.InstanceType supported_instance_types = 18; + * + * + * @return A list containing the enum numeric values on the wire for supportedInstanceTypes. + */ + java.util.List getSupportedInstanceTypesValueList(); + /** + * + * + *
+   * Which instance types this processor supports; if empty, this default to
+   * STREAMING_PREDICTION.
+   * 
+ * + * repeated .google.cloud.visionai.v1.Instance.InstanceType supported_instance_types = 18; + * + * + * @param index The index of the value to return. + * @return The enum numeric value on the wire of supportedInstanceTypes at the given index. + */ + int getSupportedInstanceTypesValue(int index); +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ProductRecognizerConfig.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ProductRecognizerConfig.java new file mode 100644 index 000000000000..79d200f46cde --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ProductRecognizerConfig.java @@ -0,0 +1,725 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/platform.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * Message describing ProductRecognizerConfig.
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.ProductRecognizerConfig} + */ +public final class ProductRecognizerConfig extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.ProductRecognizerConfig) + ProductRecognizerConfigOrBuilder { + private static final long serialVersionUID = 0L; + // Use ProductRecognizerConfig.newBuilder() to construct. + private ProductRecognizerConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ProductRecognizerConfig() { + retailEndpoint_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ProductRecognizerConfig(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_ProductRecognizerConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_ProductRecognizerConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.ProductRecognizerConfig.class, + com.google.cloud.visionai.v1.ProductRecognizerConfig.Builder.class); + } + + public static final int RETAIL_ENDPOINT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object retailEndpoint_ = ""; + /** + * + * + *
+   * The resource name of retail endpoint to use.
+   * 
+ * + * string retail_endpoint = 1; + * + * @return The retailEndpoint. + */ + @java.lang.Override + public java.lang.String getRetailEndpoint() { + java.lang.Object ref = retailEndpoint_; + 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(); + retailEndpoint_ = s; + return s; + } + } + /** + * + * + *
+   * The resource name of retail endpoint to use.
+   * 
+ * + * string retail_endpoint = 1; + * + * @return The bytes for retailEndpoint. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRetailEndpointBytes() { + java.lang.Object ref = retailEndpoint_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + retailEndpoint_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int RECOGNITION_CONFIDENCE_THRESHOLD_FIELD_NUMBER = 2; + private float recognitionConfidenceThreshold_ = 0F; + /** + * + * + *
+   * Confidence threshold to filter detection results. If not set, a system
+   * default value will be used.
+   * 
+ * + * float recognition_confidence_threshold = 2; + * + * @return The recognitionConfidenceThreshold. + */ + @java.lang.Override + public float getRecognitionConfidenceThreshold() { + return recognitionConfidenceThreshold_; + } + + 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(retailEndpoint_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, retailEndpoint_); + } + if (java.lang.Float.floatToRawIntBits(recognitionConfidenceThreshold_) != 0) { + output.writeFloat(2, recognitionConfidenceThreshold_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(retailEndpoint_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, retailEndpoint_); + } + if (java.lang.Float.floatToRawIntBits(recognitionConfidenceThreshold_) != 0) { + size += + com.google.protobuf.CodedOutputStream.computeFloatSize( + 2, recognitionConfidenceThreshold_); + } + size += getUnknownFields().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.visionai.v1.ProductRecognizerConfig)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.ProductRecognizerConfig other = + (com.google.cloud.visionai.v1.ProductRecognizerConfig) obj; + + if (!getRetailEndpoint().equals(other.getRetailEndpoint())) return false; + if (java.lang.Float.floatToIntBits(getRecognitionConfidenceThreshold()) + != java.lang.Float.floatToIntBits(other.getRecognitionConfidenceThreshold())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + RETAIL_ENDPOINT_FIELD_NUMBER; + hash = (53 * hash) + getRetailEndpoint().hashCode(); + hash = (37 * hash) + RECOGNITION_CONFIDENCE_THRESHOLD_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits(getRecognitionConfidenceThreshold()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.ProductRecognizerConfig parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ProductRecognizerConfig 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.visionai.v1.ProductRecognizerConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ProductRecognizerConfig 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.visionai.v1.ProductRecognizerConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ProductRecognizerConfig parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.ProductRecognizerConfig parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ProductRecognizerConfig 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.visionai.v1.ProductRecognizerConfig parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ProductRecognizerConfig 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.visionai.v1.ProductRecognizerConfig parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ProductRecognizerConfig 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.visionai.v1.ProductRecognizerConfig 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; + } + /** + * + * + *
+   * Message describing ProductRecognizerConfig.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.ProductRecognizerConfig} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.ProductRecognizerConfig) + com.google.cloud.visionai.v1.ProductRecognizerConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_ProductRecognizerConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_ProductRecognizerConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.ProductRecognizerConfig.class, + com.google.cloud.visionai.v1.ProductRecognizerConfig.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.ProductRecognizerConfig.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + retailEndpoint_ = ""; + recognitionConfidenceThreshold_ = 0F; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_ProductRecognizerConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ProductRecognizerConfig getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.ProductRecognizerConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ProductRecognizerConfig build() { + com.google.cloud.visionai.v1.ProductRecognizerConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ProductRecognizerConfig buildPartial() { + com.google.cloud.visionai.v1.ProductRecognizerConfig result = + new com.google.cloud.visionai.v1.ProductRecognizerConfig(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.visionai.v1.ProductRecognizerConfig result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.retailEndpoint_ = retailEndpoint_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.recognitionConfidenceThreshold_ = recognitionConfidenceThreshold_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.ProductRecognizerConfig) { + return mergeFrom((com.google.cloud.visionai.v1.ProductRecognizerConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.ProductRecognizerConfig other) { + if (other == com.google.cloud.visionai.v1.ProductRecognizerConfig.getDefaultInstance()) + return this; + if (!other.getRetailEndpoint().isEmpty()) { + retailEndpoint_ = other.retailEndpoint_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getRecognitionConfidenceThreshold() != 0F) { + setRecognitionConfidenceThreshold(other.getRecognitionConfidenceThreshold()); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + retailEndpoint_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 21: + { + recognitionConfidenceThreshold_ = input.readFloat(); + bitField0_ |= 0x00000002; + break; + } // case 21 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object retailEndpoint_ = ""; + /** + * + * + *
+     * The resource name of retail endpoint to use.
+     * 
+ * + * string retail_endpoint = 1; + * + * @return The retailEndpoint. + */ + public java.lang.String getRetailEndpoint() { + java.lang.Object ref = retailEndpoint_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + retailEndpoint_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The resource name of retail endpoint to use.
+     * 
+ * + * string retail_endpoint = 1; + * + * @return The bytes for retailEndpoint. + */ + public com.google.protobuf.ByteString getRetailEndpointBytes() { + java.lang.Object ref = retailEndpoint_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + retailEndpoint_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The resource name of retail endpoint to use.
+     * 
+ * + * string retail_endpoint = 1; + * + * @param value The retailEndpoint to set. + * @return This builder for chaining. + */ + public Builder setRetailEndpoint(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + retailEndpoint_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The resource name of retail endpoint to use.
+     * 
+ * + * string retail_endpoint = 1; + * + * @return This builder for chaining. + */ + public Builder clearRetailEndpoint() { + retailEndpoint_ = getDefaultInstance().getRetailEndpoint(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * The resource name of retail endpoint to use.
+     * 
+ * + * string retail_endpoint = 1; + * + * @param value The bytes for retailEndpoint to set. + * @return This builder for chaining. + */ + public Builder setRetailEndpointBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + retailEndpoint_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private float recognitionConfidenceThreshold_; + /** + * + * + *
+     * Confidence threshold to filter detection results. If not set, a system
+     * default value will be used.
+     * 
+ * + * float recognition_confidence_threshold = 2; + * + * @return The recognitionConfidenceThreshold. + */ + @java.lang.Override + public float getRecognitionConfidenceThreshold() { + return recognitionConfidenceThreshold_; + } + /** + * + * + *
+     * Confidence threshold to filter detection results. If not set, a system
+     * default value will be used.
+     * 
+ * + * float recognition_confidence_threshold = 2; + * + * @param value The recognitionConfidenceThreshold to set. + * @return This builder for chaining. + */ + public Builder setRecognitionConfidenceThreshold(float value) { + + recognitionConfidenceThreshold_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Confidence threshold to filter detection results. If not set, a system
+     * default value will be used.
+     * 
+ * + * float recognition_confidence_threshold = 2; + * + * @return This builder for chaining. + */ + public Builder clearRecognitionConfidenceThreshold() { + bitField0_ = (bitField0_ & ~0x00000002); + recognitionConfidenceThreshold_ = 0F; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.ProductRecognizerConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.ProductRecognizerConfig) + private static final com.google.cloud.visionai.v1.ProductRecognizerConfig DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.ProductRecognizerConfig(); + } + + public static com.google.cloud.visionai.v1.ProductRecognizerConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ProductRecognizerConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.ProductRecognizerConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ProductRecognizerConfigOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ProductRecognizerConfigOrBuilder.java new file mode 100644 index 000000000000..e1f6afbd042c --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ProductRecognizerConfigOrBuilder.java @@ -0,0 +1,65 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/platform.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface ProductRecognizerConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.ProductRecognizerConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The resource name of retail endpoint to use.
+   * 
+ * + * string retail_endpoint = 1; + * + * @return The retailEndpoint. + */ + java.lang.String getRetailEndpoint(); + /** + * + * + *
+   * The resource name of retail endpoint to use.
+   * 
+ * + * string retail_endpoint = 1; + * + * @return The bytes for retailEndpoint. + */ + com.google.protobuf.ByteString getRetailEndpointBytes(); + + /** + * + * + *
+   * Confidence threshold to filter detection results. If not set, a system
+   * default value will be used.
+   * 
+ * + * float recognition_confidence_threshold = 2; + * + * @return The recognitionConfidenceThreshold. + */ + float getRecognitionConfidenceThreshold(); +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/RawImageDescriptor.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/RawImageDescriptor.java new file mode 100644 index 000000000000..58c826b544e6 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/RawImageDescriptor.java @@ -0,0 +1,811 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/streaming_resources.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * The descriptor for a raw image.
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.RawImageDescriptor} + */ +public final class RawImageDescriptor extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.RawImageDescriptor) + RawImageDescriptorOrBuilder { + private static final long serialVersionUID = 0L; + // Use RawImageDescriptor.newBuilder() to construct. + private RawImageDescriptor(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private RawImageDescriptor() { + format_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new RawImageDescriptor(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.StreamingResourcesProto + .internal_static_google_cloud_visionai_v1_RawImageDescriptor_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.StreamingResourcesProto + .internal_static_google_cloud_visionai_v1_RawImageDescriptor_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.RawImageDescriptor.class, + com.google.cloud.visionai.v1.RawImageDescriptor.Builder.class); + } + + public static final int FORMAT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object format_ = ""; + /** + * + * + *
+   * Raw image format. Its possible values are: "srgb".
+   * 
+ * + * string format = 1; + * + * @return The format. + */ + @java.lang.Override + public java.lang.String getFormat() { + java.lang.Object ref = format_; + 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(); + format_ = s; + return s; + } + } + /** + * + * + *
+   * Raw image format. Its possible values are: "srgb".
+   * 
+ * + * string format = 1; + * + * @return The bytes for format. + */ + @java.lang.Override + public com.google.protobuf.ByteString getFormatBytes() { + java.lang.Object ref = format_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + format_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int HEIGHT_FIELD_NUMBER = 2; + private int height_ = 0; + /** + * + * + *
+   * The height of the image.
+   * 
+ * + * int32 height = 2; + * + * @return The height. + */ + @java.lang.Override + public int getHeight() { + return height_; + } + + public static final int WIDTH_FIELD_NUMBER = 3; + private int width_ = 0; + /** + * + * + *
+   * The width of the image.
+   * 
+ * + * int32 width = 3; + * + * @return The width. + */ + @java.lang.Override + public int getWidth() { + return width_; + } + + 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(format_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, format_); + } + if (height_ != 0) { + output.writeInt32(2, height_); + } + if (width_ != 0) { + output.writeInt32(3, width_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(format_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, format_); + } + if (height_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, height_); + } + if (width_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(3, width_); + } + size += getUnknownFields().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.visionai.v1.RawImageDescriptor)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.RawImageDescriptor other = + (com.google.cloud.visionai.v1.RawImageDescriptor) obj; + + if (!getFormat().equals(other.getFormat())) return false; + if (getHeight() != other.getHeight()) return false; + if (getWidth() != other.getWidth()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + FORMAT_FIELD_NUMBER; + hash = (53 * hash) + getFormat().hashCode(); + hash = (37 * hash) + HEIGHT_FIELD_NUMBER; + hash = (53 * hash) + getHeight(); + hash = (37 * hash) + WIDTH_FIELD_NUMBER; + hash = (53 * hash) + getWidth(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.RawImageDescriptor parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.RawImageDescriptor 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.visionai.v1.RawImageDescriptor parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.RawImageDescriptor 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.visionai.v1.RawImageDescriptor parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.RawImageDescriptor parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.RawImageDescriptor parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.RawImageDescriptor 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.visionai.v1.RawImageDescriptor parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.RawImageDescriptor 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.visionai.v1.RawImageDescriptor parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.RawImageDescriptor 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.visionai.v1.RawImageDescriptor 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 descriptor for a raw image.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.RawImageDescriptor} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.RawImageDescriptor) + com.google.cloud.visionai.v1.RawImageDescriptorOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.StreamingResourcesProto + .internal_static_google_cloud_visionai_v1_RawImageDescriptor_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.StreamingResourcesProto + .internal_static_google_cloud_visionai_v1_RawImageDescriptor_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.RawImageDescriptor.class, + com.google.cloud.visionai.v1.RawImageDescriptor.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.RawImageDescriptor.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + format_ = ""; + height_ = 0; + width_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.StreamingResourcesProto + .internal_static_google_cloud_visionai_v1_RawImageDescriptor_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.RawImageDescriptor getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.RawImageDescriptor.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.RawImageDescriptor build() { + com.google.cloud.visionai.v1.RawImageDescriptor result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.RawImageDescriptor buildPartial() { + com.google.cloud.visionai.v1.RawImageDescriptor result = + new com.google.cloud.visionai.v1.RawImageDescriptor(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.visionai.v1.RawImageDescriptor result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.format_ = format_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.height_ = height_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.width_ = width_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.RawImageDescriptor) { + return mergeFrom((com.google.cloud.visionai.v1.RawImageDescriptor) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.RawImageDescriptor other) { + if (other == com.google.cloud.visionai.v1.RawImageDescriptor.getDefaultInstance()) + return this; + if (!other.getFormat().isEmpty()) { + format_ = other.format_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getHeight() != 0) { + setHeight(other.getHeight()); + } + if (other.getWidth() != 0) { + setWidth(other.getWidth()); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + format_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + height_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 24: + { + width_ = input.readInt32(); + bitField0_ |= 0x00000004; + break; + } // case 24 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object format_ = ""; + /** + * + * + *
+     * Raw image format. Its possible values are: "srgb".
+     * 
+ * + * string format = 1; + * + * @return The format. + */ + public java.lang.String getFormat() { + java.lang.Object ref = format_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + format_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Raw image format. Its possible values are: "srgb".
+     * 
+ * + * string format = 1; + * + * @return The bytes for format. + */ + public com.google.protobuf.ByteString getFormatBytes() { + java.lang.Object ref = format_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + format_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Raw image format. Its possible values are: "srgb".
+     * 
+ * + * string format = 1; + * + * @param value The format to set. + * @return This builder for chaining. + */ + public Builder setFormat(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + format_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Raw image format. Its possible values are: "srgb".
+     * 
+ * + * string format = 1; + * + * @return This builder for chaining. + */ + public Builder clearFormat() { + format_ = getDefaultInstance().getFormat(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Raw image format. Its possible values are: "srgb".
+     * 
+ * + * string format = 1; + * + * @param value The bytes for format to set. + * @return This builder for chaining. + */ + public Builder setFormatBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + format_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private int height_; + /** + * + * + *
+     * The height of the image.
+     * 
+ * + * int32 height = 2; + * + * @return The height. + */ + @java.lang.Override + public int getHeight() { + return height_; + } + /** + * + * + *
+     * The height of the image.
+     * 
+ * + * int32 height = 2; + * + * @param value The height to set. + * @return This builder for chaining. + */ + public Builder setHeight(int value) { + + height_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * The height of the image.
+     * 
+ * + * int32 height = 2; + * + * @return This builder for chaining. + */ + public Builder clearHeight() { + bitField0_ = (bitField0_ & ~0x00000002); + height_ = 0; + onChanged(); + return this; + } + + private int width_; + /** + * + * + *
+     * The width of the image.
+     * 
+ * + * int32 width = 3; + * + * @return The width. + */ + @java.lang.Override + public int getWidth() { + return width_; + } + /** + * + * + *
+     * The width of the image.
+     * 
+ * + * int32 width = 3; + * + * @param value The width to set. + * @return This builder for chaining. + */ + public Builder setWidth(int value) { + + width_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * The width of the image.
+     * 
+ * + * int32 width = 3; + * + * @return This builder for chaining. + */ + public Builder clearWidth() { + bitField0_ = (bitField0_ & ~0x00000004); + width_ = 0; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.RawImageDescriptor) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.RawImageDescriptor) + private static final com.google.cloud.visionai.v1.RawImageDescriptor DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.RawImageDescriptor(); + } + + public static com.google.cloud.visionai.v1.RawImageDescriptor getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RawImageDescriptor parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.RawImageDescriptor getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/RawImageDescriptorOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/RawImageDescriptorOrBuilder.java new file mode 100644 index 000000000000..fbfee83d7865 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/RawImageDescriptorOrBuilder.java @@ -0,0 +1,77 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/streaming_resources.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface RawImageDescriptorOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.RawImageDescriptor) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Raw image format. Its possible values are: "srgb".
+   * 
+ * + * string format = 1; + * + * @return The format. + */ + java.lang.String getFormat(); + /** + * + * + *
+   * Raw image format. Its possible values are: "srgb".
+   * 
+ * + * string format = 1; + * + * @return The bytes for format. + */ + com.google.protobuf.ByteString getFormatBytes(); + + /** + * + * + *
+   * The height of the image.
+   * 
+ * + * int32 height = 2; + * + * @return The height. + */ + int getHeight(); + + /** + * + * + *
+   * The width of the image.
+   * 
+ * + * int32 width = 3; + * + * @return The width. + */ + int getWidth(); +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ReceiveEventsControlResponse.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ReceiveEventsControlResponse.java new file mode 100644 index 000000000000..a8904a2b47dc --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ReceiveEventsControlResponse.java @@ -0,0 +1,840 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/streaming_service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * Control message for a ReceiveEventsResponse.
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.ReceiveEventsControlResponse} + */ +public final class ReceiveEventsControlResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.ReceiveEventsControlResponse) + ReceiveEventsControlResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ReceiveEventsControlResponse.newBuilder() to construct. + private ReceiveEventsControlResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ReceiveEventsControlResponse() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ReceiveEventsControlResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.StreamingServiceProto + .internal_static_google_cloud_visionai_v1_ReceiveEventsControlResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.StreamingServiceProto + .internal_static_google_cloud_visionai_v1_ReceiveEventsControlResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.ReceiveEventsControlResponse.class, + com.google.cloud.visionai.v1.ReceiveEventsControlResponse.Builder.class); + } + + private int controlCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object control_; + + public enum ControlCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + HEARTBEAT(1), + WRITES_DONE_REQUEST(2), + CONTROL_NOT_SET(0); + private final int value; + + private ControlCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static ControlCase valueOf(int value) { + return forNumber(value); + } + + public static ControlCase forNumber(int value) { + switch (value) { + case 1: + return HEARTBEAT; + case 2: + return WRITES_DONE_REQUEST; + case 0: + return CONTROL_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public ControlCase getControlCase() { + return ControlCase.forNumber(controlCase_); + } + + public static final int HEARTBEAT_FIELD_NUMBER = 1; + /** + * + * + *
+   * A server heartbeat.
+   * 
+ * + * bool heartbeat = 1; + * + * @return Whether the heartbeat field is set. + */ + @java.lang.Override + public boolean hasHeartbeat() { + return controlCase_ == 1; + } + /** + * + * + *
+   * A server heartbeat.
+   * 
+ * + * bool heartbeat = 1; + * + * @return The heartbeat. + */ + @java.lang.Override + public boolean getHeartbeat() { + if (controlCase_ == 1) { + return (java.lang.Boolean) control_; + } + return false; + } + + public static final int WRITES_DONE_REQUEST_FIELD_NUMBER = 2; + /** + * + * + *
+   * A request to the receiver to complete any final writes followed by a
+   * `WritesDone`; e.g. issue any final `CommitRequest`s.
+   *
+   * May be ignored if `WritesDone` has already been issued at any point
+   * prior to receiving this message.
+   *
+   * If `WritesDone` does not get issued, then the server will forcefully
+   * cancel the connection, and the receiver will likely receive an
+   * uninformative after `Read` returns `false` and `Finish` is called.
+   * 
+ * + * bool writes_done_request = 2; + * + * @return Whether the writesDoneRequest field is set. + */ + @java.lang.Override + public boolean hasWritesDoneRequest() { + return controlCase_ == 2; + } + /** + * + * + *
+   * A request to the receiver to complete any final writes followed by a
+   * `WritesDone`; e.g. issue any final `CommitRequest`s.
+   *
+   * May be ignored if `WritesDone` has already been issued at any point
+   * prior to receiving this message.
+   *
+   * If `WritesDone` does not get issued, then the server will forcefully
+   * cancel the connection, and the receiver will likely receive an
+   * uninformative after `Read` returns `false` and `Finish` is called.
+   * 
+ * + * bool writes_done_request = 2; + * + * @return The writesDoneRequest. + */ + @java.lang.Override + public boolean getWritesDoneRequest() { + if (controlCase_ == 2) { + return (java.lang.Boolean) control_; + } + return false; + } + + 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 (controlCase_ == 1) { + output.writeBool(1, (boolean) ((java.lang.Boolean) control_)); + } + if (controlCase_ == 2) { + output.writeBool(2, (boolean) ((java.lang.Boolean) control_)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (controlCase_ == 1) { + size += + com.google.protobuf.CodedOutputStream.computeBoolSize( + 1, (boolean) ((java.lang.Boolean) control_)); + } + if (controlCase_ == 2) { + size += + com.google.protobuf.CodedOutputStream.computeBoolSize( + 2, (boolean) ((java.lang.Boolean) control_)); + } + size += getUnknownFields().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.visionai.v1.ReceiveEventsControlResponse)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.ReceiveEventsControlResponse other = + (com.google.cloud.visionai.v1.ReceiveEventsControlResponse) obj; + + if (!getControlCase().equals(other.getControlCase())) return false; + switch (controlCase_) { + case 1: + if (getHeartbeat() != other.getHeartbeat()) return false; + break; + case 2: + if (getWritesDoneRequest() != other.getWritesDoneRequest()) return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + switch (controlCase_) { + case 1: + hash = (37 * hash) + HEARTBEAT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getHeartbeat()); + break; + case 2: + hash = (37 * hash) + WRITES_DONE_REQUEST_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getWritesDoneRequest()); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.ReceiveEventsControlResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ReceiveEventsControlResponse 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.visionai.v1.ReceiveEventsControlResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ReceiveEventsControlResponse 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.visionai.v1.ReceiveEventsControlResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ReceiveEventsControlResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.ReceiveEventsControlResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ReceiveEventsControlResponse 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.visionai.v1.ReceiveEventsControlResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ReceiveEventsControlResponse 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.visionai.v1.ReceiveEventsControlResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ReceiveEventsControlResponse 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.visionai.v1.ReceiveEventsControlResponse 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; + } + /** + * + * + *
+   * Control message for a ReceiveEventsResponse.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.ReceiveEventsControlResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.ReceiveEventsControlResponse) + com.google.cloud.visionai.v1.ReceiveEventsControlResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.StreamingServiceProto + .internal_static_google_cloud_visionai_v1_ReceiveEventsControlResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.StreamingServiceProto + .internal_static_google_cloud_visionai_v1_ReceiveEventsControlResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.ReceiveEventsControlResponse.class, + com.google.cloud.visionai.v1.ReceiveEventsControlResponse.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.ReceiveEventsControlResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + controlCase_ = 0; + control_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.StreamingServiceProto + .internal_static_google_cloud_visionai_v1_ReceiveEventsControlResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ReceiveEventsControlResponse getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.ReceiveEventsControlResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ReceiveEventsControlResponse build() { + com.google.cloud.visionai.v1.ReceiveEventsControlResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ReceiveEventsControlResponse buildPartial() { + com.google.cloud.visionai.v1.ReceiveEventsControlResponse result = + new com.google.cloud.visionai.v1.ReceiveEventsControlResponse(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.visionai.v1.ReceiveEventsControlResponse result) { + int from_bitField0_ = bitField0_; + } + + private void buildPartialOneofs( + com.google.cloud.visionai.v1.ReceiveEventsControlResponse result) { + result.controlCase_ = controlCase_; + result.control_ = this.control_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.ReceiveEventsControlResponse) { + return mergeFrom((com.google.cloud.visionai.v1.ReceiveEventsControlResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.ReceiveEventsControlResponse other) { + if (other == com.google.cloud.visionai.v1.ReceiveEventsControlResponse.getDefaultInstance()) + return this; + switch (other.getControlCase()) { + case HEARTBEAT: + { + setHeartbeat(other.getHeartbeat()); + break; + } + case WRITES_DONE_REQUEST: + { + setWritesDoneRequest(other.getWritesDoneRequest()); + break; + } + case CONTROL_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + control_ = input.readBool(); + controlCase_ = 1; + break; + } // case 8 + case 16: + { + control_ = input.readBool(); + controlCase_ = 2; + break; + } // case 16 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int controlCase_ = 0; + private java.lang.Object control_; + + public ControlCase getControlCase() { + return ControlCase.forNumber(controlCase_); + } + + public Builder clearControl() { + controlCase_ = 0; + control_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + /** + * + * + *
+     * A server heartbeat.
+     * 
+ * + * bool heartbeat = 1; + * + * @return Whether the heartbeat field is set. + */ + public boolean hasHeartbeat() { + return controlCase_ == 1; + } + /** + * + * + *
+     * A server heartbeat.
+     * 
+ * + * bool heartbeat = 1; + * + * @return The heartbeat. + */ + public boolean getHeartbeat() { + if (controlCase_ == 1) { + return (java.lang.Boolean) control_; + } + return false; + } + /** + * + * + *
+     * A server heartbeat.
+     * 
+ * + * bool heartbeat = 1; + * + * @param value The heartbeat to set. + * @return This builder for chaining. + */ + public Builder setHeartbeat(boolean value) { + + controlCase_ = 1; + control_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * A server heartbeat.
+     * 
+ * + * bool heartbeat = 1; + * + * @return This builder for chaining. + */ + public Builder clearHeartbeat() { + if (controlCase_ == 1) { + controlCase_ = 0; + control_ = null; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * A request to the receiver to complete any final writes followed by a
+     * `WritesDone`; e.g. issue any final `CommitRequest`s.
+     *
+     * May be ignored if `WritesDone` has already been issued at any point
+     * prior to receiving this message.
+     *
+     * If `WritesDone` does not get issued, then the server will forcefully
+     * cancel the connection, and the receiver will likely receive an
+     * uninformative after `Read` returns `false` and `Finish` is called.
+     * 
+ * + * bool writes_done_request = 2; + * + * @return Whether the writesDoneRequest field is set. + */ + public boolean hasWritesDoneRequest() { + return controlCase_ == 2; + } + /** + * + * + *
+     * A request to the receiver to complete any final writes followed by a
+     * `WritesDone`; e.g. issue any final `CommitRequest`s.
+     *
+     * May be ignored if `WritesDone` has already been issued at any point
+     * prior to receiving this message.
+     *
+     * If `WritesDone` does not get issued, then the server will forcefully
+     * cancel the connection, and the receiver will likely receive an
+     * uninformative after `Read` returns `false` and `Finish` is called.
+     * 
+ * + * bool writes_done_request = 2; + * + * @return The writesDoneRequest. + */ + public boolean getWritesDoneRequest() { + if (controlCase_ == 2) { + return (java.lang.Boolean) control_; + } + return false; + } + /** + * + * + *
+     * A request to the receiver to complete any final writes followed by a
+     * `WritesDone`; e.g. issue any final `CommitRequest`s.
+     *
+     * May be ignored if `WritesDone` has already been issued at any point
+     * prior to receiving this message.
+     *
+     * If `WritesDone` does not get issued, then the server will forcefully
+     * cancel the connection, and the receiver will likely receive an
+     * uninformative after `Read` returns `false` and `Finish` is called.
+     * 
+ * + * bool writes_done_request = 2; + * + * @param value The writesDoneRequest to set. + * @return This builder for chaining. + */ + public Builder setWritesDoneRequest(boolean value) { + + controlCase_ = 2; + control_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * A request to the receiver to complete any final writes followed by a
+     * `WritesDone`; e.g. issue any final `CommitRequest`s.
+     *
+     * May be ignored if `WritesDone` has already been issued at any point
+     * prior to receiving this message.
+     *
+     * If `WritesDone` does not get issued, then the server will forcefully
+     * cancel the connection, and the receiver will likely receive an
+     * uninformative after `Read` returns `false` and `Finish` is called.
+     * 
+ * + * bool writes_done_request = 2; + * + * @return This builder for chaining. + */ + public Builder clearWritesDoneRequest() { + if (controlCase_ == 2) { + controlCase_ = 0; + control_ = null; + onChanged(); + } + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.ReceiveEventsControlResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.ReceiveEventsControlResponse) + private static final com.google.cloud.visionai.v1.ReceiveEventsControlResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.ReceiveEventsControlResponse(); + } + + public static com.google.cloud.visionai.v1.ReceiveEventsControlResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ReceiveEventsControlResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.ReceiveEventsControlResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ReceiveEventsControlResponseOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ReceiveEventsControlResponseOrBuilder.java new file mode 100644 index 000000000000..7501e0e5829b --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ReceiveEventsControlResponseOrBuilder.java @@ -0,0 +1,94 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/streaming_service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface ReceiveEventsControlResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.ReceiveEventsControlResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * A server heartbeat.
+   * 
+ * + * bool heartbeat = 1; + * + * @return Whether the heartbeat field is set. + */ + boolean hasHeartbeat(); + /** + * + * + *
+   * A server heartbeat.
+   * 
+ * + * bool heartbeat = 1; + * + * @return The heartbeat. + */ + boolean getHeartbeat(); + + /** + * + * + *
+   * A request to the receiver to complete any final writes followed by a
+   * `WritesDone`; e.g. issue any final `CommitRequest`s.
+   *
+   * May be ignored if `WritesDone` has already been issued at any point
+   * prior to receiving this message.
+   *
+   * If `WritesDone` does not get issued, then the server will forcefully
+   * cancel the connection, and the receiver will likely receive an
+   * uninformative after `Read` returns `false` and `Finish` is called.
+   * 
+ * + * bool writes_done_request = 2; + * + * @return Whether the writesDoneRequest field is set. + */ + boolean hasWritesDoneRequest(); + /** + * + * + *
+   * A request to the receiver to complete any final writes followed by a
+   * `WritesDone`; e.g. issue any final `CommitRequest`s.
+   *
+   * May be ignored if `WritesDone` has already been issued at any point
+   * prior to receiving this message.
+   *
+   * If `WritesDone` does not get issued, then the server will forcefully
+   * cancel the connection, and the receiver will likely receive an
+   * uninformative after `Read` returns `false` and `Finish` is called.
+   * 
+ * + * bool writes_done_request = 2; + * + * @return The writesDoneRequest. + */ + boolean getWritesDoneRequest(); + + com.google.cloud.visionai.v1.ReceiveEventsControlResponse.ControlCase getControlCase(); +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ReceiveEventsRequest.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ReceiveEventsRequest.java new file mode 100644 index 000000000000..7745d2980842 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ReceiveEventsRequest.java @@ -0,0 +1,3288 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/streaming_service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * Request message for ReceiveEvents.
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.ReceiveEventsRequest} + */ +public final class ReceiveEventsRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.ReceiveEventsRequest) + ReceiveEventsRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ReceiveEventsRequest.newBuilder() to construct. + private ReceiveEventsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ReceiveEventsRequest() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ReceiveEventsRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.StreamingServiceProto + .internal_static_google_cloud_visionai_v1_ReceiveEventsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.StreamingServiceProto + .internal_static_google_cloud_visionai_v1_ReceiveEventsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.ReceiveEventsRequest.class, + com.google.cloud.visionai.v1.ReceiveEventsRequest.Builder.class); + } + + public interface SetupRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.ReceiveEventsRequest.SetupRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * The cluster name.
+     * 
+ * + * string cluster = 1; + * + * @return The cluster. + */ + java.lang.String getCluster(); + /** + * + * + *
+     * The cluster name.
+     * 
+ * + * string cluster = 1; + * + * @return The bytes for cluster. + */ + com.google.protobuf.ByteString getClusterBytes(); + + /** + * + * + *
+     * The stream name. The service will return the events for the given stream.
+     * 
+ * + * string stream = 2; + * + * @return The stream. + */ + java.lang.String getStream(); + /** + * + * + *
+     * The stream name. The service will return the events for the given stream.
+     * 
+ * + * string stream = 2; + * + * @return The bytes for stream. + */ + com.google.protobuf.ByteString getStreamBytes(); + + /** + * + * + *
+     * A name for the receiver to self-identify.
+     *
+     * This is used to keep track of a receiver's read progress.
+     * 
+ * + * string receiver = 3; + * + * @return The receiver. + */ + java.lang.String getReceiver(); + /** + * + * + *
+     * A name for the receiver to self-identify.
+     *
+     * This is used to keep track of a receiver's read progress.
+     * 
+ * + * string receiver = 3; + * + * @return The bytes for receiver. + */ + com.google.protobuf.ByteString getReceiverBytes(); + + /** + * + * + *
+     * Controller mode configuration for receiving events from the server.
+     * 
+ * + * .google.cloud.visionai.v1.ControlledMode controlled_mode = 4; + * + * @return Whether the controlledMode field is set. + */ + boolean hasControlledMode(); + /** + * + * + *
+     * Controller mode configuration for receiving events from the server.
+     * 
+ * + * .google.cloud.visionai.v1.ControlledMode controlled_mode = 4; + * + * @return The controlledMode. + */ + com.google.cloud.visionai.v1.ControlledMode getControlledMode(); + /** + * + * + *
+     * Controller mode configuration for receiving events from the server.
+     * 
+ * + * .google.cloud.visionai.v1.ControlledMode controlled_mode = 4; + */ + com.google.cloud.visionai.v1.ControlledModeOrBuilder getControlledModeOrBuilder(); + + /** + * + * + *
+     * The maximum duration of server silence before the client determines the
+     * server unreachable.
+     *
+     * The client must either receive an `Event` update or a heart beat message
+     * before this duration expires; otherwise, the client will automatically
+     * cancel the current connection and retry.
+     * 
+ * + * .google.protobuf.Duration heartbeat_interval = 5; + * + * @return Whether the heartbeatInterval field is set. + */ + boolean hasHeartbeatInterval(); + /** + * + * + *
+     * The maximum duration of server silence before the client determines the
+     * server unreachable.
+     *
+     * The client must either receive an `Event` update or a heart beat message
+     * before this duration expires; otherwise, the client will automatically
+     * cancel the current connection and retry.
+     * 
+ * + * .google.protobuf.Duration heartbeat_interval = 5; + * + * @return The heartbeatInterval. + */ + com.google.protobuf.Duration getHeartbeatInterval(); + /** + * + * + *
+     * The maximum duration of server silence before the client determines the
+     * server unreachable.
+     *
+     * The client must either receive an `Event` update or a heart beat message
+     * before this duration expires; otherwise, the client will automatically
+     * cancel the current connection and retry.
+     * 
+ * + * .google.protobuf.Duration heartbeat_interval = 5; + */ + com.google.protobuf.DurationOrBuilder getHeartbeatIntervalOrBuilder(); + + /** + * + * + *
+     * The grace period after which a `writes_done_request` is issued, that a
+     * `WritesDone` is expected from the client.
+     *
+     * The server is free to cancel the RPC should this expire.
+     *
+     * A system default will be chosen if unset.
+     * 
+ * + * .google.protobuf.Duration writes_done_grace_period = 6; + * + * @return Whether the writesDoneGracePeriod field is set. + */ + boolean hasWritesDoneGracePeriod(); + /** + * + * + *
+     * The grace period after which a `writes_done_request` is issued, that a
+     * `WritesDone` is expected from the client.
+     *
+     * The server is free to cancel the RPC should this expire.
+     *
+     * A system default will be chosen if unset.
+     * 
+ * + * .google.protobuf.Duration writes_done_grace_period = 6; + * + * @return The writesDoneGracePeriod. + */ + com.google.protobuf.Duration getWritesDoneGracePeriod(); + /** + * + * + *
+     * The grace period after which a `writes_done_request` is issued, that a
+     * `WritesDone` is expected from the client.
+     *
+     * The server is free to cancel the RPC should this expire.
+     *
+     * A system default will be chosen if unset.
+     * 
+ * + * .google.protobuf.Duration writes_done_grace_period = 6; + */ + com.google.protobuf.DurationOrBuilder getWritesDoneGracePeriodOrBuilder(); + } + /** + * + * + *
+   * SetupRequest is the first message sent to the service to setup the RPC
+   * connection.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.ReceiveEventsRequest.SetupRequest} + */ + public static final class SetupRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.ReceiveEventsRequest.SetupRequest) + SetupRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use SetupRequest.newBuilder() to construct. + private SetupRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private SetupRequest() { + cluster_ = ""; + stream_ = ""; + receiver_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new SetupRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.StreamingServiceProto + .internal_static_google_cloud_visionai_v1_ReceiveEventsRequest_SetupRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.StreamingServiceProto + .internal_static_google_cloud_visionai_v1_ReceiveEventsRequest_SetupRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.ReceiveEventsRequest.SetupRequest.class, + com.google.cloud.visionai.v1.ReceiveEventsRequest.SetupRequest.Builder.class); + } + + private int bitField0_; + public static final int CLUSTER_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object cluster_ = ""; + /** + * + * + *
+     * The cluster name.
+     * 
+ * + * string cluster = 1; + * + * @return The cluster. + */ + @java.lang.Override + public java.lang.String getCluster() { + java.lang.Object ref = cluster_; + 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(); + cluster_ = s; + return s; + } + } + /** + * + * + *
+     * The cluster name.
+     * 
+ * + * string cluster = 1; + * + * @return The bytes for cluster. + */ + @java.lang.Override + public com.google.protobuf.ByteString getClusterBytes() { + java.lang.Object ref = cluster_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + cluster_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int STREAM_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object stream_ = ""; + /** + * + * + *
+     * The stream name. The service will return the events for the given stream.
+     * 
+ * + * string stream = 2; + * + * @return The stream. + */ + @java.lang.Override + public java.lang.String getStream() { + java.lang.Object ref = stream_; + 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(); + stream_ = s; + return s; + } + } + /** + * + * + *
+     * The stream name. The service will return the events for the given stream.
+     * 
+ * + * string stream = 2; + * + * @return The bytes for stream. + */ + @java.lang.Override + public com.google.protobuf.ByteString getStreamBytes() { + java.lang.Object ref = stream_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + stream_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int RECEIVER_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object receiver_ = ""; + /** + * + * + *
+     * A name for the receiver to self-identify.
+     *
+     * This is used to keep track of a receiver's read progress.
+     * 
+ * + * string receiver = 3; + * + * @return The receiver. + */ + @java.lang.Override + public java.lang.String getReceiver() { + java.lang.Object ref = receiver_; + 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(); + receiver_ = s; + return s; + } + } + /** + * + * + *
+     * A name for the receiver to self-identify.
+     *
+     * This is used to keep track of a receiver's read progress.
+     * 
+ * + * string receiver = 3; + * + * @return The bytes for receiver. + */ + @java.lang.Override + public com.google.protobuf.ByteString getReceiverBytes() { + java.lang.Object ref = receiver_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + receiver_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CONTROLLED_MODE_FIELD_NUMBER = 4; + private com.google.cloud.visionai.v1.ControlledMode controlledMode_; + /** + * + * + *
+     * Controller mode configuration for receiving events from the server.
+     * 
+ * + * .google.cloud.visionai.v1.ControlledMode controlled_mode = 4; + * + * @return Whether the controlledMode field is set. + */ + @java.lang.Override + public boolean hasControlledMode() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * Controller mode configuration for receiving events from the server.
+     * 
+ * + * .google.cloud.visionai.v1.ControlledMode controlled_mode = 4; + * + * @return The controlledMode. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.ControlledMode getControlledMode() { + return controlledMode_ == null + ? com.google.cloud.visionai.v1.ControlledMode.getDefaultInstance() + : controlledMode_; + } + /** + * + * + *
+     * Controller mode configuration for receiving events from the server.
+     * 
+ * + * .google.cloud.visionai.v1.ControlledMode controlled_mode = 4; + */ + @java.lang.Override + public com.google.cloud.visionai.v1.ControlledModeOrBuilder getControlledModeOrBuilder() { + return controlledMode_ == null + ? com.google.cloud.visionai.v1.ControlledMode.getDefaultInstance() + : controlledMode_; + } + + public static final int HEARTBEAT_INTERVAL_FIELD_NUMBER = 5; + private com.google.protobuf.Duration heartbeatInterval_; + /** + * + * + *
+     * The maximum duration of server silence before the client determines the
+     * server unreachable.
+     *
+     * The client must either receive an `Event` update or a heart beat message
+     * before this duration expires; otherwise, the client will automatically
+     * cancel the current connection and retry.
+     * 
+ * + * .google.protobuf.Duration heartbeat_interval = 5; + * + * @return Whether the heartbeatInterval field is set. + */ + @java.lang.Override + public boolean hasHeartbeatInterval() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * The maximum duration of server silence before the client determines the
+     * server unreachable.
+     *
+     * The client must either receive an `Event` update or a heart beat message
+     * before this duration expires; otherwise, the client will automatically
+     * cancel the current connection and retry.
+     * 
+ * + * .google.protobuf.Duration heartbeat_interval = 5; + * + * @return The heartbeatInterval. + */ + @java.lang.Override + public com.google.protobuf.Duration getHeartbeatInterval() { + return heartbeatInterval_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : heartbeatInterval_; + } + /** + * + * + *
+     * The maximum duration of server silence before the client determines the
+     * server unreachable.
+     *
+     * The client must either receive an `Event` update or a heart beat message
+     * before this duration expires; otherwise, the client will automatically
+     * cancel the current connection and retry.
+     * 
+ * + * .google.protobuf.Duration heartbeat_interval = 5; + */ + @java.lang.Override + public com.google.protobuf.DurationOrBuilder getHeartbeatIntervalOrBuilder() { + return heartbeatInterval_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : heartbeatInterval_; + } + + public static final int WRITES_DONE_GRACE_PERIOD_FIELD_NUMBER = 6; + private com.google.protobuf.Duration writesDoneGracePeriod_; + /** + * + * + *
+     * The grace period after which a `writes_done_request` is issued, that a
+     * `WritesDone` is expected from the client.
+     *
+     * The server is free to cancel the RPC should this expire.
+     *
+     * A system default will be chosen if unset.
+     * 
+ * + * .google.protobuf.Duration writes_done_grace_period = 6; + * + * @return Whether the writesDoneGracePeriod field is set. + */ + @java.lang.Override + public boolean hasWritesDoneGracePeriod() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+     * The grace period after which a `writes_done_request` is issued, that a
+     * `WritesDone` is expected from the client.
+     *
+     * The server is free to cancel the RPC should this expire.
+     *
+     * A system default will be chosen if unset.
+     * 
+ * + * .google.protobuf.Duration writes_done_grace_period = 6; + * + * @return The writesDoneGracePeriod. + */ + @java.lang.Override + public com.google.protobuf.Duration getWritesDoneGracePeriod() { + return writesDoneGracePeriod_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : writesDoneGracePeriod_; + } + /** + * + * + *
+     * The grace period after which a `writes_done_request` is issued, that a
+     * `WritesDone` is expected from the client.
+     *
+     * The server is free to cancel the RPC should this expire.
+     *
+     * A system default will be chosen if unset.
+     * 
+ * + * .google.protobuf.Duration writes_done_grace_period = 6; + */ + @java.lang.Override + public com.google.protobuf.DurationOrBuilder getWritesDoneGracePeriodOrBuilder() { + return writesDoneGracePeriod_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : writesDoneGracePeriod_; + } + + 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(cluster_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, cluster_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(stream_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, stream_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(receiver_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, receiver_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(4, getControlledMode()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(5, getHeartbeatInterval()); + } + if (((bitField0_ & 0x00000004) != 0)) { + output.writeMessage(6, getWritesDoneGracePeriod()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(cluster_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, cluster_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(stream_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, stream_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(receiver_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, receiver_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getControlledMode()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getHeartbeatInterval()); + } + if (((bitField0_ & 0x00000004) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(6, getWritesDoneGracePeriod()); + } + size += getUnknownFields().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.visionai.v1.ReceiveEventsRequest.SetupRequest)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.ReceiveEventsRequest.SetupRequest other = + (com.google.cloud.visionai.v1.ReceiveEventsRequest.SetupRequest) obj; + + if (!getCluster().equals(other.getCluster())) return false; + if (!getStream().equals(other.getStream())) return false; + if (!getReceiver().equals(other.getReceiver())) return false; + if (hasControlledMode() != other.hasControlledMode()) return false; + if (hasControlledMode()) { + if (!getControlledMode().equals(other.getControlledMode())) return false; + } + if (hasHeartbeatInterval() != other.hasHeartbeatInterval()) return false; + if (hasHeartbeatInterval()) { + if (!getHeartbeatInterval().equals(other.getHeartbeatInterval())) return false; + } + if (hasWritesDoneGracePeriod() != other.hasWritesDoneGracePeriod()) return false; + if (hasWritesDoneGracePeriod()) { + if (!getWritesDoneGracePeriod().equals(other.getWritesDoneGracePeriod())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + CLUSTER_FIELD_NUMBER; + hash = (53 * hash) + getCluster().hashCode(); + hash = (37 * hash) + STREAM_FIELD_NUMBER; + hash = (53 * hash) + getStream().hashCode(); + hash = (37 * hash) + RECEIVER_FIELD_NUMBER; + hash = (53 * hash) + getReceiver().hashCode(); + if (hasControlledMode()) { + hash = (37 * hash) + CONTROLLED_MODE_FIELD_NUMBER; + hash = (53 * hash) + getControlledMode().hashCode(); + } + if (hasHeartbeatInterval()) { + hash = (37 * hash) + HEARTBEAT_INTERVAL_FIELD_NUMBER; + hash = (53 * hash) + getHeartbeatInterval().hashCode(); + } + if (hasWritesDoneGracePeriod()) { + hash = (37 * hash) + WRITES_DONE_GRACE_PERIOD_FIELD_NUMBER; + hash = (53 * hash) + getWritesDoneGracePeriod().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.ReceiveEventsRequest.SetupRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ReceiveEventsRequest.SetupRequest 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.visionai.v1.ReceiveEventsRequest.SetupRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ReceiveEventsRequest.SetupRequest 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.visionai.v1.ReceiveEventsRequest.SetupRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ReceiveEventsRequest.SetupRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.ReceiveEventsRequest.SetupRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ReceiveEventsRequest.SetupRequest 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.visionai.v1.ReceiveEventsRequest.SetupRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ReceiveEventsRequest.SetupRequest 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.visionai.v1.ReceiveEventsRequest.SetupRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ReceiveEventsRequest.SetupRequest 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.visionai.v1.ReceiveEventsRequest.SetupRequest 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; + } + /** + * + * + *
+     * SetupRequest is the first message sent to the service to setup the RPC
+     * connection.
+     * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.ReceiveEventsRequest.SetupRequest} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.ReceiveEventsRequest.SetupRequest) + com.google.cloud.visionai.v1.ReceiveEventsRequest.SetupRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.StreamingServiceProto + .internal_static_google_cloud_visionai_v1_ReceiveEventsRequest_SetupRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.StreamingServiceProto + .internal_static_google_cloud_visionai_v1_ReceiveEventsRequest_SetupRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.ReceiveEventsRequest.SetupRequest.class, + com.google.cloud.visionai.v1.ReceiveEventsRequest.SetupRequest.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.ReceiveEventsRequest.SetupRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getControlledModeFieldBuilder(); + getHeartbeatIntervalFieldBuilder(); + getWritesDoneGracePeriodFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + cluster_ = ""; + stream_ = ""; + receiver_ = ""; + controlledMode_ = null; + if (controlledModeBuilder_ != null) { + controlledModeBuilder_.dispose(); + controlledModeBuilder_ = null; + } + heartbeatInterval_ = null; + if (heartbeatIntervalBuilder_ != null) { + heartbeatIntervalBuilder_.dispose(); + heartbeatIntervalBuilder_ = null; + } + writesDoneGracePeriod_ = null; + if (writesDoneGracePeriodBuilder_ != null) { + writesDoneGracePeriodBuilder_.dispose(); + writesDoneGracePeriodBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.StreamingServiceProto + .internal_static_google_cloud_visionai_v1_ReceiveEventsRequest_SetupRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ReceiveEventsRequest.SetupRequest + getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.ReceiveEventsRequest.SetupRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ReceiveEventsRequest.SetupRequest build() { + com.google.cloud.visionai.v1.ReceiveEventsRequest.SetupRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ReceiveEventsRequest.SetupRequest buildPartial() { + com.google.cloud.visionai.v1.ReceiveEventsRequest.SetupRequest result = + new com.google.cloud.visionai.v1.ReceiveEventsRequest.SetupRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.visionai.v1.ReceiveEventsRequest.SetupRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.cluster_ = cluster_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.stream_ = stream_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.receiver_ = receiver_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000008) != 0)) { + result.controlledMode_ = + controlledModeBuilder_ == null ? controlledMode_ : controlledModeBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.heartbeatInterval_ = + heartbeatIntervalBuilder_ == null + ? heartbeatInterval_ + : heartbeatIntervalBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.writesDoneGracePeriod_ = + writesDoneGracePeriodBuilder_ == null + ? writesDoneGracePeriod_ + : writesDoneGracePeriodBuilder_.build(); + to_bitField0_ |= 0x00000004; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.ReceiveEventsRequest.SetupRequest) { + return mergeFrom((com.google.cloud.visionai.v1.ReceiveEventsRequest.SetupRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.visionai.v1.ReceiveEventsRequest.SetupRequest other) { + if (other + == com.google.cloud.visionai.v1.ReceiveEventsRequest.SetupRequest.getDefaultInstance()) + return this; + if (!other.getCluster().isEmpty()) { + cluster_ = other.cluster_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getStream().isEmpty()) { + stream_ = other.stream_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getReceiver().isEmpty()) { + receiver_ = other.receiver_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (other.hasControlledMode()) { + mergeControlledMode(other.getControlledMode()); + } + if (other.hasHeartbeatInterval()) { + mergeHeartbeatInterval(other.getHeartbeatInterval()); + } + if (other.hasWritesDoneGracePeriod()) { + mergeWritesDoneGracePeriod(other.getWritesDoneGracePeriod()); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + cluster_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + stream_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + receiver_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + input.readMessage( + getControlledModeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + input.readMessage( + getHeartbeatIntervalFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 50: + { + input.readMessage( + getWritesDoneGracePeriodFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000020; + break; + } // case 50 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object cluster_ = ""; + /** + * + * + *
+       * The cluster name.
+       * 
+ * + * string cluster = 1; + * + * @return The cluster. + */ + public java.lang.String getCluster() { + java.lang.Object ref = cluster_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + cluster_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * The cluster name.
+       * 
+ * + * string cluster = 1; + * + * @return The bytes for cluster. + */ + public com.google.protobuf.ByteString getClusterBytes() { + java.lang.Object ref = cluster_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + cluster_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * The cluster name.
+       * 
+ * + * string cluster = 1; + * + * @param value The cluster to set. + * @return This builder for chaining. + */ + public Builder setCluster(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + cluster_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * The cluster name.
+       * 
+ * + * string cluster = 1; + * + * @return This builder for chaining. + */ + public Builder clearCluster() { + cluster_ = getDefaultInstance().getCluster(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+       * The cluster name.
+       * 
+ * + * string cluster = 1; + * + * @param value The bytes for cluster to set. + * @return This builder for chaining. + */ + public Builder setClusterBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + cluster_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object stream_ = ""; + /** + * + * + *
+       * The stream name. The service will return the events for the given stream.
+       * 
+ * + * string stream = 2; + * + * @return The stream. + */ + public java.lang.String getStream() { + java.lang.Object ref = stream_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + stream_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * The stream name. The service will return the events for the given stream.
+       * 
+ * + * string stream = 2; + * + * @return The bytes for stream. + */ + public com.google.protobuf.ByteString getStreamBytes() { + java.lang.Object ref = stream_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + stream_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * The stream name. The service will return the events for the given stream.
+       * 
+ * + * string stream = 2; + * + * @param value The stream to set. + * @return This builder for chaining. + */ + public Builder setStream(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + stream_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * The stream name. The service will return the events for the given stream.
+       * 
+ * + * string stream = 2; + * + * @return This builder for chaining. + */ + public Builder clearStream() { + stream_ = getDefaultInstance().getStream(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+       * The stream name. The service will return the events for the given stream.
+       * 
+ * + * string stream = 2; + * + * @param value The bytes for stream to set. + * @return This builder for chaining. + */ + public Builder setStreamBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + stream_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object receiver_ = ""; + /** + * + * + *
+       * A name for the receiver to self-identify.
+       *
+       * This is used to keep track of a receiver's read progress.
+       * 
+ * + * string receiver = 3; + * + * @return The receiver. + */ + public java.lang.String getReceiver() { + java.lang.Object ref = receiver_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + receiver_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * A name for the receiver to self-identify.
+       *
+       * This is used to keep track of a receiver's read progress.
+       * 
+ * + * string receiver = 3; + * + * @return The bytes for receiver. + */ + public com.google.protobuf.ByteString getReceiverBytes() { + java.lang.Object ref = receiver_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + receiver_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * A name for the receiver to self-identify.
+       *
+       * This is used to keep track of a receiver's read progress.
+       * 
+ * + * string receiver = 3; + * + * @param value The receiver to set. + * @return This builder for chaining. + */ + public Builder setReceiver(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + receiver_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+       * A name for the receiver to self-identify.
+       *
+       * This is used to keep track of a receiver's read progress.
+       * 
+ * + * string receiver = 3; + * + * @return This builder for chaining. + */ + public Builder clearReceiver() { + receiver_ = getDefaultInstance().getReceiver(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+       * A name for the receiver to self-identify.
+       *
+       * This is used to keep track of a receiver's read progress.
+       * 
+ * + * string receiver = 3; + * + * @param value The bytes for receiver to set. + * @return This builder for chaining. + */ + public Builder setReceiverBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + receiver_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private com.google.cloud.visionai.v1.ControlledMode controlledMode_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.ControlledMode, + com.google.cloud.visionai.v1.ControlledMode.Builder, + com.google.cloud.visionai.v1.ControlledModeOrBuilder> + controlledModeBuilder_; + /** + * + * + *
+       * Controller mode configuration for receiving events from the server.
+       * 
+ * + * .google.cloud.visionai.v1.ControlledMode controlled_mode = 4; + * + * @return Whether the controlledMode field is set. + */ + public boolean hasControlledMode() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + * + * + *
+       * Controller mode configuration for receiving events from the server.
+       * 
+ * + * .google.cloud.visionai.v1.ControlledMode controlled_mode = 4; + * + * @return The controlledMode. + */ + public com.google.cloud.visionai.v1.ControlledMode getControlledMode() { + if (controlledModeBuilder_ == null) { + return controlledMode_ == null + ? com.google.cloud.visionai.v1.ControlledMode.getDefaultInstance() + : controlledMode_; + } else { + return controlledModeBuilder_.getMessage(); + } + } + /** + * + * + *
+       * Controller mode configuration for receiving events from the server.
+       * 
+ * + * .google.cloud.visionai.v1.ControlledMode controlled_mode = 4; + */ + public Builder setControlledMode(com.google.cloud.visionai.v1.ControlledMode value) { + if (controlledModeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + controlledMode_ = value; + } else { + controlledModeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+       * Controller mode configuration for receiving events from the server.
+       * 
+ * + * .google.cloud.visionai.v1.ControlledMode controlled_mode = 4; + */ + public Builder setControlledMode( + com.google.cloud.visionai.v1.ControlledMode.Builder builderForValue) { + if (controlledModeBuilder_ == null) { + controlledMode_ = builderForValue.build(); + } else { + controlledModeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+       * Controller mode configuration for receiving events from the server.
+       * 
+ * + * .google.cloud.visionai.v1.ControlledMode controlled_mode = 4; + */ + public Builder mergeControlledMode(com.google.cloud.visionai.v1.ControlledMode value) { + if (controlledModeBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) + && controlledMode_ != null + && controlledMode_ + != com.google.cloud.visionai.v1.ControlledMode.getDefaultInstance()) { + getControlledModeBuilder().mergeFrom(value); + } else { + controlledMode_ = value; + } + } else { + controlledModeBuilder_.mergeFrom(value); + } + if (controlledMode_ != null) { + bitField0_ |= 0x00000008; + onChanged(); + } + return this; + } + /** + * + * + *
+       * Controller mode configuration for receiving events from the server.
+       * 
+ * + * .google.cloud.visionai.v1.ControlledMode controlled_mode = 4; + */ + public Builder clearControlledMode() { + bitField0_ = (bitField0_ & ~0x00000008); + controlledMode_ = null; + if (controlledModeBuilder_ != null) { + controlledModeBuilder_.dispose(); + controlledModeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+       * Controller mode configuration for receiving events from the server.
+       * 
+ * + * .google.cloud.visionai.v1.ControlledMode controlled_mode = 4; + */ + public com.google.cloud.visionai.v1.ControlledMode.Builder getControlledModeBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return getControlledModeFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Controller mode configuration for receiving events from the server.
+       * 
+ * + * .google.cloud.visionai.v1.ControlledMode controlled_mode = 4; + */ + public com.google.cloud.visionai.v1.ControlledModeOrBuilder getControlledModeOrBuilder() { + if (controlledModeBuilder_ != null) { + return controlledModeBuilder_.getMessageOrBuilder(); + } else { + return controlledMode_ == null + ? com.google.cloud.visionai.v1.ControlledMode.getDefaultInstance() + : controlledMode_; + } + } + /** + * + * + *
+       * Controller mode configuration for receiving events from the server.
+       * 
+ * + * .google.cloud.visionai.v1.ControlledMode controlled_mode = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.ControlledMode, + com.google.cloud.visionai.v1.ControlledMode.Builder, + com.google.cloud.visionai.v1.ControlledModeOrBuilder> + getControlledModeFieldBuilder() { + if (controlledModeBuilder_ == null) { + controlledModeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.ControlledMode, + com.google.cloud.visionai.v1.ControlledMode.Builder, + com.google.cloud.visionai.v1.ControlledModeOrBuilder>( + getControlledMode(), getParentForChildren(), isClean()); + controlledMode_ = null; + } + return controlledModeBuilder_; + } + + private com.google.protobuf.Duration heartbeatInterval_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + heartbeatIntervalBuilder_; + /** + * + * + *
+       * The maximum duration of server silence before the client determines the
+       * server unreachable.
+       *
+       * The client must either receive an `Event` update or a heart beat message
+       * before this duration expires; otherwise, the client will automatically
+       * cancel the current connection and retry.
+       * 
+ * + * .google.protobuf.Duration heartbeat_interval = 5; + * + * @return Whether the heartbeatInterval field is set. + */ + public boolean hasHeartbeatInterval() { + return ((bitField0_ & 0x00000010) != 0); + } + /** + * + * + *
+       * The maximum duration of server silence before the client determines the
+       * server unreachable.
+       *
+       * The client must either receive an `Event` update or a heart beat message
+       * before this duration expires; otherwise, the client will automatically
+       * cancel the current connection and retry.
+       * 
+ * + * .google.protobuf.Duration heartbeat_interval = 5; + * + * @return The heartbeatInterval. + */ + public com.google.protobuf.Duration getHeartbeatInterval() { + if (heartbeatIntervalBuilder_ == null) { + return heartbeatInterval_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : heartbeatInterval_; + } else { + return heartbeatIntervalBuilder_.getMessage(); + } + } + /** + * + * + *
+       * The maximum duration of server silence before the client determines the
+       * server unreachable.
+       *
+       * The client must either receive an `Event` update or a heart beat message
+       * before this duration expires; otherwise, the client will automatically
+       * cancel the current connection and retry.
+       * 
+ * + * .google.protobuf.Duration heartbeat_interval = 5; + */ + public Builder setHeartbeatInterval(com.google.protobuf.Duration value) { + if (heartbeatIntervalBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + heartbeatInterval_ = value; + } else { + heartbeatIntervalBuilder_.setMessage(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+       * The maximum duration of server silence before the client determines the
+       * server unreachable.
+       *
+       * The client must either receive an `Event` update or a heart beat message
+       * before this duration expires; otherwise, the client will automatically
+       * cancel the current connection and retry.
+       * 
+ * + * .google.protobuf.Duration heartbeat_interval = 5; + */ + public Builder setHeartbeatInterval(com.google.protobuf.Duration.Builder builderForValue) { + if (heartbeatIntervalBuilder_ == null) { + heartbeatInterval_ = builderForValue.build(); + } else { + heartbeatIntervalBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+       * The maximum duration of server silence before the client determines the
+       * server unreachable.
+       *
+       * The client must either receive an `Event` update or a heart beat message
+       * before this duration expires; otherwise, the client will automatically
+       * cancel the current connection and retry.
+       * 
+ * + * .google.protobuf.Duration heartbeat_interval = 5; + */ + public Builder mergeHeartbeatInterval(com.google.protobuf.Duration value) { + if (heartbeatIntervalBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0) + && heartbeatInterval_ != null + && heartbeatInterval_ != com.google.protobuf.Duration.getDefaultInstance()) { + getHeartbeatIntervalBuilder().mergeFrom(value); + } else { + heartbeatInterval_ = value; + } + } else { + heartbeatIntervalBuilder_.mergeFrom(value); + } + if (heartbeatInterval_ != null) { + bitField0_ |= 0x00000010; + onChanged(); + } + return this; + } + /** + * + * + *
+       * The maximum duration of server silence before the client determines the
+       * server unreachable.
+       *
+       * The client must either receive an `Event` update or a heart beat message
+       * before this duration expires; otherwise, the client will automatically
+       * cancel the current connection and retry.
+       * 
+ * + * .google.protobuf.Duration heartbeat_interval = 5; + */ + public Builder clearHeartbeatInterval() { + bitField0_ = (bitField0_ & ~0x00000010); + heartbeatInterval_ = null; + if (heartbeatIntervalBuilder_ != null) { + heartbeatIntervalBuilder_.dispose(); + heartbeatIntervalBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+       * The maximum duration of server silence before the client determines the
+       * server unreachable.
+       *
+       * The client must either receive an `Event` update or a heart beat message
+       * before this duration expires; otherwise, the client will automatically
+       * cancel the current connection and retry.
+       * 
+ * + * .google.protobuf.Duration heartbeat_interval = 5; + */ + public com.google.protobuf.Duration.Builder getHeartbeatIntervalBuilder() { + bitField0_ |= 0x00000010; + onChanged(); + return getHeartbeatIntervalFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * The maximum duration of server silence before the client determines the
+       * server unreachable.
+       *
+       * The client must either receive an `Event` update or a heart beat message
+       * before this duration expires; otherwise, the client will automatically
+       * cancel the current connection and retry.
+       * 
+ * + * .google.protobuf.Duration heartbeat_interval = 5; + */ + public com.google.protobuf.DurationOrBuilder getHeartbeatIntervalOrBuilder() { + if (heartbeatIntervalBuilder_ != null) { + return heartbeatIntervalBuilder_.getMessageOrBuilder(); + } else { + return heartbeatInterval_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : heartbeatInterval_; + } + } + /** + * + * + *
+       * The maximum duration of server silence before the client determines the
+       * server unreachable.
+       *
+       * The client must either receive an `Event` update or a heart beat message
+       * before this duration expires; otherwise, the client will automatically
+       * cancel the current connection and retry.
+       * 
+ * + * .google.protobuf.Duration heartbeat_interval = 5; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + getHeartbeatIntervalFieldBuilder() { + if (heartbeatIntervalBuilder_ == null) { + heartbeatIntervalBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder>( + getHeartbeatInterval(), getParentForChildren(), isClean()); + heartbeatInterval_ = null; + } + return heartbeatIntervalBuilder_; + } + + private com.google.protobuf.Duration writesDoneGracePeriod_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + writesDoneGracePeriodBuilder_; + /** + * + * + *
+       * The grace period after which a `writes_done_request` is issued, that a
+       * `WritesDone` is expected from the client.
+       *
+       * The server is free to cancel the RPC should this expire.
+       *
+       * A system default will be chosen if unset.
+       * 
+ * + * .google.protobuf.Duration writes_done_grace_period = 6; + * + * @return Whether the writesDoneGracePeriod field is set. + */ + public boolean hasWritesDoneGracePeriod() { + return ((bitField0_ & 0x00000020) != 0); + } + /** + * + * + *
+       * The grace period after which a `writes_done_request` is issued, that a
+       * `WritesDone` is expected from the client.
+       *
+       * The server is free to cancel the RPC should this expire.
+       *
+       * A system default will be chosen if unset.
+       * 
+ * + * .google.protobuf.Duration writes_done_grace_period = 6; + * + * @return The writesDoneGracePeriod. + */ + public com.google.protobuf.Duration getWritesDoneGracePeriod() { + if (writesDoneGracePeriodBuilder_ == null) { + return writesDoneGracePeriod_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : writesDoneGracePeriod_; + } else { + return writesDoneGracePeriodBuilder_.getMessage(); + } + } + /** + * + * + *
+       * The grace period after which a `writes_done_request` is issued, that a
+       * `WritesDone` is expected from the client.
+       *
+       * The server is free to cancel the RPC should this expire.
+       *
+       * A system default will be chosen if unset.
+       * 
+ * + * .google.protobuf.Duration writes_done_grace_period = 6; + */ + public Builder setWritesDoneGracePeriod(com.google.protobuf.Duration value) { + if (writesDoneGracePeriodBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + writesDoneGracePeriod_ = value; + } else { + writesDoneGracePeriodBuilder_.setMessage(value); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+       * The grace period after which a `writes_done_request` is issued, that a
+       * `WritesDone` is expected from the client.
+       *
+       * The server is free to cancel the RPC should this expire.
+       *
+       * A system default will be chosen if unset.
+       * 
+ * + * .google.protobuf.Duration writes_done_grace_period = 6; + */ + public Builder setWritesDoneGracePeriod( + com.google.protobuf.Duration.Builder builderForValue) { + if (writesDoneGracePeriodBuilder_ == null) { + writesDoneGracePeriod_ = builderForValue.build(); + } else { + writesDoneGracePeriodBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+       * The grace period after which a `writes_done_request` is issued, that a
+       * `WritesDone` is expected from the client.
+       *
+       * The server is free to cancel the RPC should this expire.
+       *
+       * A system default will be chosen if unset.
+       * 
+ * + * .google.protobuf.Duration writes_done_grace_period = 6; + */ + public Builder mergeWritesDoneGracePeriod(com.google.protobuf.Duration value) { + if (writesDoneGracePeriodBuilder_ == null) { + if (((bitField0_ & 0x00000020) != 0) + && writesDoneGracePeriod_ != null + && writesDoneGracePeriod_ != com.google.protobuf.Duration.getDefaultInstance()) { + getWritesDoneGracePeriodBuilder().mergeFrom(value); + } else { + writesDoneGracePeriod_ = value; + } + } else { + writesDoneGracePeriodBuilder_.mergeFrom(value); + } + if (writesDoneGracePeriod_ != null) { + bitField0_ |= 0x00000020; + onChanged(); + } + return this; + } + /** + * + * + *
+       * The grace period after which a `writes_done_request` is issued, that a
+       * `WritesDone` is expected from the client.
+       *
+       * The server is free to cancel the RPC should this expire.
+       *
+       * A system default will be chosen if unset.
+       * 
+ * + * .google.protobuf.Duration writes_done_grace_period = 6; + */ + public Builder clearWritesDoneGracePeriod() { + bitField0_ = (bitField0_ & ~0x00000020); + writesDoneGracePeriod_ = null; + if (writesDoneGracePeriodBuilder_ != null) { + writesDoneGracePeriodBuilder_.dispose(); + writesDoneGracePeriodBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+       * The grace period after which a `writes_done_request` is issued, that a
+       * `WritesDone` is expected from the client.
+       *
+       * The server is free to cancel the RPC should this expire.
+       *
+       * A system default will be chosen if unset.
+       * 
+ * + * .google.protobuf.Duration writes_done_grace_period = 6; + */ + public com.google.protobuf.Duration.Builder getWritesDoneGracePeriodBuilder() { + bitField0_ |= 0x00000020; + onChanged(); + return getWritesDoneGracePeriodFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * The grace period after which a `writes_done_request` is issued, that a
+       * `WritesDone` is expected from the client.
+       *
+       * The server is free to cancel the RPC should this expire.
+       *
+       * A system default will be chosen if unset.
+       * 
+ * + * .google.protobuf.Duration writes_done_grace_period = 6; + */ + public com.google.protobuf.DurationOrBuilder getWritesDoneGracePeriodOrBuilder() { + if (writesDoneGracePeriodBuilder_ != null) { + return writesDoneGracePeriodBuilder_.getMessageOrBuilder(); + } else { + return writesDoneGracePeriod_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : writesDoneGracePeriod_; + } + } + /** + * + * + *
+       * The grace period after which a `writes_done_request` is issued, that a
+       * `WritesDone` is expected from the client.
+       *
+       * The server is free to cancel the RPC should this expire.
+       *
+       * A system default will be chosen if unset.
+       * 
+ * + * .google.protobuf.Duration writes_done_grace_period = 6; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + getWritesDoneGracePeriodFieldBuilder() { + if (writesDoneGracePeriodBuilder_ == null) { + writesDoneGracePeriodBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder>( + getWritesDoneGracePeriod(), getParentForChildren(), isClean()); + writesDoneGracePeriod_ = null; + } + return writesDoneGracePeriodBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.ReceiveEventsRequest.SetupRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.ReceiveEventsRequest.SetupRequest) + private static final com.google.cloud.visionai.v1.ReceiveEventsRequest.SetupRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.ReceiveEventsRequest.SetupRequest(); + } + + public static com.google.cloud.visionai.v1.ReceiveEventsRequest.SetupRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SetupRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.ReceiveEventsRequest.SetupRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int requestCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object request_; + + public enum RequestCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + SETUP_REQUEST(1), + COMMIT_REQUEST(2), + REQUEST_NOT_SET(0); + private final int value; + + private RequestCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static RequestCase valueOf(int value) { + return forNumber(value); + } + + public static RequestCase forNumber(int value) { + switch (value) { + case 1: + return SETUP_REQUEST; + case 2: + return COMMIT_REQUEST; + case 0: + return REQUEST_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public RequestCase getRequestCase() { + return RequestCase.forNumber(requestCase_); + } + + public static final int SETUP_REQUEST_FIELD_NUMBER = 1; + /** + * + * + *
+   * The setup request to setup the RPC connection.
+   * 
+ * + * .google.cloud.visionai.v1.ReceiveEventsRequest.SetupRequest setup_request = 1; + * + * @return Whether the setupRequest field is set. + */ + @java.lang.Override + public boolean hasSetupRequest() { + return requestCase_ == 1; + } + /** + * + * + *
+   * The setup request to setup the RPC connection.
+   * 
+ * + * .google.cloud.visionai.v1.ReceiveEventsRequest.SetupRequest setup_request = 1; + * + * @return The setupRequest. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.ReceiveEventsRequest.SetupRequest getSetupRequest() { + if (requestCase_ == 1) { + return (com.google.cloud.visionai.v1.ReceiveEventsRequest.SetupRequest) request_; + } + return com.google.cloud.visionai.v1.ReceiveEventsRequest.SetupRequest.getDefaultInstance(); + } + /** + * + * + *
+   * The setup request to setup the RPC connection.
+   * 
+ * + * .google.cloud.visionai.v1.ReceiveEventsRequest.SetupRequest setup_request = 1; + */ + @java.lang.Override + public com.google.cloud.visionai.v1.ReceiveEventsRequest.SetupRequestOrBuilder + getSetupRequestOrBuilder() { + if (requestCase_ == 1) { + return (com.google.cloud.visionai.v1.ReceiveEventsRequest.SetupRequest) request_; + } + return com.google.cloud.visionai.v1.ReceiveEventsRequest.SetupRequest.getDefaultInstance(); + } + + public static final int COMMIT_REQUEST_FIELD_NUMBER = 2; + /** + * + * + *
+   * This request checkpoints the consumer's read progress.
+   * 
+ * + * .google.cloud.visionai.v1.CommitRequest commit_request = 2; + * + * @return Whether the commitRequest field is set. + */ + @java.lang.Override + public boolean hasCommitRequest() { + return requestCase_ == 2; + } + /** + * + * + *
+   * This request checkpoints the consumer's read progress.
+   * 
+ * + * .google.cloud.visionai.v1.CommitRequest commit_request = 2; + * + * @return The commitRequest. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.CommitRequest getCommitRequest() { + if (requestCase_ == 2) { + return (com.google.cloud.visionai.v1.CommitRequest) request_; + } + return com.google.cloud.visionai.v1.CommitRequest.getDefaultInstance(); + } + /** + * + * + *
+   * This request checkpoints the consumer's read progress.
+   * 
+ * + * .google.cloud.visionai.v1.CommitRequest commit_request = 2; + */ + @java.lang.Override + public com.google.cloud.visionai.v1.CommitRequestOrBuilder getCommitRequestOrBuilder() { + if (requestCase_ == 2) { + return (com.google.cloud.visionai.v1.CommitRequest) request_; + } + return com.google.cloud.visionai.v1.CommitRequest.getDefaultInstance(); + } + + 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 (requestCase_ == 1) { + output.writeMessage( + 1, (com.google.cloud.visionai.v1.ReceiveEventsRequest.SetupRequest) request_); + } + if (requestCase_ == 2) { + output.writeMessage(2, (com.google.cloud.visionai.v1.CommitRequest) request_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (requestCase_ == 1) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 1, (com.google.cloud.visionai.v1.ReceiveEventsRequest.SetupRequest) request_); + } + if (requestCase_ == 2) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 2, (com.google.cloud.visionai.v1.CommitRequest) request_); + } + size += getUnknownFields().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.visionai.v1.ReceiveEventsRequest)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.ReceiveEventsRequest other = + (com.google.cloud.visionai.v1.ReceiveEventsRequest) obj; + + if (!getRequestCase().equals(other.getRequestCase())) return false; + switch (requestCase_) { + case 1: + if (!getSetupRequest().equals(other.getSetupRequest())) return false; + break; + case 2: + if (!getCommitRequest().equals(other.getCommitRequest())) return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + switch (requestCase_) { + case 1: + hash = (37 * hash) + SETUP_REQUEST_FIELD_NUMBER; + hash = (53 * hash) + getSetupRequest().hashCode(); + break; + case 2: + hash = (37 * hash) + COMMIT_REQUEST_FIELD_NUMBER; + hash = (53 * hash) + getCommitRequest().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.ReceiveEventsRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ReceiveEventsRequest 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.visionai.v1.ReceiveEventsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ReceiveEventsRequest 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.visionai.v1.ReceiveEventsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ReceiveEventsRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.ReceiveEventsRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ReceiveEventsRequest 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.visionai.v1.ReceiveEventsRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ReceiveEventsRequest 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.visionai.v1.ReceiveEventsRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ReceiveEventsRequest 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.visionai.v1.ReceiveEventsRequest 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; + } + /** + * + * + *
+   * Request message for ReceiveEvents.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.ReceiveEventsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.ReceiveEventsRequest) + com.google.cloud.visionai.v1.ReceiveEventsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.StreamingServiceProto + .internal_static_google_cloud_visionai_v1_ReceiveEventsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.StreamingServiceProto + .internal_static_google_cloud_visionai_v1_ReceiveEventsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.ReceiveEventsRequest.class, + com.google.cloud.visionai.v1.ReceiveEventsRequest.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.ReceiveEventsRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (setupRequestBuilder_ != null) { + setupRequestBuilder_.clear(); + } + if (commitRequestBuilder_ != null) { + commitRequestBuilder_.clear(); + } + requestCase_ = 0; + request_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.StreamingServiceProto + .internal_static_google_cloud_visionai_v1_ReceiveEventsRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ReceiveEventsRequest getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.ReceiveEventsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ReceiveEventsRequest build() { + com.google.cloud.visionai.v1.ReceiveEventsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ReceiveEventsRequest buildPartial() { + com.google.cloud.visionai.v1.ReceiveEventsRequest result = + new com.google.cloud.visionai.v1.ReceiveEventsRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.visionai.v1.ReceiveEventsRequest result) { + int from_bitField0_ = bitField0_; + } + + private void buildPartialOneofs(com.google.cloud.visionai.v1.ReceiveEventsRequest result) { + result.requestCase_ = requestCase_; + result.request_ = this.request_; + if (requestCase_ == 1 && setupRequestBuilder_ != null) { + result.request_ = setupRequestBuilder_.build(); + } + if (requestCase_ == 2 && commitRequestBuilder_ != null) { + result.request_ = commitRequestBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.ReceiveEventsRequest) { + return mergeFrom((com.google.cloud.visionai.v1.ReceiveEventsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.ReceiveEventsRequest other) { + if (other == com.google.cloud.visionai.v1.ReceiveEventsRequest.getDefaultInstance()) + return this; + switch (other.getRequestCase()) { + case SETUP_REQUEST: + { + mergeSetupRequest(other.getSetupRequest()); + break; + } + case COMMIT_REQUEST: + { + mergeCommitRequest(other.getCommitRequest()); + break; + } + case REQUEST_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getSetupRequestFieldBuilder().getBuilder(), extensionRegistry); + requestCase_ = 1; + break; + } // case 10 + case 18: + { + input.readMessage(getCommitRequestFieldBuilder().getBuilder(), extensionRegistry); + requestCase_ = 2; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int requestCase_ = 0; + private java.lang.Object request_; + + public RequestCase getRequestCase() { + return RequestCase.forNumber(requestCase_); + } + + public Builder clearRequest() { + requestCase_ = 0; + request_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.ReceiveEventsRequest.SetupRequest, + com.google.cloud.visionai.v1.ReceiveEventsRequest.SetupRequest.Builder, + com.google.cloud.visionai.v1.ReceiveEventsRequest.SetupRequestOrBuilder> + setupRequestBuilder_; + /** + * + * + *
+     * The setup request to setup the RPC connection.
+     * 
+ * + * .google.cloud.visionai.v1.ReceiveEventsRequest.SetupRequest setup_request = 1; + * + * @return Whether the setupRequest field is set. + */ + @java.lang.Override + public boolean hasSetupRequest() { + return requestCase_ == 1; + } + /** + * + * + *
+     * The setup request to setup the RPC connection.
+     * 
+ * + * .google.cloud.visionai.v1.ReceiveEventsRequest.SetupRequest setup_request = 1; + * + * @return The setupRequest. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.ReceiveEventsRequest.SetupRequest getSetupRequest() { + if (setupRequestBuilder_ == null) { + if (requestCase_ == 1) { + return (com.google.cloud.visionai.v1.ReceiveEventsRequest.SetupRequest) request_; + } + return com.google.cloud.visionai.v1.ReceiveEventsRequest.SetupRequest.getDefaultInstance(); + } else { + if (requestCase_ == 1) { + return setupRequestBuilder_.getMessage(); + } + return com.google.cloud.visionai.v1.ReceiveEventsRequest.SetupRequest.getDefaultInstance(); + } + } + /** + * + * + *
+     * The setup request to setup the RPC connection.
+     * 
+ * + * .google.cloud.visionai.v1.ReceiveEventsRequest.SetupRequest setup_request = 1; + */ + public Builder setSetupRequest( + com.google.cloud.visionai.v1.ReceiveEventsRequest.SetupRequest value) { + if (setupRequestBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + request_ = value; + onChanged(); + } else { + setupRequestBuilder_.setMessage(value); + } + requestCase_ = 1; + return this; + } + /** + * + * + *
+     * The setup request to setup the RPC connection.
+     * 
+ * + * .google.cloud.visionai.v1.ReceiveEventsRequest.SetupRequest setup_request = 1; + */ + public Builder setSetupRequest( + com.google.cloud.visionai.v1.ReceiveEventsRequest.SetupRequest.Builder builderForValue) { + if (setupRequestBuilder_ == null) { + request_ = builderForValue.build(); + onChanged(); + } else { + setupRequestBuilder_.setMessage(builderForValue.build()); + } + requestCase_ = 1; + return this; + } + /** + * + * + *
+     * The setup request to setup the RPC connection.
+     * 
+ * + * .google.cloud.visionai.v1.ReceiveEventsRequest.SetupRequest setup_request = 1; + */ + public Builder mergeSetupRequest( + com.google.cloud.visionai.v1.ReceiveEventsRequest.SetupRequest value) { + if (setupRequestBuilder_ == null) { + if (requestCase_ == 1 + && request_ + != com.google.cloud.visionai.v1.ReceiveEventsRequest.SetupRequest + .getDefaultInstance()) { + request_ = + com.google.cloud.visionai.v1.ReceiveEventsRequest.SetupRequest.newBuilder( + (com.google.cloud.visionai.v1.ReceiveEventsRequest.SetupRequest) request_) + .mergeFrom(value) + .buildPartial(); + } else { + request_ = value; + } + onChanged(); + } else { + if (requestCase_ == 1) { + setupRequestBuilder_.mergeFrom(value); + } else { + setupRequestBuilder_.setMessage(value); + } + } + requestCase_ = 1; + return this; + } + /** + * + * + *
+     * The setup request to setup the RPC connection.
+     * 
+ * + * .google.cloud.visionai.v1.ReceiveEventsRequest.SetupRequest setup_request = 1; + */ + public Builder clearSetupRequest() { + if (setupRequestBuilder_ == null) { + if (requestCase_ == 1) { + requestCase_ = 0; + request_ = null; + onChanged(); + } + } else { + if (requestCase_ == 1) { + requestCase_ = 0; + request_ = null; + } + setupRequestBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The setup request to setup the RPC connection.
+     * 
+ * + * .google.cloud.visionai.v1.ReceiveEventsRequest.SetupRequest setup_request = 1; + */ + public com.google.cloud.visionai.v1.ReceiveEventsRequest.SetupRequest.Builder + getSetupRequestBuilder() { + return getSetupRequestFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The setup request to setup the RPC connection.
+     * 
+ * + * .google.cloud.visionai.v1.ReceiveEventsRequest.SetupRequest setup_request = 1; + */ + @java.lang.Override + public com.google.cloud.visionai.v1.ReceiveEventsRequest.SetupRequestOrBuilder + getSetupRequestOrBuilder() { + if ((requestCase_ == 1) && (setupRequestBuilder_ != null)) { + return setupRequestBuilder_.getMessageOrBuilder(); + } else { + if (requestCase_ == 1) { + return (com.google.cloud.visionai.v1.ReceiveEventsRequest.SetupRequest) request_; + } + return com.google.cloud.visionai.v1.ReceiveEventsRequest.SetupRequest.getDefaultInstance(); + } + } + /** + * + * + *
+     * The setup request to setup the RPC connection.
+     * 
+ * + * .google.cloud.visionai.v1.ReceiveEventsRequest.SetupRequest setup_request = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.ReceiveEventsRequest.SetupRequest, + com.google.cloud.visionai.v1.ReceiveEventsRequest.SetupRequest.Builder, + com.google.cloud.visionai.v1.ReceiveEventsRequest.SetupRequestOrBuilder> + getSetupRequestFieldBuilder() { + if (setupRequestBuilder_ == null) { + if (!(requestCase_ == 1)) { + request_ = + com.google.cloud.visionai.v1.ReceiveEventsRequest.SetupRequest.getDefaultInstance(); + } + setupRequestBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.ReceiveEventsRequest.SetupRequest, + com.google.cloud.visionai.v1.ReceiveEventsRequest.SetupRequest.Builder, + com.google.cloud.visionai.v1.ReceiveEventsRequest.SetupRequestOrBuilder>( + (com.google.cloud.visionai.v1.ReceiveEventsRequest.SetupRequest) request_, + getParentForChildren(), + isClean()); + request_ = null; + } + requestCase_ = 1; + onChanged(); + return setupRequestBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.CommitRequest, + com.google.cloud.visionai.v1.CommitRequest.Builder, + com.google.cloud.visionai.v1.CommitRequestOrBuilder> + commitRequestBuilder_; + /** + * + * + *
+     * This request checkpoints the consumer's read progress.
+     * 
+ * + * .google.cloud.visionai.v1.CommitRequest commit_request = 2; + * + * @return Whether the commitRequest field is set. + */ + @java.lang.Override + public boolean hasCommitRequest() { + return requestCase_ == 2; + } + /** + * + * + *
+     * This request checkpoints the consumer's read progress.
+     * 
+ * + * .google.cloud.visionai.v1.CommitRequest commit_request = 2; + * + * @return The commitRequest. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.CommitRequest getCommitRequest() { + if (commitRequestBuilder_ == null) { + if (requestCase_ == 2) { + return (com.google.cloud.visionai.v1.CommitRequest) request_; + } + return com.google.cloud.visionai.v1.CommitRequest.getDefaultInstance(); + } else { + if (requestCase_ == 2) { + return commitRequestBuilder_.getMessage(); + } + return com.google.cloud.visionai.v1.CommitRequest.getDefaultInstance(); + } + } + /** + * + * + *
+     * This request checkpoints the consumer's read progress.
+     * 
+ * + * .google.cloud.visionai.v1.CommitRequest commit_request = 2; + */ + public Builder setCommitRequest(com.google.cloud.visionai.v1.CommitRequest value) { + if (commitRequestBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + request_ = value; + onChanged(); + } else { + commitRequestBuilder_.setMessage(value); + } + requestCase_ = 2; + return this; + } + /** + * + * + *
+     * This request checkpoints the consumer's read progress.
+     * 
+ * + * .google.cloud.visionai.v1.CommitRequest commit_request = 2; + */ + public Builder setCommitRequest( + com.google.cloud.visionai.v1.CommitRequest.Builder builderForValue) { + if (commitRequestBuilder_ == null) { + request_ = builderForValue.build(); + onChanged(); + } else { + commitRequestBuilder_.setMessage(builderForValue.build()); + } + requestCase_ = 2; + return this; + } + /** + * + * + *
+     * This request checkpoints the consumer's read progress.
+     * 
+ * + * .google.cloud.visionai.v1.CommitRequest commit_request = 2; + */ + public Builder mergeCommitRequest(com.google.cloud.visionai.v1.CommitRequest value) { + if (commitRequestBuilder_ == null) { + if (requestCase_ == 2 + && request_ != com.google.cloud.visionai.v1.CommitRequest.getDefaultInstance()) { + request_ = + com.google.cloud.visionai.v1.CommitRequest.newBuilder( + (com.google.cloud.visionai.v1.CommitRequest) request_) + .mergeFrom(value) + .buildPartial(); + } else { + request_ = value; + } + onChanged(); + } else { + if (requestCase_ == 2) { + commitRequestBuilder_.mergeFrom(value); + } else { + commitRequestBuilder_.setMessage(value); + } + } + requestCase_ = 2; + return this; + } + /** + * + * + *
+     * This request checkpoints the consumer's read progress.
+     * 
+ * + * .google.cloud.visionai.v1.CommitRequest commit_request = 2; + */ + public Builder clearCommitRequest() { + if (commitRequestBuilder_ == null) { + if (requestCase_ == 2) { + requestCase_ = 0; + request_ = null; + onChanged(); + } + } else { + if (requestCase_ == 2) { + requestCase_ = 0; + request_ = null; + } + commitRequestBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * This request checkpoints the consumer's read progress.
+     * 
+ * + * .google.cloud.visionai.v1.CommitRequest commit_request = 2; + */ + public com.google.cloud.visionai.v1.CommitRequest.Builder getCommitRequestBuilder() { + return getCommitRequestFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * This request checkpoints the consumer's read progress.
+     * 
+ * + * .google.cloud.visionai.v1.CommitRequest commit_request = 2; + */ + @java.lang.Override + public com.google.cloud.visionai.v1.CommitRequestOrBuilder getCommitRequestOrBuilder() { + if ((requestCase_ == 2) && (commitRequestBuilder_ != null)) { + return commitRequestBuilder_.getMessageOrBuilder(); + } else { + if (requestCase_ == 2) { + return (com.google.cloud.visionai.v1.CommitRequest) request_; + } + return com.google.cloud.visionai.v1.CommitRequest.getDefaultInstance(); + } + } + /** + * + * + *
+     * This request checkpoints the consumer's read progress.
+     * 
+ * + * .google.cloud.visionai.v1.CommitRequest commit_request = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.CommitRequest, + com.google.cloud.visionai.v1.CommitRequest.Builder, + com.google.cloud.visionai.v1.CommitRequestOrBuilder> + getCommitRequestFieldBuilder() { + if (commitRequestBuilder_ == null) { + if (!(requestCase_ == 2)) { + request_ = com.google.cloud.visionai.v1.CommitRequest.getDefaultInstance(); + } + commitRequestBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.CommitRequest, + com.google.cloud.visionai.v1.CommitRequest.Builder, + com.google.cloud.visionai.v1.CommitRequestOrBuilder>( + (com.google.cloud.visionai.v1.CommitRequest) request_, + getParentForChildren(), + isClean()); + request_ = null; + } + requestCase_ = 2; + onChanged(); + return commitRequestBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.ReceiveEventsRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.ReceiveEventsRequest) + private static final com.google.cloud.visionai.v1.ReceiveEventsRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.ReceiveEventsRequest(); + } + + public static com.google.cloud.visionai.v1.ReceiveEventsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ReceiveEventsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.ReceiveEventsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ReceiveEventsRequestOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ReceiveEventsRequestOrBuilder.java new file mode 100644 index 000000000000..b36e883e0f08 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ReceiveEventsRequestOrBuilder.java @@ -0,0 +1,99 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/streaming_service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface ReceiveEventsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.ReceiveEventsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The setup request to setup the RPC connection.
+   * 
+ * + * .google.cloud.visionai.v1.ReceiveEventsRequest.SetupRequest setup_request = 1; + * + * @return Whether the setupRequest field is set. + */ + boolean hasSetupRequest(); + /** + * + * + *
+   * The setup request to setup the RPC connection.
+   * 
+ * + * .google.cloud.visionai.v1.ReceiveEventsRequest.SetupRequest setup_request = 1; + * + * @return The setupRequest. + */ + com.google.cloud.visionai.v1.ReceiveEventsRequest.SetupRequest getSetupRequest(); + /** + * + * + *
+   * The setup request to setup the RPC connection.
+   * 
+ * + * .google.cloud.visionai.v1.ReceiveEventsRequest.SetupRequest setup_request = 1; + */ + com.google.cloud.visionai.v1.ReceiveEventsRequest.SetupRequestOrBuilder + getSetupRequestOrBuilder(); + + /** + * + * + *
+   * This request checkpoints the consumer's read progress.
+   * 
+ * + * .google.cloud.visionai.v1.CommitRequest commit_request = 2; + * + * @return Whether the commitRequest field is set. + */ + boolean hasCommitRequest(); + /** + * + * + *
+   * This request checkpoints the consumer's read progress.
+   * 
+ * + * .google.cloud.visionai.v1.CommitRequest commit_request = 2; + * + * @return The commitRequest. + */ + com.google.cloud.visionai.v1.CommitRequest getCommitRequest(); + /** + * + * + *
+   * This request checkpoints the consumer's read progress.
+   * 
+ * + * .google.cloud.visionai.v1.CommitRequest commit_request = 2; + */ + com.google.cloud.visionai.v1.CommitRequestOrBuilder getCommitRequestOrBuilder(); + + com.google.cloud.visionai.v1.ReceiveEventsRequest.RequestCase getRequestCase(); +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ReceiveEventsResponse.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ReceiveEventsResponse.java new file mode 100644 index 000000000000..b8e52d6f4c27 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ReceiveEventsResponse.java @@ -0,0 +1,1115 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/streaming_service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * Response message for the ReceiveEvents.
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.ReceiveEventsResponse} + */ +public final class ReceiveEventsResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.ReceiveEventsResponse) + ReceiveEventsResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ReceiveEventsResponse.newBuilder() to construct. + private ReceiveEventsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ReceiveEventsResponse() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ReceiveEventsResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.StreamingServiceProto + .internal_static_google_cloud_visionai_v1_ReceiveEventsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.StreamingServiceProto + .internal_static_google_cloud_visionai_v1_ReceiveEventsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.ReceiveEventsResponse.class, + com.google.cloud.visionai.v1.ReceiveEventsResponse.Builder.class); + } + + private int responseCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object response_; + + public enum ResponseCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + EVENT_UPDATE(1), + CONTROL(2), + RESPONSE_NOT_SET(0); + private final int value; + + private ResponseCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static ResponseCase valueOf(int value) { + return forNumber(value); + } + + public static ResponseCase forNumber(int value) { + switch (value) { + case 1: + return EVENT_UPDATE; + case 2: + return CONTROL; + case 0: + return RESPONSE_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public ResponseCase getResponseCase() { + return ResponseCase.forNumber(responseCase_); + } + + public static final int EVENT_UPDATE_FIELD_NUMBER = 1; + /** + * + * + *
+   * The event update message.
+   * 
+ * + * .google.cloud.visionai.v1.EventUpdate event_update = 1; + * + * @return Whether the eventUpdate field is set. + */ + @java.lang.Override + public boolean hasEventUpdate() { + return responseCase_ == 1; + } + /** + * + * + *
+   * The event update message.
+   * 
+ * + * .google.cloud.visionai.v1.EventUpdate event_update = 1; + * + * @return The eventUpdate. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.EventUpdate getEventUpdate() { + if (responseCase_ == 1) { + return (com.google.cloud.visionai.v1.EventUpdate) response_; + } + return com.google.cloud.visionai.v1.EventUpdate.getDefaultInstance(); + } + /** + * + * + *
+   * The event update message.
+   * 
+ * + * .google.cloud.visionai.v1.EventUpdate event_update = 1; + */ + @java.lang.Override + public com.google.cloud.visionai.v1.EventUpdateOrBuilder getEventUpdateOrBuilder() { + if (responseCase_ == 1) { + return (com.google.cloud.visionai.v1.EventUpdate) response_; + } + return com.google.cloud.visionai.v1.EventUpdate.getDefaultInstance(); + } + + public static final int CONTROL_FIELD_NUMBER = 2; + /** + * + * + *
+   * A control message from the server.
+   * 
+ * + * .google.cloud.visionai.v1.ReceiveEventsControlResponse control = 2; + * + * @return Whether the control field is set. + */ + @java.lang.Override + public boolean hasControl() { + return responseCase_ == 2; + } + /** + * + * + *
+   * A control message from the server.
+   * 
+ * + * .google.cloud.visionai.v1.ReceiveEventsControlResponse control = 2; + * + * @return The control. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.ReceiveEventsControlResponse getControl() { + if (responseCase_ == 2) { + return (com.google.cloud.visionai.v1.ReceiveEventsControlResponse) response_; + } + return com.google.cloud.visionai.v1.ReceiveEventsControlResponse.getDefaultInstance(); + } + /** + * + * + *
+   * A control message from the server.
+   * 
+ * + * .google.cloud.visionai.v1.ReceiveEventsControlResponse control = 2; + */ + @java.lang.Override + public com.google.cloud.visionai.v1.ReceiveEventsControlResponseOrBuilder getControlOrBuilder() { + if (responseCase_ == 2) { + return (com.google.cloud.visionai.v1.ReceiveEventsControlResponse) response_; + } + return com.google.cloud.visionai.v1.ReceiveEventsControlResponse.getDefaultInstance(); + } + + 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 (responseCase_ == 1) { + output.writeMessage(1, (com.google.cloud.visionai.v1.EventUpdate) response_); + } + if (responseCase_ == 2) { + output.writeMessage(2, (com.google.cloud.visionai.v1.ReceiveEventsControlResponse) response_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (responseCase_ == 1) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 1, (com.google.cloud.visionai.v1.EventUpdate) response_); + } + if (responseCase_ == 2) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 2, (com.google.cloud.visionai.v1.ReceiveEventsControlResponse) response_); + } + size += getUnknownFields().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.visionai.v1.ReceiveEventsResponse)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.ReceiveEventsResponse other = + (com.google.cloud.visionai.v1.ReceiveEventsResponse) obj; + + if (!getResponseCase().equals(other.getResponseCase())) return false; + switch (responseCase_) { + case 1: + if (!getEventUpdate().equals(other.getEventUpdate())) return false; + break; + case 2: + if (!getControl().equals(other.getControl())) return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + switch (responseCase_) { + case 1: + hash = (37 * hash) + EVENT_UPDATE_FIELD_NUMBER; + hash = (53 * hash) + getEventUpdate().hashCode(); + break; + case 2: + hash = (37 * hash) + CONTROL_FIELD_NUMBER; + hash = (53 * hash) + getControl().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.ReceiveEventsResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ReceiveEventsResponse 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.visionai.v1.ReceiveEventsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ReceiveEventsResponse 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.visionai.v1.ReceiveEventsResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ReceiveEventsResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.ReceiveEventsResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ReceiveEventsResponse 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.visionai.v1.ReceiveEventsResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ReceiveEventsResponse 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.visionai.v1.ReceiveEventsResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ReceiveEventsResponse 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.visionai.v1.ReceiveEventsResponse 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; + } + /** + * + * + *
+   * Response message for the ReceiveEvents.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.ReceiveEventsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.ReceiveEventsResponse) + com.google.cloud.visionai.v1.ReceiveEventsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.StreamingServiceProto + .internal_static_google_cloud_visionai_v1_ReceiveEventsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.StreamingServiceProto + .internal_static_google_cloud_visionai_v1_ReceiveEventsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.ReceiveEventsResponse.class, + com.google.cloud.visionai.v1.ReceiveEventsResponse.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.ReceiveEventsResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (eventUpdateBuilder_ != null) { + eventUpdateBuilder_.clear(); + } + if (controlBuilder_ != null) { + controlBuilder_.clear(); + } + responseCase_ = 0; + response_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.StreamingServiceProto + .internal_static_google_cloud_visionai_v1_ReceiveEventsResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ReceiveEventsResponse getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.ReceiveEventsResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ReceiveEventsResponse build() { + com.google.cloud.visionai.v1.ReceiveEventsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ReceiveEventsResponse buildPartial() { + com.google.cloud.visionai.v1.ReceiveEventsResponse result = + new com.google.cloud.visionai.v1.ReceiveEventsResponse(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.visionai.v1.ReceiveEventsResponse result) { + int from_bitField0_ = bitField0_; + } + + private void buildPartialOneofs(com.google.cloud.visionai.v1.ReceiveEventsResponse result) { + result.responseCase_ = responseCase_; + result.response_ = this.response_; + if (responseCase_ == 1 && eventUpdateBuilder_ != null) { + result.response_ = eventUpdateBuilder_.build(); + } + if (responseCase_ == 2 && controlBuilder_ != null) { + result.response_ = controlBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.ReceiveEventsResponse) { + return mergeFrom((com.google.cloud.visionai.v1.ReceiveEventsResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.ReceiveEventsResponse other) { + if (other == com.google.cloud.visionai.v1.ReceiveEventsResponse.getDefaultInstance()) + return this; + switch (other.getResponseCase()) { + case EVENT_UPDATE: + { + mergeEventUpdate(other.getEventUpdate()); + break; + } + case CONTROL: + { + mergeControl(other.getControl()); + break; + } + case RESPONSE_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getEventUpdateFieldBuilder().getBuilder(), extensionRegistry); + responseCase_ = 1; + break; + } // case 10 + case 18: + { + input.readMessage(getControlFieldBuilder().getBuilder(), extensionRegistry); + responseCase_ = 2; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int responseCase_ = 0; + private java.lang.Object response_; + + public ResponseCase getResponseCase() { + return ResponseCase.forNumber(responseCase_); + } + + public Builder clearResponse() { + responseCase_ = 0; + response_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.EventUpdate, + com.google.cloud.visionai.v1.EventUpdate.Builder, + com.google.cloud.visionai.v1.EventUpdateOrBuilder> + eventUpdateBuilder_; + /** + * + * + *
+     * The event update message.
+     * 
+ * + * .google.cloud.visionai.v1.EventUpdate event_update = 1; + * + * @return Whether the eventUpdate field is set. + */ + @java.lang.Override + public boolean hasEventUpdate() { + return responseCase_ == 1; + } + /** + * + * + *
+     * The event update message.
+     * 
+ * + * .google.cloud.visionai.v1.EventUpdate event_update = 1; + * + * @return The eventUpdate. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.EventUpdate getEventUpdate() { + if (eventUpdateBuilder_ == null) { + if (responseCase_ == 1) { + return (com.google.cloud.visionai.v1.EventUpdate) response_; + } + return com.google.cloud.visionai.v1.EventUpdate.getDefaultInstance(); + } else { + if (responseCase_ == 1) { + return eventUpdateBuilder_.getMessage(); + } + return com.google.cloud.visionai.v1.EventUpdate.getDefaultInstance(); + } + } + /** + * + * + *
+     * The event update message.
+     * 
+ * + * .google.cloud.visionai.v1.EventUpdate event_update = 1; + */ + public Builder setEventUpdate(com.google.cloud.visionai.v1.EventUpdate value) { + if (eventUpdateBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + response_ = value; + onChanged(); + } else { + eventUpdateBuilder_.setMessage(value); + } + responseCase_ = 1; + return this; + } + /** + * + * + *
+     * The event update message.
+     * 
+ * + * .google.cloud.visionai.v1.EventUpdate event_update = 1; + */ + public Builder setEventUpdate( + com.google.cloud.visionai.v1.EventUpdate.Builder builderForValue) { + if (eventUpdateBuilder_ == null) { + response_ = builderForValue.build(); + onChanged(); + } else { + eventUpdateBuilder_.setMessage(builderForValue.build()); + } + responseCase_ = 1; + return this; + } + /** + * + * + *
+     * The event update message.
+     * 
+ * + * .google.cloud.visionai.v1.EventUpdate event_update = 1; + */ + public Builder mergeEventUpdate(com.google.cloud.visionai.v1.EventUpdate value) { + if (eventUpdateBuilder_ == null) { + if (responseCase_ == 1 + && response_ != com.google.cloud.visionai.v1.EventUpdate.getDefaultInstance()) { + response_ = + com.google.cloud.visionai.v1.EventUpdate.newBuilder( + (com.google.cloud.visionai.v1.EventUpdate) response_) + .mergeFrom(value) + .buildPartial(); + } else { + response_ = value; + } + onChanged(); + } else { + if (responseCase_ == 1) { + eventUpdateBuilder_.mergeFrom(value); + } else { + eventUpdateBuilder_.setMessage(value); + } + } + responseCase_ = 1; + return this; + } + /** + * + * + *
+     * The event update message.
+     * 
+ * + * .google.cloud.visionai.v1.EventUpdate event_update = 1; + */ + public Builder clearEventUpdate() { + if (eventUpdateBuilder_ == null) { + if (responseCase_ == 1) { + responseCase_ = 0; + response_ = null; + onChanged(); + } + } else { + if (responseCase_ == 1) { + responseCase_ = 0; + response_ = null; + } + eventUpdateBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The event update message.
+     * 
+ * + * .google.cloud.visionai.v1.EventUpdate event_update = 1; + */ + public com.google.cloud.visionai.v1.EventUpdate.Builder getEventUpdateBuilder() { + return getEventUpdateFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The event update message.
+     * 
+ * + * .google.cloud.visionai.v1.EventUpdate event_update = 1; + */ + @java.lang.Override + public com.google.cloud.visionai.v1.EventUpdateOrBuilder getEventUpdateOrBuilder() { + if ((responseCase_ == 1) && (eventUpdateBuilder_ != null)) { + return eventUpdateBuilder_.getMessageOrBuilder(); + } else { + if (responseCase_ == 1) { + return (com.google.cloud.visionai.v1.EventUpdate) response_; + } + return com.google.cloud.visionai.v1.EventUpdate.getDefaultInstance(); + } + } + /** + * + * + *
+     * The event update message.
+     * 
+ * + * .google.cloud.visionai.v1.EventUpdate event_update = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.EventUpdate, + com.google.cloud.visionai.v1.EventUpdate.Builder, + com.google.cloud.visionai.v1.EventUpdateOrBuilder> + getEventUpdateFieldBuilder() { + if (eventUpdateBuilder_ == null) { + if (!(responseCase_ == 1)) { + response_ = com.google.cloud.visionai.v1.EventUpdate.getDefaultInstance(); + } + eventUpdateBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.EventUpdate, + com.google.cloud.visionai.v1.EventUpdate.Builder, + com.google.cloud.visionai.v1.EventUpdateOrBuilder>( + (com.google.cloud.visionai.v1.EventUpdate) response_, + getParentForChildren(), + isClean()); + response_ = null; + } + responseCase_ = 1; + onChanged(); + return eventUpdateBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.ReceiveEventsControlResponse, + com.google.cloud.visionai.v1.ReceiveEventsControlResponse.Builder, + com.google.cloud.visionai.v1.ReceiveEventsControlResponseOrBuilder> + controlBuilder_; + /** + * + * + *
+     * A control message from the server.
+     * 
+ * + * .google.cloud.visionai.v1.ReceiveEventsControlResponse control = 2; + * + * @return Whether the control field is set. + */ + @java.lang.Override + public boolean hasControl() { + return responseCase_ == 2; + } + /** + * + * + *
+     * A control message from the server.
+     * 
+ * + * .google.cloud.visionai.v1.ReceiveEventsControlResponse control = 2; + * + * @return The control. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.ReceiveEventsControlResponse getControl() { + if (controlBuilder_ == null) { + if (responseCase_ == 2) { + return (com.google.cloud.visionai.v1.ReceiveEventsControlResponse) response_; + } + return com.google.cloud.visionai.v1.ReceiveEventsControlResponse.getDefaultInstance(); + } else { + if (responseCase_ == 2) { + return controlBuilder_.getMessage(); + } + return com.google.cloud.visionai.v1.ReceiveEventsControlResponse.getDefaultInstance(); + } + } + /** + * + * + *
+     * A control message from the server.
+     * 
+ * + * .google.cloud.visionai.v1.ReceiveEventsControlResponse control = 2; + */ + public Builder setControl(com.google.cloud.visionai.v1.ReceiveEventsControlResponse value) { + if (controlBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + response_ = value; + onChanged(); + } else { + controlBuilder_.setMessage(value); + } + responseCase_ = 2; + return this; + } + /** + * + * + *
+     * A control message from the server.
+     * 
+ * + * .google.cloud.visionai.v1.ReceiveEventsControlResponse control = 2; + */ + public Builder setControl( + com.google.cloud.visionai.v1.ReceiveEventsControlResponse.Builder builderForValue) { + if (controlBuilder_ == null) { + response_ = builderForValue.build(); + onChanged(); + } else { + controlBuilder_.setMessage(builderForValue.build()); + } + responseCase_ = 2; + return this; + } + /** + * + * + *
+     * A control message from the server.
+     * 
+ * + * .google.cloud.visionai.v1.ReceiveEventsControlResponse control = 2; + */ + public Builder mergeControl(com.google.cloud.visionai.v1.ReceiveEventsControlResponse value) { + if (controlBuilder_ == null) { + if (responseCase_ == 2 + && response_ + != com.google.cloud.visionai.v1.ReceiveEventsControlResponse.getDefaultInstance()) { + response_ = + com.google.cloud.visionai.v1.ReceiveEventsControlResponse.newBuilder( + (com.google.cloud.visionai.v1.ReceiveEventsControlResponse) response_) + .mergeFrom(value) + .buildPartial(); + } else { + response_ = value; + } + onChanged(); + } else { + if (responseCase_ == 2) { + controlBuilder_.mergeFrom(value); + } else { + controlBuilder_.setMessage(value); + } + } + responseCase_ = 2; + return this; + } + /** + * + * + *
+     * A control message from the server.
+     * 
+ * + * .google.cloud.visionai.v1.ReceiveEventsControlResponse control = 2; + */ + public Builder clearControl() { + if (controlBuilder_ == null) { + if (responseCase_ == 2) { + responseCase_ = 0; + response_ = null; + onChanged(); + } + } else { + if (responseCase_ == 2) { + responseCase_ = 0; + response_ = null; + } + controlBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * A control message from the server.
+     * 
+ * + * .google.cloud.visionai.v1.ReceiveEventsControlResponse control = 2; + */ + public com.google.cloud.visionai.v1.ReceiveEventsControlResponse.Builder getControlBuilder() { + return getControlFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * A control message from the server.
+     * 
+ * + * .google.cloud.visionai.v1.ReceiveEventsControlResponse control = 2; + */ + @java.lang.Override + public com.google.cloud.visionai.v1.ReceiveEventsControlResponseOrBuilder + getControlOrBuilder() { + if ((responseCase_ == 2) && (controlBuilder_ != null)) { + return controlBuilder_.getMessageOrBuilder(); + } else { + if (responseCase_ == 2) { + return (com.google.cloud.visionai.v1.ReceiveEventsControlResponse) response_; + } + return com.google.cloud.visionai.v1.ReceiveEventsControlResponse.getDefaultInstance(); + } + } + /** + * + * + *
+     * A control message from the server.
+     * 
+ * + * .google.cloud.visionai.v1.ReceiveEventsControlResponse control = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.ReceiveEventsControlResponse, + com.google.cloud.visionai.v1.ReceiveEventsControlResponse.Builder, + com.google.cloud.visionai.v1.ReceiveEventsControlResponseOrBuilder> + getControlFieldBuilder() { + if (controlBuilder_ == null) { + if (!(responseCase_ == 2)) { + response_ = + com.google.cloud.visionai.v1.ReceiveEventsControlResponse.getDefaultInstance(); + } + controlBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.ReceiveEventsControlResponse, + com.google.cloud.visionai.v1.ReceiveEventsControlResponse.Builder, + com.google.cloud.visionai.v1.ReceiveEventsControlResponseOrBuilder>( + (com.google.cloud.visionai.v1.ReceiveEventsControlResponse) response_, + getParentForChildren(), + isClean()); + response_ = null; + } + responseCase_ = 2; + onChanged(); + return controlBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.ReceiveEventsResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.ReceiveEventsResponse) + private static final com.google.cloud.visionai.v1.ReceiveEventsResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.ReceiveEventsResponse(); + } + + public static com.google.cloud.visionai.v1.ReceiveEventsResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ReceiveEventsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.ReceiveEventsResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ReceiveEventsResponseOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ReceiveEventsResponseOrBuilder.java new file mode 100644 index 000000000000..c8b34452ccfc --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ReceiveEventsResponseOrBuilder.java @@ -0,0 +1,98 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/streaming_service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface ReceiveEventsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.ReceiveEventsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The event update message.
+   * 
+ * + * .google.cloud.visionai.v1.EventUpdate event_update = 1; + * + * @return Whether the eventUpdate field is set. + */ + boolean hasEventUpdate(); + /** + * + * + *
+   * The event update message.
+   * 
+ * + * .google.cloud.visionai.v1.EventUpdate event_update = 1; + * + * @return The eventUpdate. + */ + com.google.cloud.visionai.v1.EventUpdate getEventUpdate(); + /** + * + * + *
+   * The event update message.
+   * 
+ * + * .google.cloud.visionai.v1.EventUpdate event_update = 1; + */ + com.google.cloud.visionai.v1.EventUpdateOrBuilder getEventUpdateOrBuilder(); + + /** + * + * + *
+   * A control message from the server.
+   * 
+ * + * .google.cloud.visionai.v1.ReceiveEventsControlResponse control = 2; + * + * @return Whether the control field is set. + */ + boolean hasControl(); + /** + * + * + *
+   * A control message from the server.
+   * 
+ * + * .google.cloud.visionai.v1.ReceiveEventsControlResponse control = 2; + * + * @return The control. + */ + com.google.cloud.visionai.v1.ReceiveEventsControlResponse getControl(); + /** + * + * + *
+   * A control message from the server.
+   * 
+ * + * .google.cloud.visionai.v1.ReceiveEventsControlResponse control = 2; + */ + com.google.cloud.visionai.v1.ReceiveEventsControlResponseOrBuilder getControlOrBuilder(); + + com.google.cloud.visionai.v1.ReceiveEventsResponse.ResponseCase getResponseCase(); +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ReceivePacketsControlResponse.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ReceivePacketsControlResponse.java new file mode 100644 index 000000000000..4fed93e919d0 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ReceivePacketsControlResponse.java @@ -0,0 +1,840 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/streaming_service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * Control message for a ReceivePacketsResponse.
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.ReceivePacketsControlResponse} + */ +public final class ReceivePacketsControlResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.ReceivePacketsControlResponse) + ReceivePacketsControlResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ReceivePacketsControlResponse.newBuilder() to construct. + private ReceivePacketsControlResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ReceivePacketsControlResponse() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ReceivePacketsControlResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.StreamingServiceProto + .internal_static_google_cloud_visionai_v1_ReceivePacketsControlResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.StreamingServiceProto + .internal_static_google_cloud_visionai_v1_ReceivePacketsControlResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.ReceivePacketsControlResponse.class, + com.google.cloud.visionai.v1.ReceivePacketsControlResponse.Builder.class); + } + + private int controlCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object control_; + + public enum ControlCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + HEARTBEAT(1), + WRITES_DONE_REQUEST(2), + CONTROL_NOT_SET(0); + private final int value; + + private ControlCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static ControlCase valueOf(int value) { + return forNumber(value); + } + + public static ControlCase forNumber(int value) { + switch (value) { + case 1: + return HEARTBEAT; + case 2: + return WRITES_DONE_REQUEST; + case 0: + return CONTROL_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public ControlCase getControlCase() { + return ControlCase.forNumber(controlCase_); + } + + public static final int HEARTBEAT_FIELD_NUMBER = 1; + /** + * + * + *
+   * A server heartbeat.
+   * 
+ * + * bool heartbeat = 1; + * + * @return Whether the heartbeat field is set. + */ + @java.lang.Override + public boolean hasHeartbeat() { + return controlCase_ == 1; + } + /** + * + * + *
+   * A server heartbeat.
+   * 
+ * + * bool heartbeat = 1; + * + * @return The heartbeat. + */ + @java.lang.Override + public boolean getHeartbeat() { + if (controlCase_ == 1) { + return (java.lang.Boolean) control_; + } + return false; + } + + public static final int WRITES_DONE_REQUEST_FIELD_NUMBER = 2; + /** + * + * + *
+   * A request to the receiver to complete any final writes followed by a
+   * `WritesDone`; e.g. issue any final `CommitRequest`s.
+   *
+   * May be ignored if `WritesDone` has already been issued at any point
+   * prior to receiving this message.
+   *
+   * If `WritesDone` does not get issued, then the server will forcefully
+   * cancel the connection, and the receiver will likely receive an
+   * uninformative after `Read` returns `false` and `Finish` is called.
+   * 
+ * + * bool writes_done_request = 2; + * + * @return Whether the writesDoneRequest field is set. + */ + @java.lang.Override + public boolean hasWritesDoneRequest() { + return controlCase_ == 2; + } + /** + * + * + *
+   * A request to the receiver to complete any final writes followed by a
+   * `WritesDone`; e.g. issue any final `CommitRequest`s.
+   *
+   * May be ignored if `WritesDone` has already been issued at any point
+   * prior to receiving this message.
+   *
+   * If `WritesDone` does not get issued, then the server will forcefully
+   * cancel the connection, and the receiver will likely receive an
+   * uninformative after `Read` returns `false` and `Finish` is called.
+   * 
+ * + * bool writes_done_request = 2; + * + * @return The writesDoneRequest. + */ + @java.lang.Override + public boolean getWritesDoneRequest() { + if (controlCase_ == 2) { + return (java.lang.Boolean) control_; + } + return false; + } + + 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 (controlCase_ == 1) { + output.writeBool(1, (boolean) ((java.lang.Boolean) control_)); + } + if (controlCase_ == 2) { + output.writeBool(2, (boolean) ((java.lang.Boolean) control_)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (controlCase_ == 1) { + size += + com.google.protobuf.CodedOutputStream.computeBoolSize( + 1, (boolean) ((java.lang.Boolean) control_)); + } + if (controlCase_ == 2) { + size += + com.google.protobuf.CodedOutputStream.computeBoolSize( + 2, (boolean) ((java.lang.Boolean) control_)); + } + size += getUnknownFields().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.visionai.v1.ReceivePacketsControlResponse)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.ReceivePacketsControlResponse other = + (com.google.cloud.visionai.v1.ReceivePacketsControlResponse) obj; + + if (!getControlCase().equals(other.getControlCase())) return false; + switch (controlCase_) { + case 1: + if (getHeartbeat() != other.getHeartbeat()) return false; + break; + case 2: + if (getWritesDoneRequest() != other.getWritesDoneRequest()) return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + switch (controlCase_) { + case 1: + hash = (37 * hash) + HEARTBEAT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getHeartbeat()); + break; + case 2: + hash = (37 * hash) + WRITES_DONE_REQUEST_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getWritesDoneRequest()); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.ReceivePacketsControlResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ReceivePacketsControlResponse 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.visionai.v1.ReceivePacketsControlResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ReceivePacketsControlResponse 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.visionai.v1.ReceivePacketsControlResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ReceivePacketsControlResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.ReceivePacketsControlResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ReceivePacketsControlResponse 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.visionai.v1.ReceivePacketsControlResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ReceivePacketsControlResponse 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.visionai.v1.ReceivePacketsControlResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ReceivePacketsControlResponse 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.visionai.v1.ReceivePacketsControlResponse 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; + } + /** + * + * + *
+   * Control message for a ReceivePacketsResponse.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.ReceivePacketsControlResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.ReceivePacketsControlResponse) + com.google.cloud.visionai.v1.ReceivePacketsControlResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.StreamingServiceProto + .internal_static_google_cloud_visionai_v1_ReceivePacketsControlResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.StreamingServiceProto + .internal_static_google_cloud_visionai_v1_ReceivePacketsControlResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.ReceivePacketsControlResponse.class, + com.google.cloud.visionai.v1.ReceivePacketsControlResponse.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.ReceivePacketsControlResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + controlCase_ = 0; + control_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.StreamingServiceProto + .internal_static_google_cloud_visionai_v1_ReceivePacketsControlResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ReceivePacketsControlResponse getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.ReceivePacketsControlResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ReceivePacketsControlResponse build() { + com.google.cloud.visionai.v1.ReceivePacketsControlResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ReceivePacketsControlResponse buildPartial() { + com.google.cloud.visionai.v1.ReceivePacketsControlResponse result = + new com.google.cloud.visionai.v1.ReceivePacketsControlResponse(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.visionai.v1.ReceivePacketsControlResponse result) { + int from_bitField0_ = bitField0_; + } + + private void buildPartialOneofs( + com.google.cloud.visionai.v1.ReceivePacketsControlResponse result) { + result.controlCase_ = controlCase_; + result.control_ = this.control_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.ReceivePacketsControlResponse) { + return mergeFrom((com.google.cloud.visionai.v1.ReceivePacketsControlResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.ReceivePacketsControlResponse other) { + if (other == com.google.cloud.visionai.v1.ReceivePacketsControlResponse.getDefaultInstance()) + return this; + switch (other.getControlCase()) { + case HEARTBEAT: + { + setHeartbeat(other.getHeartbeat()); + break; + } + case WRITES_DONE_REQUEST: + { + setWritesDoneRequest(other.getWritesDoneRequest()); + break; + } + case CONTROL_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + control_ = input.readBool(); + controlCase_ = 1; + break; + } // case 8 + case 16: + { + control_ = input.readBool(); + controlCase_ = 2; + break; + } // case 16 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int controlCase_ = 0; + private java.lang.Object control_; + + public ControlCase getControlCase() { + return ControlCase.forNumber(controlCase_); + } + + public Builder clearControl() { + controlCase_ = 0; + control_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + /** + * + * + *
+     * A server heartbeat.
+     * 
+ * + * bool heartbeat = 1; + * + * @return Whether the heartbeat field is set. + */ + public boolean hasHeartbeat() { + return controlCase_ == 1; + } + /** + * + * + *
+     * A server heartbeat.
+     * 
+ * + * bool heartbeat = 1; + * + * @return The heartbeat. + */ + public boolean getHeartbeat() { + if (controlCase_ == 1) { + return (java.lang.Boolean) control_; + } + return false; + } + /** + * + * + *
+     * A server heartbeat.
+     * 
+ * + * bool heartbeat = 1; + * + * @param value The heartbeat to set. + * @return This builder for chaining. + */ + public Builder setHeartbeat(boolean value) { + + controlCase_ = 1; + control_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * A server heartbeat.
+     * 
+ * + * bool heartbeat = 1; + * + * @return This builder for chaining. + */ + public Builder clearHeartbeat() { + if (controlCase_ == 1) { + controlCase_ = 0; + control_ = null; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * A request to the receiver to complete any final writes followed by a
+     * `WritesDone`; e.g. issue any final `CommitRequest`s.
+     *
+     * May be ignored if `WritesDone` has already been issued at any point
+     * prior to receiving this message.
+     *
+     * If `WritesDone` does not get issued, then the server will forcefully
+     * cancel the connection, and the receiver will likely receive an
+     * uninformative after `Read` returns `false` and `Finish` is called.
+     * 
+ * + * bool writes_done_request = 2; + * + * @return Whether the writesDoneRequest field is set. + */ + public boolean hasWritesDoneRequest() { + return controlCase_ == 2; + } + /** + * + * + *
+     * A request to the receiver to complete any final writes followed by a
+     * `WritesDone`; e.g. issue any final `CommitRequest`s.
+     *
+     * May be ignored if `WritesDone` has already been issued at any point
+     * prior to receiving this message.
+     *
+     * If `WritesDone` does not get issued, then the server will forcefully
+     * cancel the connection, and the receiver will likely receive an
+     * uninformative after `Read` returns `false` and `Finish` is called.
+     * 
+ * + * bool writes_done_request = 2; + * + * @return The writesDoneRequest. + */ + public boolean getWritesDoneRequest() { + if (controlCase_ == 2) { + return (java.lang.Boolean) control_; + } + return false; + } + /** + * + * + *
+     * A request to the receiver to complete any final writes followed by a
+     * `WritesDone`; e.g. issue any final `CommitRequest`s.
+     *
+     * May be ignored if `WritesDone` has already been issued at any point
+     * prior to receiving this message.
+     *
+     * If `WritesDone` does not get issued, then the server will forcefully
+     * cancel the connection, and the receiver will likely receive an
+     * uninformative after `Read` returns `false` and `Finish` is called.
+     * 
+ * + * bool writes_done_request = 2; + * + * @param value The writesDoneRequest to set. + * @return This builder for chaining. + */ + public Builder setWritesDoneRequest(boolean value) { + + controlCase_ = 2; + control_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * A request to the receiver to complete any final writes followed by a
+     * `WritesDone`; e.g. issue any final `CommitRequest`s.
+     *
+     * May be ignored if `WritesDone` has already been issued at any point
+     * prior to receiving this message.
+     *
+     * If `WritesDone` does not get issued, then the server will forcefully
+     * cancel the connection, and the receiver will likely receive an
+     * uninformative after `Read` returns `false` and `Finish` is called.
+     * 
+ * + * bool writes_done_request = 2; + * + * @return This builder for chaining. + */ + public Builder clearWritesDoneRequest() { + if (controlCase_ == 2) { + controlCase_ = 0; + control_ = null; + onChanged(); + } + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.ReceivePacketsControlResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.ReceivePacketsControlResponse) + private static final com.google.cloud.visionai.v1.ReceivePacketsControlResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.ReceivePacketsControlResponse(); + } + + public static com.google.cloud.visionai.v1.ReceivePacketsControlResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ReceivePacketsControlResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.ReceivePacketsControlResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ReceivePacketsControlResponseOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ReceivePacketsControlResponseOrBuilder.java new file mode 100644 index 000000000000..2e703fdbb575 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ReceivePacketsControlResponseOrBuilder.java @@ -0,0 +1,94 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/streaming_service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface ReceivePacketsControlResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.ReceivePacketsControlResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * A server heartbeat.
+   * 
+ * + * bool heartbeat = 1; + * + * @return Whether the heartbeat field is set. + */ + boolean hasHeartbeat(); + /** + * + * + *
+   * A server heartbeat.
+   * 
+ * + * bool heartbeat = 1; + * + * @return The heartbeat. + */ + boolean getHeartbeat(); + + /** + * + * + *
+   * A request to the receiver to complete any final writes followed by a
+   * `WritesDone`; e.g. issue any final `CommitRequest`s.
+   *
+   * May be ignored if `WritesDone` has already been issued at any point
+   * prior to receiving this message.
+   *
+   * If `WritesDone` does not get issued, then the server will forcefully
+   * cancel the connection, and the receiver will likely receive an
+   * uninformative after `Read` returns `false` and `Finish` is called.
+   * 
+ * + * bool writes_done_request = 2; + * + * @return Whether the writesDoneRequest field is set. + */ + boolean hasWritesDoneRequest(); + /** + * + * + *
+   * A request to the receiver to complete any final writes followed by a
+   * `WritesDone`; e.g. issue any final `CommitRequest`s.
+   *
+   * May be ignored if `WritesDone` has already been issued at any point
+   * prior to receiving this message.
+   *
+   * If `WritesDone` does not get issued, then the server will forcefully
+   * cancel the connection, and the receiver will likely receive an
+   * uninformative after `Read` returns `false` and `Finish` is called.
+   * 
+ * + * bool writes_done_request = 2; + * + * @return The writesDoneRequest. + */ + boolean getWritesDoneRequest(); + + com.google.cloud.visionai.v1.ReceivePacketsControlResponse.ControlCase getControlCase(); +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ReceivePacketsRequest.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ReceivePacketsRequest.java new file mode 100644 index 000000000000..880f4a1bf1b8 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ReceivePacketsRequest.java @@ -0,0 +1,3644 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/streaming_service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * Request message for receiving packets.
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.ReceivePacketsRequest} + */ +public final class ReceivePacketsRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.ReceivePacketsRequest) + ReceivePacketsRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ReceivePacketsRequest.newBuilder() to construct. + private ReceivePacketsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ReceivePacketsRequest() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ReceivePacketsRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.StreamingServiceProto + .internal_static_google_cloud_visionai_v1_ReceivePacketsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.StreamingServiceProto + .internal_static_google_cloud_visionai_v1_ReceivePacketsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.ReceivePacketsRequest.class, + com.google.cloud.visionai.v1.ReceivePacketsRequest.Builder.class); + } + + public interface SetupRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.ReceivePacketsRequest.SetupRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Options for configuring eager mode.
+     * 
+ * + * .google.cloud.visionai.v1.EagerMode eager_receive_mode = 3; + * + * @return Whether the eagerReceiveMode field is set. + */ + boolean hasEagerReceiveMode(); + /** + * + * + *
+     * Options for configuring eager mode.
+     * 
+ * + * .google.cloud.visionai.v1.EagerMode eager_receive_mode = 3; + * + * @return The eagerReceiveMode. + */ + com.google.cloud.visionai.v1.EagerMode getEagerReceiveMode(); + /** + * + * + *
+     * Options for configuring eager mode.
+     * 
+ * + * .google.cloud.visionai.v1.EagerMode eager_receive_mode = 3; + */ + com.google.cloud.visionai.v1.EagerModeOrBuilder getEagerReceiveModeOrBuilder(); + + /** + * + * + *
+     * Options for configuring controlled mode.
+     * 
+ * + * .google.cloud.visionai.v1.ControlledMode controlled_receive_mode = 4; + * + * @return Whether the controlledReceiveMode field is set. + */ + boolean hasControlledReceiveMode(); + /** + * + * + *
+     * Options for configuring controlled mode.
+     * 
+ * + * .google.cloud.visionai.v1.ControlledMode controlled_receive_mode = 4; + * + * @return The controlledReceiveMode. + */ + com.google.cloud.visionai.v1.ControlledMode getControlledReceiveMode(); + /** + * + * + *
+     * Options for configuring controlled mode.
+     * 
+ * + * .google.cloud.visionai.v1.ControlledMode controlled_receive_mode = 4; + */ + com.google.cloud.visionai.v1.ControlledModeOrBuilder getControlledReceiveModeOrBuilder(); + + /** + * + * + *
+     * The configurations that specify where packets are retrieved.
+     * 
+ * + * .google.cloud.visionai.v1.RequestMetadata metadata = 1; + * + * @return Whether the metadata field is set. + */ + boolean hasMetadata(); + /** + * + * + *
+     * The configurations that specify where packets are retrieved.
+     * 
+ * + * .google.cloud.visionai.v1.RequestMetadata metadata = 1; + * + * @return The metadata. + */ + com.google.cloud.visionai.v1.RequestMetadata getMetadata(); + /** + * + * + *
+     * The configurations that specify where packets are retrieved.
+     * 
+ * + * .google.cloud.visionai.v1.RequestMetadata metadata = 1; + */ + com.google.cloud.visionai.v1.RequestMetadataOrBuilder getMetadataOrBuilder(); + + /** + * + * + *
+     * A name for the receiver to self-identify.
+     *
+     * This is used to keep track of a receiver's read progress.
+     * 
+ * + * string receiver = 2; + * + * @return The receiver. + */ + java.lang.String getReceiver(); + /** + * + * + *
+     * A name for the receiver to self-identify.
+     *
+     * This is used to keep track of a receiver's read progress.
+     * 
+ * + * string receiver = 2; + * + * @return The bytes for receiver. + */ + com.google.protobuf.ByteString getReceiverBytes(); + + /** + * + * + *
+     * The maximum duration of server silence before the client determines the
+     * server unreachable.
+     *
+     * The client must either receive a `Packet` or a heart beat message before
+     * this duration expires; otherwise, the client will automatically cancel
+     * the current connection and retry.
+     * 
+ * + * .google.protobuf.Duration heartbeat_interval = 5; + * + * @return Whether the heartbeatInterval field is set. + */ + boolean hasHeartbeatInterval(); + /** + * + * + *
+     * The maximum duration of server silence before the client determines the
+     * server unreachable.
+     *
+     * The client must either receive a `Packet` or a heart beat message before
+     * this duration expires; otherwise, the client will automatically cancel
+     * the current connection and retry.
+     * 
+ * + * .google.protobuf.Duration heartbeat_interval = 5; + * + * @return The heartbeatInterval. + */ + com.google.protobuf.Duration getHeartbeatInterval(); + /** + * + * + *
+     * The maximum duration of server silence before the client determines the
+     * server unreachable.
+     *
+     * The client must either receive a `Packet` or a heart beat message before
+     * this duration expires; otherwise, the client will automatically cancel
+     * the current connection and retry.
+     * 
+ * + * .google.protobuf.Duration heartbeat_interval = 5; + */ + com.google.protobuf.DurationOrBuilder getHeartbeatIntervalOrBuilder(); + + /** + * + * + *
+     * The grace period after which a `writes_done_request` is issued, that a
+     * `WritesDone` is expected from the client.
+     *
+     * The server is free to cancel the RPC should this expire.
+     *
+     * A system default will be chosen if unset.
+     * 
+ * + * .google.protobuf.Duration writes_done_grace_period = 6; + * + * @return Whether the writesDoneGracePeriod field is set. + */ + boolean hasWritesDoneGracePeriod(); + /** + * + * + *
+     * The grace period after which a `writes_done_request` is issued, that a
+     * `WritesDone` is expected from the client.
+     *
+     * The server is free to cancel the RPC should this expire.
+     *
+     * A system default will be chosen if unset.
+     * 
+ * + * .google.protobuf.Duration writes_done_grace_period = 6; + * + * @return The writesDoneGracePeriod. + */ + com.google.protobuf.Duration getWritesDoneGracePeriod(); + /** + * + * + *
+     * The grace period after which a `writes_done_request` is issued, that a
+     * `WritesDone` is expected from the client.
+     *
+     * The server is free to cancel the RPC should this expire.
+     *
+     * A system default will be chosen if unset.
+     * 
+ * + * .google.protobuf.Duration writes_done_grace_period = 6; + */ + com.google.protobuf.DurationOrBuilder getWritesDoneGracePeriodOrBuilder(); + + com.google.cloud.visionai.v1.ReceivePacketsRequest.SetupRequest.ConsumerModeCase + getConsumerModeCase(); + } + /** + * + * + *
+   * The message specifying the initial settings for the ReceivePackets session.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.ReceivePacketsRequest.SetupRequest} + */ + public static final class SetupRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.ReceivePacketsRequest.SetupRequest) + SetupRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use SetupRequest.newBuilder() to construct. + private SetupRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private SetupRequest() { + receiver_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new SetupRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.StreamingServiceProto + .internal_static_google_cloud_visionai_v1_ReceivePacketsRequest_SetupRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.StreamingServiceProto + .internal_static_google_cloud_visionai_v1_ReceivePacketsRequest_SetupRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.ReceivePacketsRequest.SetupRequest.class, + com.google.cloud.visionai.v1.ReceivePacketsRequest.SetupRequest.Builder.class); + } + + private int bitField0_; + private int consumerModeCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object consumerMode_; + + public enum ConsumerModeCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + EAGER_RECEIVE_MODE(3), + CONTROLLED_RECEIVE_MODE(4), + CONSUMERMODE_NOT_SET(0); + private final int value; + + private ConsumerModeCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static ConsumerModeCase valueOf(int value) { + return forNumber(value); + } + + public static ConsumerModeCase forNumber(int value) { + switch (value) { + case 3: + return EAGER_RECEIVE_MODE; + case 4: + return CONTROLLED_RECEIVE_MODE; + case 0: + return CONSUMERMODE_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public ConsumerModeCase getConsumerModeCase() { + return ConsumerModeCase.forNumber(consumerModeCase_); + } + + public static final int EAGER_RECEIVE_MODE_FIELD_NUMBER = 3; + /** + * + * + *
+     * Options for configuring eager mode.
+     * 
+ * + * .google.cloud.visionai.v1.EagerMode eager_receive_mode = 3; + * + * @return Whether the eagerReceiveMode field is set. + */ + @java.lang.Override + public boolean hasEagerReceiveMode() { + return consumerModeCase_ == 3; + } + /** + * + * + *
+     * Options for configuring eager mode.
+     * 
+ * + * .google.cloud.visionai.v1.EagerMode eager_receive_mode = 3; + * + * @return The eagerReceiveMode. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.EagerMode getEagerReceiveMode() { + if (consumerModeCase_ == 3) { + return (com.google.cloud.visionai.v1.EagerMode) consumerMode_; + } + return com.google.cloud.visionai.v1.EagerMode.getDefaultInstance(); + } + /** + * + * + *
+     * Options for configuring eager mode.
+     * 
+ * + * .google.cloud.visionai.v1.EagerMode eager_receive_mode = 3; + */ + @java.lang.Override + public com.google.cloud.visionai.v1.EagerModeOrBuilder getEagerReceiveModeOrBuilder() { + if (consumerModeCase_ == 3) { + return (com.google.cloud.visionai.v1.EagerMode) consumerMode_; + } + return com.google.cloud.visionai.v1.EagerMode.getDefaultInstance(); + } + + public static final int CONTROLLED_RECEIVE_MODE_FIELD_NUMBER = 4; + /** + * + * + *
+     * Options for configuring controlled mode.
+     * 
+ * + * .google.cloud.visionai.v1.ControlledMode controlled_receive_mode = 4; + * + * @return Whether the controlledReceiveMode field is set. + */ + @java.lang.Override + public boolean hasControlledReceiveMode() { + return consumerModeCase_ == 4; + } + /** + * + * + *
+     * Options for configuring controlled mode.
+     * 
+ * + * .google.cloud.visionai.v1.ControlledMode controlled_receive_mode = 4; + * + * @return The controlledReceiveMode. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.ControlledMode getControlledReceiveMode() { + if (consumerModeCase_ == 4) { + return (com.google.cloud.visionai.v1.ControlledMode) consumerMode_; + } + return com.google.cloud.visionai.v1.ControlledMode.getDefaultInstance(); + } + /** + * + * + *
+     * Options for configuring controlled mode.
+     * 
+ * + * .google.cloud.visionai.v1.ControlledMode controlled_receive_mode = 4; + */ + @java.lang.Override + public com.google.cloud.visionai.v1.ControlledModeOrBuilder + getControlledReceiveModeOrBuilder() { + if (consumerModeCase_ == 4) { + return (com.google.cloud.visionai.v1.ControlledMode) consumerMode_; + } + return com.google.cloud.visionai.v1.ControlledMode.getDefaultInstance(); + } + + public static final int METADATA_FIELD_NUMBER = 1; + private com.google.cloud.visionai.v1.RequestMetadata metadata_; + /** + * + * + *
+     * The configurations that specify where packets are retrieved.
+     * 
+ * + * .google.cloud.visionai.v1.RequestMetadata metadata = 1; + * + * @return Whether the metadata field is set. + */ + @java.lang.Override + public boolean hasMetadata() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * The configurations that specify where packets are retrieved.
+     * 
+ * + * .google.cloud.visionai.v1.RequestMetadata metadata = 1; + * + * @return The metadata. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.RequestMetadata getMetadata() { + return metadata_ == null + ? com.google.cloud.visionai.v1.RequestMetadata.getDefaultInstance() + : metadata_; + } + /** + * + * + *
+     * The configurations that specify where packets are retrieved.
+     * 
+ * + * .google.cloud.visionai.v1.RequestMetadata metadata = 1; + */ + @java.lang.Override + public com.google.cloud.visionai.v1.RequestMetadataOrBuilder getMetadataOrBuilder() { + return metadata_ == null + ? com.google.cloud.visionai.v1.RequestMetadata.getDefaultInstance() + : metadata_; + } + + public static final int RECEIVER_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object receiver_ = ""; + /** + * + * + *
+     * A name for the receiver to self-identify.
+     *
+     * This is used to keep track of a receiver's read progress.
+     * 
+ * + * string receiver = 2; + * + * @return The receiver. + */ + @java.lang.Override + public java.lang.String getReceiver() { + java.lang.Object ref = receiver_; + 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(); + receiver_ = s; + return s; + } + } + /** + * + * + *
+     * A name for the receiver to self-identify.
+     *
+     * This is used to keep track of a receiver's read progress.
+     * 
+ * + * string receiver = 2; + * + * @return The bytes for receiver. + */ + @java.lang.Override + public com.google.protobuf.ByteString getReceiverBytes() { + java.lang.Object ref = receiver_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + receiver_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int HEARTBEAT_INTERVAL_FIELD_NUMBER = 5; + private com.google.protobuf.Duration heartbeatInterval_; + /** + * + * + *
+     * The maximum duration of server silence before the client determines the
+     * server unreachable.
+     *
+     * The client must either receive a `Packet` or a heart beat message before
+     * this duration expires; otherwise, the client will automatically cancel
+     * the current connection and retry.
+     * 
+ * + * .google.protobuf.Duration heartbeat_interval = 5; + * + * @return Whether the heartbeatInterval field is set. + */ + @java.lang.Override + public boolean hasHeartbeatInterval() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * The maximum duration of server silence before the client determines the
+     * server unreachable.
+     *
+     * The client must either receive a `Packet` or a heart beat message before
+     * this duration expires; otherwise, the client will automatically cancel
+     * the current connection and retry.
+     * 
+ * + * .google.protobuf.Duration heartbeat_interval = 5; + * + * @return The heartbeatInterval. + */ + @java.lang.Override + public com.google.protobuf.Duration getHeartbeatInterval() { + return heartbeatInterval_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : heartbeatInterval_; + } + /** + * + * + *
+     * The maximum duration of server silence before the client determines the
+     * server unreachable.
+     *
+     * The client must either receive a `Packet` or a heart beat message before
+     * this duration expires; otherwise, the client will automatically cancel
+     * the current connection and retry.
+     * 
+ * + * .google.protobuf.Duration heartbeat_interval = 5; + */ + @java.lang.Override + public com.google.protobuf.DurationOrBuilder getHeartbeatIntervalOrBuilder() { + return heartbeatInterval_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : heartbeatInterval_; + } + + public static final int WRITES_DONE_GRACE_PERIOD_FIELD_NUMBER = 6; + private com.google.protobuf.Duration writesDoneGracePeriod_; + /** + * + * + *
+     * The grace period after which a `writes_done_request` is issued, that a
+     * `WritesDone` is expected from the client.
+     *
+     * The server is free to cancel the RPC should this expire.
+     *
+     * A system default will be chosen if unset.
+     * 
+ * + * .google.protobuf.Duration writes_done_grace_period = 6; + * + * @return Whether the writesDoneGracePeriod field is set. + */ + @java.lang.Override + public boolean hasWritesDoneGracePeriod() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+     * The grace period after which a `writes_done_request` is issued, that a
+     * `WritesDone` is expected from the client.
+     *
+     * The server is free to cancel the RPC should this expire.
+     *
+     * A system default will be chosen if unset.
+     * 
+ * + * .google.protobuf.Duration writes_done_grace_period = 6; + * + * @return The writesDoneGracePeriod. + */ + @java.lang.Override + public com.google.protobuf.Duration getWritesDoneGracePeriod() { + return writesDoneGracePeriod_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : writesDoneGracePeriod_; + } + /** + * + * + *
+     * The grace period after which a `writes_done_request` is issued, that a
+     * `WritesDone` is expected from the client.
+     *
+     * The server is free to cancel the RPC should this expire.
+     *
+     * A system default will be chosen if unset.
+     * 
+ * + * .google.protobuf.Duration writes_done_grace_period = 6; + */ + @java.lang.Override + public com.google.protobuf.DurationOrBuilder getWritesDoneGracePeriodOrBuilder() { + return writesDoneGracePeriod_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : writesDoneGracePeriod_; + } + + 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 (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getMetadata()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(receiver_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, receiver_); + } + if (consumerModeCase_ == 3) { + output.writeMessage(3, (com.google.cloud.visionai.v1.EagerMode) consumerMode_); + } + if (consumerModeCase_ == 4) { + output.writeMessage(4, (com.google.cloud.visionai.v1.ControlledMode) consumerMode_); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(5, getHeartbeatInterval()); + } + if (((bitField0_ & 0x00000004) != 0)) { + output.writeMessage(6, getWritesDoneGracePeriod()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getMetadata()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(receiver_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, receiver_); + } + if (consumerModeCase_ == 3) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 3, (com.google.cloud.visionai.v1.EagerMode) consumerMode_); + } + if (consumerModeCase_ == 4) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 4, (com.google.cloud.visionai.v1.ControlledMode) consumerMode_); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getHeartbeatInterval()); + } + if (((bitField0_ & 0x00000004) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(6, getWritesDoneGracePeriod()); + } + size += getUnknownFields().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.visionai.v1.ReceivePacketsRequest.SetupRequest)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.ReceivePacketsRequest.SetupRequest other = + (com.google.cloud.visionai.v1.ReceivePacketsRequest.SetupRequest) obj; + + if (hasMetadata() != other.hasMetadata()) return false; + if (hasMetadata()) { + if (!getMetadata().equals(other.getMetadata())) return false; + } + if (!getReceiver().equals(other.getReceiver())) return false; + if (hasHeartbeatInterval() != other.hasHeartbeatInterval()) return false; + if (hasHeartbeatInterval()) { + if (!getHeartbeatInterval().equals(other.getHeartbeatInterval())) return false; + } + if (hasWritesDoneGracePeriod() != other.hasWritesDoneGracePeriod()) return false; + if (hasWritesDoneGracePeriod()) { + if (!getWritesDoneGracePeriod().equals(other.getWritesDoneGracePeriod())) return false; + } + if (!getConsumerModeCase().equals(other.getConsumerModeCase())) return false; + switch (consumerModeCase_) { + case 3: + if (!getEagerReceiveMode().equals(other.getEagerReceiveMode())) return false; + break; + case 4: + if (!getControlledReceiveMode().equals(other.getControlledReceiveMode())) return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasMetadata()) { + hash = (37 * hash) + METADATA_FIELD_NUMBER; + hash = (53 * hash) + getMetadata().hashCode(); + } + hash = (37 * hash) + RECEIVER_FIELD_NUMBER; + hash = (53 * hash) + getReceiver().hashCode(); + if (hasHeartbeatInterval()) { + hash = (37 * hash) + HEARTBEAT_INTERVAL_FIELD_NUMBER; + hash = (53 * hash) + getHeartbeatInterval().hashCode(); + } + if (hasWritesDoneGracePeriod()) { + hash = (37 * hash) + WRITES_DONE_GRACE_PERIOD_FIELD_NUMBER; + hash = (53 * hash) + getWritesDoneGracePeriod().hashCode(); + } + switch (consumerModeCase_) { + case 3: + hash = (37 * hash) + EAGER_RECEIVE_MODE_FIELD_NUMBER; + hash = (53 * hash) + getEagerReceiveMode().hashCode(); + break; + case 4: + hash = (37 * hash) + CONTROLLED_RECEIVE_MODE_FIELD_NUMBER; + hash = (53 * hash) + getControlledReceiveMode().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.ReceivePacketsRequest.SetupRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ReceivePacketsRequest.SetupRequest 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.visionai.v1.ReceivePacketsRequest.SetupRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ReceivePacketsRequest.SetupRequest 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.visionai.v1.ReceivePacketsRequest.SetupRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ReceivePacketsRequest.SetupRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.ReceivePacketsRequest.SetupRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ReceivePacketsRequest.SetupRequest 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.visionai.v1.ReceivePacketsRequest.SetupRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ReceivePacketsRequest.SetupRequest + 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.visionai.v1.ReceivePacketsRequest.SetupRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ReceivePacketsRequest.SetupRequest 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.visionai.v1.ReceivePacketsRequest.SetupRequest 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 message specifying the initial settings for the ReceivePackets session.
+     * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.ReceivePacketsRequest.SetupRequest} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.ReceivePacketsRequest.SetupRequest) + com.google.cloud.visionai.v1.ReceivePacketsRequest.SetupRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.StreamingServiceProto + .internal_static_google_cloud_visionai_v1_ReceivePacketsRequest_SetupRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.StreamingServiceProto + .internal_static_google_cloud_visionai_v1_ReceivePacketsRequest_SetupRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.ReceivePacketsRequest.SetupRequest.class, + com.google.cloud.visionai.v1.ReceivePacketsRequest.SetupRequest.Builder.class); + } + + // Construct using + // com.google.cloud.visionai.v1.ReceivePacketsRequest.SetupRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getMetadataFieldBuilder(); + getHeartbeatIntervalFieldBuilder(); + getWritesDoneGracePeriodFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (eagerReceiveModeBuilder_ != null) { + eagerReceiveModeBuilder_.clear(); + } + if (controlledReceiveModeBuilder_ != null) { + controlledReceiveModeBuilder_.clear(); + } + metadata_ = null; + if (metadataBuilder_ != null) { + metadataBuilder_.dispose(); + metadataBuilder_ = null; + } + receiver_ = ""; + heartbeatInterval_ = null; + if (heartbeatIntervalBuilder_ != null) { + heartbeatIntervalBuilder_.dispose(); + heartbeatIntervalBuilder_ = null; + } + writesDoneGracePeriod_ = null; + if (writesDoneGracePeriodBuilder_ != null) { + writesDoneGracePeriodBuilder_.dispose(); + writesDoneGracePeriodBuilder_ = null; + } + consumerModeCase_ = 0; + consumerMode_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.StreamingServiceProto + .internal_static_google_cloud_visionai_v1_ReceivePacketsRequest_SetupRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ReceivePacketsRequest.SetupRequest + getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.ReceivePacketsRequest.SetupRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ReceivePacketsRequest.SetupRequest build() { + com.google.cloud.visionai.v1.ReceivePacketsRequest.SetupRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ReceivePacketsRequest.SetupRequest buildPartial() { + com.google.cloud.visionai.v1.ReceivePacketsRequest.SetupRequest result = + new com.google.cloud.visionai.v1.ReceivePacketsRequest.SetupRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.visionai.v1.ReceivePacketsRequest.SetupRequest result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.metadata_ = metadataBuilder_ == null ? metadata_ : metadataBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.receiver_ = receiver_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.heartbeatInterval_ = + heartbeatIntervalBuilder_ == null + ? heartbeatInterval_ + : heartbeatIntervalBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.writesDoneGracePeriod_ = + writesDoneGracePeriodBuilder_ == null + ? writesDoneGracePeriod_ + : writesDoneGracePeriodBuilder_.build(); + to_bitField0_ |= 0x00000004; + } + result.bitField0_ |= to_bitField0_; + } + + private void buildPartialOneofs( + com.google.cloud.visionai.v1.ReceivePacketsRequest.SetupRequest result) { + result.consumerModeCase_ = consumerModeCase_; + result.consumerMode_ = this.consumerMode_; + if (consumerModeCase_ == 3 && eagerReceiveModeBuilder_ != null) { + result.consumerMode_ = eagerReceiveModeBuilder_.build(); + } + if (consumerModeCase_ == 4 && controlledReceiveModeBuilder_ != null) { + result.consumerMode_ = controlledReceiveModeBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.ReceivePacketsRequest.SetupRequest) { + return mergeFrom((com.google.cloud.visionai.v1.ReceivePacketsRequest.SetupRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.visionai.v1.ReceivePacketsRequest.SetupRequest other) { + if (other + == com.google.cloud.visionai.v1.ReceivePacketsRequest.SetupRequest.getDefaultInstance()) + return this; + if (other.hasMetadata()) { + mergeMetadata(other.getMetadata()); + } + if (!other.getReceiver().isEmpty()) { + receiver_ = other.receiver_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (other.hasHeartbeatInterval()) { + mergeHeartbeatInterval(other.getHeartbeatInterval()); + } + if (other.hasWritesDoneGracePeriod()) { + mergeWritesDoneGracePeriod(other.getWritesDoneGracePeriod()); + } + switch (other.getConsumerModeCase()) { + case EAGER_RECEIVE_MODE: + { + mergeEagerReceiveMode(other.getEagerReceiveMode()); + break; + } + case CONTROLLED_RECEIVE_MODE: + { + mergeControlledReceiveMode(other.getControlledReceiveMode()); + break; + } + case CONSUMERMODE_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getMetadataFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 10 + case 18: + { + receiver_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 18 + case 26: + { + input.readMessage( + getEagerReceiveModeFieldBuilder().getBuilder(), extensionRegistry); + consumerModeCase_ = 3; + break; + } // case 26 + case 34: + { + input.readMessage( + getControlledReceiveModeFieldBuilder().getBuilder(), extensionRegistry); + consumerModeCase_ = 4; + break; + } // case 34 + case 42: + { + input.readMessage( + getHeartbeatIntervalFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 50: + { + input.readMessage( + getWritesDoneGracePeriodFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000020; + break; + } // case 50 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int consumerModeCase_ = 0; + private java.lang.Object consumerMode_; + + public ConsumerModeCase getConsumerModeCase() { + return ConsumerModeCase.forNumber(consumerModeCase_); + } + + public Builder clearConsumerMode() { + consumerModeCase_ = 0; + consumerMode_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.EagerMode, + com.google.cloud.visionai.v1.EagerMode.Builder, + com.google.cloud.visionai.v1.EagerModeOrBuilder> + eagerReceiveModeBuilder_; + /** + * + * + *
+       * Options for configuring eager mode.
+       * 
+ * + * .google.cloud.visionai.v1.EagerMode eager_receive_mode = 3; + * + * @return Whether the eagerReceiveMode field is set. + */ + @java.lang.Override + public boolean hasEagerReceiveMode() { + return consumerModeCase_ == 3; + } + /** + * + * + *
+       * Options for configuring eager mode.
+       * 
+ * + * .google.cloud.visionai.v1.EagerMode eager_receive_mode = 3; + * + * @return The eagerReceiveMode. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.EagerMode getEagerReceiveMode() { + if (eagerReceiveModeBuilder_ == null) { + if (consumerModeCase_ == 3) { + return (com.google.cloud.visionai.v1.EagerMode) consumerMode_; + } + return com.google.cloud.visionai.v1.EagerMode.getDefaultInstance(); + } else { + if (consumerModeCase_ == 3) { + return eagerReceiveModeBuilder_.getMessage(); + } + return com.google.cloud.visionai.v1.EagerMode.getDefaultInstance(); + } + } + /** + * + * + *
+       * Options for configuring eager mode.
+       * 
+ * + * .google.cloud.visionai.v1.EagerMode eager_receive_mode = 3; + */ + public Builder setEagerReceiveMode(com.google.cloud.visionai.v1.EagerMode value) { + if (eagerReceiveModeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + consumerMode_ = value; + onChanged(); + } else { + eagerReceiveModeBuilder_.setMessage(value); + } + consumerModeCase_ = 3; + return this; + } + /** + * + * + *
+       * Options for configuring eager mode.
+       * 
+ * + * .google.cloud.visionai.v1.EagerMode eager_receive_mode = 3; + */ + public Builder setEagerReceiveMode( + com.google.cloud.visionai.v1.EagerMode.Builder builderForValue) { + if (eagerReceiveModeBuilder_ == null) { + consumerMode_ = builderForValue.build(); + onChanged(); + } else { + eagerReceiveModeBuilder_.setMessage(builderForValue.build()); + } + consumerModeCase_ = 3; + return this; + } + /** + * + * + *
+       * Options for configuring eager mode.
+       * 
+ * + * .google.cloud.visionai.v1.EagerMode eager_receive_mode = 3; + */ + public Builder mergeEagerReceiveMode(com.google.cloud.visionai.v1.EagerMode value) { + if (eagerReceiveModeBuilder_ == null) { + if (consumerModeCase_ == 3 + && consumerMode_ != com.google.cloud.visionai.v1.EagerMode.getDefaultInstance()) { + consumerMode_ = + com.google.cloud.visionai.v1.EagerMode.newBuilder( + (com.google.cloud.visionai.v1.EagerMode) consumerMode_) + .mergeFrom(value) + .buildPartial(); + } else { + consumerMode_ = value; + } + onChanged(); + } else { + if (consumerModeCase_ == 3) { + eagerReceiveModeBuilder_.mergeFrom(value); + } else { + eagerReceiveModeBuilder_.setMessage(value); + } + } + consumerModeCase_ = 3; + return this; + } + /** + * + * + *
+       * Options for configuring eager mode.
+       * 
+ * + * .google.cloud.visionai.v1.EagerMode eager_receive_mode = 3; + */ + public Builder clearEagerReceiveMode() { + if (eagerReceiveModeBuilder_ == null) { + if (consumerModeCase_ == 3) { + consumerModeCase_ = 0; + consumerMode_ = null; + onChanged(); + } + } else { + if (consumerModeCase_ == 3) { + consumerModeCase_ = 0; + consumerMode_ = null; + } + eagerReceiveModeBuilder_.clear(); + } + return this; + } + /** + * + * + *
+       * Options for configuring eager mode.
+       * 
+ * + * .google.cloud.visionai.v1.EagerMode eager_receive_mode = 3; + */ + public com.google.cloud.visionai.v1.EagerMode.Builder getEagerReceiveModeBuilder() { + return getEagerReceiveModeFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Options for configuring eager mode.
+       * 
+ * + * .google.cloud.visionai.v1.EagerMode eager_receive_mode = 3; + */ + @java.lang.Override + public com.google.cloud.visionai.v1.EagerModeOrBuilder getEagerReceiveModeOrBuilder() { + if ((consumerModeCase_ == 3) && (eagerReceiveModeBuilder_ != null)) { + return eagerReceiveModeBuilder_.getMessageOrBuilder(); + } else { + if (consumerModeCase_ == 3) { + return (com.google.cloud.visionai.v1.EagerMode) consumerMode_; + } + return com.google.cloud.visionai.v1.EagerMode.getDefaultInstance(); + } + } + /** + * + * + *
+       * Options for configuring eager mode.
+       * 
+ * + * .google.cloud.visionai.v1.EagerMode eager_receive_mode = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.EagerMode, + com.google.cloud.visionai.v1.EagerMode.Builder, + com.google.cloud.visionai.v1.EagerModeOrBuilder> + getEagerReceiveModeFieldBuilder() { + if (eagerReceiveModeBuilder_ == null) { + if (!(consumerModeCase_ == 3)) { + consumerMode_ = com.google.cloud.visionai.v1.EagerMode.getDefaultInstance(); + } + eagerReceiveModeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.EagerMode, + com.google.cloud.visionai.v1.EagerMode.Builder, + com.google.cloud.visionai.v1.EagerModeOrBuilder>( + (com.google.cloud.visionai.v1.EagerMode) consumerMode_, + getParentForChildren(), + isClean()); + consumerMode_ = null; + } + consumerModeCase_ = 3; + onChanged(); + return eagerReceiveModeBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.ControlledMode, + com.google.cloud.visionai.v1.ControlledMode.Builder, + com.google.cloud.visionai.v1.ControlledModeOrBuilder> + controlledReceiveModeBuilder_; + /** + * + * + *
+       * Options for configuring controlled mode.
+       * 
+ * + * .google.cloud.visionai.v1.ControlledMode controlled_receive_mode = 4; + * + * @return Whether the controlledReceiveMode field is set. + */ + @java.lang.Override + public boolean hasControlledReceiveMode() { + return consumerModeCase_ == 4; + } + /** + * + * + *
+       * Options for configuring controlled mode.
+       * 
+ * + * .google.cloud.visionai.v1.ControlledMode controlled_receive_mode = 4; + * + * @return The controlledReceiveMode. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.ControlledMode getControlledReceiveMode() { + if (controlledReceiveModeBuilder_ == null) { + if (consumerModeCase_ == 4) { + return (com.google.cloud.visionai.v1.ControlledMode) consumerMode_; + } + return com.google.cloud.visionai.v1.ControlledMode.getDefaultInstance(); + } else { + if (consumerModeCase_ == 4) { + return controlledReceiveModeBuilder_.getMessage(); + } + return com.google.cloud.visionai.v1.ControlledMode.getDefaultInstance(); + } + } + /** + * + * + *
+       * Options for configuring controlled mode.
+       * 
+ * + * .google.cloud.visionai.v1.ControlledMode controlled_receive_mode = 4; + */ + public Builder setControlledReceiveMode(com.google.cloud.visionai.v1.ControlledMode value) { + if (controlledReceiveModeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + consumerMode_ = value; + onChanged(); + } else { + controlledReceiveModeBuilder_.setMessage(value); + } + consumerModeCase_ = 4; + return this; + } + /** + * + * + *
+       * Options for configuring controlled mode.
+       * 
+ * + * .google.cloud.visionai.v1.ControlledMode controlled_receive_mode = 4; + */ + public Builder setControlledReceiveMode( + com.google.cloud.visionai.v1.ControlledMode.Builder builderForValue) { + if (controlledReceiveModeBuilder_ == null) { + consumerMode_ = builderForValue.build(); + onChanged(); + } else { + controlledReceiveModeBuilder_.setMessage(builderForValue.build()); + } + consumerModeCase_ = 4; + return this; + } + /** + * + * + *
+       * Options for configuring controlled mode.
+       * 
+ * + * .google.cloud.visionai.v1.ControlledMode controlled_receive_mode = 4; + */ + public Builder mergeControlledReceiveMode(com.google.cloud.visionai.v1.ControlledMode value) { + if (controlledReceiveModeBuilder_ == null) { + if (consumerModeCase_ == 4 + && consumerMode_ + != com.google.cloud.visionai.v1.ControlledMode.getDefaultInstance()) { + consumerMode_ = + com.google.cloud.visionai.v1.ControlledMode.newBuilder( + (com.google.cloud.visionai.v1.ControlledMode) consumerMode_) + .mergeFrom(value) + .buildPartial(); + } else { + consumerMode_ = value; + } + onChanged(); + } else { + if (consumerModeCase_ == 4) { + controlledReceiveModeBuilder_.mergeFrom(value); + } else { + controlledReceiveModeBuilder_.setMessage(value); + } + } + consumerModeCase_ = 4; + return this; + } + /** + * + * + *
+       * Options for configuring controlled mode.
+       * 
+ * + * .google.cloud.visionai.v1.ControlledMode controlled_receive_mode = 4; + */ + public Builder clearControlledReceiveMode() { + if (controlledReceiveModeBuilder_ == null) { + if (consumerModeCase_ == 4) { + consumerModeCase_ = 0; + consumerMode_ = null; + onChanged(); + } + } else { + if (consumerModeCase_ == 4) { + consumerModeCase_ = 0; + consumerMode_ = null; + } + controlledReceiveModeBuilder_.clear(); + } + return this; + } + /** + * + * + *
+       * Options for configuring controlled mode.
+       * 
+ * + * .google.cloud.visionai.v1.ControlledMode controlled_receive_mode = 4; + */ + public com.google.cloud.visionai.v1.ControlledMode.Builder getControlledReceiveModeBuilder() { + return getControlledReceiveModeFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Options for configuring controlled mode.
+       * 
+ * + * .google.cloud.visionai.v1.ControlledMode controlled_receive_mode = 4; + */ + @java.lang.Override + public com.google.cloud.visionai.v1.ControlledModeOrBuilder + getControlledReceiveModeOrBuilder() { + if ((consumerModeCase_ == 4) && (controlledReceiveModeBuilder_ != null)) { + return controlledReceiveModeBuilder_.getMessageOrBuilder(); + } else { + if (consumerModeCase_ == 4) { + return (com.google.cloud.visionai.v1.ControlledMode) consumerMode_; + } + return com.google.cloud.visionai.v1.ControlledMode.getDefaultInstance(); + } + } + /** + * + * + *
+       * Options for configuring controlled mode.
+       * 
+ * + * .google.cloud.visionai.v1.ControlledMode controlled_receive_mode = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.ControlledMode, + com.google.cloud.visionai.v1.ControlledMode.Builder, + com.google.cloud.visionai.v1.ControlledModeOrBuilder> + getControlledReceiveModeFieldBuilder() { + if (controlledReceiveModeBuilder_ == null) { + if (!(consumerModeCase_ == 4)) { + consumerMode_ = com.google.cloud.visionai.v1.ControlledMode.getDefaultInstance(); + } + controlledReceiveModeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.ControlledMode, + com.google.cloud.visionai.v1.ControlledMode.Builder, + com.google.cloud.visionai.v1.ControlledModeOrBuilder>( + (com.google.cloud.visionai.v1.ControlledMode) consumerMode_, + getParentForChildren(), + isClean()); + consumerMode_ = null; + } + consumerModeCase_ = 4; + onChanged(); + return controlledReceiveModeBuilder_; + } + + private com.google.cloud.visionai.v1.RequestMetadata metadata_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.RequestMetadata, + com.google.cloud.visionai.v1.RequestMetadata.Builder, + com.google.cloud.visionai.v1.RequestMetadataOrBuilder> + metadataBuilder_; + /** + * + * + *
+       * The configurations that specify where packets are retrieved.
+       * 
+ * + * .google.cloud.visionai.v1.RequestMetadata metadata = 1; + * + * @return Whether the metadata field is set. + */ + public boolean hasMetadata() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+       * The configurations that specify where packets are retrieved.
+       * 
+ * + * .google.cloud.visionai.v1.RequestMetadata metadata = 1; + * + * @return The metadata. + */ + public com.google.cloud.visionai.v1.RequestMetadata getMetadata() { + if (metadataBuilder_ == null) { + return metadata_ == null + ? com.google.cloud.visionai.v1.RequestMetadata.getDefaultInstance() + : metadata_; + } else { + return metadataBuilder_.getMessage(); + } + } + /** + * + * + *
+       * The configurations that specify where packets are retrieved.
+       * 
+ * + * .google.cloud.visionai.v1.RequestMetadata metadata = 1; + */ + public Builder setMetadata(com.google.cloud.visionai.v1.RequestMetadata value) { + if (metadataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + metadata_ = value; + } else { + metadataBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+       * The configurations that specify where packets are retrieved.
+       * 
+ * + * .google.cloud.visionai.v1.RequestMetadata metadata = 1; + */ + public Builder setMetadata( + com.google.cloud.visionai.v1.RequestMetadata.Builder builderForValue) { + if (metadataBuilder_ == null) { + metadata_ = builderForValue.build(); + } else { + metadataBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+       * The configurations that specify where packets are retrieved.
+       * 
+ * + * .google.cloud.visionai.v1.RequestMetadata metadata = 1; + */ + public Builder mergeMetadata(com.google.cloud.visionai.v1.RequestMetadata value) { + if (metadataBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && metadata_ != null + && metadata_ != com.google.cloud.visionai.v1.RequestMetadata.getDefaultInstance()) { + getMetadataBuilder().mergeFrom(value); + } else { + metadata_ = value; + } + } else { + metadataBuilder_.mergeFrom(value); + } + if (metadata_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + /** + * + * + *
+       * The configurations that specify where packets are retrieved.
+       * 
+ * + * .google.cloud.visionai.v1.RequestMetadata metadata = 1; + */ + public Builder clearMetadata() { + bitField0_ = (bitField0_ & ~0x00000004); + metadata_ = null; + if (metadataBuilder_ != null) { + metadataBuilder_.dispose(); + metadataBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+       * The configurations that specify where packets are retrieved.
+       * 
+ * + * .google.cloud.visionai.v1.RequestMetadata metadata = 1; + */ + public com.google.cloud.visionai.v1.RequestMetadata.Builder getMetadataBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getMetadataFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * The configurations that specify where packets are retrieved.
+       * 
+ * + * .google.cloud.visionai.v1.RequestMetadata metadata = 1; + */ + public com.google.cloud.visionai.v1.RequestMetadataOrBuilder getMetadataOrBuilder() { + if (metadataBuilder_ != null) { + return metadataBuilder_.getMessageOrBuilder(); + } else { + return metadata_ == null + ? com.google.cloud.visionai.v1.RequestMetadata.getDefaultInstance() + : metadata_; + } + } + /** + * + * + *
+       * The configurations that specify where packets are retrieved.
+       * 
+ * + * .google.cloud.visionai.v1.RequestMetadata metadata = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.RequestMetadata, + com.google.cloud.visionai.v1.RequestMetadata.Builder, + com.google.cloud.visionai.v1.RequestMetadataOrBuilder> + getMetadataFieldBuilder() { + if (metadataBuilder_ == null) { + metadataBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.RequestMetadata, + com.google.cloud.visionai.v1.RequestMetadata.Builder, + com.google.cloud.visionai.v1.RequestMetadataOrBuilder>( + getMetadata(), getParentForChildren(), isClean()); + metadata_ = null; + } + return metadataBuilder_; + } + + private java.lang.Object receiver_ = ""; + /** + * + * + *
+       * A name for the receiver to self-identify.
+       *
+       * This is used to keep track of a receiver's read progress.
+       * 
+ * + * string receiver = 2; + * + * @return The receiver. + */ + public java.lang.String getReceiver() { + java.lang.Object ref = receiver_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + receiver_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * A name for the receiver to self-identify.
+       *
+       * This is used to keep track of a receiver's read progress.
+       * 
+ * + * string receiver = 2; + * + * @return The bytes for receiver. + */ + public com.google.protobuf.ByteString getReceiverBytes() { + java.lang.Object ref = receiver_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + receiver_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * A name for the receiver to self-identify.
+       *
+       * This is used to keep track of a receiver's read progress.
+       * 
+ * + * string receiver = 2; + * + * @param value The receiver to set. + * @return This builder for chaining. + */ + public Builder setReceiver(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + receiver_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+       * A name for the receiver to self-identify.
+       *
+       * This is used to keep track of a receiver's read progress.
+       * 
+ * + * string receiver = 2; + * + * @return This builder for chaining. + */ + public Builder clearReceiver() { + receiver_ = getDefaultInstance().getReceiver(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+       * A name for the receiver to self-identify.
+       *
+       * This is used to keep track of a receiver's read progress.
+       * 
+ * + * string receiver = 2; + * + * @param value The bytes for receiver to set. + * @return This builder for chaining. + */ + public Builder setReceiverBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + receiver_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private com.google.protobuf.Duration heartbeatInterval_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + heartbeatIntervalBuilder_; + /** + * + * + *
+       * The maximum duration of server silence before the client determines the
+       * server unreachable.
+       *
+       * The client must either receive a `Packet` or a heart beat message before
+       * this duration expires; otherwise, the client will automatically cancel
+       * the current connection and retry.
+       * 
+ * + * .google.protobuf.Duration heartbeat_interval = 5; + * + * @return Whether the heartbeatInterval field is set. + */ + public boolean hasHeartbeatInterval() { + return ((bitField0_ & 0x00000010) != 0); + } + /** + * + * + *
+       * The maximum duration of server silence before the client determines the
+       * server unreachable.
+       *
+       * The client must either receive a `Packet` or a heart beat message before
+       * this duration expires; otherwise, the client will automatically cancel
+       * the current connection and retry.
+       * 
+ * + * .google.protobuf.Duration heartbeat_interval = 5; + * + * @return The heartbeatInterval. + */ + public com.google.protobuf.Duration getHeartbeatInterval() { + if (heartbeatIntervalBuilder_ == null) { + return heartbeatInterval_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : heartbeatInterval_; + } else { + return heartbeatIntervalBuilder_.getMessage(); + } + } + /** + * + * + *
+       * The maximum duration of server silence before the client determines the
+       * server unreachable.
+       *
+       * The client must either receive a `Packet` or a heart beat message before
+       * this duration expires; otherwise, the client will automatically cancel
+       * the current connection and retry.
+       * 
+ * + * .google.protobuf.Duration heartbeat_interval = 5; + */ + public Builder setHeartbeatInterval(com.google.protobuf.Duration value) { + if (heartbeatIntervalBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + heartbeatInterval_ = value; + } else { + heartbeatIntervalBuilder_.setMessage(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+       * The maximum duration of server silence before the client determines the
+       * server unreachable.
+       *
+       * The client must either receive a `Packet` or a heart beat message before
+       * this duration expires; otherwise, the client will automatically cancel
+       * the current connection and retry.
+       * 
+ * + * .google.protobuf.Duration heartbeat_interval = 5; + */ + public Builder setHeartbeatInterval(com.google.protobuf.Duration.Builder builderForValue) { + if (heartbeatIntervalBuilder_ == null) { + heartbeatInterval_ = builderForValue.build(); + } else { + heartbeatIntervalBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+       * The maximum duration of server silence before the client determines the
+       * server unreachable.
+       *
+       * The client must either receive a `Packet` or a heart beat message before
+       * this duration expires; otherwise, the client will automatically cancel
+       * the current connection and retry.
+       * 
+ * + * .google.protobuf.Duration heartbeat_interval = 5; + */ + public Builder mergeHeartbeatInterval(com.google.protobuf.Duration value) { + if (heartbeatIntervalBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0) + && heartbeatInterval_ != null + && heartbeatInterval_ != com.google.protobuf.Duration.getDefaultInstance()) { + getHeartbeatIntervalBuilder().mergeFrom(value); + } else { + heartbeatInterval_ = value; + } + } else { + heartbeatIntervalBuilder_.mergeFrom(value); + } + if (heartbeatInterval_ != null) { + bitField0_ |= 0x00000010; + onChanged(); + } + return this; + } + /** + * + * + *
+       * The maximum duration of server silence before the client determines the
+       * server unreachable.
+       *
+       * The client must either receive a `Packet` or a heart beat message before
+       * this duration expires; otherwise, the client will automatically cancel
+       * the current connection and retry.
+       * 
+ * + * .google.protobuf.Duration heartbeat_interval = 5; + */ + public Builder clearHeartbeatInterval() { + bitField0_ = (bitField0_ & ~0x00000010); + heartbeatInterval_ = null; + if (heartbeatIntervalBuilder_ != null) { + heartbeatIntervalBuilder_.dispose(); + heartbeatIntervalBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+       * The maximum duration of server silence before the client determines the
+       * server unreachable.
+       *
+       * The client must either receive a `Packet` or a heart beat message before
+       * this duration expires; otherwise, the client will automatically cancel
+       * the current connection and retry.
+       * 
+ * + * .google.protobuf.Duration heartbeat_interval = 5; + */ + public com.google.protobuf.Duration.Builder getHeartbeatIntervalBuilder() { + bitField0_ |= 0x00000010; + onChanged(); + return getHeartbeatIntervalFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * The maximum duration of server silence before the client determines the
+       * server unreachable.
+       *
+       * The client must either receive a `Packet` or a heart beat message before
+       * this duration expires; otherwise, the client will automatically cancel
+       * the current connection and retry.
+       * 
+ * + * .google.protobuf.Duration heartbeat_interval = 5; + */ + public com.google.protobuf.DurationOrBuilder getHeartbeatIntervalOrBuilder() { + if (heartbeatIntervalBuilder_ != null) { + return heartbeatIntervalBuilder_.getMessageOrBuilder(); + } else { + return heartbeatInterval_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : heartbeatInterval_; + } + } + /** + * + * + *
+       * The maximum duration of server silence before the client determines the
+       * server unreachable.
+       *
+       * The client must either receive a `Packet` or a heart beat message before
+       * this duration expires; otherwise, the client will automatically cancel
+       * the current connection and retry.
+       * 
+ * + * .google.protobuf.Duration heartbeat_interval = 5; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + getHeartbeatIntervalFieldBuilder() { + if (heartbeatIntervalBuilder_ == null) { + heartbeatIntervalBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder>( + getHeartbeatInterval(), getParentForChildren(), isClean()); + heartbeatInterval_ = null; + } + return heartbeatIntervalBuilder_; + } + + private com.google.protobuf.Duration writesDoneGracePeriod_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + writesDoneGracePeriodBuilder_; + /** + * + * + *
+       * The grace period after which a `writes_done_request` is issued, that a
+       * `WritesDone` is expected from the client.
+       *
+       * The server is free to cancel the RPC should this expire.
+       *
+       * A system default will be chosen if unset.
+       * 
+ * + * .google.protobuf.Duration writes_done_grace_period = 6; + * + * @return Whether the writesDoneGracePeriod field is set. + */ + public boolean hasWritesDoneGracePeriod() { + return ((bitField0_ & 0x00000020) != 0); + } + /** + * + * + *
+       * The grace period after which a `writes_done_request` is issued, that a
+       * `WritesDone` is expected from the client.
+       *
+       * The server is free to cancel the RPC should this expire.
+       *
+       * A system default will be chosen if unset.
+       * 
+ * + * .google.protobuf.Duration writes_done_grace_period = 6; + * + * @return The writesDoneGracePeriod. + */ + public com.google.protobuf.Duration getWritesDoneGracePeriod() { + if (writesDoneGracePeriodBuilder_ == null) { + return writesDoneGracePeriod_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : writesDoneGracePeriod_; + } else { + return writesDoneGracePeriodBuilder_.getMessage(); + } + } + /** + * + * + *
+       * The grace period after which a `writes_done_request` is issued, that a
+       * `WritesDone` is expected from the client.
+       *
+       * The server is free to cancel the RPC should this expire.
+       *
+       * A system default will be chosen if unset.
+       * 
+ * + * .google.protobuf.Duration writes_done_grace_period = 6; + */ + public Builder setWritesDoneGracePeriod(com.google.protobuf.Duration value) { + if (writesDoneGracePeriodBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + writesDoneGracePeriod_ = value; + } else { + writesDoneGracePeriodBuilder_.setMessage(value); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+       * The grace period after which a `writes_done_request` is issued, that a
+       * `WritesDone` is expected from the client.
+       *
+       * The server is free to cancel the RPC should this expire.
+       *
+       * A system default will be chosen if unset.
+       * 
+ * + * .google.protobuf.Duration writes_done_grace_period = 6; + */ + public Builder setWritesDoneGracePeriod( + com.google.protobuf.Duration.Builder builderForValue) { + if (writesDoneGracePeriodBuilder_ == null) { + writesDoneGracePeriod_ = builderForValue.build(); + } else { + writesDoneGracePeriodBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+       * The grace period after which a `writes_done_request` is issued, that a
+       * `WritesDone` is expected from the client.
+       *
+       * The server is free to cancel the RPC should this expire.
+       *
+       * A system default will be chosen if unset.
+       * 
+ * + * .google.protobuf.Duration writes_done_grace_period = 6; + */ + public Builder mergeWritesDoneGracePeriod(com.google.protobuf.Duration value) { + if (writesDoneGracePeriodBuilder_ == null) { + if (((bitField0_ & 0x00000020) != 0) + && writesDoneGracePeriod_ != null + && writesDoneGracePeriod_ != com.google.protobuf.Duration.getDefaultInstance()) { + getWritesDoneGracePeriodBuilder().mergeFrom(value); + } else { + writesDoneGracePeriod_ = value; + } + } else { + writesDoneGracePeriodBuilder_.mergeFrom(value); + } + if (writesDoneGracePeriod_ != null) { + bitField0_ |= 0x00000020; + onChanged(); + } + return this; + } + /** + * + * + *
+       * The grace period after which a `writes_done_request` is issued, that a
+       * `WritesDone` is expected from the client.
+       *
+       * The server is free to cancel the RPC should this expire.
+       *
+       * A system default will be chosen if unset.
+       * 
+ * + * .google.protobuf.Duration writes_done_grace_period = 6; + */ + public Builder clearWritesDoneGracePeriod() { + bitField0_ = (bitField0_ & ~0x00000020); + writesDoneGracePeriod_ = null; + if (writesDoneGracePeriodBuilder_ != null) { + writesDoneGracePeriodBuilder_.dispose(); + writesDoneGracePeriodBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+       * The grace period after which a `writes_done_request` is issued, that a
+       * `WritesDone` is expected from the client.
+       *
+       * The server is free to cancel the RPC should this expire.
+       *
+       * A system default will be chosen if unset.
+       * 
+ * + * .google.protobuf.Duration writes_done_grace_period = 6; + */ + public com.google.protobuf.Duration.Builder getWritesDoneGracePeriodBuilder() { + bitField0_ |= 0x00000020; + onChanged(); + return getWritesDoneGracePeriodFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * The grace period after which a `writes_done_request` is issued, that a
+       * `WritesDone` is expected from the client.
+       *
+       * The server is free to cancel the RPC should this expire.
+       *
+       * A system default will be chosen if unset.
+       * 
+ * + * .google.protobuf.Duration writes_done_grace_period = 6; + */ + public com.google.protobuf.DurationOrBuilder getWritesDoneGracePeriodOrBuilder() { + if (writesDoneGracePeriodBuilder_ != null) { + return writesDoneGracePeriodBuilder_.getMessageOrBuilder(); + } else { + return writesDoneGracePeriod_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : writesDoneGracePeriod_; + } + } + /** + * + * + *
+       * The grace period after which a `writes_done_request` is issued, that a
+       * `WritesDone` is expected from the client.
+       *
+       * The server is free to cancel the RPC should this expire.
+       *
+       * A system default will be chosen if unset.
+       * 
+ * + * .google.protobuf.Duration writes_done_grace_period = 6; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + getWritesDoneGracePeriodFieldBuilder() { + if (writesDoneGracePeriodBuilder_ == null) { + writesDoneGracePeriodBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder>( + getWritesDoneGracePeriod(), getParentForChildren(), isClean()); + writesDoneGracePeriod_ = null; + } + return writesDoneGracePeriodBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.ReceivePacketsRequest.SetupRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.ReceivePacketsRequest.SetupRequest) + private static final com.google.cloud.visionai.v1.ReceivePacketsRequest.SetupRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.ReceivePacketsRequest.SetupRequest(); + } + + public static com.google.cloud.visionai.v1.ReceivePacketsRequest.SetupRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SetupRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.ReceivePacketsRequest.SetupRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int requestCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object request_; + + public enum RequestCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + SETUP_REQUEST(6), + COMMIT_REQUEST(7), + REQUEST_NOT_SET(0); + private final int value; + + private RequestCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static RequestCase valueOf(int value) { + return forNumber(value); + } + + public static RequestCase forNumber(int value) { + switch (value) { + case 6: + return SETUP_REQUEST; + case 7: + return COMMIT_REQUEST; + case 0: + return REQUEST_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public RequestCase getRequestCase() { + return RequestCase.forNumber(requestCase_); + } + + public static final int SETUP_REQUEST_FIELD_NUMBER = 6; + /** + * + * + *
+   * The request to setup the initial state of session.
+   *
+   * The client must send and only send this as the first message.
+   * 
+ * + * .google.cloud.visionai.v1.ReceivePacketsRequest.SetupRequest setup_request = 6; + * + * @return Whether the setupRequest field is set. + */ + @java.lang.Override + public boolean hasSetupRequest() { + return requestCase_ == 6; + } + /** + * + * + *
+   * The request to setup the initial state of session.
+   *
+   * The client must send and only send this as the first message.
+   * 
+ * + * .google.cloud.visionai.v1.ReceivePacketsRequest.SetupRequest setup_request = 6; + * + * @return The setupRequest. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.ReceivePacketsRequest.SetupRequest getSetupRequest() { + if (requestCase_ == 6) { + return (com.google.cloud.visionai.v1.ReceivePacketsRequest.SetupRequest) request_; + } + return com.google.cloud.visionai.v1.ReceivePacketsRequest.SetupRequest.getDefaultInstance(); + } + /** + * + * + *
+   * The request to setup the initial state of session.
+   *
+   * The client must send and only send this as the first message.
+   * 
+ * + * .google.cloud.visionai.v1.ReceivePacketsRequest.SetupRequest setup_request = 6; + */ + @java.lang.Override + public com.google.cloud.visionai.v1.ReceivePacketsRequest.SetupRequestOrBuilder + getSetupRequestOrBuilder() { + if (requestCase_ == 6) { + return (com.google.cloud.visionai.v1.ReceivePacketsRequest.SetupRequest) request_; + } + return com.google.cloud.visionai.v1.ReceivePacketsRequest.SetupRequest.getDefaultInstance(); + } + + public static final int COMMIT_REQUEST_FIELD_NUMBER = 7; + /** + * + * + *
+   * This request checkpoints the consumer's read progress.
+   * 
+ * + * .google.cloud.visionai.v1.CommitRequest commit_request = 7; + * + * @return Whether the commitRequest field is set. + */ + @java.lang.Override + public boolean hasCommitRequest() { + return requestCase_ == 7; + } + /** + * + * + *
+   * This request checkpoints the consumer's read progress.
+   * 
+ * + * .google.cloud.visionai.v1.CommitRequest commit_request = 7; + * + * @return The commitRequest. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.CommitRequest getCommitRequest() { + if (requestCase_ == 7) { + return (com.google.cloud.visionai.v1.CommitRequest) request_; + } + return com.google.cloud.visionai.v1.CommitRequest.getDefaultInstance(); + } + /** + * + * + *
+   * This request checkpoints the consumer's read progress.
+   * 
+ * + * .google.cloud.visionai.v1.CommitRequest commit_request = 7; + */ + @java.lang.Override + public com.google.cloud.visionai.v1.CommitRequestOrBuilder getCommitRequestOrBuilder() { + if (requestCase_ == 7) { + return (com.google.cloud.visionai.v1.CommitRequest) request_; + } + return com.google.cloud.visionai.v1.CommitRequest.getDefaultInstance(); + } + + 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 (requestCase_ == 6) { + output.writeMessage( + 6, (com.google.cloud.visionai.v1.ReceivePacketsRequest.SetupRequest) request_); + } + if (requestCase_ == 7) { + output.writeMessage(7, (com.google.cloud.visionai.v1.CommitRequest) request_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (requestCase_ == 6) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 6, (com.google.cloud.visionai.v1.ReceivePacketsRequest.SetupRequest) request_); + } + if (requestCase_ == 7) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 7, (com.google.cloud.visionai.v1.CommitRequest) request_); + } + size += getUnknownFields().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.visionai.v1.ReceivePacketsRequest)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.ReceivePacketsRequest other = + (com.google.cloud.visionai.v1.ReceivePacketsRequest) obj; + + if (!getRequestCase().equals(other.getRequestCase())) return false; + switch (requestCase_) { + case 6: + if (!getSetupRequest().equals(other.getSetupRequest())) return false; + break; + case 7: + if (!getCommitRequest().equals(other.getCommitRequest())) return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + switch (requestCase_) { + case 6: + hash = (37 * hash) + SETUP_REQUEST_FIELD_NUMBER; + hash = (53 * hash) + getSetupRequest().hashCode(); + break; + case 7: + hash = (37 * hash) + COMMIT_REQUEST_FIELD_NUMBER; + hash = (53 * hash) + getCommitRequest().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.ReceivePacketsRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ReceivePacketsRequest 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.visionai.v1.ReceivePacketsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ReceivePacketsRequest 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.visionai.v1.ReceivePacketsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ReceivePacketsRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.ReceivePacketsRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ReceivePacketsRequest 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.visionai.v1.ReceivePacketsRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ReceivePacketsRequest 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.visionai.v1.ReceivePacketsRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ReceivePacketsRequest 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.visionai.v1.ReceivePacketsRequest 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; + } + /** + * + * + *
+   * Request message for receiving packets.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.ReceivePacketsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.ReceivePacketsRequest) + com.google.cloud.visionai.v1.ReceivePacketsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.StreamingServiceProto + .internal_static_google_cloud_visionai_v1_ReceivePacketsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.StreamingServiceProto + .internal_static_google_cloud_visionai_v1_ReceivePacketsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.ReceivePacketsRequest.class, + com.google.cloud.visionai.v1.ReceivePacketsRequest.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.ReceivePacketsRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (setupRequestBuilder_ != null) { + setupRequestBuilder_.clear(); + } + if (commitRequestBuilder_ != null) { + commitRequestBuilder_.clear(); + } + requestCase_ = 0; + request_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.StreamingServiceProto + .internal_static_google_cloud_visionai_v1_ReceivePacketsRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ReceivePacketsRequest getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.ReceivePacketsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ReceivePacketsRequest build() { + com.google.cloud.visionai.v1.ReceivePacketsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ReceivePacketsRequest buildPartial() { + com.google.cloud.visionai.v1.ReceivePacketsRequest result = + new com.google.cloud.visionai.v1.ReceivePacketsRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.visionai.v1.ReceivePacketsRequest result) { + int from_bitField0_ = bitField0_; + } + + private void buildPartialOneofs(com.google.cloud.visionai.v1.ReceivePacketsRequest result) { + result.requestCase_ = requestCase_; + result.request_ = this.request_; + if (requestCase_ == 6 && setupRequestBuilder_ != null) { + result.request_ = setupRequestBuilder_.build(); + } + if (requestCase_ == 7 && commitRequestBuilder_ != null) { + result.request_ = commitRequestBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.ReceivePacketsRequest) { + return mergeFrom((com.google.cloud.visionai.v1.ReceivePacketsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.ReceivePacketsRequest other) { + if (other == com.google.cloud.visionai.v1.ReceivePacketsRequest.getDefaultInstance()) + return this; + switch (other.getRequestCase()) { + case SETUP_REQUEST: + { + mergeSetupRequest(other.getSetupRequest()); + break; + } + case COMMIT_REQUEST: + { + mergeCommitRequest(other.getCommitRequest()); + break; + } + case REQUEST_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 50: + { + input.readMessage(getSetupRequestFieldBuilder().getBuilder(), extensionRegistry); + requestCase_ = 6; + break; + } // case 50 + case 58: + { + input.readMessage(getCommitRequestFieldBuilder().getBuilder(), extensionRegistry); + requestCase_ = 7; + break; + } // case 58 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int requestCase_ = 0; + private java.lang.Object request_; + + public RequestCase getRequestCase() { + return RequestCase.forNumber(requestCase_); + } + + public Builder clearRequest() { + requestCase_ = 0; + request_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.ReceivePacketsRequest.SetupRequest, + com.google.cloud.visionai.v1.ReceivePacketsRequest.SetupRequest.Builder, + com.google.cloud.visionai.v1.ReceivePacketsRequest.SetupRequestOrBuilder> + setupRequestBuilder_; + /** + * + * + *
+     * The request to setup the initial state of session.
+     *
+     * The client must send and only send this as the first message.
+     * 
+ * + * .google.cloud.visionai.v1.ReceivePacketsRequest.SetupRequest setup_request = 6; + * + * @return Whether the setupRequest field is set. + */ + @java.lang.Override + public boolean hasSetupRequest() { + return requestCase_ == 6; + } + /** + * + * + *
+     * The request to setup the initial state of session.
+     *
+     * The client must send and only send this as the first message.
+     * 
+ * + * .google.cloud.visionai.v1.ReceivePacketsRequest.SetupRequest setup_request = 6; + * + * @return The setupRequest. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.ReceivePacketsRequest.SetupRequest getSetupRequest() { + if (setupRequestBuilder_ == null) { + if (requestCase_ == 6) { + return (com.google.cloud.visionai.v1.ReceivePacketsRequest.SetupRequest) request_; + } + return com.google.cloud.visionai.v1.ReceivePacketsRequest.SetupRequest.getDefaultInstance(); + } else { + if (requestCase_ == 6) { + return setupRequestBuilder_.getMessage(); + } + return com.google.cloud.visionai.v1.ReceivePacketsRequest.SetupRequest.getDefaultInstance(); + } + } + /** + * + * + *
+     * The request to setup the initial state of session.
+     *
+     * The client must send and only send this as the first message.
+     * 
+ * + * .google.cloud.visionai.v1.ReceivePacketsRequest.SetupRequest setup_request = 6; + */ + public Builder setSetupRequest( + com.google.cloud.visionai.v1.ReceivePacketsRequest.SetupRequest value) { + if (setupRequestBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + request_ = value; + onChanged(); + } else { + setupRequestBuilder_.setMessage(value); + } + requestCase_ = 6; + return this; + } + /** + * + * + *
+     * The request to setup the initial state of session.
+     *
+     * The client must send and only send this as the first message.
+     * 
+ * + * .google.cloud.visionai.v1.ReceivePacketsRequest.SetupRequest setup_request = 6; + */ + public Builder setSetupRequest( + com.google.cloud.visionai.v1.ReceivePacketsRequest.SetupRequest.Builder builderForValue) { + if (setupRequestBuilder_ == null) { + request_ = builderForValue.build(); + onChanged(); + } else { + setupRequestBuilder_.setMessage(builderForValue.build()); + } + requestCase_ = 6; + return this; + } + /** + * + * + *
+     * The request to setup the initial state of session.
+     *
+     * The client must send and only send this as the first message.
+     * 
+ * + * .google.cloud.visionai.v1.ReceivePacketsRequest.SetupRequest setup_request = 6; + */ + public Builder mergeSetupRequest( + com.google.cloud.visionai.v1.ReceivePacketsRequest.SetupRequest value) { + if (setupRequestBuilder_ == null) { + if (requestCase_ == 6 + && request_ + != com.google.cloud.visionai.v1.ReceivePacketsRequest.SetupRequest + .getDefaultInstance()) { + request_ = + com.google.cloud.visionai.v1.ReceivePacketsRequest.SetupRequest.newBuilder( + (com.google.cloud.visionai.v1.ReceivePacketsRequest.SetupRequest) request_) + .mergeFrom(value) + .buildPartial(); + } else { + request_ = value; + } + onChanged(); + } else { + if (requestCase_ == 6) { + setupRequestBuilder_.mergeFrom(value); + } else { + setupRequestBuilder_.setMessage(value); + } + } + requestCase_ = 6; + return this; + } + /** + * + * + *
+     * The request to setup the initial state of session.
+     *
+     * The client must send and only send this as the first message.
+     * 
+ * + * .google.cloud.visionai.v1.ReceivePacketsRequest.SetupRequest setup_request = 6; + */ + public Builder clearSetupRequest() { + if (setupRequestBuilder_ == null) { + if (requestCase_ == 6) { + requestCase_ = 0; + request_ = null; + onChanged(); + } + } else { + if (requestCase_ == 6) { + requestCase_ = 0; + request_ = null; + } + setupRequestBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The request to setup the initial state of session.
+     *
+     * The client must send and only send this as the first message.
+     * 
+ * + * .google.cloud.visionai.v1.ReceivePacketsRequest.SetupRequest setup_request = 6; + */ + public com.google.cloud.visionai.v1.ReceivePacketsRequest.SetupRequest.Builder + getSetupRequestBuilder() { + return getSetupRequestFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The request to setup the initial state of session.
+     *
+     * The client must send and only send this as the first message.
+     * 
+ * + * .google.cloud.visionai.v1.ReceivePacketsRequest.SetupRequest setup_request = 6; + */ + @java.lang.Override + public com.google.cloud.visionai.v1.ReceivePacketsRequest.SetupRequestOrBuilder + getSetupRequestOrBuilder() { + if ((requestCase_ == 6) && (setupRequestBuilder_ != null)) { + return setupRequestBuilder_.getMessageOrBuilder(); + } else { + if (requestCase_ == 6) { + return (com.google.cloud.visionai.v1.ReceivePacketsRequest.SetupRequest) request_; + } + return com.google.cloud.visionai.v1.ReceivePacketsRequest.SetupRequest.getDefaultInstance(); + } + } + /** + * + * + *
+     * The request to setup the initial state of session.
+     *
+     * The client must send and only send this as the first message.
+     * 
+ * + * .google.cloud.visionai.v1.ReceivePacketsRequest.SetupRequest setup_request = 6; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.ReceivePacketsRequest.SetupRequest, + com.google.cloud.visionai.v1.ReceivePacketsRequest.SetupRequest.Builder, + com.google.cloud.visionai.v1.ReceivePacketsRequest.SetupRequestOrBuilder> + getSetupRequestFieldBuilder() { + if (setupRequestBuilder_ == null) { + if (!(requestCase_ == 6)) { + request_ = + com.google.cloud.visionai.v1.ReceivePacketsRequest.SetupRequest.getDefaultInstance(); + } + setupRequestBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.ReceivePacketsRequest.SetupRequest, + com.google.cloud.visionai.v1.ReceivePacketsRequest.SetupRequest.Builder, + com.google.cloud.visionai.v1.ReceivePacketsRequest.SetupRequestOrBuilder>( + (com.google.cloud.visionai.v1.ReceivePacketsRequest.SetupRequest) request_, + getParentForChildren(), + isClean()); + request_ = null; + } + requestCase_ = 6; + onChanged(); + return setupRequestBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.CommitRequest, + com.google.cloud.visionai.v1.CommitRequest.Builder, + com.google.cloud.visionai.v1.CommitRequestOrBuilder> + commitRequestBuilder_; + /** + * + * + *
+     * This request checkpoints the consumer's read progress.
+     * 
+ * + * .google.cloud.visionai.v1.CommitRequest commit_request = 7; + * + * @return Whether the commitRequest field is set. + */ + @java.lang.Override + public boolean hasCommitRequest() { + return requestCase_ == 7; + } + /** + * + * + *
+     * This request checkpoints the consumer's read progress.
+     * 
+ * + * .google.cloud.visionai.v1.CommitRequest commit_request = 7; + * + * @return The commitRequest. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.CommitRequest getCommitRequest() { + if (commitRequestBuilder_ == null) { + if (requestCase_ == 7) { + return (com.google.cloud.visionai.v1.CommitRequest) request_; + } + return com.google.cloud.visionai.v1.CommitRequest.getDefaultInstance(); + } else { + if (requestCase_ == 7) { + return commitRequestBuilder_.getMessage(); + } + return com.google.cloud.visionai.v1.CommitRequest.getDefaultInstance(); + } + } + /** + * + * + *
+     * This request checkpoints the consumer's read progress.
+     * 
+ * + * .google.cloud.visionai.v1.CommitRequest commit_request = 7; + */ + public Builder setCommitRequest(com.google.cloud.visionai.v1.CommitRequest value) { + if (commitRequestBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + request_ = value; + onChanged(); + } else { + commitRequestBuilder_.setMessage(value); + } + requestCase_ = 7; + return this; + } + /** + * + * + *
+     * This request checkpoints the consumer's read progress.
+     * 
+ * + * .google.cloud.visionai.v1.CommitRequest commit_request = 7; + */ + public Builder setCommitRequest( + com.google.cloud.visionai.v1.CommitRequest.Builder builderForValue) { + if (commitRequestBuilder_ == null) { + request_ = builderForValue.build(); + onChanged(); + } else { + commitRequestBuilder_.setMessage(builderForValue.build()); + } + requestCase_ = 7; + return this; + } + /** + * + * + *
+     * This request checkpoints the consumer's read progress.
+     * 
+ * + * .google.cloud.visionai.v1.CommitRequest commit_request = 7; + */ + public Builder mergeCommitRequest(com.google.cloud.visionai.v1.CommitRequest value) { + if (commitRequestBuilder_ == null) { + if (requestCase_ == 7 + && request_ != com.google.cloud.visionai.v1.CommitRequest.getDefaultInstance()) { + request_ = + com.google.cloud.visionai.v1.CommitRequest.newBuilder( + (com.google.cloud.visionai.v1.CommitRequest) request_) + .mergeFrom(value) + .buildPartial(); + } else { + request_ = value; + } + onChanged(); + } else { + if (requestCase_ == 7) { + commitRequestBuilder_.mergeFrom(value); + } else { + commitRequestBuilder_.setMessage(value); + } + } + requestCase_ = 7; + return this; + } + /** + * + * + *
+     * This request checkpoints the consumer's read progress.
+     * 
+ * + * .google.cloud.visionai.v1.CommitRequest commit_request = 7; + */ + public Builder clearCommitRequest() { + if (commitRequestBuilder_ == null) { + if (requestCase_ == 7) { + requestCase_ = 0; + request_ = null; + onChanged(); + } + } else { + if (requestCase_ == 7) { + requestCase_ = 0; + request_ = null; + } + commitRequestBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * This request checkpoints the consumer's read progress.
+     * 
+ * + * .google.cloud.visionai.v1.CommitRequest commit_request = 7; + */ + public com.google.cloud.visionai.v1.CommitRequest.Builder getCommitRequestBuilder() { + return getCommitRequestFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * This request checkpoints the consumer's read progress.
+     * 
+ * + * .google.cloud.visionai.v1.CommitRequest commit_request = 7; + */ + @java.lang.Override + public com.google.cloud.visionai.v1.CommitRequestOrBuilder getCommitRequestOrBuilder() { + if ((requestCase_ == 7) && (commitRequestBuilder_ != null)) { + return commitRequestBuilder_.getMessageOrBuilder(); + } else { + if (requestCase_ == 7) { + return (com.google.cloud.visionai.v1.CommitRequest) request_; + } + return com.google.cloud.visionai.v1.CommitRequest.getDefaultInstance(); + } + } + /** + * + * + *
+     * This request checkpoints the consumer's read progress.
+     * 
+ * + * .google.cloud.visionai.v1.CommitRequest commit_request = 7; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.CommitRequest, + com.google.cloud.visionai.v1.CommitRequest.Builder, + com.google.cloud.visionai.v1.CommitRequestOrBuilder> + getCommitRequestFieldBuilder() { + if (commitRequestBuilder_ == null) { + if (!(requestCase_ == 7)) { + request_ = com.google.cloud.visionai.v1.CommitRequest.getDefaultInstance(); + } + commitRequestBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.CommitRequest, + com.google.cloud.visionai.v1.CommitRequest.Builder, + com.google.cloud.visionai.v1.CommitRequestOrBuilder>( + (com.google.cloud.visionai.v1.CommitRequest) request_, + getParentForChildren(), + isClean()); + request_ = null; + } + requestCase_ = 7; + onChanged(); + return commitRequestBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.ReceivePacketsRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.ReceivePacketsRequest) + private static final com.google.cloud.visionai.v1.ReceivePacketsRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.ReceivePacketsRequest(); + } + + public static com.google.cloud.visionai.v1.ReceivePacketsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ReceivePacketsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.ReceivePacketsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ReceivePacketsRequestOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ReceivePacketsRequestOrBuilder.java new file mode 100644 index 000000000000..698b1097e50e --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ReceivePacketsRequestOrBuilder.java @@ -0,0 +1,105 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/streaming_service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface ReceivePacketsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.ReceivePacketsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The request to setup the initial state of session.
+   *
+   * The client must send and only send this as the first message.
+   * 
+ * + * .google.cloud.visionai.v1.ReceivePacketsRequest.SetupRequest setup_request = 6; + * + * @return Whether the setupRequest field is set. + */ + boolean hasSetupRequest(); + /** + * + * + *
+   * The request to setup the initial state of session.
+   *
+   * The client must send and only send this as the first message.
+   * 
+ * + * .google.cloud.visionai.v1.ReceivePacketsRequest.SetupRequest setup_request = 6; + * + * @return The setupRequest. + */ + com.google.cloud.visionai.v1.ReceivePacketsRequest.SetupRequest getSetupRequest(); + /** + * + * + *
+   * The request to setup the initial state of session.
+   *
+   * The client must send and only send this as the first message.
+   * 
+ * + * .google.cloud.visionai.v1.ReceivePacketsRequest.SetupRequest setup_request = 6; + */ + com.google.cloud.visionai.v1.ReceivePacketsRequest.SetupRequestOrBuilder + getSetupRequestOrBuilder(); + + /** + * + * + *
+   * This request checkpoints the consumer's read progress.
+   * 
+ * + * .google.cloud.visionai.v1.CommitRequest commit_request = 7; + * + * @return Whether the commitRequest field is set. + */ + boolean hasCommitRequest(); + /** + * + * + *
+   * This request checkpoints the consumer's read progress.
+   * 
+ * + * .google.cloud.visionai.v1.CommitRequest commit_request = 7; + * + * @return The commitRequest. + */ + com.google.cloud.visionai.v1.CommitRequest getCommitRequest(); + /** + * + * + *
+   * This request checkpoints the consumer's read progress.
+   * 
+ * + * .google.cloud.visionai.v1.CommitRequest commit_request = 7; + */ + com.google.cloud.visionai.v1.CommitRequestOrBuilder getCommitRequestOrBuilder(); + + com.google.cloud.visionai.v1.ReceivePacketsRequest.RequestCase getRequestCase(); +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ReceivePacketsResponse.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ReceivePacketsResponse.java new file mode 100644 index 000000000000..dd1b4db25694 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ReceivePacketsResponse.java @@ -0,0 +1,1114 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/streaming_service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * Response message from ReceivePackets.
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.ReceivePacketsResponse} + */ +public final class ReceivePacketsResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.ReceivePacketsResponse) + ReceivePacketsResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ReceivePacketsResponse.newBuilder() to construct. + private ReceivePacketsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ReceivePacketsResponse() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ReceivePacketsResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.StreamingServiceProto + .internal_static_google_cloud_visionai_v1_ReceivePacketsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.StreamingServiceProto + .internal_static_google_cloud_visionai_v1_ReceivePacketsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.ReceivePacketsResponse.class, + com.google.cloud.visionai.v1.ReceivePacketsResponse.Builder.class); + } + + private int responseCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object response_; + + public enum ResponseCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + PACKET(1), + CONTROL(3), + RESPONSE_NOT_SET(0); + private final int value; + + private ResponseCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static ResponseCase valueOf(int value) { + return forNumber(value); + } + + public static ResponseCase forNumber(int value) { + switch (value) { + case 1: + return PACKET; + case 3: + return CONTROL; + case 0: + return RESPONSE_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public ResponseCase getResponseCase() { + return ResponseCase.forNumber(responseCase_); + } + + public static final int PACKET_FIELD_NUMBER = 1; + /** + * + * + *
+   * A genuine data payload originating from the sender.
+   * 
+ * + * .google.cloud.visionai.v1.Packet packet = 1; + * + * @return Whether the packet field is set. + */ + @java.lang.Override + public boolean hasPacket() { + return responseCase_ == 1; + } + /** + * + * + *
+   * A genuine data payload originating from the sender.
+   * 
+ * + * .google.cloud.visionai.v1.Packet packet = 1; + * + * @return The packet. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.Packet getPacket() { + if (responseCase_ == 1) { + return (com.google.cloud.visionai.v1.Packet) response_; + } + return com.google.cloud.visionai.v1.Packet.getDefaultInstance(); + } + /** + * + * + *
+   * A genuine data payload originating from the sender.
+   * 
+ * + * .google.cloud.visionai.v1.Packet packet = 1; + */ + @java.lang.Override + public com.google.cloud.visionai.v1.PacketOrBuilder getPacketOrBuilder() { + if (responseCase_ == 1) { + return (com.google.cloud.visionai.v1.Packet) response_; + } + return com.google.cloud.visionai.v1.Packet.getDefaultInstance(); + } + + public static final int CONTROL_FIELD_NUMBER = 3; + /** + * + * + *
+   * A control message from the server.
+   * 
+ * + * .google.cloud.visionai.v1.ReceivePacketsControlResponse control = 3; + * + * @return Whether the control field is set. + */ + @java.lang.Override + public boolean hasControl() { + return responseCase_ == 3; + } + /** + * + * + *
+   * A control message from the server.
+   * 
+ * + * .google.cloud.visionai.v1.ReceivePacketsControlResponse control = 3; + * + * @return The control. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.ReceivePacketsControlResponse getControl() { + if (responseCase_ == 3) { + return (com.google.cloud.visionai.v1.ReceivePacketsControlResponse) response_; + } + return com.google.cloud.visionai.v1.ReceivePacketsControlResponse.getDefaultInstance(); + } + /** + * + * + *
+   * A control message from the server.
+   * 
+ * + * .google.cloud.visionai.v1.ReceivePacketsControlResponse control = 3; + */ + @java.lang.Override + public com.google.cloud.visionai.v1.ReceivePacketsControlResponseOrBuilder getControlOrBuilder() { + if (responseCase_ == 3) { + return (com.google.cloud.visionai.v1.ReceivePacketsControlResponse) response_; + } + return com.google.cloud.visionai.v1.ReceivePacketsControlResponse.getDefaultInstance(); + } + + 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 (responseCase_ == 1) { + output.writeMessage(1, (com.google.cloud.visionai.v1.Packet) response_); + } + if (responseCase_ == 3) { + output.writeMessage( + 3, (com.google.cloud.visionai.v1.ReceivePacketsControlResponse) response_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (responseCase_ == 1) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 1, (com.google.cloud.visionai.v1.Packet) response_); + } + if (responseCase_ == 3) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 3, (com.google.cloud.visionai.v1.ReceivePacketsControlResponse) response_); + } + size += getUnknownFields().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.visionai.v1.ReceivePacketsResponse)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.ReceivePacketsResponse other = + (com.google.cloud.visionai.v1.ReceivePacketsResponse) obj; + + if (!getResponseCase().equals(other.getResponseCase())) return false; + switch (responseCase_) { + case 1: + if (!getPacket().equals(other.getPacket())) return false; + break; + case 3: + if (!getControl().equals(other.getControl())) return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + switch (responseCase_) { + case 1: + hash = (37 * hash) + PACKET_FIELD_NUMBER; + hash = (53 * hash) + getPacket().hashCode(); + break; + case 3: + hash = (37 * hash) + CONTROL_FIELD_NUMBER; + hash = (53 * hash) + getControl().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.ReceivePacketsResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ReceivePacketsResponse 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.visionai.v1.ReceivePacketsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ReceivePacketsResponse 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.visionai.v1.ReceivePacketsResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ReceivePacketsResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.ReceivePacketsResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ReceivePacketsResponse 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.visionai.v1.ReceivePacketsResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ReceivePacketsResponse 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.visionai.v1.ReceivePacketsResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ReceivePacketsResponse 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.visionai.v1.ReceivePacketsResponse 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; + } + /** + * + * + *
+   * Response message from ReceivePackets.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.ReceivePacketsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.ReceivePacketsResponse) + com.google.cloud.visionai.v1.ReceivePacketsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.StreamingServiceProto + .internal_static_google_cloud_visionai_v1_ReceivePacketsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.StreamingServiceProto + .internal_static_google_cloud_visionai_v1_ReceivePacketsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.ReceivePacketsResponse.class, + com.google.cloud.visionai.v1.ReceivePacketsResponse.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.ReceivePacketsResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (packetBuilder_ != null) { + packetBuilder_.clear(); + } + if (controlBuilder_ != null) { + controlBuilder_.clear(); + } + responseCase_ = 0; + response_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.StreamingServiceProto + .internal_static_google_cloud_visionai_v1_ReceivePacketsResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ReceivePacketsResponse getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.ReceivePacketsResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ReceivePacketsResponse build() { + com.google.cloud.visionai.v1.ReceivePacketsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ReceivePacketsResponse buildPartial() { + com.google.cloud.visionai.v1.ReceivePacketsResponse result = + new com.google.cloud.visionai.v1.ReceivePacketsResponse(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.visionai.v1.ReceivePacketsResponse result) { + int from_bitField0_ = bitField0_; + } + + private void buildPartialOneofs(com.google.cloud.visionai.v1.ReceivePacketsResponse result) { + result.responseCase_ = responseCase_; + result.response_ = this.response_; + if (responseCase_ == 1 && packetBuilder_ != null) { + result.response_ = packetBuilder_.build(); + } + if (responseCase_ == 3 && controlBuilder_ != null) { + result.response_ = controlBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.ReceivePacketsResponse) { + return mergeFrom((com.google.cloud.visionai.v1.ReceivePacketsResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.ReceivePacketsResponse other) { + if (other == com.google.cloud.visionai.v1.ReceivePacketsResponse.getDefaultInstance()) + return this; + switch (other.getResponseCase()) { + case PACKET: + { + mergePacket(other.getPacket()); + break; + } + case CONTROL: + { + mergeControl(other.getControl()); + break; + } + case RESPONSE_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getPacketFieldBuilder().getBuilder(), extensionRegistry); + responseCase_ = 1; + break; + } // case 10 + case 26: + { + input.readMessage(getControlFieldBuilder().getBuilder(), extensionRegistry); + responseCase_ = 3; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int responseCase_ = 0; + private java.lang.Object response_; + + public ResponseCase getResponseCase() { + return ResponseCase.forNumber(responseCase_); + } + + public Builder clearResponse() { + responseCase_ = 0; + response_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.Packet, + com.google.cloud.visionai.v1.Packet.Builder, + com.google.cloud.visionai.v1.PacketOrBuilder> + packetBuilder_; + /** + * + * + *
+     * A genuine data payload originating from the sender.
+     * 
+ * + * .google.cloud.visionai.v1.Packet packet = 1; + * + * @return Whether the packet field is set. + */ + @java.lang.Override + public boolean hasPacket() { + return responseCase_ == 1; + } + /** + * + * + *
+     * A genuine data payload originating from the sender.
+     * 
+ * + * .google.cloud.visionai.v1.Packet packet = 1; + * + * @return The packet. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.Packet getPacket() { + if (packetBuilder_ == null) { + if (responseCase_ == 1) { + return (com.google.cloud.visionai.v1.Packet) response_; + } + return com.google.cloud.visionai.v1.Packet.getDefaultInstance(); + } else { + if (responseCase_ == 1) { + return packetBuilder_.getMessage(); + } + return com.google.cloud.visionai.v1.Packet.getDefaultInstance(); + } + } + /** + * + * + *
+     * A genuine data payload originating from the sender.
+     * 
+ * + * .google.cloud.visionai.v1.Packet packet = 1; + */ + public Builder setPacket(com.google.cloud.visionai.v1.Packet value) { + if (packetBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + response_ = value; + onChanged(); + } else { + packetBuilder_.setMessage(value); + } + responseCase_ = 1; + return this; + } + /** + * + * + *
+     * A genuine data payload originating from the sender.
+     * 
+ * + * .google.cloud.visionai.v1.Packet packet = 1; + */ + public Builder setPacket(com.google.cloud.visionai.v1.Packet.Builder builderForValue) { + if (packetBuilder_ == null) { + response_ = builderForValue.build(); + onChanged(); + } else { + packetBuilder_.setMessage(builderForValue.build()); + } + responseCase_ = 1; + return this; + } + /** + * + * + *
+     * A genuine data payload originating from the sender.
+     * 
+ * + * .google.cloud.visionai.v1.Packet packet = 1; + */ + public Builder mergePacket(com.google.cloud.visionai.v1.Packet value) { + if (packetBuilder_ == null) { + if (responseCase_ == 1 + && response_ != com.google.cloud.visionai.v1.Packet.getDefaultInstance()) { + response_ = + com.google.cloud.visionai.v1.Packet.newBuilder( + (com.google.cloud.visionai.v1.Packet) response_) + .mergeFrom(value) + .buildPartial(); + } else { + response_ = value; + } + onChanged(); + } else { + if (responseCase_ == 1) { + packetBuilder_.mergeFrom(value); + } else { + packetBuilder_.setMessage(value); + } + } + responseCase_ = 1; + return this; + } + /** + * + * + *
+     * A genuine data payload originating from the sender.
+     * 
+ * + * .google.cloud.visionai.v1.Packet packet = 1; + */ + public Builder clearPacket() { + if (packetBuilder_ == null) { + if (responseCase_ == 1) { + responseCase_ = 0; + response_ = null; + onChanged(); + } + } else { + if (responseCase_ == 1) { + responseCase_ = 0; + response_ = null; + } + packetBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * A genuine data payload originating from the sender.
+     * 
+ * + * .google.cloud.visionai.v1.Packet packet = 1; + */ + public com.google.cloud.visionai.v1.Packet.Builder getPacketBuilder() { + return getPacketFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * A genuine data payload originating from the sender.
+     * 
+ * + * .google.cloud.visionai.v1.Packet packet = 1; + */ + @java.lang.Override + public com.google.cloud.visionai.v1.PacketOrBuilder getPacketOrBuilder() { + if ((responseCase_ == 1) && (packetBuilder_ != null)) { + return packetBuilder_.getMessageOrBuilder(); + } else { + if (responseCase_ == 1) { + return (com.google.cloud.visionai.v1.Packet) response_; + } + return com.google.cloud.visionai.v1.Packet.getDefaultInstance(); + } + } + /** + * + * + *
+     * A genuine data payload originating from the sender.
+     * 
+ * + * .google.cloud.visionai.v1.Packet packet = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.Packet, + com.google.cloud.visionai.v1.Packet.Builder, + com.google.cloud.visionai.v1.PacketOrBuilder> + getPacketFieldBuilder() { + if (packetBuilder_ == null) { + if (!(responseCase_ == 1)) { + response_ = com.google.cloud.visionai.v1.Packet.getDefaultInstance(); + } + packetBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.Packet, + com.google.cloud.visionai.v1.Packet.Builder, + com.google.cloud.visionai.v1.PacketOrBuilder>( + (com.google.cloud.visionai.v1.Packet) response_, getParentForChildren(), isClean()); + response_ = null; + } + responseCase_ = 1; + onChanged(); + return packetBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.ReceivePacketsControlResponse, + com.google.cloud.visionai.v1.ReceivePacketsControlResponse.Builder, + com.google.cloud.visionai.v1.ReceivePacketsControlResponseOrBuilder> + controlBuilder_; + /** + * + * + *
+     * A control message from the server.
+     * 
+ * + * .google.cloud.visionai.v1.ReceivePacketsControlResponse control = 3; + * + * @return Whether the control field is set. + */ + @java.lang.Override + public boolean hasControl() { + return responseCase_ == 3; + } + /** + * + * + *
+     * A control message from the server.
+     * 
+ * + * .google.cloud.visionai.v1.ReceivePacketsControlResponse control = 3; + * + * @return The control. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.ReceivePacketsControlResponse getControl() { + if (controlBuilder_ == null) { + if (responseCase_ == 3) { + return (com.google.cloud.visionai.v1.ReceivePacketsControlResponse) response_; + } + return com.google.cloud.visionai.v1.ReceivePacketsControlResponse.getDefaultInstance(); + } else { + if (responseCase_ == 3) { + return controlBuilder_.getMessage(); + } + return com.google.cloud.visionai.v1.ReceivePacketsControlResponse.getDefaultInstance(); + } + } + /** + * + * + *
+     * A control message from the server.
+     * 
+ * + * .google.cloud.visionai.v1.ReceivePacketsControlResponse control = 3; + */ + public Builder setControl(com.google.cloud.visionai.v1.ReceivePacketsControlResponse value) { + if (controlBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + response_ = value; + onChanged(); + } else { + controlBuilder_.setMessage(value); + } + responseCase_ = 3; + return this; + } + /** + * + * + *
+     * A control message from the server.
+     * 
+ * + * .google.cloud.visionai.v1.ReceivePacketsControlResponse control = 3; + */ + public Builder setControl( + com.google.cloud.visionai.v1.ReceivePacketsControlResponse.Builder builderForValue) { + if (controlBuilder_ == null) { + response_ = builderForValue.build(); + onChanged(); + } else { + controlBuilder_.setMessage(builderForValue.build()); + } + responseCase_ = 3; + return this; + } + /** + * + * + *
+     * A control message from the server.
+     * 
+ * + * .google.cloud.visionai.v1.ReceivePacketsControlResponse control = 3; + */ + public Builder mergeControl(com.google.cloud.visionai.v1.ReceivePacketsControlResponse value) { + if (controlBuilder_ == null) { + if (responseCase_ == 3 + && response_ + != com.google.cloud.visionai.v1.ReceivePacketsControlResponse + .getDefaultInstance()) { + response_ = + com.google.cloud.visionai.v1.ReceivePacketsControlResponse.newBuilder( + (com.google.cloud.visionai.v1.ReceivePacketsControlResponse) response_) + .mergeFrom(value) + .buildPartial(); + } else { + response_ = value; + } + onChanged(); + } else { + if (responseCase_ == 3) { + controlBuilder_.mergeFrom(value); + } else { + controlBuilder_.setMessage(value); + } + } + responseCase_ = 3; + return this; + } + /** + * + * + *
+     * A control message from the server.
+     * 
+ * + * .google.cloud.visionai.v1.ReceivePacketsControlResponse control = 3; + */ + public Builder clearControl() { + if (controlBuilder_ == null) { + if (responseCase_ == 3) { + responseCase_ = 0; + response_ = null; + onChanged(); + } + } else { + if (responseCase_ == 3) { + responseCase_ = 0; + response_ = null; + } + controlBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * A control message from the server.
+     * 
+ * + * .google.cloud.visionai.v1.ReceivePacketsControlResponse control = 3; + */ + public com.google.cloud.visionai.v1.ReceivePacketsControlResponse.Builder getControlBuilder() { + return getControlFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * A control message from the server.
+     * 
+ * + * .google.cloud.visionai.v1.ReceivePacketsControlResponse control = 3; + */ + @java.lang.Override + public com.google.cloud.visionai.v1.ReceivePacketsControlResponseOrBuilder + getControlOrBuilder() { + if ((responseCase_ == 3) && (controlBuilder_ != null)) { + return controlBuilder_.getMessageOrBuilder(); + } else { + if (responseCase_ == 3) { + return (com.google.cloud.visionai.v1.ReceivePacketsControlResponse) response_; + } + return com.google.cloud.visionai.v1.ReceivePacketsControlResponse.getDefaultInstance(); + } + } + /** + * + * + *
+     * A control message from the server.
+     * 
+ * + * .google.cloud.visionai.v1.ReceivePacketsControlResponse control = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.ReceivePacketsControlResponse, + com.google.cloud.visionai.v1.ReceivePacketsControlResponse.Builder, + com.google.cloud.visionai.v1.ReceivePacketsControlResponseOrBuilder> + getControlFieldBuilder() { + if (controlBuilder_ == null) { + if (!(responseCase_ == 3)) { + response_ = + com.google.cloud.visionai.v1.ReceivePacketsControlResponse.getDefaultInstance(); + } + controlBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.ReceivePacketsControlResponse, + com.google.cloud.visionai.v1.ReceivePacketsControlResponse.Builder, + com.google.cloud.visionai.v1.ReceivePacketsControlResponseOrBuilder>( + (com.google.cloud.visionai.v1.ReceivePacketsControlResponse) response_, + getParentForChildren(), + isClean()); + response_ = null; + } + responseCase_ = 3; + onChanged(); + return controlBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.ReceivePacketsResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.ReceivePacketsResponse) + private static final com.google.cloud.visionai.v1.ReceivePacketsResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.ReceivePacketsResponse(); + } + + public static com.google.cloud.visionai.v1.ReceivePacketsResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ReceivePacketsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.ReceivePacketsResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ReceivePacketsResponseOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ReceivePacketsResponseOrBuilder.java new file mode 100644 index 000000000000..5d30eed5a47b --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ReceivePacketsResponseOrBuilder.java @@ -0,0 +1,98 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/streaming_service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface ReceivePacketsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.ReceivePacketsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * A genuine data payload originating from the sender.
+   * 
+ * + * .google.cloud.visionai.v1.Packet packet = 1; + * + * @return Whether the packet field is set. + */ + boolean hasPacket(); + /** + * + * + *
+   * A genuine data payload originating from the sender.
+   * 
+ * + * .google.cloud.visionai.v1.Packet packet = 1; + * + * @return The packet. + */ + com.google.cloud.visionai.v1.Packet getPacket(); + /** + * + * + *
+   * A genuine data payload originating from the sender.
+   * 
+ * + * .google.cloud.visionai.v1.Packet packet = 1; + */ + com.google.cloud.visionai.v1.PacketOrBuilder getPacketOrBuilder(); + + /** + * + * + *
+   * A control message from the server.
+   * 
+ * + * .google.cloud.visionai.v1.ReceivePacketsControlResponse control = 3; + * + * @return Whether the control field is set. + */ + boolean hasControl(); + /** + * + * + *
+   * A control message from the server.
+   * 
+ * + * .google.cloud.visionai.v1.ReceivePacketsControlResponse control = 3; + * + * @return The control. + */ + com.google.cloud.visionai.v1.ReceivePacketsControlResponse getControl(); + /** + * + * + *
+   * A control message from the server.
+   * 
+ * + * .google.cloud.visionai.v1.ReceivePacketsControlResponse control = 3; + */ + com.google.cloud.visionai.v1.ReceivePacketsControlResponseOrBuilder getControlOrBuilder(); + + com.google.cloud.visionai.v1.ReceivePacketsResponse.ResponseCase getResponseCase(); +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/Registry.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/Registry.java new file mode 100644 index 000000000000..d4f31c292e09 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/Registry.java @@ -0,0 +1,177 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/lva_service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * The enum of the types of the Registry.
+ * 
+ * + * Protobuf enum {@code google.cloud.visionai.v1.Registry} + */ +public enum Registry implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+   * Registry is unspecified.
+   * 
+ * + * REGISTRY_UNSPECIFIED = 0; + */ + REGISTRY_UNSPECIFIED(0), + /** + * + * + *
+   * Public Registry containing the public Operators released by Google.
+   * 
+ * + * PUBLIC = 1; + */ + PUBLIC(1), + /** + * + * + *
+   * Private Registry containing the local registered operators.
+   * 
+ * + * PRIVATE = 2; + */ + PRIVATE(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+   * Registry is unspecified.
+   * 
+ * + * REGISTRY_UNSPECIFIED = 0; + */ + public static final int REGISTRY_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+   * Public Registry containing the public Operators released by Google.
+   * 
+ * + * PUBLIC = 1; + */ + public static final int PUBLIC_VALUE = 1; + /** + * + * + *
+   * Private Registry containing the local registered operators.
+   * 
+ * + * PRIVATE = 2; + */ + public static final int PRIVATE_VALUE = 2; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static Registry valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static Registry forNumber(int value) { + switch (value) { + case 0: + return REGISTRY_UNSPECIFIED; + case 1: + return PUBLIC; + case 2: + return PRIVATE; + 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 Registry findValueByNumber(int number) { + return Registry.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + 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.visionai.v1.LvaServiceProto.getDescriptor().getEnumTypes().get(0); + } + + private static final Registry[] VALUES = values(); + + public static Registry 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 Registry(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.visionai.v1.Registry) +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ReleaseLeaseRequest.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ReleaseLeaseRequest.java new file mode 100644 index 000000000000..fcf2e0f39dbf --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ReleaseLeaseRequest.java @@ -0,0 +1,989 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/streaming_service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * Request message for releasing lease.
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.ReleaseLeaseRequest} + */ +public final class ReleaseLeaseRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.ReleaseLeaseRequest) + ReleaseLeaseRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ReleaseLeaseRequest.newBuilder() to construct. + private ReleaseLeaseRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ReleaseLeaseRequest() { + id_ = ""; + series_ = ""; + owner_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ReleaseLeaseRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.StreamingServiceProto + .internal_static_google_cloud_visionai_v1_ReleaseLeaseRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.StreamingServiceProto + .internal_static_google_cloud_visionai_v1_ReleaseLeaseRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.ReleaseLeaseRequest.class, + com.google.cloud.visionai.v1.ReleaseLeaseRequest.Builder.class); + } + + public static final int ID_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object id_ = ""; + /** + * + * + *
+   * Lease id.
+   * 
+ * + * string id = 1; + * + * @return The id. + */ + @java.lang.Override + public java.lang.String getId() { + java.lang.Object ref = id_; + 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(); + id_ = s; + return s; + } + } + /** + * + * + *
+   * Lease id.
+   * 
+ * + * string id = 1; + * + * @return The bytes for id. + */ + @java.lang.Override + public com.google.protobuf.ByteString getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SERIES_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object series_ = ""; + /** + * + * + *
+   * Series name.
+   * 
+ * + * string series = 2; + * + * @return The series. + */ + @java.lang.Override + public java.lang.String getSeries() { + java.lang.Object ref = series_; + 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(); + series_ = s; + return s; + } + } + /** + * + * + *
+   * Series name.
+   * 
+ * + * string series = 2; + * + * @return The bytes for series. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSeriesBytes() { + java.lang.Object ref = series_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + series_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int OWNER_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object owner_ = ""; + /** + * + * + *
+   * Lease owner.
+   * 
+ * + * string owner = 3; + * + * @return The owner. + */ + @java.lang.Override + public java.lang.String getOwner() { + java.lang.Object ref = owner_; + 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(); + owner_ = s; + return s; + } + } + /** + * + * + *
+   * Lease owner.
+   * 
+ * + * string owner = 3; + * + * @return The bytes for owner. + */ + @java.lang.Override + public com.google.protobuf.ByteString getOwnerBytes() { + java.lang.Object ref = owner_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + owner_ = 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, id_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(series_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, series_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(owner_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, owner_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, id_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(series_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, series_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(owner_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, owner_); + } + size += getUnknownFields().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.visionai.v1.ReleaseLeaseRequest)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.ReleaseLeaseRequest other = + (com.google.cloud.visionai.v1.ReleaseLeaseRequest) obj; + + if (!getId().equals(other.getId())) return false; + if (!getSeries().equals(other.getSeries())) return false; + if (!getOwner().equals(other.getOwner())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ID_FIELD_NUMBER; + hash = (53 * hash) + getId().hashCode(); + hash = (37 * hash) + SERIES_FIELD_NUMBER; + hash = (53 * hash) + getSeries().hashCode(); + hash = (37 * hash) + OWNER_FIELD_NUMBER; + hash = (53 * hash) + getOwner().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.ReleaseLeaseRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ReleaseLeaseRequest 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.visionai.v1.ReleaseLeaseRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ReleaseLeaseRequest 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.visionai.v1.ReleaseLeaseRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ReleaseLeaseRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.ReleaseLeaseRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ReleaseLeaseRequest 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.visionai.v1.ReleaseLeaseRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ReleaseLeaseRequest 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.visionai.v1.ReleaseLeaseRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ReleaseLeaseRequest 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.visionai.v1.ReleaseLeaseRequest 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; + } + /** + * + * + *
+   * Request message for releasing lease.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.ReleaseLeaseRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.ReleaseLeaseRequest) + com.google.cloud.visionai.v1.ReleaseLeaseRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.StreamingServiceProto + .internal_static_google_cloud_visionai_v1_ReleaseLeaseRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.StreamingServiceProto + .internal_static_google_cloud_visionai_v1_ReleaseLeaseRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.ReleaseLeaseRequest.class, + com.google.cloud.visionai.v1.ReleaseLeaseRequest.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.ReleaseLeaseRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + id_ = ""; + series_ = ""; + owner_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.StreamingServiceProto + .internal_static_google_cloud_visionai_v1_ReleaseLeaseRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ReleaseLeaseRequest getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.ReleaseLeaseRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ReleaseLeaseRequest build() { + com.google.cloud.visionai.v1.ReleaseLeaseRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ReleaseLeaseRequest buildPartial() { + com.google.cloud.visionai.v1.ReleaseLeaseRequest result = + new com.google.cloud.visionai.v1.ReleaseLeaseRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.visionai.v1.ReleaseLeaseRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.id_ = id_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.series_ = series_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.owner_ = owner_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.ReleaseLeaseRequest) { + return mergeFrom((com.google.cloud.visionai.v1.ReleaseLeaseRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.ReleaseLeaseRequest other) { + if (other == com.google.cloud.visionai.v1.ReleaseLeaseRequest.getDefaultInstance()) + return this; + if (!other.getId().isEmpty()) { + id_ = other.id_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getSeries().isEmpty()) { + series_ = other.series_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getOwner().isEmpty()) { + owner_ = other.owner_; + bitField0_ |= 0x00000004; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + id_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + series_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + owner_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object id_ = ""; + /** + * + * + *
+     * Lease id.
+     * 
+ * + * string id = 1; + * + * @return The id. + */ + public java.lang.String getId() { + java.lang.Object ref = id_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + id_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Lease id.
+     * 
+ * + * string id = 1; + * + * @return The bytes for id. + */ + public com.google.protobuf.ByteString getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Lease id.
+     * 
+ * + * string id = 1; + * + * @param value The id to set. + * @return This builder for chaining. + */ + public Builder setId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + id_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Lease id.
+     * 
+ * + * string id = 1; + * + * @return This builder for chaining. + */ + public Builder clearId() { + id_ = getDefaultInstance().getId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Lease id.
+     * 
+ * + * string id = 1; + * + * @param value The bytes for id to set. + * @return This builder for chaining. + */ + public Builder setIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + id_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object series_ = ""; + /** + * + * + *
+     * Series name.
+     * 
+ * + * string series = 2; + * + * @return The series. + */ + public java.lang.String getSeries() { + java.lang.Object ref = series_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + series_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Series name.
+     * 
+ * + * string series = 2; + * + * @return The bytes for series. + */ + public com.google.protobuf.ByteString getSeriesBytes() { + java.lang.Object ref = series_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + series_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Series name.
+     * 
+ * + * string series = 2; + * + * @param value The series to set. + * @return This builder for chaining. + */ + public Builder setSeries(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + series_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Series name.
+     * 
+ * + * string series = 2; + * + * @return This builder for chaining. + */ + public Builder clearSeries() { + series_ = getDefaultInstance().getSeries(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Series name.
+     * 
+ * + * string series = 2; + * + * @param value The bytes for series to set. + * @return This builder for chaining. + */ + public Builder setSeriesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + series_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object owner_ = ""; + /** + * + * + *
+     * Lease owner.
+     * 
+ * + * string owner = 3; + * + * @return The owner. + */ + public java.lang.String getOwner() { + java.lang.Object ref = owner_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + owner_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Lease owner.
+     * 
+ * + * string owner = 3; + * + * @return The bytes for owner. + */ + public com.google.protobuf.ByteString getOwnerBytes() { + java.lang.Object ref = owner_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + owner_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Lease owner.
+     * 
+ * + * string owner = 3; + * + * @param value The owner to set. + * @return This builder for chaining. + */ + public Builder setOwner(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + owner_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Lease owner.
+     * 
+ * + * string owner = 3; + * + * @return This builder for chaining. + */ + public Builder clearOwner() { + owner_ = getDefaultInstance().getOwner(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * Lease owner.
+     * 
+ * + * string owner = 3; + * + * @param value The bytes for owner to set. + * @return This builder for chaining. + */ + public Builder setOwnerBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + owner_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.ReleaseLeaseRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.ReleaseLeaseRequest) + private static final com.google.cloud.visionai.v1.ReleaseLeaseRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.ReleaseLeaseRequest(); + } + + public static com.google.cloud.visionai.v1.ReleaseLeaseRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ReleaseLeaseRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.ReleaseLeaseRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ReleaseLeaseRequestOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ReleaseLeaseRequestOrBuilder.java new file mode 100644 index 000000000000..00078875f84c --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ReleaseLeaseRequestOrBuilder.java @@ -0,0 +1,101 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/streaming_service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface ReleaseLeaseRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.ReleaseLeaseRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Lease id.
+   * 
+ * + * string id = 1; + * + * @return The id. + */ + java.lang.String getId(); + /** + * + * + *
+   * Lease id.
+   * 
+ * + * string id = 1; + * + * @return The bytes for id. + */ + com.google.protobuf.ByteString getIdBytes(); + + /** + * + * + *
+   * Series name.
+   * 
+ * + * string series = 2; + * + * @return The series. + */ + java.lang.String getSeries(); + /** + * + * + *
+   * Series name.
+   * 
+ * + * string series = 2; + * + * @return The bytes for series. + */ + com.google.protobuf.ByteString getSeriesBytes(); + + /** + * + * + *
+   * Lease owner.
+   * 
+ * + * string owner = 3; + * + * @return The owner. + */ + java.lang.String getOwner(); + /** + * + * + *
+   * Lease owner.
+   * 
+ * + * string owner = 3; + * + * @return The bytes for owner. + */ + com.google.protobuf.ByteString getOwnerBytes(); +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ReleaseLeaseResponse.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ReleaseLeaseResponse.java new file mode 100644 index 000000000000..3a312dbfc994 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ReleaseLeaseResponse.java @@ -0,0 +1,432 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/streaming_service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * Response message for release lease.
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.ReleaseLeaseResponse} + */ +public final class ReleaseLeaseResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.ReleaseLeaseResponse) + ReleaseLeaseResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ReleaseLeaseResponse.newBuilder() to construct. + private ReleaseLeaseResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ReleaseLeaseResponse() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ReleaseLeaseResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.StreamingServiceProto + .internal_static_google_cloud_visionai_v1_ReleaseLeaseResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.StreamingServiceProto + .internal_static_google_cloud_visionai_v1_ReleaseLeaseResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.ReleaseLeaseResponse.class, + com.google.cloud.visionai.v1.ReleaseLeaseResponse.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 { + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += getUnknownFields().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.visionai.v1.ReleaseLeaseResponse)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.ReleaseLeaseResponse other = + (com.google.cloud.visionai.v1.ReleaseLeaseResponse) obj; + + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.ReleaseLeaseResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ReleaseLeaseResponse 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.visionai.v1.ReleaseLeaseResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ReleaseLeaseResponse 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.visionai.v1.ReleaseLeaseResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ReleaseLeaseResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.ReleaseLeaseResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ReleaseLeaseResponse 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.visionai.v1.ReleaseLeaseResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ReleaseLeaseResponse 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.visionai.v1.ReleaseLeaseResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ReleaseLeaseResponse 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.visionai.v1.ReleaseLeaseResponse 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; + } + /** + * + * + *
+   * Response message for release lease.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.ReleaseLeaseResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.ReleaseLeaseResponse) + com.google.cloud.visionai.v1.ReleaseLeaseResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.StreamingServiceProto + .internal_static_google_cloud_visionai_v1_ReleaseLeaseResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.StreamingServiceProto + .internal_static_google_cloud_visionai_v1_ReleaseLeaseResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.ReleaseLeaseResponse.class, + com.google.cloud.visionai.v1.ReleaseLeaseResponse.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.ReleaseLeaseResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.StreamingServiceProto + .internal_static_google_cloud_visionai_v1_ReleaseLeaseResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ReleaseLeaseResponse getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.ReleaseLeaseResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ReleaseLeaseResponse build() { + com.google.cloud.visionai.v1.ReleaseLeaseResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ReleaseLeaseResponse buildPartial() { + com.google.cloud.visionai.v1.ReleaseLeaseResponse result = + new com.google.cloud.visionai.v1.ReleaseLeaseResponse(this); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.ReleaseLeaseResponse) { + return mergeFrom((com.google.cloud.visionai.v1.ReleaseLeaseResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.ReleaseLeaseResponse other) { + if (other == com.google.cloud.visionai.v1.ReleaseLeaseResponse.getDefaultInstance()) + return this; + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.ReleaseLeaseResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.ReleaseLeaseResponse) + private static final com.google.cloud.visionai.v1.ReleaseLeaseResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.ReleaseLeaseResponse(); + } + + public static com.google.cloud.visionai.v1.ReleaseLeaseResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ReleaseLeaseResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.ReleaseLeaseResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ReleaseLeaseResponseOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ReleaseLeaseResponseOrBuilder.java new file mode 100644 index 000000000000..bb7d2d9167ae --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ReleaseLeaseResponseOrBuilder.java @@ -0,0 +1,25 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/streaming_service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface ReleaseLeaseResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.ReleaseLeaseResponse) + com.google.protobuf.MessageOrBuilder {} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/RemoveApplicationStreamInputRequest.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/RemoveApplicationStreamInputRequest.java new file mode 100644 index 000000000000..58ff76cf16f0 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/RemoveApplicationStreamInputRequest.java @@ -0,0 +1,2155 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/platform.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * Message for removing stream input from an Application.
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.RemoveApplicationStreamInputRequest} + */ +public final class RemoveApplicationStreamInputRequest + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.RemoveApplicationStreamInputRequest) + RemoveApplicationStreamInputRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use RemoveApplicationStreamInputRequest.newBuilder() to construct. + private RemoveApplicationStreamInputRequest( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private RemoveApplicationStreamInputRequest() { + name_ = ""; + targetStreamInputs_ = java.util.Collections.emptyList(); + requestId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new RemoveApplicationStreamInputRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_RemoveApplicationStreamInputRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_RemoveApplicationStreamInputRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.RemoveApplicationStreamInputRequest.class, + com.google.cloud.visionai.v1.RemoveApplicationStreamInputRequest.Builder.class); + } + + public interface TargetStreamInputOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.RemoveApplicationStreamInputRequest.TargetStreamInput) + com.google.protobuf.MessageOrBuilder { + + /** + * string stream = 1 [(.google.api.resource_reference) = { ... } + * + * @return The stream. + */ + java.lang.String getStream(); + /** + * string stream = 1 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for stream. + */ + com.google.protobuf.ByteString getStreamBytes(); + } + /** + * + * + *
+   * Message about target streamInput to remove.
+   * 
+ * + * Protobuf type {@code + * google.cloud.visionai.v1.RemoveApplicationStreamInputRequest.TargetStreamInput} + */ + public static final class TargetStreamInput extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.RemoveApplicationStreamInputRequest.TargetStreamInput) + TargetStreamInputOrBuilder { + private static final long serialVersionUID = 0L; + // Use TargetStreamInput.newBuilder() to construct. + private TargetStreamInput(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private TargetStreamInput() { + stream_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new TargetStreamInput(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_RemoveApplicationStreamInputRequest_TargetStreamInput_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_RemoveApplicationStreamInputRequest_TargetStreamInput_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.RemoveApplicationStreamInputRequest.TargetStreamInput + .class, + com.google.cloud.visionai.v1.RemoveApplicationStreamInputRequest.TargetStreamInput + .Builder.class); + } + + public static final int STREAM_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object stream_ = ""; + /** + * string stream = 1 [(.google.api.resource_reference) = { ... } + * + * @return The stream. + */ + @java.lang.Override + public java.lang.String getStream() { + java.lang.Object ref = stream_; + 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(); + stream_ = s; + return s; + } + } + /** + * string stream = 1 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for stream. + */ + @java.lang.Override + public com.google.protobuf.ByteString getStreamBytes() { + java.lang.Object ref = stream_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + stream_ = 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(stream_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, stream_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(stream_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, stream_); + } + size += getUnknownFields().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.visionai.v1.RemoveApplicationStreamInputRequest.TargetStreamInput)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.RemoveApplicationStreamInputRequest.TargetStreamInput other = + (com.google.cloud.visionai.v1.RemoveApplicationStreamInputRequest.TargetStreamInput) obj; + + if (!getStream().equals(other.getStream())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + STREAM_FIELD_NUMBER; + hash = (53 * hash) + getStream().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.RemoveApplicationStreamInputRequest.TargetStreamInput + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.RemoveApplicationStreamInputRequest.TargetStreamInput + 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.visionai.v1.RemoveApplicationStreamInputRequest.TargetStreamInput + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.RemoveApplicationStreamInputRequest.TargetStreamInput + 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.visionai.v1.RemoveApplicationStreamInputRequest.TargetStreamInput + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.RemoveApplicationStreamInputRequest.TargetStreamInput + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.RemoveApplicationStreamInputRequest.TargetStreamInput + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.RemoveApplicationStreamInputRequest.TargetStreamInput + 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.visionai.v1.RemoveApplicationStreamInputRequest.TargetStreamInput + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.RemoveApplicationStreamInputRequest.TargetStreamInput + 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.visionai.v1.RemoveApplicationStreamInputRequest.TargetStreamInput + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.RemoveApplicationStreamInputRequest.TargetStreamInput + 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.visionai.v1.RemoveApplicationStreamInputRequest.TargetStreamInput + 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; + } + /** + * + * + *
+     * Message about target streamInput to remove.
+     * 
+ * + * Protobuf type {@code + * google.cloud.visionai.v1.RemoveApplicationStreamInputRequest.TargetStreamInput} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.RemoveApplicationStreamInputRequest.TargetStreamInput) + com.google.cloud.visionai.v1.RemoveApplicationStreamInputRequest + .TargetStreamInputOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_RemoveApplicationStreamInputRequest_TargetStreamInput_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_RemoveApplicationStreamInputRequest_TargetStreamInput_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.RemoveApplicationStreamInputRequest.TargetStreamInput + .class, + com.google.cloud.visionai.v1.RemoveApplicationStreamInputRequest.TargetStreamInput + .Builder.class); + } + + // Construct using + // com.google.cloud.visionai.v1.RemoveApplicationStreamInputRequest.TargetStreamInput.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + stream_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_RemoveApplicationStreamInputRequest_TargetStreamInput_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.RemoveApplicationStreamInputRequest.TargetStreamInput + getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.RemoveApplicationStreamInputRequest.TargetStreamInput + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.RemoveApplicationStreamInputRequest.TargetStreamInput + build() { + com.google.cloud.visionai.v1.RemoveApplicationStreamInputRequest.TargetStreamInput result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.RemoveApplicationStreamInputRequest.TargetStreamInput + buildPartial() { + com.google.cloud.visionai.v1.RemoveApplicationStreamInputRequest.TargetStreamInput result = + new com.google.cloud.visionai.v1.RemoveApplicationStreamInputRequest.TargetStreamInput( + this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.visionai.v1.RemoveApplicationStreamInputRequest.TargetStreamInput + result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.stream_ = stream_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.visionai.v1.RemoveApplicationStreamInputRequest.TargetStreamInput) { + return mergeFrom( + (com.google.cloud.visionai.v1.RemoveApplicationStreamInputRequest.TargetStreamInput) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.visionai.v1.RemoveApplicationStreamInputRequest.TargetStreamInput + other) { + if (other + == com.google.cloud.visionai.v1.RemoveApplicationStreamInputRequest.TargetStreamInput + .getDefaultInstance()) return this; + if (!other.getStream().isEmpty()) { + stream_ = other.stream_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + stream_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object stream_ = ""; + /** + * string stream = 1 [(.google.api.resource_reference) = { ... } + * + * @return The stream. + */ + public java.lang.String getStream() { + java.lang.Object ref = stream_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + stream_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string stream = 1 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for stream. + */ + public com.google.protobuf.ByteString getStreamBytes() { + java.lang.Object ref = stream_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + stream_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string stream = 1 [(.google.api.resource_reference) = { ... } + * + * @param value The stream to set. + * @return This builder for chaining. + */ + public Builder setStream(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + stream_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * string stream = 1 [(.google.api.resource_reference) = { ... } + * + * @return This builder for chaining. + */ + public Builder clearStream() { + stream_ = getDefaultInstance().getStream(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * string stream = 1 [(.google.api.resource_reference) = { ... } + * + * @param value The bytes for stream to set. + * @return This builder for chaining. + */ + public Builder setStreamBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + stream_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.RemoveApplicationStreamInputRequest.TargetStreamInput) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.RemoveApplicationStreamInputRequest.TargetStreamInput) + private static final com.google.cloud.visionai.v1.RemoveApplicationStreamInputRequest + .TargetStreamInput + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.visionai.v1.RemoveApplicationStreamInputRequest.TargetStreamInput(); + } + + public static com.google.cloud.visionai.v1.RemoveApplicationStreamInputRequest.TargetStreamInput + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public TargetStreamInput parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.RemoveApplicationStreamInputRequest.TargetStreamInput + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Required. the name of the application to retrieve.
+   * Format:
+   * "projects/{project}/locations/{location}/applications/{application}"
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + 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(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. the name of the application to retrieve.
+   * Format:
+   * "projects/{project}/locations/{location}/applications/{application}"
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TARGET_STREAM_INPUTS_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private java.util.List< + com.google.cloud.visionai.v1.RemoveApplicationStreamInputRequest.TargetStreamInput> + targetStreamInputs_; + /** + * + * + *
+   * The target stream to remove.
+   * 
+ * + * + * repeated .google.cloud.visionai.v1.RemoveApplicationStreamInputRequest.TargetStreamInput target_stream_inputs = 2; + * + */ + @java.lang.Override + public java.util.List< + com.google.cloud.visionai.v1.RemoveApplicationStreamInputRequest.TargetStreamInput> + getTargetStreamInputsList() { + return targetStreamInputs_; + } + /** + * + * + *
+   * The target stream to remove.
+   * 
+ * + * + * repeated .google.cloud.visionai.v1.RemoveApplicationStreamInputRequest.TargetStreamInput target_stream_inputs = 2; + * + */ + @java.lang.Override + public java.util.List< + ? extends + com.google.cloud.visionai.v1.RemoveApplicationStreamInputRequest + .TargetStreamInputOrBuilder> + getTargetStreamInputsOrBuilderList() { + return targetStreamInputs_; + } + /** + * + * + *
+   * The target stream to remove.
+   * 
+ * + * + * repeated .google.cloud.visionai.v1.RemoveApplicationStreamInputRequest.TargetStreamInput target_stream_inputs = 2; + * + */ + @java.lang.Override + public int getTargetStreamInputsCount() { + return targetStreamInputs_.size(); + } + /** + * + * + *
+   * The target stream to remove.
+   * 
+ * + * + * repeated .google.cloud.visionai.v1.RemoveApplicationStreamInputRequest.TargetStreamInput target_stream_inputs = 2; + * + */ + @java.lang.Override + public com.google.cloud.visionai.v1.RemoveApplicationStreamInputRequest.TargetStreamInput + getTargetStreamInputs(int index) { + return targetStreamInputs_.get(index); + } + /** + * + * + *
+   * The target stream to remove.
+   * 
+ * + * + * repeated .google.cloud.visionai.v1.RemoveApplicationStreamInputRequest.TargetStreamInput target_stream_inputs = 2; + * + */ + @java.lang.Override + public com.google.cloud.visionai.v1.RemoveApplicationStreamInputRequest.TargetStreamInputOrBuilder + getTargetStreamInputsOrBuilder(int index) { + return targetStreamInputs_.get(index); + } + + public static final int REQUEST_ID_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object requestId_ = ""; + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and
+   * the request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + @java.lang.Override + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + 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(); + requestId_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and
+   * the request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + for (int i = 0; i < targetStreamInputs_.size(); i++) { + output.writeMessage(2, targetStreamInputs_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, requestId_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + for (int i = 0; i < targetStreamInputs_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(2, targetStreamInputs_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, requestId_); + } + size += getUnknownFields().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.visionai.v1.RemoveApplicationStreamInputRequest)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.RemoveApplicationStreamInputRequest other = + (com.google.cloud.visionai.v1.RemoveApplicationStreamInputRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getTargetStreamInputsList().equals(other.getTargetStreamInputsList())) return false; + if (!getRequestId().equals(other.getRequestId())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + if (getTargetStreamInputsCount() > 0) { + hash = (37 * hash) + TARGET_STREAM_INPUTS_FIELD_NUMBER; + hash = (53 * hash) + getTargetStreamInputsList().hashCode(); + } + hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; + hash = (53 * hash) + getRequestId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.RemoveApplicationStreamInputRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.RemoveApplicationStreamInputRequest 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.visionai.v1.RemoveApplicationStreamInputRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.RemoveApplicationStreamInputRequest 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.visionai.v1.RemoveApplicationStreamInputRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.RemoveApplicationStreamInputRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.RemoveApplicationStreamInputRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.RemoveApplicationStreamInputRequest 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.visionai.v1.RemoveApplicationStreamInputRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.RemoveApplicationStreamInputRequest 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.visionai.v1.RemoveApplicationStreamInputRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.RemoveApplicationStreamInputRequest 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.visionai.v1.RemoveApplicationStreamInputRequest 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; + } + /** + * + * + *
+   * Message for removing stream input from an Application.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.RemoveApplicationStreamInputRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.RemoveApplicationStreamInputRequest) + com.google.cloud.visionai.v1.RemoveApplicationStreamInputRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_RemoveApplicationStreamInputRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_RemoveApplicationStreamInputRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.RemoveApplicationStreamInputRequest.class, + com.google.cloud.visionai.v1.RemoveApplicationStreamInputRequest.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.RemoveApplicationStreamInputRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + if (targetStreamInputsBuilder_ == null) { + targetStreamInputs_ = java.util.Collections.emptyList(); + } else { + targetStreamInputs_ = null; + targetStreamInputsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + requestId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_RemoveApplicationStreamInputRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.RemoveApplicationStreamInputRequest + getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.RemoveApplicationStreamInputRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.RemoveApplicationStreamInputRequest build() { + com.google.cloud.visionai.v1.RemoveApplicationStreamInputRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.RemoveApplicationStreamInputRequest buildPartial() { + com.google.cloud.visionai.v1.RemoveApplicationStreamInputRequest result = + new com.google.cloud.visionai.v1.RemoveApplicationStreamInputRequest(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.visionai.v1.RemoveApplicationStreamInputRequest result) { + if (targetStreamInputsBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + targetStreamInputs_ = java.util.Collections.unmodifiableList(targetStreamInputs_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.targetStreamInputs_ = targetStreamInputs_; + } else { + result.targetStreamInputs_ = targetStreamInputsBuilder_.build(); + } + } + + private void buildPartial0( + com.google.cloud.visionai.v1.RemoveApplicationStreamInputRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.requestId_ = requestId_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.RemoveApplicationStreamInputRequest) { + return mergeFrom((com.google.cloud.visionai.v1.RemoveApplicationStreamInputRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.visionai.v1.RemoveApplicationStreamInputRequest other) { + if (other + == com.google.cloud.visionai.v1.RemoveApplicationStreamInputRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (targetStreamInputsBuilder_ == null) { + if (!other.targetStreamInputs_.isEmpty()) { + if (targetStreamInputs_.isEmpty()) { + targetStreamInputs_ = other.targetStreamInputs_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureTargetStreamInputsIsMutable(); + targetStreamInputs_.addAll(other.targetStreamInputs_); + } + onChanged(); + } + } else { + if (!other.targetStreamInputs_.isEmpty()) { + if (targetStreamInputsBuilder_.isEmpty()) { + targetStreamInputsBuilder_.dispose(); + targetStreamInputsBuilder_ = null; + targetStreamInputs_ = other.targetStreamInputs_; + bitField0_ = (bitField0_ & ~0x00000002); + targetStreamInputsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getTargetStreamInputsFieldBuilder() + : null; + } else { + targetStreamInputsBuilder_.addAllMessages(other.targetStreamInputs_); + } + } + } + if (!other.getRequestId().isEmpty()) { + requestId_ = other.requestId_; + bitField0_ |= 0x00000004; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + com.google.cloud.visionai.v1.RemoveApplicationStreamInputRequest.TargetStreamInput + m = + input.readMessage( + com.google.cloud.visionai.v1.RemoveApplicationStreamInputRequest + .TargetStreamInput.parser(), + extensionRegistry); + if (targetStreamInputsBuilder_ == null) { + ensureTargetStreamInputsIsMutable(); + targetStreamInputs_.add(m); + } else { + targetStreamInputsBuilder_.addMessage(m); + } + break; + } // case 18 + case 26: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. the name of the application to retrieve.
+     * Format:
+     * "projects/{project}/locations/{location}/applications/{application}"
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. the name of the application to retrieve.
+     * Format:
+     * "projects/{project}/locations/{location}/applications/{application}"
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. the name of the application to retrieve.
+     * Format:
+     * "projects/{project}/locations/{location}/applications/{application}"
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. the name of the application to retrieve.
+     * Format:
+     * "projects/{project}/locations/{location}/applications/{application}"
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. the name of the application to retrieve.
+     * Format:
+     * "projects/{project}/locations/{location}/applications/{application}"
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.util.List< + com.google.cloud.visionai.v1.RemoveApplicationStreamInputRequest.TargetStreamInput> + targetStreamInputs_ = java.util.Collections.emptyList(); + + private void ensureTargetStreamInputsIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + targetStreamInputs_ = + new java.util.ArrayList< + com.google.cloud.visionai.v1.RemoveApplicationStreamInputRequest.TargetStreamInput>( + targetStreamInputs_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.visionai.v1.RemoveApplicationStreamInputRequest.TargetStreamInput, + com.google.cloud.visionai.v1.RemoveApplicationStreamInputRequest.TargetStreamInput + .Builder, + com.google.cloud.visionai.v1.RemoveApplicationStreamInputRequest + .TargetStreamInputOrBuilder> + targetStreamInputsBuilder_; + + /** + * + * + *
+     * The target stream to remove.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.RemoveApplicationStreamInputRequest.TargetStreamInput target_stream_inputs = 2; + * + */ + public java.util.List< + com.google.cloud.visionai.v1.RemoveApplicationStreamInputRequest.TargetStreamInput> + getTargetStreamInputsList() { + if (targetStreamInputsBuilder_ == null) { + return java.util.Collections.unmodifiableList(targetStreamInputs_); + } else { + return targetStreamInputsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * The target stream to remove.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.RemoveApplicationStreamInputRequest.TargetStreamInput target_stream_inputs = 2; + * + */ + public int getTargetStreamInputsCount() { + if (targetStreamInputsBuilder_ == null) { + return targetStreamInputs_.size(); + } else { + return targetStreamInputsBuilder_.getCount(); + } + } + /** + * + * + *
+     * The target stream to remove.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.RemoveApplicationStreamInputRequest.TargetStreamInput target_stream_inputs = 2; + * + */ + public com.google.cloud.visionai.v1.RemoveApplicationStreamInputRequest.TargetStreamInput + getTargetStreamInputs(int index) { + if (targetStreamInputsBuilder_ == null) { + return targetStreamInputs_.get(index); + } else { + return targetStreamInputsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * The target stream to remove.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.RemoveApplicationStreamInputRequest.TargetStreamInput target_stream_inputs = 2; + * + */ + public Builder setTargetStreamInputs( + int index, + com.google.cloud.visionai.v1.RemoveApplicationStreamInputRequest.TargetStreamInput value) { + if (targetStreamInputsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTargetStreamInputsIsMutable(); + targetStreamInputs_.set(index, value); + onChanged(); + } else { + targetStreamInputsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The target stream to remove.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.RemoveApplicationStreamInputRequest.TargetStreamInput target_stream_inputs = 2; + * + */ + public Builder setTargetStreamInputs( + int index, + com.google.cloud.visionai.v1.RemoveApplicationStreamInputRequest.TargetStreamInput.Builder + builderForValue) { + if (targetStreamInputsBuilder_ == null) { + ensureTargetStreamInputsIsMutable(); + targetStreamInputs_.set(index, builderForValue.build()); + onChanged(); + } else { + targetStreamInputsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The target stream to remove.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.RemoveApplicationStreamInputRequest.TargetStreamInput target_stream_inputs = 2; + * + */ + public Builder addTargetStreamInputs( + com.google.cloud.visionai.v1.RemoveApplicationStreamInputRequest.TargetStreamInput value) { + if (targetStreamInputsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTargetStreamInputsIsMutable(); + targetStreamInputs_.add(value); + onChanged(); + } else { + targetStreamInputsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * The target stream to remove.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.RemoveApplicationStreamInputRequest.TargetStreamInput target_stream_inputs = 2; + * + */ + public Builder addTargetStreamInputs( + int index, + com.google.cloud.visionai.v1.RemoveApplicationStreamInputRequest.TargetStreamInput value) { + if (targetStreamInputsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTargetStreamInputsIsMutable(); + targetStreamInputs_.add(index, value); + onChanged(); + } else { + targetStreamInputsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The target stream to remove.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.RemoveApplicationStreamInputRequest.TargetStreamInput target_stream_inputs = 2; + * + */ + public Builder addTargetStreamInputs( + com.google.cloud.visionai.v1.RemoveApplicationStreamInputRequest.TargetStreamInput.Builder + builderForValue) { + if (targetStreamInputsBuilder_ == null) { + ensureTargetStreamInputsIsMutable(); + targetStreamInputs_.add(builderForValue.build()); + onChanged(); + } else { + targetStreamInputsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The target stream to remove.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.RemoveApplicationStreamInputRequest.TargetStreamInput target_stream_inputs = 2; + * + */ + public Builder addTargetStreamInputs( + int index, + com.google.cloud.visionai.v1.RemoveApplicationStreamInputRequest.TargetStreamInput.Builder + builderForValue) { + if (targetStreamInputsBuilder_ == null) { + ensureTargetStreamInputsIsMutable(); + targetStreamInputs_.add(index, builderForValue.build()); + onChanged(); + } else { + targetStreamInputsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The target stream to remove.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.RemoveApplicationStreamInputRequest.TargetStreamInput target_stream_inputs = 2; + * + */ + public Builder addAllTargetStreamInputs( + java.lang.Iterable< + ? extends + com.google.cloud.visionai.v1.RemoveApplicationStreamInputRequest + .TargetStreamInput> + values) { + if (targetStreamInputsBuilder_ == null) { + ensureTargetStreamInputsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, targetStreamInputs_); + onChanged(); + } else { + targetStreamInputsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * The target stream to remove.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.RemoveApplicationStreamInputRequest.TargetStreamInput target_stream_inputs = 2; + * + */ + public Builder clearTargetStreamInputs() { + if (targetStreamInputsBuilder_ == null) { + targetStreamInputs_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + targetStreamInputsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The target stream to remove.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.RemoveApplicationStreamInputRequest.TargetStreamInput target_stream_inputs = 2; + * + */ + public Builder removeTargetStreamInputs(int index) { + if (targetStreamInputsBuilder_ == null) { + ensureTargetStreamInputsIsMutable(); + targetStreamInputs_.remove(index); + onChanged(); + } else { + targetStreamInputsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * The target stream to remove.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.RemoveApplicationStreamInputRequest.TargetStreamInput target_stream_inputs = 2; + * + */ + public com.google.cloud.visionai.v1.RemoveApplicationStreamInputRequest.TargetStreamInput + .Builder + getTargetStreamInputsBuilder(int index) { + return getTargetStreamInputsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * The target stream to remove.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.RemoveApplicationStreamInputRequest.TargetStreamInput target_stream_inputs = 2; + * + */ + public com.google.cloud.visionai.v1.RemoveApplicationStreamInputRequest + .TargetStreamInputOrBuilder + getTargetStreamInputsOrBuilder(int index) { + if (targetStreamInputsBuilder_ == null) { + return targetStreamInputs_.get(index); + } else { + return targetStreamInputsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * The target stream to remove.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.RemoveApplicationStreamInputRequest.TargetStreamInput target_stream_inputs = 2; + * + */ + public java.util.List< + ? extends + com.google.cloud.visionai.v1.RemoveApplicationStreamInputRequest + .TargetStreamInputOrBuilder> + getTargetStreamInputsOrBuilderList() { + if (targetStreamInputsBuilder_ != null) { + return targetStreamInputsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(targetStreamInputs_); + } + } + /** + * + * + *
+     * The target stream to remove.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.RemoveApplicationStreamInputRequest.TargetStreamInput target_stream_inputs = 2; + * + */ + public com.google.cloud.visionai.v1.RemoveApplicationStreamInputRequest.TargetStreamInput + .Builder + addTargetStreamInputsBuilder() { + return getTargetStreamInputsFieldBuilder() + .addBuilder( + com.google.cloud.visionai.v1.RemoveApplicationStreamInputRequest.TargetStreamInput + .getDefaultInstance()); + } + /** + * + * + *
+     * The target stream to remove.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.RemoveApplicationStreamInputRequest.TargetStreamInput target_stream_inputs = 2; + * + */ + public com.google.cloud.visionai.v1.RemoveApplicationStreamInputRequest.TargetStreamInput + .Builder + addTargetStreamInputsBuilder(int index) { + return getTargetStreamInputsFieldBuilder() + .addBuilder( + index, + com.google.cloud.visionai.v1.RemoveApplicationStreamInputRequest.TargetStreamInput + .getDefaultInstance()); + } + /** + * + * + *
+     * The target stream to remove.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.RemoveApplicationStreamInputRequest.TargetStreamInput target_stream_inputs = 2; + * + */ + public java.util.List< + com.google.cloud.visionai.v1.RemoveApplicationStreamInputRequest.TargetStreamInput + .Builder> + getTargetStreamInputsBuilderList() { + return getTargetStreamInputsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.visionai.v1.RemoveApplicationStreamInputRequest.TargetStreamInput, + com.google.cloud.visionai.v1.RemoveApplicationStreamInputRequest.TargetStreamInput + .Builder, + com.google.cloud.visionai.v1.RemoveApplicationStreamInputRequest + .TargetStreamInputOrBuilder> + getTargetStreamInputsFieldBuilder() { + if (targetStreamInputsBuilder_ == null) { + targetStreamInputsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.visionai.v1.RemoveApplicationStreamInputRequest.TargetStreamInput, + com.google.cloud.visionai.v1.RemoveApplicationStreamInputRequest.TargetStreamInput + .Builder, + com.google.cloud.visionai.v1.RemoveApplicationStreamInputRequest + .TargetStreamInputOrBuilder>( + targetStreamInputs_, + ((bitField0_ & 0x00000002) != 0), + getParentForChildren(), + isClean()); + targetStreamInputs_ = null; + } + return targetStreamInputsBuilder_; + } + + private java.lang.Object requestId_ = ""; + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + requestId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearRequestId() { + requestId_ = getDefaultInstance().getRequestId(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + requestId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.RemoveApplicationStreamInputRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.RemoveApplicationStreamInputRequest) + private static final com.google.cloud.visionai.v1.RemoveApplicationStreamInputRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.RemoveApplicationStreamInputRequest(); + } + + public static com.google.cloud.visionai.v1.RemoveApplicationStreamInputRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RemoveApplicationStreamInputRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.RemoveApplicationStreamInputRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/RemoveApplicationStreamInputRequestOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/RemoveApplicationStreamInputRequestOrBuilder.java new file mode 100644 index 000000000000..921e43c32f8f --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/RemoveApplicationStreamInputRequestOrBuilder.java @@ -0,0 +1,176 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/platform.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface RemoveApplicationStreamInputRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.RemoveApplicationStreamInputRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. the name of the application to retrieve.
+   * Format:
+   * "projects/{project}/locations/{location}/applications/{application}"
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. the name of the application to retrieve.
+   * Format:
+   * "projects/{project}/locations/{location}/applications/{application}"
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * The target stream to remove.
+   * 
+ * + * + * repeated .google.cloud.visionai.v1.RemoveApplicationStreamInputRequest.TargetStreamInput target_stream_inputs = 2; + * + */ + java.util.List + getTargetStreamInputsList(); + /** + * + * + *
+   * The target stream to remove.
+   * 
+ * + * + * repeated .google.cloud.visionai.v1.RemoveApplicationStreamInputRequest.TargetStreamInput target_stream_inputs = 2; + * + */ + com.google.cloud.visionai.v1.RemoveApplicationStreamInputRequest.TargetStreamInput + getTargetStreamInputs(int index); + /** + * + * + *
+   * The target stream to remove.
+   * 
+ * + * + * repeated .google.cloud.visionai.v1.RemoveApplicationStreamInputRequest.TargetStreamInput target_stream_inputs = 2; + * + */ + int getTargetStreamInputsCount(); + /** + * + * + *
+   * The target stream to remove.
+   * 
+ * + * + * repeated .google.cloud.visionai.v1.RemoveApplicationStreamInputRequest.TargetStreamInput target_stream_inputs = 2; + * + */ + java.util.List< + ? extends + com.google.cloud.visionai.v1.RemoveApplicationStreamInputRequest + .TargetStreamInputOrBuilder> + getTargetStreamInputsOrBuilderList(); + /** + * + * + *
+   * The target stream to remove.
+   * 
+ * + * + * repeated .google.cloud.visionai.v1.RemoveApplicationStreamInputRequest.TargetStreamInput target_stream_inputs = 2; + * + */ + com.google.cloud.visionai.v1.RemoveApplicationStreamInputRequest.TargetStreamInputOrBuilder + getTargetStreamInputsOrBuilder(int index); + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and
+   * the request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + java.lang.String getRequestId(); + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and
+   * the request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + com.google.protobuf.ByteString getRequestIdBytes(); +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/RemoveApplicationStreamInputResponse.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/RemoveApplicationStreamInputResponse.java new file mode 100644 index 000000000000..a0d796db3e03 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/RemoveApplicationStreamInputResponse.java @@ -0,0 +1,443 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/platform.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * Message for RemoveApplicationStreamInput Response.
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.RemoveApplicationStreamInputResponse} + */ +public final class RemoveApplicationStreamInputResponse + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.RemoveApplicationStreamInputResponse) + RemoveApplicationStreamInputResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use RemoveApplicationStreamInputResponse.newBuilder() to construct. + private RemoveApplicationStreamInputResponse( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private RemoveApplicationStreamInputResponse() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new RemoveApplicationStreamInputResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_RemoveApplicationStreamInputResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_RemoveApplicationStreamInputResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.RemoveApplicationStreamInputResponse.class, + com.google.cloud.visionai.v1.RemoveApplicationStreamInputResponse.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 { + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += getUnknownFields().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.visionai.v1.RemoveApplicationStreamInputResponse)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.RemoveApplicationStreamInputResponse other = + (com.google.cloud.visionai.v1.RemoveApplicationStreamInputResponse) obj; + + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.RemoveApplicationStreamInputResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.RemoveApplicationStreamInputResponse 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.visionai.v1.RemoveApplicationStreamInputResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.RemoveApplicationStreamInputResponse 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.visionai.v1.RemoveApplicationStreamInputResponse parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.RemoveApplicationStreamInputResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.RemoveApplicationStreamInputResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.RemoveApplicationStreamInputResponse 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.visionai.v1.RemoveApplicationStreamInputResponse + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.RemoveApplicationStreamInputResponse + 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.visionai.v1.RemoveApplicationStreamInputResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.RemoveApplicationStreamInputResponse 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.visionai.v1.RemoveApplicationStreamInputResponse 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; + } + /** + * + * + *
+   * Message for RemoveApplicationStreamInput Response.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.RemoveApplicationStreamInputResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.RemoveApplicationStreamInputResponse) + com.google.cloud.visionai.v1.RemoveApplicationStreamInputResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_RemoveApplicationStreamInputResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_RemoveApplicationStreamInputResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.RemoveApplicationStreamInputResponse.class, + com.google.cloud.visionai.v1.RemoveApplicationStreamInputResponse.Builder.class); + } + + // Construct using + // com.google.cloud.visionai.v1.RemoveApplicationStreamInputResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_RemoveApplicationStreamInputResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.RemoveApplicationStreamInputResponse + getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.RemoveApplicationStreamInputResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.RemoveApplicationStreamInputResponse build() { + com.google.cloud.visionai.v1.RemoveApplicationStreamInputResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.RemoveApplicationStreamInputResponse buildPartial() { + com.google.cloud.visionai.v1.RemoveApplicationStreamInputResponse result = + new com.google.cloud.visionai.v1.RemoveApplicationStreamInputResponse(this); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.RemoveApplicationStreamInputResponse) { + return mergeFrom((com.google.cloud.visionai.v1.RemoveApplicationStreamInputResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.visionai.v1.RemoveApplicationStreamInputResponse other) { + if (other + == com.google.cloud.visionai.v1.RemoveApplicationStreamInputResponse.getDefaultInstance()) + return this; + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.RemoveApplicationStreamInputResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.RemoveApplicationStreamInputResponse) + private static final com.google.cloud.visionai.v1.RemoveApplicationStreamInputResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.RemoveApplicationStreamInputResponse(); + } + + public static com.google.cloud.visionai.v1.RemoveApplicationStreamInputResponse + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RemoveApplicationStreamInputResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.RemoveApplicationStreamInputResponse + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/RemoveApplicationStreamInputResponseOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/RemoveApplicationStreamInputResponseOrBuilder.java new file mode 100644 index 000000000000..7dfac244227e --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/RemoveApplicationStreamInputResponseOrBuilder.java @@ -0,0 +1,25 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/platform.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface RemoveApplicationStreamInputResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.RemoveApplicationStreamInputResponse) + com.google.protobuf.MessageOrBuilder {} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/RemoveCollectionItemRequest.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/RemoveCollectionItemRequest.java new file mode 100644 index 000000000000..dc8495d861ba --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/RemoveCollectionItemRequest.java @@ -0,0 +1,742 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/warehouse.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * Request message for RemoveCollectionItem.
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.RemoveCollectionItemRequest} + */ +public final class RemoveCollectionItemRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.RemoveCollectionItemRequest) + RemoveCollectionItemRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use RemoveCollectionItemRequest.newBuilder() to construct. + private RemoveCollectionItemRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private RemoveCollectionItemRequest() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new RemoveCollectionItemRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_RemoveCollectionItemRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_RemoveCollectionItemRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.RemoveCollectionItemRequest.class, + com.google.cloud.visionai.v1.RemoveCollectionItemRequest.Builder.class); + } + + private int bitField0_; + public static final int ITEM_FIELD_NUMBER = 1; + private com.google.cloud.visionai.v1.CollectionItem item_; + /** + * + * + *
+   * Required. The item to be removed.
+   * 
+ * + * + * .google.cloud.visionai.v1.CollectionItem item = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the item field is set. + */ + @java.lang.Override + public boolean hasItem() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * Required. The item to be removed.
+   * 
+ * + * + * .google.cloud.visionai.v1.CollectionItem item = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The item. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.CollectionItem getItem() { + return item_ == null ? com.google.cloud.visionai.v1.CollectionItem.getDefaultInstance() : item_; + } + /** + * + * + *
+   * Required. The item to be removed.
+   * 
+ * + * + * .google.cloud.visionai.v1.CollectionItem item = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.visionai.v1.CollectionItemOrBuilder getItemOrBuilder() { + return item_ == null ? com.google.cloud.visionai.v1.CollectionItem.getDefaultInstance() : item_; + } + + 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 (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getItem()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getItem()); + } + size += getUnknownFields().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.visionai.v1.RemoveCollectionItemRequest)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.RemoveCollectionItemRequest other = + (com.google.cloud.visionai.v1.RemoveCollectionItemRequest) obj; + + if (hasItem() != other.hasItem()) return false; + if (hasItem()) { + if (!getItem().equals(other.getItem())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasItem()) { + hash = (37 * hash) + ITEM_FIELD_NUMBER; + hash = (53 * hash) + getItem().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.RemoveCollectionItemRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.RemoveCollectionItemRequest 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.visionai.v1.RemoveCollectionItemRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.RemoveCollectionItemRequest 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.visionai.v1.RemoveCollectionItemRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.RemoveCollectionItemRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.RemoveCollectionItemRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.RemoveCollectionItemRequest 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.visionai.v1.RemoveCollectionItemRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.RemoveCollectionItemRequest 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.visionai.v1.RemoveCollectionItemRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.RemoveCollectionItemRequest 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.visionai.v1.RemoveCollectionItemRequest 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; + } + /** + * + * + *
+   * Request message for RemoveCollectionItem.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.RemoveCollectionItemRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.RemoveCollectionItemRequest) + com.google.cloud.visionai.v1.RemoveCollectionItemRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_RemoveCollectionItemRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_RemoveCollectionItemRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.RemoveCollectionItemRequest.class, + com.google.cloud.visionai.v1.RemoveCollectionItemRequest.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.RemoveCollectionItemRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getItemFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + item_ = null; + if (itemBuilder_ != null) { + itemBuilder_.dispose(); + itemBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_RemoveCollectionItemRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.RemoveCollectionItemRequest getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.RemoveCollectionItemRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.RemoveCollectionItemRequest build() { + com.google.cloud.visionai.v1.RemoveCollectionItemRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.RemoveCollectionItemRequest buildPartial() { + com.google.cloud.visionai.v1.RemoveCollectionItemRequest result = + new com.google.cloud.visionai.v1.RemoveCollectionItemRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.visionai.v1.RemoveCollectionItemRequest result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.item_ = itemBuilder_ == null ? item_ : itemBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.RemoveCollectionItemRequest) { + return mergeFrom((com.google.cloud.visionai.v1.RemoveCollectionItemRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.RemoveCollectionItemRequest other) { + if (other == com.google.cloud.visionai.v1.RemoveCollectionItemRequest.getDefaultInstance()) + return this; + if (other.hasItem()) { + mergeItem(other.getItem()); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getItemFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.cloud.visionai.v1.CollectionItem item_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.CollectionItem, + com.google.cloud.visionai.v1.CollectionItem.Builder, + com.google.cloud.visionai.v1.CollectionItemOrBuilder> + itemBuilder_; + /** + * + * + *
+     * Required. The item to be removed.
+     * 
+ * + * + * .google.cloud.visionai.v1.CollectionItem item = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the item field is set. + */ + public boolean hasItem() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * Required. The item to be removed.
+     * 
+ * + * + * .google.cloud.visionai.v1.CollectionItem item = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The item. + */ + public com.google.cloud.visionai.v1.CollectionItem getItem() { + if (itemBuilder_ == null) { + return item_ == null + ? com.google.cloud.visionai.v1.CollectionItem.getDefaultInstance() + : item_; + } else { + return itemBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The item to be removed.
+     * 
+ * + * + * .google.cloud.visionai.v1.CollectionItem item = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setItem(com.google.cloud.visionai.v1.CollectionItem value) { + if (itemBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + item_ = value; + } else { + itemBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The item to be removed.
+     * 
+ * + * + * .google.cloud.visionai.v1.CollectionItem item = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setItem(com.google.cloud.visionai.v1.CollectionItem.Builder builderForValue) { + if (itemBuilder_ == null) { + item_ = builderForValue.build(); + } else { + itemBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The item to be removed.
+     * 
+ * + * + * .google.cloud.visionai.v1.CollectionItem item = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeItem(com.google.cloud.visionai.v1.CollectionItem value) { + if (itemBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && item_ != null + && item_ != com.google.cloud.visionai.v1.CollectionItem.getDefaultInstance()) { + getItemBuilder().mergeFrom(value); + } else { + item_ = value; + } + } else { + itemBuilder_.mergeFrom(value); + } + if (item_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Required. The item to be removed.
+     * 
+ * + * + * .google.cloud.visionai.v1.CollectionItem item = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearItem() { + bitField0_ = (bitField0_ & ~0x00000001); + item_ = null; + if (itemBuilder_ != null) { + itemBuilder_.dispose(); + itemBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The item to be removed.
+     * 
+ * + * + * .google.cloud.visionai.v1.CollectionItem item = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.visionai.v1.CollectionItem.Builder getItemBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getItemFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The item to be removed.
+     * 
+ * + * + * .google.cloud.visionai.v1.CollectionItem item = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.visionai.v1.CollectionItemOrBuilder getItemOrBuilder() { + if (itemBuilder_ != null) { + return itemBuilder_.getMessageOrBuilder(); + } else { + return item_ == null + ? com.google.cloud.visionai.v1.CollectionItem.getDefaultInstance() + : item_; + } + } + /** + * + * + *
+     * Required. The item to be removed.
+     * 
+ * + * + * .google.cloud.visionai.v1.CollectionItem item = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.CollectionItem, + com.google.cloud.visionai.v1.CollectionItem.Builder, + com.google.cloud.visionai.v1.CollectionItemOrBuilder> + getItemFieldBuilder() { + if (itemBuilder_ == null) { + itemBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.CollectionItem, + com.google.cloud.visionai.v1.CollectionItem.Builder, + com.google.cloud.visionai.v1.CollectionItemOrBuilder>( + getItem(), getParentForChildren(), isClean()); + item_ = null; + } + return itemBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.RemoveCollectionItemRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.RemoveCollectionItemRequest) + private static final com.google.cloud.visionai.v1.RemoveCollectionItemRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.RemoveCollectionItemRequest(); + } + + public static com.google.cloud.visionai.v1.RemoveCollectionItemRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RemoveCollectionItemRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.RemoveCollectionItemRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/RemoveCollectionItemRequestOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/RemoveCollectionItemRequestOrBuilder.java new file mode 100644 index 000000000000..1fd226c3afd2 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/RemoveCollectionItemRequestOrBuilder.java @@ -0,0 +1,67 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/warehouse.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface RemoveCollectionItemRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.RemoveCollectionItemRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The item to be removed.
+   * 
+ * + * + * .google.cloud.visionai.v1.CollectionItem item = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the item field is set. + */ + boolean hasItem(); + /** + * + * + *
+   * Required. The item to be removed.
+   * 
+ * + * + * .google.cloud.visionai.v1.CollectionItem item = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The item. + */ + com.google.cloud.visionai.v1.CollectionItem getItem(); + /** + * + * + *
+   * Required. The item to be removed.
+   * 
+ * + * + * .google.cloud.visionai.v1.CollectionItem item = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.visionai.v1.CollectionItemOrBuilder getItemOrBuilder(); +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/RemoveCollectionItemResponse.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/RemoveCollectionItemResponse.java new file mode 100644 index 000000000000..1402473e6e79 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/RemoveCollectionItemResponse.java @@ -0,0 +1,718 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/warehouse.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * Request message for RemoveCollectionItem.
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.RemoveCollectionItemResponse} + */ +public final class RemoveCollectionItemResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.RemoveCollectionItemResponse) + RemoveCollectionItemResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use RemoveCollectionItemResponse.newBuilder() to construct. + private RemoveCollectionItemResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private RemoveCollectionItemResponse() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new RemoveCollectionItemResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_RemoveCollectionItemResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_RemoveCollectionItemResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.RemoveCollectionItemResponse.class, + com.google.cloud.visionai.v1.RemoveCollectionItemResponse.Builder.class); + } + + private int bitField0_; + public static final int ITEM_FIELD_NUMBER = 1; + private com.google.cloud.visionai.v1.CollectionItem item_; + /** + * + * + *
+   * The item that has already been removed.
+   * 
+ * + * .google.cloud.visionai.v1.CollectionItem item = 1; + * + * @return Whether the item field is set. + */ + @java.lang.Override + public boolean hasItem() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * The item that has already been removed.
+   * 
+ * + * .google.cloud.visionai.v1.CollectionItem item = 1; + * + * @return The item. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.CollectionItem getItem() { + return item_ == null ? com.google.cloud.visionai.v1.CollectionItem.getDefaultInstance() : item_; + } + /** + * + * + *
+   * The item that has already been removed.
+   * 
+ * + * .google.cloud.visionai.v1.CollectionItem item = 1; + */ + @java.lang.Override + public com.google.cloud.visionai.v1.CollectionItemOrBuilder getItemOrBuilder() { + return item_ == null ? com.google.cloud.visionai.v1.CollectionItem.getDefaultInstance() : item_; + } + + 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 (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getItem()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getItem()); + } + size += getUnknownFields().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.visionai.v1.RemoveCollectionItemResponse)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.RemoveCollectionItemResponse other = + (com.google.cloud.visionai.v1.RemoveCollectionItemResponse) obj; + + if (hasItem() != other.hasItem()) return false; + if (hasItem()) { + if (!getItem().equals(other.getItem())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasItem()) { + hash = (37 * hash) + ITEM_FIELD_NUMBER; + hash = (53 * hash) + getItem().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.RemoveCollectionItemResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.RemoveCollectionItemResponse 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.visionai.v1.RemoveCollectionItemResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.RemoveCollectionItemResponse 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.visionai.v1.RemoveCollectionItemResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.RemoveCollectionItemResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.RemoveCollectionItemResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.RemoveCollectionItemResponse 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.visionai.v1.RemoveCollectionItemResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.RemoveCollectionItemResponse 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.visionai.v1.RemoveCollectionItemResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.RemoveCollectionItemResponse 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.visionai.v1.RemoveCollectionItemResponse 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; + } + /** + * + * + *
+   * Request message for RemoveCollectionItem.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.RemoveCollectionItemResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.RemoveCollectionItemResponse) + com.google.cloud.visionai.v1.RemoveCollectionItemResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_RemoveCollectionItemResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_RemoveCollectionItemResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.RemoveCollectionItemResponse.class, + com.google.cloud.visionai.v1.RemoveCollectionItemResponse.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.RemoveCollectionItemResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getItemFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + item_ = null; + if (itemBuilder_ != null) { + itemBuilder_.dispose(); + itemBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_RemoveCollectionItemResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.RemoveCollectionItemResponse getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.RemoveCollectionItemResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.RemoveCollectionItemResponse build() { + com.google.cloud.visionai.v1.RemoveCollectionItemResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.RemoveCollectionItemResponse buildPartial() { + com.google.cloud.visionai.v1.RemoveCollectionItemResponse result = + new com.google.cloud.visionai.v1.RemoveCollectionItemResponse(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.visionai.v1.RemoveCollectionItemResponse result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.item_ = itemBuilder_ == null ? item_ : itemBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.RemoveCollectionItemResponse) { + return mergeFrom((com.google.cloud.visionai.v1.RemoveCollectionItemResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.RemoveCollectionItemResponse other) { + if (other == com.google.cloud.visionai.v1.RemoveCollectionItemResponse.getDefaultInstance()) + return this; + if (other.hasItem()) { + mergeItem(other.getItem()); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getItemFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.cloud.visionai.v1.CollectionItem item_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.CollectionItem, + com.google.cloud.visionai.v1.CollectionItem.Builder, + com.google.cloud.visionai.v1.CollectionItemOrBuilder> + itemBuilder_; + /** + * + * + *
+     * The item that has already been removed.
+     * 
+ * + * .google.cloud.visionai.v1.CollectionItem item = 1; + * + * @return Whether the item field is set. + */ + public boolean hasItem() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * The item that has already been removed.
+     * 
+ * + * .google.cloud.visionai.v1.CollectionItem item = 1; + * + * @return The item. + */ + public com.google.cloud.visionai.v1.CollectionItem getItem() { + if (itemBuilder_ == null) { + return item_ == null + ? com.google.cloud.visionai.v1.CollectionItem.getDefaultInstance() + : item_; + } else { + return itemBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The item that has already been removed.
+     * 
+ * + * .google.cloud.visionai.v1.CollectionItem item = 1; + */ + public Builder setItem(com.google.cloud.visionai.v1.CollectionItem value) { + if (itemBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + item_ = value; + } else { + itemBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The item that has already been removed.
+     * 
+ * + * .google.cloud.visionai.v1.CollectionItem item = 1; + */ + public Builder setItem(com.google.cloud.visionai.v1.CollectionItem.Builder builderForValue) { + if (itemBuilder_ == null) { + item_ = builderForValue.build(); + } else { + itemBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The item that has already been removed.
+     * 
+ * + * .google.cloud.visionai.v1.CollectionItem item = 1; + */ + public Builder mergeItem(com.google.cloud.visionai.v1.CollectionItem value) { + if (itemBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && item_ != null + && item_ != com.google.cloud.visionai.v1.CollectionItem.getDefaultInstance()) { + getItemBuilder().mergeFrom(value); + } else { + item_ = value; + } + } else { + itemBuilder_.mergeFrom(value); + } + if (item_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + /** + * + * + *
+     * The item that has already been removed.
+     * 
+ * + * .google.cloud.visionai.v1.CollectionItem item = 1; + */ + public Builder clearItem() { + bitField0_ = (bitField0_ & ~0x00000001); + item_ = null; + if (itemBuilder_ != null) { + itemBuilder_.dispose(); + itemBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * The item that has already been removed.
+     * 
+ * + * .google.cloud.visionai.v1.CollectionItem item = 1; + */ + public com.google.cloud.visionai.v1.CollectionItem.Builder getItemBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getItemFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The item that has already been removed.
+     * 
+ * + * .google.cloud.visionai.v1.CollectionItem item = 1; + */ + public com.google.cloud.visionai.v1.CollectionItemOrBuilder getItemOrBuilder() { + if (itemBuilder_ != null) { + return itemBuilder_.getMessageOrBuilder(); + } else { + return item_ == null + ? com.google.cloud.visionai.v1.CollectionItem.getDefaultInstance() + : item_; + } + } + /** + * + * + *
+     * The item that has already been removed.
+     * 
+ * + * .google.cloud.visionai.v1.CollectionItem item = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.CollectionItem, + com.google.cloud.visionai.v1.CollectionItem.Builder, + com.google.cloud.visionai.v1.CollectionItemOrBuilder> + getItemFieldBuilder() { + if (itemBuilder_ == null) { + itemBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.CollectionItem, + com.google.cloud.visionai.v1.CollectionItem.Builder, + com.google.cloud.visionai.v1.CollectionItemOrBuilder>( + getItem(), getParentForChildren(), isClean()); + item_ = null; + } + return itemBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.RemoveCollectionItemResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.RemoveCollectionItemResponse) + private static final com.google.cloud.visionai.v1.RemoveCollectionItemResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.RemoveCollectionItemResponse(); + } + + public static com.google.cloud.visionai.v1.RemoveCollectionItemResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RemoveCollectionItemResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.RemoveCollectionItemResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/RemoveCollectionItemResponseOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/RemoveCollectionItemResponseOrBuilder.java new file mode 100644 index 000000000000..b78eeb77e4f7 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/RemoveCollectionItemResponseOrBuilder.java @@ -0,0 +1,61 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/warehouse.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface RemoveCollectionItemResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.RemoveCollectionItemResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The item that has already been removed.
+   * 
+ * + * .google.cloud.visionai.v1.CollectionItem item = 1; + * + * @return Whether the item field is set. + */ + boolean hasItem(); + /** + * + * + *
+   * The item that has already been removed.
+   * 
+ * + * .google.cloud.visionai.v1.CollectionItem item = 1; + * + * @return The item. + */ + com.google.cloud.visionai.v1.CollectionItem getItem(); + /** + * + * + *
+   * The item that has already been removed.
+   * 
+ * + * .google.cloud.visionai.v1.CollectionItem item = 1; + */ + com.google.cloud.visionai.v1.CollectionItemOrBuilder getItemOrBuilder(); +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/RemoveIndexAssetMetadata.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/RemoveIndexAssetMetadata.java new file mode 100644 index 000000000000..5f84a90146c3 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/RemoveIndexAssetMetadata.java @@ -0,0 +1,1249 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/warehouse.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * Metadata for RemoveIndexAsset.
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.RemoveIndexAssetMetadata} + */ +public final class RemoveIndexAssetMetadata extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.RemoveIndexAssetMetadata) + RemoveIndexAssetMetadataOrBuilder { + private static final long serialVersionUID = 0L; + // Use RemoveIndexAssetMetadata.newBuilder() to construct. + private RemoveIndexAssetMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private RemoveIndexAssetMetadata() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new RemoveIndexAssetMetadata(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_RemoveIndexAssetMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_RemoveIndexAssetMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.RemoveIndexAssetMetadata.class, + com.google.cloud.visionai.v1.RemoveIndexAssetMetadata.Builder.class); + } + + private int bitField0_; + public static final int INDEXING_STATUS_FIELD_NUMBER = 1; + private com.google.cloud.visionai.v1.IndexingStatus indexingStatus_; + /** + * + * + *
+   * The status of indexing this asset.
+   * 
+ * + * .google.cloud.visionai.v1.IndexingStatus indexing_status = 1; + * + * @return Whether the indexingStatus field is set. + */ + @java.lang.Override + public boolean hasIndexingStatus() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * The status of indexing this asset.
+   * 
+ * + * .google.cloud.visionai.v1.IndexingStatus indexing_status = 1; + * + * @return The indexingStatus. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.IndexingStatus getIndexingStatus() { + return indexingStatus_ == null + ? com.google.cloud.visionai.v1.IndexingStatus.getDefaultInstance() + : indexingStatus_; + } + /** + * + * + *
+   * The status of indexing this asset.
+   * 
+ * + * .google.cloud.visionai.v1.IndexingStatus indexing_status = 1; + */ + @java.lang.Override + public com.google.cloud.visionai.v1.IndexingStatusOrBuilder getIndexingStatusOrBuilder() { + return indexingStatus_ == null + ? com.google.cloud.visionai.v1.IndexingStatus.getDefaultInstance() + : indexingStatus_; + } + + public static final int START_TIME_FIELD_NUMBER = 2; + private com.google.protobuf.Timestamp startTime_; + /** + * + * + *
+   * The start time of the operation.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 2; + * + * @return Whether the startTime field is set. + */ + @java.lang.Override + public boolean hasStartTime() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+   * The start time of the operation.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 2; + * + * @return The startTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getStartTime() { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } + /** + * + * + *
+   * The start time of the operation.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 2; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } + + public static final int UPDATE_TIME_FIELD_NUMBER = 3; + private com.google.protobuf.Timestamp updateTime_; + /** + * + * + *
+   * The update time of the operation.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3; + * + * @return Whether the updateTime field is set. + */ + @java.lang.Override + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+   * The update time of the operation.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3; + * + * @return The updateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getUpdateTime() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + /** + * + * + *
+   * The update time of the operation.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + + 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 (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getIndexingStatus()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(2, getStartTime()); + } + if (((bitField0_ & 0x00000004) != 0)) { + output.writeMessage(3, getUpdateTime()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getIndexingStatus()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getStartTime()); + } + if (((bitField0_ & 0x00000004) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getUpdateTime()); + } + size += getUnknownFields().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.visionai.v1.RemoveIndexAssetMetadata)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.RemoveIndexAssetMetadata other = + (com.google.cloud.visionai.v1.RemoveIndexAssetMetadata) obj; + + if (hasIndexingStatus() != other.hasIndexingStatus()) return false; + if (hasIndexingStatus()) { + if (!getIndexingStatus().equals(other.getIndexingStatus())) return false; + } + if (hasStartTime() != other.hasStartTime()) return false; + if (hasStartTime()) { + if (!getStartTime().equals(other.getStartTime())) return false; + } + if (hasUpdateTime() != other.hasUpdateTime()) return false; + if (hasUpdateTime()) { + if (!getUpdateTime().equals(other.getUpdateTime())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasIndexingStatus()) { + hash = (37 * hash) + INDEXING_STATUS_FIELD_NUMBER; + hash = (53 * hash) + getIndexingStatus().hashCode(); + } + 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) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.RemoveIndexAssetMetadata parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.RemoveIndexAssetMetadata 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.visionai.v1.RemoveIndexAssetMetadata parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.RemoveIndexAssetMetadata 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.visionai.v1.RemoveIndexAssetMetadata parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.RemoveIndexAssetMetadata parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.RemoveIndexAssetMetadata parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.RemoveIndexAssetMetadata 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.visionai.v1.RemoveIndexAssetMetadata parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.RemoveIndexAssetMetadata 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.visionai.v1.RemoveIndexAssetMetadata parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.RemoveIndexAssetMetadata 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.visionai.v1.RemoveIndexAssetMetadata 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; + } + /** + * + * + *
+   * Metadata for RemoveIndexAsset.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.RemoveIndexAssetMetadata} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.RemoveIndexAssetMetadata) + com.google.cloud.visionai.v1.RemoveIndexAssetMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_RemoveIndexAssetMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_RemoveIndexAssetMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.RemoveIndexAssetMetadata.class, + com.google.cloud.visionai.v1.RemoveIndexAssetMetadata.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.RemoveIndexAssetMetadata.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getIndexingStatusFieldBuilder(); + getStartTimeFieldBuilder(); + getUpdateTimeFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + indexingStatus_ = null; + if (indexingStatusBuilder_ != null) { + indexingStatusBuilder_.dispose(); + indexingStatusBuilder_ = null; + } + startTime_ = null; + if (startTimeBuilder_ != null) { + startTimeBuilder_.dispose(); + startTimeBuilder_ = null; + } + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_RemoveIndexAssetMetadata_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.RemoveIndexAssetMetadata getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.RemoveIndexAssetMetadata.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.RemoveIndexAssetMetadata build() { + com.google.cloud.visionai.v1.RemoveIndexAssetMetadata result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.RemoveIndexAssetMetadata buildPartial() { + com.google.cloud.visionai.v1.RemoveIndexAssetMetadata result = + new com.google.cloud.visionai.v1.RemoveIndexAssetMetadata(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.visionai.v1.RemoveIndexAssetMetadata result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.indexingStatus_ = + indexingStatusBuilder_ == null ? indexingStatus_ : indexingStatusBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.startTime_ = startTimeBuilder_ == null ? startTime_ : startTimeBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.updateTime_ = updateTimeBuilder_ == null ? updateTime_ : updateTimeBuilder_.build(); + to_bitField0_ |= 0x00000004; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.RemoveIndexAssetMetadata) { + return mergeFrom((com.google.cloud.visionai.v1.RemoveIndexAssetMetadata) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.RemoveIndexAssetMetadata other) { + if (other == com.google.cloud.visionai.v1.RemoveIndexAssetMetadata.getDefaultInstance()) + return this; + if (other.hasIndexingStatus()) { + mergeIndexingStatus(other.getIndexingStatus()); + } + if (other.hasStartTime()) { + mergeStartTime(other.getStartTime()); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getIndexingStatusFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage(getStartTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage(getUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.cloud.visionai.v1.IndexingStatus indexingStatus_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.IndexingStatus, + com.google.cloud.visionai.v1.IndexingStatus.Builder, + com.google.cloud.visionai.v1.IndexingStatusOrBuilder> + indexingStatusBuilder_; + /** + * + * + *
+     * The status of indexing this asset.
+     * 
+ * + * .google.cloud.visionai.v1.IndexingStatus indexing_status = 1; + * + * @return Whether the indexingStatus field is set. + */ + public boolean hasIndexingStatus() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * The status of indexing this asset.
+     * 
+ * + * .google.cloud.visionai.v1.IndexingStatus indexing_status = 1; + * + * @return The indexingStatus. + */ + public com.google.cloud.visionai.v1.IndexingStatus getIndexingStatus() { + if (indexingStatusBuilder_ == null) { + return indexingStatus_ == null + ? com.google.cloud.visionai.v1.IndexingStatus.getDefaultInstance() + : indexingStatus_; + } else { + return indexingStatusBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The status of indexing this asset.
+     * 
+ * + * .google.cloud.visionai.v1.IndexingStatus indexing_status = 1; + */ + public Builder setIndexingStatus(com.google.cloud.visionai.v1.IndexingStatus value) { + if (indexingStatusBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + indexingStatus_ = value; + } else { + indexingStatusBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The status of indexing this asset.
+     * 
+ * + * .google.cloud.visionai.v1.IndexingStatus indexing_status = 1; + */ + public Builder setIndexingStatus( + com.google.cloud.visionai.v1.IndexingStatus.Builder builderForValue) { + if (indexingStatusBuilder_ == null) { + indexingStatus_ = builderForValue.build(); + } else { + indexingStatusBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The status of indexing this asset.
+     * 
+ * + * .google.cloud.visionai.v1.IndexingStatus indexing_status = 1; + */ + public Builder mergeIndexingStatus(com.google.cloud.visionai.v1.IndexingStatus value) { + if (indexingStatusBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && indexingStatus_ != null + && indexingStatus_ + != com.google.cloud.visionai.v1.IndexingStatus.getDefaultInstance()) { + getIndexingStatusBuilder().mergeFrom(value); + } else { + indexingStatus_ = value; + } + } else { + indexingStatusBuilder_.mergeFrom(value); + } + if (indexingStatus_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + /** + * + * + *
+     * The status of indexing this asset.
+     * 
+ * + * .google.cloud.visionai.v1.IndexingStatus indexing_status = 1; + */ + public Builder clearIndexingStatus() { + bitField0_ = (bitField0_ & ~0x00000001); + indexingStatus_ = null; + if (indexingStatusBuilder_ != null) { + indexingStatusBuilder_.dispose(); + indexingStatusBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * The status of indexing this asset.
+     * 
+ * + * .google.cloud.visionai.v1.IndexingStatus indexing_status = 1; + */ + public com.google.cloud.visionai.v1.IndexingStatus.Builder getIndexingStatusBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getIndexingStatusFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The status of indexing this asset.
+     * 
+ * + * .google.cloud.visionai.v1.IndexingStatus indexing_status = 1; + */ + public com.google.cloud.visionai.v1.IndexingStatusOrBuilder getIndexingStatusOrBuilder() { + if (indexingStatusBuilder_ != null) { + return indexingStatusBuilder_.getMessageOrBuilder(); + } else { + return indexingStatus_ == null + ? com.google.cloud.visionai.v1.IndexingStatus.getDefaultInstance() + : indexingStatus_; + } + } + /** + * + * + *
+     * The status of indexing this asset.
+     * 
+ * + * .google.cloud.visionai.v1.IndexingStatus indexing_status = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.IndexingStatus, + com.google.cloud.visionai.v1.IndexingStatus.Builder, + com.google.cloud.visionai.v1.IndexingStatusOrBuilder> + getIndexingStatusFieldBuilder() { + if (indexingStatusBuilder_ == null) { + indexingStatusBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.visionai.v1.IndexingStatus, + com.google.cloud.visionai.v1.IndexingStatus.Builder, + com.google.cloud.visionai.v1.IndexingStatusOrBuilder>( + getIndexingStatus(), getParentForChildren(), isClean()); + indexingStatus_ = null; + } + return indexingStatusBuilder_; + } + + private com.google.protobuf.Timestamp startTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + startTimeBuilder_; + /** + * + * + *
+     * The start time of the operation.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 2; + * + * @return Whether the startTime field is set. + */ + public boolean hasStartTime() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * The start time of the operation.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 2; + * + * @return The startTime. + */ + public com.google.protobuf.Timestamp getStartTime() { + if (startTimeBuilder_ == null) { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } else { + return startTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The start time of the operation.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 2; + */ + public Builder setStartTime(com.google.protobuf.Timestamp value) { + if (startTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + startTime_ = value; + } else { + startTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * The start time of the operation.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 2; + */ + public Builder setStartTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (startTimeBuilder_ == null) { + startTime_ = builderForValue.build(); + } else { + startTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * The start time of the operation.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 2; + */ + public Builder mergeStartTime(com.google.protobuf.Timestamp value) { + if (startTimeBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && startTime_ != null + && startTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getStartTimeBuilder().mergeFrom(value); + } else { + startTime_ = value; + } + } else { + startTimeBuilder_.mergeFrom(value); + } + if (startTime_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + /** + * + * + *
+     * The start time of the operation.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 2; + */ + public Builder clearStartTime() { + bitField0_ = (bitField0_ & ~0x00000002); + startTime_ = null; + if (startTimeBuilder_ != null) { + startTimeBuilder_.dispose(); + startTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * The start time of the operation.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 2; + */ + public com.google.protobuf.Timestamp.Builder getStartTimeBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getStartTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The start time of the operation.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 2; + */ + public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { + if (startTimeBuilder_ != null) { + return startTimeBuilder_.getMessageOrBuilder(); + } else { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } + } + /** + * + * + *
+     * The start time of the operation.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 2; + */ + 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_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + updateTimeBuilder_; + /** + * + * + *
+     * The update time of the operation.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 3; + * + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+     * The update time of the operation.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 3; + * + * @return The updateTime. + */ + public com.google.protobuf.Timestamp getUpdateTime() { + if (updateTimeBuilder_ == null) { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } else { + return updateTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The update time of the operation.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 3; + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateTime_ = value; + } else { + updateTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * The update time of the operation.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 3; + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (updateTimeBuilder_ == null) { + updateTime_ = builderForValue.build(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * The update time of the operation.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 3; + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && updateTime_ != null + && updateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getUpdateTimeBuilder().mergeFrom(value); + } else { + updateTime_ = value; + } + } else { + updateTimeBuilder_.mergeFrom(value); + } + if (updateTime_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + /** + * + * + *
+     * The update time of the operation.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 3; + */ + public Builder clearUpdateTime() { + bitField0_ = (bitField0_ & ~0x00000004); + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * The update time of the operation.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 3; + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getUpdateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The update time of the operation.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 3; + */ + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + if (updateTimeBuilder_ != null) { + return updateTimeBuilder_.getMessageOrBuilder(); + } else { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } + } + /** + * + * + *
+     * The update time of the operation.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 3; + */ + 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.setUnknownFields(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.visionai.v1.RemoveIndexAssetMetadata) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.RemoveIndexAssetMetadata) + private static final com.google.cloud.visionai.v1.RemoveIndexAssetMetadata DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.RemoveIndexAssetMetadata(); + } + + public static com.google.cloud.visionai.v1.RemoveIndexAssetMetadata getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RemoveIndexAssetMetadata parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.RemoveIndexAssetMetadata getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/RemoveIndexAssetMetadataOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/RemoveIndexAssetMetadataOrBuilder.java new file mode 100644 index 000000000000..78d67a48f8db --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/RemoveIndexAssetMetadataOrBuilder.java @@ -0,0 +1,131 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/warehouse.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface RemoveIndexAssetMetadataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.RemoveIndexAssetMetadata) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The status of indexing this asset.
+   * 
+ * + * .google.cloud.visionai.v1.IndexingStatus indexing_status = 1; + * + * @return Whether the indexingStatus field is set. + */ + boolean hasIndexingStatus(); + /** + * + * + *
+   * The status of indexing this asset.
+   * 
+ * + * .google.cloud.visionai.v1.IndexingStatus indexing_status = 1; + * + * @return The indexingStatus. + */ + com.google.cloud.visionai.v1.IndexingStatus getIndexingStatus(); + /** + * + * + *
+   * The status of indexing this asset.
+   * 
+ * + * .google.cloud.visionai.v1.IndexingStatus indexing_status = 1; + */ + com.google.cloud.visionai.v1.IndexingStatusOrBuilder getIndexingStatusOrBuilder(); + + /** + * + * + *
+   * The start time of the operation.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 2; + * + * @return Whether the startTime field is set. + */ + boolean hasStartTime(); + /** + * + * + *
+   * The start time of the operation.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 2; + * + * @return The startTime. + */ + com.google.protobuf.Timestamp getStartTime(); + /** + * + * + *
+   * The start time of the operation.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 2; + */ + com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder(); + + /** + * + * + *
+   * The update time of the operation.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3; + * + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + /** + * + * + *
+   * The update time of the operation.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3; + * + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + /** + * + * + *
+   * The update time of the operation.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3; + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/RemoveIndexAssetRequest.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/RemoveIndexAssetRequest.java new file mode 100644 index 000000000000..abe25bebd198 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/RemoveIndexAssetRequest.java @@ -0,0 +1,863 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/warehouse.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * Request message for RemoveIndexAsset.
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.RemoveIndexAssetRequest} + */ +public final class RemoveIndexAssetRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.RemoveIndexAssetRequest) + RemoveIndexAssetRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use RemoveIndexAssetRequest.newBuilder() to construct. + private RemoveIndexAssetRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private RemoveIndexAssetRequest() { + name_ = ""; + index_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new RemoveIndexAssetRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_RemoveIndexAssetRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_RemoveIndexAssetRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.RemoveIndexAssetRequest.class, + com.google.cloud.visionai.v1.RemoveIndexAssetRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Required. The resource name of the asset to index.
+   * Format:
+   * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/assets/{asset_id}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + 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(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The resource name of the asset to index.
+   * Format:
+   * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/assets/{asset_id}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int INDEX_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object index_ = ""; + /** + * + * + *
+   * Optional. The name of the index.
+   * Format:
+   * `projects/{project_number}/locations/{location}/corpora/{corpus}/indexes/{index}`
+   * 
+ * + * + * string index = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The index. + */ + @java.lang.Override + public java.lang.String getIndex() { + java.lang.Object ref = index_; + 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(); + index_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. The name of the index.
+   * Format:
+   * `projects/{project_number}/locations/{location}/corpora/{corpus}/indexes/{index}`
+   * 
+ * + * + * string index = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for index. + */ + @java.lang.Override + public com.google.protobuf.ByteString getIndexBytes() { + java.lang.Object ref = index_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + index_ = 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(index_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, index_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(index_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, index_); + } + size += getUnknownFields().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.visionai.v1.RemoveIndexAssetRequest)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.RemoveIndexAssetRequest other = + (com.google.cloud.visionai.v1.RemoveIndexAssetRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getIndex().equals(other.getIndex())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + INDEX_FIELD_NUMBER; + hash = (53 * hash) + getIndex().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.RemoveIndexAssetRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.RemoveIndexAssetRequest 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.visionai.v1.RemoveIndexAssetRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.RemoveIndexAssetRequest 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.visionai.v1.RemoveIndexAssetRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.RemoveIndexAssetRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.RemoveIndexAssetRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.RemoveIndexAssetRequest 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.visionai.v1.RemoveIndexAssetRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.RemoveIndexAssetRequest 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.visionai.v1.RemoveIndexAssetRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.RemoveIndexAssetRequest 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.visionai.v1.RemoveIndexAssetRequest 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; + } + /** + * + * + *
+   * Request message for RemoveIndexAsset.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.RemoveIndexAssetRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.RemoveIndexAssetRequest) + com.google.cloud.visionai.v1.RemoveIndexAssetRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_RemoveIndexAssetRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_RemoveIndexAssetRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.RemoveIndexAssetRequest.class, + com.google.cloud.visionai.v1.RemoveIndexAssetRequest.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.RemoveIndexAssetRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + index_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_RemoveIndexAssetRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.RemoveIndexAssetRequest getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.RemoveIndexAssetRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.RemoveIndexAssetRequest build() { + com.google.cloud.visionai.v1.RemoveIndexAssetRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.RemoveIndexAssetRequest buildPartial() { + com.google.cloud.visionai.v1.RemoveIndexAssetRequest result = + new com.google.cloud.visionai.v1.RemoveIndexAssetRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.visionai.v1.RemoveIndexAssetRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.index_ = index_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.RemoveIndexAssetRequest) { + return mergeFrom((com.google.cloud.visionai.v1.RemoveIndexAssetRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.RemoveIndexAssetRequest other) { + if (other == com.google.cloud.visionai.v1.RemoveIndexAssetRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getIndex().isEmpty()) { + index_ = other.index_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + index_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. The resource name of the asset to index.
+     * Format:
+     * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/assets/{asset_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The resource name of the asset to index.
+     * Format:
+     * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/assets/{asset_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The resource name of the asset to index.
+     * Format:
+     * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/assets/{asset_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the asset to index.
+     * Format:
+     * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/assets/{asset_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the asset to index.
+     * Format:
+     * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/assets/{asset_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object index_ = ""; + /** + * + * + *
+     * Optional. The name of the index.
+     * Format:
+     * `projects/{project_number}/locations/{location}/corpora/{corpus}/indexes/{index}`
+     * 
+ * + * + * string index = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The index. + */ + public java.lang.String getIndex() { + java.lang.Object ref = index_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + index_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. The name of the index.
+     * Format:
+     * `projects/{project_number}/locations/{location}/corpora/{corpus}/indexes/{index}`
+     * 
+ * + * + * string index = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for index. + */ + public com.google.protobuf.ByteString getIndexBytes() { + java.lang.Object ref = index_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + index_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. The name of the index.
+     * Format:
+     * `projects/{project_number}/locations/{location}/corpora/{corpus}/indexes/{index}`
+     * 
+ * + * + * string index = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @param value The index to set. + * @return This builder for chaining. + */ + public Builder setIndex(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + index_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The name of the index.
+     * Format:
+     * `projects/{project_number}/locations/{location}/corpora/{corpus}/indexes/{index}`
+     * 
+ * + * + * string index = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearIndex() { + index_ = getDefaultInstance().getIndex(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The name of the index.
+     * Format:
+     * `projects/{project_number}/locations/{location}/corpora/{corpus}/indexes/{index}`
+     * 
+ * + * + * string index = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for index to set. + * @return This builder for chaining. + */ + public Builder setIndexBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + index_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.RemoveIndexAssetRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.RemoveIndexAssetRequest) + private static final com.google.cloud.visionai.v1.RemoveIndexAssetRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.RemoveIndexAssetRequest(); + } + + public static com.google.cloud.visionai.v1.RemoveIndexAssetRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RemoveIndexAssetRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.RemoveIndexAssetRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/RemoveIndexAssetRequestOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/RemoveIndexAssetRequestOrBuilder.java new file mode 100644 index 000000000000..a3f935a61c45 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/RemoveIndexAssetRequestOrBuilder.java @@ -0,0 +1,92 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/warehouse.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface RemoveIndexAssetRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.RemoveIndexAssetRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The resource name of the asset to index.
+   * Format:
+   * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/assets/{asset_id}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The resource name of the asset to index.
+   * Format:
+   * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/assets/{asset_id}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Optional. The name of the index.
+   * Format:
+   * `projects/{project_number}/locations/{location}/corpora/{corpus}/indexes/{index}`
+   * 
+ * + * + * string index = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The index. + */ + java.lang.String getIndex(); + /** + * + * + *
+   * Optional. The name of the index.
+   * Format:
+   * `projects/{project_number}/locations/{location}/corpora/{corpus}/indexes/{index}`
+   * 
+ * + * + * string index = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for index. + */ + com.google.protobuf.ByteString getIndexBytes(); +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/RemoveIndexAssetResponse.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/RemoveIndexAssetResponse.java new file mode 100644 index 000000000000..158e8bafdc50 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/RemoveIndexAssetResponse.java @@ -0,0 +1,433 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/warehouse.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * Response message for RemoveIndexAsset.
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.RemoveIndexAssetResponse} + */ +public final class RemoveIndexAssetResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.RemoveIndexAssetResponse) + RemoveIndexAssetResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use RemoveIndexAssetResponse.newBuilder() to construct. + private RemoveIndexAssetResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private RemoveIndexAssetResponse() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new RemoveIndexAssetResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_RemoveIndexAssetResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_RemoveIndexAssetResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.RemoveIndexAssetResponse.class, + com.google.cloud.visionai.v1.RemoveIndexAssetResponse.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 { + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += getUnknownFields().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.visionai.v1.RemoveIndexAssetResponse)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.RemoveIndexAssetResponse other = + (com.google.cloud.visionai.v1.RemoveIndexAssetResponse) obj; + + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.RemoveIndexAssetResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.RemoveIndexAssetResponse 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.visionai.v1.RemoveIndexAssetResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.RemoveIndexAssetResponse 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.visionai.v1.RemoveIndexAssetResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.RemoveIndexAssetResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.RemoveIndexAssetResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.RemoveIndexAssetResponse 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.visionai.v1.RemoveIndexAssetResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.RemoveIndexAssetResponse 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.visionai.v1.RemoveIndexAssetResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.RemoveIndexAssetResponse 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.visionai.v1.RemoveIndexAssetResponse 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; + } + /** + * + * + *
+   * Response message for RemoveIndexAsset.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.RemoveIndexAssetResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.RemoveIndexAssetResponse) + com.google.cloud.visionai.v1.RemoveIndexAssetResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_RemoveIndexAssetResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_RemoveIndexAssetResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.RemoveIndexAssetResponse.class, + com.google.cloud.visionai.v1.RemoveIndexAssetResponse.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.RemoveIndexAssetResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_RemoveIndexAssetResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.RemoveIndexAssetResponse getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.RemoveIndexAssetResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.RemoveIndexAssetResponse build() { + com.google.cloud.visionai.v1.RemoveIndexAssetResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.RemoveIndexAssetResponse buildPartial() { + com.google.cloud.visionai.v1.RemoveIndexAssetResponse result = + new com.google.cloud.visionai.v1.RemoveIndexAssetResponse(this); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.RemoveIndexAssetResponse) { + return mergeFrom((com.google.cloud.visionai.v1.RemoveIndexAssetResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.RemoveIndexAssetResponse other) { + if (other == com.google.cloud.visionai.v1.RemoveIndexAssetResponse.getDefaultInstance()) + return this; + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.RemoveIndexAssetResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.RemoveIndexAssetResponse) + private static final com.google.cloud.visionai.v1.RemoveIndexAssetResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.RemoveIndexAssetResponse(); + } + + public static com.google.cloud.visionai.v1.RemoveIndexAssetResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RemoveIndexAssetResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.RemoveIndexAssetResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/RemoveIndexAssetResponseOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/RemoveIndexAssetResponseOrBuilder.java new file mode 100644 index 000000000000..373b8bae36e1 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/RemoveIndexAssetResponseOrBuilder.java @@ -0,0 +1,25 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/warehouse.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface RemoveIndexAssetResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.RemoveIndexAssetResponse) + com.google.protobuf.MessageOrBuilder {} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/RenewLeaseRequest.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/RenewLeaseRequest.java new file mode 100644 index 000000000000..f6875dd767f9 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/RenewLeaseRequest.java @@ -0,0 +1,1259 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/streaming_service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * Request message for renewing a lease.
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.RenewLeaseRequest} + */ +public final class RenewLeaseRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.RenewLeaseRequest) + RenewLeaseRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use RenewLeaseRequest.newBuilder() to construct. + private RenewLeaseRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private RenewLeaseRequest() { + id_ = ""; + series_ = ""; + owner_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new RenewLeaseRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.StreamingServiceProto + .internal_static_google_cloud_visionai_v1_RenewLeaseRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.StreamingServiceProto + .internal_static_google_cloud_visionai_v1_RenewLeaseRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.RenewLeaseRequest.class, + com.google.cloud.visionai.v1.RenewLeaseRequest.Builder.class); + } + + private int bitField0_; + public static final int ID_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object id_ = ""; + /** + * + * + *
+   * Lease id.
+   * 
+ * + * string id = 1; + * + * @return The id. + */ + @java.lang.Override + public java.lang.String getId() { + java.lang.Object ref = id_; + 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(); + id_ = s; + return s; + } + } + /** + * + * + *
+   * Lease id.
+   * 
+ * + * string id = 1; + * + * @return The bytes for id. + */ + @java.lang.Override + public com.google.protobuf.ByteString getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SERIES_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object series_ = ""; + /** + * + * + *
+   * Series name.
+   * 
+ * + * string series = 2; + * + * @return The series. + */ + @java.lang.Override + public java.lang.String getSeries() { + java.lang.Object ref = series_; + 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(); + series_ = s; + return s; + } + } + /** + * + * + *
+   * Series name.
+   * 
+ * + * string series = 2; + * + * @return The bytes for series. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSeriesBytes() { + java.lang.Object ref = series_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + series_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int OWNER_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object owner_ = ""; + /** + * + * + *
+   * Lease owner.
+   * 
+ * + * string owner = 3; + * + * @return The owner. + */ + @java.lang.Override + public java.lang.String getOwner() { + java.lang.Object ref = owner_; + 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(); + owner_ = s; + return s; + } + } + /** + * + * + *
+   * Lease owner.
+   * 
+ * + * string owner = 3; + * + * @return The bytes for owner. + */ + @java.lang.Override + public com.google.protobuf.ByteString getOwnerBytes() { + java.lang.Object ref = owner_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + owner_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TERM_FIELD_NUMBER = 4; + private com.google.protobuf.Duration term_; + /** + * + * + *
+   * Lease term.
+   * 
+ * + * .google.protobuf.Duration term = 4; + * + * @return Whether the term field is set. + */ + @java.lang.Override + public boolean hasTerm() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * Lease term.
+   * 
+ * + * .google.protobuf.Duration term = 4; + * + * @return The term. + */ + @java.lang.Override + public com.google.protobuf.Duration getTerm() { + return term_ == null ? com.google.protobuf.Duration.getDefaultInstance() : term_; + } + /** + * + * + *
+   * Lease term.
+   * 
+ * + * .google.protobuf.Duration term = 4; + */ + @java.lang.Override + public com.google.protobuf.DurationOrBuilder getTermOrBuilder() { + return term_ == null ? com.google.protobuf.Duration.getDefaultInstance() : term_; + } + + 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, id_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(series_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, series_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(owner_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, owner_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(4, getTerm()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, id_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(series_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, series_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(owner_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, owner_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getTerm()); + } + size += getUnknownFields().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.visionai.v1.RenewLeaseRequest)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.RenewLeaseRequest other = + (com.google.cloud.visionai.v1.RenewLeaseRequest) obj; + + if (!getId().equals(other.getId())) return false; + if (!getSeries().equals(other.getSeries())) return false; + if (!getOwner().equals(other.getOwner())) return false; + if (hasTerm() != other.hasTerm()) return false; + if (hasTerm()) { + if (!getTerm().equals(other.getTerm())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ID_FIELD_NUMBER; + hash = (53 * hash) + getId().hashCode(); + hash = (37 * hash) + SERIES_FIELD_NUMBER; + hash = (53 * hash) + getSeries().hashCode(); + hash = (37 * hash) + OWNER_FIELD_NUMBER; + hash = (53 * hash) + getOwner().hashCode(); + if (hasTerm()) { + hash = (37 * hash) + TERM_FIELD_NUMBER; + hash = (53 * hash) + getTerm().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.RenewLeaseRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.RenewLeaseRequest 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.visionai.v1.RenewLeaseRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.RenewLeaseRequest 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.visionai.v1.RenewLeaseRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.RenewLeaseRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.RenewLeaseRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.RenewLeaseRequest 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.visionai.v1.RenewLeaseRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.RenewLeaseRequest 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.visionai.v1.RenewLeaseRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.RenewLeaseRequest 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.visionai.v1.RenewLeaseRequest 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; + } + /** + * + * + *
+   * Request message for renewing a lease.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.RenewLeaseRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.RenewLeaseRequest) + com.google.cloud.visionai.v1.RenewLeaseRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.StreamingServiceProto + .internal_static_google_cloud_visionai_v1_RenewLeaseRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.StreamingServiceProto + .internal_static_google_cloud_visionai_v1_RenewLeaseRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.RenewLeaseRequest.class, + com.google.cloud.visionai.v1.RenewLeaseRequest.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.RenewLeaseRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getTermFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + id_ = ""; + series_ = ""; + owner_ = ""; + term_ = null; + if (termBuilder_ != null) { + termBuilder_.dispose(); + termBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.StreamingServiceProto + .internal_static_google_cloud_visionai_v1_RenewLeaseRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.RenewLeaseRequest getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.RenewLeaseRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.RenewLeaseRequest build() { + com.google.cloud.visionai.v1.RenewLeaseRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.RenewLeaseRequest buildPartial() { + com.google.cloud.visionai.v1.RenewLeaseRequest result = + new com.google.cloud.visionai.v1.RenewLeaseRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.visionai.v1.RenewLeaseRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.id_ = id_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.series_ = series_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.owner_ = owner_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000008) != 0)) { + result.term_ = termBuilder_ == null ? term_ : termBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.RenewLeaseRequest) { + return mergeFrom((com.google.cloud.visionai.v1.RenewLeaseRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.RenewLeaseRequest other) { + if (other == com.google.cloud.visionai.v1.RenewLeaseRequest.getDefaultInstance()) return this; + if (!other.getId().isEmpty()) { + id_ = other.id_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getSeries().isEmpty()) { + series_ = other.series_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getOwner().isEmpty()) { + owner_ = other.owner_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (other.hasTerm()) { + mergeTerm(other.getTerm()); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + id_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + series_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + owner_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + input.readMessage(getTermFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 34 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object id_ = ""; + /** + * + * + *
+     * Lease id.
+     * 
+ * + * string id = 1; + * + * @return The id. + */ + public java.lang.String getId() { + java.lang.Object ref = id_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + id_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Lease id.
+     * 
+ * + * string id = 1; + * + * @return The bytes for id. + */ + public com.google.protobuf.ByteString getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Lease id.
+     * 
+ * + * string id = 1; + * + * @param value The id to set. + * @return This builder for chaining. + */ + public Builder setId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + id_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Lease id.
+     * 
+ * + * string id = 1; + * + * @return This builder for chaining. + */ + public Builder clearId() { + id_ = getDefaultInstance().getId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Lease id.
+     * 
+ * + * string id = 1; + * + * @param value The bytes for id to set. + * @return This builder for chaining. + */ + public Builder setIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + id_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object series_ = ""; + /** + * + * + *
+     * Series name.
+     * 
+ * + * string series = 2; + * + * @return The series. + */ + public java.lang.String getSeries() { + java.lang.Object ref = series_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + series_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Series name.
+     * 
+ * + * string series = 2; + * + * @return The bytes for series. + */ + public com.google.protobuf.ByteString getSeriesBytes() { + java.lang.Object ref = series_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + series_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Series name.
+     * 
+ * + * string series = 2; + * + * @param value The series to set. + * @return This builder for chaining. + */ + public Builder setSeries(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + series_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Series name.
+     * 
+ * + * string series = 2; + * + * @return This builder for chaining. + */ + public Builder clearSeries() { + series_ = getDefaultInstance().getSeries(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Series name.
+     * 
+ * + * string series = 2; + * + * @param value The bytes for series to set. + * @return This builder for chaining. + */ + public Builder setSeriesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + series_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object owner_ = ""; + /** + * + * + *
+     * Lease owner.
+     * 
+ * + * string owner = 3; + * + * @return The owner. + */ + public java.lang.String getOwner() { + java.lang.Object ref = owner_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + owner_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Lease owner.
+     * 
+ * + * string owner = 3; + * + * @return The bytes for owner. + */ + public com.google.protobuf.ByteString getOwnerBytes() { + java.lang.Object ref = owner_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + owner_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Lease owner.
+     * 
+ * + * string owner = 3; + * + * @param value The owner to set. + * @return This builder for chaining. + */ + public Builder setOwner(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + owner_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Lease owner.
+     * 
+ * + * string owner = 3; + * + * @return This builder for chaining. + */ + public Builder clearOwner() { + owner_ = getDefaultInstance().getOwner(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * Lease owner.
+     * 
+ * + * string owner = 3; + * + * @param value The bytes for owner to set. + * @return This builder for chaining. + */ + public Builder setOwnerBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + owner_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private com.google.protobuf.Duration term_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + termBuilder_; + /** + * + * + *
+     * Lease term.
+     * 
+ * + * .google.protobuf.Duration term = 4; + * + * @return Whether the term field is set. + */ + public boolean hasTerm() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + * + * + *
+     * Lease term.
+     * 
+ * + * .google.protobuf.Duration term = 4; + * + * @return The term. + */ + public com.google.protobuf.Duration getTerm() { + if (termBuilder_ == null) { + return term_ == null ? com.google.protobuf.Duration.getDefaultInstance() : term_; + } else { + return termBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Lease term.
+     * 
+ * + * .google.protobuf.Duration term = 4; + */ + public Builder setTerm(com.google.protobuf.Duration value) { + if (termBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + term_ = value; + } else { + termBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Lease term.
+     * 
+ * + * .google.protobuf.Duration term = 4; + */ + public Builder setTerm(com.google.protobuf.Duration.Builder builderForValue) { + if (termBuilder_ == null) { + term_ = builderForValue.build(); + } else { + termBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Lease term.
+     * 
+ * + * .google.protobuf.Duration term = 4; + */ + public Builder mergeTerm(com.google.protobuf.Duration value) { + if (termBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) + && term_ != null + && term_ != com.google.protobuf.Duration.getDefaultInstance()) { + getTermBuilder().mergeFrom(value); + } else { + term_ = value; + } + } else { + termBuilder_.mergeFrom(value); + } + if (term_ != null) { + bitField0_ |= 0x00000008; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Lease term.
+     * 
+ * + * .google.protobuf.Duration term = 4; + */ + public Builder clearTerm() { + bitField0_ = (bitField0_ & ~0x00000008); + term_ = null; + if (termBuilder_ != null) { + termBuilder_.dispose(); + termBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Lease term.
+     * 
+ * + * .google.protobuf.Duration term = 4; + */ + public com.google.protobuf.Duration.Builder getTermBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return getTermFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Lease term.
+     * 
+ * + * .google.protobuf.Duration term = 4; + */ + public com.google.protobuf.DurationOrBuilder getTermOrBuilder() { + if (termBuilder_ != null) { + return termBuilder_.getMessageOrBuilder(); + } else { + return term_ == null ? com.google.protobuf.Duration.getDefaultInstance() : term_; + } + } + /** + * + * + *
+     * Lease term.
+     * 
+ * + * .google.protobuf.Duration term = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + getTermFieldBuilder() { + if (termBuilder_ == null) { + termBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder>( + getTerm(), getParentForChildren(), isClean()); + term_ = null; + } + return termBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.RenewLeaseRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.RenewLeaseRequest) + private static final com.google.cloud.visionai.v1.RenewLeaseRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.RenewLeaseRequest(); + } + + public static com.google.cloud.visionai.v1.RenewLeaseRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RenewLeaseRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.RenewLeaseRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/RenewLeaseRequestOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/RenewLeaseRequestOrBuilder.java new file mode 100644 index 000000000000..290129227d5d --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/RenewLeaseRequestOrBuilder.java @@ -0,0 +1,136 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/streaming_service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface RenewLeaseRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.RenewLeaseRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Lease id.
+   * 
+ * + * string id = 1; + * + * @return The id. + */ + java.lang.String getId(); + /** + * + * + *
+   * Lease id.
+   * 
+ * + * string id = 1; + * + * @return The bytes for id. + */ + com.google.protobuf.ByteString getIdBytes(); + + /** + * + * + *
+   * Series name.
+   * 
+ * + * string series = 2; + * + * @return The series. + */ + java.lang.String getSeries(); + /** + * + * + *
+   * Series name.
+   * 
+ * + * string series = 2; + * + * @return The bytes for series. + */ + com.google.protobuf.ByteString getSeriesBytes(); + + /** + * + * + *
+   * Lease owner.
+   * 
+ * + * string owner = 3; + * + * @return The owner. + */ + java.lang.String getOwner(); + /** + * + * + *
+   * Lease owner.
+   * 
+ * + * string owner = 3; + * + * @return The bytes for owner. + */ + com.google.protobuf.ByteString getOwnerBytes(); + + /** + * + * + *
+   * Lease term.
+   * 
+ * + * .google.protobuf.Duration term = 4; + * + * @return Whether the term field is set. + */ + boolean hasTerm(); + /** + * + * + *
+   * Lease term.
+   * 
+ * + * .google.protobuf.Duration term = 4; + * + * @return The term. + */ + com.google.protobuf.Duration getTerm(); + /** + * + * + *
+   * Lease term.
+   * 
+ * + * .google.protobuf.Duration term = 4; + */ + com.google.protobuf.DurationOrBuilder getTermOrBuilder(); +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/RequestMetadata.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/RequestMetadata.java new file mode 100644 index 000000000000..4f07d23272ad --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/RequestMetadata.java @@ -0,0 +1,1659 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/streaming_service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * RequestMetadata is the metadata message for the request.
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.RequestMetadata} + */ +public final class RequestMetadata extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.RequestMetadata) + RequestMetadataOrBuilder { + private static final long serialVersionUID = 0L; + // Use RequestMetadata.newBuilder() to construct. + private RequestMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private RequestMetadata() { + stream_ = ""; + event_ = ""; + series_ = ""; + leaseId_ = ""; + owner_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new RequestMetadata(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.StreamingServiceProto + .internal_static_google_cloud_visionai_v1_RequestMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.StreamingServiceProto + .internal_static_google_cloud_visionai_v1_RequestMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.RequestMetadata.class, + com.google.cloud.visionai.v1.RequestMetadata.Builder.class); + } + + private int bitField0_; + public static final int STREAM_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object stream_ = ""; + /** + * + * + *
+   * Stream name.
+   * 
+ * + * string stream = 1; + * + * @return The stream. + */ + @java.lang.Override + public java.lang.String getStream() { + java.lang.Object ref = stream_; + 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(); + stream_ = s; + return s; + } + } + /** + * + * + *
+   * Stream name.
+   * 
+ * + * string stream = 1; + * + * @return The bytes for stream. + */ + @java.lang.Override + public com.google.protobuf.ByteString getStreamBytes() { + java.lang.Object ref = stream_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + stream_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int EVENT_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object event_ = ""; + /** + * + * + *
+   * Evevt name.
+   * 
+ * + * string event = 2; + * + * @return The event. + */ + @java.lang.Override + public java.lang.String getEvent() { + java.lang.Object ref = event_; + 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(); + event_ = s; + return s; + } + } + /** + * + * + *
+   * Evevt name.
+   * 
+ * + * string event = 2; + * + * @return The bytes for event. + */ + @java.lang.Override + public com.google.protobuf.ByteString getEventBytes() { + java.lang.Object ref = event_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + event_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SERIES_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object series_ = ""; + /** + * + * + *
+   * Series name.
+   * 
+ * + * string series = 3; + * + * @return The series. + */ + @java.lang.Override + public java.lang.String getSeries() { + java.lang.Object ref = series_; + 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(); + series_ = s; + return s; + } + } + /** + * + * + *
+   * Series name.
+   * 
+ * + * string series = 3; + * + * @return The bytes for series. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSeriesBytes() { + java.lang.Object ref = series_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + series_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LEASE_ID_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object leaseId_ = ""; + /** + * + * + *
+   * Lease id.
+   * 
+ * + * string lease_id = 4; + * + * @return The leaseId. + */ + @java.lang.Override + public java.lang.String getLeaseId() { + java.lang.Object ref = leaseId_; + 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(); + leaseId_ = s; + return s; + } + } + /** + * + * + *
+   * Lease id.
+   * 
+ * + * string lease_id = 4; + * + * @return The bytes for leaseId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getLeaseIdBytes() { + java.lang.Object ref = leaseId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + leaseId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int OWNER_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object owner_ = ""; + /** + * + * + *
+   * Owner name.
+   * 
+ * + * string owner = 5; + * + * @return The owner. + */ + @java.lang.Override + public java.lang.String getOwner() { + java.lang.Object ref = owner_; + 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(); + owner_ = s; + return s; + } + } + /** + * + * + *
+   * Owner name.
+   * 
+ * + * string owner = 5; + * + * @return The bytes for owner. + */ + @java.lang.Override + public com.google.protobuf.ByteString getOwnerBytes() { + java.lang.Object ref = owner_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + owner_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LEASE_TERM_FIELD_NUMBER = 6; + private com.google.protobuf.Duration leaseTerm_; + /** + * + * + *
+   * Lease term specifies how long the client wants the session to be maintained
+   * by the server after the client leaves. If the lease term is not set, the
+   * server will release the session immediately and the client cannot reconnect
+   * to the same session later.
+   * 
+ * + * .google.protobuf.Duration lease_term = 6; + * + * @return Whether the leaseTerm field is set. + */ + @java.lang.Override + public boolean hasLeaseTerm() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * Lease term specifies how long the client wants the session to be maintained
+   * by the server after the client leaves. If the lease term is not set, the
+   * server will release the session immediately and the client cannot reconnect
+   * to the same session later.
+   * 
+ * + * .google.protobuf.Duration lease_term = 6; + * + * @return The leaseTerm. + */ + @java.lang.Override + public com.google.protobuf.Duration getLeaseTerm() { + return leaseTerm_ == null ? com.google.protobuf.Duration.getDefaultInstance() : leaseTerm_; + } + /** + * + * + *
+   * Lease term specifies how long the client wants the session to be maintained
+   * by the server after the client leaves. If the lease term is not set, the
+   * server will release the session immediately and the client cannot reconnect
+   * to the same session later.
+   * 
+ * + * .google.protobuf.Duration lease_term = 6; + */ + @java.lang.Override + public com.google.protobuf.DurationOrBuilder getLeaseTermOrBuilder() { + return leaseTerm_ == null ? com.google.protobuf.Duration.getDefaultInstance() : leaseTerm_; + } + + 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(stream_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, stream_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(event_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, event_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(series_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, series_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(leaseId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, leaseId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(owner_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, owner_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(6, getLeaseTerm()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(stream_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, stream_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(event_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, event_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(series_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, series_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(leaseId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, leaseId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(owner_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, owner_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getLeaseTerm()); + } + size += getUnknownFields().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.visionai.v1.RequestMetadata)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.RequestMetadata other = + (com.google.cloud.visionai.v1.RequestMetadata) obj; + + if (!getStream().equals(other.getStream())) return false; + if (!getEvent().equals(other.getEvent())) return false; + if (!getSeries().equals(other.getSeries())) return false; + if (!getLeaseId().equals(other.getLeaseId())) return false; + if (!getOwner().equals(other.getOwner())) return false; + if (hasLeaseTerm() != other.hasLeaseTerm()) return false; + if (hasLeaseTerm()) { + if (!getLeaseTerm().equals(other.getLeaseTerm())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + STREAM_FIELD_NUMBER; + hash = (53 * hash) + getStream().hashCode(); + hash = (37 * hash) + EVENT_FIELD_NUMBER; + hash = (53 * hash) + getEvent().hashCode(); + hash = (37 * hash) + SERIES_FIELD_NUMBER; + hash = (53 * hash) + getSeries().hashCode(); + hash = (37 * hash) + LEASE_ID_FIELD_NUMBER; + hash = (53 * hash) + getLeaseId().hashCode(); + hash = (37 * hash) + OWNER_FIELD_NUMBER; + hash = (53 * hash) + getOwner().hashCode(); + if (hasLeaseTerm()) { + hash = (37 * hash) + LEASE_TERM_FIELD_NUMBER; + hash = (53 * hash) + getLeaseTerm().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.RequestMetadata parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.RequestMetadata 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.visionai.v1.RequestMetadata parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.RequestMetadata 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.visionai.v1.RequestMetadata parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.RequestMetadata parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.RequestMetadata parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.RequestMetadata 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.visionai.v1.RequestMetadata parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.RequestMetadata 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.visionai.v1.RequestMetadata parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.RequestMetadata 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.visionai.v1.RequestMetadata 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; + } + /** + * + * + *
+   * RequestMetadata is the metadata message for the request.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.RequestMetadata} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.RequestMetadata) + com.google.cloud.visionai.v1.RequestMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.StreamingServiceProto + .internal_static_google_cloud_visionai_v1_RequestMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.StreamingServiceProto + .internal_static_google_cloud_visionai_v1_RequestMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.RequestMetadata.class, + com.google.cloud.visionai.v1.RequestMetadata.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.RequestMetadata.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getLeaseTermFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + stream_ = ""; + event_ = ""; + series_ = ""; + leaseId_ = ""; + owner_ = ""; + leaseTerm_ = null; + if (leaseTermBuilder_ != null) { + leaseTermBuilder_.dispose(); + leaseTermBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.StreamingServiceProto + .internal_static_google_cloud_visionai_v1_RequestMetadata_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.RequestMetadata getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.RequestMetadata.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.RequestMetadata build() { + com.google.cloud.visionai.v1.RequestMetadata result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.RequestMetadata buildPartial() { + com.google.cloud.visionai.v1.RequestMetadata result = + new com.google.cloud.visionai.v1.RequestMetadata(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.visionai.v1.RequestMetadata result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.stream_ = stream_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.event_ = event_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.series_ = series_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.leaseId_ = leaseId_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.owner_ = owner_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000020) != 0)) { + result.leaseTerm_ = leaseTermBuilder_ == null ? leaseTerm_ : leaseTermBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.RequestMetadata) { + return mergeFrom((com.google.cloud.visionai.v1.RequestMetadata) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.RequestMetadata other) { + if (other == com.google.cloud.visionai.v1.RequestMetadata.getDefaultInstance()) return this; + if (!other.getStream().isEmpty()) { + stream_ = other.stream_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getEvent().isEmpty()) { + event_ = other.event_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getSeries().isEmpty()) { + series_ = other.series_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getLeaseId().isEmpty()) { + leaseId_ = other.leaseId_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (!other.getOwner().isEmpty()) { + owner_ = other.owner_; + bitField0_ |= 0x00000010; + onChanged(); + } + if (other.hasLeaseTerm()) { + mergeLeaseTerm(other.getLeaseTerm()); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + stream_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + event_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + series_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + leaseId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + owner_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 50: + { + input.readMessage(getLeaseTermFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000020; + break; + } // case 50 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object stream_ = ""; + /** + * + * + *
+     * Stream name.
+     * 
+ * + * string stream = 1; + * + * @return The stream. + */ + public java.lang.String getStream() { + java.lang.Object ref = stream_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + stream_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Stream name.
+     * 
+ * + * string stream = 1; + * + * @return The bytes for stream. + */ + public com.google.protobuf.ByteString getStreamBytes() { + java.lang.Object ref = stream_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + stream_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Stream name.
+     * 
+ * + * string stream = 1; + * + * @param value The stream to set. + * @return This builder for chaining. + */ + public Builder setStream(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + stream_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Stream name.
+     * 
+ * + * string stream = 1; + * + * @return This builder for chaining. + */ + public Builder clearStream() { + stream_ = getDefaultInstance().getStream(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Stream name.
+     * 
+ * + * string stream = 1; + * + * @param value The bytes for stream to set. + * @return This builder for chaining. + */ + public Builder setStreamBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + stream_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object event_ = ""; + /** + * + * + *
+     * Evevt name.
+     * 
+ * + * string event = 2; + * + * @return The event. + */ + public java.lang.String getEvent() { + java.lang.Object ref = event_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + event_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Evevt name.
+     * 
+ * + * string event = 2; + * + * @return The bytes for event. + */ + public com.google.protobuf.ByteString getEventBytes() { + java.lang.Object ref = event_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + event_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Evevt name.
+     * 
+ * + * string event = 2; + * + * @param value The event to set. + * @return This builder for chaining. + */ + public Builder setEvent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + event_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Evevt name.
+     * 
+ * + * string event = 2; + * + * @return This builder for chaining. + */ + public Builder clearEvent() { + event_ = getDefaultInstance().getEvent(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Evevt name.
+     * 
+ * + * string event = 2; + * + * @param value The bytes for event to set. + * @return This builder for chaining. + */ + public Builder setEventBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + event_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object series_ = ""; + /** + * + * + *
+     * Series name.
+     * 
+ * + * string series = 3; + * + * @return The series. + */ + public java.lang.String getSeries() { + java.lang.Object ref = series_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + series_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Series name.
+     * 
+ * + * string series = 3; + * + * @return The bytes for series. + */ + public com.google.protobuf.ByteString getSeriesBytes() { + java.lang.Object ref = series_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + series_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Series name.
+     * 
+ * + * string series = 3; + * + * @param value The series to set. + * @return This builder for chaining. + */ + public Builder setSeries(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + series_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Series name.
+     * 
+ * + * string series = 3; + * + * @return This builder for chaining. + */ + public Builder clearSeries() { + series_ = getDefaultInstance().getSeries(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * Series name.
+     * 
+ * + * string series = 3; + * + * @param value The bytes for series to set. + * @return This builder for chaining. + */ + public Builder setSeriesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + series_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object leaseId_ = ""; + /** + * + * + *
+     * Lease id.
+     * 
+ * + * string lease_id = 4; + * + * @return The leaseId. + */ + public java.lang.String getLeaseId() { + java.lang.Object ref = leaseId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + leaseId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Lease id.
+     * 
+ * + * string lease_id = 4; + * + * @return The bytes for leaseId. + */ + public com.google.protobuf.ByteString getLeaseIdBytes() { + java.lang.Object ref = leaseId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + leaseId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Lease id.
+     * 
+ * + * string lease_id = 4; + * + * @param value The leaseId to set. + * @return This builder for chaining. + */ + public Builder setLeaseId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + leaseId_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Lease id.
+     * 
+ * + * string lease_id = 4; + * + * @return This builder for chaining. + */ + public Builder clearLeaseId() { + leaseId_ = getDefaultInstance().getLeaseId(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+     * Lease id.
+     * 
+ * + * string lease_id = 4; + * + * @param value The bytes for leaseId to set. + * @return This builder for chaining. + */ + public Builder setLeaseIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + leaseId_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private java.lang.Object owner_ = ""; + /** + * + * + *
+     * Owner name.
+     * 
+ * + * string owner = 5; + * + * @return The owner. + */ + public java.lang.String getOwner() { + java.lang.Object ref = owner_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + owner_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Owner name.
+     * 
+ * + * string owner = 5; + * + * @return The bytes for owner. + */ + public com.google.protobuf.ByteString getOwnerBytes() { + java.lang.Object ref = owner_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + owner_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Owner name.
+     * 
+ * + * string owner = 5; + * + * @param value The owner to set. + * @return This builder for chaining. + */ + public Builder setOwner(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + owner_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Owner name.
+     * 
+ * + * string owner = 5; + * + * @return This builder for chaining. + */ + public Builder clearOwner() { + owner_ = getDefaultInstance().getOwner(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + /** + * + * + *
+     * Owner name.
+     * 
+ * + * string owner = 5; + * + * @param value The bytes for owner to set. + * @return This builder for chaining. + */ + public Builder setOwnerBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + owner_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + private com.google.protobuf.Duration leaseTerm_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + leaseTermBuilder_; + /** + * + * + *
+     * Lease term specifies how long the client wants the session to be maintained
+     * by the server after the client leaves. If the lease term is not set, the
+     * server will release the session immediately and the client cannot reconnect
+     * to the same session later.
+     * 
+ * + * .google.protobuf.Duration lease_term = 6; + * + * @return Whether the leaseTerm field is set. + */ + public boolean hasLeaseTerm() { + return ((bitField0_ & 0x00000020) != 0); + } + /** + * + * + *
+     * Lease term specifies how long the client wants the session to be maintained
+     * by the server after the client leaves. If the lease term is not set, the
+     * server will release the session immediately and the client cannot reconnect
+     * to the same session later.
+     * 
+ * + * .google.protobuf.Duration lease_term = 6; + * + * @return The leaseTerm. + */ + public com.google.protobuf.Duration getLeaseTerm() { + if (leaseTermBuilder_ == null) { + return leaseTerm_ == null ? com.google.protobuf.Duration.getDefaultInstance() : leaseTerm_; + } else { + return leaseTermBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Lease term specifies how long the client wants the session to be maintained
+     * by the server after the client leaves. If the lease term is not set, the
+     * server will release the session immediately and the client cannot reconnect
+     * to the same session later.
+     * 
+ * + * .google.protobuf.Duration lease_term = 6; + */ + public Builder setLeaseTerm(com.google.protobuf.Duration value) { + if (leaseTermBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + leaseTerm_ = value; + } else { + leaseTermBuilder_.setMessage(value); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * Lease term specifies how long the client wants the session to be maintained
+     * by the server after the client leaves. If the lease term is not set, the
+     * server will release the session immediately and the client cannot reconnect
+     * to the same session later.
+     * 
+ * + * .google.protobuf.Duration lease_term = 6; + */ + public Builder setLeaseTerm(com.google.protobuf.Duration.Builder builderForValue) { + if (leaseTermBuilder_ == null) { + leaseTerm_ = builderForValue.build(); + } else { + leaseTermBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * Lease term specifies how long the client wants the session to be maintained
+     * by the server after the client leaves. If the lease term is not set, the
+     * server will release the session immediately and the client cannot reconnect
+     * to the same session later.
+     * 
+ * + * .google.protobuf.Duration lease_term = 6; + */ + public Builder mergeLeaseTerm(com.google.protobuf.Duration value) { + if (leaseTermBuilder_ == null) { + if (((bitField0_ & 0x00000020) != 0) + && leaseTerm_ != null + && leaseTerm_ != com.google.protobuf.Duration.getDefaultInstance()) { + getLeaseTermBuilder().mergeFrom(value); + } else { + leaseTerm_ = value; + } + } else { + leaseTermBuilder_.mergeFrom(value); + } + if (leaseTerm_ != null) { + bitField0_ |= 0x00000020; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Lease term specifies how long the client wants the session to be maintained
+     * by the server after the client leaves. If the lease term is not set, the
+     * server will release the session immediately and the client cannot reconnect
+     * to the same session later.
+     * 
+ * + * .google.protobuf.Duration lease_term = 6; + */ + public Builder clearLeaseTerm() { + bitField0_ = (bitField0_ & ~0x00000020); + leaseTerm_ = null; + if (leaseTermBuilder_ != null) { + leaseTermBuilder_.dispose(); + leaseTermBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Lease term specifies how long the client wants the session to be maintained
+     * by the server after the client leaves. If the lease term is not set, the
+     * server will release the session immediately and the client cannot reconnect
+     * to the same session later.
+     * 
+ * + * .google.protobuf.Duration lease_term = 6; + */ + public com.google.protobuf.Duration.Builder getLeaseTermBuilder() { + bitField0_ |= 0x00000020; + onChanged(); + return getLeaseTermFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Lease term specifies how long the client wants the session to be maintained
+     * by the server after the client leaves. If the lease term is not set, the
+     * server will release the session immediately and the client cannot reconnect
+     * to the same session later.
+     * 
+ * + * .google.protobuf.Duration lease_term = 6; + */ + public com.google.protobuf.DurationOrBuilder getLeaseTermOrBuilder() { + if (leaseTermBuilder_ != null) { + return leaseTermBuilder_.getMessageOrBuilder(); + } else { + return leaseTerm_ == null ? com.google.protobuf.Duration.getDefaultInstance() : leaseTerm_; + } + } + /** + * + * + *
+     * Lease term specifies how long the client wants the session to be maintained
+     * by the server after the client leaves. If the lease term is not set, the
+     * server will release the session immediately and the client cannot reconnect
+     * to the same session later.
+     * 
+ * + * .google.protobuf.Duration lease_term = 6; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + getLeaseTermFieldBuilder() { + if (leaseTermBuilder_ == null) { + leaseTermBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder>( + getLeaseTerm(), getParentForChildren(), isClean()); + leaseTerm_ = null; + } + return leaseTermBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.RequestMetadata) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.RequestMetadata) + private static final com.google.cloud.visionai.v1.RequestMetadata DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.RequestMetadata(); + } + + public static com.google.cloud.visionai.v1.RequestMetadata getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RequestMetadata parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.RequestMetadata getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/RequestMetadataOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/RequestMetadataOrBuilder.java new file mode 100644 index 000000000000..20ae958dc6c6 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/RequestMetadataOrBuilder.java @@ -0,0 +1,195 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/streaming_service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface RequestMetadataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.RequestMetadata) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Stream name.
+   * 
+ * + * string stream = 1; + * + * @return The stream. + */ + java.lang.String getStream(); + /** + * + * + *
+   * Stream name.
+   * 
+ * + * string stream = 1; + * + * @return The bytes for stream. + */ + com.google.protobuf.ByteString getStreamBytes(); + + /** + * + * + *
+   * Evevt name.
+   * 
+ * + * string event = 2; + * + * @return The event. + */ + java.lang.String getEvent(); + /** + * + * + *
+   * Evevt name.
+   * 
+ * + * string event = 2; + * + * @return The bytes for event. + */ + com.google.protobuf.ByteString getEventBytes(); + + /** + * + * + *
+   * Series name.
+   * 
+ * + * string series = 3; + * + * @return The series. + */ + java.lang.String getSeries(); + /** + * + * + *
+   * Series name.
+   * 
+ * + * string series = 3; + * + * @return The bytes for series. + */ + com.google.protobuf.ByteString getSeriesBytes(); + + /** + * + * + *
+   * Lease id.
+   * 
+ * + * string lease_id = 4; + * + * @return The leaseId. + */ + java.lang.String getLeaseId(); + /** + * + * + *
+   * Lease id.
+   * 
+ * + * string lease_id = 4; + * + * @return The bytes for leaseId. + */ + com.google.protobuf.ByteString getLeaseIdBytes(); + + /** + * + * + *
+   * Owner name.
+   * 
+ * + * string owner = 5; + * + * @return The owner. + */ + java.lang.String getOwner(); + /** + * + * + *
+   * Owner name.
+   * 
+ * + * string owner = 5; + * + * @return The bytes for owner. + */ + com.google.protobuf.ByteString getOwnerBytes(); + + /** + * + * + *
+   * Lease term specifies how long the client wants the session to be maintained
+   * by the server after the client leaves. If the lease term is not set, the
+   * server will release the session immediately and the client cannot reconnect
+   * to the same session later.
+   * 
+ * + * .google.protobuf.Duration lease_term = 6; + * + * @return Whether the leaseTerm field is set. + */ + boolean hasLeaseTerm(); + /** + * + * + *
+   * Lease term specifies how long the client wants the session to be maintained
+   * by the server after the client leaves. If the lease term is not set, the
+   * server will release the session immediately and the client cannot reconnect
+   * to the same session later.
+   * 
+ * + * .google.protobuf.Duration lease_term = 6; + * + * @return The leaseTerm. + */ + com.google.protobuf.Duration getLeaseTerm(); + /** + * + * + *
+   * Lease term specifies how long the client wants the session to be maintained
+   * by the server after the client leaves. If the lease term is not set, the
+   * server will release the session immediately and the client cannot reconnect
+   * to the same session later.
+   * 
+ * + * .google.protobuf.Duration lease_term = 6; + */ + com.google.protobuf.DurationOrBuilder getLeaseTermOrBuilder(); +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ResolveOperatorInfoRequest.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ResolveOperatorInfoRequest.java new file mode 100644 index 000000000000..dfd39e618b42 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ResolveOperatorInfoRequest.java @@ -0,0 +1,1179 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/lva_service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * Request message for querying operator info.
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.ResolveOperatorInfoRequest} + */ +public final class ResolveOperatorInfoRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.ResolveOperatorInfoRequest) + ResolveOperatorInfoRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ResolveOperatorInfoRequest.newBuilder() to construct. + private ResolveOperatorInfoRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ResolveOperatorInfoRequest() { + parent_ = ""; + queries_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ResolveOperatorInfoRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.LvaServiceProto + .internal_static_google_cloud_visionai_v1_ResolveOperatorInfoRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.LvaServiceProto + .internal_static_google_cloud_visionai_v1_ResolveOperatorInfoRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.ResolveOperatorInfoRequest.class, + com.google.cloud.visionai.v1.ResolveOperatorInfoRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + /** + * + * + *
+   * Required. Parent value for ResolveOperatorInfoRequest.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + 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(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Parent value for ResolveOperatorInfoRequest.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int QUERIES_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private java.util.List queries_; + /** + * + * + *
+   * Required. The operator queries.
+   * 
+ * + * + * repeated .google.cloud.visionai.v1.OperatorQuery queries = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public java.util.List getQueriesList() { + return queries_; + } + /** + * + * + *
+   * Required. The operator queries.
+   * 
+ * + * + * repeated .google.cloud.visionai.v1.OperatorQuery queries = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public java.util.List + getQueriesOrBuilderList() { + return queries_; + } + /** + * + * + *
+   * Required. The operator queries.
+   * 
+ * + * + * repeated .google.cloud.visionai.v1.OperatorQuery queries = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public int getQueriesCount() { + return queries_.size(); + } + /** + * + * + *
+   * Required. The operator queries.
+   * 
+ * + * + * repeated .google.cloud.visionai.v1.OperatorQuery queries = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.visionai.v1.OperatorQuery getQueries(int index) { + return queries_.get(index); + } + /** + * + * + *
+   * Required. The operator queries.
+   * 
+ * + * + * repeated .google.cloud.visionai.v1.OperatorQuery queries = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.visionai.v1.OperatorQueryOrBuilder getQueriesOrBuilder(int index) { + return queries_.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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + for (int i = 0; i < queries_.size(); i++) { + output.writeMessage(2, queries_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + for (int i = 0; i < queries_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, queries_.get(i)); + } + size += getUnknownFields().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.visionai.v1.ResolveOperatorInfoRequest)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.ResolveOperatorInfoRequest other = + (com.google.cloud.visionai.v1.ResolveOperatorInfoRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (!getQueriesList().equals(other.getQueriesList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + if (getQueriesCount() > 0) { + hash = (37 * hash) + QUERIES_FIELD_NUMBER; + hash = (53 * hash) + getQueriesList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.ResolveOperatorInfoRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ResolveOperatorInfoRequest 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.visionai.v1.ResolveOperatorInfoRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ResolveOperatorInfoRequest 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.visionai.v1.ResolveOperatorInfoRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ResolveOperatorInfoRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.ResolveOperatorInfoRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ResolveOperatorInfoRequest 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.visionai.v1.ResolveOperatorInfoRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ResolveOperatorInfoRequest 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.visionai.v1.ResolveOperatorInfoRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ResolveOperatorInfoRequest 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.visionai.v1.ResolveOperatorInfoRequest 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; + } + /** + * + * + *
+   * Request message for querying operator info.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.ResolveOperatorInfoRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.ResolveOperatorInfoRequest) + com.google.cloud.visionai.v1.ResolveOperatorInfoRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.LvaServiceProto + .internal_static_google_cloud_visionai_v1_ResolveOperatorInfoRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.LvaServiceProto + .internal_static_google_cloud_visionai_v1_ResolveOperatorInfoRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.ResolveOperatorInfoRequest.class, + com.google.cloud.visionai.v1.ResolveOperatorInfoRequest.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.ResolveOperatorInfoRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + if (queriesBuilder_ == null) { + queries_ = java.util.Collections.emptyList(); + } else { + queries_ = null; + queriesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.LvaServiceProto + .internal_static_google_cloud_visionai_v1_ResolveOperatorInfoRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ResolveOperatorInfoRequest getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.ResolveOperatorInfoRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ResolveOperatorInfoRequest build() { + com.google.cloud.visionai.v1.ResolveOperatorInfoRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ResolveOperatorInfoRequest buildPartial() { + com.google.cloud.visionai.v1.ResolveOperatorInfoRequest result = + new com.google.cloud.visionai.v1.ResolveOperatorInfoRequest(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.visionai.v1.ResolveOperatorInfoRequest result) { + if (queriesBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + queries_ = java.util.Collections.unmodifiableList(queries_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.queries_ = queries_; + } else { + result.queries_ = queriesBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.visionai.v1.ResolveOperatorInfoRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.ResolveOperatorInfoRequest) { + return mergeFrom((com.google.cloud.visionai.v1.ResolveOperatorInfoRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.ResolveOperatorInfoRequest other) { + if (other == com.google.cloud.visionai.v1.ResolveOperatorInfoRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (queriesBuilder_ == null) { + if (!other.queries_.isEmpty()) { + if (queries_.isEmpty()) { + queries_ = other.queries_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureQueriesIsMutable(); + queries_.addAll(other.queries_); + } + onChanged(); + } + } else { + if (!other.queries_.isEmpty()) { + if (queriesBuilder_.isEmpty()) { + queriesBuilder_.dispose(); + queriesBuilder_ = null; + queries_ = other.queries_; + bitField0_ = (bitField0_ & ~0x00000002); + queriesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getQueriesFieldBuilder() + : null; + } else { + queriesBuilder_.addAllMessages(other.queries_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + com.google.cloud.visionai.v1.OperatorQuery m = + input.readMessage( + com.google.cloud.visionai.v1.OperatorQuery.parser(), extensionRegistry); + if (queriesBuilder_ == null) { + ensureQueriesIsMutable(); + queries_.add(m); + } else { + queriesBuilder_.addMessage(m); + } + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. Parent value for ResolveOperatorInfoRequest.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Parent value for ResolveOperatorInfoRequest.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Parent value for ResolveOperatorInfoRequest.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Parent value for ResolveOperatorInfoRequest.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Parent value for ResolveOperatorInfoRequest.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.util.List queries_ = + java.util.Collections.emptyList(); + + private void ensureQueriesIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + queries_ = new java.util.ArrayList(queries_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.visionai.v1.OperatorQuery, + com.google.cloud.visionai.v1.OperatorQuery.Builder, + com.google.cloud.visionai.v1.OperatorQueryOrBuilder> + queriesBuilder_; + + /** + * + * + *
+     * Required. The operator queries.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.OperatorQuery queries = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.List getQueriesList() { + if (queriesBuilder_ == null) { + return java.util.Collections.unmodifiableList(queries_); + } else { + return queriesBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Required. The operator queries.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.OperatorQuery queries = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public int getQueriesCount() { + if (queriesBuilder_ == null) { + return queries_.size(); + } else { + return queriesBuilder_.getCount(); + } + } + /** + * + * + *
+     * Required. The operator queries.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.OperatorQuery queries = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.visionai.v1.OperatorQuery getQueries(int index) { + if (queriesBuilder_ == null) { + return queries_.get(index); + } else { + return queriesBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Required. The operator queries.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.OperatorQuery queries = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setQueries(int index, com.google.cloud.visionai.v1.OperatorQuery value) { + if (queriesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureQueriesIsMutable(); + queries_.set(index, value); + onChanged(); + } else { + queriesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Required. The operator queries.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.OperatorQuery queries = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setQueries( + int index, com.google.cloud.visionai.v1.OperatorQuery.Builder builderForValue) { + if (queriesBuilder_ == null) { + ensureQueriesIsMutable(); + queries_.set(index, builderForValue.build()); + onChanged(); + } else { + queriesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Required. The operator queries.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.OperatorQuery queries = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addQueries(com.google.cloud.visionai.v1.OperatorQuery value) { + if (queriesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureQueriesIsMutable(); + queries_.add(value); + onChanged(); + } else { + queriesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Required. The operator queries.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.OperatorQuery queries = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addQueries(int index, com.google.cloud.visionai.v1.OperatorQuery value) { + if (queriesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureQueriesIsMutable(); + queries_.add(index, value); + onChanged(); + } else { + queriesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Required. The operator queries.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.OperatorQuery queries = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addQueries(com.google.cloud.visionai.v1.OperatorQuery.Builder builderForValue) { + if (queriesBuilder_ == null) { + ensureQueriesIsMutable(); + queries_.add(builderForValue.build()); + onChanged(); + } else { + queriesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Required. The operator queries.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.OperatorQuery queries = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addQueries( + int index, com.google.cloud.visionai.v1.OperatorQuery.Builder builderForValue) { + if (queriesBuilder_ == null) { + ensureQueriesIsMutable(); + queries_.add(index, builderForValue.build()); + onChanged(); + } else { + queriesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Required. The operator queries.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.OperatorQuery queries = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addAllQueries( + java.lang.Iterable values) { + if (queriesBuilder_ == null) { + ensureQueriesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, queries_); + onChanged(); + } else { + queriesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Required. The operator queries.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.OperatorQuery queries = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearQueries() { + if (queriesBuilder_ == null) { + queries_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + queriesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Required. The operator queries.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.OperatorQuery queries = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder removeQueries(int index) { + if (queriesBuilder_ == null) { + ensureQueriesIsMutable(); + queries_.remove(index); + onChanged(); + } else { + queriesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Required. The operator queries.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.OperatorQuery queries = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.visionai.v1.OperatorQuery.Builder getQueriesBuilder(int index) { + return getQueriesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Required. The operator queries.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.OperatorQuery queries = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.visionai.v1.OperatorQueryOrBuilder getQueriesOrBuilder(int index) { + if (queriesBuilder_ == null) { + return queries_.get(index); + } else { + return queriesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Required. The operator queries.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.OperatorQuery queries = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.List + getQueriesOrBuilderList() { + if (queriesBuilder_ != null) { + return queriesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(queries_); + } + } + /** + * + * + *
+     * Required. The operator queries.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.OperatorQuery queries = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.visionai.v1.OperatorQuery.Builder addQueriesBuilder() { + return getQueriesFieldBuilder() + .addBuilder(com.google.cloud.visionai.v1.OperatorQuery.getDefaultInstance()); + } + /** + * + * + *
+     * Required. The operator queries.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.OperatorQuery queries = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.visionai.v1.OperatorQuery.Builder addQueriesBuilder(int index) { + return getQueriesFieldBuilder() + .addBuilder(index, com.google.cloud.visionai.v1.OperatorQuery.getDefaultInstance()); + } + /** + * + * + *
+     * Required. The operator queries.
+     * 
+ * + * + * repeated .google.cloud.visionai.v1.OperatorQuery queries = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.List + getQueriesBuilderList() { + return getQueriesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.visionai.v1.OperatorQuery, + com.google.cloud.visionai.v1.OperatorQuery.Builder, + com.google.cloud.visionai.v1.OperatorQueryOrBuilder> + getQueriesFieldBuilder() { + if (queriesBuilder_ == null) { + queriesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.visionai.v1.OperatorQuery, + com.google.cloud.visionai.v1.OperatorQuery.Builder, + com.google.cloud.visionai.v1.OperatorQueryOrBuilder>( + queries_, ((bitField0_ & 0x00000002) != 0), getParentForChildren(), isClean()); + queries_ = null; + } + return queriesBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.ResolveOperatorInfoRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.ResolveOperatorInfoRequest) + private static final com.google.cloud.visionai.v1.ResolveOperatorInfoRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.ResolveOperatorInfoRequest(); + } + + public static com.google.cloud.visionai.v1.ResolveOperatorInfoRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ResolveOperatorInfoRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.ResolveOperatorInfoRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ResolveOperatorInfoRequestOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ResolveOperatorInfoRequestOrBuilder.java new file mode 100644 index 000000000000..f49ecdba81c0 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ResolveOperatorInfoRequestOrBuilder.java @@ -0,0 +1,117 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/lva_service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface ResolveOperatorInfoRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.ResolveOperatorInfoRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Parent value for ResolveOperatorInfoRequest.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. Parent value for ResolveOperatorInfoRequest.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Required. The operator queries.
+   * 
+ * + * + * repeated .google.cloud.visionai.v1.OperatorQuery queries = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + java.util.List getQueriesList(); + /** + * + * + *
+   * Required. The operator queries.
+   * 
+ * + * + * repeated .google.cloud.visionai.v1.OperatorQuery queries = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.visionai.v1.OperatorQuery getQueries(int index); + /** + * + * + *
+   * Required. The operator queries.
+   * 
+ * + * + * repeated .google.cloud.visionai.v1.OperatorQuery queries = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + int getQueriesCount(); + /** + * + * + *
+   * Required. The operator queries.
+   * 
+ * + * + * repeated .google.cloud.visionai.v1.OperatorQuery queries = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + java.util.List + getQueriesOrBuilderList(); + /** + * + * + *
+   * Required. The operator queries.
+   * 
+ * + * + * repeated .google.cloud.visionai.v1.OperatorQuery queries = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.visionai.v1.OperatorQueryOrBuilder getQueriesOrBuilder(int index); +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ResolveOperatorInfoResponse.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ResolveOperatorInfoResponse.java new file mode 100644 index 000000000000..9169b2f09c68 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ResolveOperatorInfoResponse.java @@ -0,0 +1,936 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/lva_service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * Response message of ResolveOperatorInfo API.
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.ResolveOperatorInfoResponse} + */ +public final class ResolveOperatorInfoResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.ResolveOperatorInfoResponse) + ResolveOperatorInfoResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ResolveOperatorInfoResponse.newBuilder() to construct. + private ResolveOperatorInfoResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ResolveOperatorInfoResponse() { + operators_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ResolveOperatorInfoResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.LvaServiceProto + .internal_static_google_cloud_visionai_v1_ResolveOperatorInfoResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.LvaServiceProto + .internal_static_google_cloud_visionai_v1_ResolveOperatorInfoResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.ResolveOperatorInfoResponse.class, + com.google.cloud.visionai.v1.ResolveOperatorInfoResponse.Builder.class); + } + + public static final int OPERATORS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List operators_; + /** + * + * + *
+   * Operators with detailed information.
+   * 
+ * + * repeated .google.cloud.visionai.v1.Operator operators = 1; + */ + @java.lang.Override + public java.util.List getOperatorsList() { + return operators_; + } + /** + * + * + *
+   * Operators with detailed information.
+   * 
+ * + * repeated .google.cloud.visionai.v1.Operator operators = 1; + */ + @java.lang.Override + public java.util.List + getOperatorsOrBuilderList() { + return operators_; + } + /** + * + * + *
+   * Operators with detailed information.
+   * 
+ * + * repeated .google.cloud.visionai.v1.Operator operators = 1; + */ + @java.lang.Override + public int getOperatorsCount() { + return operators_.size(); + } + /** + * + * + *
+   * Operators with detailed information.
+   * 
+ * + * repeated .google.cloud.visionai.v1.Operator operators = 1; + */ + @java.lang.Override + public com.google.cloud.visionai.v1.Operator getOperators(int index) { + return operators_.get(index); + } + /** + * + * + *
+   * Operators with detailed information.
+   * 
+ * + * repeated .google.cloud.visionai.v1.Operator operators = 1; + */ + @java.lang.Override + public com.google.cloud.visionai.v1.OperatorOrBuilder getOperatorsOrBuilder(int index) { + return operators_.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 < operators_.size(); i++) { + output.writeMessage(1, operators_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < operators_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, operators_.get(i)); + } + size += getUnknownFields().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.visionai.v1.ResolveOperatorInfoResponse)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.ResolveOperatorInfoResponse other = + (com.google.cloud.visionai.v1.ResolveOperatorInfoResponse) obj; + + if (!getOperatorsList().equals(other.getOperatorsList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getOperatorsCount() > 0) { + hash = (37 * hash) + OPERATORS_FIELD_NUMBER; + hash = (53 * hash) + getOperatorsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.ResolveOperatorInfoResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ResolveOperatorInfoResponse 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.visionai.v1.ResolveOperatorInfoResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ResolveOperatorInfoResponse 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.visionai.v1.ResolveOperatorInfoResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ResolveOperatorInfoResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.ResolveOperatorInfoResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ResolveOperatorInfoResponse 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.visionai.v1.ResolveOperatorInfoResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ResolveOperatorInfoResponse 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.visionai.v1.ResolveOperatorInfoResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ResolveOperatorInfoResponse 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.visionai.v1.ResolveOperatorInfoResponse 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; + } + /** + * + * + *
+   * Response message of ResolveOperatorInfo API.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.ResolveOperatorInfoResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.ResolveOperatorInfoResponse) + com.google.cloud.visionai.v1.ResolveOperatorInfoResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.LvaServiceProto + .internal_static_google_cloud_visionai_v1_ResolveOperatorInfoResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.LvaServiceProto + .internal_static_google_cloud_visionai_v1_ResolveOperatorInfoResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.ResolveOperatorInfoResponse.class, + com.google.cloud.visionai.v1.ResolveOperatorInfoResponse.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.ResolveOperatorInfoResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (operatorsBuilder_ == null) { + operators_ = java.util.Collections.emptyList(); + } else { + operators_ = null; + operatorsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.LvaServiceProto + .internal_static_google_cloud_visionai_v1_ResolveOperatorInfoResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ResolveOperatorInfoResponse getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.ResolveOperatorInfoResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ResolveOperatorInfoResponse build() { + com.google.cloud.visionai.v1.ResolveOperatorInfoResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ResolveOperatorInfoResponse buildPartial() { + com.google.cloud.visionai.v1.ResolveOperatorInfoResponse result = + new com.google.cloud.visionai.v1.ResolveOperatorInfoResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.visionai.v1.ResolveOperatorInfoResponse result) { + if (operatorsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + operators_ = java.util.Collections.unmodifiableList(operators_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.operators_ = operators_; + } else { + result.operators_ = operatorsBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.visionai.v1.ResolveOperatorInfoResponse result) { + int from_bitField0_ = bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.ResolveOperatorInfoResponse) { + return mergeFrom((com.google.cloud.visionai.v1.ResolveOperatorInfoResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.ResolveOperatorInfoResponse other) { + if (other == com.google.cloud.visionai.v1.ResolveOperatorInfoResponse.getDefaultInstance()) + return this; + if (operatorsBuilder_ == null) { + if (!other.operators_.isEmpty()) { + if (operators_.isEmpty()) { + operators_ = other.operators_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureOperatorsIsMutable(); + operators_.addAll(other.operators_); + } + onChanged(); + } + } else { + if (!other.operators_.isEmpty()) { + if (operatorsBuilder_.isEmpty()) { + operatorsBuilder_.dispose(); + operatorsBuilder_ = null; + operators_ = other.operators_; + bitField0_ = (bitField0_ & ~0x00000001); + operatorsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getOperatorsFieldBuilder() + : null; + } else { + operatorsBuilder_.addAllMessages(other.operators_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.visionai.v1.Operator m = + input.readMessage( + com.google.cloud.visionai.v1.Operator.parser(), extensionRegistry); + if (operatorsBuilder_ == null) { + ensureOperatorsIsMutable(); + operators_.add(m); + } else { + operatorsBuilder_.addMessage(m); + } + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List operators_ = + java.util.Collections.emptyList(); + + private void ensureOperatorsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + operators_ = new java.util.ArrayList(operators_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.visionai.v1.Operator, + com.google.cloud.visionai.v1.Operator.Builder, + com.google.cloud.visionai.v1.OperatorOrBuilder> + operatorsBuilder_; + + /** + * + * + *
+     * Operators with detailed information.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Operator operators = 1; + */ + public java.util.List getOperatorsList() { + if (operatorsBuilder_ == null) { + return java.util.Collections.unmodifiableList(operators_); + } else { + return operatorsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Operators with detailed information.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Operator operators = 1; + */ + public int getOperatorsCount() { + if (operatorsBuilder_ == null) { + return operators_.size(); + } else { + return operatorsBuilder_.getCount(); + } + } + /** + * + * + *
+     * Operators with detailed information.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Operator operators = 1; + */ + public com.google.cloud.visionai.v1.Operator getOperators(int index) { + if (operatorsBuilder_ == null) { + return operators_.get(index); + } else { + return operatorsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Operators with detailed information.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Operator operators = 1; + */ + public Builder setOperators(int index, com.google.cloud.visionai.v1.Operator value) { + if (operatorsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureOperatorsIsMutable(); + operators_.set(index, value); + onChanged(); + } else { + operatorsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Operators with detailed information.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Operator operators = 1; + */ + public Builder setOperators( + int index, com.google.cloud.visionai.v1.Operator.Builder builderForValue) { + if (operatorsBuilder_ == null) { + ensureOperatorsIsMutable(); + operators_.set(index, builderForValue.build()); + onChanged(); + } else { + operatorsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Operators with detailed information.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Operator operators = 1; + */ + public Builder addOperators(com.google.cloud.visionai.v1.Operator value) { + if (operatorsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureOperatorsIsMutable(); + operators_.add(value); + onChanged(); + } else { + operatorsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Operators with detailed information.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Operator operators = 1; + */ + public Builder addOperators(int index, com.google.cloud.visionai.v1.Operator value) { + if (operatorsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureOperatorsIsMutable(); + operators_.add(index, value); + onChanged(); + } else { + operatorsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Operators with detailed information.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Operator operators = 1; + */ + public Builder addOperators(com.google.cloud.visionai.v1.Operator.Builder builderForValue) { + if (operatorsBuilder_ == null) { + ensureOperatorsIsMutable(); + operators_.add(builderForValue.build()); + onChanged(); + } else { + operatorsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Operators with detailed information.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Operator operators = 1; + */ + public Builder addOperators( + int index, com.google.cloud.visionai.v1.Operator.Builder builderForValue) { + if (operatorsBuilder_ == null) { + ensureOperatorsIsMutable(); + operators_.add(index, builderForValue.build()); + onChanged(); + } else { + operatorsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Operators with detailed information.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Operator operators = 1; + */ + public Builder addAllOperators( + java.lang.Iterable values) { + if (operatorsBuilder_ == null) { + ensureOperatorsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, operators_); + onChanged(); + } else { + operatorsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Operators with detailed information.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Operator operators = 1; + */ + public Builder clearOperators() { + if (operatorsBuilder_ == null) { + operators_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + operatorsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Operators with detailed information.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Operator operators = 1; + */ + public Builder removeOperators(int index) { + if (operatorsBuilder_ == null) { + ensureOperatorsIsMutable(); + operators_.remove(index); + onChanged(); + } else { + operatorsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Operators with detailed information.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Operator operators = 1; + */ + public com.google.cloud.visionai.v1.Operator.Builder getOperatorsBuilder(int index) { + return getOperatorsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Operators with detailed information.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Operator operators = 1; + */ + public com.google.cloud.visionai.v1.OperatorOrBuilder getOperatorsOrBuilder(int index) { + if (operatorsBuilder_ == null) { + return operators_.get(index); + } else { + return operatorsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Operators with detailed information.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Operator operators = 1; + */ + public java.util.List + getOperatorsOrBuilderList() { + if (operatorsBuilder_ != null) { + return operatorsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(operators_); + } + } + /** + * + * + *
+     * Operators with detailed information.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Operator operators = 1; + */ + public com.google.cloud.visionai.v1.Operator.Builder addOperatorsBuilder() { + return getOperatorsFieldBuilder() + .addBuilder(com.google.cloud.visionai.v1.Operator.getDefaultInstance()); + } + /** + * + * + *
+     * Operators with detailed information.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Operator operators = 1; + */ + public com.google.cloud.visionai.v1.Operator.Builder addOperatorsBuilder(int index) { + return getOperatorsFieldBuilder() + .addBuilder(index, com.google.cloud.visionai.v1.Operator.getDefaultInstance()); + } + /** + * + * + *
+     * Operators with detailed information.
+     * 
+ * + * repeated .google.cloud.visionai.v1.Operator operators = 1; + */ + public java.util.List getOperatorsBuilderList() { + return getOperatorsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.visionai.v1.Operator, + com.google.cloud.visionai.v1.Operator.Builder, + com.google.cloud.visionai.v1.OperatorOrBuilder> + getOperatorsFieldBuilder() { + if (operatorsBuilder_ == null) { + operatorsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.visionai.v1.Operator, + com.google.cloud.visionai.v1.Operator.Builder, + com.google.cloud.visionai.v1.OperatorOrBuilder>( + operators_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + operators_ = null; + } + return operatorsBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.ResolveOperatorInfoResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.ResolveOperatorInfoResponse) + private static final com.google.cloud.visionai.v1.ResolveOperatorInfoResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.ResolveOperatorInfoResponse(); + } + + public static com.google.cloud.visionai.v1.ResolveOperatorInfoResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ResolveOperatorInfoResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.ResolveOperatorInfoResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ResolveOperatorInfoResponseOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ResolveOperatorInfoResponseOrBuilder.java new file mode 100644 index 000000000000..58febaf58654 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ResolveOperatorInfoResponseOrBuilder.java @@ -0,0 +1,78 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/lva_service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface ResolveOperatorInfoResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.ResolveOperatorInfoResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Operators with detailed information.
+   * 
+ * + * repeated .google.cloud.visionai.v1.Operator operators = 1; + */ + java.util.List getOperatorsList(); + /** + * + * + *
+   * Operators with detailed information.
+   * 
+ * + * repeated .google.cloud.visionai.v1.Operator operators = 1; + */ + com.google.cloud.visionai.v1.Operator getOperators(int index); + /** + * + * + *
+   * Operators with detailed information.
+   * 
+ * + * repeated .google.cloud.visionai.v1.Operator operators = 1; + */ + int getOperatorsCount(); + /** + * + * + *
+   * Operators with detailed information.
+   * 
+ * + * repeated .google.cloud.visionai.v1.Operator operators = 1; + */ + java.util.List + getOperatorsOrBuilderList(); + /** + * + * + *
+   * Operators with detailed information.
+   * 
+ * + * repeated .google.cloud.visionai.v1.Operator operators = 1; + */ + com.google.cloud.visionai.v1.OperatorOrBuilder getOperatorsOrBuilder(int index); +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ResourceAnnotations.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ResourceAnnotations.java new file mode 100644 index 000000000000..387e36e36e00 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ResourceAnnotations.java @@ -0,0 +1,1640 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/platform.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * Message describing general annotation for resources.
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.ResourceAnnotations} + */ +public final class ResourceAnnotations extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.ResourceAnnotations) + ResourceAnnotationsOrBuilder { + private static final long serialVersionUID = 0L; + // Use ResourceAnnotations.newBuilder() to construct. + private ResourceAnnotations(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ResourceAnnotations() { + applicationAnnotations_ = java.util.Collections.emptyList(); + nodeAnnotations_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ResourceAnnotations(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_ResourceAnnotations_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_ResourceAnnotations_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.ResourceAnnotations.class, + com.google.cloud.visionai.v1.ResourceAnnotations.Builder.class); + } + + public static final int APPLICATION_ANNOTATIONS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List applicationAnnotations_; + /** + * + * + *
+   * Annotations that will be applied to the whole application.
+   * 
+ * + * repeated .google.cloud.visionai.v1.StreamAnnotation application_annotations = 1; + */ + @java.lang.Override + public java.util.List + getApplicationAnnotationsList() { + return applicationAnnotations_; + } + /** + * + * + *
+   * Annotations that will be applied to the whole application.
+   * 
+ * + * repeated .google.cloud.visionai.v1.StreamAnnotation application_annotations = 1; + */ + @java.lang.Override + public java.util.List + getApplicationAnnotationsOrBuilderList() { + return applicationAnnotations_; + } + /** + * + * + *
+   * Annotations that will be applied to the whole application.
+   * 
+ * + * repeated .google.cloud.visionai.v1.StreamAnnotation application_annotations = 1; + */ + @java.lang.Override + public int getApplicationAnnotationsCount() { + return applicationAnnotations_.size(); + } + /** + * + * + *
+   * Annotations that will be applied to the whole application.
+   * 
+ * + * repeated .google.cloud.visionai.v1.StreamAnnotation application_annotations = 1; + */ + @java.lang.Override + public com.google.cloud.visionai.v1.StreamAnnotation getApplicationAnnotations(int index) { + return applicationAnnotations_.get(index); + } + /** + * + * + *
+   * Annotations that will be applied to the whole application.
+   * 
+ * + * repeated .google.cloud.visionai.v1.StreamAnnotation application_annotations = 1; + */ + @java.lang.Override + public com.google.cloud.visionai.v1.StreamAnnotationOrBuilder getApplicationAnnotationsOrBuilder( + int index) { + return applicationAnnotations_.get(index); + } + + public static final int NODE_ANNOTATIONS_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private java.util.List nodeAnnotations_; + /** + * + * + *
+   * Annotations that will be applied to the specific node of the application.
+   * If the same type of the annotations is applied to both application and
+   * node, the node annotation will be added in addition to the global
+   * application one.
+   * For example, if there is one active zone annotation for the whole
+   * application and one active zone annotation for the Occupancy Analytic
+   * processor, then the Occupancy Analytic processor will have two active zones
+   * defined.
+   * 
+ * + * repeated .google.cloud.visionai.v1.ApplicationNodeAnnotation node_annotations = 2; + */ + @java.lang.Override + public java.util.List + getNodeAnnotationsList() { + return nodeAnnotations_; + } + /** + * + * + *
+   * Annotations that will be applied to the specific node of the application.
+   * If the same type of the annotations is applied to both application and
+   * node, the node annotation will be added in addition to the global
+   * application one.
+   * For example, if there is one active zone annotation for the whole
+   * application and one active zone annotation for the Occupancy Analytic
+   * processor, then the Occupancy Analytic processor will have two active zones
+   * defined.
+   * 
+ * + * repeated .google.cloud.visionai.v1.ApplicationNodeAnnotation node_annotations = 2; + */ + @java.lang.Override + public java.util.List + getNodeAnnotationsOrBuilderList() { + return nodeAnnotations_; + } + /** + * + * + *
+   * Annotations that will be applied to the specific node of the application.
+   * If the same type of the annotations is applied to both application and
+   * node, the node annotation will be added in addition to the global
+   * application one.
+   * For example, if there is one active zone annotation for the whole
+   * application and one active zone annotation for the Occupancy Analytic
+   * processor, then the Occupancy Analytic processor will have two active zones
+   * defined.
+   * 
+ * + * repeated .google.cloud.visionai.v1.ApplicationNodeAnnotation node_annotations = 2; + */ + @java.lang.Override + public int getNodeAnnotationsCount() { + return nodeAnnotations_.size(); + } + /** + * + * + *
+   * Annotations that will be applied to the specific node of the application.
+   * If the same type of the annotations is applied to both application and
+   * node, the node annotation will be added in addition to the global
+   * application one.
+   * For example, if there is one active zone annotation for the whole
+   * application and one active zone annotation for the Occupancy Analytic
+   * processor, then the Occupancy Analytic processor will have two active zones
+   * defined.
+   * 
+ * + * repeated .google.cloud.visionai.v1.ApplicationNodeAnnotation node_annotations = 2; + */ + @java.lang.Override + public com.google.cloud.visionai.v1.ApplicationNodeAnnotation getNodeAnnotations(int index) { + return nodeAnnotations_.get(index); + } + /** + * + * + *
+   * Annotations that will be applied to the specific node of the application.
+   * If the same type of the annotations is applied to both application and
+   * node, the node annotation will be added in addition to the global
+   * application one.
+   * For example, if there is one active zone annotation for the whole
+   * application and one active zone annotation for the Occupancy Analytic
+   * processor, then the Occupancy Analytic processor will have two active zones
+   * defined.
+   * 
+ * + * repeated .google.cloud.visionai.v1.ApplicationNodeAnnotation node_annotations = 2; + */ + @java.lang.Override + public com.google.cloud.visionai.v1.ApplicationNodeAnnotationOrBuilder + getNodeAnnotationsOrBuilder(int index) { + return nodeAnnotations_.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 < applicationAnnotations_.size(); i++) { + output.writeMessage(1, applicationAnnotations_.get(i)); + } + for (int i = 0; i < nodeAnnotations_.size(); i++) { + output.writeMessage(2, nodeAnnotations_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < applicationAnnotations_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 1, applicationAnnotations_.get(i)); + } + for (int i = 0; i < nodeAnnotations_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, nodeAnnotations_.get(i)); + } + size += getUnknownFields().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.visionai.v1.ResourceAnnotations)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.ResourceAnnotations other = + (com.google.cloud.visionai.v1.ResourceAnnotations) obj; + + if (!getApplicationAnnotationsList().equals(other.getApplicationAnnotationsList())) + return false; + if (!getNodeAnnotationsList().equals(other.getNodeAnnotationsList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getApplicationAnnotationsCount() > 0) { + hash = (37 * hash) + APPLICATION_ANNOTATIONS_FIELD_NUMBER; + hash = (53 * hash) + getApplicationAnnotationsList().hashCode(); + } + if (getNodeAnnotationsCount() > 0) { + hash = (37 * hash) + NODE_ANNOTATIONS_FIELD_NUMBER; + hash = (53 * hash) + getNodeAnnotationsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.ResourceAnnotations parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ResourceAnnotations 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.visionai.v1.ResourceAnnotations parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ResourceAnnotations 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.visionai.v1.ResourceAnnotations parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ResourceAnnotations parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.ResourceAnnotations parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ResourceAnnotations 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.visionai.v1.ResourceAnnotations parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ResourceAnnotations 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.visionai.v1.ResourceAnnotations parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ResourceAnnotations 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.visionai.v1.ResourceAnnotations 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; + } + /** + * + * + *
+   * Message describing general annotation for resources.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.ResourceAnnotations} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.ResourceAnnotations) + com.google.cloud.visionai.v1.ResourceAnnotationsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_ResourceAnnotations_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_ResourceAnnotations_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.ResourceAnnotations.class, + com.google.cloud.visionai.v1.ResourceAnnotations.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.ResourceAnnotations.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (applicationAnnotationsBuilder_ == null) { + applicationAnnotations_ = java.util.Collections.emptyList(); + } else { + applicationAnnotations_ = null; + applicationAnnotationsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + if (nodeAnnotationsBuilder_ == null) { + nodeAnnotations_ = java.util.Collections.emptyList(); + } else { + nodeAnnotations_ = null; + nodeAnnotationsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.PlatformProto + .internal_static_google_cloud_visionai_v1_ResourceAnnotations_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ResourceAnnotations getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.ResourceAnnotations.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ResourceAnnotations build() { + com.google.cloud.visionai.v1.ResourceAnnotations result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ResourceAnnotations buildPartial() { + com.google.cloud.visionai.v1.ResourceAnnotations result = + new com.google.cloud.visionai.v1.ResourceAnnotations(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.visionai.v1.ResourceAnnotations result) { + if (applicationAnnotationsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + applicationAnnotations_ = java.util.Collections.unmodifiableList(applicationAnnotations_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.applicationAnnotations_ = applicationAnnotations_; + } else { + result.applicationAnnotations_ = applicationAnnotationsBuilder_.build(); + } + if (nodeAnnotationsBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + nodeAnnotations_ = java.util.Collections.unmodifiableList(nodeAnnotations_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.nodeAnnotations_ = nodeAnnotations_; + } else { + result.nodeAnnotations_ = nodeAnnotationsBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.visionai.v1.ResourceAnnotations result) { + int from_bitField0_ = bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.ResourceAnnotations) { + return mergeFrom((com.google.cloud.visionai.v1.ResourceAnnotations) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.ResourceAnnotations other) { + if (other == com.google.cloud.visionai.v1.ResourceAnnotations.getDefaultInstance()) + return this; + if (applicationAnnotationsBuilder_ == null) { + if (!other.applicationAnnotations_.isEmpty()) { + if (applicationAnnotations_.isEmpty()) { + applicationAnnotations_ = other.applicationAnnotations_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureApplicationAnnotationsIsMutable(); + applicationAnnotations_.addAll(other.applicationAnnotations_); + } + onChanged(); + } + } else { + if (!other.applicationAnnotations_.isEmpty()) { + if (applicationAnnotationsBuilder_.isEmpty()) { + applicationAnnotationsBuilder_.dispose(); + applicationAnnotationsBuilder_ = null; + applicationAnnotations_ = other.applicationAnnotations_; + bitField0_ = (bitField0_ & ~0x00000001); + applicationAnnotationsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getApplicationAnnotationsFieldBuilder() + : null; + } else { + applicationAnnotationsBuilder_.addAllMessages(other.applicationAnnotations_); + } + } + } + if (nodeAnnotationsBuilder_ == null) { + if (!other.nodeAnnotations_.isEmpty()) { + if (nodeAnnotations_.isEmpty()) { + nodeAnnotations_ = other.nodeAnnotations_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureNodeAnnotationsIsMutable(); + nodeAnnotations_.addAll(other.nodeAnnotations_); + } + onChanged(); + } + } else { + if (!other.nodeAnnotations_.isEmpty()) { + if (nodeAnnotationsBuilder_.isEmpty()) { + nodeAnnotationsBuilder_.dispose(); + nodeAnnotationsBuilder_ = null; + nodeAnnotations_ = other.nodeAnnotations_; + bitField0_ = (bitField0_ & ~0x00000002); + nodeAnnotationsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getNodeAnnotationsFieldBuilder() + : null; + } else { + nodeAnnotationsBuilder_.addAllMessages(other.nodeAnnotations_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.visionai.v1.StreamAnnotation m = + input.readMessage( + com.google.cloud.visionai.v1.StreamAnnotation.parser(), extensionRegistry); + if (applicationAnnotationsBuilder_ == null) { + ensureApplicationAnnotationsIsMutable(); + applicationAnnotations_.add(m); + } else { + applicationAnnotationsBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + com.google.cloud.visionai.v1.ApplicationNodeAnnotation m = + input.readMessage( + com.google.cloud.visionai.v1.ApplicationNodeAnnotation.parser(), + extensionRegistry); + if (nodeAnnotationsBuilder_ == null) { + ensureNodeAnnotationsIsMutable(); + nodeAnnotations_.add(m); + } else { + nodeAnnotationsBuilder_.addMessage(m); + } + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List applicationAnnotations_ = + java.util.Collections.emptyList(); + + private void ensureApplicationAnnotationsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + applicationAnnotations_ = + new java.util.ArrayList( + applicationAnnotations_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.visionai.v1.StreamAnnotation, + com.google.cloud.visionai.v1.StreamAnnotation.Builder, + com.google.cloud.visionai.v1.StreamAnnotationOrBuilder> + applicationAnnotationsBuilder_; + + /** + * + * + *
+     * Annotations that will be applied to the whole application.
+     * 
+ * + * repeated .google.cloud.visionai.v1.StreamAnnotation application_annotations = 1; + */ + public java.util.List + getApplicationAnnotationsList() { + if (applicationAnnotationsBuilder_ == null) { + return java.util.Collections.unmodifiableList(applicationAnnotations_); + } else { + return applicationAnnotationsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Annotations that will be applied to the whole application.
+     * 
+ * + * repeated .google.cloud.visionai.v1.StreamAnnotation application_annotations = 1; + */ + public int getApplicationAnnotationsCount() { + if (applicationAnnotationsBuilder_ == null) { + return applicationAnnotations_.size(); + } else { + return applicationAnnotationsBuilder_.getCount(); + } + } + /** + * + * + *
+     * Annotations that will be applied to the whole application.
+     * 
+ * + * repeated .google.cloud.visionai.v1.StreamAnnotation application_annotations = 1; + */ + public com.google.cloud.visionai.v1.StreamAnnotation getApplicationAnnotations(int index) { + if (applicationAnnotationsBuilder_ == null) { + return applicationAnnotations_.get(index); + } else { + return applicationAnnotationsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Annotations that will be applied to the whole application.
+     * 
+ * + * repeated .google.cloud.visionai.v1.StreamAnnotation application_annotations = 1; + */ + public Builder setApplicationAnnotations( + int index, com.google.cloud.visionai.v1.StreamAnnotation value) { + if (applicationAnnotationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureApplicationAnnotationsIsMutable(); + applicationAnnotations_.set(index, value); + onChanged(); + } else { + applicationAnnotationsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Annotations that will be applied to the whole application.
+     * 
+ * + * repeated .google.cloud.visionai.v1.StreamAnnotation application_annotations = 1; + */ + public Builder setApplicationAnnotations( + int index, com.google.cloud.visionai.v1.StreamAnnotation.Builder builderForValue) { + if (applicationAnnotationsBuilder_ == null) { + ensureApplicationAnnotationsIsMutable(); + applicationAnnotations_.set(index, builderForValue.build()); + onChanged(); + } else { + applicationAnnotationsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Annotations that will be applied to the whole application.
+     * 
+ * + * repeated .google.cloud.visionai.v1.StreamAnnotation application_annotations = 1; + */ + public Builder addApplicationAnnotations(com.google.cloud.visionai.v1.StreamAnnotation value) { + if (applicationAnnotationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureApplicationAnnotationsIsMutable(); + applicationAnnotations_.add(value); + onChanged(); + } else { + applicationAnnotationsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Annotations that will be applied to the whole application.
+     * 
+ * + * repeated .google.cloud.visionai.v1.StreamAnnotation application_annotations = 1; + */ + public Builder addApplicationAnnotations( + int index, com.google.cloud.visionai.v1.StreamAnnotation value) { + if (applicationAnnotationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureApplicationAnnotationsIsMutable(); + applicationAnnotations_.add(index, value); + onChanged(); + } else { + applicationAnnotationsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Annotations that will be applied to the whole application.
+     * 
+ * + * repeated .google.cloud.visionai.v1.StreamAnnotation application_annotations = 1; + */ + public Builder addApplicationAnnotations( + com.google.cloud.visionai.v1.StreamAnnotation.Builder builderForValue) { + if (applicationAnnotationsBuilder_ == null) { + ensureApplicationAnnotationsIsMutable(); + applicationAnnotations_.add(builderForValue.build()); + onChanged(); + } else { + applicationAnnotationsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Annotations that will be applied to the whole application.
+     * 
+ * + * repeated .google.cloud.visionai.v1.StreamAnnotation application_annotations = 1; + */ + public Builder addApplicationAnnotations( + int index, com.google.cloud.visionai.v1.StreamAnnotation.Builder builderForValue) { + if (applicationAnnotationsBuilder_ == null) { + ensureApplicationAnnotationsIsMutable(); + applicationAnnotations_.add(index, builderForValue.build()); + onChanged(); + } else { + applicationAnnotationsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Annotations that will be applied to the whole application.
+     * 
+ * + * repeated .google.cloud.visionai.v1.StreamAnnotation application_annotations = 1; + */ + public Builder addAllApplicationAnnotations( + java.lang.Iterable values) { + if (applicationAnnotationsBuilder_ == null) { + ensureApplicationAnnotationsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, applicationAnnotations_); + onChanged(); + } else { + applicationAnnotationsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Annotations that will be applied to the whole application.
+     * 
+ * + * repeated .google.cloud.visionai.v1.StreamAnnotation application_annotations = 1; + */ + public Builder clearApplicationAnnotations() { + if (applicationAnnotationsBuilder_ == null) { + applicationAnnotations_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + applicationAnnotationsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Annotations that will be applied to the whole application.
+     * 
+ * + * repeated .google.cloud.visionai.v1.StreamAnnotation application_annotations = 1; + */ + public Builder removeApplicationAnnotations(int index) { + if (applicationAnnotationsBuilder_ == null) { + ensureApplicationAnnotationsIsMutable(); + applicationAnnotations_.remove(index); + onChanged(); + } else { + applicationAnnotationsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Annotations that will be applied to the whole application.
+     * 
+ * + * repeated .google.cloud.visionai.v1.StreamAnnotation application_annotations = 1; + */ + public com.google.cloud.visionai.v1.StreamAnnotation.Builder getApplicationAnnotationsBuilder( + int index) { + return getApplicationAnnotationsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Annotations that will be applied to the whole application.
+     * 
+ * + * repeated .google.cloud.visionai.v1.StreamAnnotation application_annotations = 1; + */ + public com.google.cloud.visionai.v1.StreamAnnotationOrBuilder + getApplicationAnnotationsOrBuilder(int index) { + if (applicationAnnotationsBuilder_ == null) { + return applicationAnnotations_.get(index); + } else { + return applicationAnnotationsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Annotations that will be applied to the whole application.
+     * 
+ * + * repeated .google.cloud.visionai.v1.StreamAnnotation application_annotations = 1; + */ + public java.util.List + getApplicationAnnotationsOrBuilderList() { + if (applicationAnnotationsBuilder_ != null) { + return applicationAnnotationsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(applicationAnnotations_); + } + } + /** + * + * + *
+     * Annotations that will be applied to the whole application.
+     * 
+ * + * repeated .google.cloud.visionai.v1.StreamAnnotation application_annotations = 1; + */ + public com.google.cloud.visionai.v1.StreamAnnotation.Builder + addApplicationAnnotationsBuilder() { + return getApplicationAnnotationsFieldBuilder() + .addBuilder(com.google.cloud.visionai.v1.StreamAnnotation.getDefaultInstance()); + } + /** + * + * + *
+     * Annotations that will be applied to the whole application.
+     * 
+ * + * repeated .google.cloud.visionai.v1.StreamAnnotation application_annotations = 1; + */ + public com.google.cloud.visionai.v1.StreamAnnotation.Builder addApplicationAnnotationsBuilder( + int index) { + return getApplicationAnnotationsFieldBuilder() + .addBuilder(index, com.google.cloud.visionai.v1.StreamAnnotation.getDefaultInstance()); + } + /** + * + * + *
+     * Annotations that will be applied to the whole application.
+     * 
+ * + * repeated .google.cloud.visionai.v1.StreamAnnotation application_annotations = 1; + */ + public java.util.List + getApplicationAnnotationsBuilderList() { + return getApplicationAnnotationsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.visionai.v1.StreamAnnotation, + com.google.cloud.visionai.v1.StreamAnnotation.Builder, + com.google.cloud.visionai.v1.StreamAnnotationOrBuilder> + getApplicationAnnotationsFieldBuilder() { + if (applicationAnnotationsBuilder_ == null) { + applicationAnnotationsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.visionai.v1.StreamAnnotation, + com.google.cloud.visionai.v1.StreamAnnotation.Builder, + com.google.cloud.visionai.v1.StreamAnnotationOrBuilder>( + applicationAnnotations_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + applicationAnnotations_ = null; + } + return applicationAnnotationsBuilder_; + } + + private java.util.List + nodeAnnotations_ = java.util.Collections.emptyList(); + + private void ensureNodeAnnotationsIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + nodeAnnotations_ = + new java.util.ArrayList( + nodeAnnotations_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.visionai.v1.ApplicationNodeAnnotation, + com.google.cloud.visionai.v1.ApplicationNodeAnnotation.Builder, + com.google.cloud.visionai.v1.ApplicationNodeAnnotationOrBuilder> + nodeAnnotationsBuilder_; + + /** + * + * + *
+     * Annotations that will be applied to the specific node of the application.
+     * If the same type of the annotations is applied to both application and
+     * node, the node annotation will be added in addition to the global
+     * application one.
+     * For example, if there is one active zone annotation for the whole
+     * application and one active zone annotation for the Occupancy Analytic
+     * processor, then the Occupancy Analytic processor will have two active zones
+     * defined.
+     * 
+ * + * repeated .google.cloud.visionai.v1.ApplicationNodeAnnotation node_annotations = 2; + * + */ + public java.util.List + getNodeAnnotationsList() { + if (nodeAnnotationsBuilder_ == null) { + return java.util.Collections.unmodifiableList(nodeAnnotations_); + } else { + return nodeAnnotationsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Annotations that will be applied to the specific node of the application.
+     * If the same type of the annotations is applied to both application and
+     * node, the node annotation will be added in addition to the global
+     * application one.
+     * For example, if there is one active zone annotation for the whole
+     * application and one active zone annotation for the Occupancy Analytic
+     * processor, then the Occupancy Analytic processor will have two active zones
+     * defined.
+     * 
+ * + * repeated .google.cloud.visionai.v1.ApplicationNodeAnnotation node_annotations = 2; + * + */ + public int getNodeAnnotationsCount() { + if (nodeAnnotationsBuilder_ == null) { + return nodeAnnotations_.size(); + } else { + return nodeAnnotationsBuilder_.getCount(); + } + } + /** + * + * + *
+     * Annotations that will be applied to the specific node of the application.
+     * If the same type of the annotations is applied to both application and
+     * node, the node annotation will be added in addition to the global
+     * application one.
+     * For example, if there is one active zone annotation for the whole
+     * application and one active zone annotation for the Occupancy Analytic
+     * processor, then the Occupancy Analytic processor will have two active zones
+     * defined.
+     * 
+ * + * repeated .google.cloud.visionai.v1.ApplicationNodeAnnotation node_annotations = 2; + * + */ + public com.google.cloud.visionai.v1.ApplicationNodeAnnotation getNodeAnnotations(int index) { + if (nodeAnnotationsBuilder_ == null) { + return nodeAnnotations_.get(index); + } else { + return nodeAnnotationsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Annotations that will be applied to the specific node of the application.
+     * If the same type of the annotations is applied to both application and
+     * node, the node annotation will be added in addition to the global
+     * application one.
+     * For example, if there is one active zone annotation for the whole
+     * application and one active zone annotation for the Occupancy Analytic
+     * processor, then the Occupancy Analytic processor will have two active zones
+     * defined.
+     * 
+ * + * repeated .google.cloud.visionai.v1.ApplicationNodeAnnotation node_annotations = 2; + * + */ + public Builder setNodeAnnotations( + int index, com.google.cloud.visionai.v1.ApplicationNodeAnnotation value) { + if (nodeAnnotationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureNodeAnnotationsIsMutable(); + nodeAnnotations_.set(index, value); + onChanged(); + } else { + nodeAnnotationsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Annotations that will be applied to the specific node of the application.
+     * If the same type of the annotations is applied to both application and
+     * node, the node annotation will be added in addition to the global
+     * application one.
+     * For example, if there is one active zone annotation for the whole
+     * application and one active zone annotation for the Occupancy Analytic
+     * processor, then the Occupancy Analytic processor will have two active zones
+     * defined.
+     * 
+ * + * repeated .google.cloud.visionai.v1.ApplicationNodeAnnotation node_annotations = 2; + * + */ + public Builder setNodeAnnotations( + int index, com.google.cloud.visionai.v1.ApplicationNodeAnnotation.Builder builderForValue) { + if (nodeAnnotationsBuilder_ == null) { + ensureNodeAnnotationsIsMutable(); + nodeAnnotations_.set(index, builderForValue.build()); + onChanged(); + } else { + nodeAnnotationsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Annotations that will be applied to the specific node of the application.
+     * If the same type of the annotations is applied to both application and
+     * node, the node annotation will be added in addition to the global
+     * application one.
+     * For example, if there is one active zone annotation for the whole
+     * application and one active zone annotation for the Occupancy Analytic
+     * processor, then the Occupancy Analytic processor will have two active zones
+     * defined.
+     * 
+ * + * repeated .google.cloud.visionai.v1.ApplicationNodeAnnotation node_annotations = 2; + * + */ + public Builder addNodeAnnotations( + com.google.cloud.visionai.v1.ApplicationNodeAnnotation value) { + if (nodeAnnotationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureNodeAnnotationsIsMutable(); + nodeAnnotations_.add(value); + onChanged(); + } else { + nodeAnnotationsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Annotations that will be applied to the specific node of the application.
+     * If the same type of the annotations is applied to both application and
+     * node, the node annotation will be added in addition to the global
+     * application one.
+     * For example, if there is one active zone annotation for the whole
+     * application and one active zone annotation for the Occupancy Analytic
+     * processor, then the Occupancy Analytic processor will have two active zones
+     * defined.
+     * 
+ * + * repeated .google.cloud.visionai.v1.ApplicationNodeAnnotation node_annotations = 2; + * + */ + public Builder addNodeAnnotations( + int index, com.google.cloud.visionai.v1.ApplicationNodeAnnotation value) { + if (nodeAnnotationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureNodeAnnotationsIsMutable(); + nodeAnnotations_.add(index, value); + onChanged(); + } else { + nodeAnnotationsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Annotations that will be applied to the specific node of the application.
+     * If the same type of the annotations is applied to both application and
+     * node, the node annotation will be added in addition to the global
+     * application one.
+     * For example, if there is one active zone annotation for the whole
+     * application and one active zone annotation for the Occupancy Analytic
+     * processor, then the Occupancy Analytic processor will have two active zones
+     * defined.
+     * 
+ * + * repeated .google.cloud.visionai.v1.ApplicationNodeAnnotation node_annotations = 2; + * + */ + public Builder addNodeAnnotations( + com.google.cloud.visionai.v1.ApplicationNodeAnnotation.Builder builderForValue) { + if (nodeAnnotationsBuilder_ == null) { + ensureNodeAnnotationsIsMutable(); + nodeAnnotations_.add(builderForValue.build()); + onChanged(); + } else { + nodeAnnotationsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Annotations that will be applied to the specific node of the application.
+     * If the same type of the annotations is applied to both application and
+     * node, the node annotation will be added in addition to the global
+     * application one.
+     * For example, if there is one active zone annotation for the whole
+     * application and one active zone annotation for the Occupancy Analytic
+     * processor, then the Occupancy Analytic processor will have two active zones
+     * defined.
+     * 
+ * + * repeated .google.cloud.visionai.v1.ApplicationNodeAnnotation node_annotations = 2; + * + */ + public Builder addNodeAnnotations( + int index, com.google.cloud.visionai.v1.ApplicationNodeAnnotation.Builder builderForValue) { + if (nodeAnnotationsBuilder_ == null) { + ensureNodeAnnotationsIsMutable(); + nodeAnnotations_.add(index, builderForValue.build()); + onChanged(); + } else { + nodeAnnotationsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Annotations that will be applied to the specific node of the application.
+     * If the same type of the annotations is applied to both application and
+     * node, the node annotation will be added in addition to the global
+     * application one.
+     * For example, if there is one active zone annotation for the whole
+     * application and one active zone annotation for the Occupancy Analytic
+     * processor, then the Occupancy Analytic processor will have two active zones
+     * defined.
+     * 
+ * + * repeated .google.cloud.visionai.v1.ApplicationNodeAnnotation node_annotations = 2; + * + */ + public Builder addAllNodeAnnotations( + java.lang.Iterable + values) { + if (nodeAnnotationsBuilder_ == null) { + ensureNodeAnnotationsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, nodeAnnotations_); + onChanged(); + } else { + nodeAnnotationsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Annotations that will be applied to the specific node of the application.
+     * If the same type of the annotations is applied to both application and
+     * node, the node annotation will be added in addition to the global
+     * application one.
+     * For example, if there is one active zone annotation for the whole
+     * application and one active zone annotation for the Occupancy Analytic
+     * processor, then the Occupancy Analytic processor will have two active zones
+     * defined.
+     * 
+ * + * repeated .google.cloud.visionai.v1.ApplicationNodeAnnotation node_annotations = 2; + * + */ + public Builder clearNodeAnnotations() { + if (nodeAnnotationsBuilder_ == null) { + nodeAnnotations_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + nodeAnnotationsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Annotations that will be applied to the specific node of the application.
+     * If the same type of the annotations is applied to both application and
+     * node, the node annotation will be added in addition to the global
+     * application one.
+     * For example, if there is one active zone annotation for the whole
+     * application and one active zone annotation for the Occupancy Analytic
+     * processor, then the Occupancy Analytic processor will have two active zones
+     * defined.
+     * 
+ * + * repeated .google.cloud.visionai.v1.ApplicationNodeAnnotation node_annotations = 2; + * + */ + public Builder removeNodeAnnotations(int index) { + if (nodeAnnotationsBuilder_ == null) { + ensureNodeAnnotationsIsMutable(); + nodeAnnotations_.remove(index); + onChanged(); + } else { + nodeAnnotationsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Annotations that will be applied to the specific node of the application.
+     * If the same type of the annotations is applied to both application and
+     * node, the node annotation will be added in addition to the global
+     * application one.
+     * For example, if there is one active zone annotation for the whole
+     * application and one active zone annotation for the Occupancy Analytic
+     * processor, then the Occupancy Analytic processor will have two active zones
+     * defined.
+     * 
+ * + * repeated .google.cloud.visionai.v1.ApplicationNodeAnnotation node_annotations = 2; + * + */ + public com.google.cloud.visionai.v1.ApplicationNodeAnnotation.Builder getNodeAnnotationsBuilder( + int index) { + return getNodeAnnotationsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Annotations that will be applied to the specific node of the application.
+     * If the same type of the annotations is applied to both application and
+     * node, the node annotation will be added in addition to the global
+     * application one.
+     * For example, if there is one active zone annotation for the whole
+     * application and one active zone annotation for the Occupancy Analytic
+     * processor, then the Occupancy Analytic processor will have two active zones
+     * defined.
+     * 
+ * + * repeated .google.cloud.visionai.v1.ApplicationNodeAnnotation node_annotations = 2; + * + */ + public com.google.cloud.visionai.v1.ApplicationNodeAnnotationOrBuilder + getNodeAnnotationsOrBuilder(int index) { + if (nodeAnnotationsBuilder_ == null) { + return nodeAnnotations_.get(index); + } else { + return nodeAnnotationsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Annotations that will be applied to the specific node of the application.
+     * If the same type of the annotations is applied to both application and
+     * node, the node annotation will be added in addition to the global
+     * application one.
+     * For example, if there is one active zone annotation for the whole
+     * application and one active zone annotation for the Occupancy Analytic
+     * processor, then the Occupancy Analytic processor will have two active zones
+     * defined.
+     * 
+ * + * repeated .google.cloud.visionai.v1.ApplicationNodeAnnotation node_annotations = 2; + * + */ + public java.util.List + getNodeAnnotationsOrBuilderList() { + if (nodeAnnotationsBuilder_ != null) { + return nodeAnnotationsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(nodeAnnotations_); + } + } + /** + * + * + *
+     * Annotations that will be applied to the specific node of the application.
+     * If the same type of the annotations is applied to both application and
+     * node, the node annotation will be added in addition to the global
+     * application one.
+     * For example, if there is one active zone annotation for the whole
+     * application and one active zone annotation for the Occupancy Analytic
+     * processor, then the Occupancy Analytic processor will have two active zones
+     * defined.
+     * 
+ * + * repeated .google.cloud.visionai.v1.ApplicationNodeAnnotation node_annotations = 2; + * + */ + public com.google.cloud.visionai.v1.ApplicationNodeAnnotation.Builder + addNodeAnnotationsBuilder() { + return getNodeAnnotationsFieldBuilder() + .addBuilder(com.google.cloud.visionai.v1.ApplicationNodeAnnotation.getDefaultInstance()); + } + /** + * + * + *
+     * Annotations that will be applied to the specific node of the application.
+     * If the same type of the annotations is applied to both application and
+     * node, the node annotation will be added in addition to the global
+     * application one.
+     * For example, if there is one active zone annotation for the whole
+     * application and one active zone annotation for the Occupancy Analytic
+     * processor, then the Occupancy Analytic processor will have two active zones
+     * defined.
+     * 
+ * + * repeated .google.cloud.visionai.v1.ApplicationNodeAnnotation node_annotations = 2; + * + */ + public com.google.cloud.visionai.v1.ApplicationNodeAnnotation.Builder addNodeAnnotationsBuilder( + int index) { + return getNodeAnnotationsFieldBuilder() + .addBuilder( + index, com.google.cloud.visionai.v1.ApplicationNodeAnnotation.getDefaultInstance()); + } + /** + * + * + *
+     * Annotations that will be applied to the specific node of the application.
+     * If the same type of the annotations is applied to both application and
+     * node, the node annotation will be added in addition to the global
+     * application one.
+     * For example, if there is one active zone annotation for the whole
+     * application and one active zone annotation for the Occupancy Analytic
+     * processor, then the Occupancy Analytic processor will have two active zones
+     * defined.
+     * 
+ * + * repeated .google.cloud.visionai.v1.ApplicationNodeAnnotation node_annotations = 2; + * + */ + public java.util.List + getNodeAnnotationsBuilderList() { + return getNodeAnnotationsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.visionai.v1.ApplicationNodeAnnotation, + com.google.cloud.visionai.v1.ApplicationNodeAnnotation.Builder, + com.google.cloud.visionai.v1.ApplicationNodeAnnotationOrBuilder> + getNodeAnnotationsFieldBuilder() { + if (nodeAnnotationsBuilder_ == null) { + nodeAnnotationsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.visionai.v1.ApplicationNodeAnnotation, + com.google.cloud.visionai.v1.ApplicationNodeAnnotation.Builder, + com.google.cloud.visionai.v1.ApplicationNodeAnnotationOrBuilder>( + nodeAnnotations_, + ((bitField0_ & 0x00000002) != 0), + getParentForChildren(), + isClean()); + nodeAnnotations_ = null; + } + return nodeAnnotationsBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.ResourceAnnotations) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.ResourceAnnotations) + private static final com.google.cloud.visionai.v1.ResourceAnnotations DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.ResourceAnnotations(); + } + + public static com.google.cloud.visionai.v1.ResourceAnnotations getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ResourceAnnotations parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.ResourceAnnotations getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ResourceAnnotationsOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ResourceAnnotationsOrBuilder.java new file mode 100644 index 000000000000..6feb752bfa5e --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ResourceAnnotationsOrBuilder.java @@ -0,0 +1,167 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/platform.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface ResourceAnnotationsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.ResourceAnnotations) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Annotations that will be applied to the whole application.
+   * 
+ * + * repeated .google.cloud.visionai.v1.StreamAnnotation application_annotations = 1; + */ + java.util.List getApplicationAnnotationsList(); + /** + * + * + *
+   * Annotations that will be applied to the whole application.
+   * 
+ * + * repeated .google.cloud.visionai.v1.StreamAnnotation application_annotations = 1; + */ + com.google.cloud.visionai.v1.StreamAnnotation getApplicationAnnotations(int index); + /** + * + * + *
+   * Annotations that will be applied to the whole application.
+   * 
+ * + * repeated .google.cloud.visionai.v1.StreamAnnotation application_annotations = 1; + */ + int getApplicationAnnotationsCount(); + /** + * + * + *
+   * Annotations that will be applied to the whole application.
+   * 
+ * + * repeated .google.cloud.visionai.v1.StreamAnnotation application_annotations = 1; + */ + java.util.List + getApplicationAnnotationsOrBuilderList(); + /** + * + * + *
+   * Annotations that will be applied to the whole application.
+   * 
+ * + * repeated .google.cloud.visionai.v1.StreamAnnotation application_annotations = 1; + */ + com.google.cloud.visionai.v1.StreamAnnotationOrBuilder getApplicationAnnotationsOrBuilder( + int index); + + /** + * + * + *
+   * Annotations that will be applied to the specific node of the application.
+   * If the same type of the annotations is applied to both application and
+   * node, the node annotation will be added in addition to the global
+   * application one.
+   * For example, if there is one active zone annotation for the whole
+   * application and one active zone annotation for the Occupancy Analytic
+   * processor, then the Occupancy Analytic processor will have two active zones
+   * defined.
+   * 
+ * + * repeated .google.cloud.visionai.v1.ApplicationNodeAnnotation node_annotations = 2; + */ + java.util.List getNodeAnnotationsList(); + /** + * + * + *
+   * Annotations that will be applied to the specific node of the application.
+   * If the same type of the annotations is applied to both application and
+   * node, the node annotation will be added in addition to the global
+   * application one.
+   * For example, if there is one active zone annotation for the whole
+   * application and one active zone annotation for the Occupancy Analytic
+   * processor, then the Occupancy Analytic processor will have two active zones
+   * defined.
+   * 
+ * + * repeated .google.cloud.visionai.v1.ApplicationNodeAnnotation node_annotations = 2; + */ + com.google.cloud.visionai.v1.ApplicationNodeAnnotation getNodeAnnotations(int index); + /** + * + * + *
+   * Annotations that will be applied to the specific node of the application.
+   * If the same type of the annotations is applied to both application and
+   * node, the node annotation will be added in addition to the global
+   * application one.
+   * For example, if there is one active zone annotation for the whole
+   * application and one active zone annotation for the Occupancy Analytic
+   * processor, then the Occupancy Analytic processor will have two active zones
+   * defined.
+   * 
+ * + * repeated .google.cloud.visionai.v1.ApplicationNodeAnnotation node_annotations = 2; + */ + int getNodeAnnotationsCount(); + /** + * + * + *
+   * Annotations that will be applied to the specific node of the application.
+   * If the same type of the annotations is applied to both application and
+   * node, the node annotation will be added in addition to the global
+   * application one.
+   * For example, if there is one active zone annotation for the whole
+   * application and one active zone annotation for the Occupancy Analytic
+   * processor, then the Occupancy Analytic processor will have two active zones
+   * defined.
+   * 
+ * + * repeated .google.cloud.visionai.v1.ApplicationNodeAnnotation node_annotations = 2; + */ + java.util.List + getNodeAnnotationsOrBuilderList(); + /** + * + * + *
+   * Annotations that will be applied to the specific node of the application.
+   * If the same type of the annotations is applied to both application and
+   * node, the node annotation will be added in addition to the global
+   * application one.
+   * For example, if there is one active zone annotation for the whole
+   * application and one active zone annotation for the Occupancy Analytic
+   * processor, then the Occupancy Analytic processor will have two active zones
+   * defined.
+   * 
+ * + * repeated .google.cloud.visionai.v1.ApplicationNodeAnnotation node_annotations = 2; + */ + com.google.cloud.visionai.v1.ApplicationNodeAnnotationOrBuilder getNodeAnnotationsOrBuilder( + int index); +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ResourceSpecification.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ResourceSpecification.java new file mode 100644 index 000000000000..0a9241b5def1 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ResourceSpecification.java @@ -0,0 +1,1587 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/lva.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * ResourceSpec collects a set of resources that can
+ * be used to specify requests and requirements.
+ *
+ * Note: Highly experimental as this can be runtime dependent.
+ * Can use the "extras" field to experiment first before trying
+ * to abstract it.
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.ResourceSpecification} + */ +public final class ResourceSpecification extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.ResourceSpecification) + ResourceSpecificationOrBuilder { + private static final long serialVersionUID = 0L; + // Use ResourceSpecification.newBuilder() to construct. + private ResourceSpecification(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ResourceSpecification() { + cpu_ = ""; + cpuLimits_ = ""; + memory_ = ""; + memoryLimits_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ResourceSpecification(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.LvaProto + .internal_static_google_cloud_visionai_v1_ResourceSpecification_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.LvaProto + .internal_static_google_cloud_visionai_v1_ResourceSpecification_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.ResourceSpecification.class, + com.google.cloud.visionai.v1.ResourceSpecification.Builder.class); + } + + public static final int CPU_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object cpu_ = ""; + /** + * + * + *
+   * CPU specification.
+   *
+   * Examples:
+   * "100m", "0.5", "1", "2", ... correspond to
+   * 0.1, half, 1, or 2 cpus.
+   *
+   * Leave empty to let the system decide.
+   *
+   * Note that this does *not* determine the cpu vender/make,
+   * or its underlying clock speed and specific SIMD features.
+   * It is only the amount time it requires in timeslicing.
+   * 
+ * + * string cpu = 1; + * + * @return The cpu. + */ + @java.lang.Override + public java.lang.String getCpu() { + java.lang.Object ref = cpu_; + 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(); + cpu_ = s; + return s; + } + } + /** + * + * + *
+   * CPU specification.
+   *
+   * Examples:
+   * "100m", "0.5", "1", "2", ... correspond to
+   * 0.1, half, 1, or 2 cpus.
+   *
+   * Leave empty to let the system decide.
+   *
+   * Note that this does *not* determine the cpu vender/make,
+   * or its underlying clock speed and specific SIMD features.
+   * It is only the amount time it requires in timeslicing.
+   * 
+ * + * string cpu = 1; + * + * @return The bytes for cpu. + */ + @java.lang.Override + public com.google.protobuf.ByteString getCpuBytes() { + java.lang.Object ref = cpu_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + cpu_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CPU_LIMITS_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object cpuLimits_ = ""; + /** + * + * + *
+   * CPU limit.
+   *
+   * Examples:
+   * "100m", "0.5", "1", "2", ... correspond to
+   * 0.1, half, 1, or 2 cpus.
+   *
+   * Leave empty to indicate no limit.
+   * 
+ * + * string cpu_limits = 5; + * + * @return The cpuLimits. + */ + @java.lang.Override + public java.lang.String getCpuLimits() { + java.lang.Object ref = cpuLimits_; + 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(); + cpuLimits_ = s; + return s; + } + } + /** + * + * + *
+   * CPU limit.
+   *
+   * Examples:
+   * "100m", "0.5", "1", "2", ... correspond to
+   * 0.1, half, 1, or 2 cpus.
+   *
+   * Leave empty to indicate no limit.
+   * 
+ * + * string cpu_limits = 5; + * + * @return The bytes for cpuLimits. + */ + @java.lang.Override + public com.google.protobuf.ByteString getCpuLimitsBytes() { + java.lang.Object ref = cpuLimits_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + cpuLimits_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int MEMORY_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object memory_ = ""; + /** + * + * + *
+   * Memory specification (in bytes).
+   *
+   * Examples:
+   * "128974848", "129e6", "129M", "123Mi", ... correspond to
+   * 128974848 bytes, 129000000 bytes, 129 mebibytes, 123 megabytes.
+   *
+   * Leave empty to let the system decide.
+   * 
+ * + * string memory = 2; + * + * @return The memory. + */ + @java.lang.Override + public java.lang.String getMemory() { + java.lang.Object ref = memory_; + 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(); + memory_ = s; + return s; + } + } + /** + * + * + *
+   * Memory specification (in bytes).
+   *
+   * Examples:
+   * "128974848", "129e6", "129M", "123Mi", ... correspond to
+   * 128974848 bytes, 129000000 bytes, 129 mebibytes, 123 megabytes.
+   *
+   * Leave empty to let the system decide.
+   * 
+ * + * string memory = 2; + * + * @return The bytes for memory. + */ + @java.lang.Override + public com.google.protobuf.ByteString getMemoryBytes() { + java.lang.Object ref = memory_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + memory_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int MEMORY_LIMITS_FIELD_NUMBER = 6; + + @SuppressWarnings("serial") + private volatile java.lang.Object memoryLimits_ = ""; + /** + * + * + *
+   * Memory usage limits.
+   *
+   * Examples:
+   * "128974848", "129e6", "129M", "123Mi", ... correspond to
+   * 128974848 bytes, 129000000 bytes, 129 mebibytes, 123 megabytes.
+   *
+   * Leave empty to indicate no limit.
+   * 
+ * + * string memory_limits = 6; + * + * @return The memoryLimits. + */ + @java.lang.Override + public java.lang.String getMemoryLimits() { + java.lang.Object ref = memoryLimits_; + 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(); + memoryLimits_ = s; + return s; + } + } + /** + * + * + *
+   * Memory usage limits.
+   *
+   * Examples:
+   * "128974848", "129e6", "129M", "123Mi", ... correspond to
+   * 128974848 bytes, 129000000 bytes, 129 mebibytes, 123 megabytes.
+   *
+   * Leave empty to indicate no limit.
+   * 
+ * + * string memory_limits = 6; + * + * @return The bytes for memoryLimits. + */ + @java.lang.Override + public com.google.protobuf.ByteString getMemoryLimitsBytes() { + java.lang.Object ref = memoryLimits_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + memoryLimits_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int GPUS_FIELD_NUMBER = 3; + private int gpus_ = 0; + /** + * + * + *
+   * Number of gpus.
+   * 
+ * + * int32 gpus = 3; + * + * @return The gpus. + */ + @java.lang.Override + public int getGpus() { + return gpus_; + } + + public static final int LATENCY_BUDGET_MS_FIELD_NUMBER = 4; + private int latencyBudgetMs_ = 0; + /** + * + * + *
+   * The maximum latency that this operator may use to process an element.
+   *
+   * If non positive, then a system default will be used.
+   * Operator developers should arrange for the system compute resources to be
+   * aligned with this latency budget; e.g. if you want a ML model to produce
+   * results within 500ms, then you should make sure you request enough
+   * cpu/gpu/memory to achieve that.
+   * 
+ * + * int32 latency_budget_ms = 4; + * + * @return The latencyBudgetMs. + */ + @java.lang.Override + public int getLatencyBudgetMs() { + return latencyBudgetMs_; + } + + 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(cpu_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, cpu_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(memory_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, memory_); + } + if (gpus_ != 0) { + output.writeInt32(3, gpus_); + } + if (latencyBudgetMs_ != 0) { + output.writeInt32(4, latencyBudgetMs_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(cpuLimits_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, cpuLimits_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(memoryLimits_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, memoryLimits_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(cpu_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, cpu_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(memory_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, memory_); + } + if (gpus_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(3, gpus_); + } + if (latencyBudgetMs_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(4, latencyBudgetMs_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(cpuLimits_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, cpuLimits_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(memoryLimits_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, memoryLimits_); + } + size += getUnknownFields().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.visionai.v1.ResourceSpecification)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.ResourceSpecification other = + (com.google.cloud.visionai.v1.ResourceSpecification) obj; + + if (!getCpu().equals(other.getCpu())) return false; + if (!getCpuLimits().equals(other.getCpuLimits())) return false; + if (!getMemory().equals(other.getMemory())) return false; + if (!getMemoryLimits().equals(other.getMemoryLimits())) return false; + if (getGpus() != other.getGpus()) return false; + if (getLatencyBudgetMs() != other.getLatencyBudgetMs()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + CPU_FIELD_NUMBER; + hash = (53 * hash) + getCpu().hashCode(); + hash = (37 * hash) + CPU_LIMITS_FIELD_NUMBER; + hash = (53 * hash) + getCpuLimits().hashCode(); + hash = (37 * hash) + MEMORY_FIELD_NUMBER; + hash = (53 * hash) + getMemory().hashCode(); + hash = (37 * hash) + MEMORY_LIMITS_FIELD_NUMBER; + hash = (53 * hash) + getMemoryLimits().hashCode(); + hash = (37 * hash) + GPUS_FIELD_NUMBER; + hash = (53 * hash) + getGpus(); + hash = (37 * hash) + LATENCY_BUDGET_MS_FIELD_NUMBER; + hash = (53 * hash) + getLatencyBudgetMs(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.ResourceSpecification parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ResourceSpecification 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.visionai.v1.ResourceSpecification parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ResourceSpecification 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.visionai.v1.ResourceSpecification parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.ResourceSpecification parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.ResourceSpecification parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ResourceSpecification 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.visionai.v1.ResourceSpecification parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ResourceSpecification 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.visionai.v1.ResourceSpecification parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.ResourceSpecification 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.visionai.v1.ResourceSpecification 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; + } + /** + * + * + *
+   * ResourceSpec collects a set of resources that can
+   * be used to specify requests and requirements.
+   *
+   * Note: Highly experimental as this can be runtime dependent.
+   * Can use the "extras" field to experiment first before trying
+   * to abstract it.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.ResourceSpecification} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.ResourceSpecification) + com.google.cloud.visionai.v1.ResourceSpecificationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.LvaProto + .internal_static_google_cloud_visionai_v1_ResourceSpecification_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.LvaProto + .internal_static_google_cloud_visionai_v1_ResourceSpecification_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.ResourceSpecification.class, + com.google.cloud.visionai.v1.ResourceSpecification.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.ResourceSpecification.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + cpu_ = ""; + cpuLimits_ = ""; + memory_ = ""; + memoryLimits_ = ""; + gpus_ = 0; + latencyBudgetMs_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.LvaProto + .internal_static_google_cloud_visionai_v1_ResourceSpecification_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ResourceSpecification getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.ResourceSpecification.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ResourceSpecification build() { + com.google.cloud.visionai.v1.ResourceSpecification result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.ResourceSpecification buildPartial() { + com.google.cloud.visionai.v1.ResourceSpecification result = + new com.google.cloud.visionai.v1.ResourceSpecification(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.visionai.v1.ResourceSpecification result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.cpu_ = cpu_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.cpuLimits_ = cpuLimits_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.memory_ = memory_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.memoryLimits_ = memoryLimits_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.gpus_ = gpus_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.latencyBudgetMs_ = latencyBudgetMs_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.ResourceSpecification) { + return mergeFrom((com.google.cloud.visionai.v1.ResourceSpecification) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.ResourceSpecification other) { + if (other == com.google.cloud.visionai.v1.ResourceSpecification.getDefaultInstance()) + return this; + if (!other.getCpu().isEmpty()) { + cpu_ = other.cpu_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getCpuLimits().isEmpty()) { + cpuLimits_ = other.cpuLimits_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getMemory().isEmpty()) { + memory_ = other.memory_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getMemoryLimits().isEmpty()) { + memoryLimits_ = other.memoryLimits_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (other.getGpus() != 0) { + setGpus(other.getGpus()); + } + if (other.getLatencyBudgetMs() != 0) { + setLatencyBudgetMs(other.getLatencyBudgetMs()); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + cpu_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + memory_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 18 + case 24: + { + gpus_ = input.readInt32(); + bitField0_ |= 0x00000010; + break; + } // case 24 + case 32: + { + latencyBudgetMs_ = input.readInt32(); + bitField0_ |= 0x00000020; + break; + } // case 32 + case 42: + { + cpuLimits_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 42 + case 50: + { + memoryLimits_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 50 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object cpu_ = ""; + /** + * + * + *
+     * CPU specification.
+     *
+     * Examples:
+     * "100m", "0.5", "1", "2", ... correspond to
+     * 0.1, half, 1, or 2 cpus.
+     *
+     * Leave empty to let the system decide.
+     *
+     * Note that this does *not* determine the cpu vender/make,
+     * or its underlying clock speed and specific SIMD features.
+     * It is only the amount time it requires in timeslicing.
+     * 
+ * + * string cpu = 1; + * + * @return The cpu. + */ + public java.lang.String getCpu() { + java.lang.Object ref = cpu_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + cpu_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * CPU specification.
+     *
+     * Examples:
+     * "100m", "0.5", "1", "2", ... correspond to
+     * 0.1, half, 1, or 2 cpus.
+     *
+     * Leave empty to let the system decide.
+     *
+     * Note that this does *not* determine the cpu vender/make,
+     * or its underlying clock speed and specific SIMD features.
+     * It is only the amount time it requires in timeslicing.
+     * 
+ * + * string cpu = 1; + * + * @return The bytes for cpu. + */ + public com.google.protobuf.ByteString getCpuBytes() { + java.lang.Object ref = cpu_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + cpu_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * CPU specification.
+     *
+     * Examples:
+     * "100m", "0.5", "1", "2", ... correspond to
+     * 0.1, half, 1, or 2 cpus.
+     *
+     * Leave empty to let the system decide.
+     *
+     * Note that this does *not* determine the cpu vender/make,
+     * or its underlying clock speed and specific SIMD features.
+     * It is only the amount time it requires in timeslicing.
+     * 
+ * + * string cpu = 1; + * + * @param value The cpu to set. + * @return This builder for chaining. + */ + public Builder setCpu(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + cpu_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * CPU specification.
+     *
+     * Examples:
+     * "100m", "0.5", "1", "2", ... correspond to
+     * 0.1, half, 1, or 2 cpus.
+     *
+     * Leave empty to let the system decide.
+     *
+     * Note that this does *not* determine the cpu vender/make,
+     * or its underlying clock speed and specific SIMD features.
+     * It is only the amount time it requires in timeslicing.
+     * 
+ * + * string cpu = 1; + * + * @return This builder for chaining. + */ + public Builder clearCpu() { + cpu_ = getDefaultInstance().getCpu(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * CPU specification.
+     *
+     * Examples:
+     * "100m", "0.5", "1", "2", ... correspond to
+     * 0.1, half, 1, or 2 cpus.
+     *
+     * Leave empty to let the system decide.
+     *
+     * Note that this does *not* determine the cpu vender/make,
+     * or its underlying clock speed and specific SIMD features.
+     * It is only the amount time it requires in timeslicing.
+     * 
+ * + * string cpu = 1; + * + * @param value The bytes for cpu to set. + * @return This builder for chaining. + */ + public Builder setCpuBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + cpu_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object cpuLimits_ = ""; + /** + * + * + *
+     * CPU limit.
+     *
+     * Examples:
+     * "100m", "0.5", "1", "2", ... correspond to
+     * 0.1, half, 1, or 2 cpus.
+     *
+     * Leave empty to indicate no limit.
+     * 
+ * + * string cpu_limits = 5; + * + * @return The cpuLimits. + */ + public java.lang.String getCpuLimits() { + java.lang.Object ref = cpuLimits_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + cpuLimits_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * CPU limit.
+     *
+     * Examples:
+     * "100m", "0.5", "1", "2", ... correspond to
+     * 0.1, half, 1, or 2 cpus.
+     *
+     * Leave empty to indicate no limit.
+     * 
+ * + * string cpu_limits = 5; + * + * @return The bytes for cpuLimits. + */ + public com.google.protobuf.ByteString getCpuLimitsBytes() { + java.lang.Object ref = cpuLimits_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + cpuLimits_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * CPU limit.
+     *
+     * Examples:
+     * "100m", "0.5", "1", "2", ... correspond to
+     * 0.1, half, 1, or 2 cpus.
+     *
+     * Leave empty to indicate no limit.
+     * 
+ * + * string cpu_limits = 5; + * + * @param value The cpuLimits to set. + * @return This builder for chaining. + */ + public Builder setCpuLimits(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + cpuLimits_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * CPU limit.
+     *
+     * Examples:
+     * "100m", "0.5", "1", "2", ... correspond to
+     * 0.1, half, 1, or 2 cpus.
+     *
+     * Leave empty to indicate no limit.
+     * 
+ * + * string cpu_limits = 5; + * + * @return This builder for chaining. + */ + public Builder clearCpuLimits() { + cpuLimits_ = getDefaultInstance().getCpuLimits(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * CPU limit.
+     *
+     * Examples:
+     * "100m", "0.5", "1", "2", ... correspond to
+     * 0.1, half, 1, or 2 cpus.
+     *
+     * Leave empty to indicate no limit.
+     * 
+ * + * string cpu_limits = 5; + * + * @param value The bytes for cpuLimits to set. + * @return This builder for chaining. + */ + public Builder setCpuLimitsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + cpuLimits_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object memory_ = ""; + /** + * + * + *
+     * Memory specification (in bytes).
+     *
+     * Examples:
+     * "128974848", "129e6", "129M", "123Mi", ... correspond to
+     * 128974848 bytes, 129000000 bytes, 129 mebibytes, 123 megabytes.
+     *
+     * Leave empty to let the system decide.
+     * 
+ * + * string memory = 2; + * + * @return The memory. + */ + public java.lang.String getMemory() { + java.lang.Object ref = memory_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + memory_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Memory specification (in bytes).
+     *
+     * Examples:
+     * "128974848", "129e6", "129M", "123Mi", ... correspond to
+     * 128974848 bytes, 129000000 bytes, 129 mebibytes, 123 megabytes.
+     *
+     * Leave empty to let the system decide.
+     * 
+ * + * string memory = 2; + * + * @return The bytes for memory. + */ + public com.google.protobuf.ByteString getMemoryBytes() { + java.lang.Object ref = memory_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + memory_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Memory specification (in bytes).
+     *
+     * Examples:
+     * "128974848", "129e6", "129M", "123Mi", ... correspond to
+     * 128974848 bytes, 129000000 bytes, 129 mebibytes, 123 megabytes.
+     *
+     * Leave empty to let the system decide.
+     * 
+ * + * string memory = 2; + * + * @param value The memory to set. + * @return This builder for chaining. + */ + public Builder setMemory(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + memory_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Memory specification (in bytes).
+     *
+     * Examples:
+     * "128974848", "129e6", "129M", "123Mi", ... correspond to
+     * 128974848 bytes, 129000000 bytes, 129 mebibytes, 123 megabytes.
+     *
+     * Leave empty to let the system decide.
+     * 
+ * + * string memory = 2; + * + * @return This builder for chaining. + */ + public Builder clearMemory() { + memory_ = getDefaultInstance().getMemory(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * Memory specification (in bytes).
+     *
+     * Examples:
+     * "128974848", "129e6", "129M", "123Mi", ... correspond to
+     * 128974848 bytes, 129000000 bytes, 129 mebibytes, 123 megabytes.
+     *
+     * Leave empty to let the system decide.
+     * 
+ * + * string memory = 2; + * + * @param value The bytes for memory to set. + * @return This builder for chaining. + */ + public Builder setMemoryBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + memory_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object memoryLimits_ = ""; + /** + * + * + *
+     * Memory usage limits.
+     *
+     * Examples:
+     * "128974848", "129e6", "129M", "123Mi", ... correspond to
+     * 128974848 bytes, 129000000 bytes, 129 mebibytes, 123 megabytes.
+     *
+     * Leave empty to indicate no limit.
+     * 
+ * + * string memory_limits = 6; + * + * @return The memoryLimits. + */ + public java.lang.String getMemoryLimits() { + java.lang.Object ref = memoryLimits_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + memoryLimits_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Memory usage limits.
+     *
+     * Examples:
+     * "128974848", "129e6", "129M", "123Mi", ... correspond to
+     * 128974848 bytes, 129000000 bytes, 129 mebibytes, 123 megabytes.
+     *
+     * Leave empty to indicate no limit.
+     * 
+ * + * string memory_limits = 6; + * + * @return The bytes for memoryLimits. + */ + public com.google.protobuf.ByteString getMemoryLimitsBytes() { + java.lang.Object ref = memoryLimits_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + memoryLimits_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Memory usage limits.
+     *
+     * Examples:
+     * "128974848", "129e6", "129M", "123Mi", ... correspond to
+     * 128974848 bytes, 129000000 bytes, 129 mebibytes, 123 megabytes.
+     *
+     * Leave empty to indicate no limit.
+     * 
+ * + * string memory_limits = 6; + * + * @param value The memoryLimits to set. + * @return This builder for chaining. + */ + public Builder setMemoryLimits(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + memoryLimits_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Memory usage limits.
+     *
+     * Examples:
+     * "128974848", "129e6", "129M", "123Mi", ... correspond to
+     * 128974848 bytes, 129000000 bytes, 129 mebibytes, 123 megabytes.
+     *
+     * Leave empty to indicate no limit.
+     * 
+ * + * string memory_limits = 6; + * + * @return This builder for chaining. + */ + public Builder clearMemoryLimits() { + memoryLimits_ = getDefaultInstance().getMemoryLimits(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+     * Memory usage limits.
+     *
+     * Examples:
+     * "128974848", "129e6", "129M", "123Mi", ... correspond to
+     * 128974848 bytes, 129000000 bytes, 129 mebibytes, 123 megabytes.
+     *
+     * Leave empty to indicate no limit.
+     * 
+ * + * string memory_limits = 6; + * + * @param value The bytes for memoryLimits to set. + * @return This builder for chaining. + */ + public Builder setMemoryLimitsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + memoryLimits_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private int gpus_; + /** + * + * + *
+     * Number of gpus.
+     * 
+ * + * int32 gpus = 3; + * + * @return The gpus. + */ + @java.lang.Override + public int getGpus() { + return gpus_; + } + /** + * + * + *
+     * Number of gpus.
+     * 
+ * + * int32 gpus = 3; + * + * @param value The gpus to set. + * @return This builder for chaining. + */ + public Builder setGpus(int value) { + + gpus_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Number of gpus.
+     * 
+ * + * int32 gpus = 3; + * + * @return This builder for chaining. + */ + public Builder clearGpus() { + bitField0_ = (bitField0_ & ~0x00000010); + gpus_ = 0; + onChanged(); + return this; + } + + private int latencyBudgetMs_; + /** + * + * + *
+     * The maximum latency that this operator may use to process an element.
+     *
+     * If non positive, then a system default will be used.
+     * Operator developers should arrange for the system compute resources to be
+     * aligned with this latency budget; e.g. if you want a ML model to produce
+     * results within 500ms, then you should make sure you request enough
+     * cpu/gpu/memory to achieve that.
+     * 
+ * + * int32 latency_budget_ms = 4; + * + * @return The latencyBudgetMs. + */ + @java.lang.Override + public int getLatencyBudgetMs() { + return latencyBudgetMs_; + } + /** + * + * + *
+     * The maximum latency that this operator may use to process an element.
+     *
+     * If non positive, then a system default will be used.
+     * Operator developers should arrange for the system compute resources to be
+     * aligned with this latency budget; e.g. if you want a ML model to produce
+     * results within 500ms, then you should make sure you request enough
+     * cpu/gpu/memory to achieve that.
+     * 
+ * + * int32 latency_budget_ms = 4; + * + * @param value The latencyBudgetMs to set. + * @return This builder for chaining. + */ + public Builder setLatencyBudgetMs(int value) { + + latencyBudgetMs_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * The maximum latency that this operator may use to process an element.
+     *
+     * If non positive, then a system default will be used.
+     * Operator developers should arrange for the system compute resources to be
+     * aligned with this latency budget; e.g. if you want a ML model to produce
+     * results within 500ms, then you should make sure you request enough
+     * cpu/gpu/memory to achieve that.
+     * 
+ * + * int32 latency_budget_ms = 4; + * + * @return This builder for chaining. + */ + public Builder clearLatencyBudgetMs() { + bitField0_ = (bitField0_ & ~0x00000020); + latencyBudgetMs_ = 0; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.ResourceSpecification) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.ResourceSpecification) + private static final com.google.cloud.visionai.v1.ResourceSpecification DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.ResourceSpecification(); + } + + public static com.google.cloud.visionai.v1.ResourceSpecification getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ResourceSpecification parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.ResourceSpecification getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ResourceSpecificationOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ResourceSpecificationOrBuilder.java new file mode 100644 index 000000000000..0b3d7cbfceb9 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/ResourceSpecificationOrBuilder.java @@ -0,0 +1,214 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/lva.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface ResourceSpecificationOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.ResourceSpecification) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * CPU specification.
+   *
+   * Examples:
+   * "100m", "0.5", "1", "2", ... correspond to
+   * 0.1, half, 1, or 2 cpus.
+   *
+   * Leave empty to let the system decide.
+   *
+   * Note that this does *not* determine the cpu vender/make,
+   * or its underlying clock speed and specific SIMD features.
+   * It is only the amount time it requires in timeslicing.
+   * 
+ * + * string cpu = 1; + * + * @return The cpu. + */ + java.lang.String getCpu(); + /** + * + * + *
+   * CPU specification.
+   *
+   * Examples:
+   * "100m", "0.5", "1", "2", ... correspond to
+   * 0.1, half, 1, or 2 cpus.
+   *
+   * Leave empty to let the system decide.
+   *
+   * Note that this does *not* determine the cpu vender/make,
+   * or its underlying clock speed and specific SIMD features.
+   * It is only the amount time it requires in timeslicing.
+   * 
+ * + * string cpu = 1; + * + * @return The bytes for cpu. + */ + com.google.protobuf.ByteString getCpuBytes(); + + /** + * + * + *
+   * CPU limit.
+   *
+   * Examples:
+   * "100m", "0.5", "1", "2", ... correspond to
+   * 0.1, half, 1, or 2 cpus.
+   *
+   * Leave empty to indicate no limit.
+   * 
+ * + * string cpu_limits = 5; + * + * @return The cpuLimits. + */ + java.lang.String getCpuLimits(); + /** + * + * + *
+   * CPU limit.
+   *
+   * Examples:
+   * "100m", "0.5", "1", "2", ... correspond to
+   * 0.1, half, 1, or 2 cpus.
+   *
+   * Leave empty to indicate no limit.
+   * 
+ * + * string cpu_limits = 5; + * + * @return The bytes for cpuLimits. + */ + com.google.protobuf.ByteString getCpuLimitsBytes(); + + /** + * + * + *
+   * Memory specification (in bytes).
+   *
+   * Examples:
+   * "128974848", "129e6", "129M", "123Mi", ... correspond to
+   * 128974848 bytes, 129000000 bytes, 129 mebibytes, 123 megabytes.
+   *
+   * Leave empty to let the system decide.
+   * 
+ * + * string memory = 2; + * + * @return The memory. + */ + java.lang.String getMemory(); + /** + * + * + *
+   * Memory specification (in bytes).
+   *
+   * Examples:
+   * "128974848", "129e6", "129M", "123Mi", ... correspond to
+   * 128974848 bytes, 129000000 bytes, 129 mebibytes, 123 megabytes.
+   *
+   * Leave empty to let the system decide.
+   * 
+ * + * string memory = 2; + * + * @return The bytes for memory. + */ + com.google.protobuf.ByteString getMemoryBytes(); + + /** + * + * + *
+   * Memory usage limits.
+   *
+   * Examples:
+   * "128974848", "129e6", "129M", "123Mi", ... correspond to
+   * 128974848 bytes, 129000000 bytes, 129 mebibytes, 123 megabytes.
+   *
+   * Leave empty to indicate no limit.
+   * 
+ * + * string memory_limits = 6; + * + * @return The memoryLimits. + */ + java.lang.String getMemoryLimits(); + /** + * + * + *
+   * Memory usage limits.
+   *
+   * Examples:
+   * "128974848", "129e6", "129M", "123Mi", ... correspond to
+   * 128974848 bytes, 129000000 bytes, 129 mebibytes, 123 megabytes.
+   *
+   * Leave empty to indicate no limit.
+   * 
+ * + * string memory_limits = 6; + * + * @return The bytes for memoryLimits. + */ + com.google.protobuf.ByteString getMemoryLimitsBytes(); + + /** + * + * + *
+   * Number of gpus.
+   * 
+ * + * int32 gpus = 3; + * + * @return The gpus. + */ + int getGpus(); + + /** + * + * + *
+   * The maximum latency that this operator may use to process an element.
+   *
+   * If non positive, then a system default will be used.
+   * Operator developers should arrange for the system compute resources to be
+   * aligned with this latency budget; e.g. if you want a ML model to produce
+   * results within 500ms, then you should make sure you request enough
+   * cpu/gpu/memory to achieve that.
+   * 
+ * + * int32 latency_budget_ms = 4; + * + * @return The latencyBudgetMs. + */ + int getLatencyBudgetMs(); +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/RunMode.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/RunMode.java new file mode 100644 index 000000000000..e4d52e809b16 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/RunMode.java @@ -0,0 +1,181 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/lva.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * RunMode represents the mode to launch the Process on.
+ * 
+ * + * Protobuf enum {@code google.cloud.visionai.v1.RunMode} + */ +public enum RunMode implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+   * Mode is unspecified.
+   * 
+ * + * RUN_MODE_UNSPECIFIED = 0; + */ + RUN_MODE_UNSPECIFIED(0), + /** + * + * + *
+   * Live mode. Meaning the Process is launched to handle live video
+   * source, and possible packet drops are expected.
+   * 
+ * + * LIVE = 1; + */ + LIVE(1), + /** + * + * + *
+   * Submission mode. Meaning the Process is launched to handle bounded video
+   * files, with no packet drop. Completion status is tracked.
+   * 
+ * + * SUBMISSION = 2; + */ + SUBMISSION(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+   * Mode is unspecified.
+   * 
+ * + * RUN_MODE_UNSPECIFIED = 0; + */ + public static final int RUN_MODE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+   * Live mode. Meaning the Process is launched to handle live video
+   * source, and possible packet drops are expected.
+   * 
+ * + * LIVE = 1; + */ + public static final int LIVE_VALUE = 1; + /** + * + * + *
+   * Submission mode. Meaning the Process is launched to handle bounded video
+   * files, with no packet drop. Completion status is tracked.
+   * 
+ * + * SUBMISSION = 2; + */ + public static final int SUBMISSION_VALUE = 2; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static RunMode valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static RunMode forNumber(int value) { + switch (value) { + case 0: + return RUN_MODE_UNSPECIFIED; + case 1: + return LIVE; + case 2: + return SUBMISSION; + 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 RunMode findValueByNumber(int number) { + return RunMode.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + 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.visionai.v1.LvaProto.getDescriptor().getEnumTypes().get(0); + } + + private static final RunMode[] VALUES = values(); + + public static RunMode 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 RunMode(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.visionai.v1.RunMode) +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/RunStatus.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/RunStatus.java new file mode 100644 index 000000000000..f98f3efbb6c2 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/RunStatus.java @@ -0,0 +1,998 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/lva.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * Message describing the status of the Process.
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.RunStatus} + */ +public final class RunStatus extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.RunStatus) + RunStatusOrBuilder { + private static final long serialVersionUID = 0L; + // Use RunStatus.newBuilder() to construct. + private RunStatus(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private RunStatus() { + state_ = 0; + reason_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new RunStatus(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.LvaProto + .internal_static_google_cloud_visionai_v1_RunStatus_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.LvaProto + .internal_static_google_cloud_visionai_v1_RunStatus_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.RunStatus.class, + com.google.cloud.visionai.v1.RunStatus.Builder.class); + } + + /** + * + * + *
+   * State represents the running status of the Process.
+   * 
+ * + * Protobuf enum {@code google.cloud.visionai.v1.RunStatus.State} + */ + public enum State implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * State is unspecified.
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + STATE_UNSPECIFIED(0), + /** + * + * + *
+     * INITIALIZING means the Process is scheduled but yet ready to handle
+     * real traffic.
+     * 
+ * + * INITIALIZING = 1; + */ + INITIALIZING(1), + /** + * + * + *
+     * RUNNING means the Process is up running and handling traffic.
+     * 
+ * + * RUNNING = 2; + */ + RUNNING(2), + /** + * + * + *
+     * COMPLETED means the Process has completed the processing, especially
+     * for non-streaming use case.
+     * 
+ * + * COMPLETED = 3; + */ + COMPLETED(3), + /** + * + * + *
+     * FAILED means the Process failed to complete the processing.
+     * 
+ * + * FAILED = 4; + */ + FAILED(4), + /** + * + * + *
+     * PENDING means the Process is created but yet to be scheduled.
+     * 
+ * + * PENDING = 5; + */ + PENDING(5), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * State is unspecified.
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + public static final int STATE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * INITIALIZING means the Process is scheduled but yet ready to handle
+     * real traffic.
+     * 
+ * + * INITIALIZING = 1; + */ + public static final int INITIALIZING_VALUE = 1; + /** + * + * + *
+     * RUNNING means the Process is up running and handling traffic.
+     * 
+ * + * RUNNING = 2; + */ + public static final int RUNNING_VALUE = 2; + /** + * + * + *
+     * COMPLETED means the Process has completed the processing, especially
+     * for non-streaming use case.
+     * 
+ * + * COMPLETED = 3; + */ + public static final int COMPLETED_VALUE = 3; + /** + * + * + *
+     * FAILED means the Process failed to complete the processing.
+     * 
+ * + * FAILED = 4; + */ + public static final int FAILED_VALUE = 4; + /** + * + * + *
+     * PENDING means the Process is created but yet to be scheduled.
+     * 
+ * + * PENDING = 5; + */ + public static final int PENDING_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; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static State valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static State forNumber(int value) { + switch (value) { + case 0: + return STATE_UNSPECIFIED; + case 1: + return INITIALIZING; + case 2: + return RUNNING; + case 3: + return COMPLETED; + case 4: + return FAILED; + case 5: + return PENDING; + 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 State findValueByNumber(int number) { + return State.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + 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.visionai.v1.RunStatus.getDescriptor().getEnumTypes().get(0); + } + + private static final State[] VALUES = values(); + + public static State 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 State(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.visionai.v1.RunStatus.State) + } + + public static final int STATE_FIELD_NUMBER = 1; + private int state_ = 0; + /** + * + * + *
+   * The state of the Process.
+   * 
+ * + * .google.cloud.visionai.v1.RunStatus.State state = 1; + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + /** + * + * + *
+   * The state of the Process.
+   * 
+ * + * .google.cloud.visionai.v1.RunStatus.State state = 1; + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.RunStatus.State getState() { + com.google.cloud.visionai.v1.RunStatus.State result = + com.google.cloud.visionai.v1.RunStatus.State.forNumber(state_); + return result == null ? com.google.cloud.visionai.v1.RunStatus.State.UNRECOGNIZED : result; + } + + public static final int REASON_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object reason_ = ""; + /** + * + * + *
+   * The reason of becoming the state.
+   * 
+ * + * string reason = 2; + * + * @return The reason. + */ + @java.lang.Override + public java.lang.String getReason() { + java.lang.Object ref = reason_; + 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(); + reason_ = s; + return s; + } + } + /** + * + * + *
+   * The reason of becoming the state.
+   * 
+ * + * string reason = 2; + * + * @return The bytes for reason. + */ + @java.lang.Override + public com.google.protobuf.ByteString getReasonBytes() { + java.lang.Object ref = reason_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + reason_ = 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 (state_ != com.google.cloud.visionai.v1.RunStatus.State.STATE_UNSPECIFIED.getNumber()) { + output.writeEnum(1, state_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(reason_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, reason_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (state_ != com.google.cloud.visionai.v1.RunStatus.State.STATE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, state_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(reason_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, reason_); + } + size += getUnknownFields().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.visionai.v1.RunStatus)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.RunStatus other = (com.google.cloud.visionai.v1.RunStatus) obj; + + if (state_ != other.state_) return false; + if (!getReason().equals(other.getReason())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + STATE_FIELD_NUMBER; + hash = (53 * hash) + state_; + hash = (37 * hash) + REASON_FIELD_NUMBER; + hash = (53 * hash) + getReason().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.RunStatus parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.RunStatus 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.visionai.v1.RunStatus parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.RunStatus 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.visionai.v1.RunStatus parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.RunStatus parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.RunStatus parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.RunStatus 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.visionai.v1.RunStatus parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.RunStatus 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.visionai.v1.RunStatus parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.RunStatus 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.visionai.v1.RunStatus 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; + } + /** + * + * + *
+   * Message describing the status of the Process.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.RunStatus} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.RunStatus) + com.google.cloud.visionai.v1.RunStatusOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.LvaProto + .internal_static_google_cloud_visionai_v1_RunStatus_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.LvaProto + .internal_static_google_cloud_visionai_v1_RunStatus_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.RunStatus.class, + com.google.cloud.visionai.v1.RunStatus.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.RunStatus.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + state_ = 0; + reason_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.LvaProto + .internal_static_google_cloud_visionai_v1_RunStatus_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.RunStatus getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.RunStatus.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.RunStatus build() { + com.google.cloud.visionai.v1.RunStatus result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.RunStatus buildPartial() { + com.google.cloud.visionai.v1.RunStatus result = + new com.google.cloud.visionai.v1.RunStatus(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.visionai.v1.RunStatus result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.state_ = state_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.reason_ = reason_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.RunStatus) { + return mergeFrom((com.google.cloud.visionai.v1.RunStatus) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.RunStatus other) { + if (other == com.google.cloud.visionai.v1.RunStatus.getDefaultInstance()) return this; + if (other.state_ != 0) { + setStateValue(other.getStateValue()); + } + if (!other.getReason().isEmpty()) { + reason_ = other.reason_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + state_ = input.readEnum(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 18: + { + reason_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private int state_ = 0; + /** + * + * + *
+     * The state of the Process.
+     * 
+ * + * .google.cloud.visionai.v1.RunStatus.State state = 1; + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + /** + * + * + *
+     * The state of the Process.
+     * 
+ * + * .google.cloud.visionai.v1.RunStatus.State state = 1; + * + * @param value The enum numeric value on the wire for state to set. + * @return This builder for chaining. + */ + public Builder setStateValue(int value) { + state_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The state of the Process.
+     * 
+ * + * .google.cloud.visionai.v1.RunStatus.State state = 1; + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.RunStatus.State getState() { + com.google.cloud.visionai.v1.RunStatus.State result = + com.google.cloud.visionai.v1.RunStatus.State.forNumber(state_); + return result == null ? com.google.cloud.visionai.v1.RunStatus.State.UNRECOGNIZED : result; + } + /** + * + * + *
+     * The state of the Process.
+     * 
+ * + * .google.cloud.visionai.v1.RunStatus.State state = 1; + * + * @param value The state to set. + * @return This builder for chaining. + */ + public Builder setState(com.google.cloud.visionai.v1.RunStatus.State value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + state_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * The state of the Process.
+     * 
+ * + * .google.cloud.visionai.v1.RunStatus.State state = 1; + * + * @return This builder for chaining. + */ + public Builder clearState() { + bitField0_ = (bitField0_ & ~0x00000001); + state_ = 0; + onChanged(); + return this; + } + + private java.lang.Object reason_ = ""; + /** + * + * + *
+     * The reason of becoming the state.
+     * 
+ * + * string reason = 2; + * + * @return The reason. + */ + public java.lang.String getReason() { + java.lang.Object ref = reason_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + reason_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The reason of becoming the state.
+     * 
+ * + * string reason = 2; + * + * @return The bytes for reason. + */ + public com.google.protobuf.ByteString getReasonBytes() { + java.lang.Object ref = reason_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + reason_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The reason of becoming the state.
+     * 
+ * + * string reason = 2; + * + * @param value The reason to set. + * @return This builder for chaining. + */ + public Builder setReason(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + reason_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * The reason of becoming the state.
+     * 
+ * + * string reason = 2; + * + * @return This builder for chaining. + */ + public Builder clearReason() { + reason_ = getDefaultInstance().getReason(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * The reason of becoming the state.
+     * 
+ * + * string reason = 2; + * + * @param value The bytes for reason to set. + * @return This builder for chaining. + */ + public Builder setReasonBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + reason_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.RunStatus) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.RunStatus) + private static final com.google.cloud.visionai.v1.RunStatus DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.RunStatus(); + } + + public static com.google.cloud.visionai.v1.RunStatus getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RunStatus parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + 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.visionai.v1.RunStatus getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/RunStatusOrBuilder.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/RunStatusOrBuilder.java new file mode 100644 index 000000000000..a4b0239ce063 --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/RunStatusOrBuilder.java @@ -0,0 +1,76 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/lva.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +public interface RunStatusOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.RunStatus) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The state of the Process.
+   * 
+ * + * .google.cloud.visionai.v1.RunStatus.State state = 1; + * + * @return The enum numeric value on the wire for state. + */ + int getStateValue(); + /** + * + * + *
+   * The state of the Process.
+   * 
+ * + * .google.cloud.visionai.v1.RunStatus.State state = 1; + * + * @return The state. + */ + com.google.cloud.visionai.v1.RunStatus.State getState(); + + /** + * + * + *
+   * The reason of becoming the state.
+   * 
+ * + * string reason = 2; + * + * @return The reason. + */ + java.lang.String getReason(); + /** + * + * + *
+   * The reason of becoming the state.
+   * 
+ * + * string reason = 2; + * + * @return The bytes for reason. + */ + com.google.protobuf.ByteString getReasonBytes(); +} diff --git a/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/SchemaKeySortingStrategy.java b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/SchemaKeySortingStrategy.java new file mode 100644 index 000000000000..cd83dd98552b --- /dev/null +++ b/java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/SchemaKeySortingStrategy.java @@ -0,0 +1,2146 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/visionai/v1/warehouse.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.visionai.v1; + +/** + * + * + *
+ * A strategy to specify how to sort by data schema key.
+ * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.SchemaKeySortingStrategy} + */ +public final class SchemaKeySortingStrategy extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.SchemaKeySortingStrategy) + SchemaKeySortingStrategyOrBuilder { + private static final long serialVersionUID = 0L; + // Use SchemaKeySortingStrategy.newBuilder() to construct. + private SchemaKeySortingStrategy(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private SchemaKeySortingStrategy() { + options_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new SchemaKeySortingStrategy(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_SchemaKeySortingStrategy_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_SchemaKeySortingStrategy_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.SchemaKeySortingStrategy.class, + com.google.cloud.visionai.v1.SchemaKeySortingStrategy.Builder.class); + } + + public interface OptionOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.SchemaKeySortingStrategy.Option) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * The data used to sort.
+     * 
+ * + * string data_schema_key = 1; + * + * @return The dataSchemaKey. + */ + java.lang.String getDataSchemaKey(); + /** + * + * + *
+     * The data used to sort.
+     * 
+ * + * string data_schema_key = 1; + * + * @return The bytes for dataSchemaKey. + */ + com.google.protobuf.ByteString getDataSchemaKeyBytes(); + + /** + * + * + *
+     * Whether to sort in decreasing order or increasing order.
+     * By default, results are sorted in incresing order.
+     * 
+ * + * bool sort_decreasing = 2; + * + * @return The sortDecreasing. + */ + boolean getSortDecreasing(); + + /** + * + * + *
+     * Aggregate method for the current data schema key.
+     * 
+ * + * + * optional .google.cloud.visionai.v1.SchemaKeySortingStrategy.Option.AggregateMethod aggregate_method = 3; + * + * + * @return Whether the aggregateMethod field is set. + */ + boolean hasAggregateMethod(); + /** + * + * + *
+     * Aggregate method for the current data schema key.
+     * 
+ * + * + * optional .google.cloud.visionai.v1.SchemaKeySortingStrategy.Option.AggregateMethod aggregate_method = 3; + * + * + * @return The enum numeric value on the wire for aggregateMethod. + */ + int getAggregateMethodValue(); + /** + * + * + *
+     * Aggregate method for the current data schema key.
+     * 
+ * + * + * optional .google.cloud.visionai.v1.SchemaKeySortingStrategy.Option.AggregateMethod aggregate_method = 3; + * + * + * @return The aggregateMethod. + */ + com.google.cloud.visionai.v1.SchemaKeySortingStrategy.Option.AggregateMethod + getAggregateMethod(); + } + /** + * + * + *
+   * Option for one data schema key.
+   * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.SchemaKeySortingStrategy.Option} + */ + public static final class Option extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.SchemaKeySortingStrategy.Option) + OptionOrBuilder { + private static final long serialVersionUID = 0L; + // Use Option.newBuilder() to construct. + private Option(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Option() { + dataSchemaKey_ = ""; + aggregateMethod_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Option(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_SchemaKeySortingStrategy_Option_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_SchemaKeySortingStrategy_Option_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.SchemaKeySortingStrategy.Option.class, + com.google.cloud.visionai.v1.SchemaKeySortingStrategy.Option.Builder.class); + } + + /** + * + * + *
+     * When one result has multiple values with the same key, specify
+     * which value is used to sort. By default, AGGREGATE_METHOD_LARGEST
+     * is used when results are sorted in decreasing order,
+     * AGGREGATE_METHOD_SMALLEST is used when results are sorted in
+     * incresing order.
+     * 
+ * + * Protobuf enum {@code + * google.cloud.visionai.v1.SchemaKeySortingStrategy.Option.AggregateMethod} + */ + public enum AggregateMethod implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+       * The unspecified aggregate method will be overwritten as mentioned
+       * above.
+       * 
+ * + * AGGREGATE_METHOD_UNSPECIFIED = 0; + */ + AGGREGATE_METHOD_UNSPECIFIED(0), + /** + * + * + *
+       * Take the (lexicographical or numerical) largest value to sort.
+       * 
+ * + * AGGREGATE_METHOD_LARGEST = 1; + */ + AGGREGATE_METHOD_LARGEST(1), + /** + * + * + *
+       * Take the (lexicographical or numerical) smallest value to sort.
+       * 
+ * + * AGGREGATE_METHOD_SMALLEST = 2; + */ + AGGREGATE_METHOD_SMALLEST(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+       * The unspecified aggregate method will be overwritten as mentioned
+       * above.
+       * 
+ * + * AGGREGATE_METHOD_UNSPECIFIED = 0; + */ + public static final int AGGREGATE_METHOD_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+       * Take the (lexicographical or numerical) largest value to sort.
+       * 
+ * + * AGGREGATE_METHOD_LARGEST = 1; + */ + public static final int AGGREGATE_METHOD_LARGEST_VALUE = 1; + /** + * + * + *
+       * Take the (lexicographical or numerical) smallest value to sort.
+       * 
+ * + * AGGREGATE_METHOD_SMALLEST = 2; + */ + public static final int AGGREGATE_METHOD_SMALLEST_VALUE = 2; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static AggregateMethod valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static AggregateMethod forNumber(int value) { + switch (value) { + case 0: + return AGGREGATE_METHOD_UNSPECIFIED; + case 1: + return AGGREGATE_METHOD_LARGEST; + case 2: + return AGGREGATE_METHOD_SMALLEST; + 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 AggregateMethod findValueByNumber(int number) { + return AggregateMethod.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + 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.visionai.v1.SchemaKeySortingStrategy.Option.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final AggregateMethod[] VALUES = values(); + + public static AggregateMethod 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 AggregateMethod(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.visionai.v1.SchemaKeySortingStrategy.Option.AggregateMethod) + } + + private int bitField0_; + public static final int DATA_SCHEMA_KEY_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object dataSchemaKey_ = ""; + /** + * + * + *
+     * The data used to sort.
+     * 
+ * + * string data_schema_key = 1; + * + * @return The dataSchemaKey. + */ + @java.lang.Override + public java.lang.String getDataSchemaKey() { + java.lang.Object ref = dataSchemaKey_; + 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(); + dataSchemaKey_ = s; + return s; + } + } + /** + * + * + *
+     * The data used to sort.
+     * 
+ * + * string data_schema_key = 1; + * + * @return The bytes for dataSchemaKey. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDataSchemaKeyBytes() { + java.lang.Object ref = dataSchemaKey_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + dataSchemaKey_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SORT_DECREASING_FIELD_NUMBER = 2; + private boolean sortDecreasing_ = false; + /** + * + * + *
+     * Whether to sort in decreasing order or increasing order.
+     * By default, results are sorted in incresing order.
+     * 
+ * + * bool sort_decreasing = 2; + * + * @return The sortDecreasing. + */ + @java.lang.Override + public boolean getSortDecreasing() { + return sortDecreasing_; + } + + public static final int AGGREGATE_METHOD_FIELD_NUMBER = 3; + private int aggregateMethod_ = 0; + /** + * + * + *
+     * Aggregate method for the current data schema key.
+     * 
+ * + * + * optional .google.cloud.visionai.v1.SchemaKeySortingStrategy.Option.AggregateMethod aggregate_method = 3; + * + * + * @return Whether the aggregateMethod field is set. + */ + @java.lang.Override + public boolean hasAggregateMethod() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * Aggregate method for the current data schema key.
+     * 
+ * + * + * optional .google.cloud.visionai.v1.SchemaKeySortingStrategy.Option.AggregateMethod aggregate_method = 3; + * + * + * @return The enum numeric value on the wire for aggregateMethod. + */ + @java.lang.Override + public int getAggregateMethodValue() { + return aggregateMethod_; + } + /** + * + * + *
+     * Aggregate method for the current data schema key.
+     * 
+ * + * + * optional .google.cloud.visionai.v1.SchemaKeySortingStrategy.Option.AggregateMethod aggregate_method = 3; + * + * + * @return The aggregateMethod. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.SchemaKeySortingStrategy.Option.AggregateMethod + getAggregateMethod() { + com.google.cloud.visionai.v1.SchemaKeySortingStrategy.Option.AggregateMethod result = + com.google.cloud.visionai.v1.SchemaKeySortingStrategy.Option.AggregateMethod.forNumber( + aggregateMethod_); + return result == null + ? com.google.cloud.visionai.v1.SchemaKeySortingStrategy.Option.AggregateMethod + .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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(dataSchemaKey_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, dataSchemaKey_); + } + if (sortDecreasing_ != false) { + output.writeBool(2, sortDecreasing_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeEnum(3, aggregateMethod_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(dataSchemaKey_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, dataSchemaKey_); + } + if (sortDecreasing_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(2, sortDecreasing_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(3, aggregateMethod_); + } + size += getUnknownFields().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.visionai.v1.SchemaKeySortingStrategy.Option)) { + return super.equals(obj); + } + com.google.cloud.visionai.v1.SchemaKeySortingStrategy.Option other = + (com.google.cloud.visionai.v1.SchemaKeySortingStrategy.Option) obj; + + if (!getDataSchemaKey().equals(other.getDataSchemaKey())) return false; + if (getSortDecreasing() != other.getSortDecreasing()) return false; + if (hasAggregateMethod() != other.hasAggregateMethod()) return false; + if (hasAggregateMethod()) { + if (aggregateMethod_ != other.aggregateMethod_) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + DATA_SCHEMA_KEY_FIELD_NUMBER; + hash = (53 * hash) + getDataSchemaKey().hashCode(); + hash = (37 * hash) + SORT_DECREASING_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getSortDecreasing()); + if (hasAggregateMethod()) { + hash = (37 * hash) + AGGREGATE_METHOD_FIELD_NUMBER; + hash = (53 * hash) + aggregateMethod_; + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.visionai.v1.SchemaKeySortingStrategy.Option parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.SchemaKeySortingStrategy.Option 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.visionai.v1.SchemaKeySortingStrategy.Option parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.SchemaKeySortingStrategy.Option 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.visionai.v1.SchemaKeySortingStrategy.Option parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.visionai.v1.SchemaKeySortingStrategy.Option parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.visionai.v1.SchemaKeySortingStrategy.Option parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.SchemaKeySortingStrategy.Option 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.visionai.v1.SchemaKeySortingStrategy.Option parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.SchemaKeySortingStrategy.Option 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.visionai.v1.SchemaKeySortingStrategy.Option parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.visionai.v1.SchemaKeySortingStrategy.Option 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.visionai.v1.SchemaKeySortingStrategy.Option 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; + } + /** + * + * + *
+     * Option for one data schema key.
+     * 
+ * + * Protobuf type {@code google.cloud.visionai.v1.SchemaKeySortingStrategy.Option} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.SchemaKeySortingStrategy.Option) + com.google.cloud.visionai.v1.SchemaKeySortingStrategy.OptionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_SchemaKeySortingStrategy_Option_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_SchemaKeySortingStrategy_Option_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.visionai.v1.SchemaKeySortingStrategy.Option.class, + com.google.cloud.visionai.v1.SchemaKeySortingStrategy.Option.Builder.class); + } + + // Construct using com.google.cloud.visionai.v1.SchemaKeySortingStrategy.Option.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + dataSchemaKey_ = ""; + sortDecreasing_ = false; + aggregateMethod_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.visionai.v1.WarehouseProto + .internal_static_google_cloud_visionai_v1_SchemaKeySortingStrategy_Option_descriptor; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.SchemaKeySortingStrategy.Option + getDefaultInstanceForType() { + return com.google.cloud.visionai.v1.SchemaKeySortingStrategy.Option.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.visionai.v1.SchemaKeySortingStrategy.Option build() { + com.google.cloud.visionai.v1.SchemaKeySortingStrategy.Option result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.visionai.v1.SchemaKeySortingStrategy.Option buildPartial() { + com.google.cloud.visionai.v1.SchemaKeySortingStrategy.Option result = + new com.google.cloud.visionai.v1.SchemaKeySortingStrategy.Option(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.visionai.v1.SchemaKeySortingStrategy.Option result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.dataSchemaKey_ = dataSchemaKey_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.sortDecreasing_ = sortDecreasing_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.aggregateMethod_ = aggregateMethod_; + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.visionai.v1.SchemaKeySortingStrategy.Option) { + return mergeFrom((com.google.cloud.visionai.v1.SchemaKeySortingStrategy.Option) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.visionai.v1.SchemaKeySortingStrategy.Option other) { + if (other + == com.google.cloud.visionai.v1.SchemaKeySortingStrategy.Option.getDefaultInstance()) + return this; + if (!other.getDataSchemaKey().isEmpty()) { + dataSchemaKey_ = other.dataSchemaKey_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getSortDecreasing() != false) { + setSortDecreasing(other.getSortDecreasing()); + } + if (other.hasAggregateMethod()) { + setAggregateMethod(other.getAggregateMethod()); + } + this.mergeUnknownFields(other.getUnknownFields()); + 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 { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + dataSchemaKey_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + sortDecreasing_ = input.readBool(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 24: + { + aggregateMethod_ = input.readEnum(); + bitField0_ |= 0x00000004; + break; + } // case 24 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object dataSchemaKey_ = ""; + /** + * + * + *
+       * The data used to sort.
+       * 
+ * + * string data_schema_key = 1; + * + * @return The dataSchemaKey. + */ + public java.lang.String getDataSchemaKey() { + java.lang.Object ref = dataSchemaKey_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + dataSchemaKey_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * The data used to sort.
+       * 
+ * + * string data_schema_key = 1; + * + * @return The bytes for dataSchemaKey. + */ + public com.google.protobuf.ByteString getDataSchemaKeyBytes() { + java.lang.Object ref = dataSchemaKey_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + dataSchemaKey_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * The data used to sort.
+       * 
+ * + * string data_schema_key = 1; + * + * @param value The dataSchemaKey to set. + * @return This builder for chaining. + */ + public Builder setDataSchemaKey(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + dataSchemaKey_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * The data used to sort.
+       * 
+ * + * string data_schema_key = 1; + * + * @return This builder for chaining. + */ + public Builder clearDataSchemaKey() { + dataSchemaKey_ = getDefaultInstance().getDataSchemaKey(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+       * The data used to sort.
+       * 
+ * + * string data_schema_key = 1; + * + * @param value The bytes for dataSchemaKey to set. + * @return This builder for chaining. + */ + public Builder setDataSchemaKeyBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + dataSchemaKey_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private boolean sortDecreasing_; + /** + * + * + *
+       * Whether to sort in decreasing order or increasing order.
+       * By default, results are sorted in incresing order.
+       * 
+ * + * bool sort_decreasing = 2; + * + * @return The sortDecreasing. + */ + @java.lang.Override + public boolean getSortDecreasing() { + return sortDecreasing_; + } + /** + * + * + *
+       * Whether to sort in decreasing order or increasing order.
+       * By default, results are sorted in incresing order.
+       * 
+ * + * bool sort_decreasing = 2; + * + * @param value The sortDecreasing to set. + * @return This builder for chaining. + */ + public Builder setSortDecreasing(boolean value) { + + sortDecreasing_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * Whether to sort in decreasing order or increasing order.
+       * By default, results are sorted in incresing order.
+       * 
+ * + * bool sort_decreasing = 2; + * + * @return This builder for chaining. + */ + public Builder clearSortDecreasing() { + bitField0_ = (bitField0_ & ~0x00000002); + sortDecreasing_ = false; + onChanged(); + return this; + } + + private int aggregateMethod_ = 0; + /** + * + * + *
+       * Aggregate method for the current data schema key.
+       * 
+ * + * + * optional .google.cloud.visionai.v1.SchemaKeySortingStrategy.Option.AggregateMethod aggregate_method = 3; + * + * + * @return Whether the aggregateMethod field is set. + */ + @java.lang.Override + public boolean hasAggregateMethod() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+       * Aggregate method for the current data schema key.
+       * 
+ * + * + * optional .google.cloud.visionai.v1.SchemaKeySortingStrategy.Option.AggregateMethod aggregate_method = 3; + * + * + * @return The enum numeric value on the wire for aggregateMethod. + */ + @java.lang.Override + public int getAggregateMethodValue() { + return aggregateMethod_; + } + /** + * + * + *
+       * Aggregate method for the current data schema key.
+       * 
+ * + * + * optional .google.cloud.visionai.v1.SchemaKeySortingStrategy.Option.AggregateMethod aggregate_method = 3; + * + * + * @param value The enum numeric value on the wire for aggregateMethod to set. + * @return This builder for chaining. + */ + public Builder setAggregateMethodValue(int value) { + aggregateMethod_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+       * Aggregate method for the current data schema key.
+       * 
+ * + * + * optional .google.cloud.visionai.v1.SchemaKeySortingStrategy.Option.AggregateMethod aggregate_method = 3; + * + * + * @return The aggregateMethod. + */ + @java.lang.Override + public com.google.cloud.visionai.v1.SchemaKeySortingStrategy.Option.AggregateMethod + getAggregateMethod() { + com.google.cloud.visionai.v1.SchemaKeySortingStrategy.Option.AggregateMethod result = + com.google.cloud.visionai.v1.SchemaKeySortingStrategy.Option.AggregateMethod.forNumber( + aggregateMethod_); + return result == null + ? com.google.cloud.visionai.v1.SchemaKeySortingStrategy.Option.AggregateMethod + .UNRECOGNIZED + : result; + } + /** + * + * + *
+       * Aggregate method for the current data schema key.
+       * 
+ * + * + * optional .google.cloud.visionai.v1.SchemaKeySortingStrategy.Option.AggregateMethod aggregate_method = 3; + * + * + * @param value The aggregateMethod to set. + * @return This builder for chaining. + */ + public Builder setAggregateMethod( + com.google.cloud.visionai.v1.SchemaKeySortingStrategy.Option.AggregateMethod value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000004; + aggregateMethod_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+       * Aggregate method for the current data schema key.
+       * 
+ * + * + * optional .google.cloud.visionai.v1.SchemaKeySortingStrategy.Option.AggregateMethod aggregate_method = 3; + * + * + * @return This builder for chaining. + */ + public Builder clearAggregateMethod() { + bitField0_ = (bitField0_ & ~0x00000004); + aggregateMethod_ = 0; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.visionai.v1.SchemaKeySortingStrategy.Option) + } + + // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.SchemaKeySortingStrategy.Option) + private static final com.google.cloud.visionai.v1.SchemaKeySortingStrategy.Option + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.SchemaKeySortingStrategy.Option(); + } + + public static com.google.cloud.visionai.v1.SchemaKeySortingStrategy.Option + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser